l1kw1d / tidechain

Tidechain is the backbone of the TIDE ecosystem. Built on Substrate.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tidechain

This repo contains runtimes for the Tidechain and Lagoon networks. The README provides information about installing the tidechain binary. For more specific guides, like how to be a validator, see the Tidechain Wiki.

Installation

If you just wish to run a Tidechain node without compiling it yourself, you may either run the latest binary from our releases page.

Building

Install via Cargo

Make sure you have the support software installed from the Build from Source section below this section.

If you want to install Tidechain in your PATH, you can do so with with:

cargo install --git https://github.com/tidelabs/tidechain --tag <version> tidechain --locked

Build from Source

If you'd like to build from source, first install Rust. You may need to add Cargo's bin directory to your PATH environment variable. Restarting your computer will do this for you automatically.

curl https://sh.rustup.rs -sSf | sh

If you already have Rust installed, make sure you're using the latest version by running:

rustup update

Once done, finish installing the support software:

sudo apt install build-essential git clang libclang-dev pkg-config libssl-dev

Build the client by cloning this repository and running the following commands from the root directory of the repo:

git checkout <latest tagged release>
./scripts/init.sh
cargo build --release

Note that compilation is a memory intensive process. We recommend having 4 GiB of physical RAM or swap available (keep in mind that if a build hits swap it tends to be very slow).

Build from Source with Docker

You can also build from source using Tidechain CI docker image:

git checkout <latest tagged release>
docker run --rm -it -w /shellhere/tidechain \
                    -v $(pwd):/shellhere/tidechain \
                    tidelabs/tidechain-ci:latest cargo build --release
sudo chown -R $(id -u):$(id -g) target/

Networks

This repo supports runtimes for Tidechain and Lagoon.

Tidechain is built on top of Substrate, a modular framework for blockchains. One feature of Substrate is to allow for connection to different networks using a single executable and configuring it with a start-up flag.

Tidechain Mainnet

Currently Tidechain is the default option when starting a node. Connect to the global Tidechain Mainnet network by running:

tidechain

You can see your node on telemetry (set a custom name with --name "my custom name").

Connect to the Lagoon Testnet

Lagoon is the latest test network for Tidechain. The tokens on this network are called TIFI and they purposefully hold no economic value. The sudo pallet is enabled on this network allowing the core-team to debug the chain.

Connect to the global Lagoon testnet by running:

tidechain --chain=lagoon

You can see your node on telemetry (set a custom name with --name "my custom name").

Obtaining TIFIs

For Lagoon's TIFI tokens, see the faucet instructions on the Wiki.

Hacking on Tidechain

If you'd actually like to hack on Tidechain, you can grab the source code and build it. Ensure you have Rust and the support software installed. This script will install or update Rust and install the required dependencies (this may take up to 30 minutes on Mac machines):

curl https://getsubstrate.io -sSf | bash -s -- --fast

Then, grab the Tidechain source code:

git clone https://github.com/tidelabs/tidechain.git
cd tidechain

Then build the code. You will need to build in release mode (--release) to start a network. Only use debug mode for development (faster compile times for development and testing).

./scripts/init.sh   # Install WebAssembly. Update Rust
cargo build # Builds all native code

You can run the tests if you like:

cargo test --all

You can start a development chain with:

cargo run -- --dev

Detailed logs may be shown by running the node with the following environment variables set:

RUST_LOG=debug RUST_BACKTRACE=1 cargo run -- --dev

Development

You can run a simple single-node development "network" on your machine by running:

tidechain --dev

Local Two-node Testnet

If you want to see the multi-node consensus algorithm in action locally, then you can create a local testnet. You'll need two terminals open. In one, run:

tidechain --chain=lagoon-local --alice -d /tmp/alice

And in the other, run:

tidechain --chain=lagoon-local --bob -d /tmp/bob --port 30334 --bootnodes '/ip4/127.0.0.1/tcp/30333/p2p/ALICE_BOOTNODE_ID_HERE'

Ensure you replace ALICE_BOOTNODE_ID_HERE with the node ID from the output of the first terminal.

Using Docker

Using Docker

Contributing

Contributing Guidelines

Contribution Guidelines

License

Tidechain is GPL 3.0 licensed.

About

Tidechain is the backbone of the TIDE ecosystem. Built on Substrate.

License:GNU General Public License v3.0


Languages

Language:Rust 95.8%Language:Shell 2.9%Language:Ruby 0.9%Language:Dockerfile 0.4%Language:HTML 0.1%