From c190c7aedfdabfd357d549eb15bc071d0ad62653 Mon Sep 17 00:00:00 2001 From: incrypto32 Date: Fri, 13 Feb 2026 12:36:45 +0400 Subject: [PATCH] chain(ethereum): Expand deterministic RPC execution errors list (#6355) --- chain/ethereum/src/ethereum_adapter.rs | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/chain/ethereum/src/ethereum_adapter.rs b/chain/ethereum/src/ethereum_adapter.rs index 3ca046f359b..23dfbb46335 100644 --- a/chain/ethereum/src/ethereum_adapter.rs +++ b/chain/ethereum/src/ethereum_adapter.rs @@ -624,10 +624,10 @@ impl EthereumAdapter { const XDAI_REVERT: &str = "revert"; - // Deterministic Geth execution errors. We might need to expand this as + // Deterministic RPC execution errors. We might need to expand this as // subgraphs come across other errors. See // https://github.com/ethereum/go-ethereum/blob/cd57d5cd38ef692de8fbedaa56598b4e9fbfbabc/core/vm/errors.go - const GETH_EXECUTION_ERRORS: &[&str] = &[ + const RPC_EXECUTION_ERRORS: &[&str] = &[ // The "revert" substring covers a few known error messages, including: // Hardhat: "error: transaction reverted", // Ganache and Moonbeam: "vm exception while processing transaction: revert", @@ -641,10 +641,14 @@ impl EthereumAdapter { // See f0af4ab0-6b7c-4b68-9141-5b79346a5f61 for why the gas limit is considered deterministic. "out of gas", "stack underflow", + "vm execution error", + "invalidjump", + "notactivated", + "invalidfeopcode", ]; let env_geth_call_errors = ENV_VARS.geth_eth_call_errors.iter(); - let mut geth_execution_errors = GETH_EXECUTION_ERRORS + let mut execution_errors = RPC_EXECUTION_ERRORS .iter() .copied() .chain(env_geth_call_errors.map(|s| s.as_str())); @@ -665,9 +669,9 @@ impl EthereumAdapter { // A successful response. Ok(bytes) => Ok(call::Retval::Value(scalar::Bytes::from(bytes))), - // Check for Geth revert. + // Check for RPC revert. Err(web3::Error::Rpc(rpc_error)) - if geth_execution_errors + if execution_errors .any(|e| rpc_error.message.to_lowercase().contains(e)) => { reverted(&logger, &rpc_error.message)