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

[ETCM-631] Create peerId from node's public key #957

Merged
merged 2 commits into from
Apr 8, 2021

Conversation

robinraju
Copy link
Contributor

Description

The node's public key is encoded in the username part of ts URI.
enode://pubkey@ip:port

This PR makes use of this node Id to derive a PeerId

Proposed Solution

Currently, a PeerId is created from the PeerActor's path. This is changed to create a Peer Id from the Node's pub key.

Important Changes Introduced

PeerId is unknown for nodes that are not yet handshaked. Currently, they are named PendingPeers.
See: PeerManagerActor and ConnectedPeers.
Pending peers were stored using Id derived from PeerActor path until successfully handshaked.

Testing

Unit tests and it tests

This needs (extensive) testing on the mainnet before it can be merged

@leo-bogastry leo-bogastry self-requested a review April 7, 2021 11:28
@milenkara milenkara self-requested a review April 7, 2021 15:01
@dzajkowski dzajkowski force-pushed the ETCM-631-key-based-peerid branch from 3f188fd to 19eac46 Compare April 8, 2021 11:29
@dzajkowski dzajkowski merged commit 498e9f7 into develop Apr 8, 2021
@dzajkowski dzajkowski deleted the ETCM-631-key-based-peerid branch April 9, 2021 11:54
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 this pull request may close these issues.

4 participants