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

pallet_drand: Use drand randomness as a seed #9

Open
3 tasks
juangirini opened this issue Sep 5, 2024 · 1 comment
Open
3 tasks

pallet_drand: Use drand randomness as a seed #9

juangirini opened this issue Sep 5, 2024 · 1 comment

Comments

@juangirini
Copy link
Contributor

Currently, we are storing drand's randomness as our actual randomness, but this value is very easily predictable by just querying drand's API before we do.
Instead, a unique random value is needed. This will be a signature of drand's randomness. We can then use this signature as an unpredictable random value and verify that the signer signed it.

Todo:

  • Make the collator sign drand's randomness and store the resulting hash and the signer along the original randomness in the Pulse struct.
  • In the Verifier::verify method, verify that the signer signed it.
  • Update the documentation accordingly
@juangirini juangirini changed the title Use drand randomness as a seed pallet_drand: Use drand randomness as a seed Oct 31, 2024
@juangirini
Copy link
Contributor Author

@driemworks I guess we want this value to live along with the "drand" rand value to preserve the timelock encryption capabilities. But should we store it? or should we calculate this new value on distribution within the pallet_idn_manager?
The pros of calculating it on distribution is that the timeframe for frontrunning is reduced, cons is that it can only be done by an ocw

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant