From 54a915e19ffb4f154d599810e29eaf5be25d08ca Mon Sep 17 00:00:00 2001 From: Petko Pavlovski Date: Tue, 23 Jun 2026 21:49:07 +0300 Subject: [PATCH] chain(ethereum): treat Reth StackUnderflow/StackOverflow/OpcodeNotFound halts as deterministic --- chain/ethereum/src/call_helper.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/chain/ethereum/src/call_helper.rs b/chain/ethereum/src/call_helper.rs index 89170e96cb5..61bc947c49c 100644 --- a/chain/ethereum/src/call_helper.rs +++ b/chain/ethereum/src/call_helper.rs @@ -58,6 +58,17 @@ const RPC_EXECUTION_ERRORS: &[&str] = &[ "invalidjump", "notactivated", "invalidfeopcode", + // Reth surfaces EVM halts via `EvmHalt(HaltReason)`, formatted with the + // reason's `Debug` repr (`"EVM error: {0:?}"`). revm's `HaltReason` + // variants are CamelCase with no spaces, so e.g. a stack underflow arrives + // as "EVM error: StackUnderflow", which the space-separated "stack + // underflow" above does not match. "invalidjump"/"invalidfeopcode" already + // cover the matching variants; these add the rest. Reth's OutOfGas is + // handled before EvmHalt and rendered as "out of gas: ...", so it is + // already covered above. See https://github.com/streamingfast/eth-go/pull/10. + "stackunderflow", + "stackoverflow", + "opcodenotfound", ]; /// Helper that checks if a geth style RPC error message corresponds to a revert.