@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.
Files changed (224) hide show
  1. package/dest/client.d.ts +25 -3
  2. package/dest/client.d.ts.map +1 -1
  3. package/dest/client.js +60 -4
  4. package/dest/config.d.ts +45 -73
  5. package/dest/config.d.ts.map +1 -1
  6. package/dest/config.js +114 -386
  7. package/dest/contracts/chain_state_override.d.ts +78 -0
  8. package/dest/contracts/chain_state_override.d.ts.map +1 -0
  9. package/dest/contracts/chain_state_override.js +137 -0
  10. package/dest/contracts/empire_base.d.ts +2 -1
  11. package/dest/contracts/empire_base.d.ts.map +1 -1
  12. package/dest/contracts/fee_asset_handler.d.ts +6 -5
  13. package/dest/contracts/fee_asset_handler.d.ts.map +1 -1
  14. package/dest/contracts/fee_asset_handler.js +11 -9
  15. package/dest/contracts/fee_asset_price_oracle.d.ts +105 -0
  16. package/dest/contracts/fee_asset_price_oracle.d.ts.map +1 -0
  17. package/dest/contracts/fee_asset_price_oracle.js +656 -0
  18. package/dest/contracts/governance.d.ts +110 -33
  19. package/dest/contracts/governance.d.ts.map +1 -1
  20. package/dest/contracts/governance.js +207 -16
  21. package/dest/contracts/governance_proposer.d.ts +34 -1
  22. package/dest/contracts/governance_proposer.d.ts.map +1 -1
  23. package/dest/contracts/governance_proposer.js +447 -10
  24. package/dest/contracts/gse.d.ts +4 -2
  25. package/dest/contracts/gse.d.ts.map +1 -1
  26. package/dest/contracts/gse.js +2 -2
  27. package/dest/contracts/inbox.d.ts +24 -3
  28. package/dest/contracts/inbox.d.ts.map +1 -1
  29. package/dest/contracts/inbox.js +42 -2
  30. package/dest/contracts/index.d.ts +6 -3
  31. package/dest/contracts/index.d.ts.map +1 -1
  32. package/dest/contracts/index.js +5 -2
  33. package/dest/contracts/log.d.ts +13 -0
  34. package/dest/contracts/log.d.ts.map +1 -0
  35. package/dest/contracts/log.js +1 -0
  36. package/dest/contracts/multicall.d.ts +130 -13
  37. package/dest/contracts/multicall.d.ts.map +1 -1
  38. package/dest/contracts/multicall.js +203 -93
  39. package/dest/contracts/outbox.d.ts +64 -0
  40. package/dest/contracts/outbox.d.ts.map +1 -0
  41. package/dest/contracts/outbox.js +113 -0
  42. package/dest/contracts/registry.d.ts +3 -1
  43. package/dest/contracts/registry.d.ts.map +1 -1
  44. package/dest/contracts/registry.js +30 -1
  45. package/dest/contracts/rollup.d.ts +5571 -102
  46. package/dest/contracts/rollup.d.ts.map +1 -1
  47. package/dest/contracts/rollup.js +1076 -192
  48. package/dest/contracts/{tally_slashing_proposer.d.ts → slashing_proposer.d.ts} +5 -5
  49. package/dest/contracts/slashing_proposer.d.ts.map +1 -0
  50. package/dest/contracts/{tally_slashing_proposer.js → slashing_proposer.js} +18 -13
  51. package/dest/deploy_aztec_l1_contracts.d.ts +267 -0
  52. package/dest/deploy_aztec_l1_contracts.d.ts.map +1 -0
  53. package/dest/deploy_aztec_l1_contracts.js +424 -0
  54. package/dest/deploy_l1_contract.d.ts +68 -0
  55. package/dest/deploy_l1_contract.d.ts.map +1 -0
  56. package/dest/deploy_l1_contract.js +312 -0
  57. package/dest/forwarder_proxy.d.ts +32 -0
  58. package/dest/forwarder_proxy.d.ts.map +1 -0
  59. package/dest/forwarder_proxy.js +93 -0
  60. package/dest/foundry_binary.d.ts +13 -0
  61. package/dest/foundry_binary.d.ts.map +1 -0
  62. package/dest/foundry_binary.js +52 -0
  63. package/dest/l1_artifacts.d.ts +19674 -16606
  64. package/dest/l1_artifacts.d.ts.map +1 -1
  65. package/dest/l1_artifacts.js +9 -24
  66. package/dest/l1_contract_addresses.d.ts +61 -65
  67. package/dest/l1_contract_addresses.d.ts.map +1 -1
  68. package/dest/l1_contract_addresses.js +99 -80
  69. package/dest/l1_reader.d.ts +7 -5
  70. package/dest/l1_reader.d.ts.map +1 -1
  71. package/dest/l1_reader.js +15 -7
  72. package/dest/l1_tx_utils/config.d.ts +9 -3
  73. package/dest/l1_tx_utils/config.d.ts.map +1 -1
  74. package/dest/l1_tx_utils/config.js +34 -7
  75. package/dest/l1_tx_utils/constants.d.ts +8 -2
  76. package/dest/l1_tx_utils/constants.d.ts.map +1 -1
  77. package/dest/l1_tx_utils/constants.js +27 -2
  78. package/dest/l1_tx_utils/factory.d.ts +18 -10
  79. package/dest/l1_tx_utils/factory.d.ts.map +1 -1
  80. package/dest/l1_tx_utils/factory.js +17 -7
  81. package/dest/l1_tx_utils/fee-strategies/index.d.ts +10 -0
  82. package/dest/l1_tx_utils/fee-strategies/index.d.ts.map +1 -0
  83. package/dest/l1_tx_utils/fee-strategies/index.js +12 -0
  84. package/dest/l1_tx_utils/fee-strategies/p75_competitive.d.ts +8 -0
  85. package/dest/l1_tx_utils/fee-strategies/p75_competitive.d.ts.map +1 -0
  86. package/dest/l1_tx_utils/fee-strategies/p75_competitive.js +129 -0
  87. package/dest/l1_tx_utils/fee-strategies/p75_competitive_blob_txs_only.d.ts +23 -0
  88. package/dest/l1_tx_utils/fee-strategies/p75_competitive_blob_txs_only.d.ts.map +1 -0
  89. package/dest/l1_tx_utils/fee-strategies/p75_competitive_blob_txs_only.js +191 -0
  90. package/dest/l1_tx_utils/fee-strategies/types.d.ts +51 -0
  91. package/dest/l1_tx_utils/fee-strategies/types.d.ts.map +1 -0
  92. package/dest/l1_tx_utils/fee-strategies/types.js +3 -0
  93. package/dest/l1_tx_utils/forwarder_l1_tx_utils.d.ts +41 -0
  94. package/dest/l1_tx_utils/forwarder_l1_tx_utils.d.ts.map +1 -0
  95. package/dest/l1_tx_utils/forwarder_l1_tx_utils.js +42 -0
  96. package/dest/l1_tx_utils/index-blobs.d.ts +3 -0
  97. package/dest/l1_tx_utils/index-blobs.d.ts.map +1 -0
  98. package/dest/l1_tx_utils/index-blobs.js +2 -0
  99. package/dest/l1_tx_utils/index.d.ts +4 -1
  100. package/dest/l1_tx_utils/index.d.ts.map +1 -1
  101. package/dest/l1_tx_utils/index.js +3 -0
  102. package/dest/l1_tx_utils/interfaces.d.ts +2 -2
  103. package/dest/l1_tx_utils/interfaces.d.ts.map +1 -1
  104. package/dest/l1_tx_utils/l1_fee_analyzer.d.ts +252 -0
  105. package/dest/l1_tx_utils/l1_fee_analyzer.d.ts.map +1 -0
  106. package/dest/l1_tx_utils/l1_fee_analyzer.js +568 -0
  107. package/dest/l1_tx_utils/l1_tx_utils.d.ts +26 -7
  108. package/dest/l1_tx_utils/l1_tx_utils.d.ts.map +1 -1
  109. package/dest/l1_tx_utils/l1_tx_utils.js +202 -92
  110. package/dest/l1_tx_utils/readonly_l1_tx_utils.d.ts +4 -15
  111. package/dest/l1_tx_utils/readonly_l1_tx_utils.d.ts.map +1 -1
  112. package/dest/l1_tx_utils/readonly_l1_tx_utils.js +63 -165
  113. package/dest/l1_tx_utils/tx_delayer.d.ts +58 -0
  114. package/dest/l1_tx_utils/tx_delayer.d.ts.map +1 -0
  115. package/dest/{test → l1_tx_utils}/tx_delayer.js +70 -39
  116. package/dest/l1_tx_utils/types.d.ts +27 -1
  117. package/dest/l1_tx_utils/types.d.ts.map +1 -1
  118. package/dest/l1_tx_utils/types.js +10 -0
  119. package/dest/publisher_manager.d.ts +34 -7
  120. package/dest/publisher_manager.d.ts.map +1 -1
  121. package/dest/publisher_manager.js +119 -8
  122. package/dest/queries.d.ts +14 -3
  123. package/dest/queries.d.ts.map +1 -1
  124. package/dest/queries.js +80 -7
  125. package/dest/test/blob_kzg_warmup.d.ts +19 -0
  126. package/dest/test/blob_kzg_warmup.d.ts.map +1 -0
  127. package/dest/test/blob_kzg_warmup.js +64 -0
  128. package/dest/test/chain_monitor.d.ts +55 -4
  129. package/dest/test/chain_monitor.d.ts.map +1 -1
  130. package/dest/test/chain_monitor.js +105 -5
  131. package/dest/test/eth_cheat_codes.d.ts +49 -6
  132. package/dest/test/eth_cheat_codes.d.ts.map +1 -1
  133. package/dest/test/eth_cheat_codes.js +93 -43
  134. package/dest/test/index.d.ts +2 -3
  135. package/dest/test/index.d.ts.map +1 -1
  136. package/dest/test/index.js +1 -2
  137. package/dest/test/rollup_cheat_codes.d.ts +64 -4
  138. package/dest/test/rollup_cheat_codes.d.ts.map +1 -1
  139. package/dest/test/rollup_cheat_codes.js +109 -8
  140. package/dest/test/start_anvil.d.ts +24 -2
  141. package/dest/test/start_anvil.d.ts.map +1 -1
  142. package/dest/test/start_anvil.js +182 -32
  143. package/dest/test/upgrade_utils.js +2 -2
  144. package/dest/types.d.ts +57 -2
  145. package/dest/types.d.ts.map +1 -1
  146. package/dest/utils.d.ts +24 -4
  147. package/dest/utils.d.ts.map +1 -1
  148. package/dest/utils.js +112 -16
  149. package/package.json +31 -15
  150. package/src/client.ts +66 -2
  151. package/src/config.ts +153 -469
  152. package/src/contracts/README.md +157 -0
  153. package/src/contracts/chain_state_override.ts +200 -0
  154. package/src/contracts/empire_base.ts +1 -1
  155. package/src/contracts/fee_asset_handler.ts +10 -7
  156. package/src/contracts/fee_asset_price_oracle.ts +285 -0
  157. package/src/contracts/governance.ts +279 -13
  158. package/src/contracts/governance_proposer.ts +64 -3
  159. package/src/contracts/gse.ts +7 -2
  160. package/src/contracts/inbox.ts +64 -4
  161. package/src/contracts/index.ts +5 -2
  162. package/src/contracts/log.ts +13 -0
  163. package/src/contracts/multicall.ts +247 -103
  164. package/src/contracts/outbox.ts +132 -0
  165. package/src/contracts/registry.ts +31 -1
  166. package/src/contracts/rollup.ts +789 -154
  167. package/src/contracts/{tally_slashing_proposer.ts → slashing_proposer.ts} +18 -14
  168. package/src/deploy_aztec_l1_contracts.ts +664 -0
  169. package/src/deploy_l1_contract.ts +362 -0
  170. package/src/forwarder_proxy.ts +108 -0
  171. package/src/foundry_binary.ts +57 -0
  172. package/src/l1_artifacts.ts +12 -35
  173. package/src/l1_contract_addresses.ts +120 -92
  174. package/src/l1_reader.ts +25 -10
  175. package/src/l1_tx_utils/config.ts +47 -9
  176. package/src/l1_tx_utils/constants.ts +13 -2
  177. package/src/l1_tx_utils/factory.ts +31 -31
  178. package/src/l1_tx_utils/fee-strategies/index.ts +22 -0
  179. package/src/l1_tx_utils/fee-strategies/p75_competitive.ts +163 -0
  180. package/src/l1_tx_utils/fee-strategies/p75_competitive_blob_txs_only.ts +245 -0
  181. package/src/l1_tx_utils/fee-strategies/types.ts +56 -0
  182. package/src/l1_tx_utils/forwarder_l1_tx_utils.ts +108 -0
  183. package/src/l1_tx_utils/index-blobs.ts +2 -0
  184. package/src/l1_tx_utils/index.ts +3 -0
  185. package/src/l1_tx_utils/interfaces.ts +1 -1
  186. package/src/l1_tx_utils/l1_fee_analyzer.ts +875 -0
  187. package/src/l1_tx_utils/l1_tx_utils.ts +194 -72
  188. package/src/l1_tx_utils/readonly_l1_tx_utils.ts +77 -211
  189. package/src/{test → l1_tx_utils}/tx_delayer.ts +97 -58
  190. package/src/l1_tx_utils/types.ts +32 -0
  191. package/src/publisher_manager.ts +145 -12
  192. package/src/queries.ts +87 -7
  193. package/src/test/blob_kzg_warmup.ts +65 -0
  194. package/src/test/chain_monitor.ts +150 -4
  195. package/src/test/eth_cheat_codes.ts +84 -47
  196. package/src/test/index.ts +1 -2
  197. package/src/test/rollup_cheat_codes.ts +136 -8
  198. package/src/test/start_anvil.ts +213 -31
  199. package/src/test/upgrade_utils.ts +2 -2
  200. package/src/types.ts +62 -0
  201. package/src/utils.ts +128 -19
  202. package/dest/contracts/empire_slashing_proposer.d.ts +0 -66
  203. package/dest/contracts/empire_slashing_proposer.d.ts.map +0 -1
  204. package/dest/contracts/empire_slashing_proposer.js +0 -200
  205. package/dest/contracts/tally_slashing_proposer.d.ts.map +0 -1
  206. package/dest/deploy_l1_contracts.d.ts +0 -673
  207. package/dest/deploy_l1_contracts.d.ts.map +0 -1
  208. package/dest/deploy_l1_contracts.js +0 -1491
  209. package/dest/index.d.ts +0 -18
  210. package/dest/index.d.ts.map +0 -1
  211. package/dest/index.js +0 -17
  212. package/dest/l1_tx_utils/l1_tx_utils_with_blobs.d.ts +0 -26
  213. package/dest/l1_tx_utils/l1_tx_utils_with_blobs.d.ts.map +0 -1
  214. package/dest/l1_tx_utils/l1_tx_utils_with_blobs.js +0 -26
  215. package/dest/test/delayed_tx_utils.d.ts +0 -13
  216. package/dest/test/delayed_tx_utils.d.ts.map +0 -1
  217. package/dest/test/delayed_tx_utils.js +0 -28
  218. package/dest/test/tx_delayer.d.ts +0 -36
  219. package/dest/test/tx_delayer.d.ts.map +0 -1
  220. package/src/contracts/empire_slashing_proposer.ts +0 -265
  221. package/src/deploy_l1_contracts.ts +0 -1869
  222. package/src/index.ts +0 -17
  223. package/src/l1_tx_utils/l1_tx_utils_with_blobs.ts +0 -77
  224. package/src/test/delayed_tx_utils.ts +0 -52
