Skip to content

Wire the epoch transition listener into the instance - #507

Draft
samliok wants to merge 1 commit into
aux-disseminationfrom
transition-listener
Draft

Wire the epoch transition listener into the instance#507
samliok wants to merge 1 commit into
aux-disseminationfrom
transition-listener

Conversation

@samliok

@samliok samliok commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

Third PR of the cleanup-instance stack (3/4), on top of #506.

Adds epochTransitionListener and hooks it into the instance:

  • NewInstance constructs the listener and wires its onIndex into 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).
  • When a transition block is indexed, the listener either generates and broadcasts auxiliary info, or once the history is sufficient, signs and broadcasts an epoch transition approval. Validators also record their own approval locally; non-validators pass a nil handler.
  • HandleMessage routes incoming AuxiliaryInfo and EpochTransitionApproval messages into the MSM.

Note: the original branch's TestSealingBlockCallback asserted the listener invokes an epoch-change callback on sealing blocks, but no such callback exists (epoch changes are signaled via OnSealingBlockIndex since #505), so the test could never pass. It is reworked as TestListenerIgnoresSealingBlock to assert the current behavior.

Related: #497 fixes the seq-only cache lookup used by the aux history traversal.

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.
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