Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/docs-operate/operators/reference/changelog/v4.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ The byte-based block size limit has been removed and replaced with field-based b
**New (proposer):**

```bash
--gasPerBlockAllocationMultiplier <value> ($SEQ_GAS_PER_BLOCK_ALLOCATION_MULTIPLIER)
--perBlockAllocationMultiplier <value> ($SEQ_PER_BLOCK_ALLOCATION_MULTIPLIER)
--maxTxsPerCheckpoint <value> ($SEQ_MAX_TX_PER_CHECKPOINT)
```

Expand Down
2 changes: 1 addition & 1 deletion yarn-project/foundation/src/config/env_var.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ export type EnvVar =
| 'SEQ_PUBLISH_TXS_WITH_PROPOSALS'
| 'SEQ_MAX_DA_BLOCK_GAS'
| 'SEQ_MAX_L2_BLOCK_GAS'
| 'SEQ_GAS_PER_BLOCK_ALLOCATION_MULTIPLIER'
| 'SEQ_PER_BLOCK_ALLOCATION_MULTIPLIER'
| 'SEQ_PUBLISHER_PRIVATE_KEY'
| 'SEQ_PUBLISHER_PRIVATE_KEYS'
| 'SEQ_PUBLISHER_ADDRESSES'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ export function computeBlockLimits(
enforce: config.enforceTimeTable ?? DefaultSequencerConfig.enforceTimeTable,
}).maxNumberOfBlocks;

const multiplier = config.gasPerBlockAllocationMultiplier ?? DefaultSequencerConfig.gasPerBlockAllocationMultiplier;
const multiplier = config.perBlockAllocationMultiplier ?? DefaultSequencerConfig.perBlockAllocationMultiplier;

// Compute maxL2BlockGas
let maxL2BlockGas: number;
Expand Down
8 changes: 4 additions & 4 deletions yarn-project/sequencer-client/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export const DefaultSequencerConfig = {
minTxsPerBlock: 1,
buildCheckpointIfEmpty: false,
publishTxsWithProposals: false,
gasPerBlockAllocationMultiplier: 2,
perBlockAllocationMultiplier: 2,
enforceTimeTable: true,
attestationPropagationTime: DEFAULT_P2P_PROPAGATION_TIME,
secondsBeforeInvalidatingBlockAsCommitteeMember: 144, // 12 L1 blocks
Expand Down Expand Up @@ -105,12 +105,12 @@ export const sequencerConfigMappings: ConfigMappingsType<SequencerConfig> = {
description: 'The maximum DA block gas.',
parseEnv: (val: string) => (val ? parseInt(val, 10) : undefined),
},
gasPerBlockAllocationMultiplier: {
env: 'SEQ_GAS_PER_BLOCK_ALLOCATION_MULTIPLIER',
perBlockAllocationMultiplier: {
env: 'SEQ_PER_BLOCK_ALLOCATION_MULTIPLIER',
description:
'Per-block gas budget multiplier for both L2 and DA gas. Budget per block is (checkpointLimit / maxBlocks) * multiplier.' +
' Values greater than one allow early blocks to use more than their even share, relying on checkpoint-level capping for later blocks.',
...numberConfigHelper(DefaultSequencerConfig.gasPerBlockAllocationMultiplier),
...numberConfigHelper(DefaultSequencerConfig.perBlockAllocationMultiplier),
},
coinbase: {
env: 'COINBASE',
Expand Down
6 changes: 3 additions & 3 deletions yarn-project/stdlib/src/interfaces/configs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export interface SequencerConfig {
/** The maximum DA block gas. */
maxDABlockGas?: number;
/** Per-block gas budget multiplier for both L2 and DA gas. Budget = (checkpointLimit / maxBlocks) * multiplier. */
gasPerBlockAllocationMultiplier?: number;
perBlockAllocationMultiplier?: number;
/** Recipient of block reward. */
coinbase?: EthAddress;
/** Address to receive fees. */
Expand Down Expand Up @@ -93,7 +93,7 @@ export const SequencerConfigSchema = zodFor<SequencerConfig>()(
maxL2BlockGas: z.number().optional(),
publishTxsWithProposals: z.boolean().optional(),
maxDABlockGas: z.number().optional(),
gasPerBlockAllocationMultiplier: z.number().optional(),
perBlockAllocationMultiplier: z.number().optional(),
coinbase: schemas.EthAddress.optional(),
feeRecipient: schemas.AztecAddress.optional(),
acvmWorkingDirectory: z.string().optional(),
Expand Down Expand Up @@ -142,7 +142,7 @@ type SequencerConfigOptionalKeys =
| 'maxTxsPerCheckpoint'
| 'maxL2BlockGas'
| 'maxDABlockGas'
| 'gasPerBlockAllocationMultiplier';
| 'perBlockAllocationMultiplier';

export type ResolvedSequencerConfig = Prettify<
Required<Omit<SequencerConfig, SequencerConfigOptionalKeys>> & Pick<SequencerConfig, SequencerConfigOptionalKeys>
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/validator-client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ Per-block budgets prevent one block from consuming the entire checkpoint budget.
| `SEQ_MAX_DA_BLOCK_GAS` | *auto* | Per-block DA gas. Auto-derived from checkpoint DA limit / maxBlocks * multiplier. |
| `SEQ_MAX_TX_PER_BLOCK` | *none* | Per-block tx count. If `SEQ_MAX_TX_PER_CHECKPOINT` is set and per-block is not, derived as `ceil(checkpointLimit / maxBlocks * multiplier)`. |
| `SEQ_MAX_TX_PER_CHECKPOINT` | *none* | Total txs across all blocks in a checkpoint. When set, per-block tx limit is derived from it (unless explicitly overridden) and checkpoint-level capping is enforced. |
| `SEQ_GAS_PER_BLOCK_ALLOCATION_MULTIPLIER` | 2 | Multiplier for per-block budget computation. |
| `SEQ_PER_BLOCK_ALLOCATION_MULTIPLIER` | 2 | Multiplier for per-block budget computation. |
| `VALIDATOR_MAX_L2_BLOCK_GAS` | *none* | Per-block L2 gas limit for validation. Proposals exceeding this are rejected. |
| `VALIDATOR_MAX_DA_BLOCK_GAS` | *none* | Per-block DA gas limit for validation. Proposals exceeding this are rejected. |
| `VALIDATOR_MAX_TX_PER_BLOCK` | *none* | Per-block tx count limit for validation. Proposals exceeding this are rejected. |
Expand Down
Loading