From bad89d659cf4e1710e3f1a9ea80ee47edf8fd058 Mon Sep 17 00:00:00 2001 From: Dan Cline <6798349+Rjected@users.noreply.github.com> Date: Thu, 19 Dec 2024 11:12:08 +0200 Subject: [PATCH] chore: remove difficulty field from admin_nodeInfo response --- crates/rpc-types-admin/src/admin.rs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/crates/rpc-types-admin/src/admin.rs b/crates/rpc-types-admin/src/admin.rs index 4facfd2978b..05403cd0900 100644 --- a/crates/rpc-types-admin/src/admin.rs +++ b/crates/rpc-types-admin/src/admin.rs @@ -66,7 +66,18 @@ pub struct EthProtocolInfo { /// The eth network version. pub network: u64, /// The total difficulty of the host's blockchain. - pub difficulty: U256, + /// + /// NOTE: This is deprecated as total difficulty related fields are being removed from RPC, + /// since the merge has long passed. + /// + /// See changes to geth's `NodeInfo` structs: + /// * + /// * + #[deprecated( + since = "0.8.2", + note = "The difficulty field of admin_nodeInfo is being removed from the response, see https://github.com/ethereum/go-ethereum/pull/30744" + )] + pub difficulty: Option, /// The Keccak hash of the host's genesis block. pub genesis: B256, /// The chain configuration for the host's fork rules.