Feature request: allow me to initialize the p2p private key file with new flag
Currently the lighthouse p2p private key is stored under beacon-data/network/key binary file.
This is pretty inconvenient. It would be great if lighthouse would have a flag that would allow me to set the private key for the node using a new flag like --p2p-priv-key= that would point to a file. The content of this file is presumed to contain a hex representing Secp256 key for example e156614877adbfac274118a3be4b7dbfcd6d994126ab7e758dd7aa688f8ec0da.
Lighthouse could convert this hex to binary, so that it wouldn't become a breaking change. Then lighthouse should use this key to initialize its p2p address, which would allow us to test custom subnets for each peer.
can you assign this to me!
Hello @barnabasbusa@michaelsproul , Check out this pr once free!
@barnabasbusa - What if we just used a hex encoding in our key file. You could just put whatever key you wanted into that file beacon/network/key without having to specify a new file via CLI? Or is that too cumbersome still?
that’s also good, but wouldn’t that be a breaking change on your side?
Yeah, kinda (we could support both formats). We do breaking changes a bit. If we just delete the old key create a new one in hex, I'm not sure anyone is really going to get upset about it, we just change PeerId's on restart, which is what Prysm does by default.
But I also like the soln @Ayushdubey86 has already made, so can go with that.
Do checkout this pr once again, I have pushed further changes , @barnabasbusa @jimmygchen @michaelsproul @AgeManning
@Ayushdubey86 please do not tag people like this, relevant reviewers are notified of GH notifications already 🙏
Ok, looks like we never got this solved. I"m going to revive: https://github.com/sigp/lighthouse/pull/7191, fix it so we can resolve this.
I've looked at #7191 - It's incomplete and the author hasn't addressed the reviewers comments and its looks quite broken to me.
I'm going to just make a PR that reads/writes hex data from the file. It's a breaking change, but we can include it in the next release.
Hopefully resolved in #7665