From defb8ecff663e88e9eb061dd3bcb4e792602289f Mon Sep 17 00:00:00 2001 From: Ignasi Date: Thu, 1 Feb 2024 09:23:16 +0100 Subject: [PATCH] Fix poseidon exceed --- src/processor.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/processor.js b/src/processor.js index 358db5a0..78dd93e7 100644 --- a/src/processor.js +++ b/src/processor.js @@ -110,6 +110,7 @@ module.exports = class Processor { this.vm = vm; this.oldVm = cloneDeep(vm); + this.oldVm.stateManager = vm.stateManager.copy(); this.evmSteps = []; this.updatedAccounts = {}; this.isLegacyTx = false; @@ -683,7 +684,7 @@ module.exports = class Processor { if (this.smt.maxLevel > maxLevelPerTx) { console.log('WARNING: smt levels increased more than expected, re running batch with new smt levels'); this._rollbackBatch(); - i = 0; + i = -1; } } await this.consolidateBlock(); @@ -934,6 +935,7 @@ module.exports = class Processor { _rollbackBatch() { this.currentStateRoot = this.oldStateRoot; this.vm = cloneDeep(this.oldVm); + this.vm.stateManager = this.oldVm.stateManager.copy(); this.updatedAccounts = {}; }