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

Add unpredictable chain of values to epoch message #194

Merged
merged 61 commits into from
Nov 16, 2020

Conversation

mstraka100
Copy link
Contributor

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

Copy link
Collaborator

@kobigurk kobigurk left a 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.

Copy link
Contributor Author

@mstraka100 mstraka100 left a 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

crates/bls-crypto/src/hash_to_curve/mod.rs Show resolved Hide resolved
crates/bls-gadgets/src/hash_to_group.rs Show resolved Hide resolved
crates/bls-snark-sys/src/signatures.rs Show resolved Hide resolved
crates/bls-snark-sys/src/signatures.rs Show resolved Hide resolved
crates/epoch-snark/src/gadgets/epochs.rs Outdated Show resolved Hide resolved
@mstraka100 mstraka100 merged commit e2bab96 into master Nov 16, 2020
@kobigurk kobigurk deleted the straka/epoch_randomness_zexe_refactor branch January 17, 2021 19:31
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

Successfully merging this pull request may close these issues.

2 participants