Ethereum Clients' Node Syncing Methods (2024)

A node is a computer running Ethereum client software. A client is an implementation of Ethereum that verifies all transactions in each block. Until The Merge, a single piece of software is required to run a full node but after The Merge, two pieces of client software are required to run a full node, one to handle and gossip transactions - execution client and one to handle block gossip and fork choice - the consensus client.

  • What are syncing methods ?
  • Types of Syncing Methods
  • Why use Snap Sync rather than Fast Sync?
  • Execution Clients and its Syncing Strategies
  • Key points on the Syncing Process

Synchronization refers to how quickly it can get the most up-to-date information on Ethereum's state.

During the synchronization, the goal of nodes is to store and propagate the blockchain. Therefore getting a valid copy is the most critical part of running a node. To do this on Ethereum you need to validate the blockchain headers and download a copy of the state trie.

Here are the ways to sync a node on the Ethereum Blockchain:

Full sync

Full sync are for the nodes that stores the full blockchain data. It downloads every transaction ever made on the network and computes the state.

Full sync serves the network and provides data on request.

The Full Sync strategy is to execute each block since genesis. There is a starting genesis state (account balances, contract bytecodes, storage slots, etc). Then each block reads the previous state and writes new state, verifying the new state root on the header. Full sync is painfully slow on mainnet, and the time to finish full sync will increase without bound as the network gets older. So “Fast” Sync was born.

Fast Sync

This synchronization method downloads the block headers and a recent state trie from peers who are already present on the ethereum network. This will only validate state transitions after it has been synced to a certain block height.

Before Fast Sync can execute the launch block, it needs the state's bytecode, accounts and contract storage. Transactions can read any of these values during execution. Therefore, Fast Sync requests a snapshot of the state just before the start block from the peer. The snapshot is referenced by a state root hash, which is a Merkle tree root hash of the entire state.

Warp Sync

Warp Sync is an extension to the Ethereum Wire protocol, which involves sending snapshots over the network to get the full state at a given block extremely quickly, and then filling in the blocks between the genesis and the snapshot in the background.

Warp Sync is a subprotocol built on the DevP2P networking layer, with 3-byte identification.

Warp sync relies on static snapshots taken every 30000 blocks. This means that the serving node will have to regenerate the snapshot every 5 days, but repeating the entire state trial can actually take longer. This means that warp synchronization is not sustainable in the long run.

Warp Sync was used by Parity.

Snap Sync

The snap protocol runs on top of RLPx, facilitating the exchange of Ethereum state snapshots between peers. RLP is a TCP-based transport protocol used for communication among Ethereum nodes.

The current version of the snap protocol is snap/1.

The snap protocol is designed for semi real-time data retrieval. The main goal is to make dynamic snapshots of recent states available for peers and to serve nodes that provides fast iterable access to the state of the most recent N blocks. The snap protocol does not take part in chain maintenance and it is meant to be run on par with the eth protocol.

The essence of the snapshot synchronization or Snap Sync is making contiguous ranges of accounts and storage slots available for remote retrieval. The sort order is the same as the state trie iteration order, which makes it possible to request N subsequent accounts.

Important properties of Snap Sync:

  • It is the fastest and default sync mode of Geth.
  • Compared to fast sync, we only need to transfer the useful leaf data from the state trie and can reconstruct internal nodes locally.
  • Compared to warp sync, we can download small chunks of accounts and storage slots and immediately verify their Merkle proofs, making junk attacks impossible. Here the synchronization concurrency is totally dependent on client implementation and is not forced by the protocol.

Beam Sync - A new Syncing method

Beam Sync is an evolution of FastSync. The main difference is that Beam Sync starts executing the start block and requests only the missing state data from the local database. Input and output states are saved locally. Beam Sync then proceeds to the next block, repeating the process and requesting the missing data as needed.

Over time, less and less data will be lost. If you do not access the state, the client will not request it. Therefore, run another process in the background to fill these gaps. Finally, this backfill process allows Beam Sync to populate the local database with all state data and the node to switch to Full Sync.

Nethermind also used the Beam Synchronization.

Archive Nodes

It stores everything kept in the full node and builds an archive of historical states. It is necessary if you want a query like an account balance at a certain block or simply and reliably test your own transactions set without mining them using OpenEthereum.

These data are units of terabytes which makes archive nodes less attractive for average users but can be handy for services like block explorers, wallet vendors, and chain analytics.

Syncing the clients in any mode other than archive will result in pruned blockchain data. This means that there is no archive of all historical states but the full node is able to build them on demand.

Light Nodes

Light nodes only downloads the blockheaders. These headers contain information about the contents of the block. If a light node requires any information, it can taken from the full nodes.

The light node can then independently verify the data they receive against the state roots in the block headers. Light nodes enable users to participate in the Ethereum network without the powerful hardware or high bandwidth required to run full nodes. Eventually, light nodes might run on mobile phones or embedded devices. The light nodes do not participate in consensus (i.e. they cannot be miners/validators), but they can access the Ethereum blockchain with the same functionality as a full node.

An operator can choose to run Fast Sync when setting up the node, which downloads the state associated with the last 64 blocks that currently comes at about 90Gb. This can still take more than 24 hours in a fast machine. With Snap Sync, the sync time is reduced to 2-3h with a download of 30Gb.
This reduction in sync time and download size has to do with the specific way in which Ethereum’s state is stored in a node: Merkle trees

Ethereum Clients' Node Syncing Methods (1)

Source

With Fast Sync, a node downloads the headers of each block and retrieves all the nodes beneath it until it reaches the leaves. On the contratry, Snap Sync only downloads the leaf nodes, generating the remaining nodes locally which saves time and packets downloaded.

In the case of fast sync, the main problem was latency, caused by Ethereum’s data model.

Fast sync spends a whopping 6.3 hours doing nothing, just waiting for data:

  • If you have an above average network link
  • If you have a good number of serving peers
  • If your peers don’t serve anyone else but you

Snap sync was designed to solve all three mentioned problems. The idea is fairly simple: instead of downloading the trie node-by-node, snap sync downloads the contiguous chunks of useful state data, and reconstructs the Merkle trie locally:

  • Without downloading intermediate Merkle trie nodes, state data can be fetched in large batches, removing the delay caused by network latency.
  • Without downloading Merkle nodes, downstream data drops to half; and without addressing each piece of data individually, upstream data gets insignificant, removing the delay caused by bandwidth.
  • Without requesting randomly keyed data, peers do only a couple contiguous disk.

Here are some of the basic differences put on a table:

Ethereum Clients' Node Syncing Methods (2)

Here are some of the execution clients and its syncing strategies:

Ethereum Clients' Node Syncing Methods (3)

  • The syncing process is very long and can take upto 48-72 hours.
  • The syncing speed depends on your internet speed and writing speed of your storage device.
  • As the data are stored in blocks and linked together, corruption in one block can corrupt the whole chaindata. Therefore, it is very important to shut down your Geth properly.
  • The progress bar on your Ethereum Wallet is NOT accurate.
References

Similar Reads

  • Goerli and Prater Testnet Merge
  • Akula Ethereum Implementation
  • Sepolia Testnet Merge
  • Ethereum Bulletin
  • Russian Bank executes first Digital Asset transaction
  • Highlights of the ACD Meeting 142
  • Binance enters the Spain market

Disclaimer: The information contained on this web page is for education purposes only. Readers are suggested to conduct their own research, review, analyze and verify the content before relying on them.

To publish press releases, project updates and guest posts with us, please email at contact@etherworld.co.

Subscribe to EtherWorld YouTube channel for ELI5 content.

Support us at Gitcoin

You've something to share with the blockchain community, join us on Discord!

Follow us at Twitter, Facebook, LinkedIn, and Instagram.

Ethereum Clients' Node Syncing Methods (2024)

FAQs

Ethereum Clients' Node Syncing Methods? ›

Snap Sync works by downloading a snapshot of the state from other nodes on the network and is then able to start executing blocks from the completed state rather than having to re-execute every single block. This means that performing a Snap Sync is significantly faster than performing a full sync.

What is the difference between snap sync and full sync? ›

Snap Sync works by downloading a snapshot of the state from other nodes on the network and is then able to start executing blocks from the completed state rather than having to re-execute every single block. This means that performing a Snap Sync is significantly faster than performing a full sync.

How do Ethereum nodes communicate with each other? ›

