Listen to Gavin Woods personal interpretation of Polkadots new design parallel threads

avatar
PolkaWorld
5 years ago
This article is approximately 1663 words,and reading the entire article takes about 3 minutes
Why do parallel threads? What is the difference between it and a parachain, and how does it work?

Editors Note: This article comes fromPolkaWorld(ID:gh_6c4c2038ddba)Editors Note: This article comes from

Listen to Gavin Woods personal interpretation of Polkadots new design parallel threads

The next thing I want to introduce is what Polkadot will advance in the next few months. One of them is the concerns and questions that have been raised in the community in the past few weeks about the development of parachains.

secondary title

Status: Parallel chain reserves are relatively large

Listen to Gavin Woods personal interpretation of Polkadots new design parallel threads

Of course, we also have some ways to help the team raise this part of funds, such as the function of releasing crowdfunding activities on the relay chain; and the mechanism of DOT token lending and full repayment after the parachain is inactive. On this basis, we still hope to design a more flexible, pay-as-you-go charging model for developers who want to build parachains.

secondary title

New design: parallel threads that share scarce resources

Therefore, in the past few days, I have combined some charging methods in the Internet field and done some thinking and research. Essentially, parachains in the Polkadot network are scarce resources. However, Polkadots relay chain can only process data of about 100 parallel chains in a block produced by each blockchain within a short period of time. The current assumption is that these 100 parachains are the same 100. However, in principle, the relay chain can process the verification information from any 100 parachains in each output block, and does not need to be a fixed 100 parachains.

There are several analogies of scarce resources in the field of the Internet and computing networks, one of which is memory resources (Memory), and the other is hardware threads (Hardware Threads).

General mobile phones and computers have 2-8 core CPUs, which allow multi-threaded concurrent information processing. However, computer operating systems have more task threads. For example, this Apple operating system has about 390 different operating tasks linearly, running independently in parallel at the same time. Generally speaking, these more than 390 different operation task threads do not occupy too much computing resources, and they will be awakened after being called for operation. Individual threads think that they are running independently on the CPU, but in fact, these threads are sharing the computing resources of the CPU. Generally speaking, when each unit does not need to occupy a large amount of scarce resources in real time, the system settings will allow these processes to share scarce resources, allowing some units to use these resources in a short period of time.

Listen to Gavin Woods personal interpretation of Polkadots new design parallel threads

Through the analysis and analogy of this sharing system, I thought of why such a shared charging mechanism is not used in the parachain. In other words, the slots (Slots) of the parachain can be shared by other parachains. So we call this shared slot Parathreads (Parathreads).

Parathreads and parachains use the same API model, the same underlying code and computing model. Parallel threads have the same cross-chain intercommunication function as parachains, and the entire network treats parathreads with the same status as parachains. It has its own socket permanently, the same way computer software thinks they have CPU resources at all times. Parathreads and parachains can also be converted to each other on demand.

Listen to Gavin Woods personal interpretation of Polkadots new design parallel threads

secondary title

The difference between parathreads and parachains in the payment model

However, parathreads are not required to do this auction. It only needs to pay a reserve of 10-100 DOT, which is much cheaper than obtaining a parachain and more expensive than a smart contract. Parathreads only pay fees when their transactions are processed by the Polkadot network. When the parathread network is quiescent, they dont need to pay fees, just the initial reserve. When parathreads have more transactions to process and insert into the Polkadot blockchain, they use DOT tokens for payment. Parallel threads can also be optimized. When there are many other parallel threads that need to process transactions and insert blocks into the Polkadot network, the parallel threads can be coordinated and switched to a time period that is less busy than the network, thereby reducing network costs.

secondary title

Listen to Gavin Woods personal interpretation of Polkadots new design parallel threads

Allocation of Relay Chain Capacity

This page is an introduction to the structure of the Polkadot relay chain. There will be about 100 slots for parachains.

Some of these will be specially reserved slots, which will be used to ensure that the Polkadot network is running healthy and well. There will be some system-level parachains, such as the parachains of governance layer logic, staking logic parachains, and parachains of DOT token account transfer logic within the network. These are relatively important parachains, which are initiated simultaneously with the relay chain Establish. Additional reserved slots will be used for nested relay chains that allow the relay chain to be further expanded, and those parallel chains that connect independent blockchain networks with different consensus mechanisms to enter the Polkadot network.

The last remaining slots are reserved for these parathread projects. Each block will be auctioned in all parallel threads, and whoever needs these slots the most can bid in these parallel threads through auction and then obtain the slots of this parachain.

secondary title

Example of how parallel threads work

