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
Similar Resources

Validator node for Bittorrent Chain Network

Delivery Validator node for Bittorrent Chain Network. It uses peppermint, customized Tendermint. Install from source Make sure your have go1.11+ alrea

Dec 14, 2021

Dcfs-core - Dcfs Smart Chain With Golang

Dcfs Smart Chain The goal of Dcfs Smart Chain is to bring programmability and in

Jan 12, 2022

Centralized Configuration System written in Golang - Spring cloud compatible

Centralized Configuration System written in Golang - Spring cloud compatible

Centralized Configuration System What is Vecosy Vecosy is a configuration service exposed through REST/GRPC. Is Spring Cloud Conf compatible and also

Dec 13, 2022

A golang library about socks5, supports all socks5 commands. That Provides server and client and easy to use. Compatible with socks4 and socks4a.

socks5 This is a Golang implementation of the Socks5 protocol library. To see in this SOCKS Protocol Version 5. This library is also compatible with S

Nov 22, 2022

Simple tool to handle hosts file black lists that can remove comments, remove duplicates, compress to 9 domains per line, add IPv6 entries, as well as can convert black lists to multiple other black list formats compatible with other software.

Hosts-BL Simple tool to handle hosts file black lists that can remove comments, remove duplicates, compress to 9 domains per line, add IPv6 entries, a

Sep 23, 2022

An open source Pusher server implementation compatible with Pusher client libraries written in Go

Try browsing the code on Sourcegraph! IPÊ An open source Pusher server implementation compatible with Pusher client libraries written in Go. Why I wro

Aug 27, 2022

GSRPC compatible type definitions of events from the ChainBridge substrate pallet

chainbridge-substrate-events GSRPC compatible type definitions of events from the ChainBridge substrate pallet. ChainSafe Security Policy Reporting a

Nov 13, 2021

Xray, Penetrates Everything. Also the best v2ray-core, with XTLS support. Fully compatible configuration.

Project X Project X originates from XTLS protocol, provides a set of network tools such as Xray-core and Xray-flutter. License Mozilla Public License

Jan 7, 2023

Laptop Booking Application in Golang and gRPC, load-balancing with NGINX, and fully compatible with HTTPS OpenAPI v3

Laptop Booking Application in Golang and gRPC Goals GitHub CI & Coverage Badge Serialize protobuf messages Create laptop unary gRPC Search laptop Serv

Jun 17, 2022
Related tags
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
Celestia -> EVM bridge

Peggo Peggo is a Go implementation of the Peggy (Gravity Bridge) Orchestrator originally implemented by Injective Labs. Peggo itself is a fork of the

Dec 12, 2022
Baseledger core consensus for running validator, full and seed nodes

baseledger-core Baseledger core consensus client for running a validator, full or seed node. ⚠️ WARNING: this code has not been audited and is not rea

Jan 13, 2022
A research implementation of team rocket's leaderless consensus protocol

rocket A research implementation of team rocket's leaderless consensus protocol backlog Run consensus tests with agents that have corrupted configurat

Feb 1, 2022
proxylogon, proxyshell, proxyoracle full chain exploit tool
proxylogon, proxyshell, proxyoracle full chain exploit tool

Proxy-Attackchain proxylogon, proxyshell, proxyoracle full chain exploit tool ProxyLogon: The most well-known and impactful Exchange exploit chain Pro

Dec 16, 2022
Node of the decentralized oracle network, bridging on and off-chain computation

Chainlink is middleware to simplify communication with blockchains. Here you'll find the Chainlink Golang node, currently in alpha. This initial imple

Dec 31, 2022