Skip to content

Commit 22ec297

Browse files
authored
feat: merge-train/spartan (#22814)
BEGIN_COMMIT_OVERRIDE chore: pass through p2p tx pool size (#22804) feat: track sequencer state time (#22800) feat(rpc)!: updated rpc api for blocks and checkpoints (#22781) feat(pipelining): complete attestations by build-slot end (#22735) feat(archiver): handle multiple proposed checkpoints (#22784) feat: scrape bench-10tps (#22803) feat!: make proposals EIP-712 (#22531) chore: remove default env (#22837) chore: remove default env (#22839) chore: grafana provisioning (#22843) feat: add extra getters (#22563) fix: use number config helper for NaN protection (#22598) test(e2e): relax blocks per checkpoint in high tps e2e (#22846) test(e2e): equivocation recovery under proposer pipelining (#22831) feat: scrape metrics data (#22840) END_COMMIT_OVERRIDE
2 parents b1c1d3e + eda32cd commit 22ec297

191 files changed

Lines changed: 6708 additions & 1664 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.

.github/workflows/metrics-deploy.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,6 @@ jobs:
129129
echo "Terraform state bucket already exists"
130130
fi
131131
132-
- name: Import Dashboard
133-
working-directory: ./spartan/metrics
134-
run: ./copy-dashboard.sh
135-
136132
- name: Setup Terraform
137133
uses: hashicorp/setup-terraform@633666f66e0061ca3b725c73b2ec20cd13a8fdd1
138134
with:

bootstrap.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -785,7 +785,7 @@ case "$cmd" in
785785
;;
786786
"ci-network-bench-10tps")
787787
# Args: <env_file> <namespace> [docker_image]
788-
# Deploys bench-10tps and runs the 38-min sustained 10 TPS benchmark.
788+
# Deploys bench-10tps and runs the 10-min sustained 10 TPS benchmark.
789789
# Cleanup is done separately via ci-network-teardown.
790790
export CI=1
791791
env_file="${1:?env_file is required}"

ci.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ case "$cmd" in
268268
;;
269269
network-bench-10tps)
270270
# Args: <scenario> <namespace> [docker_image]
271-
# Deploys the bench-10tps network and runs the 38-min 10 TPS benchmark.
271+
# Deploys the bench-10tps network and runs the 10-min 10 TPS benchmark.
272272
export CI_DASHBOARD="network"
273273
export JOB_ID="x-${2:?namespace is required}-network-bench-10tps" CPUS=16
274274
export INSTANCE_POSTFIX="n-bench-10tps"

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

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,58 @@ The wallet SDK now supplies the default sender-for-tags from the transaction's `
3636

3737
The save/restore idiom previously used in account-contract constructors (`get``set(self.address)` → work → `set(prev)`) is also no longer needed and has been removed: the override never leaks out of the constructor, so there is nothing to restore.
3838

