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
Compress y. #87
Compress y. #87
Conversation
i really think we should sort out the names to match between the repo's and the paper |
I agree with the above suggestion by Almog that we should keep the naming consistent. The "compressed y" value is actually named Secondly, the Alternatively, if it is desired to have a function to compress |
I'll rename The goal is to turn a proof Indeed, we can save this unnecessary check |
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.
I understand now that for N-weso we have to verify the segments before the last one in order to find x
for the last segment. Getting B
from 0-weso doesn't require verification work, which is good.
I suggested some minor fixes in inline comments.
src/verifier.h
Outdated
|
||
bool CheckProofOfTimeNWesolowski(integer D, const uint8_t* x_s, const uint8_t* proof_blob, int32_t proof_blob_len, uint64_t iterations, uint64 disc_size_bits, int32_t depth) { |
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.
In this and two other functions disc_size_bits
argument is unused and could be removed.
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.
I left it for CheckProofOfTimeNWesolowski
and verify_n_wesolowski
, since those functions are already heavily used both in chiavdf and in chia-blockchain. I removed the field for the 2 new functions.
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.
actually I've tracked and removed it from CheckProofOfTimeNWesolowski
, but I'll still keep it in python bindings function (verify_n_wesolowski
)
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.
lgtm
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.
tested my new wp code with latest changes from this pr, looks good
Compress y form from 100 bytes to 33 bytes and adds python bindings for compression/verification. Note that this modifies chiavdf n-wesolowski verification as well, by factoring out the common parts in the verifiers.