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

Use justified balances for fork choice #6272

Merged
merged 17 commits into from
Jun 16, 2020
Merged

Conversation

terencechain
Copy link
Member

@terencechain terencechain commented Jun 15, 2020

What type of PR is this?

Bug fix

What does this PR do? Why is it needed?
The fork choice has the following incorrect assumptions:

  • Uses validator balances instead of effective_balances for votes
  • Uses balances from last_processed_state instead of justified_state
  • Initial sync process block routine has unnecessary code for preventing decoy-bounce attack. This is not needed for initial syncing.

This PR fixed all the issues above

Which issues(s) does this PR fix?

Fixes #6260

Other notes for review
Tested run time for 24 hours on both initial syncing and regular syncing

@terencechain terencechain self-assigned this Jun 15, 2020
@terencechain
Copy link
Member Author

terencechain commented Jun 15, 2020

Will let this run in my set up for a day before opening up for review

@terencechain terencechain marked this pull request as ready for review June 16, 2020 14:03
@terencechain terencechain requested a review from a team as a code owner June 16, 2020 14:03
@terencechain terencechain added Ready For Review A pull request ready for code review and removed In Progress labels Jun 16, 2020
@codecov
Copy link

codecov bot commented Jun 16, 2020

Codecov Report

Merging #6272 into master will decrease coverage by 0.05%.
The diff coverage is 47.72%.

@@            Coverage Diff             @@
##           master    #6272      +/-   ##
==========================================
- Coverage   59.96%   59.90%   -0.06%     
==========================================
  Files         325      325              
  Lines       27583    27573      -10     
==========================================
- Hits        16539    16517      -22     
- Misses       8790     8798       +8     
- Partials     2254     2258       +4     

@terencechain terencechain merged commit fe2f8a1 into master Jun 16, 2020
@rauljordan rauljordan deleted the cache-justified-balances branch June 16, 2020 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready For Review A pull request ready for code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fork choice should use balances from justified
2 participants