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

Help users figure out their ENR #490

Closed
OisinKyne opened this issue May 5, 2022 · 0 comments
Closed

Help users figure out their ENR #490

OisinKyne opened this issue May 5, 2022 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers
Milestone

Comments

@OisinKyne
Copy link
Contributor

Problem to be solved

The first step on the journey to running a multi operator cluster is getting your ENR. This is a key hurdle to overcome.

Right now if you type charon enr on a fresh install this is what you get

./charon enr 
Error: load key: open .charon/data/p2pkey: no such file or directory
Usage:
  charon enr [flags]

Flags:
      --data-dir string                The directory where charon will store all its internal data (default ".charon/data")
  -h, --help                           Help for enr
      --p2p-allowlist string           Comma-separated list of CIDR subnets for allowing only certain peer connections. Example: 192.168.0.0/16 would permit connections to peers on your local network only. The default is to accept all connections.
      --p2p-bootmanifest               Enables using manifest ENRs as discv5 bootnodes. Allows skipping explicit bootnodes if key generation ceremony included correct IPs.
      --p2p-bootnode-relay             Enables using bootnodes as libp2p circuit relays. Useful if some charon nodes are not have publicly accessible.
      --p2p-bootnodes strings          Comma-separated list of discv5 bootnode URLs or ENRs. Example: enode://<hex node id>@10.3.58.6:30303?discport=30301.
      --p2p-denylist string            Comma-separated list of CIDR subnets for disallowing certain peer connections. Example: 192.168.0.0/16 would disallow connections to peers on your local network. The default is to accept all connections.
      --p2p-external-hostname string   The DNS hostname advertised by libp2p. This may be used to advertise an external DNS.
      --p2p-external-ip string         The IP address advertised by libp2p. This may be used to advertise an external IP.
      --p2p-peerdb string              Path to store a discv5 peer database. Empty default results in in-memory database.
      --p2p-tcp-address strings        Comma-separated list of listening TCP addresses (ip and port) for libP2P traffic. (default [127.0.0.1:16003])
      --p2p-udp-address string         Listening UDP address (ip and port) for discv5 discovery. (default "127.0.0.1:16004")

Error: load key: open .charon/data/p2pkey: no such file or directory

Proposed solution

Handle this error more gracefully and probably less verbosely, maybe prompt to run charon create enr in the error message.
Maybe an error like:

Error: No ENR private key found in ${data_dir}. If this is your first time running this client, create one with  `charon create enr`.

Out of Scope

If there is anything to highlight as out of scope for this issue, please outline it here.

@OisinKyne OisinKyne added the enhancement New feature or request label May 5, 2022
@OisinKyne OisinKyne added this to the Devnet 1 milestone May 5, 2022
@OisinKyne OisinKyne added the good first issue Good for newcomers label May 5, 2022
obol-bulldozer bot pushed a commit that referenced this issue May 6, 2022
Assist users running `charon enr` in creating their ENRs. See ticket for more details. 
Probably may also need to do more than just a helpful message. Thoughts are welcome!

category: refactor

ticket: #490 
feature_set: alpha
@xenowits xenowits closed this as completed May 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants