@aztec/prover-client 3.0.0-nightly.20251014 → 3.0.0-nightly.20251016

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.
@@ -1,4 +1,5 @@
1
1
  import type { Logger } from '@aztec/foundation/log';
2
+ import type { FieldsOf } from '@aztec/foundation/types';
2
3
  import { type CircuitSimulator } from '@aztec/simulator/server';
3
4
  import type { MerkleTreeWriteOperations } from '@aztec/stdlib/interfaces/server';
4
5
  import { CheckpointConstantData } from '@aztec/stdlib/rollup';
@@ -17,6 +18,6 @@ export declare function getSimulator(config: {
17
18
  acvmBinaryPath: string | undefined;
18
19
  }, logger?: Logger): Promise<CircuitSimulator>;
19
20
  export declare const updateExpectedTreesFromTxs: (db: MerkleTreeWriteOperations, txs: ProcessedTx[]) => Promise<void>;
20
- export declare const makeGlobals: (blockNumber: number, slotNumber?: number) => GlobalVariables;
21
- export declare const makeCheckpointConstants: (slotNumber: number) => CheckpointConstantData;
21
+ export declare const makeGlobals: (blockNumber: number, slotNumber?: number, overrides?: Partial<FieldsOf<GlobalVariables> & FieldsOf<CheckpointConstantData>>) => GlobalVariables;
22
+ export declare const makeCheckpointConstants: (slotNumber: number, overrides?: Partial<FieldsOf<CheckpointConstantData>>) => CheckpointConstantData;
22
23
  //# sourceMappingURL=fixtures.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"fixtures.d.ts","sourceRoot":"","sources":["../../src/mocks/fixtures.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAIpD,OAAO,EAAE,KAAK,gBAAgB,EAA+C,MAAM,yBAAyB,CAAC;AAG7G,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AACjF,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAE9D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAA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d,OAAO,CAAC,gBAAgB,CAAC,CAe3B;AAGD,eAAO,MAAM,0BAA0B,GAAU,IAAI,yBAAyB,EAAE,KAAK,WAAW,EAAE,kBAgBjG,CAAC;AAEF,eAAO,MAAM,WAAW,GACtB,aAAa,MAAM,EACnB,mBAAwB,EACxB,YAAW,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAC,GAAG,QAAQ,CAAC,sBAAsB,CAAC,CAAM,oBActF,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAClC,YAAY,MAAM,EAClB,YAAW,OAAO,CAAC,QAAQ,CAAC,sBAAsB,CAAC,CAAM,2BAc1D,CAAC"}
@@ -75,11 +75,21 @@ export const updateExpectedTreesFromTxs = async (db, txs)=>{
75
75
  await db.sequentialInsert(MerkleTreeId.PUBLIC_DATA_TREE, tx.txEffect.publicDataWrites.map((write)=>write.toBuffer()));
76
76
  }
77
77
  };
