What is Linea?

8NAJ...iz9w
14 Jan 2024
10



Linea is a developer-ready Ethereum-equivalent zkEVM network that utilizes zero knowledge technology and rollups. It also features technology like quantum-resistant lattice-based cryptography and its Canonical Messaging Sevice. 

Key Takeaways

  • Linea is being developed by Consensys. It is an EVM-equivalent Layer 2 network that claims to scale the user experience on Ethereum.
  • Linea boasts improved transaction fees and significantly lower fees compared to the main network. It uses zero knowledge to verify the authenticity of transactions.
  • Linea is built on lattice-based cryptography and secured with a zero knowledge rollup, where transactions are executed off the mainnet with proofs of the transactions sent to Ethereum for final validation. By this, it maintains the same level of security and decentralization as the main network.

Ethereum vertical scaling solutions are on the rise. Different projects are developing facilities and platforms that enable users to enjoy the strengths of the Ethereum blockchain without its infamous high gas fees and slower speed. 
Originally, the Ethereum blockchain’s consensus mechanism allowed multiple validators to assess new transactions before they are added to the network to ensure security. But this has become challenging as blockchain adoption grows and more users put pressure on the network, which has led to the popularity of Layer 2s like ArbitrumOptimismzkSync Era and now Linea.
Linea, a Layer 2 scaling solution being developed by Consensys claims to scale Ethereum through a constitutive platform that handles transactions in a more efficient environment. But what is Linea and how does it work?

Understanding Linea and How It Works

On July 11, 2023, Consensys announced the mainnet alpha of the Linea network after completing the testing phase. Data from the Goerli testnet for Linea claims that over 49 million transactions have been conducted on the Linea Goerli testnet by over 5.5 million verified addresses.  
So, how does Linea work? 
Linea is a type 2 zkEVM. Type 2 zkEVMs are EVM equivalent and do not change any part of the system, which makes them compatible with almost Ethereum apps and lets developers reuse a lot of existing infrastructure. EVM equivalence enables the smooth deployment of existing applications on Linea, along with the creation of new ones that would be too expensive on the Mainnet. 
However, the challenge here is around improving the prover time, as proofs for Ethereum blocks can take hours. To overcome this, Linea uses zero-knowledge proofs, rollups, and the Linea Canonical Message Service.

Zero-Knowledge Proofs

Linea uses zero-knowledge proofs to prove the integrity of transactions without revealing the details of the transaction. Linea leverages lattice-based cryptography to create zero-knowledge proofs for every transaction performed on the network. It completely cuts off third parties in transaction verification and keeps the details of a transaction away from the public view.
Here’s how zero-knowledge proof works:
The two parties in a zero-knowledge proof transaction are the Prover and the Verifier. The prover is the sender of the transaction while the verifier is the recipient. The hidden information (details of the transaction) is known as a Witness.
To prove to the verifier that a transaction is true, a prover is meant to answer a question regarding the transaction. The verifier generates the question (known as the Challenge) and sends it to the prover. The prover provides an answer (known as a Response) question and proves their knowledge of the witness. The protocol validates the answer provided by the prover and relays the Truthfulness of the transaction to the verifier. Therefore, the only information the recipient of the transaction has is whether it is true or false.

Rollups

As the name implies, rollups package multiple transactions into batches, which are validated as a single transaction. This mass validation system means that only a single fee is paid for the rolled-up transactions and they are all validated at the same time. This saves cost and time based on how many transactions are rolled-up at a time. According to an article by Vitalik Buterin, rollups can package up to 62,500 transactions into one and approve a batch in 13 seconds, translating to over 4,800TPS. The Ethereum mainnet can only process 32 transactions in a second.

Linea Canonical Message Service

Linea’s Canonical Message Service creates an efficient communication pathway between the Linea network and the Ethereum mainnet.
The  Canonical Message Service functions as a bridge and a messaging stack. It is a combination of protocols and smart contracts that pass stage-change information (routine transactions) and arbitrary messages between Linea and other networks. It transmits data about the current state of the Ethereum mainnet to Linea and vice versa. The main messaging protocol of Linea’s canonical message service is the ‘Postbots’.
According to the project, Postbots are ‘actors’ that 'listen' for calls being made to one of the contracts, either on Linea or Ethereum and pass the information submitted to the other network. While centralized during the testing phase, Consensys claims that the Postbot protocol when in full service will be a decentralized protocol where anyone on the network can serve as a Postbot.
In summary, Linea conceals transactions on its network using zero knowledge, rolls them up using the rollup technology, and sends them to the mainnet through the canonical message service. 

Full Ethereum Equivalence

As Linea is a Type 2 zkEVM, it runs an execution environment that is compatible with existing applications, although some modifications have been made to make development easier and speed up proof generation. This means that applications previously deployed on the mainnet can be moved to Linea where they can enjoy (almost) the same security and decentralization as on the main network while operating on a more resource-efficient platform. 
This makes it easy for existing Ethereum projects to deploy on Linea.

Lattice-based Cryptography

