-
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
Rework initial shard slot (PHASE_1_FORK_SLOT
)
#1971
Conversation
8148ef2
to
0b81c96
Compare
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 have made a couple of suggestions that IMHO are to increase readability for a little bit.
The other thing might worth mentioning. These changes doesn't allow for shard blocks production during PHASE_1_FORK_SLOT
while in the case where PHASE_1_FORK_SLOT > GENESIS_SLOT
, e.g. the Mainnet, there would be an opportunity to do that as compute_previous_slot(pre.slot)
in shard states initializer would return pre.slot - 1
.
Do we want to use this opportunity? If yes then PHASE_1_FORK_SLOT
in the places where it addresses off-by-one issue should be replaced with GENESIS_SLOT
.
Co-authored-by: Mikhail Kalinin <[email protected]>
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.
excellent!
Issue
Fix #1877
How did I fix it
PHASE_1_GENESIS_SLOT
toPHASE_1_FORK_SLOT
: IMHO it's clearer. (Sorry!)shard_state.slot
tocompute_previous_slot(pre.slot)
, wherepre
is the beacon state.PHASE_1_FORK_SLOT = GENESIS_SLOT = 0
for the test vectors generation.TODO
Since it makes
PHASE_1_FORK_SLOT = GENESIS_SLOT = 0
, we have to add fork boundary tests with a new config with a reasonable value, e.g.,PHASE_1_FORK_SLOT := Slot(256)
. Leave it to future PRs.