Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incoming Block Hooks #68

Merged
merged 7 commits into from
May 27, 2020
Merged

Incoming Block Hooks #68

merged 7 commits into from
May 27, 2020

Conversation

hannahhoward
Copy link
Collaborator

@hannahhoward hannahhoward commented May 21, 2020

Goals

Provide a mechanism to execute hooks on the client side as each block is successfully verified and loaded

Implementation

  • Define block hook interfaces
  • Modify AsyncLoadResult to identify if request was loaded from local blockstore or from response from network
  • Add block hooks infrastructure to requestmanager side -- using same pubsub interface
  • Add block hook processing to the request manager & its loader. What this looks like is:
    • Add an extra parameter to the wrapped async loader to run a block hook on each successfully loaded block
    • Refactor setup request to seperate request validation and request processing
    • add an atomic.Value to each inProgressRequestStatus to track the last response received
    • add code to update last response received
    • when each block is loaded, the block hook function in the loader reads the last response for this request, then passes it to the block hooks to process, then takes action based on result
  • Add transactions to the response sender -- this allows us to insure groups of response operations are sent in a single response -- fixes an existing bug with block hooks

add types (not implemented) for incoming block hook
add a boolean value to AsyncLoadResult to determine if a request load was local
Process block hooks on each block, and connect last response to blocks
add the ability to do multple response operations with a gaurantee they will end up in a single
response
@hannahhoward hannahhoward merged commit 430b4dc into master May 27, 2020
@aschmahmann aschmahmann mentioned this pull request Sep 22, 2020
72 tasks
@mvdan mvdan deleted the feat/receive-block-hook branch December 15, 2021 14:16
marten-seemann pushed a commit that referenced this pull request Mar 2, 2023
docs(CHANGELOG): update for 0.6.2 release
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant