Education › Blockchain › Stage 1: Foundations — how it works

Networks, nodes, wallets and gas

Nodes, addresses, wallets, transactions and fees — how you actually interact with a chain.

Beginner ~31 min read Module 4 of 16

You understand the ideas; now meet the machinery you actually touch. To use any blockchain you interact with three things: the network of nodes that maintain the ledger, a wallet that holds your keys and signs transactions, and the fees — gas — you pay to have your transactions included. This lesson demystifies all three, plus the difference between mainnet and the free test networks you'll build on in this track. By the end you could set up a wallet and understand exactly what happens when you send a transaction.

After this module you can
  • Describe what nodes are and the role they play in a network
  • Explain what a wallet is and the difference from custodial accounts
  • Explain gas: why fees exist and what determines their cost
  • Distinguish mainnet from testnets and know why testnets matter for learning

Nodes: the computers that are the network

A blockchain has no central server; it *is* the collection of nodes running its software. A full node keeps a complete copy of the ledger, validates every new block and transaction against the rules, and relays them to its peers. Anyone can run one, and the more independent nodes there are, the harder the network is to control or shut down. When you 'send a transaction,' you actually broadcast it to nodes, which check it and pass it around until a miner or validator includes it in a block. Nodes are what enforce the rules: a transaction with a bad signature or insufficient funds is simply rejected by every honest node, no authority required.

Most people don't run their own node; they connect through a provider (a service that runs nodes and exposes an API) so their wallet or app can read the chain and submit transactions. That's a convenience, not a change to the trust model — you can always verify against the public chain yourself, and running your own node is the fully trustless option.

Wallets: your keys, not an account

A wallet is software (or hardware) that stores your private keys, shows your balances, and signs transactions on your behalf. The crucial mental shift from banking: a self-custody wallet is not an account with a company — no one holds your funds or can freeze them. The wallet just manages the keys; the funds live on the chain, controlled by whoever has the keys. MetaMask is the common browser wallet for Ethereum. When you click 'confirm' in a wallet, it is signing a transaction with your private key locally and broadcasting it — the key itself never leaves your device.

Note

Two custody models to know. Self-custody (a wallet like MetaMask, or a hardware wallet): you hold the keys and bear full responsibility. Custodial (an exchange account): a company holds the keys for you, more convenient but you're trusting them, and they can freeze or lose your funds. 'Not your keys, not your coins' describes exactly this difference.

Gas: paying for computation

Every transaction asks the network's computers to do work — at minimum recording a transfer, at most running a complex smart contract. That work isn't free, and fees stop people from spamming the network with endless computation. On Ethereum the fee is measured in gas: each operation costs a set amount of gas, and a simple transfer uses a fixed 21,000 gas while a contract call uses more depending on what it does. You pay for the gas you use at a gas price you're willing to offer, denominated in tiny fractions of ether called gwei. Your total fee is roughly gas used times gas price.

text
fee  =  gas used  x  gas price

// A plain ETH transfer:
21,000 gas  x  20 gwei  =  420,000 gwei  =  0.00042 ETH

// Higher demand -> higher gas price -> the same transaction costs more.
// A complex contract call uses far more gas than a plain transfer.

Two things follow from this. First, fees rise when the network is busy, because users bid higher gas prices to get included sooner — this is why Ethereum fees spike during popular events, and why scaling (a later lesson) matters. Second, a transaction can run out of gas if you underestimate what it needs; it then fails, and — importantly — you still pay for the work done up to the failure, because the computers did that work. Setting a sensible gas limit is part of sending transactions.

Mainnet vs testnets: practise for free

There are two kinds of network. Mainnet is the real one, where tokens have real value and gas costs real money. Testnets (Ethereum has ones such as Sepolia) are near-identical copies for development, where the coins are worthless play money you get free from a faucet — a site that hands out test ETH. Testnets behave like mainnet in every way that matters for learning: real wallets, real gas mechanics, real contract deployment — but a mistake costs nothing. This is why every project in this track deploys to a testnet. You get the full experience of shipping a contract and interacting with it, without risking a cent.

Tip

Always develop and test on a testnet (or a local chain) first, and only deploy to mainnet when the contract is thoroughly tested. Deployed contract code usually can't be changed, and mistakes on mainnet can be permanent and expensive. Free testnets exist precisely so mistakes are free.

Sending a transaction, end to end

Now the whole first stage connects into one flow. You want to send funds. Your wallet builds the transaction and signs it with your private key (the cryptography lesson). It sets a gas limit and price (this lesson) and broadcasts the signed transaction to nodes, which verify the signature and that you have the funds, then relay it. A miner or validator includes it in a block and the network reaches consensus on that block (the blocks lesson). Once enough confirmations follow, the transfer is settled. Every concept from Stage 1 appears in that single sentence — which is exactly why these foundations come first. Next, Stage 2 turns to Ethereum specifically and the smart contracts that make the ledger programmable.

  • Wallet builds and signs the transaction with your private key.
  • It sets a gas limit and price and broadcasts to nodes.
  • Nodes verify the signature and your balance, then relay it.
  • A validator includes it in a block; the network reaches consensus.
  • After confirmations, the transfer is settled and final.
Hands-on practice

Set up and reason about a wallet

  1. Install a browser wallet (such as MetaMask) and safely record its seed phrase offline, following the cryptography lesson's rules.
  2. Switch the wallet to a testnet (such as Sepolia) and get free test ETH from a faucet.
  3. Send a small test transaction to another address and watch it move from pending to confirmed.
  4. Open the transaction in a block explorer and identify the gas used, the gas price, and the total fee.
  5. Explain in your own words why you'd never do your first experiments on mainnet with real funds.
Cheat sheet

Networks, nodes, wallets and gas — at a glance

Main things to focus on

  • A blockchain is its network of nodes; full nodes validate and relay everything.
  • A self-custody wallet holds your keys and signs transactions — it's not a company-held account.
  • Custodial (exchange) vs self-custody (your wallet): who holds the keys differs.
  • Gas is the fee for computation: fee ≈ gas used × gas price, paid in gwei.
  • Fees rise with network demand; a transaction can fail 'out of gas' and still charge you.
  • Develop on free testnets with faucet coins; deploy to mainnet only when tested.

Nodes

full nodefull ledger copy; validates and relays
the networkthe set of nodes, not a central server
providera service exposing node access via API
rules enforcedhonest nodes reject invalid transactions

Wallets

self-custodyyou hold the keys (e.g. MetaMask)
custodiala company holds keys for you
signs locallythe private key never leaves your device
addresswhere others send you funds

Gas

gasunit measuring computational work
gas price (gwei)what you pay per unit of gas
21,000 gascost of a plain ETH transfer
out of gasruns out, fails, still charges you

Networks

mainnetthe real chain; real value
testneta free copy for development
faucetgives out free test coins
test firstdeploy to mainnet only when tested

Common pitfalls

  • Thinking a self-custody wallet is an account someone can recover or unfreeze for you.
  • Assuming fees are fixed — they rise sharply when the network is busy.
  • Believing a failed 'out of gas' transaction costs nothing; you still pay for the work done.
  • Doing first experiments on mainnet with real funds instead of a free testnet.
  • Trusting a provider blindly instead of remembering you can verify against the public chain.
Quiz

Check your understanding

5 questions · 4 to pass · answers are explained as you go. Your best score is saved on this device only.

Progress and quiz scores are saved in this browser only. Back up or restore on the hub.

Was this lesson useful? Tell me what to improve →