EVM-compatible chain secured by the Lachesis consensus algorithm.

ICICB-Galaxy

EVM-compatible chain secured by the Lachesis consensus algorithm.

Building the source

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

make galaxy

The build output is build/galaxy executable.

Running galaxy

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 galaxy instance.

Launching a network

Launching galaxy for a network:

$ galaxy --genesis /path/to/genesis.g

Configuration

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

$ galaxy --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:

$ galaxy --your-favourite-flags dumpconfig

Validator

New validator private key may be created with galaxy validator new command.

To launch a validator, you have to use --validator.id and --validator.pubkey flags to enable events emitter.

$ galaxy --nousb --validator.id YOUR_ID --validator.pubkey 0xYOUR_PUBKEY

galaxy will prompt you for a password to decrypt your validator private key. Optionally, you can specify password with a file using --validator.password flag.

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.

$ galaxy --nat extip:1.2.3.4

Dev

Running testnet

The network is specified only by its genesis file, so running a testnet node is equivalent to using a testnet genesis file instead of a mainnet genesis file:

$ galaxy --genesis /path/to/testnet.g # launch node

It may be convenient to use a separate datadir for your testnet node to avoid collisions with other networks:

$ galaxy --genesis /path/to/testnet.g --datadir /path/to/datadir # launch node
$ galaxy --datadir /path/to/datadir account new # create new account
$ galaxy --datadir /path/to/datadir attach # attach to IPC

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:

ok  	github.com/goicicb/app	0.033s
?   	github.com/goicicb/cmd/cmdtest	[no test files]
ok  	github.com/goicicb/cmd/galaxy	13.890s
?   	github.com/goicicb/cmd/galaxy/metrics	[no test files]
?   	github.com/goicicb/cmd/galaxy/tracing	[no test files]
?   	github.com/goicicb/crypto	[no test files]
?   	github.com/goicicb/debug	[no test files]
?   	github.com/goicicb/ethapi	[no test files]
?   	github.com/goicicb/eventcheck	[no test files]
?   	github.com/goicicb/eventcheck/basiccheck	[no test files]
?   	github.com/goicicb/eventcheck/gaspowercheck	[no test files]
?   	github.com/goicicb/eventcheck/heavycheck	[no test files]
?   	github.com/goicicb/eventcheck/parentscheck	[no test files]
ok  	github.com/goicicb/evmcore	6.322s
?   	github.com/goicicb/gossip	[no test files]
?   	github.com/goicicb/gossip/emitter	[no test files]
ok  	github.com/goicicb/gossip/filters	1.250s
?   	github.com/goicicb/gossip/gasprice	[no test files]
?   	github.com/goicicb/gossip/occuredtxs	[no test files]
?   	github.com/goicicb/gossip/piecefunc	[no test files]
ok  	github.com/goicicb/integration	21.640s

Also it is tested with fuzzing.

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:

$ galaxy --fakenet 1/1

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

$ galaxy --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:

$ galaxy --fakenet 0/5

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

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

Running the demo

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

cd demo/
./start.sh # start the Galaxy processes
./stop.sh # stop the demo
./clean.sh # erase the chain data

Make config file

d:/icicb/config.toml ">
./galaxy --genesis --rpc  -rpcaddr 0.0.0.0 --datadir=d:/icicb/galaxy --rpcapi "net,eth,txpool,web3" --maxpeers 128 --maxpendpeers 128 --txpool.globalqueue 4096  dumpconfig > d:/icicb/config.toml

Running fakenet

./build/galaxy --fakenet 1/1 --http --http.addr="127.0.0.1" --http.port=5050 --http.corsdomain="*" --http.api="eth,debug,net,admin,web3,personal,txpool,icicb,dag" --datadir=d:/icicb/fake
Similar Resources

A phoenix Chain client based on the go-ethereum fork,the new PoS consensus engine is based on the VRF algorithm.

Phoenix Official Golang implementation of the Phoenix protocol. !!!The current version is for testing and developing purposes only!!! Building the sou

Aug 18, 2022

Eunomia is a distributed application framework that support Gossip protocol, QuorumNWR algorithm, PBFT algorithm, PoW algorithm, and ZAB protocol and so on.

Introduction Eunomia is a distributed application framework that facilitates developers to quickly develop distributed applications and supports distr

Sep 28, 2021

Rei chain fork from quorum using raft consensus

Rei chain fork from quorum using raft consensus

GoQuorum is an Ethereum-based distributed ledger protocol with transaction/contract privacy and new consensus mechanisms. GoQuorum is a fork of go-eth

Aug 8, 2022

The TinyKV course builds a key-value storage system with the Raft consensus algorithm.

The TinyKV course builds a key-value storage system with the Raft consensus algorithm.

The TinyKV Course The TinyKV course builds a key-value storage system with the Raft consensus algorithm. It is inspired by MIT 6.824 and TiKV Project.

Jan 4, 2022

The TinyKV course builds a key-value storage system with the Raft consensus algorithm.

The TinyKV course builds a key-value storage system with the Raft consensus algorithm.

The TinyKV Course The TinyKV course builds a key-value storage system with the Raft consensus algorithm. It is inspired by MIT 6.824 and TiKV Project.

Nov 19, 2021

rgkv is a distributed kv storage service using raft consensus algorithm.

rgkv is a distributed kv storage service using raft consensus algorithm.

rgkv rgkv is a distributed kv storage service using raft consensus algorithm. Get/put/append operation High Availability Sharding Linearizability Tabl

Jan 15, 2022

