The Layer 1 blockchain for on-demand services.
The Tangle Network
An modular restaking infrastructure for complex services.
Table of Contents
Getting Started
Tangle is restaking network focused around complex offchain computations, such as MPC (multi party computation), zero-knowledge proof generation, AI services, and more.
If you would like to familiarize yourself with Tangle Network check out following repo and docs:
Prerequisites
This guide uses rustup tool to manage the Rust toolchain.
First install and configure rustup:
# Install
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Configure
source ~/.cargo/env
Great! Now your Rust environment is ready!
Note: You may need additional dependencies, checkout substrate.io for more information.
Installation using Nix
If you want to use Nix for development, please follow following instructions- Install Nix
- Enable Flakes (if you are not already see here: Flakes)
- If you have
direnvinstalled, everything should work out of the box. - Alternatively, you can run
nix flake developin the root of this repo to get a shell with all the dependencies installed.
Run Tangle Testnet
- Build
tanglenode.
cargo build --release --features testnet
- Execute tangle network setup script to run it locally.
./scripts/run-standalone-local.sh --clean
This should start the local testnet, you can view the logs in /tmp directory for all the authorities and use polkadotJS to view the running testnet.
- To Start validating on the live testnet please visit Starting a validator on Tangle docs.
Development with Chopsticks
Chopsticks allows you to test your changes against real network state without affecting the live network.
Prerequisites
Make sure you have Node.js installed, then install Chopsticks:
npm install -g @acala-network/chopsticks
Running with Chopsticks
The repository includes a pre-configured Chopsticks configuration file at scripts/chopsticks.yml that:
- Forks from the live Tangle testnet (
wss://rpc.tangle.tools) - Sets up Alice as the sudo account
- Pre-funds several test accounts with 100,000 TNT each
- Enables instant block building for faster development
npx @acala-network/chopsticks@latest --config=scripts/chopsticks.yml
This will start a local node that you can connect to at ws://localhost:8000. You can then:
- Use Polkadot.js Apps to interact with your local fork
- Run integration tests against the forked network
- Test runtime upgrades and governance proposals safely
- Debug issues with real network state
Troubleshooting
The linking phase may fail due to not finding libgmp (i.e., "could not find library -lgmp") when building on apple silicon. To fix this problem, run:
brew install gmp
make sure to run the commands below each time when starting a new env, or, append them to .zshrc
export LIBRARYPATH=$LIBRARYPATH:/opt/homebrew/lib
export INCLUDEPATH=$INCLUDEPATH:/opt/homebrew/include
Contributing
Interested in contributing to the Tangle Network? Thank you so much for your interest! We are always appreciative for contributions from the open-source community!
If you have a contribution in mind, please check out our Contribution Guide for information on how to do so. We are excited for your first contribution!
License
Licensed under GNU General Public License v3.0.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the GNU General Public License v3.0 license, shall be licensed as above, without any additional terms or conditions.