@aztec/ethereum 0.0.1-commit.f2ce05ee → 0.0.1-commit.f5a9928
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.d.ts +27 -3
- package/dest/client.d.ts.map +1 -1
- package/dest/client.js +63 -8
- package/dest/config.d.ts +17 -6
- package/dest/config.d.ts.map +1 -1
- package/dest/config.js +38 -10
- package/dest/contracts/chain_state_override.d.ts +78 -0
- package/dest/contracts/chain_state_override.d.ts.map +1 -0
- package/dest/contracts/chain_state_override.js +137 -0
- package/dest/contracts/fee_asset_price_oracle.d.ts +105 -0
- package/dest/contracts/fee_asset_price_oracle.d.ts.map +1 -0
- package/dest/contracts/fee_asset_price_oracle.js +656 -0
- package/dest/contracts/governance.d.ts +135 -35
- package/dest/contracts/governance.d.ts.map +1 -1
- package/dest/contracts/governance.js +229 -18
- package/dest/contracts/governance_proposer.d.ts +33 -2
- package/dest/contracts/governance_proposer.d.ts.map +1 -1
- package/dest/contracts/governance_proposer.js +54 -6
- package/dest/contracts/gse.d.ts +4 -2
- package/dest/contracts/gse.d.ts.map +1 -1
- package/dest/contracts/gse.js +2 -2
- package/dest/contracts/inbox.d.ts +3 -3
- package/dest/contracts/inbox.d.ts.map +1 -1
- package/dest/contracts/inbox.js +12 -7
- package/dest/contracts/index.d.ts +4 -3
- package/dest/contracts/index.d.ts.map +1 -1
- package/dest/contracts/index.js +3 -2
- package/dest/contracts/multicall.d.ts +127 -12
- package/dest/contracts/multicall.d.ts.map +1 -1
- package/dest/contracts/multicall.js +201 -94
- package/dest/contracts/outbox.d.ts +27 -4
- package/dest/contracts/outbox.d.ts.map +1 -1
- package/dest/contracts/outbox.js +34 -7
- package/dest/contracts/registry.d.ts +3 -1
- package/dest/contracts/registry.d.ts.map +1 -1
- package/dest/contracts/registry.js +30 -1
- package/dest/contracts/rollup.d.ts +5437 -34
- package/dest/contracts/rollup.d.ts.map +1 -1
- package/dest/contracts/rollup.js +448 -104
- package/dest/contracts/slashing_proposer.d.ts +171 -0
- package/dest/contracts/slashing_proposer.d.ts.map +1 -0
- package/dest/contracts/slashing_proposer.js +753 -0
- package/dest/contracts/watch_event.d.ts +36 -0
- package/dest/contracts/watch_event.d.ts.map +1 -0
- package/dest/contracts/watch_event.js +66 -0
- package/dest/deploy_aztec_l1_contracts.d.ts +5 -9
- package/dest/deploy_aztec_l1_contracts.d.ts.map +1 -1
- package/dest/deploy_aztec_l1_contracts.js +48 -27
- package/dest/deploy_l1_contract.js +3 -3
- package/dest/foundry_binary.d.ts +13 -0
- package/dest/foundry_binary.d.ts.map +1 -0
- package/dest/foundry_binary.js +52 -0
- package/dest/generated/l1-contracts-defaults.d.ts +3 -3
- package/dest/generated/l1-contracts-defaults.js +3 -3
- package/dest/l1_artifacts.d.ts +15524 -15847
- package/dest/l1_artifacts.d.ts.map +1 -1
- package/dest/l1_artifacts.js +9 -24
- package/dest/l1_contract_addresses.d.ts +61 -65
- package/dest/l1_contract_addresses.d.ts.map +1 -1
- package/dest/l1_contract_addresses.js +101 -82
- package/dest/l1_reader.d.ts +5 -5
- package/dest/l1_reader.d.ts.map +1 -1
- package/dest/l1_reader.js +9 -7
- package/dest/l1_tx_utils/config.d.ts +7 -1
- package/dest/l1_tx_utils/config.d.ts.map +1 -1
- package/dest/l1_tx_utils/config.js +17 -4
- package/dest/l1_tx_utils/factory.d.ts +18 -10
- package/dest/l1_tx_utils/factory.d.ts.map +1 -1
- package/dest/l1_tx_utils/factory.js +17 -7
- package/dest/l1_tx_utils/fee-strategies/p75_competitive.js +1 -1
- package/dest/l1_tx_utils/fee-strategies/p75_competitive_blob_txs_only.js +1 -1
- package/dest/l1_tx_utils/forwarder_l1_tx_utils.d.ts +15 -15
- package/dest/l1_tx_utils/forwarder_l1_tx_utils.d.ts.map +1 -1
- package/dest/l1_tx_utils/forwarder_l1_tx_utils.js +9 -15
- package/dest/l1_tx_utils/index-blobs.d.ts +3 -3
- package/dest/l1_tx_utils/index-blobs.d.ts.map +1 -1
- package/dest/l1_tx_utils/index-blobs.js +2 -2
- package/dest/l1_tx_utils/index.d.ts +2 -1
- package/dest/l1_tx_utils/index.d.ts.map +1 -1
- package/dest/l1_tx_utils/index.js +1 -0
- package/dest/l1_tx_utils/l1_tx_utils.d.ts +26 -7
- package/dest/l1_tx_utils/l1_tx_utils.d.ts.map +1 -1
- package/dest/l1_tx_utils/l1_tx_utils.js +156 -79
- package/dest/l1_tx_utils/readonly_l1_tx_utils.d.ts +1 -1
- package/dest/l1_tx_utils/readonly_l1_tx_utils.d.ts.map +1 -1
- package/dest/l1_tx_utils/readonly_l1_tx_utils.js +57 -23
- package/dest/l1_tx_utils/tx_delayer.d.ts +58 -0
- package/dest/l1_tx_utils/tx_delayer.d.ts.map +1 -0
- package/dest/{test → l1_tx_utils}/tx_delayer.js +67 -37
- package/dest/publisher_manager.d.ts +34 -8
- package/dest/publisher_manager.d.ts.map +1 -1
- package/dest/publisher_manager.js +119 -8
- package/dest/queries.d.ts +13 -2
- package/dest/queries.d.ts.map +1 -1
- package/dest/queries.js +62 -3
- package/dest/test/blob_kzg_warmup.d.ts +19 -0
- package/dest/test/blob_kzg_warmup.d.ts.map +1 -0
- package/dest/test/blob_kzg_warmup.js +64 -0
- package/dest/test/chain_monitor.d.ts +55 -4
- package/dest/test/chain_monitor.d.ts.map +1 -1
- package/dest/test/chain_monitor.js +104 -3
- package/dest/test/eth_cheat_codes.d.ts +31 -6
- package/dest/test/eth_cheat_codes.d.ts.map +1 -1
- package/dest/test/eth_cheat_codes.js +67 -44
- package/dest/test/index.d.ts +2 -3
- package/dest/test/index.d.ts.map +1 -1
- package/dest/test/index.js +1 -2
- package/dest/test/recording_rpc_server.d.ts +18 -0
- package/dest/test/recording_rpc_server.d.ts.map +1 -0
- package/dest/test/recording_rpc_server.js +68 -0
- package/dest/test/rollup_cheat_codes.d.ts +60 -3
- package/dest/test/rollup_cheat_codes.d.ts.map +1 -1
- package/dest/test/rollup_cheat_codes.js +86 -7
- package/dest/test/start_anvil.d.ts +23 -3
- package/dest/test/start_anvil.d.ts.map +1 -1
- package/dest/test/start_anvil.js +182 -32
- package/dest/test/upgrade_utils.js +2 -2
- package/dest/utils.d.ts +9 -2
- package/dest/utils.d.ts.map +1 -1
- package/dest/utils.js +59 -24
- package/package.json +6 -8
- package/src/client.ts +72 -2
- package/src/config.ts +58 -14
- package/src/contracts/chain_state_override.ts +200 -0
- package/src/contracts/fee_asset_price_oracle.ts +285 -0
- package/src/contracts/governance.ts +313 -13
- package/src/contracts/governance_proposer.ts +58 -9
- package/src/contracts/gse.ts +7 -2
- package/src/contracts/inbox.ts +13 -5
- package/src/contracts/index.ts +3 -2
- package/src/contracts/multicall.ts +243 -105
- package/src/contracts/outbox.ts +42 -8
- package/src/contracts/registry.ts +31 -1
- package/src/contracts/rollup.ts +507 -109
- package/src/contracts/{tally_slashing_proposer.ts → slashing_proposer.ts} +119 -45
- package/src/contracts/watch_event.ts +110 -0
- package/src/deploy_aztec_l1_contracts.ts +75 -39
- package/src/deploy_l1_contract.ts +3 -3
- package/src/foundry_binary.ts +57 -0
- package/src/generated/l1-contracts-defaults.ts +3 -3
- package/src/l1_artifacts.ts +12 -35
- package/src/l1_contract_addresses.ts +120 -94
- package/src/l1_reader.ts +17 -10
- package/src/l1_tx_utils/config.ts +23 -3
- package/src/l1_tx_utils/factory.ts +31 -31
- package/src/l1_tx_utils/fee-strategies/p75_competitive.ts +1 -1
- package/src/l1_tx_utils/fee-strategies/p75_competitive_blob_txs_only.ts +1 -1
- package/src/l1_tx_utils/forwarder_l1_tx_utils.ts +43 -54
- package/src/l1_tx_utils/index-blobs.ts +2 -2
- package/src/l1_tx_utils/index.ts +1 -0
- package/src/l1_tx_utils/l1_tx_utils.ts +149 -64
- package/src/l1_tx_utils/readonly_l1_tx_utils.ts +57 -17
- package/src/{test → l1_tx_utils}/tx_delayer.ts +93 -56
- package/src/publisher_manager.ts +143 -12
- package/src/queries.ts +70 -4
- package/src/test/blob_kzg_warmup.ts +65 -0
- package/src/test/chain_monitor.ts +148 -3
- package/src/test/eth_cheat_codes.ts +63 -47
- package/src/test/index.ts +1 -2
- package/src/test/recording_rpc_server.ts +69 -0
- package/src/test/rollup_cheat_codes.ts +115 -6
- package/src/test/start_anvil.ts +212 -32
- package/src/test/upgrade_utils.ts +2 -2
- package/src/utils.ts +56 -29
- package/dest/contracts/empire_slashing_proposer.d.ts +0 -67
- package/dest/contracts/empire_slashing_proposer.d.ts.map +0 -1
- package/dest/contracts/empire_slashing_proposer.js +0 -207
- package/dest/contracts/tally_slashing_proposer.d.ts +0 -140
- package/dest/contracts/tally_slashing_proposer.d.ts.map +0 -1
- package/dest/contracts/tally_slashing_proposer.js +0 -320
- package/dest/l1_tx_utils/l1_tx_utils_with_blobs.d.ts +0 -26
- package/dest/l1_tx_utils/l1_tx_utils_with_blobs.d.ts.map +0 -1
- package/dest/l1_tx_utils/l1_tx_utils_with_blobs.js +0 -26
- package/dest/test/delayed_tx_utils.d.ts +0 -13
- package/dest/test/delayed_tx_utils.d.ts.map +0 -1
- package/dest/test/delayed_tx_utils.js +0 -28
- package/dest/test/tx_delayer.d.ts +0 -36
- package/dest/test/tx_delayer.d.ts.map +0 -1
- package/src/contracts/empire_slashing_proposer.ts +0 -259
- package/src/l1_tx_utils/l1_tx_utils_with_blobs.ts +0 -77
- package/src/test/delayed_tx_utils.ts +0 -52
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { spawnSync } from 'child_process';
|
|
2
|
+
import { accessSync, constants } from 'fs';
|
|
3
|
+
import { homedir } from 'os';
|
|
4
|
+
import { join } from 'path';
|
|
5
|
+
|
|
6
|
+
function isExecutable(path: string): boolean {
|
|
7
|
+
try {
|
|
8
|
+
accessSync(path, constants.X_OK);
|
|
9
|
+
return true;
|
|
10
|
+
} catch {
|
|
11
|
+
return false;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Locate a Foundry binary (`anvil`, `forge`, ...) without relying on the caller's PATH. Order:
|
|
17
|
+
* 1. `$<NAME>_BIN` (e.g. `$ANVIL_BIN`, `$FORGE_BIN`) — explicit override, e.g. for CI with a pinned
|
|
18
|
+
* version. Throws if set but not pointing at an executable, instead of silently falling back.
|
|
19
|
+
* 2. `~/.aztec/current/internal-bin/<name>` — where aztec-up installs it.
|
|
20
|
+
* 3. `~/.aztec/current/bin/aztec-<name>` — the publicly-exposed symlink.
|
|
21
|
+
* 4. `~/.foundry/bin/<name>` — standalone foundryup install.
|
|
22
|
+
* 5. `command -v <name>` — anything else on PATH.
|
|
23
|
+
*
|
|
24
|
+
* Throws with a directive message if none work.
|
|
25
|
+
*/
|
|
26
|
+
export function resolveFoundryBinary(name: string): string {
|
|
27
|
+
const envVar = `${name.toUpperCase()}_BIN`;
|
|
28
|
+
const envBin = process.env[envVar];
|
|
29
|
+
if (envBin) {
|
|
30
|
+
if (!isExecutable(envBin)) {
|
|
31
|
+
throw new Error(`$${envVar} is set to ${envBin}, which does not exist or is not executable.`);
|
|
32
|
+
}
|
|
33
|
+
return envBin;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const candidates = [
|
|
37
|
+
join(homedir(), '.aztec', 'current', 'internal-bin', name),
|
|
38
|
+
join(homedir(), '.aztec', 'current', 'bin', `aztec-${name}`),
|
|
39
|
+
join(homedir(), '.foundry', 'bin', name),
|
|
40
|
+
];
|
|
41
|
+
for (const path of candidates) {
|
|
42
|
+
if (isExecutable(path)) {
|
|
43
|
+
return path;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
const which = spawnSync('sh', ['-c', `command -v ${name}`], { encoding: 'utf8' });
|
|
48
|
+
if (which.status === 0 && which.stdout.trim()) {
|
|
49
|
+
return which.stdout.trim();
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
throw new Error(
|
|
53
|
+
`${name} binary not found. Tried $${envVar}, ~/.aztec/current/internal-bin/${name}, ` +
|
|
54
|
+
`~/.aztec/current/bin/aztec-${name}, ~/.foundry/bin/${name}, and $PATH. ` +
|
|
55
|
+
`Install via \`aztec-up\` or set ${envVar} to a working binary.`,
|
|
56
|
+
);
|
|
57
|
+
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
/** Default L1 contracts configuration values from network-defaults.yml */
|
|
5
5
|
export const l1ContractsDefaultEnv = {
|
|
6
6
|
ETHEREUM_SLOT_DURATION: 12,
|
|
7
|
-
AZTEC_SLOT_DURATION:
|
|
7
|
+
AZTEC_SLOT_DURATION: 72,
|
|
8
8
|
AZTEC_EPOCH_DURATION: 32,
|
|
9
9
|
AZTEC_TARGET_COMMITTEE_SIZE: 48,
|
|
10
10
|
AZTEC_LAG_IN_EPOCHS_FOR_VALIDATOR_SET: 2,
|
|
@@ -13,12 +13,12 @@ export const l1ContractsDefaultEnv = {
|
|
|
13
13
|
AZTEC_EJECTION_THRESHOLD: 50000000000000000000,
|
|
14
14
|
AZTEC_LOCAL_EJECTION_THRESHOLD: 98000000000000000000,
|
|
15
15
|
AZTEC_EXIT_DELAY_SECONDS: 172800,
|
|
16
|
-
AZTEC_INBOX_LAG:
|
|
16
|
+
AZTEC_INBOX_LAG: 2,
|
|
17
17
|
AZTEC_PROOF_SUBMISSION_EPOCHS: 1,
|
|
18
18
|
AZTEC_MANA_TARGET: 100000000,
|
|
19
19
|
AZTEC_PROVING_COST_PER_MANA: 100,
|
|
20
20
|
AZTEC_INITIAL_ETH_PER_FEE_ASSET: 10000000,
|
|
21
|
-
|
|
21
|
+
AZTEC_SLASHER_ENABLED: true,
|
|
22
22
|
AZTEC_SLASHING_ROUND_SIZE_IN_EPOCHS: 4,
|
|
23
23
|
AZTEC_SLASHING_LIFETIME_IN_ROUNDS: 5,
|
|
24
24
|
AZTEC_SLASHING_EXECUTION_DELAY_IN_ROUNDS: 0,
|
package/src/l1_artifacts.ts
CHANGED
|
@@ -3,10 +3,6 @@ import {
|
|
|
3
3
|
CoinIssuerBytecode,
|
|
4
4
|
DateGatedRelayerAbi,
|
|
5
5
|
DateGatedRelayerBytecode,
|
|
6
|
-
EmpireSlasherDeploymentExtLibAbi,
|
|
7
|
-
EmpireSlasherDeploymentExtLibBytecode,
|
|
8
|
-
EmpireSlashingProposerAbi,
|
|
9
|
-
EmpireSlashingProposerBytecode,
|
|
10
6
|
FeeAssetHandlerAbi,
|
|
11
7
|
FeeAssetHandlerBytecode,
|
|
12
8
|
FeeJuicePortalAbi,
|
|
@@ -42,16 +38,14 @@ import {
|
|
|
42
38
|
RollupLinkReferences,
|
|
43
39
|
RollupOperationsExtLibAbi,
|
|
44
40
|
RollupOperationsExtLibBytecode,
|
|
45
|
-
SlashFactoryAbi,
|
|
46
|
-
SlashFactoryBytecode,
|
|
47
41
|
SlasherAbi,
|
|
48
42
|
SlasherBytecode,
|
|
43
|
+
SlasherDeploymentExtLibAbi,
|
|
44
|
+
SlasherDeploymentExtLibBytecode,
|
|
45
|
+
SlashingProposerAbi,
|
|
46
|
+
SlashingProposerBytecode,
|
|
49
47
|
StakingAssetHandlerAbi,
|
|
50
48
|
StakingAssetHandlerBytecode,
|
|
51
|
-
TallySlasherDeploymentExtLibAbi,
|
|
52
|
-
TallySlasherDeploymentExtLibBytecode,
|
|
53
|
-
TallySlashingProposerAbi,
|
|
54
|
-
TallySlashingProposerBytecode,
|
|
55
49
|
TestERC20Abi,
|
|
56
50
|
TestERC20Bytecode,
|
|
57
51
|
ValidatorOperationsExtLibAbi,
|
|
@@ -107,15 +101,10 @@ export const RollupArtifact = {
|
|
|
107
101
|
contractAbi: RewardExtLibAbi,
|
|
108
102
|
contractBytecode: RewardExtLibBytecode as Hex,
|
|
109
103
|
},
|
|
110
|
-
|
|
111
|
-
name: '
|
|
112
|
-
contractAbi:
|
|
113
|
-
contractBytecode:
|
|
114
|
-
},
|
|
115
|
-
EmpireSlasherDeploymentExtLib: {
|
|
116
|
-
name: 'EmpireSlasherDeploymentExtLib',
|
|
117
|
-
contractAbi: EmpireSlasherDeploymentExtLibAbi,
|
|
118
|
-
contractBytecode: EmpireSlasherDeploymentExtLibBytecode as Hex,
|
|
104
|
+
SlasherDeploymentExtLib: {
|
|
105
|
+
name: 'SlasherDeploymentExtLib',
|
|
106
|
+
contractAbi: SlasherDeploymentExtLibAbi,
|
|
107
|
+
contractBytecode: SlasherDeploymentExtLibBytecode as Hex,
|
|
119
108
|
},
|
|
120
109
|
},
|
|
121
110
|
},
|
|
@@ -175,22 +164,10 @@ export const SlasherArtifact = {
|
|
|
175
164
|
contractBytecode: SlasherBytecode as Hex,
|
|
176
165
|
};
|
|
177
166
|
|
|
178
|
-
export const
|
|
179
|
-
name: '
|
|
180
|
-
contractAbi:
|
|
181
|
-
contractBytecode:
|
|
182
|
-
};
|
|
183
|
-
|
|
184
|
-
export const TallySlashingProposerArtifact = {
|
|
185
|
-
name: 'TallySlashingProposer',
|
|
186
|
-
contractAbi: TallySlashingProposerAbi,
|
|
187
|
-
contractBytecode: TallySlashingProposerBytecode as Hex,
|
|
188
|
-
};
|
|
189
|
-
|
|
190
|
-
export const SlashFactoryArtifact = {
|
|
191
|
-
name: 'SlashFactory',
|
|
192
|
-
contractAbi: SlashFactoryAbi,
|
|
193
|
-
contractBytecode: SlashFactoryBytecode as Hex,
|
|
167
|
+
export const SlashingProposerArtifact = {
|
|
168
|
+
name: 'SlashingProposer',
|
|
169
|
+
contractAbi: SlashingProposerAbi,
|
|
170
|
+
contractBytecode: SlashingProposerBytecode as Hex,
|
|
194
171
|
};
|
|
195
172
|
|
|
196
173
|
export const RegisterNewRollupVersionPayloadArtifact = {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import type { ConfigMappingsType } from '@aztec/foundation/config';
|
|
1
|
+
import type { ConfigMapping, ConfigMappingsType } from '@aztec/foundation/config';
|
|
2
2
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
3
|
-
import { schemas
|
|
3
|
+
import { schemas } from '@aztec/foundation/schemas';
|
|
4
4
|
|
|
5
5
|
import { z } from 'zod';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* Required L1 contract address keys.
|
|
9
9
|
* NOTE: When changing this list, make sure to update CLI & CI scripts accordingly.
|
|
10
10
|
* For reference: https://github.com/AztecProtocol/aztec-packages/pull/5553
|
|
11
11
|
*/
|
|
12
|
-
|
|
12
|
+
const REQUIRED_L1_CONTRACT_ADDRESS_KEYS = [
|
|
13
13
|
'rollupAddress',
|
|
14
14
|
'registryAddress',
|
|
15
15
|
'inboxAddress',
|
|
@@ -23,102 +23,128 @@ export const L1ContractsNames = [
|
|
|
23
23
|
'stakingAssetAddress',
|
|
24
24
|
] as const;
|
|
25
25
|
|
|
26
|
+
/** Optional L1 contract address keys — present only in some deployments. */
|
|
27
|
+
export const OPTIONAL_L1_CONTRACT_ADDRESS_KEYS = [
|
|
28
|
+
'feeAssetHandlerAddress',
|
|
29
|
+
'stakingAssetHandlerAddress',
|
|
30
|
+
'zkPassportVerifierAddress',
|
|
31
|
+
'gseAddress',
|
|
32
|
+
'dateGatedRelayerAddress',
|
|
33
|
+
] as const;
|
|
34
|
+
|
|
35
|
+
type RequiredContractKey = (typeof REQUIRED_L1_CONTRACT_ADDRESS_KEYS)[number];
|
|
36
|
+
type OptionalContractKey = (typeof OPTIONAL_L1_CONTRACT_ADDRESS_KEYS)[number];
|
|
37
|
+
|
|
26
38
|
/** Provides the directory of current L1 contract addresses */
|
|
27
39
|
export type L1ContractAddresses = {
|
|
28
|
-
[K in
|
|
40
|
+
[K in RequiredContractKey]: EthAddress;
|
|
29
41
|
} & {
|
|
30
|
-
|
|
31
|
-
feeAssetHandlerAddress?: EthAddress | undefined;
|
|
32
|
-
stakingAssetHandlerAddress?: EthAddress | undefined;
|
|
33
|
-
zkPassportVerifierAddress?: EthAddress | undefined;
|
|
34
|
-
gseAddress?: EthAddress | undefined;
|
|
35
|
-
dateGatedRelayerAddress?: EthAddress | undefined;
|
|
42
|
+
[K in OptionalContractKey]?: EthAddress;
|
|
36
43
|
};
|
|
37
44
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
feeJuiceAddress: schemas.EthAddress,
|
|
45
|
-
stakingAssetAddress: schemas.EthAddress,
|
|
46
|
-
feeJuicePortalAddress: schemas.EthAddress,
|
|
47
|
-
coinIssuerAddress: schemas.EthAddress,
|
|
48
|
-
rewardDistributorAddress: schemas.EthAddress,
|
|
49
|
-
governanceProposerAddress: schemas.EthAddress,
|
|
50
|
-
governanceAddress: schemas.EthAddress,
|
|
51
|
-
slashFactoryAddress: schemas.EthAddress.optional(),
|
|
52
|
-
feeAssetHandlerAddress: schemas.EthAddress.optional(),
|
|
53
|
-
stakingAssetHandlerAddress: schemas.EthAddress.optional(),
|
|
54
|
-
zkPassportVerifierAddress: schemas.EthAddress.optional(),
|
|
55
|
-
gseAddress: schemas.EthAddress.optional(),
|
|
56
|
-
dateGatedRelayerAddress: schemas.EthAddress.optional(),
|
|
57
|
-
}),
|
|
58
|
-
);
|
|
45
|
+
/**
|
|
46
|
+
* Names of required L1 contract addresses.
|
|
47
|
+
* NOTE: When changing the set of contracts, update CLI & CI scripts accordingly.
|
|
48
|
+
* For reference: https://github.com/AztecProtocol/aztec-packages/pull/5553
|
|
49
|
+
*/
|
|
50
|
+
export const L1ContractsNames = REQUIRED_L1_CONTRACT_ADDRESS_KEYS;
|
|
59
51
|
|
|
60
52
|
const parseEnv = (val: string) => EthAddress.fromString(val);
|
|
53
|
+
const addrEnv = (description: string, env?: ConfigMapping<EthAddress>['env']): ConfigMapping<EthAddress> => ({
|
|
54
|
+
description,
|
|
55
|
+
parseEnv,
|
|
56
|
+
...(env && { env }),
|
|
57
|
+
});
|
|
61
58
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
parseEnv,
|
|
87
|
-
},
|
|
88
|
-
outboxAddress: {
|
|
89
|
-
description: 'The deployed L1 outbox contract address.',
|
|
90
|
-
parseEnv,
|
|
91
|
-
},
|
|
92
|
-
feeJuiceAddress: {
|
|
93
|
-
description: 'The deployed L1 Fee Juice contract address.',
|
|
94
|
-
parseEnv,
|
|
95
|
-
},
|
|
96
|
-
stakingAssetAddress: {
|
|
97
|
-
description: 'The deployed L1 staking asset contract address.',
|
|
98
|
-
parseEnv,
|
|
99
|
-
},
|
|
100
|
-
feeJuicePortalAddress: {
|
|
101
|
-
description: 'The deployed L1 Fee Juice portal contract address.',
|
|
102
|
-
parseEnv,
|
|
103
|
-
},
|
|
104
|
-
coinIssuerAddress: {
|
|
105
|
-
description: 'The deployed L1 coinIssuer contract address',
|
|
106
|
-
parseEnv,
|
|
107
|
-
},
|
|
108
|
-
rewardDistributorAddress: {
|
|
109
|
-
description: 'The deployed L1 rewardDistributor contract address',
|
|
110
|
-
parseEnv,
|
|
111
|
-
},
|
|
112
|
-
governanceProposerAddress: {
|
|
113
|
-
description: 'The deployed L1 governanceProposer contract address',
|
|
114
|
-
parseEnv,
|
|
115
|
-
},
|
|
116
|
-
governanceAddress: {
|
|
117
|
-
description: 'The deployed L1 governance contract address',
|
|
118
|
-
parseEnv,
|
|
119
|
-
},
|
|
120
|
-
stakingAssetHandlerAddress: {
|
|
121
|
-
description: 'The deployed L1 stakingAssetHandler contract address',
|
|
122
|
-
parseEnv,
|
|
123
|
-
},
|
|
59
|
+
/**
|
|
60
|
+
* Config mapping for all L1 contract addresses.
|
|
61
|
+
* This is the single source of truth for which contract addresses exist and how to parse them.
|
|
62
|
+
*/
|
|
63
|
+
export const l1ContractAddressesMapping: ConfigMappingsType<L1ContractAddresses> = {
|
|
64
|
+
rollupAddress: addrEnv('The deployed L1 rollup contract address.'),
|
|
65
|
+
registryAddress: addrEnv('The deployed L1 registry contract address.', 'REGISTRY_CONTRACT_ADDRESS'),
|
|
66
|
+
inboxAddress: addrEnv('The deployed L1 inbox contract address.'),
|
|
67
|
+
outboxAddress: addrEnv('The deployed L1 outbox contract address.'),
|
|
68
|
+
feeJuiceAddress: addrEnv('The deployed L1 Fee Juice contract address.'),
|
|
69
|
+
feeJuicePortalAddress: addrEnv('The deployed L1 Fee Juice portal contract address.'),
|
|
70
|
+
coinIssuerAddress: addrEnv('The deployed L1 coinIssuer contract address'),
|
|
71
|
+
rewardDistributorAddress: addrEnv('The deployed L1 rewardDistributor contract address'),
|
|
72
|
+
governanceProposerAddress: addrEnv('The deployed L1 governanceProposer contract address'),
|
|
73
|
+
governanceAddress: addrEnv('The deployed L1 governance contract address'),
|
|
74
|
+
stakingAssetAddress: addrEnv('The deployed L1 staking asset contract address.'),
|
|
75
|
+
feeAssetHandlerAddress: addrEnv(
|
|
76
|
+
'The deployed L1 feeAssetHandler contract address',
|
|
77
|
+
'FEE_ASSET_HANDLER_CONTRACT_ADDRESS',
|
|
78
|
+
),
|
|
79
|
+
stakingAssetHandlerAddress: addrEnv('The deployed L1 stakingAssetHandler contract address'),
|
|
80
|
+
zkPassportVerifierAddress: addrEnv('The deployed L1 ZK passport verifier contract address'),
|
|
81
|
+
gseAddress: addrEnv('The deployed L1 GSE contract address'),
|
|
82
|
+
dateGatedRelayerAddress: addrEnv('The deployed L1 date-gated relayer contract address'),
|
|
124
83
|
};
|
|
84
|
+
|
|
85
|
+
/** Keys present in {@link l1ContractAddressesMapping}. */
|
|
86
|
+
export type L1ContractAddressMappingKey = keyof typeof l1ContractAddressesMapping;
|
|
87
|
+
|
|
88
|
+
type RequiredAddressShape = { [K in RequiredContractKey]: typeof schemas.EthAddress };
|
|
89
|
+
type OptionalAddressShape = { [K in OptionalContractKey]: ReturnType<typeof schemas.EthAddress.optional> };
|
|
90
|
+
|
|
91
|
+
export const L1ContractAddressesSchema = z.object({
|
|
92
|
+
...(Object.fromEntries(REQUIRED_L1_CONTRACT_ADDRESS_KEYS.map(k => [k, schemas.EthAddress])) as RequiredAddressShape),
|
|
93
|
+
...(Object.fromEntries(
|
|
94
|
+
OPTIONAL_L1_CONTRACT_ADDRESS_KEYS.map(k => [k, schemas.EthAddress.optional()]),
|
|
95
|
+
) as OptionalAddressShape),
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Selects entries from {@link l1ContractAddressesMapping} so composed configs can reuse the same
|
|
100
|
+
* env vars, descriptions, and parsers without duplicating definitions.
|
|
101
|
+
*
|
|
102
|
+
* @example
|
|
103
|
+
* ```ts
|
|
104
|
+
* const mappings = {
|
|
105
|
+
* ...pickL1ContractAddressMappings('rollupAddress'),
|
|
106
|
+
* nodeId: { ... },
|
|
107
|
+
* };
|
|
108
|
+
* ```
|
|
109
|
+
*/
|
|
110
|
+
export function pickL1ContractAddressMappings<const K extends readonly L1ContractAddressMappingKey[]>(
|
|
111
|
+
...keys: K
|
|
112
|
+
): Pick<typeof l1ContractAddressesMapping, K[number]> {
|
|
113
|
+
return Object.fromEntries(keys.map(key => [key, l1ContractAddressesMapping[key]] as const)) as Pick<
|
|
114
|
+
typeof l1ContractAddressesMapping,
|
|
115
|
+
K[number]
|
|
116
|
+
>;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Like {@link pickL1ContractAddressMappings}, but returns a fragment of {@link L1ContractAddressesSchema}'s shape for
|
|
121
|
+
* spreading into `z.object({ ...pickL1ContractAddressesSchemaShape('rollupAddress'), localField: z... })`.
|
|
122
|
+
*/
|
|
123
|
+
export function pickL1ContractAddressesSchema<const K extends readonly L1ContractAddressMappingKey[]>(
|
|
124
|
+
...keys: K
|
|
125
|
+
): Pick<typeof L1ContractAddressesSchema.shape, K[number]> {
|
|
126
|
+
return Object.fromEntries(keys.map(key => [key, L1ContractAddressesSchema.shape[key]])) as Pick<
|
|
127
|
+
typeof L1ContractAddressesSchema.shape,
|
|
128
|
+
K[number]
|
|
129
|
+
>;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/** Builds an {@link L1ContractAddresses} object from config that stores those fields at the top level. */
|
|
133
|
+
export function pickL1ContractAddresses<T extends L1ContractAddresses>(config: T): L1ContractAddresses {
|
|
134
|
+
const result: Partial<L1ContractAddresses> = {};
|
|
135
|
+
for (const key of REQUIRED_L1_CONTRACT_ADDRESS_KEYS) {
|
|
136
|
+
result[key] = config[key];
|
|
137
|
+
}
|
|
138
|
+
for (const key of OPTIONAL_L1_CONTRACT_ADDRESS_KEYS) {
|
|
139
|
+
const v = config[key];
|
|
140
|
+
if (v !== undefined) {
|
|
141
|
+
result[key] = v;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
return result as L1ContractAddresses;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export function randomL1ContractAddresses(includeOptional: boolean = false): L1ContractAddresses {
|
|
148
|
+
const keys = includeOptional ? [...L1ContractsNames, ...OPTIONAL_L1_CONTRACT_ADDRESS_KEYS] : L1ContractsNames;
|
|
149
|
+
return Object.fromEntries(keys.map(name => [name, EthAddress.random()])) as L1ContractAddresses;
|
|
150
|
+
}
|
package/src/l1_reader.ts
CHANGED
|
@@ -1,29 +1,30 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
type ConfigMappingsType,
|
|
3
|
+
getConfigFromMappings,
|
|
4
|
+
numberConfigHelper,
|
|
5
|
+
optionalNumberConfigHelper,
|
|
6
|
+
} from '@aztec/foundation/config';
|
|
2
7
|
|
|
3
8
|
import { type L1ContractAddresses, l1ContractAddressesMapping } from './l1_contract_addresses.js';
|
|
4
9
|
|
|
5
10
|
/** Configuration of the L1GlobalReader. */
|
|
6
|
-
export
|
|
11
|
+
export type L1ReaderConfig = {
|
|
7
12
|
/** List of URLs of Ethereum RPC nodes that services will connect to (comma separated). */
|
|
8
13
|
l1RpcUrls: string[];
|
|
9
14
|
/** The RPC Url of the ethereum debug host for trace and debug methods. */
|
|
10
15
|
l1DebugRpcUrls: string[];
|
|
11
16
|
/** The chain ID of the ethereum host. */
|
|
12
17
|
l1ChainId: number;
|
|
13
|
-
/** The deployed l1 contract addresses */
|
|
14
|
-
l1Contracts: L1ContractAddresses;
|
|
15
18
|
/** The polling interval viem uses in ms */
|
|
16
19
|
viemPollingIntervalMS: number;
|
|
17
|
-
|
|
20
|
+
/** Timeout for HTTP requests to the L1 RPC node in ms. */
|
|
21
|
+
l1HttpTimeoutMS?: number;
|
|
22
|
+
} & L1ContractAddresses;
|
|
18
23
|
|
|
19
24
|
export const l1ReaderConfigMappings: ConfigMappingsType<L1ReaderConfig> = {
|
|
20
|
-
l1Contracts: {
|
|
21
|
-
description: 'The deployed L1 contract addresses',
|
|
22
|
-
nested: l1ContractAddressesMapping,
|
|
23
|
-
},
|
|
24
25
|
l1ChainId: {
|
|
25
26
|
env: 'L1_CHAIN_ID',
|
|
26
|
-
|
|
27
|
+
...optionalNumberConfigHelper(),
|
|
27
28
|
description: 'The chain ID of the ethereum host.',
|
|
28
29
|
},
|
|
29
30
|
l1RpcUrls: {
|
|
@@ -43,6 +44,12 @@ export const l1ReaderConfigMappings: ConfigMappingsType<L1ReaderConfig> = {
|
|
|
43
44
|
description: 'The polling interval viem uses in ms',
|
|
44
45
|
...numberConfigHelper(1_000),
|
|
45
46
|
},
|
|
47
|
+
l1HttpTimeoutMS: {
|
|
48
|
+
env: 'ETHEREUM_HTTP_TIMEOUT_MS',
|
|
49
|
+
description: 'Timeout for HTTP requests to the L1 RPC node in ms.',
|
|
50
|
+
...optionalNumberConfigHelper(),
|
|
51
|
+
},
|
|
52
|
+
...l1ContractAddressesMapping,
|
|
46
53
|
};
|
|
47
54
|
|
|
48
55
|
export function getL1ReaderConfigFromEnv(): L1ReaderConfig {
|
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
getConfigFromMappings,
|
|
6
6
|
getDefaultConfig,
|
|
7
7
|
numberConfigHelper,
|
|
8
|
+
optionalNumberConfigHelper,
|
|
8
9
|
} from '@aztec/foundation/config';
|
|
9
10
|
|
|
10
11
|
export interface L1TxUtilsConfig {
|
|
@@ -60,13 +61,19 @@ export interface L1TxUtilsConfig {
|
|
|
60
61
|
* How long a tx nonce can be unseen in the mempool before considering it dropped
|
|
61
62
|
*/
|
|
62
63
|
txUnseenConsideredDroppedMs?: number;
|
|
64
|
+
/** Enable tx delayer. When true, wraps the viem client to intercept and delay txs. Test-only. */
|
|
65
|
+
enableDelayer?: boolean;
|
|
66
|
+
/** Max seconds into an L1 slot for tx inclusion. Txs sent later are deferred to next slot. Only used when enableDelayer is true. */
|
|
67
|
+
txDelayerMaxInclusionTimeIntoSlot?: number;
|
|
68
|
+
/** How many seconds an L1 slot lasts. */
|
|
69
|
+
ethereumSlotDuration?: number;
|
|
63
70
|
}
|
|
64
71
|
|
|
65
72
|
export const l1TxUtilsConfigMappings: ConfigMappingsType<L1TxUtilsConfig> = {
|
|
66
73
|
gasLimitBufferPercentage: {
|
|
67
74
|
description: 'How much to increase calculated gas limit by (percentage)',
|
|
68
75
|
env: 'L1_GAS_LIMIT_BUFFER_PERCENTAGE',
|
|
69
|
-
...
|
|
76
|
+
...floatConfigHelper(20),
|
|
70
77
|
},
|
|
71
78
|
maxGwei: {
|
|
72
79
|
description: 'Maximum gas price in gwei to be used for transactions.',
|
|
@@ -83,12 +90,12 @@ export const l1TxUtilsConfigMappings: ConfigMappingsType<L1TxUtilsConfig> = {
|
|
|
83
90
|
priorityFeeBumpPercentage: {
|
|
84
91
|
description: 'How much to increase priority fee by each attempt (percentage)',
|
|
85
92
|
env: 'L1_PRIORITY_FEE_BUMP_PERCENTAGE',
|
|
86
|
-
...
|
|
93
|
+
...floatConfigHelper(20),
|
|
87
94
|
},
|
|
88
95
|
priorityFeeRetryBumpPercentage: {
|
|
89
96
|
description: 'How much to increase priority fee by each retry attempt (percentage)',
|
|
90
97
|
env: 'L1_PRIORITY_FEE_RETRY_BUMP_PERCENTAGE',
|
|
91
|
-
...
|
|
98
|
+
...floatConfigHelper(50),
|
|
92
99
|
},
|
|
93
100
|
minimumPriorityFeePerGas: {
|
|
94
101
|
description:
|
|
@@ -142,6 +149,19 @@ export const l1TxUtilsConfigMappings: ConfigMappingsType<L1TxUtilsConfig> = {
|
|
|
142
149
|
env: 'L1_TX_MONITOR_TX_UNSEEN_CONSIDERED_DROPPED_MS',
|
|
143
150
|
...numberConfigHelper(6 * 12 * 1000), // 6 L1 blocks
|
|
144
151
|
},
|
|
152
|
+
enableDelayer: {
|
|
153
|
+
description: 'Enable tx delayer for testing.',
|
|
154
|
+
...booleanConfigHelper(false),
|
|
155
|
+
},
|
|
156
|
+
txDelayerMaxInclusionTimeIntoSlot: {
|
|
157
|
+
description: 'Max seconds into L1 slot for tx inclusion when delayer is enabled.',
|
|
158
|
+
...optionalNumberConfigHelper(),
|
|
159
|
+
},
|
|
160
|
+
ethereumSlotDuration: {
|
|
161
|
+
env: 'ETHEREUM_SLOT_DURATION',
|
|
162
|
+
description: 'How many seconds an L1 slot lasts.',
|
|
163
|
+
...numberConfigHelper(12),
|
|
164
|
+
},
|
|
145
165
|
};
|
|
146
166
|
|
|
147
167
|
// We abuse the fact that all mappings above have a non null default value and force-type this to Required
|
|
@@ -1,64 +1,64 @@
|
|
|
1
|
+
import type { BlobKzgInstance } from '@aztec/blob-lib/types';
|
|
1
2
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
2
3
|
import type { Logger } from '@aztec/foundation/log';
|
|
3
4
|
import { DateProvider } from '@aztec/foundation/timer';
|
|
4
5
|
|
|
5
|
-
import type { TransactionSerializable } from 'viem';
|
|
6
|
-
|
|
7
6
|
import type { EthSigner } from '../eth-signer/eth-signer.js';
|
|
8
7
|
import type { ExtendedViemWalletClient, ViemClient } from '../types.js';
|
|
9
8
|
import type { L1TxUtilsConfig } from './config.js';
|
|
10
9
|
import type { IL1TxMetrics, IL1TxStore } from './interfaces.js';
|
|
11
10
|
import { L1TxUtils } from './l1_tx_utils.js';
|
|
12
11
|
import { createViemSigner } from './signer.js';
|
|
12
|
+
import { Delayer } from './tx_delayer.js';
|
|
13
13
|
import type { SigningCallback } from './types.js';
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
15
|
+
/** Source of signing capability: either a wallet client or a separate client + signer. */
|
|
16
|
+
export type L1SignerSource = ExtendedViemWalletClient | { client: ViemClient; signer: EthSigner };
|
|
17
|
+
|
|
18
|
+
export function resolveSignerSource(source: L1SignerSource): {
|
|
19
|
+
client: ViemClient;
|
|
20
|
+
address: EthAddress;
|
|
21
|
+
signingCallback: SigningCallback;
|
|
22
|
+
} {
|
|
23
|
+
if ('account' in source && source.account) {
|
|
24
|
+
return {
|
|
25
|
+
client: source as ExtendedViemWalletClient,
|
|
26
|
+
address: EthAddress.fromString((source as ExtendedViemWalletClient).account.address),
|
|
27
|
+
signingCallback: createViemSigner(source as ExtendedViemWalletClient),
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
const { client, signer } = source as { client: ViemClient; signer: EthSigner };
|
|
31
|
+
return {
|
|
26
32
|
client,
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
deps?.dateProvider,
|
|
31
|
-
config,
|
|
32
|
-
config?.debugMaxGasLimit ?? false,
|
|
33
|
-
deps?.store,
|
|
34
|
-
deps?.metrics,
|
|
35
|
-
);
|
|
33
|
+
address: signer.address,
|
|
34
|
+
signingCallback: async (tx, _addr) => (await signer.signTransaction(tx)).toViemTransactionSignature(),
|
|
35
|
+
};
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
export function
|
|
39
|
-
|
|
40
|
-
signer: EthSigner,
|
|
38
|
+
export function createL1TxUtils(
|
|
39
|
+
source: L1SignerSource,
|
|
41
40
|
deps?: {
|
|
42
41
|
logger?: Logger;
|
|
43
42
|
dateProvider?: DateProvider;
|
|
44
43
|
store?: IL1TxStore;
|
|
45
44
|
metrics?: IL1TxMetrics;
|
|
45
|
+
kzg?: BlobKzgInstance;
|
|
46
|
+
delayer?: Delayer;
|
|
46
47
|
},
|
|
47
48
|
config?: Partial<L1TxUtilsConfig> & { debugMaxGasLimit?: boolean },
|
|
48
49
|
): L1TxUtils {
|
|
49
|
-
const
|
|
50
|
-
return (await signer.signTransaction(transaction)).toViemTransactionSignature();
|
|
51
|
-
};
|
|
52
|
-
|
|
50
|
+
const { client, address, signingCallback } = resolveSignerSource(source);
|
|
53
51
|
return new L1TxUtils(
|
|
54
52
|
client,
|
|
55
|
-
|
|
56
|
-
|
|
53
|
+
address,
|
|
54
|
+
signingCallback,
|
|
57
55
|
deps?.logger,
|
|
58
56
|
deps?.dateProvider,
|
|
59
57
|
config,
|
|
60
58
|
config?.debugMaxGasLimit ?? false,
|
|
61
59
|
deps?.store,
|
|
62
60
|
deps?.metrics,
|
|
61
|
+
deps?.kzg,
|
|
62
|
+
deps?.delayer,
|
|
63
63
|
);
|
|
64
64
|
}
|
|
@@ -134,7 +134,7 @@ export const P75AllTxsPriorityFeeStrategy: PriorityFeeStrategy = {
|
|
|
134
134
|
// Sanity check: cap competitive fee at 100x network estimate to avoid using unrealistic fees
|
|
135
135
|
const maxReasonableFee = networkEstimate * 100n;
|
|
136
136
|
if (competitiveFee > maxReasonableFee && networkEstimate > 0n) {
|
|
137
|
-
logger?.
|
|
137
|
+
logger?.debug('Competitive fee exceeds sanity cap, using capped value', {
|
|
138
138
|
competitiveFee: formatGwei(competitiveFee),
|
|
139
139
|
networkEstimate: formatGwei(networkEstimate),
|
|
140
140
|
cappedTo: formatGwei(maxReasonableFee),
|
|
@@ -207,7 +207,7 @@ export const P75BlobTxsOnlyPriorityFeeStrategy: PriorityFeeStrategy = {
|
|
|
207
207
|
|
|
208
208
|
// Debug: Log suspicious fees from history
|
|
209
209
|
if (medianHistoricalFee > 100n * WEI_CONST) {
|
|
210
|
-
logger?.
|
|
210
|
+
logger?.debug('Suspicious high fee in history', {
|
|
211
211
|
historicalMedian: formatGwei(medianHistoricalFee),
|
|
212
212
|
allP75Fees: percentile75Fees.map(f => formatGwei(f)),
|
|
213
213
|
});
|