feat(node): bound the block-proof merge with a publish-budget attestation-group cap#992
Draft
GrapeBaBa wants to merge 1 commit into
Draft
feat(node): bound the block-proof merge with a publish-budget attestation-group cap#992GrapeBaBa wants to merge 1 commit into
GrapeBaBa wants to merge 1 commit into
Conversation
…ion-group cap) The proposal deadline (proposal_deadline_pct) bounded only the gathering/ compaction phase; the Type-2 merge itself ran unbounded, so a busy pool let the block-proof merge push gossip publication multiple intervals late. The merge cost scales with its component count (one per attestation group + the proposer), so the proposer now derives a group cap from a publish budget: publish budget (proposal_publish_target_intervals, default 2 intervals) - gathering budget - signing margin = merge budget merge budget / per-component cost estimate - 1 (proposer part) = group cap The per-component estimate is an EMA of measured merges, seeded at 800ms and updated only from multi-part merges (a proposer-only merge attributes its whole fixed cost to one part and would ratchet the cap down). The cap floors at one group: attestations only reach the state through blocks, so capping to zero across the network would stall justification outright; the thin-vs-late trade applies only above the floor. Deferred groups stay in the pool for later proposers. Candidates are already sorted most-valuable-first, so truncation keeps the highest-coverage groups. No CLI flag yet: the arg struct already sits at zigcli's comptime eval-branch-quota cliff (any new field fails the build); the knob is plumbed through NodeOptions/ChainOpts for programmatic configuration.
Member
Author
|
Converting to draft: at current devnet scale (1-2 attestation groups per block) the cap never binds — this is scale-prep for multi-subnet configurations where merge part counts actually grow. The immediately useful piece is the observability (the per-component merge-cost EMA shows up in proposal logs, which feeds the precompute design). Will mark ready when a multi-subnet target makes it actionable. |
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.
Part of fixing delayed block publishing:
proposal_deadline_pctbounds only the gathering/compaction phase; the Type-2 merge itself was unbounded, so a busy attestation pool could push the block past interval 2-4 before it reached gossip.Mechanism
The merge cost scales with its component count (one per attestation group + the proposer part), so the proposer derives a group cap from a publish budget before building the block:
Notes
structargs.zig:140: evaluation exceeded 1000 backwards branches). The knob is plumbed throughNodeOptions/ChainOptsfor programmatic use; exposing the flag needs a zigcli quota fix first (worth its own chore).Validation
zig build+ fullzig build testgreen; new unit tests for the cap policy (computeMergeGroupCap: proposer-part reservation, liveness floor, boundary/degenerate inputs).