ChainSafe / ChainSafe/gossamer
Implement `NetworkPeers.PeerRole` by decoding handshake only
- Dominant language
- Go
- Stars
- 454
- Forks
- 144
- PR merge metrics
- No merged PRs in 30d
Description
## Issue summary
from design doc:
> `PeerRole` is used to check handshakes for the role, but if unable to decode the role from the handshake it checks the underlying peerstore. Storing of the role per peer is currently not supported by our peerstore implementation. I think we can implement it without checking the peerstore for now and only rely on decoding the supplied handshake.
## Implementation details
- Implement `PeerRole` on translation shim type by decoding handshake for role.
- If unable to decode, panic for now
- leave comment on panic regarding the lack of support of current peerset to store roles.
## Other information and links
-
## Acceptance criteria
[] Peer Role should be able to be decoded from handshake and verified against peer ID
[] 70% coverage on new method.
Contributor guide
Assessment
This issue has not been assessed yet.