Nodes and clients

The Electroneum Smart Chain is a distributed network of computers running software (known as nodes) that can verify blocks and transaction data. You need an application, known as a client, on your computer to "run" a node.

Prerequisites

You should understand the concept of a peer-to-peer network and the basics of the EVM before diving deeper and running your own instance of an Electroneum Smart Chain client. Take a look at our Introduction to the Electroneum Smart Chain.

What are nodes and clients?

"Node" refers to a running piece of client software. A client is an implementation of Electroneum Smart Chain that verifies all transactions in each block, keeping the network secure and the data accurate.

You can see a real-time view of the Ethereum network by looking at this map of nodes.

Node types

If you want to run your own node, you should understand that there are different types of node that consume data differently. In fact, clients can run 3 different types of node - light, full and archive. There are also options of different sync strategies which enables faster synchronisation time. Synchronisation refers to how quickly it can get the most up-to-date information on the Electroneum Smart Chain's state.

Full node

  • Stores full blockchain data (although this is periodically pruned so a full node does not store all state data back to genesis)

  • Participates in block validation, verifies all blocks and states.

  • All states can be derived from a full node (although very old states are reconstructed from requests made to archive nodes).

  • Serves the network and provides data on request.

Light node

Instead of downloading every block, light nodes download block headers. These headers only contain summary information about the contents of the blocks. Any other information required by the light node gets requested from a full node. 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 Electroneum 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 validators), but they can access the Electroneum blockchain with the same functionality as a full node.

The execution client Etn-sc includes a light sync option. However, a light Etn-sc node relies upon full nodes serving light node data. Few full nodes opt to serve light node data, meaning light nodes often fail to find peers.

There are also potential routes to providing light client data over the gossip network. This is advantageous because the gossip network could support a network of light nodes without requiring full nodes to serve requests.

The Electroneum Smart Chain does not support a large population of light nodes yet, but light node support is an area expected to develop rapidly in the near future.

Archive node

  • Stores everything kept in the full node and builds an archive of historical states. Needed if you want to query something like an account balance at block #4,000,000.

  • Data might represent units of terabytes when the network grows, which makes archive nodes less attractive for average users but can be handy for services like block explorers, wallet vendors, and chain analytics.

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

Why should I run an Electroneum node?

Running a node allows you to trustlessly and privately use the Electroneum Smart Chain while supporting the ecosystem.

Benefits to you

Running your own node enables you to use Electroneum in a truly private, self-sufficient and trustless manner. You don't need to trust the network because you can verify the data yourself with your client. "Don't trust, verify" is a popular blockchain mantra.

  • Your node verifies all the transactions and blocks against consensus rules by itself. This means you don’t have to rely on any other nodes in the network or fully trust them.

  • You won't have to leak your addresses and balances to random nodes. Everything can be checked with your own client.

  • Your dapp can be more secure and private if you use your own node. MetaMask and some other wallets can be easily pointed to your own local node.

  • You can program your own custom RPC endpoints.

  • You can connect to your node using Inter-process Communications (IPC) or rewrite the node to load your program as a plugin. This grants low latency, which is required to replace your transactions as fast as possible (i.e. frontrunning).

Network benefits

A diverse set of nodes is important for Electroneum's health, security and operational resiliency.

  • They provide access to blockchain data for lightweight clients that depend on it. In high peaks of usage, there need to be enough full nodes to help light nodes sync. Light nodes don't store the whole blockchain, instead they verify data via the state roots in block headers. They can request more information from blocks if they need it.

  • Full nodes enforce the istanbul-byzantine-fault-tolerance consensus rules so they can’t be tricked into accepting blocks that don't follow them. This provides extra security in the network because if all the nodes were light nodes, which don't perform full verification, validators could attack the network and, for example, create blocks with higher rewards.

If you run a full node, the whole Electroneum network benefits from it.

Running your own node

Interested in running your own Electroneum Smart Chain client?

If you're more of a technical user, learn how to spin up your own node with the command line!

Alternatives

If somebody runs an Electroneum node with a public API in your community, you can point your light wallets (like MetaMask) to a community node via Custom RPC and gain more privacy than with some random trusted third party. To clarify what we mean by privacy, there are a few ways of proxying your requests to the network in order to send transactions: A) Run your own node and send your requests through that B) Open up metamask and connect it to a node ran by a member of the public who does not require you to do kyc and simply leaves the node open to anonymous connection (besides ip address) to help out people who don't have their own node aka good samaritan C) You send your requests via some third party who has a node but requires a signup / kyc/ personal info etc Herein we are referring to option B.

This also means that if you run a client, you can share it altruistically with your friends who might need it.

The Etn-sc client

The Etn-sc client is the official client for the Electroneum Smart Chain, inspired by Geth and maintained by the Electroneum Team.

Synchronisation modes

To follow and verify current data in the network, the Electroneum client needs to sync with the latest network state. This is done by downloading data from peers, cryptographically verifying their integrity, and building a local blockchain database.

Synchronisation modes represent different approaches to this process with various trade-offs.

Overview of strategies

General overview of synchronisation approaches used in Mainnet ready clients:

Full sync

Full sync downloads all blocks (including headers, transactions, and receipts) and generates the state of the blockchain incrementally by executing every block from genesis.

  • Minimises trust and offers the highest security by verifying every transaction.

  • With an increasing number of transactions, it can take days to weeks to process all transactions.

Fast sync

Fast sync downloads all blocks (including headers, transactions, and receipts), verifies all headers, downloads the state and verifies it against the headers.

  • Relies on the security of the consensus mechanism.

  • Synchronisation takes only a few hours.

Light sync

Light client mode downloads all block headers, block data, and verifies some randomly. Only syncs tip of the chain from the trusted checkpoint.

  • Gets only the latest state while relying on trust in developers and consensus mechanism.

  • Client ready to use with current network state in a few minutes.

More on Light clients

Snap sync

Implemented by Etn-sc. Using dynamic snapshots served by peers retrieves all the account and storage data without downloading intermediate trie nodes and then reconstructs the Merkle trie locally.

  • Fastest sync strategy developed by Etn-sc, currently its default

  • Saves a lot of disk usage and network bandwidth without sacrificing security.

Setup in client

Clients offer rich configuration options to suit your needs. Apart from the synchronisation algorithm, you can also set pruning of different kinds of old data. Pruning enables deleting outdated data, e.g. removing state trie nodes that are unreachable from recent blocks.

Pay attention to the client's documentation or help page to find out which sync mode is the default. You can define the preferred type of sync when you get set up, like so:

Setting up light sync in ETN-SC

etn-sc --syncmode "full"

For further details, check out the tutorial on running Etn-sc in light mode.

Hardware

Hardware requirements generally are not that high since the node just needs to stay synced. Don't confuse it with mining, which requires much more computing power. Sync time and performance do improve with more powerful hardware however. Depending on your needs and wants, Electroneum can be run on your computer, home server, single-board computers or virtual private servers in the cloud.

Requirements

Before installing the client, please ensure your computer has enough resources to run it. Minimum and recommended requirements can be found below, however the key part is the disk space. Syncing the Electroneum blockchain is very input/output intensive. It is best to have a solid-state drive (SSD). To run an Electroneum client on HDD, you will need at least 8GB of RAM to use as a cache.

Minimum requirements

  • CPU with 2+ cores

  • 4 GB RAM minimum with an SSD, 8 GB+ if you have an HDD

  • 8 MBit/s bandwidth

Recommended specifications

  • Fast CPU with 4+ cores

  • 16 GB+ RAM

  • Fast SSD with at least 500 GB free space

  • 25+ MBit/s bandwidth

Last updated