Go-chain - 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:

$ ./build/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:

$ ./build/galaxy --config /path/to/your_config_file.toml

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

$ ./build/galaxy --your-favourite-flags dumpconfig

Validator

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

$ ./build/galaxy validator new

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

$ ./build/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.

$ ./build/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:

$ ./build/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:

$ ./build/galaxy --genesis /path/to/testnet.g --datadir /path/to/datadir # launch node
$ ./build/galaxy --datadir /path/to/datadir account new # create new account
$ ./build/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/galaxy-foundation/go-galaxy/app	0.033s
?   	github.com/galaxy-foundation/go-galaxy/cmd/cmdtest	[no test files]
ok  	github.com/galaxy-foundation/go-galaxy/cmd/galaxy	13.890s
?   	github.com/galaxy-foundation/go-galaxy/cmd/galaxy/metrics	[no test files]
?   	github.com/galaxy-foundation/go-galaxy/cmd/galaxy/tracing	[no test files]
?   	github.com/galaxy-foundation/go-galaxy/crypto	[no test files]
?   	github.com/galaxy-foundation/go-galaxy/debug	[no test files]
?   	github.com/galaxy-foundation/go-galaxy/ethapi	[no test files]
?   	github.com/galaxy-foundation/go-galaxy/eventcheck	[no test files]
?   	github.com/galaxy-foundation/go-galaxy/eventcheck/basiccheck	[no test files]
?   	github.com/galaxy-foundation/go-galaxy/eventcheck/gaspowercheck	[no test files]
?   	github.com/galaxy-foundation/go-galaxy/eventcheck/heavycheck	[no test files]
?   	github.com/galaxy-foundation/go-galaxy/eventcheck/parentscheck	[no test files]
ok  	github.com/galaxy-foundation/go-galaxy/evmcore	6.322s
?   	github.com/galaxy-foundation/go-galaxy/gossip	[no test files]
?   	github.com/galaxy-foundation/go-galaxy/gossip/emitter	[no test files]
ok  	github.com/galaxy-foundation/go-galaxy/gossip/filters	1.250s
?   	github.com/galaxy-foundation/go-galaxy/gossip/gasprice	[no test files]
?   	github.com/galaxy-foundation/go-galaxy/gossip/occuredtxs	[no test files]
?   	github.com/galaxy-foundation/go-galaxy/gossip/piecefunc	[no test files]
ok  	github.com/galaxy-foundation/go-galaxy/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:

$ ./build/galaxy --fakenet 1/1

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

$ ./build/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:

$ ./build/galaxy --fakenet 0/5

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

$ ./build/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
Owner
Talented Blockchain Developer
Smart and Genius
Talented Blockchain Developer
Similar Resources

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

Ethereum 2.0 node multiplexer between consensus and execution

The Minority Client Run the minority client! ~Danny Ryan and/or Tim Beiko As of writing, Ethereum has multiple client implementations, but Geth / go-e

Dec 23, 2022

Slides about IOTA transactions, validation and consensus

Slides about IOTA transactions, validation and consensus

IOTA Donations: NJNCOKJOE9SMCYTSBZVTGWMAABPBYELV9SBPUYLKWSTCXQQZDUWHTFLTVKKRBBWSZKPDMNQALJMJX9CG9KAMOJXQVW IOTA Transactions, Confirmation and Consens

Oct 14, 2022

A Prometheus exporter for Ethereum Execution & Consensus clients

🦄 Ethereum Metrics Exporter 🦄 A Prometheus metrics exporter for Ethereum execution & consensus nodes Ethereum client implementations expose extensiv

Dec 13, 2022

a Golang sdk for working with DeFi protocols, and ethereum compatible blockchains

a Golang sdk for working with DeFi protocols, and ethereum compatible blockchains

A golang sdk for working with DeFi protocols and general utilities for working with ethereum-compatible blockchains. packages bclient bindings cli con

Dec 15, 2022

Evmos is a scalable, high-throughput Proof-of-Stake blockchain that is fully compatible and interoperable with Ethereum.

Evmos Evmos is a scalable, high-throughput Proof-of-Stake blockchain that is fully compatible and interoperable with Ethereum. It's built using the Co

Dec 31, 2022

Small utility to sign a small json containing basic kyc information. The key generated by it is fully compatible with cosmos based chains.

Testnet signer utility This utility generates a signed JSON-formatted ID to prove ownership of a key used to submit tx on the blockchain. This testnet

Sep 10, 2022

An easy-to-use XChaCha20-encryption wrapper for io.ReadWriteCloser (even lossy UDP) using ECDH key exchange algorithm, ED25519 signatures and Blake3+Poly1305 checksums/message-authentication for Go (golang). Also a multiplexer.

Quick start Prepare keys (on both sides): [ -f ~/.ssh/id_ed25519 ] && [ -f ~/.ssh/id_ed25519.pub ] || ssh-keygen -t ed25519 scp ~/.ssh/id_ed25519.pub

Dec 30, 2022
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
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
minimal implementation of secured encrypted tcp/ip connection without tls / ssl.

go-secure-transport Demo implementation of secured encrypted TCP connection without TLS / SSL. See ./example for server & client using the transport t

Dec 15, 2021
publish github pages privately secured by github sso (oauth2)

private-ghp Serves static sites from private repositories to members with read access (or higher), secured using GitHub OAuth2. The server is written

Nov 27, 2022
EVM frontrunning tool

CAKE SNIPER FRONTRUNNING BOT =================================================== BEFORE STARTING: This bot require you to run the GETH client + use

Jan 9, 2023
An easy tool to apply transactions to the current EVM state. Optimized for MEV.

sibyl A more embedded version of fxfactorial/run-evm-code. This tool makes it easy to apply transactions to the current EVM state. Call it a transacti

Dec 25, 2022
Akroma GO client - Akroma is an EVM based application development platform (smart-contracts).

Akroma Akroma is an EVM based application development platform (smart-contracts). Akroma will utilize a Masternode system, and build out an Oracle pla

Dec 11, 2022
Signing, Keystore and RLP encoding utilities for EVM / Ethereum / secp256k1 based blockchains

Signing, Keystore and RLP encoding utilities for EVM / Ethereum / secp256k1 based blockchains. Written in Go with an enterprise friendly Apache 2.0 license, and a runtime JSON/RPC proxy server. Part of the Hyperledger FireFly project

Aug 9, 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