Skip to content

Switch to Rust VDF

Agost Biro requested to merge agostbiro/ceremonyclient:rust-vdf into v1.4.19

Switch to Rust Wesolowski VDF implementation for ~20x speed up in proving time with t=10000 and ~3x speed up in verification time. The Rust implementation is a fork of https://github.com/poanetwork/vdf.

The test instructions below assume ARM MacOS and the presence of Go 1.20 and Rust toolchain.

  • Install GMP 6.3: brew install gmp
  • Install the Go plugin for uniffi-rs: cargo install uniffi-bindgen-go --git https://github.com/NordSecurity/uniffi-bindgen-go --tag v0.2.1+v0.25.0
  • From the vdf directory, run `go generate to build the Rust lib and the Go bindings.
  • From the vdf directory, run ./test.sh to test the bindings and their compatibility with the nekrocryptology implementation.
  • From the node directory, run ./test_weso_frame_prover.sh to test wesolowski_frame_prover.go that uses the Rust VDF.

Please see the CONTRIBUNTING.md on how to build release binaries with statically linked native dependencies.

Edited by Agost Biro

Merge request reports