Skip to content

Commit

Permalink
internal/ethapi: add note about eth_chainId compatibility with EIP-695 (
Browse files Browse the repository at this point in the history
ethereum#25168)


Co-authored-by: Felix Lange <fjl@twurst.com>
  • Loading branch information
2 people authored and cp-wjhan committed Jun 28, 2023
1 parent 160c4c8 commit 482e137
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/ethapi/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -677,6 +677,11 @@ func NewBlockChainAPI(b Backend) *BlockChainAPI {
}

// 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 (api *BlockChainAPI) ChainId() *hexutil.Big {
return (*hexutil.Big)(api.b.ChainConfig().ChainID)
}
Expand Down

0 comments on commit 482e137

Please sign in to comment.