@@ -1,9 +1,42 @@
1
1
  import { createLogger } from '@aztec/foundation/log';
2
2
  import { makeBackoff, retry } from '@aztec/foundation/retry';
3
- import { fileURLToPath } from '@aztec/foundation/url';
3
+ import type { TestDateProvider } from '@aztec/foundation/timer';
4
4
 
5
- import { type Anvil, createAnvil } from '@viem/anvil';
6
- import { dirname, resolve } from 'path';
5
+ import { type ChildProcess, spawn } from 'child_process';
6
+
7
+ import { resolveFoundryBinary } from '../foundry_binary.js';
8
+
9
+ /** Minimal interface matching the @viem/anvil Anvil shape used by callers. */
10
+ export interface Anvil {
11
+ readonly port: number;
12
+ readonly host: string;
13
+ readonly status: 'listening' | 'idle';
14
+ stop(): Promise<void>;
15
+ }
16
+
17
+ // Watchdog wrapper: instead of spawning anvil directly, we spawn a small bash supervisor that runs
18
+ // anvil as a background child and polls its own parent (this node process). If the parent dies for
19
+ // ANY reason — including SIGKILL / crash / OOM, where node's own exit handlers never run — the poll
20
+ // loop ends and the EXIT trap reaps anvil. The script is inlined (rather than shipped as a `.sh`) so
21
+ // it works from the published npm tarball too, and the resolved anvil binary is passed via
22
+ // `$ANVIL_BIN` so it works without `anvil` on PATH.
23
+ //
24
+ // `$@` is the anvil argv; `bash -c <script> bash <...args>` puts the args in `$@` and `$0` = 'bash'.
25
+ //
26
+ // The EXIT trap reaps anvil; INT/TERM just `exit` (which fires the EXIT trap) so a signal terminates
27
+ // the supervisor promptly instead of being swallowed — a trapped TERM does NOT terminate the shell,
28
+ // so trapping the kill directly on TERM would leave the poll loop running and the caller's teardown
29
+ // hanging until its SIGKILL escalation. `sleep & wait` makes the poll interruptible, so INT/TERM are
30
+ // handled immediately rather than after the current `sleep` returns.
31
+ const ANVIL_WATCHDOG = `
32
+ set -u
33
+ parent=$PPID
34
+ "$ANVIL_BIN" "$@" &
35
+ anvil_pid=$!
36
+ trap 'kill "$anvil_pid" 2>/dev/null' EXIT
37
+ trap 'exit 0' INT TERM
38
+ while kill -0 "$parent" 2>/dev/null; do sleep 1 & wait $!; done
39
+ `;
7
40
 
