Skip to content
aBFT consensus for permission-less networks
Go Shell Makefile
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github Actual team at CODEOWNERS Mar 4, 2019
common fix pathes after rename Oct 2, 2019
debug Make lint happy: The comeback Nov 9, 2019
demo demo: allow txpool RPC calls Dec 9, 2019
docker enable discv5 by default Dec 9, 2019
docs PublicDebugAPI.GetHeads() Dec 5, 2019
ethapi ethapi.RPCMarshalHeader() fix Dec 7, 2019
eventcheck add comments Dec 9, 2019
evmcore use idx.StakerID instead of common.Address Dec 9, 2019
gossip initial economy [FIP-2] Dec 10, 2019
integration use idx.StakerID instead of common.Address Dec 9, 2019
inter initial economy [FIP-2] Dec 10, 2019
kvdb store: optimize table prefixes Dec 9, 2019
logger log: move PeriodicLogger from utils to logger Oct 16, 2019
metrics/prometheus tx-storm metrics Nov 14, 2019
params cli version Oct 30, 2019
poset initial economy [FIP-2] Dec 10, 2019
topicsdb store: optimize table prefixes Dec 9, 2019
tracing tracer settings from environment variables Dec 2, 2019
utils initial economy [FIP-2] Dec 10, 2019
vector use idx.StakerID instead of common.Address Dec 9, 2019
version move source from src/ to / Oct 2, 2019
.codacy.yml fix pathes after rename Oct 2, 2019
.dockerignore pos-lachesis docker Apr 16, 2019
.editorconfig editorconfig: add section for *.proto Feb 21, 2019
.gitignore evm: apply block, emit transactions via tx pool Aug 27, 2019
.goreleaser.yml fix pathes after rename Oct 2, 2019
.travis.yml 18 oct milestone merge (#21) Oct 19, 2018 Create Oct 9, 2018 Create Dec 18, 2018
LICENSE license Oct 23, 2019
Makefile add Makefile and demo scripts Dec 9, 2019 Create Dec 18, 2018
appveyor.yml inter/EventHeaderData custom serializer Oct 30, 2019
go.mod pretty go.mod Dec 6, 2019
go.sum go-ethereum upgrade to 1.9.8 Dec 5, 2019 Update Dec 19, 2018


aBFT Consensus platform for distributed applications.

Build Details

Build Status
license dependencies

Code Quality

Go Report Card
Code Climate Maintainability Grade
Code Climate Maintainability
Code Climate Technical Dept
Codacy code quality
cii best practices
cii percentage





Commit Activity
Last Commit



Building the source

Building lachesis requires both a Go (version 1.13 or later) and a C compiler. You can install them using your favourite package manager. Once the dependencies are installed, run

go build -o ./build/lachesis ./cmd/lachesis

The build output is build/lachesis executable.

Do not clone the project into $GOPATH, due to the Go Modules. Instead, use any other location.

Running lachesis

Going through all the possible command line flags is out of scope here, but we've enumerated a few common parameter combos to get you up to speed quickly on how you can run your own lachesis instance.


As an alternative to passing the numerous flags to the lachesis binary, you can also pass a configuration file via:

$ lachesis --config /path/to/your_config.toml

To get an idea how the file should look like you can use the dumpconfig subcommand to export your existing configuration:

$ lachesis --your-favourite-flags dumpconfig

Docker quick start

One of the quickest ways to get Lachesis up and running on your machine is by using Docker:

cd docker/
docker run -d --name lachesis-node -v /home/alice/lachesis:/root \
           -p 5050:5050 \
          "lachesis" \
          --port 5050 \

This will start lachesis with --port 5050 --nat=extip:YOUR_IP arguments, with DB files inside /home/alice/lachesis/.lachesis

Do not forget --rpcaddr, if you want to access RPC from other containers and/or hosts. By default, lachesis binds to the local interface and RPC endpoints is not accessible from the outside.

To find out your enode ID, use:

docker exec -i lachesis-node /lachesis --exec "admin.nodeInfo.enode" attach

To get the logs:

docker logs lachesis-node



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

go test ./...

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

?    [no test files]
?    [no test files]
?    [no test files]
?  [no test files]
ok   (cached)
ok (cached)
? [no test files]
? [no test files]
ok    (cached)
ok    (cached)

Operating a private network

Maintaining your own private network is more involved as a lot of configurations taken for granted in the official networks need to be manually set up.

To run the fakenet with just one validator, use:

$ lachesis --fakenet 1/1

To run the fakenet with 5 validators, run the command for each validator:

$ lachesis --fakenet 1/5 # first node, use 2/5 for second node

After that, you have to connect your nodes. Either connect them statically, or specify a bootnode:

$ lachesis --fakenet 1/5 --bootnodes "enode://ade7067fe5495db3d9f44dfda710a2873f339f9288c02941c80b1a7ede16f1d1ceef97736c6680d163f04be7f706dabca01e697e1e7290dfc7c07d1eacb47c54@"

Running the demo

For the testing purposes, the full demo may be launched using:

cd docker/
make # build docker image
./ # start the containers
./ # stop the demo

The full demo doesn't spin up very fast. To avoid the full docker image building, you may run the integration test instead:

go test -v ./integration/...

Adjust test duration, number of nodes and logs verbosity in the test source code.

You can’t perform that action at this time.