Editors Note: This article comes fromPolkaWorld(ID:gh_6c4c2038ddba)Editors Note: This article comes from
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
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.
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.
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
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
secondary title
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
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
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