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.
If you just wish to run a Tidechain node without compiling it yourself, you may either run the latest binary from our releases page.
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:
cargo install --git https://github.com/tidelabs/tidechain --tag <version> tidechain --lockedIf 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 | shIf you already have Rust installed, make sure you're using the latest version by running:
rustup updateOnce done, finish installing the support software:
sudo apt install build-essential git clang libclang-dev pkg-config libssl-devBuild 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 --releaseNote 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).
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/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.
Currently Tidechain is the default option when starting a node. Connect to the global Tidechain Mainnet network by running:
tidechainYou can see your node on telemetry (set a custom name with --name "my custom name").
Lagoon is the latest test network for Tidechain.
The tokens on this network are called TDFY 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=lagoonYou can see your node on telemetry (set a custom name with --name "my custom name").
For Lagoon's TDFY tokens, see the faucet instructions in Discord.
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 -- --fastThen, grab the Tidechain source code:
git clone https://github.com/tidelabs/tidechain.git
cd tidechainThen 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 codeYou can run the tests if you like:
cargo test --allYou can start a development chain with:
cargo run -- --devDetailed logs may be shown by running the node with the following environment variables set:
RUST_LOG=debug RUST_BACKTRACE=1 cargo run -- --devYou can run a simple single-node development "network" on your machine by running:
tidechain --devIf 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/aliceAnd 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.
Tidechain is GPL 3.0 licensed.