epoch processing before block processing #480
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
get_shards_and_committees_for_slot
for future slots #92,shard_committees_at_slots
missing when processing previous epoch attestations #352) by ensuring epoch shuffling is updated before blocks are processed. Also changed the bounds ofget_crosslink_committees_at_slot
to be based upon thecurrent_
andprevious_epoch_calculation_slot
and to allow for accessing shufflings arbitrarily in the future.Note:
get_crosslink_committees_at_slot
can access shufflings arbitrarily in the future, but this is not guaranteed to remain stable if a state transition changes the shuffling betweenstate.slot
and the future slot (validator registry change, or power of 2 reshuffling).Note: The per-slot transition line "Set state.validator_registry[get_beacon_proposer_index(state, state.slot)].randao_layers += 1" is still broken at the state transition epochs because the shuffling is not yet updated at this point, but I'm leaving it in because it is very likely to be removed after our discussion about removing the hash-onion entirely.