You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Both phase 0 and phase 1 have code for committee selection that seems to be doing a fundamentally almost identical task, but where code is arguably needlessly duplicated.
The two use different patterns to express what is ultimately the same logic. In crosslink committee selection (phase 0), the logic is in get_shuffling which is used exactly once:
In persistent committee selection (phase 1), the core function is instead get_shuffled_committee, which returns only a single committee instead of a split of the entire validator set.
One way to harmonize the two by having functions as follows (note that this is a non-substantive change; it is purely a change in presentation):
This also allows us to remove the split function, as with the removal of get_shuffling we no longer use it.
The text was updated successfully, but these errors were encountered:
vbuterin
changed the title
Harmonize crosslink and persistent committee selection
Harmonize description of crosslink and persistent committee selection
Mar 7, 2019
See #729 and #774
The behavior now is that the first committee will consist of `get_permuted_index(0..n-1)`, the second committee `get_permuted_index(n....2n-1)`, etc.
Both phase 0 and phase 1 have code for committee selection that seems to be doing a fundamentally almost identical task, but where code is arguably needlessly duplicated.
The two use different patterns to express what is ultimately the same logic. In crosslink committee selection (phase 0), the logic is in
get_shuffling
which is used exactly once:In persistent committee selection (phase 1), the core function is instead
get_shuffled_committee
, which returns only a single committee instead of a split of the entire validator set.One way to harmonize the two by having functions as follows (note that this is a non-substantive change; it is purely a change in presentation):
In phase 0, we now replace the code with:
In phase 1, we now replace the code with:
This also allows us to remove the
split
function, as with the removal ofget_shuffling
we no longer use it.The text was updated successfully, but these errors were encountered: