Skip to content

Commit 2ee327c

Browse files
authored
Merge branch 'v4-next' into backport-to-v4-next-staging
2 parents 4f2bf86 + 385ec06 commit 2ee327c

11 files changed

Lines changed: 603 additions & 8 deletions

File tree

CHANGELOG.md

Lines changed: 372 additions & 0 deletions
Large diffs are not rendered by default.

barretenberg/ts/bootstrap.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ function release {
6868
}
6969

7070
function cross_copy {
71-
./scripts/copy_cross.sh
71+
./scripts/copy_cross.sh "$@"
7272
}
7373

7474
case "$cmd" in

barretenberg/ts/scripts/copy_cross.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,12 @@ NO_CD=1 source $(git rev-parse --show-toplevel)/ci3/source
55

66
cd $(dirname $0)/..
77

8-
if semver check "${REF_NAME:-}" && [[ "$(arch)" == "amd64" ]]; then
8+
if [ -n "${1:-}" ]; then
9+
arch="$1"
10+
mkdir -p ./build/$arch
11+
cp ../cpp/build-zig-$arch/bin/bb ./build/$arch
12+
cp ../cpp/build-zig-$arch/lib/nodejs_module.node ./build/$arch
13+
elif semver check "${REF_NAME:-}" && [[ "$(arch)" == "amd64" ]]; then
914
# We're building a release.
1015
# We take host build for amd64-linux.
1116
mkdir -p ./build/amd64-linux

build-images/src/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@ RUN apt update && \
203203
neovim \
204204
psmisc \
205205
python3-blessed \
206+
qemu-utils \
206207
redis-tools \
207208
rsync \
208209
software-properties-common \
@@ -264,7 +265,7 @@ RUN echo '%sudo ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
264265
# It can be used independently:
265266
# - The user should use the ./run.sh script to launch.
266267
# - A persistent volume will be mounted to /home/aztec-dev.
267-
# - It provides docker via the hosts docker instance, mounted at /var/lib/docker.sock.
268+
# - It provides docker-in-docker.
268269
# - It uses an entrypoint script at runtime to perform uid/gid alignment with the host and drop into user account.
269270
FROM basebox AS devbox
270271

docs/docs-developers/docs/resources/migration_notes.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ Aztec is in active development. Each version may introduce breaking changes that
99

1010
## TBD
1111

12+
## 4.3.0-rc.1
13+
1214
### [Aztec.nr] `attempt_note_discovery` is no longer exposed; use `process_private_note_msg`
1315

1416
`attempt_note_discovery` is now crate-private. Custom message handlers (implementations of `CustomMessageHandler`) that previously called it directly should call `process_private_note_msg` instead, which runs the standard private note message decoding and discovery pipeline.

release-image/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,8 @@ WORKDIR "/usr/src/yarn-project"
1818
# Ensure the correct version shows in aztec --version
1919
ARG VERSION
2020
RUN echo '{".": "'$VERSION'"}' > /usr/src/.release-please-manifest.json
21+
# Stamp the version into stdlib/package.json, which getPackageVersion() reads at runtime.
22+
RUN jq --arg v "$VERSION" '.version = $v' /usr/src/yarn-project/stdlib/package.json > /tmp/p.json \
23+
&& mv /tmp/p.json /usr/src/yarn-project/stdlib/package.json
2124

2225
ENTRYPOINT ["node", "--no-warnings", "/usr/src/yarn-project/aztec/dest/bin/index.js"]

