Testing with Tangle
How to test your blueprint with Tangle
This guide will walk you through the process of setting and running Tangle node locally to test your blueprint with Tangle.
Prerequisites
First install and configure rustup:
# Install
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Configure
source ~/.cargo/envClone the tangle node
git clone https://github.com/tangle-network/tangle
cd tangleBuild the node for instant-seal
This is different from the production tangle runtime which produces a block every 6 seconds. The instant-seal node produces a block only when a transaction is available. This allows for faster testing cycles.
cargo build --release --features manual-seal,txpool,testnetRun the node
./target/release/tangle --tmp --dev --validator -linfo \
--alice --rpc-cors all --rpc-methods=unsafe --rpc-external \
--rpc-port 9944 -levm=debug -lgadget=trace --sealing instantIf successful, you should see output indicating that the node is running:
./target/release/tangle --tmp --dev --validator -linfo --alice --rpc-cors all --rpc-methods=unsafe --rpc-external --rpc-port 9944 -levm=debug -lgadget=trace --sealing instant
++++++++++++++++++++++++
+++++++++++++++++++++++++++
+++++++++++++++++++++++++++
+++ ++++++ +++ @%%%%%%%%%%% %%%
++++++ ++++ +++++ %%%%%%%%%%%% %%%@
++++++++++++++++++++++++++ %%%% %%%%@ %%% %%@ @%%%%%%% %%%@ %%%%@
++++++++ %%%% @%%%%%%%@ %%%%%%%%% @%%%%%%%%% %%%@ %%%%%%%%%
++++++++ %%%% %%%%%%%%% %%%% @%%%@ %%%% %%%% %%%@ %%%%%%%%%%
++++++++++++++++++++++++++ %%%% %%%%%%%%% %%% %%%% %%% @%%% %%%@ @%%%%% %%%%%
++++++ ++++ ++++++ %%%% %%%%%%%%% %%% %%%% %%%%%%%%%% %%%@ %%%%%%%%%@
+++ ++++++ +++ %%%% %%%%%%%%% %%% %%%@ %%%%%%%%% %%% %%%%%%%@
++++ +++++++++ +++ %%%% %%%%
++++++++++++++++++++++++++++ %%%%%%%%%
+++++++++++++++++++++++ %%%%%
2024-10-30 16:00:54.306 INFO main sc_cli::runner: Tangle Node
2024-10-30 16:00:54.306 INFO main sc_cli::runner: ✌️ version 1.2.0-cedde5d83a0
2024-10-30 16:00:54.306 INFO main sc_cli::runner: ❤️ by Webb Technologies Inc., 2023-2024
2024-10-30 16:00:54.306 INFO main sc_cli::runner: 📋 Chain specification: Local Testnet
2024-10-30 16:00:54.306 INFO main sc_cli::runner: 🏷 Node name: Alice
2024-10-30 16:00:54.306 INFO main sc_cli::runner: 👤 Role: AUTHORITY
2024-10-30 16:00:54.306 INFO main sc_cli::runner: 💾 Database: RocksDb at /var/folders/ht/41y18g597_9_1035dlw0m3700000gn/T/substrateGSJexb/chains/local_testnet/db/full
2024-10-30 16:00:55.347 INFO main runtime::staking: [0] 💸 generated 5 npos voters, 5 from validators and 0 nominators
2024-10-30 16:00:55.347 INFO main runtime::staking: [0] 💸 generated 5 npos targetsHow to build testnet runtime (without instant-seal)
To build tangle node, without instant-seal, you can run:
cargo build --release --features txpool,testnetAnd use the following command to run the node:
./target/release/tangle --tmp --dev --validator -linfo \
--alice --rpc-cors all --rpc-methods=unsafe --rpc-external \
--rpc-port 9944 -levm=debug -lgadget=trace