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

Tidy-up of BestFinalized #4505

Merged
merged 10 commits into from Jan 13, 2020
Merged

Tidy-up of BestFinalized #4505

merged 10 commits into from Jan 13, 2020

Conversation

mcdee
Copy link
Contributor

@mcdee mcdee commented Jan 12, 2020

Related to #4504 this patch tidies up BestFinalized. The main focus is to reduce the number of calls to peer status info, but it also takes the opportunity to tweak the list of peers returned to ensure those with the highest finalized epochs are returned in preference to those with lower.

Additional comments have been provided to help explain what the function is doing at each stage, as the prior version was somewhat opaque in its operation.

@codecov
Copy link

codecov bot commented Jan 12, 2020

Codecov Report

Merging #4505 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #4505   +/-   ##
=======================================
  Coverage   43.33%   43.33%           
=======================================
  Files         193      193           
  Lines       12950    12950           
=======================================
  Hits         5612     5612           
  Misses       6388     6388           
  Partials      950      950

beacon-chain/p2p/peers/status.go Outdated Show resolved Hide resolved
beacon-chain/p2p/peers/status.go Show resolved Hide resolved
Copy link
Member

@nisdas nisdas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for adding the test

@prylabs-bulldozer prylabs-bulldozer bot merged commit 3d24a85 into prysmaticlabs:master Jan 13, 2020
@mcdee mcdee deleted the bestfinalized branch January 13, 2020 18:29
cryptomental pushed a commit to cryptomental/prysm that referenced this pull request Feb 24, 2020
* Tidy up BestFinalized
* Ensure no more than maxPeers returned
* Merge branch 'master' into bestfinalized
* Merge branch 'master' into bestfinalized
* Merge branch 'master' into bestfinalized
* Merge branch 'master' into bestfinalized
* Remove swap file
* Provide potential PIDs array with capacity
* Add test for trimming and ordering in BestFinalized
* Merge branch 'master' into bestfinalized
cryptomental pushed a commit to cryptomental/prysm that referenced this pull request Feb 28, 2020
* Tidy up BestFinalized
* Ensure no more than maxPeers returned
* Merge branch 'master' into bestfinalized
* Merge branch 'master' into bestfinalized
* Merge branch 'master' into bestfinalized
* Merge branch 'master' into bestfinalized
* Remove swap file
* Provide potential PIDs array with capacity
* Add test for trimming and ordering in BestFinalized
* Merge branch 'master' into bestfinalized
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.

None yet

3 participants