-
Notifications
You must be signed in to change notification settings - Fork 997
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
GENESIS_SLOT == 0 #896
GENESIS_SLOT == 0 #896
Conversation
specs/core/0_beacon-chain.md
Outdated
if state.slot == GENESIS_SLOT: | ||
validator.activation_epoch = GENESIS_EPOCH | ||
else: | ||
validator.activation_epoch = get_delayed_activation_exit_epoch(get_current_epoch(state)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I remember that @vbuterin chose to use the flag as a cleaner solution (#374 (comment)). :p I'm fine either way!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine either way. But if we are going to have the Genesis slot be 0 why not just remove the constant?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which, GENESIS_EPOCH
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 for removing the constants gensis-slot and genesis-epoch. 0 is perfectly clear.
* Remove unnecessary per-field comments, focus on field grouping * Group `Validator` fields relevant to light-clients together (small optimisation for light clients) * Rework grouping of `BeaconState` fields * `deposit_index` => `eth1_deposit_index` Do not merge before: * #695 which specifies custom types for individual container fields, offsetting the removal of comments in some instances * #896 and #843 so that we don't have to continuously maintain the genesis `BeaconState` * #874 which introduces `current_crosslinks` and `previous_crosslinks`
Co-Authored-By: djrtwo <[email protected]>
After merging with #925, one of the new tests Because
I think it does make sense to say when
|
@hwwhww I simply made the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
get_previous_epoch
cannot underflow and that usage of this function duringGENESIS_EPOCH
is correctGENESIS_SLOT
inprocess_attestation
because there is nothing less thanGENESIS_SLOT
update_justification_and_finalization
at and beforeGENESIS_EPOCH+1
apply_rewards
atGENESIS_EPOCH
Currently blocked by #920