You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
-`yarn-project/stdlib/src/block/l2_block_source.ts` — `L2BlockSource` interface (JSDoc for inherited methods)
282
282
283
283
**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.
Copy file name to clipboardExpand all lines: docs/docs-developers/docs/aztec-js/how_to_pay_fees.md
+11-11Lines changed: 11 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,25 +38,25 @@ Mana is Aztec's unit of computational effort (like gas on Ethereum), and Fee Jui
38
38
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.
39
39
:::
40
40
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:
The `gasUsed` object contains the raw gas the simulation consumed:
46
46
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.
51
51
52
52
### Calculate expected fee from estimate
53
53
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:
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.
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:
@@ -207,7 +207,7 @@ Note that `gasLimits` and `teardownGasLimits` use `daGas`/`l2Gas` field names, w
207
207
### Use automatic gas estimation
208
208
209
209
:::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.
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.
Copy file name to clipboardExpand all lines: docs/docs-developers/docs/aztec-js/how_to_use_private_fee_juice.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -59,7 +59,7 @@ Cold-start exists for users who have no other way to pay fees: the bridged amoun
59
59
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.
60
60
61
61
:::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.
Copy file name to clipboardExpand all lines: docs/docs-developers/docs/resources/migration_notes.md
+77-2Lines changed: 77 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,68 @@ Aztec is in active development. Each version may introduce breaking changes that
9
9
10
10
## TBD
11
11
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.
+ 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.
### [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.
`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`.
### [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
+
12
74
### [Aztec.nr]`messages::message_delivery` module moved to `messages::delivery`
13
75
14
76
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
18
80
+ use aztec::messages::delivery::MessageDelivery;
19
81
```
20
82
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
+
21
96
### [Aztec.nr]`get_pending_tagged_logs` oracle interface updated (oracle version 28)
22
97
23
98
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
100
175
101
176
### [Aztec.nr]`multi_call_entrypoint` demoted from protocol contract
102
177
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.
104
179
105
180
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:
0 commit comments