From 61038449c864ca69fe72d9174008803e58f8a3e0 Mon Sep 17 00:00:00 2001 From: Georgios Konstantopoulos Date: Tue, 17 Feb 2026 06:36:34 -0800 Subject: [PATCH] fix(rpc): update eth_simulateV1 revert error code to 3 (#22272) Co-authored-by: Amp --- .changelog/fix-simulate-revert-code.md | 5 +++++ crates/rpc/rpc-eth-types/src/simulate.rs | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 .changelog/fix-simulate-revert-code.md diff --git a/.changelog/fix-simulate-revert-code.md b/.changelog/fix-simulate-revert-code.md new file mode 100644 index 0000000000..467b5b51ea --- /dev/null +++ b/.changelog/fix-simulate-revert-code.md @@ -0,0 +1,5 @@ +--- +reth-rpc-eth-types: patch +--- + +Updated `eth_simulateV1` revert error code from `-32000` to `3` to be consistent with `eth_call`, per [execution-apis#748](https://github.com/ethereum/execution-apis/pull/748). diff --git a/crates/rpc/rpc-eth-types/src/simulate.rs b/crates/rpc/rpc-eth-types/src/simulate.rs index 70c1267dc5..59d13a67c5 100644 --- a/crates/rpc/rpc-eth-types/src/simulate.rs +++ b/crates/rpc/rpc-eth-types/src/simulate.rs @@ -31,8 +31,10 @@ use revm::{ /// Error code for execution reverted in `eth_simulateV1`. /// -/// -pub const SIMULATE_REVERT_CODE: i32 = -32000; +/// Consistent with `eth_call` revert error code. +/// +/// +pub const SIMULATE_REVERT_CODE: i32 = 3; /// Error code for VM execution errors (e.g., out of gas) in `eth_simulateV1`. ///