Listen to Gavin Woods personal interpretation of Polkadots new design parallel threadsNext, lets take a look at how this parallel thread works.

There are two specific blocks in this PPT, Block42 and Block43. At the same time we have a bunch of collectors that collect blocks from parallel threads that need to write transactions in this block.

The charging and block verification mechanism of this parallel thread is the same as the mechanism of parachain block generation and verification access to the relay chain.

secondary title

Listen to Gavin Woods personal interpretation of Polkadots new design parallel threads
The Economic Model of Parallel Threads

Lets look at the economic model of parathreads, which consists of 2 different fee components.

One of them is the transaction fee, which is the transaction fee calculated according to the amount of data to be processed and the number of blocks.

The other part is sponsorship from parathreads. The fee model in this part is the fee curve in the lower left of the figure, and the X-axis represents the time from the last block created, verified and finally connected to the blockchain by a parallel thread. At first, because there is a buffer sleep period, the additional cost required is 0, but after the time on the x-axis exceeds a certain amount, the parallel threads need to pay an exponentially increasing fee to ensure that the transaction blocks they need to create can definitely be in less time. Processed with large delays, the verification enters the blockchain network.

For example, in this picture, I assume that the parathread has been dormant for 12 blocks, and then needs to pay 60 parathread-specific TOK tokens if it needs to regenerate the block, and if it has been dormant for 24 blocks, it needs to pay It is possible that 6 billion parathread-specific TOK tokens can be awakened.

Then we add the two parts together and tell the collector that if a collector can collect and verify the block from the parathread, the collector can get 100 TOK tokens — 40 1 from transaction fees, 60 from sponsorship or additional top up fees.

In this PPT, Dave, as a collector, realizes that the value of 100 TOK tokens as a collection reward is greater than the value of 5 DOT tokens. Because he, as a collector, will get the 100 TOK tokens and give 5 DOTs to the relay chain to ensure that he can collect the transaction data of the next block and enter the block into the relay chain .

If 100 TOKs are worth 6 DOT tokens, Dave spent 5 DOTs in the whole process as a collector to get the block of this parallel thread verified and finally written to the relay chain, and he finally got 1 DOT Rewards in DOTs.

secondary title

Listen to Gavin Woods personal interpretation of Polkadots new design parallel threads

Parathreads make chain transfers smoother

Another important content that needs to be analyzed is the transfer of the chain.

Each parachain has a validity period of 2 years, and after 6 months they can start an auction that continuously updates the 2-year validity period. However, there is a certain probability that the slot auctions that some parachains participate in continue to fail, and they are getting closer to the 2-year expiration date, and they will eventually be kicked out of the parachain camp. One concern comes from the fact that certain parachains are maliciously competed by other parachains, and are eventually squeezed out of the parachain lineup maliciously.

The frequent occurrence of this situation is also detrimental to the entire Polkadot network. Although this is a relatively extreme scenario, the odds of it happening are unlikely. Because if such a situation really happens, the parallel chain may be kicked out by other malicious parties, then it is likely that the governance mechanism of the entire Polkadot network will intervene to coordinate governance before it happens.

Here we assume that this is a potential problem, and parathreads will provide an intermediate step in this case. When parachains are approaching the end of their life cycle, they will generally directly become a transition bridge chain, or worse, directly become a completely independent chain. Now, they can become a parallel thread, which can still be used, receive and send information, and provide services, even if each block cannot be connected to the cross-chain network like a parachain.

The switch from parathread to parachain is not a heavy conversion process, but a relatively light operation, which can be completed with only one block and some simple technical logic. Of course, parathreads can also be turned into bridge chains and security chains. When there are economic incentives, it is also possible for verifiers to verify their blocks.

secondary title

Listen to Gavin Woods personal interpretation of Polkadots new design parallel threads

Summary: The status and role of parallel threads

To sum up, parathread is an intermediate position between the parachain and the transfer bridge chain.

Parathreads have the same level of shared security and interoperability from the relay chain as parachains, and ensure that parachains that are about to expire will always remain online. It allows each development team to access blocks at a reduced cost, small parallel threads do not need to compete with large chains, and ensures that each parallel thread can pay transaction fees and Inflation costs to enjoy shared security.

Translated by PolkaWorld Super Agent Charlie Hu

This article is from a submission and does not represent the Daily position. If reprinted, please indicate the source.

ODAILY reminds readers to establish correct monetary and investment concepts, rationally view blockchain, and effectively improve risk awareness; We can actively report and report any illegal or criminal clues discovered to relevant departments.

Recommended Reading
Editor’s Picks