From a97c5b34a905b712d757e3203a6177d2f6bd35cd Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Tue, 16 May 2023 18:41:38 +0200 Subject: [PATCH] chore(rpc): add InvalidStateRoot error variant (#2698) --- crates/rpc/rpc-types/src/eth/engine/payload.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/crates/rpc/rpc-types/src/eth/engine/payload.rs b/crates/rpc/rpc-types/src/eth/engine/payload.rs index f57b65c44..d78f69e13 100644 --- a/crates/rpc/rpc-types/src/eth/engine/payload.rs +++ b/crates/rpc/rpc-types/src/eth/engine/payload.rs @@ -405,6 +405,14 @@ pub enum PayloadValidationError { /// Thrown when a new payload contains a wrong block number. #[error("invalid block number")] InvalidBlockNumber, + /// Thrown when a new payload contains a wrong state root + #[error("invalid merkle root (remote: {remote:?} local: {local:?})")] + InvalidStateRoot { + /// The state root of the payload we received from remote (CL) + remote: H256, + /// The state root of the payload that we computed locally. + local: H256, + }, } #[cfg(test)]