You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
926 B

Normalize priorities to not exceed total voting power (#3049) * more proposer priority tests - test that we don't reset to zero when updating / adding - test that same power validators alternate * add another test to track / simulate similar behaviour as in #2960 * address some of Chris' review comments * address some more of Chris' review comments * temporarily pushing branch with the following changes: The total power might change if: - a validator is added - a validator is removed - a validator is updated Decrement the accums (of all validators) directly after any of these events (by the inverse of the change) * Fix 2960 by re-normalizing / scaling priorities to be in bounds of total power, additionally: - remove heap where it doesn't make sense - avg. only at the end of IncrementProposerPriority instead of each iteration - update (and slightly improve) TestAveragingInIncrementProposerPriorityWithVotingPower to reflect above changes * Fix 2960 by re-normalizing / scaling priorities to be in bounds of total power, additionally: - remove heap where it doesn't make sense - avg. only at the end of IncrementProposerPriority instead of each iteration - update (and slightly improve) TestAveragingInIncrementProposerPriorityWithVotingPower to reflect above changes * fix tests * add comment * update changelog pending & some minor changes * comment about division will floor the result & fix typo * Update TestLargeGenesisValidator: - remove TODO and increase large genesis validator's voting power accordingly * move changelog entry to P2P Protocol * Ceil instead of flooring when dividing & update test * quickly fix failing TestProposerPriorityDoesNotGetResetToZero: - divide by Ceil((maxPriority - minPriority) / 2*totalVotingPower) * fix typo: rename getValWitMostPriority -> getValWithMostPriority * test proposer frequencies * return absolute value for diff. keep testing * use for loop for div * cleanup, more tests * spellcheck * get rid of using floats: manually ceil where necessary * Remove float, simplify, fix tests to match chris's proof (#3157)
6 years ago
  1. ## v0.29.0
  2. *TBD*
  3. Special thanks to external contributors on this release:
  4. ### BREAKING CHANGES:
  5. * CLI/RPC/Config
  6. - [types] consistent field order of `CanonicalVote` and `CanonicalProposal`
  7. * Apps
  8. * Go API
  9. - [node] \#3082 MetricsProvider now requires you to pass a chain ID
  10. * Blockchain Protocol
  11. * [merkle] \#2713 Merkle trees now match the RFC 6962 specification
  12. * P2P Protocol
  13. - [consensus] \#2960 normalize priorities to not exceed `2*TotalVotingPower` to mitigate unfair proposer selection
  14. heavily preferring earlier joined validators in the case of an early bonded large validator unbonding
  15. ### FEATURES:
  16. ### IMPROVEMENTS:
  17. - [rpc] \#3065 return maxPerPage (100), not defaultPerPage (30) if `per_page` is greater than the max 100.
  18. - [instrumentation] \#3082 add 'chain_id' label for all metrics
  19. ### BUG FIXES:
  20. - [log] \#3060 Fix year format
  21. - [crypto] \#3164 Update `btcd` fork for rare signRFC6979 bug