@aztec/ethereum 0.0.1-commit.993d52e → 0.0.1-commit.9a89641
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dest/client.d.ts +25 -3
- package/dest/client.d.ts.map +1 -1
- package/dest/client.js +60 -8
- package/dest/config.d.ts +27 -8
- package/dest/config.d.ts.map +1 -1
- package/dest/config.js +60 -13
- package/dest/contracts/chain_state_override.d.ts +78 -0
- package/dest/contracts/chain_state_override.d.ts.map +1 -0
- package/dest/contracts/chain_state_override.js +137 -0
- package/dest/contracts/empire_base.d.ts +1 -3
- package/dest/contracts/empire_base.d.ts.map +1 -1
- package/dest/contracts/fee_asset_price_oracle.d.ts +6 -2
- package/dest/contracts/fee_asset_price_oracle.d.ts.map +1 -1
- package/dest/contracts/fee_asset_price_oracle.js +11 -6
- package/dest/contracts/governance.d.ts +135 -35
- package/dest/contracts/governance.d.ts.map +1 -1
- package/dest/contracts/governance.js +226 -15
- package/dest/contracts/governance_proposer.d.ts +33 -4
- package/dest/contracts/governance_proposer.d.ts.map +1 -1
- package/dest/contracts/governance_proposer.js +52 -13
- package/dest/contracts/gse.d.ts +8 -2
- package/dest/contracts/gse.d.ts.map +1 -1
- package/dest/contracts/gse.js +11 -2
- package/dest/contracts/inbox.d.ts +3 -3
- package/dest/contracts/inbox.d.ts.map +1 -1
- package/dest/contracts/inbox.js +12 -7
- package/dest/contracts/index.d.ts +3 -3
- package/dest/contracts/index.d.ts.map +1 -1
- package/dest/contracts/index.js +2 -2
- package/dest/contracts/multicall.d.ts +130 -13
- package/dest/contracts/multicall.d.ts.map +1 -1
- package/dest/contracts/multicall.js +203 -94
- package/dest/contracts/outbox.d.ts +27 -4
- package/dest/contracts/outbox.d.ts.map +1 -1
- package/dest/contracts/outbox.js +34 -7
- package/dest/contracts/rollup.d.ts +5423 -27
- package/dest/contracts/rollup.d.ts.map +1 -1
- package/dest/contracts/rollup.js +396 -73
- package/dest/contracts/slashing_proposer.d.ts +170 -0
- package/dest/contracts/slashing_proposer.d.ts.map +1 -0
- package/dest/contracts/slashing_proposer.js +748 -0
- package/dest/deploy_aztec_l1_contracts.d.ts +18 -10
- package/dest/deploy_aztec_l1_contracts.d.ts.map +1 -1
- package/dest/deploy_aztec_l1_contracts.js +28 -17
- 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 +14943 -16270
- package/dest/l1_artifacts.d.ts.map +1 -1
- package/dest/l1_artifacts.js +9 -24
- package/dest/l1_contract_addresses.d.ts +61 -65
- package/dest/l1_contract_addresses.d.ts.map +1 -1
- package/dest/l1_contract_addresses.js +101 -82
- package/dest/l1_reader.d.ts +5 -5
- package/dest/l1_reader.d.ts.map +1 -1
- package/dest/l1_reader.js +9 -7
- package/dest/l1_tx_utils/config.js +3 -3
- package/dest/l1_tx_utils/l1_fee_analyzer.d.ts +23 -4
- package/dest/l1_tx_utils/l1_fee_analyzer.d.ts.map +1 -1
- package/dest/l1_tx_utils/l1_fee_analyzer.js +65 -3
- package/dest/l1_tx_utils/l1_tx_utils.d.ts +9 -1
- package/dest/l1_tx_utils/l1_tx_utils.d.ts.map +1 -1
- package/dest/l1_tx_utils/l1_tx_utils.js +138 -57
- package/dest/l1_tx_utils/readonly_l1_tx_utils.d.ts +1 -1
- package/dest/l1_tx_utils/readonly_l1_tx_utils.d.ts.map +1 -1
- package/dest/l1_tx_utils/readonly_l1_tx_utils.js +10 -5
- package/dest/l1_tx_utils/tx_delayer.d.ts +5 -3
- package/dest/l1_tx_utils/tx_delayer.d.ts.map +1 -1
- package/dest/l1_tx_utils/tx_delayer.js +7 -5
- package/dest/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 -8
- package/dest/publisher_manager.d.ts.map +1 -1
- package/dest/publisher_manager.js +119 -8
- package/dest/queries.d.ts +13 -2
- package/dest/queries.d.ts.map +1 -1
- package/dest/queries.js +69 -4
- 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 +104 -3
- package/dest/test/eth_cheat_codes.d.ts +37 -6
- package/dest/test/eth_cheat_codes.d.ts.map +1 -1
- package/dest/test/eth_cheat_codes.js +89 -41
- package/dest/test/index.d.ts +2 -1
- package/dest/test/index.d.ts.map +1 -1
- package/dest/test/index.js +1 -0
- package/dest/test/rollup_cheat_codes.d.ts +60 -3
- package/dest/test/rollup_cheat_codes.d.ts.map +1 -1
- package/dest/test/rollup_cheat_codes.js +86 -7
- package/dest/test/start_anvil.d.ts +23 -3
- package/dest/test/start_anvil.d.ts.map +1 -1
- package/dest/test/start_anvil.js +182 -32
- package/dest/utils.d.ts +9 -2
- package/dest/utils.d.ts.map +1 -1
- package/dest/utils.js +48 -16
- package/package.json +6 -9
- package/src/client.ts +66 -2
- package/src/config.ts +83 -17
- package/src/contracts/chain_state_override.ts +200 -0
- package/src/contracts/empire_base.ts +0 -2
- package/src/contracts/fee_asset_price_oracle.ts +10 -5
- package/src/contracts/governance.ts +310 -10
- package/src/contracts/governance_proposer.ts +56 -13
- package/src/contracts/gse.ts +19 -2
- package/src/contracts/inbox.ts +13 -5
- package/src/contracts/index.ts +2 -2
- package/src/contracts/multicall.ts +247 -106
- package/src/contracts/outbox.ts +42 -8
- package/src/contracts/rollup.ts +447 -80
- package/src/contracts/{tally_slashing_proposer.ts → slashing_proposer.ts} +91 -30
- package/src/deploy_aztec_l1_contracts.ts +32 -18
- package/src/foundry_binary.ts +57 -0
- package/src/l1_artifacts.ts +12 -35
- package/src/l1_contract_addresses.ts +120 -94
- package/src/l1_reader.ts +17 -10
- package/src/l1_tx_utils/config.ts +3 -3
- package/src/l1_tx_utils/l1_fee_analyzer.ts +75 -3
- package/src/l1_tx_utils/l1_tx_utils.ts +122 -48
- package/src/l1_tx_utils/readonly_l1_tx_utils.ts +10 -5
- package/src/l1_tx_utils/tx_delayer.ts +16 -7
- package/src/l1_tx_utils/types.ts +32 -0
- package/src/publisher_manager.ts +143 -12
- package/src/queries.ts +76 -4
- package/src/test/blob_kzg_warmup.ts +65 -0
- package/src/test/chain_monitor.ts +148 -3
- package/src/test/eth_cheat_codes.ts +82 -45
- package/src/test/index.ts +1 -0
- package/src/test/rollup_cheat_codes.ts +115 -6
- package/src/test/start_anvil.ts +212 -32
- package/src/utils.ts +45 -18
- package/dest/contracts/empire_slashing_proposer.d.ts +0 -69
- package/dest/contracts/empire_slashing_proposer.d.ts.map +0 -1
- package/dest/contracts/empire_slashing_proposer.js +0 -216
- package/dest/contracts/tally_slashing_proposer.d.ts +0 -140
- package/dest/contracts/tally_slashing_proposer.d.ts.map +0 -1
- package/dest/contracts/tally_slashing_proposer.js +0 -320
- package/dest/generated/l1-contracts-defaults.d.ts +0 -30
- package/dest/generated/l1-contracts-defaults.d.ts.map +0 -1
- package/dest/generated/l1-contracts-defaults.js +0 -30
- package/src/contracts/empire_slashing_proposer.ts +0 -265
- package/src/generated/l1-contracts-defaults.ts +0 -32
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { pick } from '@aztec/foundation/collection';
|
|
2
2
|
import { createLogger } from '@aztec/foundation/log';
|
|
3
|
+
import { RunningPromise } from '@aztec/foundation/running-promise';
|
|
4
|
+
import { Multicall3 } from './contracts/multicall.js';
|
|
3
5
|
import { TxUtilsState } from './l1_tx_utils/index.js';
|
|
4
6
|
// Defines the order in which we prioritise publishers based on their state (first is better)
|
|
5
7
|
const sortOrder = [
|
|
@@ -25,15 +27,72 @@ export class PublisherManager {
|
|
|
25
27
|
publishers;
|
|
26
28
|
log;
|
|
27
29
|
config;
|
|
28
|
-
|
|
30
|
+
static FUNDING_CHECK_INTERVAL_MS = 2 * 60 * 1000;
|
|
31
|
+
funder;
|
|
32
|
+
fundingPromise;
|
|
33
|
+
started;
|
|
34
|
+
constructor(publishers, config, opts){
|
|
29
35
|
this.publishers = publishers;
|
|
30
|
-
this.
|
|
36
|
+
this.started = false;
|
|
37
|
+
this.funder = opts?.funder;
|
|
38
|
+
this.log = createLogger('publisher:manager', opts?.bindings);
|
|
31
39
|
this.log.info(`PublisherManager initialized with ${publishers.length} publishers.`);
|
|
32
40
|
this.publishers = publishers;
|
|
33
|
-
this.config = pick(config, 'publisherAllowInvalidStates');
|
|
41
|
+
this.config = pick(config, 'publisherAllowInvalidStates', 'publisherFundingThreshold', 'publisherFundingAmount');
|
|
42
|
+
const hasThreshold = this.config.publisherFundingThreshold !== undefined;
|
|
43
|
+
const hasAmount = this.config.publisherFundingAmount !== undefined;
|
|
44
|
+
if (hasThreshold !== hasAmount) {
|
|
45
|
+
this.log.warn(`Incomplete funding config: both publisherFundingThreshold and publisherFundingAmount must be set`);
|
|
46
|
+
}
|
|
47
|
+
if (this.funder) {
|
|
48
|
+
const funderAddress = this.funder.getSenderAddress();
|
|
49
|
+
if (publishers.some((p)=>p.getSenderAddress().equals(funderAddress))) {
|
|
50
|
+
this.log.error(`Funding account ${funderAddress} is also a publisher, disabling funding to avoid self-funding`);
|
|
51
|
+
this.funder = undefined;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
if (this.funder && hasThreshold && hasAmount) {
|
|
55
|
+
this.fundingPromise = new RunningPromise(()=>this.triggerFundingIfNeeded(), this.log, PublisherManager.FUNDING_CHECK_INTERVAL_MS);
|
|
56
|
+
}
|
|
34
57
|
}
|
|
35
|
-
/**
|
|
36
|
-
|
|
58
|
+
/**
|
|
59
|
+
* Clears any interrupted flag left by a previous {@link stop} so publishing works again after a restart,
|
|
60
|
+
* loads the state of all publishers and the funder, and starts periodic funding checks. Idempotent: a
|
|
61
|
+
* start while already started is a no-op, so it never re-runs `loadStateAndResumeMonitoring` (which
|
|
62
|
+
* would spawn a duplicate background monitor per pending nonce). Lifecycle calls are expected to be
|
|
63
|
+
* serialized by the caller.
|
|
64
|
+
*/ async start() {
|
|
65
|
+
if (this.started) {
|
|
66
|
+
this.log.debug('PublisherManager already started, ignoring start');
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
// Clear the interrupted flag set by a previous stop() so a restarted manager can publish again.
|
|
70
|
+
// On a first start this is a no-op (the flag is already clear).
|
|
71
|
+
this.publishers.forEach((pub)=>pub.restart());
|
|
72
|
+
this.funder?.restart();
|
|
73
|
+
await Promise.all([
|
|
74
|
+
...this.publishers.map((pub)=>pub.loadStateAndResumeMonitoring()),
|
|
75
|
+
this.funder?.loadStateAndResumeMonitoring()
|
|
76
|
+
]);
|
|
77
|
+
this.fundingPromise?.start();
|
|
78
|
+
// Marked started only once fully up, so a start that failed to load state can be retried.
|
|
79
|
+
this.started = true;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Stops the funding loop, interrupts all publishers so no further L1 txs are sent, and waits (bounded)
|
|
83
|
+
* for their in-flight tx monitor loops to wind down. Idempotent, and the manager may be restarted
|
|
84
|
+
* afterwards via {@link start}, which clears the interrupted flag.
|
|
85
|
+
*/ async stop() {
|
|
86
|
+
this.started = false;
|
|
87
|
+
await this.fundingPromise?.stop();
|
|
88
|
+
this.publishers.forEach((pub)=>pub.interrupt());
|
|
89
|
+
this.funder?.interrupt();
|
|
90
|
+
// Wait for in-flight tx monitor loops to observe the interrupt, so no L1 requests are still
|
|
91
|
+
// being issued after shutdown (e.g. against an anvil instance a test is about to tear down).
|
|
92
|
+
await Promise.all([
|
|
93
|
+
...this.publishers.map((pub)=>pub.waitMonitoringStopped()),
|
|
94
|
+
this.funder?.waitMonitoringStopped()
|
|
95
|
+
]);
|
|
37
96
|
}
|
|
38
97
|
// Finds and prioritises available publishers based on
|
|
39
98
|
// 1. Validity as per the provided filter function
|
|
@@ -67,8 +126,16 @@ export class PublisherManager {
|
|
|
67
126
|
publisher: pub
|
|
68
127
|
};
|
|
69
128
|
}));
|
|
129
|
+
// Discount unfunded publishers: a publisher with no ETH cannot send a tx, so it must never win
|
|
130
|
+
// selection regardless of how favourable its state or last-used time is. Fall back to the full
|
|
131
|
+
// set only if every candidate is unfunded, so behaviour is no worse than before.
|
|
132
|
+
let fundedPublishers = publishersWithBalance.filter((p)=>p.balance > 0n);
|
|
133
|
+
if (fundedPublishers.length === 0) {
|
|
134
|
+
this.log.warn(`All candidate publishers have zero balance; selecting from unfunded publishers.`);
|
|
135
|
+
fundedPublishers = publishersWithBalance;
|
|
136
|
+
}
|
|
70
137
|
// Sort based on state, then balance, then time since last use
|
|
71
|
-
const sortedPublishers =
|
|
138
|
+
const sortedPublishers = fundedPublishers.sort((a, b)=>{
|
|
72
139
|
const stateComparison = sortOrder.indexOf(a.publisher.state) - sortOrder.indexOf(b.publisher.state);
|
|
73
140
|
if (stateComparison !== 0) {
|
|
74
141
|
return stateComparison;
|
|
@@ -82,7 +149,51 @@ export class PublisherManager {
|
|
|
82
149
|
});
|
|
83
150
|
return sortedPublishers[0].publisher;
|
|
84
151
|
}
|
|
85
|
-
|
|
86
|
-
this
|
|
152
|
+
/** Check all publisher balances and fund those below threshold. */ async triggerFundingIfNeeded() {
|
|
153
|
+
const { funder, config } = this;
|
|
154
|
+
if (!funder || config.publisherFundingThreshold === undefined || config.publisherFundingAmount === undefined) {
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
157
|
+
const allBalances = await Promise.all(this.publishers.map(async (pub)=>({
|
|
158
|
+
balance: await pub.getSenderBalance(),
|
|
159
|
+
publisher: pub
|
|
160
|
+
})));
|
|
161
|
+
const lowBalance = allBalances.filter((p)=>p.balance < config.publisherFundingThreshold);
|
|
162
|
+
if (lowBalance.length === 0) {
|
|
163
|
+
return;
|
|
164
|
+
}
|
|
165
|
+
const fundingAmount = config.publisherFundingAmount;
|
|
166
|
+
const funderBalance = await funder.getSenderBalance();
|
|
167
|
+
if (funderBalance < 10n * fundingAmount) {
|
|
168
|
+
this.log.warn(`Funding account balance is low`, {
|
|
169
|
+
funderBalance,
|
|
170
|
+
threshold: 10n * fundingAmount
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
const affordableCount = Number(funderBalance / fundingAmount);
|
|
174
|
+
if (affordableCount === 0) {
|
|
175
|
+
this.log.error(`Funding account balance too low to fund any publisher`, {
|
|
176
|
+
funderBalance,
|
|
177
|
+
fundingAmount
|
|
178
|
+
});
|
|
179
|
+
return;
|
|
180
|
+
}
|
|
181
|
+
if (affordableCount < lowBalance.length) {
|
|
182
|
+
this.log.warn(`Funder can only afford ${affordableCount}/${lowBalance.length} publishers`, {
|
|
183
|
+
funderBalance,
|
|
184
|
+
fundingAmount
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
const toFund = lowBalance.slice(0, affordableCount).map((p)=>p.publisher);
|
|
188
|
+
await this.fundPublishers(toFund);
|
|
189
|
+
}
|
|
190
|
+
/** Fund publishers via a single Multicall3 aggregate3Value transaction. */ async fundPublishers(publishers) {
|
|
191
|
+
const fundingAmount = this.config.publisherFundingAmount;
|
|
192
|
+
const calls = publishers.map((pub)=>({
|
|
193
|
+
to: pub.getSenderAddress().toString(),
|
|
194
|
+
value: fundingAmount
|
|
195
|
+
}));
|
|
196
|
+
await Multicall3.forwardValue(calls, this.funder, this.log);
|
|
197
|
+
this.log.info(`Funded ${publishers.length} publishers`);
|
|
87
198
|
}
|
|
88
199
|
}
|
package/dest/queries.d.ts
CHANGED
|
@@ -1,6 +1,17 @@
|
|
|
1
1
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
2
|
+
import { type Block } from 'viem';
|
|
2
3
|
import { type L1ContractsConfig } from './config.js';
|
|
3
|
-
import type { ViemPublicClient } from './types.js';
|
|
4
|
+
import type { ViemClient, ViemPublicClient } from './types.js';
|
|
5
|
+
/**
|
|
6
|
+
* Returns the L1 finalized block, or `undefined` if the chain does not yet have one
|
|
7
|
+
* (common on freshly started devnets). Rethrows any other RPC error.
|
|
8
|
+
*/
|
|
9
|
+
export declare function getFinalizedL1Block(client: ViemClient): Promise<Block<bigint, false, 'finalized'> | undefined>;
|
|
10
|
+
/**
|
|
11
|
+
* Returns true if the error originates from an RPC call that failed because
|
|
12
|
+
* the "finalized" (or "safe") block tag is not yet available on the chain.
|
|
13
|
+
*/
|
|
14
|
+
export declare function isFinalizedBlockTagNotFoundError(err: unknown): boolean;
|
|
4
15
|
/** Reads the L1ContractsConfig from L1 contracts. */
|
|
5
16
|
export declare function getL1ContractsConfig(publicClient: ViemPublicClient, addresses: {
|
|
6
17
|
governanceAddress: EthAddress;
|
|
@@ -11,4 +22,4 @@ export declare function getL1ContractsConfig(publicClient: ViemPublicClient, add
|
|
|
11
22
|
rollupVersion: number;
|
|
12
23
|
genesisArchiveTreeRoot: `0x${string}`;
|
|
13
24
|
}>;
|
|
14
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
25
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicXVlcmllcy5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL3F1ZXJpZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLCtCQUErQixDQUFDO0FBRTNELE9BQU8sRUFBYSxLQUFLLEtBQUssRUFBRSxNQUFNLE1BQU0sQ0FBQztBQUU3QyxPQUFPLEVBQTRCLEtBQUssaUJBQWlCLEVBQUUsTUFBTSxhQUFhLENBQUM7QUFLL0UsT0FBTyxLQUFLLEVBQUUsVUFBVSxFQUFFLGdCQUFnQixFQUFFLE1BQU0sWUFBWSxDQUFDO0FBRS9EOzs7R0FHRztBQUNILHdCQUFzQixtQkFBbUIsQ0FBQyxNQUFNLEVBQUUsVUFBVSxHQUFHLE9BQU8sQ0FBQyxLQUFLLENBQUMsTUFBTSxFQUFFLEtBQUssRUFBRSxXQUFXLENBQUMsR0FBRyxTQUFTLENBQUMsQ0FTcEg7QUFtQkQ7OztHQUdHO0FBQ0gsd0JBQWdCLGdDQUFnQyxDQUFDLEdBQUcsRUFBRSxPQUFPLEdBQUcsT0FBTyxDQWtCdEU7QUFVRCxxREFBcUQ7QUFDckQsd0JBQXNCLG9CQUFvQixDQUN4QyxZQUFZLEVBQUUsZ0JBQWdCLEVBQzlCLFNBQVMsRUFBRTtJQUFFLGlCQUFpQixFQUFFLFVBQVUsQ0FBQztJQUFDLGFBQWEsQ0FBQyxFQUFFLFVBQVUsQ0FBQTtDQUFFLEdBQ3ZFLE9BQU8sQ0FDUixJQUFJLENBQUMsaUJBQWlCLEVBQUUsc0JBQXNCLENBQUMsR0FBRztJQUNoRCxZQUFZLEVBQUUsTUFBTSxDQUFDO0lBQ3JCLGFBQWEsRUFBRSxNQUFNLENBQUM7SUFDdEIsYUFBYSxFQUFFLE1BQU0sQ0FBQztJQUN0QixzQkFBc0IsRUFBRSxLQUFLLE1BQU0sRUFBRSxDQUFDO0NBQ3ZDLENBQ0YsQ0E2R0EifQ==
|
package/dest/queries.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../src/queries.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAE3D,OAAO,EAA4B,KAAK,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAK/E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../src/queries.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAE3D,OAAO,EAAa,KAAK,KAAK,EAAE,MAAM,MAAM,CAAC;AAE7C,OAAO,EAA4B,KAAK,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAK/E,OAAO,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAE/D;;;GAGG;AACH,wBAAsB,mBAAmB,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,EAAE,WAAW,CAAC,GAAG,SAAS,CAAC,CASpH;AAmBD;;;GAGG;AACH,wBAAgB,gCAAgC,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAkBtE;AAUD,qDAAqD;AACrD,wBAAsB,oBAAoB,CACxC,YAAY,EAAE,gBAAgB,EAC9B,SAAS,EAAE;IAAE,iBAAiB,EAAE,UAAU,CAAC;IAAC,aAAa,CAAC,EAAE,UAAU,CAAA;CAAE,GACvE,OAAO,CACR,IAAI,CAAC,iBAAiB,EAAE,sBAAsB,CAAC,GAAG;IAChD,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,sBAAsB,EAAE,KAAK,MAAM,EAAE,CAAC;CACvC,CACF,CA6GA"}
|
package/dest/queries.js
CHANGED
|
@@ -1,9 +1,68 @@
|
|
|
1
1
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
2
|
+
import { BaseError } from 'viem';
|
|
2
3
|
import { DefaultL1ContractsConfig } from './config.js';
|
|
3
4
|
import { ReadOnlyGovernanceContract } from './contracts/governance.js';
|
|
4
5
|
import { GovernanceProposerContract } from './contracts/governance_proposer.js';
|
|
5
6
|
import { InboxContract } from './contracts/inbox.js';
|
|
6
7
|
import { RollupContract } from './contracts/rollup.js';
|
|
8
|
+
/**
|
|
9
|
+
* Returns the L1 finalized block, or `undefined` if the chain does not yet have one
|
|
10
|
+
* (common on freshly started devnets). Rethrows any other RPC error.
|
|
11
|
+
*/ export async function getFinalizedL1Block(client) {
|
|
12
|
+
try {
|
|
13
|
+
return await client.getBlock({
|
|
14
|
+
blockTag: 'finalized',
|
|
15
|
+
includeTransactions: false
|
|
16
|
+
});
|
|
17
|
+
} catch (err) {
|
|
18
|
+
if (isFinalizedBlockTagNotFoundError(err)) {
|
|
19
|
+
return undefined;
|
|
20
|
+
}
|
|
21
|
+
throw err;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
// Error messages returned by popular Ethereum execution clients when
|
|
25
|
+
// eth_getBlockByNumber / eth_call is called with blockTag "finalized" or
|
|
26
|
+
// "safe" and no such block has been produced yet:
|
|
27
|
+
//
|
|
28
|
+
// geth "finalized block not found"
|
|
29
|
+
// "safe block not found"
|
|
30
|
+
// reth "block not found: finalized"
|
|
31
|
+
// "block not found: safe"
|
|
32
|
+
// nethermind "Unknown block error" (same for both tags)
|
|
33
|
+
// besu "Unknown block"
|
|
34
|
+
// erigon 'block "finalized" not available (head block: N)'
|
|
35
|
+
// 'block "safe" not available (head block: N)'
|
|
36
|
+
//
|
|
37
|
+
// A combined regex covers all five:
|
|
38
|
+
const FINALIZED_BLOCK_TAG_NOT_FOUND_MESSAGE_RE = /(finalized|safe) block not found|block not found: (finalized|safe)|unknown block|block "(finalized|safe)" not available/i;
|
|
39
|
+
/**
|
|
40
|
+
* Returns true if the error originates from an RPC call that failed because
|
|
41
|
+
* the "finalized" (or "safe") block tag is not yet available on the chain.
|
|
42
|
+
*/ export function isFinalizedBlockTagNotFoundError(err) {
|
|
43
|
+
if (!err) {
|
|
44
|
+
return false;
|
|
45
|
+
}
|
|
46
|
+
if (err instanceof BaseError) {
|
|
47
|
+
const hit = err.walk((e)=>matchesFinalizedBlockTagNotFound(e));
|
|
48
|
+
if (hit) {
|
|
49
|
+
return true;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
for(let cur = err, i = 0; cur && i < 10; cur = cur.cause, i++){
|
|
53
|
+
if (matchesFinalizedBlockTagNotFound(cur)) {
|
|
54
|
+
return true;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return false;
|
|
58
|
+
}
|
|
59
|
+
function matchesFinalizedBlockTagNotFound(e) {
|
|
60
|
+
if (!e) {
|
|
61
|
+
return false;
|
|
62
|
+
}
|
|
63
|
+
const text = `${e.details ?? ''} ${e.message ?? ''} ${e.shortMessage ?? ''}`;
|
|
64
|
+
return FINALIZED_BLOCK_TAG_NOT_FOUND_MESSAGE_RE.test(text);
|
|
65
|
+
}
|
|
7
66
|
/** Reads the L1ContractsConfig from L1 contracts. */ export async function getL1ContractsConfig(publicClient, addresses) {
|
|
8
67
|
const governance = new ReadOnlyGovernanceContract(addresses.governanceAddress.toString(), publicClient);
|
|
9
68
|
const governanceProposerAddress = await governance.getGovernanceProposerAddress();
|
|
@@ -33,8 +92,8 @@ import { RollupContract } from './contracts/rollup.js';
|
|
|
33
92
|
slasherProposer?.getRoundSize() ?? 0n,
|
|
34
93
|
slasherProposer?.getLifetimeInRounds() ?? 0n,
|
|
35
94
|
slasherProposer?.getExecutionDelayInRounds() ?? 0n,
|
|
36
|
-
slasherProposer?.
|
|
37
|
-
slasherProposer?.
|
|
95
|
+
slasherProposer?.getSlashOffsetInRounds() ?? 0n,
|
|
96
|
+
slasherProposer?.getSlashingAmounts() ?? [
|
|
38
97
|
0n,
|
|
39
98
|
0n,
|
|
40
99
|
0n
|
|
@@ -74,11 +133,17 @@ import { RollupContract } from './contracts/rollup.js';
|
|
|
74
133
|
rollupVersion: Number(rollupVersion),
|
|
75
134
|
genesisArchiveTreeRoot: genesisArchiveTreeRoot.toString(),
|
|
76
135
|
exitDelaySeconds: Number(exitDelay),
|
|
77
|
-
|
|
136
|
+
slasherEnabled: !!slasherProposer,
|
|
78
137
|
slashingOffsetInRounds: Number(slashingOffsetInRounds),
|
|
79
138
|
slashAmountSmall: slashingAmounts[0],
|
|
80
139
|
slashAmountMedium: slashingAmounts[1],
|
|
81
140
|
slashAmountLarge: slashingAmounts[2],
|
|
82
|
-
initialEthPerFeeAsset: DefaultL1ContractsConfig.initialEthPerFeeAsset
|
|
141
|
+
initialEthPerFeeAsset: DefaultL1ContractsConfig.initialEthPerFeeAsset,
|
|
142
|
+
// Not exposed by the rollup contract; fall back to defaults like the other non-on-chain fields above.
|
|
143
|
+
entryQueueBootstrapValidatorSetSize: DefaultL1ContractsConfig.entryQueueBootstrapValidatorSetSize,
|
|
144
|
+
entryQueueBootstrapFlushSize: DefaultL1ContractsConfig.entryQueueBootstrapFlushSize,
|
|
145
|
+
entryQueueFlushSizeMin: DefaultL1ContractsConfig.entryQueueFlushSizeMin,
|
|
146
|
+
entryQueueFlushSizeQuotient: DefaultL1ContractsConfig.entryQueueFlushSizeQuotient,
|
|
147
|
+
entryQueueMaxFlushSize: DefaultL1ContractsConfig.entryQueueMaxFlushSize
|
|
83
148
|
};
|
|
84
149
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Logger } from '@aztec/foundation/log';
|
|
2
|
+
import type { ExtendedViemWalletClient } from '../types.js';
|
|
3
|
+
/**
|
|
4
|
+
* Warms both KZG trusted setups in parallel for tests against a local anvil:
|
|
5
|
+
* - anvil's own setup, loaded lazily when it first validates a blob sidecar in `eth_sendRawTransaction`
|
|
6
|
+
* - our `@crate-crypto/node-eth-kzg` singleton (`getKzg()`, a ~2.2s synchronous precomp build)
|
|
7
|
+
*
|
|
8
|
+
* Without this, the first checkpoint publish pays both serially (~4.4s). The recipe does all RPC round
|
|
9
|
+
* trips up front, fires a single bare raw send carrying a fake (garbage) blob sidecar that anvil rejects
|
|
10
|
+
* after loading its trusted setup, yields once to flush the socket write, then synchronously builds our
|
|
11
|
+
* own precomp tables while anvil warms in parallel. The fake tx is rejected at admission, so it never
|
|
12
|
+
* enters the pool, mines no block, and burns no nonce — sending it from the passed client is harmless.
|
|
13
|
+
*
|
|
14
|
+
* Best-effort: any failure is debug-logged and swallowed, leaving lazy init as the fallback. Never throws.
|
|
15
|
+
*
|
|
16
|
+
* @param l1Client - The L1 client whose account sends the (rejected) warm-up blob tx.
|
|
17
|
+
*/
|
|
18
|
+
export declare function warmBlobKzg(l1Client: ExtendedViemWalletClient, logger?: Logger): Promise<void>;
|
|
19
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmxvYl9remdfd2FybXVwLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvdGVzdC9ibG9iX2t6Z193YXJtdXAudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsT0FBTyxLQUFLLEVBQUUsTUFBTSxFQUFFLE1BQU0sdUJBQXVCLENBQUM7QUFFcEQsT0FBTyxLQUFLLEVBQUUsd0JBQXdCLEVBQUUsTUFBTSxhQUFhLENBQUM7QUFFNUQ7Ozs7Ozs7Ozs7Ozs7O0dBY0c7QUFDSCx3QkFBc0IsV0FBVyxDQUFDLFFBQVEsRUFBRSx3QkFBd0IsRUFBRSxNQUFNLENBQUMsRUFBRSxNQUFNLEdBQUcsT0FBTyxDQUFDLElBQUksQ0FBQyxDQTRDcEcifQ==
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blob_kzg_warmup.d.ts","sourceRoot":"","sources":["../../src/test/blob_kzg_warmup.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAEpD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAE5D;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,WAAW,CAAC,QAAQ,EAAE,wBAAwB,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CA4CpG"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { getBytesPerBlob, getBytesPerCommitment, getKzg } from '@aztec/blob-lib';
|
|
2
|
+
/**
|
|
3
|
+
* Warms both KZG trusted setups in parallel for tests against a local anvil:
|
|
4
|
+
* - anvil's own setup, loaded lazily when it first validates a blob sidecar in `eth_sendRawTransaction`
|
|
5
|
+
* - our `@crate-crypto/node-eth-kzg` singleton (`getKzg()`, a ~2.2s synchronous precomp build)
|
|
6
|
+
*
|
|
7
|
+
* Without this, the first checkpoint publish pays both serially (~4.4s). The recipe does all RPC round
|
|
8
|
+
* trips up front, fires a single bare raw send carrying a fake (garbage) blob sidecar that anvil rejects
|
|
9
|
+
* after loading its trusted setup, yields once to flush the socket write, then synchronously builds our
|
|
10
|
+
* own precomp tables while anvil warms in parallel. The fake tx is rejected at admission, so it never
|
|
11
|
+
* enters the pool, mines no block, and burns no nonce — sending it from the passed client is harmless.
|
|
12
|
+
*
|
|
13
|
+
* Best-effort: any failure is debug-logged and swallowed, leaving lazy init as the fallback. Never throws.
|
|
14
|
+
*
|
|
15
|
+
* @param l1Client - The L1 client whose account sends the (rejected) warm-up blob tx.
|
|
16
|
+
*/ export async function warmBlobKzg(l1Client, logger) {
|
|
17
|
+
try {
|
|
18
|
+
// A pure-JS fake kzg: returns deterministic garbage of the correct lengths (commitment and proof are
|
|
19
|
+
// both 48 bytes). It makes viem build a syntactically valid sidecar without initializing any native
|
|
20
|
+
// module, so anvil loads its trusted setup to validate the (invalid) proof and then rejects the tx.
|
|
21
|
+
const fakeKzg = {
|
|
22
|
+
blobToKzgCommitment: ()=>{
|
|
23
|
+
const commitment = new Uint8Array(getBytesPerCommitment());
|
|
24
|
+
commitment.fill(0xab);
|
|
25
|
+
commitment[0] = 0xc0;
|
|
26
|
+
return commitment;
|
|
27
|
+
},
|
|
28
|
+
computeBlobKzgProof: ()=>{
|
|
29
|
+
const proof = new Uint8Array(getBytesPerCommitment());
|
|
30
|
+
proof.fill(0xcd);
|
|
31
|
+
proof[0] = 0xc0;
|
|
32
|
+
return proof;
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
// All RPC round trips (nonce, fees, gas) happen here, so only a single socket write remains to flush.
|
|
36
|
+
const prepared = await l1Client.prepareTransactionRequest({
|
|
37
|
+
blobs: [
|
|
38
|
+
new Uint8Array(getBytesPerBlob())
|
|
39
|
+
],
|
|
40
|
+
kzg: fakeKzg,
|
|
41
|
+
to: '0x0000000000000000000000000000000000000000',
|
|
42
|
+
value: 0n,
|
|
43
|
+
maxFeePerBlobGas: 1_000_000_000_000n
|
|
44
|
+
});
|
|
45
|
+
const serialized = await l1Client.signTransaction(prepared);
|
|
46
|
+
// Fire the raw send without awaiting and swallow the expected rejection.
|
|
47
|
+
const sent = l1Client.request({
|
|
48
|
+
method: 'eth_sendRawTransaction',
|
|
49
|
+
params: [
|
|
50
|
+
serialized
|
|
51
|
+
]
|
|
52
|
+
}).catch(()=>{});
|
|
53
|
+
// Flush the single socket write so anvil receives the tx and starts loading its trusted setup in its
|
|
54
|
+
// own process before we block the event loop below.
|
|
55
|
+
await new Promise((resolve)=>setImmediate(resolve));
|
|
56
|
+
// Synchronously build our precomp tables (~2.2s, event-loop-blocking); anvil warms in parallel.
|
|
57
|
+
getKzg();
|
|
58
|
+
await sent;
|
|
59
|
+
} catch (err) {
|
|
60
|
+
logger?.debug('Failed to warm blob KZG; falling back to lazy init', {
|
|
61
|
+
err
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
}
|
|
@@ -1,8 +1,22 @@
|
|
|
1
|
-
import type { RollupContract } from '@aztec/ethereum/contracts';
|
|
1
|
+
import type { ManaMinFeeComponents, RollupContract } from '@aztec/ethereum/contracts';
|
|
2
|
+
import { InboxContract } from '@aztec/ethereum/contracts';
|
|
2
3
|
import { CheckpointNumber, EpochNumber, SlotNumber } from '@aztec/foundation/branded-types';
|
|
3
4
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
4
5
|
import { DateProvider } from '@aztec/foundation/timer';
|
|
5
6
|
import { EventEmitter } from 'events';
|
|
7
|
+
/** L2 fee data reported by the chain monitor. */
|
|
8
|
+
export type L2FeeData = ManaMinFeeComponents & {
|
|
9
|
+
/** Total minimum fee per mana in Fee Juice (sum of sequencerCost + proverCost + congestionCost). */
|
|
10
|
+
minFeePerMana: bigint;
|
|
11
|
+
/** L1 base fee observed by the oracle. */
|
|
12
|
+
l1BaseFee: bigint;
|
|
13
|
+
/** L1 blob fee observed by the oracle. */
|
|
14
|
+
l1BlobFee: bigint;
|
|
15
|
+
/** ETH per fee asset exchange rate (1e12 precision). */
|
|
16
|
+
ethPerFeeAsset: bigint;
|
|
17
|
+
/** Mana target per checkpoint. */
|
|
18
|
+
manaTarget: bigint;
|
|
19
|
+
};
|
|
6
20
|
export type ChainMonitorEventMap = {
|
|
7
21
|
'l1-block': [{
|
|
8
22
|
l1BlockNumber: number;
|
|
@@ -34,6 +48,16 @@ export type ChainMonitorEventMap = {
|
|
|
34
48
|
l2SlotNumber: SlotNumber;
|
|
35
49
|
timestamp: bigint;
|
|
36
50
|
}];
|
|
51
|
+
'l2-fees': [L2FeeData];
|
|
52
|
+
};
|
|
53
|
+
/** Options for tuning what the {@link ChainMonitor} polls on each new L1 block. */
|
|
54
|
+
export type ChainMonitorOptions = {
|
|
55
|
+
/**
|
|
56
|
+
* Whether to fetch L2 fee/oracle data (5 extra rollup reads per new L1 block) and emit `l2-fees`.
|
|
57
|
+
* Defaults to `true`. Set to `false` for tests that only care about slot/checkpoint/proven state to
|
|
58
|
+
* avoid the extra round-trips.
|
|
59
|
+
*/
|
|
60
|
+
includeFeeData?: boolean;
|
|
37
61
|
};
|
|
38
62
|
/** Utility class that polls the chain on quick intervals and logs new L1 blocks, L2 blocks, and L2 proofs. */
|
|
39
63
|
export declare class ChainMonitor extends EventEmitter<ChainMonitorEventMap> {
|
|
@@ -42,6 +66,7 @@ export declare class ChainMonitor extends EventEmitter<ChainMonitorEventMap> {
|
|
|
42
66
|
private readonly logger;
|
|
43
67
|
private readonly intervalMs;
|
|
44
68
|
private readonly l1Client;
|
|
69
|
+
private readonly includeFeeData;
|
|
45
70
|
private inbox;
|
|
46
71
|
private handle;
|
|
47
72
|
private running;
|
|
@@ -61,15 +86,41 @@ export declare class ChainMonitor extends EventEmitter<ChainMonitorEventMap> {
|
|
|
61
86
|
l2EpochNumber: EpochNumber;
|
|
62
87
|
/** Current L2 slot number */
|
|
63
88
|
l2SlotNumber: SlotNumber;
|
|
64
|
-
|
|
89
|
+
/** Current L2 fee data (components of the minimum fee per mana). */
|
|
90
|
+
l2FeeData: L2FeeData;
|
|
91
|
+
constructor(rollup: RollupContract, dateProvider?: DateProvider, logger?: import("@aztec/foundation/log").Logger, intervalMs?: number, options?: ChainMonitorOptions);
|
|
65
92
|
start(): this;
|
|
66
93
|
stop(): Promise<void>;
|
|
67
|
-
|
|
94
|
+
protected getInbox(): Promise<InboxContract>;
|
|
68
95
|
protected safeRun(): void;
|
|
69
96
|
run(force?: boolean): Promise<this>;
|
|
70
97
|
waitUntilL2Slot(slot: SlotNumber): Promise<void>;
|
|
98
|
+
waitUntilNextL2Slot(): Promise<void>;
|
|
71
99
|
waitUntilL1Block(block: number | bigint): Promise<void>;
|
|
72
100
|
waitUntilL1Timestamp(timestamp: number | bigint): Promise<void>;
|
|
73
101
|
waitUntilCheckpoint(checkpointNumber: CheckpointNumber): Promise<void>;
|
|
102
|
+
/**
|
|
103
|
+
* Resolves with the first `checkpoint` event whose payload satisfies `match`. Unlike
|
|
104
|
+
* {@link waitUntilCheckpoint} (which waits for a target number), this lets callers wait for an
|
|
105
|
+
* arbitrary checkpoint property (e.g. one published in the first half of its slot). Rejects after
|
|
106
|
+
* `opts.timeout` ms if provided; otherwise waits indefinitely.
|
|
107
|
+
*
|
|
108
|
+
* By default this is purely event-driven and only resolves on the *next* matching checkpoint that
|
|
109
|
+
* arrives after the call. Set `checkCurrentCheckpoint` to also test the current checkpoint first (via
|
|
110
|
+
* a fresh {@link run} snapshot) and short-circuit if it already satisfies `match`. Use it only for
|
|
111
|
+
* latching state predicates (e.g. "checkpoint number has passed N"), where an already-satisfied
|
|
112
|
+
* result is valid and you want to avoid missing an advance that landed before the listener attached.
|
|
113
|
+
* Do NOT set it when the predicate depends on observing the checkpoint live (e.g. one published
|
|
114
|
+
* mid-slot that the caller then times against wall-clock), since it may return a checkpoint whose
|
|
115
|
+
* slot has already elapsed.
|
|
116
|
+
*/
|
|
117
|
+
waitForCheckpoint(match: (event: ChainMonitorEventMap['checkpoint'][0]) => boolean, opts?: {
|
|
118
|
+
timeout?: number;
|
|
119
|
+
checkCurrentCheckpoint?: boolean;
|
|
120
|
+
}): Promise<ChainMonitorEventMap['checkpoint'][0]>;
|
|
121
|
+
/** Resolves once the proven checkpoint number reaches `checkpointNumber`. */
|
|
122
|
+
waitUntilCheckpointProven(checkpointNumber: CheckpointNumber): Promise<void>;
|
|
123
|
+
private fetchFeeData;
|
|
124
|
+
private hasFeeDataChanged;
|
|
74
125
|
}
|
|
75
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
126
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2hhaW5fbW9uaXRvci5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3Rlc3QvY2hhaW5fbW9uaXRvci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssRUFBRSxvQkFBb0IsRUFBRSxjQUFjLEVBQUUsTUFBTSwyQkFBMkIsQ0FBQztBQUN0RixPQUFPLEVBQUUsYUFBYSxFQUFFLE1BQU0sMkJBQTJCLENBQUM7QUFDMUQsT0FBTyxFQUFFLGdCQUFnQixFQUFFLFdBQVcsRUFBRSxVQUFVLEVBQUUsTUFBTSxpQ0FBaUMsQ0FBQztBQUM1RixPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sK0JBQStCLENBQUM7QUFHM0QsT0FBTyxFQUFFLFlBQVksRUFBRSxNQUFNLHlCQUF5QixDQUFDO0FBRXZELE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSxRQUFRLENBQUM7QUFJdEMsaURBQWlEO0FBQ2pELE1BQU0sTUFBTSxTQUFTLEdBQUcsb0JBQW9CLEdBQUc7SUFDN0Msb0dBQW9HO0lBQ3BHLGFBQWEsRUFBRSxNQUFNLENBQUM7SUFDdEIsM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FJLEdBQUU7UUFBRSxPQUFPLENBQUMsRUFBRSxNQUFNLENBQUM7UUFBQyxzQkFBc0IsQ0FBQyxFQUFFLE9BQU8sQ0FBQTtLQUFPLEdBQ2hFLE9BQU8sQ0FBQyxvQkFBb0IsQ0FBQyxZQUFZLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQWdDaEQ7SUFFRCw2RUFBNkU7SUFDdEUseUJBQXlCLENBQUMsZ0JBQWdCLEVBQUUsZ0JBQWdCLEdBQUcsT0FBTyxDQUFDLElBQUksQ0FBQyxDQWFsRjtZQUVhLFlBQVk7SUFrQjFCLE9BQU8sQ0FBQyxpQkFBaUI7Q0FhMUIifQ==
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chain_monitor.d.ts","sourceRoot":"","sources":["../../src/test/chain_monitor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"chain_monitor.d.ts","sourceRoot":"","sources":["../../src/test/chain_monitor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AACtF,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC5F,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAG3D,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEvD,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAItC,iDAAiD;AACjD,MAAM,MAAM,SAAS,GAAG,oBAAoB,GAAG;IAC7C,oGAAoG;IACpG,aAAa,EAAE,MAAM,CAAC;IACtB,0CAA0C;IAC1C,SAAS,EAAE,MAAM,CAAC;IAClB,0CAA0C;IAC1C,SAAS,EAAE,MAAM,CAAC;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