Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CodeError: Handler already registered for protocol #6319

Closed
nflaig opened this issue Jan 17, 2024 · 4 comments · Fixed by #6455
Closed

CodeError: Handler already registered for protocol #6319

nflaig opened this issue Jan 17, 2024 · 4 comments · Fixed by #6455
Labels
meta-bug Issues that identify a bug and require a fix. meta-investigate Issues found that require further investigation and may not have a specific resolution/fix scope-networking All issues related to networking, gossip, and libp2p.
Milestone

Comments

@nflaig
Copy link
Member

nflaig commented Jan 17, 2024

Describe the bug

On my Lodestar v1.14.0-rc.1 node I am also seeing a bunch of snappy errors

Jan-17 06:32:00.009[network]         error: Error on ReqResp.registerProtocol protocolID=/eth2/beacon_chain/req/ping/1/ssz_snappy - Handler already registered for protocol /eth2/beacon_chain/req/ping/1/ssz_snappy
CodeError: Handler already registered for protocol /eth2/beacon_chain/req/ping/1/ssz_snappy
    at DefaultRegistrar.handle (file:///usr/app/node_modules/libp2p/dist/src/registrar.js:52:19)
    at file:///usr/app/node_modules/libp2p/dist/src/libp2p.js:279:45
    at Array.map (<anonymous>)
    at Libp2pNode.handle (file:///usr/app/node_modules/libp2p/dist/src/libp2p.js:278:37)
    at ReqRespBeaconNode.registerProtocol (file:///usr/app/packages/reqresp/lib/ReqResp.js:61:28)
    at ReqRespBeaconNode.registerProtocolsAtFork (file:///usr/app/packages/beacon-node/lib/network/reqresp/ReqRespBeaconNode.js:70:18)
    at NetworkCore.onEpoch (file:///usr/app/packages/beacon-node/lib/network/core/networkCore.js:73:42)
    at Clock.emit (node:events:526:35)
    at Clock.onNextSlot [as _onTimeout] (file:///usr/app/packages/beacon-node/lib/util/clock.js:34:26)
    at listOnTimeout (node:internal/timers:573:17)
Jan-17 06:32:00.010[network]         error: Error on ReqResp.registerProtocol protocolID=/eth2/beacon_chain/req/metadata/2/ssz_snappy - Handler already registered for protocol /eth2/beacon_chain/req/metadata/2/ssz_snappy
CodeError: Handler already registered for protocol /eth2/beacon_chain/req/metadata/2/ssz_snappy
    at DefaultRegistrar.handle (file:///usr/app/node_modules/libp2p/dist/src/registrar.js:52:19)
    at file:///usr/app/node_modules/libp2p/dist/src/libp2p.js:279:45
    at Array.map (<anonymous>)
    at Libp2pNode.handle (file:///usr/app/node_modules/libp2p/dist/src/libp2p.js:278:37)
    at ReqRespBeaconNode.registerProtocol (file:///usr/app/packages/reqresp/lib/ReqResp.js:61:28)
    at ReqRespBeaconNode.registerProtocolsAtFork (file:///usr/app/packages/beacon-node/lib/network/reqresp/ReqRespBeaconNode.js:70:18)
    at NetworkCore.onEpoch (file:///usr/app/packages/beacon-node/lib/network/core/networkCore.js:73:42)
    at Clock.emit (node:events:526:35)
    at Clock.onNextSlot [as _onTimeout] (file:///usr/app/packages/beacon-node/lib/util/clock.js:34:26)
    at listOnTimeout (node:internal/timers:573:17)


.... there are a bunch more

This was right before the dencun fork epoch log

Jan-17 06:32:02.218[chain]            info: Activating blobs epoch=231680

Maybe related on how we subscribe / unsubscribe?

Jan-17 06:19:12.004[network]          info: Subscribing gossip topics before fork nextFork=deneb
Jan-17 06:19:12.007[network]          info: Suscribing to long lived attnets to next fork nextFork=deneb, subnets=49,50
Jan-17 06:19:12.008[network]          info: Suscribing to random attnets to next fork nextFork=deneb
...
Jan-17 06:44:48.002[network]          info: Unsubscribing gossip topics from prev fork prevFork=capella
Jan-17 06:44:48.004[network]          info: Unsuscribing to long lived attnets from prev fork prevFork=capella
Jan-17 06:44:48.007[network]          info: Unsuscribing to random attnets from prev fork prevFork=capella

Expected behavior

No "CodeError: Handler already registered for protocol" errors

Steps to reproduce

Run Lodestar beacon node through capella <> deneb fork transition

Additional context

No response

Operating system

Linux

Lodestar version or commit hash

v1.14.0-rc.1

@nflaig nflaig added the meta-bug Issues that identify a bug and require a fix. label Jan 17, 2024
@philknows philknows added scope-networking All issues related to networking, gossip, and libp2p. meta-investigate Issues found that require further investigation and may not have a specific resolution/fix labels Jan 19, 2024
@philknows
Copy link
Member

This was also visible in Goerli nodes we run using version=v1.14.0/5ac2fae which was the stable release:

Jan-17 06:32:00.017[network]         error: Error on ReqResp.registerProtocol protocolID=/eth2/beacon_chain/req/ping/1/ssz_snappy - Handler already registered for protocol /eth2/beacon_chain/req/ping/1/ssz_snappy |  
Jan-17 06:32:00.018[network]         error: Error on ReqResp.registerProtocol protocolID=/eth2/beacon_chain/req/status/1/ssz_snappy - Handler already registered for protocol /eth2/beacon_chain/req/status/1/ssz_snappy |  
Jan-17 06:32:00.018[network]         error: Error on ReqResp.registerProtocol protocolID=/eth2/beacon_chain/req/goodbye/1/ssz_snappy - Handler already registered for protocol /eth2/beacon_chain/req/goodbye/1/ssz_snappy |  
Jan-17 06:32:00.018[network]         error: Error on ReqResp.registerProtocol protocolID=/eth2/beacon_chain/req/metadata/2/ssz_snappy - Handler already registered for protocol /eth2/beacon_chain/req/metadata/2/ssz_snappy |  
Jan-17 06:32:00.018[network]         error: Error on ReqResp.registerProtocol protocolID=/eth2/beacon_chain/req/beacon_blocks_by_range/2/ssz_snappy - Handler already registered for protocol /eth2/beacon_chain/req/beacon_blocks_by_range/2/ssz_snappy |  
Jan-17 06:32:00.018[network]         error: Error on ReqResp.registerProtocol protocolID=/eth2/beacon_chain/req/beacon_blocks_by_root/2/ssz_snappy - Handler already registered for protocol /eth2/beacon_chain/req/beacon_blocks_by_root/2/ssz_snappy |  
Jan-17 06:32:00.018[network]         error: Error on ReqResp.registerProtocol protocolID=/eth2/beacon_chain/req/light_client_bootstrap/1/ssz_snappy - Handler already registered for protocol /eth2/beacon_chain/req/light_client_bootstrap/1/ssz_snappy |  
Jan-17 06:32:00.018[network]         error: Error on ReqResp.registerProtocol protocolID=/eth2/beacon_chain/req/light_client_finality_update/1/ssz_snappy - Handler already registered for protocol /eth2/beacon_chain/req/light_client_finality_update/1/ssz_snappy |  
Jan-17 06:32:00.018[network]         error: Error on ReqResp.registerProtocol protocolID=/eth2/beacon_chain/req/light_client_optimistic_update/1/ssz_snappy - Handler already registered for protocol /eth2/beacon_chain/req/light_client_optimistic_update/1/ssz_snappy |  
Jan-17 06:32:00.018[network]         error: Error on ReqResp.registerProtocol protocolID=/eth2/beacon_chain/req/light_client_updates_by_range/1/ssz_snappy - Handler already registered for protocol /eth2/beacon_chain/req/light_client_updates_by_range/1/ssz_snapp

@wemeetagain
Copy link
Member

@nazarhussain related to some errors we saw in sim tests

@nazarhussain
Copy link
Contributor

Yes these errors should actually be verbose been here for long time.

@nflaig
Copy link
Member Author

nflaig commented Feb 6, 2024

Would be good to address this before Deneb on mainnet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
meta-bug Issues that identify a bug and require a fix. meta-investigate Issues found that require further investigation and may not have a specific resolution/fix scope-networking All issues related to networking, gossip, and libp2p.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants