Skip to content

Commit ab5413c

Browse files
authored
feat: merge-train/spartan-v5 (#23975)
BEGIN_COMMIT_OVERRIDE fix(p2p): stop checkpoint-replay storm when pruning to an uncheckpointed block (#23967) refactor(sequencer)!: always enforce timetable with concrete block duration (#23821) fix(e2e): drop removed enforceTimeTable option from optimistic proving test (#23976) feat: persist peer bans for a configurable duration (A-1157) (#23922) refactor!: rename node JSON-RPC to aztec_* prefixes (#23909) fix(p2p): drive tx protection release from synced blocks instead of wall clock (#23978) fix(p2p)!: resolve checkpoint tips from stored ids (#23968) fix: deflake HA full e2e suite by switching to in-proc interval-mining anvil (#23979) fix(gas)!: client fallback limits track network per-block budget (A-1154) (#23947) feat: network-wide consensus config with validation and override protection (A-1168) (#23977) test(e2e): pick bad slots upfront and warp to them in `proposer invalidates multiple checkpoints` (#24017) fix(bot): check L1-to-L2 message readiness against PXE sync tip (#24004) fix: Merge Conflicts (#24014) END_COMMIT_OVERRIDE
2 parents fa47ed6 + cd9e095 commit ab5413c

296 files changed

Lines changed: 6494 additions & 2772 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude/agents/aztec-wallet.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ fi
4848

4949
# Query node version
5050
RESPONSE=$(curl -sf -X POST -H 'Content-type: application/json' \
51-
--data '{"jsonrpc":"2.0","id":1,"method":"node_getNodeInfo"}' \
51+
--data '{"jsonrpc":"2.0","id":1,"method":"aztec_getNodeInfo"}' \
5252
"$RPC_URL" 2>&1) || {
5353
echo "ERROR: Could not reach node at $RPC_URL" >&2
5454
echo "Response: $RESPONSE" >&2

.claude/skills/release-docs/SKILL.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Fetch node info from the provided RPC URL:
3030

3131
```bash
3232
curl -s -X POST -H 'Content-Type: application/json' \
33-
-d '{"method":"node_getNodeInfo"}' <RPC_URL> | jq .result
33+
-d '{"method":"aztec_getNodeInfo"}' <RPC_URL> | jq .result
3434
```
3535

3636
Parse the response to extract:
@@ -214,7 +214,7 @@ These files are auto-generated — do not hand-edit them.
214214

215215
Regenerate the Node JSON-RPC API reference documentation. This script parses the
216216
TypeScript interface definitions and Zod schemas in `yarn-project/stdlib/src/interfaces/`
217-
to produce a complete markdown reference for the `node_` and `nodeAdmin_` RPC methods.
217+
to produce a complete markdown reference for the `aztec_` and `aztecAdmin_` RPC methods.
218218

219219
**Prerequisite:** `yarn-project` must be built (already done in Step 6 prerequisites).
220220

@@ -259,7 +259,7 @@ docs (Step 13), the generated content is included in the snapshot automatically.
259259
### Step 9: Resolve Missing Contract Addresses & Update Network Info
260260

261261
The `networks.md` L1 table includes contracts that are **not** returned by
262-
`node_getNodeInfo`. Before updating the tables, resolve these in three tiers.
262+
`aztec_getNodeInfo`. Before updating the tables, resolve these in three tiers.
263263

264264
Determine the L1 RPC URL from the `l1ChainId`: `1` → Ethereum mainnet,
265265
`11155111` → Sepolia. The Rollup and Registry addresses are already known from

.claude/skills/release-network-docs/SKILL.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Fetch node info from the provided RPC URL:
4545

4646
```bash
4747
curl -s -X POST -H 'Content-Type: application/json' \
48-
-d '{"method":"node_getNodeInfo"}' <RPC_URL> | jq .result
48+
-d '{"method":"aztec_getNodeInfo"}' <RPC_URL> | jq .result
4949
```
5050

5151
Parse the response to extract:
@@ -87,7 +87,7 @@ git tag -l "v<nodeVersion>"
8787
### Step 3: Identify and Resolve Missing Contract Addresses
8888

8989
The `networks.md` L1 table includes contracts that are **not** returned by
90-
`node_getNodeInfo`. Resolve these addresses in three tiers:
90+
`aztec_getNodeInfo`. Resolve these addresses in three tiers:
9191

9292
#### Tier 1: Query on-chain from known contracts
9393

.test_patterns.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ tests:
371371
owners:
372372
- *palla
373373

374-
- regex: "yarn-project/end-to-end/scripts/run_test.sh ha src/composed/ha/e2e_ha_full.test.ts"
374+
- regex: "yarn-project/end-to-end/scripts/run_test.sh ha src/composed/ha/e2e_ha_full.parallel.test.ts"
375375
owners:
376376
- *spyros
377377

docs/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,8 +276,8 @@ The Node JSON-RPC API reference is auto-generated from the TypeScript interface
276276

277277
**Source files:**
278278

279-
- `yarn-project/stdlib/src/interfaces/aztec-node.ts``AztecNode` interface (`node_` methods)
280-
- `yarn-project/stdlib/src/interfaces/aztec-node-admin.ts``AztecNodeAdmin` interface (`nodeAdmin_` methods)
279+
- `yarn-project/stdlib/src/interfaces/aztec-node.ts``AztecNode` interface (`aztec_` methods)
280+
- `yarn-project/stdlib/src/interfaces/aztec-node-admin.ts``AztecNodeAdmin` interface (`aztecAdmin_` methods)
281281
- `yarn-project/stdlib/src/block/l2_block_source.ts``L2BlockSource` interface (JSDoc for inherited methods)
282282

283283
**Prerequisites:** `yarn-project` must have `node_modules/` installed so `npx tsx` can resolve `typescript`. Run `yarn install` from `yarn-project` if needed. No build is required — the generator parses source `.ts` files via the TypeScript Compiler API, not compiled output.

docs/docs-developers/docs/aztec-js/how_to_pay_fees.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,25 +38,25 @@ Mana is Aztec's unit of computational effort (like gas on Ethereum), and Fee Jui
3838
When using `EmbeddedWallet`, gas is estimated automatically on every `send()` call. You only need to manually estimate if you want to preview costs before sending, or if you're using a custom wallet implementation.
3939
:::
4040

41-
Before sending a transaction, you can estimate the mana it will consume by simulating with `estimateGas: true`:
41+
Before sending a transaction, you can read the mana it will consume by simulating with `includeMetadata: true` and reading `gasUsed` from the result:
4242

4343
#include_code estimate_mana /docs/examples/ts/aztecjs_advanced/index.ts typescript
4444

45-
The `estimatedGas` object contains:
45+
The `gasUsed` object contains the raw gas the simulation consumed:
4646

47-
- `gasLimits.daGas` - Estimated DA mana for main execution
48-
- `gasLimits.l2Gas` - Estimated L2 mana for main execution
49-
- `teardownGasLimits.daGas` - Estimated DA mana for teardown phase
50-
- `teardownGasLimits.l2Gas` - Estimated L2 mana for teardown phase
47+
- `totalGas.daGas` / `totalGas.l2Gas` - DA and L2 mana consumed across the whole transaction
48+
- `teardownGas.daGas` / `teardownGas.l2Gas` - DA and L2 mana consumed in the teardown phase
49+
50+
It is up to you to derive the gas limits you declare from this raw usage (typically by padding it, as shown above). If you don't declare any gas limits, the wallet fills in the network's per-tx admission limits for you.
5151

5252
### Calculate expected fee from estimate
5353

54-
To calculate the expected fee from estimated gas, use the `computeFee` method with current network fees:
54+
To calculate the expected fee from the padded gas, use the `computeFee` method with current network fees:
5555

5656
#include_code compute_fee_from_estimate /docs/examples/ts/aztecjs_advanced/index.ts typescript
5757

5858
:::tip
59-
The `estimatedGasPadding` parameter adds a safety margin to the estimate. A value of `0.1` adds 10% padding. Use higher padding for transactions with variable gas costs.
59+
Pad the raw `gasUsed` yourself to leave a safety margin. Multiplying by `1.1` adds 10%; use higher padding for transactions with variable gas costs. The wallet rejects any declared limit above the network's per-tx admission limit.
6060
:::
6161

6262
## Get transaction fee from receipt
@@ -148,7 +148,7 @@ const payment = await fpcClient.createPaymentMethod({
148148
wallet,
149149
user: aliceAddress, // the account paying the fee
150150
tokenAddress, // the token you want to pay in
151-
estimatedGas, // from a prior estimateGas call
151+
estimatedGas, // gas limits derived from a prior simulation's gasUsed
152152
});
153153

154154
// Use it like any other payment method
@@ -171,7 +171,7 @@ Fee Juice is non-transferable on L2, but you can bridge it from L1, claim it on
171171

172172
#include_code bridge_fee_juice_setup /docs/examples/ts/aztecjs_connection/index.ts typescript
173173

174-
Under the hood, `L1FeeJuicePortalManager` gets the L1 addresses from the node `node_getNodeInfo` endpoint. It then exposes an easy method `bridgeTokensPublic` which mints fee juice on L1 and sends it to an L2 address via the L1 portal:
174+
Under the hood, `L1FeeJuicePortalManager` gets the L1 addresses from the node `aztec_getNodeInfo` endpoint. It then exposes an easy method `bridgeTokensPublic` which mints fee juice on L1 and sends it to an L2 address via the L1 portal:
175175

176176
#include_code bridge_fee_juice_execute /docs/examples/ts/aztecjs_connection/index.ts typescript
177177

@@ -207,7 +207,7 @@ Note that `gasLimits` and `teardownGasLimits` use `daGas`/`l2Gas` field names, w
207207
### Use automatic gas estimation
208208

209209
:::note
210-
When using `EmbeddedWallet`, gas estimation happens automatically on every `send()`; you don't need to pass `estimateGas`. This option is useful for custom wallet implementations or when you want to estimate gas during a `simulate()` call.
210+
When using `EmbeddedWallet`, gas estimation happens automatically on every `send()`; you don't need to declare gas limits at all. Reading `gasUsed` from a `simulate({ includeMetadata: true })` result is useful when you want to preview costs before sending, or to set explicit limits with a custom wallet implementation.
211211
:::
212212

213213
#include_code auto_gas_estimation /docs/examples/ts/aztecjs_advanced/index.ts typescript

docs/docs-developers/docs/aztec-js/how_to_read_data.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Set `includeMetadata: true` to get additional information about the simulation:
3939

4040
#include_code simulate_with_metadata /docs/examples/ts/aztecjs_advanced/index.ts typescript
4141

42-
The result includes `result` (the function return value), `stats` (execution statistics), `offchainEffects`, and `estimatedGas` (with `gasLimits` and `teardownGasLimits`).
42+
The result includes `result` (the function return value), `stats` (execution statistics), `offchainEffects`, and `gasUsed` (the raw gas the simulation consumed, with `totalGas` and `teardownGas`). Derive your own gas limits from `gasUsed` if you want to declare them explicitly; otherwise the wallet fills in the network's per-tx admission limits.
4343

4444
### Private function considerations
4545

docs/docs-developers/docs/aztec-js/how_to_use_private_fee_juice.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ Cold-start exists for users who have no other way to pay fees: the bridged amoun
5959
Because neither `pay_fee` nor `mint_and_pay_fee` makes public cross-contract token calls in setup (they only deduct from the FPC's internal private balance and invoke `set_as_fee_payer`), the [setup-phase allowlist](../foundational-topics/transactions.md#setup-phase-non-revertible) never blocks these flows.
6060

6161
:::note No refund
62-
`PrivateFPC.pay_fee()` deducts the full `max_gas_cost` and does not refund unused gas. Use `estimateGas` (see [Estimate mana costs](./how_to_pay_fees.md#estimate-mana-costs)) to right-size your limits.
62+
`PrivateFPC.pay_fee()` deducts the full `max_gas_cost` and does not refund unused gas. Read `gasUsed` from a simulation (see [Estimate mana costs](./how_to_pay_fees.md#estimate-mana-costs)) to right-size your limits.
6363
:::
6464

6565
## Share one FPC address across the ecosystem

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

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

1010
## TBD
1111

12+
### [Aztec.js] Wallets validate declared gas limits against the network's per-tx admission limit
13+
14+
Wallets now reject a transaction whose declared `gasLimits` exceed the network's per-tx admission limit (the node-advertised `txsLimits.gas`), throwing before the tx is sent — e.g. `Declared DA gas limit (X) exceeds the maximum this network allows per tx (Y)`. When you declare no gas limits, the wallet fills in the network's admission limits for you. This mirrors the node's inbound `GasLimitsValidator`, surfacing the rejection locally instead of on submission.
15+
16+
**Impact**: Transactions that previously over-declared gas (and were silently skipped by the proposer) now fail fast with a descriptive error. Declare limits at or below `txsLimits.gas`, or declare none and let the wallet fill them in.
17+
18+
### [Aztec.js] `estimateGas` / `estimatedGasPadding` simulate options and the `estimatedGas` result field removed
19+
20+
The `estimateGas` and `estimatedGasPadding` fee options are gone, and the `estimatedGas` field on simulation results is replaced by `gasUsed` (the raw gas the simulation consumed). Apps that want explicit gas limits read `gasUsed` and pad it themselves; otherwise the wallet fills in the network's admission limits automatically.
21+
22+
**Migration:**
23+
24+
```diff
25+
- const { estimatedGas } = await contract.methods.foo(args).simulate({
26+
- from,
27+
- fee: { estimateGas: true, estimatedGasPadding: 0.1 },
28+
- });
29+
- const gasLimits = estimatedGas.gasLimits;
30+
+ const { gasUsed } = await contract.methods.foo(args).simulate({ from, includeMetadata: true });
31+
+ const gasLimits = gasUsed.totalGas.mul(1.1); // pad yourself
32+
```
33+
34+
### [Aztec.js] `getGasLimits` moved to `@aztec/wallet-sdk` and is no longer exported from `@aztec/aztec.js`
35+
36+
`getGasLimits` is no longer exported from `@aztec/aztec.js`. It now lives in `@aztec/wallet-sdk/base-wallet`, takes the simulated `gasUsed` and the network's per-tx admission limit, and clamps the padded estimates to it. If the simulated usage already exceeds the network limit, it throws immediately rather than returning a limit the node would reject.
37+
38+
**Migration:**
39+
40+
```diff
41+
- import { getGasLimits } from '@aztec/aztec.js';
42+
- const { gasLimits, teardownGasLimits } = getGasLimits(simulationResult, 0.1);
43+
+ import { getGasLimits } from '@aztec/wallet-sdk/base-wallet';
44+
+ const { txsLimits } = await node.getNodeInfo();
45+
+ const { gasLimits, teardownGasLimits } = getGasLimits(simulationResult.gasUsed, Gas.from(txsLimits.gas), 0.1);
46+
```
47+
48+
### [Aztec.js / PXE] `NodeInfo.txsLimits` is now required
49+
50+
`NodeInfo` now carries a required `txsLimits` field: every node advertises the maximum gas a single tx may declare (`{ gas: { daGas, l2Gas } }`) and wallets rely on it for fallback gas limits. Clients built against this version cannot talk to nodes that predate the field.
51+
52+
### [Aztec.js] `GasSettings.fallback` requires explicit `gasLimits`
53+
54+
`GasSettings.fallback` no longer supplies a default value for `gasLimits`. Callers must pass the network's per-tx admission limit explicitly — read it from the node's `txsLimits.gas`.
55+
56+
**Migration:**
57+
58+
```diff
59+
- const settings = GasSettings.fallback({ maxFeesPerGas });
60+
+ const { txsLimits } = await node.getNodeInfo();
61+
+ const settings = GasSettings.fallback({ gasLimits: Gas.from(txsLimits.gas), maxFeesPerGas });
62+
```
63+
64+
### [Aztec.js / stdlib] Removed legacy fallback gas constants
65+
66+
The following exports have been removed from `@aztec/stdlib`:
67+
68+
- `APPROXIMATE_MAX_DA_GAS_PER_BLOCK`
69+
- `FALLBACK_TEARDOWN_L2_GAS_LIMIT`
70+
- `FALLBACK_TEARDOWN_DA_GAS_LIMIT`
71+
72+
**Impact**: Any code that imported these symbols must switch to the live node-advertised limits via the node's `txsLimits.gas`.
73+
1274
### [Aztec.nr] `messages::message_delivery` module moved to `messages::delivery`
1375

1476
The `message_delivery` module has been renamed to `delivery`. Update imports accordingly:
@@ -18,6 +80,19 @@ The `message_delivery` module has been renamed to `delivery`. Update imports acc
1880
+ use aztec::messages::delivery::MessageDelivery;
1981
```
2082

83+
### [Node JSON-RPC] Method prefixes changed to `aztec_*` and `aztecAdmin_*`
84+
85+
All Aztec node JSON-RPC method prefixes have changed:
86+
87+
- `node_*``aztec_*` (public node methods, port 8080)
88+
- `nodeAdmin_*``aztecAdmin_*` (admin methods, port 8880)
89+
- `nodeDebug_*``aztecDebug_*` (debug methods, port 8080, local-network or `--node-debug` only)
90+
- `p2p_*` namespace removed; P2P queries are on `aztec_*`: `getPeers`, `getCheckpointAttestationsForSlot`, `getProposalsForSlot`
91+
- New archiver sync helpers on `aztec_*`: `getL1Constants`, `getSyncedL2SlotNumber`, `getSyncedL2EpochNumber`, `getSyncedL1Timestamp`
92+
93+
If you call the node RPC directly (e.g. via `curl` or a custom client), update all method names accordingly.
94+
Clients created via `createAztecNodeClient`, `createAztecNodeAdminClient`, and `createAztecNodeDebugClient` are updated automatically.
95+
2196
### [Aztec.nr] `get_pending_tagged_logs` oracle interface updated (oracle version 28)
2297

2398
The `aztec_utl_getPendingTaggedLogs` oracle now takes an additional `provided_secrets` parameter of type `EphemeralArray<ProvidedSecret>`. This lets apps pass tagging secrets that PXE cannot derive on its own (e.g. handshake-derived secrets) alongside the secrets PXE manages internally.
@@ -100,7 +175,7 @@ After the `auth_registry`, `public_checks`, and `multi_call_entrypoint` demotion
100175

101176
### [Aztec.nr] `multi_call_entrypoint` demoted from protocol contract
102177

103-
`multi_call_entrypoint` is no longer a protocol contract; its address is derived from its artifact rather than hardcoded at `6`, and PXE no longer auto-registers it. It is now a standard contract that PXE *preloads*: both `createPXE` and `EmbeddedWallet` preload the standard MultiCallEntrypoint automatically (and `EmbeddedWallet` additionally preloads `AuthRegistry`). **If you use the standard PXE or `EmbeddedWallet`, no changes are needed** — multicall keeps working out of the box.
178+
`multi_call_entrypoint` is no longer a protocol contract; its address is derived from its artifact rather than hardcoded at `6`, and PXE no longer auto-registers it. It is now a standard contract that PXE _preloads_: both `createPXE` and `EmbeddedWallet` preload the standard MultiCallEntrypoint automatically (and `EmbeddedWallet` additionally preloads `AuthRegistry`). **If you use the standard PXE or `EmbeddedWallet`, no changes are needed** — multicall keeps working out of the box.
104179

105180
To preload a different set of standard contracts (for example to also preload `PublicChecks`, which is not preloaded by default), a wallet or app passes its own `preloadedContractsProvider` through the wallet's PXE options:
106181

@@ -121,7 +196,7 @@ const wallet = await EmbeddedWallet.create(node, {
121196
});
122197
```
123198

124-
The provider *replaces* the default list (it is not additive), so include every standard contract you want available.
199+
The provider _replaces_ the default list (it is not additive), so include every standard contract you want available.
125200

126201
### [Aztec.nr] `public_checks` demoted from protocol contract
127202

docs/docs-developers/docs/tutorials/testing_governance_rollup_upgrade.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Wait for output showing deployed contract addresses. To get the **Registry Addre
4343

4444
```bash
4545
curl -s http://localhost:8080 -X POST -H "Content-Type: application/json" \
46-
-d '{"jsonrpc":"2.0","method":"node_getNodeInfo","params":[],"id":1}' | jq '.result.l1ContractAddresses'
46+
-d '{"jsonrpc":"2.0","method":"aztec_getNodeInfo","params":[],"id":1}' | jq '.result.l1ContractAddresses'
4747
```
4848

4949
Note the `registryAddress` from the output.

0 commit comments

Comments
 (0)