@aztec/end-to-end 2.0.0-nightly.20250821 → 2.0.0-nightly.20250823

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.
@@ -68,7 +68,7 @@ export declare class EpochsTestContext {
68
68
  /** Waits until the last slot of the proof submission window for a given epoch. */
69
69
  waitUntilLastSlotOfProofSubmissionWindow(epochNumber: number | bigint): Promise<void>;
70
70
  /** Waits for the aztec node to sync to the target block number. */
71
- waitForNodeToSync(blockNumber: number, type: 'proven' | 'finalised' | 'historic'): Promise<void>;
71
+ waitForNodeToSync(blockNumber: number, type: 'proven' | 'finalized' | 'historic'): Promise<void>;
72
72
  /** Registers the SpamContract on the given wallet. */
73
73
  registerSpamContract(wallet: Wallet, salt?: Fr): Promise<SpamContract>;
74
74
  /** Creates an L1 client using a fresh account with funds from anvil, with a tx delayer already set up. */
@@ -234,8 +234,8 @@ export const DEFAULT_L1_BLOCK_TIME = process.env.CI ? 12 : 8;
234
234
  });
235
235
  if (type === 'proven') {
236
236
  synched = tips.proven.number >= blockNumber && syncState.latestBlockNumber >= blockNumber;
237
- } else if (type === 'finalised') {
238
- synched = syncState.finalisedBlockNumber >= blockNumber;
237
+ } else if (type === 'finalized') {
238
+ synched = syncState.finalizedBlockNumber >= blockNumber;
239
239
  } else {
240
240
  synched = syncState.oldestHistoricBlockNumber >= blockNumber;
241
241
  }
@@ -4,9 +4,10 @@ import { type AccountWalletWithSecretKey, AztecAddress } from '@aztec/aztec.js';
4
4
  import { type Operator, RollupContract, type ViemClient } from '@aztec/ethereum';
5
5
  import { ChainMonitor } from '@aztec/ethereum/test';
6
6
  import { type Logger } from '@aztec/foundation/log';
7
- import { SlashFactoryAbi, SlasherAbi, SlashingProposerAbi } from '@aztec/l1-artifacts';
7
+ import { EmpireSlashingProposerAbi, SlasherAbi } from '@aztec/l1-artifacts';
8
8
  import { SpamContract } from '@aztec/noir-test-contracts.js/Spam';
9
9
  import type { BootstrapNode } from '@aztec/p2p/bootstrap';
10
+ import { SlashFactoryContract } from '@aztec/stdlib/l1-contracts';
10
11
  import type { PublicDataTreeLeaf } from '@aztec/stdlib/trees';
11
12
  import { type GetContractReturnType } from 'viem';
12
13
  import { type SubsystemsContext } from '../fixtures/snapshot_manager.js';
@@ -86,8 +87,8 @@ export declare class P2PNetworkTest {
86
87
  getContracts(): Promise<{
87
88
  rollup: RollupContract;
88
89
  slasherContract: GetContractReturnType<typeof SlasherAbi, ViemClient>;
89
- slashingProposer: GetContractReturnType<typeof SlashingProposerAbi, ViemClient>;
90
- slashFactory: GetContractReturnType<typeof SlashFactoryAbi, ViemClient>;
90
+ slashingProposer: GetContractReturnType<typeof EmpireSlashingProposerAbi, ViemClient>;
91
+ slashFactory: SlashFactoryContract;
91
92
  }>;
92
93
  }
93
94
  //# sourceMappingURL=p2p_network.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"p2p_network.d.ts","sourceRoot":"","sources":["../../src/e2e_p2p/p2p_network.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC3E,OAAO,EAAE,KAAK,0BAA0B,EAAE,YAAY,EAAkB,MAAM,iBAAiB,CAAC;AAChG,OAAO,EAKL,KAAK,QAAQ,EACb,cAAc,EACd,KAAK,UAAU,EAGhB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEpD,OAAO,EAAE,KAAK,MAAM,EAAgB,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAa,eAAe,EAAE,UAAU,EAAE,mBAAmB,EAAgB,MAAM,qBAAqB,CAAC;AAChH,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAG1D,OAAO,KAAK,E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AE,cAAc,CAAC;QACvB,eAAe,EAAE,qBAAqB,CAAC,OAAO,UAAU,EAAE,UAAU,CAAC,CAAC;QACtE,gBAAgB,EAAE,qBAAqB,CAAC,OAAO,yBAAyB,EAAE,UAAU,CAAC,CAAC;QACtF,YAAY,EAAE,oBAAoB,CAAC;KACpC,CAAC;CA6BH"}