Every full Ethereum node maintains a complete copy of the blockchain, continuously synchronizing with other nodes to reflect the latest transactions and blocks. Ethereum nodes communicate with each other through a peer-to-peer (P2P) network, ensuring robustness and resistance to censorship without central servers.

What are the different modes of Ethereum nodes? ›

Types of Ethereum Nodes
  • ​​ Full nodes. Full nodes store all the blockchain's data and participate in block validation. ...
  • ​​ Light nodes. A light node is much smaller than a full node and does not participate in block validation in the same way. ...
  • ​​ Archive nodes. ...
  • ​​ Nodes at Cloudflare.
Nov 8, 2023

How do I know if my ETH node is synced? ›

You can check your Geth execution node's sync status by running geth attach (IPC) or geth attach http://localhost:8545 (HTTP) from a separate terminal. Then type eth. syncing . A sync status of false indicates that your node is fully synced.

What are the different types of syncing? ›

You have 4 different type of Synchronization:
  • Local Synchronization - from SQL Server database to local. ...
  • SQL Server Synchronization - from Local database to SQL Server. ...
  • Create local copy of the SQL Server database. ...
  • Duplicate items.

What are the two types of sync? ›

2 Main Types Of Data Synchronization

Data synchronization isn't a one-size-fits-all solution. It varies based on how you want your data to move. Mainly, there are 2 types: one-way and two-way sync.

What is the difference between Ethereum node and client? ›

A machine running Ethereum client software is referred to as an “Ethereum Node”. A client is an Ethereum implementation that validates all transactions in each block, ensuring the network's security and data accuracy. The three types of Ethereum Nodes are Full, Light, Archive, and Miner Nodes.

How are nodes interconnected? ›

Mesh topology.

Nodes are interconnected with multiple direct links. This allows multiple paths for data transmission. Mesh topologies offer high reliability but require extensive cabling and configuration.

How do two nodes communicate? ›

communication between nodes
  1. The source node sends a data frame to the destination node and initializes a countdown clock.
  2. The destination node receives the packet, recalculates the checksum and compares it with the received one.

What is the difference between a node and a client? ›

For instance, a web browser is essentially a client that requests information from servers all over the entire internet. On the other hand, a “node” represents any computer that runs client software and is connected to a network that can send, receive, and store data.

Who controls Ethereum nodes? ›

The Ethereum blockchain is decentralized, meaning it is not controlled by any single entity. It is maintained and validated by a network of nodes operated by individuals and organizations worldwide.

What is the best Ethereum execution client? ›

Geth is indeed the favorite client for the Execution chain followed by Besu, Nethermind & Erigon. Nethermind and Besu followed by Erigon turned out to be the clients of choice for switching if needed. Many users have shared not-so-good experiences with Besu since after the Merge.

Should I use mega full sync or selective sync? ›

Configure MEGAsync

Next, configure how you want MEGA to install to your computer. Full sync will sync your entire cloud drive, and selective sync will only sync specific folders. Since the free plan only comes with 20GB of space, we recommend selecting the “selective sync” option.

What does fully in sync mean? ›

: in a state in which two or more people or things move or happen together at the same time and speed. The dancers moved in sync. The film's sound and picture need to be in sync.

What is the difference between incremental and full sync? ›

An incremental sync runs faster because it extracts only the latest changes to the Salesforce object. During the first sync of an object, Salesforce Data Pipelines always performs a full sync. Switching the site or migrating the org also triggers the object to undergo a full sync.

Is better to turn the sync on or off? ›

Turning off sync in Google is a great way to free up storage space on your device and boost device performance.

Top Articles
Latest Posts
Article information

Author: Delena Feil

Last Updated:

Views: 6077

Rating: 4.4 / 5 (65 voted)

Reviews: 80% of readers found this page helpful

Author information

Name: Delena Feil

Birthday: 1998-08-29

Address: 747 Lubowitz Run, Sidmouth, HI 90646-5543

Phone: +99513241752844

Job: Design Supervisor

Hobby: Digital arts, Lacemaking, Air sports, Running, Scouting, Shooting, Puzzles

Introduction: My name is Delena Feil, I am a clean, splendid, calm, fancy, jolly, bright, faithful person who loves writing and wants to share my knowledge and understanding with you.