June 09, 2021

Ethereum full node vs archive node

Overview

If the Ethereum network is to be seen as a globally distributed computer, then nodes provide computational power and resources to this computer. In this guide, we’ll understand more about Ethereum full nodes and archive nodes then explore the difference between them.

What is a node in Ethereum?

In an ordinary non-technical context, a node can be defined as a connection point that joins or connects different branches. On the Internet, any device connected to the network can be considered a node. The same goes for a blockchain network. Any computer that has a downloaded copy of the blockchain and participates in the network is generally regarded as a node. The Ethereum blockchain is a network of computers constantly communicating with each other. They are taking in and sending out information to other computers, which all work together to verify transactions and verify the common blockchain database known as a ledger. A node receives data from the network and also broadcasts it to the network so that all the nodes have the same information at any given time. As the number of nodes on the network increases, it becomes resilient and less vulnerable to attacks. 

Here is a brief breakdown of commonly recognized types of nodes in Ethereum:

  • Archive nodes - Has data since genesis block.
  • Full nodes - Receive copies of transactions. Has the current state of the blockchain.
  • Light nodes- Doesn’t have the entirety of the current blockchain state and depends on a full node, useful for low memory and computational devices.
  • Miner nodes - Miner nodes verify transactions and add them to the blocks, and mine the blocks. They secure the blockchain.

What is an Ethereum full node?

Full nodes are the nodes that copy and verify transactions on the blockchain and help maintain the blockchain state. Whenever a transaction is added to the blockchain, full nodes verify that the transaction complies with the Ethereum specification, and maintain the current state of the blockchain by doing this. Transactions and blocks that do not comply with the Ethereum specification are discarded. For example, if person A has sent a transfer transaction of 100 ETH to person B, but person A has zero ETH in their account, the Full node verifying transactions, will mark this transaction as invalid and drop it. Full nodes also execute all the instructions on the smart contract whenever there is a smart contract transaction. It checks if the smart contract execution is giving the desired output or not. A full node stores the state of the most recent 128 blocks (or only 64 if you’re using fast/snap sync) and about one week of trace data updated as soon as the new block comes in.


Hardware requirements to run a full node with fast sync:

  • A fast Cpu with 4+ cores.
  • 16 GB+ of RAM.
  • A fast SSD drive with at least 500GB+ of space.
  • 25 MBit/s+ bandwidth.

What is an Ethereum archive node?

Archive nodes are full nodes running with a special option known as "archive mode". Archive nodes have all the historical data of the blockchain since the genesis block. If you have a need for data from blocks before the last 128 blocks, you’ll want to access an archive node. For example, to use calls like eth_getBalance of an ancient address will only be possible with an archive node, to interact with smart contracts deployed much earlier in the blockchain, etc.


Hardware requirements to run a full archive node:

  • A fast Cpu with 4+ cores.
  • 16 GB+ of RAM.
  • A fast SSD drive with at least 6TB+ of space.
  • 25 MBit/s+ bandwidth.

Full node vs. Archive node

Let’s try to understand the above difference by trying to use the Ethereum RPC to get some information. We’ll query the balance of an account at block 1 of the Ethereum blockchain address 0xe5Fb31A5CaEE6a96de393bdBF89FBe65fe125Bb3  received about 1K ETH in the genesis block.

First, let's make the request to an archive node. To get the full archive capability, we’ll get a QuickNode with an archive add-on. Once you do so, save the HTTP PROVIDER URL from the customer portal somewhere - its the address  pictured below:


Now run the following:

$ curl --data '{"method":"eth_getBalance","params":["0xe5Fb31A5CaEE6a96de393bdBF89FBe65fe125Bb3", "0x1"],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST QUICKNODE_WITH_ARCHIVE_ADD_ON

Output:

{
   "id" : 1,
   "jsonrpc" : "2.0",
   "result" : "0x3635c9adc5dea00000"
}

Now, let’s try to run the same command with a node without archive support; for that, we’ll get a QuickNode without any add-on. Follow the same process of replacing the QUICKNODE_WITHOUT_ARCHIVE_ADD_ON string with the web3 URL from our customer portal.

$ curl --data '{"method":"eth_getBalance","params":["0xe5Fb31A5CaEE6a96de393bdBF89FBe65fe125Bb3", "0x1"],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST QUICKNODE_WITHOUT_ARCHIVE_ADD_ON

Output:

{
   "error" : {
      "code" : -32000,
      "message" : "missing trie node d67e4d450343046425ae4271474353857ab860dbc0a1dde64b41b5cd3a532bf3 (path )"
   },
   "id" : 1,
   "jsonrpc" : "2.0"
}

As you can see, the call errored, which shows the need for archive functionality.

You can learn more about Ethereum nodes and infrastructure head over to the infrastructure tab in the QuickNode guides section.

Conclusion

Here we got some understanding of Ethereum full and archive nodes. Nodes can take a significant amount of time to sync the whole blockchain data and require constant maintenance. If you need older data from the blockchain, you don't really have a choice - you have to use an archive node. It’s a wise choice to spin up archive nodes with QuickNode, where you get instant access to blockchain data with managed ready to use nodes.

Subscribe to our newsletter for more articles and guides on Ethereum. If you have any feedback, feel free to reach out to us via Twitter. You can always chat with us on our Discord community server, featuring some of the coolest developers you’ll ever meet :)
Ready to try QuickNode? Start your 7-day free trial

Related articles 7

Jun 9, 2021 How to install and run a Prysm Beacon node

Even if you're a newbie, rookie, or a pro in Ethereum it really excites all of us to see these developments in Ethereum. Whether it's all the hard forks like Istanbul, Atlantis, etc. or the development of Ethereum 2.0 - there is a lot to keep up with.In this...

Continue reading
Jun 9, 2021 How to run Expedition Block Explorer

In this article, we will talk about how to install and run the Expedition Ethereum Block explorer. While playing with the Ethereum blockchain network one might need to look up transactions, tokens, addresses, or prices. To accomplish these...

Continue reading
Jun 9, 2021 How to install and run a Geth node

Ethereum nodes are computers participating in Ethereum blockchain network. These nodes are actual computers running software that verifies, stores, and sometimes creates blocks. The actual software is called a "client," and it allows us to interact with the blockchain...

Continue reading
Jun 9, 2021 How to run Nethermind node

To run an Ethereum node without any problems, it is essential to choose a good node client. Nethermind is one of the oldest and most trusted Ethereum node clients. In this guide, let’s see how we can launch a Nethermind node.

Continue reading
Jun 9, 2021 How to run a Hyperledger Besu node

As the Ethereum network continues to grow, the need for an enterprise-ready Ethereum client arises. Hyperledger Besu is an enterprise-friendly Ethereum client that can implement both public and private permissioned networks. This guide will cover the requirements to run...

Continue reading
Jul 3, 2021 How to Run a Binance Smart Chain Node

Binance Smart Chain, BSC for short, is a blockchain that seeks to provide both an alternative and extension to the Ethereum Blockchain. It has done this through several clever implementations that took place during the building of the platform. This guide will walk you...

Continue reading
Jun 9, 2021 How to run a OpenEthereum (ex-parity client) Node

Ethereum nodes are computers participating in Ethereum blockchain network, these nodes are actual computers running software that verifies, stores, and sometimes creates blocks. The actual software is called a "client" and it allows us to interact with the blockchain...

Continue reading