Giter VIP home page Giter VIP logo

vdf-golang's Introduction

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

vdf-golang's People

Contributors

bryawnie avatar

Watchers

 avatar

Forkers

eriverosr

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.