@aztec/sequencer-client 0.0.1-commit.3469e52 → 0.0.1-commit.350e0a4d
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 +34 -11
- package/dest/client/sequencer-client.d.ts.map +1 -1
- package/dest/client/sequencer-client.js +77 -39
- package/dest/config.d.ts +32 -6
- package/dest/config.d.ts.map +1 -1
- package/dest/config.js +94 -48
- 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 +138 -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 +80 -0
- package/dest/global_variable_builder/global_builder.d.ts +13 -28
- package/dest/global_variable_builder/global_builder.d.ts.map +1 -1
- package/dest/global_variable_builder/global_builder.js +9 -66
- 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/publisher/config.d.ts +51 -17
- package/dest/publisher/config.d.ts.map +1 -1
- package/dest/publisher/config.js +131 -42
- package/dest/publisher/index.d.ts +2 -1
- package/dest/publisher/index.d.ts.map +1 -1
- package/dest/publisher/l1_to_l2_messaging.d.ts +21 -0
- package/dest/publisher/l1_to_l2_messaging.d.ts.map +1 -0
- package/dest/publisher/l1_to_l2_messaging.js +70 -0
- 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 +98 -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 +68 -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 +36 -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 +3 -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-metrics.d.ts +1 -1
- package/dest/publisher/sequencer-publisher-metrics.d.ts.map +1 -1
- package/dest/publisher/sequencer-publisher-metrics.js +12 -4
- package/dest/publisher/sequencer-publisher.d.ts +122 -68
- package/dest/publisher/sequencer-publisher.d.ts.map +1 -1
- package/dest/publisher/sequencer-publisher.js +750 -364
- package/dest/publisher/write_json.d.ts +11 -0
- package/dest/publisher/write_json.d.ts.map +1 -0
- package/dest/publisher/write_json.js +57 -0
- package/dest/sequencer/automine/automine_factory.d.ts +56 -0
- package/dest/sequencer/automine/automine_factory.d.ts.map +1 -0
- package/dest/sequencer/automine/automine_factory.js +85 -0
- package/dest/sequencer/automine/automine_sequencer.d.ts +189 -0
- package/dest/sequencer/automine/automine_sequencer.d.ts.map +1 -0
- package/dest/sequencer/automine/automine_sequencer.js +690 -0
- package/dest/sequencer/automine/index.d.ts +3 -0
- package/dest/sequencer/automine/index.d.ts.map +1 -0
- package/dest/sequencer/automine/index.js +2 -0
- package/dest/sequencer/checkpoint_proposal_job.d.ts +101 -22
- package/dest/sequencer/checkpoint_proposal_job.d.ts.map +1 -1
- package/dest/sequencer/checkpoint_proposal_job.js +922 -280
- 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 +62 -5
- package/dest/sequencer/events.d.ts.map +1 -1
- package/dest/sequencer/metrics.d.ts +23 -8
- package/dest/sequencer/metrics.d.ts.map +1 -1
- package/dest/sequencer/metrics.js +142 -36
- package/dest/sequencer/requests_tracker.d.ts +22 -0
- package/dest/sequencer/requests_tracker.d.ts.map +1 -0
- package/dest/sequencer/requests_tracker.js +33 -0
- package/dest/sequencer/sequencer.d.ts +181 -44
- package/dest/sequencer/sequencer.d.ts.map +1 -1
- package/dest/sequencer/sequencer.js +614 -216
- package/dest/sequencer/types.d.ts +2 -2
- package/dest/sequencer/types.d.ts.map +1 -1
- package/dest/test/index.d.ts +5 -7
- package/dest/test/index.d.ts.map +1 -1
- package/dest/test/mock_checkpoint_builder.d.ts +18 -15
- package/dest/test/mock_checkpoint_builder.d.ts.map +1 -1
- package/dest/test/mock_checkpoint_builder.js +63 -40
- package/dest/test/utils.d.ts +22 -8
- package/dest/test/utils.d.ts.map +1 -1
- package/dest/test/utils.js +33 -14
- package/package.json +30 -29
- package/src/client/sequencer-client.ts +110 -47
- package/src/config.ts +121 -58
- package/src/global_variable_builder/README.md +44 -0
- package/src/global_variable_builder/fee_predictor.ts +182 -0
- package/src/global_variable_builder/fee_provider.ts +97 -0
- package/src/global_variable_builder/global_builder.ts +20 -89
- package/src/global_variable_builder/index.ts +3 -1
- package/src/publisher/config.ts +173 -40
- package/src/publisher/index.ts +3 -0
- package/src/publisher/l1_to_l2_messaging.ts +85 -0
- package/src/publisher/l1_tx_failed_store/factory.ts +32 -0
- package/src/publisher/l1_tx_failed_store/failed_tx_store.ts +164 -0
- package/src/publisher/l1_tx_failed_store/file_store_failed_tx_store.ts +47 -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-metrics.ts +7 -3
- package/src/publisher/sequencer-publisher.ts +854 -461
- package/src/publisher/write_json.ts +78 -0
- package/src/sequencer/README.md +162 -450
- package/src/sequencer/automine/README.md +60 -0
- package/src/sequencer/automine/automine_factory.ts +152 -0
- package/src/sequencer/automine/automine_sequencer.ts +796 -0
- package/src/sequencer/automine/index.ts +6 -0
- package/src/sequencer/checkpoint_proposal_job.ts +1139 -328
- package/src/sequencer/checkpoint_proposal_job_metrics.ts +128 -0
- package/src/sequencer/checkpoint_voter.ts +1 -12
- package/src/sequencer/events.ts +66 -5
- package/src/sequencer/metrics.ts +164 -39
- package/src/sequencer/requests_tracker.ts +43 -0
- package/src/sequencer/sequencer.ts +729 -242
- package/src/sequencer/types.ts +1 -1
- package/src/test/index.ts +4 -6
- package/src/test/mock_checkpoint_builder.ts +93 -65
- package/src/test/utils.ts +81 -21
- package/dest/sequencer/timetable.d.ts +0 -90
- package/dest/sequencer/timetable.d.ts.map +0 -1
- package/dest/sequencer/timetable.js +0 -226
- package/src/sequencer/timetable.ts +0 -282
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/sequencer-client",
|
|
3
|
-
"version": "0.0.1-commit.
|
|
3
|
+
"version": "0.0.1-commit.350e0a4d",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./dest/index.js",
|
|
7
|
+
"./automine": "./dest/sequencer/automine/index.js",
|
|
7
8
|
"./config": "./dest/config.js",
|
|
8
9
|
"./test": "./dest/test/index.js"
|
|
9
10
|
},
|
|
@@ -26,38 +27,38 @@
|
|
|
26
27
|
"test:integration:run": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --no-cache --config jest.integration.config.json"
|
|
27
28
|
},
|
|
28
29
|
"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.3469e52",
|
|
30
|
+
"@aztec/aztec.js": "0.0.1-commit.350e0a4d",
|
|
31
|
+
"@aztec/bb-prover": "0.0.1-commit.350e0a4d",
|
|
32
|
+
"@aztec/blob-client": "0.0.1-commit.350e0a4d",
|
|
33
|
+
"@aztec/blob-lib": "0.0.1-commit.350e0a4d",
|
|
34
|
+
"@aztec/constants": "0.0.1-commit.350e0a4d",
|
|
35
|
+
"@aztec/epoch-cache": "0.0.1-commit.350e0a4d",
|
|
36
|
+
"@aztec/ethereum": "0.0.1-commit.350e0a4d",
|
|
37
|
+
"@aztec/foundation": "0.0.1-commit.350e0a4d",
|
|
38
|
+
"@aztec/l1-artifacts": "0.0.1-commit.350e0a4d",
|
|
39
|
+
"@aztec/node-keystore": "0.0.1-commit.350e0a4d",
|
|
40
|
+
"@aztec/noir-acvm_js": "0.0.1-commit.350e0a4d",
|
|
41
|
+
"@aztec/noir-contracts.js": "0.0.1-commit.350e0a4d",
|
|
42
|
+
"@aztec/noir-protocol-circuits-types": "0.0.1-commit.350e0a4d",
|
|
43
|
+
"@aztec/noir-types": "0.0.1-commit.350e0a4d",
|
|
44
|
+
"@aztec/p2p": "0.0.1-commit.350e0a4d",
|
|
45
|
+
"@aztec/protocol-contracts": "0.0.1-commit.350e0a4d",
|
|
46
|
+
"@aztec/prover-client": "0.0.1-commit.350e0a4d",
|
|
47
|
+
"@aztec/simulator": "0.0.1-commit.350e0a4d",
|
|
48
|
+
"@aztec/slasher": "0.0.1-commit.350e0a4d",
|
|
49
|
+
"@aztec/stdlib": "0.0.1-commit.350e0a4d",
|
|
50
|
+
"@aztec/telemetry-client": "0.0.1-commit.350e0a4d",
|
|
51
|
+
"@aztec/validator-client": "0.0.1-commit.350e0a4d",
|
|
52
|
+
"@aztec/validator-ha-signer": "0.0.1-commit.350e0a4d",
|
|
53
|
+
"@aztec/world-state": "0.0.1-commit.350e0a4d",
|
|
54
54
|
"lodash.chunk": "^4.2.0",
|
|
55
55
|
"tslib": "^2.4.0",
|
|
56
|
-
"viem": "npm:@aztec/viem@2.38.2"
|
|
56
|
+
"viem": "npm:@aztec/viem@2.38.2",
|
|
57
|
+
"zod": "^4"
|
|
57
58
|
},
|
|
58
59
|
"devDependencies": {
|
|
59
|
-
"@aztec/archiver": "0.0.1-commit.
|
|
60
|
-
"@aztec/kv-store": "0.0.1-commit.
|
|
60
|
+
"@aztec/archiver": "0.0.1-commit.350e0a4d",
|
|
61
|
+
"@aztec/kv-store": "0.0.1-commit.350e0a4d",
|
|
61
62
|
"@electric-sql/pglite": "^0.3.14",
|
|
62
63
|
"@jest/globals": "^30.0.0",
|
|
63
64
|
"@types/jest": "^30.0.0",
|
|
@@ -1,9 +1,9 @@
|
|
|
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
|
-
import { isAnvilTestChain } from '@aztec/ethereum/chain';
|
|
4
4
|
import { getPublicClient } from '@aztec/ethereum/client';
|
|
5
5
|
import { GovernanceProposerContract, RollupContract } from '@aztec/ethereum/contracts';
|
|
6
|
-
import {
|
|
6
|
+
import { type Delayer, L1TxUtils } from '@aztec/ethereum/l1-tx-utils';
|
|
7
7
|
import { PublisherManager } from '@aztec/ethereum/publisher-manager';
|
|
8
8
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
9
9
|
import { createLogger } from '@aztec/foundation/log';
|
|
@@ -11,15 +11,14 @@ import type { DateProvider } from '@aztec/foundation/timer';
|
|
|
11
11
|
import type { KeystoreManager } from '@aztec/node-keystore';
|
|
12
12
|
import type { P2P } from '@aztec/p2p';
|
|
13
13
|
import type { SlasherClientInterface } from '@aztec/slasher';
|
|
14
|
-
import type { L2BlockSink, L2BlockSource } from '@aztec/stdlib/block';
|
|
14
|
+
import type { L2BlockSink, L2BlockSource, ProposedCheckpointSink } from '@aztec/stdlib/block';
|
|
15
15
|
import type { ValidatorClientFullConfig, WorldStateSynchronizer } from '@aztec/stdlib/interfaces/server';
|
|
16
|
-
import { SlashFactoryContract } from '@aztec/stdlib/l1-contracts';
|
|
17
16
|
import type { L1ToL2MessageSource } from '@aztec/stdlib/messaging';
|
|
18
17
|
import { L1Metrics, type TelemetryClient } from '@aztec/telemetry-client';
|
|
19
18
|
import { FullNodeCheckpointsBuilder, NodeKeystoreAdapter, type ValidatorClient } from '@aztec/validator-client';
|
|
20
19
|
|
|
21
|
-
import type
|
|
22
|
-
import { GlobalVariableBuilder } from '../global_variable_builder/index.js';
|
|
20
|
+
import { type SequencerClientConfig, getPublisherConfigFromSequencerConfig } from '../config.js';
|
|
21
|
+
import type { GlobalVariableBuilder } from '../global_variable_builder/index.js';
|
|
23
22
|
import { SequencerPublisherFactory } from '../publisher/sequencer-publisher-factory.js';
|
|
24
23
|
import { Sequencer, type SequencerConfig } from '../sequencer/index.js';
|
|
25
24
|
|
|
@@ -28,11 +27,12 @@ import { Sequencer, type SequencerConfig } from '../sequencer/index.js';
|
|
|
28
27
|
*/
|
|
29
28
|
export class SequencerClient {
|
|
30
29
|
constructor(
|
|
31
|
-
protected publisherManager: PublisherManager<
|
|
30
|
+
protected publisherManager: PublisherManager<L1TxUtils>,
|
|
32
31
|
protected sequencer: Sequencer,
|
|
33
32
|
protected checkpointsBuilder: FullNodeCheckpointsBuilder,
|
|
34
33
|
protected validatorClient?: ValidatorClient,
|
|
35
34
|
private l1Metrics?: L1Metrics,
|
|
35
|
+
private delayer_?: Delayer,
|
|
36
36
|
) {}
|
|
37
37
|
|
|
38
38
|
/**
|
|
@@ -55,15 +55,17 @@ export class SequencerClient {
|
|
|
55
55
|
worldStateSynchronizer: WorldStateSynchronizer;
|
|
56
56
|
slasherClient: SlasherClientInterface | undefined;
|
|
57
57
|
checkpointsBuilder: FullNodeCheckpointsBuilder;
|
|
58
|
-
l2BlockSource: L2BlockSource & L2BlockSink;
|
|
58
|
+
l2BlockSource: L2BlockSource & L2BlockSink & ProposedCheckpointSink;
|
|
59
59
|
l1ToL2MessageSource: L1ToL2MessageSource;
|
|
60
60
|
telemetry: TelemetryClient;
|
|
61
61
|
publisherFactory?: SequencerPublisherFactory;
|
|
62
62
|
blobClient: BlobClientInterface;
|
|
63
63
|
dateProvider: DateProvider;
|
|
64
64
|
epochCache?: EpochCache;
|
|
65
|
-
l1TxUtils:
|
|
65
|
+
l1TxUtils: L1TxUtils[];
|
|
66
|
+
funderL1TxUtils?: L1TxUtils;
|
|
66
67
|
nodeKeyStore: KeystoreManager;
|
|
68
|
+
globalVariableBuilder: GlobalVariableBuilder;
|
|
67
69
|
},
|
|
68
70
|
) {
|
|
69
71
|
const {
|
|
@@ -85,23 +87,25 @@ export class SequencerClient {
|
|
|
85
87
|
publicClient,
|
|
86
88
|
l1TxUtils.map(x => x.getSenderAddress()),
|
|
87
89
|
);
|
|
88
|
-
const publisherManager = new PublisherManager(l1TxUtils, config)
|
|
89
|
-
|
|
90
|
-
|
|
90
|
+
const publisherManager = new PublisherManager(l1TxUtils, getPublisherConfigFromSequencerConfig(config), {
|
|
91
|
+
bindings: log.getBindings(),
|
|
92
|
+
funder: deps.funderL1TxUtils,
|
|
93
|
+
});
|
|
94
|
+
const rollupContract = new RollupContract(publicClient, config.rollupAddress.toString());
|
|
95
|
+
const [l1GenesisTime, slotDuration, rollupManaLimit] = await Promise.all([
|
|
91
96
|
rollupContract.getL1GenesisTime(),
|
|
92
97
|
rollupContract.getSlotDuration(),
|
|
93
|
-
rollupContract.getVersion(),
|
|
94
98
|
rollupContract.getManaLimit().then(Number),
|
|
95
99
|
] as const);
|
|
96
100
|
|
|
97
101
|
const governanceProposerContract = new GovernanceProposerContract(
|
|
98
102
|
publicClient,
|
|
99
|
-
config.
|
|
103
|
+
config.governanceProposerAddress.toString(),
|
|
100
104
|
);
|
|
101
105
|
const epochCache =
|
|
102
106
|
deps.epochCache ??
|
|
103
107
|
(await EpochCache.create(
|
|
104
|
-
config.
|
|
108
|
+
config.rollupAddress,
|
|
105
109
|
{
|
|
106
110
|
l1RpcUrls: rpcUrls,
|
|
107
111
|
l1ChainId: chainId,
|
|
@@ -111,11 +115,6 @@ export class SequencerClient {
|
|
|
111
115
|
{ dateProvider: deps.dateProvider },
|
|
112
116
|
));
|
|
113
117
|
|
|
114
|
-
const slashFactoryContract = new SlashFactoryContract(
|
|
115
|
-
publicClient,
|
|
116
|
-
config.l1Contracts.slashFactoryAddress?.toString() ?? EthAddress.ZERO.toString(),
|
|
117
|
-
);
|
|
118
|
-
|
|
119
118
|
const publisherFactory =
|
|
120
119
|
deps.publisherFactory ??
|
|
121
120
|
new SequencerPublisherFactory(config, {
|
|
@@ -123,7 +122,6 @@ export class SequencerClient {
|
|
|
123
122
|
blobClient: deps.blobClient,
|
|
124
123
|
epochCache,
|
|
125
124
|
governanceProposerContract,
|
|
126
|
-
slashFactoryContract,
|
|
127
125
|
rollupContract,
|
|
128
126
|
dateProvider: deps.dateProvider,
|
|
129
127
|
publisherManager,
|
|
@@ -132,25 +130,18 @@ export class SequencerClient {
|
|
|
132
130
|
});
|
|
133
131
|
|
|
134
132
|
const ethereumSlotDuration = config.ethereumSlotDuration;
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
// When running in anvil, assume we can post a tx up until one second before the end of an L1 slot.
|
|
148
|
-
// Otherwise, we need the full L1 slot duration for publishing to ensure inclusion.
|
|
149
|
-
// In theory, the L1 slot has an initial 4s phase where the block is propagated, so we could
|
|
150
|
-
// reduce the publishing time allowance. However, we prefer being conservative.
|
|
151
|
-
// See https://www.blocknative.com/blog/anatomy-of-a-slot#7 for more info.
|
|
152
|
-
const l1PublishingTimeBasedOnChain = isAnvilTestChain(config.l1ChainId) ? 1 : ethereumSlotDuration;
|
|
153
|
-
const l1PublishingTime = config.l1PublishingTime ?? l1PublishingTimeBasedOnChain;
|
|
133
|
+
|
|
134
|
+
const globalsBuilder = deps.globalVariableBuilder;
|
|
135
|
+
|
|
136
|
+
const { maxL2BlockGas, maxDABlockGas, maxTxsPerBlock } = capPerBlockLimits(config, rollupManaLimit, log);
|
|
137
|
+
|
|
138
|
+
const l1Constants = {
|
|
139
|
+
l1GenesisTime,
|
|
140
|
+
slotDuration: Number(slotDuration),
|
|
141
|
+
ethereumSlotDuration,
|
|
142
|
+
rollupManaLimit,
|
|
143
|
+
epochDuration: config.aztecEpochDuration,
|
|
144
|
+
};
|
|
154
145
|
|
|
155
146
|
const sequencer = new Sequencer(
|
|
156
147
|
publisherFactory,
|
|
@@ -166,14 +157,17 @@ export class SequencerClient {
|
|
|
166
157
|
deps.dateProvider,
|
|
167
158
|
epochCache,
|
|
168
159
|
rollupContract,
|
|
169
|
-
{ ...config,
|
|
160
|
+
{ ...config, maxL2BlockGas, maxDABlockGas, maxTxsPerBlock },
|
|
170
161
|
telemetryClient,
|
|
171
162
|
log,
|
|
172
163
|
);
|
|
173
164
|
|
|
174
|
-
|
|
165
|
+
sequencer.init();
|
|
175
166
|
|
|
176
|
-
|
|
167
|
+
// Extract the shared delayer from the first L1TxUtils instance (all instances share the same delayer)
|
|
168
|
+
const delayer = l1TxUtils[0]?.delayer;
|
|
169
|
+
|
|
170
|
+
return new SequencerClient(publisherManager, sequencer, checkpointsBuilder, validatorClient, l1Metrics, delayer);
|
|
177
171
|
}
|
|
178
172
|
|
|
179
173
|
/**
|
|
@@ -186,28 +180,59 @@ export class SequencerClient {
|
|
|
186
180
|
this.validatorClient?.updateConfig(config);
|
|
187
181
|
}
|
|
188
182
|
|
|
189
|
-
/**
|
|
183
|
+
/**
|
|
184
|
+
* Starts (or resumes) the sequencer, validator, publishers, and metrics. Each underlying start is
|
|
185
|
+
* idempotent, so this is safe to call after a previous {@link pause} to resume building and publishing.
|
|
186
|
+
* The publisher manager is started before the sequencer's poll loop so publishing is ready before the
|
|
187
|
+
* sequencer first tries to publish to L1.
|
|
188
|
+
*/
|
|
190
189
|
public async start() {
|
|
191
190
|
await this.validatorClient?.start();
|
|
191
|
+
await this.publisherManager.start();
|
|
192
192
|
this.sequencer.start();
|
|
193
193
|
this.l1Metrics?.start();
|
|
194
|
-
await this.publisherManager.loadState();
|
|
195
194
|
}
|
|
196
195
|
|
|
197
196
|
/**
|
|
198
|
-
* Stops the sequencer
|
|
197
|
+
* Stops the sequencer, validator, publishers, and metrics for good, draining in-flight work. This is the
|
|
198
|
+
* final teardown path: stopping the validator client closes its slashing-protection database. For a
|
|
199
|
+
* restartable pause (e.g. around a test clock warp) use {@link pause} instead.
|
|
199
200
|
*/
|
|
200
201
|
public async stop() {
|
|
201
202
|
await this.sequencer.stop();
|
|
202
203
|
await this.validatorClient?.stop();
|
|
203
|
-
this.publisherManager.
|
|
204
|
+
await this.publisherManager.stop();
|
|
204
205
|
this.l1Metrics?.stop();
|
|
205
206
|
}
|
|
206
207
|
|
|
208
|
+
/**
|
|
209
|
+
* Gracefully pauses block production, waiting for in-flight work to finish rather than interrupting it,
|
|
210
|
+
* while leaving the validator, publishers, and metrics running so the sequencer can be resumed with
|
|
211
|
+
* {@link start}. Used by tests that pause sequencers around an L1 clock warp.
|
|
212
|
+
*/
|
|
213
|
+
public async pause() {
|
|
214
|
+
await this.sequencer.pause();
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
/** Triggers an immediate run of the sequencer, bypassing the polling interval. */
|
|
218
|
+
public trigger() {
|
|
219
|
+
return this.sequencer.trigger();
|
|
220
|
+
}
|
|
221
|
+
|
|
207
222
|
public getSequencer(): Sequencer {
|
|
208
223
|
return this.sequencer;
|
|
209
224
|
}
|
|
210
225
|
|
|
226
|
+
/** Updates the publisher factory's node keystore adapter after a keystore reload. */
|
|
227
|
+
public updatePublisherNodeKeyStore(adapter: NodeKeystoreAdapter): void {
|
|
228
|
+
this.sequencer.updatePublisherNodeKeyStore(adapter);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
/** Returns the shared tx delayer for sequencer L1 txs, if enabled. Test-only. */
|
|
232
|
+
getDelayer(): Delayer | undefined {
|
|
233
|
+
return this.delayer_;
|
|
234
|
+
}
|
|
235
|
+
|
|
211
236
|
get validatorAddresses(): EthAddress[] | undefined {
|
|
212
237
|
return this.sequencer.getValidatorAddresses();
|
|
213
238
|
}
|
|
@@ -216,3 +241,41 @@ export class SequencerClient {
|
|
|
216
241
|
return this.sequencer.maxL2BlockGas;
|
|
217
242
|
}
|
|
218
243
|
}
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
* Caps operator-provided per-block limits at checkpoint-level limits.
|
|
247
|
+
* Returns undefined for any limit the operator didn't set — the checkpoint builder handles redistribution.
|
|
248
|
+
*/
|
|
249
|
+
function capPerBlockLimits(
|
|
250
|
+
config: SequencerClientConfig,
|
|
251
|
+
rollupManaLimit: number,
|
|
252
|
+
log: ReturnType<typeof createLogger>,
|
|
253
|
+
): { maxL2BlockGas: number | undefined; maxDABlockGas: number | undefined; maxTxsPerBlock: number | undefined } {
|
|
254
|
+
let maxL2BlockGas = config.maxL2BlockGas;
|
|
255
|
+
if (maxL2BlockGas !== undefined && maxL2BlockGas > rollupManaLimit) {
|
|
256
|
+
log.warn(`Provided MAX_L2_BLOCK_GAS ${maxL2BlockGas} exceeds rollup mana limit ${rollupManaLimit} (capping)`);
|
|
257
|
+
maxL2BlockGas = rollupManaLimit;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
let maxDABlockGas = config.maxDABlockGas;
|
|
261
|
+
if (maxDABlockGas !== undefined && maxDABlockGas > MAX_PROCESSABLE_DA_GAS_PER_CHECKPOINT) {
|
|
262
|
+
log.warn(
|
|
263
|
+
`Provided MAX_DA_BLOCK_GAS ${maxDABlockGas} exceeds DA checkpoint limit ${MAX_PROCESSABLE_DA_GAS_PER_CHECKPOINT} (capping)`,
|
|
264
|
+
);
|
|
265
|
+
maxDABlockGas = MAX_PROCESSABLE_DA_GAS_PER_CHECKPOINT;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
let maxTxsPerBlock = config.maxTxsPerBlock;
|
|
269
|
+
if (
|
|
270
|
+
maxTxsPerBlock !== undefined &&
|
|
271
|
+
config.maxTxsPerCheckpoint !== undefined &&
|
|
272
|
+
maxTxsPerBlock > config.maxTxsPerCheckpoint
|
|
273
|
+
) {
|
|
274
|
+
log.warn(
|
|
275
|
+
`Provided MAX_TX_PER_BLOCK ${maxTxsPerBlock} exceeds MAX_TX_PER_CHECKPOINT ${config.maxTxsPerCheckpoint} (capping)`,
|
|
276
|
+
);
|
|
277
|
+
maxTxsPerBlock = config.maxTxsPerCheckpoint;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
return { maxL2BlockGas, maxDABlockGas, maxTxsPerBlock };
|
|
281
|
+
}
|
package/src/config.ts
CHANGED
|
@@ -3,68 +3,84 @@ import { type L1ReaderConfig, l1ReaderConfigMappings } from '@aztec/ethereum/l1-
|
|
|
3
3
|
import {
|
|
4
4
|
type ConfigMappingsType,
|
|
5
5
|
booleanConfigHelper,
|
|
6
|
+
floatConfigHelper,
|
|
6
7
|
getConfigFromMappings,
|
|
7
8
|
numberConfigHelper,
|
|
9
|
+
optionalNumberConfigHelper,
|
|
8
10
|
pickConfigMappings,
|
|
9
11
|
} from '@aztec/foundation/config';
|
|
10
12
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
11
13
|
import { type KeyStoreConfig, keyStoreConfigMappings } from '@aztec/node-keystore/config';
|
|
12
14
|
import { type P2PConfig, p2pConfigMappings } from '@aztec/p2p/config';
|
|
13
15
|
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
14
|
-
import {
|
|
16
|
+
import {
|
|
17
|
+
type ChainConfig,
|
|
18
|
+
DEFAULT_BLOCK_DURATION_MS,
|
|
19
|
+
DEFAULT_MAX_BLOCKS_PER_CHECKPOINT,
|
|
20
|
+
type SequencerConfig,
|
|
21
|
+
chainConfigMappings,
|
|
22
|
+
sharedSequencerConfigMappings,
|
|
23
|
+
} from '@aztec/stdlib/config';
|
|
24
|
+
import { MIN_PER_BLOCK_ALLOCATION_MULTIPLIER, MIN_PER_BLOCK_DA_ALLOCATION_MULTIPLIER } from '@aztec/stdlib/gas';
|
|
15
25
|
import type { ResolvedSequencerConfig } from '@aztec/stdlib/interfaces/server';
|
|
26
|
+
import { DEFAULT_P2P_PROPAGATION_TIME } from '@aztec/stdlib/timetable';
|
|
16
27
|
import { type ValidatorClientConfig, validatorClientConfigMappings } from '@aztec/validator-client/config';
|
|
17
28
|
|
|
18
29
|
import {
|
|
19
|
-
type
|
|
20
|
-
type
|
|
21
|
-
|
|
22
|
-
|
|
30
|
+
type SequencerPublisherConfig,
|
|
31
|
+
type SequencerTxSenderConfig,
|
|
32
|
+
sequencerPublisherConfigMappings,
|
|
33
|
+
sequencerTxSenderConfigMappings,
|
|
23
34
|
} from './publisher/config.js';
|
|
24
35
|
|
|
25
36
|
export * from './publisher/config.js';
|
|
26
37
|
export type { SequencerConfig };
|
|
27
38
|
|
|
28
|
-
export const DEFAULT_ATTESTATION_PROPAGATION_TIME = 2;
|
|
29
|
-
|
|
30
39
|
/**
|
|
31
40
|
* Default values for SequencerConfig.
|
|
32
41
|
* Centralized location for all sequencer configuration defaults.
|
|
33
42
|
*/
|
|
34
|
-
export const DefaultSequencerConfig
|
|
43
|
+
export const DefaultSequencerConfig = {
|
|
35
44
|
sequencerPollingIntervalMS: 500,
|
|
36
|
-
maxTxsPerBlock: 32,
|
|
37
45
|
minTxsPerBlock: 1,
|
|
38
46
|
buildCheckpointIfEmpty: false,
|
|
39
47
|
publishTxsWithProposals: false,
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
48
|
+
perBlockAllocationMultiplier: MIN_PER_BLOCK_ALLOCATION_MULTIPLIER,
|
|
49
|
+
perBlockDAAllocationMultiplier: MIN_PER_BLOCK_DA_ALLOCATION_MULTIPLIER,
|
|
50
|
+
redistributeCheckpointBudget: true,
|
|
51
|
+
blockDurationMs: DEFAULT_BLOCK_DURATION_MS,
|
|
52
|
+
l1PublishingTime: 12,
|
|
53
|
+
checkpointProposalSyncGraceSeconds: 2 * (DEFAULT_BLOCK_DURATION_MS / 1000),
|
|
54
|
+
attestationPropagationTime: DEFAULT_P2P_PROPAGATION_TIME,
|
|
45
55
|
secondsBeforeInvalidatingBlockAsCommitteeMember: 144, // 12 L1 blocks
|
|
46
56
|
secondsBeforeInvalidatingBlockAsNonCommitteeMember: 432, // 36 L1 blocks
|
|
47
57
|
skipCollectingAttestations: false,
|
|
48
58
|
skipInvalidateBlockAsProposer: false,
|
|
59
|
+
skipWaitForValidParentCheckpointOnL1: false,
|
|
49
60
|
broadcastInvalidBlockProposal: false,
|
|
61
|
+
broadcastInvalidCheckpointProposalOnly: false,
|
|
50
62
|
injectFakeAttestation: false,
|
|
63
|
+
injectHighSValueAttestation: false,
|
|
64
|
+
injectUnrecoverableSignatureAttestation: false,
|
|
65
|
+
injectYParityAttestation: false,
|
|
51
66
|
fishermanMode: false,
|
|
52
67
|
shuffleAttestationOrdering: false,
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
68
|
+
skipPushProposedBlocksToArchiver: false,
|
|
69
|
+
skipPublishingCheckpointsPercent: 0,
|
|
70
|
+
maxBlocksPerCheckpoint: DEFAULT_MAX_BLOCKS_PER_CHECKPOINT,
|
|
71
|
+
} satisfies ResolvedSequencerConfig;
|
|
56
72
|
|
|
57
73
|
/**
|
|
58
74
|
* Configuration settings for the SequencerClient.
|
|
59
75
|
*/
|
|
60
|
-
export type SequencerClientConfig =
|
|
76
|
+
export type SequencerClientConfig = SequencerPublisherConfig &
|
|
61
77
|
KeyStoreConfig &
|
|
62
78
|
ValidatorClientConfig &
|
|
63
|
-
|
|
79
|
+
SequencerTxSenderConfig &
|
|
64
80
|
SequencerConfig &
|
|
65
81
|
L1ReaderConfig &
|
|
66
82
|
ChainConfig &
|
|
67
|
-
Pick<P2PConfig, '
|
|
83
|
+
Pick<P2PConfig, 'txPublicSetupAllowListExtend'> &
|
|
68
84
|
Pick<L1ContractsConfig, 'ethereumSlotDuration' | 'aztecSlotDuration' | 'aztecEpochDuration'>;
|
|
69
85
|
|
|
70
86
|
export const sequencerConfigMappings: ConfigMappingsType<SequencerConfig> = {
|
|
@@ -73,10 +89,10 @@ export const sequencerConfigMappings: ConfigMappingsType<SequencerConfig> = {
|
|
|
73
89
|
description: 'The number of ms to wait between polling for checking to build on the next slot.',
|
|
74
90
|
...numberConfigHelper(DefaultSequencerConfig.sequencerPollingIntervalMS),
|
|
75
91
|
},
|
|
76
|
-
|
|
77
|
-
env: '
|
|
78
|
-
description: 'The maximum number of txs
|
|
79
|
-
...
|
|
92
|
+
maxTxsPerCheckpoint: {
|
|
93
|
+
env: 'SEQ_MAX_TX_PER_CHECKPOINT',
|
|
94
|
+
description: 'The maximum number of txs across all blocks in a checkpoint.',
|
|
95
|
+
...optionalNumberConfigHelper(),
|
|
80
96
|
},
|
|
81
97
|
minTxsPerBlock: {
|
|
82
98
|
env: 'SEQ_MIN_TX_PER_BLOCK',
|
|
@@ -95,21 +111,41 @@ export const sequencerConfigMappings: ConfigMappingsType<SequencerConfig> = {
|
|
|
95
111
|
maxL2BlockGas: {
|
|
96
112
|
env: 'SEQ_MAX_L2_BLOCK_GAS',
|
|
97
113
|
description: 'The maximum L2 block gas.',
|
|
98
|
-
...
|
|
114
|
+
...optionalNumberConfigHelper(),
|
|
99
115
|
},
|
|
100
116
|
maxDABlockGas: {
|
|
101
117
|
env: 'SEQ_MAX_DA_BLOCK_GAS',
|
|
102
118
|
description: 'The maximum DA block gas.',
|
|
103
|
-
...
|
|
119
|
+
...optionalNumberConfigHelper(),
|
|
120
|
+
},
|
|
121
|
+
perBlockAllocationMultiplier: {
|
|
122
|
+
env: 'SEQ_PER_BLOCK_ALLOCATION_MULTIPLIER',
|
|
123
|
+
description:
|
|
124
|
+
'Per-block gas budget multiplier for both L2 and DA gas. Budget per block is (checkpointLimit / maxBlocks) * multiplier.' +
|
|
125
|
+
' Values greater than one allow early blocks to use more than their even share, relying on checkpoint-level capping for later blocks.',
|
|
126
|
+
...floatConfigHelper(DefaultSequencerConfig.perBlockAllocationMultiplier),
|
|
127
|
+
},
|
|
128
|
+
perBlockDAAllocationMultiplier: {
|
|
129
|
+
env: 'SEQ_PER_BLOCK_DA_ALLOCATION_MULTIPLIER',
|
|
130
|
+
description:
|
|
131
|
+
'Per-block budget multiplier applied to DA gas and blob fields in place of perBlockAllocationMultiplier.' +
|
|
132
|
+
' Defaults higher than the general multiplier so the largest contract class deploy fits a single block.',
|
|
133
|
+
...floatConfigHelper(DefaultSequencerConfig.perBlockDAAllocationMultiplier),
|
|
134
|
+
},
|
|
135
|
+
redistributeCheckpointBudget: {
|
|
136
|
+
env: 'SEQ_REDISTRIBUTE_CHECKPOINT_BUDGET',
|
|
137
|
+
description:
|
|
138
|
+
'Redistribute remaining checkpoint budget evenly across remaining blocks instead of allowing a single block to consume the entire remaining budget.',
|
|
139
|
+
...booleanConfigHelper(DefaultSequencerConfig.redistributeCheckpointBudget),
|
|
104
140
|
},
|
|
105
141
|
coinbase: {
|
|
106
142
|
env: 'COINBASE',
|
|
107
|
-
parseEnv: (val: string) =>
|
|
143
|
+
parseEnv: (val: string) => EthAddress.fromString(val),
|
|
108
144
|
description: 'Recipient of block reward.',
|
|
109
145
|
},
|
|
110
146
|
feeRecipient: {
|
|
111
147
|
env: 'FEE_RECIPIENT',
|
|
112
|
-
parseEnv: (val: string) => AztecAddress.
|
|
148
|
+
parseEnv: (val: string) => AztecAddress.fromStringUnsafe(val),
|
|
113
149
|
description: 'Address to receive fees.',
|
|
114
150
|
},
|
|
115
151
|
acvmWorkingDirectory: {
|
|
@@ -120,16 +156,6 @@ export const sequencerConfigMappings: ConfigMappingsType<SequencerConfig> = {
|
|
|
120
156
|
env: 'ACVM_BINARY_PATH',
|
|
121
157
|
description: 'The path to the ACVM binary',
|
|
122
158
|
},
|
|
123
|
-
maxBlockSizeInBytes: {
|
|
124
|
-
env: 'SEQ_MAX_BLOCK_SIZE_IN_BYTES',
|
|
125
|
-
description: 'Max block size',
|
|
126
|
-
...numberConfigHelper(DefaultSequencerConfig.maxBlockSizeInBytes),
|
|
127
|
-
},
|
|
128
|
-
enforceTimeTable: {
|
|
129
|
-
env: 'SEQ_ENFORCE_TIME_TABLE',
|
|
130
|
-
description: 'Whether to enforce the time table when building blocks',
|
|
131
|
-
...booleanConfigHelper(DefaultSequencerConfig.enforceTimeTable),
|
|
132
|
-
},
|
|
133
159
|
governanceProposerPayload: {
|
|
134
160
|
env: 'GOVERNANCE_PROPOSER_PAYLOAD_ADDRESS',
|
|
135
161
|
description: 'The address of the payload for the governanceProposer',
|
|
@@ -137,13 +163,8 @@ export const sequencerConfigMappings: ConfigMappingsType<SequencerConfig> = {
|
|
|
137
163
|
},
|
|
138
164
|
l1PublishingTime: {
|
|
139
165
|
env: 'SEQ_L1_PUBLISHING_TIME_ALLOWANCE_IN_SLOT',
|
|
140
|
-
description: 'How much time
|
|
141
|
-
|
|
142
|
-
},
|
|
143
|
-
attestationPropagationTime: {
|
|
144
|
-
env: 'SEQ_ATTESTATION_PROPAGATION_TIME',
|
|
145
|
-
description: 'How many seconds it takes for proposals and attestations to travel across the p2p layer (one-way)',
|
|
146
|
-
...numberConfigHelper(DefaultSequencerConfig.attestationPropagationTime),
|
|
166
|
+
description: 'How much time in seconds to allow in the slot for publishing the L1 transaction.',
|
|
167
|
+
...numberConfigHelper(DefaultSequencerConfig.l1PublishingTime),
|
|
147
168
|
},
|
|
148
169
|
fakeProcessingDelayPerTxMs: {
|
|
149
170
|
description: 'Used for testing to introduce a fake delay after processing each tx',
|
|
@@ -174,14 +195,41 @@ export const sequencerConfigMappings: ConfigMappingsType<SequencerConfig> = {
|
|
|
174
195
|
description: 'Do not invalidate the previous block if invalid when we are the proposer (for testing only)',
|
|
175
196
|
...booleanConfigHelper(DefaultSequencerConfig.skipInvalidateBlockAsProposer),
|
|
176
197
|
},
|
|
198
|
+
skipWaitForValidParentCheckpointOnL1: {
|
|
199
|
+
description:
|
|
200
|
+
'Bypass the parent checkpoint validity check before submitting a pipelined checkpoint, ' +
|
|
201
|
+
'allowing the proposer to publish even when the parent landed on L1 with invalid attestations (for testing only)',
|
|
202
|
+
...booleanConfigHelper(DefaultSequencerConfig.skipWaitForValidParentCheckpointOnL1),
|
|
203
|
+
},
|
|
177
204
|
broadcastInvalidBlockProposal: {
|
|
178
205
|
description: 'Broadcast invalid block proposals with corrupted state (for testing only)',
|
|
179
206
|
...booleanConfigHelper(DefaultSequencerConfig.broadcastInvalidBlockProposal),
|
|
180
207
|
},
|
|
208
|
+
invalidBlockProposalIndexWithinCheckpoint: {
|
|
209
|
+
description: 'Broadcast an invalid block proposal only at this indexWithinCheckpoint (for testing only)',
|
|
210
|
+
...optionalNumberConfigHelper(),
|
|
211
|
+
},
|
|
212
|
+
broadcastInvalidCheckpointProposalOnly: {
|
|
213
|
+
description:
|
|
214
|
+
'Broadcast invalid checkpoint proposals while keeping the underlying block proposals valid (for testing only). When unset, the checkpoint follows broadcastInvalidBlockProposal.',
|
|
215
|
+
...booleanConfigHelper(DefaultSequencerConfig.broadcastInvalidCheckpointProposalOnly),
|
|
216
|
+
},
|
|
181
217
|
injectFakeAttestation: {
|
|
182
218
|
description: 'Inject a fake attestation (for testing only)',
|
|
183
219
|
...booleanConfigHelper(DefaultSequencerConfig.injectFakeAttestation),
|
|
184
220
|
},
|
|
221
|
+
injectHighSValueAttestation: {
|
|
222
|
+
description: 'Inject a malleable attestation with a high-s value (for testing only)',
|
|
223
|
+
...booleanConfigHelper(DefaultSequencerConfig.injectHighSValueAttestation),
|
|
224
|
+
},
|
|
225
|
+
injectUnrecoverableSignatureAttestation: {
|
|
226
|
+
description: 'Inject an attestation with an unrecoverable signature (for testing only)',
|
|
227
|
+
...booleanConfigHelper(DefaultSequencerConfig.injectUnrecoverableSignatureAttestation),
|
|
228
|
+
},
|
|
229
|
+
injectYParityAttestation: {
|
|
230
|
+
description: 'Inject a non-proposer attestation slot in yParity form in the packed L1 tuple (for testing only)',
|
|
231
|
+
...booleanConfigHelper(DefaultSequencerConfig.injectYParityAttestation),
|
|
232
|
+
},
|
|
185
233
|
fishermanMode: {
|
|
186
234
|
env: 'FISHERMAN_MODE',
|
|
187
235
|
description:
|
|
@@ -192,34 +240,49 @@ export const sequencerConfigMappings: ConfigMappingsType<SequencerConfig> = {
|
|
|
192
240
|
description: 'Shuffle attestation ordering to create invalid ordering (for testing only)',
|
|
193
241
|
...booleanConfigHelper(DefaultSequencerConfig.shuffleAttestationOrdering),
|
|
194
242
|
},
|
|
195
|
-
|
|
196
|
-
env: 'SEQ_BLOCK_DURATION_MS',
|
|
197
|
-
description:
|
|
198
|
-
'Duration per block in milliseconds when building multiple blocks per slot. ' +
|
|
199
|
-
'If undefined (default), builds a single block per slot using the full slot duration.',
|
|
200
|
-
parseEnv: (val: string) => (val ? parseInt(val, 10) : undefined),
|
|
201
|
-
},
|
|
243
|
+
...sharedSequencerConfigMappings,
|
|
202
244
|
buildCheckpointIfEmpty: {
|
|
203
245
|
env: 'SEQ_BUILD_CHECKPOINT_IF_EMPTY',
|
|
204
246
|
description: 'Have sequencer build and publish an empty checkpoint if there are no txs',
|
|
205
247
|
...booleanConfigHelper(DefaultSequencerConfig.buildCheckpointIfEmpty),
|
|
206
248
|
},
|
|
207
|
-
// TODO(palla/mbps): Change default to false once block sync is stable
|
|
208
249
|
skipPushProposedBlocksToArchiver: {
|
|
209
|
-
description: 'Skip pushing proposed blocks to archiver (
|
|
250
|
+
description: 'Skip pushing proposed blocks to archiver (test only)',
|
|
210
251
|
...booleanConfigHelper(DefaultSequencerConfig.skipPushProposedBlocksToArchiver),
|
|
211
252
|
},
|
|
212
|
-
|
|
253
|
+
minBlocksForCheckpoint: {
|
|
254
|
+
description: 'Minimum number of blocks required for a checkpoint proposal (test only)',
|
|
255
|
+
},
|
|
256
|
+
skipPublishingCheckpointsPercent: {
|
|
257
|
+
env: 'SEQ_SKIP_CHECKPOINT_PUBLISH_PERCENT',
|
|
258
|
+
description: 'Percent probability (0 - 100) of sequencer skipping checkpoint publishing (testing only)',
|
|
259
|
+
...numberConfigHelper(DefaultSequencerConfig.skipPublishingCheckpointsPercent),
|
|
260
|
+
},
|
|
261
|
+
skipBroadcastProposals: {
|
|
262
|
+
description: 'Skip broadcasting checkpoint and block proposals via gossipsub when proposer (for testing only)',
|
|
263
|
+
...booleanConfigHelper(false),
|
|
264
|
+
},
|
|
265
|
+
skipBroadcastCheckpointProposal: {
|
|
266
|
+
description:
|
|
267
|
+
'Skip broadcasting only the CheckpointProposal via gossipsub when proposer; the held last block is broadcast ' +
|
|
268
|
+
'standalone instead so peers still receive it as a proposed-but-uncheckpointed tip (for testing only)',
|
|
269
|
+
...booleanConfigHelper(false),
|
|
270
|
+
},
|
|
271
|
+
pauseProposingForSlots: {
|
|
272
|
+
description:
|
|
273
|
+
'List of slots for which the sequencer will not produce a proposal (for testing only). Attestation paths are unaffected.',
|
|
274
|
+
},
|
|
275
|
+
...pickConfigMappings(p2pConfigMappings, ['txPublicSetupAllowListExtend']),
|
|
213
276
|
};
|
|
214
277
|
|
|
215
278
|
export const sequencerClientConfigMappings: ConfigMappingsType<SequencerClientConfig> = {
|
|
279
|
+
...chainConfigMappings,
|
|
216
280
|
...validatorClientConfigMappings,
|
|
217
281
|
...sequencerConfigMappings,
|
|
218
282
|
...keyStoreConfigMappings,
|
|
219
283
|
...l1ReaderConfigMappings,
|
|
220
|
-
...
|
|
221
|
-
...
|
|
222
|
-
...chainConfigMappings,
|
|
284
|
+
...sequencerTxSenderConfigMappings,
|
|
285
|
+
...sequencerPublisherConfigMappings,
|
|
223
286
|
...pickConfigMappings(l1ContractsConfigMappings, ['ethereumSlotDuration', 'aztecSlotDuration', 'aztecEpochDuration']),
|
|
224
287
|
};
|
|
225
288
|
|