Skip to content

feat: merge-train/spartan#20755

Merged
AztecBot merged 25 commits intonextfrom
merge-train/spartan
Feb 24, 2026
Merged

feat: merge-train/spartan#20755
AztecBot merged 25 commits intonextfrom
merge-train/spartan

Conversation

@AztecBot
Copy link
Collaborator

@AztecBot AztecBot commented Feb 23, 2026

BEGIN_COMMIT_OVERRIDE
feat: dynamically adjust peer set in batch tx requester (#20638)
chore: fix worker wallet log level (#20754)
chore: run spartan bench from next (#20758)
fix: Deflake the gossip test (#20739)
chore: Removed dead code (#20740)
fix: pass log level to AVM simulator (#20762)
refactor: Consolidate transaction validators (#20631)
chore: double Node.js libuv thread count (#20709)
chore: benchmark block building (#20767)
refactor: redesign failed L1 tx store for full tx replay (#20568)
chore: fix yaml encoding of consensus API keys (#20772)
chore: deploy staging-public (#20774)
fix: underflow in snapshot synch (#20780)
chore: add alert on proof failures (#20778)
fix: separate rejected and aborted proving jobs (#20777)
chore: dedupe release notes (#20662)
chore: monitor ELU in E2E tests (#20781)
END_COMMIT_OVERRIDE

deffrian and others added 3 commits February 20, 2026 21:31
Ref: A-490
- `PeerCollection` now queries peers dynamically from `connectionSampler` instead of storing a static snapshot from the constructor, so the peer list always reflects the current network state.
- Replaced `getDumbPeersToQuery` / `getSmartPeersToQuery` (return full arrays) with `nextDumbPeerToQuery` / `nextSmartPeerToQuery` (return one peer at a time in round-robin), removing external `makeRoundRobinIndexer`
  closures from `BatchTxRequester`.

Co-authored-by: Nikita Meshcheriakov <root@nikitam.io>
Ref: A-490
- `PeerCollection` now queries peers dynamically from
`connectionSampler` instead of storing a static snapshot from the
constructor, so the peer list always reflects the current network state.
- Replaced `getDumbPeersToQuery` / `getSmartPeersToQuery` (return full
arrays) with `nextDumbPeerToQuery` / `nextSmartPeerToQuery` (return one
peer at a time in round-robin), removing external
`makeRoundRobinIndexer`
  closures from `BatchTxRequester`.
PhilWindle and others added 6 commits February 23, 2026 11:30
Fixes the timout duration for waiting for a proven block
This PR removes the old `getTxsByHash` call from `P2PClient` as it is no longer used.
This PR removes the old `getTxsByHash` call from `P2PClient` as it is no
longer used.
PhilWindle and others added 14 commits February 23, 2026 14:22
## Summary

- Split gossiped transaction validation into two stages with a pool
pre-check in between, so expensive proof verification is skipped for
transactions the pool would reject (duplicates, low priority, pool full)
- Consolidated all transaction validator factories into a single
well-documented `factory.ts` with clear entry points for each path:
gossip (two-stage), RPC, req/resp, block proposals, block building, and
pending pool migration
- Simplified `canAddPendingTx` by removing validation from it (now only
checks pool state, not tx validity), narrowing its return type from
`accepted | ignored | rejected` to `accepted | ignored`
- Replaced the monolithic `validatePropagatedTx` and
`createMessageValidators` methods with explicit
`createFirstStageMessageValidators` and
`createSecondStageMessageValidators`
- Added separate `validateTxsReceivedInBlockProposal` path using
well-formedness-only checks (metadata, size, data, proof) since block
proposal txs must be accepted for re-execution
- Documented the full validation strategy in a README with a coverage
matrix showing which validators run at each entry point

## Gossip validation flow (before -> after)

**Before:** Deserialize -> run ALL validators (including proof) -> add
to pool
**After:** Deserialize -> Stage 1 (fast checks) -> pool pre-check
(`canAddPendingTx`) -> Stage 2 (proof verification) -> add to pool

This avoids wasting resources on proof verification for transactions the
pool would reject anyway.

## Test plan

- Unit tests for all factory functions verify correct validator
composition and severity assignments
- New libp2p service tests cover: pool pre-check short-circuiting proof
verification, stage ordering guarantees, second-stage failure handling,
severity propagation, no peer penalty on pool ignore, and full happy
path
- Existing pool tests updated (removed `canAddPendingTx` rejected case
that no longer applies)
- All existing validator unit tests continue to pass
Increases the libuv thread pool size to improve I/O performance in the
yarn-project. We have the AVM simulator and liblmdb stuff that can hold
multiple threads, so the original count of 4 is seeming low.
Benchmark `addBlock`. Assembling the block and adding it to the
checkpoint seems to be taking a long time. From my testing I saw approx
400ms being spent on this operation:

```
duration: 584.6966910000192
message: "Built block 16 at checkpoint 16 for slot 32 with 8 txs"
publicProcessDuration: 136.1458359999815
contractClassLogCount: 8
contractClassLogSize: 24184
txCount: 8
```
See the difference between `duration` and `publicProcessDuration`. This
was a block containing 8 txs with maxed out contract class logs.

This PR adds benchmarks to investigate time spent on this operation.

Fix A-573
## Summary

- Redesigns `FailedL1Tx` type to capture the **complete L1 transaction**
(multicall-encoded calldata + blobs + L1 block number) instead of
individual requests from bundled multicall txs
- Eliminates path collisions when multiple requests in a bundle write to
the same file
- Adds `l1BlockNumber` field so failed txs can be replayed against a
fork via `cast call --block <blockNumber> <to> <data>`
- Changes `context.action` (string) to `context.actions` (string array)
to represent all actions in a bundled tx
- Adds `'send-error'` failure type for pre-send failures (distinct from
simulation and on-chain reverts)
- Updates file path scheme to use `tx-`/`data-` prefix to distinguish
real tx hashes from calldata hashes
- Updates replay script to use new schema and `l1BlockNumber` for
block-targeted simulation

## Test plan

- [x] `yarn build` passes
- [x] `yarn format` passes
- [x] `yarn lint` passes
- [ ] Manual: set `L1_TX_FAILED_STORE=file:///tmp/failed-txs` and verify
JSON files are written with correct structure on simulation failures
- [ ] Manual: verify replay script works against saved JSON files

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

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
The empty API keys would get dropped which would break the alignment
between API hosts and API keys.
Pushes to v4 will automatically trigger a deploy to staging-public (from
the next branch). The workflow needs to be backported in order for the
workflow to trigger (on the target branch).
This PR tracks rejected and aborted jobs as separate counters enabling
us to setup alerts when any proofs fail. This PR has to be backported
otherwise we'll get alerts when jobs get cancelled as well.
Adds an event-loop-utilisation monitor that logs to a file for each test in CI.

Related to A-530
Copy link
Collaborator

@ludamad ludamad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Auto-approved

@AztecBot AztecBot added this pull request to the merge queue Feb 24, 2026
@AztecBot
Copy link
Collaborator Author

🤖 Auto-merge enabled after 4 hours of inactivity. This PR will be merged automatically once all checks pass.

Merged via the queue into next with commit afeed80 Feb 24, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants