@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
|
@@ -0,0 +1,568 @@
|
|
|
1
|
+
import { createLogger } from '@aztec/foundation/log';
|
|
2
|
+
import { retryUntil } from '@aztec/foundation/retry';
|
|
3
|
+
import { DateProvider } from '@aztec/foundation/timer';
|
|
4
|
+
import { formatGwei } from 'viem';
|
|
5
|
+
import { calculatePercentile, isBlobTransaction } from '../utils.js';
|
|
6
|
+
import { BLOB_CAPACITY_SCHEDULE, GAS_PER_BLOB, WEI_CONST } from './constants.js';
|
|
7
|
+
import { DEFAULT_PRIORITY_FEE_STRATEGIES } from './fee-strategies/index.js';
|
|
8
|
+
/**
|
|
9
|
+
* Gets the maximum blob capacity for a given block timestamp
|
|
10
|
+
*/ function getMaxBlobCapacity(blockTimestamp) {
|
|
11
|
+
const timestamp = Number(blockTimestamp);
|
|
12
|
+
// Find the applicable schedule entry (sorted by timestamp descending)
|
|
13
|
+
for (const schedule of BLOB_CAPACITY_SCHEDULE){
|
|
14
|
+
if (timestamp >= schedule.timestamp) {
|
|
15
|
+
return schedule.max;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
// Fallback (should never hit)
|
|
19
|
+
return BLOB_CAPACITY_SCHEDULE[BLOB_CAPACITY_SCHEDULE.length - 1].max;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Processes a list of transactions to extract blob transaction info and priority fees.
|
|
23
|
+
* Handles both pending and mined transactions.
|
|
24
|
+
* Note: Only works with blocks fetched with includeTransactions: true
|
|
25
|
+
*/ function processTransactions(transactions) {
|
|
26
|
+
const blobTxs = [];
|
|
27
|
+
const allPriorityFees = [];
|
|
28
|
+
const blobPriorityFees = [];
|
|
29
|
+
let totalBlobCount = 0;
|
|
30
|
+
if (!transactions) {
|
|
31
|
+
return {
|
|
32
|
+
blobTxs,
|
|
33
|
+
allPriorityFees,
|
|
34
|
+
blobPriorityFees,
|
|
35
|
+
totalBlobCount
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
for (const tx of transactions){
|
|
39
|
+
const priorityFee = tx.maxPriorityFeePerGas || 0n;
|
|
40
|
+
if (priorityFee > 0n) {
|
|
41
|
+
allPriorityFees.push(priorityFee);
|
|
42
|
+
}
|
|
43
|
+
// Check if this is a blob transaction
|
|
44
|
+
if (isBlobTransaction(tx)) {
|
|
45
|
+
const blobCount = tx.blobVersionedHashes.length;
|
|
46
|
+
totalBlobCount += blobCount;
|
|
47
|
+
if (priorityFee > 0n) {
|
|
48
|
+
blobPriorityFees.push(priorityFee);
|
|
49
|
+
}
|
|
50
|
+
blobTxs.push({
|
|
51
|
+
hash: tx.hash,
|
|
52
|
+
maxPriorityFeePerGas: priorityFee,
|
|
53
|
+
maxFeePerGas: tx.maxFeePerGas || 0n,
|
|
54
|
+
maxFeePerBlobGas: tx.maxFeePerBlobGas,
|
|
55
|
+
blobCount,
|
|
56
|
+
gas: tx.gas
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
return {
|
|
61
|
+
blobTxs,
|
|
62
|
+
allPriorityFees,
|
|
63
|
+
blobPriorityFees,
|
|
64
|
+
totalBlobCount
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Analyzes L1 transaction fees in fisherman mode.
|
|
69
|
+
* Captures pending block state, records gas calculations, and compares to what gets included.
|
|
70
|
+
* Supports multiple priority fee calculation strategies for comparison.
|
|
71
|
+
*/ export class L1FeeAnalyzer {
|
|
72
|
+
client;
|
|
73
|
+
dateProvider;
|
|
74
|
+
logger;
|
|
75
|
+
maxCompletedAnalyses;
|
|
76
|
+
gasConfig;
|
|
77
|
+
pendingAnalyses;
|
|
78
|
+
pendingCallbacks;
|
|
79
|
+
completedAnalyses;
|
|
80
|
+
analysisCounter;
|
|
81
|
+
strategies;
|
|
82
|
+
constructor(client, dateProvider = new DateProvider(), logger = createLogger('ethereum:l1-fee-analyzer'), maxCompletedAnalyses = 100, strategies = DEFAULT_PRIORITY_FEE_STRATEGIES, gasConfig = {}){
|
|
83
|
+
this.client = client;
|
|
84
|
+
this.dateProvider = dateProvider;
|
|
85
|
+
this.logger = logger;
|
|
86
|
+
this.maxCompletedAnalyses = maxCompletedAnalyses;
|
|
87
|
+
this.gasConfig = gasConfig;
|
|
88
|
+
this.pendingAnalyses = new Map();
|
|
89
|
+
this.pendingCallbacks = new Map();
|
|
90
|
+
this.completedAnalyses = [];
|
|
91
|
+
this.analysisCounter = 0;
|
|
92
|
+
this.strategies = strategies;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Executes all configured strategies and returns their results.
|
|
96
|
+
* Each strategy handles its own RPC calls internally.
|
|
97
|
+
* @param isBlobTx - Whether this is a blob transaction
|
|
98
|
+
* @returns Array of strategy results
|
|
99
|
+
*/ async executeAllStrategies(isBlobTx) {
|
|
100
|
+
const results = [];
|
|
101
|
+
const context = {
|
|
102
|
+
gasConfig: this.gasConfig,
|
|
103
|
+
isBlobTx,
|
|
104
|
+
logger: this.logger
|
|
105
|
+
};
|
|
106
|
+
for (const strategy of this.strategies){
|
|
107
|
+
try {
|
|
108
|
+
const result = await strategy.execute(this.client, context);
|
|
109
|
+
results.push({
|
|
110
|
+
strategyId: strategy.id,
|
|
111
|
+
strategyName: strategy.name,
|
|
112
|
+
calculatedPriorityFee: result.priorityFee,
|
|
113
|
+
debugInfo: result.debugInfo
|
|
114
|
+
});
|
|
115
|
+
this.logger.debug(`Strategy "${strategy.name}" calculated priority fee`, {
|
|
116
|
+
strategyId: strategy.id,
|
|
117
|
+
priorityFee: formatGwei(result.priorityFee),
|
|
118
|
+
...result.debugInfo
|
|
119
|
+
});
|
|
120
|
+
} catch (err) {
|
|
121
|
+
this.logger.error(`Error calculating priority fee for strategy "${strategy.name}"`, err, {
|
|
122
|
+
strategyId: strategy.id
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
return results;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Captures a snapshot of the current pending block state
|
|
130
|
+
*/ async capturePendingSnapshot() {
|
|
131
|
+
const timestamp = this.dateProvider.now();
|
|
132
|
+
// Fetch data in parallel
|
|
133
|
+
const [latestBlock, pendingBlock, blobBaseFee] = await Promise.all([
|
|
134
|
+
this.client.getBlock({
|
|
135
|
+
blockTag: 'latest'
|
|
136
|
+
}),
|
|
137
|
+
this.client.getBlock({
|
|
138
|
+
blockTag: 'pending',
|
|
139
|
+
includeTransactions: true
|
|
140
|
+
}).catch(()=>null),
|
|
141
|
+
this.client.getBlobBaseFee().catch(()=>0n)
|
|
142
|
+
]);
|
|
143
|
+
const baseFeePerGas = latestBlock.baseFeePerGas || 0n;
|
|
144
|
+
const latestBlockNumber = latestBlock.number;
|
|
145
|
+
// Extract blob transaction info from pending block
|
|
146
|
+
const { blobTxs: pendingBlobTxs, allPriorityFees: allPendingPriorityFees, blobPriorityFees: pendingBlobPriorityFees, totalBlobCount: pendingBlobCount } = processTransactions(pendingBlock?.transactions);
|
|
147
|
+
// Calculate 75th percentile priority fees
|
|
148
|
+
const pendingP75PriorityFee = calculatePercentile(allPendingPriorityFees, 75);
|
|
149
|
+
const pendingBlobP75PriorityFee = calculatePercentile(pendingBlobPriorityFees, 75);
|
|
150
|
+
const pendingTxCount = pendingBlock?.transactions?.length || 0;
|
|
151
|
+
return {
|
|
152
|
+
timestamp,
|
|
153
|
+
latestBlockNumber,
|
|
154
|
+
baseFeePerGas,
|
|
155
|
+
blobBaseFee,
|
|
156
|
+
pendingTxCount,
|
|
157
|
+
pendingBlobTxCount: pendingBlobTxs.length,
|
|
158
|
+
pendingBlobCount,
|
|
159
|
+
pendingBlobTxs,
|
|
160
|
+
pendingP75PriorityFee,
|
|
161
|
+
pendingBlobP75PriorityFee
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Starts a fee analysis for a transaction bundle
|
|
166
|
+
* @param l2SlotNumber - The L2 slot this analysis is for
|
|
167
|
+
* @param gasLimit - The estimated gas limit
|
|
168
|
+
* @param requests - The transaction requests being analyzed
|
|
169
|
+
* @param blobInputs - Blob inputs if this is a blob transaction
|
|
170
|
+
* @param onComplete - Optional callback to invoke when analysis completes
|
|
171
|
+
* @returns The analysis ID for tracking
|
|
172
|
+
*/ async startAnalysis(l2SlotNumber, gasLimit, requests, blobInputs, onComplete) {
|
|
173
|
+
const id = `fee-analysis-${++this.analysisCounter}-${Date.now()}`;
|
|
174
|
+
const blobCount = blobInputs?.blobs?.length || 0;
|
|
175
|
+
const isBlobTx = blobCount > 0;
|
|
176
|
+
// Execute all strategies and capture pending snapshot in parallel
|
|
177
|
+
const [pendingSnapshot, strategyResults] = await Promise.all([
|
|
178
|
+
this.capturePendingSnapshot(),
|
|
179
|
+
this.executeAllStrategies(isBlobTx)
|
|
180
|
+
]);
|
|
181
|
+
const analysis = {
|
|
182
|
+
id,
|
|
183
|
+
l2SlotNumber,
|
|
184
|
+
pendingSnapshot,
|
|
185
|
+
computedPrices: {
|
|
186
|
+
gasLimit,
|
|
187
|
+
blobCount,
|
|
188
|
+
strategyResults
|
|
189
|
+
},
|
|
190
|
+
txInfo: {
|
|
191
|
+
requestCount: requests.length,
|
|
192
|
+
hasBlobData: isBlobTx,
|
|
193
|
+
totalEstimatedGas: gasLimit
|
|
194
|
+
}
|
|
195
|
+
};
|
|
196
|
+
this.pendingAnalyses.set(id, analysis);
|
|
197
|
+
if (onComplete) {
|
|
198
|
+
this.pendingCallbacks.set(id, onComplete);
|
|
199
|
+
}
|
|
200
|
+
// Log strategy calculations
|
|
201
|
+
const strategyLogInfo = strategyResults.reduce((acc, s)=>{
|
|
202
|
+
acc[`strategy_${s.strategyId}`] = formatGwei(s.calculatedPriorityFee);
|
|
203
|
+
return acc;
|
|
204
|
+
}, {});
|
|
205
|
+
this.logger.debug('Started fee analysis with strategy calculations', {
|
|
206
|
+
id,
|
|
207
|
+
l2SlotNumber: l2SlotNumber.toString(),
|
|
208
|
+
pendingBlobTxCount: pendingSnapshot.pendingBlobTxCount,
|
|
209
|
+
pendingBlobCount: pendingSnapshot.pendingBlobCount,
|
|
210
|
+
pendingBlobP75: formatGwei(pendingSnapshot.pendingBlobP75PriorityFee),
|
|
211
|
+
strategiesAnalyzed: strategyResults.length,
|
|
212
|
+
...strategyLogInfo
|
|
213
|
+
});
|
|
214
|
+
// Start watching for the next block
|
|
215
|
+
void this.watchForNextBlock(id, pendingSnapshot.latestBlockNumber);
|
|
216
|
+
return id;
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* Watches for the next block to be mined and completes the analysis
|
|
220
|
+
*/ async watchForNextBlock(analysisId, startBlockNumber) {
|
|
221
|
+
const analysis = this.pendingAnalyses.get(analysisId);
|
|
222
|
+
if (!analysis) {
|
|
223
|
+
return;
|
|
224
|
+
}
|
|
225
|
+
try {
|
|
226
|
+
// wait for next block
|
|
227
|
+
await retryUntil(async ()=>{
|
|
228
|
+
const currentBlockNumber = await this.client.getBlockNumber();
|
|
229
|
+
if (currentBlockNumber > startBlockNumber) {
|
|
230
|
+
return true;
|
|
231
|
+
}
|
|
232
|
+
return false;
|
|
233
|
+
}, 'Wait for next block', 13_000, 0.5);
|
|
234
|
+
const minedBlock = await this.client.getBlock({
|
|
235
|
+
includeTransactions: true
|
|
236
|
+
});
|
|
237
|
+
this.completeAnalysis(analysisId, minedBlock);
|
|
238
|
+
} catch (err) {
|
|
239
|
+
this.logger.error('Error waiting for next block in fee analysis', err, {
|
|
240
|
+
analysisId
|
|
241
|
+
});
|
|
242
|
+
} finally{
|
|
243
|
+
this.pendingAnalyses.delete(analysisId);
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
/**
|
|
247
|
+
* Completes the analysis once the next block is mined
|
|
248
|
+
*/ completeAnalysis(analysisId, minedBlock) {
|
|
249
|
+
const analysis = this.pendingAnalyses.get(analysisId);
|
|
250
|
+
if (!analysis) {
|
|
251
|
+
return;
|
|
252
|
+
}
|
|
253
|
+
// Extract blob transaction info from mined block
|
|
254
|
+
const { blobTxs: includedBlobTxs, allPriorityFees: includedPriorityFees, blobPriorityFees: includedBlobPriorityFees, totalBlobCount: includedBlobCount } = processTransactions(minedBlock.transactions);
|
|
255
|
+
// Get minimum included fees
|
|
256
|
+
const minIncludedPriorityFee = includedPriorityFees.length > 0 ? this.minBigInt(includedPriorityFees) : 0n;
|
|
257
|
+
const minIncludedBlobPriorityFee = includedBlobPriorityFees.length > 0 ? this.minBigInt(includedBlobPriorityFees) : 0n;
|
|
258
|
+
// Populate mined block info
|
|
259
|
+
analysis.minedBlock = {
|
|
260
|
+
blockNumber: minedBlock.number,
|
|
261
|
+
blockHash: minedBlock.hash,
|
|
262
|
+
blockTimestamp: minedBlock.timestamp,
|
|
263
|
+
baseFeePerGas: minedBlock.baseFeePerGas || 0n,
|
|
264
|
+
blobGasUsed: minedBlock.blobGasUsed || 0n,
|
|
265
|
+
txCount: minedBlock.transactions?.length || 0,
|
|
266
|
+
includedBlobTxCount: includedBlobTxs.length,
|
|
267
|
+
includedBlobCount,
|
|
268
|
+
includedBlobTxs,
|
|
269
|
+
minIncludedPriorityFee,
|
|
270
|
+
minIncludedBlobPriorityFee
|
|
271
|
+
};
|
|
272
|
+
// Calculate time before block mined
|
|
273
|
+
const blockTimestampMs = Number(minedBlock.timestamp) * 1000;
|
|
274
|
+
const timeBeforeBlockMs = blockTimestampMs - analysis.pendingSnapshot.timestamp;
|
|
275
|
+
// Calculate how many blobs were actually in the mined block
|
|
276
|
+
const blobsInBlock = minedBlock.blobGasUsed > 0n ? Number(minedBlock.blobGasUsed / GAS_PER_BLOB) : 0;
|
|
277
|
+
const maxBlobCapacity = getMaxBlobCapacity(minedBlock.timestamp);
|
|
278
|
+
const blockBlobsFull = blobsInBlock >= maxBlobCapacity;
|
|
279
|
+
// Count how many pending blob txs actually got included
|
|
280
|
+
const pendingBlobHashes = new Set(analysis.pendingSnapshot.pendingBlobTxs.map((tx)=>tx.hash));
|
|
281
|
+
const includedBlobHashes = new Set(includedBlobTxs.map((tx)=>tx.hash));
|
|
282
|
+
const pendingBlobTxsIncludedCount = [
|
|
283
|
+
...pendingBlobHashes
|
|
284
|
+
].filter((h)=>includedBlobHashes.has(h)).length;
|
|
285
|
+
const pendingBlobTxsExcludedCount = analysis.pendingSnapshot.pendingBlobTxCount - pendingBlobTxsIncludedCount;
|
|
286
|
+
analysis.analysis = {
|
|
287
|
+
timeBeforeBlockMs,
|
|
288
|
+
pendingBlobTxsIncludedCount,
|
|
289
|
+
pendingBlobTxsExcludedCount,
|
|
290
|
+
blobsInBlock,
|
|
291
|
+
maxBlobCapacity,
|
|
292
|
+
blockBlobsFull
|
|
293
|
+
};
|
|
294
|
+
// Evaluate each strategy against the mined block
|
|
295
|
+
const isBlobTx = analysis.computedPrices.blobCount > 0;
|
|
296
|
+
const minPriorityFeeToCompare = isBlobTx ? minIncludedBlobPriorityFee : minIncludedPriorityFee;
|
|
297
|
+
const gasLimit = analysis.computedPrices.gasLimit;
|
|
298
|
+
if (analysis.computedPrices.strategyResults) {
|
|
299
|
+
for (const strategyResult of analysis.computedPrices.strategyResults){
|
|
300
|
+
const strategyPriorityFee = strategyResult.calculatedPriorityFee;
|
|
301
|
+
const strategyPriorityFeeDelta = strategyPriorityFee - minPriorityFeeToCompare;
|
|
302
|
+
// Determine if this strategy would have resulted in inclusion
|
|
303
|
+
let strategyWouldBeIncluded = true;
|
|
304
|
+
let strategyExclusionReason;
|
|
305
|
+
if (isBlobTx) {
|
|
306
|
+
// For blob txs, only consider priority fee if blob space was full
|
|
307
|
+
if (includedBlobPriorityFees.length > 0 && strategyPriorityFee < minIncludedBlobPriorityFee && blockBlobsFull) {
|
|
308
|
+
strategyWouldBeIncluded = false;
|
|
309
|
+
strategyExclusionReason = 'priority_fee_too_low';
|
|
310
|
+
}
|
|
311
|
+
} else {
|
|
312
|
+
// For non-blob txs, use the old logic
|
|
313
|
+
if (includedPriorityFees.length > 0 && strategyPriorityFee < minIncludedPriorityFee) {
|
|
314
|
+
strategyWouldBeIncluded = false;
|
|
315
|
+
strategyExclusionReason = 'priority_fee_too_low';
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
// Calculate estimated cost in ETH for this strategy
|
|
319
|
+
// Cost = gasLimit * (baseFee + priorityFee)
|
|
320
|
+
const baseFee = analysis.minedBlock.baseFeePerGas;
|
|
321
|
+
// Execution cost: gasLimit * (baseFee + priorityFee)
|
|
322
|
+
const executionCostWei = gasLimit * (baseFee + strategyPriorityFee);
|
|
323
|
+
const estimatedCostEth = Number(executionCostWei) / 1e18;
|
|
324
|
+
// Calculate minimum cost needed for inclusion
|
|
325
|
+
const minExecutionCostWei = gasLimit * (baseFee + minPriorityFeeToCompare);
|
|
326
|
+
const minCostEth = Number(minExecutionCostWei) / 1e18;
|
|
327
|
+
// Overpayment is the difference
|
|
328
|
+
const estimatedOverpaymentEth = estimatedCostEth - minCostEth;
|
|
329
|
+
// Update the strategy result with analysis data
|
|
330
|
+
strategyResult.wouldBeIncluded = strategyWouldBeIncluded;
|
|
331
|
+
strategyResult.exclusionReason = strategyExclusionReason;
|
|
332
|
+
strategyResult.priorityFeeDelta = strategyPriorityFeeDelta;
|
|
333
|
+
strategyResult.estimatedCostEth = estimatedCostEth;
|
|
334
|
+
strategyResult.estimatedOverpaymentEth = estimatedOverpaymentEth;
|
|
335
|
+
// Log per-strategy results
|
|
336
|
+
this.logger.info(`Strategy "${strategyResult.strategyName}" analysis`, {
|
|
337
|
+
id: analysisId,
|
|
338
|
+
strategyId: strategyResult.strategyId,
|
|
339
|
+
strategyName: strategyResult.strategyName,
|
|
340
|
+
calculatedPriorityFee: formatGwei(strategyPriorityFee),
|
|
341
|
+
minIncludedPriorityFee: formatGwei(minPriorityFeeToCompare),
|
|
342
|
+
priorityFeeDelta: formatGwei(strategyPriorityFeeDelta),
|
|
343
|
+
wouldBeIncluded: strategyWouldBeIncluded,
|
|
344
|
+
exclusionReason: strategyExclusionReason,
|
|
345
|
+
estimatedCostEth: estimatedCostEth.toFixed(6),
|
|
346
|
+
estimatedOverpaymentEth: estimatedOverpaymentEth.toFixed(6)
|
|
347
|
+
});
|
|
348
|
+
}
|
|
349
|
+
// Create cost ranking
|
|
350
|
+
const costRanking = analysis.computedPrices.strategyResults.map((s)=>({
|
|
351
|
+
strategyId: s.strategyId,
|
|
352
|
+
strategyName: s.strategyName,
|
|
353
|
+
estimatedCostEth: s.estimatedCostEth,
|
|
354
|
+
wouldBeIncluded: s.wouldBeIncluded
|
|
355
|
+
})).sort((a, b)=>a.estimatedCostEth - b.estimatedCostEth);
|
|
356
|
+
analysis.analysis.costRanking = costRanking;
|
|
357
|
+
// Log cost ranking summary
|
|
358
|
+
this.logger.info('Strategy cost ranking', {
|
|
359
|
+
id: analysisId,
|
|
360
|
+
cheapestStrategy: costRanking[0]?.strategyName,
|
|
361
|
+
cheapestCost: costRanking[0]?.estimatedCostEth.toFixed(6),
|
|
362
|
+
cheapestWouldBeIncluded: costRanking[0]?.wouldBeIncluded,
|
|
363
|
+
mostExpensiveStrategy: costRanking[costRanking.length - 1]?.strategyName,
|
|
364
|
+
mostExpensiveCost: costRanking[costRanking.length - 1]?.estimatedCostEth.toFixed(6),
|
|
365
|
+
mostExpensiveWouldBeIncluded: costRanking[costRanking.length - 1]?.wouldBeIncluded,
|
|
366
|
+
costSpread: costRanking.length > 1 ? (costRanking[costRanking.length - 1].estimatedCostEth - costRanking[0].estimatedCostEth).toFixed(6) : '0'
|
|
367
|
+
});
|
|
368
|
+
}
|
|
369
|
+
// Log the overall results
|
|
370
|
+
this.logger.info('Fee analysis completed', {
|
|
371
|
+
id: analysisId,
|
|
372
|
+
l2SlotNumber: analysis.l2SlotNumber.toString(),
|
|
373
|
+
timeBeforeBlockMs,
|
|
374
|
+
pendingBlobTxCount: analysis.pendingSnapshot.pendingBlobTxCount,
|
|
375
|
+
includedBlobTxCount: analysis.minedBlock.includedBlobTxCount,
|
|
376
|
+
pendingBlobTxsIncludedCount,
|
|
377
|
+
pendingBlobTxsExcludedCount,
|
|
378
|
+
blobsInBlock,
|
|
379
|
+
maxBlobCapacity,
|
|
380
|
+
blockBlobsFull,
|
|
381
|
+
minIncludedPriorityFee: formatGwei(minIncludedPriorityFee),
|
|
382
|
+
minIncludedBlobPriorityFee: formatGwei(minIncludedBlobPriorityFee),
|
|
383
|
+
strategiesAnalyzed: analysis.computedPrices.strategyResults?.length ?? 0
|
|
384
|
+
});
|
|
385
|
+
// Move to completed analyses
|
|
386
|
+
this.pendingAnalyses.delete(analysisId);
|
|
387
|
+
this.completedAnalyses.push(analysis);
|
|
388
|
+
// Trim old completed analyses if needed
|
|
389
|
+
while(this.completedAnalyses.length > this.maxCompletedAnalyses){
|
|
390
|
+
this.completedAnalyses.shift();
|
|
391
|
+
}
|
|
392
|
+
// Invoke the callback for this specific analysis
|
|
393
|
+
const callback = this.pendingCallbacks.get(analysisId);
|
|
394
|
+
if (callback) {
|
|
395
|
+
try {
|
|
396
|
+
callback(analysis);
|
|
397
|
+
} catch (err) {
|
|
398
|
+
this.logger.error('Error in analysis complete callback', err);
|
|
399
|
+
}
|
|
400
|
+
this.pendingCallbacks.delete(analysisId);
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
/**
|
|
404
|
+
* Gets a specific analysis result by ID
|
|
405
|
+
*/ getAnalysis(id) {
|
|
406
|
+
return this.pendingAnalyses.get(id) || this.completedAnalyses.find((a)=>a.id === id);
|
|
407
|
+
}
|
|
408
|
+
/**
|
|
409
|
+
* Gets all completed analyses
|
|
410
|
+
*/ getCompletedAnalyses() {
|
|
411
|
+
return [
|
|
412
|
+
...this.completedAnalyses
|
|
413
|
+
];
|
|
414
|
+
}
|
|
415
|
+
/**
|
|
416
|
+
* Gets statistics about all completed analyses
|
|
417
|
+
*/ getAnalysisStats() {
|
|
418
|
+
const completed = this.completedAnalyses.filter((a)=>a.analysis);
|
|
419
|
+
if (completed.length === 0) {
|
|
420
|
+
return {
|
|
421
|
+
totalAnalyses: 0,
|
|
422
|
+
avgTimeBeforeBlockMs: 0,
|
|
423
|
+
avgBlobsInBlock: 0,
|
|
424
|
+
blocksBlobsFull: 0
|
|
425
|
+
};
|
|
426
|
+
}
|
|
427
|
+
const avgTimeBeforeBlockMs = completed.reduce((sum, a)=>sum + a.analysis.timeBeforeBlockMs, 0) / completed.length;
|
|
428
|
+
const avgBlobsInBlock = completed.reduce((sum, a)=>sum + a.analysis.blobsInBlock, 0) / completed.length;
|
|
429
|
+
const blocksBlobsFull = completed.filter((a)=>a.analysis.blockBlobsFull).length;
|
|
430
|
+
return {
|
|
431
|
+
totalAnalyses: completed.length,
|
|
432
|
+
avgTimeBeforeBlockMs,
|
|
433
|
+
avgBlobsInBlock,
|
|
434
|
+
blocksBlobsFull
|
|
435
|
+
};
|
|
436
|
+
}
|
|
437
|
+
/**
|
|
438
|
+
* Gets comparative statistics for all strategies across completed analyses
|
|
439
|
+
*/ getStrategyComparison() {
|
|
440
|
+
const completed = this.completedAnalyses.filter((a)=>a.analysis);
|
|
441
|
+
if (completed.length === 0) {
|
|
442
|
+
return [];
|
|
443
|
+
}
|
|
444
|
+
// Collect data by strategy ID
|
|
445
|
+
const strategyData = new Map();
|
|
446
|
+
for (const analysis of completed){
|
|
447
|
+
if (!analysis.computedPrices.strategyResults) {
|
|
448
|
+
continue;
|
|
449
|
+
}
|
|
450
|
+
for (const strategyResult of analysis.computedPrices.strategyResults){
|
|
451
|
+
if (!strategyData.has(strategyResult.strategyId)) {
|
|
452
|
+
strategyData.set(strategyResult.strategyId, {
|
|
453
|
+
strategyName: strategyResult.strategyName,
|
|
454
|
+
analyses: 0,
|
|
455
|
+
inclusions: 0,
|
|
456
|
+
totalCostEth: 0,
|
|
457
|
+
totalOverpaymentEth: 0,
|
|
458
|
+
totalPriorityFeeDelta: 0
|
|
459
|
+
});
|
|
460
|
+
}
|
|
461
|
+
const data = strategyData.get(strategyResult.strategyId);
|
|
462
|
+
data.analyses++;
|
|
463
|
+
if (strategyResult.wouldBeIncluded) {
|
|
464
|
+
data.inclusions++;
|
|
465
|
+
}
|
|
466
|
+
if (strategyResult.estimatedCostEth !== undefined) {
|
|
467
|
+
data.totalCostEth += strategyResult.estimatedCostEth;
|
|
468
|
+
}
|
|
469
|
+
if (strategyResult.estimatedOverpaymentEth !== undefined) {
|
|
470
|
+
data.totalOverpaymentEth += strategyResult.estimatedOverpaymentEth;
|
|
471
|
+
}
|
|
472
|
+
if (strategyResult.priorityFeeDelta !== undefined) {
|
|
473
|
+
data.totalPriorityFeeDelta += Number(strategyResult.priorityFeeDelta);
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
// Convert to output format
|
|
478
|
+
const results = Array.from(strategyData.entries()).map(([strategyId, data])=>({
|
|
479
|
+
strategyId,
|
|
480
|
+
strategyName: data.strategyName,
|
|
481
|
+
totalAnalyses: data.analyses,
|
|
482
|
+
inclusionCount: data.inclusions,
|
|
483
|
+
inclusionRate: data.analyses > 0 ? data.inclusions / data.analyses : 0,
|
|
484
|
+
avgEstimatedCostEth: data.analyses > 0 ? data.totalCostEth / data.analyses : 0,
|
|
485
|
+
totalEstimatedCostEth: data.totalCostEth,
|
|
486
|
+
avgOverpaymentEth: data.analyses > 0 ? data.totalOverpaymentEth / data.analyses : 0,
|
|
487
|
+
totalOverpaymentEth: data.totalOverpaymentEth,
|
|
488
|
+
avgPriorityFeeDeltaGwei: data.analyses > 0 ? data.totalPriorityFeeDelta / data.analyses / Number(WEI_CONST) : 0
|
|
489
|
+
}));
|
|
490
|
+
// Sort by inclusion rate descending, then by avg cost ascending
|
|
491
|
+
return results.sort((a, b)=>{
|
|
492
|
+
if (Math.abs(a.inclusionRate - b.inclusionRate) > 0.01) {
|
|
493
|
+
return b.inclusionRate - a.inclusionRate;
|
|
494
|
+
}
|
|
495
|
+
return a.avgEstimatedCostEth - b.avgEstimatedCostEth;
|
|
496
|
+
});
|
|
497
|
+
}
|
|
498
|
+
minBigInt(values) {
|
|
499
|
+
if (values.length === 0) {
|
|
500
|
+
return 0n;
|
|
501
|
+
}
|
|
502
|
+
return values.reduce((min, val)=>val < min ? val : min, values[0]);
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
/** Safety bound on how far back the window scan walks if the chain head is far ahead of the window. */ const MAX_WINDOW_SCAN_BLOCKS = 64;
|
|
506
|
+
/**
|
|
507
|
+
* Reads the already-mined L1 blocks whose timestamps fall in [windowStartS, windowEndS) — the L1
|
|
508
|
+
* inclusion window of an L2 slot — and extracts per-block fee data. Walks block headers to map the
|
|
509
|
+
* window to block numbers, then reads the priority-fee stats from a single eth_feeHistory call
|
|
510
|
+
* (percentile 0 is the cheapest included tx, i.e. the inclusion bar), so no transaction bodies are
|
|
511
|
+
* ever downloaded. Historical reads only, so it never waits on a future block. Returns the blocks in
|
|
512
|
+
* chronological order, [] on error, or the subset mined so far if the window is still in progress.
|
|
513
|
+
* Never throws.
|
|
514
|
+
*/ export async function captureWindowBlockFees(client, windowStartS, windowEndS) {
|
|
515
|
+
try {
|
|
516
|
+
let current = await client.getBlock({
|
|
517
|
+
blockTag: 'latest'
|
|
518
|
+
});
|
|
519
|
+
const inWindow = [];
|
|
520
|
+
let scanned = 0;
|
|
521
|
+
// Walk back from the head, collecting blocks inside the window and skipping any past its end,
|
|
522
|
+
// until we cross below the window start (or hit the safety cap / genesis).
|
|
523
|
+
while(current.timestamp >= windowStartS && scanned < MAX_WINDOW_SCAN_BLOCKS){
|
|
524
|
+
if (current.timestamp < windowEndS) {
|
|
525
|
+
inWindow.push(current);
|
|
526
|
+
}
|
|
527
|
+
if (current.number === 0n) {
|
|
528
|
+
break;
|
|
529
|
+
}
|
|
530
|
+
current = await client.getBlock({
|
|
531
|
+
blockNumber: current.number - 1n
|
|
532
|
+
});
|
|
533
|
+
scanned++;
|
|
534
|
+
}
|
|
535
|
+
if (inWindow.length === 0) {
|
|
536
|
+
return [];
|
|
537
|
+
}
|
|
538
|
+
inWindow.reverse();
|
|
539
|
+
const newest = inWindow[inWindow.length - 1];
|
|
540
|
+
const feeHistory = await client.getFeeHistory({
|
|
541
|
+
blockCount: Number(newest.number - inWindow[0].number) + 1,
|
|
542
|
+
blockNumber: newest.number,
|
|
543
|
+
rewardPercentiles: [
|
|
544
|
+
0,
|
|
545
|
+
75
|
|
546
|
+
]
|
|
547
|
+
});
|
|
548
|
+
return inWindow.map((block)=>{
|
|
549
|
+
const idx = Number(block.number - feeHistory.oldestBlock);
|
|
550
|
+
const [minIncludedPriorityFee, p75PriorityFee] = feeHistory.reward?.[idx] ?? [
|
|
551
|
+
0n,
|
|
552
|
+
0n
|
|
553
|
+
];
|
|
554
|
+
const blobsInBlock = block.blobGasUsed ? Number(block.blobGasUsed / GAS_PER_BLOB) : 0;
|
|
555
|
+
return {
|
|
556
|
+
blockNumber: block.number,
|
|
557
|
+
timestamp: block.timestamp,
|
|
558
|
+
baseFeePerGas: block.baseFeePerGas ?? 0n,
|
|
559
|
+
p75PriorityFee,
|
|
560
|
+
minIncludedPriorityFee,
|
|
561
|
+
blockBlobsFull: blobsInBlock >= getMaxBlobCapacity(block.timestamp),
|
|
562
|
+
includedBlobCount: blobsInBlock
|
|
563
|
+
};
|
|
564
|
+
});
|
|
565
|
+
} catch {
|
|
566
|
+
return [];
|
|
567
|
+
}
|
|
568
|
+
}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
+
import type { BlobKzgInstance } from '@aztec/blob-lib/types';
|
|
1
2
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
2
|
-
import { type Logger } from '@aztec/foundation/log';
|
|
3
|
+
import { type Logger, type LoggerBindings } from '@aztec/foundation/log';
|
|
3
4
|
import { DateProvider } from '@aztec/foundation/timer';
|
|
4
|
-
import { type Abi, type BlockOverrides, type Hex, type
|
|
5
|
+
import { type Abi, type BlockOverrides, type Hex, type PrepareTransactionRequestRequest, type StateOverride, type TransactionReceipt } from 'viem';
|
|
5
6
|
import type { ViemClient } from '../types.js';
|
|
6
7
|
import { type L1TxUtilsConfig } from './config.js';
|
|
7
8
|
import type { IL1TxMetrics, IL1TxStore } from './interfaces.js';
|
|
8
9
|
import { ReadOnlyL1TxUtils } from './readonly_l1_tx_utils.js';
|
|
10
|
+
import { Delayer } from './tx_delayer.js';
|
|
9
11
|
import { type L1BlobInputs, type L1TxConfig, type L1TxRequest, type L1TxState, type SigningCallback, TxUtilsState } from './types.js';
|
|
10
12
|
export declare class L1TxUtils extends ReadOnlyL1TxUtils {
|
|
11
13
|
client: ViemClient;
|
|
@@ -13,14 +15,26 @@ export declare class L1TxUtils extends ReadOnlyL1TxUtils {
|
|
|
13
15
|
protected signer: SigningCallback;
|
|
14
16
|
protected store?: IL1TxStore | undefined;
|
|
15
17
|
protected metrics?: IL1TxMetrics | undefined;
|
|
16
|
-
protected nonceManager: NonceManager;
|
|
17
18
|
protected txs: L1TxState[];
|
|
18
|
-
|
|
19
|
+
/** Last nonce successfully sent to the chain. Used as a lower bound when a fallback RPC node returns a stale count. */
|
|
20
|
+
private lastSentNonce;
|
|
21
|
+
/** Mutex to prevent concurrent sendTransaction calls from racing on the same nonce. */
|
|
22
|
+
private readonly sendMutex;
|
|
23
|
+
/** Tx delayer for testing. Only set when enableDelayer config is true. */
|
|
24
|
+
delayer?: Delayer;
|
|
25
|
+
/** KZG instance for blob operations. */
|
|
26
|
+
protected kzg?: BlobKzgInstance;
|
|
27
|
+
constructor(client: ViemClient, address: EthAddress, signer: SigningCallback, logger?: Logger, dateProvider?: DateProvider, config?: Partial<L1TxUtilsConfig>, debugMaxGasLimit?: boolean, store?: IL1TxStore | undefined, metrics?: IL1TxMetrics | undefined, kzg?: BlobKzgInstance, delayer?: Delayer);
|
|
19
28
|
get state(): TxUtilsState;
|
|
20
29
|
get lastMinedAtBlockNumber(): bigint | undefined;
|
|
21
30
|
protected updateState(l1TxState: L1TxState, newState: TxUtilsState.MINED, l1Timestamp: number): Promise<void>;
|
|
22
31
|
protected updateState(l1TxState: L1TxState, newState: TxUtilsState, l1Timestamp?: undefined): Promise<void>;
|
|
23
32
|
updateConfig(newConfig: Partial<L1TxUtilsConfig>): void;
|
|
33
|
+
/**
|
|
34
|
+
* Clears the cached `lastSentNonce` so the next `sendTransaction` call fetches the real
|
|
35
|
+
* nonce from the chain. Call this after an L1 reorg to prevent stale nonce references.
|
|
36
|
+
*/
|
|
37
|
+
resetNonce(): void;
|
|
24
38
|
getSenderAddress(): EthAddress;
|
|
25
39
|
getSenderBalance(): Promise<bigint>;
|
|
26
40
|
/**
|
|
@@ -30,6 +44,7 @@ export declare class L1TxUtils extends ReadOnlyL1TxUtils {
|
|
|
30
44
|
loadStateAndResumeMonitoring(): Promise<void>;
|
|
31
45
|
private signTransaction;
|
|
32
46
|
protected prepareSignedTransaction(txData: PrepareTransactionRequestRequest): Promise<`0x${string}`>;
|
|
47
|
+
private checkInterruptedOrTimedOut;
|
|
33
48
|
/**
|
|
34
49
|
* Sends a transaction with gas estimation and pricing
|
|
35
50
|
* @param request - The transaction request (to, data, value)
|
|
@@ -88,7 +103,11 @@ export declare class L1TxUtils extends ReadOnlyL1TxUtils {
|
|
|
88
103
|
*/
|
|
89
104
|
protected attemptTxCancellation(state: L1TxState): Promise<void>;
|
|
90
105
|
private getL1Timestamp;
|
|
91
|
-
/** Makes empty blob inputs for the cancellation tx.
|
|
92
|
-
protected makeEmptyBlobInputs(
|
|
106
|
+
/** Makes empty blob inputs for the cancellation tx. */
|
|
107
|
+
protected makeEmptyBlobInputs(maxFeePerBlobGas: bigint): Required<L1BlobInputs>;
|
|
108
|
+
/** Creates a new delayer instance. */
|
|
109
|
+
protected createDelayer(opts: {
|
|
110
|
+
ethereumSlotDuration: bigint | number;
|
|
111
|
+
}, bindings: LoggerBindings): Delayer;
|
|
93
112
|
}
|
|
94
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
113
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibDFfdHhfdXRpbHMuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9sMV90eF91dGlscy9sMV90eF91dGlscy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssRUFBRSxlQUFlLEVBQUUsTUFBTSx1QkFBdUIsQ0FBQztBQUk3RCxP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sRUFBRSxjQUFjLEdBQUcsT0FBTyxDQUUxRztDQUNGIn0=
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"l1_tx_utils.d.ts","sourceRoot":"","sources":["../../src/l1_tx_utils/l1_tx_utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"l1_tx_utils.d.ts","sourceRoot":"","sources":["../../src/l1_tx_utils/l1_tx_utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAI7D,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,cAAc,EAAgB,MAAM,uBAAuB,CAAC;AAIvF,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAIvD,OAAO,EACL,KAAK,GAAG,EACR,KAAK,cAAc,EACnB,KAAK,GAAG,EACR,KAAK,gCAAgC,EACrC,KAAK,aAAa,EAClB,KAAK,kBAAkB,EAIxB,MAAM,MAAM,CAAC;AAEd,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9C,OAAO,EAAE,KAAK,eAAe,EAA2B,MAAM,aAAa,CAAC;AAE5E,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAwC,MAAM,iBAAiB,CAAC;AAChF,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,SAAS,EAEd,KAAK,eAAe,EAEpB,YAAY,EAEb,MAAM,YAAY,CAAC;AASpB,qBAAa,SAAU,SAAQ,iBAAiB;IAY5B,MAAM,EAAE,UAAU;IAC3B,OAAO,EAAE,UAAU;IAC1B,SAAS,CAAC,MAAM,EAAE,eAAe;IAKjC,SAAS,CAAC,K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