Skip to content

chore: Accumulated backports to v4-next#21899

Merged
AztecBot merged 31 commits intov4-nextfrom
backport-to-v4-next-staging
Mar 25, 2026
Merged

chore: Accumulated backports to v4-next#21899
AztecBot merged 31 commits intov4-nextfrom
backport-to-v4-next-staging

Conversation

@AztecBot
Copy link
Copy Markdown
Collaborator

@AztecBot AztecBot commented Mar 23, 2026

BEGIN_COMMIT_OVERRIDE
fix(aztec-up): narrow PATH cleanup regex to avoid removing user PATH entries (#21828)
fix: consolidate blob source test into single summary log with supernode detection (#21719)
fix: use anchor block on getL1ToL2MsgWitness (#21872)
fix: make sure queries are not made ahead of the anchor block (#21874)
chore(docs): backport docs infrastructure changes to v4 (#21437)
chore: backport PR #21836 (fix: explicitly handle initial block case for getBlockHashMembershipWitness) to v4-next (#21891)
chore: backport PR #21813 (fix(aztec-up): strip leading v prefix from version strings) to v4-next (#21912)
docs: document defi-wonderland immutable macro (#21764)
fix: pin typescript and harden lockfile check in docs examples CI (v4 backport) (#21914)
docs: expand circuit profiling guide and document kernel gate cost overhead (#21770)
feat: cli-wallet (#21757)
chore: sync backport staging with v4-next HEAD (#21931)
fix: bot gas estimations (backport #21945) (#21947)
refactor(aztec-nr): use logging wrappers in compute_note_hash_and_nullifier (#21897)
fix: backport v4 next staging (#21934)
fix: make PXE#getSyncedBlockHeader a concurrency=1 job to prevent IDB tx liveness issues (#21944)
feat: add error page mapping for incompatible oracles (#21943)
fix(aztec-up): validate semver in uninstall to prevent path traversal (#21892)
chore: merge v4-next into backport staging (fix ancestry) (#21954)
fix(aztec-up): add truncation protection to install scripts (#21896)
fix: noir format in compute_note_hash_and_nullifier.nr (#21956)
fix(stdlib): decode EthAddress, FunctionSelector and wrapped field structs in AbiDecoder (#21926)
chore: update noir to nightly-2026-02-12-patch.1 (#21960)
fix: ensure empty docs examples does not populate yarn lock backport (#21963)
fix: docs examples does not build on simple bootstrap backport (#21964)
fix: add rc/testnet version detection to API reference pages (#21966)
docs: document EmbeddedWallet automatic gas estimation and private authwits (#21790)
fix(pxe): robust error handling in message processing (backport #21093) (#21981)
chore: manually recreate backport (#21969)
chore: (A-779) load all accounts before calling LogService.#getSecretsForSenders (#21923)
END_COMMIT_OVERRIDE

…ode detection (#21719)

Fix A-700

## Summary
- Reworks `testSources()` to detect supernodes by probing the blob
sidecar endpoint
- Keeps individual per-source validation logs (info for reachable, error
for failures)
- Emits a consolidated summary after all sources are validated:
`Blob client running with consensusSuperNodes=N archiveSources=N
blobSinks=N. M consensus client(s) ignored because they are not running
in supernode or semi-supernode mode`
- Warns if no consensus supernodes are reachable; throws if no sources
at all (unless `blobAllowEmptySources`)

## How supernode detection works
Post-Fusaka (PeerDAS), non-supernode beacon nodes no longer serve the
blob sidecar endpoint. Each consensus host is tested by:
1. Fetching `/eth/v1/beacon/headers/head` to verify reachability and get
the head slot
2. Fetching `/eth/v1/beacon/blobs/{headSlot}` to check blob sidecar
support
3. A 200 response (even with an empty data array for a slot with no
blobs) means the node serves blob sidecars (supernode/semi-supernode)
4. A non-200 response means the node does not serve blob sidecars

## Log level logic
- `info` — at least one consensus supernode available
- `warn` — no consensus supernodes (but other sources like
archive/filestore may exist)
- `throw` — no sources at all (unless `blobAllowEmptySources`)
I made the param be optional in the fn since it has other unrelated
callsites (e.g. the CLI). I also merged both node roundtrips into a
single one.
This should prevent issues were users accidentally make queries in the
future. Not sure if we should add a dedicated error message with docs
link etc.
## Summary
- Backports the newer documentation infrastructure from `next` onto
`v4-next` so the v4 docs build, versioning, redirects, and generated
references follow the same pipeline.
- Replaces stale developer snapshots with a new `v4.1.0-rc.2` testnet
docs snapshot and updates the docs app/config/scripts to treat testnet
as a first-class version alongside devnet/nightly.
- Adds automated execution coverage for TypeScript documentation
examples in CI, including the recursive verification flow and Docker
Compose-based local-network orchestration.
- Refreshes a broad set of v4 docs content and regenerates the
associated versioned docs and static API reference artifacts.

## What Changed

### Versioning and docs infrastructure
- Updates `developer_versions.json`, `docusaurus.config.js`,
preprocessing macros, and related scripts so developer docs can serve
`v4.1.0-rc.2` as the root testnet version while still supporting stable
`devnet`, `nightly`, and `testnet` API reference folders.
- Removes outdated developer snapshots that no longer match the
supported v4 docs set.
- Extends Aztec.nr and TypeScript API generation/validation scripts, LLM
appendix generation, and Netlify preview setup to understand testnet
outputs.

### Docs examples pipeline
- Splits vanilla circuit compilation from contract compilation in
`docs/examples/bootstrap.sh` so shared docs workspaces do not get
treated as contract artifacts.
- Adds a Docker Compose-driven execution path for TS docs examples via
`docs/examples/ts/docker-compose.yml` and
`docs/examples/ts/aztecjs_runner/run.sh`.
- Introduces shared dependency parsing for TS example validation and
support for per-example setup hooks (used by `recursive_verification`
proof-data generation).
- Updates affected examples to use `AZTEC_NODE_URL`, ephemeral embedded
wallets where appropriate, and L1 fee-juice bridging in the connection
example.

### Docs content and redirects
- Adds Aztec.nr standards docs for AIP-20, AIP-721, AIP-4626, escrow,
dripper, and generic proxy patterns.
- Refreshes developer/operator/participation docs including AI tooling,
migration notes, delegation, networks, staking, and multiple
tutorials/reference pages.
- Updates Netlify redirects to match renamed/reorganized v4 docs pages
and CLI reference locations.

### Generated artifacts
- Regenerates `docs/developer_versioned_docs/version-v4.1.0-rc.2/**`.
- Regenerates static Aztec.nr API docs under
`docs/static/aztec-nr-api/testnet/**`.
- Regenerates static TypeScript API docs under
`docs/static/typescript-api/testnet/**`.
- Regenerates CLI reference output and related versioned developer docs
snapshots.

## Reviewer Notes
- Most of the file-count churn in this PR is generated/versioned docs
output. The substantive hand-maintained changes are primarily in
`docs/examples/**`, `docs/scripts/**`, `docs/docusaurus.config.js`,
`docs/netlify.toml`, and the edited source docs under `docs/docs-*`.

## Test Plan
- `cd docs && yarn build`
- `cd docs && yarn test:preprocess`
- `cd docs && yarn validate:api-ref-links`
- CI coverage now includes docs example execution via
`docs/examples/bootstrap.sh execute` /
`docs/examples/ts/aztecjs_runner/run.sh`

🤖 Generated with [Claude Code](https://claude.com/claude-code)
@critesjosh critesjosh requested a review from a team as a code owner March 23, 2026 17:43
@socket-security
Copy link
Copy Markdown

socket-security Bot commented Mar 23, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatednpm/​netlify-cli@​23.7.3 ⏵ 24.0.183 -17100100100100

View full report

AztecBot and others added 3 commits March 23, 2026 19:00
…for getBlockHashMembershipWitness) to v4-next (#21891)

## Summary
Backport of #21836
to v4-next.

Cherry-pick of f8b6239 onto `backport-to-v4-next-staging` with
conflict resolution.

**Conflict:** `server.ts` had a conflict because v4-next doesn't have
the `resolveBlockNumber` method or the `N-1` world state lookup refactor
from `next`. Adapted the fix to check for block 0 using both
`BlockNumber.ZERO` and initial block hash comparison, keeping the
v4-next `getWorldState(referenceBlock)` pattern.

**Original PR description:** Explicitly handles the initial block (block
0) case in `getBlockHashMembershipWitness`. Block 0 has an empty
archive, so no membership witness can exist.

## Changes
- `yarn-project/aztec-node/src/aztec-node/server.ts`: Early return
`undefined` when reference block is block 0 (by number or hash)
- `yarn-project/aztec-node/src/aztec-node/server.test.ts`: Added test
for the initial block case

## Commits (3-commit backport structure)
1. Cherry-pick with conflict markers
2. Conflict resolution (adapted for v4-next)
3. Test comment adaptation

---------

Co-authored-by: Martin Verzilli <martin@aztec-labs.com>
## Summary
- Adds documentation for the
[aztec-immutables-macro](https://github.com/defi-wonderland/aztec-immutables-macro/tree/dev)
library that encodes immutable values into the contract deployment salt,
eliminating initialization transactions
- Adds the page to both current developer docs and v4.1.0-rc.2 versioned
docs

## Test plan
- [ ] Verify page renders correctly with `yarn start` in docs/
- [ ] Confirm the page appears in the v4.1.0-rc.2 version dropdown under
Aztec.nr > Framework Description
- [ ] Verify external links to the macro repo are valid

🤖 Generated with [Claude Code](https://claude.com/claude-code)
critesjosh and others added 2 commits March 23, 2026 18:59
… backport) (#21914)

## Summary

Backport of #21909 to `backport-to-v4-next-staging`.

- Pin `typescript@^5.3.3` in docs examples validation (was unpinned,
pulling TS 6.0 which breaks `@ts-expect-error` directives)
- Use git state instead of filesystem state for yarn.lock emptiness
check (prevents false positives on retry after interrupted parallel
runs)

## Context

See #21909 for full details. The same `docs/examples/ts/bootstrap.sh`
exists on this branch with the same two issues.

## Test plan

- [ ] CI passes on this PR


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

## Summary

- Moves kernel overhead explanation (gate counts per phase, design tips,
large-circuit reassurance) from the profiling how-to guide into
`foundational-topics/advanced/circuits/private_kernel.md` where it
belongs conceptually
- Slims the profiling guide to link there instead of duplicating content
- Updates cross-references in `writing_efficient_contracts.md` and
`transactions.md`
- Clarifies that a typical single-function transaction involves two
private calls (account entrypoint + user function), so
`private_kernel_inner` is correctly included in the cost breakdown

## Test plan

- [ ] Verify links resolve correctly in local dev server (`yarn start`
from docs/)
- [ ] Confirm `private_kernel.md#performance-impact` anchor works from
all linking pages

🤖 Generated with [Claude Code](https://claude.com/claude-code)
A few changes to the cli-wallet to make it easier to use for testing
deployed networks:
- adds an optional salt parameter to `create-account`. This is so I can
import a bot account which already has FJ
- adds a command to quickly check FJ balance
- all commands that send txs now take a `--wait-for-status
<checkpointed|proposed>` optional flag (default: proposed) to control
how long we wait for txs.
@AztecBot AztecBot mentioned this pull request Mar 23, 2026
Copy link
Copy Markdown
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 enabled auto-merge March 24, 2026 05:28
@AztecBot
Copy link
Copy Markdown
Collaborator Author

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

## Summary

Merges `v4-next` into `backport-to-v4-next-staging` to bring the staging
branch up to date. The staging branch was 6 commits behind v4-next (3
previous accumulated backport merges, 2 v4 merge commits, 1 version
bump) because it was never rebased after PR #21819 was merged.

This caused PR
#21899 to show a
massive 2932-file / 770K-addition diff and become unmergeable.

After merging this PR into staging, close PR #21899 — its diff against
v4-next will be clean.

## Conflict Resolution (server.ts)

In `getBlockHashMembershipWitness`, both sides modified the same
function:
- **Staging** (from #21836): Added block-0 / initial-block-hash early
return guard
- **v4-next** (from #21819): Added N-1 block number adjustment for
archive membership proof

Resolution: Both changes coexist — block-0 guard runs first, then the
N-1 adjustment applies.

BEGIN_COMMIT_OVERRIDE
chore: sync backport staging with v4-next HEAD
END_COMMIT_OVERRIDE

---------

Co-authored-by: Jan Beneš <janbenes1234@gmail.com>
Co-authored-by: PhilWindle <60546371+PhilWindle@users.noreply.github.com>
Co-authored-by: Phil Windle <philip.windle@gmail.com>
Co-authored-by: Santiago Palladino <santiago@aztecprotocol.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: ludamad <adam.domurad@gmail.com>
Co-authored-by: Alex Gherghisan <alexghr@users.noreply.github.com>
Co-authored-by: spypsy <spypsy@users.noreply.github.com>
Co-authored-by: Amin Sammara <84764772+aminsammara@users.noreply.github.com>
Thunkar and others added 2 commits March 24, 2026 15:06
Trying to get us out of the backport issues

---------

Co-authored-by: Jan Beneš <janbenes1234@gmail.com>
Co-authored-by: Aztec Bot <49558828+AztecBot@users.noreply.github.com>
Co-authored-by: PhilWindle <60546371+PhilWindle@users.noreply.github.com>
Co-authored-by: Phil Windle <philip.windle@gmail.com>
Co-authored-by: Santiago Palladino <santiago@aztecprotocol.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: ludamad <adam.domurad@gmail.com>
Co-authored-by: Alex Gherghisan <alexghr@users.noreply.github.com>
Co-authored-by: spypsy <spypsy@users.noreply.github.com>
Co-authored-by: Amin Sammara <84764772+aminsammara@users.noreply.github.com>
Co-authored-by: Nicolas Chamo <nicolas@chamo.com.ar>
Co-authored-by: Nicolás Venturo <nicolas.venturo@gmail.com>
Co-authored-by: josh crites <critesjosh@gmail.com>
Co-authored-by: Martin Verzilli <martin@aztec-labs.com>
Co-authored-by: josh crites <jc@joshcrites.com>
… tx liveness issues (#21944)

Follow up from troubleshooting a user app. This app was interacting with
PXE in a way that it is not designed to work, but ultimately
"protecting" this method by queueing it makes it a bit more robust even
when misused.

Closes F-485
Changes the error messages thrown when oracle version issues are
detected. It deemphasizes the "oracle" wording since that's about
internals, and emphasizes that the contract has been compiled with an
Aztec.nr version that their PXE doesn't know how to handle. It also adds
an error page link where we can document more specifics in the future.

Closes F-486
…nto-staging

# Conflicts:
#	yarn-project/aztec-node/src/aztec-node/server.ts
ludamad and others added 2 commits March 24, 2026 10:31
## Summary

Performs a true merge of `v4-next` into `backport-to-v4-next-staging` to
fix the broken accumulated backports PR #21899.

ClaudeBox log: https://claudebox.work/s/ed2e5696ee72129c?run=4
AztecBot and others added 2 commits March 24, 2026 15:16
## Summary
Fixes `nargo fmt --check` failure on the backport branch by wrapping two
long comment lines in `compute_note_hash_and_nullifier.nr` that exceeded
the formatter's line length limit.

The backport of the `resolve_fn` changes fixed a typo in two comments
("call we correct" → "call the correct"), which pushed those lines past
the formatter threshold. This wraps them to satisfy `nargo fmt`.

ClaudeBox log: https://claudebox.work/s/338e316c36d5c83e?run=1
AztecBot and others added 4 commits March 24, 2026 16:45
## Summary
- Updates `noir/noir-repo` submodule from `2db78f8894` to `190931435915`
(tag `nightly-2026-02-12-patch.1`)

Previous noir pin: `2db78f8894936db05c53430f364360ac9cc5c61f`
New noir pin: `190931435915a6ef908d9be090036d98356237b3`

ClaudeBox log: https://claudebox.work/s/f4fb83554ab053fc?run=1
## Summary
- Adds handling for `rc` and `testnet` version names in the
`useApiVersion` hook across API reference pages
- Without this, rc/testnet versioned docs fell through to the default
case instead of resolving to `"testnet"`

## Test plan
- [ ] Verify API reference pages load correctly for rc-versioned docs
- [ ] Verify API reference pages load correctly for testnet-versioned
docs

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

## Summary

- Document the two new `EmbeddedWallet` features from #21646: automatic
gas estimation via pre-simulation, and automatic private authwit
generation
- Update `how_to_send_transaction.md` with a "What happens behind the
scenes" section
- Add tips/notes to `how_to_use_authwit.md` that private authwits are
now automatic
- Add tips/notes to `how_to_pay_fees.md` that gas estimation is now
automatic
- Update foundational `wallets.md` with pre-simulation and automatic
authwit paragraphs
- All changes mirrored to both latest docs and v4.1.0-rc.2 versioned
docs

## Test plan

- Verify docs build cleanly
- Review rendered pages for clarity and accuracy

🤖 Generated with [Claude Code](https://claude.com/claude-code)
@AztecBot
Copy link
Copy Markdown
Collaborator Author

AztecBot commented Mar 25, 2026

Flakey Tests

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

\033FLAKED\033 (8;;http://ci.aztec-labs.com/2e8d56007d081a9b�2e8d56007d081a9b8;;�):  yarn-project/end-to-end/scripts/run_test.sh simple src/e2e_epochs/epochs_l1_reorgs.parallel.test.ts "updates L1 to L2 messages changed due to an L1 reorg" (66s) (code: 0) group:e2e-p2p-epoch-flakes
\033FLAKED\033 (8;;http://ci.aztec-labs.com/f3998614b5cdc51d�f3998614b5cdc51d8;;�):  yarn-project/end-to-end/scripts/run_test.sh simple src/e2e_epochs/epochs_mbps.parallel.test.ts "deploys a contract and calls it in separate blocks within a slot" (193s) (code: 0) group:e2e-p2p-epoch-flakes
\033FLAKED\033 (8;;http://ci.aztec-labs.com/4067e7623514d4d5�4067e7623514d4d58;;�):  yarn-project/end-to-end/scripts/run_test.sh simple src/e2e_epochs/epochs_proof_fails.parallel.test.ts "does not allow submitting proof after epoch end" (214s) (code: 0) group:e2e-p2p-epoch-flakes

@AztecBot AztecBot merged commit f4ccd73 into v4-next Mar 25, 2026
11 checks passed
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.