Skip to main content

The Shape of a Line: Linea's Architecture

Linea's ideal state​

Linea aims to be a fully decentralized, permissionless network. To support this goal, the Linea architecture is made up of three main elements:

  • Sequencer
  • Prover
  • Bridge relayer

Current state​

Linea is in mainnet status, and the team is fervently working towards full decentralization. The following is a good representation of the main components of Linea, and how they interact:

Linea architecture

First of all: what is Linea, anyway? What's a zkEVM L2?​

There are several different mental models that people use to explain the different networks and how they relate to one another. Some people prefer to call L2s "rollup networks", or "scaling solutions". The term "layer" is a popular mental model: where one network is "built on top of another".

Let's set metaphor aside for a moment, and clarify:

The Ethereum network has several functional areas:

  • Blockchain: keeps track of addresses, and which tokens are allocated to which addresses
  • Consensus mechanism: wherein many many nodes communicate about the movement of tokens from one address to another, and each keeps their local copy of the ledger up to date
  • Execution environment: the EVM (Ethereum Virtual Machine) wherein computer programs can be run.

These three areas are heavily interconnected, and this is a simplification, but it's a helpful one to understand the tradeoffs all networks must make.

Ethereum prioritizes security: that consensus mechanism is designed to ensure that no one can singlehandedly alter the state of the network. This is a very impressive feat of engineering, and it comes with a tradeoff: the execution environment is highly limited in the amount of work it can do, because the consensus mechanism intentionally runs slowly, to keep everything safe.

Linea and other L2s are designed to participate in the security mechanism of Ethereum, while optimizing for execution. In other words, L2s enables users to make many transactions, run lots of programs, deploy contracts, mint NFTs, absolutely go to town—fast and cheap, and then compresses this data into a report back to Ethereum for inclusion in Ethereum's blockchain. By sending regular reports of activity on Linea to Ethereum, the network can optimize for execution without being as limited by security.

This is the action known as "rolling up": we can say that Linea "rolls up its transactions to Ethereum". And the fact that it relies on Ethereum for its security leads people to say that it's "built on top of Ethereum": it's a "second-layer network", an L2. And before you ask, yes, Ethereum is an L1, and L3s exist, too: networks that roll up to Linea would roll up to Ethereum.

The trick is in how that rollup happens. Linea is special: it uses cutting-edge developments in a branch of mathematics and computer science often referred to as zero-knowledge, or zero-knowledge cryptography, to prove to the Ethereum network that everything that is happening on the Linea network is, in fact, happening, without having to submit a complete record of every last transaction and check each one. Instead, Linea submits a verifiable proof to Ethereum of each transaction: that's the 'zk' part.

So, now that we've walked through some concepts, we can roll it all up: Linea is a zkEVM L2 network.

Linea blue circle

OK... But what's a sequencer and a prover? How does all this actually work?​

At a high level, if you were to follow a flow from Ethereum, through Linea, and back to Ethereum, it would go like this:

  1. Ethereum bridge contract >
  2. Linea bridge contract >
  3. Coordinator >
  4. Sequencer (Block building > Execution > Trace data generation) >
  5. Coordinator >
  6. Trace Conflation >
  7. EVM State Manager >
  8. Trace Expansion and Proving (Corset > gnark) >
  9. Coordinator >
  10. zk-proof and updated Merkle tree >
  11. Linea bridge contract >
  12. Ethereum bridge contract >
  13. Ethereum blockchain

...in other words, there's a lot involved.

Linea red circle

Next steps​

  • Learn more about the different components that comprise the Linea architecture.
  • Understand the first point of contact for many new L2 users, the bridge. Linea has more than one bridge; and that number is likely to continue to grow. The Linea canonical message service is key to these bridges and how they function.