@aztec/ethereum 0.0.1-commit.b33fc05d0 → 0.0.1-commit.b3d3157a
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 +25 -3
- package/dest/client.d.ts.map +1 -1
- package/dest/client.js +60 -8
- package/dest/config.d.ts +6 -6
- package/dest/config.d.ts.map +1 -1
- package/dest/config.js +5 -9
- 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/empire_base.d.ts +1 -3
- package/dest/contracts/empire_base.d.ts.map +1 -1
- package/dest/contracts/fee_asset_price_oracle.d.ts +6 -2
- package/dest/contracts/fee_asset_price_oracle.d.ts.map +1 -1
- package/dest/contracts/fee_asset_price_oracle.js +11 -6
- package/dest/contracts/governance.d.ts +108 -33
- package/dest/contracts/governance.d.ts.map +1 -1
- package/dest/contracts/governance.js +193 -12
- package/dest/contracts/governance_proposer.d.ts +33 -3
- package/dest/contracts/governance_proposer.d.ts.map +1 -1
- package/dest/contracts/governance_proposer.js +51 -9
- 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 +3 -3
- package/dest/contracts/index.d.ts.map +1 -1
- package/dest/contracts/index.js +2 -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/rollup.d.ts +5250 -24
- package/dest/contracts/rollup.d.ts.map +1 -1
- package/dest/contracts/rollup.js +366 -64
- package/dest/contracts/{tally_slashing_proposer.d.ts → slashing_proposer.d.ts} +3 -4
- package/dest/contracts/slashing_proposer.d.ts.map +1 -0
- package/dest/contracts/{tally_slashing_proposer.js → slashing_proposer.js} +13 -15
- package/dest/deploy_aztec_l1_contracts.d.ts +3 -6
- package/dest/deploy_aztec_l1_contracts.d.ts.map +1 -1
- package/dest/deploy_aztec_l1_contracts.js +2 -4
- package/dest/generated/l1-contracts-defaults.d.ts +1 -1
- package/dest/generated/l1-contracts-defaults.js +1 -1
- package/dest/l1_artifacts.d.ts +13409 -15883
- 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/l1_tx_utils.d.ts +9 -1
- package/dest/l1_tx_utils/l1_tx_utils.d.ts.map +1 -1
- package/dest/l1_tx_utils/l1_tx_utils.js +54 -35
- 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 +2 -1
- package/dest/l1_tx_utils/tx_delayer.d.ts +5 -3
- package/dest/l1_tx_utils/tx_delayer.d.ts.map +1 -1
- package/dest/l1_tx_utils/tx_delayer.js +7 -5
- package/dest/publisher_manager.d.ts +21 -7
- package/dest/publisher_manager.d.ts.map +1 -1
- package/dest/publisher_manager.js +81 -7
- package/dest/queries.d.ts +13 -2
- package/dest/queries.d.ts.map +1 -1
- package/dest/queries.js +62 -3
- package/dest/test/chain_monitor.d.ts +23 -3
- package/dest/test/chain_monitor.d.ts.map +1 -1
- package/dest/test/chain_monitor.js +38 -2
- package/dest/test/eth_cheat_codes.d.ts +12 -4
- package/dest/test/eth_cheat_codes.d.ts.map +1 -1
- package/dest/test/eth_cheat_codes.js +17 -4
- package/dest/test/rollup_cheat_codes.d.ts +31 -3
- package/dest/test/rollup_cheat_codes.d.ts.map +1 -1
- package/dest/test/rollup_cheat_codes.js +59 -7
- package/dest/test/start_anvil.d.ts +8 -1
- package/dest/test/start_anvil.d.ts.map +1 -1
- package/dest/test/start_anvil.js +16 -2
- package/dest/utils.d.ts +9 -2
- package/dest/utils.d.ts.map +1 -1
- package/dest/utils.js +34 -6
- package/package.json +6 -6
- package/src/client.ts +66 -2
- package/src/config.ts +9 -13
- package/src/contracts/chain_state_override.ts +200 -0
- package/src/contracts/empire_base.ts +0 -2
- package/src/contracts/fee_asset_price_oracle.ts +10 -5
- package/src/contracts/governance.ts +266 -9
- package/src/contracts/governance_proposer.ts +52 -5
- package/src/contracts/inbox.ts +13 -5
- package/src/contracts/index.ts +2 -2
- package/src/contracts/multicall.ts +243 -105
- package/src/contracts/outbox.ts +42 -8
- package/src/contracts/rollup.ts +401 -64
- package/src/contracts/{tally_slashing_proposer.ts → slashing_proposer.ts} +14 -16
- package/src/deploy_aztec_l1_contracts.ts +1 -5
- package/src/generated/l1-contracts-defaults.ts +1 -1
- 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/l1_tx_utils.ts +51 -28
- package/src/l1_tx_utils/readonly_l1_tx_utils.ts +2 -1
- package/src/l1_tx_utils/tx_delayer.ts +16 -7
- package/src/publisher_manager.ts +105 -10
- package/src/queries.ts +70 -4
- package/src/test/chain_monitor.ts +65 -3
- package/src/test/eth_cheat_codes.ts +16 -4
- package/src/test/rollup_cheat_codes.ts +64 -6
- package/src/test/start_anvil.ts +25 -2
- package/src/utils.ts +30 -6
- package/dest/contracts/empire_slashing_proposer.d.ts +0 -69
- package/dest/contracts/empire_slashing_proposer.d.ts.map +0 -1
- package/dest/contracts/empire_slashing_proposer.js +0 -216
- package/dest/contracts/tally_slashing_proposer.d.ts.map +0 -1
- package/src/contracts/empire_slashing_proposer.ts +0 -265
|
@@ -15,6 +15,10 @@ export declare class RollupCheatCodes {
|
|
|
15
15
|
static create(rpcUrls: string[], addresses: Pick<L1ContractAddresses, 'rollupAddress'>, dateProvider: DateProvider): RollupCheatCodes;
|
|
16
16
|
/** Returns the current slot */
|
|
17
17
|
getSlot(): Promise<SlotNumber>;
|
|
18
|
+
/** Returns the slot number at a given timestamp. */
|
|
19
|
+
getSlotAt(timestamp: bigint): Promise<SlotNumber>;
|
|
20
|
+
/** Returns the timestamp for the start of a given slot. */
|
|
21
|
+
getTimestampForSlot(slot: SlotNumber): Promise<bigint>;
|
|
18
22
|
/** Returns the number of seconds until the start of the given slot based on L1 block timestamp. */
|
|
19
23
|
getSecondsUntilSlot(slot: SlotNumber): Promise<number>;
|
|
20
24
|
/** Returns the current epoch */
|
|
@@ -49,6 +53,15 @@ export declare class RollupCheatCodes {
|
|
|
49
53
|
advanceToNextEpoch(): Promise<void>;
|
|
50
54
|
/** Warps time in L1 until the beginning of the next slot. */
|
|
51
55
|
advanceToNextSlot(): Promise<(bigint | SlotNumber)[]>;
|
|
56
|
+
/**
|
|
57
|
+
* Warps L1 time to the start of an explicit absolute slot. Unlike `advanceSlots(N)` which is
|
|
58
|
+
* relative to the current L1 timestamp at call time and therefore races with real-time
|
|
59
|
+
* progression between query and warp, this lands at the slot regardless of latency.
|
|
60
|
+
*
|
|
61
|
+
* Throws if the requested slot is in the past relative to current L1 time (anvil cannot
|
|
62
|
+
* rewind).
|
|
63
|
+
*/
|
|
64
|
+
advanceToSlot(slot: SlotNumber): Promise<bigint>;
|
|
52
65
|
/**
|
|
53
66
|
* Warps time in L1 equivalent to however many slots.
|
|
54
67
|
* @param howMany - The number of slots to advance.
|
|
@@ -64,7 +77,7 @@ export declare class RollupCheatCodes {
|
|
|
64
77
|
* @param howMuch - How many checkpoints to move it forward
|
|
65
78
|
*/
|
|
66
79
|
advanceInboxInProgress(howMuch: number | bigint): Promise<bigint>;
|
|
67
|
-
insertOutbox(epoch: EpochNumber, outHash: bigint): Promise<void>;
|
|
80
|
+
insertOutbox(epoch: EpochNumber, numCheckpointsInEpoch: number, outHash: bigint): Promise<void>;
|
|
68
81
|
/**
|
|
69
82
|
* Executes an action impersonated as the owner of the Rollup contract.
|
|
70
83
|
* @param action - The action to execute
|
|
@@ -82,9 +95,24 @@ export declare class RollupCheatCodes {
|
|
|
82
95
|
*/
|
|
83
96
|
bumpProvingCostPerMana(bumper: (before: bigint) => bigint): Promise<void>;
|
|
84
97
|
/**
|
|
85
|
-
* Directly updates proving cost per mana.
|
|
98
|
+
* Directly updates proving cost per mana. Throws if the on-chain tx reverts
|
|
99
|
+
* (e.g. rate-limit cooldown, step cap, or floor) instead of silently succeeding.
|
|
86
100
|
* @param ethValue - The new proving cost per mana in ETH
|
|
87
101
|
*/
|
|
88
102
|
setProvingCostPerMana(ethValue: bigint): Promise<void>;
|
|
103
|
+
/**
|
|
104
|
+
* Resets the 30-day proving-cost update cooldown enforced by FeeLib.updateProvingCostPerMana
|
|
105
|
+
* by zeroing `FeeStore.provingCostLastUpdate` directly in contract storage. Use between
|
|
106
|
+
* successive setProvingCostPerMana / bumpProvingCostPerMana calls so the later update can
|
|
107
|
+
* land instead of reverting. Does not touch L1 time, so PXE/tx-expiration state stays intact.
|
|
108
|
+
*
|
|
109
|
+
* @note This is tightly coupled to the `FeeStore` layout in
|
|
110
|
+
* l1-contracts/src/core/libraries/rollup/FeeLib.sol:
|
|
111
|
+
* slot + 0: CompressedFeeConfig config (uint256)
|
|
112
|
+
* slot + 1: L1GasOracleValues l1GasOracleValues (14+14+4 bytes, packed)
|
|
113
|
+
* slot + 2: uint64 provingCostLastUpdate (only member — zeroing the slot is safe)
|
|
114
|
+
* If the struct layout changes, update the offset below.
|
|
115
|
+
*/
|
|
116
|
+
clearProvingCostCooldown(): Promise<void>;
|
|
89
117
|
}
|
|
90
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
118
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicm9sbHVwX2NoZWF0X2NvZG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"file":"rollup_cheat_codes.d.ts","sourceRoot":"","sources":["../../src/test/rollup_cheat_codes.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAC;AACjF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAG5F,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAE1D,OAAO,EACL,KAAK,qBAAqB,EAC1B,KAAK,GAAG,
|
|
1
|
+
{"version":3,"file":"rollup_cheat_codes.d.ts","sourceRoot":"","sources":["../../src/test/rollup_cheat_codes.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAC;AACjF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAG5F,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAE1D,OAAO,EACL,KAAK,qBAAqB,EAC1B,KAAK,GAAG,EAOT,MAAM,MAAM,CAAC;AAEd,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAErD,8CAA8C;AAC9C,qBAAa,gBAAgB;IAOzB,OAAO,CAAC,aAAa;IANvB,OAAO,CAAC,MAAM,CAAmB;IACjC,OAAO,CAAC,MAAM,CAA4D;IAE1E,OAAO,CAAC,MAAM,CAAuC;IAErD,YACU,aAAa,EAAE,aAAa,EACpC,SAAS,EAAE,IAAI,CAAC,mBAAmB,EAAE,eAAe,CAAC,EAWtD;IAED,MAAM,CAAC,M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AC,EAAE,gBAAgB,iBA+B3D;IAED;;;OAGG;IACI,sBAAsB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAmCvE;IAEM,YAAY,CAAC,KAAK,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,iBASrF;IAED;;;OAGG;IACU,OAAO,CAClB,MAAM,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,qBAAqB,CAAC,OAAO,SAAS,EAAE,gBAAgB,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,iBAMzG;IAED;;OAEG;IACU,UAAU,kBAOtB;IAED,4CAA4C;IAC/B,oBAAoB,kBAMhC;IAED;;;OAGG;IACU,sBAAsB,CAAC,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,iBAIrE;IAED;;;;OAIG;IACU,qBAAqB,CAAC,QAAQ,EAAE,MAAM,iBAiBlD;IAED;;;;;;;;;;;;OAYG;IACU,wBAAwB,kBAOpC;CACF"}
|
|
@@ -3,7 +3,7 @@ import { CheckpointNumber, EpochNumber, SlotNumber } from '@aztec/foundation/bra
|
|
|
3
3
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
4
4
|
import { createLogger } from '@aztec/foundation/log';
|
|
5
5
|
import { RollupAbi } from '@aztec/l1-artifacts/RollupAbi';
|
|
6
|
-
import { createPublicClient, fallback, getContract, hexToBigInt, http } from 'viem';
|
|
6
|
+
import { createPublicClient, fallback, getContract, hexToBigInt, http, keccak256 } from 'viem';
|
|
7
7
|
import { EthCheatCodes } from './eth_cheat_codes.js';
|
|
8
8
|
/** Cheat codes for the L1 rollup contract. */ export class RollupCheatCodes {
|
|
9
9
|
ethCheatCodes;
|
|
@@ -31,10 +31,18 @@ import { EthCheatCodes } from './eth_cheat_codes.js';
|
|
|
31
31
|
}
|
|
32
32
|
/** Returns the current slot */ async getSlot() {
|
|
33
33
|
const ts = BigInt((await this.client.getBlock()).timestamp);
|
|
34
|
+
return this.getSlotAt(ts);
|
|
35
|
+
}
|
|
36
|
+
/** Returns the slot number at a given timestamp. */ async getSlotAt(timestamp) {
|
|
34
37
|
return SlotNumber.fromBigInt(await this.rollup.read.getSlotAt([
|
|
35
|
-
|
|
38
|
+
timestamp
|
|
36
39
|
]));
|
|
37
40
|
}
|
|
41
|
+
/** Returns the timestamp for the start of a given slot. */ async getTimestampForSlot(slot) {
|
|
42
|
+
return await this.rollup.read.getTimestampForSlot([
|
|
43
|
+
BigInt(slot)
|
|
44
|
+
]);
|
|
45
|
+
}
|
|
38
46
|
/** Returns the number of seconds until the start of the given slot based on L1 block timestamp. */ async getSecondsUntilSlot(slot) {
|
|
39
47
|
const [currentTimestamp, targetTimestamp] = await Promise.all([
|
|
40
48
|
this.client.getBlock().then((b)=>BigInt(b.timestamp)),
|
|
@@ -143,6 +151,26 @@ import { EthCheatCodes } from './eth_cheat_codes.js';
|
|
|
143
151
|
];
|
|
144
152
|
}
|
|
145
153
|
/**
|
|
154
|
+
* Warps L1 time to the start of an explicit absolute slot. Unlike `advanceSlots(N)` which is
|
|
155
|
+
* relative to the current L1 timestamp at call time and therefore races with real-time
|
|
156
|
+
* progression between query and warp, this lands at the slot regardless of latency.
|
|
157
|
+
*
|
|
158
|
+
* Throws if the requested slot is in the past relative to current L1 time (anvil cannot
|
|
159
|
+
* rewind).
|
|
160
|
+
*/ async advanceToSlot(slot) {
|
|
161
|
+
const timestamp = await this.rollup.read.getTimestampForSlot([
|
|
162
|
+
BigInt(slot)
|
|
163
|
+
]);
|
|
164
|
+
await this.ethCheatCodes.warp(Number(timestamp), {
|
|
165
|
+
silent: true,
|
|
166
|
+
resetBlockInterval: true
|
|
167
|
+
});
|
|
168
|
+
this.logger.warn(`Advanced to slot ${slot}`, {
|
|
169
|
+
timestamp
|
|
170
|
+
});
|
|
171
|
+
return timestamp;
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
146
174
|
* Warps time in L1 equivalent to however many slots.
|
|
147
175
|
* @param howMany - The number of slots to advance.
|
|
148
176
|
*/ async advanceSlots(howMany) {
|
|
@@ -220,12 +248,12 @@ import { EthCheatCodes } from './eth_cheat_codes.js';
|
|
|
220
248
|
return newInProgress;
|
|
221
249
|
});
|
|
222
250
|
}
|
|
223
|
-
insertOutbox(epoch, outHash) {
|
|
251
|
+
insertOutbox(epoch, numCheckpointsInEpoch, outHash) {
|
|
224
252
|
return this.ethCheatCodes.execWithPausedAnvil(async ()=>{
|
|
225
253
|
const outboxAddress = await this.rollup.read.getOutbox();
|
|
226
|
-
const epochRootSlot = OutboxContract.getEpochRootStorageSlot(epoch);
|
|
254
|
+
const epochRootSlot = OutboxContract.getEpochRootStorageSlot(epoch, numCheckpointsInEpoch);
|
|
227
255
|
await this.ethCheatCodes.store(EthAddress.fromString(outboxAddress), epochRootSlot, outHash);
|
|
228
|
-
this.logger.warn(`Advanced outbox to epoch ${epoch} with out hash ${outHash}`);
|
|
256
|
+
this.logger.warn(`Advanced outbox to epoch ${epoch} numCheckpointsInEpoch ${numCheckpointsInEpoch} with out hash ${outHash}`);
|
|
229
257
|
});
|
|
230
258
|
}
|
|
231
259
|
/**
|
|
@@ -272,7 +300,8 @@ import { EthCheatCodes } from './eth_cheat_codes.js';
|
|
|
272
300
|
await this.setProvingCostPerMana(newCost);
|
|
273
301
|
}
|
|
274
302
|
/**
|
|
275
|
-
* Directly updates proving cost per mana.
|
|
303
|
+
* Directly updates proving cost per mana. Throws if the on-chain tx reverts
|
|
304
|
+
* (e.g. rate-limit cooldown, step cap, or floor) instead of silently succeeding.
|
|
276
305
|
* @param ethValue - The new proving cost per mana in ETH
|
|
277
306
|
*/ async setProvingCostPerMana(ethValue) {
|
|
278
307
|
await this.asOwner(async (account, rollup)=>{
|
|
@@ -283,10 +312,33 @@ import { EthCheatCodes } from './eth_cheat_codes.js';
|
|
|
283
312
|
chain: this.client.chain,
|
|
284
313
|
gasLimit: 1000000n
|
|
285
314
|
});
|
|
286
|
-
await this.client.waitForTransactionReceipt({
|
|
315
|
+
const receipt = await this.client.waitForTransactionReceipt({
|
|
287
316
|
hash
|
|
288
317
|
});
|
|
318
|
+
if (receipt.status !== 'success') {
|
|
319
|
+
throw new Error(`setProvingCostPerMana(${ethValue}) reverted on L1 (tx ${hash}). ` + `Likely FeeLib rate-limit (30-day cooldown or 1.5x step cap); ` + `use clearProvingCostCooldown() between successive updates.`);
|
|
320
|
+
}
|
|
289
321
|
this.logger.warn(`Updated proving cost per mana to ${ethValue}`);
|
|
290
322
|
});
|
|
291
323
|
}
|
|
324
|
+
/**
|
|
325
|
+
* Resets the 30-day proving-cost update cooldown enforced by FeeLib.updateProvingCostPerMana
|
|
326
|
+
* by zeroing `FeeStore.provingCostLastUpdate` directly in contract storage. Use between
|
|
327
|
+
* successive setProvingCostPerMana / bumpProvingCostPerMana calls so the later update can
|
|
328
|
+
* land instead of reverting. Does not touch L1 time, so PXE/tx-expiration state stays intact.
|
|
329
|
+
*
|
|
330
|
+
* @note This is tightly coupled to the `FeeStore` layout in
|
|
331
|
+
* l1-contracts/src/core/libraries/rollup/FeeLib.sol:
|
|
332
|
+
* slot + 0: CompressedFeeConfig config (uint256)
|
|
333
|
+
* slot + 1: L1GasOracleValues l1GasOracleValues (14+14+4 bytes, packed)
|
|
334
|
+
* slot + 2: uint64 provingCostLastUpdate (only member — zeroing the slot is safe)
|
|
335
|
+
* If the struct layout changes, update the offset below.
|
|
336
|
+
*/ async clearProvingCostCooldown() {
|
|
337
|
+
const feeStoreBaseSlot = hexToBigInt(keccak256(Buffer.from('aztec.fee.storage', 'utf-8')));
|
|
338
|
+
const provingCostLastUpdateSlot = feeStoreBaseSlot + 2n;
|
|
339
|
+
await this.ethCheatCodes.store(EthAddress.fromString(this.rollup.address), provingCostLastUpdateSlot, 0n, {
|
|
340
|
+
silent: true
|
|
341
|
+
});
|
|
342
|
+
this.logger.warn(`Cleared proving-cost update cooldown`);
|
|
343
|
+
}
|
|
292
344
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { TestDateProvider } from '@aztec/foundation/timer';
|
|
1
2
|
/** Minimal interface matching the @viem/anvil Anvil shape used by callers. */
|
|
2
3
|
export interface Anvil {
|
|
3
4
|
readonly port: number;
|
|
@@ -24,10 +25,16 @@ export declare function startAnvil(opts?: {
|
|
|
24
25
|
* L1-finality-based logic work without needing hundreds of mined blocks.
|
|
25
26
|
*/
|
|
26
27
|
slotsInAnEpoch?: number;
|
|
28
|
+
/**
|
|
29
|
+
* If provided, the date provider will be synced to anvil's block time on every mined block.
|
|
30
|
+
* This keeps the dateProvider in lockstep with anvil's chain time, avoiding drift between
|
|
31
|
+
* the wall clock and the L1 chain when computing L1 slot timestamps.
|
|
32
|
+
*/
|
|
33
|
+
dateProvider?: TestDateProvider;
|
|
27
34
|
}): Promise<{
|
|
28
35
|
anvil: Anvil;
|
|
29
36
|
methodCalls?: string[];
|
|
30
37
|
rpcUrl: string;
|
|
31
38
|
stop: () => Promise<void>;
|
|
32
39
|
}>;
|
|
33
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
40
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RhcnRfYW52aWwuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy90ZXN0L3N0YXJ0X2FudmlsLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUVBLE9BQU8sS0FBSyxFQUFFLGdCQUFnQixFQUFFLE1BQU0seUJBQXlCLENBQUM7QUFNaEUsOEVBQThFO0FBQzlFLE1BQU0sV0FBVyxLQUFLO0lBQ3BCLFFBQVEsQ0FBQyxJQUFJLEVBQUUsTUFBTSxDQUFDO0lBQ3RCLFFBQVEsQ0FBQyxJQUFJLEVBQUUsTUFBTSxDQUFDO0lBQ3RCLFFBQVEsQ0FBQyxNQUFNLEVBQUUsV0FBVyxHQUFHLE1BQU0sQ0FBQztJQUN0QyxJQUFJLElBQUksT0FBTyxDQUFDLElBQUksQ0FBQyxDQUFDO0NBQ3ZCO0FBRUQ7O0dBRUc7QUFDSCx3QkFBc0IsVUFBVSxDQUM5QixJQUFJLEdBQUU7SUFDSixJQUFJLENBQUMsRUFBRSxNQUFNLENBQUM7SUFDZCxXQUFXLENBQUMsRUFBRSxNQUFNLENBQUM7SUFDckIsR0FBRyxDQUFDLEVBQUUsT0FBTyxDQUFDO0lBQ2Qsa0JBQWtCLENBQUMsRUFBRSxPQUFPLENBQUM7SUFDN0IsUUFBUSxDQUFDLEVBQUUsTUFBTSxDQUFDO0lBQ2xCLE9BQU8sQ0FBQyxFQUFFLE1BQU0sQ0FBQztJQUNqQixxREFBcUQ7SUFDckQsUUFBUSxDQUFDLEVBQUUsTUFBTSxDQUFDO0lBQ2xCOzs7OztPQUtHO0lBQ0gsY0FBYyxDQUFDLEVBQUUsTUFBTSxDQUFDO0lBQ3hCOzs7O09BSUc7SUFDSCxZQUFZLENBQUMsRUFBRSxnQkFBZ0IsQ0FBQztDQUM1QixHQUNMLE9BQU8sQ0FBQztJQUFFLEtBQUssRUFBRSxLQUFLLENBQUM7SUFBQyxXQUFXLENBQUMsRUFBRSxNQUFNLEVBQUUsQ0FBQztJQUFDLE1BQU0sRUFBRSxNQUFNLENBQUM7SUFBQyxJQUFJLEVBQUUsTUFBTSxPQUFPLENBQUMsSUFBSSxDQUFDLENBQUE7Q0FBRSxDQUFDLENBK0g5RiJ9
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"start_anvil.d.ts","sourceRoot":"","sources":["../../src/test/start_anvil.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"start_anvil.d.ts","sourceRoot":"","sources":["../../src/test/start_anvil.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAMhE,8EAA8E;AAC9E,MAAM,WAAW,KAAK;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,CAAC;IACtC,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACvB;AAED;;GAEG;AACH,wBAAsB,UAAU,CAC9B,IAAI,GAAE;IACJ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,qDAAqD;IACrD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;;OAKG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;;OAIG;IACH,YAAY,CAAC,EAAE,gBAAgB,CAAC;CAC5B,GACL,OAAO,CAAC;IAAE,KAAK,EAAE,KAAK,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;CAAE,CAAC,CA+H9F"}
|
package/dest/test/start_anvil.js
CHANGED
|
@@ -75,12 +75,15 @@ import { dirname, resolve } from 'path';
|
|
|
75
75
|
child.stderr?.on('data', onStderr);
|
|
76
76
|
child.once('close', onClose);
|
|
77
77
|
});
|
|
78
|
-
// Continue piping for logging
|
|
79
|
-
if (logger || opts.captureMethodCalls) {
|
|
78
|
+
// Continue piping for logging, method-call capture, and/or dateProvider sync after startup.
|
|
79
|
+
if (logger || opts.captureMethodCalls || opts.dateProvider) {
|
|
80
80
|
child.stdout?.on('data', (data)=>{
|
|
81
81
|
const text = data.toString();
|
|
82
82
|
logger?.debug(text.trim());
|
|
83
83
|
methodCalls?.push(...text.match(/eth_[^\s]+/g) || []);
|
|
84
|
+
if (opts.dateProvider) {
|
|
85
|
+
syncDateProviderFromAnvilOutput(text, opts.dateProvider);
|
|
86
|
+
}
|
|
84
87
|
});
|
|
85
88
|
child.stderr?.on('data', (data)=>{
|
|
86
89
|
logger?.debug(data.toString().trim());
|
|
@@ -125,6 +128,17 @@ import { dirname, resolve } from 'path';
|
|
|
125
128
|
rpcUrl: `http://127.0.0.1:${port}`
|
|
126
129
|
};
|
|
127
130
|
}
|
|
131
|
+
/** Extracts block time from anvil stdout and syncs the dateProvider. */ function syncDateProviderFromAnvilOutput(text, dateProvider) {
|
|
132
|
+
// Anvil logs mined blocks as:
|
|
133
|
+
// Block Time: "Fri, 20 Mar 2026 02:10:46 +0000"
|
|
134
|
+
const match = text.match(/Block Time:\s*"([^"]+)"/);
|
|
135
|
+
if (match) {
|
|
136
|
+
const blockTimeMs = new Date(match[1]).getTime();
|
|
137
|
+
if (!isNaN(blockTimeMs)) {
|
|
138
|
+
dateProvider.setTime(blockTimeMs);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
128
142
|
/** Send SIGTERM, wait up to 5 s, then SIGKILL. All timers are always cleared. */ function killChild(child) {
|
|
129
143
|
return new Promise((resolve)=>{
|
|
130
144
|
if (child.exitCode !== null || child.killed) {
|
package/dest/utils.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export interface L2Claim {
|
|
|
9
9
|
}
|
|
10
10
|
export declare class FormattedViemError extends Error {
|
|
11
11
|
metaMessages?: any[];
|
|
12
|
-
constructor(message: string, metaMessages?: any[]);
|
|
12
|
+
constructor(message: string, metaMessages?: any[], options?: ErrorOptions);
|
|
13
13
|
}
|
|
14
14
|
export declare function extractEvent<const TAbi extends Abi | readonly unknown[], TEventName extends ContractEventName<TAbi>, TEventType = DecodeEventLogReturnType<TAbi, TEventName, Hex[], undefined, true>>(logs: Log[], address: Hex, abi: TAbi, eventName: TEventName, filter?: (log: TEventType) => boolean, logger?: Logger): TEventType;
|
|
15
15
|
export declare function tryExtractEvent<const TAbi extends Abi | readonly unknown[], TEventName extends ContractEventName<TAbi>, TEventType = DecodeEventLogReturnType<TAbi, TEventName, Hex[], undefined, true>>(logs: Log[], address: Hex, abi: TAbi, eventName: TEventName, filter?: (log: TEventType) => boolean, logger?: Logger): TEventType | undefined;
|
|
@@ -22,6 +22,13 @@ export declare function mergeAbis(abis: Abi[]): Abi;
|
|
|
22
22
|
* @returns A FormattedViemError instance.
|
|
23
23
|
*/
|
|
24
24
|
export declare function formatViemError(error: any, abi?: Abi): FormattedViemError;
|
|
25
|
+
/**
|
|
26
|
+
* Best-effort decode of a raw revert payload (`0x...`) against an ABI.
|
|
27
|
+
* Returns a human-readable `ErrorName(arg1, arg2, ...)` string, or `undefined` if the selector
|
|
28
|
+
* is unknown or the payload is empty. Use to surface decoded error names alongside the raw
|
|
29
|
+
* payload in log lines for operators.
|
|
30
|
+
*/
|
|
31
|
+
export declare function tryDecodeRevertReason(data: Hex | undefined, abi: Abi): string | undefined;
|
|
25
32
|
export declare function tryGetCustomErrorName(err: any): string | undefined;
|
|
26
33
|
/**
|
|
27
34
|
* Type guard to check if a transaction is a blob transaction (EIP-4844).
|
|
@@ -35,4 +42,4 @@ export declare function isBlobTransaction(tx: FormattedTransaction): tx is Forma
|
|
|
35
42
|
* Calculates a percentile from an array of bigints
|
|
36
43
|
*/
|
|
37
44
|
export declare function calculatePercentile(values: bigint[], percentile: number): bigint;
|
|
38
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
45
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXRpbHMuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy91dGlscy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssRUFBRSxFQUFFLEVBQUUsTUFBTSxnQ0FBZ0MsQ0FBQztBQUN6RCxPQUFPLEtBQUssRUFBRSxNQUFNLEVBQUU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BQWdCLGlCQUFpQixDQUFDLEVBQUUsRUFBRSxvQkFBb0IsR0FBRyxFQUFFLElBQUksb0JBQW9CLEdBQUc7SUFDeEYsZ0JBQWdCLEVBQUUsTUFBTSxDQUFDO0lBQ3pCLG1CQUFtQixFQUFFLFNBQVMsR0FBRyxFQUFFLENBQUM7Q0FDckMsQ0FPQTtBQUVEOztHQUVHO0FBQ0gsd0JBQWdCLG1CQUFtQixDQUFDLE1BQU0sRUFBRSxNQUFNLEVBQUUsRUFBRSxVQUFVLEVBQUUsTUFBTSxHQUFHLE1BQU0sQ0FPaEYifQ==
|
package/dest/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AACzD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAGpD,OAAO,EACL,KAAK,GAAG,EAGR,KAAK,iBAAiB,EAEtB,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EACzB,KAAK,GAAG,EACR,KAAK,GAAG,EAGT,MAAM,MAAM,CAAC;AAGd,MAAM,WAAW,OAAO;IACtB,WAAW,EAAE,EAAE,CAAC;IAChB,WAAW,EAAE,EAAE,CAAC;IAChB,WAAW,EAAE,GAAG,CAAC;IACjB,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED,qBAAa,kBAAmB,SAAQ,KAAK;IAC3C,YAAY,CAAC,EAAE,GAAG,EAAE,CAAC;IAErB,YAAY,OAAO,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,GAAG,EAAE,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AACzD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBA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AAE,IAAI,EACT,SAAS,EAAE,UAAU,EACrB,MAAM,CAAC,EAAE,CAAC,GAAG,EAAE,UAAU,KAAK,OAAO,EACrC,MAAM,CAAC,EAAE,MAAM,GACd,UAAU,GAAG,SAAS,CAgBxB;AAED,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,GAAG,OAW7C;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,GAAG,CAe1C;AA2ED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,GAAG,EAAE,GAAG,GAAE,GAAe,GAAG,kBAAkB,CAkEpF;AAyBD;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,GAAG,GAAG,SAAS,EAAE,GAAG,EAAE,GAAG,GAAG,MAAM,GAAG,SAAS,CAUzF;AAED,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,GAAG,sBAa7C;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,oBAAoB,GAAG,EAAE,IAAI,oBAAoB,GAAG;IACxF,gBAAgB,EAAE,MAAM,CAAC;IACzB,mBAAmB,EAAE,SAAS,GAAG,EAAE,CAAC;CACrC,CAOA;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAOhF"}
|
package/dest/utils.js
CHANGED
|
@@ -3,8 +3,8 @@ import { BaseError, ContractFunctionRevertedError, decodeErrorResult, decodeEven
|
|
|
3
3
|
import { formatAbiItem, formatAbiParams } from 'viem/utils';
|
|
4
4
|
export class FormattedViemError extends Error {
|
|
5
5
|
metaMessages;
|
|
6
|
-
constructor(message, metaMessages){
|
|
7
|
-
super(message);
|
|
6
|
+
constructor(message, metaMessages, options){
|
|
7
|
+
super(message, options);
|
|
8
8
|
this.name = 'FormattedViemError';
|
|
9
9
|
this.metaMessages = metaMessages;
|
|
10
10
|
}
|
|
@@ -135,6 +135,7 @@ function getNestedErrorData(error) {
|
|
|
135
135
|
if (error instanceof FormattedViemError) {
|
|
136
136
|
return error;
|
|
137
137
|
}
|
|
138
|
+
const originalError = error;
|
|
138
139
|
// First try to decode as a custom error using the ABI
|
|
139
140
|
try {
|
|
140
141
|
const data = getNestedErrorData(error);
|
|
@@ -145,7 +146,9 @@ function getNestedErrorData(error) {
|
|
|
145
146
|
data: data
|
|
146
147
|
});
|
|
147
148
|
if (decoded) {
|
|
148
|
-
return new FormattedViemError(`${decoded.errorName}(${decoded.args?.join(', ') ?? ''})`, error?.metaMessages
|
|
149
|
+
return new FormattedViemError(`${decoded.errorName}(${decoded.args?.join(', ') ?? ''})`, error?.metaMessages, {
|
|
150
|
+
cause: originalError
|
|
151
|
+
});
|
|
149
152
|
}
|
|
150
153
|
}
|
|
151
154
|
// If it's a BaseError, try to get the custom error through ContractFunctionRevertedError
|
|
@@ -157,7 +160,9 @@ function getNestedErrorData(error) {
|
|
|
157
160
|
errorName = revertError.signature ?? '';
|
|
158
161
|
}
|
|
159
162
|
const args = revertError.metaMessages && revertError.metaMessages?.length > 1 ? revertError.metaMessages[1].trimStart() : '';
|
|
160
|
-
return new FormattedViemError(`${errorName}${args}`, error?.metaMessages
|
|
163
|
+
return new FormattedViemError(`${errorName}${args}`, error?.metaMessages, {
|
|
164
|
+
cause: originalError
|
|
165
|
+
});
|
|
161
166
|
}
|
|
162
167
|
}
|
|
163
168
|
} catch {
|
|
@@ -175,9 +180,13 @@ function getNestedErrorData(error) {
|
|
|
175
180
|
}
|
|
176
181
|
// If it's a regular Error instance, return it with its message
|
|
177
182
|
if (error instanceof Error) {
|
|
178
|
-
return new FormattedViemError(truncateErrorMessage(error.message), error?.metaMessages
|
|
183
|
+
return new FormattedViemError(truncateErrorMessage(error.message), error?.metaMessages, {
|
|
184
|
+
cause: originalError
|
|
185
|
+
});
|
|
179
186
|
}
|
|
180
|
-
return new FormattedViemError(truncateErrorMessage(String(error))
|
|
187
|
+
return new FormattedViemError(truncateErrorMessage(String(error)), undefined, {
|
|
188
|
+
cause: originalError
|
|
189
|
+
});
|
|
181
190
|
}
|
|
182
191
|
function stripAbis(obj) {
|
|
183
192
|
if (!obj || typeof obj !== 'object') {
|
|
@@ -198,6 +207,25 @@ function stripAbis(obj) {
|
|
|
198
207
|
}
|
|
199
208
|
});
|
|
200
209
|
}
|
|
210
|
+
/**
|
|
211
|
+
* Best-effort decode of a raw revert payload (`0x...`) against an ABI.
|
|
212
|
+
* Returns a human-readable `ErrorName(arg1, arg2, ...)` string, or `undefined` if the selector
|
|
213
|
+
* is unknown or the payload is empty. Use to surface decoded error names alongside the raw
|
|
214
|
+
* payload in log lines for operators.
|
|
215
|
+
*/ export function tryDecodeRevertReason(data, abi) {
|
|
216
|
+
if (!data || data === '0x') {
|
|
217
|
+
return undefined;
|
|
218
|
+
}
|
|
219
|
+
try {
|
|
220
|
+
const decoded = decodeErrorResult({
|
|
221
|
+
abi,
|
|
222
|
+
data
|
|
223
|
+
});
|
|
224
|
+
return `${decoded.errorName}(${decoded.args?.join(', ') ?? ''})`;
|
|
225
|
+
} catch {
|
|
226
|
+
return undefined;
|
|
227
|
+
}
|
|
228
|
+
}
|
|
201
229
|
export function tryGetCustomErrorName(err) {
|
|
202
230
|
try {
|
|
203
231
|
// See https://viem.sh/docs/contract/simulateContract#handling-custom-errors
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/ethereum",
|
|
3
|
-
"version": "0.0.1-commit.
|
|
3
|
+
"version": "0.0.1-commit.b3d3157a",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
"./account": "./dest/account.js",
|
|
@@ -50,16 +50,16 @@
|
|
|
50
50
|
"../package.common.json"
|
|
51
51
|
],
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@aztec/blob-lib": "0.0.1-commit.
|
|
54
|
-
"@aztec/constants": "0.0.1-commit.
|
|
55
|
-
"@aztec/foundation": "0.0.1-commit.
|
|
56
|
-
"@aztec/l1-artifacts": "0.0.1-commit.
|
|
53
|
+
"@aztec/blob-lib": "0.0.1-commit.b3d3157a",
|
|
54
|
+
"@aztec/constants": "0.0.1-commit.b3d3157a",
|
|
55
|
+
"@aztec/foundation": "0.0.1-commit.b3d3157a",
|
|
56
|
+
"@aztec/l1-artifacts": "0.0.1-commit.b3d3157a",
|
|
57
57
|
"dotenv": "^16.0.3",
|
|
58
58
|
"lodash.chunk": "^4.2.0",
|
|
59
59
|
"lodash.pickby": "^4.5.0",
|
|
60
60
|
"tslib": "^2.4.0",
|
|
61
61
|
"viem": "npm:@aztec/viem@2.38.2",
|
|
62
|
-
"zod": "^
|
|
62
|
+
"zod": "^4"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
65
|
"@jest/globals": "^30.0.0",
|
package/src/client.ts
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import type { Logger } from '@aztec/foundation/log';
|
|
2
2
|
import { retryUntil } from '@aztec/foundation/retry';
|
|
3
|
+
import { getErrorCause } from '@aztec/foundation/types';
|
|
3
4
|
|
|
4
5
|
import {
|
|
5
6
|
type Chain,
|
|
7
|
+
type FallbackTransport,
|
|
6
8
|
type HDAccount,
|
|
9
|
+
HttpRequestError,
|
|
10
|
+
type HttpTransport,
|
|
7
11
|
type LocalAccount,
|
|
8
12
|
type PrivateKeyAccount,
|
|
9
13
|
createPublicClient,
|
|
@@ -25,10 +29,69 @@ type Config = {
|
|
|
25
29
|
l1ChainId: number;
|
|
26
30
|
/** The polling interval viem uses in ms */
|
|
27
31
|
viemPollingIntervalMS?: number;
|
|
32
|
+
/** Timeout for HTTP requests to the L1 RPC node in ms. */
|
|
33
|
+
l1HttpTimeoutMS?: number;
|
|
28
34
|
};
|
|
29
35
|
|
|
30
36
|
export type { Config as EthereumClientConfig };
|
|
31
37
|
|
|
38
|
+
/** Error exposed by L1 RPC transports without including provider URLs in its message. */
|
|
39
|
+
export class L1RpcError extends Error {
|
|
40
|
+
constructor(message: string, options?: ErrorOptions) {
|
|
41
|
+
super(message, options);
|
|
42
|
+
this.name = 'L1RpcError';
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/** Creates a viem fallback HTTP transport for the given L1 RPC URLs. */
|
|
47
|
+
export function makeL1HttpTransport(rpcUrls: string[], opts?: { timeout?: number }) {
|
|
48
|
+
return wrapL1RpcTransport(fallback(rpcUrls.map(url => http(url, { batch: false, timeout: opts?.timeout }))));
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/** Returns the HTTP status from an L1 RPC error's cause chain, if one is available. */
|
|
52
|
+
export function getL1RpcHttpStatus(err: unknown): number | undefined {
|
|
53
|
+
return getErrorCause(err, HttpRequestError)?.status;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/** Returns true when an L1 RPC error's cause chain contains the given HTTP status. */
|
|
57
|
+
export function isL1RpcHttpStatus(err: unknown, status: number): boolean {
|
|
58
|
+
return getL1RpcHttpStatus(err) === status;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
function wrapL1RpcTransport(transport: FallbackTransport<HttpTransport[]>): FallbackTransport<HttpTransport[]> {
|
|
62
|
+
const wrappedTransport: FallbackTransport<HttpTransport[]> = parameters => {
|
|
63
|
+
const fallbackTransport = transport(parameters);
|
|
64
|
+
const request: typeof fallbackTransport.request = async args => {
|
|
65
|
+
try {
|
|
66
|
+
return await fallbackTransport.request(args);
|
|
67
|
+
} catch (err) {
|
|
68
|
+
throw err instanceof L1RpcError ? err : new L1RpcError('L1 RPC request failed', { cause: err });
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
return { ...fallbackTransport, request };
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
return wrappedTransport;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Returns the individual RPC URLs underlying a viem public client that was constructed with a
|
|
79
|
+
* fallback HTTP transport (see {@link makeL1HttpTransport}). Returns an empty array if the
|
|
80
|
+
* transport shape is not recognized (e.g. mock clients in tests, or non-fallback transports).
|
|
81
|
+
*/
|
|
82
|
+
export function getRpcUrlsFromClient(client: ViemPublicClient): string[] {
|
|
83
|
+
const transport = client.transport as unknown as {
|
|
84
|
+
transports?: { value?: { url?: string } }[];
|
|
85
|
+
value?: { url?: string };
|
|
86
|
+
url?: string;
|
|
87
|
+
};
|
|
88
|
+
if (Array.isArray(transport?.transports)) {
|
|
89
|
+
return transport.transports.map(t => t?.value?.url).filter((url): url is string => typeof url === 'string');
|
|
90
|
+
}
|
|
91
|
+
const singleUrl = transport?.value?.url ?? transport?.url;
|
|
92
|
+
return typeof singleUrl === 'string' ? [singleUrl] : [];
|
|
93
|
+
}
|
|
94
|
+
|
|
32
95
|
// TODO: Use these methods to abstract the creation of viem clients.
|
|
33
96
|
|
|
34
97
|
/** Returns a viem public client given the L1 config. */
|
|
@@ -36,7 +99,7 @@ export function getPublicClient(config: Config): ViemPublicClient {
|
|
|
36
99
|
const chain = createEthereumChain(config.l1RpcUrls, config.l1ChainId);
|
|
37
100
|
return createPublicClient({
|
|
38
101
|
chain: chain.chainInfo,
|
|
39
|
-
transport:
|
|
102
|
+
transport: makeL1HttpTransport(config.l1RpcUrls, { timeout: config.l1HttpTimeoutMS }),
|
|
40
103
|
pollingInterval: config.viemPollingIntervalMS,
|
|
41
104
|
});
|
|
42
105
|
}
|
|
@@ -77,6 +140,7 @@ export function createExtendedL1Client(
|
|
|
77
140
|
chain: Chain = foundry,
|
|
78
141
|
pollingIntervalMS?: number,
|
|
79
142
|
addressIndex?: number,
|
|
143
|
+
opts?: { httpTimeoutMS?: number },
|
|
80
144
|
): ExtendedViemWalletClient {
|
|
81
145
|
const hdAccount =
|
|
82
146
|
typeof mnemonicOrPrivateKeyOrHdAccount === 'string'
|
|
@@ -88,7 +152,7 @@ export function createExtendedL1Client(
|
|
|
88
152
|
const extendedClient = createWalletClient({
|
|
89
153
|
account: hdAccount,
|
|
90
154
|
chain,
|
|
91
|
-
transport:
|
|
155
|
+
transport: makeL1HttpTransport(rpcUrls, { timeout: opts?.httpTimeoutMS }),
|
|
92
156
|
pollingInterval: pollingIntervalMS,
|
|
93
157
|
}).extend(publicActions);
|
|
94
158
|
|
package/src/config.ts
CHANGED
|
@@ -2,7 +2,6 @@ import {
|
|
|
2
2
|
type ConfigMappingsType,
|
|
3
3
|
bigintConfigHelper,
|
|
4
4
|
booleanConfigHelper,
|
|
5
|
-
enumConfigHelper,
|
|
6
5
|
getConfigFromMappings,
|
|
7
6
|
getDefaultConfig,
|
|
8
7
|
numberConfigHelper,
|
|
@@ -60,13 +59,13 @@ export type L1ContractsConfig = {
|
|
|
60
59
|
slashingOffsetInRounds: number;
|
|
61
60
|
/** How long slashing can be disabled for in seconds when vetoer disables it */
|
|
62
61
|
slashingDisableDuration: number;
|
|
63
|
-
/**
|
|
64
|
-
|
|
65
|
-
/** Minimum amount that can be slashed
|
|
62
|
+
/** Whether to deploy a slasher proposer */
|
|
63
|
+
slasherEnabled: boolean;
|
|
64
|
+
/** Minimum amount that can be slashed */
|
|
66
65
|
slashAmountSmall: bigint;
|
|
67
|
-
/** Medium amount to slash
|
|
66
|
+
/** Medium amount to slash */
|
|
68
67
|
slashAmountMedium: bigint;
|
|
69
|
-
/** Largest amount that can be slashed per round
|
|
68
|
+
/** Largest amount that can be slashed per round */
|
|
70
69
|
slashAmountLarge: bigint;
|
|
71
70
|
/** Governance proposing quorum (defaults to roundSize/2 + 1) */
|
|
72
71
|
governanceProposerQuorum?: number;
|
|
@@ -152,13 +151,10 @@ export const l1ContractsConfigMappings: ConfigMappingsType<L1ContractsConfig> =
|
|
|
152
151
|
'How many slashing rounds back we slash (ie when slashing in round N, we slash for offenses committed during epochs of round N-offset)',
|
|
153
152
|
...numberConfigHelper(l1ContractsDefaultEnv.AZTEC_SLASHING_OFFSET_IN_ROUNDS),
|
|
154
153
|
},
|
|
155
|
-
|
|
156
|
-
env: '
|
|
157
|
-
description: '
|
|
158
|
-
...
|
|
159
|
-
['empire', 'tally', 'none'] as const,
|
|
160
|
-
l1ContractsDefaultEnv.AZTEC_SLASHER_FLAVOR as 'empire' | 'tally' | 'none',
|
|
161
|
-
),
|
|
154
|
+
slasherEnabled: {
|
|
155
|
+
env: 'AZTEC_SLASHER_ENABLED',
|
|
156
|
+
description: 'Whether to deploy a slasher proposer',
|
|
157
|
+
...booleanConfigHelper(true),
|
|
162
158
|
},
|
|
163
159
|
slashAmountSmall: {
|
|
164
160
|
env: 'AZTEC_SLASH_AMOUNT_SMALL',
|