Skip to content
This repository has been archived by the owner on Jul 1, 2021. It is now read-only.

Sync with ethereum/eth2.0-specs#694: enhance get_beacon_proposer_index #333

Merged
merged 3 commits into from
Mar 4, 2019

Conversation

hwwhww
Copy link
Contributor

@hwwhww hwwhww commented Feb 28, 2019

What was wrong?

Spec PR: ethereum/consensus-specs#694

How was it fixed?

  1. Make get_beacon_proposer_index safe for next epoch
  2. Pass registry_change flag from get_committee_assignment to get_beacon_proposer_index
  3. Refactor: change validate_epoch_for_current_epoch to validate_epoch_within_previous_and_next

Cute Animal Picture

put a cute animal picture link inside the parentheses

@hwwhww hwwhww changed the title Sync with ethereum/eth2.0-specs#694 Sync with ethereum/eth2.0-specs#694: enhance get_beacon_proposer_index Feb 28, 2019
)
next_epoch = Epoch(current_epoch + 1)

validate_epoch_within_previous_and_next(epoch, previous_epoch, next_epoch)
Copy link
Contributor

Choose a reason for hiding this comment

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

This validation doesn't strictly have to happen here because it happens again within get_crosslink_committees_at_slot. That said, it's cheap and explicit is probably better :)

tests/eth2/beacon/test_beacon_validation.py Outdated Show resolved Hide resolved
Co-Authored-By: hwwhww <hwwang156@gmail.com>
@hwwhww hwwhww merged commit dc1b9ec into ethereum:master Mar 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants