Go implementation of Guru

Guru is a Universal Reputation Module for Distributed Consensus Protocols developed at the University of Luxembourg by Alex Biryukov, Daniel Feher, and Dmitry Khovratovich. The original Python simulation code is on Github.


Please make sure you have a development environment with yarn and go installed and configured.

Quickstart: run web UI to see the system running live

  • Collect Javascript dependencies and compile the web assets:

    cd web
    vue build
  • Build and start the application - which will run on port 443 and use development certificates for localhost

    cd ..
    go build ./cmd/gurud
  • Browse to https://localhost

  • Verify that the backend information says 'connected'
  • Click on 'Start Simulation'
  • Fiddle with adding and removing malicious bots

(Alternatively run "vue build" and deploy the content of the "dist" folder to a static web server)

Run unit tests

To run unit tests, run:

go run test ./...


The application uses the new Golang module system (1.11 onwards) so it should grab the required libraries automatically. Check out go.mod for a snapshot of the dependencies.


To create a cpu profile of the running application, run:

go tool pprof gurud.exe

Build all in Docker

  • Build websocket backend and ui in Docker:

  • Run application in containers:

    make run
  • Cleanup stale containers:

    docker stop $(docker ps -q)
    docker rm $(docker ps -aq)
  • Remove all <none> images:

    docker rmi $(docker images | grep none | col 3)

Provision (Linux/MacOS)

To setup a new environment from scratch:

  • Setup a host with Docker
  • Set environment variables $HOST (i.e. and $DEST (i.e. /some/path)
  • Run:


Generate HTTPS Certificates to deploy on custom domain

  • Generate Letsencrypt certificates in Windows 10 / Ubuntu System for Windows 10

    sudo wget
    ./certbot-auto --manual certonly --preferred-challenges dns
  • Optionally check that the DNS challenge has propagated with this tool

  • Certificates will appear in: