sigp / lighthouse

Ethereum consensus client in Rust
https://lighthouse.sigmaprime.io/
Apache License 2.0
2.89k stars 736 forks source link

Cannot initialize beacon node (v5.3.0) on local setup #6425

Open alisonsmy opened 5 days ago

alisonsmy commented 5 days ago

Description

Hello, I'm having trouble starting the beacon client in my local environment. I checked the syncing status by calling /eth/v1/node/syncing, and it appears to remain stuck in the synchronizing process whenever there are no blocks to sync. I tested version 5.2.1, and it functions correctly in the local environment. In the Holeskey environment, version 5.3.0 works without any issues. The problem only occurs with version 5.3.0 in my local setup. I would appreciate any ideas or suggestions on this. Thank you in advance!

Version

v5.3.0

Present Behaviour

curl -X 'GET' 'http://localhost:3500/eth/v1/node/syncing' -H 'accept: application/json'

{"data":{"is_syncing":true,"is_optimistic":false,"el_offline":false,"head_slot":"0","sync_distance":"4"}}

Expected Behaviour

I anticipate receiving the following response, as version 5.2.1 would provide. curl -X 'GET' 'http://localhost:3500/eth/v1/node/syncing' -H 'accept: application/json'

{"data":{"is_syncing":false,"is_optimistic":false,"el_offline":false,"head_slot":"0","sync_distance":"0"}}
alisonsmy commented 5 days ago

I used https://github.com/flashbots/builder-playground for local setup.

Basically, the problem can be reproduced by

  1. start reth v1.0.6
    reth-v1.0.6 node --chain genesis.json --datadir data_reth --color never --http --http.port 8545 --authrpc.port 8551 --authrpc.jwtsecret jwtsecret
  2. start beacon node with lighthouse v5.3.0 to see the present behavior.
    lighthouse-v5.3.0 bn --datadir data_beacon_node --testnet-dir testnet --enable-private-discovery --disable-peer-scoring --staking --enr-address 127.0.0.1 --enr-udp-port 9000 --enr-tcp-port 9000 --enr-quic-port 9100 --port 9000 --quic-port 9100 --http-port 3500 --disable-packet-filter --target-peers 0 --execution-endpoint http://localhost:8551 --execution-jwt jwtsecret --builder http://localhost:5555 --builder-fallback-epochs-since-finalization 0 --builder-fallback-disable-checks --always-prepare-payload --suggested-fee-recipient 0x690B9A9E9aa1C9dB991C7721a92d351Db4FaC990 --prepare-payload-lookahead 8000
michaelsproul commented 5 days ago

There was a regression for single-node networks with 0 peers (as yours is) in v5.3.0.

There is a PR here to address this:

AFAIK only the /eth/v1/node/syncing API is affected, so it is only a cosmetic regression. If you run a Lighthouse validator client it will ignore this and continue to produce blocks and attestations.