Trappist is a versatile Proof-of-Authority (PoA) Blockchain software that supports hosting decentralized applications (dApps), including Smart Contracts, Crypto-tokens & Non-Fungible Tokens (NFTs).
This repository contains the source code of the Trappist Blockchain node & runtime, based on Substrate, an open-source framework for building tailored Blockchain solutions.
The term Trappist refers to a style of beers brewed in Abbeys by Trappist monks, and is generally associated with authenticity, craftsmanship, integrity and tradition. Aside from any religious consideration, we like to think we put as much care in crafting Blockchain software as monks brewing high-quality beer 🍺.
As Trappist breweries are not intended to be profit-making ventures, this project is non-commercial, open-source software focused solely on experimentation and knowledge sharing with people interested in learning about decentralized technologies.
Follow the steps below to get started.
Install nix and optionally direnv and
lorri for a fully plug and play experience for setting up the
development environment. To get all the correct dependencies activate direnv direnv allow
and
lorri lorri shell
.
First, complete the basic Rust setup instructions.
Use Rust's native cargo
command to build and launch the Trappist node:
cargo run --release -- --dev
The cargo run
command will perform an initial build. Use the following command to build the node
without launching it:
cargo build --release
Once the project has been built, the following command can be used to explore all parameters and subcommands:
./target/release/trappist -h
The provided cargo run
command will launch a temporary node and its state will be discarded after
you terminate the process. After the project has been built, there are other ways to launch the
node.
This command will start the single-node development chain with non-persistent state:
./target/release/trappist --dev
Purge the development chain's state:
./target/release/trappist purge-chain --dev
Start the development chain with detailed logging:
RUST_LOG=debug RUST_BACKTRACE=1 ./target/release/trappist -lruntime=debug --dev
Once the node template is running locally, you can connect it with Polkadot-JS Apps front-end to interact with your chain. Click here connecting the Apps to your local node template.
If you want to see the multi-node consensus algorithm in action, refer to our Start a Private Network tutorial).
First, install Docker and Docker Compose.
Then run the following command to start a single node development chain.
./scripts/docker_run.sh
This command will firstly compile your code, and then start a local development network. You can
also replace the default command (cargo build --release && ./target/release/trappist --dev --ws-external
)
by appending your own. A few useful ones are as follow.
# Run Substrate node without re-compiling
./scripts/docker_run.sh ./target/release/trappist --dev --ws-external
# Purge the local dev chain
./scripts/docker_run.sh ./target/release/trappist purge-chain --dev
# Check whether the code is compilable
./scripts/docker_run.sh cargo check
Trappist is licensed under Apache 2.