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

Fixing VDF prover for high difficulty #126

Closed
wants to merge 3 commits into from

Conversation

rrtoledo
Copy link

@rrtoledo rrtoledo commented Jul 26, 2022

VDFs with difficulty higher than INT_MAX (2147483647) fail even if the difficulty is set as a double. This is because of a int loop on the difficulty in the prover_slow.h file.

Linked to issue #125

Copy link
Contributor

@fchirica fchirica left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your catch and your contribution!

src/prover_slow.h Outdated Show resolved Hide resolved
@wallentx wallentx linked an issue Aug 15, 2022 that may be closed by this pull request
src/prover_slow.h Outdated Show resolved Hide resolved
rrtoledo and others added 2 commits September 23, 2022 16:35
Co-authored-by: Arvid Norberg <arvid.norberg@gmail.com>
Co-authored-by: Arvid Norberg <arvid.norberg@gmail.com>
Copy link
Member

@hoffmang9 hoffmang9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

for (uint64_t i = 0; i < num_iterations; i++) {
if (i % kl == 0) {
uint64_t index = i / kl;
intermediates.at(index) = y;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

using at() here will slow this down.

@arvidn
Copy link
Contributor

arvidn commented Oct 3, 2022

here's a somewhat tweaked and signed version of this patch: #132

@wallentx
Copy link
Contributor

wallentx commented Oct 6, 2022

Closing this since #132 got merged in. Thank you for the contribution @rrtoledo. I'll be sure to give you recognition in the release notes.

@wallentx wallentx closed this Oct 6, 2022
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.

Proving error when difficulty is too high
5 participants