Skip to content

Templates Overview

Introduction

Networks deployed through Tanssi are fully customizable blockchains benefiting from a shared set of sequencers and the security of a provider of their choice (for example, Symbiotic for Ethereum). They also need to implement the necessary functionalities and configurations to support the Tanssi protocol, which the templates presented in this article already do, making it easier for developers.

As presented in the Included Templates from the Learn section, Tanssi already provides two templates to jumpstart the development process:

In this article, the required base setup and how to use the templates as a starting point to start building your Tanssi network are presented.

Base Setup to Support the Tanssi Protocol

Tanssi networks must implement the following modules to support the protocol and benefit safely from Tanssi's block production as a service:

  • Author Noting - registers the set of sequencers assigned to the network by Tanssi
  • Author Inherent - Allows the sequencer authoring the block to include its identity to get validated and rewarded

If you don't include these modules in the Tanssi network's runtime, there won't be a method to confirm that the blocks are being generated by trustworthy sequencers designated by the Tanssi orchestrator. This could create a vulnerability for malicious actors to exploit and compromise the network.

More information about Tanssi's block production as a service and the interaction between Tanssi, the security provider, and your Tanssi network can be found in the Technical Features article.

Besides block production, there are other essential aspects for any network covered in the templates, such as:

  • Consensus - networks have the necessary functionality to allow the sequencers to produce blocks, gossip and validate them, and coordinate with the security provider to get notified about the block's finality
  • Networks Interoperability - handles the ingestion and dispatch of incoming downward and lateral messages, allowing a Tanssi network to communicate and interoperate with the other chains within the ecosystem
  • Runtime Upgrades - a runtime upgrade in a Tanssi network must be informed to the security provider's operators to allow them to check on the blocks produced by the sequencers of the Tanssi networks

Included Modules

Besides the necessary modules to support the operation of a Tanssi network, many other modules provide functional behavior that the users can interact with.

These are some of the functional modules exposing a behavior to the users that are included in the templates and ready to use:

  • Balances - the Balances module provides functions for handling accounts and balances for the Tanssi network native currency
  • Utility - the Utility module provides functions to execute multiple calls in a single dispatch. Besides batching transactions, this module also allows the execution of a call from an alternative signed origin
  • Proxy - the Proxy module provides functions to delegate to other accounts (proxies) the permission to dispatch calls from a proxied origin
  • Maintenance Mode - the Maintenance Mode module allows the Tanssi network to be set to a mode where it doesn't execute balance/asset transfers or other transactions. This could be useful when upgrading the runtime in an emergency, when executing large storage migrations, or when a security vulnerability is discovered
  • Tx Pause - the Tx Pause module allows a valid origin (typically Root) to pause (and unpause) an entire module or a single transaction. A paused transaction (or all the transactions included in a paused module) will fail when called until it is unpaused. This module provides a higher degree of granularity compared to maintenance mode, making it particularly useful when a faulty or vulnerable transaction is identified in the runtime
  • Multisig - the Multisig module enables transaction dispatches that require -typically- more than one signature. A multisig transaction defines a set of authorized accounts and a threshold for its approval, requiring consensus among multiple parties

Start Building

To start building on top of the provided templates, be it the Baseline Tanssi network template or the Baseline EVM (Ethereum Virtual Machine) template, the recommended approach is to fork the Tanssi repository and start adding built-in modules or custom-made modules on top of the latest release tag.

This approach comes with some advantages, such as:

  • Building on top of the latest and stable release
  • Get the Tanssi protocol already configured and included in the template runtime
  • Keep your fork up-to-date by syncing with the Tanssi upstream repository
  • Run the included tests, ensuring that block production on your Tanssi network works as intended
  • Run a complete local environment with the included Zombienet configuration

If the templates already cover your use case needs, or after building and testing your chain, you can continue with the Deploy your Tanssi network via the Tanssi dApp article to know how to use the Tanssi dApp to register and get your chain up and running.

Last update: December 19, 2024
| Created: August 16, 2023