@aztec/ethereum 3.0.0-nightly.20251124 → 3.0.0-nightly.20251126

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.
@@ -69,11 +69,7 @@ export class RollupCheatCodes {
69
69
  /** The pending chain tip */ pending: bigint;
70
70
  /** The proven chain tip */ proven: bigint;
71
71
  }> {
72
- const res = await this.rollup.read.getTips();
73
- return {
74
- pending: res.pendingBlockNumber,
75
- proven: res.provenBlockNumber,
76
- };
72
+ return await this.rollup.read.getTips();
77
73
  }
78
74
 
79
75
  /**
@@ -81,16 +77,16 @@ export class RollupCheatCodes {
81
77
  */
82
78
  public async debugRollup() {
83
79
  const rollup = new RollupContract(this.client, this.rollup.address);
84
- const pendingNum = await rollup.getBlockNumber();
85
- const provenNum = await rollup.getProvenBlockNumber();
80
+ const pendingNum = await rollup.getCheckpointNumber();
81
+ const provenNum = await rollup.getProvenCheckpointNumber();
86
82
  const validators = await rollup.getAttesters();
87
83
  const committee = await rollup.getCurrentEpochCommittee();
88
84
  const archive = await rollup.archive();
89
85
  const slot = await this.getSlot();
90
86
  const epochNum = await rollup.getEpochNumberForSlotNumber(slot);
91
87
 
92
- this.logger.info(`Pending block num: ${pendingNum}`);
93
- this.logger.info(`Proven block num: ${provenNum}`);
88
+ this.logger.info(`Pending checkpoint num: ${pendingNum}`);
89
+ this.logger.info(`Proven checkpoint num: ${provenNum}`);
94
90
  this.logger.info(`Validators: ${validators.map(v => v.toString()).join(', ')}`);
95
91
  this.logger.info(`Committee: ${committee?.map(v => v.toString()).join(', ')}`);
96
92
  this.logger.info(`Archive: ${archive}`);
@@ -171,34 +167,34 @@ export class RollupCheatCodes {
171
167
  }
172
168
 
173
169
  /**
174
- * Marks the specified block (or latest if none) as proven
175
- * @param maybeBlockNumber - The block number to mark as proven (defaults to latest pending)
170
+ * Marks the specified checkpoint (or latest if none) as proven
171
+ * @param maybeCheckpointNumber - The checkpoint number to mark as proven (defaults to latest pending)
176
172
  */
177
- public markAsProven(maybeBlockNumber?: number | bigint) {
173
+ public markAsProven(maybeCheckpointNumber?: number | bigint) {
178
174
  return this.ethCheatCodes.execWithPausedAnvil(async () => {
179
175
  const tipsBefore = await this.getTips();
180
176
  const { pending, proven } = tipsBefore;
181
177
 
182
- let blockNumber = maybeBlockNumber;
183
- if (blockNumber === undefined || blockNumber > pending) {
184
- blockNumber = pending;
178
+ let checkpointNumber = maybeCheckpointNumber;
179
+ if (checkpointNumber === undefined || checkpointNumber > pending) {
180
+ checkpointNumber = pending;
185
181
  }
186
- if (blockNumber <= proven) {
187
- this.logger.debug(`Block ${blockNumber} is already proven`);
182
+ if (checkpointNumber <= proven) {
183
+ this.logger.debug(`Checkpoint ${checkpointNumber} is already proven`);
188
184
  return;
189
185
  }
190
186
 
191
187
  // @note @LHerskind this is heavily dependent on the storage layout and size of values
192
188
  // The rollupStore is a struct and if the size of elements or the struct changes, this can break
193
- const provenBlockNumberSlot = hexToBigInt(RollupContract.stfStorageSlot);
189
+ const provenCheckpointNumberSlot = hexToBigInt(RollupContract.stfStorageSlot);
194
190
 
195
191
  // Need to pack it as a single 32 byte word
196
- const newValue = (BigInt(tipsBefore.pending) << 128n) | BigInt(blockNumber);
197
- await this.ethCheatCodes.store(EthAddress.fromString(this.rollup.address), provenBlockNumberSlot, newValue);
192
+ const newValue = (BigInt(tipsBefore.pending) << 128n) | BigInt(checkpointNumber);
193
+ await this.ethCheatCodes.store(EthAddress.fromString(this.rollup.address), provenCheckpointNumberSlot, newValue);
198
194
 
199
195
  const tipsAfter = await this.getTips();
200
196
  if (tipsAfter.pending < tipsAfter.proven) {
201
- throw new Error('Overwrote pending tip to a block in the past');
197
+ throw new Error('Overwrote pending tip to a checkpoint in the past');
202
198
  }
203
199
 
204
200
  this.logger.info(
@@ -209,7 +205,7 @@ export class RollupCheatCodes {
209
205
 
210
206
  /**
211
207
  * Overrides the inProgress field of the Inbox contract state
212
- * @param howMuch - How many blocks to move it forward
208
+ * @param howMuch - How many checkpoints to move it forward
213
209
  */
214
210
  public advanceInboxInProgress(howMuch: number | bigint): Promise<bigint> {
215
211
  return this.ethCheatCodes.execWithPausedAnvil(async () => {