Skip to content

refactor: add getCheckpointsDataForEpoch and enrich CheckpointData#20467

Merged
PhilWindle merged 1 commit intomerge-train/spartanfrom
palla/checkpoint-data-optimization
Feb 16, 2026
Merged

refactor: add getCheckpointsDataForEpoch and enrich CheckpointData#20467
PhilWindle merged 1 commit intomerge-train/spartanfrom
palla/checkpoint-data-optimization

Conversation

@spalladino
Copy link
Contributor

@spalladino spalladino commented Feb 13, 2026

  • Adds a new getCheckpointsDataForEpoch method to L2BlockSource that returns CheckpointData (metadata-only, no full blocks), avoiding unnecessary block fetching when callers only need checkpoint out-hashes
  • Moves CheckpointData type from archiver to stdlib with richer typing: attestations as CommitteeAttestation[] (not Buffer[]), startBlock as BlockNumber, precomputed checkpointOutHash, and numBlocks renamed to blockCount
  • Adds a new index slot-to-checkpoint-number in the archiver store, so we can grab checkpoints for a given epoch without having to potentially walk the entire set of checkpoints.
  • Migrates sequencer, validator, block proposal handler, and slasher to use the new lightweight method, resolving the TODO in block_proposal_handler.ts about inefficient block fetching
  • Updates the mock block source (used in tests only) to handle mbps (in a separate commit)

🤖 Generated with Claude Code

@spalladino spalladino added the ci-no-fail-fast Sets NO_FAIL_FAST in the CI so the run is not aborted on the first failure label Feb 13, 2026
@spalladino spalladino force-pushed the palla/checkpoint-data-optimization branch from 08fd303 to 07644f5 Compare February 13, 2026 13:26
spalladino added a commit that referenced this pull request Feb 13, 2026
The block proposal handler requires access to a block header, along with
its checkpoint number. However, the checkpoint number is NOT part of the
block header, and it's a bit painful to add (since the block header goes
into circuits). Instead, the checkpoint number for a given block is only
returned as part of the full L2Block, including txs.

This PR adds an intermediate struct `BlockData` (similar to
`CheckpointData` from #20467) that contains the block header plus
checkpoint number, archive root, index within checkpoint, etc.
spalladino added a commit that referenced this pull request Feb 13, 2026
The block proposal handler requires access to a block header, along with
its checkpoint number. However, the checkpoint number is NOT part of the
block header, and it's a bit painful to add (since the block header goes
into circuits). Instead, the checkpoint number for a given block is only
returned as part of the full L2Block, including txs.

This PR adds an intermediate struct `BlockData` (similar to
`CheckpointData` from #20467) that contains the block header plus
checkpoint number, archive root, index within checkpoint, etc.
@spalladino spalladino force-pushed the palla/checkpoint-data-optimization branch from 47506d1 to 9febd7a Compare February 13, 2026 20:00
PhilWindle added a commit that referenced this pull request Feb 14, 2026
…0503)

The block proposal handler requires access to a block header, along with
its checkpoint number. However, the checkpoint number is NOT part of the
block header, and it's a bit painful to add (since the block header goes
into circuits). Instead, the checkpoint number for a given block is only
returned as part of the full L2Block, including txs.

