-
Notifications
You must be signed in to change notification settings - Fork 52
feat(stm): Lottery target value computation for snark proof #2958
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
base: main
Are you sure you want to change the base?
Conversation
comments and trait implementations
change log and crates version
rebased on its parent
e2e6a9e to
1160cc5
Compare
Test Results 4 files - 1 169 suites - 3 23m 42s ⏱️ - 8m 17s Results for commit 1160cc5. ± Comparison against base commit 376235c. This pull request removes 105 and adds 1 tests. Note that renamed tests count towards both. |
| let w = Float::with_val(117, stake) / Float::with_val(117, total_stake); | ||
| let phi = Float::with_val(117, 1.0) - Float::with_val(117, 1.0 - phi_f).pow(w); | ||
| // increase precision | ||
| let phi_high = Float::with_val(300, phi); |
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.
Can phi_high really have a precision of 300 if phi has a precision of 100 (I do not know how this work)?
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.
Just checked, and float (such as f64) should be deterministic, not sure about Float though.
| ) -> StmResult<LotteryTargetValue> { | ||
| // modulus - 1 | ||
| let ev_max = -BaseFieldElement::get_one(); | ||
| if !(0.0..=1.0).contains(&phi_f) { |
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.
Does this remove 0?
Content
This PR includes lottery target value computation for snark proof system.
Pre-submit checklist
Comments
A new sub-module
lotteryis added underprotocolmodule.lotteryonly includes thesnark_eligibility. Eligibility check for concatenation proof will be moved to this sub-module later.Issue(s)
Relates to #2792