ChainSafe / discv5

A Typescript implementation of the Discv5 protocol

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Not able to start Node due to missing enr id

twoeths opened this issue · comments

this is the log I have with latest discv5 and latest master

Tuyens-MacBook-Pro-16519:lodestar-cli tuyennguyen$ node --inspect  lib/index.js beacon --testnet medalla --root-dir .medalla.weak > .medalla.weak.log.2
Debugger listening on ws://127.0.0.1:9229/48b06437-7215-4749-837b-3664b1852c70
For help, see: https://nodejs.org/en/docs/inspector
 ✖ Error: id not found.
    at Map.get id [as id] (/Users/tuyennguyen/Projects/workshop/lodestar/node_modules/@chainsafe/discv5/lib/enr/enr.js:86:24)
    at Map.get nodeId [as nodeId] (/Users/tuyennguyen/Projects/workshop/lodestar/node_modules/@chainsafe/discv5/lib/enr/enr.js:112:22)
    at Function.create (/Users/tuyennguyen/Projects/workshop/lodestar/node_modules/@chainsafe/discv5/lib/service/service.js:138:55)
    at new Discv5Discovery (/Users/tuyennguyen/Projects/workshop/lodestar/node_modules/@chainsafe/discv5/lib/libp2p/discv5.js:25:40)
    at setupService (/Users/tuyennguyen/Projects/workshop/lodestar/node_modules/libp2p/src/index.js:557:30)
    at NodejsNode._setupPeerDiscovery (/Users/tuyennguyen/Projects/workshop/lodestar/node_modules/libp2p/src/index.js:572:7)
    at NodejsNode._onDidStart (/Users/tuyennguyen/Projects/workshop/lodestar/node_modules/libp2p/src/index.js:493:16)
    at NodejsNode.start (/Users/tuyennguyen/Projects/workshop/lodestar/node_modules/libp2p/src/index.js:231:18)
    at Libp2pNetwork.start (/Users/tuyennguyen/Projects/workshop/lodestar/packages/lodestar/src/network/network.ts:85:5)
    at BeaconNode.start (/Users/tuyennguyen/Projects/workshop/lodestar/packages/lodestar/src/node/nodejs.ts:129:5)

also seems like it generates enr instead of enr.json

also seems like it generates enr instead of enr.json

This change was introduced in ChainSafe/lodestar#1694 now the ENR path defaults to enr stored as text not json

this is duplicated to ChainSafe/lodestar#1725, I should have reported this in lodestar.