A naive implementation of Raft consensus algorithm.

This implementation is used to learn/understand the Raft consensus algorithm. The code implements the behaviors shown in Figure 2 of the Raft paper wi

Dec 3, 2021

The TinyKV course builds a key-value storage system with the Raft consensus algorithm

The TinyKV course builds a key-value storage system with the Raft consensus algorithm

The TinyKV Course The TinyKV course builds a key-value storage system with the Raft consensus algorithm. It is inspired by MIT 6.824 and TiKV Project.

Jul 26, 2022

Raft: a consensus algorithm for managing a replicated log

Raft Consensus Algorithm Raft is a consensus algorithm for managing a replicated

Dec 20, 2021

An implementation of the consensus algorithm Map Reduce.

An implementation of the consensus algorithm Map Reduce. Framework written by Professor Matthew. Implemented by Makara Teu.

Jul 8, 2022

This is my implementation of Raft consensus algorithm that I did for own learning.

This is my implementation of Raft consensus algorithm that I did for own learning. Please follow the link to learn more about raft consensus algorithm https://raft.github.io. And Soon, I will be developing same algorithm in Java as well

Jan 12, 2022

Tinykv - The TinyKV course builds a key-value storage system with the Raft consensus algorithm

Tinykv - The TinyKV course builds a key-value storage system with the Raft consensus algorithm

The TinyKV Course The TinyKV course builds a key-value storage system with the R

Dec 7, 2022

The goal of Binance Smart Chain is to bring programmability and interoperability to Binance Chain

Binance Smart Chain The goal of Binance Smart Chain is to bring programmability

Aug 17, 2022

XT Smart Chain, a chain based on the go-ethereum fork

XT Smart Chain XT Smart Chain (XSC) is a decentralized, high-efficiency and ener

Dec 28, 2022

Berylbit PoW chain using Ethash, EPI-Burn and geth. The chain will be using bot congestion flashbot bundles through nodes

Berylbit PoW chain using Ethash, EPI-Burn and geth. The chain will be using bot congestion flashbot bundles through nodes. Soon, We will work towards

Jun 30, 2022

Chisel is a fast TCP/UDP tunnel, transported over HTTP, secured via SSH.

Chisel is a fast TCP/UDP tunnel, transported over HTTP, secured via SSH.

Chisel is a fast TCP/UDP tunnel, transported over HTTP, secured via SSH. Single executable including both client and server. Written in Go (golang). Chisel is mainly useful for passing through firewalls, though it can also be used to provide a secure endpoint into your network.

Jan 1, 2023

GoHooks make it easy to send and consume secured web-hooks from a Go application

GoHooks GoHooks make it easy to send and consume secured web-hooks from a Go application. A SHA-256 signature is created with the sent data plus an en

Nov 16, 2022

gproxy is a tiny service/library for creating lets-encrypt/acme secured gRPC and http reverse proxies

gproxy is a tiny service/library for creating lets-encrypt/acme secured gRPC and http reverse proxies

gproxy is a reverse proxy service AND library for creating flexible, expression-based, lets-encrypt/acme secured gRPC/http reverse proxies GProxy as a

Sep 11, 2022
Related tags
A faster RWLock primitive in Go, 2-3 times faster than RWMutex. A Go implementation of concurrency control algorithm in paper

Go Left Right Concurrency A Go implementation of the left-right concurrency control algorithm in paper <Left-Right - A Concurrency Control Technique w

Jan 6, 2023
A concurrent rate limiter library for Golang based on Sliding-Window rate limiter algorithm.

ratelimiter A generic concurrent rate limiter library for Golang based on Sliding-window rate limitng algorithm. The implementation of rate-limiter al

Jan 6, 2023
golang implement gossip algorithm
golang implement gossip algorithm

golang implement gossip algorithm

Dec 1, 2022
Scalable golang ratelimiter using the sliding window algorithm. Currently supports only Redis.
Scalable golang ratelimiter using the sliding window algorithm. Currently supports only Redis.

go-ratelimiter Scalable golang ratelimiter using the sliding window algorithm. Currently supports only Redis. Example usage client := redis.NewClient

Oct 19, 2021
EVM-compatible chain secured by the Lachesis consensus algorithm.

ICICB-Galaxy EVM-compatible chain secured by the Lachesis consensus algorithm. Building the source Building galaxy requires both a Go (version 1.14 or

Oct 7, 2021
EVM-compatible chain secured by the Lachesis consensus algorithm

ICICB galaxy EVM-compatible chain secured by the Lachesis consensus algorithm. Building the source Building galaxy requires both a Go (version 1.14 or

Jan 8, 2022
Go-opera-test - EVM-compatible chain secured by the Lachesis consensus algorithm

Opera EVM-compatible chain secured by the Lachesis consensus algorithm. Building

Feb 14, 2022
Moeing chain is an EVM&Web3 compatible sidechain for Bitcoin Cash

Full node client of smartBCH This repository contains the code of the full node client of smartBCH, an EVM&Web3 compatible sidechain for Bitcoin Cash.

Nov 29, 2022
A base library defines interfaces and modules of aBFT Lachesis consensus protocol

Lachesis base A base library defines interfaces and modules of aBFT Lachesis consensus protocol. Part of galaxy' s Consensus-as-a-Service for distribu

Oct 25, 2021
A phoenix Chain client based on the go-ethereum fork,the new PoA consensus engine is based on the VRF algorithm.

Phoenix Official Golang implementation of the Phoenix protocol. !!!The current version is for testing and developing purposes only!!! Building the sou

Apr 28, 2022