21Relay
Back to Learn

Lesson 3 · Node Operation

How Bitcoin nodes work

Bitcoin nodes connect to peers, receive network data and independently verify every transaction and block before accepting it.

Intermediate beginner10–12 minute readTransaction and block verification

How a node operates

Receive, verify, store and relay

A Bitcoin node constantly exchanges information with other nodes. It receives transactions, blocks and network messages, then checks whether they follow Bitcoin’s rules.

The node does not trust the sender. Every piece of information must pass verification before it is accepted into the node’s local view of Bitcoin.

Valid information may be stored and shared with peers. Invalid information is rejected.

Peer-to-peer

Bitcoin nodes communicate directly with one another rather than through a central server.

Independent verification

Each node checks information for itself instead of trusting another participant.

Rule enforcement

Invalid transactions and blocks are rejected automatically by the node.

Data relay

Valid transactions and blocks are shared with connected peers.

Node workflow

From transaction broadcast to verified block

A node performs a repeated cycle of receiving, checking and sharing data.

01

Connect to peers

Your node connects to other Bitcoin nodes across the peer-to-peer network.

02

Receive transactions

Peers send your node transactions that have been broadcast to the network.

03

Verify each transaction

Your node checks signatures, inputs, outputs and whether the transaction follows Bitcoin's rules.

04

Store valid transactions

Valid unconfirmed transactions may be held temporarily in your node's mempool.

05

Receive a new block

When a miner finds a block, it is broadcast through the network to connected nodes.

06

Verify the block

Your node checks proof of work, transaction validity, block structure and consensus rules.

Transaction verification

Every transaction must pass the rules

When a transaction arrives, your node checks that it spends real, available bitcoin and that the owner has provided a valid signature.

A transaction that fails these checks is rejected and is not added to the node’s mempool.

Verification checks

The transaction format is valid

The digital signatures are valid

The inputs exist and have not already been spent

The output values do not exceed the input values

The transaction does not create bitcoin from nothing

The transaction follows current consensus rules

Invalid transactions are rejected

A node does not accept a transaction simply because it came from a wallet, exchange, miner or another node.

The mempool

Where valid transactions wait

The mempool is the node’s temporary collection of valid transactions that have not yet been confirmed in a block.

Temporary storage

The mempool stores valid transactions that have not yet been included in a block.

Local to each node

There is no single global mempool. Each node may hold a slightly different set of transactions.

Fee competition

Transactions offering higher fees are often more attractive to miners during busy periods.

Not permanent

Transactions can leave the mempool after confirmation, expiry, replacement or removal.

There is no single global mempool

Each node maintains its own local mempool. Two nodes may temporarily see different transactions because of network timing or local policy settings.

1Block received
2Proof of work checked
3Transactions verified
4Consensus rules checked
5Block accepted or rejected

Block verification

A miner’s block is only a proposal

When a miner broadcasts a block, your node checks the entire block before adding it to its verified blockchain.

The block references the correct previous block

The proof of work meets the required difficulty

The block size and weight are within the rules

Every transaction inside the block is valid

The block reward does not exceed the permitted amount

The block timestamp and structure are acceptable

Initial blockchain sync

Verifying Bitcoin from the beginning

The first time Bitcoin Core runs, it downloads and verifies Bitcoin’s blockchain history. This process is called the initial block download.

1

Download block headers

Your node first learns the structure and order of the blockchain.

2

Download historical blocks

Blocks are downloaded from peers across the Bitcoin network.

3

Verify from the beginning

Your node checks the blockchain from Bitcoin's earliest block onward.

4

Build local databases

Bitcoin Core builds the indexes and transaction records needed for operation.

5

Reach the chain tip

Once caught up, the node only needs to verify new transactions and blocks.

Archival mode

Keeps historical block files on disk after verification.

Pruned mode

Fully verifies history but deletes older block files to save storage.

Peer communication

How nodes share information

Bitcoin uses a peer-to-peer network. Your node connects directly to other nodes and exchanges transactions, blocks and network information.

Your node

Connected peers

Wider network

Your node does not need to trust its peers

Peers provide information, but your node verifies that information independently. A dishonest peer cannot make your node accept an invalid transaction or block.

Chain selection

How a node chooses the valid chain

A node follows the valid chain with the most accumulated proof of work. It does not simply choose the chain with the greatest number of blocks.

Every block in that chain must still satisfy Bitcoin’s consensus rules.

Common questions

How nodes behave in practice

Does my node trust miners?

No. Miners propose blocks, but your node independently verifies every block before accepting it.

Does my node need to know who sent a transaction?

No. Bitcoin verification depends on cryptographic signatures and transaction rules, not personal identity.

Can two nodes have different mempools?

Yes. Transactions propagate over time, and nodes can use different local policies.

What happens when my node goes offline?

When restarted, it reconnects to peers, downloads the blocks it missed and verifies them.

Can a bad peer corrupt my node?

A peer can send invalid data, but your node checks that data and rejects anything that breaks Bitcoin's rules.

Lesson summary

The important points

Nodes connect directly to other nodes across Bitcoin's peer-to-peer network.

Every transaction is checked before entering the node's mempool.

Every block is independently verified before being added to the blockchain.

Miners propose blocks, but nodes enforce the rules.

Initial sync verifies Bitcoin's history from the beginning.

Pruned nodes still perform full verification.

A node follows the valid chain with the most accumulated proof of work.