Skip to content

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

Merged
dzajkowski merged 2 commits intodevelopfrom
ETCM-631-key-based-peerid
Apr 8, 2021
Merged

[ETCM-631] Create peerId from node's public key#957
dzajkowski merged 2 commits intodevelopfrom
ETCM-631-key-based-peerid

Conversation

@robinraju
Copy link
Copy Markdown
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