39+
### [Aztec Node] Unified `getBlock` / `getCheckpoint` RPC API
40+
41+
The Aztec Node JSON-RPC surface for fetching blocks and checkpoints has been consolidated. The unified `getBlock` and `getCheckpoint` methods return uniform `BlockResponse` / `CheckpointResponse` shapes. The extra fields a caller cares about (tx bodies, L1 publish info, committee attestations, nested blocks) are now controlled by an `options` argument rather than by picking the right method. `getBlocks` and `getCheckpoints` retain their names but now return the new response shapes.
42+
43+
**Removed methods:**
44+
45+
| Removed | Replacement |
46+
|---|---|
47+
| `getBlockByHash(hash)` | `getBlock(hash)` or `getBlock({ hash })` |
48+
| `getBlockByArchive(archive)` | `getBlock({ archive })` |
49+
| `getBlockHeaderByArchive(archive)` | `getBlock({ archive }).then(r => r?.header)` |
50+
| `getProvenBlockNumber()` | `getBlockNumber('proven')` |
51+
| `getCheckpointedBlockNumber()` | `getBlockNumber('checkpointed')` |
52+
53+
**Deprecated but still present** (scheduled for removal once internal consumers of the archiver shape are rewired): `getL2Tips` (use `getChainTips`), `getBlockHeader` (use `getBlock(param).then(r => r?.header)`), `getCheckpointedBlocks` (use `getBlocks(from, limit, { includeL1PublishInfo: true, includeAttestations: true })`), `getCheckpointsDataForEpoch` (use `getCheckpoints(from, limit)` over the epoch's checkpoint range). Do not adopt these in new code.
54+
55+
**New response shapes:** `BlockResponse` always carries `header`, `archive`, `hash`, `number`, `checkpointNumber`, and `indexWithinCheckpoint`. `body`, `l1` (an `L1PublishInfo` discriminated union), and `attestations` are present only when the matching include option is set. `CheckpointResponse` mirrors this for checkpoints, with `blocks` gated on `includeBlocks`, and always carries `feeAssetPriceModifier` as a base field. The response types are generic over the options object, so passing a literal `{ includeTransactions: true }` narrows the return type and `response.body` becomes non-optional.
56+
57+
**Nested blocks on `getCheckpoint`:** only `includeTransactions` is forwarded to the blocks embedded by `includeBlocks: true`. `includeL1PublishInfo` and `includeAttestations` on a checkpoint request attach L1 / attestation data to the checkpoint itself, not to its nested blocks.
58+
59+
**Return type changes for `getBlocks` / `getCheckpoints`:** the return type is now `BlockResponse[]` / `CheckpointResponse[]` instead of `L2Block[]` / `PublishedCheckpoint[]`. Callers that previously consumed fields of `L2Block` (e.g. `.body`) must now opt in via `{ includeTransactions: true }`; callers that consumed `PublishedCheckpoint.checkpoint.blocks` must opt in via `{ includeBlocks: true }`.
60+
61+
**Migration for wallet/SDK consumers (`@aztec/aztec.js`, `@aztec/wallet-sdk`):**
62+
63+
```diff
64+
- const block = await node.getBlockByHash(hash);
65+
+ const block = await node.getBlock(hash, { includeTransactions: true });
66+
67+
- const archiveBlock = await node.getBlockByArchive(archive);
68+
+ const archiveBlock = await node.getBlock({ archive }, { includeTransactions: true });
69+
70+
- const provenNumber = await node.getProvenBlockNumber();
71+
+ const provenNumber = await node.getBlockNumber('proven');
72+
73+
- const checkpointedNumber = await node.getCheckpointedBlockNumber();
74+
+ const checkpointedNumber = await node.getBlockNumber('checkpointed');
75+
76+
- const tips = await node.getL2Tips();
77+
+ const tips = await node.getChainTips();
78+
```
79+
80+
`getBlockHeader`, `getCheckpointedBlocks`, `getCheckpointsDataForEpoch`, and `getL2Tips` continue to work in this release but are deprecated; migrate to the replacements above.
81+
82+
**Chain-tip selectors:** `getBlockNumber` and `getCheckpointNumber` now accept an optional `ChainTip` argument (`'proposed' | 'checkpointed' | 'proven' | 'finalized'`). Note the semantic difference: on the block side `'proposed'` means the latest proposed block (chain head), whereas on the checkpoint side `'proposed'` resolves to the latest L1-confirmed checkpoint. Pre-L1-confirmation checkpoints are not exposed over RPC.
83+
84+
**Block parameter variants:** `BlockParameter` now also accepts a block hash, an archive root, and chain-tip names. The existing `number | 'latest'` forms continue to work — `'latest'` is an alias for `'proposed'`.
85+
86+
**Impact**: Source changes are required anywhere the removed methods are called. Type changes are required anywhere `L2Block` / `BlockHeader` / `CheckpointedL2Block` were consumed from the RPC — those call sites now receive `BlockResponse` / `CheckpointResponse` and must request the fields they need via `options`. Production nodes will reject JSON-RPC calls to the removed method names.
87+
88+
### [Aztec Node] `feeAssetPriceModifier` now correctly populated on confirmed checkpoints
89+
90+
Confirmed checkpoints previously reported `feeAssetPriceModifier = 0n` regardless of the value observed on L1, because the archiver dropped the field on checkpoint confirmation. The field is now persisted and returned correctly on `CheckpointResponse`. Any wallet or indexer logic that special-cased `0n` as a sentinel for "no modifier" will need to be updated; it is now a valid value in its own right.
3991

4092
### [CLI] `aztec-up` no longer exposes transitive npm bins on PATH
4193

docs/examples/ts/aave_bridge/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,13 +258,13 @@ if (!exitReceipt.blockNumber) {
258258
}
259259
const exitBlockNumber = exitReceipt.blockNumber;
260260
console.log("Waiting for block to be proven...");
261-
let provenBlockNumber = await node.getProvenBlockNumber();
261+
let provenBlockNumber = await node.getBlockNumber('proven');
262262
while (provenBlockNumber < exitBlockNumber) {
263263
console.log(
264264
` Waiting... (proven: ${provenBlockNumber}, needed: ${exitBlockNumber})`,
265265
);
266266
await new Promise((resolve) => setTimeout(resolve, 10000));
267-
provenBlockNumber = await node.getProvenBlockNumber();
267+
provenBlockNumber = await node.getBlockNumber('proven');
268268
}
269269
console.log("Block proven!\n");
270270

docs/examples/ts/example_swap/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -384,13 +384,13 @@ console.log("✓ WETH transferred to bridge for swap\n");
384384
// docs:start:wait_for_proof
385385
console.log("Waiting for block to be proven...\n");
386386

387-
let provenBlockNumber = await node.getProvenBlockNumber();
387+
let provenBlockNumber = await node.getBlockNumber('proven');
388388
while (provenBlockNumber < swapReceipt.blockNumber!) {
389389
console.log(
390390
` Waiting... (proven: ${provenBlockNumber}, needed: ${swapReceipt.blockNumber})`,
391391
);
392392
await new Promise((resolve) => setTimeout(resolve, 10000));
393-
provenBlockNumber = await node.getProvenBlockNumber();
393+
provenBlockNumber = await node.getBlockNumber('proven');
394394
}
395395

396396
console.log("Block proven!\n");

docs/examples/ts/token_bridge/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,15 +289,15 @@ const msgLeaf = computeL2ToL1MessageHash({
289289
console.log("Waiting for block to be proven...");
290290
console.log(` Exit block number: ${exitReceipt.blockNumber}`);
291291

292-
let provenBlockNumber = await node.getProvenBlockNumber();
292+
let provenBlockNumber = await node.getBlockNumber('proven');
293293
console.log(` Current proven block: ${provenBlockNumber}`);
294294

295295
while (provenBlockNumber < exitReceipt.blockNumber!) {
296296
console.log(
297297
` Waiting... (proven: ${provenBlockNumber}, needed: ${exitReceipt.blockNumber})`,
298298
);
299299
await new Promise((resolve) => setTimeout(resolve, 10000)); // Wait 10 seconds
300-
provenBlockNumber = await node.getProvenBlockNumber();
300+
provenBlockNumber = await node.getBlockNumber('proven');
301301
}
302302

303303
console.log("Block proven!\n");

l1-contracts/gas_benchmark.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,22 @@
1414

1515
| Function | Avg Gas | Max Gas | Calldata Size | Calldata Gas |
1616
|----------------------|---------|---------|---------------|--------------|
17-
| propose | 195,201 | 221,411 | 932 | 14,912 |
18-
| submitEpochRootProof | 698,976 | 744,776 | 2,820 | 45,120 |
19-
| setupEpoch | 31,965 | 113,616 | - | - |
17+
| propose | 195,988 | 222,201 | 932 | 14,912 |
18+
| submitEpochRootProof | 697,655 | 743,529 | 2,820 | 45,120 |
19+
| setupEpoch | 31,998 | 113,793 | - | - |
2020

21-
**Avg Gas Cost per Second**: 3,331.7 gas/second
21+
**Avg Gas Cost per Second**: 3,341.5 gas/second
2222
*Epoch duration*: 0h 38m 24s
2323

2424
## Validators
2525

2626
| Function | Avg Gas | Max Gas | Calldata Size | Calldata Gas |
2727
|----------------------|---------|---------|---------------|--------------|
28-
| propose | 322,945 | 350,085 | 4,452 | 71,232 |
29-
| submitEpochRootProof | 897,150 | 942,954 | 5,316 | 85,056 |
30-
| aggregate3 | 371,401 | 384,831 | - | - |
31-
| setupEpoch | 46,426 | 547,449 | - | - |
28+
| propose | 324,449 | 351,604 | 4,452 | 71,232 |
29+
| submitEpochRootProof | 896,101 | 941,944 | 5,316 | 85,056 |
30+
| aggregate3 | 373,118 | 386,457 | - | - |
31+
| setupEpoch | 46,459 | 547,626 | - | - |
3232

33-
**Avg Gas Cost per Second**: 5,284.3 gas/second
33+
**Avg Gas Cost per Second**: 5,304.3 gas/second
3434
*Epoch duration*: 0h 38m 24s
35+

l1-contracts/gas_benchmark_results.json

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2,62 +2,62 @@
22
"no_validators": {
33
"propose": {
44
"calls": 150,
5-
"min": 181595,
6-
"mean": 195201,
7-
"median": 190979,
8-
"max": 221411,
5+
"min": 182373,
6+
"mean": 195988,
7+
"median": 191762,
8+
"max": 222201,
99
"calldata_size": 932,
1010
"calldata_gas": 14912
1111
},
1212
"setupEpoch": {
1313
"calls": 150,
14-
"min": 29236,
15-
"mean": 31965,
16-
"median": 29236,
17-
"max": 113616
14+
"min": 29264,
15+
"mean": 31998,
16+
"median": 29264,
17+
"max": 113793
1818
},
1919
"submitEpochRootProof": {
2020
"calls": 4,
21-
"min": 677928,
22-
"mean": 698976,
23-
"median": 686601,
24-
"max": 744776,
21+
"min": 676491,
22+
"mean": 697655,
23+
"median": 685300,
24+
"max": 743529,
2525
"calldata_size": 2820,
2626
"calldata_gas": 45120
2727
}
2828
},
2929
"validators": {
3030
"propose": {
3131
"calls": 150,
32-
"min": 300568,
33-
"mean": 322945,
34-
"median": 322454,
35-
"max": 350085,
32+
"min": 302105,
33+
"mean": 324449,
34+
"median": 323910,
35+
"max": 351604,
3636
"calldata_size": 4452,
3737
"calldata_gas": 71232
3838
},
3939
"setupEpoch": {
4040
"calls": 150,
41-
"min": 29236,
42-
"mean": 46426,
43-
"median": 29236,
44-
"max": 547449
41+
"min": 29264,
42+
"mean": 46459,
43+
"median": 29264,
44+
"max": 547626
4545
},
4646
"submitEpochRootProof": {
4747
"calls": 4,
48-
"min": 876112,
49-
"mean": 897150,
50-
"median": 884767,
51-
"max": 942954,
48+
"min": 874924,
49+
"mean": 896101,
50+
"median": 883769,
51+
"max": 941944,
5252
"calldata_size": 5316,
5353
"calldata_gas": 85056
5454
},
5555
"aggregate3": {
5656
"calls": 55,
57-
"min": 360298,
58-
"mean": 371401,
59-
"median": 371165,
60-
"max": 384831
57+
"min": 362015,
58+
"mean": 373118,
59+
"median": 372828,
60+
"max": 386457
6161
}
6262
}
63-
}
63+
}

l1-contracts/src/core/Rollup.sol

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -550,6 +550,18 @@ contract Rollup is IStaking, IValidatorSelection, IRollup, RollupCore {
550550
return STFLib.getStorage().config.feeAssetPortal;
551551
}
552552

553+
function getVkTreeRoot() external view override(IRollup) returns (bytes32) {
554+
return STFLib.getStorage().config.vkTreeRoot;
555+
}
556+
557+
function getProtocolContractsHash() external view override(IRollup) returns (bytes32) {
558+
return STFLib.getStorage().config.protocolContractsHash;
559+
}
560+
561+
function getEpochProofVerifier() external view override(IRollup) returns (IVerifier) {
562+
return STFLib.getStorage().config.epochProofVerifier;
563+
}
564+
553565
function getRewardDistributor() external view override(IRollup) returns (IRewardDistributor) {
554566
return RewardExtLib.getRewardDistributor();
555567
}

0 commit comments

Comments
 (0)