Overview of the Linera White Paper: Microchains, Elastic Validators, and Multichain Programming

ChainCatcher Selection
2022-12-20 20:32:49
Collection
What innovations does Linera, the Diem successor backed by a16z, bring compared to Aptos and Sui?

Source: Linera

Compiled by: flowie, ChainCatcher

Compared to Aptos and Sui, Linera, the Diem successor backed by a16z, has been relatively slow in its pace. After securing $6 million in funding led by a16z at the end of June this year, it has officially released its project white paper today.

It is reported that the founding team of Linera consists mainly of former engineers and researchers from Zcash and Meta/Novi. Linera's founder, Mathieu Baudet, previously worked as an engineer at Meta, helped create the Diem blockchain, and served as the chief researcher and engineer at Novi, where he was a key figure in the invention of the FastPay and Zef protocols.

According to the white paper, some of Linera's technical inspirations still stem from the low-latency payment protocol FastPay and the Move language. In terms of innovation, to provide the first multi-chain infrastructure with predictable performance, responsiveness, and security at internet scale, Linera introduces many parallel chains called microchains that run within the same set of validators and uses the internal network of each validator to quickly transmit asynchronous messages between chains.

In the white paper, Linera elaborates on the shortcomings of existing solutions such as blockchain sharding and Rollups in addressing the issue of blockchain space scarcity, as well as the innovative solutions and architectural advantages of Linera. ChainCatcher has compiled some excerpts from Linera:

I. Linera: Addressing the Shortcomings of Existing Solutions for Blockchain Space Scarcity

1. Faster single chains. The production rate of blocks in a single chain is often limited by the data propagation latency between validators. Historically, block size has been the first parameter to adjust to maximize transaction throughput based on security requirements and network constraints. With recent advancements in BFT consensus protocols, the new bottleneck for transaction rates seems to be the sequential execution of transactions rather than consensus ordering.

Many transactions expected to be included in a block should be independent in practice, and several recent projects have developed architectures capable of executing subsets of transactions in parallel across multiple processing units. While this will certainly lead to higher transaction rates, such systems still typically feature a maximum transaction count below six figures per second. Moreover, the effective transaction rate largely depends on the proportion of truly independent transactions in each block. In summary, it is impossible to guarantee fees and/or delays to users in advance without making any assumptions about the activities of other users.

Finally, in high-throughput chains, auditing validators becomes more challenging due to the combination of CPU execution requirements and data synchronization network demands. Specifically, the absolute number of sequential transactions may prevent community members using commodity hardware from replaying transactions quickly enough to meaningfully verify the work of validators.

2. Blockchain sharding. Another popular direction for addressing blockchain scalability involves partitioning the execution state into a fixed number of parallel chains, each independently operated by a separate set of validators, known as blockchain sharding. While this approach is still being improved, it has historically faced several challenges.

First, using different sets of validators introduces security trade-offs, as attackers may selectively target the weakest group in the system (e.g., for minting tokens). Second, reassembling shards, or the way user accounts are distributed across chains, is a complex operation that requires extensive network communication. Finally, as the number of shards increases to support additional traffic, the number of cross-chain messages that need to be exchanged also rises. In systems where each shard has a separate set of validators, cross-chain messages introduce significant latency, ultimately offsetting the benefits of adding new chains.

3. Rollups. Another popular method for addressing blockchain space scarcity is the Rollups protocol, whether optimistic or based on validity proofs (also known as ZK Rollups). At a high level, both optimistic and validity rollups (ZK) involve a layer 2 protocol that builds a series of large blocks intended for execution, compression, and confirmation on layer 1. Unfortunately, the process of confirming transactions in both cases requires a long time on layer 1. Optimistic rollups must wait several days to resolve disputes. Validity rollups must compress many layer 2 transactions at once to pay for layer 1 gas.

In practice, collecting enough layer 2 transactions, computing validity proofs, and archiving transactions to enforce strict data availability can take several hours for each layer 2 block. Longer layer 1 confirmation times may encourage some users to accept security trade-offs and trust layer 2 for finality in certain applications. Generally, Rollups must be trusted to execute the protocol (i.e., liveness) and fairly select transactions (see miner extractable value). This concern can be seen in recent efforts to design decentralized rollups protocols.

II. What Innovations Does Linera Offer?

Based on observations and inspirations from the above solutions, Linera aims to develop a new type of web3 infrastructure based on the following three key principles:

  1. Build a secure infrastructure with predictable performance and responsiveness by running multiple chains within a set of resilient validators;
  2. Make multi-chain programming mainstream by working on a new execution layer, enabling a rich ecosystem of scalable web3 applications;
  3. Maximize decentralization by ensuring that resilient validators are optimally incentivized and that the community can conduct large-scale audits.

Linera's Innovations Are Reflected in the Following Aspects:

1. Integrated multi-chain system with resilient validators

To realize the vision of a web3 infrastructure with predictable performance and large-scale responsiveness, Linera leverages cloud infrastructure to develop a new multi-chain protocol—an integrated multi-chain system with resilient validators.

  • In Linera, validators act as resilient services similar to web2, capable of parallel validating and executing transaction blocks across multiple chains. The number of chains (active and inactive) present in the Linera system is infinite, referred to as microchains.
  • The task of actively expanding microchains with new blocks is separated from validation or execution, undertaken by the owners of each chain. Each Linera user is encouraged to create their own chain and place their accounts there.
  • Each validator manages all microchains (known as the integrated multi-chain approach). Microchains interact using asynchronous messages while otherwise operating independently. Thus, validators can elastically scale by distributing workloads across many internal shards. The internal network of each validator effectively implements asynchronous messaging between chains.
  • The way microchains are linked to new blocks may vary. When expanding their own chains, users submit new blocks directly to validators using a low-latency, memoryless protocol inspired by reliable broadcasting. Applications requiring more complex interactions between users may also rely on temporarily created microchains on demand. In practice, only the public microchannels owned by Linera infrastructure have a complete BFT consensus protocol.
  • The synchronization of microchains between validators is delegated to the chain owners. This means that inactive microchains (those not creating blocks) incur no costs to validators beyond storage.

Using resilient validators is a unique assumption of Linera. Linera intends to allow the Linera community to support a variety of cloud providers that new validators can choose from. Linera's initial inspiration came from the low-latency payment protocol FastPay developed by Meta. Linera significantly promotes FastPay by transforming user accounts into microchains, adding smart contracts, and supporting arbitrary asynchronous messaging between chains.

2. Making multi-chain programming mainstream

Linera integrates many chains into a unique set of validators. The internal network of each validator greatly facilitates cross-chain communication. For the first time, various web3 applications have the opportunity to elastically scale by leveraging a cheap and efficient multi-chain architecture. To promote the adoption of multi-chain programming, the following design choices have been made:

  • Linera's execution model is designed to be language-agnostic and developer-friendly. Linera's initial SDK will be based on Wasm and target the Rust programming language.
  • Linera applications are composable and multi-chain. Once an application is created, it can run on any chain on demand. Instances of the same application coordinate across chains using asynchronous messages and publish/subscribe channels. Applications running on the same microchain interact using cross-contract calls and temporary session objects.

The inspiration for session objects in Linera comes from resources in the Move language. The statically typed resources in Move have been proposed to help improve composability. In Linera, the composability of class resources is achieved through the use of session handles and runtime checks. For example, to send tokens, Linera contracts will be able to transfer ownership of temporary sessions containing tokens. Generally, building a large developer community is a major factor in the adoption of blockchain infrastructure. As the Wasm ecosystem continuously improves its multi-language tools, it offers Linera the long-term potential to serve multiple developer communities.

3. Robust decentralization of resilient validators

The classic "blockchain trilemma" asserts that achieving scalability, security, and decentralization simultaneously is challenging. While this observation certainly holds for fixed-capacity validators, Linera believes that the efforts made to define and implement satisfactory decentralization concepts for resilient validators are still insufficient.

  • Linera relies on Delegated Proof of Stake (DPoS) to ensure security and regularly support changes to the validator set. Due to the linking of blocks, past transactions, cross-chain messages, and the execution state of each microchain are immutable.
  • Microchains are designed to be independently auditable. This means that Linera as a whole will be audited in a distributed manner by the community using only commodity hardware. The blockchain community has already discussed using large validators to improve performance while maintaining decentralization with community-driven validators in the context of rollups. As the Linera project progresses, continued attention will be paid to technological advancements in validity (ZK) proofs and rollups.

IV. Advantages of Linera's Architecture

Linera aims to provide the first multi-chain infrastructure with predictable performance, responsiveness, and security at internet scale. To this end, Linera introduces the idea of running many parallel chains called microchains within the same set of validators and uses the internal network of each validator to quickly transmit asynchronous messages between chains. Linera believes this architecture has many advantages:

Elastic scaling. In Linera, scalability is achieved by adding chains rather than increasing block size or rate. Each validator can add and remove capacity (also known as internal workers) at any time to maintain the nominal performance of multi-chain applications.

Responsiveness. When microchains are operated by a single user, Linera uses a simplified memoryless consensus protocol inspired by reliable broadcasting. This reduces block latency and ultimately makes Web3 applications more responsive.

Composability. Compared to other multi-chain systems, low block latency also aids composability: quick responses through the addition of new blocks allow for receiving asynchronous messages from another chain.

Chain security. One benefit of running all microchains within the same set of validators, compared to traditional multi-chain systems, is that creating chains does not affect Linera's security model.

Decentralization. Linera relies on Delegated Proof of Stake (DPoS) to ensure security. Each microchain can be executed independently on commodity hardware. This allows clients and auditors to continuously run their own validations and hold validators accountable.

Language "agnosticism." Linera's programming model does not depend on a specific programming language. After careful consideration, Linera has decided to focus on Wasm and Rust in the initial execution layer of Linera.

ChainCatcher reminds readers to view blockchain rationally, enhance risk awareness, and be cautious of various virtual token issuances and speculations. All content on this site is solely market information or related party opinions, and does not constitute any form of investment advice. If you find sensitive information in the content, please click "Report", and we will handle it promptly.
banner
ChainCatcher Building the Web3 world with innovators