Skip to content

Commit c7f485d

Browse files
lightclientfjl
andauthored
internal/ethapi: add note about eth_chainId compatibility with EIP-695 (#25168)
Co-authored-by: Felix Lange <[email protected]>
1 parent 647c6f2 commit c7f485d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

internal/ethapi/api.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -609,6 +609,11 @@ func NewBlockChainAPI(b Backend) *BlockChainAPI {
609609
}
610610

611611
// ChainId is the EIP-155 replay-protection chain id for the current Ethereum chain config.
612+
//
613+
// Note, this method does not conform to EIP-695 because the configured chain ID is always
614+
// returned, regardless of the current head block. We used to return an error when the chain
615+
// wasn't synced up to a block where EIP-155 is enabled, but this behavior caused issues
616+
// in CL clients.
612617
func (api *BlockChainAPI) ChainId() *hexutil.Big {
613618
return (*hexutil.Big)(api.b.ChainConfig().ChainID)
614619
}

0 commit comments

Comments
 (0)