Skip to content

Commit b29c4c7

Browse files
committed
fix(fast-inbox): regen scenarios respect the per-block message cap (A-1435)
makeCheckpoint concentrates every scenario message into the first block, whose bundle pads to MAX_L1_TO_L2_MSGS_PER_BLOCK (256), so seeding scenarios with the per-checkpoint cap (1024) threw on regeneration. Also distribute messages across both blocks of the rollup-block-root scenario so the committed non-first block-root sample carries a non-empty bundle.
1 parent 79acdcd commit b29c4c7

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

yarn-project/prover-client/src/test/regenerate_rollup_sample_inputs.test.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { MAX_L1_TO_L2_MSGS_PER_CHECKPOINT } from '@aztec/constants';
1+
import { MAX_L1_TO_L2_MSGS_PER_BLOCK } from '@aztec/constants';
22
import { EpochNumber } from '@aztec/foundation/branded-types';
33
import { times, timesAsync } from '@aztec/foundation/collection';
44
import { Fr } from '@aztec/foundation/curves/bn254';
@@ -60,7 +60,9 @@ describeOrSkip('prover/regenerate-rollup-sample-inputs', () => {
6060
dump: CircuitName[];
6161
}
6262

63-
const withMessages = MAX_L1_TO_L2_MSGS_PER_CHECKPOINT;
63+
// `makeCheckpoint` puts the scenario's whole message list into the first block, so the most a
64+
// scenario can carry is one full per-block bundle, not the per-checkpoint cap.
65+
const withMessages = MAX_L1_TO_L2_MSGS_PER_BLOCK;
6466

6567
const scenarios: Scenario[] = [
6668
{
@@ -89,11 +91,14 @@ describeOrSkip('prover/regenerate-rollup-sample-inputs', () => {
8991
'rollup-checkpoint-root',
9092
],
9193
},
94+
// Messages split across both blocks so the non-first block-root sample carries a non-empty
95+
// bundle, exercising the per-block sponge continuity asserts in the circuit.
9296
{
9397
numCheckpoints: 1,
9498
numBlocksPerCheckpoint: 2,
9599
numTxsPerBlock: 2,
96-
numL1ToL2Messages: withMessages,
100+
numL1ToL2Messages: 0, // Overridden by l1ToL2MessagesPerBlock.
101+
l1ToL2MessagesPerBlock: [times(2, i => new Fr(0xb00 + i)), times(3, i => new Fr(0xc00 + i))],
97102
dump: ['rollup-block-root'],
98103
},
99104
// Three txs in a block force a tx-merge to pair the base proofs down to the two the block root

0 commit comments

Comments
 (0)