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

Fix bad ancestor check #17401

Merged
merged 1 commit into from
May 23, 2021
Merged

Fix bad ancestor check #17401

merged 1 commit into from
May 23, 2021

Conversation

carllin
Copy link
Contributor

@carllin carllin commented May 22, 2021

Problem

Slot voted for in gossip may have been purged by a root by the time the switch threshold check is made

Summary of Changes

If the gossip vote is not in BankForks, don't include it in the switch threshold check
Fixes #17377

@carllin carllin requested a review from jstarry May 22, 2021 05:23
@codecov
Copy link

codecov bot commented May 22, 2021

Codecov Report

Merging #17401 (cacc1ae) into master (662c2aa) will decrease coverage by 0.0%.
The diff coverage is 100.0%.

@@            Coverage Diff            @@
##           master   #17401     +/-   ##
=========================================
- Coverage    82.7%    82.7%   -0.1%     
=========================================
  Files         424      424             
  Lines      118444   118454     +10     
=========================================
+ Hits        97994    98000      +6     
- Misses      20450    20454      +4     

@carllin carllin merged commit 8664b2c into solana-labs:master May 23, 2021
@mvines
Copy link
Member

mvines commented May 23, 2021

Thanks!

Comment on lines +797 to +801
// However, there is also the possibility that `last_voted_slot` is a stray, in which
// case we cannot make this conclusion as we do not know the ancestors/descendants
// of strays. Hence we err on the side of caution here and ignore this vote. This
// is ok because validators voting on different unrooted forks should eventually vote
// on some descendant of the root, at which time they can be included in switching proofs.
Copy link
Member

Choose a reason for hiding this comment

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

@carllin 👍 thanks for defending/maintaining the persistent tower. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants