test(e2e): anchor multiple_blobs PXE on checkpointed tip to survive cold-start reorg#24446
Closed
spalladino wants to merge 1 commit into
Closed
test(e2e): anchor multiple_blobs PXE on checkpointed tip to survive cold-start reorg#24446spalladino wants to merge 1 commit into
spalladino wants to merge 1 commit into
Conversation
…old-start reorg The multiple_blobs setup deploy in beforeAll intermittently fails with 'Tx dropped by P2P node'. setupBlockProducer defaults the PXE to syncChainTip: 'proposed', so a tx anchors on the pending (uncheckpointed) tip. When the node cold-starts inside a slot whose checkpoint-proposal deadline has already elapsed, the sequencer never proposes that slot's checkpoint to L1 and the archiver orphan-prunes the uncheckpointed block. The deploy tx's anchor block vanishes in that prune, the p2p block-header validator rejects it as referencing an unknown block header, and the pool deletes it, so waitForTx throws. Anchoring this test's PXE on the checkpointed tip makes the anchor durable by construction (a checkpointed block always has a proposed checkpoint and is never orphan-pruned), which matches the test's pre-consolidation behavior and its own waitForTxs CHECKPOINTED wait semantics. The test only needs its txs mined and checkpointed, not the freshly-proposed tip. Fixes a flake seen in CI run 1b22551cac4ccb41.
Collaborator
Flakey Tests🤖 says: This CI run detected 1 tests that failed, but were tolerated due to a .test_patterns.yml entry. |
Contributor
Author
|
Closing in favor of #24474 |
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.
Problem
single-node/block-building/multiple_blobsflakes in itsbeforeAllhook with:thrown from
waitForTxon the setup deployTestContract.deploy(wallet).send({ from }). Seen in CI run1b22551cac4ccb41.Root cause
Confirmed by comparing the failing run against a passing retry on the same commit:
setupBlockProducerdefaults the PXE tosyncChainTip: 'proposed', so each tx anchors its historical state on the pending (not-yet-checkpointed) chain tip.orphanPruneNoProposalTolerance) legitimately removed the uncheckpointed block once past its deadline, pruning the chain back to block 0.BlockHeaderTxValidatorrejected the tx for referencing an unknown block header, the pool deleted it, andwaitForTxobserved the drop and threw.This is a benign cold-start slot-clock race, not a product bug: orphan-pruning an uncheckpointed past-deadline block is correct, and the validator rejecting an unknown anchor is correct. The tx is dropped only because it was anchored on the volatile proposed tip.
Fix
Anchor this test's PXE on the checkpointed tip (
pxeOpts: { syncChainTip: 'checkpointed' }), which is what the test used before the single-node consolidation refactor:multiple_blobsdoes not assert on freshly-proposed state — it sends its txs, waits for them viawaitForTxs(which already waits forCHECKPOINTEDstatus), reads the receipt's block, and checks that the block spans more than one blob. The checkpointed anchor is both sufficient and consistent with the test's own wait semantics.The change is scoped to this test only;
setupBlockProducer's'proposed'default is left intact for the sibling block-building tests that intentionally exercise the freshly-proposed tip.Note on PR #24428
This flake was flagged on PR #24428 but is not caused by it. #24428 only touches test-side code and none of
multiple_blobs.test.ts,single-node/setup.ts, the PXE block synchronizer, or the archiver. ThesyncChainTip: 'proposed'default that triggers this race was introduced earlier by the single-node consolidation refactor (#24310), so this is a pre-existing v5-line flake.Verification