78
- export const makeGlobals = (blockNumber, slotNumber = blockNumber)=>{
79
- const checkpointConstants = makeCheckpointConstants(slotNumber);
80
- return new GlobalVariables(checkpointConstants.chainId, checkpointConstants.version, blockNumber /** block number */ , new Fr(slotNumber), BigInt(blockNumber), checkpointConstants.coinbase, checkpointConstants.feeRecipient, checkpointConstants.gasFees);
78
+ export const makeGlobals = (blockNumber, slotNumber = blockNumber, overrides = {})=>{
79
+ const checkpointConstants = makeCheckpointConstants(slotNumber, overrides);
80
+ return GlobalVariables.from({
81
+ chainId: checkpointConstants.chainId,
82
+ version: checkpointConstants.version,
83
+ blockNumber,
84
+ slotNumber: new Fr(slotNumber),
85
+ timestamp: BigInt(blockNumber),
86
+ coinbase: checkpointConstants.coinbase,
87
+ feeRecipient: checkpointConstants.feeRecipient,
88
+ gasFees: checkpointConstants.gasFees,
89
+ ...overrides
90
+ });
81
91
  };
82
- export const makeCheckpointConstants = (slotNumber)=>{
92
+ export const makeCheckpointConstants = (slotNumber, overrides = {})=>{
83
93
  return CheckpointConstantData.from({
84
94
  chainId: Fr.ZERO,
85
95
  version: Fr.ZERO,
@@ -89,6 +99,7 @@ export const makeCheckpointConstants = (slotNumber)=>{
89
99
  slotNumber: new Fr(slotNumber),
90
100
  coinbase: EthAddress.ZERO,
91
101
  feeRecipient: AztecAddress.ZERO,
92
- gasFees: GasFees.empty()
102
+ gasFees: GasFees.empty(),
103
+ ...overrides
93
104
  });
94
105
  };
@@ -1,6 +1,7 @@
1
1
  import type { BBProverConfig } from '@aztec/bb-prover';
2
2
  import { Fr } from '@aztec/foundation/fields';
3
3
  import type { Logger } from '@aztec/foundation/log';
4
+ import type { FieldsOf } from '@aztec/foundation/types';
4
5
  import { SimpleContractDataSource } from '@aztec/simulator/public/fixtures';
5
6
  import { AztecAddress } from '@aztec/stdlib/aztec-address';
6
7
  import type { ServerCircuitProver } from '@aztec/stdlib/interfaces/server';
@@ -52,12 +53,13 @@ export declare class TestContext {
52
53
  txs: ProcessedTx[];
53
54
  l1ToL2Messages: Fr[];
54
55
  }>;
55
- makePendingBlocksInCheckpoint(numBlocks: number, { checkpointIndex, numTxsPerBlock, numL1ToL2Messages, firstBlockNumber, makeProcessedTxOpts, }?: {
56
+ makePendingBlocksInCheckpoint(numBlocks: number, { checkpointIndex, numTxsPerBlock, numL1ToL2Messages, firstBlockNumber, makeGlobalVariablesOpts, makeProcessedTxOpts, }?: {
56
57
  checkpointIndex?: number;
57
58
  numTxsPerBlock?: number | number[];
58
59
  numL1ToL2Messages?: number;
59
60
  firstBlockNumber?: number;
60
- makeProcessedTxOpts?: (index: number) => Partial<Parameters<typeof makeBloatedProcessedTx>[0]>;
61
+ makeGlobalVariablesOpts?: (blockNumber: number, checkpointIndex: number) => Partial<FieldsOf<GlobalVariables> & FieldsOf<CheckpointConstantData>>;
62
+ makeProcessedTxOpts?: (blockGlobalVariables: GlobalVariables, txIndex: number) => Partial<Parameters<typeof makeBloatedProcessedTx>[0]>;
61
63
  }): Promise<{
62
64
  blocks: {
63
65
  header: BlockHeader;
@@ -1 +1 @@
1
- {"version":3,"file":"test_context.d.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AAU,CAAC,OAAO,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;KAC3F;;;;;IA6BK,6BAA6B,CACxC,SAAS,EAAE,MAAM,EACjB,EACE,eAAmB,EACnB,cAAkB,EAClB,iBAAqB,EACrB,gBAAiE,EACjE,uBAAoC,EACpC,mBAAgC,GACjC,GAAE;QACD,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,cAAc,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;QACnC,iBAAiB,CAAC,EAAE,MAAM,CAAC;QAC3B,gBAAgB,CAAC,EAAE,MAAM,CAAC;QAC1B,uBAAuB,CAAC,EAAE,CACxB,WAAW,EAAE,MAAM,EACnB,eAAe,EAAE,MAAM,KACpB,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAC,GAAG,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC;QAC3E,mBAAmB,CAAC,EAAE,CACpB,oBAAoB,EAAE,eAAe,EACrC,OAAO,EAAE,MAAM,KACZ,OAAO,CAAC,UAAU,CAAC,OAAO,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;KACvD;;oBAkCkB,WAAW;iBAAO,WAAW,EAAE;;;;;IA0B5C,sBAAsB,CACjC,GAAG,EAAE,EAAE,EAAE,EACT,EACE,eAA4B,EAC5B,iBAAqB,EACrB,kBAAkB,GACnB,GAAE;QACD,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,iBAAiB,CAAC,EAAE,MAAM,CAAC;QAC3B,kBAAkB,CAAC,EAAE,wBAAwB,CAAC;KAC1C;YAqBM,YAAY;CAuB3B;AAED,cAAM,uBAAwB,SAAQ,mBAAmB;IAChD,2CAA2C,UAAS;cAIxC,kCAAkC,CAAC,YAAY,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;CAMtG"}
@@ -123,13 +123,14 @@ export class TestContext {
123
123
  }
124
124
  }
125
125
  async makeProcessedTx(opts) {
126
- const blockNum = (opts?.globalVariables ?? this.globalVariables).blockNumber;
127
- const header = opts?.header ?? this.getBlockHeader(blockNum - 1);
126
+ const globalVariables = opts?.globalVariables ?? this.globalVariables;
127
+ const blockNumber = globalVariables.blockNumber;
128
+ const header = opts?.header ?? this.getBlockHeader(blockNumber - 1);
128
129
  const tx = await makeBloatedProcessedTx({
129
130
  header,
130
131
  vkTreeRoot: getVKTreeRoot(),
131
132
  protocolContracts: ProtocolContractsList,
132
- globalVariables: this.globalVariables,
133
+ globalVariables,
133
134
  feePayer: this.feePayer,
134
135
  ...opts
135
136
  });
@@ -165,13 +166,13 @@ export class TestContext {
165
166
  l1ToL2Messages
166
167
  };
167
168
  }
168
- async makePendingBlocksInCheckpoint(numBlocks, { checkpointIndex = 0, numTxsPerBlock = 1, numL1ToL2Messages = 0, firstBlockNumber = this.blockNumber + checkpointIndex * numBlocks, makeProcessedTxOpts = ()=>({}) } = {}) {
169
+ async makePendingBlocksInCheckpoint(numBlocks, { checkpointIndex = 0, numTxsPerBlock = 1, numL1ToL2Messages = 0, firstBlockNumber = this.blockNumber + checkpointIndex * numBlocks, makeGlobalVariablesOpts = ()=>({}), makeProcessedTxOpts = ()=>({}) } = {}) {
169
170
  const slotNumber = this.firstCheckpointNumber.toNumber() + checkpointIndex;
170
171
  const l1ToL2Messages = times(numL1ToL2Messages, (i)=>new Fr(slotNumber * 100 + i));
171
172
  const merkleTrees = await this.worldState.fork();
172
173
  await merkleTrees.appendLeaves(MerkleTreeId.L1_TO_L2_MESSAGE_TREE, padArrayEnd(l1ToL2Messages, Fr.ZERO, NUMBER_OF_L1_L2_MESSAGES_PER_ROLLUP));
173
174
  const newL1ToL2Snapshot = await getTreeSnapshot(MerkleTreeId.L1_TO_L2_MESSAGE_TREE, merkleTrees);
174
- const blockGlobalVariables = times(numBlocks, (i)=>makeGlobals(firstBlockNumber + i, slotNumber));
175
+ const blockGlobalVariables = times(numBlocks, (i)=>makeGlobals(firstBlockNumber + i, slotNumber, makeGlobalVariablesOpts(firstBlockNumber + i, checkpointIndex)));
175
176
  let totalTxs = 0;
176
177
  const blockTxs = await timesParallel(numBlocks, (blockIndex)=>{
177
178
  const txIndexOffset = totalTxs;
@@ -182,7 +183,7 @@ export class TestContext {
182
183
  globalVariables: blockGlobalVariables[blockIndex],
183
184
  header: this.getBlockHeader(firstBlockNumber - 1),
184
185
  newL1ToL2Snapshot,
185
- ...makeProcessedTxOpts(txIndexOffset + txIndex)
186
+ ...makeProcessedTxOpts(blockGlobalVariables[blockIndex], txIndexOffset + txIndex)
186
187
  }));
187
188
  });
188
189
  const blockBlobFields = blockTxs.map((txs)=>getBlockBlobFields(txs.map((tx)=>tx.txEffect)));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aztec/prover-client",
3
- "version": "3.0.0-nightly.20251014",
3
+ "version": "3.0.0-nightly.20251016",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": "./dest/index.js",
@@ -67,19 +67,19 @@
67
67
  ]
68
68
  },
69
69
  "dependencies": {
70
- "@aztec/bb-prover": "3.0.0-nightly.20251014",
71
- "@aztec/blob-lib": "3.0.0-nightly.20251014",
72
- "@aztec/constants": "3.0.0-nightly.20251014",
73
- "@aztec/ethereum": "3.0.0-nightly.20251014",
74
- "@aztec/foundation": "3.0.0-nightly.20251014",
75
- "@aztec/kv-store": "3.0.0-nightly.20251014",
76
- "@aztec/noir-protocol-circuits-types": "3.0.0-nightly.20251014",
77
- "@aztec/noir-types": "3.0.0-nightly.20251014",
78
- "@aztec/protocol-contracts": "3.0.0-nightly.20251014",
79
- "@aztec/simulator": "3.0.0-nightly.20251014",
80
- "@aztec/stdlib": "3.0.0-nightly.20251014",
81
- "@aztec/telemetry-client": "3.0.0-nightly.20251014",
82
- "@aztec/world-state": "3.0.0-nightly.20251014",
70
+ "@aztec/bb-prover": "3.0.0-nightly.20251016",
71
+ "@aztec/blob-lib": "3.0.0-nightly.20251016",
72
+ "@aztec/constants": "3.0.0-nightly.20251016",
73
+ "@aztec/ethereum": "3.0.0-nightly.20251016",
74
+ "@aztec/foundation": "3.0.0-nightly.20251016",
75
+ "@aztec/kv-store": "3.0.0-nightly.20251016",
76
+ "@aztec/noir-protocol-circuits-types": "3.0.0-nightly.20251016",
77
+ "@aztec/noir-types": "3.0.0-nightly.20251016",
78
+ "@aztec/protocol-contracts": "3.0.0-nightly.20251016",
79
+ "@aztec/simulator": "3.0.0-nightly.20251016",
80
+ "@aztec/stdlib": "3.0.0-nightly.20251016",
81
+ "@aztec/telemetry-client": "3.0.0-nightly.20251016",
82
+ "@aztec/world-state": "3.0.0-nightly.20251016",
83
83
  "@google-cloud/storage": "^7.15.0",
84
84
  "@iarna/toml": "^2.2.5",
85
85
  "commander": "^12.1.0",
@@ -89,7 +89,7 @@
89
89
  "zod": "^3.23.8"
90
90
  },
91
91
  "devDependencies": {
92
- "@aztec/noir-contracts.js": "3.0.0-nightly.20251014",
92
+ "@aztec/noir-contracts.js": "3.0.0-nightly.20251016",
93
93
  "@jest/globals": "^30.0.0",
94
94
  "@types/jest": "^30.0.0",
95
95
  "@types/node": "^22.15.17",
@@ -4,6 +4,7 @@ import { randomBytes } from '@aztec/foundation/crypto';
4
4
  import { EthAddress } from '@aztec/foundation/eth-address';
5
5
  import { Fr } from '@aztec/foundation/fields';
6
6
  import type { Logger } from '@aztec/foundation/log';
7
+ import type { FieldsOf } from '@aztec/foundation/types';
7
8
  import { fileURLToPath } from '@aztec/foundation/url';
8
9
  import { getVKTreeRoot } from '@aztec/noir-protocol-circuits-types/vk-tree';
9
10
  import { protocolContractsHash } from '@aztec/protocol-contracts';
@@ -106,21 +107,29 @@ export const updateExpectedTreesFromTxs = async (db: MerkleTreeWriteOperations,
106
107
  }
107
108
  };
108
109
 
109
- export const makeGlobals = (blockNumber: number, slotNumber = blockNumber) => {
110
- const checkpointConstants = makeCheckpointConstants(slotNumber);
111
- return new GlobalVariables(
112
- checkpointConstants.chainId,
113
- checkpointConstants.version,
110
+ export const makeGlobals = (
111
+ blockNumber: number,
112
+ slotNumber = blockNumber,
113
+ overrides: Partial<FieldsOf<GlobalVariables> & FieldsOf<CheckpointConstantData>> = {},
114
+ ) => {
115
+ const checkpointConstants = makeCheckpointConstants(slotNumber, overrides);
116
+ return GlobalVariables.from({
117
+ chainId: checkpointConstants.chainId,
118
+ version: checkpointConstants.version,
114
119
  blockNumber /** block number */,
115
- new Fr(slotNumber) /** slot number */,
116
- BigInt(blockNumber) /** block number as pseudo-timestamp for testing */,
117
- checkpointConstants.coinbase,
118
- checkpointConstants.feeRecipient,
119
- checkpointConstants.gasFees,
120
- );
120
+ slotNumber: new Fr(slotNumber) /** slot number */,
121
+ timestamp: BigInt(blockNumber) /** block number as pseudo-timestamp for testing */,
122
+ coinbase: checkpointConstants.coinbase,
123
+ feeRecipient: checkpointConstants.feeRecipient,
124
+ gasFees: checkpointConstants.gasFees,
125
+ ...overrides,
126
+ });
121
127
  };
122
128
 
123
- export const makeCheckpointConstants = (slotNumber: number) => {
129
+ export const makeCheckpointConstants = (
130
+ slotNumber: number,
131
+ overrides: Partial<FieldsOf<CheckpointConstantData>> = {},
132
+ ) => {
124
133
  return CheckpointConstantData.from({
125
134
  chainId: Fr.ZERO,
126
135
  version: Fr.ZERO,
@@ -131,5 +140,6 @@ export const makeCheckpointConstants = (slotNumber: number) => {
131
140
  coinbase: EthAddress.ZERO,
132
141
  feeRecipient: AztecAddress.ZERO,
133
142
  gasFees: GasFees.empty(),
143
+ ...overrides,
134
144
  });
135
145
  };
@@ -5,6 +5,7 @@ import { padArrayEnd, times, timesParallel } from '@aztec/foundation/collection'
5
5
  import { Fr } from '@aztec/foundation/fields';
6
6
  import type { Logger } from '@aztec/foundation/log';
7
7
  import { TestDateProvider } from '@aztec/foundation/timer';
8
+ import type { FieldsOf } from '@aztec/foundation/types';
8
9
  import { getVKTreeRoot } from '@aztec/noir-protocol-circuits-types/vk-tree';
9
10
  import { ProtocolContractsList } from '@aztec/protocol-contracts';
10
11
  import { computeFeePayerBalanceLeafSlot } from '@aztec/protocol-contracts/fee-juice';
@@ -170,13 +171,14 @@ export class TestContext {
170
171
  }
171
172
 
172
173
  async makeProcessedTx(opts?: Parameters<typeof makeBloatedProcessedTx>[0]): Promise<ProcessedTx> {
173
- const blockNum = (opts?.globalVariables ?? this.globalVariables).blockNumber;
174
- const header = opts?.header ?? this.getBlockHeader(blockNum - 1);
174
+ const globalVariables = opts?.globalVariables ?? this.globalVariables;
175
+ const blockNumber = globalVariables.blockNumber;
176
+ const header = opts?.header ?? this.getBlockHeader(blockNumber - 1);
175
177
  const tx = await makeBloatedProcessedTx({
176
178
  header,
177
179
  vkTreeRoot: getVKTreeRoot(),
178
180
  protocolContracts: ProtocolContractsList,
179
- globalVariables: this.globalVariables,
181
+ globalVariables,
180
182
  feePayer: this.feePayer,
181
183
  ...opts,
182
184
  });
@@ -237,13 +239,21 @@ export class TestContext {
237
239
  numTxsPerBlock = 1,
238
240
  numL1ToL2Messages = 0,
239
241
  firstBlockNumber = this.blockNumber + checkpointIndex * numBlocks,
242
+ makeGlobalVariablesOpts = () => ({}),
240
243
  makeProcessedTxOpts = () => ({}),
241
244
  }: {
242
245
  checkpointIndex?: number;
243
246
  numTxsPerBlock?: number | number[];
244
247
  numL1ToL2Messages?: number;
245
248
  firstBlockNumber?: number;
246
- makeProcessedTxOpts?: (index: number) => Partial<Parameters<typeof makeBloatedProcessedTx>[0]>;
249
+ makeGlobalVariablesOpts?: (
250
+ blockNumber: number,
251
+ checkpointIndex: number,
252
+ ) => Partial<FieldsOf<GlobalVariables> & FieldsOf<CheckpointConstantData>>;
253
+ makeProcessedTxOpts?: (
254
+ blockGlobalVariables: GlobalVariables,
255
+ txIndex: number,
256
+ ) => Partial<Parameters<typeof makeBloatedProcessedTx>[0]>;
247
257
  } = {},
248
258
  ) {
249
259
  const slotNumber = this.firstCheckpointNumber.toNumber() + checkpointIndex;
@@ -255,7 +265,9 @@ export class TestContext {
255
265
  );
256
266
  const newL1ToL2Snapshot = await getTreeSnapshot(MerkleTreeId.L1_TO_L2_MESSAGE_TREE, merkleTrees);
257
267
 
258
- const blockGlobalVariables = times(numBlocks, i => makeGlobals(firstBlockNumber + i, slotNumber));
268
+ const blockGlobalVariables = times(numBlocks, i =>
269
+ makeGlobals(firstBlockNumber + i, slotNumber, makeGlobalVariablesOpts(firstBlockNumber + i, checkpointIndex)),
270
+ );
259
271
  let totalTxs = 0;
260
272
  const blockTxs = await timesParallel(numBlocks, blockIndex => {
261
273
  const txIndexOffset = totalTxs;
@@ -267,7 +279,7 @@ export class TestContext {
267
279
  globalVariables: blockGlobalVariables[blockIndex],
268
280
  header: this.getBlockHeader(firstBlockNumber - 1),
269
281
  newL1ToL2Snapshot,
270
- ...makeProcessedTxOpts(txIndexOffset + txIndex),
282
+ ...makeProcessedTxOpts(blockGlobalVariables[blockIndex], txIndexOffset + txIndex),
271
283
  }),
272
284
  );
273
285
  });