@@ -4,10 +4,11 @@ import { GSEContract, L1TxUtils, MultiAdderArtifact, RollupContract, deployL1Con
4
4
  import { ChainMonitor } from '@aztec/ethereum/test';
5
5
  import { SecretValue } from '@aztec/foundation/config';
6
6
  import { createLogger } from '@aztec/foundation/log';
7
- import { RollupAbi, SlashFactoryAbi, SlasherAbi, SlashingProposerAbi, TestERC20Abi } from '@aztec/l1-artifacts';
7
+ import { EmpireSlashingProposerAbi, RollupAbi, SlasherAbi, TestERC20Abi } from '@aztec/l1-artifacts';
8
8
  import { SpamContract } from '@aztec/noir-test-contracts.js/Spam';
9
9
  import { createBootstrapNodeFromPrivateKey, getBootstrapNodeEnr } from '@aztec/p2p/test-helpers';
10
10
  import { tryStop } from '@aztec/stdlib/interfaces/server';
11
+ import { SlashFactoryContract } from '@aztec/stdlib/l1-contracts';
11
12
  import { ZkPassportProofParams } from '@aztec/stdlib/zkpassport';
12
13
  import { getGenesisValues } from '@aztec/world-state/testing';
13
14
  import getPort from 'get-port';
@@ -281,14 +282,10 @@ export class P2PNetworkTest {
281
282
  });
282
283
  const slashingProposer = getContract({
283
284
  address: getAddress(await slasherContract.read.PROPOSER()),
284
- abi: SlashingProposerAbi,
285
- client: this.ctx.deployL1ContractsValues.l1Client
286
- });
287
- const slashFactory = getContract({
288
- address: getAddress(this.ctx.deployL1ContractsValues.l1ContractAddresses.slashFactoryAddress.toString()),
289
- abi: SlashFactoryAbi,
285
+ abi: EmpireSlashingProposerAbi,
290
286
  client: this.ctx.deployL1ContractsValues.l1Client
291
287
  });
