@aztec/sequencer-client 0.0.1-commit.0c875d939 → 0.0.1-commit.0dc957cde
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/dest/client/sequencer-client.d.ts +17 -7
- package/dest/client/sequencer-client.d.ts.map +1 -1
- package/dest/client/sequencer-client.js +63 -30
- package/dest/config.d.ts +26 -6
- package/dest/config.d.ts.map +1 -1
- package/dest/config.js +49 -29
- 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 +15 -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/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-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 +68 -48
- package/dest/publisher/sequencer-publisher.d.ts.map +1 -1
- package/dest/publisher/sequencer-publisher.js +419 -135
- package/dest/sequencer/chain_state_overrides.d.ts +25 -0
- package/dest/sequencer/chain_state_overrides.d.ts.map +1 -0
- package/dest/sequencer/chain_state_overrides.js +39 -0
- package/dest/sequencer/checkpoint_proposal_job.d.ts +40 -10
- package/dest/sequencer/checkpoint_proposal_job.d.ts.map +1 -1
- package/dest/sequencer/checkpoint_proposal_job.js +522 -212
- 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 +7 -1
- package/dest/sequencer/events.d.ts.map +1 -1
- package/dest/sequencer/metrics.d.ts +18 -8
- package/dest/sequencer/metrics.d.ts.map +1 -1
- package/dest/sequencer/metrics.js +85 -21
- package/dest/sequencer/sequencer.d.ts +43 -17
- package/dest/sequencer/sequencer.d.ts.map +1 -1
- package/dest/sequencer/sequencer.js +158 -97
- package/dest/sequencer/timetable.d.ts +17 -3
- package/dest/sequencer/timetable.d.ts.map +1 -1
- package/dest/sequencer/timetable.js +51 -43
- 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 +7 -9
- package/dest/test/mock_checkpoint_builder.d.ts.map +1 -1
- package/dest/test/mock_checkpoint_builder.js +39 -30
- package/package.json +27 -28
- package/src/client/sequencer-client.ts +81 -30
- package/src/config.ts +61 -35
- 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 +27 -63
- package/src/global_variable_builder/index.ts +3 -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-publisher-factory.ts +38 -9
- package/src/publisher/sequencer-publisher.ts +472 -193
- package/src/sequencer/README.md +83 -13
- package/src/sequencer/chain_state_overrides.ts +87 -0
- package/src/sequencer/checkpoint_proposal_job.ts +665 -234
- package/src/sequencer/checkpoint_proposal_job_metrics.ts +128 -0
- package/src/sequencer/checkpoint_voter.ts +1 -12
- package/src/sequencer/events.ts +6 -1
- package/src/sequencer/metrics.ts +100 -26
- package/src/sequencer/sequencer.ts +227 -109
- package/src/sequencer/timetable.ts +64 -52
- package/src/sequencer/types.ts +1 -1
- package/src/test/index.ts +2 -4
- package/src/test/mock_checkpoint_builder.ts +51 -48
|
@@ -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';
|
|
@@ -13,13 +14,12 @@ import type { P2P } from '@aztec/p2p';
|
|
|
13
14
|
import type { SlasherClientInterface } from '@aztec/slasher';
|
|
14
15
|
import type { L2BlockSink, L2BlockSource } 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
|
/**
|
|
@@ -62,8 +63,10 @@ export class SequencerClient {
|
|
|
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,12 +88,14 @@ export class SequencerClient {
|
|
|
85
88
|
publicClient,
|
|
86
89
|
l1TxUtils.map(x => x.getSenderAddress()),
|
|
87
90
|
);
|
|
88
|
-
const publisherManager = new PublisherManager(l1TxUtils, config,
|
|
91
|
+
const publisherManager = new PublisherManager(l1TxUtils, getPublisherConfigFromSequencerConfig(config), {
|
|
92
|
+
bindings: log.getBindings(),
|
|
93
|
+
funder: deps.funderL1TxUtils,
|
|
94
|
+
});
|
|
89
95
|
const rollupContract = new RollupContract(publicClient, config.l1Contracts.rollupAddress.toString());
|
|
90
|
-
const [l1GenesisTime, slotDuration,
|
|
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
|
|
|
@@ -107,15 +112,11 @@ export class SequencerClient {
|
|
|
107
112
|
l1ChainId: chainId,
|
|
108
113
|
viemPollingIntervalMS: config.viemPollingIntervalMS,
|
|
109
114
|
ethereumSlotDuration: config.ethereumSlotDuration,
|
|
115
|
+
enableProposerPipelining: config.enableProposerPipelining,
|
|
110
116
|
},
|
|
111
117
|
{ dateProvider: deps.dateProvider },
|
|
112
118
|
));
|
|
113
119
|
|
|
114
|
-
const slashFactoryContract = new SlashFactoryContract(
|
|
115
|
-
publicClient,
|
|
116
|
-
config.l1Contracts.slashFactoryAddress?.toString() ?? EthAddress.ZERO.toString(),
|
|
117
|
-
);
|
|
118
|
-
|
|
119
120
|
const publisherFactory =
|
|
120
121
|
deps.publisherFactory ??
|
|
121
122
|
new SequencerPublisherFactory(config, {
|
|
@@ -123,7 +124,6 @@ export class SequencerClient {
|
|
|
123
124
|
blobClient: deps.blobClient,
|
|
124
125
|
epochCache,
|
|
125
126
|
governanceProposerContract,
|
|
126
|
-
slashFactoryContract,
|
|
127
127
|
rollupContract,
|
|
128
128
|
dateProvider: deps.dateProvider,
|
|
129
129
|
publisherManager,
|
|
@@ -132,17 +132,8 @@ export class SequencerClient {
|
|
|
132
132
|
});
|
|
133
133
|
|
|
134
134
|
const ethereumSlotDuration = config.ethereumSlotDuration;
|
|
135
|
-
const l1Constants = { l1GenesisTime, slotDuration: Number(slotDuration), ethereumSlotDuration };
|
|
136
|
-
|
|
137
|
-
const globalsBuilder = new GlobalVariableBuilder({ ...config, ...l1Constants, rollupVersion });
|
|
138
135
|
|
|
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
|
-
}
|
|
136
|
+
const globalsBuilder = deps.globalVariableBuilder;
|
|
146
137
|
|
|
147
138
|
// When running in anvil, assume we can post a tx up until one second before the end of an L1 slot.
|
|
148
139
|
// Otherwise, we need the full L1 slot duration for publishing to ensure inclusion.
|
|
@@ -152,6 +143,10 @@ export class SequencerClient {
|
|
|
152
143
|
const l1PublishingTimeBasedOnChain = isAnvilTestChain(config.l1ChainId) ? 1 : ethereumSlotDuration;
|
|
153
144
|
const l1PublishingTime = config.l1PublishingTime ?? l1PublishingTimeBasedOnChain;
|
|
154
145
|
|
|
146
|
+
const { maxL2BlockGas, maxDABlockGas, maxTxsPerBlock } = capPerBlockLimits(config, rollupManaLimit, log);
|
|
147
|
+
|
|
148
|
+
const l1Constants = { l1GenesisTime, slotDuration: Number(slotDuration), ethereumSlotDuration, rollupManaLimit };
|
|
149
|
+
|
|
155
150
|
const sequencer = new Sequencer(
|
|
156
151
|
publisherFactory,
|
|
157
152
|
validatorClient,
|
|
@@ -166,14 +161,17 @@ export class SequencerClient {
|
|
|
166
161
|
deps.dateProvider,
|
|
167
162
|
epochCache,
|
|
168
163
|
rollupContract,
|
|
169
|
-
{ ...config, l1PublishingTime, maxL2BlockGas
|
|
164
|
+
{ ...config, l1PublishingTime, maxL2BlockGas, maxDABlockGas, maxTxsPerBlock },
|
|
170
165
|
telemetryClient,
|
|
171
166
|
log,
|
|
172
167
|
);
|
|
173
168
|
|
|
174
|
-
|
|
169
|
+
sequencer.init();
|
|
170
|
+
|
|
171
|
+
// Extract the shared delayer from the first L1TxUtils instance (all instances share the same delayer)
|
|
172
|
+
const delayer = l1TxUtils[0]?.delayer;
|
|
175
173
|
|
|
176
|
-
return new SequencerClient(publisherManager, sequencer, checkpointsBuilder, validatorClient, l1Metrics);
|
|
174
|
+
return new SequencerClient(publisherManager, sequencer, checkpointsBuilder, validatorClient, l1Metrics, delayer);
|
|
177
175
|
}
|
|
178
176
|
|
|
179
177
|
/**
|
|
@@ -191,7 +189,7 @@ export class SequencerClient {
|
|
|
191
189
|
await this.validatorClient?.start();
|
|
192
190
|
this.sequencer.start();
|
|
193
191
|
this.l1Metrics?.start();
|
|
194
|
-
await this.publisherManager.
|
|
192
|
+
await this.publisherManager.start();
|
|
195
193
|
}
|
|
196
194
|
|
|
197
195
|
/**
|
|
@@ -200,14 +198,29 @@ export class SequencerClient {
|
|
|
200
198
|
public async stop() {
|
|
201
199
|
await this.sequencer.stop();
|
|
202
200
|
await this.validatorClient?.stop();
|
|
203
|
-
this.publisherManager.
|
|
201
|
+
await this.publisherManager.stop();
|
|
204
202
|
this.l1Metrics?.stop();
|
|
205
203
|
}
|
|
206
204
|
|
|
205
|
+
/** Triggers an immediate run of the sequencer, bypassing the polling interval. */
|
|
206
|
+
public trigger() {
|
|
207
|
+
return this.sequencer.trigger();
|
|
208
|
+
}
|
|
209
|
+
|
|
207
210
|
public getSequencer(): Sequencer {
|
|
208
211
|
return this.sequencer;
|
|
209
212
|
}
|
|
210
213
|
|
|
214
|
+
/** Updates the publisher factory's node keystore adapter after a keystore reload. */
|
|
215
|
+
public updatePublisherNodeKeyStore(adapter: NodeKeystoreAdapter): void {
|
|
216
|
+
this.sequencer.updatePublisherNodeKeyStore(adapter);
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
/** Returns the shared tx delayer for sequencer L1 txs, if enabled. Test-only. */
|
|
220
|
+
getDelayer(): Delayer | undefined {
|
|
221
|
+
return this.delayer_;
|
|
222
|
+
}
|
|
223
|
+
|
|
211
224
|
get validatorAddresses(): EthAddress[] | undefined {
|
|
212
225
|
return this.sequencer.getValidatorAddresses();
|
|
213
226
|
}
|
|
@@ -216,3 +229,41 @@ export class SequencerClient {
|
|
|
216
229
|
return this.sequencer.maxL2BlockGas;
|
|
217
230
|
}
|
|
218
231
|
}
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* Caps operator-provided per-block limits at checkpoint-level limits.
|
|
235
|
+
* Returns undefined for any limit the operator didn't set — the checkpoint builder handles redistribution.
|
|
236
|
+
*/
|
|
237
|
+
function capPerBlockLimits(
|
|
238
|
+
config: SequencerClientConfig,
|
|
239
|
+
rollupManaLimit: number,
|
|
240
|
+
log: ReturnType<typeof createLogger>,
|
|
241
|
+
): { maxL2BlockGas: number | undefined; maxDABlockGas: number | undefined; maxTxsPerBlock: number | undefined } {
|
|
242
|
+
let maxL2BlockGas = config.maxL2BlockGas;
|
|
243
|
+
if (maxL2BlockGas !== undefined && maxL2BlockGas > rollupManaLimit) {
|
|
244
|
+
log.warn(`Provided MAX_L2_BLOCK_GAS ${maxL2BlockGas} exceeds rollup mana limit ${rollupManaLimit} (capping)`);
|
|
245
|
+
maxL2BlockGas = rollupManaLimit;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
let maxDABlockGas = config.maxDABlockGas;
|
|
249
|
+
if (maxDABlockGas !== undefined && maxDABlockGas > MAX_PROCESSABLE_DA_GAS_PER_CHECKPOINT) {
|
|
250
|
+
log.warn(
|
|
251
|
+
`Provided MAX_DA_BLOCK_GAS ${maxDABlockGas} exceeds DA checkpoint limit ${MAX_PROCESSABLE_DA_GAS_PER_CHECKPOINT} (capping)`,
|
|
252
|
+
);
|
|
253
|
+
maxDABlockGas = MAX_PROCESSABLE_DA_GAS_PER_CHECKPOINT;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
let maxTxsPerBlock = config.maxTxsPerBlock;
|
|
257
|
+
if (
|
|
258
|
+
maxTxsPerBlock !== undefined &&
|
|
259
|
+
config.maxTxsPerCheckpoint !== undefined &&
|
|
260
|
+
maxTxsPerBlock > config.maxTxsPerCheckpoint
|
|
261
|
+
) {
|
|
262
|
+
log.warn(
|
|
263
|
+
`Provided MAX_TX_PER_BLOCK ${maxTxsPerBlock} exceeds MAX_TX_PER_CHECKPOINT ${config.maxTxsPerCheckpoint} (capping)`,
|
|
264
|
+
);
|
|
265
|
+
maxTxsPerBlock = config.maxTxsPerCheckpoint;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
return { maxL2BlockGas, maxDABlockGas, maxTxsPerBlock };
|
|
269
|
+
}
|
package/src/config.ts
CHANGED
|
@@ -13,8 +13,10 @@ import { type P2PConfig, p2pConfigMappings } from '@aztec/p2p/config';
|
|
|
13
13
|
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
14
14
|
import {
|
|
15
15
|
type ChainConfig,
|
|
16
|
+
type PipelineConfig,
|
|
16
17
|
type SequencerConfig,
|
|
17
18
|
chainConfigMappings,
|
|
19
|
+
pipelineConfigMappings,
|
|
18
20
|
sharedSequencerConfigMappings,
|
|
19
21
|
} from '@aztec/stdlib/config';
|
|
20
22
|
import type { ResolvedSequencerConfig } from '@aztec/stdlib/interfaces/server';
|
|
@@ -22,10 +24,10 @@ import { DEFAULT_P2P_PROPAGATION_TIME } from '@aztec/stdlib/timetable';
|
|
|
22
24
|
import { type ValidatorClientConfig, validatorClientConfigMappings } from '@aztec/validator-client/config';
|
|
23
25
|
|
|
24
26
|
import {
|
|
25
|
-
type
|
|
26
|
-
type
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
type SequencerPublisherConfig,
|
|
28
|
+
type SequencerTxSenderConfig,
|
|
29
|
+
sequencerPublisherConfigMappings,
|
|
30
|
+
sequencerTxSenderConfigMappings,
|
|
29
31
|
} from './publisher/config.js';
|
|
30
32
|
|
|
31
33
|
export * from './publisher/config.js';
|
|
@@ -35,15 +37,13 @@ export type { SequencerConfig };
|
|
|
35
37
|
* Default values for SequencerConfig.
|
|
36
38
|
* Centralized location for all sequencer configuration defaults.
|
|
37
39
|
*/
|
|
38
|
-
export const DefaultSequencerConfig
|
|
40
|
+
export const DefaultSequencerConfig = {
|
|
39
41
|
sequencerPollingIntervalMS: 500,
|
|
40
|
-
maxTxsPerBlock: 32,
|
|
41
42
|
minTxsPerBlock: 1,
|
|
42
43
|
buildCheckpointIfEmpty: false,
|
|
43
44
|
publishTxsWithProposals: false,
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
maxBlockSizeInBytes: 1024 * 1024,
|
|
45
|
+
perBlockAllocationMultiplier: 1.2,
|
|
46
|
+
redistributeCheckpointBudget: true,
|
|
47
47
|
enforceTimeTable: true,
|
|
48
48
|
attestationPropagationTime: DEFAULT_P2P_PROPAGATION_TIME,
|
|
49
49
|
secondsBeforeInvalidatingBlockAsCommitteeMember: 144, // 12 L1 blocks
|
|
@@ -52,22 +52,26 @@ export const DefaultSequencerConfig: ResolvedSequencerConfig = {
|
|
|
52
52
|
skipInvalidateBlockAsProposer: false,
|
|
53
53
|
broadcastInvalidBlockProposal: false,
|
|
54
54
|
injectFakeAttestation: false,
|
|
55
|
+
injectHighSValueAttestation: false,
|
|
56
|
+
injectUnrecoverableSignatureAttestation: false,
|
|
55
57
|
fishermanMode: false,
|
|
56
58
|
shuffleAttestationOrdering: false,
|
|
57
59
|
skipPushProposedBlocksToArchiver: false,
|
|
58
|
-
|
|
60
|
+
skipPublishingCheckpointsPercent: 0,
|
|
61
|
+
} satisfies ResolvedSequencerConfig;
|
|
59
62
|
|
|
60
63
|
/**
|
|
61
64
|
* Configuration settings for the SequencerClient.
|
|
62
65
|
*/
|
|
63
|
-
export type SequencerClientConfig =
|
|
66
|
+
export type SequencerClientConfig = SequencerPublisherConfig &
|
|
64
67
|
KeyStoreConfig &
|
|
65
68
|
ValidatorClientConfig &
|
|
66
|
-
|
|
69
|
+
SequencerTxSenderConfig &
|
|
67
70
|
SequencerConfig &
|
|
68
71
|
L1ReaderConfig &
|
|
69
72
|
ChainConfig &
|
|
70
|
-
|
|
73
|
+
PipelineConfig &
|
|
74
|
+
Pick<P2PConfig, 'txPublicSetupAllowListExtend'> &
|
|
71
75
|
Pick<L1ContractsConfig, 'ethereumSlotDuration' | 'aztecSlotDuration' | 'aztecEpochDuration'>;
|
|
72
76
|
|
|
73
77
|
export const sequencerConfigMappings: ConfigMappingsType<SequencerConfig> = {
|
|
@@ -76,10 +80,10 @@ export const sequencerConfigMappings: ConfigMappingsType<SequencerConfig> = {
|
|
|
76
80
|
description: 'The number of ms to wait between polling for checking to build on the next slot.',
|
|
77
81
|
...numberConfigHelper(DefaultSequencerConfig.sequencerPollingIntervalMS),
|
|
78
82
|
},
|
|
79
|
-
|
|
80
|
-
env: '
|
|
81
|
-
description: 'The maximum number of txs
|
|
82
|
-
|
|
83
|
+
maxTxsPerCheckpoint: {
|
|
84
|
+
env: 'SEQ_MAX_TX_PER_CHECKPOINT',
|
|
85
|
+
description: 'The maximum number of txs across all blocks in a checkpoint.',
|
|
86
|
+
parseEnv: (val: string) => parseInt(val, 10),
|
|
83
87
|
},
|
|
84
88
|
minTxsPerBlock: {
|
|
85
89
|
env: 'SEQ_MIN_TX_PER_BLOCK',
|
|
@@ -98,16 +102,29 @@ export const sequencerConfigMappings: ConfigMappingsType<SequencerConfig> = {
|
|
|
98
102
|
maxL2BlockGas: {
|
|
99
103
|
env: 'SEQ_MAX_L2_BLOCK_GAS',
|
|
100
104
|
description: 'The maximum L2 block gas.',
|
|
101
|
-
|
|
105
|
+
parseEnv: (val: string) => parseInt(val, 10),
|
|
102
106
|
},
|
|
103
107
|
maxDABlockGas: {
|
|
104
108
|
env: 'SEQ_MAX_DA_BLOCK_GAS',
|
|
105
109
|
description: 'The maximum DA block gas.',
|
|
106
|
-
|
|
110
|
+
parseEnv: (val: string) => parseInt(val, 10),
|
|
111
|
+
},
|
|
112
|
+
perBlockAllocationMultiplier: {
|
|
113
|
+
env: 'SEQ_PER_BLOCK_ALLOCATION_MULTIPLIER',
|
|
114
|
+
description:
|
|
115
|
+
'Per-block gas budget multiplier for both L2 and DA gas. Budget per block is (checkpointLimit / maxBlocks) * multiplier.' +
|
|
116
|
+
' Values greater than one allow early blocks to use more than their even share, relying on checkpoint-level capping for later blocks.',
|
|
117
|
+
...numberConfigHelper(DefaultSequencerConfig.perBlockAllocationMultiplier),
|
|
118
|
+
},
|
|
119
|
+
redistributeCheckpointBudget: {
|
|
120
|
+
env: 'SEQ_REDISTRIBUTE_CHECKPOINT_BUDGET',
|
|
121
|
+
description:
|
|
122
|
+
'Redistribute remaining checkpoint budget evenly across remaining blocks instead of allowing a single block to consume the entire remaining budget.',
|
|
123
|
+
...booleanConfigHelper(DefaultSequencerConfig.redistributeCheckpointBudget),
|
|
107
124
|
},
|
|
108
125
|
coinbase: {
|
|
109
126
|
env: 'COINBASE',
|
|
110
|
-
parseEnv: (val: string) =>
|
|
127
|
+
parseEnv: (val: string) => EthAddress.fromString(val),
|
|
111
128
|
description: 'Recipient of block reward.',
|
|
112
129
|
},
|
|
113
130
|
feeRecipient: {
|
|
@@ -123,11 +140,6 @@ export const sequencerConfigMappings: ConfigMappingsType<SequencerConfig> = {
|
|
|
123
140
|
env: 'ACVM_BINARY_PATH',
|
|
124
141
|
description: 'The path to the ACVM binary',
|
|
125
142
|
},
|
|
126
|
-
maxBlockSizeInBytes: {
|
|
127
|
-
env: 'SEQ_MAX_BLOCK_SIZE_IN_BYTES',
|
|
128
|
-
description: 'Max block size',
|
|
129
|
-
...numberConfigHelper(DefaultSequencerConfig.maxBlockSizeInBytes),
|
|
130
|
-
},
|
|
131
143
|
enforceTimeTable: {
|
|
132
144
|
env: 'SEQ_ENFORCE_TIME_TABLE',
|
|
133
145
|
description: 'Whether to enforce the time table when building blocks',
|
|
@@ -141,12 +153,7 @@ export const sequencerConfigMappings: ConfigMappingsType<SequencerConfig> = {
|
|
|
141
153
|
l1PublishingTime: {
|
|
142
154
|
env: 'SEQ_L1_PUBLISHING_TIME_ALLOWANCE_IN_SLOT',
|
|
143
155
|
description: 'How much time (in seconds) we allow in the slot for publishing the L1 tx (defaults to 1 L1 slot).',
|
|
144
|
-
parseEnv: (val: string) =>
|
|
145
|
-
},
|
|
146
|
-
attestationPropagationTime: {
|
|
147
|
-
env: 'SEQ_ATTESTATION_PROPAGATION_TIME',
|
|
148
|
-
description: 'How many seconds it takes for proposals and attestations to travel across the p2p layer (one-way)',
|
|
149
|
-
...numberConfigHelper(DefaultSequencerConfig.attestationPropagationTime),
|
|
156
|
+
parseEnv: (val: string) => parseInt(val, 10),
|
|
150
157
|
},
|
|
151
158
|
fakeProcessingDelayPerTxMs: {
|
|
152
159
|
description: 'Used for testing to introduce a fake delay after processing each tx',
|
|
@@ -185,6 +192,14 @@ export const sequencerConfigMappings: ConfigMappingsType<SequencerConfig> = {
|
|
|
185
192
|
description: 'Inject a fake attestation (for testing only)',
|
|
186
193
|
...booleanConfigHelper(DefaultSequencerConfig.injectFakeAttestation),
|
|
187
194
|
},
|
|
195
|
+
injectHighSValueAttestation: {
|
|
196
|
+
description: 'Inject a malleable attestation with a high-s value (for testing only)',
|
|
197
|
+
...booleanConfigHelper(DefaultSequencerConfig.injectHighSValueAttestation),
|
|
198
|
+
},
|
|
199
|
+
injectUnrecoverableSignatureAttestation: {
|
|
200
|
+
description: 'Inject an attestation with an unrecoverable signature (for testing only)',
|
|
201
|
+
...booleanConfigHelper(DefaultSequencerConfig.injectUnrecoverableSignatureAttestation),
|
|
202
|
+
},
|
|
188
203
|
fishermanMode: {
|
|
189
204
|
env: 'FISHERMAN_MODE',
|
|
190
205
|
description:
|
|
@@ -205,17 +220,28 @@ export const sequencerConfigMappings: ConfigMappingsType<SequencerConfig> = {
|
|
|
205
220
|
description: 'Skip pushing proposed blocks to archiver (default: true)',
|
|
206
221
|
...booleanConfigHelper(DefaultSequencerConfig.skipPushProposedBlocksToArchiver),
|
|
207
222
|
},
|
|
208
|
-
|
|
223
|
+
minBlocksForCheckpoint: {
|
|
224
|
+
description: 'Minimum number of blocks required for a checkpoint proposal (test only)',
|
|
225
|
+
},
|
|
226
|
+
skipPublishingCheckpointsPercent: {
|
|
227
|
+
env: 'SEQ_SKIP_CHECKPOINT_PUBLISH_PERCENT',
|
|
228
|
+
description: 'Percent probability (0 - 100) of sequencer skipping checkpoint publishing (testing only)',
|
|
229
|
+
...numberConfigHelper(DefaultSequencerConfig.skipPublishingCheckpointsPercent),
|
|
230
|
+
},
|
|
231
|
+
...pickConfigMappings(p2pConfigMappings, ['txPublicSetupAllowListExtend']),
|
|
209
232
|
};
|
|
210
233
|
|
|
211
234
|
export const sequencerClientConfigMappings: ConfigMappingsType<SequencerClientConfig> = {
|
|
235
|
+
// chainConfigMappings must come first: its l1Contracts only maps rollupAddress,
|
|
236
|
+
// while l1ReaderConfigMappings (spread later) maps all L1 contract addresses.
|
|
237
|
+
...chainConfigMappings,
|
|
212
238
|
...validatorClientConfigMappings,
|
|
213
239
|
...sequencerConfigMappings,
|
|
214
240
|
...keyStoreConfigMappings,
|
|
215
241
|
...l1ReaderConfigMappings,
|
|
216
|
-
...
|
|
217
|
-
...
|
|
218
|
-
...
|
|
242
|
+
...sequencerTxSenderConfigMappings,
|
|
243
|
+
...sequencerPublisherConfigMappings,
|
|
244
|
+
...pipelineConfigMappings,
|
|
219
245
|
...pickConfigMappings(l1ContractsConfigMappings, ['ethereumSlotDuration', 'aztecSlotDuration', 'aztecEpochDuration']),
|
|
220
246
|
};
|
|
221
247
|
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Fee Prediction
|
|
2
|
+
|
|
3
|
+
The `FeePredictor` predicts min fees for upcoming L2 slots based on the current L1
|
|
4
|
+
oracle state and an assumed mana usage pattern.
|
|
5
|
+
|
|
6
|
+
## Prediction Window
|
|
7
|
+
|
|
8
|
+
The prediction covers `LAG = 2` entries (the next available slot plus 1 more).
|
|
9
|
+
A new oracle update can activate at `startSlot + LAG`, so only the first LAG entries
|
|
10
|
+
are guaranteed stable. Beyond that, L1 fees could change unpredictably.
|
|
11
|
+
|
|
12
|
+
Each entry uses:
|
|
13
|
+
|
|
14
|
+
- The **actual L1 fees** the oracle would return for that slot's timestamp (pre or post,
|
|
15
|
+
depending on whether the slot is before or after `slotOfChange`).
|
|
16
|
+
- A **configurable congestion assumption** (`ManaUsageEstimate`): none (0 mana), target
|
|
17
|
+
(steady state), or limit (worst case, 2x target).
|
|
18
|
+
|
|
19
|
+
The client picks `max(predicted[0..LAG-1])` as their `maxFeesPerGas`.
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
predicted[0] → fee at next slot (current oracle + current congestion)
|
|
23
|
+
predicted[1] → fee at next slot + 1 (congestion may change based on usage estimate)
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Why LAG and not LIFETIME?
|
|
27
|
+
|
|
28
|
+
The L1 gas oracle has two timing constants:
|
|
29
|
+
|
|
30
|
+
- **LAG = 2 slots**: when new fees are queued, they activate LAG slots later
|
|
31
|
+
- **LIFETIME = 5 slots**: after an oracle update, the next update is rejected until
|
|
32
|
+
`slotOfChange + (LIFETIME - LAG)` slots have passed
|
|
33
|
+
|
|
34
|
+
If the oracle cooldown has already elapsed (i.e., no recent update), a new update can
|
|
35
|
+
be enqueued at any moment. Its new values would activate LAG slots later. This means
|
|
36
|
+
predictions beyond LAG slots could be invalidated by an oracle update that happens
|
|
37
|
+
right after we query.
|
|
38
|
+
|
|
39
|
+
With a LIFETIME-sized window, we'd give a false sense of coverage: the prediction
|
|
40
|
+
would look like it covers 6 slots, but slots beyond LAG could be wrong if an update
|
|
41
|
+
is enqueued after the prediction is computed.
|
|
42
|
+
|
|
43
|
+
By limiting to LAG entries, we guarantee that all predicted L1 fees are the ones that
|
|
44
|
+
will actually be used — no oracle update can change them within this window.
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import { type L1FeeData, MAX_FEE_ASSET_PRICE_MODIFIER_BPS, type RollupContract } from '@aztec/ethereum/contracts';
|
|
2
|
+
import { SlotNumber } from '@aztec/foundation/branded-types';
|
|
3
|
+
import { times } from '@aztec/foundation/collection';
|
|
4
|
+
import type { DateProvider } from '@aztec/foundation/timer';
|
|
5
|
+
import { getSlotAtNextL1Block, getTimestampForSlot } from '@aztec/stdlib/epoch-helpers';
|
|
6
|
+
import {
|
|
7
|
+
FEE_ORACLE_LAG,
|
|
8
|
+
GasFees,
|
|
9
|
+
MIN_ETH_PER_FEE_ASSET,
|
|
10
|
+
ManaUsageEstimate,
|
|
11
|
+
computeExcessMana,
|
|
12
|
+
computeManaMinFee,
|
|
13
|
+
} from '@aztec/stdlib/gas';
|
|
14
|
+
|
|
15
|
+
/** Cached rollup state for fee prediction. Refreshed once per L1 block. */
|
|
16
|
+
type FeeOracleState = {
|
|
17
|
+
lastSlot: SlotNumber;
|
|
18
|
+
excessMana: bigint;
|
|
19
|
+
ethPerFeeAsset: bigint;
|
|
20
|
+
manaTarget: bigint;
|
|
21
|
+
manaLimit: bigint;
|
|
22
|
+
provingCostPerManaEth: bigint;
|
|
23
|
+
epochDuration: bigint;
|
|
24
|
+
/** Pre-resolved L1 fees for each slot in the prediction window. */
|
|
25
|
+
l1FeesBySlot: L1FeeData[];
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Predicts min fees for LAG upcoming slots based on the L1 oracle state.
|
|
30
|
+
* A new oracle update can activate at startSlot + LAG, so only the first LAG entries
|
|
31
|
+
* are guaranteed stable. Caches L1 queries per L1 block and recomputes predictions
|
|
32
|
+
* for each mana usage estimate.
|
|
33
|
+
*/
|
|
34
|
+
export class FeePredictor {
|
|
35
|
+
private cachedState: Promise<FeeOracleState> | undefined;
|
|
36
|
+
private cachedL1BlockNumber: bigint | undefined;
|
|
37
|
+
|
|
38
|
+
private readonly slotDuration: number;
|
|
39
|
+
private readonly l1GenesisTime: bigint;
|
|
40
|
+
private readonly ethereumSlotDuration: number;
|
|
41
|
+
|
|
42
|
+
constructor(
|
|
43
|
+
private readonly rollupContract: RollupContract,
|
|
44
|
+
private readonly publicClient: { getBlockNumber: (opts?: { cacheTime?: number }) => Promise<bigint> },
|
|
45
|
+
private readonly dateProvider: DateProvider,
|
|
46
|
+
config: { slotDuration: number; l1GenesisTime: bigint; ethereumSlotDuration: number },
|
|
47
|
+
) {
|
|
48
|
+
this.slotDuration = config.slotDuration;
|
|
49
|
+
this.l1GenesisTime = config.l1GenesisTime;
|
|
50
|
+
this.ethereumSlotDuration = config.ethereumSlotDuration;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/** Returns predicted min fees for each slot in the prediction window. */
|
|
54
|
+
async getPredictedMinFees(manaUsage: ManaUsageEstimate): Promise<GasFees[]> {
|
|
55
|
+
const state = await this.getState();
|
|
56
|
+
return this.computePredictions(state, manaUsage);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/** Fetches and caches rollup state. Refreshes when L1 block number advances. */
|
|
60
|
+
private async getState(): Promise<FeeOracleState> {
|
|
61
|
+
const blockNumber = await this.publicClient.getBlockNumber({ cacheTime: 0 });
|
|
62
|
+
if (this.cachedL1BlockNumber === undefined || blockNumber > this.cachedL1BlockNumber) {
|
|
63
|
+
this.cachedL1BlockNumber = blockNumber;
|
|
64
|
+
this.cachedState = this.fetchState(blockNumber);
|
|
65
|
+
}
|
|
66
|
+
return this.cachedState!;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
private async fetchState(blockNumber: bigint): Promise<FeeOracleState> {
|
|
70
|
+
// Pin all non-constant queries to this L1 block number for a consistent snapshot.
|
|
71
|
+
const opts = { blockNumber };
|
|
72
|
+
|
|
73
|
+
// Cached constants don't need pinning
|
|
74
|
+
const [manaTarget, manaLimit, provingCostPerManaEth, epochDuration] = await Promise.all([
|
|
75
|
+
this.rollupContract.getManaTarget(),
|
|
76
|
+
this.rollupContract.getManaLimit(),
|
|
77
|
+
this.rollupContract.getProvingCostPerMana(),
|
|
78
|
+
this.rollupContract.getEpochDuration(),
|
|
79
|
+
]);
|
|
80
|
+
|
|
81
|
+
// First, compute the earliest possible nextSlot independently of the checkpoint, so we can
|
|
82
|
+
// evaluate pruneability at the prediction start timestamp instead of the current L1 block time.
|
|
83
|
+
// This avoids an epoch-boundary edge case where the effective parent differs between now and nextSlot.
|
|
84
|
+
const slotConfig = { slotDuration: this.slotDuration, l1GenesisTime: this.l1GenesisTime };
|
|
85
|
+
const currentSlot = await this.rollupContract.getSlotNumber(opts);
|
|
86
|
+
|
|
87
|
+
const slotAtNextL1Block = getSlotAtNextL1Block(BigInt(this.dateProvider.nowInSeconds()), {
|
|
88
|
+
l1GenesisTime: this.l1GenesisTime,
|
|
89
|
+
slotDuration: this.slotDuration,
|
|
90
|
+
ethereumSlotDuration: this.ethereumSlotDuration,
|
|
91
|
+
});
|
|
92
|
+
const preliminaryNextSlot = SlotNumber(Math.max(currentSlot, slotAtNextL1Block));
|
|
93
|
+
const nextSlotTimestamp = getTimestampForSlot(preliminaryNextSlot, slotConfig);
|
|
94
|
+
|
|
95
|
+
// Resolve the effective checkpoint at the prediction start timestamp
|
|
96
|
+
const lastCheckpoint = await this.rollupContract.getEffectivePendingCheckpoint(nextSlotTimestamp, opts);
|
|
97
|
+
const lastSlot = lastCheckpoint.slotNumber;
|
|
98
|
+
// Refine nextSlot: also account for the slot after the last checkpoint
|
|
99
|
+
const nextSlot = SlotNumber(Math.max(SlotNumber.add(lastSlot, 1), preliminaryNextSlot));
|
|
100
|
+
const feeHeader = lastCheckpoint.feeHeader;
|
|
101
|
+
|
|
102
|
+
const slotCount = FEE_ORACLE_LAG;
|
|
103
|
+
const timestamps = times(slotCount, i => getTimestampForSlot(SlotNumber.add(nextSlot, i), slotConfig));
|
|
104
|
+
const l1FeesBySlot = await Promise.all(timestamps.map(ts => this.rollupContract.getL1FeesAt(ts, opts)));
|
|
105
|
+
|
|
106
|
+
return {
|
|
107
|
+
lastSlot,
|
|
108
|
+
excessMana: computeExcessMana(feeHeader.excessMana, feeHeader.manaUsed, manaTarget),
|
|
109
|
+
ethPerFeeAsset: feeHeader.ethPerFeeAsset,
|
|
110
|
+
manaTarget,
|
|
111
|
+
manaLimit,
|
|
112
|
+
provingCostPerManaEth,
|
|
113
|
+
epochDuration: BigInt(epochDuration),
|
|
114
|
+
l1FeesBySlot,
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/** Computes per-slot fee predictions given cached state and a mana usage assumption. */
|
|
119
|
+
private computePredictions(state: FeeOracleState, manaUsage: ManaUsageEstimate): GasFees[] {
|
|
120
|
+
const assumedManaUsed = this.getAssumedManaUsed(state, manaUsage);
|
|
121
|
+
|
|
122
|
+
const result: GasFees[] = [];
|
|
123
|
+
let { excessMana } = state;
|
|
124
|
+
let { ethPerFeeAsset } = state;
|
|
125
|
+
|
|
126
|
+
// Slot 0: current state (next available slot after last checkpoint)
|
|
127
|
+
result.push(this.computeGasFees(state, excessMana, ethPerFeeAsset, state.l1FeesBySlot[0]));
|
|
128
|
+
|
|
129
|
+
// Slots 1..LAG-1: advance excessMana with the assumed mana usage per checkpoint,
|
|
130
|
+
// and decay ethPerFeeAsset by MAX_FEE_ASSET_PRICE_MODIFIER_BPS per slot for conservative estimates.
|
|
131
|
+
// Lower ethPerFeeAsset means higher fees in fee asset terms.
|
|
132
|
+
for (let i = 1; i < state.l1FeesBySlot.length; i++) {
|
|
133
|
+
excessMana = computeExcessMana(excessMana, assumedManaUsed, state.manaTarget);
|
|
134
|
+
const decayed = (ethPerFeeAsset * (10000n - MAX_FEE_ASSET_PRICE_MODIFIER_BPS)) / 10000n;
|
|
135
|
+
ethPerFeeAsset = decayed < MIN_ETH_PER_FEE_ASSET ? MIN_ETH_PER_FEE_ASSET : decayed;
|
|
136
|
+
result.push(this.computeGasFees(state, excessMana, ethPerFeeAsset, state.l1FeesBySlot[i]));
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
return result;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
private getAssumedManaUsed(state: FeeOracleState, manaUsage: ManaUsageEstimate): bigint {
|
|
143
|
+
switch (manaUsage) {
|
|
144
|
+
case ManaUsageEstimate.None:
|
|
145
|
+
return 0n;
|
|
146
|
+
case ManaUsageEstimate.Target:
|
|
147
|
+
return state.manaTarget;
|
|
148
|
+
case ManaUsageEstimate.Limit:
|
|
149
|
+
return state.manaLimit;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
private computeGasFees(
|
|
154
|
+
state: FeeOracleState,
|
|
155
|
+
excessMana: bigint,
|
|
156
|
+
ethPerFeeAsset: bigint,
|
|
157
|
+
l1Fees: L1FeeData,
|
|
158
|
+
): GasFees {
|
|
159
|
+
return new GasFees(
|
|
160
|
+
0,
|
|
161
|
+
computeManaMinFee({
|
|
162
|
+
l1BaseFee: l1Fees.baseFee,
|
|
163
|
+
l1BlobFee: l1Fees.blobFee,
|
|
164
|
+
manaTarget: state.manaTarget,
|
|
165
|
+
epochDuration: state.epochDuration,
|
|
166
|
+
provingCostPerManaEth: state.provingCostPerManaEth,
|
|
167
|
+
excessMana,
|
|
168
|
+
ethPerFeeAsset,
|
|
169
|
+
}),
|
|
170
|
+
);
|
|
171
|
+
}
|
|
172
|
+
}
|