Have you been wondering what the Erigon node consensus layer is but couldn’t get to the bottom of it? If so, you’ve come to the right place, as we will dissect the Erigon node topic in this article. Among other details, you’ll learn why the “Erigon node consensus layer” phrase is technically incorrect and misleading. After all, Erigon is not a consensus layer node but one of the five leading execution layer clients.
After successfully executing one of the largest Ethereum updates – The Merge – back in September 2022, the Ethereum blockchain no longer uses proof-of-work (PoW) consensus. The switch to proof-of-stake (PoS) consensus and The Merge (formerly known as “Eth1” and “Eth2”) brought some significant changes to the network. In addition to some of its modifications, it brought some nomenclature changes that might have confused the Ethereum community. While we’ll primarily focus on the “Erigon node consensus layer”, we’ll make sure to explain what the Ethereum execution and consensus layers are. Plus, we’ll look at the main difference between the two node layers.
What is Erigon?
Erigon is an Ethereum execution layer client. Erigon started its journey under a different name: “Turbo-Geth”. The latter was a fork of Go Ethereum (Geth) that primarily focused on speed and disk-space efficiency. Now, Erigon is a completely re-architected implementation of Ethereum.
The devs behind this execution layer client used the Go programming language to write it. However, Erigon implementations in other languages are already under development. Erigon’s main goal is to provide a fast, highly modular, and properly optimized implementation of Ethereum. Primarily, this type of Ethereum execution is used to run archive nodes that manage large amounts of on-chain data.
So, now you know that Erigon is not a consensus layer client but an execution layer client. However, the “Erigon node consensus layer” term may refer to any consensus layer node running in pair with Erigon. After all, to run an Ethereum full node, you need to run an execution layer client (e.g., Erigon) and an Ethereum consensus layer client at the same time!
Everything You Need to Know About an Erigon Archive Node
As you can see in the image above, Erigon currently represents about ten percent of Ethereum’s execution layer. Aside from Nethermind, it is a prime candidate to poach some of the Geth clients and ensure more even distribution. However, before you run your Erigon node, make sure to cover the details below. That will help you decide whether you want to opt for the “Erigon node consensus layer” combo or combine your consensus layer node with another execution layer client.
The Erigon Client Overview
Programming language: GoOperating systems: Linux, Windows, macOSNetworks: Sepolia testnet, Goerli testnet, Ethereum mainnet, and othersSync strategy: FullState pruning: Archive, PrunedKey features: More efficient state storageFaster initial syncJSON-RPC daemonRun all components by “docker-compose” (not yet for Windows)Grafana dashboard
System Requirements for Running an Erigon Node
If you decide to go with the Erigon node consensus layer combo, you need to meet the following systems requirements:
Storage Space (SSD or NVMe)
3 TB (minimum) to cover the current Ethereum state (more than 1.8 TB), temp files (200 GB), and a full mainnet node (more than 400 GB)Other chains: Goerli full node: 189 GB on beta, 114 GB on alphaGnosis chain archive: 370 GBBNB Smart Chain: Polygon mainnet archive: 5 TBPolygon’s testnet (Mumbai) archive: 1 TB
Golang (Go) Version
1.18 or higher (GCC 10+ or Clanf+g; kernel v4 or higher [Linux])
How Long Does it Take for an Erigon Node to Sync?
According to ethereum.org’s page on nodes and clients, Erigon can perform a full archive node sync using around 2 TB of disk space in less than three days. However, according to other sources, it normally takes longer. Overall, the more RAM you have, the faster Erigon can sync.
Here are some typical sync time frames in relation to RAM:
16 GB of RAM: Roughly six days32 GB of RAM: Roughly five days64 GB of RAM: Roughly four days
How to Set Up an Erigon Node?
The following sequence of commands will help you set up the latest stable release of an Erigon node:
git clone –recurse-submodules https://github.com/ledgerwatch/erigon.gitcd erigongit checkout develmake erigon./build/bin/erigon
The above commands will do the trick for you if you just want to run a node. However, if you want to apply more advanced options, such as building the bleeding edge development branch, make sure to use the GitHub link (without “.git”) from the top command line above.
Now that you know what Erigon is, it’s time we explain what the Ethereum execution and consensus layers are and what their main difference is. By covering these aspects, you’ll be able to fully understand the “Erigon node consensus layer” phrase.
What is Ethereum’s Execution Layer (EL)?
The Ethereum execution layer (EL) is a network of Ethereum execution nodes running execution client software (Geth, Nethermind, Erigon, etc.). Formerly (pre-Merge) known as “Eth1” clients, the execution clients deal with transactions on the Ethereum network. These clients listen to new transactions broadcasted in the network and execute them using EVM (Ethereum Virtual Machine). So, the execution layer holds the latest state and database of all current Ethereum data in a decentralized manner (dispersed among the layer’s nodes).
The Ethereum core community maintains several open-source execution clients. Moreover, to establish proper client diversity and strengthen the network, execution layer clients were developed by different teams using different programming languages. The Ethereum community’s ideal goal is to achieve diversity without any client dominating the space. That way, the network will further reduce single points of failure.
The execution layer’s networking protocols fall into one of the following two stacks:
The discovery stack is built on top of UDP. It allows a new node joining the network to find peers to connect with. The DevP2P stack sits on top of TCP. It enables nodes to exchange information with each other. Of course, for the network to run smoothly, both stacks need to work in parallel.
The Ethereum execution layer is also known as the execution engine, EL layer, and formerly Eth1.
Here’s a list of the leading Ethereum execution layer clients and the corresponding programming languages:
Geth (Go)Nethermind (C#, .Net)Erigon (Go)Besu (Java)Akula (Rust)
Note: OpenEthereum is deprecated.
What is the Ethereum Consensus Layer (CL)?
The Ethereum consensus layer (CL) is a network of Ethereum consensus nodes running consensus client software (Prysm, Lighthouse, Teku, etc.). These clients, also known as the Beacon nodes, CL clients, or formerly Eth2 clients, implement the proof-of-stake (PoS) consensus algorithm. The latter enables the network to achieve agreement based on the data validated by the execution clients.
It’s important to note that consensus clients participate in a separate peer-to-peer (P2P) network with different specifications. For this layer to function properly, consensus clients need to participate in what’s known as “block gossip”. By doing so, all participating clients can receive new blocks from peers. Then, when it is their turn to be block proposers, consensus clients can broadcast those blocks. Furthermore, following execution layers lead, for the Ethereum consensus layer to work correctly, multiple protocols must support peer discovery and establish a safe connection. The consensus layer achieves that with the following five stacks/domains:
Discovery – For finding peersENRs – Find specific peers and connect to the right Ethereum forkLibP2P – Supports all client communication after the discoveryGossip – This ensures that essential information spreads throughout the networkRequest-response – Protocols handling clients can request specific information from their peers
The following is also a list of the leading Ethereum consensus layer clients and their programming languages:
Prysm (Go)Lighthouse (Rust)Teku (Java)Nimbus (Nim)Lodestar (TypeScript)
The Difference Between the Ethereum Execution Layer (EL) and Consensus Layer (CL)
The “Erigon node consensus layer” term only comes into play when running a full Ethereum node (since you need to run both client types). This also means that both layers – EL and CL – must connect. While both client types run parallel, their connection (as indicated in the above image) is vital for the PoS Ethereum network to run smoothly. After all, without this connection, the consensus client wouldn’t be able to provide instructions to the execution client. At the same time, the execution client wouldn’t be able to pass bundles of transactions (blocks) to the consensus client.
With that in mind, let’s look at the main differences between EL and CL:
EL deals with transactions on the Ethereum network (provides and stores the data)CL implements the PoS consensus algorithm (implements rules and verifies data)
So, if you choose to run an Erigon execution client, you must also run an Erigon node consensus layer. However, remember that you don’t need to run your own node to start building dapps.
Ethereum Development Beyond Erigon
When it comes to building dapps, having a reliable Web3 API provider on your side is the most important aspect. This is where Moralis enters the scene as one of the few must-have Ethereum development tools. With the Moralis EVM API, you can fetch any on-chain data on Ethereum and other leading EVM-compatible chains. Also, With the ultimate Web3 Data API in your corner, you can fetch parsed data for tokens, NFTs, transactions, and more. For instance, you can get Ethereum transaction details and Ethereum logs and events with short code snippets. Plus, with the IPFS Ethereum API from Moralis, you can easily upload files and folders to the most popular Web3 storage solution.
Another prominent Moralis product is the Web3 Streams API. The latter enables you to monitor an Ethereum address (wallet or smart contract) and create webhooks for specific on-chain events. This powerful tool makes Web3 libraries obsolete when it comes to listening to blockchain activity.
Aside from cross-chain compatibility, Moralis supports all the leading programming languages and dev platforms. Thanks to Moralis’ cross-platform interoperability, you can use your legacy dev skills to start your blockchain app development journey.
Thanks to the enterprise blockchain solutions from Moralis, you can scale your Web3 projects. After all, Moralis has a proven track record serving backend needs for some of the largest Web3 wallets, portfolio trackers, and other Web3 applications.
Moralis also provides a full stack of resources to help you and your team become blockchain experts. Starting with one of the neatest and most practical Web3 development documentation, video tutorials, and a blockchain development blog, you can learn how to become a Web3 developer for free. That said, if you wish to take a more professional approach to your crypto education, Moralis Academy is the go-to choice. Aside from solutions for individuals, this online educational platform enables you to train your entire team in blockchain development.
Moralis also provides several other practical resources. For instance, via the Pure Faucets page, you can access vetted crypto faucets (Ethereum faucet, Sepolia testnet faucet, Goerli testnet faucet, Aptos testnet faucet, etc.). In addition, you can convert gwei to ETH (and vice versa) with our user-friendly calculator.
Furthermore, with Moralis, you can build dapps without reinventing the wheel and spending a ton of time and resources on building your own infrastructure. Now, in case you are interested in developing your own smart contracts (e.g., to create an ERC721 token), make sure to learn about smart contract security, ERC721 vs ERC1155, and OpenZeppelin in Remix.
What is the Erigon Node Consensus Layer? – Summary
In today’s article, you’ve learned all the essentials about the Erigon execution layer client. By exploring this Ethereum client, you should now be able to determine whether or not you want to run your own Erigon node or look into other execution nodes instead. You also learned what the Ethereum execution layer and Ethereum consensus layer are and their main differences. As a result, you now fully understand the meaning of the “Erigon node consensus layer” phrase. You also learned that you do not have to run your own node to start building killer dapps. After all, you can start BUIDLing with your legacy skills and a free Moralis account!