This PR adds an intermediate struct `BlockData` (similar to
`CheckpointData` from #20467) that contains the block header plus
checkpoint number, archive root, index within checkpoint, etc.
- Adds a new `getCheckpointsDataForEpoch` method to `L2BlockSource` that returns `CheckpointData` (metadata-only, no full blocks), avoiding unnecessary block fetching when callers only need checkpoint out-hashes
- Moves `CheckpointData` type from archiver to stdlib with richer typing: `attestations` as `CommitteeAttestation[]` (not `Buffer[]`), `startBlock` as `BlockNumber`, **precomputed `checkpointOutHash`**, and `numBlocks` renamed to `blockCount`
- Adds a new index slot-to-checkpoint-number in the archiver store, so we can grab checkpoints for a given epoch without having to potentially walk the entire set of checkpoints.
- Migrates sequencer, validator, block proposal handler, and slasher to use the new lightweight method, resolving the TODO in `block_proposal_handler.ts` about inefficient block fetching
- Updates the mock block source (used in tests only) to handle mbps (in a separate commit)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Phil Windle <philip.windle@gmail.com>
Co-authored-by: Santiago Palladino <santiago@aztec-labs.com>
@AztecBot AztecBot force-pushed the palla/checkpoint-data-optimization branch from 7465802 to 8d8451c Compare February 16, 2026 15:35
@PhilWindle PhilWindle merged commit 243c693 into merge-train/spartan Feb 16, 2026
10 checks passed
@PhilWindle PhilWindle deleted the palla/checkpoint-data-optimization branch February 16, 2026 15:36
github-merge-queue bot pushed a commit that referenced this pull request Feb 17, 2026
BEGIN_COMMIT_OVERRIDE
fix: stringify all bigints in pino-logger (#20303)
chore: ensure consistent HA DB timestamps (#20398)
chore: log L1 trace errors once in debug (#20380)
test(archiver): add missing reorg and prune unit tests (#20441)
feat(ci.aztec-labs.com): CI cost and metrics tracking (#20100)
refactor(ethereum): cleaner initialization for tx delayer in l1txutils
(#20319)
chore(validator): blob upload tests (#20463)
chore: move TXE ports out of Linux ephemeral range (#20475)
fix(node): sync ws before simulating public calls (#20499)
fix(ethereum): check timeout before consuming nonce in L1TxUtils
(#20501)
chore(e2e): reenable block building test (#20504)
refactor(sequencer): rename block-level metrics to checkpoint-level
(#20505)
feat(archiver): return L2 block data to avoid fetching full block
(#20503)
chore(mbps): clean up TODOs for multiple blocks per slot (#20502)
feat(archiver): add l2 tips cache (#20510)
chore(e2e): toggle mbps in e2e tests (#20315)
fix: set PXE sync chain tip to proposed for scenario bot (#20530)
feat: Metrics added to the transaction pool (#20477)
fix(ci): preserve both attempt logs when retrying flaky tests (#20439)
feat: automatically stop node from signalling (#20416)
refactor: add getCheckpointsDataForEpoch and enrich CheckpointData
(#20467)
refactor: make prover-node a subsystem of aztec-node (#20393)
feat: worker thread wallet (#20557)
chore: fix deployments (#20558)
feat: suspend sentinel during escape hatch (#20471)
fix: async blob (#20559)
chore: vendor web3signer (#20570)
fix: Fix checkpoint invalidation test (#20579)
feat: World state history length is now defined in checkpoints (#20566)
fix: async world state cleanups (#20578)
chore: merge next into merge-train/spartan (#20582)
chore: better agent utilisation in proving test (#20562)
feat: (A-302) add reloadKeystore admin RPC endpoint (#20325)
feat: (A-451) error codes for RPC calls (#20560)
feat: (A-514) add API key authentication for admin RPC endpoint (#20411)
fix: increase waitForTx timeout in epochs_invalidate_block test (#20603)
chore: update block proposal/checkpoint proposal panel (#20584)
fix: async dispose() lint rule (#20587)
fix(p2p): fix compress option in file store and enable for tx uploads
(#20605)
chore: fixes for chaos mesh experiments (#20606)
feat(p2p): add download metrics to file store tx source (#20601)
chore: update skill to correct path and add changelog docs for new
endpoints and error codes (#20607)
chore: deflake epoch_mbps (#20609)
END_COMMIT_OVERRIDE
github-actions bot pushed a commit that referenced this pull request Feb 17, 2026
…0503)

The block proposal handler requires access to a block header, along with
its checkpoint number. However, the checkpoint number is NOT part of the
block header, and it's a bit painful to add (since the block header goes
into circuits). Instead, the checkpoint number for a given block is only
returned as part of the full L2Block, including txs.

This PR adds an intermediate struct `BlockData` (similar to
`CheckpointData` from #20467) that contains the block header plus
checkpoint number, archive root, index within checkpoint, etc.
github-actions bot pushed a commit that referenced this pull request Feb 17, 2026
…20467)

- Adds a new `getCheckpointsDataForEpoch` method to `L2BlockSource` that
returns `CheckpointData` (metadata-only, no full blocks), avoiding
unnecessary block fetching when callers only need checkpoint out-hashes
- Moves `CheckpointData` type from archiver to stdlib with richer
typing: `attestations` as `CommitteeAttestation[]` (not `Buffer[]`),
`startBlock` as `BlockNumber`, **precomputed `checkpointOutHash`**, and
`numBlocks` renamed to `blockCount`
- Adds a new index slot-to-checkpoint-number in the archiver store, so
we can grab checkpoints for a given epoch without having to potentially
walk the entire set of checkpoints.
- Migrates sequencer, validator, block proposal handler, and slasher to
use the new lightweight method, resolving the TODO in
`block_proposal_handler.ts` about inefficient block fetching
- Updates the mock block source (used in tests only) to handle mbps (in
a separate commit)

🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-no-fail-fast Sets NO_FAIL_FAST in the CI so the run is not aborted on the first failure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants