Git Product home page Git Product logo

lachesis's Introduction

Lachesis

BFT Consensus platform for distributed applications.

Build Status

documentation pages.

Dev

Docker

Create an 3 node lachesis cluster with:

n=3 BUILD_DIR="$PWD" ./scripts/docker/scale.bash

Dependencies

Protobuffer 3

This project uses protobuffer 3 for the communication between posets. To use it, you have to install both protoc and the plugin for go code generation.

Once the stack is setup, you can compile the proto messages by running this command:

make proto

Lachesis and dependencies

Clone the repository in the appropriate GOPATH subdirectory:

$ d="$GOPATH/src/github.com/andrecronje"
$ mkdir -p "$d"
$ git clone https://github.com/andrecronje/lachesis.git "$d"

Lachesis uses Glide to manage dependencies.

$ curl https://glide.sh/get | sh
$ cd "$GOPATH/src/github.com/andrecronje" && glide install

This will download all dependencies and put them in the vendor folder.

Other requirements

Bash scripts used in this project assume the use of GNU versions of coreutils. Please ensure you have GNU versions of these programs installed:-

example for macos:

# --with-default-names makes the `sed` and `awk` commands default to gnu sed and gnu awk respectively.
brew install gnu-sed gawk --with-default-names

Testing

Lachesis has extensive unit-testing. Use the Go tool to run tests:

[...]/lachesis$ make test

If everything goes well, it should output something along these lines:

?   	github.com/andrecronje/lachesis/cmd/dummy	[no test files]
?   	github.com/andrecronje/lachesis/cmd/dummy/commands	[no test files]
?   	github.com/andrecronje/lachesis/cmd/dummy_client	[no test files]
?   	github.com/andrecronje/lachesis/cmd/lachesis	[no test files]
?   	github.com/andrecronje/lachesis/cmd/lachesis/commands	[no test files]
?   	github.com/andrecronje/lachesis/tester	[no test files]
ok  	github.com/andrecronje/lachesis/src/common	(cached)
ok  	github.com/andrecronje/lachesis/src/crypto	(cached)
ok  	github.com/andrecronje/lachesis/src/difftool	(cached)
ok  	github.com/andrecronje/lachesis/src/dummy	0.522s
?   	github.com/andrecronje/lachesis/src/lachesis	[no test files]
?   	github.com/andrecronje/lachesis/src/log	[no test files]
?   	github.com/andrecronje/lachesis/src/mobile	[no test files]
ok  	github.com/andrecronje/lachesis/src/net	(cached)
ok  	github.com/andrecronje/lachesis/src/node	9.832s
?   	github.com/andrecronje/lachesis/src/pb	[no test files]
ok  	github.com/andrecronje/lachesis/src/peers	(cached)
ok  	github.com/andrecronje/lachesis/src/poset	9.627s
ok  	github.com/andrecronje/lachesis/src/proxy	1.019s
?   	github.com/andrecronje/lachesis/src/proxy/internal	[no test files]
?   	github.com/andrecronje/lachesis/src/proxy/proto	[no test files]
?   	github.com/andrecronje/lachesis/src/service	[no test files]
?   	github.com/andrecronje/lachesis/src/utils	[no test files]
?   	github.com/andrecronje/lachesis/src/version	[no test files]

Cross-build from source

The easiest way to build binaries is to do so in a hermetic Docker container. Use this simple command:

[...]/lachesis$ make dist

This will launch the build in a Docker container and write all the artifacts in the build/ folder.

[...]/lachesis$ tree --charset=nwildner build
build
|-- dist
|   |-- lachesis_0.4.3_SHA256SUMS
|   |-- lachesis_0.4.3_darwin_386.zip
|   |-- lachesis_0.4.3_darwin_amd64.zip
|   |-- lachesis_0.4.3_freebsd_386.zip
|   |-- lachesis_0.4.3_freebsd_arm.zip
|   |-- lachesis_0.4.3_linux_386.zip
|   |-- lachesis_0.4.3_linux_amd64.zip
|   |-- lachesis_0.4.3_linux_arm.zip
|   |-- lachesis_0.4.3_windows_386.zip
|   `-- lachesis_0.4.3_windows_amd64.zip
|-- lachesis
`-- pkg
    |-- darwin_386
    |   `-- lachesis
    |-- darwin_386.zip
    |-- darwin_amd64
    |   `-- lachesis
    |-- darwin_amd64.zip
    |-- freebsd_386
    |   `-- lachesis
    |-- freebsd_386.zip
    |-- freebsd_arm
    |   `-- lachesis
    |-- freebsd_arm.zip
    |-- linux_386
    |   `-- lachesis
    |-- linux_386.zip
    |-- linux_amd64
    |   `-- lachesis
    |-- linux_amd64.zip
    |-- linux_arm
    |   `-- lachesis
    |-- linux_arm.zip
    |-- windows_386
    |   `-- lachesis.exe
    |-- windows_386.zip
    |-- windows_amd64
    |   `-- lachesis.exe
    `-- windows_amd64.zip

11 directories, 29 files

lachesis's People

Contributors

andrecronje avatar arrivets avatar calvinchengx avatar champii avatar devvcat avatar dzeckelev avatar fhaynes avatar joneskm avatar josephg avatar mauleyzaola avatar maxime2 avatar mpitid avatar okislitsin avatar orangetest1 avatar rishflab avatar roanbrand avatar s4kibs4mi avatar samuelmarks avatar shalokshalom avatar stanislavstoyanov avatar

Watchers

 avatar  avatar

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.