From 02c8c7d20bcbe00b5650e036dfb7fd718b073b70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Bojarski?= <54240434+letypequividelespoubelles@users.noreply.github.com> Date: Tue, 12 Nov 2024 07:16:52 +0100 Subject: [PATCH] fix hub lineCounter when pop transaction (#1489) Signed-off-by: F Bojarski --- .../main/java/net/consensys/linea/zktracer/module/hub/Hub.java | 3 ++- .../java/net/consensys/linea/zktracer/module/hub/State.java | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/hub/Hub.java b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/hub/Hub.java index 227efbce43..8ae40f8c12 100644 --- a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/hub/Hub.java +++ b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/hub/Hub.java @@ -436,6 +436,8 @@ public Hub( @Override public void enterTransaction() { + // Note: txStack.enter(); happens at traceStartTransaction as it requires world, etc + state.enter(); transients.conflation().stackHeightChecksForStackUnderflows().enter(); transients.conflation().stackHeightChecksForStackOverflows().enter(); for (Module m : modules) { @@ -492,7 +494,6 @@ public void traceEndBlock(final BlockHeader blockHeader, final BlockBody blockBo public void traceStartTransaction(final WorldView world, final Transaction tx) { pch.reset(); - state.enter(); txStack.enterTransaction(world, tx, transients.block()); final TransactionProcessingMetadata transactionProcessingMetadata = txStack.current(); diff --git a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/hub/State.java b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/hub/State.java index 4232b574b6..e311d0c13b 100644 --- a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/hub/State.java +++ b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/hub/State.java @@ -119,11 +119,13 @@ public void enter() { } else { state.push(this.current().spinOff()); } + lineCounter.enter(); } @Override public void pop() { state.pop(); + lineCounter.pop(); } /** Describes the Hub state during a given transaction. */