Skip to content

eth_chainId may return an error for unsynced eth1 nodes #2293

@pawanjay176

Description

@pawanjay176

Description

Earlier, geth used to return chainId as 0 when it was not fully synced. With ethereum/go-ethereum#21686 , now it returns an error if it's not past the eip 155 block. Need to handle this error scenario.

Version

Lighthouse stable, Geth 1.10

Present Behaviour

We get an Endpoint NotReachable error on lighthouse when geth sync is not past the eip 155 block which is misleading.

Expected Behaviour

Should handle the error case and return Not Synced error message.

Steps to resolve

Handle the error case here

let chain_id = get_chain_id(endpoint, Duration::from_millis(STANDARD_TIMEOUT_MILLIS))
.await
.map_err(error_connecting)?;

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions