Skip to content

fix(validator): include proposed checkpoint out-hashes when validating checkpoint proposals#23119

Open
spalladino wants to merge 2 commits intospl/override-full-checkpoint-data-on-l1from
spl/diagnostics-out-hash-helper
Open

fix(validator): include proposed checkpoint out-hashes when validating checkpoint proposals#23119
spalladino wants to merge 2 commits intospl/override-full-checkpoint-data-on-l1from
spl/diagnostics-out-hash-helper

Conversation

@spalladino
Copy link
Copy Markdown
Contributor

@spalladino spalladino commented May 8, 2026

Extract the fix for outHashes added in #23073 in the proposer so that it can be reused in validators as well. Enables pipelining on add_rollup e2e p2p test, which was failing because of this bug. Also adds a bunch of logging, which was needed to track down the issue.

Builds on top of #23073

…in validators

The proposer-side fix from #23110 (parent checkpointOutHash splice under
pipelining) was inlined as a private method on `CheckpointProposalJob`. The
validator's block re-execution and checkpoint-proposal validation paths in
`proposal_handler.ts` compute the same `previousCheckpointOutHashes` list
through the same archiver-driven query, so they have the same off-by-one
window: if the parent cp lands on L1 between when the validator pulls and
when it re-derives, only the proposer would carry the spliced parent and
attestations would mismatch.

Extract the proposer's logic into a shared `getPreviousCheckpointOutHashes`
helper in `stdlib/src/checkpoint/`. The helper accepts the proposer's
already-loaded `proposedCheckpointData` directly, and falls back on
`L2BlockSource.getProposedCheckpointData(...)` for callers that don't have
it on hand (validator). Wire the helper into the proposer (replacing the
private method) and into both validator sites.

Add a few diagnostics that helped pinpoint this class of bug:
- `prover-node-publisher.ts`: when the L1-recomputed `RootRollupPublicInputs`
  vector mismatches the prover's, decode the differing indices into labels
  (`previousArchiveRoot`, `endArchiveRoot`, `outHash`,
  `checkpointHeaderHashes[i]`, `fees[i].recipient/value`, `constants.*`,
  `blobPublicInputs[*]`), fetch the L1 `CheckpointLog` for any mismatching
  `checkpointHeaderHashes[i]`, and emit a structured error log alongside
  the throw — much easier to triage than the previous opaque dump.
- `BlockRollupPublicInputs.toInspect()` and
  `CheckpointRollupPublicInputs.toInspect()` to keep per-stage orchestrator
  debug logs short.
- Per-stage debug logs in the orchestrator (block-root, block-merge,
  checkpoint-root) consume the new `toInspect()` outputs.
- Lightweight checkpoint builder logs `headerHash` and the size of
  `previousCheckpointOutHashes` at debug.
- Epoch proving job's per-checkpoint start log trimmed to the fields that
  are actually useful for cross-comparison.
@spalladino spalladino force-pushed the spl/diagnostics-out-hash-helper branch from 8bb0f23 to b507d54 Compare May 8, 2026 22:38
Mirrors the pipelining toggles applied to the rest of the p2p e2e suite
(`enableProposerPipelining: true`, `inboxLag: 2`, `minTxsPerBlock: 0`) plus
the test-side adjustments needed to keep cross-chain assertions deterministic
(`waitForL1ToL2MessageReady` instead of the older `waitForL1ToL2MessageSeen`,
longer per-test jest timeout). Intentionally does NOT add the
`EpochTestSettler` cheat-code workaround that previously masked the
`Root rollup public inputs mismatch`; the helper-based fix earlier in this
PR is what unblocks add_rollup under pipelining.
@spalladino spalladino force-pushed the spl/diagnostics-out-hash-helper branch from b507d54 to 3ee9452 Compare May 8, 2026 22:41
@spalladino spalladino changed the title feat(sequencer): extract pipelined checkpoint out-hash helper, reuse in validators fix(validator): include proposed checkpoint out-hashes when validating checkpoint proposals May 8, 2026
@AztecBot
Copy link
Copy Markdown
Collaborator

AztecBot commented May 8, 2026

Flakey Tests

🤖 says: This CI run detected 1 tests that failed, but were tolerated due to a .test_patterns.yml entry.

\033FLAKED\033 (8;;http://ci.aztec-labs.com/4499574f643d19d5�4499574f643d19d58;;�):  yarn-project/end-to-end/scripts/run_test.sh simple src/e2e_epochs/epochs_mbps.parallel.test.ts "builds multiple blocks per slot with L2 to L1 messages" (391s) (code: 0) group:e2e-p2p-epoch-flakes

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.

2 participants