@typeberry/lib 0.5.8-2073cb2 → 0.5.8-857ec24

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@typeberry/lib",
3
- "version": "0.5.8-2073cb2",
3
+ "version": "0.5.8-857ec24",
4
4
  "description": "Typeberry Library",
5
5
  "main": "./bin/lib/index.js",
6
6
  "types": "./bin/lib/index.d.ts",
@@ -52,7 +52,7 @@ export class HostCallsExecutor {
52
52
  this.ioTracer?.logPanic(pvmInstance.getExitParam() ?? 0, pc, gas, registers);
53
53
  return { consumedGas, status: ReturnStatus.PANIC };
54
54
  }
55
- async execute(pvmInstance) {
55
+ async execute(pvmInstance, initialPc) {
56
56
  const ioTracker = this.ioTracer?.tracker() ?? null;
57
57
  const registers = new HostCallRegisters(pvmInstance.registers.getAllEncoded());
58
58
  registers.ioTracker = ioTracker;
@@ -60,7 +60,7 @@ export class HostCallsExecutor {
60
60
  memory.ioTracker = ioTracker;
61
61
  const gas = pvmInstance.gas;
62
62
  // log start of execution (note the PVM initialisation should be logged already)
63
- this.ioTracer?.logStart(pvmInstance.getPC(), pvmInstance.gas.get(), registers);
63
+ this.ioTracer?.logStart(initialPc, pvmInstance.gas.get(), registers);
64
64
  for (;;) {
65
65
  // execute program as much as we can
66
66
  pvmInstance.runProgram();
@@ -120,7 +120,7 @@ export class HostCallsExecutor {
120
120
  pvmInstance.resetJam(program, args, initialPc, initialGas);
121
121
  try {
122
122
  this.ioTracer?.logProgram(program, args);
123
- return await this.execute(pvmInstance);
123
+ return await this.execute(pvmInstance, initialPc);
124
124
  }
125
125
  finally {
126
126
  this.pvmInstanceManager.releaseInstance(pvmInstance);