Commit f9e61da
committed
chore(fast-inbox): emit inbox lag and checkpoint cap from the constants generator (A-1434)
Moves `INBOX_LAG_SECONDS` (12) and `MAX_L1_TO_L2_MSGS_PER_CHECKPOINT` (1024) out of the hand-declared file-scope constants in `ProposeLib.sol` and into the generated `Constants` library, giving L1 Solidity and the TS node a single source of truth (A-1434, Fast Inbox cleanup).
Both values already lived in `constants.nr` (the Noir source of truth) and were already emitted to `constants.gen.ts`; the only gap was the Solidity side, which gates emission behind an allowlist.
- Add both names to the `SOLIDITY_CONSTANTS` allowlist in `constants/src/scripts/constants.in.ts`, so `yarn remake-constants` emits them into `ConstantsGen.sol`. `constants.gen.ts` is unchanged (already present).
- Regenerate `ConstantsGen.sol` (generator output; not hand-edited).
- `ProposeLib.sol` imports `Constants` and references the generated values; the hand-declared file-scope copies are deleted.
- Update `ProposeInboxConsumption.t.sol` to import the constants from `ConstantsGen.sol` instead of `ProposeLib.sol`.
TS node code that validates inbox consumption (`stdlib` cutoff predicate, `validator-client` streaming checks, `sequencer-client` bucket selector) already reads these from `@aztec/constants`, so no TS source change is needed.
Testing:
- `forge build` and `forge test test/rollup/ProposeInboxConsumption.t.sol` (15 tests) pass.
- The three TS regression suites pass: `stdlib` inbox_consumption (10), `validator-client` streaming_inbox_checks (14), `sequencer-client` inbox_bucket_selector (9).
- `@aztec/constants`, `@aztec/l1-artifacts`, and `@aztec/ethereum` build.
Part of the Fast Inbox stack, on top of #24784..#24793.
Replaces #24794.1 parent 4da410d commit f9e61da
3 files changed
Lines changed: 17 additions & 23 deletions
File tree
- l1-contracts
- scripts/constants-codegen
- src/core/libraries/rollup
- test/rollup
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
4 | 6 | | |
5 | 7 | | |
6 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | 26 | | |
34 | 27 | | |
35 | 28 | | |
| |||
465 | 458 | | |
466 | 459 | | |
467 | 460 | | |
468 | | - | |
| 461 | + | |
469 | 462 | | |
470 | 463 | | |
471 | 464 | | |
472 | 465 | | |
473 | 466 | | |
474 | 467 | | |
475 | | - | |
| 468 | + | |
476 | 469 | | |
477 | 470 | | |
478 | | - | |
| 471 | + | |
479 | 472 | | |
480 | 473 | | |
481 | 474 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
| 9 | + | |
| 10 | + | |
14 | 11 | | |
15 | 12 | | |
16 | 13 | | |
| |||
50 | 47 | | |
51 | 48 | | |
52 | 49 | | |
53 | | - | |
| 50 | + | |
54 | 51 | | |
55 | 52 | | |
56 | 53 | | |
| |||
125 | 122 | | |
126 | 123 | | |
127 | 124 | | |
128 | | - | |
| 125 | + | |
129 | 126 | | |
130 | 127 | | |
131 | 128 | | |
| |||
134 | 131 | | |
135 | 132 | | |
136 | 133 | | |
137 | | - | |
| 134 | + | |
138 | 135 | | |
139 | 136 | | |
140 | 137 | | |
141 | 138 | | |
142 | | - | |
| 139 | + | |
143 | 140 | | |
144 | 141 | | |
145 | 142 | | |
| |||
154 | 151 | | |
155 | 152 | | |
156 | 153 | | |
157 | | - | |
| 154 | + | |
158 | 155 | | |
159 | 156 | | |
160 | 157 | | |
| |||
288 | 285 | | |
289 | 286 | | |
290 | 287 | | |
291 | | - | |
| 288 | + | |
292 | 289 | | |
293 | 290 | | |
294 | 291 | | |
295 | 292 | | |
296 | 293 | | |
297 | 294 | | |
298 | | - | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
299 | 298 | | |
300 | 299 | | |
301 | 300 | | |
| |||
0 commit comments