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

dont fast sync if we have +2/3 of the voting power #2917

Closed
wants to merge 1 commit into from

Conversation

ebuchman
Copy link
Contributor

Fix #2916

  • Updated all relevant documentation in docs
  • Updated all code comments where relevant
  • Wrote tests
  • Updated CHANGELOG_PENDING.md

@codecov-io
Copy link

Codecov Report

❗ No coverage uploaded for pull request base (develop@47a0669). Click here to learn what that means.
The diff coverage is 100%.

@@            Coverage Diff             @@
##             develop    #2917   +/-   ##
==========================================
  Coverage           ?   62.25%           
==========================================
  Files              ?      212           
  Lines              ?    17288           
  Branches           ?        0           
==========================================
  Hits               ?    10763           
  Misses             ?     5619           
  Partials           ?      906
Impacted Files Coverage Δ
node/node.go 66.59% <100%> (ø)

}
ourAddr := privValidator.GetAddress()
_, val := state.Validators.GetByAddress(ourAddr)
if val != nil && val.VotingPower > state.Validators.TotalVotingPower()*2/3 {
Copy link
Contributor

Choose a reason for hiding this comment

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

This is another case where we require total voting power to be smaller than its max value. (In this case less than 2**62, previous mention of need for a requirement: #2785 (comment))

Copy link
Contributor

@ValarDragon ValarDragon left a comment

Choose a reason for hiding this comment

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

@ValarDragon
Copy link
Contributor

Actually on second thought, I'm unsure we want this. A node with 2/3rds of stake may want to spawn a replica and therefore still need to fast sync. Now they would have to pick another privkey, sync, and then switch to their main node id, which seems like a lot of overhead.

@ebuchman
Copy link
Contributor Author

I think you're right.

@ebuchman ebuchman closed this Nov 27, 2018
@ebuchman ebuchman deleted the bucky/fix-fast-sync-two-thirds branch November 27, 2018 03:34
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