8
41
  /**
9
42
  * Ensures there's a running Anvil instance and returns the RPC URL.
@@ -16,54 +49,203 @@ export async function startAnvil(
16
49
  captureMethodCalls?: boolean;
17
50
  accounts?: number;
18
51
  chainId?: number;
52
+ /** The hardfork to use (e.g. 'cancun', 'latest'). */
53
+ hardfork?: string;
54
+ /**
55
+ * Number of slots per epoch used by anvil to compute the 'finalized' and 'safe' block tags.
56
+ * Anvil reports `finalized = latest - slotsInAnEpoch * 2`.
57
+ * Defaults to 1 so the finalized block advances immediately, making tests that check
58
+ * L1-finality-based logic work without needing hundreds of mined blocks.
59
+ */
60
+ slotsInAnEpoch?: number;
61
+ /**
62
+ * If provided, the date provider will be synced to anvil's block time on every mined block.
63
+ * This keeps the dateProvider in lockstep with anvil's chain time, avoiding drift between
64
+ * the wall clock and the L1 chain when computing L1 slot timestamps.
65
+ */
66
+ dateProvider?: TestDateProvider;
19
67
  } = {},
20
68
  ): Promise<{ anvil: Anvil; methodCalls?: string[]; rpcUrl: string; stop: () => Promise<void> }> {
21
- const anvilBinary = resolve(dirname(fileURLToPath(import.meta.url)), '../../', 'scripts/anvil_kill_wrapper.sh');
69
+ const anvilBinary = resolveFoundryBinary('anvil');
22
70
  const logger = opts.log ? createLogger('ethereum:anvil') : undefined;
23
71
  const methodCalls = opts.captureMethodCalls ? ([] as string[]) : undefined;
24
72
 
25
- let port: number | undefined;
73
+ let detectedPort: number | undefined;
26
74
 
27
- // Start anvil.
28
- // We go via a wrapper script to ensure if the parent dies, anvil dies.
29
75
  const anvil = await retry(
30
76
  async () => {
31
- const anvil = createAnvil({
32
- anvilBinary,
33
- host: '127.0.0.1',
34
- port: opts.port ?? 8545,
35
- blockTime: opts.l1BlockTime,
36
- stopTimeout: 1000,
37
- accounts: opts.accounts ?? 20,
38
- gasLimit: 45_000_000n,
39
- chainId: opts.chainId ?? 31337,
77
+ // `--port 0` lets anvil bind an OS-assigned ephemeral port; the actual port is read back from
78
+ // its "Listening on host:port" stdout below, so independent suites can spawn their own anvil
79
+ // in parallel without fighting over a fixed port.
80
+ const port = opts.port ?? (process.env.ANVIL_PORT ? parseInt(process.env.ANVIL_PORT) : 8545);
81
+ const args: string[] = [
82
+ '--host',
83
+ '127.0.0.1',
84
+ '--port',
85
+ String(port),
86
+ '--accounts',
87
+ String(opts.accounts ?? 20),
88
+ '--gas-limit',
89
+ String(45_000_000),
90
+ '--chain-id',
91
+ String(opts.chainId ?? 31337),
92
+ ];
93
+ if (opts.l1BlockTime !== undefined) {
94
+ args.push('--block-time', String(opts.l1BlockTime));
95
+ }
96
+ if (opts.hardfork !== undefined) {
97
+ args.push('--hardfork', opts.hardfork);
98
+ }
99
+ args.push('--slots-in-an-epoch', String(opts.slotsInAnEpoch ?? 1));
100
+
101
+ // Spawn the watchdog (see ANVIL_WATCHDOG). It launches anvil with these args and reaps it if we
102
+ // die; `$0` is 'bash' and `$@` is the anvil argv.
103
+ const child = spawn('bash', ['-c', ANVIL_WATCHDOG, 'bash', ...args], {
104
+ stdio: ['ignore', 'pipe', 'pipe'],
105
+ env: { ...process.env, ANVIL_BIN: anvilBinary, RAYON_NUM_THREADS: '1' },
40
106
  });
41
107
 
42
- // Listen to the anvil output to get the port.
43
- const removeHandler = anvil.on('message', (message: string) => {
44
- logger?.debug(message.trim());
108
+ // Wait for "Listening on" or an early exit.
109
+ await new Promise<void>((resolve, reject) => {
110
+ let stderr = '';
111
+
112
+ const onStdout = (data: Buffer) => {
113
+ const text = data.toString();
114
+ logger?.debug(text.trim());
115
+ methodCalls?.push(...(text.match(/eth_[^\s]+/g) || []));
45
116
 
46
- methodCalls?.push(...(message.match(/eth_[^\s]+/g) || []));
47
- if (port === undefined && message.includes('Listening on')) {
48
- port = parseInt(message.match(/Listening on ([^:]+):(\d+)/)![2]);
49
- }
117
+ if (detectedPort === undefined && text.includes('Listening on')) {
118
+ const match = text.match(/Listening on ([^:]+):(\d+)/);
119
+ if (match) {
120
+ detectedPort = parseInt(match[2]);
121
+ }
122
+ }
123
+ if (detectedPort !== undefined) {
124
+ child.stdout?.removeListener('data', onStdout);
125
+ child.stderr?.removeListener('data', onStderr);
126
+ child.removeListener('close', onClose);
127
+ resolve();
128
+ }
129
+ };
130
+
131
+ const onStderr = (data: Buffer) => {
132
+ stderr += data.toString();
133
+ logger?.debug(data.toString().trim());
134
+ };
135
+
136
+ const onClose = (code: number | null) => {
137
+ child.stdout?.removeListener('data', onStdout);
138
+ child.stderr?.removeListener('data', onStderr);
139
+ reject(new Error(`Anvil exited with code ${code} before listening. stderr: ${stderr}`));
140
+ };
141
+
142
+ child.stdout?.on('data', onStdout);
143
+ child.stderr?.on('data', onStderr);
144
+ child.once('close', onClose);
50
145
  });
51
- await anvil.start();
52
- if (!logger && !opts.captureMethodCalls) {
53
- removeHandler();
146
+
147
+ // Continue piping for logging, method-call capture, and/or dateProvider sync after startup.
148
+ if (logger || opts.captureMethodCalls || opts.dateProvider) {
149
+ child.stdout?.on('data', (data: Buffer) => {
150
+ const text = data.toString();
151
+ logger?.debug(text.trim());
152
+ methodCalls?.push(...(text.match(/eth_[^\s]+/g) || []));
153
+ if (opts.dateProvider) {
154
+ syncDateProviderFromAnvilOutput(text, opts.dateProvider);
155
+ }
156
+ });
157
+ child.stderr?.on('data', (data: Buffer) => {
158
+ logger?.debug(data.toString().trim());
159
+ });
160
+ } else {
161
+ // Consume streams so the child process doesn't block on full pipe buffers.
162
+ child.stdout?.resume();
163
+ child.stderr?.resume();
54
164
  }
55
165
 
56
- return anvil;
166
+ return child;
57
167
  },
58
168
  'Start anvil',
59
169
  makeBackoff([5, 5, 5]),
60
170
  );
61
171
 
62
- if (!port) {
172
+ if (!detectedPort) {
63
173
  throw new Error('Failed to start anvil');
64
174
  }
65
175
 
66
- // Monkeypatch the anvil instance to include the actually assigned port
67
- // Object.defineProperty(anvil, 'port', { value: port, writable: false });
68
- return { anvil, methodCalls, stop: () => anvil.stop(), rpcUrl: `http://127.0.0.1:${port}` };
176
+ const port = detectedPort;
177
+ let status: 'listening' | 'idle' = 'listening';
178
+
179
+ anvil.once('close', () => {
180
+ status = 'idle';
181
+ });
182
+
183
+ const stop = async () => {
184
+ if (status === 'idle') {
185
+ return;
186
+ }
187
+ await killChild(anvil);
188
+ };
189
+
190
+ const anvilObj: Anvil = {
191
+ port,
192
+ host: '127.0.0.1',
193
+ get status() {
194
+ return status;
195
+ },
196
+ stop,
197
+ };
198
+
199
+ return { anvil: anvilObj, methodCalls, stop, rpcUrl: `http://127.0.0.1:${port}` };
200
+ }
201
+
202
+ /** Extracts block time from anvil stdout and syncs the dateProvider. */
203
+ function syncDateProviderFromAnvilOutput(text: string, dateProvider: TestDateProvider): void {
204
+ // Anvil logs mined blocks as:
205
+ // Block Time: "Fri, 20 Mar 2026 02:10:46 +0000"
206
+ const match = text.match(/Block Time:\s*"([^"]+)"/);
207
+ if (match) {
208
+ const blockTimeMs = new Date(match[1]).getTime();
209
+ if (!isNaN(blockTimeMs)) {
210
+ dateProvider.setTime(blockTimeMs);
211
+ }
212
+ }
213
+ }
214
+
215
+ /**
216
+ * Send SIGTERM to the watchdog, wait up to 5 s, then SIGKILL. The watchdog's trap forwards the
217
+ * signal to anvil, so terminating it tears down anvil too. All timers are always cleared.
218
+ */
219
+ function killChild(child: ChildProcess): Promise<void> {
220
+ return new Promise<void>(resolve => {
221
+ if (child.exitCode !== null || child.killed) {
222
+ child.stdout?.destroy();
223
+ child.stderr?.destroy();
224
+ resolve();
225
+ return;
226
+ }
227
+
228
+ let killTimer: NodeJS.Timeout | undefined;
229
+
230
+ const onClose = () => {
231
+ if (killTimer !== undefined) {
232
+ clearTimeout(killTimer);
233
+ }
234
+ // Destroy stdio streams so their PipeWrap handles don't keep the event loop alive.
235
+ child.stdout?.destroy();
236
+ child.stderr?.destroy();
237
+ resolve();
238
+ };
239
+
240
+ child.once('close', onClose);
241
+ child.kill('SIGTERM');
242
+
243
+ killTimer = setTimeout(() => {
244
+ killTimer = undefined;
245
+ child.kill('SIGKILL');
246
+ }, 5000);
247
+
248
+ // Ensure the timer does not prevent Node from exiting.
249
+ killTimer.unref();
250
+ });
69
251
  }
@@ -7,7 +7,7 @@ import { type GetContractReturnType, type PrivateKeyAccount, getContract } from
7
7
 
8
8
  import { extractProposalIdFromLogs } from '../contracts/governance.js';
9
9
  import type { L1ContractAddresses } from '../l1_contract_addresses.js';
10
- import { createL1TxUtilsFromViemWallet } from '../l1_tx_utils/index.js';
10
+ import { createL1TxUtils } from '../l1_tx_utils/index.js';
11
11
  import type { ExtendedViemWalletClient, ViemPublicClient } from '../types.js';
12
12
  import { EthCheatCodes } from './eth_cheat_codes.js';
13
13
 
@@ -22,7 +22,7 @@ export async function executeGovernanceProposal(
22
22
  ) {
23
23
  const proposal = await governance.read.getProposal([proposalId]);
24
24
 
25
- const l1TxUtils = createL1TxUtilsFromViemWallet(l1Client);
25
+ const l1TxUtils = createL1TxUtils(l1Client);
26
26
 
27
27
  const waitL1Block = async () => {
28
28
  await l1TxUtils.sendAndMonitorTransaction({
package/src/types.ts CHANGED
@@ -5,6 +5,7 @@ import type {
5
5
  Client,
6
6
  FallbackTransport,
7
7
  GetContractReturnType,
8
+ Hex,
8
9
  HttpTransport,
9
10
  PublicActions,
10
11
  PublicClient,
@@ -16,6 +17,67 @@ import type {
16
17
  /** Type for a viem public client */
17
18
  export type ViemPublicClient = PublicClient<FallbackTransport<HttpTransport[]>, Chain>;
18
19
 
20
+ export type PublicRpcDebugSchema = [
21
+ {
22
+ Method: 'debug_traceTransaction';
23
+ Parameters: [txHash: `0x${string}`, options: { tracer: 'callTracer' }];
24
+ ReturnType: DebugCallTrace;
25
+ },
26
+ {
27
+ Method: 'trace_transaction';
28
+ Parameters: [txHash: `0x${string}`];
29
+ ReturnType: TraceTransactionResponse[];
30
+ },
31
+ ];
32
+
33
+ /** Return type for a debug_traceTransaction call */
34
+ export type DebugCallTrace = {
35
+ from: Hex;
36
+ to?: Hex;
37
+ type: string;
38
+ input?: Hex;
39
+ output?: Hex;
40
+ gas?: Hex;
41
+ gasUsed?: Hex;
42
+ value?: Hex;
43
+ error?: string;
44
+ calls?: DebugCallTrace[];
45
+ };
46
+
47
+ /** Action object for a trace_transaction call */
48
+ export type TraceAction = {
49
+ from: Hex;
50
+ to?: Hex;
51
+ callType: string;
52
+ gas?: Hex;
53
+ input?: Hex;
54
+ value?: Hex;
55
+ };
56
+
57
+ /** Result object for a trace_transaction call */
58
+ export type TraceResult = {
59
+ gasUsed?: Hex;
60
+ output?: Hex;
61
+ };
62
+
63
+ /** Return type for a single trace in trace_transaction response */
64
+ export type TraceTransactionResponse = {
65
+ action: TraceAction;
66
+ result?: TraceResult;
67
+ error?: string;
68
+ subtraces: number;
69
+ traceAddress: number[];
70
+ type: string;
71
+ };
72
+
73
+ /** Type for a viem public client with support for debug methods */
74
+ export type ViemPublicDebugClient = PublicClient<
75
+ FallbackTransport<HttpTransport[]>,
76
+ Chain,
77
+ undefined,
78
+ [...PublicRpcSchema, ...PublicRpcDebugSchema]
79
+ >;
80
+
19
81
  export type ExtendedViemWalletClient = Client<
20
82
  FallbackTransport<readonly HttpTransport[]>,
21
83
  Chain,
package/src/utils.ts CHANGED
@@ -1,18 +1,21 @@
1
- import type { Fr } from '@aztec/foundation/fields';
1
+ import type { Fr } from '@aztec/foundation/curves/bn254';
2
2
  import type { Logger } from '@aztec/foundation/log';
3
3
  import { ErrorsAbi } from '@aztec/l1-artifacts/ErrorsAbi';
4
4
 
5
5
  import {
6
6
  type Abi,
7
+ type AbiItem,
7
8
  BaseError,
8
9
  type ContractEventName,
9
10
  ContractFunctionRevertedError,
10
11
  type DecodeEventLogReturnType,
12
+ type FormattedTransaction,
11
13
  type Hex,
12
14
  type Log,
13
15
  decodeErrorResult,
14
16
  decodeEventLog,
15
17
  } from 'viem';
18
+ import { formatAbiItem, formatAbiParams } from 'viem/utils';
16
19
 
17
20
  export interface L2Claim {
18
21
  claimSecret: Fr;
@@ -24,8 +27,8 @@ export interface L2Claim {
24
27
  export class FormattedViemError extends Error {
25
28
  metaMessages?: any[];
26
29
 
27
- constructor(message: string, metaMessages?: any[]) {
28
- super(message);
30
+ constructor(message: string, metaMessages?: any[], options?: ErrorOptions) {
31
+ super(message, options);
29
32
  this.name = 'FormattedViemError';
30
33
  this.metaMessages = metaMessages;
31
34
  }
@@ -92,6 +95,57 @@ export function prettyLogViemErrorMsg(err: any) {
92
95
  return err?.message ?? err;
93
96
  }
94
97
 
98
+ export function mergeAbis(abis: Abi[]): Abi {
99
+ let merged: Abi = [];
100
+ const seen = new Set<string>();
101
+
102
+ for (const abi of abis) {
103
+ for (const item of abi) {
104
+ const key = getAbiItemKey(item);
105
+ if (!seen.has(key)) {
106
+ seen.add(key);
107
+ merged = [...merged, item];
108
+ }
109
+ }
110
+ }
111
+
112
+ return merged;
113
+ }
114
+
115
+ function getAbiItemKey(item: AbiItem): string {
116
+ if (item.type === 'function') {
117
+ const signature = formatAbiItem(item);
118
+ const outputs = formatAbiParams(item.outputs);
119
+ const stateMutability = typeof item.stateMutability === 'string' ? item.stateMutability : '';
120
+ return `function:${signature}:${outputs}:${stateMutability}`;
121
+ }
122
+
123
+ if (item.type === 'event') {
124
+ const signature = formatAbiItem(item);
125
+ const indexed = (item.inputs ?? []).map(input => ((input as { indexed?: boolean }).indexed ? '1' : '0')).join('');
126
+ const anonymous = item.anonymous ? 'anonymous' : 'not-anonymous';
127
+ return `event:${signature}:${indexed}:${anonymous}`;
128
+ }
129
+
130
+ if (item.type === 'error') {
131
+ const signature = formatAbiItem(item);
132
+ return `error:${signature}`;
133
+ }
134
+
135
+ if (item.type === 'constructor') {
136
+ const inputs = formatAbiParams(item.inputs);
137
+ const stateMutability = typeof item.stateMutability === 'string' ? item.stateMutability : '';
138
+ return `constructor::${inputs}:${stateMutability}`;
139
+ }
140
+
141
+ if (item.type === 'fallback' || item.type === 'receive') {
142
+ const stateMutability = typeof item.stateMutability === 'string' ? item.stateMutability : '';
143
+ return `${item.type}:::${stateMutability}`;
144
+ }
145
+
146
+ return 'unknown';
147
+ }
148
+
95
149
  function getNestedErrorData(error: unknown): string | undefined {
96
150
  // If nothing, bail
97
151
  if (!error) {
@@ -116,6 +170,21 @@ function getNestedErrorData(error: unknown): string | undefined {
116
170
  return undefined;
117
171
  }
118
172
 
173
+ /**
174
+ * Truncates an error message to a safe length for log renderers.
175
+ * LogExplorer can only render up to 2500 characters in its summary view.
176
+ * We cap at 2000 to leave room for decorating context added by callers.
177
+ */
178
+ function truncateErrorMessage(message: string): string {
179
+ const MAX = 2000;
180
+ const CHUNK = 950;
181
+ if (message.length <= MAX) {
182
+ return message;
183
+ }
184
+ const truncated = message.length - 2 * CHUNK;
185
+ return message.slice(0, CHUNK) + `...${truncated} characters truncated...` + message.slice(-CHUNK);
186
+ }
187
+
119
188
  /**
120
189
  * Formats a Viem error into a FormattedViemError instance.
121
190
  * @param error - The error to format.
@@ -128,6 +197,8 @@ export function formatViemError(error: any, abi: Abi = ErrorsAbi): FormattedViem
128
197
  return error;
129
198
  }
130
199
 
200
+ const originalError = error;
201
+
131
202
  // First try to decode as a custom error using the ABI
132
203
  try {
133
204
  const data = getNestedErrorData(error);
@@ -138,7 +209,9 @@ export function formatViemError(error: any, abi: Abi = ErrorsAbi): FormattedViem
138
209
  data: data as Hex,
139
210
  });
140
211
  if (decoded) {
141
- return new FormattedViemError(`${decoded.errorName}(${decoded.args?.join(', ') ?? ''})`, error?.metaMessages);
212
+ return new FormattedViemError(`${decoded.errorName}(${decoded.args?.join(', ') ?? ''})`, error?.metaMessages, {
213
+ cause: originalError,
214
+ });
142
215
  }
143
216
  }
144
217
 
@@ -155,7 +228,7 @@ export function formatViemError(error: any, abi: Abi = ErrorsAbi): FormattedViem
155
228
  revertError.metaMessages && revertError.metaMessages?.length > 1
156
229
  ? revertError.metaMessages[1].trimStart()
157
230
  : '';
158
- return new FormattedViemError(`${errorName}${args}`, error?.metaMessages);
231
+ return new FormattedViemError(`${errorName}${args}`, error?.metaMessages, { cause: originalError });
159
232
  }
160
233
  }
161
234
  } catch {
@@ -178,22 +251,12 @@ export function formatViemError(error: any, abi: Abi = ErrorsAbi): FormattedViem
178
251
 
179
252
  // If it's a regular Error instance, return it with its message
180
253
  if (error instanceof Error) {
181
- return new FormattedViemError(error.message, (error as any)?.metaMessages);
182
- }
183
-
184
- const body = String(error);
185
- const length = body.length;
186
- // LogExplorer can only render up to 2500 characters in it's summary view. Try to keep the whole message below this number
187
- // Limit the error to 2000 chacaters in order to allow code higher up to decorate this error with extra details (up to 500 characters)
188
- if (length > 2000) {
189
- const chunk = 950;
190
- const truncated = length - 2 * chunk;
191
- return new FormattedViemError(
192
- body.slice(0, chunk) + `...${truncated} characters truncated...` + body.slice(-1 * chunk),
193
- );
254
+ return new FormattedViemError(truncateErrorMessage(error.message), (error as any)?.metaMessages, {
255
+ cause: originalError,
256
+ });
194
257
  }
195
258
 
196
- return new FormattedViemError(body);
259
+ return new FormattedViemError(truncateErrorMessage(String(error)), undefined, { cause: originalError });
197
260
  }
198
261
 
199
262
  function stripAbis(obj: any) {
@@ -219,6 +282,24 @@ function stripAbis(obj: any) {
219
282
  });
220
283
  }
221
284
 
285
+ /**
286
+ * Best-effort decode of a raw revert payload (`0x...`) against an ABI.
287
+ * Returns a human-readable `ErrorName(arg1, arg2, ...)` string, or `undefined` if the selector
288
+ * is unknown or the payload is empty. Use to surface decoded error names alongside the raw
289
+ * payload in log lines for operators.
290
+ */
291
+ export function tryDecodeRevertReason(data: Hex | undefined, abi: Abi): string | undefined {
292
+ if (!data || data === '0x') {
293
+ return undefined;
294
+ }
295
+ try {
296
+ const decoded = decodeErrorResult({ abi, data });
297
+ return `${decoded.errorName}(${decoded.args?.join(', ') ?? ''})`;
298
+ } catch {
299
+ return undefined;
300
+ }
301
+ }
302
+
222
303
  export function tryGetCustomErrorName(err: any) {
223
304
  try {
224
305
  // See https://viem.sh/docs/contract/simulateContract#handling-custom-errors
@@ -233,3 +314,31 @@ export function tryGetCustomErrorName(err: any) {
233
314
  return undefined;
234
315
  }
235
316
  }
317
+
318
+ /**
319
+ * Type guard to check if a transaction is a blob transaction (EIP-4844).
320
+ * Blob transactions have maxFeePerBlobGas and blobVersionedHashes fields.
321
+ */
322
+ export function isBlobTransaction(tx: FormattedTransaction): tx is FormattedTransaction & {
323
+ maxFeePerBlobGas: bigint;
324
+ blobVersionedHashes: readonly Hex[];
325
+ } {
326
+ return (
327
+ 'maxFeePerBlobGas' in tx &&
328
+ tx.maxFeePerBlobGas !== undefined &&
329
+ 'blobVersionedHashes' in tx &&
330
+ tx.blobVersionedHashes !== undefined
331
+ );
332
+ }
333
+
334
+ /**
335
+ * Calculates a percentile from an array of bigints
336
+ */
337
+ export function calculatePercentile(values: bigint[], percentile: number): bigint {
338
+ if (values.length === 0) {
339
+ return 0n;
340
+ }
341
+ const sorted = [...values].sort((a, b) => (a < b ? -1 : a > b ? 1 : 0));
342
+ const index = Math.ceil((sorted.length - 1) * (percentile / 100));
343
+ return sorted[index];
344
+ }
@@ -1,66 +0,0 @@
1
- import { SlotNumber } from '@aztec/foundation/branded-types';
2
- import { EthAddress } from '@aztec/foundation/eth-address';
3
- import EventEmitter from 'events';
4
- import { type Hex, type Log, type TypedDataDefinition } from 'viem';
5
- import type { L1TxRequest, L1TxUtils } from '../l1_tx_utils/index.js';
6
- import type { ViemClient } from '../types.js';
7
- import { type IEmpireBase } from './empire_base.js';
8
- export declare class ProposalAlreadyExecutedError extends Error {
9
- constructor(round: bigint);
10
- }
11
- export declare class EmpireSlashingProposerContract extends EventEmitter implements IEmpireBase {
12
- readonly client: ViemClient;
13
- private readonly logger;
14
- private readonly proposer;
15
- readonly type: "empire";
16
- constructor(client: ViemClient, address: Hex | EthAddress);
17
- get address(): EthAddress;
18
- getQuorumSize(): Promise<bigint>;
19
- getRoundSize(): Promise<bigint>;
20
- getLifetimeInRounds(): Promise<bigint>;
21
- getExecutionDelayInRounds(): Promise<bigint>;
22
- getCurrentRound(): Promise<bigint>;
23
- computeRound(slot: SlotNumber): Promise<bigint>;
24
- getInstance(): Promise<`0x${string}`>;
25
- getRoundInfo(rollupAddress: Hex, round: bigint): Promise<{
26
- lastSignalSlot: SlotNumber;
27
- payloadWithMostSignals: Hex;
28
- executed: boolean;
29
- }>;
30
- getPayloadSignals(rollupAddress: Hex, round: bigint, payload: Hex): Promise<bigint>;
31
- createSignalRequest(payload: Hex): L1TxRequest;
32
- createSignalRequestWithSignature(payload: Hex, slot: SlotNumber, chainId: number, signerAddress: Hex, signer: (msg: TypedDataDefinition) => Promise<Hex>): Promise<L1TxRequest>;
33
- listenToSubmittablePayloads(callback: (args: {
34
- payload: `0x${string}`;
35
- round: bigint;
36
- }) => unknown): import("viem").WatchContractEventReturnType;
37
- listenToPayloadSubmitted(callback: (args: {
38
- round: bigint;
39
- payload: `0x${string}`;
40
- }) => unknown): import("viem").WatchContractEventReturnType;
41
- listenToSignalCasted(callback: (args: {
42
- round: bigint;
43
- payload: `0x${string}`;
44
- signaler: `0x${string}`;
45
- }) => unknown): import("viem").WatchContractEventReturnType;
46
- /** Creates an L1TxRequest to submit the round winner for the given round. */
47
- buildExecuteRoundRequest(round: bigint): L1TxRequest;
48
- /** Tries to extract a PayloadSubmitted event from the given logs. */
49
- tryExtractPayloadSubmittedEvent(logs: Log[]): {
50
- eventName: "PayloadSubmitted";
51
- args: {
52
- payload: `0x${string}`;
53
- round: bigint;
54
- };
55
- } | undefined;
56
- /**
57
- * Wait for a round to be reached.
58
- *
59
- * @param round - The round to wait for.
60
- * @param pollingIntervalSeconds - The interval in seconds to poll for the round.
61
- * @returns True if the round was reached, false otherwise.
62
- */
63
- waitForRound(round: bigint, pollingIntervalSeconds?: number): Promise<boolean>;
64
- executeRound(txUtils: L1TxUtils, round: bigint | number): ReturnType<typeof txUtils.sendAndMonitorTransaction>;
65
- }
66
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZW1waXJlX3NsYXNoaW5nX3Byb3Bvc2VyLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvY29udHJhY3RzL2VtcGlyZV9zbGFzaGluZ19wcm9wb3Nlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0saUNBQWlDLENBQUM7QUFDN0QsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLCtCQUErQixDQUFDO0FBSzNELE9BQU8sWUFBWSxNQUFNLFFBQVEsQ0FBQztBQUNsQyxPQUFPLEVBR0wsS0FBSyxHQUFHLEVBQ1IsS0FBSyxHQUFHLEVBQ1IsS0FBSyxtQkFBbUIsRUFHekIsTUFBTSxNQUFNLENBQUM7QUFFZCxPQUFPLEtBQUssRUFBRSxXQUFXLEVBQUUsU0FBUyxFQUFFLE1BQU0seUJBQXlCLENBQUM7QUFDdEUsT0FBTyxLQUFLLEVBQUUsVUFBVSxFQUFFLE1BQU0sYUFBYSxDQUFDO0FBRTlDLE9BQU8sRUFBRSxLQUFLLFdBQVcsRUFBOEQsTUFBTSxrQkFBa0IsQ0FBQztBQUVoSCxxQkFBYSw0QkFBNkIsU0FBUSxLQUFLO0lBQ3JELFlBQVksS0FBSyxFQUFFLE1BQU0sRUFFeEI7Q0FDRjtBQUVELHFCQUFhLDhCQUErQixTQUFR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