-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add the Ability for Prysm To Handle Trusted Peers #12492
Conversation
beacon-chain/p2p/discovery.go
Outdated
for _, a := range addrs { | ||
info, err := peer.AddrInfoFromP2pAddr(a) | ||
if err != nil { | ||
log.WithError(err).Error("Could not derive peer info from multiaddress") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You may want to add a.String()
in the log to know which address failed
// Set trusted peers for those that are provided as static addresses. | ||
pids := peerIdsFromMultiAddrs(addrs) | ||
s.peers.SetTrustedPeers(pids) | ||
peersToWatch = append(peersToWatch, s.cfg.StaticPeers...) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why don't we currently watch static peers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it was a bug, which is why its being fixed here
* add all changes * add to peers to watch * add tests * Update beacon-chain/p2p/peers/peerdata/store_test.go * radek's review --------- Co-authored-by: Radosław Kapka <rkapka@wp.pl> Co-authored-by: james-prysm <90280386+james-prysm@users.noreply.github.com>
* add all changes * add to peers to watch * add tests * Update beacon-chain/p2p/peers/peerdata/store_test.go * radek's review --------- Co-authored-by: Radosław Kapka <rkapka@wp.pl> Co-authored-by: james-prysm <90280386+james-prysm@users.noreply.github.com>
What type of PR is this?
Feature
What does this PR do? Why is it needed?
banned or disconnected due to our pruning routines/peer scorer.
Which issues(s) does this PR fix?
N.A
Other notes for review