Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds back the async accepter queue into the snow package.
This moves potentially heavy-weight operations during
Accept
from blocking the consensus thread to a separate async accepter. As this code moves around a few pieces, I also added some improved comments around subscription guarantees (so that we are clear about reliable notifications #1145). This guarantees at least once delivery of block accept notifications.This adds a new field
lastProcessedBlock
, which is the last block that the snow package used the chain to mark as accepted and produce an instance of the accepted block type.A few extra notes on this PR:
SyncAccept
to the snow block type, which accepts a block and waits for async work on that block to complete (ensure "effects" of Accept occur before tests check for them)RecoverAndPanic
from AvalancheGo's logger and also make sure to callShutdown
on the VM, so we clean up resources before propagating the panic (open to alternative suggestions on the best way to signal fatal here)