Linea claims to operate a zero-knowledge proof protocol that uses lattice-based cryptography. Lattice-based cryptography, while not being a new concept, is finding its way into modern blockchain systems. It is based on the concept of a lattice. A lattice is a geometric structure developed by crossing structures in such a way that leaves a square, rectangular, or diamond shape between them. In cryptography, this pattern is used to encrypt data.
The encryption design in lattice-based cryptography is based on deciphering the points in a lattice and matching them to corresponding points on another lattice. This is only possible (or will be easier) for someone who knows the correct keys for the lattices. Keyed lattice cryptography algorithms, like NTRUEncrypt, require using a secret key to encrypt and decrypt messages. Lattice-based cryptography could be used to construct a full encryption structure or used to develop security proofs where they function as an authentication system.
In modern cryptographic systems, here’s what lattice-based cryptography could offer

Quantum resistance

Quantum technology is a clear threat to current cryptographic systems like RSA and the Elliptic curve. Experiments claim that these encryption systems can be exposed by quantum computers using the Shor algorithm. According to claims, lattice-based encryption has shown resistance to quantum computers. Lattice-based ciphers like Dilithium and Kyber are widely considered examples of quantum-proof encryption, and Linea operates a quantum-resistant system thanks to lattice-based cryptography.

Speed

Lattice-based cryptographic systems have shown a faster computation time than other encryption systems. Efficiency in this area could contribute to the overall throughput of the (blockchain) network where it is used. This gives lattice-based systems an edge over alternatives that operate the same technology in every other area.

Resource Efficiency

Computing lattice-based encryption requires lesser energy and computer resources. Systems built on this can therefore be run on low-power devices. Also, relative to the elliptic curve and RSA cryptography, lattice-based cryptography is easier to implement and can be used in a more diverse system. Lattice-based cryptography can be used for digital signatures, password-based encryption, and key exchange. Lattice-based cryptography is therefore regarded as a relatively cost-effective and accessible encryption system.

Improved Security

Research in this area claims that lattice-based encryption systems are harder to break into, even by quantum computers as explained earlier. When used to develop blockchains, it could offer a more secure network.
With these features, Linea hopes to compete with other Layer 2 scaling solutions, but how does it compare to these other networks?

Linea vs. Other ZK Layer 2s

While other Layer 2 networks like Optimism and Arbitrum use optimistic rollups to scale transactions on the mainnet, Linea and other zero knowledge scaling solutions use the relatively more complex ZK rollups that don't require a challenge period. zkSync Era launched in the first quarter of 2023 and has since then built an ecosystem of applications using its technology. More networks like these are emerging, including Polygon’s zkEVM. 
Here are some of the differences between Linea and these networks:

Full EVM Equivalence and Bytecode Compatibility

zkEVM networks communicate with the Ethereum mainnet and aspire to be as close as possible to the mainnet in terms of functionality. This will enable them to exchange not only data but deploy applications as well. ZKSync 2.0 offers language-level compatibility with the EVM. This means that while developers can deploy their smart contracts written in Solidity or other EVM languages to zkSync Era, and the code will be transpiled into zkSync’s smart contract language, Yul. 
In contrast, Linea is bytecode EVM compatible. This means that applications are deployed ‘as-is’ from Ethereum to the Linea network. Developers do not need to make any form of modifications to their applications before deploying them to Linea and vice versa. Polygon also claims that its zkEVM is bytecode compatible as well.

Lattice-based Cryptography

Linea uses lattice-based cryptography explained earlier to develop its encryption system. This is a bit different on other Layer 2 networks. zkSync’s encryption system uses PLONK and Redshift cryptography. The Plonk cryptography system uses a trusted setup of a Common Reference String (CRS). This setup can be done once and be reused by any number of applications. 

Proof System and Consensus Mechanism

Linea uses only ZK-SNARK as its proof system. ZK-SNARK is an acronym that stands for Zero-Knowledge Succinct Non-Interactive Argument of Knowledge. ZK-SNARK is optimized for faster transactions. It is designed for a one-time validation of transactions and uses a short proof and a trusted setup to validate the transaction. 
zkSync also uses this system in solitude. Polygon claims that its zkEVM – Hermez – will use both ZK-SNARK and ZK-STARK. ZK-STARK ( Zero-Knowledge Scalable Transparent Argument of Knowledge) doesn’t require a trusted setup to operate and is argued to be a more secure alternative. With both proof systems having their strengths and disadvantages, Polygon will attempt to use them to complement each other. Polygon also claims to use a novel POE (Proof of Efficiency) consensus mechanism to select validators to approve batches of transactions. 

Final Thoughts

The efforts to scale the Ethereum blockchain through Layer 2 networks and standalone EVM-compatible networks are almost as important as the attempts to scale the main network itself. The Merge and every other development scheduled for Ethereum 2.0 are in line with the latter. Linea and other Layer 2 solutions will hope to ease the strain on the main network.
The zkEVM space keeps growing as more projects introduce different solutions for off-chain transactions and improved user experience. Linea will battle other alternatives for a share of the ZK and EVM market, and with over 100 projects listed on their ecosystem page, smart contract projects and other applications are actively exploring building on Linea. 


Get fast shipping, movies & more with Amazon Prime

Start free trial

Enjoy this blog? Subscribe to hasantorsa

3 Comments