@aztec/prover-client 1.0.0-nightly.20250612 → 1.0.0-nightly.20250613

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.
@@ -73,5 +73,5 @@ export const updateExpectedTreesFromTxs = async (db, txs)=>{
73
73
  }
74
74
  };
75
75
  export const makeGlobals = (blockNumber)=>{
76
- return new GlobalVariables(Fr.ZERO, Fr.ZERO, new Fr(blockNumber), new Fr(blockNumber), BigInt(blockNumber), EthAddress.ZERO, AztecAddress.ZERO, GasFees.empty());
76
+ return new GlobalVariables(Fr.ZERO, Fr.ZERO, blockNumber /** block number */ , new Fr(blockNumber), BigInt(blockNumber), EthAddress.ZERO, AztecAddress.ZERO, GasFees.empty());
77
77
  };
@@ -127,7 +127,7 @@ export class TestContext {
127
127
  const opts = typeof seedOrOpts === 'number' ? {
128
128
  seed: seedOrOpts
129
129
  } : seedOrOpts;
130
- const blockNum = (opts?.globalVariables ?? this.globalVariables).blockNumber.toNumber();
130
+ const blockNum = (opts?.globalVariables ?? this.globalVariables).blockNumber;
131
131
  const header = this.getBlockHeader(blockNum - 1);
132
132
  const tx = await makeBloatedProcessedTx({
133
133
  header,
@@ -146,7 +146,7 @@ export class TestContext {
146
146
  }
147
147
  /** Creates a block with the given number of txs and adds it to world-state */ async makePendingBlock(numTxs, numMsgs = 0, blockNumOrGlobals = this.globalVariables, makeProcessedTxOpts = ()=>({})) {
148
148
  const globalVariables = typeof blockNumOrGlobals === 'number' ? makeGlobals(blockNumOrGlobals) : blockNumOrGlobals;
149
- const blockNum = globalVariables.blockNumber.toNumber();
149
+ const blockNum = globalVariables.blockNumber;
150
150
  const db = await this.worldState.fork();
151
151
  const msgs = times(numMsgs, (i)=>new Fr(blockNum * 100 + i));
152
152
  const txs = await timesParallel(numTxs, (i)=>this.makeProcessedTx({
@@ -149,7 +149,7 @@ export const buildHeaderFromCircuitOutputs = runInSpan('BlockBuilderHelpers', 'b
149
149
  return new BlockHeader(rootRollupOutputs.previousArchive, contentCommitment, endState, rootRollupOutputs.endGlobalVariables, accumulatedFees, accumulatedManaUsed);
150
150
  });
151
151
  export const buildHeaderAndBodyFromTxs = runInSpan('BlockBuilderHelpers', 'buildHeaderAndBodyFromTxs', async (span, txs, globalVariables, l1ToL2Messages, db)=>{
152
- span.setAttribute(Attributes.BLOCK_NUMBER, globalVariables.blockNumber.toNumber());
152
+ span.setAttribute(Attributes.BLOCK_NUMBER, globalVariables.blockNumber);
153
153
  const stateReference = new StateReference(await getTreeSnapshot(MerkleTreeId.L1_TO_L2_MESSAGE_TREE, db), new PartialStateReference(await getTreeSnapshot(MerkleTreeId.NOTE_HASH_TREE, db), await getTreeSnapshot(MerkleTreeId.NULLIFIER_TREE, db), await getTreeSnapshot(MerkleTreeId.PUBLIC_DATA_TREE, db)));
154
154
  const previousArchive = await getTreeSnapshot(MerkleTreeId.ARCHIVE, db);
155
155
  const txEffects = txs.map((tx)=>tx.txEffect);
@@ -62,7 +62,7 @@ import { accumulateBlobs, buildBlobHints, buildHeaderFromCircuitOutputs, getEmpt
62
62
  }
63
63
  }
64
64
  get blockNumber() {
65
- return this.globalVariables.blockNumber.toNumber();
65
+ return this.globalVariables.blockNumber;
66
66
  }
67
67
  startNewBlock(numTxs, numBlobFields) {
68
68
  if (this.spongeBlobState) {
@@ -45,7 +45,7 @@ var PROVING_STATE_LIFECYCLE = /*#__PURE__*/ function(PROVING_STATE_LIFECYCLE) {
45
45
  // Adds a block to the proving state, returns its index
46
46
  // Will update the proving life cycle if this is the last block
47
47
  startNewBlock(globalVariables, l1ToL2Messages, l1ToL2MessageTreeSnapshot, l1ToL2MessageSubtreeSiblingPath, l1ToL2MessageTreeSnapshotAfterInsertion, lastArchiveSnapshot, lastArchiveSiblingPath, newArchiveSiblingPath, previousBlockHeader) {
48
- const index = globalVariables.blockNumber.toNumber() - this.firstBlockNumber;
48
+ const index = globalVariables.blockNumber - this.firstBlockNumber;
49
49
  const block = new BlockProvingState(index, globalVariables, l1ToL2Messages, l1ToL2MessageTreeSnapshot, l1ToL2MessageSubtreeSiblingPath, l1ToL2MessageTreeSnapshotAfterInsertion, lastArchiveSnapshot, lastArchiveSiblingPath, newArchiveSiblingPath, previousBlockHeader, this);
50
50
  this.blocks[index] = block;
51
51
  if (this.blocks.filter((b)=>!!b).length === this.totalNumBlocks) {
@@ -1 +1 @@
1
- {"version":3,"file":"orchestrator.d.ts","sourceRoot":"","sources":["../../src/orchestrator/orchestrator.ts"],"names":[],"mappings":"AAAA,OAAO,EAA+B,2BAA2B,EAAE,MAAM,iBAAiB,CAAC;AAU3F,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAS9C,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,KAAK,EACV,WAAW,EACX,wBAAwB,EAGxB,mBAAmB,EACpB,MAAM,iCAAiC,CAAC;AAUzC,OAAO,EAAE,KAAK,sBAAsB,EAAgB,MAAM,qBAAqB,CAAC;AAChF,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,eAAe,EAAE,KAAK,WAAW,EAAE,KAAK,EAAE,EAAmB,MAAM,kBAAkB,CAAC;AACtH,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,MAAM,EAIZ,MAAM,yBAAyB,CAAC;AAqBjC;;;;;;;;;GASG;AAEH;;GAEG;AACH,qBAAa,mBAAoB,YAAW,WAAW;IASnD,OAAO,CAAC,UAAU;IAClB,OAAO,CAAC,MAAM;IACd,OAAO,CAAC,QAAQ,CAAC,QAAQ;IAV3B,OAAO,CAAC,YAAY,CAA4C;IAChE,OAAO,CAAC,kBAAkB,CAAyB;IAEnD,OAAO,CAAC,cAAc,CAAiD;IACvE,OAAO,CAAC,OAAO,CAA6B;IAC5C,OAAO,CAAC,GAAG,CAAqD;gBAGtD,UAAU,EAAE,wBAAwB,EACpC,MAAM,EAAE,mBAAmB,EAClB,QAAQ,EAAE,EAAE,EAC7B,eAAe,GAAE,eAAsC;IAKzD,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A4B;CAWrC"}
@@ -93,10 +93,10 @@ const logger = createLogger('prover-client:orchestrator');
93
93
  if (!this.provingState?.isAcceptingBlocks()) {
94
94
  throw new Error(`Epoch not accepting further blocks`);
95
95
  }
96
- logger.info(`Starting block ${globalVariables.blockNumber.toNumber()} for slot ${globalVariables.slotNumber.toNumber()}`);
96
+ logger.info(`Starting block ${globalVariables.blockNumber} for slot ${globalVariables.slotNumber.toNumber()}`);
97
97
  // Fork world state at the end of the immediately previous block
98
- const db = await this.dbProvider.fork(globalVariables.blockNumber.toNumber() - 1);
99
- this.dbs.set(globalVariables.blockNumber.toNumber(), db);
98
+ const db = await this.dbProvider.fork(globalVariables.blockNumber - 1);
99
+ this.dbs.set(globalVariables.blockNumber, db);
100
100
  // we start the block by enqueueing all of the base parity circuits
101
101
  const { l1ToL2MessageTreeSnapshot, l1ToL2MessageSubtreeSiblingPath, l1ToL2MessageTreeSnapshotAfterInsertion, baseParityInputs } = await this.prepareBaseParityInputs(l1ToL2Messages, db);
102
102
  // Get archive snapshot before this block lands
@@ -119,7 +119,7 @@ const logger = createLogger('prover-client:orchestrator');
119
119
  logger.warn(`Provided no txs to orchestrator addTxs.`);
120
120
  return;
121
121
  }
122
- const blockNumber = txs[0].globalVariables.blockNumber.toNumber();
122
+ const blockNumber = txs[0].globalVariables.blockNumber;
123
123
  const provingState = this.provingState?.getBlockProvingStateByBlockNumber(blockNumber);
124
124
  if (!provingState) {
125
125
  throw new Error(`Block proving state for ${blockNumber} not found`);
@@ -691,7 +691,7 @@ const logger = createLogger('prover-client:orchestrator');
691
691
  }
692
692
  _ts_decorate([
693
693
  trackSpan('ProvingOrchestrator.startNewBlock', (globalVariables)=>({
694
- [Attributes.BLOCK_NUMBER]: globalVariables.blockNumber.toNumber()
694
+ [Attributes.BLOCK_NUMBER]: globalVariables.blockNumber
695
695
  }))
696
696
  ], ProvingOrchestrator.prototype, "startNewBlock", null);
697
697
  _ts_decorate([
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aztec/prover-client",
3
- "version": "1.0.0-nightly.20250612",
3
+ "version": "1.0.0-nightly.20250613",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": "./dest/index.js",
@@ -65,19 +65,19 @@
65
65
  "testEnvironment": "../../foundation/src/jest/env.mjs"
66
66
  },
67
67
  "dependencies": {
68
- "@aztec/bb-prover": "1.0.0-nightly.20250612",
69
- "@aztec/blob-lib": "1.0.0-nightly.20250612",
70
- "@aztec/constants": "1.0.0-nightly.20250612",
71
- "@aztec/ethereum": "1.0.0-nightly.20250612",
72
- "@aztec/foundation": "1.0.0-nightly.20250612",
73
- "@aztec/kv-store": "1.0.0-nightly.20250612",
74
- "@aztec/noir-protocol-circuits-types": "1.0.0-nightly.20250612",
75
- "@aztec/noir-types": "1.0.0-nightly.20250612",
76
- "@aztec/protocol-contracts": "1.0.0-nightly.20250612",
77
- "@aztec/simulator": "1.0.0-nightly.20250612",
78
- "@aztec/stdlib": "1.0.0-nightly.20250612",
79
- "@aztec/telemetry-client": "1.0.0-nightly.20250612",
80
- "@aztec/world-state": "1.0.0-nightly.20250612",
68
+ "@aztec/bb-prover": "1.0.0-nightly.20250613",
69
+ "@aztec/blob-lib": "1.0.0-nightly.20250613",
70
+ "@aztec/constants": "1.0.0-nightly.20250613",
71
+ "@aztec/ethereum": "1.0.0-nightly.20250613",
72
+ "@aztec/foundation": "1.0.0-nightly.20250613",
73
+ "@aztec/kv-store": "1.0.0-nightly.20250613",
74
+ "@aztec/noir-protocol-circuits-types": "1.0.0-nightly.20250613",
75
+ "@aztec/noir-types": "1.0.0-nightly.20250613",
76
+ "@aztec/protocol-contracts": "1.0.0-nightly.20250613",
77
+ "@aztec/simulator": "1.0.0-nightly.20250613",
78
+ "@aztec/stdlib": "1.0.0-nightly.20250613",
79
+ "@aztec/telemetry-client": "1.0.0-nightly.20250613",
80
+ "@aztec/world-state": "1.0.0-nightly.20250613",
81
81
  "@google-cloud/storage": "^7.15.0",
82
82
  "@iarna/toml": "^2.2.5",
83
83
  "commander": "^12.1.0",
@@ -87,7 +87,7 @@
87
87
  "zod": "^3.23.8"
88
88
  },
89
89
  "devDependencies": {
90
- "@aztec/noir-contracts.js": "1.0.0-nightly.20250612",
90
+ "@aztec/noir-contracts.js": "1.0.0-nightly.20250613",
91
91
  "@jest/globals": "^29.5.0",
92
92
  "@types/jest": "^29.5.0",
93
93
  "@types/node": "^22.15.17",
@@ -107,7 +107,7 @@ export const makeGlobals = (blockNumber: number) => {
107
107
  return new GlobalVariables(
108
108
  Fr.ZERO,
109
109
  Fr.ZERO,
110
- new Fr(blockNumber) /** block number */,
110
+ blockNumber /** block number */,
111
111
  new Fr(blockNumber) /** slot number */,
112
112
  BigInt(blockNumber) /** block number as pseudo-timestamp for testing */,
113
113
  EthAddress.ZERO,
@@ -164,7 +164,7 @@ export class TestContext {
164
164
  seedOrOpts?: Parameters<typeof makeBloatedProcessedTx>[0] | number,
165
165
  ): Promise<ProcessedTx> {
166
166
  const opts = typeof seedOrOpts === 'number' ? { seed: seedOrOpts } : seedOrOpts;
167
- const blockNum = (opts?.globalVariables ?? this.globalVariables).blockNumber.toNumber();
167
+ const blockNum = (opts?.globalVariables ?? this.globalVariables).blockNumber;
168
168
  const header = this.getBlockHeader(blockNum - 1);
169
169
  const tx = await makeBloatedProcessedTx({
170
170
  header,
@@ -190,7 +190,7 @@ export class TestContext {
190
190
  makeProcessedTxOpts: (index: number) => Partial<Parameters<typeof makeBloatedProcessedTx>[0]> = () => ({}),
191
191
  ) {
192
192
  const globalVariables = typeof blockNumOrGlobals === 'number' ? makeGlobals(blockNumOrGlobals) : blockNumOrGlobals;
193
- const blockNum = globalVariables.blockNumber.toNumber();
193
+ const blockNum = globalVariables.blockNumber;
194
194
  const db = await this.worldState.fork();
195
195
  const msgs = times(numMsgs, i => new Fr(blockNum * 100 + i));
196
196
  const txs = await timesParallel(numTxs, i =>
@@ -323,7 +323,7 @@ export const buildHeaderAndBodyFromTxs = runInSpan(
323
323
  l1ToL2Messages: Fr[],
324
324
  db: MerkleTreeReadOperations,
325
325
  ) => {
326
- span.setAttribute(Attributes.BLOCK_NUMBER, globalVariables.blockNumber.toNumber());
326
+ span.setAttribute(Attributes.BLOCK_NUMBER, globalVariables.blockNumber);
327
327
  const stateReference = new StateReference(
328
328
  await getTreeSnapshot(MerkleTreeId.L1_TO_L2_MESSAGE_TREE, db),
329
329
  new PartialStateReference(
@@ -89,7 +89,7 @@ export class BlockProvingState {
89
89
  }
90
90
 
91
91
  public get blockNumber() {
92
- return this.globalVariables.blockNumber.toNumber();
92
+ return this.globalVariables.blockNumber;
93
93
  }
94
94
 
95
95
  public startNewBlock(numTxs: number, numBlobFields: number) {
@@ -81,7 +81,7 @@ export class EpochProvingState {
81
81
  newArchiveSiblingPath: Tuple<Fr, typeof ARCHIVE_HEIGHT>,
82
82
  previousBlockHeader: BlockHeader,
83
83
  ): BlockProvingState {
84
- const index = globalVariables.blockNumber.toNumber() - this.firstBlockNumber;
84
+ const index = globalVariables.blockNumber - this.firstBlockNumber;
85
85
  const block = new BlockProvingState(
86
86
  index,
87
87
  globalVariables,
@@ -138,7 +138,7 @@ export class ProvingOrchestrator implements EpochProver {
138
138
  * @returns A proving ticket, containing a promise notifying of proving completion
139
139
  */
140
140
  @trackSpan('ProvingOrchestrator.startNewBlock', globalVariables => ({
141
- [Attributes.BLOCK_NUMBER]: globalVariables.blockNumber.toNumber(),
141
+ [Attributes.BLOCK_NUMBER]: globalVariables.blockNumber,
142
142
  }))
143
143
  public async startNewBlock(globalVariables: GlobalVariables, l1ToL2Messages: Fr[], previousBlockHeader: BlockHeader) {
144
144
  if (!this.provingState) {
@@ -149,13 +149,11 @@ export class ProvingOrchestrator implements EpochProver {
149
149
  throw new Error(`Epoch not accepting further blocks`);
150
150
  }
151
151
 
152
- logger.info(
153
- `Starting block ${globalVariables.blockNumber.toNumber()} for slot ${globalVariables.slotNumber.toNumber()}`,
154
- );
152
+ logger.info(`Starting block ${globalVariables.blockNumber} for slot ${globalVariables.slotNumber.toNumber()}`);
155
153
 
156
154
  // Fork world state at the end of the immediately previous block
157
- const db = await this.dbProvider.fork(globalVariables.blockNumber.toNumber() - 1);
158
- this.dbs.set(globalVariables.blockNumber.toNumber(), db);
155
+ const db = await this.dbProvider.fork(globalVariables.blockNumber - 1);
156
+ this.dbs.set(globalVariables.blockNumber, db);
159
157
 
160
158
  // we start the block by enqueueing all of the base parity circuits
161
159
  const {
@@ -202,7 +200,7 @@ export class ProvingOrchestrator implements EpochProver {
202
200
  logger.warn(`Provided no txs to orchestrator addTxs.`);
203
201
  return;
204
202
  }
205
- const blockNumber = txs[0].globalVariables.blockNumber.toNumber();
203
+ const blockNumber = txs[0].globalVariables.blockNumber;
206
204
  const provingState = this.provingState?.getBlockProvingStateByBlockNumber(blockNumber!);
207
205
  if (!provingState) {
208
206
  throw new Error(`Block proving state for ${blockNumber} not found`);