@aztec/simulator 3.0.0-nightly.20251008 → 3.0.0-nightly.20251009

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 +1 @@
1
- {"version":3,"file":"avm_simulator.d.ts","sourceRoot":"","sources":["../../../src/public/avm/avm_simulator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAG9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAKxD,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,mCAAmC,CAAC;AACvF,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAEtE,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAExC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAI1E,OAAO,EAEL,KAAK,cAAc,EAEpB,MAAM,2CAA2C,CAAC;AAOnD,qBAAa,YAAa,YAAW,qBAAqB;IAatD,OAAO,CAAC,OAAO;IACf,OAAO,CAAC,cAAc;IAbxB,OAAO,CAAC,GAAG,CAAS;IACpB,OAAO,CAAC,QAAQ,CAAqB;IACrC,OAAO,CAAC,aAAa,CAAuC;IAE5D,OAAO,CAAC,6BAA6B,CAAiD;IAEtF,OAAO,CAAC,kBAAkB,CAAY;IACtC,OAAO,CAAC,wBAAwB,CAA+B;gBAKrD,OAAO,EAAE,UAAU,EACnB,cAAc,GAAE,cAAgC,EACxD,cAAc,UAAQ;WAeJ,KAAK,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,YAAY,CAAC;WAQjD,MAAM,CACxB,YAAY,EAAE,6BAA6B,EAC3C,OAAO,EAAE,YAAY,EACrB,MAAM,EAAE,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AE5D,OAAO,CAAC,6BAA6B,CAAiD;IAEtF,OAAO,CAAC,kBAAkB,CAAY;IACtC,OAAO,CAAC,wBAAwB,CAA+B;gBAKrD,OAAO,EAAE,UAAU,EACnB,cAAc,GAAE,cAAgC,EACxD,cAAc,UAAQ;WAeJ,KAAK,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,YAAY,CAAC;WAQjD,MAAM,CACxB,YAAY,EAAE,6BAA6B,EAC3C,OAAO,EAAE,YAAY,EACrB,MAAM,EAAE,YAAY,EACpB,cAAc,EAAE,EAAE,EAClB,OAAO,EAAE,eAAe,EACxB,YAAY,EAAE,OAAO,EACrB,QAAQ,EAAE,EAAE,EAAE,EACd,YAAY,EAAE,GAAG,EACjB,yBAAyB,GAAE,OAAe,EAC1C,sBAAsB,CAAC,EAAE,MAAM;IAmBjC;;OAEG;IACU,OAAO,IAAI,OAAO,CAAC,qBAAqB,CAAC;IActD;;OAEG;IACI,WAAW,IAAI,MAAM,GAAG,SAAS;IAIxC;;;OAGG;IACU,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,qBAAqB,CAAC;YA+GhE,+BAA+B;IAoB7C,OAAO,CAAC,gBAAgB;IAQxB,OAAO,CAAC,kBAAkB;CAS3B"}
@@ -76,6 +76,7 @@ export class AvmSimulator {
76
76
  const timer = new Timer();
77
77
  assert(bytecode.length > 0, "AVM simulator can't execute empty bytecode");
78
78
  this.bytecode = bytecode;
79
+ let instructionName = 'NONE'; // This is used for logging purposes
79
80
  const { machineState } = this.context;
80
81
  const callStartGas = machineState.gasLeft; // Save gas before executing instruction (for profiling)
81
82
  try {
@@ -95,6 +96,7 @@ export class AvmSimulator {
95
96
  this.log.trace(`[PC:${machineState.pc}] [IC:${machineState.instrCounter}] ${instruction.toString()} (gasLeft l2=${machineState.l2GasLeft} da=${machineState.daGasLeft})`);
96
97
  }
97
98
  machineState.nextPc = machineState.pc + bytesRead;
99
+ instructionName = instruction.constructor.name;
98
100
  // Execute the instruction.
99
101
  // Normal returns and reverts will return normally here.
100
102
  // "Exceptional halts" will throw.
@@ -130,7 +132,8 @@ export class AvmSimulator {
130
132
  // Return results for processing by calling context
131
133
  return results;
132
134
  } catch (err) {
133
- this.log.verbose('Exceptional halt (revert by something other than REVERT opcode)');
135
+ this.log.info(`Exceptional halt (revert by something other than REVERT opcode) for instruction
136
+ ${instructionName} at pc ${machineState.pc} and instruction counter ${machineState.instrCounter}`);
134
137
  if (!(err instanceof CheckedPublicExecutionError)) {
135
138
  this.log.error(`Unchecked/unknown error thrown by AVM. This is a bug. Error: ${err}`);
136
139
  throw err;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aztec/simulator",
3
- "version": "3.0.0-nightly.20251008",
3
+ "version": "3.0.0-nightly.20251009",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  "./server": "./dest/server.js",
@@ -63,25 +63,25 @@
63
63
  ]
64
64
  },
65
65
  "dependencies": {
66
- "@aztec/constants": "3.0.0-nightly.20251008",
67
- "@aztec/foundation": "3.0.0-nightly.20251008",
68
- "@aztec/noir-acvm_js": "3.0.0-nightly.20251008",
69
- "@aztec/noir-noirc_abi": "3.0.0-nightly.20251008",
70
- "@aztec/noir-protocol-circuits-types": "3.0.0-nightly.20251008",
71
- "@aztec/noir-types": "3.0.0-nightly.20251008",
72
- "@aztec/protocol-contracts": "3.0.0-nightly.20251008",
73
- "@aztec/stdlib": "3.0.0-nightly.20251008",
74
- "@aztec/telemetry-client": "3.0.0-nightly.20251008",
75
- "@aztec/world-state": "3.0.0-nightly.20251008",
66
+ "@aztec/constants": "3.0.0-nightly.20251009",
67
+ "@aztec/foundation": "3.0.0-nightly.20251009",
68
+ "@aztec/noir-acvm_js": "3.0.0-nightly.20251009",
69
+ "@aztec/noir-noirc_abi": "3.0.0-nightly.20251009",
70
+ "@aztec/noir-protocol-circuits-types": "3.0.0-nightly.20251009",
71
+ "@aztec/noir-types": "3.0.0-nightly.20251009",
72
+ "@aztec/protocol-contracts": "3.0.0-nightly.20251009",
73
+ "@aztec/stdlib": "3.0.0-nightly.20251009",
74
+ "@aztec/telemetry-client": "3.0.0-nightly.20251009",
75
+ "@aztec/world-state": "3.0.0-nightly.20251009",
76
76
  "lodash.clonedeep": "^4.5.0",
77
77
  "lodash.merge": "^4.6.2",
78
78
  "tslib": "^2.4.0"
79
79
  },
80
80
  "devDependencies": {
81
- "@aztec/kv-store": "3.0.0-nightly.20251008",
82
- "@aztec/merkle-tree": "3.0.0-nightly.20251008",
83
- "@aztec/noir-contracts.js": "3.0.0-nightly.20251008",
84
- "@aztec/noir-test-contracts.js": "3.0.0-nightly.20251008",
81
+ "@aztec/kv-store": "3.0.0-nightly.20251009",
82
+ "@aztec/merkle-tree": "3.0.0-nightly.20251009",
83
+ "@aztec/noir-contracts.js": "3.0.0-nightly.20251009",
84
+ "@aztec/noir-test-contracts.js": "3.0.0-nightly.20251009",
85
85
  "@jest/globals": "^30.0.0",
86
86
  "@types/jest": "^30.0.0",
87
87
  "@types/lodash.clonedeep": "^4.5.7",
@@ -128,6 +128,7 @@ export class AvmSimulator implements AvmSimulatorInterface {
128
128
  assert(bytecode.length > 0, "AVM simulator can't execute empty bytecode");
129
129
 
130
130
  this.bytecode = bytecode;
131
+ let instructionName = 'NONE'; // This is used for logging purposes
131
132
 
132
133
  const { machineState } = this.context;
133
134
  const callStartGas = machineState.gasLeft; // Save gas before executing instruction (for profiling)
@@ -156,6 +157,7 @@ export class AvmSimulator implements AvmSimulatorInterface {
156
157
  }
157
158
  machineState.nextPc = machineState.pc + bytesRead;
158
159
 
160
+ instructionName = instruction.constructor.name;
159
161
  // Execute the instruction.
160
162
  // Normal returns and reverts will return normally here.
161
163
  // "Exceptional halts" will throw.
@@ -204,7 +206,10 @@ export class AvmSimulator implements AvmSimulatorInterface {
204
206
  // Return results for processing by calling context
205
207
  return results;
206
208
  } catch (err: any) {
207
- this.log.verbose('Exceptional halt (revert by something other than REVERT opcode)');
209
+ this.log.info(
210
+ `Exceptional halt (revert by something other than REVERT opcode) for instruction
211
+ ${instructionName} at pc ${machineState.pc} and instruction counter ${machineState.instrCounter}`,
212
+ );
208
213
  if (!(err instanceof CheckedPublicExecutionError)) {
209
214
  this.log.error(`Unchecked/unknown error thrown by AVM. This is a bug. Error: ${err}`);
210
215
  throw err;