Skip to content

chore(fast-inbox): emit inbox lag and checkpoint cap from the constants generator (A-1434)#24794

Open
spalladino wants to merge 2 commits into
spl/a-1388-node-cleanupfrom
spl/a-1434-inbox-constants-gen
Open

chore(fast-inbox): emit inbox lag and checkpoint cap from the constants generator (A-1434)#24794
spalladino wants to merge 2 commits into
spl/a-1388-node-cleanupfrom
spl/a-1434-inbox-constants-gen

Conversation

@spalladino

Copy link
Copy Markdown
Contributor

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.

@spalladino
spalladino requested a review from just-mitch as a code owner July 18, 2026 23:23
@spalladino
spalladino force-pushed the spl/a-1388-node-cleanup branch from 92cecbd to 83a74e1 Compare July 19, 2026 01:25
@spalladino
spalladino force-pushed the spl/a-1434-inbox-constants-gen branch from 57e98bd to beda331 Compare July 19, 2026 01:25
@spalladino
spalladino force-pushed the spl/a-1434-inbox-constants-gen branch from beda331 to c49ff84 Compare July 19, 2026 14:05
@spalladino
spalladino force-pushed the spl/a-1388-node-cleanup branch from 115b351 to 5817030 Compare July 19, 2026 15:10
@spalladino
spalladino force-pushed the spl/a-1434-inbox-constants-gen branch 2 times, most recently from eaae5fb to 2d2d3cf Compare July 19, 2026 15:36
@spalladino
spalladino force-pushed the spl/a-1388-node-cleanup branch from 5817030 to 01b921a Compare July 19, 2026 15:36
@spalladino
spalladino force-pushed the spl/a-1434-inbox-constants-gen branch from 2d2d3cf to a63553a Compare July 19, 2026 17:57
@spalladino
spalladino force-pushed the spl/a-1388-node-cleanup branch from 01b921a to 6269f44 Compare July 19, 2026 17:57
@spalladino
spalladino force-pushed the spl/a-1434-inbox-constants-gen branch from a63553a to 17bdffa Compare July 19, 2026 18:02
@spalladino
spalladino force-pushed the spl/a-1388-node-cleanup branch from 6269f44 to 3111d18 Compare July 19, 2026 18:02
@spalladino
spalladino force-pushed the spl/a-1434-inbox-constants-gen branch 2 times, most recently from 9d89bdc to b6660d3 Compare July 19, 2026 20:30
@spalladino
spalladino force-pushed the spl/a-1388-node-cleanup branch 2 times, most recently from 5660774 to 7fa4b0a Compare July 19, 2026 20:48
@spalladino
spalladino force-pushed the spl/a-1434-inbox-constants-gen branch from b6660d3 to 05ce596 Compare July 19, 2026 20:48
…ts generator (A-1434)

Add INBOX_LAG_SECONDS and MAX_L1_TO_L2_MSGS_PER_CHECKPOINT to the Solidity
constants allowlist so the generator emits them into ConstantsGen.sol, matching
the values already present in constants.gen.ts. ProposeLib and its consumption
test now read the generated Constants library instead of the hand-declared
file-scope copies, giving L1 and TS a single source of truth.
@spalladino
spalladino force-pushed the spl/a-1434-inbox-constants-gen branch from 05ce596 to ab7ddb2 Compare July 19, 2026 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant