@aztec/end-to-end 0.87.8 → 0.87.9

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.
@@ -52,6 +52,11 @@ export declare class EpochsTestContext {
52
52
  waitUntilEndOfProofSubmissionWindow(epochNumber: number | bigint): Promise<void>;
53
53
  /** Waits for the aztec node to sync to the target block number. */
54
54
  waitForNodeToSync(blockNumber: number, type: 'finalised' | 'historic'): Promise<void>;
55
+ /** Creates an L1 client using a fresh account with funds from anvil, with a tx delayer already set up. */
56
+ createL1Client(): Promise<{
57
+ client: import("@aztec/ethereum").ExtendedViemWalletClient;
58
+ delayer: Delayer;
59
+ }>;
55
60
  /** Verifies whether the given block number is found on the aztec node. */
56
61
  verifyHistoricBlock(blockNumber: L2BlockNumber, expectedSuccess: boolean): Promise<void>;
57
62
  }
@@ -1 +1 @@
1
- {"version":3,"file":"epochs_test.d.ts","sourceRoot":"","sources":["../../src/e2e_epochs/epochs_test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAM,KAAK,MAAM,EAA8D,MAAM,iBAAiB,CAAC;AAC9G,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAkB,KAAK,OAAO,EAAwB,MAAM,sBAAsB,CAAC;AAGxG,OAAO,EAAE,UAAU,EAAuB,MAAM,oBAAoB,CAAC;AAIrE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,KAAK,iBAAiB,EAAuC,MAAM,6BAA6B,CAAC;AAK1G,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,YAAY,EAIlB,MAAM,sBAAsB,CAAC;AAE9B,eAAO,MAAM,yBAAyB,IAAI,CAAC;AAC3C,eAAO,MAAM,gCAAgC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AiB,CAAC;IAC9B,MAAM,EAAG,MAAM,CAAC;IAChB,OAAO,EAAG,YAAY,CAAC;IACvB,aAAa,EAAG,OAAO,CAAC;IACxB,gBAAgB,EAAG,OAAO,CAAC;IAE3B,WAAW,EAAE,UAAU,EAAE,CAAM;IAC/B,KAAK,EAAE,gBAAgB,EAAE,CAAM;IAE/B,aAAa,EAAG,MAAM,CAAC;IAEvB,kBAAkB,EAAG,MAAM,CAAC;IAC5B,qBAAqB,EAAG,MAAM,CAAC;WAElB,KAAK,CAAC,IAAI,GAAE,cAAmB;WAMrC,gBAAgB,CAAC,IAAI,GAAE,cAAmB;;;;;;IAS3C,KAAK,CAAC,IAAI,GAAE,cAAmB;IAwE/B,QAAQ;IAOR,gBAAgB;IAgBhB,sBAAsB;IAcnC,OAAO,CAAC,iBAAiB;IAKzB,0FAA0F;IAC7E,oBAAoB,CAAC,KAAK,EAAE,MAAM;IAO/C,sDAAsD;IACzC,sBAAsB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,SAAK;IAShE,iEAAiE;IACpD,4BAA4B,CAAC,CAAC,EAAE,MAAM,EAAE,OAAO,SAAK;IAUjE,4EAA4E;IAC/D,mCAAmC,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM;IAO7E,mEAAmE;IACtD,iBAAiB,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,GAAG,UAAU;IAalF,0GAA0G;IAC7F,cAAc;;;;IAa3B,0EAA0E;IAC7D,mBAAmB,CAAC,WAAW,EAAE,aAAa,EAAE,eAAe,EAAE,OAAO;CAUtF"}
@@ -1,11 +1,13 @@
1
1
  import { AztecNodeService } from '@aztec/aztec-node';
2
2
  import { Fr, MerkleTreeId, getTimestampRangeForEpoch, retryUntil, sleep } from '@aztec/aztec.js';
3
+ import { createExtendedL1Client } from '@aztec/ethereum';
3
4
  import { RollupContract } from '@aztec/ethereum/contracts';
4
- import { ChainMonitor, waitUntilL1Timestamp } from '@aztec/ethereum/test';
5
+ import { ChainMonitor, waitUntilL1Timestamp, withDelayer } from '@aztec/ethereum/test';
5
6
  import { randomBytes } from '@aztec/foundation/crypto';
6
7
  import { withLogNameSuffix } from '@aztec/foundation/log';
7
8
  import { getProofSubmissionDeadlineTimestamp } from '@aztec/stdlib/epoch-helpers';
8
9
  import { join } from 'path';
10
+ import { privateKeyToAccount } from 'viem/accounts';
9
11
  import { createAndSyncProverNode, getPrivateKeyFromIndex, setup } from '../fixtures/utils.js';
10
12
  export const WORLD_STATE_BLOCK_HISTORY = 2;
11
13
  export const WORLD_STATE_BLOCK_CHECK_INTERVAL = 50;
@@ -174,6 +176,20 @@ export const ARCHIVER_POLL_INTERVAL = 50;
174
176
  }
175
177
  }
176
178
  }
179
+ /** Creates an L1 client using a fresh account with funds from anvil, with a tx delayer already set up. */ async createL1Client() {
180
+ const { client, delayer } = withDelayer(createExtendedL1Client([
181
+ ...this.l1Client.chain.rpcUrls.default.http
182
+ ], privateKeyToAccount(this.getNextPrivateKey()), this.l1Client.chain), {
183
+ ethereumSlotDuration: this.L1_BLOCK_TIME_IN_S
184
+ });
185
+ expect(await client.getBalance({
186
+ address: client.account.address
187
+ })).toBeGreaterThan(0n);
188
+ return {
189
+ client,
190
+ delayer
191
+ };
192
+ }
177
193
  /** Verifies whether the given block number is found on the aztec node. */ async verifyHistoricBlock(blockNumber, expectedSuccess) {
178
194
  // We use `findLeavesIndexes` here, but could use any function that queries the world-state
179
195
  // at a particular block, so we know whether that historic block is available or has been
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aztec/end-to-end",
3
- "version": "0.87.8",
3
+ "version": "0.87.9",
4
4
  "type": "module",
5
5
  "exports": "./dest/index.js",
6
6
  "inherits": [
@@ -25,39 +25,39 @@
25
25
  "formatting": "run -T prettier --check ./src && run -T eslint ./src"
26
26
  },
27
27
  "dependencies": {
28
- "@aztec/accounts": "0.87.8",
29
- "@aztec/archiver": "0.87.8",
30
- "@aztec/aztec": "0.87.8",
31
- "@aztec/aztec-node": "0.87.8",
32
- "@aztec/aztec.js": "0.87.8",
33
- "@aztec/bb-prover": "0.87.8",
34
- "@aztec/blob-lib": "0.87.8",
35
- "@aztec/blob-sink": "0.87.8",
36
- "@aztec/bot": "0.87.8",
37
- "@aztec/cli": "0.87.8",
38
- "@aztec/constants": "0.87.8",
39
- "@aztec/entrypoints": "0.87.8",
40
- "@aztec/epoch-cache": "0.87.8",
41
- "@aztec/ethereum": "0.87.8",
42
- "@aztec/foundation": "0.87.8",
43
- "@aztec/kv-store": "0.87.8",
44
- "@aztec/l1-artifacts": "0.87.8",
45
- "@aztec/merkle-tree": "0.87.8",
46
- "@aztec/noir-contracts.js": "0.87.8",
47
- "@aztec/noir-noirc_abi": "0.87.8",
48
- "@aztec/noir-protocol-circuits-types": "0.87.8",
49
- "@aztec/noir-test-contracts.js": "0.87.8",
50
- "@aztec/p2p": "0.87.8",
51
- "@aztec/protocol-contracts": "0.87.8",
52
- "@aztec/prover-client": "0.87.8",
53
- "@aztec/prover-node": "0.87.8",
54
- "@aztec/pxe": "0.87.8",
55
- "@aztec/sequencer-client": "0.87.8",
56
- "@aztec/simulator": "0.87.8",
57
- "@aztec/stdlib": "0.87.8",
58
- "@aztec/telemetry-client": "0.87.8",
59
- "@aztec/validator-client": "0.87.8",
60
- "@aztec/world-state": "0.87.8",
28
+ "@aztec/accounts": "0.87.9",
29
+ "@aztec/archiver": "0.87.9",
30
+ "@aztec/aztec": "0.87.9",
31
+ "@aztec/aztec-node": "0.87.9",
32
+ "@aztec/aztec.js": "0.87.9",
33
+ "@aztec/bb-prover": "0.87.9",
34
+ "@aztec/blob-lib": "0.87.9",
35
+ "@aztec/blob-sink": "0.87.9",
36
+ "@aztec/bot": "0.87.9",
37
+ "@aztec/cli": "0.87.9",
38
+ "@aztec/constants": "0.87.9",
39
+ "@aztec/entrypoints": "0.87.9",
40
+ "@aztec/epoch-cache": "0.87.9",
41
+ "@aztec/ethereum": "0.87.9",
42
+ "@aztec/foundation": "0.87.9",
43
+ "@aztec/kv-store": "0.87.9",
44
+ "@aztec/l1-artifacts": "0.87.9",
45
+ "@aztec/merkle-tree": "0.87.9",
46
+ "@aztec/noir-contracts.js": "0.87.9",
47
+ "@aztec/noir-noirc_abi": "0.87.9",
48
+ "@aztec/noir-protocol-circuits-types": "0.87.9",
49
+ "@aztec/noir-test-contracts.js": "0.87.9",
50
+ "@aztec/p2p": "0.87.9",
51
+ "@aztec/protocol-contracts": "0.87.9",
52
+ "@aztec/prover-client": "0.87.9",
53
+ "@aztec/prover-node": "0.87.9",
54
+ "@aztec/pxe": "0.87.9",
55
+ "@aztec/sequencer-client": "0.87.9",
56
+ "@aztec/simulator": "0.87.9",
57
+ "@aztec/stdlib": "0.87.9",
58
+ "@aztec/telemetry-client": "0.87.9",
59
+ "@aztec/validator-client": "0.87.9",
60
+ "@aztec/world-state": "0.87.9",
61
61
  "@iarna/toml": "^2.2.5",
62
62
  "@jest/globals": "^29.5.0",
63
63
  "@noble/curves": "^1.0.0",
@@ -1,8 +1,9 @@
1
1
  import { AztecNodeService } from '@aztec/aztec-node';
2
2
  import { Fr, type Logger, MerkleTreeId, getTimestampRangeForEpoch, retryUntil, sleep } from '@aztec/aztec.js';
3
3
  import type { ViemClient } from '@aztec/ethereum';
4
+ import { createExtendedL1Client } from '@aztec/ethereum';
4
5
  import { RollupContract } from '@aztec/ethereum/contracts';
5
- import { ChainMonitor, DelayedTxUtils, type Delayer, waitUntilL1Timestamp } from '@aztec/ethereum/test';
6
+ import { ChainMonitor, DelayedTxUtils, type Delayer, waitUntilL1Timestamp, withDelayer } from '@aztec/ethereum/test';
6
7
  import { randomBytes } from '@aztec/foundation/crypto';
7
8
  import { withLogNameSuffix } from '@aztec/foundation/log';
8
9
  import { ProverNode, ProverNodePublisher } from '@aztec/prover-node';
@@ -14,6 +15,7 @@ import { type L1RollupConstants, getProofSubmissionDeadlineTimestamp } from '@az
14
15
 
15
16
  import { join } from 'path';
16
17
  import type { Hex } from 'viem';
18
+ import { privateKeyToAccount } from 'viem/accounts';
17
19
 
18
20
  import {
19
21
  type EndToEndContext,
@@ -245,6 +247,19 @@ export class EpochsTestContext {
245
247
  }
246
248
  }
247
249
  }
250
+ /** Creates an L1 client using a fresh account with funds from anvil, with a tx delayer already set up. */
251
+ public async createL1Client() {
252
+ const { client, delayer } = withDelayer(
253
+ createExtendedL1Client(
254
+ [...this.l1Client.chain.rpcUrls.default.http],
255
+ privateKeyToAccount(this.getNextPrivateKey()),
256
+ this.l1Client.chain,
257
+ ),
258
+ { ethereumSlotDuration: this.L1_BLOCK_TIME_IN_S },
259
+ );
260
+ expect(await client.getBalance({ address: client.account.address })).toBeGreaterThan(0n);
261
+ return { client, delayer };
262
+ }
248
263
 
249
264
  /** Verifies whether the given block number is found on the aztec node. */
250
265
  public async verifyHistoricBlock(blockNumber: L2BlockNumber, expectedSuccess: boolean) {