[CHIA-4316] Vdfverifywjb - #1490
Conversation
Bring in the pure-Rust VDF verifier so consensus validation can avoid chiavdf/GMP C dependencies. Co-authored-by: Cursor <cursoragent@cursor.com>
Expose create_discriminant and verify_n_wesolowski as a drop-in C API; prove remains unimplemented. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Coverage Report for CI Build 30836044232Warning Build has drifted: This PR's base is out of sync with its target branch, so coverage data may include unrelated changes. Coverage decreased (-0.5%) to 81.37%Details
Uncovered Changes
Coverage Regressions96 previously-covered lines in 2 files lost coverage.
Coverage Stats
💛 - Coveralls |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want fixes drafted automatically? Bugbot Autofix can create code changes for findings. A team admin can enable Autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 33cac2c. Configure here.
arvidn
left a comment
There was a problem hiding this comment.
I don't think we should include chia-vdf-verify-c. We don't need C-bindings and we should not commit to maintaining them.
Likewise, we don't need python bindings for chia-vdf-verify and I don't think we should maintain them. Meaning not including the wheel directory.
There was a problem hiding this comment.
I think we should remove this. The fuzzer to compare the C implementation against the rust implementation should be a proper rust fuzzer (using libfuzzer). That would give use coverage guided fuzzing and probably more confidence (and performance)
There was a problem hiding this comment.
this doesn't look like something to keep. best case it should be a benchmark, but I don't think it's really relevant
There was a problem hiding this comment.
this is pretty big too, but in a more reasonable file format. I would expect this to be sufficient, and that we could remove the json files
There was a problem hiding this comment.
this file is in an odd location. typically rust source files are under src/. Does anything actually build and run this test?
…icro.rs. vdf_cpp_vs_rust implemented in rust as a criterion benchmark

Moved to chia_rs from https://github.com/richardkiss/chia-vdf-verify
Note
High Risk
New consensus-critical VDF verification logic with a large ported cryptographic codebase; incorrect verification could break block acceptance or open invalid-proof acceptance.
Overview
Adds the
chia-vdf-verifycrate (ported from richardkiss/chia-vdf-verify) as a workspace member with optionalvdf-verifyfeature on the rootchia_rspackage.The crate implements pure-Rust n-Wesolowski VDF proof verification (class groups, malachite-nz big integers—no GMP/C). Workspace deps add
malachite-nzandmalachite-base.Tests & perf: integration tests against chiavdf
vdf.txtvectors; ~100 mainnet reward-chain IP proofs inbenches/proofs.jsonwith Criterion benches (verify,mainnet_proofs) and a script to regenerate fixtures from a Chia DB. Docs include BENCHMARKS.md (Rust vs C++ chiavdf).fuzz_timeouts/JSON captures edge cases from fuzzing.Reviewed by Cursor Bugbot for commit ae23879. Bugbot is set up for automated code reviews on this repo. Configure here.