Skip to content

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

Notifications You must be signed in to change notification settings

eriverosr/vdf-golang

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GO VDF

Running Verifiable Delay Function in GO

Compile Chia VDF

  1. Clone ChiaVDF official repostory. To do so, we can run:
git submodule update --init
  1. Install compiling tools.
sudo apt-get install cmake libgmp-dev libboost-system-dev build-essential -y
  1. Edit chiavdf/src/CMakeLists.txt, by turning on the chiavdfc option, and turning off the python option.
option(BUILD_CHIAVDFC "Build the chiavdfc shared library" ON)
option(BUILD_PYTHON "Build the python bindings for chiavdf" OFF)
  1. Create directory chiavdf/build. Then move into it.
mkdir chiavdf/build
cd chiavdf/build
  1. Run CMake to configure the project. Pass as parameter the directory in which CMakeLists.txt is located.
cmake ../src
  1. Build the project.
make

By following these commands, we obtain a compiled C VDF library: libchiavdfc.a, located inside chiavdf/build/static.

RUN GO FILE

  1. Export absolute path of C Wrappers for ChiaVDF.
export CGO_CFLAGS="-I/path/to/chiavdf/src/c_bindings"
  1. Export absolute path ob libchiavdfc and libgmp.
export CGO_LDFLAGS="-L/path/to/chiavdf/build/lib/static -L/usr/lib/x86_64-linux-gnu -lgmp"
  1. (⚠️ Not working) 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

Languages

  • Dockerfile 67.2%
  • Go 32.8%