hexresearch / hschain

Other
4 stars 0 forks source link

HSchain

[Build Status]()

HSchain is a collection of packages for blockchain development. Currently only PBFT-based consensus algorithms is implemented. PoW development is under way. Following packages could be conidered relatively stable:

Rest of packages in repository are highly experimental.

Development

Nix

Standard way of working on hschain is to use Nix to set up development environment. To use this method one need to install Nix unless it's not already done. After that one only need to type

$ nix-shell

in project root. After new-style cabal should be used. For example:

$ cabal new-build all

Note that if project directory contains .ghc.environment.* files created by new-style cabal commands build will fail.

Cabal

It's possible to use cabal without nix but one'll have to install required C libraries manually (some configurations require libsodium)

Stack

It's also possible to use stack for development

stack build

Build with docker

Docker image https://github.com/phadej/docker-ghc can be used to build project.

Executables are compatable with Ubuntu 18.04.

Steps to build:

Build docker image

cd nix
build-docker.sh

All info about building docker images by nix I found here.

When that command is finished you will have result simlink that refers to the docker image in tar archive format.

build-docker.sh loads this archive into local docker image.