@aztec/sequencer-client 0.0.1-commit.023c3e5 → 0.0.1-commit.031e54b
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +281 -21
- package/dest/client/sequencer-client.d.ts +19 -9
- package/dest/client/sequencer-client.d.ts.map +1 -1
- package/dest/client/sequencer-client.js +65 -32
- package/dest/config.d.ts +28 -6
- package/dest/config.d.ts.map +1 -1
- package/dest/config.js +76 -37
- package/dest/global_variable_builder/fee_predictor.d.ts +37 -0
- package/dest/global_variable_builder/fee_predictor.d.ts.map +1 -0
- package/dest/global_variable_builder/fee_predictor.js +128 -0
- package/dest/global_variable_builder/fee_provider.d.ts +21 -0
- package/dest/global_variable_builder/fee_provider.d.ts.map +1 -0
- package/dest/global_variable_builder/fee_provider.js +58 -0
- package/dest/global_variable_builder/global_builder.d.ts +14 -16
- package/dest/global_variable_builder/global_builder.d.ts.map +1 -1
- package/dest/global_variable_builder/global_builder.js +16 -50
- package/dest/global_variable_builder/index.d.ts +4 -2
- package/dest/global_variable_builder/index.d.ts.map +1 -1
- package/dest/global_variable_builder/index.js +2 -0
- package/dest/index.d.ts +2 -2
- package/dest/index.d.ts.map +1 -1
- package/dest/index.js +1 -1
- package/dest/publisher/config.d.ts +47 -17
- package/dest/publisher/config.d.ts.map +1 -1
- package/dest/publisher/config.js +121 -42
- package/dest/publisher/index.d.ts +2 -1
- package/dest/publisher/index.d.ts.map +1 -1
- package/dest/publisher/l1_tx_failed_store/factory.d.ts +11 -0
- package/dest/publisher/l1_tx_failed_store/factory.d.ts.map +1 -0
- package/dest/publisher/l1_tx_failed_store/factory.js +22 -0
- package/dest/publisher/l1_tx_failed_store/failed_tx_store.d.ts +58 -0
- package/dest/publisher/l1_tx_failed_store/failed_tx_store.d.ts.map +1 -0
- package/dest/publisher/l1_tx_failed_store/failed_tx_store.js +1 -0
- package/dest/publisher/l1_tx_failed_store/file_store_failed_tx_store.d.ts +15 -0
- package/dest/publisher/l1_tx_failed_store/file_store_failed_tx_store.d.ts.map +1 -0
- package/dest/publisher/l1_tx_failed_store/file_store_failed_tx_store.js +34 -0
- package/dest/publisher/l1_tx_failed_store/index.d.ts +4 -0
- package/dest/publisher/l1_tx_failed_store/index.d.ts.map +1 -0
- package/dest/publisher/l1_tx_failed_store/index.js +2 -0
- package/dest/publisher/sequencer-bundle-simulator.d.ts +96 -0
- package/dest/publisher/sequencer-bundle-simulator.d.ts.map +1 -0
- package/dest/publisher/sequencer-bundle-simulator.js +198 -0
- package/dest/publisher/sequencer-publisher-factory.d.ts +11 -5
- package/dest/publisher/sequencer-publisher-factory.d.ts.map +1 -1
- package/dest/publisher/sequencer-publisher-factory.js +27 -3
- package/dest/publisher/sequencer-publisher.d.ts +94 -67
- package/dest/publisher/sequencer-publisher.d.ts.map +1 -1
- package/dest/publisher/sequencer-publisher.js +439 -378
- package/dest/sequencer/automine/automine_factory.d.ts +54 -0
- package/dest/sequencer/automine/automine_factory.d.ts.map +1 -0
- package/dest/sequencer/automine/automine_factory.js +84 -0
- package/dest/sequencer/automine/automine_sequencer.d.ts +151 -0
- package/dest/sequencer/automine/automine_sequencer.d.ts.map +1 -0
- package/dest/sequencer/automine/automine_sequencer.js +509 -0
- package/dest/sequencer/chain_state_overrides.d.ts +61 -0
- package/dest/sequencer/chain_state_overrides.d.ts.map +1 -0
- package/dest/sequencer/chain_state_overrides.js +98 -0
- package/dest/sequencer/checkpoint_proposal_job.d.ts +65 -11
- package/dest/sequencer/checkpoint_proposal_job.d.ts.map +1 -1
- package/dest/sequencer/checkpoint_proposal_job.js +849 -249
- package/dest/sequencer/checkpoint_proposal_job_metrics.d.ts +34 -0
- package/dest/sequencer/checkpoint_proposal_job_metrics.d.ts.map +1 -0
- package/dest/sequencer/checkpoint_proposal_job_metrics.js +72 -0
- package/dest/sequencer/checkpoint_voter.d.ts +1 -2
- package/dest/sequencer/checkpoint_voter.d.ts.map +1 -1
- package/dest/sequencer/checkpoint_voter.js +2 -5
- package/dest/sequencer/events.d.ts +48 -2
- package/dest/sequencer/events.d.ts.map +1 -1
- package/dest/sequencer/index.d.ts +3 -1
- package/dest/sequencer/index.d.ts.map +1 -1
- package/dest/sequencer/index.js +2 -0
- package/dest/sequencer/metrics.d.ts +23 -8
- package/dest/sequencer/metrics.d.ts.map +1 -1
- package/dest/sequencer/metrics.js +117 -21
- package/dest/sequencer/sequencer.d.ts +85 -22
- package/dest/sequencer/sequencer.d.ts.map +1 -1
- package/dest/sequencer/sequencer.js +380 -137
- package/dest/sequencer/timetable.d.ts +14 -6
- package/dest/sequencer/timetable.d.ts.map +1 -1
- package/dest/sequencer/timetable.js +47 -46
- package/dest/sequencer/types.d.ts +2 -2
- package/dest/sequencer/types.d.ts.map +1 -1
- package/dest/test/index.d.ts +3 -5
- package/dest/test/index.d.ts.map +1 -1
- package/dest/test/mock_checkpoint_builder.d.ts +11 -11
- package/dest/test/mock_checkpoint_builder.d.ts.map +1 -1
- package/dest/test/mock_checkpoint_builder.js +45 -34
- package/dest/test/utils.d.ts +3 -3
- package/dest/test/utils.d.ts.map +1 -1
- package/dest/test/utils.js +10 -8
- package/package.json +27 -28
- package/src/client/sequencer-client.ts +91 -35
- package/src/config.ts +98 -46
- package/src/global_variable_builder/README.md +44 -0
- package/src/global_variable_builder/fee_predictor.ts +172 -0
- package/src/global_variable_builder/fee_provider.ts +75 -0
- package/src/global_variable_builder/global_builder.ts +26 -63
- package/src/global_variable_builder/index.ts +3 -1
- package/src/index.ts +10 -1
- package/src/publisher/config.ts +157 -45
- package/src/publisher/index.ts +3 -0
- package/src/publisher/l1_tx_failed_store/factory.ts +32 -0
- package/src/publisher/l1_tx_failed_store/failed_tx_store.ts +57 -0
- package/src/publisher/l1_tx_failed_store/file_store_failed_tx_store.ts +46 -0
- package/src/publisher/l1_tx_failed_store/index.ts +3 -0
- package/src/publisher/sequencer-bundle-simulator.ts +254 -0
- package/src/publisher/sequencer-publisher-factory.ts +38 -9
- package/src/publisher/sequencer-publisher.ts +532 -469
- package/src/sequencer/README.md +162 -450
- package/src/sequencer/automine/README.md +46 -0
- package/src/sequencer/automine/automine_factory.ts +145 -0
- package/src/sequencer/automine/automine_sequencer.ts +595 -0
- package/src/sequencer/chain_state_overrides.ts +162 -0
- package/src/sequencer/checkpoint_proposal_job.ts +1026 -268
- package/src/sequencer/checkpoint_proposal_job_metrics.ts +128 -0
- package/src/sequencer/checkpoint_voter.ts +1 -12
- package/src/sequencer/events.ts +51 -2
- package/src/sequencer/index.ts +2 -0
- package/src/sequencer/metrics.ts +132 -25
- package/src/sequencer/sequencer.ts +470 -156
- package/src/sequencer/timetable.ts +62 -56
- package/src/sequencer/types.ts +1 -1
- package/src/test/index.ts +2 -4
- package/src/test/mock_checkpoint_builder.ts +63 -49
- package/src/test/utils.ts +31 -10
package/dest/test/utils.js
CHANGED
|
@@ -7,7 +7,7 @@ import { PublicDataWrite } from '@aztec/stdlib/avm';
|
|
|
7
7
|
import { CommitteeAttestation, L2Block } from '@aztec/stdlib/block';
|
|
8
8
|
import { BlockProposal, CheckpointAttestation, CheckpointProposal, ConsensusPayload } from '@aztec/stdlib/p2p';
|
|
9
9
|
import { CheckpointHeader } from '@aztec/stdlib/rollup';
|
|
10
|
-
import { makeAppendOnlyTreeSnapshot, mockTxForRollup } from '@aztec/stdlib/testing';
|
|
10
|
+
import { TEST_COORDINATION_SIGNATURE_CONTEXT, makeAppendOnlyTreeSnapshot, mockTxForRollup } from '@aztec/stdlib/testing';
|
|
11
11
|
import { BlockHeader, makeProcessedTxFromPrivateOnlyTx } from '@aztec/stdlib/tx';
|
|
12
12
|
// Re-export mock classes from their dedicated file
|
|
13
13
|
export { MockCheckpointBuilder, MockCheckpointsBuilder } from './mock_checkpoint_builder.js';
|
|
@@ -36,6 +36,7 @@ export { MockCheckpointBuilder, MockCheckpointsBuilder } from './mock_checkpoint
|
|
|
36
36
|
*/ export function mockPendingTxs(p2p, txs) {
|
|
37
37
|
p2p.getPendingTxCount.mockResolvedValue(txs.length);
|
|
38
38
|
p2p.iteratePendingTxs.mockImplementation(()=>mockTxIterator(Promise.resolve(txs)));
|
|
39
|
+
p2p.iterateEligiblePendingTxs.mockImplementation(()=>mockTxIterator(Promise.resolve(txs)));
|
|
39
40
|
}
|
|
40
41
|
/**
|
|
41
42
|
* Creates an async iterator for transactions
|
|
@@ -63,14 +64,14 @@ export { MockCheckpointBuilder, MockCheckpointsBuilder } from './mock_checkpoint
|
|
|
63
64
|
* Creates a block proposal from a block and signature
|
|
64
65
|
*/ export function createBlockProposal(block, signature) {
|
|
65
66
|
const txHashes = block.body.txEffects.map((tx)=>tx.txHash);
|
|
66
|
-
return new BlockProposal(block.header, block.indexWithinCheckpoint, Fr.ZERO, block.archive.root, txHashes, signature);
|
|
67
|
+
return new BlockProposal(block.header, block.indexWithinCheckpoint, Fr.ZERO, block.archive.root, txHashes, signature, TEST_COORDINATION_SIGNATURE_CONTEXT);
|
|
67
68
|
}
|
|
68
69
|
/**
|
|
69
70
|
* Creates a checkpoint proposal from a block and signature
|
|
70
|
-
*/ export function createCheckpointProposal(block, checkpointSignature, blockSignature) {
|
|
71
|
+
*/ export function createCheckpointProposal(block, checkpointSignature, blockSignature, feeAssetPriceModifier = 0n) {
|
|
71
72
|
const txHashes = block.body.txEffects.map((tx)=>tx.txHash);
|
|
72
73
|
const checkpointHeader = createCheckpointHeaderFromBlock(block);
|
|
73
|
-
return new CheckpointProposal(checkpointHeader, block.archive.root, checkpointSignature, {
|
|
74
|
+
return new CheckpointProposal(checkpointHeader, block.archive.root, feeAssetPriceModifier, checkpointSignature, TEST_COORDINATION_SIGNATURE_CONTEXT, {
|
|
74
75
|
blockHeader: block.header,
|
|
75
76
|
indexWithinCheckpoint: block.indexWithinCheckpoint,
|
|
76
77
|
txHashes,
|
|
@@ -81,12 +82,13 @@ export { MockCheckpointBuilder, MockCheckpointsBuilder } from './mock_checkpoint
|
|
|
81
82
|
* Creates a checkpoint attestation from a block and signature.
|
|
82
83
|
* Note: We manually set the sender since we use random signatures in tests.
|
|
83
84
|
* In production, the sender is recovered from the signature.
|
|
84
|
-
*/ export function createCheckpointAttestation(block, signature, sender) {
|
|
85
|
+
*/ export function createCheckpointAttestation(block, signature, sender, feeAssetPriceModifier = 0n) {
|
|
85
86
|
const checkpointHeader = createCheckpointHeaderFromBlock(block);
|
|
86
|
-
const payload = new ConsensusPayload(checkpointHeader, block.archive.root);
|
|
87
|
+
const payload = new ConsensusPayload(checkpointHeader, block.archive.root, feeAssetPriceModifier, TEST_COORDINATION_SIGNATURE_CONTEXT);
|
|
87
88
|
const attestation = new CheckpointAttestation(payload, signature, signature);
|
|
88
|
-
//
|
|
89
|
-
attestation.
|
|
89
|
+
// Bypass signature recovery for testing since we use random signatures
|
|
90
|
+
attestation.getSender = ()=>sender;
|
|
91
|
+
attestation.getProposer = ()=>sender;
|
|
90
92
|
return attestation;
|
|
91
93
|
}
|
|
92
94
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/sequencer-client",
|
|
3
|
-
"version": "0.0.1-commit.
|
|
3
|
+
"version": "0.0.1-commit.031e54b",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./dest/index.js",
|
|
@@ -26,38 +26,37 @@
|
|
|
26
26
|
"test:integration:run": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --no-cache --config jest.integration.config.json"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@aztec/aztec.js": "0.0.1-commit.
|
|
30
|
-
"@aztec/bb-prover": "0.0.1-commit.
|
|
31
|
-
"@aztec/blob-client": "0.0.1-commit.
|
|
32
|
-
"@aztec/blob-lib": "0.0.1-commit.
|
|
33
|
-
"@aztec/constants": "0.0.1-commit.
|
|
34
|
-
"@aztec/epoch-cache": "0.0.1-commit.
|
|
35
|
-
"@aztec/ethereum": "0.0.1-commit.
|
|
36
|
-
"@aztec/foundation": "0.0.1-commit.
|
|
37
|
-
"@aztec/l1-artifacts": "0.0.1-commit.
|
|
38
|
-
"@aztec/
|
|
39
|
-
"@aztec/
|
|
40
|
-
"@aztec/noir-
|
|
41
|
-
"@aztec/noir-
|
|
42
|
-
"@aztec/noir-
|
|
43
|
-
"@aztec/
|
|
44
|
-
"@aztec/
|
|
45
|
-
"@aztec/
|
|
46
|
-
"@aztec/
|
|
47
|
-
"@aztec/
|
|
48
|
-
"@aztec/
|
|
49
|
-
"@aztec/
|
|
50
|
-
"@aztec/
|
|
51
|
-
"@aztec/validator-
|
|
52
|
-
"@aztec/
|
|
53
|
-
"@aztec/world-state": "0.0.1-commit.023c3e5",
|
|
29
|
+
"@aztec/aztec.js": "0.0.1-commit.031e54b",
|
|
30
|
+
"@aztec/bb-prover": "0.0.1-commit.031e54b",
|
|
31
|
+
"@aztec/blob-client": "0.0.1-commit.031e54b",
|
|
32
|
+
"@aztec/blob-lib": "0.0.1-commit.031e54b",
|
|
33
|
+
"@aztec/constants": "0.0.1-commit.031e54b",
|
|
34
|
+
"@aztec/epoch-cache": "0.0.1-commit.031e54b",
|
|
35
|
+
"@aztec/ethereum": "0.0.1-commit.031e54b",
|
|
36
|
+
"@aztec/foundation": "0.0.1-commit.031e54b",
|
|
37
|
+
"@aztec/l1-artifacts": "0.0.1-commit.031e54b",
|
|
38
|
+
"@aztec/node-keystore": "0.0.1-commit.031e54b",
|
|
39
|
+
"@aztec/noir-acvm_js": "0.0.1-commit.031e54b",
|
|
40
|
+
"@aztec/noir-contracts.js": "0.0.1-commit.031e54b",
|
|
41
|
+
"@aztec/noir-protocol-circuits-types": "0.0.1-commit.031e54b",
|
|
42
|
+
"@aztec/noir-types": "0.0.1-commit.031e54b",
|
|
43
|
+
"@aztec/p2p": "0.0.1-commit.031e54b",
|
|
44
|
+
"@aztec/protocol-contracts": "0.0.1-commit.031e54b",
|
|
45
|
+
"@aztec/prover-client": "0.0.1-commit.031e54b",
|
|
46
|
+
"@aztec/simulator": "0.0.1-commit.031e54b",
|
|
47
|
+
"@aztec/slasher": "0.0.1-commit.031e54b",
|
|
48
|
+
"@aztec/stdlib": "0.0.1-commit.031e54b",
|
|
49
|
+
"@aztec/telemetry-client": "0.0.1-commit.031e54b",
|
|
50
|
+
"@aztec/validator-client": "0.0.1-commit.031e54b",
|
|
51
|
+
"@aztec/validator-ha-signer": "0.0.1-commit.031e54b",
|
|
52
|
+
"@aztec/world-state": "0.0.1-commit.031e54b",
|
|
54
53
|
"lodash.chunk": "^4.2.0",
|
|
55
54
|
"tslib": "^2.4.0",
|
|
56
55
|
"viem": "npm:@aztec/viem@2.38.2"
|
|
57
56
|
},
|
|
58
57
|
"devDependencies": {
|
|
59
|
-
"@aztec/archiver": "0.0.1-commit.
|
|
60
|
-
"@aztec/kv-store": "0.0.1-commit.
|
|
58
|
+
"@aztec/archiver": "0.0.1-commit.031e54b",
|
|
59
|
+
"@aztec/kv-store": "0.0.1-commit.031e54b",
|
|
61
60
|
"@electric-sql/pglite": "^0.3.14",
|
|
62
61
|
"@jest/globals": "^30.0.0",
|
|
63
62
|
"@types/jest": "^30.0.0",
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { BlobClientInterface } from '@aztec/blob-client/client';
|
|
2
|
+
import { MAX_PROCESSABLE_DA_GAS_PER_CHECKPOINT } from '@aztec/constants';
|
|
2
3
|
import { EpochCache } from '@aztec/epoch-cache';
|
|
3
4
|
import { isAnvilTestChain } from '@aztec/ethereum/chain';
|
|
4
5
|
import { getPublicClient } from '@aztec/ethereum/client';
|
|
5
6
|
import { GovernanceProposerContract, RollupContract } from '@aztec/ethereum/contracts';
|
|
6
|
-
import {
|
|
7
|
+
import { type Delayer, L1TxUtils } from '@aztec/ethereum/l1-tx-utils';
|
|
7
8
|
import { PublisherManager } from '@aztec/ethereum/publisher-manager';
|
|
8
9
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
9
10
|
import { createLogger } from '@aztec/foundation/log';
|
|
@@ -11,15 +12,14 @@ import type { DateProvider } from '@aztec/foundation/timer';
|
|
|
11
12
|
import type { KeystoreManager } from '@aztec/node-keystore';
|
|
12
13
|
import type { P2P } from '@aztec/p2p';
|
|
13
14
|
import type { SlasherClientInterface } from '@aztec/slasher';
|
|
14
|
-
import type { L2BlockSink, L2BlockSource } from '@aztec/stdlib/block';
|
|
15
|
+
import type { L2BlockSink, L2BlockSource, ProposedCheckpointSink } from '@aztec/stdlib/block';
|
|
15
16
|
import type { ValidatorClientFullConfig, WorldStateSynchronizer } from '@aztec/stdlib/interfaces/server';
|
|
16
|
-
import { SlashFactoryContract } from '@aztec/stdlib/l1-contracts';
|
|
17
17
|
import type { L1ToL2MessageSource } from '@aztec/stdlib/messaging';
|
|
18
18
|
import { L1Metrics, type TelemetryClient } from '@aztec/telemetry-client';
|
|
19
19
|
import { FullNodeCheckpointsBuilder, NodeKeystoreAdapter, type ValidatorClient } from '@aztec/validator-client';
|
|
20
20
|
|
|
21
|
-
import type
|
|
22
|
-
import { GlobalVariableBuilder } from '../global_variable_builder/index.js';
|
|
21
|
+
import { type SequencerClientConfig, getPublisherConfigFromSequencerConfig } from '../config.js';
|
|
22
|
+
import type { GlobalVariableBuilder } from '../global_variable_builder/index.js';
|
|
23
23
|
import { SequencerPublisherFactory } from '../publisher/sequencer-publisher-factory.js';
|
|
24
24
|
import { Sequencer, type SequencerConfig } from '../sequencer/index.js';
|
|
25
25
|
|
|
@@ -28,11 +28,12 @@ import { Sequencer, type SequencerConfig } from '../sequencer/index.js';
|
|
|
28
28
|
*/
|
|
29
29
|
export class SequencerClient {
|
|
30
30
|
constructor(
|
|
31
|
-
protected publisherManager: PublisherManager<
|
|
31
|
+
protected publisherManager: PublisherManager<L1TxUtils>,
|
|
32
32
|
protected sequencer: Sequencer,
|
|
33
33
|
protected checkpointsBuilder: FullNodeCheckpointsBuilder,
|
|
34
34
|
protected validatorClient?: ValidatorClient,
|
|
35
35
|
private l1Metrics?: L1Metrics,
|
|
36
|
+
private delayer_?: Delayer,
|
|
36
37
|
) {}
|
|
37
38
|
|
|
38
39
|
/**
|
|
@@ -55,15 +56,17 @@ export class SequencerClient {
|
|
|
55
56
|
worldStateSynchronizer: WorldStateSynchronizer;
|
|
56
57
|
slasherClient: SlasherClientInterface | undefined;
|
|
57
58
|
checkpointsBuilder: FullNodeCheckpointsBuilder;
|
|
58
|
-
l2BlockSource: L2BlockSource & L2BlockSink;
|
|
59
|
+
l2BlockSource: L2BlockSource & L2BlockSink & ProposedCheckpointSink;
|
|
59
60
|
l1ToL2MessageSource: L1ToL2MessageSource;
|
|
60
61
|
telemetry: TelemetryClient;
|
|
61
62
|
publisherFactory?: SequencerPublisherFactory;
|
|
62
63
|
blobClient: BlobClientInterface;
|
|
63
64
|
dateProvider: DateProvider;
|
|
64
65
|
epochCache?: EpochCache;
|
|
65
|
-
l1TxUtils:
|
|
66
|
+
l1TxUtils: L1TxUtils[];
|
|
67
|
+
funderL1TxUtils?: L1TxUtils;
|
|
66
68
|
nodeKeyStore: KeystoreManager;
|
|
69
|
+
globalVariableBuilder: GlobalVariableBuilder;
|
|
67
70
|
},
|
|
68
71
|
) {
|
|
69
72
|
const {
|
|
@@ -85,23 +88,25 @@ export class SequencerClient {
|
|
|
85
88
|
publicClient,
|
|
86
89
|
l1TxUtils.map(x => x.getSenderAddress()),
|
|
87
90
|
);
|
|
88
|
-
const publisherManager = new PublisherManager(l1TxUtils, config,
|
|
89
|
-
|
|
90
|
-
|
|
91
|
+
const publisherManager = new PublisherManager(l1TxUtils, getPublisherConfigFromSequencerConfig(config), {
|
|
92
|
+
bindings: log.getBindings(),
|
|
93
|
+
funder: deps.funderL1TxUtils,
|
|
94
|
+
});
|
|
95
|
+
const rollupContract = new RollupContract(publicClient, config.rollupAddress.toString());
|
|
96
|
+
const [l1GenesisTime, slotDuration, rollupManaLimit] = await Promise.all([
|
|
91
97
|
rollupContract.getL1GenesisTime(),
|
|
92
98
|
rollupContract.getSlotDuration(),
|
|
93
|
-
rollupContract.getVersion(),
|
|
94
99
|
rollupContract.getManaLimit().then(Number),
|
|
95
100
|
] as const);
|
|
96
101
|
|
|
97
102
|
const governanceProposerContract = new GovernanceProposerContract(
|
|
98
103
|
publicClient,
|
|
99
|
-
config.
|
|
104
|
+
config.governanceProposerAddress.toString(),
|
|
100
105
|
);
|
|
101
106
|
const epochCache =
|
|
102
107
|
deps.epochCache ??
|
|
103
108
|
(await EpochCache.create(
|
|
104
|
-
config.
|
|
109
|
+
config.rollupAddress,
|
|
105
110
|
{
|
|
106
111
|
l1RpcUrls: rpcUrls,
|
|
107
112
|
l1ChainId: chainId,
|
|
@@ -111,11 +116,6 @@ export class SequencerClient {
|
|
|
111
116
|
{ dateProvider: deps.dateProvider },
|
|
112
117
|
));
|
|
113
118
|
|
|
114
|
-
const slashFactoryContract = new SlashFactoryContract(
|
|
115
|
-
publicClient,
|
|
116
|
-
config.l1Contracts.slashFactoryAddress?.toString() ?? EthAddress.ZERO.toString(),
|
|
117
|
-
);
|
|
118
|
-
|
|
119
119
|
const publisherFactory =
|
|
120
120
|
deps.publisherFactory ??
|
|
121
121
|
new SequencerPublisherFactory(config, {
|
|
@@ -123,7 +123,6 @@ export class SequencerClient {
|
|
|
123
123
|
blobClient: deps.blobClient,
|
|
124
124
|
epochCache,
|
|
125
125
|
governanceProposerContract,
|
|
126
|
-
slashFactoryContract,
|
|
127
126
|
rollupContract,
|
|
128
127
|
dateProvider: deps.dateProvider,
|
|
129
128
|
publisherManager,
|
|
@@ -132,17 +131,8 @@ export class SequencerClient {
|
|
|
132
131
|
});
|
|
133
132
|
|
|
134
133
|
const ethereumSlotDuration = config.ethereumSlotDuration;
|
|
135
|
-
const l1Constants = { l1GenesisTime, slotDuration: Number(slotDuration), ethereumSlotDuration };
|
|
136
|
-
|
|
137
|
-
const globalsBuilder = new GlobalVariableBuilder({ ...config, ...l1Constants, rollupVersion });
|
|
138
134
|
|
|
139
|
-
|
|
140
|
-
if (sequencerManaLimit > rollupManaLimit) {
|
|
141
|
-
log.warn(
|
|
142
|
-
`Provided maxL2BlockGas ${sequencerManaLimit} is greater than the max allowed by L1. Setting limit to ${rollupManaLimit}.`,
|
|
143
|
-
);
|
|
144
|
-
sequencerManaLimit = rollupManaLimit;
|
|
145
|
-
}
|
|
135
|
+
const globalsBuilder = deps.globalVariableBuilder;
|
|
146
136
|
|
|
147
137
|
// When running in anvil, assume we can post a tx up until one second before the end of an L1 slot.
|
|
148
138
|
// Otherwise, we need the full L1 slot duration for publishing to ensure inclusion.
|
|
@@ -152,6 +142,16 @@ export class SequencerClient {
|
|
|
152
142
|
const l1PublishingTimeBasedOnChain = isAnvilTestChain(config.l1ChainId) ? 1 : ethereumSlotDuration;
|
|
153
143
|
const l1PublishingTime = config.l1PublishingTime ?? l1PublishingTimeBasedOnChain;
|
|
154
144
|
|
|
145
|
+
const { maxL2BlockGas, maxDABlockGas, maxTxsPerBlock } = capPerBlockLimits(config, rollupManaLimit, log);
|
|
146
|
+
|
|
147
|
+
const l1Constants = {
|
|
148
|
+
l1GenesisTime,
|
|
149
|
+
slotDuration: Number(slotDuration),
|
|
150
|
+
ethereumSlotDuration,
|
|
151
|
+
rollupManaLimit,
|
|
152
|
+
epochDuration: config.aztecEpochDuration,
|
|
153
|
+
};
|
|
154
|
+
|
|
155
155
|
const sequencer = new Sequencer(
|
|
156
156
|
publisherFactory,
|
|
157
157
|
validatorClient,
|
|
@@ -166,14 +166,17 @@ export class SequencerClient {
|
|
|
166
166
|
deps.dateProvider,
|
|
167
167
|
epochCache,
|
|
168
168
|
rollupContract,
|
|
169
|
-
{ ...config, l1PublishingTime, maxL2BlockGas
|
|
169
|
+
{ ...config, l1PublishingTime, maxL2BlockGas, maxDABlockGas, maxTxsPerBlock },
|
|
170
170
|
telemetryClient,
|
|
171
171
|
log,
|
|
172
172
|
);
|
|
173
173
|
|
|
174
|
-
|
|
174
|
+
sequencer.init();
|
|
175
|
+
|
|
176
|
+
// Extract the shared delayer from the first L1TxUtils instance (all instances share the same delayer)
|
|
177
|
+
const delayer = l1TxUtils[0]?.delayer;
|
|
175
178
|
|
|
176
|
-
return new SequencerClient(publisherManager, sequencer, checkpointsBuilder, validatorClient, l1Metrics);
|
|
179
|
+
return new SequencerClient(publisherManager, sequencer, checkpointsBuilder, validatorClient, l1Metrics, delayer);
|
|
177
180
|
}
|
|
178
181
|
|
|
179
182
|
/**
|
|
@@ -191,7 +194,7 @@ export class SequencerClient {
|
|
|
191
194
|
await this.validatorClient?.start();
|
|
192
195
|
this.sequencer.start();
|
|
193
196
|
this.l1Metrics?.start();
|
|
194
|
-
await this.publisherManager.
|
|
197
|
+
await this.publisherManager.start();
|
|
195
198
|
}
|
|
196
199
|
|
|
197
200
|
/**
|
|
@@ -200,14 +203,29 @@ export class SequencerClient {
|
|
|
200
203
|
public async stop() {
|
|
201
204
|
await this.sequencer.stop();
|
|
202
205
|
await this.validatorClient?.stop();
|
|
203
|
-
this.publisherManager.
|
|
206
|
+
await this.publisherManager.stop();
|
|
204
207
|
this.l1Metrics?.stop();
|
|
205
208
|
}
|
|
206
209
|
|
|
210
|
+
/** Triggers an immediate run of the sequencer, bypassing the polling interval. */
|
|
211
|
+
public trigger() {
|
|
212
|
+
return this.sequencer.trigger();
|
|
213
|
+
}
|
|
214
|
+
|
|
207
215
|
public getSequencer(): Sequencer {
|
|
208
216
|
return this.sequencer;
|
|
209
217
|
}
|
|
210
218
|
|
|
219
|
+
/** Updates the publisher factory's node keystore adapter after a keystore reload. */
|
|
220
|
+
public updatePublisherNodeKeyStore(adapter: NodeKeystoreAdapter): void {
|
|
221
|
+
this.sequencer.updatePublisherNodeKeyStore(adapter);
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
/** Returns the shared tx delayer for sequencer L1 txs, if enabled. Test-only. */
|
|
225
|
+
getDelayer(): Delayer | undefined {
|
|
226
|
+
return this.delayer_;
|
|
227
|
+
}
|
|
228
|
+
|
|
211
229
|
get validatorAddresses(): EthAddress[] | undefined {
|
|
212
230
|
return this.sequencer.getValidatorAddresses();
|
|
213
231
|
}
|
|
@@ -216,3 +234,41 @@ export class SequencerClient {
|
|
|
216
234
|
return this.sequencer.maxL2BlockGas;
|
|
217
235
|
}
|
|
218
236
|
}
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* Caps operator-provided per-block limits at checkpoint-level limits.
|
|
240
|
+
* Returns undefined for any limit the operator didn't set — the checkpoint builder handles redistribution.
|
|
241
|
+
*/
|
|
242
|
+
function capPerBlockLimits(
|
|
243
|
+
config: SequencerClientConfig,
|
|
244
|
+
rollupManaLimit: number,
|
|
245
|
+
log: ReturnType<typeof createLogger>,
|
|
246
|
+
): { maxL2BlockGas: number | undefined; maxDABlockGas: number | undefined; maxTxsPerBlock: number | undefined } {
|
|
247
|
+
let maxL2BlockGas = config.maxL2BlockGas;
|
|
248
|
+
if (maxL2BlockGas !== undefined && maxL2BlockGas > rollupManaLimit) {
|
|
249
|
+
log.warn(`Provided MAX_L2_BLOCK_GAS ${maxL2BlockGas} exceeds rollup mana limit ${rollupManaLimit} (capping)`);
|
|
250
|
+
maxL2BlockGas = rollupManaLimit;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
let maxDABlockGas = config.maxDABlockGas;
|
|
254
|
+
if (maxDABlockGas !== undefined && maxDABlockGas > MAX_PROCESSABLE_DA_GAS_PER_CHECKPOINT) {
|
|
255
|
+
log.warn(
|
|
256
|
+
`Provided MAX_DA_BLOCK_GAS ${maxDABlockGas} exceeds DA checkpoint limit ${MAX_PROCESSABLE_DA_GAS_PER_CHECKPOINT} (capping)`,
|
|
257
|
+
);
|
|
258
|
+
maxDABlockGas = MAX_PROCESSABLE_DA_GAS_PER_CHECKPOINT;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
let maxTxsPerBlock = config.maxTxsPerBlock;
|
|
262
|
+
if (
|
|
263
|
+
maxTxsPerBlock !== undefined &&
|
|
264
|
+
config.maxTxsPerCheckpoint !== undefined &&
|
|
265
|
+
maxTxsPerBlock > config.maxTxsPerCheckpoint
|
|
266
|
+
) {
|
|
267
|
+
log.warn(
|
|
268
|
+
`Provided MAX_TX_PER_BLOCK ${maxTxsPerBlock} exceeds MAX_TX_PER_CHECKPOINT ${config.maxTxsPerCheckpoint} (capping)`,
|
|
269
|
+
);
|
|
270
|
+
maxTxsPerBlock = config.maxTxsPerCheckpoint;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
return { maxL2BlockGas, maxDABlockGas, maxTxsPerBlock };
|
|
274
|
+
}
|
package/src/config.ts
CHANGED
|
@@ -5,65 +5,75 @@ import {
|
|
|
5
5
|
booleanConfigHelper,
|
|
6
6
|
getConfigFromMappings,
|
|
7
7
|
numberConfigHelper,
|
|
8
|
+
optionalNumberConfigHelper,
|
|
8
9
|
pickConfigMappings,
|
|
9
10
|
} from '@aztec/foundation/config';
|
|
10
11
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
11
12
|
import { type KeyStoreConfig, keyStoreConfigMappings } from '@aztec/node-keystore/config';
|
|
12
13
|
import { type P2PConfig, p2pConfigMappings } from '@aztec/p2p/config';
|
|
13
14
|
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
14
|
-
import {
|
|
15
|
+
import {
|
|
16
|
+
type ChainConfig,
|
|
17
|
+
DEFAULT_MAX_BLOCKS_PER_CHECKPOINT,
|
|
18
|
+
type SequencerConfig,
|
|
19
|
+
chainConfigMappings,
|
|
20
|
+
sharedSequencerConfigMappings,
|
|
21
|
+
} from '@aztec/stdlib/config';
|
|
15
22
|
import type { ResolvedSequencerConfig } from '@aztec/stdlib/interfaces/server';
|
|
23
|
+
import { DEFAULT_P2P_PROPAGATION_TIME } from '@aztec/stdlib/timetable';
|
|
16
24
|
import { type ValidatorClientConfig, validatorClientConfigMappings } from '@aztec/validator-client/config';
|
|
17
25
|
|
|
18
26
|
import {
|
|
19
|
-
type
|
|
20
|
-
type
|
|
21
|
-
|
|
22
|
-
|
|
27
|
+
type SequencerPublisherConfig,
|
|
28
|
+
type SequencerTxSenderConfig,
|
|
29
|
+
sequencerPublisherConfigMappings,
|
|
30
|
+
sequencerTxSenderConfigMappings,
|
|
23
31
|
} from './publisher/config.js';
|
|
24
32
|
|
|
25
33
|
export * from './publisher/config.js';
|
|
26
34
|
export type { SequencerConfig };
|
|
27
35
|
|
|
28
|
-
export const DEFAULT_ATTESTATION_PROPAGATION_TIME = 2;
|
|
29
|
-
|
|
30
36
|
/**
|
|
31
37
|
* Default values for SequencerConfig.
|
|
32
38
|
* Centralized location for all sequencer configuration defaults.
|
|
33
39
|
*/
|
|
34
|
-
export const DefaultSequencerConfig
|
|
40
|
+
export const DefaultSequencerConfig = {
|
|
35
41
|
sequencerPollingIntervalMS: 500,
|
|
36
|
-
maxTxsPerBlock: 32,
|
|
37
42
|
minTxsPerBlock: 1,
|
|
38
43
|
buildCheckpointIfEmpty: false,
|
|
39
44
|
publishTxsWithProposals: false,
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
maxBlockSizeInBytes: 1024 * 1024,
|
|
45
|
+
perBlockAllocationMultiplier: 1.2,
|
|
46
|
+
redistributeCheckpointBudget: true,
|
|
43
47
|
enforceTimeTable: true,
|
|
44
|
-
attestationPropagationTime:
|
|
48
|
+
attestationPropagationTime: DEFAULT_P2P_PROPAGATION_TIME,
|
|
45
49
|
secondsBeforeInvalidatingBlockAsCommitteeMember: 144, // 12 L1 blocks
|
|
46
50
|
secondsBeforeInvalidatingBlockAsNonCommitteeMember: 432, // 36 L1 blocks
|
|
47
51
|
skipCollectingAttestations: false,
|
|
48
52
|
skipInvalidateBlockAsProposer: false,
|
|
53
|
+
skipWaitForValidParentCheckpointOnL1: false,
|
|
49
54
|
broadcastInvalidBlockProposal: false,
|
|
55
|
+
broadcastInvalidCheckpointProposalOnly: false,
|
|
50
56
|
injectFakeAttestation: false,
|
|
57
|
+
injectHighSValueAttestation: false,
|
|
58
|
+
injectUnrecoverableSignatureAttestation: false,
|
|
51
59
|
fishermanMode: false,
|
|
52
60
|
shuffleAttestationOrdering: false,
|
|
53
61
|
skipPushProposedBlocksToArchiver: false,
|
|
54
|
-
|
|
62
|
+
skipPublishingCheckpointsPercent: 0,
|
|
63
|
+
maxBlocksPerCheckpoint: DEFAULT_MAX_BLOCKS_PER_CHECKPOINT,
|
|
64
|
+
} satisfies ResolvedSequencerConfig;
|
|
55
65
|
|
|
56
66
|
/**
|
|
57
67
|
* Configuration settings for the SequencerClient.
|
|
58
68
|
*/
|
|
59
|
-
export type SequencerClientConfig =
|
|
69
|
+
export type SequencerClientConfig = SequencerPublisherConfig &
|
|
60
70
|
KeyStoreConfig &
|
|
61
71
|
ValidatorClientConfig &
|
|
62
|
-
|
|
72
|
+
SequencerTxSenderConfig &
|
|
63
73
|
SequencerConfig &
|
|
64
74
|
L1ReaderConfig &
|
|
65
75
|
ChainConfig &
|
|
66
|
-
Pick<P2PConfig, '
|
|
76
|
+
Pick<P2PConfig, 'txPublicSetupAllowListExtend'> &
|
|
67
77
|
Pick<L1ContractsConfig, 'ethereumSlotDuration' | 'aztecSlotDuration' | 'aztecEpochDuration'>;
|
|
68
78
|
|
|
69
79
|
export const sequencerConfigMappings: ConfigMappingsType<SequencerConfig> = {
|
|
@@ -72,10 +82,10 @@ export const sequencerConfigMappings: ConfigMappingsType<SequencerConfig> = {
|
|
|
72
82
|
description: 'The number of ms to wait between polling for checking to build on the next slot.',
|
|
73
83
|
...numberConfigHelper(DefaultSequencerConfig.sequencerPollingIntervalMS),
|
|
74
84
|
},
|
|
75
|
-
|
|
76
|
-
env: '
|
|
77
|
-
description: 'The maximum number of txs
|
|
78
|
-
...
|
|
85
|
+
maxTxsPerCheckpoint: {
|
|
86
|
+
env: 'SEQ_MAX_TX_PER_CHECKPOINT',
|
|
87
|
+
description: 'The maximum number of txs across all blocks in a checkpoint.',
|
|
88
|
+
...optionalNumberConfigHelper(),
|
|
79
89
|
},
|
|
80
90
|
minTxsPerBlock: {
|
|
81
91
|
env: 'SEQ_MIN_TX_PER_BLOCK',
|
|
@@ -94,16 +104,29 @@ export const sequencerConfigMappings: ConfigMappingsType<SequencerConfig> = {
|
|
|
94
104
|
maxL2BlockGas: {
|
|
95
105
|
env: 'SEQ_MAX_L2_BLOCK_GAS',
|
|
96
106
|
description: 'The maximum L2 block gas.',
|
|
97
|
-
...
|
|
107
|
+
...optionalNumberConfigHelper(),
|
|
98
108
|
},
|
|
99
109
|
maxDABlockGas: {
|
|
100
110
|
env: 'SEQ_MAX_DA_BLOCK_GAS',
|
|
101
111
|
description: 'The maximum DA block gas.',
|
|
102
|
-
...
|
|
112
|
+
...optionalNumberConfigHelper(),
|
|
113
|
+
},
|
|
114
|
+
perBlockAllocationMultiplier: {
|
|
115
|
+
env: 'SEQ_PER_BLOCK_ALLOCATION_MULTIPLIER',
|
|
116
|
+
description:
|
|
117
|
+
'Per-block gas budget multiplier for both L2 and DA gas. Budget per block is (checkpointLimit / maxBlocks) * multiplier.' +
|
|
118
|
+
' Values greater than one allow early blocks to use more than their even share, relying on checkpoint-level capping for later blocks.',
|
|
119
|
+
...numberConfigHelper(DefaultSequencerConfig.perBlockAllocationMultiplier),
|
|
120
|
+
},
|
|
121
|
+
redistributeCheckpointBudget: {
|
|
122
|
+
env: 'SEQ_REDISTRIBUTE_CHECKPOINT_BUDGET',
|
|
123
|
+
description:
|
|
124
|
+
'Redistribute remaining checkpoint budget evenly across remaining blocks instead of allowing a single block to consume the entire remaining budget.',
|
|
125
|
+
...booleanConfigHelper(DefaultSequencerConfig.redistributeCheckpointBudget),
|
|
103
126
|
},
|
|
104
127
|
coinbase: {
|
|
105
128
|
env: 'COINBASE',
|
|
106
|
-
parseEnv: (val: string) =>
|
|
129
|
+
parseEnv: (val: string) => EthAddress.fromString(val),
|
|
107
130
|
description: 'Recipient of block reward.',
|
|
108
131
|
},
|
|
109
132
|
feeRecipient: {
|
|
@@ -119,11 +142,6 @@ export const sequencerConfigMappings: ConfigMappingsType<SequencerConfig> = {
|
|
|
119
142
|
env: 'ACVM_BINARY_PATH',
|
|
120
143
|
description: 'The path to the ACVM binary',
|
|
121
144
|
},
|
|
122
|
-
maxBlockSizeInBytes: {
|
|
123
|
-
env: 'SEQ_MAX_BLOCK_SIZE_IN_BYTES',
|
|
124
|
-
description: 'Max block size',
|
|
125
|
-
...numberConfigHelper(DefaultSequencerConfig.maxBlockSizeInBytes),
|
|
126
|
-
},
|
|
127
145
|
enforceTimeTable: {
|
|
128
146
|
env: 'SEQ_ENFORCE_TIME_TABLE',
|
|
129
147
|
description: 'Whether to enforce the time table when building blocks',
|
|
@@ -137,12 +155,7 @@ export const sequencerConfigMappings: ConfigMappingsType<SequencerConfig> = {
|
|
|
137
155
|
l1PublishingTime: {
|
|
138
156
|
env: 'SEQ_L1_PUBLISHING_TIME_ALLOWANCE_IN_SLOT',
|
|
139
157
|
description: 'How much time (in seconds) we allow in the slot for publishing the L1 tx (defaults to 1 L1 slot).',
|
|
140
|
-
|
|
141
|
-
},
|
|
142
|
-
attestationPropagationTime: {
|
|
143
|
-
env: 'SEQ_ATTESTATION_PROPAGATION_TIME',
|
|
144
|
-
description: 'How many seconds it takes for proposals and attestations to travel across the p2p layer (one-way)',
|
|
145
|
-
...numberConfigHelper(DefaultSequencerConfig.attestationPropagationTime),
|
|
158
|
+
...optionalNumberConfigHelper(),
|
|
146
159
|
},
|
|
147
160
|
fakeProcessingDelayPerTxMs: {
|
|
148
161
|
description: 'Used for testing to introduce a fake delay after processing each tx',
|
|
@@ -173,14 +186,37 @@ export const sequencerConfigMappings: ConfigMappingsType<SequencerConfig> = {
|
|
|
173
186
|
description: 'Do not invalidate the previous block if invalid when we are the proposer (for testing only)',
|
|
174
187
|
...booleanConfigHelper(DefaultSequencerConfig.skipInvalidateBlockAsProposer),
|
|
175
188
|
},
|
|
189
|
+
skipWaitForValidParentCheckpointOnL1: {
|
|
190
|
+
description:
|
|
191
|
+
'Bypass the parent checkpoint validity check before submitting a pipelined checkpoint, ' +
|
|
192
|
+
'allowing the proposer to publish even when the parent landed on L1 with invalid attestations (for testing only)',
|
|
193
|
+
...booleanConfigHelper(DefaultSequencerConfig.skipWaitForValidParentCheckpointOnL1),
|
|
194
|
+
},
|
|
176
195
|
broadcastInvalidBlockProposal: {
|
|
177
196
|
description: 'Broadcast invalid block proposals with corrupted state (for testing only)',
|
|
178
197
|
...booleanConfigHelper(DefaultSequencerConfig.broadcastInvalidBlockProposal),
|
|
179
198
|
},
|
|
199
|
+
invalidBlockProposalIndexWithinCheckpoint: {
|
|
200
|
+
description: 'Broadcast an invalid block proposal only at this indexWithinCheckpoint (for testing only)',
|
|
201
|
+
...optionalNumberConfigHelper(),
|
|
202
|
+
},
|
|
203
|
+
broadcastInvalidCheckpointProposalOnly: {
|
|
204
|
+
description:
|
|
205
|
+
'Broadcast invalid checkpoint proposals while keeping the underlying block proposals valid (for testing only). When unset, the checkpoint follows broadcastInvalidBlockProposal.',
|
|
206
|
+
...booleanConfigHelper(DefaultSequencerConfig.broadcastInvalidCheckpointProposalOnly),
|
|
207
|
+
},
|
|
180
208
|
injectFakeAttestation: {
|
|
181
209
|
description: 'Inject a fake attestation (for testing only)',
|
|
182
210
|
...booleanConfigHelper(DefaultSequencerConfig.injectFakeAttestation),
|
|
183
211
|
},
|
|
212
|
+
injectHighSValueAttestation: {
|
|
213
|
+
description: 'Inject a malleable attestation with a high-s value (for testing only)',
|
|
214
|
+
...booleanConfigHelper(DefaultSequencerConfig.injectHighSValueAttestation),
|
|
215
|
+
},
|
|
216
|
+
injectUnrecoverableSignatureAttestation: {
|
|
217
|
+
description: 'Inject an attestation with an unrecoverable signature (for testing only)',
|
|
218
|
+
...booleanConfigHelper(DefaultSequencerConfig.injectUnrecoverableSignatureAttestation),
|
|
219
|
+
},
|
|
184
220
|
fishermanMode: {
|
|
185
221
|
env: 'FISHERMAN_MODE',
|
|
186
222
|
description:
|
|
@@ -191,13 +227,7 @@ export const sequencerConfigMappings: ConfigMappingsType<SequencerConfig> = {
|
|
|
191
227
|
description: 'Shuffle attestation ordering to create invalid ordering (for testing only)',
|
|
192
228
|
...booleanConfigHelper(DefaultSequencerConfig.shuffleAttestationOrdering),
|
|
193
229
|
},
|
|
194
|
-
|
|
195
|
-
env: 'SEQ_BLOCK_DURATION_MS',
|
|
196
|
-
description:
|
|
197
|
-
'Duration per block in milliseconds when building multiple blocks per slot. ' +
|
|
198
|
-
'If undefined (default), builds a single block per slot using the full slot duration.',
|
|
199
|
-
parseEnv: (val: string) => (val ? parseInt(val, 10) : undefined),
|
|
200
|
-
},
|
|
230
|
+
...sharedSequencerConfigMappings,
|
|
201
231
|
buildCheckpointIfEmpty: {
|
|
202
232
|
env: 'SEQ_BUILD_CHECKPOINT_IF_EMPTY',
|
|
203
233
|
description: 'Have sequencer build and publish an empty checkpoint if there are no txs',
|
|
@@ -207,17 +237,39 @@ export const sequencerConfigMappings: ConfigMappingsType<SequencerConfig> = {
|
|
|
207
237
|
description: 'Skip pushing proposed blocks to archiver (default: true)',
|
|
208
238
|
...booleanConfigHelper(DefaultSequencerConfig.skipPushProposedBlocksToArchiver),
|
|
209
239
|
},
|
|
210
|
-
|
|
240
|
+
minBlocksForCheckpoint: {
|
|
241
|
+
description: 'Minimum number of blocks required for a checkpoint proposal (test only)',
|
|
242
|
+
},
|
|
243
|
+
skipPublishingCheckpointsPercent: {
|
|
244
|
+
env: 'SEQ_SKIP_CHECKPOINT_PUBLISH_PERCENT',
|
|
245
|
+
description: 'Percent probability (0 - 100) of sequencer skipping checkpoint publishing (testing only)',
|
|
246
|
+
...numberConfigHelper(DefaultSequencerConfig.skipPublishingCheckpointsPercent),
|
|
247
|
+
},
|
|
248
|
+
skipBroadcastProposals: {
|
|
249
|
+
description: 'Skip broadcasting checkpoint and block proposals via gossipsub when proposer (for testing only)',
|
|
250
|
+
...booleanConfigHelper(false),
|
|
251
|
+
},
|
|
252
|
+
skipBroadcastCheckpointProposal: {
|
|
253
|
+
description:
|
|
254
|
+
'Skip broadcasting only the CheckpointProposal via gossipsub when proposer; the held last block is broadcast ' +
|
|
255
|
+
'standalone instead so peers still receive it as a proposed-but-uncheckpointed tip (for testing only)',
|
|
256
|
+
...booleanConfigHelper(false),
|
|
257
|
+
},
|
|
258
|
+
pauseProposingForSlots: {
|
|
259
|
+
description:
|
|
260
|
+
'List of slots for which the sequencer will not produce a proposal (for testing only). Attestation paths are unaffected.',
|
|
261
|
+
},
|
|
262
|
+
...pickConfigMappings(p2pConfigMappings, ['txPublicSetupAllowListExtend']),
|
|
211
263
|
};
|
|
212
264
|
|
|
213
265
|
export const sequencerClientConfigMappings: ConfigMappingsType<SequencerClientConfig> = {
|
|
266
|
+
...chainConfigMappings,
|
|
214
267
|
...validatorClientConfigMappings,
|
|
215
268
|
...sequencerConfigMappings,
|
|
216
269
|
...keyStoreConfigMappings,
|
|
217
270
|
...l1ReaderConfigMappings,
|
|
218
|
-
...
|
|
219
|
-
...
|
|
220
|
-
...chainConfigMappings,
|
|
271
|
+
...sequencerTxSenderConfigMappings,
|
|
272
|
+
...sequencerPublisherConfigMappings,
|
|
221
273
|
...pickConfigMappings(l1ContractsConfigMappings, ['ethereumSlotDuration', 'aztecSlotDuration', 'aztecEpochDuration']),
|
|
222
274
|
};
|
|
223
275
|
|