Skip to content

refactor: extract checkpoint proposal handling to ProposalHandler (backport #21999)#22005

Merged
spalladino merged 3 commits into
backport-to-v4-stagingfrom
claudebox/backport-21999-proposal-handler-v4
Mar 25, 2026
Merged

refactor: extract checkpoint proposal handling to ProposalHandler (backport #21999)#22005
spalladino merged 3 commits into
backport-to-v4-stagingfrom
claudebox/backport-21999-proposal-handler-v4

Conversation

@AztecBot

Copy link
Copy Markdown
Collaborator

Summary

Backport of #21999 to v4.

Renames BlockProposalHandler to ProposalHandler and adds checkpoint proposal handling, so non-validator nodes with blob upload capability can validate checkpoint proposals and upload blobs to the filestore. The validator client now delegates checkpoint validation and blob upload to the ProposalHandler instead of doing it inline.

Conflicts Resolved

  • proposal_handler.ts: Import conflict — added new imports (accumulateCheckpointOutHashes, CheckpointProposalCore, MerkleTreeId) needed for checkpoint handling.
  • validator.ts: Two conflicts around signature validation and fee modifier checks that were moved to ProposalHandler. Used v4's slotNumber variable name instead of proposalSlotNumber from next.
  • validator.test.ts: Added new HA peer test from the PR.

Build Fix

  • Hoisted validatorPrivateKeys from beforeEach scope to describe scope in validator.test.ts so the new test can access it.

ClaudeBox log: https://claudebox.work/s/bd9a0060cbf1923d?run=1

@AztecBot AztecBot added ci-draft Run CI on draft PRs. claudebox Owned by claudebox. it can push to this PR. labels Mar 25, 2026
@spalladino spalladino marked this pull request as ready for review March 25, 2026 16:38
spalladino and others added 2 commits March 25, 2026 16:46
Resolved conflicts in validator.ts and validator.test.ts:
- Removed signature/fee validation from attestToCheckpointProposal (moved to ProposalHandler)
- Added null check on proposer for self-proposal detection
- Used v4 variable name 'slotNumber' instead of 'proposalSlotNumber'
- Added new HA peer test
The new test added in the cherry-pick references validatorPrivateKeys
which was scoped to beforeEach on v4. Hoisted to describe scope.
@AztecBot AztecBot force-pushed the claudebox/backport-21999-proposal-handler-v4 branch from 675a1ff to 2be3e5e Compare March 25, 2026 16:48
@spalladino spalladino enabled auto-merge (squash) March 25, 2026 17:04
The PR changed self-proposal handling from rejecting (return false) to
logging and continuing validation. This allows HA peers running the same
validator key on different nodes to process each other's block proposals.
The cherry-pick didn't catch this because it wasn't in a conflicted region.
@spalladino spalladino merged commit 78d5dc4 into backport-to-v4-staging Mar 25, 2026
9 checks passed
@spalladino spalladino deleted the claudebox/backport-21999-proposal-handler-v4 branch March 25, 2026 17:49
alexghr pushed a commit that referenced this pull request Mar 25, 2026
…ckport #21999) (#22005)

## Summary

Backport of #21999
to v4.

Renames `BlockProposalHandler` to `ProposalHandler` and adds checkpoint
proposal handling, so non-validator nodes with blob upload capability
can validate checkpoint proposals and upload blobs to the filestore. The
validator client now delegates checkpoint validation and blob upload to
the `ProposalHandler` instead of doing it inline.

## Conflicts Resolved

- **proposal_handler.ts**: Import conflict — added new imports
(`accumulateCheckpointOutHashes`, `CheckpointProposalCore`,
`MerkleTreeId`) needed for checkpoint handling.
- **validator.ts**: Two conflicts around signature validation and fee
modifier checks that were moved to `ProposalHandler`. Used v4's
`slotNumber` variable name instead of `proposalSlotNumber` from next.
- **validator.test.ts**: Added new HA peer test from the PR.

## Build Fix

- Hoisted `validatorPrivateKeys` from `beforeEach` scope to `describe`
scope in `validator.test.ts` so the new test can access it.

ClaudeBox log: https://claudebox.work/s/bd9a0060cbf1923d?run=1

---------

Co-authored-by: Santiago Palladino <santiago@aztec-labs.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-draft Run CI on draft PRs. claudebox Owned by claudebox. it can push to this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants