@aztec/ethereum 2.0.3 → 2.1.0-rc.2
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/config.d.ts +10 -5
- package/dest/config.d.ts.map +1 -1
- package/dest/config.js +27 -39
- package/dest/contracts/empire_base.d.ts +1 -1
- package/dest/contracts/empire_base.d.ts.map +1 -1
- package/dest/contracts/empire_slashing_proposer.d.ts +1 -1
- package/dest/contracts/empire_slashing_proposer.d.ts.map +1 -1
- package/dest/contracts/fee_asset_handler.d.ts +3 -3
- package/dest/contracts/fee_asset_handler.d.ts.map +1 -1
- package/dest/contracts/governance.js +7 -3
- package/dest/contracts/governance_proposer.d.ts +1 -2
- package/dest/contracts/governance_proposer.d.ts.map +1 -1
- package/dest/contracts/governance_proposer.js +1 -2
- package/dest/contracts/multicall.d.ts +3 -5
- package/dest/contracts/multicall.d.ts.map +1 -1
- package/dest/contracts/multicall.js +6 -4
- package/dest/contracts/rollup.d.ts +13 -14
- package/dest/contracts/rollup.d.ts.map +1 -1
- package/dest/contracts/rollup.js +25 -67
- package/dest/contracts/slasher_contract.d.ts +10 -0
- package/dest/contracts/slasher_contract.d.ts.map +1 -1
- package/dest/contracts/slasher_contract.js +18 -0
- package/dest/deploy_l1_contracts.d.ts +18 -4
- package/dest/deploy_l1_contracts.d.ts.map +1 -1
- package/dest/deploy_l1_contracts.js +316 -159
- package/dest/index.d.ts +1 -1
- package/dest/index.d.ts.map +1 -1
- package/dest/index.js +1 -1
- package/dest/l1_artifacts.d.ts +8019 -5948
- package/dest/l1_artifacts.d.ts.map +1 -1
- package/dest/l1_artifacts.js +6 -1
- package/dest/l1_contract_addresses.d.ts +5 -1
- package/dest/l1_contract_addresses.d.ts.map +1 -1
- package/dest/l1_contract_addresses.js +2 -1
- package/dest/l1_tx_utils/config.d.ts +59 -0
- package/dest/l1_tx_utils/config.d.ts.map +1 -0
- package/dest/l1_tx_utils/config.js +73 -0
- package/dest/l1_tx_utils/constants.d.ts +6 -0
- package/dest/l1_tx_utils/constants.d.ts.map +1 -0
- package/dest/l1_tx_utils/constants.js +14 -0
- package/dest/l1_tx_utils/factory.d.ts +24 -0
- package/dest/l1_tx_utils/factory.d.ts.map +1 -0
- package/dest/l1_tx_utils/factory.js +12 -0
- package/dest/l1_tx_utils/index.d.ts +10 -0
- package/dest/l1_tx_utils/index.d.ts.map +1 -0
- package/dest/l1_tx_utils/index.js +10 -0
- package/dest/l1_tx_utils/interfaces.d.ts +76 -0
- package/dest/l1_tx_utils/interfaces.d.ts.map +1 -0
- package/dest/l1_tx_utils/interfaces.js +4 -0
- package/dest/l1_tx_utils/l1_tx_utils.d.ts +95 -0
- package/dest/l1_tx_utils/l1_tx_utils.d.ts.map +1 -0
- package/dest/l1_tx_utils/l1_tx_utils.js +610 -0
- package/dest/l1_tx_utils/l1_tx_utils_with_blobs.d.ts +26 -0
- package/dest/l1_tx_utils/l1_tx_utils_with_blobs.d.ts.map +1 -0
- package/dest/l1_tx_utils/l1_tx_utils_with_blobs.js +26 -0
- package/dest/l1_tx_utils/readonly_l1_tx_utils.d.ts +81 -0
- package/dest/l1_tx_utils/readonly_l1_tx_utils.d.ts.map +1 -0
- package/dest/l1_tx_utils/readonly_l1_tx_utils.js +294 -0
- package/dest/l1_tx_utils/signer.d.ts +4 -0
- package/dest/l1_tx_utils/signer.d.ts.map +1 -0
- package/dest/l1_tx_utils/signer.js +16 -0
- package/dest/l1_tx_utils/types.d.ts +67 -0
- package/dest/l1_tx_utils/types.d.ts.map +1 -0
- package/dest/l1_tx_utils/types.js +26 -0
- package/dest/l1_tx_utils/utils.d.ts +4 -0
- package/dest/l1_tx_utils/utils.d.ts.map +1 -0
- package/dest/l1_tx_utils/utils.js +14 -0
- package/dest/publisher_manager.d.ts +7 -2
- package/dest/publisher_manager.d.ts.map +1 -1
- package/dest/publisher_manager.js +36 -8
- package/dest/queries.d.ts.map +1 -1
- package/dest/queries.js +8 -2
- package/dest/test/chain_monitor.js +2 -2
- package/dest/test/delayed_tx_utils.d.ts +2 -2
- package/dest/test/delayed_tx_utils.d.ts.map +1 -1
- package/dest/test/delayed_tx_utils.js +2 -2
- package/dest/test/eth_cheat_codes.d.ts +18 -1
- package/dest/test/eth_cheat_codes.d.ts.map +1 -1
- package/dest/test/eth_cheat_codes.js +101 -22
- package/dest/test/rollup_cheat_codes.d.ts +3 -1
- package/dest/test/rollup_cheat_codes.d.ts.map +1 -1
- package/dest/test/rollup_cheat_codes.js +2 -2
- package/dest/test/upgrade_utils.js +1 -1
- package/package.json +6 -6
- package/src/config.ts +34 -44
- package/src/contracts/empire_base.ts +1 -1
- package/src/contracts/empire_slashing_proposer.ts +1 -1
- package/src/contracts/fee_asset_handler.ts +1 -1
- package/src/contracts/governance.ts +3 -3
- package/src/contracts/governance_proposer.ts +3 -4
- package/src/contracts/multicall.ts +12 -10
- package/src/contracts/rollup.ts +31 -86
- package/src/contracts/slasher_contract.ts +22 -0
- package/src/deploy_l1_contracts.ts +351 -178
- package/src/index.ts +1 -1
- package/src/l1_artifacts.ts +8 -0
- package/src/l1_contract_addresses.ts +3 -1
- package/src/l1_tx_utils/README.md +177 -0
- package/src/l1_tx_utils/config.ts +140 -0
- package/src/l1_tx_utils/constants.ts +18 -0
- package/src/l1_tx_utils/factory.ts +64 -0
- package/src/l1_tx_utils/index.ts +12 -0
- package/src/l1_tx_utils/interfaces.ts +86 -0
- package/src/l1_tx_utils/l1_tx_utils.ts +718 -0
- package/src/l1_tx_utils/l1_tx_utils_with_blobs.ts +77 -0
- package/src/l1_tx_utils/readonly_l1_tx_utils.ts +372 -0
- package/src/l1_tx_utils/signer.ts +28 -0
- package/src/l1_tx_utils/types.ts +85 -0
- package/src/l1_tx_utils/utils.ts +16 -0
- package/src/publisher_manager.ts +51 -9
- package/src/queries.ts +10 -1
- package/src/test/chain_monitor.ts +2 -2
- package/src/test/delayed_tx_utils.ts +2 -2
- package/src/test/eth_cheat_codes.ts +120 -20
- package/src/test/rollup_cheat_codes.ts +5 -2
- package/src/test/upgrade_utils.ts +1 -1
- package/dest/l1_tx_utils.d.ts +0 -252
- package/dest/l1_tx_utils.d.ts.map +0 -1
- package/dest/l1_tx_utils.js +0 -834
- package/dest/l1_tx_utils_with_blobs.d.ts +0 -20
- package/dest/l1_tx_utils_with_blobs.d.ts.map +0 -1
- package/dest/l1_tx_utils_with_blobs.js +0 -87
- package/src/l1_tx_utils.ts +0 -1124
- package/src/l1_tx_utils_with_blobs.ts +0 -150
package/src/queries.ts
CHANGED
|
@@ -33,8 +33,10 @@ export async function getL1ContractsConfig(
|
|
|
33
33
|
aztecSlotDuration,
|
|
34
34
|
aztecProofSubmissionEpochs,
|
|
35
35
|
aztecTargetCommitteeSize,
|
|
36
|
+
lagInEpochs,
|
|
36
37
|
activationThreshold,
|
|
37
38
|
ejectionThreshold,
|
|
39
|
+
localEjectionThreshold,
|
|
38
40
|
governanceProposerQuorum,
|
|
39
41
|
governanceProposerRoundSize,
|
|
40
42
|
slashingQuorum,
|
|
@@ -44,6 +46,7 @@ export async function getL1ContractsConfig(
|
|
|
44
46
|
slashingOffsetInRounds,
|
|
45
47
|
slashingAmounts,
|
|
46
48
|
slashingVetoer,
|
|
49
|
+
slashingDisableDuration,
|
|
47
50
|
manaTarget,
|
|
48
51
|
provingCostPerMana,
|
|
49
52
|
rollupVersion,
|
|
@@ -56,8 +59,10 @@ export async function getL1ContractsConfig(
|
|
|
56
59
|
rollup.getSlotDuration(),
|
|
57
60
|
rollup.getProofSubmissionEpochs(),
|
|
58
61
|
rollup.getTargetCommitteeSize(),
|
|
62
|
+
rollup.getLagInEpochs(),
|
|
59
63
|
rollup.getActivationThreshold(),
|
|
60
64
|
rollup.getEjectionThreshold(),
|
|
65
|
+
rollup.getLocalEjectionThreshold(),
|
|
61
66
|
governanceProposer.getQuorumSize(),
|
|
62
67
|
governanceProposer.getRoundSize(),
|
|
63
68
|
slasherProposer?.getQuorumSize() ?? 0n,
|
|
@@ -67,6 +72,7 @@ export async function getL1ContractsConfig(
|
|
|
67
72
|
slasherProposer?.type === 'tally' ? slasherProposer.getSlashOffsetInRounds() : 0n,
|
|
68
73
|
slasherProposer?.type === 'tally' ? slasherProposer.getSlashingAmounts() : [0n, 0n, 0n],
|
|
69
74
|
slasher?.getVetoer() ?? EthAddress.ZERO,
|
|
75
|
+
slasher?.getSlashingDisableDuration() ?? 0,
|
|
70
76
|
rollup.getManaTarget(),
|
|
71
77
|
rollup.getProvingCostPerMana(),
|
|
72
78
|
rollup.getVersion(),
|
|
@@ -81,16 +87,19 @@ export async function getL1ContractsConfig(
|
|
|
81
87
|
aztecSlotDuration: Number(aztecSlotDuration),
|
|
82
88
|
aztecProofSubmissionEpochs: Number(aztecProofSubmissionEpochs),
|
|
83
89
|
aztecTargetCommitteeSize: Number(aztecTargetCommitteeSize),
|
|
90
|
+
lagInEpochs: Number(lagInEpochs),
|
|
84
91
|
governanceProposerQuorum: Number(governanceProposerQuorum),
|
|
85
92
|
governanceProposerRoundSize: Number(governanceProposerRoundSize),
|
|
86
93
|
activationThreshold,
|
|
87
94
|
ejectionThreshold,
|
|
95
|
+
localEjectionThreshold,
|
|
88
96
|
slashingQuorum: Number(slashingQuorum),
|
|
89
97
|
slashingRoundSizeInEpochs: Number(slashingRoundSize / aztecEpochDuration),
|
|
90
98
|
slashingLifetimeInRounds: Number(slashingLifetimeInRounds),
|
|
91
99
|
slashingExecutionDelayInRounds: Number(slashingExecutionDelayInRounds),
|
|
92
100
|
slashingVetoer,
|
|
93
|
-
|
|
101
|
+
slashingDisableDuration,
|
|
102
|
+
manaTarget,
|
|
94
103
|
provingCostPerMana: provingCostPerMana,
|
|
95
104
|
rollupVersion: Number(rollupVersion),
|
|
96
105
|
genesisArchiveTreeRoot,
|
|
@@ -116,7 +116,7 @@ export class ChainMonitor extends EventEmitter<ChainMonitorEventMap> {
|
|
|
116
116
|
|
|
117
117
|
const newL2BlockNumber = Number(await this.rollup.getBlockNumber());
|
|
118
118
|
if (this.l2BlockNumber !== newL2BlockNumber) {
|
|
119
|
-
const epochNumber = await this.rollup.
|
|
119
|
+
const epochNumber = await this.rollup.getEpochNumberForBlock(BigInt(newL2BlockNumber));
|
|
120
120
|
msg += ` with new L2 block ${newL2BlockNumber} for epoch ${epochNumber}`;
|
|
121
121
|
this.l2BlockNumber = newL2BlockNumber;
|
|
122
122
|
this.l2BlockTimestamp = timestamp;
|
|
@@ -130,7 +130,7 @@ export class ChainMonitor extends EventEmitter<ChainMonitorEventMap> {
|
|
|
130
130
|
|
|
131
131
|
const newL2ProvenBlockNumber = Number(await this.rollup.getProvenBlockNumber());
|
|
132
132
|
if (this.l2ProvenBlockNumber !== newL2ProvenBlockNumber) {
|
|
133
|
-
const epochNumber = await this.rollup.
|
|
133
|
+
const epochNumber = await this.rollup.getEpochNumberForBlock(BigInt(newL2ProvenBlockNumber));
|
|
134
134
|
msg += ` with proof up to L2 block ${newL2ProvenBlockNumber} for epoch ${epochNumber}`;
|
|
135
135
|
this.l2ProvenBlockNumber = newL2ProvenBlockNumber;
|
|
136
136
|
this.l2ProvenBlockTimestamp = timestamp;
|
|
@@ -2,8 +2,8 @@ import { EthAddress } from '@aztec/foundation/eth-address';
|
|
|
2
2
|
import { type Logger, createLogger } from '@aztec/foundation/log';
|
|
3
3
|
import { DateProvider } from '@aztec/foundation/timer';
|
|
4
4
|
|
|
5
|
-
import { type L1TxUtilsConfig, createViemSigner } from '../l1_tx_utils.js';
|
|
6
|
-
import { L1TxUtilsWithBlobs } from '../l1_tx_utils_with_blobs.js';
|
|
5
|
+
import { type L1TxUtilsConfig, createViemSigner } from '../l1_tx_utils/index.js';
|
|
6
|
+
import { L1TxUtilsWithBlobs } from '../l1_tx_utils/l1_tx_utils_with_blobs.js';
|
|
7
7
|
import type { ExtendedViemWalletClient } from '../types.js';
|
|
8
8
|
import { type Delayer, withDelayer } from './tx_delayer.js';
|
|
9
9
|
|
|
@@ -3,9 +3,10 @@ import { keccak256 } from '@aztec/foundation/crypto';
|
|
|
3
3
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
4
4
|
import { jsonStringify } from '@aztec/foundation/json-rpc';
|
|
5
5
|
import { createLogger } from '@aztec/foundation/log';
|
|
6
|
+
import { pluralize } from '@aztec/foundation/string';
|
|
6
7
|
import type { TestDateProvider } from '@aztec/foundation/timer';
|
|
7
8
|
|
|
8
|
-
import { type Hex, createPublicClient, fallback, http } from 'viem';
|
|
9
|
+
import { type Hex, type Transaction, createPublicClient, fallback, hexToNumber, http } from 'viem';
|
|
9
10
|
|
|
10
11
|
import type { ViemPublicClient } from '../types.js';
|
|
11
12
|
|
|
@@ -29,9 +30,12 @@ export class EthCheatCodes {
|
|
|
29
30
|
});
|
|
30
31
|
}
|
|
31
32
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
this.
|
|
33
|
+
public rpcCall(method: string, params: any[]) {
|
|
34
|
+
this.logger.debug(`Calling ${method} with params: ${jsonStringify(params)} on ${this.rpcUrls.join(', ')}`);
|
|
35
|
+
return this.doRpcCall(method, params);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
private async doRpcCall(method: string, params: any[]) {
|
|
35
39
|
return (await this.publicClient.transport.request({
|
|
36
40
|
method,
|
|
37
41
|
params,
|
|
@@ -44,7 +48,7 @@ export class EthCheatCodes {
|
|
|
44
48
|
*/
|
|
45
49
|
public async isAutoMining(): Promise<boolean> {
|
|
46
50
|
try {
|
|
47
|
-
const res = await this.
|
|
51
|
+
const res = await this.doRpcCall('anvil_getAutomine', []);
|
|
48
52
|
return res;
|
|
49
53
|
} catch (err) {
|
|
50
54
|
this.logger.error(`Calling "anvil_getAutomine" failed with:`, err);
|
|
@@ -57,7 +61,7 @@ export class EthCheatCodes {
|
|
|
57
61
|
* @returns The current block number
|
|
58
62
|
*/
|
|
59
63
|
public async blockNumber(): Promise<number> {
|
|
60
|
-
const res = await this.
|
|
64
|
+
const res = await this.doRpcCall('eth_blockNumber', []);
|
|
61
65
|
return parseInt(res, 16);
|
|
62
66
|
}
|
|
63
67
|
|
|
@@ -66,7 +70,7 @@ export class EthCheatCodes {
|
|
|
66
70
|
* @returns The current chainId
|
|
67
71
|
*/
|
|
68
72
|
public async chainId(): Promise<number> {
|
|
69
|
-
const res = await this.
|
|
73
|
+
const res = await this.doRpcCall('eth_chainId', []);
|
|
70
74
|
return parseInt(res, 16);
|
|
71
75
|
}
|
|
72
76
|
|
|
@@ -75,7 +79,7 @@ export class EthCheatCodes {
|
|
|
75
79
|
* @returns The current timestamp
|
|
76
80
|
*/
|
|
77
81
|
public async timestamp(): Promise<number> {
|
|
78
|
-
const res = await this.
|
|
82
|
+
const res = await this.doRpcCall('eth_getBlockByNumber', ['latest', true]);
|
|
79
83
|
return parseInt(res.timestamp, 16);
|
|
80
84
|
}
|
|
81
85
|
|
|
@@ -90,7 +94,7 @@ export class EthCheatCodes {
|
|
|
90
94
|
|
|
91
95
|
private async doMine(numberOfBlocks = 1): Promise<void> {
|
|
92
96
|
try {
|
|
93
|
-
await this.
|
|
97
|
+
await this.doRpcCall('hardhat_mine', [numberOfBlocks]);
|
|
94
98
|
} catch (err) {
|
|
95
99
|
throw new Error(`Error mining: ${err}`);
|
|
96
100
|
}
|
|
@@ -101,7 +105,8 @@ export class EthCheatCodes {
|
|
|
101
105
|
*/
|
|
102
106
|
public async evmMine(): Promise<void> {
|
|
103
107
|
try {
|
|
104
|
-
await this.
|
|
108
|
+
await this.doRpcCall('evm_mine', []);
|
|
109
|
+
this.logger.warn(`Mined 1 L1 block with evm_mine`);
|
|
105
110
|
} catch (err) {
|
|
106
111
|
throw new Error(`Error mining: ${err}`);
|
|
107
112
|
}
|
|
@@ -122,7 +127,7 @@ export class EthCheatCodes {
|
|
|
122
127
|
}
|
|
123
128
|
|
|
124
129
|
public async getBalance(account: EthAddress | Hex): Promise<bigint> {
|
|
125
|
-
const res = await this.
|
|
130
|
+
const res = await this.doRpcCall('eth_getBalance', [account.toString(), 'latest']);
|
|
126
131
|
return BigInt(res);
|
|
127
132
|
}
|
|
128
133
|
|
|
@@ -158,7 +163,7 @@ export class EthCheatCodes {
|
|
|
158
163
|
*/
|
|
159
164
|
public getIntervalMining(): Promise<number | null> {
|
|
160
165
|
try {
|
|
161
|
-
return this.
|
|
166
|
+
return this.doRpcCall('anvil_getIntervalMining', []);
|
|
162
167
|
} catch (err) {
|
|
163
168
|
throw new Error(`Error getting interval mining: ${err}`);
|
|
164
169
|
}
|
|
@@ -350,8 +355,7 @@ export class EthCheatCodes {
|
|
|
350
355
|
* @returns The bytecode for the contract
|
|
351
356
|
*/
|
|
352
357
|
public async getBytecode(contract: EthAddress): Promise<`0x${string}`> {
|
|
353
|
-
|
|
354
|
-
return res;
|
|
358
|
+
return await this.doRpcCall('eth_getCode', [contract.toString(), 'latest']);
|
|
355
359
|
}
|
|
356
360
|
|
|
357
361
|
/**
|
|
@@ -360,8 +364,7 @@ export class EthCheatCodes {
|
|
|
360
364
|
* @returns The raw transaction
|
|
361
365
|
*/
|
|
362
366
|
public async getRawTransaction(txHash: Hex): Promise<`0x${string}`> {
|
|
363
|
-
|
|
364
|
-
return res;
|
|
367
|
+
return await this.doRpcCall('debug_getRawTransaction', [txHash]);
|
|
365
368
|
}
|
|
366
369
|
|
|
367
370
|
/**
|
|
@@ -370,8 +373,7 @@ export class EthCheatCodes {
|
|
|
370
373
|
* @returns The trace
|
|
371
374
|
*/
|
|
372
375
|
public async debugTraceTransaction(txHash: Hex): Promise<any> {
|
|
373
|
-
|
|
374
|
-
return res;
|
|
376
|
+
return await this.doRpcCall('debug_traceTransaction', [txHash]);
|
|
375
377
|
}
|
|
376
378
|
|
|
377
379
|
/**
|
|
@@ -389,7 +391,6 @@ export class EthCheatCodes {
|
|
|
389
391
|
* @param blockNumber - The block number that's going to be the new tip
|
|
390
392
|
*/
|
|
391
393
|
public reorgTo(blockNumber: number): Promise<void> {
|
|
392
|
-
this.logger.info('reorgTo', { blockNumber });
|
|
393
394
|
if (blockNumber <= 0) {
|
|
394
395
|
throw new Error(`Can't reorg to block before genesis: ${blockNumber}`);
|
|
395
396
|
}
|
|
@@ -405,6 +406,7 @@ export class EthCheatCodes {
|
|
|
405
406
|
|
|
406
407
|
const depth = Number(currentTip - BigInt(blockNumber) + 1n);
|
|
407
408
|
await this.rpcCall('anvil_rollback', [depth]);
|
|
409
|
+
this.logger.warn(`Reorged L1 chain to block number ${blockNumber} (depth ${depth})`);
|
|
408
410
|
});
|
|
409
411
|
}
|
|
410
412
|
|
|
@@ -431,7 +433,70 @@ export class EthCheatCodes {
|
|
|
431
433
|
}
|
|
432
434
|
|
|
433
435
|
public traceTransaction(txHash: Hex): Promise<any> {
|
|
434
|
-
return this.
|
|
436
|
+
return this.doRpcCall('trace_transaction', [txHash]);
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
public async getTxPoolStatus(): Promise<{ pending: number; queued: number }> {
|
|
440
|
+
const { pending, queued } = await this.doRpcCall('txpool_status', []);
|
|
441
|
+
return { pending: hexToNumber(pending), queued: hexToNumber(queued) };
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
public async getTxPoolContents(): Promise<TxPoolTransaction[]> {
|
|
445
|
+
const txpoolContent = await this.doRpcCall('txpool_content', []);
|
|
446
|
+
return mapTxPoolContent(txpoolContent);
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
/**
|
|
450
|
+
* Mines an empty block by temporarily removing all pending transactions from the mempool,
|
|
451
|
+
* mining a block, and then re-adding the transactions back to the pool.
|
|
452
|
+
*/
|
|
453
|
+
public async mineEmptyBlock(blockCount: number = 1): Promise<void> {
|
|
454
|
+
await this.execWithPausedAnvil(async () => {
|
|
455
|
+
// Get all pending and queued transactions from the pool
|
|
456
|
+
const txs = await this.getTxPoolContents();
|
|
457
|
+
|
|
458
|
+
this.logger.debug(`Found ${txs.length} transactions in pool`);
|
|
459
|
+
|
|
460
|
+
// Get raw transactions before dropping them
|
|
461
|
+
const rawTxs: Hex[] = [];
|
|
462
|
+
for (const tx of txs) {
|
|
463
|
+
try {
|
|
464
|
+
const rawTx = await this.doRpcCall('debug_getRawTransaction', [tx.hash]);
|
|
465
|
+
if (rawTx) {
|
|
466
|
+
rawTxs.push(rawTx);
|
|
467
|
+
this.logger.debug(`Got raw tx for ${tx.hash}`);
|
|
468
|
+
} else {
|
|
469
|
+
this.logger.warn(`No raw tx found for ${tx.hash}`);
|
|
470
|
+
}
|
|
471
|
+
} catch {
|
|
472
|
+
this.logger.warn(`Failed to get raw transaction for ${tx.hash}`);
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
this.logger.debug(`Retrieved ${rawTxs.length} raw transactions`);
|
|
477
|
+
|
|
478
|
+
// Drop all transactions from the mempool
|
|
479
|
+
await this.doRpcCall('anvil_dropAllTransactions', []);
|
|
480
|
+
|
|
481
|
+
// Mine an empty block
|
|
482
|
+
await this.doMine(blockCount);
|
|
483
|
+
|
|
484
|
+
// Re-add the transactions to the pool
|
|
485
|
+
for (const rawTx of rawTxs) {
|
|
486
|
+
try {
|
|
487
|
+
const txHash = await this.doRpcCall('eth_sendRawTransaction', [rawTx]);
|
|
488
|
+
this.logger.debug(`Re-added transaction ${txHash}`);
|
|
489
|
+
} catch (err) {
|
|
490
|
+
this.logger.warn(`Failed to re-add transaction: ${err}`);
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
if (rawTxs.length !== txs.length) {
|
|
495
|
+
this.logger.warn(`Failed to add all txs back: had ${txs.length} but re-added ${rawTxs.length}`);
|
|
496
|
+
}
|
|
497
|
+
});
|
|
498
|
+
|
|
499
|
+
this.logger.warn(`Mined ${blockCount} empty L1 ${pluralize('block', blockCount)}`);
|
|
435
500
|
}
|
|
436
501
|
|
|
437
502
|
public async execWithPausedAnvil(fn: () => Promise<void>): Promise<void> {
|
|
@@ -466,4 +531,39 @@ export class EthCheatCodes {
|
|
|
466
531
|
}
|
|
467
532
|
}
|
|
468
533
|
}
|
|
534
|
+
|
|
535
|
+
public async syncDateProvider(dateProvider: TestDateProvider) {
|
|
536
|
+
const timestamp = await this.timestamp();
|
|
537
|
+
if ('setTime' in dateProvider) {
|
|
538
|
+
dateProvider.setTime(timestamp * 1000);
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
type TxPoolState = 'pending' | 'queued';
|
|
544
|
+
|
|
545
|
+
interface TxPoolContent {
|
|
546
|
+
pending: Record<Hex, Record<string, Transaction>>;
|
|
547
|
+
queued: Record<Hex, Record<string, Transaction>>;
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
export type TxPoolTransaction = Transaction & {
|
|
551
|
+
poolState: TxPoolState;
|
|
552
|
+
};
|
|
553
|
+
|
|
554
|
+
function mapTxPoolContent(content: TxPoolContent): TxPoolTransaction[] {
|
|
555
|
+
const result: TxPoolTransaction[] = [];
|
|
556
|
+
|
|
557
|
+
const processPool = (pool: Record<Hex, Record<string, Transaction>>, poolState: TxPoolState) => {
|
|
558
|
+
for (const txsByNonce of Object.values(pool)) {
|
|
559
|
+
for (const tx of Object.values(txsByNonce)) {
|
|
560
|
+
result.push({ ...tx, poolState });
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
};
|
|
564
|
+
|
|
565
|
+
processPool(content.pending, 'pending');
|
|
566
|
+
processPool(content.queued, 'queued');
|
|
567
|
+
|
|
568
|
+
return result;
|
|
469
569
|
}
|
|
@@ -112,14 +112,17 @@ export class RollupCheatCodes {
|
|
|
112
112
|
* @param opts - Options
|
|
113
113
|
*/
|
|
114
114
|
public async advanceToEpoch(
|
|
115
|
-
epoch: bigint,
|
|
115
|
+
epoch: bigint | number,
|
|
116
116
|
opts: {
|
|
117
117
|
/** Optional test date provider to update with the epoch timestamp */
|
|
118
118
|
updateDateProvider?: TestDateProvider;
|
|
119
|
+
/** Offset in seconds */
|
|
120
|
+
offset?: number;
|
|
119
121
|
} = {},
|
|
120
122
|
) {
|
|
121
123
|
const { epochDuration: slotsInEpoch } = await this.getConfig();
|
|
122
|
-
const timestamp =
|
|
124
|
+
const timestamp =
|
|
125
|
+
(await this.rollup.read.getTimestampForSlot([BigInt(epoch) * slotsInEpoch])) + BigInt(opts.offset ?? 0);
|
|
123
126
|
try {
|
|
124
127
|
await this.ethCheatCodes.warp(Number(timestamp), { ...opts, silent: true, resetBlockInterval: true });
|
|
125
128
|
this.logger.warn(`Warped to epoch ${epoch}`);
|
|
@@ -6,7 +6,7 @@ import { type GetContractReturnType, type PrivateKeyAccount, getContract } from
|
|
|
6
6
|
|
|
7
7
|
import { extractProposalIdFromLogs } from '../contracts/governance.js';
|
|
8
8
|
import type { L1ContractAddresses } from '../l1_contract_addresses.js';
|
|
9
|
-
import { createL1TxUtilsFromViemWallet } from '../l1_tx_utils.js';
|
|
9
|
+
import { createL1TxUtilsFromViemWallet } from '../l1_tx_utils/index.js';
|
|
10
10
|
import type { ExtendedViemWalletClient, ViemPublicClient } from '../types.js';
|
|
11
11
|
import { EthCheatCodes } from './eth_cheat_codes.js';
|
|
12
12
|
|
package/dest/l1_tx_utils.d.ts
DELETED
|
@@ -1,252 +0,0 @@
|
|
|
1
|
-
import { type ConfigMappingsType } from '@aztec/foundation/config';
|
|
2
|
-
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
3
|
-
import type { ViemTransactionSignature } from '@aztec/foundation/eth-signature';
|
|
4
|
-
import { type Logger } from '@aztec/foundation/log';
|
|
5
|
-
import { DateProvider } from '@aztec/foundation/timer';
|
|
6
|
-
import { type Abi, type Account, type Address, type BlockOverrides, type ContractFunctionExecutionError, type Hex, type PrepareTransactionRequestRequest, type StateOverride, type TransactionReceipt, type TransactionSerializable, type WalletClient } from 'viem';
|
|
7
|
-
import type { EthSigner } from './eth-signer/eth-signer.js';
|
|
8
|
-
import type { ExtendedViemWalletClient, ViemClient } from './types.js';
|
|
9
|
-
export interface L1TxUtilsConfig {
|
|
10
|
-
/**
|
|
11
|
-
* How much to increase calculated gas limit.
|
|
12
|
-
*/
|
|
13
|
-
gasLimitBufferPercentage?: number;
|
|
14
|
-
/**
|
|
15
|
-
* Maximum gas price in gwei
|
|
16
|
-
*/
|
|
17
|
-
maxGwei?: bigint;
|
|
18
|
-
/**
|
|
19
|
-
* Maximum blob fee per gas in gwei
|
|
20
|
-
*/
|
|
21
|
-
maxBlobGwei?: bigint;
|
|
22
|
-
/**
|
|
23
|
-
* Priority fee bump percentage
|
|
24
|
-
*/
|
|
25
|
-
priorityFeeBumpPercentage?: number;
|
|
26
|
-
/**
|
|
27
|
-
* How much to increase priority fee by each attempt (percentage)
|
|
28
|
-
*/
|
|
29
|
-
priorityFeeRetryBumpPercentage?: number;
|
|
30
|
-
/**
|
|
31
|
-
* Fixed priority fee per gas in Gwei. Overrides any priority fee bump percentage config
|
|
32
|
-
*/
|
|
33
|
-
fixedPriorityFeePerGas?: number;
|
|
34
|
-
/**
|
|
35
|
-
* Maximum number of speed-up attempts
|
|
36
|
-
*/
|
|
37
|
-
maxAttempts?: number;
|
|
38
|
-
/**
|
|
39
|
-
* How often to check tx status
|
|
40
|
-
*/
|
|
41
|
-
checkIntervalMs?: number;
|
|
42
|
-
/**
|
|
43
|
-
* How long before considering tx stalled
|
|
44
|
-
*/
|
|
45
|
-
stallTimeMs?: number;
|
|
46
|
-
/**
|
|
47
|
-
* How long to wait for a tx to be mined before giving up
|
|
48
|
-
*/
|
|
49
|
-
txTimeoutMs?: number;
|
|
50
|
-
/**
|
|
51
|
-
* How many attempts will be done to get a tx after it was sent?
|
|
52
|
-
* First attempt is done at 1s, second at 2s, third at 3s, etc.
|
|
53
|
-
*/
|
|
54
|
-
txPropagationMaxQueryAttempts?: number;
|
|
55
|
-
/**
|
|
56
|
-
* Whether to attempt to cancel a tx if it's not mined after txTimeoutMs
|
|
57
|
-
*/
|
|
58
|
-
cancelTxOnTimeout?: boolean;
|
|
59
|
-
}
|
|
60
|
-
export declare const l1TxUtilsConfigMappings: ConfigMappingsType<L1TxUtilsConfig>;
|
|
61
|
-
export declare const defaultL1TxUtilsConfig: L1TxUtilsConfig;
|
|
62
|
-
export declare function getL1TxUtilsConfigEnvVars(): L1TxUtilsConfig;
|
|
63
|
-
export interface L1TxRequest {
|
|
64
|
-
to: Address | null;
|
|
65
|
-
data?: Hex;
|
|
66
|
-
value?: bigint;
|
|
67
|
-
abi?: Abi;
|
|
68
|
-
}
|
|
69
|
-
export type L1GasConfig = Partial<L1TxUtilsConfig> & {
|
|
70
|
-
gasLimit?: bigint;
|
|
71
|
-
txTimeoutAt?: Date;
|
|
72
|
-
};
|
|
73
|
-
export interface L1BlobInputs {
|
|
74
|
-
blobs: Uint8Array[];
|
|
75
|
-
kzg: any;
|
|
76
|
-
maxFeePerBlobGas?: bigint;
|
|
77
|
-
}
|
|
78
|
-
export interface GasPrice {
|
|
79
|
-
maxFeePerGas: bigint;
|
|
80
|
-
maxPriorityFeePerGas: bigint;
|
|
81
|
-
maxFeePerBlobGas?: bigint;
|
|
82
|
-
}
|
|
83
|
-
export type TransactionStats = {
|
|
84
|
-
/** Address of the sender. */
|
|
85
|
-
sender: string;
|
|
86
|
-
/** Hash of the transaction. */
|
|
87
|
-
transactionHash: string;
|
|
88
|
-
/** Size in bytes of the tx calldata */
|
|
89
|
-
calldataSize: number;
|
|
90
|
-
/** Gas required to pay for the calldata inclusion (depends on size and number of zeros) */
|
|
91
|
-
calldataGas: number;
|
|
92
|
-
};
|
|
93
|
-
export declare enum TxUtilsState {
|
|
94
|
-
IDLE = 0,
|
|
95
|
-
SENT = 1,
|
|
96
|
-
SPEED_UP = 2,
|
|
97
|
-
CANCELLED = 3,
|
|
98
|
-
NOT_MINED = 4,
|
|
99
|
-
MINED = 5
|
|
100
|
-
}
|
|
101
|
-
export declare class ReadOnlyL1TxUtils {
|
|
102
|
-
client: ViemClient;
|
|
103
|
-
protected logger: Logger;
|
|
104
|
-
readonly dateProvider: DateProvider;
|
|
105
|
-
protected debugMaxGasLimit: boolean;
|
|
106
|
-
readonly config: L1TxUtilsConfig;
|
|
107
|
-
protected interrupted: boolean;
|
|
108
|
-
constructor(client: ViemClient, logger: Logger | undefined, dateProvider: DateProvider, config?: Partial<L1TxUtilsConfig>, debugMaxGasLimit?: boolean);
|
|
109
|
-
interrupt(): void;
|
|
110
|
-
restart(): void;
|
|
111
|
-
getBlock(): Promise<{
|
|
112
|
-
number: bigint;
|
|
113
|
-
hash: `0x${string}`;
|
|
114
|
-
nonce: `0x${string}`;
|
|
115
|
-
logsBloom: `0x${string}`;
|
|
116
|
-
baseFeePerGas: bigint | null;
|
|
117
|
-
blobGasUsed: bigint;
|
|
118
|
-
difficulty: bigint;
|
|
119
|
-
excessBlobGas: bigint;
|
|
120
|
-
extraData: Hex;
|
|
121
|
-
gasLimit: bigint;
|
|
122
|
-
gasUsed: bigint;
|
|
123
|
-
miner: Address;
|
|
124
|
-
mixHash: import("viem").Hash;
|
|
125
|
-
parentBeaconBlockRoot?: `0x${string}` | undefined;
|
|
126
|
-
parentHash: import("viem").Hash;
|
|
127
|
-
receiptsRoot: Hex;
|
|
128
|
-
sealFields: Hex[];
|
|
129
|
-
sha3Uncles: import("viem").Hash;
|
|
130
|
-
size: bigint;
|
|
131
|
-
stateRoot: import("viem").Hash;
|
|
132
|
-
timestamp: bigint;
|
|
133
|
-
totalDifficulty: bigint | null;
|
|
134
|
-
transactionsRoot: import("viem").Hash;
|
|
135
|
-
uncles: import("viem").Hash[];
|
|
136
|
-
withdrawals?: import("viem").Withdrawal[] | undefined | undefined;
|
|
137
|
-
withdrawalsRoot?: `0x${string}` | undefined;
|
|
138
|
-
transactions: `0x${string}`[];
|
|
139
|
-
}>;
|
|
140
|
-
getBlockNumber(): Promise<bigint>;
|
|
141
|
-
/**
|
|
142
|
-
* Gets the current gas price with bounds checking
|
|
143
|
-
*/
|
|
144
|
-
getGasPrice(_gasConfig?: L1TxUtilsConfig, isBlobTx?: boolean, attempt?: number, previousGasPrice?: typeof attempt extends 0 ? never : GasPrice): Promise<GasPrice>;
|
|
145
|
-
/**
|
|
146
|
-
* Estimates gas and adds buffer
|
|
147
|
-
*/
|
|
148
|
-
estimateGas(account: Account | Hex, request: L1TxRequest, _gasConfig?: L1TxUtilsConfig, _blobInputs?: L1BlobInputs): Promise<bigint>;
|
|
149
|
-
getTransactionStats(txHash: string): Promise<TransactionStats | undefined>;
|
|
150
|
-
tryGetErrorFromRevertedTx(data: Hex, args: {
|
|
151
|
-
args: readonly any[];
|
|
152
|
-
functionName: string;
|
|
153
|
-
abi: Abi;
|
|
154
|
-
address: Hex;
|
|
155
|
-
}, blobInputs: (L1BlobInputs & {
|
|
156
|
-
maxFeePerBlobGas: bigint;
|
|
157
|
-
}) | undefined, stateOverride?: StateOverride): Promise<string | undefined>;
|
|
158
|
-
simulate(request: L1TxRequest & {
|
|
159
|
-
gas?: bigint;
|
|
160
|
-
from?: Hex;
|
|
161
|
-
}, blockOverrides?: BlockOverrides<bigint, number>, stateOverrides?: StateOverride, abi?: Abi, _gasConfig?: L1TxUtilsConfig & {
|
|
162
|
-
fallbackGasEstimate?: bigint;
|
|
163
|
-
}): Promise<{
|
|
164
|
-
gasUsed: bigint;
|
|
165
|
-
result: `0x${string}`;
|
|
166
|
-
}>;
|
|
167
|
-
protected _simulate(call: any, blockOverrides: BlockOverrides<bigint, number> | undefined, stateOverrides: StateOverride | undefined, gasConfig: L1TxUtilsConfig & {
|
|
168
|
-
fallbackGasEstimate?: bigint;
|
|
169
|
-
}, abi: Abi): Promise<{
|
|
170
|
-
gasUsed: bigint;
|
|
171
|
-
result: `0x${string}`;
|
|
172
|
-
}>;
|
|
173
|
-
bumpGasLimit(gasLimit: bigint, _gasConfig?: L1TxUtilsConfig): bigint;
|
|
174
|
-
}
|
|
175
|
-
export type SigningCallback = (transaction: TransactionSerializable, signingAddress: EthAddress) => Promise<ViemTransactionSignature>;
|
|
176
|
-
export declare class L1TxUtils extends ReadOnlyL1TxUtils {
|
|
177
|
-
client: ViemClient;
|
|
178
|
-
address: EthAddress;
|
|
179
|
-
private signer;
|
|
180
|
-
protected logger: Logger;
|
|
181
|
-
private txUtilsState;
|
|
182
|
-
private lastMinedBlockNumber;
|
|
183
|
-
private nonceManager;
|
|
184
|
-
constructor(client: ViemClient, address: EthAddress, signer: SigningCallback, logger?: Logger, dateProvider?: DateProvider, config?: Partial<L1TxUtilsConfig>, debugMaxGasLimit?: boolean);
|
|
185
|
-
get state(): TxUtilsState;
|
|
186
|
-
get lastMinedAtBlockNumber(): bigint | undefined;
|
|
187
|
-
private set lastMinedAtBlockNumber(value);
|
|
188
|
-
private set state(value);
|
|
189
|
-
getSenderAddress(): EthAddress;
|
|
190
|
-
getSenderBalance(): Promise<bigint>;
|
|
191
|
-
private signTransaction;
|
|
192
|
-
protected prepareSignedTransaction(txData: PrepareTransactionRequestRequest): Promise<`0x${string}`>;
|
|
193
|
-
/**
|
|
194
|
-
* Sends a transaction with gas estimation and pricing
|
|
195
|
-
* @param request - The transaction request (to, data, value)
|
|
196
|
-
* @param gasConfig - Optional gas configuration
|
|
197
|
-
* @returns The transaction hash and parameters used
|
|
198
|
-
*/
|
|
199
|
-
sendTransaction(request: L1TxRequest, _gasConfig?: L1GasConfig, blobInputs?: L1BlobInputs, stateChange?: TxUtilsState): Promise<{
|
|
200
|
-
txHash: Hex;
|
|
201
|
-
gasLimit: bigint;
|
|
202
|
-
gasPrice: GasPrice;
|
|
203
|
-
}>;
|
|
204
|
-
/**
|
|
205
|
-
* Monitors a transaction until completion, handling speed-ups if needed
|
|
206
|
-
* @param request - Original transaction request (needed for speed-ups)
|
|
207
|
-
* @param initialTxHash - Hash of the initial transaction
|
|
208
|
-
* @param allVersions - Hashes of all transactions submitted under the same nonce (any of them could mine)
|
|
209
|
-
* @param params - Parameters used in the initial transaction
|
|
210
|
-
* @param gasConfig - Optional gas configuration
|
|
211
|
-
*/
|
|
212
|
-
monitorTransaction(request: L1TxRequest, initialTxHash: Hex, allVersions: Set<Hex>, params: {
|
|
213
|
-
gasLimit: bigint;
|
|
214
|
-
}, _gasConfig?: Partial<L1TxUtilsConfig> & {
|
|
215
|
-
txTimeoutAt?: Date;
|
|
216
|
-
}, _blobInputs?: L1BlobInputs, isCancelTx?: boolean): Promise<TransactionReceipt>;
|
|
217
|
-
/**
|
|
218
|
-
* Sends a transaction and monitors it until completion
|
|
219
|
-
* @param request - The transaction request (to, data, value)
|
|
220
|
-
* @param gasConfig - Optional gas configuration
|
|
221
|
-
* @returns The receipt of the successful transaction
|
|
222
|
-
*/
|
|
223
|
-
sendAndMonitorTransaction(request: L1TxRequest, gasConfig?: L1GasConfig, blobInputs?: L1BlobInputs): Promise<{
|
|
224
|
-
receipt: TransactionReceipt;
|
|
225
|
-
gasPrice: GasPrice;
|
|
226
|
-
}>;
|
|
227
|
-
simulate(request: L1TxRequest & {
|
|
228
|
-
gas?: bigint;
|
|
229
|
-
from?: Hex;
|
|
230
|
-
}, _blockOverrides?: BlockOverrides<bigint, number>, stateOverrides?: StateOverride, abi?: Abi, _gasConfig?: L1TxUtilsConfig & {
|
|
231
|
-
fallbackGasEstimate?: bigint;
|
|
232
|
-
ignoreBlockGasLimit?: boolean;
|
|
233
|
-
}): Promise<{
|
|
234
|
-
gasUsed: bigint;
|
|
235
|
-
result: `0x${string}`;
|
|
236
|
-
}>;
|
|
237
|
-
/**
|
|
238
|
-
* Attempts to cancel a transaction by sending a 0-value tx to self with same nonce but higher gas prices
|
|
239
|
-
* @param nonce - The nonce of the transaction to cancel
|
|
240
|
-
* @param allVersions - Hashes of all transactions submitted under the same nonce (any of them could mine)
|
|
241
|
-
* @param previousGasPrice - The gas price of the previous transaction
|
|
242
|
-
* @param attempts - The number of attempts to cancel the transaction
|
|
243
|
-
* @returns The hash of the cancellation transaction
|
|
244
|
-
*/
|
|
245
|
-
protected attemptTxCancellation(currentTxHash: Hex, nonce: number, allVersions: Set<Hex>, isBlobTx?: boolean, previousGasPrice?: GasPrice, attempts?: number): Promise<`0x${string}`>;
|
|
246
|
-
}
|
|
247
|
-
export declare function createViemSigner(client: WalletClient): SigningCallback;
|
|
248
|
-
export declare function createL1TxUtilsFromViemWallet(client: ExtendedViemWalletClient, logger?: Logger, dateProvider?: DateProvider, config?: Partial<L1TxUtilsConfig>, debugMaxGasLimit?: boolean): L1TxUtils;
|
|
249
|
-
export declare function createL1TxUtilsFromEthSigner(client: ViemClient, signer: EthSigner, logger?: Logger, dateProvider?: DateProvider, config?: Partial<L1TxUtilsConfig>, debugMaxGasLimit?: boolean): L1TxUtils;
|
|
250
|
-
export declare function tryGetCustomErrorNameContractFunction(err: ContractFunctionExecutionError): string;
|
|
251
|
-
export declare function getCalldataGasUsage(data: Uint8Array): number;
|
|
252
|
-
//# sourceMappingURL=l1_tx_utils.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"l1_tx_utils.d.ts","sourceRoot":"","sources":["../src/l1_tx_utils.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,kBAAkB,EAMxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAChF,OAAO,EAAE,KAAK,MAAM,EAAgB,MAAM,uBAAuB,CAAC;AAGlE,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAIvD,OAAO,EACL,KAAK,GAAG,EACR,KAAK,OAAO,EACZ,KAAK,OAAO,EAEZ,KAAK,cAAc,EACnB,KAAK,8BAA8B,EAEnC,KAAK,GAAG,EAIR,KAAK,gCAAgC,EACrC,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACvB,KAAK,uBAAuB,EAC5B,KAAK,YAAY,EAQlB,MAAM,MAAM,CAAC;AAGd,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,KAAK,EAAE,wBAAwB,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAuBvE,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,wBAAwB,CAAC,EAAE,MAAM,CAAC;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