-
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
Underflow in generate_seed for GENESIS_EPOCH #1017
Comments
@djrtwo I remember you saying that in Python we can do some magic to the minus operator |
violated when it's actually
yes, it is possible to monkeypatch the nice find @mkalinin, I think it likely appropriate to put a min of genesis_epoch on that call to get_randao_mix. The actual assert in I'll clean up these two and another function in a PR now |
addressed in #1027 |
I like this idea. Should be useful for all |
Fixed in #1027 and created a new issue for monkey-patching the minus operator. |
Issue
Encountered in
v0.6.0
.With
epoch = 0 (GENESIS_EPOCH)
generate_seed passesepoch = GENESIS_EPOCH - 1
value toget_randao_mix
:With
epoch = -1
get_randao_mix throws an assertion error as conditionepoch <= get_current_epoch(state)
gets violated.The text was updated successfully, but these errors were encountered: