Skip to content
Blockchain Association of Cameroon
BAC-L0-FOUND-1133 h

Nodes, validators and network roles

Who does what in a network: full node, archive node, light client, validator, collator. Confusing them makes any infrastructure discussion impossible.

  • Distinguish roles by what they store and what they verify
  • Choose the node type that fits a given need
  • Estimate the storage cost of an archive node

"I ran a node" means nothing until you say which one: a full node, an archive node, a light client, a validator? These roles do not store the same data, do not verify the same things and do not cost the same. In this workshop you learn to tell them apart with two simple questions — what does this role keep, and what does it verify by itself — then to choose the right node type for a given need and to estimate, with numbers, the storage and bandwidth cost of an archive node. Finally you will see why a light client delegates part of the trust, and how an application can notice this before a user loses money.

Lessons 1/4 · 20 min

The roles: what they keep and what they verify

A starting question

Your friend says: "My app queries a node, so it trusts nobody." Is that true? It depends entirely on the node. To answer, ask two questions about every role in the network:

  1. What does it store? (the whole history, only recent state, only block headers)
  2. What does it verify by itself? (every transaction and state transition, or only proofs and signatures)

Reminder from workshop 110: a block has a header (height, previous block hash, Merkle roots) and a body (the transactions). The state is the table of balances and data after each block; the header contains a fingerprint of it, the state root.

The roles, one by one

  • Full node: downloads blocks, replays every transaction and checks the protocol rules. It rejects an invalid block even if everyone else signs it. It keeps recent state and, depending on configuration, may prune (delete) old state.
  • Archive node: a full node that deletes nothing: it can answer "what was this account's balance at block 1,200,000?". It is therefore much larger.
  • Light client: keeps only headers (or even just one recent trusted header). For a specific piece of data it asks a full node for a Merkle proof and compares it with the header's root. It does not replay transactions.
  • Validator (proof of stake) or miner (proof of work): takes part in producing and voting on blocks. For its own safety and the network's, it should be a full node: it should not vote on what it has not verified (the protocol does not always enforce this: some pool miners work on a block template supplied by the operator). It also holds a signing key that puts its funds at stake.
  • Collator: a term specific to Polkadot and its parachains. It gathers a parachain's transactions and prepares the candidate blocks that the relay chain's validators check. It does not secure the relay chain itself. Elsewhere the word does not exist or means something else: check each network's vocabulary.
  • RPC node: a full (or archive) node whose JSON-RPC interface is opened to applications. It is a use of a node, not a data type.

Summary table

RoleKeepsVerifies by itselfCan answer old history?
Light clientHeadersHeader signatures/work, Merkle proofsNo, not alone
Full node (pruned)Blocks + recent stateAll transactionsOnly the retained period
Archive nodeEverything, including past statesAll transactionsYes
ValidatorLike a full node + signing keyAll transactions, then votesDepends on its configuration

Worked example: who can answer?

A fictitious network has 2,000,000 blocks. Three questions: (a) "Is this payment in block 1,999,990?" (b) "What was account X's balance at block 500,000?" (c) "Does this transaction obey the rules?"

  • (a) A light client can answer with a Merkle proof against the header.
  • (b) Only an archive node has the state of block 500,000 immediately available; a pruned full node deleted it (if it kept the blocks, it could recompute it by replaying them, slowly). A light client can only ask, and must believe the answer unless it comes with a proof against the state root of that header.
  • (c) Only a node that replays the transaction (full, archive, validator) truly verifies it.

What this does NOT guarantee

  • Running a full node does not make you a validator: there is no vote and no reward without a validation key and, in proof of stake, without deposited stake.
  • A full node does not protect you from a chain that is validly built but wrong: if it is connected only to malicious peers (an eclipse attack), it can follow a false branch. It checks the rules, not the truth of the world.
  • Names are not standardised: two projects can call two different things "light".

Recap

A role is defined by what it keeps and what it verifies. The less it verifies, the more trust it delegates; the less it keeps, the less it costs.

Lessons 2/4 · 20 min

Choosing the right node type for a need

The problem

Four teams in Douala and Yaoundé each need a "node". They should not all run the same thing. To choose, start from the need, not from the technology.

Decision grid

Ask these four questions in order:

  1. Must I verify the rules myself? If a source error costs money (crediting a deposit, signing a payment), yes.
  2. Do I need old history? Past balances and old execution traces → archive. Old event logs are often available on a full node that keeps blocks (check the chain's documentation). Otherwise a pruned full node is enough.
  3. How many requests per second? A public application needs several nodes behind a load balancer, not one big one.
  4. What machine and network do I have? A phone on a connection billed by volume cannot follow a chain continuously.

Four cases

NeedSuggested typeWhy
Mobile wallet for individualsLight client, or a trusted RPC serviceThe phone can neither store nor replay the chain; a trust assumption is accepted, and must be disclosed
Deposit platform (credit after payment)Own full node + a confirmations ruleMoney is at stake: verification is not delegated
Explorer or historical analysisArchive node (and an indexer)Needs the past state and execution traces of any block
Securing the networkDedicated full node + a protected signing key24/7 availability; a double signature can be penalised

Worked example: a node's bandwidth

The following numbers are fictitious (no real network is described): a network produces one block every 6 seconds, each block weighs 80 KB.

  • Blocks per day: 86,400 s ÷ 6 s = 14,400 blocks.
  • Block data per day: 14,400 × 80 KB = 1,152,000 KB ≈ 1.15 GB.
  • A node also receives pending transactions and peer messages. Suppose, for the example, an overhead of ×5: ≈ 5.76 GB per day, about 173 GB per month.

On a mobile connection billed by volume, 173 GB a month is beyond many budgets. Practical conclusion: host the node with a provider that does not meter volume, or in a data centre, and connect to it from your phone. The ×5 factor is an assumption of the example: measure yours with the network interface counters over 24 hours.

Sync time: two distinct limits

Bringing a node up to date requires downloading then verifying. Download follows the model of workshop 101: duration ≈ round trips × latency + size × 8 ÷ bandwidth. But verification — replaying transactions, computing hashes — depends on CPU and disk, not on bandwidth. Fast fibre does not make a node sync faster if its disk is slow.

What this does NOT guarantee

  • A free public RPC service is neither a full node of your own nor an availability commitment: it may rate-limit, filter methods or return stale data.
  • "Bigger" does not mean "safer". An archive node verifies exactly the same rules as a full node; it just keeps more.
  • The bandwidth figures above are a calculation method, not a measurement of a real network.

Recap

Choose a node starting from the need: who bears the error? is the past needed? what request volume? what machine? And write down the trust assumption you accept.

Lessons 3/4 · 25 min

Estimating the storage cost of an archive node

The problem

Your team wants an archive node for a regional service. The director asks: "How much disk, and how much money, for three years?" A serious answer is a calculation with written assumptions, not a number found on a forum.

Four-step method

  1. Blocks per year = (seconds per year) ÷ (time between blocks).
  2. Bytes kept per block = block body + state changes + indexes. An archive keeps past state: the delicate point is how much state changes in each block. You measure it on a real node of the target chain.
  3. Size per year = blocks per year × bytes per block.
  4. Margins: free space so the disk is never full (at least 20 to 30%), traffic growth, backup.

Worked example (FICTITIOUS network)

Assumptions: one block every 6 s; on average 50 KB of block body and 30 KB of state changes and indexes per block, i.e. 80 KB.

  1. Blocks per year: 14,400 per day × 365 = 5,256,000.
  2. Size per year: 5,256,000 × 80 KB = 420,480,000 KB ≈ 420 GB per year (decimal GB).
  3. Over 3 years, with no traffic growth: 3 × 420 = 1,260 GB ≈ 1.26 TB.
  4. With a 30% free-space margin you need at least 1,260 ÷ 0.7 = 1,800 GB usable, so you buy 2 TB.

If traffic doubles after a year, the "no growth" assumption is wrong: redo the calculation by slice. An estimate that does not say how it could be wrong is not an estimate.

Cost: a disk is more than a capacity

A node reads and writes in random order. Input/output throughput (operations per second) matters as much as terabytes: a spinning disk may be too slow to keep up with the chain. Node clients generally recommend SSDs, often NVMe; your client's documentation gives the minimum.

In this workshop, "estimating the storage cost" means estimating the disk size to plan for; the cost in money comes from multiplying by a rate. For the budget, add: disk × the provider's price per GB (you read the price at purchase time: it changes), bandwidth, backup, and a person's time for maintenance. In this workshop we use no real price: the point is the structure of the calculation.

Why not everyone runs an archive

Compare with a pruned full node. Suppose it keeps only 100,000 recent blocks of state: 100,000 × 30 KB = 3 GB of state, plus blocks 5,256,000 × 50 KB ≈ 263 GB if all are kept. Pruning old state therefore brings the order of magnitude from 420 to about 266 GB per year in this example, and above all it caps the state part. The full node verifies the same rules; it has only forgotten the state's past. Caution: this toy counts only the per-block state changes; the full current state (all accounts) comes on top, and its size is something to measure, not to deduce from those changes.

What this does NOT guarantee

  • The calculation does not tell how long the initial sync takes: that depends on CPU, disk and network.
  • Size does not always grow linearly: a protocol change, a usage spike or a spam attack can make it jump.
  • A bigger archive node is not more "decentralised": if few people can afford the hardware, there are few independent archives, and you fall back on trusting a few providers (see workshop 114).

Recap

Size = blocks × bytes kept per block, with a free-space margin. Write your assumptions, measure them on a real node, and redo the calculation when they change.

Lessons 4/4 · 25 min

Validators, quorums and light-client trust

The problem

A mobile wallet shows "Balance: 25,000". Where does that number come from? If the app asked a server and trusted the answer, that server decides what you see. A light client tries to reduce this trust, but not to remove it.

The validator: a full node that signs

In a Byzantine-fault-tolerant network (workshop 108), n validators decide by supermajority (strictly more than two thirds of the votes). With n = 3f + 1 the network tolerates f Byzantine validators and requires a quorum of 2f + 1 votes. Example: n = 10, so f = 3, quorum = 7. If 3 validators are offline or malicious, 7 remain: the quorum is reachable. With 4 faulty validators it no longer is. If they are 4 crashes, liveness is lost but safety holds; if they are 4 Byzantine nodes, safety itself is no longer guaranteed (it holds only up to f = 3 Byzantine nodes).

Try the quorum simulator: set n, mark some validators faulty and watch when the quorum stops being reachable.

A validator must satisfy two opposing constraints:

  • Availability: offline, it misses votes and may be penalised.
  • Key prudence: its signing key is used continuously, so it sits on a connected server. Running the same key on two machines "for redundancy" can produce two contradictory signatures; in many proof-of-stake networks this behaviour (equivocation, or double signing) is penalised, sometimes by destroying part of the stake. The exact rules depend on the network.

Common practice: put the validator behind "sentry" nodes that alone talk to the rest of the network, and never expose its own RPC interface.

What a light client delegates

The light client follows headers. To learn "my balance is 25,000" it asks a full node for the value and a Merkle proof that links that value to the header's state root (workshop 106).

What it verifies:

  • that the value received is indeed the one contained in the state whose root appears in the header (the proof is recomputed);
  • depending on the protocol, that the header is signed by enough validators (proof of stake) or carries enough work (proof of work).

What it delegates, hence assumes:

  1. The starting header is the right one. A trusted starting point is needed: a header embedded in the app, or the validator list at a given moment. If this header is false, everything after it is false.
  2. The validators who signed did verify. The light client did not replay the block; it believes an honest quorum did. A malicious majority of validators could sign an invalid block, which only a full node would catch.
  3. It is shown the latest chain. A dishonest full node can hide recent blocks (the up-to-date value is missing) or, if it is the only peer, eclipse you.
  4. The starting header is recent enough. Validator sets change: a header that is too old may be signed by keys that no longer put any stake at risk.

If the app gets no proof and simply takes the server's answer, it does not delegate "a little": it delegates everything to that server.

Example: reading a proof

In the Merkle explorer, build a tree of eight "account" leaves, click a leaf and verify the proof. Then edit a leaf's value: the root changes, and the proof no longer leads to the old root. That is why a valid proof against the trusted header protects against a lying server about that data. It does not protect against a false header.

What this does NOT guarantee

  • A valid Merkle proof does not prove the header is final: on a chain with probabilistic finality it can still be reorganised (workshop 109).
  • Running a validator does not guarantee its peers' honesty; only the 2f + 1 threshold over n = 3f + 1 bounds how many faulty are tolerated.
  • A light client is not "trustless": it replaces trust in a single server with trust in the starting header and in the validator quorum.

Recap

The validator signs and should therefore verify; the light client verifies proofs and delegates the rest. Every delegation is a trust assumption that must be named.

Interactive tool

BFT quorum simulator

Click a validator to change its state: honest, offline, then Byzantine (malicious or arbitrarily faulty).

Number of validators n

n = 7 · f = ⌊(n−1)/3⌋ = 2 · quorum = 2f+1 = 5

7 honest, 0 offline, 0 Byzantine.

✓ Can decide: 7 honest online validators ≥ quorum 5. The network can gather a quorum and finalise blocks.

✓ Safety guaranteed by the model: 0 Byzantine ≤ f = 2. Any two quorums overlap in at least one honest validator, so no conflicting decisions.

Classic BFT model: n ≥ 3f + 1 validators tolerate up to f faulty ones (offline or Byzantine). A quorum is 2f + 1 votes. Losing liveness = the network stops making progress, but nothing wrong is decided. Losing safety = conflicting decisions become possible, which is worse. Liveness additionally assumes a network that eventually delivers messages. This is only a model: real protocols have other assumptions and thresholds.

Interactive tool

Merkle tree explorer (toy)

One leaf per line (2 to 8). Pick a leaf to see its inclusion proof; edit a text to see which nodes change.

5 leaves

Nodes changed since the last valid input are underlined and marked "changed". Nodes on the chosen leaf's path are outlined. Last node of an odd level: it is duplicated as its own sibling.

Convention: leaf = SHA-256(UTF-8 text); parent = SHA-256(left ‖ right, raw bytes); odd node duplicated. Toy tree: Bitcoin double-hashes and serialises differently.

Guided lab

Let us be honest: your browser cannot run a real node or a Docker container. This lab therefore trains reasoning (choosing a role, computing a download time, a quorum and a disk size) from data generated for you. The real hands-on work — running a node in full mode then light mode and comparing resources and sync time — happens in the independent lab, on your own machine.

A browser is no substitute for a real terminal: this lab trains reading and reasoning; the real hands-on practice is in the independent lab.

A certified account is required

Graded activities record results in your name and are the basis for a credential. They therefore need a complete certified file and a current consent. Filling in the file does not verify your identity; the Secretariat can verify it afterwards ("Verified" badge).

  1. 1.Pick the role that fits a need

    Re-read the summary table of the first lesson, then answer the application question shown under this step: it describes a service with a precise need (verification, history, volume). Justify your choice by what the node keeps and verifies, not by its name.

  2. 2.Compute a snapshot download time

    A node fetches a file. Real chain snapshots are of the order of tens to hundreds of GB; the generated exercise uses small sizes, but the model is the same. That model is the one from workshop 101: total time = round trips × latency + size × 8 ÷ bandwidth (1 MB = 8 megabits). Read the data of the task generated for you, first compute the transmission time alone, then the total time, and enter two integers in milliseconds. Remember that the verification that follows is NOT included in this model.

  3. 3.Quorum of a validator set

    A set of n validators is displayed, with n = 3f + 1. Use the quorum simulator to test your intuition: how many faulty validators does the network tolerate, what is the size of a quorum, and what is the smallest network that would tolerate one more Byzantine fault? Enter the three integers requested.

    Interactive tool

    BFT quorum simulator

    Click a validator to change its state: honest, offline, then Byzantine (malicious or arbitrarily faulty).

    Number of validators n

    n = 7 · f = ⌊(n−1)/3⌋ = 2 · quorum = 2f+1 = 5

    7 honest, 0 offline, 0 Byzantine.

    ✓ Can decide: 7 honest online validators ≥ quorum 5. The network can gather a quorum and finalise blocks.

    ✓ Safety guaranteed by the model: 0 Byzantine ≤ f = 2. Any two quorums overlap in at least one honest validator, so no conflicting decisions.

    Classic BFT model: n ≥ 3f + 1 validators tolerate up to f faulty ones (offline or Byzantine). A quorum is 2f + 1 votes. Losing liveness = the network stops making progress, but nothing wrong is decided. Losing safety = conflicting decisions become possible, which is worse. Liveness additionally assumes a network that eventually delivers messages. This is only a model: real protocols have other assumptions and thresholds.

  4. 4.Estimate an archive node's disk

    Apply the four-step method of the third lesson to the fictitious assumptions of the question shown under this step (block time, bytes per block, duration, free-space margin). Write intermediate products on scratch paper before choosing the answer: blocks per day, blocks per year, size per year, then the margin.

Security exercise — What a light client delegates

A start-up in Bafoussam publishes a "light" mobile wallet. Its code fetches the balance like this, seen from the test console:

GET /balance?address=FICTITIOUS_ADDRESS     (single hard-coded provider)
-> 200 OK   {"balance": 25000}

The app displays this number in large type, with the label "Verified by the blockchain". No block header is downloaded, no proof is requested: the provider is the only counterpart, and its address is hard-coded in the app. One day the provider is hacked and returns 900000 for every address. Users believe they received a payment and hand over goods.

Your task: identify what was actually delegated, what the app falsely claimed, and the minimal fix that makes the claim true. Answer the application question shown under this exercise. The right answer distinguishes what a valid Merkle proof against a header protects and what it does not.

Workshop quiz

Eight questions drawn from a larger pool, 70% to pass. It opens once every lab checkpoint is passed. You can retake it: the draw changes.

A certified account is required

Graded activities record results in your name and are the basis for a credential. They therefore need a complete certified file and a current consent. Filling in the file does not verify your identity; the Secretariat can verify it afterwards ("Verified" badge).

Independent lab (outside the site)

Not graded online: do it on your own machine and publish it to your Git repository.

Size a public RPC node for a regional application

To do on your machine, outside the site, without publishing a report on a real network whose figures you do not control.

  1. Choose a public test network whose official documentation describes how to run a full node (see the Academy's documentation registry). Run it with Docker in full mode, then, if the client allows, in light or pruned mode. For each, note: disk usage after one hour, memory used, and time to reach the current height.
  2. Measure for 24 hours the incoming and outgoing network volume with the interface counters (for example ip -s link on Linux). Compare with the calculation of the second lesson.
  3. Write a one-page sizing note for an imaginary application with 5,000 users: number of nodes behind a load balancer, type (full or archive) and why, disk, memory, monthly bandwidth, and a "trust assumptions" section (who else can make you believe something false).
  4. Every figure must carry its source: measured by you, or taken from the official documentation (with the page). Do not reuse any number from a tweet or a dashboard.

Success criterion: a peer redoes your calculation with your assumptions and finds your totals within 10%.

Takeaways

  • A role is defined by what it keeps and what it verifies by itself: full node, archive, light client and validator differ on these two axes.
  • Choose a node from the need (who bears the error? is history needed? what volume?), then write down the trust assumption you accept.
  • Archive size = blocks per year × bytes kept per block, plus a free-space margin; assumptions are measured, not copied.
  • A light client verifies proofs against a header but delegates the starting header and the quorum's honesty; without a proof it delegates everything.
  • A validator should verify before signing; the same key on two machines can produce a punishable double signature.

Common misconceptions

  • Misconception : If my app queries a node, it trusts nobody.

    In fact : It trusts that node, unless it verifies a proof against a trusted header, or the node is its own and verifies the rules itself.

  • Misconception : An archive node is safer or "truer" than a full node.

    In fact : Both verify the same rules; the archive just keeps past state, which costs more disk.

  • Misconception : Running a full node makes me a validator and earns me rewards.

    In fact : A validator votes with a validation key and, in proof of stake, a deposited stake; a full node alone does not vote.

Glossary

Full node
A node that downloads blocks, replays transactions and verifies all protocol rules by itself.
Archive node
A full node that also keeps past states, so it can answer about any old block.
Light client
A program that keeps only block headers and verifies Merkle proofs supplied by a full node.
Validator
A participant who proposes and votes on blocks with a signing key; it should first verify what it signs.
Pruning
Deliberate deletion of old state to save disk, without changing the rules verified.
Sentry node
A public node placed in front of a validator that talks to the network on its behalf to hide and protect it.