to benchmark VDF's eval() and verify() more accurately, we need to separate "g <- H_G(x)", that is, h_g should not count for the measurement. Especially when we are comparing class_group vs RSA_group: h_g in class_group and h_g in RSA_group are different. This PR attempts to refactor class_group Wesolowski VDF, by moving "g <- H_G(x)" outside eval() and verify().
environment
Ubuntu 20.04.1 LTS
linux 5.4.0-48-generic
cargo 1.44.1 (88ba85757 2020-06-11)
rustup 1.22.1 (b01adbbc3 2020-07-08)
rustc 1.44.1 (c7087fe00 2020-06-17)
how to test it
cargo test vdf -- --test-threads 1
test result
running 2 tests
test primitives::vdf::tests::test_vdf_valid_proof ... ok
test primitives::vdf::tests::test_vdf_wrong_proof ... ok
test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 26 filtered out
to benchmark VDF's eval() and verify() more accurately, we need to separate "g <- H_G(x)", that is,
h_g
should not count for the measurement. Especially when we are comparing class_group vs RSA_group: h_g in class_group and h_g in RSA_group are different. This PR attempts to refactor class_group Wesolowski VDF, by moving "g <- H_G(x)" outside eval() and verify().environment
how to test it
test result