Skip to content

fix: resolve merge conflicts from v4 into v4-next#22276

Merged
PhilWindle merged 13 commits into
v4-nextfrom
claudebox/fix-v4-into-v4-next-conflicts
Apr 2, 2026
Merged

fix: resolve merge conflicts from v4 into v4-next#22276
PhilWindle merged 13 commits into
v4-nextfrom
claudebox/fix-v4-into-v4-next-conflicts

Conversation

@AztecBot

@AztecBot AztecBot commented Apr 2, 2026

Copy link
Copy Markdown
Collaborator

Summary

Resolves merge conflicts in sync/v4-into-v4-next-20260402-121022 branch (merge from v4 into v4-next).

Three conflicts resolved:

  • yarn-project/p2p/src/client/factory.ts: Import conflict — combined both sides to include createCheckAllowedSetupCalls, createTxValidatorForReqResponseReceivedTxs, createTxValidatorForTransactionsEnteringPendingTxPool, and getDefaultAllowedSetupFunctions
  • yarn-project/validator-client/src/validator.test.ts (type): Used v4's ReturnType<typeof generatePrivateKey>[] over inline 0x${string}[] for consistency with the imported generatePrivateKey
  • yarn-project/validator-client/src/validator.test.ts (method name): Used getProposalHandler() which matches the actual method defined in validator.ts

ClaudeBox log: https://claudebox.work/s/24854bae46b9a696?run=2

AztecBot and others added 13 commits March 25, 2026 18:11
#21998)

## Summary
Backport of #21988
to v4.

Adds full transaction validation (via `TxValidator`) to txs retrieved
from the tx file store and node RPC sources, replacing the previous
hash-only validation. This ensures downloaded txs are validated with the
same rigor as txs received via p2p.

## Cherry-pick details
- **Commit 1**: Raw cherry-pick with conflict markers in
`yarn-project/p2p/src/client/factory.ts`
- **Commit 2**: Conflict resolution — simplified import to only include
functions used in this file

The conflict was minor: the v4 branch had a single-line import while
`next` had a multi-line import block with additional unused imports
(`createCheckAllowedSetupCalls`, `getDefaultAllowedSetupFunctions`).
Resolved by importing only the two functions actually used.

## Verification
- Build passes (`yarn build`)
- All related tests pass:
  - `p2p/src/services/tx_collection/tx_source.test.ts` (3/3)
  - `p2p/src/services/tx_file_store/tx_file_store.test.ts` (17/17)
  - `foundation/src/collection/array.test.ts` (61/61)

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

---------

Co-authored-by: Alex Gherghisan <alexghr@users.noreply.github.com>
…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>
…e-please version (#21984)

## Summary
Since we've stopped using release-please, the `deploy-staging-public`
workflow was broken — it read the version from
`.release-please-manifest.json` and waited for a tag matching that exact
version.

This PR removes the release-please manifest dependency and instead:
- Polls for **any valid semver tag** at HEAD using `ci3/semver check`
- If multiple semver tags exist, picks the highest using `ci3/semver
sort`

## Changes
The updated workflow is in
`.github-new/workflows/deploy-staging-public.yml` and needs to be moved
to `.github/workflows/deploy-staging-public.yml` before merging.

- Removed the "Read version from manifest" step entirely
- Replaced the tag-matching grep with `ci3/semver check` validation
- Uses `ci3/semver sort` to pick the highest tag when multiple exist

ClaudeBox log: https://claudebox.work/s/43c486478ab3e16b?run=1
BEGIN_COMMIT_OVERRIDE
fix: deploy-staging-public waits for any semver tag instead of
release-please version (#21984)
fix: Fix blob encoding when uploaded from proposals (#22045)
END_COMMIT_OVERRIDE
## Summary

The `testnet_compatibility` and `mainnet_compatibility` tests were only
running on PRs targeting branches matching `^v[0-9]+$` (e.g. `v4`). This
missed three other critical branches:

- `backport-to-v4-staging`
- `v4-next`
- `backport-to-v4-next`

This caused a compatibility break on staging-public (4.2.0-aztecnr.2
bricking nodes due to block header shape changes between 4.1 and 4.2) to
go undetected.

## Fix

Expanded the regex in `yarn-project/bootstrap.sh` to:
```
^(v[0-9]+(-next)?|backport-to-v[0-9]+-(staging|next))$
```

This matches all four required branch patterns while still excluding
`next`, `master`, and other non-release branches.

ClaudeBox log: https://claudebox.work/s/dd9d82043dbc175f?run=1
Adapted block_store.ts for v4 branch structure:
- Kept v4's inline previous-checkpoint-block extraction (no getPreviousCheckpointBlock helper)
- Used checkpoints[0] reference instead of firstCheckpointNumber for post-skip correctness
- Only included skipOrUpdateAlreadyStoredCheckpoints method (the actual fix)
- Dropped getPreviousCheckpointBlock and validateCheckpointBlocks refactors from next
…2252) (#22257)

## Summary

Backport of #22252
to v4.

Fixes a mainnet issue where an L1 reorg moved a checkpoint to a
different L1 block, causing the archiver to re-discover it and crash
with `InitialCheckpointNumberNotSequentialError` in an infinite loop.

When `addCheckpoints` receives a checkpoint that's already stored, it
now:
- **Accepts it** if the archive root matches (same content, just
different L1 block)
- **Updates the L1 metadata** (block number, timestamp, hash) and
attestations
- **Throws** if the archive root doesn't match (content mismatch —
genuine conflict)

## Conflict Resolution

Cherry-pick had one conflict in `block_store.ts`:
- v4 uses inline code for extracting previous checkpoint block data;
`next` refactored this into a `getPreviousCheckpointBlock()` helper.
Kept v4's inline approach but updated to use `checkpoints[0]` reference
(correct after potential skip of already-stored checkpoints).
- Only ported `skipOrUpdateAlreadyStoredCheckpoints` method (the fix).
Dropped `getPreviousCheckpointBlock` and `validateCheckpointBlocks`
refactors that exist on `next` but not v4.

## Test Results

- 176 passed in `kv_archiver_store.test.ts`
- 33 passed in `archiver-sync.test.ts` (includes new `handles L1 reorg
that moves a checkpoint to a later L1 block` test)
- Build, format pass

ClaudeBox log: https://claudebox.work/s/21a4c138364df1ef?run=1
BEGIN_COMMIT_OVERRIDE
fix: run compatibility tests on all v4-related branches (#22149)
END_COMMIT_OVERRIDE
@AztecBot AztecBot added ci-draft Run CI on draft PRs. claudebox Owned by claudebox. it can push to this PR. labels Apr 2, 2026
@alexghr alexghr changed the base branch from backport-to-v4-next-staging to v4-next April 2, 2026 14:45
@PhilWindle PhilWindle marked this pull request as ready for review April 2, 2026 14:55
@PhilWindle PhilWindle requested a review from charlielye as a code owner April 2, 2026 14:55
@PhilWindle PhilWindle merged commit c92c474 into v4-next Apr 2, 2026
25 of 28 checks passed
@PhilWindle PhilWindle deleted the claudebox/fix-v4-into-v4-next-conflicts branch April 2, 2026 14:55
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.

3 participants