From 57bfdaa0d58a66eafafbd4d8e420986b21f1f9a4 Mon Sep 17 00:00:00 2001 From: VictorTrustyDev Date: Fri, 11 Nov 2022 01:40:28 +0700 Subject: [PATCH] internal/ethapi: add note about eth_chainId compatibility with EIP-695 (geth #25168) --- rpc/namespaces/ethereum/eth/api.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/rpc/namespaces/ethereum/eth/api.go b/rpc/namespaces/ethereum/eth/api.go index 9f0b000128..004b9f1375 100644 --- a/rpc/namespaces/ethereum/eth/api.go +++ b/rpc/namespaces/ethereum/eth/api.go @@ -328,6 +328,11 @@ func (e *PublicAPI) MaxPriorityFeePerGas() (*hexutil.Big, error) { } // ChainId is the EIP-155 replay-protection chain id for the current ethereum chain config. +// +// Note, this method does not conform to EIP-695 because the configured chain ID is always +// returned, regardless of the current head block. We used to return an error when the chain +// wasn't synced up to a block where EIP-155 is enabled, but this behavior caused issues +// in CL clients. func (e *PublicAPI) ChainId() *hexutil.Big { //nolint e.logger.Debug("eth_chainId") return e.backend.ChainID()