Skip to content

Executing the Chia VDF implementation in C++ but using Go.

Notifications You must be signed in to change notification settings

bryawnie/vdf-golang

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GO VDF

Running Verifiable Delay Function in GO Execution example using ChiaVDF.

Run using Docker

Raise the docker container using docker compose. It produces a one-shot execution.

docker compose up --build

Run Locally (Ubuntu)

  1. Load ChiaVDF submodule bu running:
git submodule update --init
  1. Install in your device the required compiling tools.
sudo apt-get install cmake libgmp-dev libboost-system-dev build-essential -y
  1. Create directory chiavdf/build, and then move into it.
mkdir chiavdf/build && cd chiavdf/build
  1. Run CMake to configure the project, establishing flags to compile chiavdfc and ommit python library. Pass as parameter the directory in which CMakeLists.txt is located.
cmake -DBUILD_CHIAVDFC=ON -DBUILD_PYTHON=OFF ../src
  1. Build Chia VDF Library.
make

By following the previous commands, we obtain a shared library: libchiavdfc.so, located inside chiavdf/build/shared.

  1. Go back to root project's folder.
cd ../..
  1. Export path of C wrappers, ChiaVDF shared library and libgmp.
export CGO_CFLAGS="-I/path/to/chiavdf/src/c_bindings"
export CGO_LDFLAGS="-L/path/to/chiavdf/build/lib/shared -L/usr/lib/x86_64-linux-gnu -lgmp"
export LD_LIBRARY_PATH="/path/to/chiavdf/build/lib/shared"
  1. Run main program:
go run main.go

About

Executing the Chia VDF implementation in C++ but using Go.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published