-
Notifications
You must be signed in to change notification settings - Fork 24
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
Add unpredictable chain of values to epoch message #194
Conversation
…ictor/epoch-entropy
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.
@mstraka100 LGTM!
I added a few more tests, made the epochs tests more extensive so that they verify public inputs as well and some renaming.
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.
Changes look good. Left a few minor comments
Description
Identical to #183 merged with master and with relevant circuit code added. This PR makes epoch entropy values, derived from the epoch block header hash, available to the constraint system. It adds constraints to check that the entropy values form a chain. Entropy values are optional to support different versions of Celo. These constraints are designed to be trivially satisfied if the first epoch does not contain entropy. The entropy of the first and last epochs are hashed as part of the public input.
Tested
The multiple epochs tests were refactored, with additional cases added covering the uses of entropy in epoch blocks.
Related issues
#185