VDF-Rust-Go

command module
v0.0.0-...-bab0e8d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 3, 2021 License: MIT Imports: 6 Imported by: 0

README

VDF-Rust-Go

Integrate VDF Rust implementation in harmony Go client

Quickstart

Requires libgmp

  • 'make run' or
  • 'make test' or
  • 'make bench'

NOTES:

'size_in_bits': requesting 2048.
In go-vdf, actually get 258 bytes, 2064 bits.
In rust-vdf (pietrzak algo), requesting 2048 bits gets result of size 272 bytes or 2176 bits.

  • but wesolowski gives 258 bytes for 2048 bitsize

In go-vdf, execute() returns a concatenation of 'output' and 'proof', 258 bytes each, total buf length 516 bytes.

Parameters

'algorithm': Wesolowski (rust adds Pietrzak) 'difficulty'/'iterations': 100 to test, 10000 maybe 'inputsize': 32 bytes 'outputsize': 516 bytes -- seems to concatenate the output and the proof... 'size_in_bits': 2048 -- could be any power of 2? ...rules?... determines 'outputsize'

Compatibility

changing any of the Go parameters seems likely to break the chain or at least make cutover tricky...

disappointingly, the timings are ...very sensitive to conditions, I guess.
At small 'size_in_bits', and small difficulty, I had some runs showing a 500x speedup. But at the params that the go code uses, that's gone, and the speeds are roughly in the same order of magnitude... I'm thinking to add the Pietrzak to the benchmarks, in case that one was taking more advantage of the GMP or something...

...now comparison is 2.2s (Go); 827ms (Rust (wesolowski))

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL