Deep Diving: Modular Stack Part-2 | Execution Layer & Fuel

Deep Diving: Modular Stack Part-2 | Execution Layer & Fuel

·

8 min read

Before we start,

The article is prepared to assume that the reader has a certain amount of prior knowledge about Modular and Monolithic structures, and for this reason, before starting the article, I recommend reading the first article of this series "Deep Diving: Modular Stack Part-1". The article consists of 3 main sections. In the first section, we discuss the comparison between monolithic and modular execution, in the second section, we will look at the difference between rollup and modular execution layer, and in the closing, we do it with Fuel and its virtual machines, FuelVM. I learned a lot while researching, and I hope to share this information with you! 🥳


First Monolithic Blockchain & Execution! 🧐

As in the first article of this series, before starting this article, it is important to first understand the execution that takes place in monolithic chains, and then examine the relationship with the Modular Execution Layer (MEL) (referred to as "MEL" throughout the article). So, without further ado, let's begin.🥳

When we look at many blockchain technologies that have emerged in recent years, they have not been able to escape from monolithic structures. To briefly summarize these structures, in the base layer, the Consensus Layer contains the Data Availability, Settlement, and Execution Layers together. Mostly, the Settlement and Execution Layers are dependent on each other. The problem here is that the monolithic structure performs all the work in the baslayer, and indirectly, due to the workload, limits the potential of the blockchain structure.

Specifically, when it comes to the Execution Layer, we see that MELs have two main characteristics that distinguish them from their monolithic counterparts.

  • MEL separates the computation and verification processes, while in monolithic chains, the computation and verification tasks are together. Therefore, monolithic chains sacrifice reliability in order not to compromise security, while MEL can scale without compromising security.

  • MEL can be optimized specifically for the computation process, while monolithic chains are much less efficient in terms of speed and diversity. [1]

To understand these two main characteristics, we first need to look at what computation and verification are. In short, computation and verification can be said to ensure the security and integrity of monolithic chains.

During the computation process, users' transactions are taken by validators as they are made on the network and their validity is verified according to the rules of the blockchain. Transactions that pass this control are added to a new block on the chain.

Verification is the name given to the process of checking the validity of both blocks and transactions in monolithic chains. Every validator on the network has a copy of the blockchain. They verify the validity of new transactions and blocks by comparing them to their copies of the blockchain, and if a transaction or block is accepted as valid, they add it to their copies. If a transaction or block is rejected as invalid, it is rejected by the network.

In monolithic chains, all validators perform both the computation and verification of transactions. Sometimes, users or applications do not want to verify all the transactions on the chain and only want to access verified transactions on the chain. To do this, they can run a light node instead of a full node to access the data verified by full nodes, and they are completely dependent on full nodes. This is known as Honest Majority Assumption, and this situation poses the risk of 51% attack on all monolithic chains.

The Minority's Voice: Modular Execution Layer 🤯

Modular structures come to our rescue to get us out of the situation of monolithic chains that we mentioned earlier! In fact, as we mentioned in the first item above, by separating computation and verification processes, unlike monolithic structures. As the execution (computation) process is separated from the main layer, the scalability of the chain increases while decentralization is not sacrificed.

In other words, in modular chains, the execution layer is responsible for the execution process and the implementation of state transitions. According to Fuel's definition, MELs are specifically designed for modular chain structures as verifiable systems, which means that they must be able to access data through agreement with fraud or validity proof.

Also, because computation is separated from the verification process in MEL, the decentralization of computation does not matter as long as verification is decentralized. As the two processes are separate, the size of the block can increase as much as it wants (for example, the fork of the chain) as long as verification is a separate process, invalid blocks will not be added to the chain. [1]

We were able to look at the first point together in the introduction, to avoid getting too long, I will leave the link to fuel-labs' own article on the second point. It is very explanatory and educational, I learned a lot while reading, and you can also check the rest from there. You can also access the article related to the first point from the sources section.


Impossible to Discuss MELs without Rollups 🥐

In the first article of the series, we mentioned that rollups are a specialized type on the execution layer as background information. I wanted to expand on this statement a bit more, so let's begin.

To begin with, are rollups a form of blockchain? Yes, they are a form of blockchain but they are connected to another monolithic chain (see Ethereum) and they execute transactions on this chain off-chain, and then send them back to the monolithic chain as a single transaction. If you ask about the advantage of this, it is because competition on the main chain decreases as transactions are executed off-chain. If you ask about the disadvantage, it is the dependence on the main monolithic chain. Of course, for a blockchain to be considered a roll-up, it is not enough for it to only be connected to another chain, it must also have its proof and permissionless mechanisms. The main goal of rollups is to solve the scalability problem on the monolithic chain they are connected to. [3]

Modular Execution Layer = Rollup + ?? 🤔

After understanding rollups a bit, it is time to look at the differences between MEL and rollups. As we previously mentioned, rollups are specialized structures on the execution layer. As Fuel and Celestia Co-Founder John Adler said, if rollups are USB-3, then MELs are Thunderbolt-3 (Yes, he made that analogy in a podcast). We can do many things with a USB-3 cable, but with Thunderbolt-3 we gain many additional features. Two of these features are:

The Powerpuff GIF - The Powerpuff Girls GIFs

  • With MEL, users can run their light nodes off-chain without having to run a full node and can also approve the chain without the need for a full node. This reduces the need for trust in the structure and makes it more reliable.

  • MEL is not dependent on any monolithic L1 chain and can be used in a very flexible way. [2]

    Modular Execution Layer’ların zengin kullanım şekillerine örnek, kaynak: fuel

    In summary, MEL carries all the basic features of rollups while also being trust-minimized systems and unlike rollups, they do not require any other main network.


The Stage is Fuel's ⛽

In short, Fuel is a platform that aims to build the fastest execution layer for the modular blockchain stack. Fuel claims to be faster than any other platform and it also claims to achieve this without compromising security. How is this possible?

Mcqueen GIF - Mcqueen GIFs

  • Parallel Transaction Execution: A model where the transactions on the chain are verified simultaneously on multiple cores.

  • FuelVM (We will look at it in more detail in the next heading, so I will skip it for now.)

  • Sway: Sway can be described as Rust + Solidity equation. Sway takes Rust's compile-time analyses and security while using its syntax, and also has the ergonomics and secure structure of Solidity when it comes to writing smart contracts. [2]

FuelVM = EVM ++

As the title suggests, the Fuel Virtual Machine (FuelVM) takes the Ethereum Virtual Machine (EVM) as its starting point. If you are a developer considering developing on Fuel, it would be helpful to first fully understand the EVM, as FuelVM can be thought of as an updated and more optimized version of the EVM. Design-wise, they have a few nuances and differences but they are quite similar. So, what makes FuelVM special? Let's examine it point by point:

  • FuelVM has a shared memory architecture instead of a local memory. The goal here is to call the data from a global structure instead of giving each smart contract its own separate memory space, call data, and return data. This reduces the cost of data roaming between smart contracts.

  • FuelVM is built to be fraud-proof. This means that Fuel light clients do not need a trusted party, it uses fewer resources than a full-node and it is much more secure than current light clients. EVM fraud proofs are too complex to be built on, so it often requires a second layer.

    dsgsdsdg

  • FuelVM allows for multiple local assets to be used, while on the mainnet, the only local asset is Ether. The flexible structure of FuelVM enables any contract on Fuel to use any UTXO-based local asset.

  • FuelVM uses 64-bit words instead of 256-bit words. This allows developers to avoid BigNumber errors in the smart contract side.

Last but not Least⌛

The goal of the modular stack is to break free from the monotony on the blockchain and to be able to move more flexibly. Specifically, MELs (modular execution layer) do not have to be tied to any monolithic L1 chain, which is the best example of this. This way, the modular stack can produce its own solutions in cases where EVM is inadequate. Fuel is the biggest player on the MEL side of this system. By developing its own virtual machines and languages that go beyond EVM, Fuel provides efficient and scalable executions while also not compromising on superior developer experience and maximum security. Therefore, we conclude that,

Modularity, not Maximalism!


Sources ℹ️

  1. fuel-labs.ghost.io/the-case-for-modular-exe..

  2. fuellabs.github.io/fuel-docs/master/index.h..

  3. Bankless Podcast w/ John Adler