Disseminate auxiliary info and approvals via network messages - #506
Draft
samliok wants to merge 2 commits into
Draft
Disseminate auxiliary info and approvals via network messages#506samliok wants to merge 2 commits into
samliok wants to merge 2 commits into
Conversation
… VM, rework epoch transitions Extract LastBlock and epoch/validator-set derivation into util.go with tests. Split ParseBlock into a BlockDeserializer interface and move ICM epoch computation to a Config field. Replace EpochAwareStorage with InstanceStorage, which skips Telocks by block type and exposes an onIndex hook. Signal epoch changes via EpochConfig.OnSealingBlockIndex for validators and nonvalidator.Config.TransitionToValidator for non-validators instead of the storage wrapper. Rework processEpochChange to honor Stop for validators and notifyEpochChange to keep only the newest pending change.
Add Message.AuxiliaryInfo and Message.EpochTransitionApproval along with the common.AuxiliaryInfo type. Blocks now carry an AuxiliaryInfoBatch with one entry per contributing node instead of a single locally generated entry. The builder collects legal entries from a new auxInfoStore mempool populated by HandleAuxiliaryInfo, and SignApproval is exported so callers can sign and broadcast their own approvals. GetAuxiliaryHistory exposes the aux history traversal used to decide whether to generate info or approve. Note: this changes the wire format of the metadata aux info field, and the candidate digest for an empty aux history is now the zero digest instead of sha256(nil).
samliok
force-pushed
the
instance-refactor
branch
from
August 13, 2026 23:11
d02a4a6 to
508e9a8
Compare
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.
Second PR of the cleanup-instance stack (2/4), on top of #505.
Auxiliary info and epoch transition approvals become network messages instead of being generated locally by the block builder:
Message.AuxiliaryInfoandMessage.EpochTransitionApprovalfields and acommon.AuxiliaryInfotype.AuxiliaryInfoBatchholding one entry per contributing node. The builder collects legal entries from a newauxInfoStoremempool (populated byHandleAuxiliaryInfo) instead of callingGenerateitself.SignApprovalis exported so the transition listener (next PR) can sign and broadcast approvals, andGetAuxiliaryHistoryexposes the aux history traversal.The new APIs are unused until the wiring PR on top of this one.
Reviewer notes:
sha256(nil)to the zero digest, which is consensus-visible.InitializeApprovalStore/Approvals()currently have no consumers.computeExpectedAuxInfoForApprovalCollection, the version-mismatch branch wrapserrwhile it is nil.Clone()now shallow-copies the batch where the old struct was deep-cloned.