release-notes-4.3.0-rc.1.md

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
# Release Notes: v4.2.1 → v4.3.0-rc.1
2+
3+
**Date:** 2026-05-15
4+
**Range:** `v4.2.1..v4.3.0-rc.1` (2026-05-07 → 2026-05-15)
5+
**Commits:** 225 non-merge commits
6+
7+
Full migration instructions for every breaking change below live in [`docs/docs-developers/docs/resources/migration_notes.md`](docs/docs-developers/docs/resources/migration_notes.md).
8+
9+
> **Note**: This is a draft release-notes file generated from commit history. Curate the headline sections (Summary, Breaking Changes, Highlights) before publishing. The detailed change log lives in [`CHANGELOG.md`](CHANGELOG.md).
10+
11+
---
12+
13+
## Summary
14+
15+
`v4.3.0-rc.1` is the first release candidate of the v4.3 line, cut after the `v4.2.x` series stabilized on the Alpha network. The release rolls up roughly 225 commits backported to `v4-next` since `v4.2.1` and is primarily focused on **PXE / wallet-side improvements**, **kv-store on SQLite-wasm**, and **Aztec.nr / TXE ergonomics**. Beyond the three breaking changes listed below, the release is dominated by bug fixes, refactors that improve sync performance, and tooling improvements.
16+
17+
---
18+
19+
## Breaking Changes
20+
21+
- **`aztec init` / `aztec new` counter template** ([#22751](https://github.com/AztecProtocol/aztec-packages/pull/22751)): `aztec init` / `aztec new` now scaffold a *counter* template instead of the previous default. Any tooling or docs that relied on the prior scaffold contents must be updated.
22+
23+
- **Shared protocol-circuit utilities in the history module** (`refactor!` cherry-pick `8f805bb8d3`): The `aztec-nr` history module now consumes shared protocol-circuit utilities. Direct consumers of internal history-module helpers must adapt — see migration notes.
24+
25+
---
26+
27+
## Highlights
28+
29+
### PXE / Wallet
30+
31+
- **New opt-in SQLite kv-store backend** ([#22658](https://github.com/AztecProtocol/aztec-packages/pull/22658), [#22759](https://github.com/AztecProtocol/aztec-packages/pull/22759), [#23089](https://github.com/AztecProtocol/aztec-packages/pull/23089), [#23231](https://github.com/AztecProtocol/aztec-packages/pull/23231)): A new SQLite-on-WASM-over-OPFS implementation of the PXE / wallet kv-store ships alongside the existing LMDB and IndexedDB backends, with a page-level-encrypted variant for stricter browser environments. The new backend is **opt-in** at wallet construction time; existing PXE stores continue to work unchanged on LMDB / IndexedDB. SQLite is expected to become the recommended default in v5, with IndexedDB deprecated thereafter.
32+
- **Cross-contract utility call hooks and auth** ([#23007](https://github.com/AztecProtocol/aztec-packages/pull/23007), [#23064](https://github.com/AztecProtocol/aztec-packages/pull/23064), [#22822](https://github.com/AztecProtocol/aztec-packages/pull/22822)): PXE gains execution hooks for authorizing cross-contract utility calls, and TXE supports authorizing them in Noir tests. Nested utility-function calls are now supported end-to-end.
33+
- **Sync performance** ([#23129](https://github.com/AztecProtocol/aztec-packages/pull/23129), [#23131](https://github.com/AztecProtocol/aztec-packages/pull/23131), [#23123](https://github.com/AztecProtocol/aztec-packages/pull/23123), [#23130](https://github.com/AztecProtocol/aztec-packages/pull/23130), [#23100](https://github.com/AztecProtocol/aztec-packages/pull/23100), [#23088](https://github.com/AztecProtocol/aztec-packages/pull/23088), [#23048](https://github.com/AztecProtocol/aztec-packages/pull/23048), [#22988](https://github.com/AztecProtocol/aztec-packages/pull/22988), [#22525](https://github.com/AztecProtocol/aztec-packages/pull/22525)): A series of refactors batches nullifier sync across scopes, batches log RPC calls, prefetches updated class-id hints per contract, short-circuits block-header lookups at the anchor block, and parallelizes per-scope contract syncs.
34+
- **Tag-as-sender optimization** ([#23239](https://github.com/AztecProtocol/aztec-packages/pull/23239)): Faster `get_next_app_tag_as_sender` lookups.
35+
- **wallet-sdk heartbeat** ([#22948](https://github.com/AztecProtocol/aztec-packages/pull/22948)): Wallet SDK now emits a heartbeat for liveness signalling.
36+
37+
### Aztec.nr / TXE
38+
39+
- **TXE oracle versioning** ([#23285](https://github.com/AztecProtocol/aztec-packages/pull/23285), [#23289](https://github.com/AztecProtocol/aztec-packages/pull/23289)): TXE gains oracle versioning for the test environment and basic gas settings, mirroring production behavior more closely.
40+
- **Initial handshake registry contract** ([#22854](https://github.com/AztecProtocol/aztec-packages/pull/22854)): New handshake registry contract with non-interactive handshake function for offchain message delivery.
41+
- **`call_self` utility stubs** ([#22885](https://github.com/AztecProtocol/aztec-packages/pull/22885)): Aztec.nr utility functions gain `call_self` stubs for cleaner self-invocation patterns.
42+
- **Serializability assertions** ([#22877](https://github.com/AztecProtocol/aztec-packages/pull/22877)): Aztec.nr now asserts that contract function return types and parameters are serializable, catching a common compile-time class of bugs.
43+
- **Offchain delivered private transfer** ([#22574](https://github.com/AztecProtocol/aztec-packages/pull/22574)): Example/infra for offchain-delivered private transfers.
44+
- **Oxide upstream merge** ([#22979](https://github.com/AztecProtocol/aztec-packages/pull/22979)): Oxide aztec-nr changes upstreamed.
45+
46+
### CLI / `aztec-up`
47+
48+
- **`aztec dep` version check** ([#21245](https://github.com/AztecProtocol/aztec-packages/pull/21245)): Asserts the aztec-nr dependency version matches the CLI version.
49+
- **Multi-crate scaffolding** ([#21007](https://github.com/AztecProtocol/aztec-packages/pull/21007), [#20681](https://github.com/AztecProtocol/aztec-packages/pull/20681), [#20723](https://github.com/AztecProtocol/aztec-packages/pull/20723), [#20729](https://github.com/AztecProtocol/aztec-packages/pull/20729)): `aztec new` and `aztec init` now create a 2-crate workspace, warn if the contract crate has tests, and auto-recompile when `aztec test` is run.
50+
- **Contract version stamping** ([#22550](https://github.com/AztecProtocol/aztec-packages/pull/22550)): Contract artifacts now stamp the `aztec` version they were compiled against.
51+
- **`aztec profile gates --json`** ([#22860](https://github.com/AztecProtocol/aztec-packages/pull/22860)): JSON output for `aztec profile gates`.
52+
53+
### Docs
54+
55+
- **Node JSON-RPC API reference auto-generated** (commit `de6e69f8fa`): The node JSON-RPC API reference is now generated from the TypeScript source.
56+
- **Aztec.nr API reference discoverability** ([#22861](https://github.com/AztecProtocol/aztec-packages/pull/22861)): Aztec.nr API reference docs are more discoverable in the sidebar.
57+
- **Nethermind / FPC docs** ([#22541](https://github.com/AztecProtocol/aztec-packages/pull/22541) and `2511d876d7`): FPC docs applied to developer versioned docs; Nethermind FPC docs added.
58+
- **Alpha Network privacy/limitations page** ([#22515](https://github.com/AztecProtocol/aztec-packages/pull/22515)).
59+
60+
---
61+
62+
## Notable Bug Fixes
63+
64+
- **Dropped tagging indices no longer crash PXE on sync** ([#23044](https://github.com/AztecProtocol/aztec-packages/pull/23044)).
65+
- **`sendMessagesAs` cross-contract utility-call sync** ([#23225](https://github.com/AztecProtocol/aztec-packages/pull/23225)): PXE now syncs the target contract before a cross-contract utility call.
66+
- **Anchor-header threading** (cherry-pick of [#22679](https://github.com/AztecProtocol/aztec-packages/pull/22679)): Backport of anchor-header threading in PXE simulation paths.
67+
- **Origin/contract address mismatch detected** ([#22637](https://github.com/AztecProtocol/aztec-packages/pull/22637)): PXE throws on origin/contract address mismatch during simulation rather than silently producing wrong results.
68+
- **Race conditions in block-stream event handling** ([#22635](https://github.com/AztecProtocol/aztec-packages/pull/22635)): PXE now serializes block-stream event handling.
69+
- **Private event store rollback** ([#22615](https://github.com/AztecProtocol/aztec-packages/pull/22615)): Guarded against in-flight jobs during rollback.
70+
- **`setSenderForTags` scope correctness** ([#22672](https://github.com/AztecProtocol/aztec-packages/pull/22672)): Restricted to the current call (F-564).
71+
- **`registerSender` wipe race** ([#22623](https://github.com/AztecProtocol/aztec-packages/pull/22623)): Wipes are now queued to avoid racing in-flight jobs.
72+
- **`aztec-up` PATH leak** ([#22709](https://github.com/AztecProtocol/aztec-packages/pull/22709)): Bundled binaries no longer leak `node_modules/.bin` onto `PATH`.
73+
- **ABI argument-encoder validation** ([#22529](https://github.com/AztecProtocol/aztec-packages/pull/22529)): Missing ABI validation in argument encoder added.
74+
75+
Full list in [`CHANGELOG.md`](CHANGELOG.md).
76+
77+
---
78+
79+
## Upgrade notes
80+
81+
- The breaking changes above are documented under the `## 4.3.0-rc.1` section of `docs/docs-developers/docs/resources/migration_notes.md`.
82+
83+
---
84+
85+
## All Changes
86+
87+
See [`CHANGELOG.md`](CHANGELOG.md) for the complete list of 162 categorized commits (BREAKING / Features / Bug Fixes / Documentation / Miscellaneous).

yarn-project/aztec/scripts/aztec.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#!/usr/bin/env bash
22
set -euo pipefail
3-
shopt -s inherit_errexit
43

54
# Re-execute using correct version if we have an .aztecrc file.
65
if [ "${AZTEC_VERSIONED:-0}" -eq 0 ] && [ -f .aztecrc ] && command -v aztec-up &>/dev/null; then

yarn-project/prover-node/src/prover-node-publisher.test.ts

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,82 @@ describe('prover-node-publisher', () => {
199199
},
200200
);
201201

202+
it('waits until the proven checkpoint reaches the checkpoint before the proof start', async () => {
203+
const checkpoints = Array.from({ length: 100 }, () => RootRollupPublicInputs.random());
204+
const fromCheckpoint = CheckpointNumber(33);
205+
const toCheckpoint = CheckpointNumber(64);
206+
207+
rollup.getTips
208+
.mockResolvedValueOnce({
209+
pending: CheckpointNumber(65),
210+
proven: CheckpointNumber(31),
211+
})
212+
.mockResolvedValueOnce({
213+
pending: CheckpointNumber(65),
214+
proven: CheckpointNumber(32),
215+
})
216+
.mockResolvedValue({
217+
pending: CheckpointNumber(65),
218+
proven: CheckpointNumber(32),
219+
});
220+
rollup.getRollupConstants.mockResolvedValue({
221+
l1StartBlock: 0n,
222+
l1GenesisTime: BigInt(Math.floor(Date.now() / 1000)),
223+
slotDuration: 1,
224+
epochDuration: 1,
225+
proofSubmissionEpochs: 100,
226+
targetCommitteeSize: 48,
227+
rollupManaLimit: Number.MAX_SAFE_INTEGER,
228+
});
229+
230+
rollup.getCheckpoint.mockImplementation((checkpointNumber: CheckpointNumber) =>
231+
Promise.resolve({
232+
archive: checkpoints[checkpointNumber - 1].endArchiveRoot,
233+
attestationsHash: Buffer32.ZERO,
234+
payloadDigest: Buffer32.ZERO,
235+
headerHash: Buffer32.ZERO,
236+
blobCommitmentsHash: Buffer32.ZERO,
237+
outHash: '0x',
238+
slotNumber: SlotNumber(0),
239+
feeHeader: {
240+
excessMana: 0n,
241+
manaUsed: 0n,
242+
ethPerFeeAsset: 0n,
243+
congestionCost: 0n,
244+
proverCost: 0n,
245+
},
246+
}),
247+
);
248+
249+
const ourPublicInputs = RootRollupPublicInputs.random();
250+
ourPublicInputs.previousArchiveRoot = checkpoints[fromCheckpoint - 2].endArchiveRoot;
251+
ourPublicInputs.endArchiveRoot = checkpoints[toCheckpoint - 1].endArchiveRoot;
252+
253+
const ourBatchedBlob = new BatchedBlob(
254+
ourPublicInputs.blobPublicInputs.blobCommitmentsHash,
255+
ourPublicInputs.blobPublicInputs.z,
256+
ourPublicInputs.blobPublicInputs.y,
257+
ourPublicInputs.blobPublicInputs.c,
258+
ourPublicInputs.blobPublicInputs.c.negate(),
259+
);
260+
261+
rollup.getEpochProofPublicInputs.mockResolvedValue(ourPublicInputs.toFields());
262+
263+
await publisher.submitEpochProof({
264+
epochNumber: EpochNumber(2),
265+
fromCheckpoint,
266+
toCheckpoint,
267+
publicInputs: ourPublicInputs,
268+
proof: Proof.empty(),
269+
batchedBlobInputs: ourBatchedBlob,
270+
attestations: [],
271+
});
272+
273+
expect(rollup.getRollupConstants).toHaveBeenCalled();
274+
expect(rollup.getTips).toHaveBeenCalledTimes(3);
275+
expect(l1Utils.sendAndMonitorTransaction).toHaveBeenCalled();
276+
});
277+
202278
it('handles reverted txs correctly', async () => {
203279
const checkpoints = [RootRollupPublicInputs.random(), RootRollupPublicInputs.random()];
204280

yarn-project/prover-node/src/prover-node-publisher.ts

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,13 @@ import { areArraysEqual } from '@aztec/foundation/collection';
88
import { Fr } from '@aztec/foundation/curves/bn254';
99
import { EthAddress } from '@aztec/foundation/eth-address';
1010
import { type Logger, type LoggerBindings, createLogger } from '@aztec/foundation/log';
11+
import { retryUntil } from '@aztec/foundation/retry';
1112
import type { Tuple } from '@aztec/foundation/serialize';
1213
import { Timer } from '@aztec/foundation/timer';
1314
import { RollupAbi } from '@aztec/l1-artifacts';
1415
import type { PublisherConfig, TxSenderConfig } from '@aztec/sequencer-client';
1516
import { CommitteeAttestation, CommitteeAttestationsAndSigners } from '@aztec/stdlib/block';
17+
import { getProofSubmissionDeadlineTimestamp } from '@aztec/stdlib/epoch-helpers';
1618
import type { Proof } from '@aztec/stdlib/proofs';
1719
import type { FeeRecipient, RootRollupPublicInputs } from '@aztec/stdlib/rollup';
1820
import type { L1PublishProofStats } from '@aztec/stdlib/stats';
@@ -101,6 +103,11 @@ export class ProverNodePublisher {
101103
const ctx = { epochNumber, fromCheckpoint, toCheckpoint };
102104

103105
if (!this.interrupted) {
106+
if (!(await this.waitUntilStartBuildsOnProven(args))) {
107+
this.log.verbose('Checkpoint data syncing interrupted', ctx);
108+
return false;
109+
}
110+
104111
const timer = new Timer();
105112
// Validate epoch proof range and hashes are correct before submitting
106113
await this.validateEpochProofSubmission(args);
@@ -147,6 +154,53 @@ export class ProverNodePublisher {
147154
return false;
148155
}
149156

157+
private async waitUntilStartBuildsOnProven(args: { epochNumber: EpochNumber; fromCheckpoint: CheckpointNumber }) {
158+
const { epochNumber, fromCheckpoint } = args;
159+
const provenCheckpoint = await this.getProvenCheckpoint();
160+
if (this.isStartBuildingOnProven(fromCheckpoint, provenCheckpoint)) {
161+
return true;
162+
}
163+
164+
const timeout = await this.getSecondsUntilProofSubmissionWindowEnd(epochNumber);
165+
this.log.info(`Waiting for proven checkpoint to reach proof start`, {
166+
epochNumber,
167+
fromCheckpoint,
168+
provenCheckpoint,
169+
timeout,
170+
});
171+
172+
await retryUntil(
173+
async () => {
174+
if (this.interrupted) {
175+
return true;
176+
}
177+
178+
const proven = await this.getProvenCheckpoint();
179+
this.log.verbose(`Proven checkpoint is at ${proven} (waiting for ${fromCheckpoint - 1})`, { epochNumber });
180+
return this.isStartBuildingOnProven(fromCheckpoint, proven) ? true : undefined;
181+
},
182+
`proven checkpoint to reach ${fromCheckpoint - 1}`,
183+
timeout,
184+
4,
185+
);
186+
187+
return !this.interrupted;
188+
}
189+
190+
private async getProvenCheckpoint() {
191+
return (await this.rollupContract.getTips()).proven;
192+
}
193+
194+
private isStartBuildingOnProven(fromCheckpoint: CheckpointNumber, provenCheckpoint: CheckpointNumber) {
195+
return fromCheckpoint - 1 <= provenCheckpoint;
196+
}
197+
198+
private async getSecondsUntilProofSubmissionWindowEnd(epochNumber: EpochNumber) {
199+
const deadline = getProofSubmissionDeadlineTimestamp(epochNumber, await this.rollupContract.getRollupConstants());
200+
const now = BigInt(Math.floor(Date.now() / 1000));
201+
return Math.max(Number(deadline - now), 0.001);
202+
}
203+
150204
private async validateEpochProofSubmission(args: {
151205
fromCheckpoint: CheckpointNumber;
152206
toCheckpoint: CheckpointNumber;

0 commit comments

Comments
 (0)