@aztec/ethereum 0.0.1-commit.d3ec352c → 0.0.1-commit.d58ff9d0
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 -4
- package/dest/config.d.ts +45 -73
- package/dest/config.d.ts.map +1 -1
- package/dest/config.js +114 -386
- 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 +2 -1
- package/dest/contracts/empire_base.d.ts.map +1 -1
- package/dest/contracts/fee_asset_handler.d.ts +6 -5
- package/dest/contracts/fee_asset_handler.d.ts.map +1 -1
- package/dest/contracts/fee_asset_handler.js +11 -9
- 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 +110 -33
- package/dest/contracts/governance.d.ts.map +1 -1
- package/dest/contracts/governance.js +207 -16
- package/dest/contracts/governance_proposer.d.ts +34 -1
- package/dest/contracts/governance_proposer.d.ts.map +1 -1
- package/dest/contracts/governance_proposer.js +447 -10
- 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 +24 -3
- package/dest/contracts/inbox.d.ts.map +1 -1
- package/dest/contracts/inbox.js +42 -2
- package/dest/contracts/index.d.ts +6 -3
- package/dest/contracts/index.d.ts.map +1 -1
- package/dest/contracts/index.js +5 -2
- package/dest/contracts/log.d.ts +13 -0
- package/dest/contracts/log.d.ts.map +1 -0
- package/dest/contracts/log.js +1 -0
- package/dest/contracts/multicall.d.ts +130 -13
- package/dest/contracts/multicall.d.ts.map +1 -1
- package/dest/contracts/multicall.js +203 -93
- package/dest/contracts/outbox.d.ts +64 -0
- package/dest/contracts/outbox.d.ts.map +1 -0
- package/dest/contracts/outbox.js +113 -0
- 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 +5571 -102
- package/dest/contracts/rollup.d.ts.map +1 -1
- package/dest/contracts/rollup.js +1076 -192
- package/dest/contracts/{tally_slashing_proposer.d.ts → slashing_proposer.d.ts} +5 -5
- package/dest/contracts/slashing_proposer.d.ts.map +1 -0
- package/dest/contracts/{tally_slashing_proposer.js → slashing_proposer.js} +18 -13
- package/dest/deploy_aztec_l1_contracts.d.ts +267 -0
- package/dest/deploy_aztec_l1_contracts.d.ts.map +1 -0
- package/dest/deploy_aztec_l1_contracts.js +424 -0
- package/dest/deploy_l1_contract.d.ts +68 -0
- package/dest/deploy_l1_contract.d.ts.map +1 -0
- package/dest/deploy_l1_contract.js +312 -0
- package/dest/forwarder_proxy.d.ts +32 -0
- package/dest/forwarder_proxy.d.ts.map +1 -0
- package/dest/forwarder_proxy.js +93 -0
- 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/l1_artifacts.d.ts +19674 -16606
- 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 +99 -80
- package/dest/l1_reader.d.ts +7 -5
- package/dest/l1_reader.d.ts.map +1 -1
- package/dest/l1_reader.js +15 -7
- package/dest/l1_tx_utils/config.d.ts +9 -3
- package/dest/l1_tx_utils/config.d.ts.map +1 -1
- package/dest/l1_tx_utils/config.js +34 -7
- package/dest/l1_tx_utils/constants.d.ts +8 -2
- package/dest/l1_tx_utils/constants.d.ts.map +1 -1
- package/dest/l1_tx_utils/constants.js +27 -2
- 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/index.d.ts +10 -0
- package/dest/l1_tx_utils/fee-strategies/index.d.ts.map +1 -0
- package/dest/l1_tx_utils/fee-strategies/index.js +12 -0
- package/dest/l1_tx_utils/fee-strategies/p75_competitive.d.ts +8 -0
- package/dest/l1_tx_utils/fee-strategies/p75_competitive.d.ts.map +1 -0
- package/dest/l1_tx_utils/fee-strategies/p75_competitive.js +129 -0
- package/dest/l1_tx_utils/fee-strategies/p75_competitive_blob_txs_only.d.ts +23 -0
- package/dest/l1_tx_utils/fee-strategies/p75_competitive_blob_txs_only.d.ts.map +1 -0
- package/dest/l1_tx_utils/fee-strategies/p75_competitive_blob_txs_only.js +191 -0
- package/dest/l1_tx_utils/fee-strategies/types.d.ts +51 -0
- package/dest/l1_tx_utils/fee-strategies/types.d.ts.map +1 -0
- package/dest/l1_tx_utils/fee-strategies/types.js +3 -0
- package/dest/l1_tx_utils/forwarder_l1_tx_utils.d.ts +41 -0
- package/dest/l1_tx_utils/forwarder_l1_tx_utils.d.ts.map +1 -0
- package/dest/l1_tx_utils/forwarder_l1_tx_utils.js +42 -0
- package/dest/l1_tx_utils/index-blobs.d.ts +3 -0
- package/dest/l1_tx_utils/index-blobs.d.ts.map +1 -0
- package/dest/l1_tx_utils/index-blobs.js +2 -0
- package/dest/l1_tx_utils/index.d.ts +4 -1
- package/dest/l1_tx_utils/index.d.ts.map +1 -1
- package/dest/l1_tx_utils/index.js +3 -0
- package/dest/l1_tx_utils/interfaces.d.ts +2 -2
- package/dest/l1_tx_utils/interfaces.d.ts.map +1 -1
- package/dest/l1_tx_utils/l1_fee_analyzer.d.ts +252 -0
- package/dest/l1_tx_utils/l1_fee_analyzer.d.ts.map +1 -0
- package/dest/l1_tx_utils/l1_fee_analyzer.js +568 -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 +202 -92
- package/dest/l1_tx_utils/readonly_l1_tx_utils.d.ts +4 -15
- package/dest/l1_tx_utils/readonly_l1_tx_utils.d.ts.map +1 -1
- package/dest/l1_tx_utils/readonly_l1_tx_utils.js +63 -165
- 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 +70 -39
- package/dest/l1_tx_utils/types.d.ts +27 -1
- package/dest/l1_tx_utils/types.d.ts.map +1 -1
- package/dest/l1_tx_utils/types.js +10 -0
- package/dest/publisher_manager.d.ts +34 -7
- package/dest/publisher_manager.d.ts.map +1 -1
- package/dest/publisher_manager.js +119 -8
- package/dest/queries.d.ts +14 -3
- package/dest/queries.d.ts.map +1 -1
- package/dest/queries.js +80 -7
- 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 +105 -5
- package/dest/test/eth_cheat_codes.d.ts +49 -6
- package/dest/test/eth_cheat_codes.d.ts.map +1 -1
- package/dest/test/eth_cheat_codes.js +93 -43
- 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/rollup_cheat_codes.d.ts +64 -4
- package/dest/test/rollup_cheat_codes.d.ts.map +1 -1
- package/dest/test/rollup_cheat_codes.js +109 -8
- package/dest/test/start_anvil.d.ts +24 -2
- 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/types.d.ts +57 -2
- package/dest/types.d.ts.map +1 -1
- package/dest/utils.d.ts +24 -4
- package/dest/utils.d.ts.map +1 -1
- package/dest/utils.js +112 -16
- package/package.json +31 -15
- package/src/client.ts +66 -2
- package/src/config.ts +153 -469
- package/src/contracts/README.md +157 -0
- package/src/contracts/chain_state_override.ts +200 -0
- package/src/contracts/empire_base.ts +1 -1
- package/src/contracts/fee_asset_handler.ts +10 -7
- package/src/contracts/fee_asset_price_oracle.ts +285 -0
- package/src/contracts/governance.ts +279 -13
- package/src/contracts/governance_proposer.ts +64 -3
- package/src/contracts/gse.ts +7 -2
- package/src/contracts/inbox.ts +64 -4
- package/src/contracts/index.ts +5 -2
- package/src/contracts/log.ts +13 -0
- package/src/contracts/multicall.ts +247 -103
- package/src/contracts/outbox.ts +132 -0
- package/src/contracts/registry.ts +31 -1
- package/src/contracts/rollup.ts +789 -154
- package/src/contracts/{tally_slashing_proposer.ts → slashing_proposer.ts} +18 -14
- package/src/deploy_aztec_l1_contracts.ts +664 -0
- package/src/deploy_l1_contract.ts +362 -0
- package/src/forwarder_proxy.ts +108 -0
- package/src/foundry_binary.ts +57 -0
- package/src/l1_artifacts.ts +12 -35
- package/src/l1_contract_addresses.ts +120 -92
- package/src/l1_reader.ts +25 -10
- package/src/l1_tx_utils/config.ts +47 -9
- package/src/l1_tx_utils/constants.ts +13 -2
- package/src/l1_tx_utils/factory.ts +31 -31
- package/src/l1_tx_utils/fee-strategies/index.ts +22 -0
- package/src/l1_tx_utils/fee-strategies/p75_competitive.ts +163 -0
- package/src/l1_tx_utils/fee-strategies/p75_competitive_blob_txs_only.ts +245 -0
- package/src/l1_tx_utils/fee-strategies/types.ts +56 -0
- package/src/l1_tx_utils/forwarder_l1_tx_utils.ts +108 -0
- package/src/l1_tx_utils/index-blobs.ts +2 -0
- package/src/l1_tx_utils/index.ts +3 -0
- package/src/l1_tx_utils/interfaces.ts +1 -1
- package/src/l1_tx_utils/l1_fee_analyzer.ts +875 -0
- package/src/l1_tx_utils/l1_tx_utils.ts +194 -72
- package/src/l1_tx_utils/readonly_l1_tx_utils.ts +77 -211
- package/src/{test → l1_tx_utils}/tx_delayer.ts +97 -58
- package/src/l1_tx_utils/types.ts +32 -0
- package/src/publisher_manager.ts +145 -12
- package/src/queries.ts +87 -7
- package/src/test/blob_kzg_warmup.ts +65 -0
- package/src/test/chain_monitor.ts +150 -4
- package/src/test/eth_cheat_codes.ts +84 -47
- package/src/test/index.ts +1 -2
- package/src/test/rollup_cheat_codes.ts +136 -8
- package/src/test/start_anvil.ts +213 -31
- package/src/test/upgrade_utils.ts +2 -2
- package/src/types.ts +62 -0
- package/src/utils.ts +128 -19
- package/dest/contracts/empire_slashing_proposer.d.ts +0 -66
- package/dest/contracts/empire_slashing_proposer.d.ts.map +0 -1
- package/dest/contracts/empire_slashing_proposer.js +0 -200
- package/dest/contracts/tally_slashing_proposer.d.ts.map +0 -1
- package/dest/deploy_l1_contracts.d.ts +0 -673
- package/dest/deploy_l1_contracts.d.ts.map +0 -1
- package/dest/deploy_l1_contracts.js +0 -1491
- package/dest/index.d.ts +0 -18
- package/dest/index.d.ts.map +0 -1
- package/dest/index.js +0 -17
- 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 -265
- package/src/deploy_l1_contracts.ts +0 -1869
- package/src/index.ts +0 -17
- package/src/l1_tx_utils/l1_tx_utils_with_blobs.ts +0 -77
- package/src/test/delayed_tx_utils.ts +0 -52
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rollup_cheat_codes.d.ts","sourceRoot":"","sources":["../../src/test/rollup_cheat_codes.ts"],"names":[],"mappings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UAAU,EAAE,gBAAgB,EAC5B,IAAI,GAAE;QAAE,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAO,GACjD,OAAO,CAAC,gBAAgB,CAAC,CAU3B;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"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { RollupContract } from '@aztec/ethereum';
|
|
1
|
+
import { OutboxContract, RollupContract } from '@aztec/ethereum/contracts';
|
|
2
2
|
import { CheckpointNumber, EpochNumber, SlotNumber } from '@aztec/foundation/branded-types';
|
|
3
3
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
4
4
|
import { createLogger } from '@aztec/foundation/log';
|
|
5
|
+
import { retryUntil } from '@aztec/foundation/retry';
|
|
5
6
|
import { RollupAbi } from '@aztec/l1-artifacts/RollupAbi';
|
|
6
|
-
import { createPublicClient, fallback, getContract, hexToBigInt, http } from 'viem';
|
|
7
|
+
import { createPublicClient, fallback, getContract, hexToBigInt, http, keccak256 } from 'viem';
|
|
7
8
|
import { EthCheatCodes } from './eth_cheat_codes.js';
|
|
8
9
|
/** Cheat codes for the L1 rollup contract. */ export class RollupCheatCodes {
|
|
9
10
|
ethCheatCodes;
|
|
@@ -15,7 +16,9 @@ import { EthCheatCodes } from './eth_cheat_codes.js';
|
|
|
15
16
|
this.logger = createLogger('aztecjs:cheat_codes');
|
|
16
17
|
this.client = createPublicClient({
|
|
17
18
|
chain: ethCheatCodes.chain,
|
|
18
|
-
transport: fallback(ethCheatCodes.rpcUrls.map((url)=>http(url
|
|
19
|
+
transport: fallback(ethCheatCodes.rpcUrls.map((url)=>http(url, {
|
|
20
|
+
batch: false
|
|
21
|
+
})))
|
|
19
22
|
});
|
|
20
23
|
this.rollup = getContract({
|
|
21
24
|
abi: RollupAbi,
|
|
@@ -29,10 +32,27 @@ import { EthCheatCodes } from './eth_cheat_codes.js';
|
|
|
29
32
|
}
|
|
30
33
|
/** Returns the current slot */ async getSlot() {
|
|
31
34
|
const ts = BigInt((await this.client.getBlock()).timestamp);
|
|
35
|
+
return this.getSlotAt(ts);
|
|
36
|
+
}
|
|
37
|
+
/** Returns the slot number at a given timestamp. */ async getSlotAt(timestamp) {
|
|
32
38
|
return SlotNumber.fromBigInt(await this.rollup.read.getSlotAt([
|
|
33
|
-
|
|
39
|
+
timestamp
|
|
34
40
|
]));
|
|
35
41
|
}
|
|
42
|
+
/** Returns the timestamp for the start of a given slot. */ async getTimestampForSlot(slot) {
|
|
43
|
+
return await this.rollup.read.getTimestampForSlot([
|
|
44
|
+
BigInt(slot)
|
|
45
|
+
]);
|
|
46
|
+
}
|
|
47
|
+
/** Returns the number of seconds until the start of the given slot based on L1 block timestamp. */ async getSecondsUntilSlot(slot) {
|
|
48
|
+
const [currentTimestamp, targetTimestamp] = await Promise.all([
|
|
49
|
+
this.client.getBlock().then((b)=>BigInt(b.timestamp)),
|
|
50
|
+
this.rollup.read.getTimestampForSlot([
|
|
51
|
+
BigInt(slot)
|
|
52
|
+
])
|
|
53
|
+
]);
|
|
54
|
+
return Math.max(0, Number(targetTimestamp - currentTimestamp));
|
|
55
|
+
}
|
|
36
56
|
/** Returns the current epoch */ async getEpoch() {
|
|
37
57
|
const slotNumber = await this.getSlot();
|
|
38
58
|
return EpochNumber.fromBigInt(await this.rollup.read.getEpochAtSlot([
|
|
@@ -84,7 +104,7 @@ import { EthCheatCodes } from './eth_cheat_codes.js';
|
|
|
84
104
|
* @param opts - Options
|
|
85
105
|
*/ async advanceToEpoch(epoch, opts = {}) {
|
|
86
106
|
const { epochDuration: slotsInEpoch } = await this.getConfig();
|
|
87
|
-
const slotNumber = SlotNumber(epoch * Number(slotsInEpoch));
|
|
107
|
+
const slotNumber = SlotNumber(Number(epoch) * Number(slotsInEpoch));
|
|
88
108
|
const timestamp = await this.rollup.read.getTimestampForSlot([
|
|
89
109
|
BigInt(slotNumber)
|
|
90
110
|
]) + BigInt(opts.offset ?? 0);
|
|
@@ -94,7 +114,10 @@ import { EthCheatCodes } from './eth_cheat_codes.js';
|
|
|
94
114
|
silent: true,
|
|
95
115
|
resetBlockInterval: true
|
|
96
116
|
});
|
|
97
|
-
this.logger.warn(`Warped to epoch ${epoch}
|
|
117
|
+
this.logger.warn(`Warped to epoch ${epoch}`, {
|
|
118
|
+
offset: opts.offset,
|
|
119
|
+
timestamp
|
|
120
|
+
});
|
|
98
121
|
} catch (err) {
|
|
99
122
|
this.logger.warn(`Warp to epoch ${epoch} failed: ${err}`);
|
|
100
123
|
}
|
|
@@ -129,6 +152,26 @@ import { EthCheatCodes } from './eth_cheat_codes.js';
|
|
|
129
152
|
];
|
|
130
153
|
}
|
|
131
154
|
/**
|
|
155
|
+
* Warps L1 time to the start of an explicit absolute slot. Unlike `advanceSlots(N)` which is
|
|
156
|
+
* relative to the current L1 timestamp at call time and therefore races with real-time
|
|
157
|
+
* progression between query and warp, this lands at the slot regardless of latency.
|
|
158
|
+
*
|
|
159
|
+
* Throws if the requested slot is in the past relative to current L1 time (anvil cannot
|
|
160
|
+
* rewind).
|
|
161
|
+
*/ async advanceToSlot(slot) {
|
|
162
|
+
const timestamp = await this.rollup.read.getTimestampForSlot([
|
|
163
|
+
BigInt(slot)
|
|
164
|
+
]);
|
|
165
|
+
await this.ethCheatCodes.warp(Number(timestamp), {
|
|
166
|
+
silent: true,
|
|
167
|
+
resetBlockInterval: true
|
|
168
|
+
});
|
|
169
|
+
this.logger.warn(`Advanced to slot ${slot}`, {
|
|
170
|
+
timestamp
|
|
171
|
+
});
|
|
172
|
+
return timestamp;
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
132
175
|
* Warps time in L1 equivalent to however many slots.
|
|
133
176
|
* @param howMany - The number of slots to advance.
|
|
134
177
|
*/ async advanceSlots(howMany) {
|
|
@@ -174,6 +217,32 @@ import { EthCheatCodes } from './eth_cheat_codes.js';
|
|
|
174
217
|
});
|
|
175
218
|
}
|
|
176
219
|
/**
|
|
220
|
+
* Polls the rollup until its current epoch reaches `epoch`. Unlike {@link advanceToEpoch} this does
|
|
221
|
+
* not warp the L1 clock; it only waits for the chain to reach `epoch` through external activity.
|
|
222
|
+
*/ async waitForEpoch(epoch, opts = {}) {
|
|
223
|
+
await retryUntil(async ()=>await this.getEpoch() >= epoch || undefined, `rollup epoch >= ${epoch}`, opts.timeout ?? 60, opts.interval ?? 1);
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* Polls the rollup until its current slot reaches `slot`. Unlike {@link advanceToSlot} this does not
|
|
227
|
+
* warp the L1 clock; it only waits for the chain to reach `slot` through external activity.
|
|
228
|
+
*/ async waitForSlot(slot, opts = {}) {
|
|
229
|
+
await retryUntil(async ()=>await this.getSlot() >= slot || undefined, `rollup slot >= ${slot}`, opts.timeout ?? 60, opts.interval ?? 1);
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* Polls the rollup until its pending checkpoint settles below `checkpoint` on a freshly mined, non-zero
|
|
233
|
+
* checkpoint, and returns that new pending checkpoint number. Reads the L1 rollup contract directly
|
|
234
|
+
* rather than a node, since a rollback lands on L1 first.
|
|
235
|
+
*
|
|
236
|
+
* A prune can momentarily drop the pending checkpoint to 0 before the post-deadline propose mines its
|
|
237
|
+
* replacement, so a caller detecting a rollback wants the new lower checkpoint, not that transient
|
|
238
|
+
* empty state — hence the non-zero guard.
|
|
239
|
+
*/ async waitForCheckpointBelow(checkpoint, opts = {}) {
|
|
240
|
+
return await retryUntil(async ()=>{
|
|
241
|
+
const { pending } = await this.getTips();
|
|
242
|
+
return pending > 0 && pending < checkpoint ? pending : undefined;
|
|
243
|
+
}, `rollup checkpoint in (0, ${checkpoint})`, opts.timeout ?? 60, opts.interval ?? 1);
|
|
244
|
+
}
|
|
245
|
+
/**
|
|
177
246
|
* Overrides the inProgress field of the Inbox contract state
|
|
178
247
|
* @param howMuch - How many checkpoints to move it forward
|
|
179
248
|
*/ advanceInboxInProgress(howMuch) {
|
|
@@ -206,6 +275,14 @@ import { EthCheatCodes } from './eth_cheat_codes.js';
|
|
|
206
275
|
return newInProgress;
|
|
207
276
|
});
|
|
208
277
|
}
|
|
278
|
+
insertOutbox(epoch, numCheckpointsInEpoch, outHash) {
|
|
279
|
+
return this.ethCheatCodes.execWithPausedAnvil(async ()=>{
|
|
280
|
+
const outboxAddress = await this.rollup.read.getOutbox();
|
|
281
|
+
const epochRootSlot = OutboxContract.getEpochRootStorageSlot(epoch, numCheckpointsInEpoch);
|
|
282
|
+
await this.ethCheatCodes.store(EthAddress.fromString(outboxAddress), epochRootSlot, outHash);
|
|
283
|
+
this.logger.warn(`Advanced outbox to epoch ${epoch} numCheckpointsInEpoch ${numCheckpointsInEpoch} with out hash ${outHash}`);
|
|
284
|
+
});
|
|
285
|
+
}
|
|
209
286
|
/**
|
|
210
287
|
* Executes an action impersonated as the owner of the Rollup contract.
|
|
211
288
|
* @param action - The action to execute
|
|
@@ -250,7 +327,8 @@ import { EthCheatCodes } from './eth_cheat_codes.js';
|
|
|
250
327
|
await this.setProvingCostPerMana(newCost);
|
|
251
328
|
}
|
|
252
329
|
/**
|
|
253
|
-
* Directly updates proving cost per mana.
|
|
330
|
+
* Directly updates proving cost per mana. Throws if the on-chain tx reverts
|
|
331
|
+
* (e.g. rate-limit cooldown, step cap, or floor) instead of silently succeeding.
|
|
254
332
|
* @param ethValue - The new proving cost per mana in ETH
|
|
255
333
|
*/ async setProvingCostPerMana(ethValue) {
|
|
256
334
|
await this.asOwner(async (account, rollup)=>{
|
|
@@ -261,10 +339,33 @@ import { EthCheatCodes } from './eth_cheat_codes.js';
|
|
|
261
339
|
chain: this.client.chain,
|
|
262
340
|
gasLimit: 1000000n
|
|
263
341
|
});
|
|
264
|
-
await this.client.waitForTransactionReceipt({
|
|
342
|
+
const receipt = await this.client.waitForTransactionReceipt({
|
|
265
343
|
hash
|
|
266
344
|
});
|
|
345
|
+
if (receipt.status !== 'success') {
|
|
346
|
+
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.`);
|
|
347
|
+
}
|
|
267
348
|
this.logger.warn(`Updated proving cost per mana to ${ethValue}`);
|
|
268
349
|
});
|
|
269
350
|
}
|
|
351
|
+
/**
|
|
352
|
+
* Resets the 30-day proving-cost update cooldown enforced by FeeLib.updateProvingCostPerMana
|
|
353
|
+
* by zeroing `FeeStore.provingCostLastUpdate` directly in contract storage. Use between
|
|
354
|
+
* successive setProvingCostPerMana / bumpProvingCostPerMana calls so the later update can
|
|
355
|
+
* land instead of reverting. Does not touch L1 time, so PXE/tx-expiration state stays intact.
|
|
356
|
+
*
|
|
357
|
+
* @note This is tightly coupled to the `FeeStore` layout in
|
|
358
|
+
* l1-contracts/src/core/libraries/rollup/FeeLib.sol:
|
|
359
|
+
* slot + 0: CompressedFeeConfig config (uint256)
|
|
360
|
+
* slot + 1: L1GasOracleValues l1GasOracleValues (14+14+4 bytes, packed)
|
|
361
|
+
* slot + 2: uint64 provingCostLastUpdate (only member — zeroing the slot is safe)
|
|
362
|
+
* If the struct layout changes, update the offset below.
|
|
363
|
+
*/ async clearProvingCostCooldown() {
|
|
364
|
+
const feeStoreBaseSlot = hexToBigInt(keccak256(Buffer.from('aztec.fee.storage', 'utf-8')));
|
|
365
|
+
const provingCostLastUpdateSlot = feeStoreBaseSlot + 2n;
|
|
366
|
+
await this.ethCheatCodes.store(EthAddress.fromString(this.rollup.address), provingCostLastUpdateSlot, 0n, {
|
|
367
|
+
silent: true
|
|
368
|
+
});
|
|
369
|
+
this.logger.warn(`Cleared proving-cost update cooldown`);
|
|
370
|
+
}
|
|
270
371
|
}
|
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { TestDateProvider } from '@aztec/foundation/timer';
|
|
2
|
+
/** Minimal interface matching the @viem/anvil Anvil shape used by callers. */
|
|
3
|
+
export interface Anvil {
|
|
4
|
+
readonly port: number;
|
|
5
|
+
readonly host: string;
|
|
6
|
+
readonly status: 'listening' | 'idle';
|
|
7
|
+
stop(): Promise<void>;
|
|
8
|
+
}
|
|
2
9
|
/**
|
|
3
10
|
* Ensures there's a running Anvil instance and returns the RPC URL.
|
|
4
11
|
*/
|
|
@@ -9,10 +16,25 @@ export declare function startAnvil(opts?: {
|
|
|
9
16
|
captureMethodCalls?: boolean;
|
|
10
17
|
accounts?: number;
|
|
11
18
|
chainId?: number;
|
|
19
|
+
/** The hardfork to use (e.g. 'cancun', 'latest'). */
|
|
20
|
+
hardfork?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Number of slots per epoch used by anvil to compute the 'finalized' and 'safe' block tags.
|
|
23
|
+
* Anvil reports `finalized = latest - slotsInAnEpoch * 2`.
|
|
24
|
+
* Defaults to 1 so the finalized block advances immediately, making tests that check
|
|
25
|
+
* L1-finality-based logic work without needing hundreds of mined blocks.
|
|
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;
|
|
12
34
|
}): Promise<{
|
|
13
35
|
anvil: Anvil;
|
|
14
36
|
methodCalls?: string[];
|
|
15
37
|
rpcUrl: string;
|
|
16
38
|
stop: () => Promise<void>;
|
|
17
39
|
}>;
|
|
18
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
40
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RhcnRfYW52aWwuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy90ZXN0L3N0YXJ0X2FudmlsLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUVBLE9BQU8sS0FBSyxFQUFFLGdCQUFnQixFQUFFLE1BQU0seUJBQXlCLENBQUM7QUFNaEUsOEVBQThFO0FBQzlFLE1BQU0sV0FBVyxLQUFLO0lBQ3BCLFFBQVEsQ0FBQyxJQUFJLEVBQUUsTUFBTSxDQUFDO0lBQ3RCLFFBQVEsQ0FBQyxJQUFJLEVBQUUsTUFBTSxDQUFDO0lBQ3RCLFFBQVEsQ0FBQyxNQUFNLEVBQUUsV0FBVyxHQUFHLE1BQU0sQ0FBQztJQUN0QyxJQUFJLElBQUksT0FBTyxDQUFDLElBQUksQ0FBQyxDQUFDO0NBQ3ZCO0FBMEJEOztHQUVHO0FBQ0gsd0JBQXNCLFVBQVUsQ0FDOUIsSUFBSSxHQUFFO0lBQ0osSUFBSSxDQUFDLEVBQUUsTUFBTSxDQUFDO0lBQ2QsV0FBVyxDQUFDLEVBQUUsTUFBTSxDQUFDO0lBQ3JCLEdBQUcsQ0FBQyxFQUFFLE9BQU8sQ0FBQztJQUNkLGtCQUFrQixDQUFDLEVBQUUsT0FBTyxDQUFDO0lBQzdCLFFBQVEsQ0FBQyxFQUFFLE1BQU0sQ0FBQztJQUNsQixPQUFPLENBQUMsRUFBRSxNQUFNLENBQUM7SUFDakIscURBQXFEO0lBQ3JELFFBQVEsQ0FBQyxFQUFFLE1BQU0sQ0FBQztJQUNsQjs7Ozs7T0FLRztJQUNILGNBQWMsQ0FBQyxFQUFFLE1BQU0sQ0FBQztJQUN4Qjs7OztPQUlHO0lBQ0gsWUFBWSxDQUFDLEVBQUUsZ0JBQWdCLENBQUM7Q0FDNUIsR0FDTCxPQUFPLENBQUM7SUFBRSxLQUFLLEVBQUUsS0FBSyxDQUFDO0lBQUMsV0FBVyxDQUFDLEVBQUUsTUFBTSxFQUFFLENBQUM7SUFBQyxNQUFNLEVBQUUsTUFBTSxDQUFDO0lBQUMsSUFBSSxFQUFFLE1BQU0sT0FBTyxDQUFDLElBQUksQ0FBQyxDQUFBO0NBQUUsQ0FBQyxDQW9JOUYifQ==
|
|
@@ -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;AA0BD;;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,CAoI9F"}
|
package/dest/test/start_anvil.js
CHANGED
|
@@ -1,55 +1,205 @@
|
|
|
1
1
|
import { createLogger } from '@aztec/foundation/log';
|
|
2
2
|
import { makeBackoff, retry } from '@aztec/foundation/retry';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
3
|
+
import { spawn } from 'child_process';
|
|
4
|
+
import { resolveFoundryBinary } from '../foundry_binary.js';
|
|
5
|
+
// Watchdog wrapper: instead of spawning anvil directly, we spawn a small bash supervisor that runs
|
|
6
|
+
// anvil as a background child and polls its own parent (this node process). If the parent dies for
|
|
7
|
+
// ANY reason — including SIGKILL / crash / OOM, where node's own exit handlers never run — the poll
|
|
8
|
+
// loop ends and the EXIT trap reaps anvil. The script is inlined (rather than shipped as a `.sh`) so
|
|
9
|
+
// it works from the published npm tarball too, and the resolved anvil binary is passed via
|
|
10
|
+
// `$ANVIL_BIN` so it works without `anvil` on PATH.
|
|
11
|
+
//
|
|
12
|
+
// `$@` is the anvil argv; `bash -c <script> bash <...args>` puts the args in `$@` and `$0` = 'bash'.
|
|
13
|
+
//
|
|
14
|
+
// The EXIT trap reaps anvil; INT/TERM just `exit` (which fires the EXIT trap) so a signal terminates
|
|
15
|
+
// the supervisor promptly instead of being swallowed — a trapped TERM does NOT terminate the shell,
|
|
16
|
+
// so trapping the kill directly on TERM would leave the poll loop running and the caller's teardown
|
|
17
|
+
// hanging until its SIGKILL escalation. `sleep & wait` makes the poll interruptible, so INT/TERM are
|
|
18
|
+
// handled immediately rather than after the current `sleep` returns.
|
|
19
|
+
const ANVIL_WATCHDOG = `
|
|
20
|
+
set -u
|
|
21
|
+
parent=$PPID
|
|
22
|
+
"$ANVIL_BIN" "$@" &
|
|
23
|
+
anvil_pid=$!
|
|
24
|
+
trap 'kill "$anvil_pid" 2>/dev/null' EXIT
|
|
25
|
+
trap 'exit 0' INT TERM
|
|
26
|
+
while kill -0 "$parent" 2>/dev/null; do sleep 1 & wait $!; done
|
|
27
|
+
`;
|
|
6
28
|
/**
|
|
7
29
|
* Ensures there's a running Anvil instance and returns the RPC URL.
|
|
8
30
|
*/ export async function startAnvil(opts = {}) {
|
|
9
|
-
const anvilBinary =
|
|
31
|
+
const anvilBinary = resolveFoundryBinary('anvil');
|
|
10
32
|
const logger = opts.log ? createLogger('ethereum:anvil') : undefined;
|
|
11
33
|
const methodCalls = opts.captureMethodCalls ? [] : undefined;
|
|
12
|
-
let
|
|
13
|
-
// Start anvil.
|
|
14
|
-
// We go via a wrapper script to ensure if the parent dies, anvil dies.
|
|
34
|
+
let detectedPort;
|
|
15
35
|
const anvil = await retry(async ()=>{
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
36
|
+
// `--port 0` lets anvil bind an OS-assigned ephemeral port; the actual port is read back from
|
|
37
|
+
// its "Listening on host:port" stdout below, so independent suites can spawn their own anvil
|
|
38
|
+
// in parallel without fighting over a fixed port.
|
|
39
|
+
const port = opts.port ?? (process.env.ANVIL_PORT ? parseInt(process.env.ANVIL_PORT) : 8545);
|
|
40
|
+
const args = [
|
|
41
|
+
'--host',
|
|
42
|
+
'127.0.0.1',
|
|
43
|
+
'--port',
|
|
44
|
+
String(port),
|
|
45
|
+
'--accounts',
|
|
46
|
+
String(opts.accounts ?? 20),
|
|
47
|
+
'--gas-limit',
|
|
48
|
+
String(45_000_000),
|
|
49
|
+
'--chain-id',
|
|
50
|
+
String(opts.chainId ?? 31337)
|
|
51
|
+
];
|
|
52
|
+
if (opts.l1BlockTime !== undefined) {
|
|
53
|
+
args.push('--block-time', String(opts.l1BlockTime));
|
|
54
|
+
}
|
|
55
|
+
if (opts.hardfork !== undefined) {
|
|
56
|
+
args.push('--hardfork', opts.hardfork);
|
|
57
|
+
}
|
|
58
|
+
args.push('--slots-in-an-epoch', String(opts.slotsInAnEpoch ?? 1));
|
|
59
|
+
// Spawn the watchdog (see ANVIL_WATCHDOG). It launches anvil with these args and reaps it if we
|
|
60
|
+
// die; `$0` is 'bash' and `$@` is the anvil argv.
|
|
61
|
+
const child = spawn('bash', [
|
|
62
|
+
'-c',
|
|
63
|
+
ANVIL_WATCHDOG,
|
|
64
|
+
'bash',
|
|
65
|
+
...args
|
|
66
|
+
], {
|
|
67
|
+
stdio: [
|
|
68
|
+
'ignore',
|
|
69
|
+
'pipe',
|
|
70
|
+
'pipe'
|
|
71
|
+
],
|
|
72
|
+
env: {
|
|
73
|
+
...process.env,
|
|
74
|
+
ANVIL_BIN: anvilBinary,
|
|
75
|
+
RAYON_NUM_THREADS: '1'
|
|
32
76
|
}
|
|
33
77
|
});
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
78
|
+
// Wait for "Listening on" or an early exit.
|
|
79
|
+
await new Promise((resolve, reject)=>{
|
|
80
|
+
let stderr = '';
|
|
81
|
+
const onStdout = (data)=>{
|
|
82
|
+
const text = data.toString();
|
|
83
|
+
logger?.debug(text.trim());
|
|
84
|
+
methodCalls?.push(...text.match(/eth_[^\s]+/g) || []);
|
|
85
|
+
if (detectedPort === undefined && text.includes('Listening on')) {
|
|
86
|
+
const match = text.match(/Listening on ([^:]+):(\d+)/);
|
|
87
|
+
if (match) {
|
|
88
|
+
detectedPort = parseInt(match[2]);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
if (detectedPort !== undefined) {
|
|
92
|
+
child.stdout?.removeListener('data', onStdout);
|
|
93
|
+
child.stderr?.removeListener('data', onStderr);
|
|
94
|
+
child.removeListener('close', onClose);
|
|
95
|
+
resolve();
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
const onStderr = (data)=>{
|
|
99
|
+
stderr += data.toString();
|
|
100
|
+
logger?.debug(data.toString().trim());
|
|
101
|
+
};
|
|
102
|
+
const onClose = (code)=>{
|
|
103
|
+
child.stdout?.removeListener('data', onStdout);
|
|
104
|
+
child.stderr?.removeListener('data', onStderr);
|
|
105
|
+
reject(new Error(`Anvil exited with code ${code} before listening. stderr: ${stderr}`));
|
|
106
|
+
};
|
|
107
|
+
child.stdout?.on('data', onStdout);
|
|
108
|
+
child.stderr?.on('data', onStderr);
|
|
109
|
+
child.once('close', onClose);
|
|
110
|
+
});
|
|
111
|
+
// Continue piping for logging, method-call capture, and/or dateProvider sync after startup.
|
|
112
|
+
if (logger || opts.captureMethodCalls || opts.dateProvider) {
|
|
113
|
+
child.stdout?.on('data', (data)=>{
|
|
114
|
+
const text = data.toString();
|
|
115
|
+
logger?.debug(text.trim());
|
|
116
|
+
methodCalls?.push(...text.match(/eth_[^\s]+/g) || []);
|
|
117
|
+
if (opts.dateProvider) {
|
|
118
|
+
syncDateProviderFromAnvilOutput(text, opts.dateProvider);
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
child.stderr?.on('data', (data)=>{
|
|
122
|
+
logger?.debug(data.toString().trim());
|
|
123
|
+
});
|
|
124
|
+
} else {
|
|
125
|
+
// Consume streams so the child process doesn't block on full pipe buffers.
|
|
126
|
+
child.stdout?.resume();
|
|
127
|
+
child.stderr?.resume();
|
|
37
128
|
}
|
|
38
|
-
return
|
|
129
|
+
return child;
|
|
39
130
|
}, 'Start anvil', makeBackoff([
|
|
40
131
|
5,
|
|
41
132
|
5,
|
|
42
133
|
5
|
|
43
134
|
]));
|
|
44
|
-
if (!
|
|
135
|
+
if (!detectedPort) {
|
|
45
136
|
throw new Error('Failed to start anvil');
|
|
46
137
|
}
|
|
47
|
-
|
|
48
|
-
|
|
138
|
+
const port = detectedPort;
|
|
139
|
+
let status = 'listening';
|
|
140
|
+
anvil.once('close', ()=>{
|
|
141
|
+
status = 'idle';
|
|
142
|
+
});
|
|
143
|
+
const stop = async ()=>{
|
|
144
|
+
if (status === 'idle') {
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
147
|
+
await killChild(anvil);
|
|
148
|
+
};
|
|
149
|
+
const anvilObj = {
|
|
150
|
+
port,
|
|
151
|
+
host: '127.0.0.1',
|
|
152
|
+
get status () {
|
|
153
|
+
return status;
|
|
154
|
+
},
|
|
155
|
+
stop
|
|
156
|
+
};
|
|
49
157
|
return {
|
|
50
|
-
anvil,
|
|
158
|
+
anvil: anvilObj,
|
|
51
159
|
methodCalls,
|
|
52
|
-
stop
|
|
160
|
+
stop,
|
|
53
161
|
rpcUrl: `http://127.0.0.1:${port}`
|
|
54
162
|
};
|
|
55
163
|
}
|
|
164
|
+
/** Extracts block time from anvil stdout and syncs the dateProvider. */ function syncDateProviderFromAnvilOutput(text, dateProvider) {
|
|
165
|
+
// Anvil logs mined blocks as:
|
|
166
|
+
// Block Time: "Fri, 20 Mar 2026 02:10:46 +0000"
|
|
167
|
+
const match = text.match(/Block Time:\s*"([^"]+)"/);
|
|
168
|
+
if (match) {
|
|
169
|
+
const blockTimeMs = new Date(match[1]).getTime();
|
|
170
|
+
if (!isNaN(blockTimeMs)) {
|
|
171
|
+
dateProvider.setTime(blockTimeMs);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Send SIGTERM to the watchdog, wait up to 5 s, then SIGKILL. The watchdog's trap forwards the
|
|
177
|
+
* signal to anvil, so terminating it tears down anvil too. All timers are always cleared.
|
|
178
|
+
*/ function killChild(child) {
|
|
179
|
+
return new Promise((resolve)=>{
|
|
180
|
+
if (child.exitCode !== null || child.killed) {
|
|
181
|
+
child.stdout?.destroy();
|
|
182
|
+
child.stderr?.destroy();
|
|
183
|
+
resolve();
|
|
184
|
+
return;
|
|
185
|
+
}
|
|
186
|
+
let killTimer;
|
|
187
|
+
const onClose = ()=>{
|
|
188
|
+
if (killTimer !== undefined) {
|
|
189
|
+
clearTimeout(killTimer);
|
|
190
|
+
}
|
|
191
|
+
// Destroy stdio streams so their PipeWrap handles don't keep the event loop alive.
|
|
192
|
+
child.stdout?.destroy();
|
|
193
|
+
child.stderr?.destroy();
|
|
194
|
+
resolve();
|
|
195
|
+
};
|
|
196
|
+
child.once('close', onClose);
|
|
197
|
+
child.kill('SIGTERM');
|
|
198
|
+
killTimer = setTimeout(()=>{
|
|
199
|
+
killTimer = undefined;
|
|
200
|
+
child.kill('SIGKILL');
|
|
201
|
+
}, 5000);
|
|
202
|
+
// Ensure the timer does not prevent Node from exiting.
|
|
203
|
+
killTimer.unref();
|
|
204
|
+
});
|
|
205
|
+
}
|
|
@@ -3,13 +3,13 @@ import { GovernanceAbi } from '@aztec/l1-artifacts/GovernanceAbi';
|
|
|
3
3
|
import { TestERC20Abi as StakingAssetAbi } from '@aztec/l1-artifacts/TestERC20Abi';
|
|
4
4
|
import { getContract } from 'viem';
|
|
5
5
|
import { extractProposalIdFromLogs } from '../contracts/governance.js';
|
|
6
|
-
import {
|
|
6
|
+
import { createL1TxUtils } from '../l1_tx_utils/index.js';
|
|
7
7
|
import { EthCheatCodes } from './eth_cheat_codes.js';
|
|
8
8
|
export async function executeGovernanceProposal(proposalId, governance, voteAmount, privateKey, l1Client, rpcUrls, logger) {
|
|
9
9
|
const proposal = await governance.read.getProposal([
|
|
10
10
|
proposalId
|
|
11
11
|
]);
|
|
12
|
-
const l1TxUtils =
|
|
12
|
+
const l1TxUtils = createL1TxUtils(l1Client);
|
|
13
13
|
const waitL1Block = async ()=>{
|
|
14
14
|
await l1TxUtils.sendAndMonitorTransaction({
|
|
15
15
|
to: l1Client.account.address,
|
package/dest/types.d.ts
CHANGED
|
@@ -1,6 +1,61 @@
|
|
|
1
|
-
import type { Abi, Account, Chain, Client, FallbackTransport, GetContractReturnType, HttpTransport, PublicActions, PublicClient, PublicRpcSchema, WalletActions, WalletRpcSchema } from 'viem';
|
|
1
|
+
import type { Abi, Account, Chain, Client, FallbackTransport, GetContractReturnType, Hex, HttpTransport, PublicActions, PublicClient, PublicRpcSchema, WalletActions, WalletRpcSchema } from 'viem';
|
|
2
2
|
/** Type for a viem public client */
|
|
3
3
|
export type ViemPublicClient = PublicClient<FallbackTransport<HttpTransport[]>, Chain>;
|
|
4
|
+
export type PublicRpcDebugSchema = [
|
|
5
|
+
{
|
|
6
|
+
Method: 'debug_traceTransaction';
|
|
7
|
+
Parameters: [txHash: `0x${string}`, options: {
|
|
8
|
+
tracer: 'callTracer';
|
|
9
|
+
}];
|
|
10
|
+
ReturnType: DebugCallTrace;
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
Method: 'trace_transaction';
|
|
14
|
+
Parameters: [txHash: `0x${string}`];
|
|
15
|
+
ReturnType: TraceTransactionResponse[];
|
|
16
|
+
}
|
|
17
|
+
];
|
|
18
|
+
/** Return type for a debug_traceTransaction call */
|
|
19
|
+
export type DebugCallTrace = {
|
|
20
|
+
from: Hex;
|
|
21
|
+
to?: Hex;
|
|
22
|
+
type: string;
|
|
23
|
+
input?: Hex;
|
|
24
|
+
output?: Hex;
|
|
25
|
+
gas?: Hex;
|
|
26
|
+
gasUsed?: Hex;
|
|
27
|
+
value?: Hex;
|
|
28
|
+
error?: string;
|
|
29
|
+
calls?: DebugCallTrace[];
|
|
30
|
+
};
|
|
31
|
+
/** Action object for a trace_transaction call */
|
|
32
|
+
export type TraceAction = {
|
|
33
|
+
from: Hex;
|
|
34
|
+
to?: Hex;
|
|
35
|
+
callType: string;
|
|
36
|
+
gas?: Hex;
|
|
37
|
+
input?: Hex;
|
|
38
|
+
value?: Hex;
|
|
39
|
+
};
|
|
40
|
+
/** Result object for a trace_transaction call */
|
|
41
|
+
export type TraceResult = {
|
|
42
|
+
gasUsed?: Hex;
|
|
43
|
+
output?: Hex;
|
|
44
|
+
};
|
|
45
|
+
/** Return type for a single trace in trace_transaction response */
|
|
46
|
+
export type TraceTransactionResponse = {
|
|
47
|
+
action: TraceAction;
|
|
48
|
+
result?: TraceResult;
|
|
49
|
+
error?: string;
|
|
50
|
+
subtraces: number;
|
|
51
|
+
traceAddress: number[];
|
|
52
|
+
type: string;
|
|
53
|
+
};
|
|
54
|
+
/** Type for a viem public client with support for debug methods */
|
|
55
|
+
export type ViemPublicDebugClient = PublicClient<FallbackTransport<HttpTransport[]>, Chain, undefined, [
|
|
56
|
+
...PublicRpcSchema,
|
|
57
|
+
...PublicRpcDebugSchema
|
|
58
|
+
]>;
|
|
4
59
|
export type ExtendedViemWalletClient = Client<FallbackTransport<readonly HttpTransport[]>, Chain, Account, [
|
|
5
60
|
...PublicRpcSchema,
|
|
6
61
|
...WalletRpcSchema
|
|
@@ -10,4 +65,4 @@ export type ViemClient = ViemPublicClient | ExtendedViemWalletClient;
|
|
|
10
65
|
/** Type for a viem contract that can be used with an extended viem client */
|
|
11
66
|
export type ViemContract<TAbi extends Abi> = GetContractReturnType<TAbi, ExtendedViemWalletClient>;
|
|
12
67
|
export declare function isExtendedClient(client: ViemClient): client is ExtendedViemWalletClient;
|
|
13
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
68
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHlwZXMuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy90eXBlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQ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