import type { EthAddress } from '@aztec/foundation/eth-address'; import type { Prettify } from '@aztec/foundation/types'; import { z } from 'zod'; import type { AztecAddress } from '../aztec-address/index.js'; import { type AllowedElement } from './allowed_element.js'; /** Sequencer configuration */ export interface SequencerConfig { /** The number of ms to wait between polling for pending txs. */ sequencerPollingIntervalMS?: number; /** The maximum number of txs to include in a block. */ maxTxsPerBlock?: number; /** The maximum number of txs across all blocks in a checkpoint. */ maxTxsPerCheckpoint?: number; /** The minimum number of txs to include in a block. */ minTxsPerBlock?: number; /** The minimum number of valid txs (after execution) to include in a block. If not set, falls back to minTxsPerBlock. */ minValidTxsPerBlock?: number; /** Whether to publish txs with the block proposals */ publishTxsWithProposals?: boolean; /** The maximum L2 block gas. */ maxL2BlockGas?: number; /** The maximum DA block gas. */ maxDABlockGas?: number; /** Per-block gas budget multiplier for both L2 and DA gas. Budget = (checkpointLimit / maxBlocks) * multiplier. */ perBlockAllocationMultiplier?: number; /** Redistribute remaining checkpoint budget evenly across remaining blocks instead of allowing a single block to consume the entire remaining budget. */ redistributeCheckpointBudget?: boolean; /** Recipient of block reward. */ coinbase?: EthAddress; /** Address to receive fees. */ feeRecipient?: AztecAddress; /** The working directory to use for simulation/proving */ acvmWorkingDirectory?: string; /** The path to the ACVM binary */ acvmBinaryPath?: string; /** Additional entries to extend the default setup allow list. */ txPublicSetupAllowListExtend?: AllowedElement[]; /** Payload address to vote for */ governanceProposerPayload?: EthAddress; /** Whether to enforce the time table when building blocks */ enforceTimeTable?: boolean; /** How much time (in seconds) we allow in the slot for publishing the L1 tx. */ l1PublishingTime?: number; /** Used for testing to introduce a fake delay after processing each tx */ fakeProcessingDelayPerTxMs?: number; /** Used for testing to throw an error after processing N txs */ fakeThrowAfterProcessingTxCount?: number; /** How many seconds it takes for proposals and attestations to travel across the p2p layer (one-way) */ attestationPropagationTime?: number; /** How many seconds before invalidating a block as a committee member (zero to never invalidate) */ secondsBeforeInvalidatingBlockAsCommitteeMember?: number; /** How many seconds before invalidating a block as a non-committee member (zero to never invalidate) */ secondsBeforeInvalidatingBlockAsNonCommitteeMember?: number; /** Skip collecting attestations (for testing only) */ skipCollectingAttestations?: boolean; /** Do not invalidate the previous block if invalid when we are the proposer (for testing only) */ skipInvalidateBlockAsProposer?: boolean; /** Broadcast invalid block proposals with corrupted state (for testing only) */ broadcastInvalidBlockProposal?: boolean; /** Inject a fake attestation (for testing only) */ injectFakeAttestation?: boolean; /** Inject a malleable attestation with a high-s value (for testing only) */ injectHighSValueAttestation?: boolean; /** Inject an attestation with an unrecoverable signature (for testing only) */ injectUnrecoverableSignatureAttestation?: boolean; /** Whether to run in fisherman mode: builds blocks on every slot for validation without publishing */ fishermanMode?: boolean; /** Shuffle attestation ordering to create invalid ordering (for testing only) */ shuffleAttestationOrdering?: boolean; /** Duration per block in milliseconds when building multiple blocks per slot (default: undefined = single block per slot) */ blockDurationMs?: number; /** Expected number of block proposals per slot for P2P peer scoring. 0 disables scoring, undefined falls back to blocksPerSlot - 1. */ expectedBlockProposalsPerSlot?: number; /** Have sequencer build and publish an empty checkpoint if there are no txs */ buildCheckpointIfEmpty?: boolean; /** Skip pushing proposed blocks to archiver (default: false) */ skipPushProposedBlocksToArchiver?: boolean; /** Minimum number of blocks required for a checkpoint proposal (test only, defaults to undefined = no minimum) */ minBlocksForCheckpoint?: number; /** Skip publishing checkpoint proposals probability (for testing checkpoint prunes only) */ skipPublishingCheckpointsPercent?: number; } export declare const SequencerConfigSchema: z.ZodObject<{ sequencerPollingIntervalMS: z.ZodOptional; maxTxsPerBlock: z.ZodOptional; maxTxsPerCheckpoint: z.ZodOptional; minValidTxsPerBlock: z.ZodOptional; minTxsPerBlock: z.ZodOptional; maxL2BlockGas: z.ZodOptional; publishTxsWithProposals: z.ZodOptional; maxDABlockGas: z.ZodOptional; perBlockAllocationMultiplier: z.ZodOptional; redistributeCheckpointBudget: z.ZodOptional; coinbase: z.ZodOptional>; feeRecipient: z.ZodOptional>; acvmWorkingDirectory: z.ZodOptional; acvmBinaryPath: z.ZodOptional; txPublicSetupAllowListExtend: z.ZodOptional; selector: import("../schemas/index.js").ZodFor; onlySelf: z.ZodOptional; rejectNullMsgSender: z.ZodOptional; calldataLength: z.ZodOptional; }, "strip", z.ZodTypeAny, { address: AztecAddress; selector: import("../abi/function_selector.js").FunctionSelector; onlySelf?: boolean | undefined; rejectNullMsgSender?: boolean | undefined; calldataLength?: number | undefined; }, { address?: any; selector?: any; onlySelf?: boolean | undefined; rejectNullMsgSender?: boolean | undefined; calldataLength?: number | undefined; }>, z.ZodObject<{ classId: import("../schemas/index.js").ZodFor; selector: import("../schemas/index.js").ZodFor; onlySelf: z.ZodOptional; rejectNullMsgSender: z.ZodOptional; calldataLength: z.ZodOptional; }, "strip", z.ZodTypeAny, { classId: import("@aztec/foundation/schemas").Fr; selector: import("../abi/function_selector.js").FunctionSelector; onlySelf?: boolean | undefined; rejectNullMsgSender?: boolean | undefined; calldataLength?: number | undefined; }, { classId?: any; selector?: any; onlySelf?: boolean | undefined; rejectNullMsgSender?: boolean | undefined; calldataLength?: number | undefined; }>]>, "many">>; governanceProposerPayload: z.ZodOptional>; l1PublishingTime: z.ZodOptional; enforceTimeTable: z.ZodOptional; fakeProcessingDelayPerTxMs: z.ZodOptional; fakeThrowAfterProcessingTxCount: z.ZodOptional; attestationPropagationTime: z.ZodOptional; skipCollectingAttestations: z.ZodOptional; skipInvalidateBlockAsProposer: z.ZodOptional; secondsBeforeInvalidatingBlockAsCommitteeMember: z.ZodNumber; secondsBeforeInvalidatingBlockAsNonCommitteeMember: z.ZodNumber; broadcastInvalidBlockProposal: z.ZodOptional; injectFakeAttestation: z.ZodOptional; injectHighSValueAttestation: z.ZodOptional; injectUnrecoverableSignatureAttestation: z.ZodOptional; fishermanMode: z.ZodOptional; shuffleAttestationOrdering: z.ZodOptional; blockDurationMs: z.ZodOptional; expectedBlockProposalsPerSlot: z.ZodOptional; buildCheckpointIfEmpty: z.ZodOptional; skipPushProposedBlocksToArchiver: z.ZodOptional; minBlocksForCheckpoint: z.ZodOptional; skipPublishingCheckpointsPercent: z.ZodOptional; }, "strip", z.ZodTypeAny, { sequencerPollingIntervalMS?: number | undefined; maxTxsPerBlock?: number | undefined; maxTxsPerCheckpoint?: number | undefined; minValidTxsPerBlock?: number | undefined; minTxsPerBlock?: number | undefined; maxL2BlockGas?: number | undefined; publishTxsWithProposals?: boolean | undefined; maxDABlockGas?: number | undefined; perBlockAllocationMultiplier?: number | undefined; redistributeCheckpointBudget?: boolean | undefined; coinbase?: EthAddress | undefined; feeRecipient?: AztecAddress | undefined; acvmWorkingDirectory?: string | undefined; acvmBinaryPath?: string | undefined; txPublicSetupAllowListExtend?: ({ address: AztecAddress; selector: import("../abi/function_selector.js").FunctionSelector; onlySelf?: boolean | undefined; rejectNullMsgSender?: boolean | undefined; calldataLength?: number | undefined; } | { classId: import("@aztec/foundation/schemas").Fr; selector: import("../abi/function_selector.js").FunctionSelector; onlySelf?: boolean | undefined; rejectNullMsgSender?: boolean | undefined; calldataLength?: number | undefined; })[] | undefined; governanceProposerPayload?: EthAddress | undefined; l1PublishingTime?: number | undefined; enforceTimeTable?: boolean | undefined; fakeProcessingDelayPerTxMs?: number | undefined; fakeThrowAfterProcessingTxCount?: number | undefined; attestationPropagationTime?: number | undefined; skipCollectingAttestations?: boolean | undefined; skipInvalidateBlockAsProposer?: boolean | undefined; secondsBeforeInvalidatingBlockAsCommitteeMember: number; secondsBeforeInvalidatingBlockAsNonCommitteeMember: number; broadcastInvalidBlockProposal?: boolean | undefined; injectFakeAttestation?: boolean | undefined; injectHighSValueAttestation?: boolean | undefined; injectUnrecoverableSignatureAttestation?: boolean | undefined; fishermanMode?: boolean | undefined; shuffleAttestationOrdering?: boolean | undefined; blockDurationMs?: number | undefined; expectedBlockProposalsPerSlot?: number | undefined; buildCheckpointIfEmpty?: boolean | undefined; skipPushProposedBlocksToArchiver?: boolean | undefined; minBlocksForCheckpoint?: number | undefined; skipPublishingCheckpointsPercent?: number | undefined; }, { sequencerPollingIntervalMS?: number | undefined; maxTxsPerBlock?: number | undefined; maxTxsPerCheckpoint?: number | undefined; minValidTxsPerBlock?: number | undefined; minTxsPerBlock?: number | undefined; maxL2BlockGas?: number | undefined; publishTxsWithProposals?: boolean | undefined; maxDABlockGas?: number | undefined; perBlockAllocationMultiplier?: number | undefined; redistributeCheckpointBudget?: boolean | undefined; coinbase?: any; feeRecipient?: any; acvmWorkingDirectory?: string | undefined; acvmBinaryPath?: string | undefined; txPublicSetupAllowListExtend?: ({ address?: any; selector?: any; onlySelf?: boolean | undefined; rejectNullMsgSender?: boolean | undefined; calldataLength?: number | undefined; } | { classId?: any; selector?: any; onlySelf?: boolean | undefined; rejectNullMsgSender?: boolean | undefined; calldataLength?: number | undefined; })[] | undefined; governanceProposerPayload?: any; l1PublishingTime?: number | undefined; enforceTimeTable?: boolean | undefined; fakeProcessingDelayPerTxMs?: number | undefined; fakeThrowAfterProcessingTxCount?: number | undefined; attestationPropagationTime?: number | undefined; skipCollectingAttestations?: boolean | undefined; skipInvalidateBlockAsProposer?: boolean | undefined; secondsBeforeInvalidatingBlockAsCommitteeMember: number; secondsBeforeInvalidatingBlockAsNonCommitteeMember: number; broadcastInvalidBlockProposal?: boolean | undefined; injectFakeAttestation?: boolean | undefined; injectHighSValueAttestation?: boolean | undefined; injectUnrecoverableSignatureAttestation?: boolean | undefined; fishermanMode?: boolean | undefined; shuffleAttestationOrdering?: boolean | undefined; blockDurationMs?: number | undefined; expectedBlockProposalsPerSlot?: number | undefined; buildCheckpointIfEmpty?: boolean | undefined; skipPushProposedBlocksToArchiver?: boolean | undefined; minBlocksForCheckpoint?: number | undefined; skipPublishingCheckpointsPercent?: number | undefined; }>; type SequencerConfigOptionalKeys = 'governanceProposerPayload' | 'blockDurationMs' | 'expectedBlockProposalsPerSlot' | 'coinbase' | 'feeRecipient' | 'acvmWorkingDirectory' | 'acvmBinaryPath' | 'fakeProcessingDelayPerTxMs' | 'fakeThrowAfterProcessingTxCount' | 'l1PublishingTime' | 'txPublicSetupAllowListExtend' | 'minValidTxsPerBlock' | 'minBlocksForCheckpoint' | 'maxTxsPerBlock' | 'maxTxsPerCheckpoint' | 'maxL2BlockGas' | 'maxDABlockGas' | 'redistributeCheckpointBudget'; export type ResolvedSequencerConfig = Prettify> & Pick>; export {}; //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlncy5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2ludGVyZmFjZXMvY29uZmlncy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssRUFBRSxVQUFVLEVBQUUsTUFBTSwrQkFBK0IsQ0FBQztBQUNoRSxPQUFPLEtBQUssRUFBRSxRQUFRLEVBQUUsTUFBTSx5QkFBeUIsQ0FBQztBQUV4RCxPQUFPLEVBQUUsQ0FBQyxFQUFFLE1BQU0sS0FBSyxDQUFDO0FBRXhCLE9BQU8sS0FBSyxFQUFFLFlBQVksRUFBRSxNQUFNLDJCQUEyQixDQUFDO0FBRTlELE9BQU8sRUFBRSxLQUFLLGNBQWMsRUFBd0IsTUFBTSxzQkFBc0IsQ0FBQztBQUVqRiw4QkFBOEI7QUFDOUIsTUFBTSxXQUFXLGVBQWU7SUFDOUIsZ0VBQWdFO0lBQ2hFLDBCQUEwQixDQUFDLEVBQUUsTUFBTSxDQUFDO0lBQ3BDLHVEQUF1RDtJQUN2RCxjQUFjLENBQUMsRUFBRSxNQUFNLENBQUM7SUFDeEIsbUVBQW1FO0lBQ25FLG1CQUFtQixDQUFDLEVBQUUsTUFBTSxDQUFDO0lBQzdCLHVEQUF1RDtJQUN2RCxjQUFjLENBQUMsRUFBRSxNQUFNLENBQUM7SUFDeEIseUhBQXlIO0lBQ3pILG1CQUFtQixDQUFDLEVBQUUsTUFBTSxDQUFDO0lBQzdCLHNEQUFzRDtJQUN0RCx1QkFBdUIsQ0FBQyxFQUFFLE9BQU8sQ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