@aztec/ethereum 0.0.1-commit.5de5ca79e → 0.0.1-commit.6201a7b05

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 (83) hide show
  1. package/dest/client.d.ts +7 -1
  2. package/dest/client.d.ts.map +1 -1
  3. package/dest/client.js +14 -0
  4. package/dest/config.d.ts +6 -6
  5. package/dest/config.d.ts.map +1 -1
  6. package/dest/config.js +5 -9
  7. package/dest/contracts/chain_state_override.d.ts +38 -0
  8. package/dest/contracts/chain_state_override.d.ts.map +1 -0
  9. package/dest/contracts/chain_state_override.js +100 -0
  10. package/dest/contracts/inbox.d.ts +3 -3
  11. package/dest/contracts/inbox.d.ts.map +1 -1
  12. package/dest/contracts/inbox.js +11 -6
  13. package/dest/contracts/index.d.ts +3 -3
  14. package/dest/contracts/index.d.ts.map +1 -1
  15. package/dest/contracts/index.js +2 -2
  16. package/dest/contracts/multicall.d.ts +51 -2
  17. package/dest/contracts/multicall.d.ts.map +1 -1
  18. package/dest/contracts/multicall.js +85 -0
  19. package/dest/contracts/rollup.d.ts +4996 -20
  20. package/dest/contracts/rollup.d.ts.map +1 -1
  21. package/dest/contracts/rollup.js +257 -55
  22. package/dest/contracts/{tally_slashing_proposer.d.ts → slashing_proposer.d.ts} +3 -4
  23. package/dest/contracts/slashing_proposer.d.ts.map +1 -0
  24. package/dest/contracts/{tally_slashing_proposer.js → slashing_proposer.js} +13 -15
  25. package/dest/deploy_aztec_l1_contracts.d.ts +3 -6
  26. package/dest/deploy_aztec_l1_contracts.d.ts.map +1 -1
  27. package/dest/deploy_aztec_l1_contracts.js +2 -4
  28. package/dest/generated/l1-contracts-defaults.d.ts +1 -1
  29. package/dest/generated/l1-contracts-defaults.js +1 -1
  30. package/dest/l1_artifacts.d.ts +8675 -16072
  31. package/dest/l1_artifacts.d.ts.map +1 -1
  32. package/dest/l1_artifacts.js +9 -24
  33. package/dest/l1_contract_addresses.d.ts +1 -5
  34. package/dest/l1_contract_addresses.d.ts.map +1 -1
  35. package/dest/l1_contract_addresses.js +0 -6
  36. package/dest/l1_reader.js +1 -1
  37. package/dest/l1_tx_utils/l1_tx_utils.d.ts +3 -1
  38. package/dest/l1_tx_utils/l1_tx_utils.d.ts.map +1 -1
  39. package/dest/l1_tx_utils/l1_tx_utils.js +34 -26
  40. package/dest/publisher_manager.d.ts +21 -7
  41. package/dest/publisher_manager.d.ts.map +1 -1
  42. package/dest/publisher_manager.js +81 -7
  43. package/dest/queries.d.ts +13 -2
  44. package/dest/queries.d.ts.map +1 -1
  45. package/dest/queries.js +62 -3
  46. package/dest/test/chain_monitor.d.ts +2 -1
  47. package/dest/test/chain_monitor.d.ts.map +1 -1
  48. package/dest/test/chain_monitor.js +5 -0
  49. package/dest/test/eth_cheat_codes.d.ts +6 -4
  50. package/dest/test/eth_cheat_codes.d.ts.map +1 -1
  51. package/dest/test/eth_cheat_codes.js +6 -4
  52. package/dest/test/rollup_cheat_codes.d.ts +5 -1
  53. package/dest/test/rollup_cheat_codes.d.ts.map +1 -1
  54. package/dest/test/rollup_cheat_codes.js +9 -1
  55. package/dest/test/start_anvil.d.ts +8 -1
  56. package/dest/test/start_anvil.d.ts.map +1 -1
  57. package/dest/test/start_anvil.js +16 -2
  58. package/package.json +5 -5
  59. package/src/client.ts +18 -0
  60. package/src/config.ts +9 -13
  61. package/src/contracts/chain_state_override.ts +147 -0
  62. package/src/contracts/inbox.ts +12 -4
  63. package/src/contracts/index.ts +2 -2
  64. package/src/contracts/multicall.ts +65 -1
  65. package/src/contracts/rollup.ts +274 -52
  66. package/src/contracts/{tally_slashing_proposer.ts → slashing_proposer.ts} +14 -16
  67. package/src/deploy_aztec_l1_contracts.ts +1 -5
  68. package/src/generated/l1-contracts-defaults.ts +1 -1
  69. package/src/l1_artifacts.ts +12 -35
  70. package/src/l1_contract_addresses.ts +0 -7
  71. package/src/l1_reader.ts +1 -1
  72. package/src/l1_tx_utils/l1_tx_utils.ts +24 -14
  73. package/src/publisher_manager.ts +105 -10
  74. package/src/queries.ts +70 -4
  75. package/src/test/chain_monitor.ts +5 -0
  76. package/src/test/eth_cheat_codes.ts +6 -4
  77. package/src/test/rollup_cheat_codes.ts +11 -1
  78. package/src/test/start_anvil.ts +25 -2
  79. package/dest/contracts/empire_slashing_proposer.d.ts +0 -69
  80. package/dest/contracts/empire_slashing_proposer.d.ts.map +0 -1
  81. package/dest/contracts/empire_slashing_proposer.js +0 -216
  82. package/dest/contracts/tally_slashing_proposer.d.ts.map +0 -1
  83. package/src/contracts/empire_slashing_proposer.ts +0 -265
