q9f / mergednet

Ethereum network merged right from genesis
https://dev.to/q9/how-to-merge-an-ethereum-network-right-from-the-genesis-block-3454
Do What The F*ck You Want To Public License
3 stars 3 forks source link

PublishError.InsufficientPeers when publishing the first block #1

Closed john-risk-adigium closed 1 year ago

john-risk-adigium commented 1 year ago

When trying to run, I got an error in the beacon and the validator when it publishes its first block .

  Synced - slot: -1 - head: 0 0xdf3e…a887 - finalized: 0x0000…0000:0 - peers: 1
  Synced - slot: 0 - head: 0 0xdf3e…a887 - execution: valid(0xd21d…5656) - finalized: 0x0000…0000:0 - peers: 1
  Error on submitPoolSyncCommitteeSignatures [0] slot=1, validatorIndex=0 PublishError.InsufficientPeers
  Error: **PublishError.InsufficientPeers**
    at Eth2Gossipsub.publish (file:///root/building/lodestar/node_modules/@chainsafe/libp2p-gossipsub/src/index.ts:1957:13)
    at Eth2Gossipsub.publishObject (file:///root/building/lodestar/packages/beacon-node/src/network/gossip/gossipsub.ts:171:20)
    at Eth2Gossipsub.publishSyncCommitteeSignature (file:///root/building/lodestar/packages/beacon-node/src/network/gossip/gossipsub.ts:258:5)
    at async Promise.all (index 0)
    at file:///root/building/lodestar/packages/beacon-node/src/api/impl/beacon/pool/index.ts:181:13
    at async Promise.all (index 0)
    at Object.submitPoolSyncCommitteeSignatures (file:///root/building/lodestar/packages/beacon-node/src/api/impl/beacon/pool/index.ts:151:7)
    at Object.handler (file:///root/building/lodestar/packages/api/src/utils/server/genericJsonServer.ts:41:23)

And an error in geth

  Imported new chain segment               blocks=1 txs=0 mgas=0.000 elapsed="167.023µs" mgasps=0.000 number=1 hash=234448..4be06e dirty=0.00B
  **Beacon backfilling failed**                err="sync cancelled"
  Unexpected account range packet          peer=ae94a64a reqid=4,399,237,705,449,641,073

The 2 geth nodes are connected as peers (checked with admin.peers), the 2 beacon nodes are connected as peers (checked with eth/v1/node/peers), the validator is connected to the first beacon.

I used the validator_keys in the repository, did not generate new ones. Here are the full logs

q9f commented 1 year ago

Hi, you did everything correctly. I see the same messages.

The insufficient-peers error is currently being investigated. See https://github.com/ChainSafe/lodestar/issues/4764

However, if you check the logs on the second beacon node and second geth node, you will see that they normally progress the chain. So this error might be more of a warning than an error. The screenshot in my readme is from the secondary nodes. So unless your network fails to produce blocks and progress the chain, you can mildy ignore this for now.

Edit: apparently your geth node switches to syncing mode after two blocks. This could have a number of reasons. However, for the first 3 slots, everything was fine:

Dec-31 19:08:06.003[]                  [32minfo [39m: Synced - slot: 0 - head: 0 0xdf3e…a887 - execution: valid(0xd21d…5656) - finalized: 0x0000…0000:0 - peers: 1
Dec-31 19:08:18.002[]                  [32minfo [39m: Synced - slot: 1 - head: 1 0x1b1b…f2f0 - execution: syncing(0x2344…e06e) - finalized: 0x0000…0000:0 - peers: 1
Dec-31 19:08:30.002[]                  [32minfo [39m: Synced - slot: 2 - head: 2 0x8c69…6cd9 - execution: syncing(0x1d1c…92a7) - finalized: 0x0000…0000:0 - peers: 1

What you can try:

Hope that helps.

john-risk-adigium commented 1 year ago

Hi, The chain was stopping to reproduce blocks after a couple of blocks. I would ignore the issue if the chain was working fine. Adding --syncmode full fixed my issue, and the chain is working smoothly since yesterday.

I am currently setting geth genisis to timestamp of now, starting geth, setting beacon min genesis time to the same exact timestamp, and setting genesis delay to 60 seconds, that's why the beacons start from slot -4

Using the latest geth release, and the lodestar latest code from the default unstable branch.

Thanks again so much for fixing the issue.