diff --git a/arithmetization/src/main/java/net/consensys/linea/blockcapture/BlockCapturer.java b/arithmetization/src/main/java/net/consensys/linea/blockcapture/BlockCapturer.java index 2d5e409ba7..24ea5ea57f 100644 --- a/arithmetization/src/main/java/net/consensys/linea/blockcapture/BlockCapturer.java +++ b/arithmetization/src/main/java/net/consensys/linea/blockcapture/BlockCapturer.java @@ -111,6 +111,16 @@ public void tracePreExecution(MessageFrame frame) { } } + // SSTORE needs to know the previous storage value for correct gas computation + case SSTORE -> { + if (frame.stackSize() > 1) { + final Account account = frame.getWorldUpdater().get(frame.getRecipientAddress()); + final Address address = account.getAddress(); + final UInt256 key = UInt256.fromBytes(frame.getStackItem(0)); + this.reaper.touchStorage(address, key); + } + } + // These access contracts potentially existing before the conflation played out. case CALL, CALLCODE, DELEGATECALL, STATICCALL -> { if (frame.stackSize() > 1) {