feat(vara.eth/ethexe-consensus): squash transitions before BatchFiller for accurate batch sizing - #5581
Draft
grishasobol wants to merge 5 commits into
Draft
feat(vara.eth/ethexe-consensus): squash transitions before BatchFiller for accurate batch sizing#5581grishasobol wants to merge 5 commits into
grishasobol wants to merge 5 commits into
Conversation
…atch size Introduce incremental TransitionsSquasher and make the producer trial-fit the squashed+sorted payload — the exact bytes that end up in the chain commitment — so repeated-actor transitions are charged once (#5356). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…lain accessor Squash+sort now happens on the producer path before inclusion, so the filler only enforces the invariant (debug asserts) instead of mutating. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…izing Unit: producer fits both MBs when the budget only covers the squashed payload; into_parts no longer mutates; filler rejects unsquashed input. Integration: tight-budget coordinator → default participant round-trip. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Idempotence, incremental==one-shot, signed value_to_receive vs i128 reference model, first-seen order, negative-first stable sort. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
… accepted Capture last_advanced_eth_block from the accepted trial instead of re-reading mb_meta after the loop — removes the implicit assumption that MB metadata is stable between probe and include (audit finding). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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.
Closes #5356
Summary
TransitionsSquasher(refactored fromsquash_transitions_by_actorinternals, which stays as a thin wrapper).try_include_chain_commitment) now trial-fits the squashed and sorted payload — the exact bytes that end up in the chain commitment — so repeated-actor transitions are charged against the batch size budget once, not per MB. Previously the budget was charged pre-squash, under-filling batches.BatchFiller::into_parts()becomes a plain accessor; the squash/sort responsibility moves before inclusion. Debug asserts ininclude_chain_commitmentenforce the "squashed + negative-value-first" invariant.Test plan
into_partsreturns the chain commitment unchanged; unsquashed input trips the debug assertvalue_to_receivevsi128reference model; first-seen order; negative-first stable sortcargo nextest run -p "ethexe-*": 532/538 passed locally; 6 failures are the known Anvil flaky-under-load set, all pass in isolation🤖 Generated with Claude Code