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

Human friendly node/peer names #585

Closed
corverroos opened this issue May 23, 2022 · 0 comments · Fixed by #629
Closed

Human friendly node/peer names #585

corverroos opened this issue May 23, 2022 · 0 comments · Fixed by #629
Assignees
Milestone

Comments

@corverroos
Copy link
Contributor

corverroos commented May 23, 2022

Problem to be solved

Peers are identified by ENR or by p2p peer IDs. These are super long hex numbers which can contain common prefixes/suffixes and hard for humans to parse.

It is very hard for humans to know which peer is having issues (from the logs), or to communicate about specific peers to other humans.

Proposed solution

Generate deterministic human friendly names (adjective+noun) for each peer from its p2p public key. Use these names throughout when referring to peers.

  • Add a getName method to each operator in the cluster definition.
  • Infer the name from the peer p2p public key (inside the ENR).
  • Add a Name field to the p2p.Peer struct, populate this with the getName method.
  • Replace all p2p.ShortID() logs with ("peer_name", peer.Name)
@xenowits xenowits self-assigned this May 25, 2022
@dB2510 dB2510 added this to the Devnet 2 milestone May 26, 2022
@xenowits xenowits linked a pull request May 27, 2022 that will close this issue
obol-bulldozer bot pushed a commit that referenced this issue May 28, 2022
1. Add human friendly names to peers
2. Replace logs with the peer names

category: feature
ticket: #585
@xenowits xenowits linked a pull request May 30, 2022 that will close this issue
obol-bulldozer bot pushed a commit that referenced this issue May 31, 2022
1. Add deterministic function for peer names by running a polynomial hash function on peerID string.
2. Replace all `p2p.ShortID(pID)` with `p2p.PeerName(pID)`

category: feature
ticket: #585
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants