Skip to content
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

Implement solution for #1446, based on suggested use of eth1 hash #1447

Merged
merged 4 commits into from
Oct 28, 2019

Conversation

protolambda
Copy link
Contributor

@protolambda protolambda commented Oct 25, 2019

First of all, I am very aware that the use of block hashes does not provide great randomness.

However, the concern was that the selection of committees of the early epochs could realistically be biased by deposit ordering manipulation. Setting some initial randomness, even if biasable by a few bits, should help work around this attack vector.
This solution came out of a conversation between @paulhauner and @djrtwo in #1446, but I am open to any better alternatives.

Also note that I adapted it to:

  1. Fill randao mixes based on the LOOKAHEAD constant
  2. Use the eth1 hash as seed, and set different randao mixes.

Alternatively we could also fill the whole mixes array with seeded hashes: no concern about exact LOOKAHEAD value, but much more work (mainnet history size = 2**16). Or we do not care about different mixes, and copy over the eth1 hash.

Edit: not as seed, just plain copy, and into the full extent of the randao-mixes (less error prone, more minimal). Thanks to Justin for pointing out that get_seed already mixes in the epoch, for us to not care about duplicate randao mixes here, just what we need.

@protolambda protolambda changed the title Implement (unpolished) solution for #1446, based on suggested use of eth1 hash Implement solution for #1446, based on suggested use of eth1 hash Oct 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants