Deploy your Network via the Tanssi DApp¶
Introduction¶
Tanssi aims to lower the barrier to entry for building decentralized networks by streamlining the onboarding process and abstracting away the technical details of launching a Tanssi network. The Tanssi dApp allows you to spin up a network in just minutes. This guide will walk you through the steps required to launch a network on Tanssi's TestNet, Dancebox, via the Tanssi dApp.
Quick Trials vs. Dedicated Networks¶
The Tanssi dApp supports the creation of two different types of networks, namely:
- Quick trial network - a temporary network that self-destructs after 48 hours
- Dedicated network - a long-lasting network for Tanssi ecosystem builders
Both types of Tanssi networks behave identically, with the only difference being the ephemeral nature of the quick trial networks. Generally speaking, quick trial networks are best for most builders who want to test the power of a Tanssi-powered network. However, if you require a long-lasting test environment, the Tanssi team will happily assist you with setting up a dedicated network.
The screenshots and content in this guide will showcase quick trial networks, but you can follow the same process to configure a dedicated Tanssi network.
Overview¶
Deploying a Tanssi network via the Tanssi dApp is accomplished as a single, streamlined flow consisting of five distinct steps:
- Select a template and configure it
- Satisfy the required minimum token balances
- Reserve your Tanssi network ID on the relay chain
- Generate your custom network files
- Register your network on Tanssi, and the relay chain
For quick trial networks and Dedicated networks on the Tanssi Dancebox Testnet, the Tanssi team will manually complete verification. After verification, it typically takes about ten minutes for your quick trial network to be ready and about two hours for a dedicated Tanssi network. For Tanssi MainNet, the process will be fully decentralized and permissionless.
Prerequisites¶
Supported Wallets¶
Since Tanssi is built with Substrate, you'll need to use a Substrate-supported wallet to deploy and manage your Tanssi network. Supported wallets include:
If you deploy a Tanssi EVM network, your users won't need a Substrate wallet. They can interact with your Tanssi network using Ethereum-compatible wallets like MetaMask.
Connect Your Wallet to the DApp¶
To connect your wallet to the Tanssi dApp, click Connect Wallet in the upper-right corner. Select the desired wallet type. Then, take the following steps:
- Choose your account from the dropdown
- You'll be prompted to sign a message to log you into the Tanssi dApp. Go ahead and sign the message
Once connected, you'll see your address in the top-right corner. If you've connected multiple accounts and want to switch accounts, you can click on your address and choose an account from the dropdown menu.
Configure Your Network¶
From the Dashboard or the Deploy network tab, you can immediately start configuring your Tanssi network. To start, choose Deploy a Quick Trial Network or Deploy a Dedicated Network. You can read more about the differences between the two types of networks on the Tanssi Testnet.
Next, select a template that best fits your use case and configure your Tanssi network's properties accordingly. You can choose from the EVM or Substrate template or upload a raw specification file. Please refer to the Templates documentation to learn more about the available templates.
EVM Template¶
The EVM template provides all the necessary components to add an Ethereum compatibility layer to your Tanssi network.
As part of the setup process, you'll need a unique EVM chain ID (EIP-155) that is distinct from all other EVM chains. You can verify that another chain does not already use your EVM chain ID on Chainlist. When launching your Tanssi network in production, it's critical that you open a PR to reserve your chain ID on the ethereum-lists/chains
GitHub repository immediately after your RPC endpoint spins up. This is part of the validation process and is required for the PR to be accepted and merged.
Note
A registered EVM chain ID is only necessary for Tanssi networks deployed on the MainNet. When testing or deploying on the TestNet, you can choose any available ID and move forward.
To get started, select the EVM template from the left-side menu. Then take the following steps:
- In the Project Details section, provide your project's name, your contact email, and your Telegram
- In the Properties section, enter the symbol of your Tanssi network's native token and your unique EVM chain ID. Decimal places are fixed to 18 digits, the same as Ether, to preserve compatibility across EVM tooling
- Provide the Ethereum-style address of the account you want to use as the sudo account and its corresponding initial balance. This account will be able to dispatch privileged functions that require Root permissions. There can only be one sudo account at a time. The sudo account can be changed at any time to a new one by the current sudo account. Once the Tanssi network is launched, you can easily migrate to a fully decentralized system using specific democracy-related modules
- (Optional) Press Add to add genesis accounts and balances. If you choose to skip this step, you can use the sudo account to create accounts and transfer funds at a later time
- (Optional) Press Add to add genesis smart contracts by providing an address to use and the bytecode for the smart contract. When providing the bytecode, you'll need to remove the
0x
from the beginning of the bytecode - (Optional) You can adjust the gas configurations in the Advanced settings. You can choose to change the Minimum Gas Price, Base fee per gas, Multiplier, and Elasticity
- Once you have configured the template for your Tanssi network, select Continue and proceed to the Check Balances section
Substrate Template¶
The Substrate template includes all the configurations for seamless integration with Tanssi and the Polkadot ecosystem. It can be used as the baseline specification to build a custom Tanssi network that is compatible with both Polkadot and Tanssi.
To get started, select the Substrate template from the left-side menu. Then take the following steps:
- In the Project Details section, provide your project's name, your contact email, and your Telegram
- Enter the token decimals and symbol for your native token and the SS58 address format
- Provide the Substrate-style address of the account you want to use as the sudo account and its initial balance. This account will be able to dispatch privileged functions that require Root permissions. There can only be one sudo account at a time. The sudo account can be changed at any time to a new one by the current sudo account. Once the network is launched, you can easily migrate to a fully decentralized system using specific democracy-related modules
- (Optional) You can add genesis accounts and balances. If you choose to skip this step, you can use the sudo account to create accounts and transfer funds at a later time
- Once you have configured the template for your Tanssi network, you can select Continue to proceed to the Check Balances section
Custom¶
If you already have a Substrate runtime built and have chosen to upload your own custom specification file, there are some requirements to be aware of that are necessary to ensure the runtime can evolve into a Tanssi-powered network and run properly.
Your runtime must implement the following:
- The Cumulus SDK, as outlined in the Base Setup to Connect to Polkadot section of the Templates page
- Tanssi modules for block production, as outlined in the Base Setup to Support the Tanssi Protocol section of the Templates page
Other required changes in the runtime include:
-
To verify the author's eligibility to produce a block, set the following type as shown in the snippet, in the
timestamp
module configuration section of the runtime:type OnTimestampSet = tp_consensus::OnTimestampSet< <Self as pallet_author_inherent::Config>::SlotBeacon, ConstU64<{ SLOT_DURATION }>, >;
-
Remove all the modules related to block production and consensus (such as
Aura
andGrandpa
), leaving Tanssi to take over the burden. If the starting point for your project was the parachain template, the following modules are included by default in the runtime and must be removed:Authorship: pallet_authorship = 20, CollatorSelection: pallet_collator_selection = 21, Session: pallet_session = 22, Aura: pallet_aura = 23, AuraExt: cumulus_pallet_aura_ext = 24,
Finally, generate and edit the chain specification paying special attention to:
para_id
- within this custom flow, a pre-registered parachain id is requiredis_ethereum
- totrue
if exposing Ethereum compatible RPC endpoints is needed
And, depending on whether you are deploying a quick trial network or a dedicated one, also adjust these attributes:
{
...
"relay_chain": "rococo_flashbox_relay_testnet",
"chainType": "Live",
"genesis": {
"runtime": {
...
"authoritiesNoting": {
"orchestratorParaId": 1000
},
...
}
}
...
}
{
...
"relay_chain": "westend_moonbase_relay_testnet",
"chainType": "Live",
"genesis": {
"runtime": {
...
"authoritiesNoting": {
"orchestratorParaId": 3000
},
...
}
}
...
}
Now, you can upload your custom raw specification file by selecting the Custom template and adding your JSON specification file.
Note
The size of a raw chain specifications file should not exceed 2MB.
Check Balances¶
Next, you'll need to verify that you have sufficient balances of DANCE and TANGO tokens. If you don't, you can press Request Tokens and complete the following login with GitHub or Google. You'll need to complete a few quick onboarding questions, and then you'll be able to press Request Tokens again, and they will be delivered to your connected wallet.
If you're setting up a dedicated Tanssi network, you'll need to manually request the necessary tokens via a form on the Tanssi network website, and you'll receive the necessary tokens within one business day. The required minimum balances to launch a Tanssi network are as follows:
Chain | Balance Required |
---|---|
Flashbox Relay Chain Balance | 70 TANGO |
Flashbox Balance (Tanssi) | 100 DANCE |
Chain | Balance Required |
---|---|
Moonbase Relay Chain Balance | 110 TANGO |
Dancebox Balance (Tanssi) | 100 DANCE |
Reserve your Network ID¶
If you haven't already done so, you'll need to reserve your Tanssi network ID, which will be required to register your Tanssi network on the relay chain and function within the Polkadot ecosystem.
To reserve your Tanssi network ID, you'll need to submit a transaction. Please make sure to use the account you plan to launch your Tanssi network with when submitting the transaction.
- To initiate the transaction, click on Reserve Network ID
- Your wallet will pop up, and you'll need to submit the transaction
Once the transaction has successfully gone through, your Tanssi network ID will be displayed on the dApp, and you'll be able to click Continue to proceed to the next step. You'll notice that on your Alphanet relay chain account, 20 TANGO tokens have been removed from your transferrable balance and are now reserved.
Generate Your Network Files¶
Before you can deploy your Tanssi network, you'll need to generate four configuration files:
- The raw chain specification - a compact version of the JSON specification file, which defines the initial settings and state that all nodes participating in the network must agree on to reach consensus and produce blocks
- The genesis state header - defines the initial state upon which all transactions and state transitions are executed
- The genesis Wasm - a WebAssembly (Wasm) blob that defines the runtime logic
These files will automatically be generated for you based on your Tanssi network ID and your customized template configurations. All you need to do is click Generate, and the dApp will generate the required files for you.
Once the files have been generated, please click Continue to go on to the final step.
Deploy Your Network¶
You're finally ready to take your last step towards preparing your network as it evolves into a network deployed through Tanssi! For this final step, you'll need to submit two transactions: one to register your network on the relay chain and another to register your network on Tanssi.
To register your Tanssi network on the relay chain, take the following steps:
- Click Register under the Register Network in Relay section
- Confirm the transaction in your wallet
Once the transaction has gone through successfully, the dApp will update to show that you have successfully registered your Tanssi network under the Register Network in Relay section.
Lastly, to register your network on Tanssi, take the following steps:
- Click Register under the Register Network in Tanssi section
- Confirm the transaction in your wallet
Once the transaction has gone through successfully, the dApp will update to show that you have registered your Tanssi network. Congratulations! On the dashboard, you can check the status of your deployment and view relevant information, such as the latest block information, RPC and WS endpoints, and more.
And that's it! You've successfully registered your Tanssi network! The launch process will automatically begin once the Tanssi team has verified your network. Once your Tanssi network is live, you can return to the Dashboard to view the RPC URL and other pertinent chain information.
| Created: September 12, 2023