Random beacon simulator
docker pull dfinity/build-env
git clone git@github.com:timohanke/rb.git
cd rb
docker run --rm -it -v `pwd`/go:/go dfinity/build-env go run main.go
Run all linters:
docker run --rm -it -v `pwd`/go:/go dfinity/build-env gometalinter ./...
As of Jan 22 (EOD) this runs without warnings:
gometalinter --deadline=10s --disable=gas --disable=gocyclo --disable=gotype --disable=interfacer ./...
go run sim.go
go run test.go
All dependencies below are taken care off in the docker image dfinity/build-env
.
Code currently depends on github.com/ethereum/go-ethereum/common
being present in the src
directory.
This will be removed.
Code currently calls the command line tool bls_tool.exe
compiled from Shigeo's code. This is to be replaced by Shigeo's Cgo code.
The build instructions are here: https://github.com/herumi/bls
-> readme.md -> Installation Requirements
That also requires apt-get install libssl-dev
For cgo, which is transitioning in, we need the environment variables set:
export LIBRARY_PATH=/build/herumi/bls/lib:/build/herumi/mcl/lib:$LIBRARY_PATH
export CPATH=/build/herumi/bls/include:$CPATH