Wire the epoch transition listener into the instance - #507
Draft
samliok wants to merge 1 commit into
Draft
Conversation
Construct an epochTransitionListener in NewInstance and hook its onIndex into both the validator and non-validator storage paths, so indexing a transition block generates and broadcasts auxiliary info, or signs and broadcasts an epoch transition approval once the history is sufficient. Route incoming AuxiliaryInfo and EpochTransitionApproval messages into the MSM.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Third PR of the cleanup-instance stack (3/4), on top of #506.
Adds
epochTransitionListenerand hooks it into the instance:NewInstanceconstructs the listener and wires itsonIndexinto both the validator and non-validator storage paths (replacing the no-op hook from Refactor instance: extract util helpers, split BlockDeserializer, rework epoch transitions #505).HandleMessageroutes incomingAuxiliaryInfoandEpochTransitionApprovalmessages into the MSM.Note: the original branch's
TestSealingBlockCallbackasserted the listener invokes an epoch-change callback on sealing blocks, but no such callback exists (epoch changes are signaled viaOnSealingBlockIndexsince #505), so the test could never pass. It is reworked asTestListenerIgnoresSealingBlockto assert the current behavior.Related: #497 fixes the seq-only cache lookup used by the aux history traversal.