288
+ const slashFactory = new SlashFactoryContract(this.ctx.deployL1ContractsValues.l1Client, getAddress(this.ctx.deployL1ContractsValues.l1ContractAddresses.slashFactoryAddress.toString()));
292
289
  return {
293
290
  rollup,
294
291
  slasherContract,
@@ -3,11 +3,10 @@ import type { AztecNodeService } from '@aztec/aztec-node';
3
3
  import { AztecAddress, type Logger, ProvenTx, type SentTx } from '@aztec/aztec.js';
4
4
  import type { RollupCheatCodes } from '@aztec/aztec/testing';
5
5
  import type { RollupContract, ViemClient } from '@aztec/ethereum';
6
- import type { SlashFactoryAbi } from '@aztec/l1-artifacts/SlashFactoryAbi';
7
- import type { SlashingProposerAbi } from '@aztec/l1-artifacts/SlashingProposerAbi';
6
+ import type { EmpireSlashingProposerAbi } from '@aztec/l1-artifacts/EmpireSlashingProposerAbi';
8
7
  import type { SpamContract } from '@aztec/noir-test-contracts.js/Spam';
9
8
  import { PXEService } from '@aztec/pxe/server';
10
- import { Offense } from '@aztec/slasher';
9
+ import type { SlashFactoryContract } from '@aztec/stdlib/l1-contracts';
11
10
  import type { GetContractReturnType } from 'viem';
12
11
  import type { NodeContext } from '../fixtures/setup_p2p_test.js';
13
12
  export declare const submitComplexTxsTo: (logger: Logger, from: AztecAddress, spamContract: SpamContract, numTxs: number, opts?: {
@@ -19,7 +18,7 @@ export declare function createPXEServiceAndPrepareTransactions(logger: Logger, n
19
18
  txs: ProvenTx[];
20
19
  node: AztecNodeService;
21
20
  }>;
22
- export declare function awaitProposalExecution(slashingProposer: GetContractReturnType<typeof SlashingProposerAbi, ViemClient>, timeoutSeconds: number): Promise<void>;
21
+ export declare function awaitProposalExecution(slashingProposer: GetContractReturnType<typeof EmpireSlashingProposerAbi, ViemClient>, timeoutSeconds: number): Promise<void>;
23
22
  export declare function awaitCommitteeExists({ rollup, logger, }: {
24
23
  rollup: RollupContract;
25
24
  logger: Logger;
@@ -28,14 +27,12 @@ export declare function awaitCommitteeExists({ rollup, logger, }: {
28
27
  * Await the committee to be slashed out of the validator set.
29
28
  * Currently assumes that the committee is the same size as the validator set.
30
29
  */
31
- export declare function awaitCommitteeKicked({ offense, rollup, cheatCodes, committee, slashingAmount, slashFactory, slashingProposer, slashingRoundSize, aztecSlotDuration, logger, sendDummyTx, }: {
32
- offense: Offense;
30
+ export declare function awaitCommitteeKicked({ rollup, cheatCodes, committee, slashFactory, slashingProposer, slashingRoundSize, aztecSlotDuration, logger, sendDummyTx, }: {
33
31
  rollup: RollupContract;
34
32
  cheatCodes: RollupCheatCodes;
35
33
  committee: readonly `0x${string}`[];
36
- slashingAmount: bigint;
37
- slashFactory: GetContractReturnType<typeof SlashFactoryAbi, ViemClient>;
38
- slashingProposer: GetContractReturnType<typeof SlashingProposerAbi, ViemClient>;
34
+ slashFactory: SlashFactoryContract;
35
+ slashingProposer: GetContractReturnType<typeof EmpireSlashingProposerAbi, ViemClient>;
39
36
  slashingRoundSize: number;
40
37
  aztecSlotDuration: number;
41
38
  logger: Logger;
@@ -1 +1 @@
1
- {"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../src/e2e_p2p/shared.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EACL,YAAY,EAEZ,KAAK,MAAM,EACX,QAAQ,EACR,KAAK,MAAM,EAIZ,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAC;AACnF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAEvE,OAAO,EAAE,UAAU,EAAyD,MAAM,mBAAmB,CAAC;AACtG,OAAO,EAAE,OAAO,EAAmB,MAAM,gBAAgB,CAAC;A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AU,CAAC,CAAC;IACtF,iBAAiB,EAAE,MAAM,CAAC;IAC1B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAClC,iBA+DA"}
@@ -1,9 +1,8 @@
1
1
  import { getSchnorrAccount } from '@aztec/accounts/schnorr';
2
2
  import { Fr, TxStatus, getContractInstanceFromInstantiationParams, retryUntil } from '@aztec/aztec.js';
3
- import { timesAsync } from '@aztec/foundation/collection';
3
+ import { timesAsync, unique } from '@aztec/foundation/collection';
4
4
  import { TestContract, TestContractArtifact } from '@aztec/noir-test-contracts.js/Test';
5
5
  import { createPXEService, getPXEServiceConfig as getRpcConfig } from '@aztec/pxe/server';
6
- import { OffenseToBigInt } from '@aztec/slasher';
7
6
  import { submitTxsTo } from '../shared/submit-transactions.js';
8
7
  // submits a set of transactions to the provided Private eXecution Environment (PXE)
9
8
  export const submitComplexTxsTo = async (logger, from, spamContract, numTxs, opts = {})=>{
@@ -96,26 +95,19 @@ export async function awaitCommitteeExists({ rollup, logger }) {
96
95
  /**
97
96
  * Await the committee to be slashed out of the validator set.
98
97
  * Currently assumes that the committee is the same size as the validator set.
99
- */ export async function awaitCommitteeKicked({ offense, rollup, cheatCodes, committee, slashingAmount, slashFactory, slashingProposer, slashingRoundSize, aztecSlotDuration, logger, sendDummyTx }) {
100
- logger.info(`Waiting for slash payload to be deployed`);
101
- const expectedSlashes = Array.from({
102
- length: committee.length
103
- }, ()=>slashingAmount);
104
- const sortedCommittee = [
105
- ...committee
106
- ].sort((a, b)=>a.localeCompare(b));
107
- await retryUntil(async ()=>{
108
- const [address, _, isDeployed] = await slashFactory.read.getAddressAndIsDeployed([
109
- sortedCommittee,
110
- expectedSlashes
111
- ]);
112
- return address && isDeployed;
113
- }, 'slash payload deployed', 60, 1);
114
- const slashPayloadEvents = await slashFactory.getEvents.SlashPayloadCreated();
98
+ */ export async function awaitCommitteeKicked({ rollup, cheatCodes, committee, slashFactory, slashingProposer, slashingRoundSize, aztecSlotDuration, logger, sendDummyTx }) {
99
+ logger.info(`Advancing epochs so slash payload gets deployed`);
100
+ await cheatCodes.debugRollup();
101
+ await cheatCodes.advanceToNextEpoch();
102
+ await cheatCodes.advanceToNextEpoch();
103
+ // Await for the slash payload to be created and check that all committee members are slashed
104
+ const slashPayloadEvents = await retryUntil(async ()=>{
105
+ const events = await slashFactory.getSlashPayloadCreatedEvents();
106
+ return events.length > 0 ? events : undefined;
107
+ }, 'slash payload created', 120, 1);
115
108
  expect(slashPayloadEvents.length).toBe(1);
116
- expect(slashPayloadEvents[0].args.offenses).toEqual(Array.from({
117
- length: committee.length
118
- }, ()=>OffenseToBigInt[offense]));
109
+ // The uniqueness check is needed since a validator may be slashed more than once on the same round (eg because they let two epochs be pruned)
110
+ expect(unique(slashPayloadEvents[0].slashes.map((slash)=>slash.validator.toString()))).toHaveLength(committee.length);
119
111
  const attestersPre = await rollup.getAttesters();
120
112
  expect(attestersPre.length).toBe(committee.length);
121
113
  for (const attester of attestersPre){
@@ -132,11 +124,12 @@ export async function awaitCommitteeExists({ rollup, logger }) {
132
124
  expect(committeePostSlashing?.length).toBe(attestersPre.length);
133
125
  const attestersPostSlashing = await rollup.getAttesters();
134
126
  expect(attestersPostSlashing.length).toBe(0);
135
- for (const attester of attestersPre){
136
- const attesterInfo = await rollup.getAttesterView(attester);
137
- // Check that status is Living
138
- expect(attesterInfo.status).toEqual(2);
139
- }
127
+ // TODO(palla/slash): Reinstate this check if applies
128
+ // for (const attester of attestersPre) {
129
+ // const attesterInfo = await rollup.getAttesterView(attester);
130
+ // // Check that status is Living
131
+ // expect(attesterInfo.status).toEqual(2);
132
+ // }
140
133
  await cheatCodes.debugRollup();
141
134
  await cheatCodes.advanceToNextEpoch();
142
135
  await sendDummyTx();
@@ -8,8 +8,7 @@ import type { ProverNodeDeps } from '@aztec/prover-node';
8
8
  import type { PXEService } from '@aztec/pxe/server';
9
9
  import type { PublicDataTreeLeaf } from '@aztec/stdlib/trees';
10
10
  import { AsyncLocalStorage } from 'node:async_hooks';
11
- export declare const ATTESTER_PRIVATE_KEYS_START_INDEX = 2;
12
- export declare const SLASHER_PRIVATE_KEYS_START_INDEX = 12;
11
+ export declare const ATTESTER_PRIVATE_KEYS_START_INDEX = 3;
13
12
  export interface NodeContext {
14
13
  node: AztecNodeService;
15
14
  pxeService: PXEService;
@@ -1 +1 @@
1
- {"version":3,"file":"setup_p2p_test.d.ts","sourceRoot":"","sources":["../../src/fixtures/setup_p2p_test.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,KAAK,eAAe,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC3E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAI9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,KAAK,EAAoB,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAC3E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAG9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAQrD,eAAO,MAAM,iCAAiC,IAAI,CAAC;AAEnD,eAAO,MAAM,gCAAgC,KAAK,CAAC;AAEnD,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,gBAAgB,CAAC;IACvB,UAAU,EAAE,UAAU,CAAC;IACvB,GAAG,EAAE,MAAM,EAAE,CAAC;CACf;AAED,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,KAAK,MAAM,EAAE,EAAE,CAO7F;AAED,wBAAsB,WAAW,CAC/B,MAAM,EAAE,eAAe,EACvB,YAAY,EAAE,YAAY,EAC1B,gBAAgB,EAAE,MAAM,EACxB,QAAQ,EAAE,MAAM,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AAC,6BAQ5C;AAED,wBAAsB,gBAAgB,CACpC,MAAM,EAAE,eAAe,EACvB,OAAO,EAAE,MAAM,EACf,aAAa,EAAE,MAAM,GAAG,SAAS,EACjC,YAAY,EAAE,MAAM,EACpB,cAAc,EAAE,cAAc,GAAG,QAAQ,CAAC,IAAI,CAAC,cAAc,EAAE,cAAc,CAAC,CAAC,EAC/E,mBAAmB,CAAC,EAAE,kBAAkB,EAAE,EAC1C,aAAa,CAAC,EAAE,MAAM,EACtB,WAAW,CAAC,EAAE,MAAM,EACpB,eAAe,CAAC,EAAE,iBAAiB,CAAC,MAAM,CAAC,oDAyB5C;AAED,wBAAsB,qBAAqB,CACzC,MAAM,EAAE,eAAe,EACvB,gBAAgB,CAAC,EAAE,MAAM,EACzB,IAAI,CAAC,EAAE,MAAM,EACb,YAAY,GAAE,MAAU,EACxB,aAAa,CAAC,EAAE,MAAM,4BAqBvB"}
@@ -10,10 +10,9 @@ import { TEST_PEER_CHECK_INTERVAL_MS } from './fixtures.js';
10
10
  import { createAndSyncProverNode, getPrivateKeyFromIndex } from './utils.js';
11
11
  import { getEndToEndTestTelemetryClient } from './with_telemetry_utils.js';
12
12
  // Setup snapshots will create a node with index 0, and run extra bootstrap with
13
- // index 1, so all of our loops here need to start from 2 to avoid running validators with the same key
14
- export const ATTESTER_PRIVATE_KEYS_START_INDEX = 2;
15
- // We use slasher keys after the first 10 anvil keys, note that this requires anvil to be started with more than the default 10 accounts
16
- export const SLASHER_PRIVATE_KEYS_START_INDEX = 12;
13
+ // index 1, and prover node with index 2, so all of our loops here need to start from 3
14
+ // to avoid running validators with the same key
15
+ export const ATTESTER_PRIVATE_KEYS_START_INDEX = 3;
17
16
  export function generatePrivateKeys(startIndex, numberOfKeys) {
18
17
  const privateKeys = [];
19
18
  // Do not start from 0 as it is used during setup
@@ -86,12 +85,10 @@ export async function createProverNode(config, tcpPort, bootstrapNode, addressIn
86
85
  export async function createValidatorConfig(config, bootstrapNodeEnr, port, addressIndex = 1, dataDirectory) {
87
86
  port = port ?? await getPort();
88
87
  const attesterPrivateKey = bufferToHex(getPrivateKeyFromIndex(ATTESTER_PRIVATE_KEYS_START_INDEX + addressIndex));
89
- const slasherPrivateKey = bufferToHex(getPrivateKeyFromIndex(SLASHER_PRIVATE_KEYS_START_INDEX + addressIndex));
90
88
  config.validatorPrivateKeys = new SecretValue([
91
89
  attesterPrivateKey
92
90
  ]);
93
91
  config.publisherPrivateKey = new SecretValue(attesterPrivateKey);
94
- config.slasherPrivateKey = new SecretValue(slasherPrivateKey);
95
92
  const nodeConfig = {
96
93
  ...config,
97
94
  p2pIp: `127.0.0.1`,
@@ -504,7 +504,7 @@ export const uniswapL1L2TestSuite = (setup, cleanup, expectedForkBlockNumber = 1
504
504
  action
505
505
  }, true);
506
506
  await validateActionInteraction.send({
507
- from: sponsorAddress
507
+ from: ownerAddress
508
508
  }).wait();
509
509
  await expect(action.simulate({
510
510
  from: sponsorAddress
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aztec/end-to-end",
3
- "version": "2.0.0-nightly.20250821",
3
+ "version": "2.0.0-nightly.20250823",
4
4
  "type": "module",
5
5
  "exports": "./dest/index.js",
6
6
  "inherits": [
@@ -25,40 +25,40 @@
25
25
  "formatting": "run -T prettier --check ./src && run -T eslint ./src"
26
26
  },
27
27
  "dependencies": {
28
- "@aztec/accounts": "2.0.0-nightly.20250821",
29
- "@aztec/archiver": "2.0.0-nightly.20250821",
30
- "@aztec/aztec": "2.0.0-nightly.20250821",
31
- "@aztec/aztec-node": "2.0.0-nightly.20250821",
32
- "@aztec/aztec.js": "2.0.0-nightly.20250821",
33
- "@aztec/bb-prover": "2.0.0-nightly.20250821",
34
- "@aztec/blob-lib": "2.0.0-nightly.20250821",
35
- "@aztec/blob-sink": "2.0.0-nightly.20250821",
36
- "@aztec/bot": "2.0.0-nightly.20250821",
37
- "@aztec/cli": "2.0.0-nightly.20250821",
38
- "@aztec/constants": "2.0.0-nightly.20250821",
39
- "@aztec/entrypoints": "2.0.0-nightly.20250821",
40
- "@aztec/epoch-cache": "2.0.0-nightly.20250821",
41
- "@aztec/ethereum": "2.0.0-nightly.20250821",
42
- "@aztec/foundation": "2.0.0-nightly.20250821",
43
- "@aztec/kv-store": "2.0.0-nightly.20250821",
44
- "@aztec/l1-artifacts": "2.0.0-nightly.20250821",
45
- "@aztec/merkle-tree": "2.0.0-nightly.20250821",
46
- "@aztec/noir-contracts.js": "2.0.0-nightly.20250821",
47
- "@aztec/noir-noirc_abi": "2.0.0-nightly.20250821",
48
- "@aztec/noir-protocol-circuits-types": "2.0.0-nightly.20250821",
49
- "@aztec/noir-test-contracts.js": "2.0.0-nightly.20250821",
50
- "@aztec/p2p": "2.0.0-nightly.20250821",
51
- "@aztec/protocol-contracts": "2.0.0-nightly.20250821",
52
- "@aztec/prover-client": "2.0.0-nightly.20250821",
53
- "@aztec/prover-node": "2.0.0-nightly.20250821",
54
- "@aztec/pxe": "2.0.0-nightly.20250821",
55
- "@aztec/sequencer-client": "2.0.0-nightly.20250821",
56
- "@aztec/simulator": "2.0.0-nightly.20250821",
57
- "@aztec/slasher": "2.0.0-nightly.20250821",
58
- "@aztec/stdlib": "2.0.0-nightly.20250821",
59
- "@aztec/telemetry-client": "2.0.0-nightly.20250821",
60
- "@aztec/validator-client": "2.0.0-nightly.20250821",
61
- "@aztec/world-state": "2.0.0-nightly.20250821",
28
+ "@aztec/accounts": "2.0.0-nightly.20250823",
29
+ "@aztec/archiver": "2.0.0-nightly.20250823",
30
+ "@aztec/aztec": "2.0.0-nightly.20250823",
31
+ "@aztec/aztec-node": "2.0.0-nightly.20250823",
32
+ "@aztec/aztec.js": "2.0.0-nightly.20250823",
33
+ "@aztec/bb-prover": "2.0.0-nightly.20250823",
34
+ "@aztec/blob-lib": "2.0.0-nightly.20250823",
35
+ "@aztec/blob-sink": "2.0.0-nightly.20250823",
36
+ "@aztec/bot": "2.0.0-nightly.20250823",
37
+ "@aztec/cli": "2.0.0-nightly.20250823",
38
+ "@aztec/constants": "2.0.0-nightly.20250823",
39
+ "@aztec/entrypoints": "2.0.0-nightly.20250823",
40
+ "@aztec/epoch-cache": "2.0.0-nightly.20250823",
41
+ "@aztec/ethereum": "2.0.0-nightly.20250823",
42
+ "@aztec/foundation": "2.0.0-nightly.20250823",
43
+ "@aztec/kv-store": "2.0.0-nightly.20250823",
44
+ "@aztec/l1-artifacts": "2.0.0-nightly.20250823",
45
+ "@aztec/merkle-tree": "2.0.0-nightly.20250823",
46
+ "@aztec/noir-contracts.js": "2.0.0-nightly.20250823",
47
+ "@aztec/noir-noirc_abi": "2.0.0-nightly.20250823",
48
+ "@aztec/noir-protocol-circuits-types": "2.0.0-nightly.20250823",
49
+ "@aztec/noir-test-contracts.js": "2.0.0-nightly.20250823",
50
+ "@aztec/p2p": "2.0.0-nightly.20250823",
51
+ "@aztec/protocol-contracts": "2.0.0-nightly.20250823",
52
+ "@aztec/prover-client": "2.0.0-nightly.20250823",
53
+ "@aztec/prover-node": "2.0.0-nightly.20250823",
54
+ "@aztec/pxe": "2.0.0-nightly.20250823",
55
+ "@aztec/sequencer-client": "2.0.0-nightly.20250823",
56
+ "@aztec/simulator": "2.0.0-nightly.20250823",
57
+ "@aztec/slasher": "2.0.0-nightly.20250823",
58
+ "@aztec/stdlib": "2.0.0-nightly.20250823",
59
+ "@aztec/telemetry-client": "2.0.0-nightly.20250823",
60
+ "@aztec/validator-client": "2.0.0-nightly.20250823",
61
+ "@aztec/world-state": "2.0.0-nightly.20250823",
62
62
  "@iarna/toml": "^2.2.5",
63
63
  "@jest/globals": "^30.0.0",
64
64
  "@noble/curves": "=1.0.0",
@@ -307,7 +307,7 @@ export class EpochsTestContext {
307
307
  }
308
308
 
309
309
  /** Waits for the aztec node to sync to the target block number. */
310
- public async waitForNodeToSync(blockNumber: number, type: 'proven' | 'finalised' | 'historic') {
310
+ public async waitForNodeToSync(blockNumber: number, type: 'proven' | 'finalized' | 'historic') {
311
311
  const waitTime = ARCHIVER_POLL_INTERVAL + WORLD_STATE_BLOCK_CHECK_INTERVAL;
312
312
  let synched = false;
313
313
  while (!synched) {
@@ -319,8 +319,8 @@ export class EpochsTestContext {
319
319
  this.logger.info(`Wait for node synch ${blockNumber} ${type}`, { blockNumber, type, syncState, tips });
320
320
  if (type === 'proven') {
321
321
  synched = tips.proven.number >= blockNumber && syncState.latestBlockNumber >= blockNumber;
322
- } else if (type === 'finalised') {
323
- synched = syncState.finalisedBlockNumber >= blockNumber;
322
+ } else if (type === 'finalized') {
323
+ synched = syncState.finalizedBlockNumber >= blockNumber;
324
324
  } else {
325
325
  synched = syncState.oldestHistoricBlockNumber >= blockNumber;
326
326
  }
@@ -16,11 +16,12 @@ import {
16
16
  import { ChainMonitor } from '@aztec/ethereum/test';
17
17
  import { SecretValue } from '@aztec/foundation/config';
18
18
  import { type Logger, createLogger } from '@aztec/foundation/log';
19
- import { RollupAbi, SlashFactoryAbi, SlasherAbi, SlashingProposerAbi, TestERC20Abi } from '@aztec/l1-artifacts';
19
+ import { EmpireSlashingProposerAbi, RollupAbi, SlasherAbi, TestERC20Abi } from '@aztec/l1-artifacts';
20
20
  import { SpamContract } from '@aztec/noir-test-contracts.js/Spam';
21
21
  import type { BootstrapNode } from '@aztec/p2p/bootstrap';
22
22
  import { createBootstrapNodeFromPrivateKey, getBootstrapNodeEnr } from '@aztec/p2p/test-helpers';
23
23
  import { tryStop } from '@aztec/stdlib/interfaces/server';
24
+ import { SlashFactoryContract } from '@aztec/stdlib/l1-contracts';
24
25
  import type { PublicDataTreeLeaf } from '@aztec/stdlib/trees';
25
26
  import { ZkPassportProofParams } from '@aztec/stdlib/zkpassport';
26
27
  import { getGenesisValues } from '@aztec/world-state/testing';
@@ -391,8 +392,8 @@ export class P2PNetworkTest {
391
392
  async getContracts(): Promise<{
392
393
  rollup: RollupContract;
393
394
  slasherContract: GetContractReturnType<typeof SlasherAbi, ViemClient>;
394
- slashingProposer: GetContractReturnType<typeof SlashingProposerAbi, ViemClient>;
395
- slashFactory: GetContractReturnType<typeof SlashFactoryAbi, ViemClient>;
395
+ slashingProposer: GetContractReturnType<typeof EmpireSlashingProposerAbi, ViemClient>;
396
+ slashFactory: SlashFactoryContract;
396
397
  }> {
397
398
  if (!this.ctx.deployL1ContractsValues) {
398
399
  throw new Error('DeployL1ContractsValues not set');
@@ -411,15 +412,14 @@ export class P2PNetworkTest {
411
412
 
412
413
  const slashingProposer = getContract({
413
414
  address: getAddress(await slasherContract.read.PROPOSER()),
414
- abi: SlashingProposerAbi,
415
+ abi: EmpireSlashingProposerAbi,
415
416
  client: this.ctx.deployL1ContractsValues.l1Client,
416
417
  });
417
418
 
418
- const slashFactory = getContract({
419
- address: getAddress(this.ctx.deployL1ContractsValues.l1ContractAddresses.slashFactoryAddress!.toString()),
420
- abi: SlashFactoryAbi,
421
- client: this.ctx.deployL1ContractsValues.l1Client,
422
- });
419
+ const slashFactory = new SlashFactoryContract(
420
+ this.ctx.deployL1ContractsValues.l1Client,
421
+ getAddress(this.ctx.deployL1ContractsValues.l1ContractAddresses.slashFactoryAddress!.toString()),
422
+ );
423
423
 
424
424
  return { rollup, slasherContract, slashingProposer, slashFactory };
425
425
  }
@@ -13,13 +13,12 @@ import {
13
13
  } from '@aztec/aztec.js';
14
14
  import type { RollupCheatCodes } from '@aztec/aztec/testing';
15
15
  import type { RollupContract, ViemClient } from '@aztec/ethereum';
16
- import { timesAsync } from '@aztec/foundation/collection';
17
- import type { SlashFactoryAbi } from '@aztec/l1-artifacts/SlashFactoryAbi';
18
- import type { SlashingProposerAbi } from '@aztec/l1-artifacts/SlashingProposerAbi';
16
+ import { timesAsync, unique } from '@aztec/foundation/collection';
17
+ import type { EmpireSlashingProposerAbi } from '@aztec/l1-artifacts/EmpireSlashingProposerAbi';
19
18
  import type { SpamContract } from '@aztec/noir-test-contracts.js/Spam';
20
19
  import { TestContract, TestContractArtifact } from '@aztec/noir-test-contracts.js/Test';
21
20
  import { PXEService, createPXEService, getPXEServiceConfig as getRpcConfig } from '@aztec/pxe/server';
22
- import { Offense, OffenseToBigInt } from '@aztec/slasher';
21
+ import type { SlashFactoryContract } from '@aztec/stdlib/l1-contracts';
23
22
 
24
23
  import type { GetContractReturnType } from 'viem';
25
24
 
@@ -109,7 +108,7 @@ export async function createPXEServiceAndPrepareTransactions(
109
108
  }
110
109
 
111
110
  export async function awaitProposalExecution(
112
- slashingProposer: GetContractReturnType<typeof SlashingProposerAbi, ViemClient>,
111
+ slashingProposer: GetContractReturnType<typeof EmpireSlashingProposerAbi, ViemClient>,
113
112
  timeoutSeconds: number,
114
113
  ) {
115
114
  await retryUntil(
@@ -154,11 +153,9 @@ export async function awaitCommitteeExists({
154
153
  * Currently assumes that the committee is the same size as the validator set.
155
154
  */
156
155
  export async function awaitCommitteeKicked({
157
- offense,
158
156
  rollup,
159
157
  cheatCodes,
160
158
  committee,
161
- slashingAmount,
162
159
  slashFactory,
163
160
  slashingProposer,
164
161
  slashingRoundSize,
@@ -166,39 +163,35 @@ export async function awaitCommitteeKicked({
166
163
  logger,
167
164
  sendDummyTx,
168
165
  }: {
169
- offense: Offense;
170
166
  rollup: RollupContract;
171
167
  cheatCodes: RollupCheatCodes;
172
168
  committee: readonly `0x${string}`[];
173
- slashingAmount: bigint;
174
- slashFactory: GetContractReturnType<typeof SlashFactoryAbi, ViemClient>;
175
- slashingProposer: GetContractReturnType<typeof SlashingProposerAbi, ViemClient>;
169
+ slashFactory: SlashFactoryContract;
170
+ slashingProposer: GetContractReturnType<typeof EmpireSlashingProposerAbi, ViemClient>;
176
171
  slashingRoundSize: number;
177
172
  aztecSlotDuration: number;
178
173
  logger: Logger;
179
174
  sendDummyTx: () => Promise<void>;
180
175
  }) {
181
- logger.info(`Waiting for slash payload to be deployed`);
182
- const expectedSlashes = Array.from({ length: committee.length }, () => slashingAmount);
183
- const sortedCommittee = [...committee].sort((a, b) => a.localeCompare(b));
184
- await retryUntil(
176
+ logger.info(`Advancing epochs so slash payload gets deployed`);
177
+ await cheatCodes.debugRollup();
178
+ await cheatCodes.advanceToNextEpoch();
179
+ await cheatCodes.advanceToNextEpoch();
180
+
181
+ // Await for the slash payload to be created and check that all committee members are slashed
182
+ const slashPayloadEvents = await retryUntil(
185
183
  async () => {
186
- const [address, _, isDeployed] = await slashFactory.read.getAddressAndIsDeployed([
187
- sortedCommittee,
188
- expectedSlashes,
189
- ]);
190
- return address && isDeployed;
184
+ const events = await slashFactory.getSlashPayloadCreatedEvents();
185
+ return events.length > 0 ? events : undefined;
191
186
  },
192
- 'slash payload deployed',
193
- 60,
187
+ 'slash payload created',
188
+ 120,
194
189
  1,
195
190
  );
196
-
197
- const slashPayloadEvents = await slashFactory.getEvents.SlashPayloadCreated();
198
191
  expect(slashPayloadEvents.length).toBe(1);
199
- expect(slashPayloadEvents[0].args.offenses).toEqual(
200
- Array.from({ length: committee.length }, () => OffenseToBigInt[offense]),
201
- );
192
+
193
+ // The uniqueness check is needed since a validator may be slashed more than once on the same round (eg because they let two epochs be pruned)
194
+ expect(unique(slashPayloadEvents[0].slashes.map(slash => slash.validator.toString()))).toHaveLength(committee.length);
202
195
 
203
196
  const attestersPre = await rollup.getAttesters();
204
197
  expect(attestersPre.length).toBe(committee.length);
@@ -221,11 +214,12 @@ export async function awaitCommitteeKicked({
221
214
  const attestersPostSlashing = await rollup.getAttesters();
222
215
  expect(attestersPostSlashing.length).toBe(0);
223
216
 
224
- for (const attester of attestersPre) {
225
- const attesterInfo = await rollup.getAttesterView(attester);
226
- // Check that status is Living
227
- expect(attesterInfo.status).toEqual(2);
228
- }
217
+ // TODO(palla/slash): Reinstate this check if applies
218
+ // for (const attester of attestersPre) {
219
+ // const attesterInfo = await rollup.getAttesterView(attester);
220
+ // // Check that status is Living
221
+ // expect(attesterInfo.status).toEqual(2);
222
+ // }
229
223
 
230
224
  await cheatCodes.debugRollup();
231
225
  await cheatCodes.advanceToNextEpoch();
@@ -19,10 +19,9 @@ import { createAndSyncProverNode, getPrivateKeyFromIndex } from './utils.js';
19
19
  import { getEndToEndTestTelemetryClient } from './with_telemetry_utils.js';
20
20
 
21
21
  // Setup snapshots will create a node with index 0, and run extra bootstrap with
22
- // index 1, so all of our loops here need to start from 2 to avoid running validators with the same key
23
- export const ATTESTER_PRIVATE_KEYS_START_INDEX = 2;
24
- // We use slasher keys after the first 10 anvil keys, note that this requires anvil to be started with more than the default 10 accounts
25
- export const SLASHER_PRIVATE_KEYS_START_INDEX = 12;
22
+ // index 1, and prover node with index 2, so all of our loops here need to start from 3
23
+ // to avoid running validators with the same key
24
+ export const ATTESTER_PRIVATE_KEYS_START_INDEX = 3;
26
25
 
27
26
  export interface NodeContext {
28
27
  node: AztecNodeService;
@@ -153,11 +152,9 @@ export async function createValidatorConfig(
153
152
  port = port ?? (await getPort());
154
153
 
155
154
  const attesterPrivateKey = bufferToHex(getPrivateKeyFromIndex(ATTESTER_PRIVATE_KEYS_START_INDEX + addressIndex)!);
156
- const slasherPrivateKey = bufferToHex(getPrivateKeyFromIndex(SLASHER_PRIVATE_KEYS_START_INDEX + addressIndex)!);
157
155
 
158
156
  config.validatorPrivateKeys = new SecretValue([attesterPrivateKey]);
159
157
  config.publisherPrivateKey = new SecretValue(attesterPrivateKey);
160
- config.slasherPrivateKey = new SecretValue(slasherPrivateKey);
161
158
 
162
159
  const nodeConfig: AztecNodeConfig = {
163
160
  ...config,
@@ -747,7 +747,7 @@ export const uniswapL1L2TestSuite = (
747
747
  nonceForSwap,
748
748
  );
749
749
  const validateActionInteraction = await ownerWallet.setPublicAuthWit({ caller: approvedUser, action }, true);
750
- await validateActionInteraction.send({ from: sponsorAddress }).wait();
750
+ await validateActionInteraction.send({ from: ownerAddress }).wait();
751
751
 
752
752
  await expect(action.simulate({ from: sponsorAddress })).rejects.toThrow(/unauthorized/);
753
753
  });