sigp / lighthouse

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

Peer cannot connect, service libp2p #4410

Closed avenbreaks closed 1 year ago

avenbreaks commented 1 year ago

Description

we have a testnet network and use lighthouse to run beacon node, but in this latest version we get InsufficientPeers unable to connect to first beacon node.

1 Node Geth
2 LH Beacon Node
1 LH Validator Node

Logs BN:

Jun 16 14:49:53.039 INFO Sync committee message                  validator: 42, src: api, slot: 650, epoch: 20, delay_ms: 14, head: 0x23d1…05df, service: val_mon
Jun 16 14:49:53.039 WARN Could not publish message               error: InsufficientPeers, service: libp2p
Jun 16 14:49:53.042 INFO Sync committee message                  validator: 42, src: api, slot: 650, epoch: 20, delay_ms: 14, head: 0x23d1…05df, service: val_mon
Jun 16 14:49:53.042 WARN Could not publish message               error: InsufficientPeers, service: libp2p

Logs VC:

Jun 16 15:00:28.053 INFO Successfully published block            slot: 862, graffiti: Some("Testnet"), attestations: 1, deposits: 0, block_type: Blinded, service: block
Jun 16 15:00:29.014 INFO Successfully published attestations     type: unaggregated, slot: 862, committee_index: 0, head_block: 0x07bc8fabdfa9d9782e262309cc9619aad9416780325e15471f21f34c9da6a0ad, validator_indices: [13, 45], count: 2, service: attestation
Jun 16 15:00:29.501 INFO Connected to beacon node(s)             synced: 1, available: 1, total: 1, service: notifier
Jun 16 15:00:29.501 INFO All validators active                   slot: 862, epoch: 26, total_validators: 64, active_validators: 64, current_epoch_proposers: 32, service: notifier
Jun 16 15:00:29.889 INFO Successfully published sync committee messages, slot: 862, head_block: 0x07bc8fabdfa9d9782e262309cc9619aad9416780325e15471f21f34c9da6a0ad, count: 64, service: sync_committee
Jun 16 15:00:30.019 INFO Successfully published attestation      type: aggregated, slot: 862, committee_index: 0, head_block: 0x07bc8fabdfa9d9782e262309cc9619aad9416780325e15471f21f34c9da6a0ad, signatures: 2, aggregator: 13, service: attestation
Jun 16 15:00:30.019 INFO Successfully published attestation      type: aggregated, slot: 862, committee_index: 0, head_block: 0x07bc8fabdfa9d9782e262309cc9619aad9416780325e15471f21f34c9da6a0ad, signatures: 2, aggregator: 45, service: attestation
Jun 16 15:00:30.020 INFO Successfully published sync contributions, slot: 862, num_signers: 128, beacon_block_root: 0x07bc…a0ad, subnet: 3, service: sync_committee

Version

Lighthouse v4.2.0-c547a11
BLS library: blst-portable
SHA256 hardware acceleration: false
Allocator: jemalloc
Profile: maxperf
Specs: mainnet (true), minimal (false), gnosis (true)
jimmygchen commented 1 year ago

This is the expected behaviour with the above setup, because the beacon node that has the 64 validators connected will try to publish attestations to other beacon nodes subscribed to the same attestation subnets, and it's likely that the other beacon node is not listening to any of those topics even though it's connected as a peer, because it has no validators connected to it. You could make the warning go away by adding --subscribe-all-subnets, so it receives all attestations, but I think it is unnecessary if there's no validator connected to that beacon node.

Also worth noting that each Beacon Node should connect to its own EL / geth node.

avenbreaks commented 1 year ago

solved! thankyou