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

Improve beacon proposer selection logic #1413

Merged
merged 5 commits into from
Sep 23, 2019
Merged

Improve beacon proposer selection logic #1413

merged 5 commits into from
Sep 23, 2019

Conversation

djrtwo
Copy link
Contributor

@djrtwo djrtwo commented Sep 22, 2019

Substantive changes:

  1. sample proposer from the full set of active validators (as opposed to just the first committee)
  2. make proposer slashing per-slot (as opposed to per-epoch)

Advantages of the new proposer logic:

  • improved liveness: The beacon chain can progress with just one validator (as opposed to SLOTS_PER_EPOCHS, an unintended design flaw). Improved liveness with low validator count may be useful for testing, fuzzing, and private consortium beacon chains.
  • reduced complexity: Avoid calling get_committee_count, get_start_shard and get_crosslink_committee. Reduce get_beacon_proposer_index line count by 20% (from 15 lines to 12 lines).
  • improved fairness: Ensure that the probability of being selected as a proposer is proportional to the effective balance. The current design gradually breaks fairness as the number of validators decreases.
  • more natural design: Block proposing is natively per-slot, not per-epoch. Block proposing is orthogonal from the notion of committees, and per-slot slashing is more natural than per-epoch slashing.
  • phase 1 reuse: The compute_proposer_index can be reused in phase 1 (see Revamp 1_shard-data-chains.md #1383).

@djrtwo djrtwo changed the title Proposer fix [WIP] Proposer fix Sep 22, 2019
@djrtwo djrtwo changed the title [WIP] Proposer fix [FIX] Improve beacon proposer selection logic Sep 22, 2019
@djrtwo djrtwo changed the title [FIX] Improve beacon proposer selection logic Improve beacon proposer selection logic Sep 23, 2019
@djrtwo djrtwo merged commit 114ffe3 into dev Sep 23, 2019
@djrtwo djrtwo deleted the proposer-fix branch September 23, 2019 18:45
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

2 participants