@aztec/ethereum 0.0.1-commit.24de95ac → 0.0.1-commit.2606882
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/account.d.ts +1 -1
- package/dest/chain.d.ts +1 -1
- 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 +29 -73
- package/dest/config.d.ts.map +1 -1
- package/dest/config.js +70 -387
- package/dest/constants.d.ts +1 -1
- 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 +7 -5
- package/dest/contracts/empire_base.d.ts.map +1 -1
- package/dest/contracts/empire_base.js +1 -1
- package/dest/contracts/errors.d.ts +1 -1
- package/dest/contracts/errors.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/fee_juice.d.ts +1 -1
- package/dest/contracts/fee_juice.d.ts.map +1 -1
- package/dest/contracts/governance.d.ts +113 -36
- package/dest/contracts/governance.d.ts.map +1 -1
- package/dest/contracts/governance.js +207 -16
- package/dest/contracts/governance_proposer.d.ts +38 -4
- package/dest/contracts/governance_proposer.d.ts.map +1 -1
- package/dest/contracts/governance_proposer.js +455 -12
- package/dest/contracts/gse.d.ts +1 -1
- package/dest/contracts/gse.d.ts.map +1 -1
- 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 +127 -12
- package/dest/contracts/multicall.d.ts.map +1 -1
- package/dest/contracts/multicall.js +201 -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 +5432 -131
- package/dest/contracts/rollup.d.ts.map +1 -1
- package/dest/contracts/rollup.js +1114 -231
- package/dest/contracts/slasher_contract.d.ts +1 -1
- package/dest/contracts/slasher_contract.d.ts.map +1 -1
- package/dest/contracts/{tally_slashing_proposer.d.ts → slashing_proposer.d.ts} +11 -10
- package/dest/contracts/slashing_proposer.d.ts.map +1 -0
- package/dest/contracts/{tally_slashing_proposer.js → slashing_proposer.js} +21 -16
- package/dest/contracts/utils.d.ts +1 -1
- package/dest/deploy_aztec_l1_contracts.d.ts +256 -0
- package/dest/deploy_aztec_l1_contracts.d.ts.map +1 -0
- package/dest/deploy_aztec_l1_contracts.js +411 -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/eth-signer/eth-signer.d.ts +1 -1
- package/dest/eth-signer/index.d.ts +1 -1
- 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/generated/l1-contracts-defaults.d.ts +30 -0
- package/dest/generated/l1-contracts-defaults.d.ts.map +1 -0
- package/dest/generated/l1-contracts-defaults.js +30 -0
- package/dest/l1_artifacts.d.ts +19816 -16730
- 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 +11 -5
- package/dest/l1_tx_utils/config.d.ts.map +1 -1
- package/dest/l1_tx_utils/config.js +43 -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 +233 -0
- package/dest/l1_tx_utils/l1_fee_analyzer.d.ts.map +1 -0
- package/dest/l1_tx_utils/l1_fee_analyzer.js +506 -0
- package/dest/l1_tx_utils/l1_tx_utils.d.ts +26 -8
- package/dest/l1_tx_utils/l1_tx_utils.d.ts.map +1 -1
- package/dest/l1_tx_utils/l1_tx_utils.js +118 -70
- package/dest/l1_tx_utils/readonly_l1_tx_utils.d.ts +19 -30
- package/dest/l1_tx_utils/readonly_l1_tx_utils.d.ts.map +1 -1
- package/dest/l1_tx_utils/readonly_l1_tx_utils.js +65 -168
- package/dest/l1_tx_utils/signer.d.ts +1 -1
- 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 +1 -1
- package/dest/l1_tx_utils/types.d.ts.map +1 -1
- package/dest/l1_tx_utils/utils.d.ts +1 -1
- package/dest/l1_types.d.ts +1 -1
- package/dest/publisher_manager.d.ts +21 -6
- package/dest/publisher_manager.d.ts.map +1 -1
- package/dest/publisher_manager.js +81 -7
- package/dest/queries.d.ts +14 -3
- package/dest/queries.d.ts.map +1 -1
- package/dest/queries.js +78 -9
- package/dest/test/chain_monitor.d.ts +48 -25
- package/dest/test/chain_monitor.d.ts.map +1 -1
- package/dest/test/chain_monitor.js +71 -38
- package/dest/test/eth_cheat_codes.d.ts +22 -6
- package/dest/test/eth_cheat_codes.d.ts.map +1 -1
- package/dest/test/eth_cheat_codes.js +28 -7
- package/dest/test/eth_cheat_codes_with_state.d.ts +1 -1
- package/dest/test/eth_cheat_codes_with_state.d.ts.map +1 -1
- package/dest/test/index.d.ts +1 -3
- package/dest/test/index.d.ts.map +1 -1
- package/dest/test/index.js +0 -2
- package/dest/test/rollup_cheat_codes.d.ts +46 -14
- package/dest/test/rollup_cheat_codes.d.ts.map +1 -1
- package/dest/test/rollup_cheat_codes.js +118 -42
- package/dest/test/start_anvil.d.ts +25 -2
- package/dest/test/start_anvil.d.ts.map +1 -1
- package/dest/test/start_anvil.js +143 -28
- package/dest/test/upgrade_utils.d.ts +1 -1
- 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/dest/zkPassportVerifierAddress.d.ts +1 -1
- package/package.json +35 -17
- package/src/client.ts +66 -2
- package/src/config.ts +91 -469
- package/src/contracts/README.md +157 -0
- package/src/contracts/chain_state_override.ts +200 -0
- package/src/contracts/empire_base.ts +6 -5
- 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 +74 -7
- 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 +243 -102
- package/src/contracts/outbox.ts +132 -0
- package/src/contracts/registry.ts +31 -1
- package/src/contracts/rollup.ts +819 -192
- package/src/contracts/{tally_slashing_proposer.ts → slashing_proposer.ts} +26 -21
- package/src/deploy_aztec_l1_contracts.ts +646 -0
- package/src/deploy_l1_contract.ts +362 -0
- package/src/forwarder_proxy.ts +108 -0
- package/src/generated/l1-contracts-defaults.ts +32 -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 +52 -11
- 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 +803 -0
- package/src/l1_tx_utils/l1_tx_utils.ts +123 -52
- package/src/l1_tx_utils/readonly_l1_tx_utils.ts +79 -214
- package/src/{test → l1_tx_utils}/tx_delayer.ts +97 -58
- package/src/publisher_manager.ts +107 -10
- package/src/queries.ts +87 -10
- package/src/test/chain_monitor.ts +115 -51
- package/src/test/eth_cheat_codes.ts +25 -7
- package/src/test/index.ts +0 -2
- package/src/test/rollup_cheat_codes.ts +123 -45
- package/src/test/start_anvil.ts +179 -27
- 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 -65
- package/dest/contracts/empire_slashing_proposer.d.ts.map +0 -1
- package/dest/contracts/empire_slashing_proposer.js +0 -194
- package/dest/contracts/tally_slashing_proposer.d.ts.map +0 -1
- package/dest/deploy_l1_contracts.d.ts +0 -226
- package/dest/deploy_l1_contracts.d.ts.map +0 -1
- package/dest/deploy_l1_contracts.js +0 -1473
- 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 -259
- package/src/deploy_l1_contracts.ts +0 -1849
- 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
|
@@ -2,17 +2,18 @@ import { maxBigint } from '@aztec/foundation/bigint';
|
|
|
2
2
|
import { merge, pick } from '@aztec/foundation/collection';
|
|
3
3
|
import { InterruptError, TimeoutError } from '@aztec/foundation/error';
|
|
4
4
|
import { createLogger } from '@aztec/foundation/log';
|
|
5
|
+
import { Semaphore } from '@aztec/foundation/queue';
|
|
5
6
|
import { retryUntil } from '@aztec/foundation/retry';
|
|
6
7
|
import { sleep } from '@aztec/foundation/sleep';
|
|
7
8
|
import { DateProvider } from '@aztec/foundation/timer';
|
|
8
9
|
import { RollupAbi } from '@aztec/l1-artifacts/RollupAbi';
|
|
9
10
|
import pickBy from 'lodash.pickby';
|
|
10
|
-
import {
|
|
11
|
-
import { jsonRpc } from 'viem/nonce';
|
|
11
|
+
import { formatGwei, serializeTransaction } from 'viem';
|
|
12
12
|
import { formatViemError } from '../utils.js';
|
|
13
13
|
import { l1TxUtilsConfigMappings } from './config.js';
|
|
14
|
-
import {
|
|
14
|
+
import { MAX_L1_TX_LIMIT } from './constants.js';
|
|
15
15
|
import { ReadOnlyL1TxUtils } from './readonly_l1_tx_utils.js';
|
|
16
|
+
import { createDelayer, wrapClientWithDelayer } from './tx_delayer.js';
|
|
16
17
|
import { DroppedTransactionError, TerminalTxUtilsState, TxUtilsState, UnknownMinedTxError } from './types.js';
|
|
17
18
|
const MAX_L1_TX_STATES = 32;
|
|
18
19
|
export class L1TxUtils extends ReadOnlyL1TxUtils {
|
|
@@ -21,13 +22,28 @@ export class L1TxUtils extends ReadOnlyL1TxUtils {
|
|
|
21
22
|
signer;
|
|
22
23
|
store;
|
|
23
24
|
metrics;
|
|
24
|
-
nonceManager;
|
|
25
25
|
txs;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
/** Last nonce successfully sent to the chain. Used as a lower bound when a fallback RPC node returns a stale count. */ lastSentNonce;
|
|
27
|
+
/** Mutex to prevent concurrent sendTransaction calls from racing on the same nonce. */ sendMutex;
|
|
28
|
+
/** Tx delayer for testing. Only set when enableDelayer config is true. */ delayer;
|
|
29
|
+
/** KZG instance for blob operations. */ kzg;
|
|
30
|
+
constructor(client, address, signer, logger = createLogger('ethereum:publisher'), dateProvider = new DateProvider(), config, debugMaxGasLimit = false, store, metrics, kzg, delayer){
|
|
31
|
+
super(client, logger, dateProvider, config, debugMaxGasLimit), this.client = client, this.address = address, this.signer = signer, this.store = store, this.metrics = metrics, this.txs = [], this.sendMutex = new Semaphore(1);
|
|
32
|
+
this.kzg = kzg;
|
|
33
|
+
// Set up delayer: use provided one or create new
|
|
34
|
+
if (config?.enableDelayer && config?.ethereumSlotDuration) {
|
|
35
|
+
this.delayer = delayer ?? this.createDelayer({
|
|
36
|
+
ethereumSlotDuration: config.ethereumSlotDuration
|
|
37
|
+
}, logger.getBindings());
|
|
38
|
+
this.client = wrapClientWithDelayer(this.client, this.delayer);
|
|
39
|
+
if (config.txDelayerMaxInclusionTimeIntoSlot !== undefined) {
|
|
40
|
+
this.delayer.setMaxInclusionTimeIntoSlot(config.txDelayerMaxInclusionTimeIntoSlot);
|
|
41
|
+
}
|
|
42
|
+
} else if (delayer) {
|
|
43
|
+
// Delayer provided but enableDelayer not set — just store it without wrapping
|
|
44
|
+
logger.warn('Delayer provided but enableDelayer config is not set; delayer will not be used');
|
|
45
|
+
this.delayer = delayer;
|
|
46
|
+
}
|
|
31
47
|
}
|
|
32
48
|
get state() {
|
|
33
49
|
return this.txs.at(-1)?.status ?? TxUtilsState.IDLE;
|
|
@@ -46,6 +62,11 @@ export class L1TxUtils extends ReadOnlyL1TxUtils {
|
|
|
46
62
|
this.metrics?.recordMinedTx(l1TxState, new Date(l1Timestamp));
|
|
47
63
|
} else if (newState === TxUtilsState.NOT_MINED) {
|
|
48
64
|
this.metrics?.recordDroppedTx(l1TxState);
|
|
65
|
+
// The tx was dropped: the chain nonce reverted to l1TxState.nonce, so our lower bound is
|
|
66
|
+
// no longer valid. Clear it so the next send fetches the real nonce from the chain.
|
|
67
|
+
if (this.lastSentNonce === l1TxState.nonce) {
|
|
68
|
+
this.lastSentNonce = undefined;
|
|
69
|
+
}
|
|
49
70
|
}
|
|
50
71
|
// Update state in the store
|
|
51
72
|
await this.store?.saveState(sender, l1TxState).catch((err)=>this.logger.error('Failed to persist L1 tx state', err));
|
|
@@ -54,6 +75,12 @@ export class L1TxUtils extends ReadOnlyL1TxUtils {
|
|
|
54
75
|
this.config = merge(this.config, newConfig);
|
|
55
76
|
this.logger.info('Updated L1TxUtils config', pickBy(newConfig, (_, key)=>key in l1TxUtilsConfigMappings));
|
|
56
77
|
}
|
|
78
|
+
/**
|
|
79
|
+
* Clears the cached `lastSentNonce` so the next `sendTransaction` call fetches the real
|
|
80
|
+
* nonce from the chain. Call this after an L1 reorg to prevent stale nonce references.
|
|
81
|
+
*/ resetNonce() {
|
|
82
|
+
this.lastSentNonce = undefined;
|
|
83
|
+
}
|
|
57
84
|
getSenderAddress() {
|
|
58
85
|
return this.address;
|
|
59
86
|
}
|
|
@@ -75,11 +102,24 @@ export class L1TxUtils extends ReadOnlyL1TxUtils {
|
|
|
75
102
|
this.logger.debug(`No states to rehydrate for account ${account}`);
|
|
76
103
|
return;
|
|
77
104
|
}
|
|
78
|
-
//
|
|
79
|
-
|
|
80
|
-
|
|
105
|
+
// Clean up excess states if we have more than MAX_L1_TX_STATES
|
|
106
|
+
if (loadedStates.length > MAX_L1_TX_STATES) {
|
|
107
|
+
this.logger.warn(`Found ${loadedStates.length} tx states for account ${account}, pruning to most recent ${MAX_L1_TX_STATES}`);
|
|
108
|
+
// Keep only the most recent MAX_L1_TX_STATES
|
|
109
|
+
const statesToKeep = loadedStates.slice(-MAX_L1_TX_STATES);
|
|
110
|
+
const statesToDelete = loadedStates.slice(0, -MAX_L1_TX_STATES);
|
|
111
|
+
// Batch delete old states in a transaction for efficiency
|
|
112
|
+
const idsToDelete = statesToDelete.map((s)=>s.id);
|
|
113
|
+
await this.store.deleteState(account, ...idsToDelete);
|
|
114
|
+
this.txs = statesToKeep;
|
|
115
|
+
this.logger.info(`Cleaned up ${statesToDelete.length} old tx states, kept ${statesToKeep.length} for account ${account}`);
|
|
116
|
+
} else {
|
|
117
|
+
// Convert loaded states (which have id) to the txs format
|
|
118
|
+
this.txs = loadedStates;
|
|
119
|
+
this.logger.info(`Rehydrated ${loadedStates.length} tx states for account ${account}`);
|
|
120
|
+
}
|
|
81
121
|
// Find all pending states and resume monitoring
|
|
82
|
-
const pendingStates =
|
|
122
|
+
const pendingStates = this.txs.filter((state)=>!TerminalTxUtilsState.includes(state.status));
|
|
83
123
|
if (pendingStates.length === 0) {
|
|
84
124
|
return;
|
|
85
125
|
}
|
|
@@ -107,21 +147,32 @@ export class L1TxUtils extends ReadOnlyL1TxUtils {
|
|
|
107
147
|
const txRequest = await this.client.prepareTransactionRequest(txData);
|
|
108
148
|
return await this.signTransaction(txRequest);
|
|
109
149
|
}
|
|
150
|
+
async checkInterruptedOrTimedOut(gasConfig) {
|
|
151
|
+
if (this.interrupted) {
|
|
152
|
+
throw new InterruptError(`Transaction sending is interrupted`);
|
|
153
|
+
}
|
|
154
|
+
const now = new Date(await this.getL1Timestamp());
|
|
155
|
+
if (gasConfig.txTimeoutAt && now > gasConfig.txTimeoutAt) {
|
|
156
|
+
throw new TimeoutError(`Transaction timed out before sending (now ${now.toISOString()} > timeoutAt ${gasConfig.txTimeoutAt.toISOString()})`);
|
|
157
|
+
}
|
|
158
|
+
return now;
|
|
159
|
+
}
|
|
110
160
|
/**
|
|
111
161
|
* Sends a transaction with gas estimation and pricing
|
|
112
162
|
* @param request - The transaction request (to, data, value)
|
|
113
163
|
* @param gasConfig - Optional gas configuration
|
|
114
164
|
* @returns The transaction hash and parameters used
|
|
115
165
|
*/ async sendTransaction(request, gasConfigOverrides, blobInputs, stateChange = TxUtilsState.SENT) {
|
|
116
|
-
if (this.interrupted) {
|
|
117
|
-
throw new InterruptError(`Transaction sending is interrupted`);
|
|
118
|
-
}
|
|
119
166
|
try {
|
|
120
167
|
const gasConfig = merge(this.config, gasConfigOverrides);
|
|
121
168
|
const account = this.getSenderAddress().toString();
|
|
169
|
+
// Fail fast before doing any work (gas estimation, balance check) if we've been interrupted
|
|
170
|
+
// or if the caller's deadline has already passed. The same check is repeated after gas
|
|
171
|
+
// estimation in case it took long enough to push us past the deadline.
|
|
172
|
+
await this.checkInterruptedOrTimedOut(gasConfig);
|
|
122
173
|
let gasLimit;
|
|
123
174
|
if (this.debugMaxGasLimit) {
|
|
124
|
-
gasLimit =
|
|
175
|
+
gasLimit = MAX_L1_TX_LIMIT;
|
|
125
176
|
} else if (gasConfig.gasLimit) {
|
|
126
177
|
gasLimit = gasConfig.gasLimit;
|
|
127
178
|
} else {
|
|
@@ -132,37 +183,41 @@ export class L1TxUtils extends ReadOnlyL1TxUtils {
|
|
|
132
183
|
...request
|
|
133
184
|
});
|
|
134
185
|
const gasPrice = await this.getGasPrice(gasConfig, !!blobInputs);
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
186
|
+
const now = await this.checkInterruptedOrTimedOut(gasConfig);
|
|
187
|
+
let txHash;
|
|
188
|
+
let nonce;
|
|
189
|
+
let baseState;
|
|
190
|
+
await this.sendMutex.acquire();
|
|
191
|
+
try {
|
|
192
|
+
const chainNonce = await this.client.getTransactionCount({
|
|
193
|
+
address: account,
|
|
194
|
+
blockTag: 'pending'
|
|
195
|
+
});
|
|
196
|
+
// If a fallback RPC node returns a stale count (lower than what we last sent), use our
|
|
197
|
+
// local lower bound to avoid sending a duplicate of an already-pending transaction.
|
|
198
|
+
nonce = this.lastSentNonce !== undefined && chainNonce <= this.lastSentNonce ? this.lastSentNonce + 1 : chainNonce;
|
|
199
|
+
baseState = {
|
|
200
|
+
request,
|
|
201
|
+
gasLimit,
|
|
202
|
+
blobInputs,
|
|
203
|
+
gasPrice,
|
|
204
|
+
nonce
|
|
205
|
+
};
|
|
206
|
+
const txData = this.makeTxData(baseState, {
|
|
207
|
+
isCancelTx: false
|
|
208
|
+
});
|
|
209
|
+
const signedRequest = await this.prepareSignedTransaction(txData);
|
|
210
|
+
txHash = await this.client.sendRawTransaction({
|
|
211
|
+
serializedTransaction: signedRequest
|
|
212
|
+
});
|
|
213
|
+
this.lastSentNonce = nonce;
|
|
214
|
+
} finally{
|
|
215
|
+
this.sendMutex.release();
|
|
156
216
|
}
|
|
157
|
-
// Send the new tx
|
|
158
|
-
const signedRequest = await this.prepareSignedTransaction(txData);
|
|
159
|
-
const txHash = await this.client.sendRawTransaction({
|
|
160
|
-
serializedTransaction: signedRequest
|
|
161
|
-
});
|
|
162
217
|
// Create the new state for monitoring
|
|
163
218
|
const l1TxState = {
|
|
164
219
|
...baseState,
|
|
165
|
-
id: await this.store?.consumeNextStateId(account) ?? Math.max(...this.txs.map((tx)=>tx.id),
|
|
220
|
+
id: await this.store?.consumeNextStateId(account) ?? Math.max(...this.txs.map((tx)=>tx.id), -1) + 1,
|
|
166
221
|
txHashes: [
|
|
167
222
|
txHash
|
|
168
223
|
],
|
|
@@ -204,7 +259,7 @@ export class L1TxUtils extends ReadOnlyL1TxUtils {
|
|
|
204
259
|
};
|
|
205
260
|
} catch (err) {
|
|
206
261
|
const viemError = formatViemError(err, request.abi);
|
|
207
|
-
this.logger.error(`Failed to send L1 transaction`, viemError, {
|
|
262
|
+
this.logger.error(`Failed to send L1 transaction: ${viemError.message}`, viemError, {
|
|
208
263
|
request: pick(request, 'to', 'value')
|
|
209
264
|
});
|
|
210
265
|
throw viemError;
|
|
@@ -333,10 +388,6 @@ export class L1TxUtils extends ReadOnlyL1TxUtils {
|
|
|
333
388
|
timePassed
|
|
334
389
|
});
|
|
335
390
|
await this.updateState(state, TxUtilsState.NOT_MINED);
|
|
336
|
-
this.nonceManager.reset({
|
|
337
|
-
address: account,
|
|
338
|
-
chainId: this.client.chain.id
|
|
339
|
-
});
|
|
340
391
|
throw new DroppedTransactionError(nonce, account);
|
|
341
392
|
}
|
|
342
393
|
// Break if the tx has timed out (ie expired)
|
|
@@ -408,15 +459,7 @@ export class L1TxUtils extends ReadOnlyL1TxUtils {
|
|
|
408
459
|
}
|
|
409
460
|
// Oh no, the transaction has timed out!
|
|
410
461
|
if (isCancelTx || !gasConfig.cancelTxOnTimeout) {
|
|
411
|
-
// If this was already a cancellation tx, or we are configured to not cancel txs, we just mark it as NOT_MINED
|
|
412
|
-
// and reset the nonce manager, so the next tx that comes along can reuse the nonce if/when this tx gets dropped.
|
|
413
|
-
// This is the nastiest scenario for us, since the new tx could acquire the next nonce, but then this tx is dropped,
|
|
414
|
-
// and the new tx would never get mined. Eventually, the new tx would also drop.
|
|
415
462
|
await this.updateState(state, TxUtilsState.NOT_MINED);
|
|
416
|
-
this.nonceManager.reset({
|
|
417
|
-
address: account,
|
|
418
|
-
chainId: this.client.chain.id
|
|
419
|
-
});
|
|
420
463
|
} else {
|
|
421
464
|
// Otherwise we fire the cancellation without awaiting to avoid blocking the caller,
|
|
422
465
|
// and monitor it in the background so we can speed it up as needed.
|
|
@@ -509,11 +552,11 @@ export class L1TxUtils extends ReadOnlyL1TxUtils {
|
|
|
509
552
|
from: request.from ?? this.getSenderAddress().toString(),
|
|
510
553
|
maxFeePerGas: gasPrice.maxFeePerGas,
|
|
511
554
|
maxPriorityFeePerGas: gasPrice.maxPriorityFeePerGas,
|
|
512
|
-
gas: request.gas ??
|
|
555
|
+
gas: request.gas ?? MAX_L1_TX_LIMIT
|
|
513
556
|
};
|
|
514
557
|
if (!request.gas && !gasConfig.ignoreBlockGasLimit) {
|
|
515
|
-
//
|
|
516
|
-
blockOverrides.gasLimit =
|
|
558
|
+
// MAX_L1_TX_LIMIT is set as call.gas, ensure block gasLimit is sufficient
|
|
559
|
+
blockOverrides.gasLimit = MAX_L1_TX_LIMIT;
|
|
517
560
|
}
|
|
518
561
|
return this._simulate(call, blockOverrides, stateOverrides, gasConfig, abi);
|
|
519
562
|
}
|
|
@@ -532,10 +575,6 @@ export class L1TxUtils extends ReadOnlyL1TxUtils {
|
|
|
532
575
|
account
|
|
533
576
|
});
|
|
534
577
|
await this.updateState(state, TxUtilsState.NOT_MINED);
|
|
535
|
-
this.nonceManager.reset({
|
|
536
|
-
address: account,
|
|
537
|
-
chainId: this.client.chain.id
|
|
538
|
-
});
|
|
539
578
|
return;
|
|
540
579
|
}
|
|
541
580
|
// Check if the original tx is still pending
|
|
@@ -550,10 +589,6 @@ export class L1TxUtils extends ReadOnlyL1TxUtils {
|
|
|
550
589
|
currentNonce
|
|
551
590
|
});
|
|
552
591
|
await this.updateState(state, TxUtilsState.NOT_MINED);
|
|
553
|
-
this.nonceManager.reset({
|
|
554
|
-
address: account,
|
|
555
|
-
chainId: this.client.chain.id
|
|
556
|
-
});
|
|
557
592
|
return;
|
|
558
593
|
}
|
|
559
594
|
// Get gas price with higher priority fee for cancellation
|
|
@@ -604,7 +639,20 @@ export class L1TxUtils extends ReadOnlyL1TxUtils {
|
|
|
604
639
|
});
|
|
605
640
|
return Number(timestamp) * 1000;
|
|
606
641
|
}
|
|
607
|
-
/** Makes empty blob inputs for the cancellation tx.
|
|
608
|
-
|
|
642
|
+
/** Makes empty blob inputs for the cancellation tx. */ makeEmptyBlobInputs(maxFeePerBlobGas) {
|
|
643
|
+
if (!this.kzg) {
|
|
644
|
+
throw new Error('Cannot make empty blob inputs for cancellation without kzg');
|
|
645
|
+
}
|
|
646
|
+
const blobData = new Uint8Array(131072).fill(0);
|
|
647
|
+
return {
|
|
648
|
+
blobs: [
|
|
649
|
+
blobData
|
|
650
|
+
],
|
|
651
|
+
kzg: this.kzg,
|
|
652
|
+
maxFeePerBlobGas
|
|
653
|
+
};
|
|
654
|
+
}
|
|
655
|
+
/** Creates a new delayer instance. */ createDelayer(opts, bindings) {
|
|
656
|
+
return createDelayer(this.dateProvider, opts, bindings);
|
|
609
657
|
}
|
|
610
658
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import type { EthAddress } from '@aztec/foundation/eth-address';
|
|
1
2
|
import { type Logger } from '@aztec/foundation/log';
|
|
2
3
|
import { DateProvider } from '@aztec/foundation/timer';
|
|
3
|
-
import { type Abi, type Account, type BlockOverrides, type Hex, type StateOverride } from 'viem';
|
|
4
|
+
import { type Abi, type Account, type BlockOverrides, type GetCodeReturnType, type Hex, type StateOverride } from 'viem';
|
|
4
5
|
import type { ViemClient } from '../types.js';
|
|
5
6
|
import { type L1TxUtilsConfig } from './config.js';
|
|
6
7
|
import type { GasPrice, L1BlobInputs, L1TxRequest, TransactionStats } from './types.js';
|
|
@@ -15,44 +16,36 @@ export declare class ReadOnlyL1TxUtils {
|
|
|
15
16
|
interrupt(): void;
|
|
16
17
|
restart(): void;
|
|
17
18
|
getBlock(): Promise<{
|
|
18
|
-
number: bigint;
|
|
19
|
-
hash: `0x${string}`;
|
|
20
|
-
nonce: `0x${string}`;
|
|
21
|
-
logsBloom: `0x${string}`;
|
|
22
19
|
baseFeePerGas: bigint | null;
|
|
23
20
|
blobGasUsed: bigint;
|
|
24
21
|
difficulty: bigint;
|
|
25
22
|
excessBlobGas: bigint;
|
|
26
|
-
extraData:
|
|
23
|
+
extraData: `0x${string}`;
|
|
27
24
|
gasLimit: bigint;
|
|
28
25
|
gasUsed: bigint;
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
hash: `0x${string}`;
|
|
27
|
+
logsBloom: `0x${string}`;
|
|
28
|
+
miner: `0x${string}`;
|
|
29
|
+
mixHash: `0x${string}`;
|
|
30
|
+
nonce: `0x${string}`;
|
|
31
|
+
number: bigint;
|
|
31
32
|
parentBeaconBlockRoot?: `0x${string}` | undefined;
|
|
32
|
-
parentHash:
|
|
33
|
-
receiptsRoot:
|
|
34
|
-
sealFields:
|
|
35
|
-
sha3Uncles:
|
|
33
|
+
parentHash: `0x${string}`;
|
|
34
|
+
receiptsRoot: `0x${string}`;
|
|
35
|
+
sealFields: `0x${string}`[];
|
|
36
|
+
sha3Uncles: `0x${string}`;
|
|
36
37
|
size: bigint;
|
|
37
|
-
stateRoot:
|
|
38
|
+
stateRoot: `0x${string}`;
|
|
38
39
|
timestamp: bigint;
|
|
39
40
|
totalDifficulty: bigint | null;
|
|
40
|
-
transactionsRoot:
|
|
41
|
-
uncles:
|
|
42
|
-
withdrawals?: import("viem").Withdrawal[] | undefined
|
|
41
|
+
transactionsRoot: `0x${string}`;
|
|
42
|
+
uncles: `0x${string}`[];
|
|
43
|
+
withdrawals?: import("viem").Withdrawal[] | undefined;
|
|
43
44
|
withdrawalsRoot?: `0x${string}` | undefined;
|
|
44
45
|
transactions: `0x${string}`[];
|
|
45
46
|
}>;
|
|
46
47
|
getBlockNumber(): Promise<bigint>;
|
|
47
|
-
|
|
48
|
-
* Analyzes pending transactions and recent fee history to determine a competitive priority fee.
|
|
49
|
-
* Falls back to network estimate if data is unavailable or fails.
|
|
50
|
-
* @param networkEstimateResult - Result from estimateMaxPriorityFeePerGas RPC call
|
|
51
|
-
* @param pendingBlockResult - Result from getBlock with pending tag RPC call
|
|
52
|
-
* @param feeHistoryResult - Result from getFeeHistory RPC call
|
|
53
|
-
* @returns A competitive priority fee based on pending txs and recent block history
|
|
54
|
-
*/
|
|
55
|
-
protected getCompetitivePriorityFee(networkEstimateResult: PromiseSettledResult<bigint | null>, pendingBlockResult: PromiseSettledResult<Awaited<ReturnType<ViemClient['getBlock']>> | null>, feeHistoryResult: PromiseSettledResult<Awaited<ReturnType<ViemClient['getFeeHistory']>> | null>): bigint;
|
|
48
|
+
getCode(address: EthAddress): Promise<GetCodeReturnType>;
|
|
56
49
|
/**
|
|
57
50
|
* Gets the current gas price with bounds checking
|
|
58
51
|
*/
|
|
@@ -86,9 +79,5 @@ export declare class ReadOnlyL1TxUtils {
|
|
|
86
79
|
result: `0x${string}`;
|
|
87
80
|
}>;
|
|
88
81
|
bumpGasLimit(gasLimit: bigint, _gasConfig?: L1TxUtilsConfig): bigint;
|
|
89
|
-
/**
|
|
90
|
-
* Helper function to retry RPC calls twice
|
|
91
|
-
*/
|
|
92
|
-
private tryTwice;
|
|
93
82
|
}
|
|
94
|
-
//# sourceMappingURL=
|
|
83
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVhZG9ubHlfbDFfdHhfdXRpbHMuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9sMV90eF91dGlscy9yZWFkb25seV9sMV90eF91dGlscy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFDQSxPQUFPLEtBQUssRUFBRSxVQUFVLEVBQUUsTUFBTSwrQkFBK0IsQ0FBQztBQUNoRSxPQUFPLEVBQUUsS0FBSyxNQUFNLEVBQWdCLE1BQU0sdUJBQXVCLENBQUM7QUFFbEUsT0FBTyxFQUFFLFlBQVksRUFBRSxNQUFNLHlCQUF5QixDQUFDO0FBS3ZELE9BQU8sRUFDTCxLQUFLLEdBQUcsRUFDUixLQUFLLE9BQU8sRUFFWixLQUFLLGNBQWMsRUFFbkIsS0FBSyxpQkFBaUIsRUFDdEIsS0FBSyxHQUFHLEVBR1IsS0FBSyxhQUFhLEVBS25CLE1BQU0sTUFBTSxDQUFDO0FBRWQsT0FBTyxLQUFLLEVBQUUsVUFBVSxFQUF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bUJBQW1CLENBQUMsRUFBRSxNQUFNLENBQUE7S0FBRSxHQUM5RCxPQUFPLENBQUM7UUFBRSxPQUFPLEVBQUUsTUFBTSxDQUFDO1FBQUMsTUFBTSxFQUFFLEtBQUssTUFBTSxFQUFFLENBQUE7S0FBRSxDQUFDLENBVXJEO0lBRUQsVUFBZ0IsU0FBUyxDQUN2QixJQUFJLEVBQUUsR0FBRyxFQUNULGNBQWMsNENBQXFDLEVBQ25ELGNBQWMsMkJBQW9CLEVBQ2xDLFNBQVMsRUFBRSxlQUFlLEdBQUc7UUFBRSxtQkFBbUIsQ0FBQyxFQUFFLE1BQU0sQ0FBQTtLQUFFLEVBQzdELEdBQUcsRUFBRSxHQUFHOzs7T0FvQ1Q7SUFFTSxZQUFZLENBQUMsUUFBUSxFQUFFLE1BQU0sRUFBRSxVQUFVLENBQUMsRUFBRSxlQUFlLEdBQUcsTUFBTSxDQVcxRTtDQUNGIn0=
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readonly_l1_tx_utils.d.ts","sourceRoot":"","sources":["../../src/l1_tx_utils/readonly_l1_tx_utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,MAAM,EAAgB,MAAM,uBAAuB,CAAC;AAElE,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"readonly_l1_tx_utils.d.ts","sourceRoot":"","sources":["../../src/l1_tx_utils/readonly_l1_tx_utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,KAAK,MAAM,EAAgB,MAAM,uBAAuB,CAAC;AAElE,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAKvD,OAAO,EACL,KAAK,GAAG,EACR,KAAK,OAAO,EAEZ,KAAK,cAAc,EAEnB,KAAK,iBAAiB,EACtB,KAAK,GAAG,EAGR,KAAK,aAAa,EAKnB,MAAM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