All Projects → Fantom-foundation → Go Lachesis

Fantom-foundation / Go Lachesis

Licence: mit
aBFT consensus for permission-less networks

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Labels

Projects that are alternatives of or similar to Go Lachesis

Ratis
Open source Java implementation for Raft consensus protocol.
Stars: ✭ 443 (+403.41%)
Mutual labels:  consensus
Awesome Cryptoeconomics
An awesome curated list of Cryptoeconomic research and learning materials
Stars: ✭ 763 (+767.05%)
Mutual labels:  consensus
Rqlite
The lightweight, distributed relational database built on SQLite
Stars: ✭ 9,147 (+10294.32%)
Mutual labels:  consensus
Async Raft
An implementation of the Raft distributed consensus protocol using the Tokio framework.
Stars: ✭ 510 (+479.55%)
Mutual labels:  consensus
Hraftd
A reference use of Hashicorp's Raft implementation
Stars: ✭ 732 (+731.82%)
Mutual labels:  consensus
Burrow
https://wiki.hyperledger.org/display/burrow
Stars: ✭ 851 (+867.05%)
Mutual labels:  consensus
Tendermint
⟁ Tendermint Core (BFT Consensus) in Go
Stars: ✭ 4,491 (+5003.41%)
Mutual labels:  consensus
Skinny
The Skinny Distributed Lock Service
Stars: ✭ 70 (-20.45%)
Mutual labels:  consensus
Awesome Distributed Systems
A curated list to learn about distributed systems
Stars: ✭ 7,263 (+8153.41%)
Mutual labels:  consensus
Chainspace Prototype
Chainspace is a distributed ledger platform for high-integrity and transparent processing of transactions within a decentralized system.
Stars: ✭ 41 (-53.41%)
Mutual labels:  consensus
Copycat
A novel implementation of the Raft consensus algorithm
Stars: ✭ 551 (+526.14%)
Mutual labels:  consensus
Translations
🐼 Chinese translations for classic IT resources
Stars: ✭ 6,074 (+6802.27%)
Mutual labels:  consensus
Groupthink
A collaborative democratic platform built atop GitHub, designed for open policymaking and manifesto writing.
Stars: ✭ 28 (-68.18%)
Mutual labels:  consensus
Elle
The Elle coroutine-based asynchronous C++ development framework.
Stars: ✭ 459 (+421.59%)
Mutual labels:  consensus
Scp zh
恒星共识协议中文翻译
Stars: ✭ 59 (-32.95%)
Mutual labels:  consensus
Nuraft
C++ implementation of Raft core logic as a replication library
Stars: ✭ 428 (+386.36%)
Mutual labels:  consensus
Abci Host
Clojure host/server for Tendermint's ABCI protocol.
Stars: ✭ 18 (-79.55%)
Mutual labels:  consensus
Paxosstore
PaxosStore has been deployed in WeChat production for more than two years, providing storage services for the core businesses of WeChat backend. Now PaxosStore is running on thousands of machines, and is able to afford billions of peak TPS.
Stars: ✭ 1,278 (+1352.27%)
Mutual labels:  consensus
Cita
A high performance blockchain kernel for enterprise users.
Stars: ✭ 1,155 (+1212.5%)
Mutual labels:  consensus
Consensus Yaraft
consensus-yaraft is a library for distributed, strong consistent, highly replicated log storage. It's based on yaraft, which is an implementation of the Raft protocol.
Stars: ✭ 30 (-65.91%)
Mutual labels:  consensus

Lachesis

aBFT Consensus platform for distributed applications.

Build Details

version
Build Status
appveyor
license
libraries.io dependencies

Code Quality

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

GoDoc

Documentation.

Sonarcloud

GitHub

Commit Activity
Last Commit
Contributors
Issues
LoC

Social


twitter

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.

Mainnet

Launching lachesis for mainnet with default settings:

$ lachesis

Configuration

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/
make
docker run -d --name lachesis-node -v /home/alice/lachesis:/root \
           -p 5050:5050 \
          "lachesis" \
          --port 5050 \
          --nat extip:YOUR_IP

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

Do not forget --rpcaddr 0.0.0.0, if you plan 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

Validator

To launch a validator, you have to use --validator flag to enable events emitter. Also you have to either use --unlock / --password flags or unlock validator account manually. Validator account should be unlocked for signing events.

$ lachesis --nousb --validator 0xADDRESS --unlock 0xADDRESS --password /path/to/password

Participation in discovery

Optionally you can specify your public IP to straighten connectivity of the network. Ensure your TCP/UDP p2p port (5050 by default) isn't blocked by your firewall.

$ lachesis --nat extip:1.2.3.4

Dev

Running testnet

To run a testnet node, you have to add --testnet flag every time you use lachesis:

$ lachesis --testnet # launch node
$ lachesis --testnet attach # attach to IPC
$ lachesis --testnet account new # create new account

Testing

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:

?       github.com/Fantom-foundation/go-lachesis/event_check/basic_check    [no test files]
?       github.com/Fantom-foundation/go-lachesis/event_check/epoch_check    [no test files]
?       github.com/Fantom-foundation/go-lachesis/event_check/heavy_check    [no test files]
?       github.com/Fantom-foundation/go-lachesis/event_check/parents_check  [no test files]
ok      github.com/Fantom-foundation/go-lachesis/evm_core   (cached)
ok      github.com/Fantom-foundation/go-lachesis/gossip (cached)
?       github.com/Fantom-foundation/go-lachesis/gossip/fetcher [no test files]
?       github.com/Fantom-foundation/go-lachesis/gossip/occuredtxs [no test files]
ok      github.com/Fantom-foundation/go-lachesis/gossip/ordering    (cached)
ok      github.com/Fantom-foundation/go-lachesis/gossip/packsdownloader    (cached)

Operating a private network (fakenet)

Fakenet is a private network optimized for your private testing. It'll generate a genesis containing N validators with equal stakes. To launch a validator in this network, all you need to do is specify a validator ID you're willing to launch.

Pay attention that validator's private keys are deterministically generated in this network, so you must use it only for private testing.

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 (which will work practically as a PoA blockchain), 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

If you have to launch a non-validator node in fakenet, use 0 as ID:

$ lachesis --fakenet 0/5

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

$ lachesis --fakenet 1/5 --bootnodes "enode://[email protected]:5050"

Running the demo

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

cd docker/
make # build docker image
./start.sh # start the containers
./stop.sh # 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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].