op-revm version 15 bumps the sender nonce for deposit txs only when it’s a call, so a deposit contract-creation (to == null) that errors with OutOfFunds never increments nonce, leading to the state root mismatch.
As mentioned in the OP Stack specs, when EVM processing fails and roll back the change, the from account nonce must be incremented by 1. In op-revm however, the nonce is not incremented.
This issue is valid only for pre-regolith updates. However the issue remain critical because if this nonce isn't updated, the state root differs from other clients running on pre-regolith, which can lead to chain splits.
The bug can be reproduce using https://gist.github.com/kevin-valerio/0a15d2350d111a3e0bf88181b177327a
Expected output:
- result = Halt { reason: Base(OutOfFunds), ... }
- post_nonce = 0
This issue serves mainly for tracking purposes, since it has been already shared and discussed with the core maintainer of revm.
op-revmversion 15 bumps the sender nonce for deposit txs only when it’s a call, so a deposit contract-creation (to == null) that errors withOutOfFundsnever increments nonce, leading to the state root mismatch.As mentioned in the OP Stack specs, when EVM processing fails and roll back the change, the
fromaccount nonce must be incremented by 1. Inop-revmhowever, the nonce is not incremented.This issue is valid only for pre-regolith updates. However the issue remain critical because if this nonce isn't updated, the state root differs from other clients running on pre-regolith, which can lead to chain splits.
The bug can be reproduce using https://gist.github.com/kevin-valerio/0a15d2350d111a3e0bf88181b177327a
Expected output:
-
result = Halt { reason: Base(OutOfFunds), ... }-
post_nonce = 0This issue serves mainly for tracking purposes, since it has been already shared and discussed with the core maintainer of revm.