Decoding Tanssi: A Technical Overview of the Appchain Infrastructure Protocol
Updated: Jun 24
In the dynamic world of blockchain technology, navigating through the complexities of diverse projects can indeed be daunting. That's where this technical overview steps in, showcasing the distinct features of Tanssi—an innovative appchain infrastructure protocol. It provides clarity on how Tanssi streamlines appchain deployment for developers while also shedding light on its critical role within the broader Polkadot ecosystem.
The goal of this blog post extends beyond just detailing Tanssi's unique aspects. It aims to provide a comprehensive understanding of Tanssi's role within the Polkadot ecosystem, the challenges it tackles, and the strategic rationale behind its design. It emphasizes Tanssi's adept bridging of the gap between the potential intricacies of becoming a parachain and the necessity for an efficient, secure, and developer-friendly platform. By the end, the reader will not only understand the function and potential impact of Tanssi but will also gain valuable insights into its mission to shape the blockchain landscape.
Tanssi: Creating an Accessible Pathway to Tap into Substrate's Full Potential
Substrate has become a go-to framework for developers due to its ability to build efficient and highly customizable chains, most of which find a home on Polkadot. These chains, often referred to as parachains, usually opt to benefit from the many advantages offered by the Polkadot ecosystem, such as:
Shared Security: Creating a solid security foundation is a demanding task, especially for new projects. Polkadot handles this by assigning validators validate the blocks produced by each of the parachains.
Forkless upgrades: Polkadot's ecosystem allows parachains to set new operational rules by simply submitting a specific transaction type, without requiring to fork the network.
However, navigating the Substrate framework is not a simple task. Teams need to embark on a lengthy process, let's delve into what this entails. Initially, a team needs to win one of several slot auctions run by Polkadot to qualify as a parachain. This typically means having upfront funding or initiating a crowdloan process, encouraging Polkadot users to contribute towards winning the slot, often in exchange for token rewards upon launch. Auction mechanics can pose both theoretical and technical learning challenges for teams.
Subsequently, setting up a parachain involves devising a plan to attract block-proposer nodes, also known as collators. These collators are responsible for grouping transactions and producing blocks, ensuring the liveliness of their respective parachain. A diversified collator set is essential for improving censorship resistance and avoiding over-reliance on a single node for transaction processing. However, the onboarding and performance testing of a diversified collator set can be complex and time-intensive.
Finally, while Substrate is indeed a robust framework, its high level of customizability means there's a steep learning curve for new users. Not everyone knows how to ride a Ferrari, even if it is one of the most powerful cars. Similarly to this, not everyone can utilize Substrate to its full potential without substantial practice. This learning requirement that includes a high degree of customization might discourage developers from building within the Polkadot ecosystem. Tanssi aims to tackle all these challenges, offering developers a more accessible onboarding experience to build on the Polkadot ecosystem. Tanssi allows the creation of ContainerChains — chains deployed within the Polkadot ecosystem that are connected to Tanssi.
Tanssi strives to solve these challenges, aiming to provide developers with a more streamlined onboarding experience within the Polkadot ecosystem. Tanssi introduces the concept of ContainerChains – parachains that, once connected to Tanssi, evolve and gain the status of a ContainerChain – setting the stage for a more efficient and adaptable integration process. When a project becomes a Tanssi ContainerChain, it gains access to a wide range of services, resources, and tools designed to maximize resources and enhance the overall efficiency of the protocol.
Tanssi's development is guided by three core principles:
Simplicity: Tanssi strives to ease the process of integrating a chain into the Polkadot ecosystem. The aim is to allow ContainerChain developers to focus on the chain's core functionality rather than complex auction processes, infrastructure acquisition, or the design of intricate block production incentives. Furthermore, Tanssi simplifies the process of building a chain with Substrate, providing templates with essential functionalities for teams to build upon.
Security: Polkadot's shared security model isn't only innovative — it's one of the most mature across various blockchain ecosystems. Tanssi takes full advantage of the relay's security capabilities and provides equivalent security assurances to ContainerChains.
Decentralization: Polkadot's strong commitment to decentralization is evident in its shared security model and on-chain governance system. Tanssi aims to incorporate similar elements into the protocol and its ContainerChains, enabling token holders to participate actively in transparent and equitable decision-making processes.
How Will Tanssi Work?
Tanssi, in its function as a parachain, possesses distinctive capabilities. It's chiefly designed to provide block production and data retrieval as a service, essentially separating these responsibilities from ContainerChains. As a result, ContainerChains will only need to focus on building what, in Substrate-terms, we call a runtime. In essence, a runtime consists of the rules that govern the state changes within the chain. Encouraging full nodes and collators to function as intended for ContainerChains falls under Tanssi's responsibility.
The Positioning of ContainerChains as Sibling Parachains
A crucial aspect of Tanssi's operational design is that ContainerChains will not operate under Tanssi, unlike the parent-child relationship seen between Polkadot and its parachains. Rather, Tanssi and ContainerChains will run as sibling parachains, with the Polkadot relay chain serving as the common parent. Understanding this requires an insight into how execution slots function in the relay chain.
Execution slots in the relay chain are analogous to CPU cores in a computer, with each slot capable of running one process at a time. Within the Polkadot ecosystem, these slots allow chains to have their blocks validated by the relay-chain validators and gain from the relay chain's finalization consensus mechanisms. However, a block must fulfill certain size and execution time criteria to receive this validation.
There are two subscription models for these execution slots at the time this article is written: Parachains and Parathreads. Parachains secure long-term (two years, in the case of Polkadot) access to an execution slot by winning the previously mentioned auctions. Parathreads, on the other hand, rent execution slots as and when needed on a block-by-block basis.
Now back to the ContainerChain model. Can you imagine what would happen if ContainerChains ran underneath Tanssi? Their capability would get drastically reduced as they would all utilize Tanssi's execution slot. In contrast, allowing them to exist as sibling chains (as either Parachains or Parathreads), with their own execution-slot, ensures their throughput isn't restricted by other ContainerChains' activities. From this perspective, the Parathread model suits ContainerChains best: it permits ContainerChains to produce a block whenever there's demand for it.
What Role Does Tanssi Play in Accelerating Developer Adoption?
We've explored the model for creating ContainerChains, but we have yet to detail Tanssi's role in deploying ContainerChains. Broadly speaking, Tanssi will facilitate the following services for ContainerChains:
Collation-as-a-service: In a similar way to how Polkadot delegates validators to enhance security, Tanssi will assign block-builders to various ContainerChains and manage appropriate block-building incentives to ensure chain activity. This creates what is referred to as shared-liveness – a block-proposal guarantee that is resistant to manipulation or alteration.
Data-retrieval-as-a-service: Tanssi will also incentivize data-retrievability for each ContainerChain, in other words, the ability to recover the complete history of the chain. This represents a paradigm shift, as full archive nodes will receive incentives to preserve the comprehensive history of a particular ContainerChain.
Templates: Given the challenges of mastering the Substrate framework, Tanssi will offer inbuilt templates. Developers can either modify these templates to suit their needs or deploy them directly. These templates come with certain consensus-mandatory pallets pre-installed, ensuring the ContainerChain is compatible with Tanssi.
Indexer/Explorer/Wallet integrations: Tanssi nodes will have the necessary support to integrate with the most popular wallets, indexers and explorers, including those related to EVM compatibility (Frontier).
XCM integrations: Even though XCM is a powerful language for cross-chain communications, its setup can be daunting for those new to the ecosystem. Built-in templates will already include XCM support, potentially coming with a set of pre-defined connections established by default.
The Function of the Polkadot Relay Chain
By being parachains/parathreads (sibling chains), ContainerChains have an assurance that their validity function (runtime) is validated by the relay chain. Yet, as part of the incentives Tanssi provides to collators for producing ContainerChain blocks, Tanssi must also verify that the block was indeed created by the correct author.
Similarly, ContainerChains need to confirm the authorship of the blocks and, therefore, must be aware of which collators Tanssi has designated to their ContainerChain. Without this, the ContainerChain could be susceptible to a DoS attack, where an arbitrary node generates empty blocks.
But how can this mechanism operate if Tanssi and ContainerChains are different sibling chains? The solution lies in the relay chain, the common point of connection for all the aforementioned chains. The relay chain keeps the most recent headers corresponding to every chain operating in the ecosystem. Among other elements, this header contains the state root, which can be used to verify state proofs.
Therefore, the role of the relay chain is crucial for Tanssi, not just for security but also for state verification. By cross-referencing headers, ContainerChains can confirm that a certain group of collators from Tanssi has been assigned to them. Simultaneously, Tanssi can verify that the author of a container block was the expected one and reward accordingly.
And this is only the beginning of a range of features that can be developed using state-proofs. Recently, Polytope introduced a new message-exchange prototype that leverages state proofs across parachains without the need to route messages through the relay.
A Practical Example of How Tanssi and its ContainerChains Operate
Let's outline the method used for block authoring verification in Tanssi. For instance, let's say Tanssi has six different collators, labeled from A through F. Collators A, B, and C are producing blocks for the Tanssi chain itself, while a single ContainerChain has been assigned collators D, E, and F by Tanssi.
We'll explain the process from two different perspectives:
Scenario 1 (S1): Tanssi needs to identify who authored the latest block in each of the ContainerChains.
Scenario 2 (S2): ContainerChains need to run an author-verification process, and therefore, they need to know which collators Tanssi has assigned to collate on it.
S1 - ContainerChain Author Verification in Tanssi
The graphic below illustrates the following steps:
Collator D produces a block for the ContainerChain and injects its public key in the block header.
The relay chain accepts this block, and stores its header in its own state.
Collator A in Tanssi is obliged to include the latest header of the ContainerChain from the relay as part of the block-building process. This process is mandatory, meaning collators can't bypass it.
Collator D, as retrieved from the inserted header, is recognized as the most recent author of the container block and is accordingly rewarded.
S2 - Collator Assignment in the ContainerChain
Below is a graphic that illustrates the steps outlined here:
Collator A produces a block for Tanssi.
The relay chain accepts this block, and stores its header in its own state.
Collator F in the ContainerChain is required to embed the latest state root of Tanssi from the relay. This step is also mandatory, and collators can't avoid it.
With its Tanssi chain embedded node, Collator F is also able to incorporate the collator assignment in the ContainerChain. The ContainerChain is responsible for verifying the authenticity of this data through storage proofs.
Now, Collator F can demonstrate its ability to build the block, as it is included in the collator list assigned to the ContainerChain by Tanssi.
A Look Into the Future
The development of Tanssi presents a challenging project that will require some time for completion and fine-tuning. Nonetheless, there are two main milestones are targeted for the near future, the testnet and a solid community.
TestNet: The Initial Step
Gaining early feedback from users and developers is highly valued, hence the intention to roll out the first version of TestNet in the upcoming months. Although this initial TestNet will not contain all previously described features, it should provide a solid foundation for refining the components currently under development. Specifically, the first version of TestNet will center on:
ContainerChains as Parachains: Although the ultimate aim is to implement within the parathread model, this feature is still under development by Parity. During the TestNet phase, it will be assumed that ContainerChains are parachains, with the vision of adding future support for parathreads as they are mature enough.
Templates: Two templates will be provided for the TestNet launch: a simple template, which will be able to execute token transfers, and an EVM-compatible template, featuring Metamask support. More templates will be supported in the future, and alternatively, teams will be able to deploy their own templates.
Collator-assignment: The rotation of block builders will not feature in the first version of the TestNet. This is a feature planned for implementation in future TestNet versions. For now, collators will maintain their ContainerChain assignment unless the ContainerChain is de-registered. The number of collators assigned per ContainerChain will be regulated by a specific module, the configuration pallet, which will also determine the minimum quantity of collators required by Tanssi.
Consensus Protocol: The consensus protocol used will be Aura, where collators propose blocks in a round-robin style. All previously described state-proof mechanisms will be implemented to ensure accurate authorship verification in both Tanssi and ContainerChains.
Community Involvement: The Keystone of Tanssi's Success
In building Tanssi, the value of community engagement is absolutely vital. The feedback from developers and other community members will be instrumental in polishing the finer details of the protocol, ensuring it responds to user needs and continues to evolve. Moreover, Tanssi's collators – a crucial part of its infrastructure – will be selected from those within the network who express a strong interest and demonstrate the required technical capabilities.
The growth and reach of Tanssi are also deeply tied to the active participation of its community. As new members are welcomed, and existing ones deepen their engagement, the ripple effect of their enthusiasm and advocacy will draw more individuals and groups to Tanssi. This growing community will provide the momentum and diversity of thought needed for sustained innovation.
In recognition of the vital role the community plays, Tanssi is planning to announce a series of exciting programs in the coming weeks. These initiatives aim to encourage active participation, foster collaboration, and provide avenues for members to influence the direction and growth of the project. Through a symbiotic relationship, Tanssi's success will be closely tied to the vibrancy and commitment of its community.
Don't miss out on being part of this extraordinary journey. By subscribing to the Tanssi Newsletter, you won't only be the first to know when new community programs and activities go live, but you will also receive project updates and news from the entire ecosystem. Become part of the community that shapes Tanssi's future - subscribe today!