@@ -3,10 +3,6 @@ import {
3
3
  CoinIssuerBytecode,
4
4
  DateGatedRelayerAbi,
5
5
  DateGatedRelayerBytecode,
6
- EmpireSlasherDeploymentExtLibAbi,
7
- EmpireSlasherDeploymentExtLibBytecode,
8
- EmpireSlashingProposerAbi,
9
- EmpireSlashingProposerBytecode,
10
6
  FeeAssetHandlerAbi,
11
7
  FeeAssetHandlerBytecode,
12
8
  FeeJuicePortalAbi,
@@ -42,16 +38,14 @@ import {
42
38
  RollupLinkReferences,
43
39
  RollupOperationsExtLibAbi,
44
40
  RollupOperationsExtLibBytecode,
45
- SlashFactoryAbi,
46
- SlashFactoryBytecode,
47
41
  SlasherAbi,
48
42
  SlasherBytecode,
43
+ SlasherDeploymentExtLibAbi,
44
+ SlasherDeploymentExtLibBytecode,
45
+ SlashingProposerAbi,
46
+ SlashingProposerBytecode,
49
47
  StakingAssetHandlerAbi,
50
48
  StakingAssetHandlerBytecode,
51
- TallySlasherDeploymentExtLibAbi,
52
- TallySlasherDeploymentExtLibBytecode,
53
- TallySlashingProposerAbi,
54
- TallySlashingProposerBytecode,
55
49
  TestERC20Abi,
56
50
  TestERC20Bytecode,
57
51
  ValidatorOperationsExtLibAbi,
@@ -107,15 +101,10 @@ export const RollupArtifact = {
107
101
  contractAbi: RewardExtLibAbi,
108
102
  contractBytecode: RewardExtLibBytecode as Hex,
109
103
  },
110
- TallySlasherDeploymentExtLib: {
111
- name: 'TallySlasherDeploymentExtLib',
112
- contractAbi: TallySlasherDeploymentExtLibAbi,
113
- contractBytecode: TallySlasherDeploymentExtLibBytecode as Hex,
114
- },
115
- EmpireSlasherDeploymentExtLib: {
116
- name: 'EmpireSlasherDeploymentExtLib',
117
- contractAbi: EmpireSlasherDeploymentExtLibAbi,
118
- contractBytecode: EmpireSlasherDeploymentExtLibBytecode as Hex,
104
+ SlasherDeploymentExtLib: {
105
+ name: 'SlasherDeploymentExtLib',
106
+ contractAbi: SlasherDeploymentExtLibAbi,
107
+ contractBytecode: SlasherDeploymentExtLibBytecode as Hex,
119
108
  },
120
109
  },
121
110
  },
@@ -175,22 +164,10 @@ export const SlasherArtifact = {
175
164
  contractBytecode: SlasherBytecode as Hex,
176
165
  };
177
166
 
178
- export const EmpireSlashingProposerArtifact = {
179
- name: 'EmpireSlashingProposer',
180
- contractAbi: EmpireSlashingProposerAbi,
181
- contractBytecode: EmpireSlashingProposerBytecode as Hex,
182
- };
183
-
184
- export const TallySlashingProposerArtifact = {
185
- name: 'TallySlashingProposer',
186
- contractAbi: TallySlashingProposerAbi,
187
- contractBytecode: TallySlashingProposerBytecode as Hex,
188
- };
189
-
190
- export const SlashFactoryArtifact = {
191
- name: 'SlashFactory',
192
- contractAbi: SlashFactoryAbi,
193
- contractBytecode: SlashFactoryBytecode as Hex,
167
+ export const SlashingProposerArtifact = {
168
+ name: 'SlashingProposer',
169
+ contractAbi: SlashingProposerAbi,
170
+ contractBytecode: SlashingProposerBytecode as Hex,
194
171
  };
195
172
 
196
173
  export const RegisterNewRollupVersionPayloadArtifact = {
@@ -27,7 +27,6 @@ export const L1ContractsNames = [
27
27
  export type L1ContractAddresses = {
28
28
  [K in (typeof L1ContractsNames)[number]]: EthAddress;
29
29
  } & {
30
- slashFactoryAddress?: EthAddress | undefined;
31
30
  feeAssetHandlerAddress?: EthAddress | undefined;
32
31
  stakingAssetHandlerAddress?: EthAddress | undefined;
33
32
  zkPassportVerifierAddress?: EthAddress | undefined;
@@ -48,7 +47,6 @@ export const L1ContractAddressesSchema = zodFor<L1ContractAddresses>()(
48
47
  rewardDistributorAddress: schemas.EthAddress,
49
48
  governanceProposerAddress: schemas.EthAddress,
50
49
  governanceAddress: schemas.EthAddress,
51
- slashFactoryAddress: schemas.EthAddress.optional(),
52
50
  feeAssetHandlerAddress: schemas.EthAddress.optional(),
53
51
  stakingAssetHandlerAddress: schemas.EthAddress.optional(),
54
52
  zkPassportVerifierAddress: schemas.EthAddress.optional(),
@@ -67,11 +65,6 @@ export const l1ContractAddressesMapping: ConfigMappingsType<
67
65
  description: 'The deployed L1 registry contract address.',
68
66
  parseEnv,
69
67
  },
70
- slashFactoryAddress: {
71
- env: 'SLASH_FACTORY_CONTRACT_ADDRESS',
72
- description: 'The deployed L1 slashFactory contract address',
73
- parseEnv,
74
- },
75
68
  feeAssetHandlerAddress: {
76
69
  env: 'FEE_ASSET_HANDLER_CONTRACT_ADDRESS',
77
70
  description: 'The deployed L1 feeAssetHandler contract address',
package/src/l1_reader.ts CHANGED
@@ -30,7 +30,7 @@ export const l1ReaderConfigMappings: ConfigMappingsType<L1ReaderConfig> = {
30
30
  },
31
31
  l1ChainId: {
32
32
  env: 'L1_CHAIN_ID',
33
- parseEnv: (val: string) => +val,
33
+ ...optionalNumberConfigHelper(),
34
34
  description: 'The chain ID of the ethereum host.',
35
35
  },
36
36
  l1RpcUrls: {
@@ -4,6 +4,7 @@ import { merge, pick } from '@aztec/foundation/collection';
4
4
  import { InterruptError, TimeoutError } from '@aztec/foundation/error';
5
5
  import { EthAddress } from '@aztec/foundation/eth-address';
6
6
  import { type Logger, type LoggerBindings, createLogger } from '@aztec/foundation/log';
7
+ import { Semaphore } from '@aztec/foundation/queue';
7
8
  import { retryUntil } from '@aztec/foundation/retry';
8
9
  import { sleep } from '@aztec/foundation/sleep';
9
10
  import { DateProvider } from '@aztec/foundation/timer';
@@ -47,6 +48,8 @@ export class L1TxUtils extends ReadOnlyL1TxUtils {
47
48
  protected txs: L1TxState[] = [];
48
49
  /** Last nonce successfully sent to the chain. Used as a lower bound when a fallback RPC node returns a stale count. */
49
50
  private lastSentNonce: number | undefined;
51
+ /** Mutex to prevent concurrent sendTransaction calls from racing on the same nonce. */
52
+ private readonly sendMutex = new Semaphore(1);
50
53
  /** Tx delayer for testing. Only set when enableDelayer config is true. */
51
54
  public delayer?: Delayer;
52
55
  /** KZG instance for blob operations. */
@@ -253,25 +256,32 @@ export class L1TxUtils extends ReadOnlyL1TxUtils {
253
256
  );
254
257
  }
255
258
 
256
- const chainNonce = await this.client.getTransactionCount({ address: account, blockTag: 'pending' });
257
- // If a fallback RPC node returns a stale count (lower than what we last sent), use our
258
- // local lower bound to avoid sending a duplicate of an already-pending transaction.
259
- const nonce =
260
- this.lastSentNonce !== undefined && chainNonce <= this.lastSentNonce ? this.lastSentNonce + 1 : chainNonce;
259
+ let txHash: Hex;
260
+ let nonce: number;
261
+ let baseState: Pick<L1TxState, 'request' | 'gasLimit' | 'blobInputs' | 'gasPrice' | 'nonce'>;
261
262
 
262
- const baseState = { request, gasLimit, blobInputs, gasPrice, nonce };
263
- const txData = this.makeTxData(baseState, { isCancelTx: false });
264
-
265
- // Send the new tx
266
- const signedRequest = await this.prepareSignedTransaction(txData);
267
- const txHash = await this.client.sendRawTransaction({ serializedTransaction: signedRequest });
268
- // Update after tx is sent successfully
269
- this.lastSentNonce = nonce;
263
+ await this.sendMutex.acquire();
264
+ try {
265
+ const chainNonce = await this.client.getTransactionCount({ address: account, blockTag: 'pending' });
266
+ // If a fallback RPC node returns a stale count (lower than what we last sent), use our
267
+ // local lower bound to avoid sending a duplicate of an already-pending transaction.
268
+ nonce =
269
+ this.lastSentNonce !== undefined && chainNonce <= this.lastSentNonce ? this.lastSentNonce + 1 : chainNonce;
270
+
271
+ baseState = { request, gasLimit, blobInputs, gasPrice, nonce };
272
+ const txData = this.makeTxData(baseState, { isCancelTx: false });
273
+
274
+ const signedRequest = await this.prepareSignedTransaction(txData);
275
+ txHash = await this.client.sendRawTransaction({ serializedTransaction: signedRequest });
276
+ this.lastSentNonce = nonce;
277
+ } finally {
278
+ this.sendMutex.release();
279
+ }
270
280
 
271
281
  // Create the new state for monitoring
272
282
  const l1TxState: L1TxState = {
273
283
  ...baseState,
274
- id: (await this.store?.consumeNextStateId(account)) ?? Math.max(...this.txs.map(tx => tx.id), 0),
284
+ id: (await this.store?.consumeNextStateId(account)) ?? Math.max(...this.txs.map(tx => tx.id), -1) + 1,
275
285
  txHashes: [txHash],
276
286
  cancelTxHashes: [],
277
287
  status: TxUtilsState.IDLE,
@@ -1,6 +1,8 @@
1
1
  import { pick } from '@aztec/foundation/collection';
2
2
  import { type Logger, type LoggerBindings, createLogger } from '@aztec/foundation/log';
3
+ import { RunningPromise } from '@aztec/foundation/running-promise';
3
4
 
5
+ import { Multicall3 } from './contracts/multicall.js';
4
6
  import { L1TxUtils, TxUtilsState } from './l1_tx_utils/index.js';
5
7
 
6
8
  // Defines the order in which we prioritise publishers based on their state (first is better)
@@ -27,24 +29,72 @@ const busyStates: TxUtilsState[] = [
27
29
 
28
30
  export type PublisherFilter<UtilsType extends L1TxUtils> = (utils: UtilsType) => boolean;
29
31
 
32
+ /** Config accepted by PublisherManager. */
33
+ type PublisherManagerConfig = {
34
+ publisherAllowInvalidStates?: boolean;
35
+ publisherFundingThreshold?: bigint;
36
+ publisherFundingAmount?: bigint;
37
+ };
38
+
30
39
  export class PublisherManager<UtilsType extends L1TxUtils = L1TxUtils> {
31
40
  private log: Logger;
32
- private config: { publisherAllowInvalidStates?: boolean };
41
+ private config: PublisherManagerConfig;
42
+ private static readonly FUNDING_CHECK_INTERVAL_MS = 2 * 60 * 1000;
43
+ private funder?: UtilsType;
44
+ private fundingPromise?: RunningPromise;
33
45
 
34
46
  constructor(
35
47
  private publishers: UtilsType[],
36
- config: { publisherAllowInvalidStates?: boolean },
37
- bindings?: LoggerBindings,
48
+ config: PublisherManagerConfig,
49
+ opts?: { bindings?: LoggerBindings; funder?: UtilsType },
38
50
  ) {
39
- this.log = createLogger('publisher:manager', bindings);
51
+ this.funder = opts?.funder;
52
+ this.log = createLogger('publisher:manager', opts?.bindings);
40
53
  this.log.info(`PublisherManager initialized with ${publishers.length} publishers.`);
41
54
  this.publishers = publishers;
42
- this.config = pick(config, 'publisherAllowInvalidStates');
55
+ this.config = pick(config, 'publisherAllowInvalidStates', 'publisherFundingThreshold', 'publisherFundingAmount');
56
+
57
+ const hasThreshold = this.config.publisherFundingThreshold !== undefined;
58
+ const hasAmount = this.config.publisherFundingAmount !== undefined;
59
+ if (hasThreshold !== hasAmount) {
60
+ this.log.warn(`Incomplete funding config: both publisherFundingThreshold and publisherFundingAmount must be set`);
61
+ }
62
+
63
+ if (this.funder) {
64
+ const funderAddress = this.funder.getSenderAddress();
65
+ if (publishers.some(p => p.getSenderAddress().equals(funderAddress))) {
66
+ this.log.error(`Funding account ${funderAddress} is also a publisher, disabling funding to avoid self-funding`);
67
+ this.funder = undefined;
68
+ }
69
+ }
43
70
  }
44
71
 
45
- /** Loads the state of all publishers and resumes monitoring any pending txs */
46
- public async loadState(): Promise<void> {
47
- await Promise.all(this.publishers.map(pub => pub.loadStateAndResumeMonitoring()));
72
+ /** Loads the state of all publishers and the funder, and starts periodic funding checks. */
73
+ public async start(): Promise<void> {
74
+ await Promise.all([
75
+ ...this.publishers.map(pub => pub.loadStateAndResumeMonitoring()),
76
+ this.funder?.loadStateAndResumeMonitoring(),
77
+ ]);
78
+
79
+ if (
80
+ this.funder &&
81
+ this.config.publisherFundingThreshold !== undefined &&
82
+ this.config.publisherFundingAmount !== undefined
83
+ ) {
84
+ this.fundingPromise = new RunningPromise(
85
+ () => this.triggerFundingIfNeeded(),
86
+ this.log,
87
+ PublisherManager.FUNDING_CHECK_INTERVAL_MS,
88
+ );
89
+ this.fundingPromise.start();
90
+ }
91
+ }
92
+
93
+ /** Stops the funding loop and interrupts all publishers. */
94
+ public async stop(): Promise<void> {
95
+ await this.fundingPromise?.stop();
96
+ this.publishers.forEach(pub => pub.interrupt());
97
+ this.funder?.interrupt();
48
98
  }
49
99
 
50
100
  // Finds and prioritises available publishers based on
@@ -102,7 +152,52 @@ export class PublisherManager<UtilsType extends L1TxUtils = L1TxUtils> {
102
152
  return sortedPublishers[0].publisher;
103
153
  }
104
154
 
105
- public interrupt() {
106
- this.publishers.forEach(pub => pub.interrupt());
155
+ /** Check all publisher balances and fund those below threshold. */
156
+ private async triggerFundingIfNeeded(): Promise<void> {
157
+ const { funder, config } = this;
158
+ if (!funder || config.publisherFundingThreshold === undefined || config.publisherFundingAmount === undefined) {
159
+ return;
160
+ }
161
+
162
+ const allBalances = await Promise.all(
163
+ this.publishers.map(async pub => ({ balance: await pub.getSenderBalance(), publisher: pub })),
164
+ );
165
+ const lowBalance = allBalances.filter(p => p.balance < config.publisherFundingThreshold!);
166
+ if (lowBalance.length === 0) {
167
+ return;
168
+ }
169
+
170
+ const fundingAmount = config.publisherFundingAmount!;
171
+ const funderBalance = await funder.getSenderBalance();
172
+
173
+ if (funderBalance < 10n * fundingAmount) {
174
+ this.log.warn(`Funding account balance is low`, { funderBalance, threshold: 10n * fundingAmount });
175
+ }
176
+ const affordableCount = Number(funderBalance / fundingAmount);
177
+ if (affordableCount === 0) {
178
+ this.log.error(`Funding account balance too low to fund any publisher`, { funderBalance, fundingAmount });
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
+
188
+ const toFund = lowBalance.slice(0, affordableCount).map(p => p.publisher);
189
+ await this.fundPublishers(toFund);
190
+ }
191
+
192
+ /** Fund publishers via a single Multicall3 aggregate3Value transaction. */
193
+ private async fundPublishers(publishers: UtilsType[]): Promise<void> {
194
+ const fundingAmount = this.config.publisherFundingAmount!;
195
+ const calls = publishers.map(pub => ({
196
+ to: pub.getSenderAddress().toString(),
197
+ value: fundingAmount,
198
+ }));
199
+
200
+ await Multicall3.forwardValue(calls, this.funder!, this.log);
201
+ this.log.info(`Funded ${publishers.length} publishers`);
107
202
  }
108
203
  }
package/src/queries.ts CHANGED
@@ -1,11 +1,77 @@
1
1
  import { EthAddress } from '@aztec/foundation/eth-address';
2
2
 
3
+ import { BaseError, type Block } from 'viem';
4
+
3
5
  import { DefaultL1ContractsConfig, type L1ContractsConfig } from './config.js';
4
6
  import { ReadOnlyGovernanceContract } from './contracts/governance.js';
5
7
  import { GovernanceProposerContract } from './contracts/governance_proposer.js';
6
8
  import { InboxContract } from './contracts/inbox.js';
7
9
  import { RollupContract } from './contracts/rollup.js';
8
- import type { ViemPublicClient } from './types.js';
10
+ import type { ViemClient, ViemPublicClient } from './types.js';
11
+
12
+ /**
13
+ * Returns the L1 finalized block, or `undefined` if the chain does not yet have one
14
+ * (common on freshly started devnets). Rethrows any other RPC error.
15
+ */
16
+ export async function getFinalizedL1Block(client: ViemClient): Promise<Block<bigint, false, 'finalized'> | undefined> {
17
+ try {
18
+ return await client.getBlock({ blockTag: 'finalized', includeTransactions: false });
19
+ } catch (err) {
20
+ if (isFinalizedBlockTagNotFoundError(err)) {
21
+ return undefined;
22
+ }
23
+ throw err;
24
+ }
25
+ }
26
+
27
+ // Error messages returned by popular Ethereum execution clients when
28
+ // eth_getBlockByNumber / eth_call is called with blockTag "finalized" or
29
+ // "safe" and no such block has been produced yet:
30
+ //
31
+ // geth "finalized block not found"
32
+ // "safe block not found"
33
+ // reth "block not found: finalized"
34
+ // "block not found: safe"
35
+ // nethermind "Unknown block error" (same for both tags)
36
+ // besu "Unknown block"
37
+ // erigon 'block "finalized" not available (head block: N)'
38
+ // 'block "safe" not available (head block: N)'
39
+ //
40
+ // A combined regex covers all five:
41
+ const FINALIZED_BLOCK_TAG_NOT_FOUND_MESSAGE_RE =
42
+ /(finalized|safe) block not found|block not found: (finalized|safe)|unknown block|block "(finalized|safe)" not available/i;
43
+
44
+ /**
45
+ * Returns true if the error originates from an RPC call that failed because
46
+ * the "finalized" (or "safe") block tag is not yet available on the chain.
47
+ */
48
+ export function isFinalizedBlockTagNotFoundError(err: unknown): boolean {
49
+ if (!err) {
50
+ return false;
51
+ }
52
+
53
+ if (err instanceof BaseError) {
54
+ const hit = err.walk((e: any) => matchesFinalizedBlockTagNotFound(e));
55
+ if (hit) {
56
+ return true;
57
+ }
58
+ }
59
+
60
+ for (let cur: any = err, i = 0; cur && i < 10; cur = cur.cause, i++) {
61
+ if (matchesFinalizedBlockTagNotFound(cur)) {
62
+ return true;
63
+ }
64
+ }
65
+ return false;
66
+ }
67
+
68
+ function matchesFinalizedBlockTagNotFound(e: any): boolean {
69
+ if (!e) {
70
+ return false;
71
+ }
72
+ const text = `${e.details ?? ''} ${e.message ?? ''} ${e.shortMessage ?? ''}`;
73
+ return FINALIZED_BLOCK_TAG_NOT_FOUND_MESSAGE_RE.test(text);
74
+ }
9
75
 
10
76
  /** Reads the L1ContractsConfig from L1 contracts. */
11
77
  export async function getL1ContractsConfig(
@@ -76,8 +142,8 @@ export async function getL1ContractsConfig(
76
142
  slasherProposer?.getRoundSize() ?? 0n,
77
143
  slasherProposer?.getLifetimeInRounds() ?? 0n,
78
144
  slasherProposer?.getExecutionDelayInRounds() ?? 0n,
79
- slasherProposer?.type === 'tally' ? slasherProposer.getSlashOffsetInRounds() : 0n,
80
- slasherProposer?.type === 'tally' ? slasherProposer.getSlashingAmounts() : [0n, 0n, 0n],
145
+ slasherProposer?.getSlashOffsetInRounds() ?? 0n,
146
+ slasherProposer?.getSlashingAmounts() ?? [0n, 0n, 0n],
81
147
  slasher?.getVetoer() ?? EthAddress.ZERO,
82
148
  slasher?.getSlashingDisableDuration() ?? 0,
83
149
  rollup.getManaTarget(),
@@ -114,7 +180,7 @@ export async function getL1ContractsConfig(
114
180
  rollupVersion: Number(rollupVersion),
115
181
  genesisArchiveTreeRoot: genesisArchiveTreeRoot.toString(),
116
182
  exitDelaySeconds: Number(exitDelay),
117
- slasherFlavor: slasherProposer?.type ?? 'tally',
183
+ slasherEnabled: !!slasherProposer,
118
184
  slashingOffsetInRounds: Number(slashingOffsetInRounds),
119
185
  slashAmountSmall: slashingAmounts[0],
120
186
  slashAmountMedium: slashingAmounts[1],
@@ -221,6 +221,11 @@ export class ChainMonitor extends EventEmitter<ChainMonitorEventMap> {
221
221
  });
222
222
  }
223
223
 
224
+ public async waitUntilNextL2Slot(): Promise<void> {
225
+ const targetSlot = SlotNumber.add((await this.run()).l2SlotNumber, 1);
226
+ return this.waitUntilL2Slot(targetSlot);
227
+ }
228
+
224
229
  public waitUntilL1Block(block: number | bigint): Promise<void> {
225
230
  const targetBlock = typeof block === 'bigint' ? block.valueOf() : block;
226
231
  if (this.l1BlockNumber >= targetBlock) {
@@ -85,10 +85,12 @@ export class EthCheatCodes {
85
85
  }
86
86
 
87
87
  /**
88
- * Get the current timestamp
89
- * @returns The current timestamp
88
+ * Get the timestamp of the latest mined L1 block.
89
+ * Note: this is NOT the current time — it's the discrete timestamp of the last block.
90
+ * Between blocks, the actual chain time advances but no new block reflects it.
91
+ * @returns The latest block timestamp in seconds
90
92
  */
91
- public async timestamp(): Promise<number> {
93
+ public async lastBlockTimestamp(): Promise<number> {
92
94
  const res = await this.doRpcCall('eth_getBlockByNumber', ['latest', true]);
93
95
  return parseInt(res.timestamp, 16);
94
96
  }
@@ -552,7 +554,7 @@ export class EthCheatCodes {
552
554
  }
553
555
 
554
556
  public async syncDateProvider() {
555
- const timestamp = await this.timestamp();
557
+ const timestamp = await this.lastBlockTimestamp();
556
558
  if ('setTime' in this.dateProvider) {
557
559
  this.dateProvider.setTime(timestamp * 1000);
558
560
  }
@@ -53,7 +53,17 @@ export class RollupCheatCodes {
53
53
  /** Returns the current slot */
54
54
  public async getSlot(): Promise<SlotNumber> {
55
55
  const ts = BigInt((await this.client.getBlock()).timestamp);
56
- return SlotNumber.fromBigInt(await this.rollup.read.getSlotAt([ts]));
56
+ return this.getSlotAt(ts);
57
+ }
58
+
59
+ /** Returns the slot number at a given timestamp. */
60
+ public async getSlotAt(timestamp: bigint): Promise<SlotNumber> {
61
+ return SlotNumber.fromBigInt(await this.rollup.read.getSlotAt([timestamp]));
62
+ }
63
+
64
+ /** Returns the timestamp for the start of a given slot. */
65
+ public async getTimestampForSlot(slot: SlotNumber): Promise<bigint> {
66
+ return await this.rollup.read.getTimestampForSlot([BigInt(slot)]);
57
67
  }
58
68
 
59
69
  /** Returns the number of seconds until the start of the given slot based on L1 block timestamp. */
@@ -1,5 +1,6 @@
1
1
  import { createLogger } from '@aztec/foundation/log';
2
2
  import { makeBackoff, retry } from '@aztec/foundation/retry';
3
+ import type { TestDateProvider } from '@aztec/foundation/timer';
3
4
  import { fileURLToPath } from '@aztec/foundation/url';
4
5
 
5
6
  import { type ChildProcess, spawn } from 'child_process';
@@ -33,6 +34,12 @@ export async function startAnvil(
33
34
  * L1-finality-based logic work without needing hundreds of mined blocks.
34
35
  */
35
36
  slotsInAnEpoch?: number;
37
+ /**
38
+ * If provided, the date provider will be synced to anvil's block time on every mined block.
39
+ * This keeps the dateProvider in lockstep with anvil's chain time, avoiding drift between
40
+ * the wall clock and the L1 chain when computing L1 slot timestamps.
41
+ */
42
+ dateProvider?: TestDateProvider;
36
43
  } = {},
37
44
  ): Promise<{ anvil: Anvil; methodCalls?: string[]; rpcUrl: string; stop: () => Promise<void> }> {
38
45
  const anvilBinary = resolve(dirname(fileURLToPath(import.meta.url)), '../../', 'scripts/anvil_kill_wrapper.sh');
@@ -108,12 +115,15 @@ export async function startAnvil(
108
115
  child.once('close', onClose);
109
116
  });
110
117
 
111
- // Continue piping for logging / method-call capture after startup.
112
- if (logger || opts.captureMethodCalls) {
118
+ // Continue piping for logging, method-call capture, and/or dateProvider sync after startup.
119
+ if (logger || opts.captureMethodCalls || opts.dateProvider) {
113
120
  child.stdout?.on('data', (data: Buffer) => {
114
121
  const text = data.toString();
115
122
  logger?.debug(text.trim());
116
123
  methodCalls?.push(...(text.match(/eth_[^\s]+/g) || []));
124
+ if (opts.dateProvider) {
125
+ syncDateProviderFromAnvilOutput(text, opts.dateProvider);
126
+ }
117
127
  });
118
128
  child.stderr?.on('data', (data: Buffer) => {
119
129
  logger?.debug(data.toString().trim());
@@ -160,6 +170,19 @@ export async function startAnvil(
160
170
  return { anvil: anvilObj, methodCalls, stop, rpcUrl: `http://127.0.0.1:${port}` };
161
171
  }
162
172
 
173
+ /** Extracts block time from anvil stdout and syncs the dateProvider. */
174
+ function syncDateProviderFromAnvilOutput(text: string, dateProvider: TestDateProvider): void {
175
+ // Anvil logs mined blocks as:
176
+ // Block Time: "Fri, 20 Mar 2026 02:10:46 +0000"
177
+ const match = text.match(/Block Time:\s*"([^"]+)"/);
178
+ if (match) {
179
+ const blockTimeMs = new Date(match[1]).getTime();
180
+ if (!isNaN(blockTimeMs)) {
181
+ dateProvider.setTime(blockTimeMs);
182
+ }
183
+ }
184
+ }
185
+
163
186
  /** Send SIGTERM, wait up to 5 s, then SIGKILL. All timers are always cleared. */
164
187
  function killChild(child: ChildProcess): Promise<void> {
165
188
  return new Promise<void>(resolve => {
@@ -1,69 +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
- quorumReached: boolean;
29
- executed: boolean;
30
- }>;
31
- getPayloadSignals(rollupAddress: Hex, round: bigint, payload: Hex): Promise<bigint>;
32
- createSignalRequest(payload: Hex): L1TxRequest;
33
- createSignalRequestWithSignature(payload: Hex, slot: SlotNumber, chainId: number, signerAddress: Hex, signer: (msg: TypedDataDefinition) => Promise<Hex>): Promise<L1TxRequest>;
34
- /** Checks if a payload was ever submitted to governance via submitRoundWinner. */
35
- hasPayloadBeenProposed(payload: Hex, fromBlock: bigint): Promise<boolean>;
36
- listenToSubmittablePayloads(callback: (args: {
37
- payload: `0x${string}`;
38
- round: bigint;
39
- }) => unknown): import("viem").WatchContractEventReturnType;
40
- listenToPayloadSubmitted(callback: (args: {
41
- round: bigint;
42
- payload: `0x${string}`;
43
- }) => unknown): import("viem").WatchContractEventReturnType;
44
- listenToSignalCasted(callback: (args: {
45
- round: bigint;
46
- payload: `0x${string}`;
47
- signaler: `0x${string}`;
48
- }) => unknown): import("viem").WatchContractEventReturnType;
49
- /** Creates an L1TxRequest to submit the round winner for the given round. */
50
- buildExecuteRoundRequest(round: bigint): L1TxRequest;
51
- /** Tries to extract a PayloadSubmitted event from the given logs. */
52
- tryExtractPayloadSubmittedEvent(logs: Log[]): {
53
- eventName: "PayloadSubmitted";
54
- args: {
55
- payload: `0x${string}`;
56
- round: bigint;
57
- };
58
- } | undefined;
59
- /**
60
- * Wait for a round to be reached.
61
- *
62
- * @param round - The round to wait for.
63
- * @param pollingIntervalSeconds - The interval in seconds to poll for the round.
64
- * @returns True if the round was reached, false otherwise.
65
- */
66
- waitForRound(round: bigint, pollingIntervalSeconds?: number): Promise<boolean>;
67
- executeRound(txUtils: L1TxUtils, round: bigint | number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