-
Notifications
You must be signed in to change notification settings - Fork 65
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
get_shuffling
can't handle sample
larger than validator_count
#18
Comments
It seems good to set the |
Turns out I made a duplicate issue. I'll close it and just use this one. FWIW, here's the suggestion I had in the duplicate issue: if active_validators < 2:
raise Exception()
ideal_val_count = config['attester_count'] + skip_count + 1
if ideal_val_count > active_validators:
attesters = shuffled[:-1]
proposer = shuffled[-1]
else:
attesters = shuffled[:ideal_val_count - 1]
proposer = shuffled[ideal_val_count - 1] I agree with the EDIT: modified the code to be more sensible. |
After playing around with this in Rust, my thoughts are that I'm only a little of the way into this state transition stuff so take that with a grain of salt. Just my thoughts so far. |
|
Issue
get_shuffling
can't handle whensample
larger thanvalidator_count
. The algorithm does an infinite loop. This actually occurs in code whenlen(active_validators)
is less thanATTESTER_COUNT
andget_attesters_and_signer
is called.Proposed Implementation
stub: need to think more
probably do one of the following:
sample
The text was updated successfully, but these errors were encountered: