@aztec/sequencer-client 0.0.1-commit.993d52e → 0.0.1-commit.9a89641
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 +23 -5
- package/dest/client/sequencer-client.d.ts.map +1 -1
- package/dest/client/sequencer-client.js +63 -36
- package/dest/config.d.ts +32 -4
- package/dest/config.d.ts.map +1 -1
- package/dest/config.js +76 -32
- 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 -26
- 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 +23 -3
- package/dest/publisher/config.d.ts.map +1 -1
- package/dest/publisher/config.js +36 -6
- 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 +3 -5
- package/dest/publisher/sequencer-publisher-factory.d.ts.map +1 -1
- package/dest/publisher/sequencer-publisher-factory.js +16 -3
- package/dest/publisher/sequencer-publisher.d.ts +112 -65
- package/dest/publisher/sequencer-publisher.d.ts.map +1 -1
- package/dest/publisher/sequencer-publisher.js +758 -388
- 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 +696 -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 +75 -19
- package/dest/sequencer/checkpoint_proposal_job.d.ts.map +1 -1
- package/dest/sequencer/checkpoint_proposal_job.js +846 -264
- 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 +13 -10
- package/dest/sequencer/metrics.d.ts.map +1 -1
- package/dest/sequencer/metrics.js +45 -20
- package/dest/sequencer/missing_committee.d.ts +72 -0
- package/dest/sequencer/missing_committee.d.ts.map +1 -0
- package/dest/sequencer/missing_committee.js +139 -0
- 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 +167 -41
- package/dest/sequencer/sequencer.d.ts.map +1 -1
- package/dest/sequencer/sequencer.js +604 -200
- package/dest/sequencer/types.d.ts +2 -2
- package/dest/sequencer/types.d.ts.map +1 -1
- package/dest/test/index.d.ts +3 -3
- 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/dest/test/utils.d.ts +15 -1
- package/dest/test/utils.d.ts.map +1 -1
- package/dest/test/utils.js +25 -7
- package/package.json +29 -29
- package/src/client/sequencer-client.ts +90 -45
- package/src/config.ts +92 -33
- 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 +19 -88
- package/src/global_variable_builder/index.ts +3 -1
- package/src/publisher/config.ts +71 -7
- 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 +18 -6
- package/src/publisher/sequencer-publisher.ts +847 -474
- 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 +800 -0
- package/src/sequencer/automine/index.ts +6 -0
- package/src/sequencer/checkpoint_proposal_job.ts +1002 -298
- 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 +57 -24
- package/src/sequencer/missing_committee.ts +192 -0
- package/src/sequencer/requests_tracker.ts +43 -0
- package/src/sequencer/sequencer.ts +711 -223
- package/src/sequencer/types.ts +1 -1
- package/src/test/index.ts +2 -2
- package/src/test/mock_checkpoint_builder.ts +51 -48
- package/src/test/utils.ts +61 -10
- package/dest/sequencer/timetable.d.ts +0 -87
- package/dest/sequencer/timetable.d.ts.map +0 -1
- package/dest/sequencer/timetable.js +0 -223
- package/src/sequencer/timetable.ts +0 -283
package/dest/config.d.ts
CHANGED
|
@@ -4,7 +4,6 @@ import { type ConfigMappingsType } from '@aztec/foundation/config';
|
|
|
4
4
|
import { type KeyStoreConfig } from '@aztec/node-keystore/config';
|
|
5
5
|
import { type P2PConfig } from '@aztec/p2p/config';
|
|
6
6
|
import { type ChainConfig, type SequencerConfig } from '@aztec/stdlib/config';
|
|
7
|
-
import type { ResolvedSequencerConfig } from '@aztec/stdlib/interfaces/server';
|
|
8
7
|
import { type ValidatorClientConfig } from '@aztec/validator-client/config';
|
|
9
8
|
import { type SequencerPublisherConfig, type SequencerTxSenderConfig } from './publisher/config.js';
|
|
10
9
|
export * from './publisher/config.js';
|
|
@@ -13,15 +12,44 @@ export type { SequencerConfig };
|
|
|
13
12
|
* Default values for SequencerConfig.
|
|
14
13
|
* Centralized location for all sequencer configuration defaults.
|
|
15
14
|
*/
|
|
16
|
-
export declare const DefaultSequencerConfig:
|
|
15
|
+
export declare const DefaultSequencerConfig: {
|
|
16
|
+
sequencerPollingIntervalMS: number;
|
|
17
|
+
minTxsPerBlock: number;
|
|
18
|
+
buildCheckpointIfEmpty: false;
|
|
19
|
+
publishTxsWithProposals: false;
|
|
20
|
+
perBlockAllocationMultiplier: number;
|
|
21
|
+
perBlockDAAllocationMultiplier: number;
|
|
22
|
+
redistributeCheckpointBudget: true;
|
|
23
|
+
blockDurationMs: number;
|
|
24
|
+
l1PublishingTime: number;
|
|
25
|
+
checkpointProposalSyncGraceSeconds: number;
|
|
26
|
+
attestationPropagationTime: number;
|
|
27
|
+
secondsBeforeInvalidatingBlockAsCommitteeMember: number;
|
|
28
|
+
secondsBeforeInvalidatingBlockAsNonCommitteeMember: number;
|
|
29
|
+
skipCollectingAttestations: false;
|
|
30
|
+
skipInvalidateBlockAsProposer: false;
|
|
31
|
+
skipWaitForValidParentCheckpointOnL1: false;
|
|
32
|
+
broadcastInvalidBlockProposal: false;
|
|
33
|
+
broadcastInvalidCheckpointProposalOnly: false;
|
|
34
|
+
injectFakeAttestation: false;
|
|
35
|
+
injectHighSValueAttestation: false;
|
|
36
|
+
injectUnrecoverableSignatureAttestation: false;
|
|
37
|
+
injectYParityAttestation: false;
|
|
38
|
+
fishermanMode: false;
|
|
39
|
+
governanceProposerForcePayloadVote: false;
|
|
40
|
+
shuffleAttestationOrdering: false;
|
|
41
|
+
skipPushProposedBlocksToArchiver: false;
|
|
42
|
+
skipPublishingCheckpointsPercent: number;
|
|
43
|
+
maxBlocksPerCheckpoint: number;
|
|
44
|
+
};
|
|
17
45
|
/**
|
|
18
46
|
* Configuration settings for the SequencerClient.
|
|
19
47
|
*/
|
|
20
|
-
export type SequencerClientConfig = SequencerPublisherConfig & KeyStoreConfig & ValidatorClientConfig & SequencerTxSenderConfig & SequencerConfig & L1ReaderConfig & ChainConfig & Pick<P2PConfig, '
|
|
48
|
+
export type SequencerClientConfig = SequencerPublisherConfig & KeyStoreConfig & ValidatorClientConfig & SequencerTxSenderConfig & SequencerConfig & L1ReaderConfig & ChainConfig & Pick<P2PConfig, 'txPublicSetupAllowListExtend'> & Pick<L1ContractsConfig, 'ethereumSlotDuration' | 'aztecSlotDuration' | 'aztecEpochDuration'>;
|
|
21
49
|
export declare const sequencerConfigMappings: ConfigMappingsType<SequencerConfig>;
|
|
22
50
|
export declare const sequencerClientConfigMappings: ConfigMappingsType<SequencerClientConfig>;
|
|
23
51
|
/**
|
|
24
52
|
* Creates an instance of SequencerClientConfig out of environment variables using sensible defaults for integration testing if not set.
|
|
25
53
|
*/
|
|
26
54
|
export declare function getConfigEnvVars(): SequencerClientConfig;
|
|
27
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
55
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlnLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvY29uZmlnLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxLQUFLLGlCQUFpQixFQUE2QixNQUFNLHdCQUF3QixDQUFDO0FBQzNGLE9BQU8sRUFBRSxLQUFLLGNBQWMsRUFBMEIsTUFBTSwyQkFBMkIsQ0FBQztBQUN4RixPQUFPLEVBQ0wsS0FBSyxrQkFBa0IsRUFPeEIsTUFBTSwwQkFBMEIsQ0FBQztBQUVsQyxPQUFPLEVBQUUsS0FBSyxjQUFjLEVBQTBCLE1BQU0sNkJBQTZCLENBQUM7QUFDMUYsT0FBTyxFQUFFLEtBQUssU0FBUyxFQUFxQixNQUFNLG1CQUFtQixDQUFDO0FBRXRFLE9BQU8sRUFDTCxLQUFLLFdBQVcsRUFHaEIsS0FBSyxlQUFlLEVBR3JCLE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AAgB,IAAI,qBAAqB,CAExD"}
|
package/dest/config.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { l1ContractsConfigMappings } from '@aztec/ethereum/config';
|
|
2
2
|
import { l1ReaderConfigMappings } from '@aztec/ethereum/l1-reader';
|
|
3
|
-
import { booleanConfigHelper, getConfigFromMappings, numberConfigHelper, pickConfigMappings } from '@aztec/foundation/config';
|
|
3
|
+
import { booleanConfigHelper, floatConfigHelper, getConfigFromMappings, numberConfigHelper, optionalNumberConfigHelper, pickConfigMappings } from '@aztec/foundation/config';
|
|
4
4
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
5
5
|
import { keyStoreConfigMappings } from '@aztec/node-keystore/config';
|
|
6
6
|
import { p2pConfigMappings } from '@aztec/p2p/config';
|
|
7
7
|
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
8
|
-
import {
|
|
8
|
+
import { DEFAULT_BLOCK_DURATION_MS, DEFAULT_MAX_BLOCKS_PER_CHECKPOINT, chainConfigMappings, sharedSequencerConfigMappings } from '@aztec/stdlib/config';
|
|
9
|
+
import { MIN_PER_BLOCK_ALLOCATION_MULTIPLIER, MIN_PER_BLOCK_DA_ALLOCATION_MULTIPLIER } from '@aztec/stdlib/gas';
|
|
9
10
|
import { DEFAULT_P2P_PROPAGATION_TIME } from '@aztec/stdlib/timetable';
|
|
10
11
|
import { validatorClientConfigMappings } from '@aztec/validator-client/config';
|
|
11
12
|
import { sequencerPublisherConfigMappings, sequencerTxSenderConfigMappings } from './publisher/config.js';
|
|
@@ -15,27 +16,33 @@ export * from './publisher/config.js';
|
|
|
15
16
|
* Centralized location for all sequencer configuration defaults.
|
|
16
17
|
*/ export const DefaultSequencerConfig = {
|
|
17
18
|
sequencerPollingIntervalMS: 500,
|
|
18
|
-
maxTxsPerBlock: DEFAULT_MAX_TXS_PER_BLOCK,
|
|
19
19
|
minTxsPerBlock: 1,
|
|
20
20
|
buildCheckpointIfEmpty: false,
|
|
21
21
|
publishTxsWithProposals: false,
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
perBlockAllocationMultiplier: MIN_PER_BLOCK_ALLOCATION_MULTIPLIER,
|
|
23
|
+
perBlockDAAllocationMultiplier: MIN_PER_BLOCK_DA_ALLOCATION_MULTIPLIER,
|
|
24
|
+
redistributeCheckpointBudget: true,
|
|
25
|
+
blockDurationMs: DEFAULT_BLOCK_DURATION_MS,
|
|
26
|
+
l1PublishingTime: 12,
|
|
27
|
+
checkpointProposalSyncGraceSeconds: 2 * (DEFAULT_BLOCK_DURATION_MS / 1000),
|
|
26
28
|
attestationPropagationTime: DEFAULT_P2P_PROPAGATION_TIME,
|
|
27
29
|
secondsBeforeInvalidatingBlockAsCommitteeMember: 144,
|
|
28
30
|
secondsBeforeInvalidatingBlockAsNonCommitteeMember: 432,
|
|
29
31
|
skipCollectingAttestations: false,
|
|
30
32
|
skipInvalidateBlockAsProposer: false,
|
|
33
|
+
skipWaitForValidParentCheckpointOnL1: false,
|
|
31
34
|
broadcastInvalidBlockProposal: false,
|
|
35
|
+
broadcastInvalidCheckpointProposalOnly: false,
|
|
32
36
|
injectFakeAttestation: false,
|
|
33
37
|
injectHighSValueAttestation: false,
|
|
34
38
|
injectUnrecoverableSignatureAttestation: false,
|
|
39
|
+
injectYParityAttestation: false,
|
|
35
40
|
fishermanMode: false,
|
|
41
|
+
governanceProposerForcePayloadVote: false,
|
|
36
42
|
shuffleAttestationOrdering: false,
|
|
37
43
|
skipPushProposedBlocksToArchiver: false,
|
|
38
|
-
skipPublishingCheckpointsPercent: 0
|
|
44
|
+
skipPublishingCheckpointsPercent: 0,
|
|
45
|
+
maxBlocksPerCheckpoint: DEFAULT_MAX_BLOCKS_PER_CHECKPOINT
|
|
39
46
|
};
|
|
40
47
|
export const sequencerConfigMappings = {
|
|
41
48
|
sequencerPollingIntervalMS: {
|
|
@@ -43,6 +50,11 @@ export const sequencerConfigMappings = {
|
|
|
43
50
|
description: 'The number of ms to wait between polling for checking to build on the next slot.',
|
|
44
51
|
...numberConfigHelper(DefaultSequencerConfig.sequencerPollingIntervalMS)
|
|
45
52
|
},
|
|
53
|
+
maxTxsPerCheckpoint: {
|
|
54
|
+
env: 'SEQ_MAX_TX_PER_CHECKPOINT',
|
|
55
|
+
description: 'The maximum number of txs across all blocks in a checkpoint.',
|
|
56
|
+
...optionalNumberConfigHelper()
|
|
57
|
+
},
|
|
46
58
|
minTxsPerBlock: {
|
|
47
59
|
env: 'SEQ_MIN_TX_PER_BLOCK',
|
|
48
60
|
description: 'The minimum number of txs to include in a block.',
|
|
@@ -59,21 +71,36 @@ export const sequencerConfigMappings = {
|
|
|
59
71
|
maxL2BlockGas: {
|
|
60
72
|
env: 'SEQ_MAX_L2_BLOCK_GAS',
|
|
61
73
|
description: 'The maximum L2 block gas.',
|
|
62
|
-
...
|
|
74
|
+
...optionalNumberConfigHelper()
|
|
63
75
|
},
|
|
64
76
|
maxDABlockGas: {
|
|
65
77
|
env: 'SEQ_MAX_DA_BLOCK_GAS',
|
|
66
78
|
description: 'The maximum DA block gas.',
|
|
67
|
-
...
|
|
79
|
+
...optionalNumberConfigHelper()
|
|
80
|
+
},
|
|
81
|
+
perBlockAllocationMultiplier: {
|
|
82
|
+
env: 'SEQ_PER_BLOCK_ALLOCATION_MULTIPLIER',
|
|
83
|
+
description: 'Per-block gas budget multiplier for both L2 and DA gas. Budget per block is (checkpointLimit / maxBlocks) * multiplier.' + ' Values greater than one allow early blocks to use more than their even share, relying on checkpoint-level capping for later blocks.',
|
|
84
|
+
...floatConfigHelper(DefaultSequencerConfig.perBlockAllocationMultiplier)
|
|
85
|
+
},
|
|
86
|
+
perBlockDAAllocationMultiplier: {
|
|
87
|
+
env: 'SEQ_PER_BLOCK_DA_ALLOCATION_MULTIPLIER',
|
|
88
|
+
description: 'Per-block budget multiplier applied to DA gas and blob fields in place of perBlockAllocationMultiplier.' + ' Defaults higher than the general multiplier so the largest contract class deploy fits a single block.',
|
|
89
|
+
...floatConfigHelper(DefaultSequencerConfig.perBlockDAAllocationMultiplier)
|
|
90
|
+
},
|
|
91
|
+
redistributeCheckpointBudget: {
|
|
92
|
+
env: 'SEQ_REDISTRIBUTE_CHECKPOINT_BUDGET',
|
|
93
|
+
description: 'Redistribute remaining checkpoint budget evenly across remaining blocks instead of allowing a single block to consume the entire remaining budget.',
|
|
94
|
+
...booleanConfigHelper(DefaultSequencerConfig.redistributeCheckpointBudget)
|
|
68
95
|
},
|
|
69
96
|
coinbase: {
|
|
70
97
|
env: 'COINBASE',
|
|
71
|
-
parseEnv: (val)=>
|
|
98
|
+
parseEnv: (val)=>EthAddress.fromString(val),
|
|
72
99
|
description: 'Recipient of block reward.'
|
|
73
100
|
},
|
|
74
101
|
feeRecipient: {
|
|
75
102
|
env: 'FEE_RECIPIENT',
|
|
76
|
-
parseEnv: (val)=>AztecAddress.
|
|
103
|
+
parseEnv: (val)=>AztecAddress.fromStringUnsafe(val),
|
|
77
104
|
description: 'Address to receive fees.'
|
|
78
105
|
},
|
|
79
106
|
acvmWorkingDirectory: {
|
|
@@ -84,30 +111,20 @@ export const sequencerConfigMappings = {
|
|
|
84
111
|
env: 'ACVM_BINARY_PATH',
|
|
85
112
|
description: 'The path to the ACVM binary'
|
|
86
113
|
},
|
|
87
|
-
maxBlockSizeInBytes: {
|
|
88
|
-
env: 'SEQ_MAX_BLOCK_SIZE_IN_BYTES',
|
|
89
|
-
description: 'Max block size',
|
|
90
|
-
...numberConfigHelper(DefaultSequencerConfig.maxBlockSizeInBytes)
|
|
91
|
-
},
|
|
92
|
-
enforceTimeTable: {
|
|
93
|
-
env: 'SEQ_ENFORCE_TIME_TABLE',
|
|
94
|
-
description: 'Whether to enforce the time table when building blocks',
|
|
95
|
-
...booleanConfigHelper(DefaultSequencerConfig.enforceTimeTable)
|
|
96
|
-
},
|
|
97
114
|
governanceProposerPayload: {
|
|
98
115
|
env: 'GOVERNANCE_PROPOSER_PAYLOAD_ADDRESS',
|
|
99
116
|
description: 'The address of the payload for the governanceProposer',
|
|
100
117
|
parseEnv: (val)=>EthAddress.fromString(val)
|
|
101
118
|
},
|
|
119
|
+
governanceProposerForcePayloadVote: {
|
|
120
|
+
env: 'GOVERNANCE_PROPOSER_FORCE_PAYLOAD_VOTE',
|
|
121
|
+
description: 'Keep signalling the configured governance payload even if a proposal referencing it was already executed.',
|
|
122
|
+
...booleanConfigHelper(DefaultSequencerConfig.governanceProposerForcePayloadVote)
|
|
123
|
+
},
|
|
102
124
|
l1PublishingTime: {
|
|
103
125
|
env: 'SEQ_L1_PUBLISHING_TIME_ALLOWANCE_IN_SLOT',
|
|
104
|
-
description: 'How much time
|
|
105
|
-
|
|
106
|
-
},
|
|
107
|
-
attestationPropagationTime: {
|
|
108
|
-
env: 'SEQ_ATTESTATION_PROPAGATION_TIME',
|
|
109
|
-
description: 'How many seconds it takes for proposals and attestations to travel across the p2p layer (one-way)',
|
|
110
|
-
...numberConfigHelper(DefaultSequencerConfig.attestationPropagationTime)
|
|
126
|
+
description: 'How much time in seconds to allow in the slot for publishing the L1 transaction.',
|
|
127
|
+
...numberConfigHelper(DefaultSequencerConfig.l1PublishingTime)
|
|
111
128
|
},
|
|
112
129
|
fakeProcessingDelayPerTxMs: {
|
|
113
130
|
description: 'Used for testing to introduce a fake delay after processing each tx'
|
|
@@ -133,10 +150,22 @@ export const sequencerConfigMappings = {
|
|
|
133
150
|
description: 'Do not invalidate the previous block if invalid when we are the proposer (for testing only)',
|
|
134
151
|
...booleanConfigHelper(DefaultSequencerConfig.skipInvalidateBlockAsProposer)
|
|
135
152
|
},
|
|
153
|
+
skipWaitForValidParentCheckpointOnL1: {
|
|
154
|
+
description: 'Bypass the parent checkpoint validity check before submitting a pipelined checkpoint, ' + 'allowing the proposer to publish even when the parent landed on L1 with invalid attestations (for testing only)',
|
|
155
|
+
...booleanConfigHelper(DefaultSequencerConfig.skipWaitForValidParentCheckpointOnL1)
|
|
156
|
+
},
|
|
136
157
|
broadcastInvalidBlockProposal: {
|
|
137
158
|
description: 'Broadcast invalid block proposals with corrupted state (for testing only)',
|
|
138
159
|
...booleanConfigHelper(DefaultSequencerConfig.broadcastInvalidBlockProposal)
|
|
139
160
|
},
|
|
161
|
+
invalidBlockProposalIndexWithinCheckpoint: {
|
|
162
|
+
description: 'Broadcast an invalid block proposal only at this indexWithinCheckpoint (for testing only)',
|
|
163
|
+
...optionalNumberConfigHelper()
|
|
164
|
+
},
|
|
165
|
+
broadcastInvalidCheckpointProposalOnly: {
|
|
166
|
+
description: 'Broadcast invalid checkpoint proposals while keeping the underlying block proposals valid (for testing only). When unset, the checkpoint follows broadcastInvalidBlockProposal.',
|
|
167
|
+
...booleanConfigHelper(DefaultSequencerConfig.broadcastInvalidCheckpointProposalOnly)
|
|
168
|
+
},
|
|
140
169
|
injectFakeAttestation: {
|
|
141
170
|
description: 'Inject a fake attestation (for testing only)',
|
|
142
171
|
...booleanConfigHelper(DefaultSequencerConfig.injectFakeAttestation)
|
|
@@ -149,6 +178,10 @@ export const sequencerConfigMappings = {
|
|
|
149
178
|
description: 'Inject an attestation with an unrecoverable signature (for testing only)',
|
|
150
179
|
...booleanConfigHelper(DefaultSequencerConfig.injectUnrecoverableSignatureAttestation)
|
|
151
180
|
},
|
|
181
|
+
injectYParityAttestation: {
|
|
182
|
+
description: 'Inject a non-proposer attestation slot in yParity form in the packed L1 tuple (for testing only)',
|
|
183
|
+
...booleanConfigHelper(DefaultSequencerConfig.injectYParityAttestation)
|
|
184
|
+
},
|
|
152
185
|
fishermanMode: {
|
|
153
186
|
env: 'FISHERMAN_MODE',
|
|
154
187
|
description: 'Whether to run in fisherman mode: builds blocks on every slot for validation without publishing to L1',
|
|
@@ -165,7 +198,7 @@ export const sequencerConfigMappings = {
|
|
|
165
198
|
...booleanConfigHelper(DefaultSequencerConfig.buildCheckpointIfEmpty)
|
|
166
199
|
},
|
|
167
200
|
skipPushProposedBlocksToArchiver: {
|
|
168
|
-
description: 'Skip pushing proposed blocks to archiver (
|
|
201
|
+
description: 'Skip pushing proposed blocks to archiver (test only)',
|
|
169
202
|
...booleanConfigHelper(DefaultSequencerConfig.skipPushProposedBlocksToArchiver)
|
|
170
203
|
},
|
|
171
204
|
minBlocksForCheckpoint: {
|
|
@@ -176,18 +209,29 @@ export const sequencerConfigMappings = {
|
|
|
176
209
|
description: 'Percent probability (0 - 100) of sequencer skipping checkpoint publishing (testing only)',
|
|
177
210
|
...numberConfigHelper(DefaultSequencerConfig.skipPublishingCheckpointsPercent)
|
|
178
211
|
},
|
|
212
|
+
skipBroadcastProposals: {
|
|
213
|
+
description: 'Skip broadcasting checkpoint and block proposals via gossipsub when proposer (for testing only)',
|
|
214
|
+
...booleanConfigHelper(false)
|
|
215
|
+
},
|
|
216
|
+
skipBroadcastCheckpointProposal: {
|
|
217
|
+
description: 'Skip broadcasting only the CheckpointProposal via gossipsub when proposer; the held last block is broadcast ' + 'standalone instead so peers still receive it as a proposed-but-uncheckpointed tip (for testing only)',
|
|
218
|
+
...booleanConfigHelper(false)
|
|
219
|
+
},
|
|
220
|
+
pauseProposingForSlots: {
|
|
221
|
+
description: 'List of slots for which the sequencer will not produce a proposal (for testing only). Attestation paths are unaffected.'
|
|
222
|
+
},
|
|
179
223
|
...pickConfigMappings(p2pConfigMappings, [
|
|
180
|
-
'
|
|
224
|
+
'txPublicSetupAllowListExtend'
|
|
181
225
|
])
|
|
182
226
|
};
|
|
183
227
|
export const sequencerClientConfigMappings = {
|
|
228
|
+
...chainConfigMappings,
|
|
184
229
|
...validatorClientConfigMappings,
|
|
185
230
|
...sequencerConfigMappings,
|
|
186
231
|
...keyStoreConfigMappings,
|
|
187
232
|
...l1ReaderConfigMappings,
|
|
188
233
|
...sequencerTxSenderConfigMappings,
|
|
189
234
|
...sequencerPublisherConfigMappings,
|
|
190
|
-
...chainConfigMappings,
|
|
191
235
|
...pickConfigMappings(l1ContractsConfigMappings, [
|
|
192
236
|
'ethereumSlotDuration',
|
|
193
237
|
'aztecSlotDuration',
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { type RollupContract } from '@aztec/ethereum/contracts';
|
|
2
|
+
import type { DateProvider } from '@aztec/foundation/timer';
|
|
3
|
+
import { GasFees, ManaUsageEstimate } from '@aztec/stdlib/gas';
|
|
4
|
+
/**
|
|
5
|
+
* Predicts min fees for LAG upcoming slots based on the L1 oracle state.
|
|
6
|
+
* A new oracle update can activate at startSlot + LAG, so only the first LAG entries
|
|
7
|
+
* are guaranteed stable. Caches L1 queries per L1 block and recomputes predictions
|
|
8
|
+
* for each mana usage estimate.
|
|
9
|
+
*/
|
|
10
|
+
export declare class FeePredictor {
|
|
11
|
+
private readonly rollupContract;
|
|
12
|
+
private readonly publicClient;
|
|
13
|
+
private readonly dateProvider;
|
|
14
|
+
private cachedState;
|
|
15
|
+
private cachedL1BlockNumber;
|
|
16
|
+
private readonly slotDuration;
|
|
17
|
+
private readonly l1GenesisTime;
|
|
18
|
+
private readonly ethereumSlotDuration;
|
|
19
|
+
constructor(rollupContract: RollupContract, publicClient: {
|
|
20
|
+
getBlockNumber: (opts?: {
|
|
21
|
+
cacheTime?: number;
|
|
22
|
+
}) => Promise<bigint>;
|
|
23
|
+
}, dateProvider: DateProvider, config: {
|
|
24
|
+
slotDuration: number;
|
|
25
|
+
l1GenesisTime: bigint;
|
|
26
|
+
ethereumSlotDuration: number;
|
|
27
|
+
});
|
|
28
|
+
/** Returns predicted min fees for each slot in the prediction window. */
|
|
29
|
+
getPredictedMinFees(manaUsage: ManaUsageEstimate): Promise<GasFees[]>;
|
|
30
|
+
private getState;
|
|
31
|
+
private fetchState;
|
|
32
|
+
/** Computes per-slot fee predictions given cached state and a mana usage assumption. */
|
|
33
|
+
private computePredictions;
|
|
34
|
+
private getAssumedManaUsed;
|
|
35
|
+
private computeGasFees;
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmVlX3ByZWRpY3Rvci5kLnRzIiwic291cmNlU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AAE;QAAE,YAAY,EAAE,MAAM,CAAC;QAAC,aAAa,EAAE,MAAM,CAAC;QAAC,oBAAoB,EAAE,MAAM,CAAA;KAAE,EAKtF;IAED,yEAAyE;IACnE,mBAAmB,CAAC,SAAS,EAAE,iBAAiB,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC,CAG1E;YAGa,QAAQ;YAmBR,UAAU;IAiDxB,wFAAwF;IACxF,OAAO,CAAC,kBAAkB;IAuB1B,OAAO,CAAC,kBAAkB;IAW1B,OAAO,CAAC,cAAc;CAmBvB"}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { MAX_FEE_ASSET_PRICE_MODIFIER_BPS } from '@aztec/ethereum/contracts';
|
|
2
|
+
import { SlotNumber } from '@aztec/foundation/branded-types';
|
|
3
|
+
import { times } from '@aztec/foundation/collection';
|
|
4
|
+
import { getSlotAtNextL1Block, getTimestampForSlot } from '@aztec/stdlib/epoch-helpers';
|
|
5
|
+
import { FEE_ORACLE_LAG, GasFees, MIN_ETH_PER_FEE_ASSET, ManaUsageEstimate, computeExcessMana, computeManaMinFee } from '@aztec/stdlib/gas';
|
|
6
|
+
/**
|
|
7
|
+
* Predicts min fees for LAG upcoming slots based on the L1 oracle state.
|
|
8
|
+
* A new oracle update can activate at startSlot + LAG, so only the first LAG entries
|
|
9
|
+
* are guaranteed stable. Caches L1 queries per L1 block and recomputes predictions
|
|
10
|
+
* for each mana usage estimate.
|
|
11
|
+
*/ export class FeePredictor {
|
|
12
|
+
rollupContract;
|
|
13
|
+
publicClient;
|
|
14
|
+
dateProvider;
|
|
15
|
+
cachedState;
|
|
16
|
+
cachedL1BlockNumber;
|
|
17
|
+
slotDuration;
|
|
18
|
+
l1GenesisTime;
|
|
19
|
+
ethereumSlotDuration;
|
|
20
|
+
constructor(rollupContract, publicClient, dateProvider, config){
|
|
21
|
+
this.rollupContract = rollupContract;
|
|
22
|
+
this.publicClient = publicClient;
|
|
23
|
+
this.dateProvider = dateProvider;
|
|
24
|
+
this.slotDuration = config.slotDuration;
|
|
25
|
+
this.l1GenesisTime = config.l1GenesisTime;
|
|
26
|
+
this.ethereumSlotDuration = config.ethereumSlotDuration;
|
|
27
|
+
}
|
|
28
|
+
/** Returns predicted min fees for each slot in the prediction window. */ async getPredictedMinFees(manaUsage) {
|
|
29
|
+
const state = await this.getState();
|
|
30
|
+
return this.computePredictions(state, manaUsage);
|
|
31
|
+
}
|
|
32
|
+
/** Fetches and caches rollup state. Refreshes when L1 block number advances. */ async getState() {
|
|
33
|
+
const blockNumber = await this.publicClient.getBlockNumber({
|
|
34
|
+
cacheTime: 0
|
|
35
|
+
});
|
|
36
|
+
if (this.cachedL1BlockNumber === undefined || blockNumber > this.cachedL1BlockNumber) {
|
|
37
|
+
this.cachedL1BlockNumber = blockNumber;
|
|
38
|
+
// Reset the cached block number on failure so a transient L1 RPC error does not leave a
|
|
39
|
+
// rejected promise cached for this block, which would replay the same rejection on every
|
|
40
|
+
// subsequent call until the next L1 block arrives. Only clear it if it still points at the
|
|
41
|
+
// block this attempt was for, so a stale rejection from an older block cannot wipe a marker
|
|
42
|
+
// a newer call already advanced (which would also defeat the monotonic block-number guard).
|
|
43
|
+
this.cachedState = this.fetchState(blockNumber).catch((err)=>{
|
|
44
|
+
if (this.cachedL1BlockNumber === blockNumber) {
|
|
45
|
+
this.cachedL1BlockNumber = undefined;
|
|
46
|
+
}
|
|
47
|
+
throw err;
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
return this.cachedState;
|
|
51
|
+
}
|
|
52
|
+
async fetchState(blockNumber) {
|
|
53
|
+
// Pin all non-constant queries to this L1 block number for a consistent snapshot.
|
|
54
|
+
const opts = {
|
|
55
|
+
blockNumber
|
|
56
|
+
};
|
|
57
|
+
// Cached constants don't need pinning
|
|
58
|
+
const [manaTarget, manaLimit, provingCostPerManaEth, epochDuration] = await Promise.all([
|
|
59
|
+
this.rollupContract.getManaTarget(),
|
|
60
|
+
this.rollupContract.getManaLimit(),
|
|
61
|
+
this.rollupContract.getProvingCostPerMana(),
|
|
62
|
+
this.rollupContract.getEpochDuration()
|
|
63
|
+
]);
|
|
64
|
+
// First, compute the earliest possible nextSlot independently of the checkpoint, so we can
|
|
65
|
+
// evaluate pruneability at the prediction start timestamp instead of the current L1 block time.
|
|
66
|
+
// This avoids an epoch-boundary edge case where the effective parent differs between now and nextSlot.
|
|
67
|
+
const slotConfig = {
|
|
68
|
+
slotDuration: this.slotDuration,
|
|
69
|
+
l1GenesisTime: this.l1GenesisTime
|
|
70
|
+
};
|
|
71
|
+
const currentSlot = await this.rollupContract.getSlotNumber(opts);
|
|
72
|
+
const slotAtNextL1Block = getSlotAtNextL1Block(BigInt(this.dateProvider.nowInSeconds()), {
|
|
73
|
+
l1GenesisTime: this.l1GenesisTime,
|
|
74
|
+
slotDuration: this.slotDuration,
|
|
75
|
+
ethereumSlotDuration: this.ethereumSlotDuration
|
|
76
|
+
});
|
|
77
|
+
const preliminaryNextSlot = SlotNumber(Math.max(currentSlot, slotAtNextL1Block));
|
|
78
|
+
const nextSlotTimestamp = getTimestampForSlot(preliminaryNextSlot, slotConfig);
|
|
79
|
+
// Resolve the effective checkpoint at the prediction start timestamp
|
|
80
|
+
const lastCheckpoint = await this.rollupContract.getEffectivePendingCheckpoint(nextSlotTimestamp, opts);
|
|
81
|
+
const lastSlot = lastCheckpoint.slotNumber;
|
|
82
|
+
// Refine nextSlot: also account for the slot after the last checkpoint
|
|
83
|
+
const nextSlot = SlotNumber(Math.max(SlotNumber.add(lastSlot, 1), preliminaryNextSlot));
|
|
84
|
+
const feeHeader = lastCheckpoint.feeHeader;
|
|
85
|
+
const slotCount = FEE_ORACLE_LAG;
|
|
86
|
+
const timestamps = times(slotCount, (i)=>getTimestampForSlot(SlotNumber.add(nextSlot, i), slotConfig));
|
|
87
|
+
const l1FeesBySlot = await Promise.all(timestamps.map((ts)=>this.rollupContract.getL1FeesAt(ts, opts)));
|
|
88
|
+
return {
|
|
89
|
+
lastSlot,
|
|
90
|
+
excessMana: computeExcessMana(feeHeader.excessMana, feeHeader.manaUsed, manaTarget),
|
|
91
|
+
ethPerFeeAsset: feeHeader.ethPerFeeAsset,
|
|
92
|
+
manaTarget,
|
|
93
|
+
manaLimit,
|
|
94
|
+
provingCostPerManaEth,
|
|
95
|
+
epochDuration: BigInt(epochDuration),
|
|
96
|
+
l1FeesBySlot
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
/** Computes per-slot fee predictions given cached state and a mana usage assumption. */ computePredictions(state, manaUsage) {
|
|
100
|
+
const assumedManaUsed = this.getAssumedManaUsed(state, manaUsage);
|
|
101
|
+
const result = [];
|
|
102
|
+
let { excessMana } = state;
|
|
103
|
+
let { ethPerFeeAsset } = state;
|
|
104
|
+
// Slot 0: current state (next available slot after last checkpoint)
|
|
105
|
+
result.push(this.computeGasFees(state, excessMana, ethPerFeeAsset, state.l1FeesBySlot[0]));
|
|
106
|
+
// Slots 1..LAG-1: advance excessMana with the assumed mana usage per checkpoint,
|
|
107
|
+
// and decay ethPerFeeAsset by MAX_FEE_ASSET_PRICE_MODIFIER_BPS per slot for conservative estimates.
|
|
108
|
+
// Lower ethPerFeeAsset means higher fees in fee asset terms.
|
|
109
|
+
for(let i = 1; i < state.l1FeesBySlot.length; i++){
|
|
110
|
+
excessMana = computeExcessMana(excessMana, assumedManaUsed, state.manaTarget);
|
|
111
|
+
const decayed = ethPerFeeAsset * (10000n - MAX_FEE_ASSET_PRICE_MODIFIER_BPS) / 10000n;
|
|
112
|
+
ethPerFeeAsset = decayed < MIN_ETH_PER_FEE_ASSET ? MIN_ETH_PER_FEE_ASSET : decayed;
|
|
113
|
+
result.push(this.computeGasFees(state, excessMana, ethPerFeeAsset, state.l1FeesBySlot[i]));
|
|
114
|
+
}
|
|
115
|
+
return result;
|
|
116
|
+
}
|
|
117
|
+
getAssumedManaUsed(state, manaUsage) {
|
|
118
|
+
switch(manaUsage){
|
|
119
|
+
case ManaUsageEstimate.None:
|
|
120
|
+
return 0n;
|
|
121
|
+
case ManaUsageEstimate.Target:
|
|
122
|
+
return state.manaTarget;
|
|
123
|
+
case ManaUsageEstimate.Limit:
|
|
124
|
+
return state.manaLimit;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
computeGasFees(state, excessMana, ethPerFeeAsset, l1Fees) {
|
|
128
|
+
return new GasFees(0, computeManaMinFee({
|
|
129
|
+
l1BaseFee: l1Fees.baseFee,
|
|
130
|
+
l1BlobFee: l1Fees.blobFee,
|
|
131
|
+
manaTarget: state.manaTarget,
|
|
132
|
+
epochDuration: state.epochDuration,
|
|
133
|
+
provingCostPerManaEth: state.provingCostPerManaEth,
|
|
134
|
+
excessMana,
|
|
135
|
+
ethPerFeeAsset
|
|
136
|
+
}));
|
|
137
|
+
}
|
|
138
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ViemPublicClient } from '@aztec/ethereum/types';
|
|
2
|
+
import type { DateProvider } from '@aztec/foundation/timer';
|
|
3
|
+
import { GasFees, ManaUsageEstimate } from '@aztec/stdlib/gas';
|
|
4
|
+
import type { FeeProvider } from '@aztec/stdlib/tx';
|
|
5
|
+
import type { GlobalVariableBuilderConfig } from './global_builder.js';
|
|
6
|
+
/** Provides current and predicted fee information based on on-chain state. */
|
|
7
|
+
export declare class FeeProviderImpl implements FeeProvider {
|
|
8
|
+
private readonly dateProvider;
|
|
9
|
+
private readonly publicClient;
|
|
10
|
+
private currentMinFees;
|
|
11
|
+
private currentL1BlockNumber;
|
|
12
|
+
private readonly rollupContract;
|
|
13
|
+
private readonly feePredictor;
|
|
14
|
+
private readonly ethereumSlotDuration;
|
|
15
|
+
private readonly l1GenesisTime;
|
|
16
|
+
constructor(dateProvider: DateProvider, publicClient: ViemPublicClient, config: GlobalVariableBuilderConfig);
|
|
17
|
+
private computeCurrentMinFees;
|
|
18
|
+
getCurrentMinFees(): Promise<GasFees>;
|
|
19
|
+
getPredictedMinFees(manaUsage?: ManaUsageEstimate): Promise<GasFees[]>;
|
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AmB,CAAC,SAAS,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC,CAOlF;CACF"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { RollupContract } from '@aztec/ethereum/contracts';
|
|
2
|
+
import { SlotNumber } from '@aztec/foundation/branded-types';
|
|
3
|
+
import { getNextL1SlotTimestamp } from '@aztec/stdlib/epoch-helpers';
|
|
4
|
+
import { GasFees, ManaUsageEstimate } from '@aztec/stdlib/gas';
|
|
5
|
+
import { FeePredictor } from './fee_predictor.js';
|
|
6
|
+
/** Provides current and predicted fee information based on on-chain state. */ export class FeeProviderImpl {
|
|
7
|
+
dateProvider;
|
|
8
|
+
publicClient;
|
|
9
|
+
currentMinFees;
|
|
10
|
+
currentL1BlockNumber;
|
|
11
|
+
rollupContract;
|
|
12
|
+
feePredictor;
|
|
13
|
+
ethereumSlotDuration;
|
|
14
|
+
l1GenesisTime;
|
|
15
|
+
constructor(dateProvider, publicClient, config){
|
|
16
|
+
this.dateProvider = dateProvider;
|
|
17
|
+
this.publicClient = publicClient;
|
|
18
|
+
this.currentMinFees = Promise.resolve(new GasFees(0, 0));
|
|
19
|
+
this.currentL1BlockNumber = undefined;
|
|
20
|
+
this.ethereumSlotDuration = config.ethereumSlotDuration;
|
|
21
|
+
this.l1GenesisTime = config.l1GenesisTime;
|
|
22
|
+
this.rollupContract = new RollupContract(this.publicClient, config.rollupAddress);
|
|
23
|
+
this.feePredictor = new FeePredictor(this.rollupContract, this.publicClient, this.dateProvider, {
|
|
24
|
+
slotDuration: config.slotDuration,
|
|
25
|
+
l1GenesisTime: config.l1GenesisTime,
|
|
26
|
+
ethereumSlotDuration: config.ethereumSlotDuration
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Computes the "current" min fees, e.g., the price that you currently should pay to get include in the next block
|
|
31
|
+
* @returns Min fees for the next block
|
|
32
|
+
*/ async computeCurrentMinFees() {
|
|
33
|
+
// Since this might be called in the middle of a slot where a block might have been published,
|
|
34
|
+
// we need to fetch the last block written, and estimate the earliest timestamp for the next block.
|
|
35
|
+
// The timestamp of that last block will act as a lower bound for the next block.
|
|
36
|
+
const lastCheckpoint = await this.rollupContract.getPendingCheckpoint();
|
|
37
|
+
const earliestTimestamp = await this.rollupContract.getTimestampForSlot(SlotNumber.fromBigInt(BigInt(lastCheckpoint.slotNumber) + 1n));
|
|
38
|
+
const nextEthTimestamp = getNextL1SlotTimestamp(this.dateProvider.nowInSeconds(), {
|
|
39
|
+
l1GenesisTime: this.l1GenesisTime,
|
|
40
|
+
ethereumSlotDuration: this.ethereumSlotDuration
|
|
41
|
+
});
|
|
42
|
+
const timestamp = earliestTimestamp > nextEthTimestamp ? earliestTimestamp : nextEthTimestamp;
|
|
43
|
+
return new GasFees(0, await this.rollupContract.getManaMinFeeAt(timestamp, true));
|
|
44
|
+
}
|
|
45
|
+
async getCurrentMinFees() {
|
|
46
|
+
// Get the current block number
|
|
47
|
+
const blockNumber = await this.publicClient.getBlockNumber({
|
|
48
|
+
cacheTime: 0
|
|
49
|
+
});
|
|
50
|
+
// If the L1 block number has changed then chain a new promise to get the current min fees.
|
|
51
|
+
// We chain off the previous promise's settlement (via a swallowing catch) rather than its
|
|
52
|
+
// fulfillment, so a prior rejection does not short-circuit the new computation. If the new
|
|
53
|
+
// computation fails (e.g. a transient L1 RPC error), reset the cached block number so the
|
|
54
|
+
// next call recomputes instead of permanently replaying the rejected promise — otherwise a
|
|
55
|
+
// single transient failure would wedge fee estimation until the next L1 block arrives. Only
|
|
56
|
+
// clear it if it still points at the block this attempt was for, so a stale rejection from an
|
|
57
|
+
// older block cannot wipe a marker a newer call already advanced (which would also defeat the
|
|
58
|
+
// monotonic block-number guard).
|
|
59
|
+
if (this.currentL1BlockNumber === undefined || blockNumber > this.currentL1BlockNumber) {
|
|
60
|
+
this.currentL1BlockNumber = blockNumber;
|
|
61
|
+
this.currentMinFees = this.currentMinFees.catch(()=>undefined).then(()=>this.computeCurrentMinFees().catch((err)=>{
|
|
62
|
+
if (this.currentL1BlockNumber === blockNumber) {
|
|
63
|
+
this.currentL1BlockNumber = undefined;
|
|
64
|
+
}
|
|
65
|
+
throw err;
|
|
66
|
+
}));
|
|
67
|
+
}
|
|
68
|
+
return this.currentMinFees;
|
|
69
|
+
}
|
|
70
|
+
async getPredictedMinFees(manaUsage) {
|
|
71
|
+
const [currentMinFees, predictedMinFees] = await Promise.all([
|
|
72
|
+
this.getCurrentMinFees(),
|
|
73
|
+
this.feePredictor.getPredictedMinFees(manaUsage ?? ManaUsageEstimate.Target)
|
|
74
|
+
]);
|
|
75
|
+
return [
|
|
76
|
+
currentMinFees,
|
|
77
|
+
...predictedMinFees
|
|
78
|
+
];
|
|
79
|
+
}
|
|
80
|
+
}
|
|
@@ -1,41 +1,28 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import type {
|
|
3
|
-
import {
|
|
1
|
+
import { type SimulationOverridesPlan } from '@aztec/ethereum/contracts';
|
|
2
|
+
import type { ViemPublicClient } from '@aztec/ethereum/types';
|
|
3
|
+
import type { SlotNumber } from '@aztec/foundation/branded-types';
|
|
4
4
|
import type { EthAddress } from '@aztec/foundation/eth-address';
|
|
5
5
|
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
6
6
|
import { type L1RollupConstants } from '@aztec/stdlib/epoch-helpers';
|
|
7
|
-
import { GasFees } from '@aztec/stdlib/gas';
|
|
8
7
|
import type { CheckpointGlobalVariables, GlobalVariableBuilder as GlobalVariableBuilderInterface } from '@aztec/stdlib/tx';
|
|
9
|
-
|
|
8
|
+
/** Configuration for the GlobalVariableBuilder (excludes L1 client config). */
|
|
9
|
+
export type GlobalVariableBuilderConfig = {
|
|
10
|
+
rollupAddress: EthAddress;
|
|
11
|
+
ethereumSlotDuration: number;
|
|
12
|
+
rollupVersion: bigint;
|
|
13
|
+
} & Pick<L1RollupConstants, 'slotDuration' | 'l1GenesisTime'>;
|
|
10
14
|
/**
|
|
11
15
|
* Simple global variables builder.
|
|
12
16
|
*/
|
|
13
17
|
export declare class GlobalVariableBuilder implements GlobalVariableBuilderInterface {
|
|
14
|
-
private log;
|
|
15
|
-
private currentMinFees;
|
|
16
|
-
private currentL1BlockNumber;
|
|
17
|
-
private readonly rollupContract;
|
|
18
18
|
private readonly publicClient;
|
|
19
|
-
private readonly
|
|
19
|
+
private readonly rollupContract;
|
|
20
20
|
private readonly aztecSlotDuration;
|
|
21
21
|
private readonly l1GenesisTime;
|
|
22
22
|
private chainId;
|
|
23
23
|
private version;
|
|
24
|
-
constructor(
|
|
25
|
-
rollupVersion: bigint;
|
|
26
|
-
});
|
|
27
|
-
private computeCurrentMinFees;
|
|
28
|
-
getCurrentMinFees(): Promise<GasFees>;
|
|
29
|
-
/**
|
|
30
|
-
* Simple builder of global variables.
|
|
31
|
-
* @param blockNumber - The block number to build global variables for.
|
|
32
|
-
* @param coinbase - The address to receive block reward.
|
|
33
|
-
* @param feeRecipient - The address to receive fees.
|
|
34
|
-
* @param slotNumber - The slot number to use for the global variables, if undefined it will be calculated.
|
|
35
|
-
* @returns The global variables for the given block number.
|
|
36
|
-
*/
|
|
37
|
-
buildGlobalVariables(blockNumber: BlockNumber, coinbase: EthAddress, feeRecipient: AztecAddress, maybeSlot?: SlotNumber): Promise<GlobalVariables>;
|
|
24
|
+
constructor(publicClient: ViemPublicClient, config: GlobalVariableBuilderConfig);
|
|
38
25
|
/** Builds global variables that are constant throughout a checkpoint. */
|
|
39
|
-
buildCheckpointGlobalVariables(coinbase: EthAddress, feeRecipient: AztecAddress, slotNumber: SlotNumber): Promise<CheckpointGlobalVariables>;
|
|
26
|
+
buildCheckpointGlobalVariables(coinbase: EthAddress, feeRecipient: AztecAddress, slotNumber: SlotNumber, simulationOverridesPlan?: SimulationOverridesPlan): Promise<CheckpointGlobalVariables>;
|
|
40
27
|
}
|
|
41
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
28
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJz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