Bitcoin Nodes and Network

Section VI: Bitcoin Framework

Army Cyber Institute

April 9, 2026

Bitcoin’s Peer-to-Peer Network

  • Architecture: a fully decentralized network where nodes connect directly to one another—no central servers or coordinators.
  • Connectivity: each node discovers peers dynamically and maintains multiple simultaneous connections for redundancy and robustness.
  • Roles within the network:
    • Full nodes: validate blocks and transactions, and relay data to peers.
    • Miners: perform Proof-of-Work and extend the blockchain with new blocks.
    • SPV (light) clients: verify transactions using block headers and Merkle proofs without storing full data.
  • Goal: achieve global resilience, censorship resistance, and permissionless participation through replication and independent validation.

Elements of the Bitcoin Network

  • Scale: typically ~10,000 publicly reachable nodes worldwide (exact count fluctuates over time).
  • Connectivity: each node maintains multiple outbound and inbound peer connections to ensure redundancy and fast data propagation.
  • Core network functions:
    • Transaction relay: broadcasting and verifying unconfirmed transactions.
    • Block propagation: distributing newly mined blocks across the network.
    • Peer discovery: finding and maintaining new connections dynamically.
  • Incentive and resilience: the network’s health depends on broad, independent participation—more nodes mean greater redundancy, decentralization, and censorship resistance.

What Is a Bitcoin Node?

  • Definition: a node is any computer running Bitcoin software that participates directly in the peer-to-peer network.
  • Its Core functions include:
    • Validation: checks the correctness of transactions and blocks against consensus rules.
    • Relay: shares verified information with connected peers to keep the network synchronized.
    • Storage: maintains a local copy (full or partial) of the blockchain ledger.

BitcoinNodes N1 Node A N2 Node B N1->N2 N3 Node C N2->N3 N4 Node D N2->N4 N3->N4 N5 Node E N3->N5 N4->N5 U User Wallet N4->U confirmed block N5->N1 U->N1 broadcast tx

Why it matters: nodes are the distributed record—without them, there is no independent verification or decentralized consensus.

Types of Nodes

  • Full nodes:
    • Store the entire blockchain history.
    • Independently validate every transaction and consensus rule.
    • Form the backbone of network integrity and decentralization.
  • Light clients (SPV):
    • Download only block headers instead of full blocks.
    • Verify transactions using Merkle proofs provided by full nodes.
    • Trade some independence for lower bandwidth and storage needs.
  • Core trade-off: full validation offers maximum trustlessness, while lightweight clients prioritize accessibility and efficiency.

NodeTypes FN1 Full Node 1 FN2 Full Node 2 FN1->FN2 FN3 Full Node 3 FN2->FN3 FN3->FN1 SPV1 Light Client A (SPV) SPV1->FN1 headers & proofs SPV2 Light Client B (SPV) SPV2->FN3 headers & proofs

Why Run a Node?

  • Security: Verify transactions without trusting others.
  • Privacy: Directly query blockchain data.
  • Decentralization: More nodes, stronger network.
  • Control: Enforce Bitcoin’s consensus rules locally, so your node only accepts blocks and transactions that match the version of Bitcoin you choose to run.

Setting Up a Full Node

  • Install: download and run Bitcoin Core, the open-source reference implementation.
  • Requirements:
    • Disk space: 600+ GB (growing).
    • Stable internet connection.
    • Regular updates to keep consensus rules current.
  • Initial block download can take days.

Setting Up a Light Client

  • Deployment: typically built into mobile or desktop wallets for quick setup and low resource use.
  • Simplified Payment Verification (SPV):
    • Downloads only block headers, not full blocks.
    • Requests Merkle proofs from connected full nodes to verify specific transactions.
  • Trade-off: lightweight and fast to sync, but shifts trust toward the full nodes it connects to and assumes they are honest and well-connected.

Joining the Bitcoin Network

  • Peer-to-peer architecture: nodes connect directly without central coordination.
  • Outbound connections: by default, a node initiates ~8 outbound TCP connections to maintain healthy network gossip and redundancy.
  • Peer discovery:
    • Uses DNS seeds (publicly maintained domain names) that return IPs of reachable nodes.
    • May also use hardcoded “fallback” peers or address gossip from other nodes once connected.

PeerDiscovery N New Node (Joining) DNS1 DNS Seed A (seed.bitcoin.sipa.be) N->DNS1 DNS query DNS2 DNS Seed B (seed.bitcoinstats.com) N->DNS2 DNS query P1 Peer 1 N->P1 connect P2 Peer 2 N->P2 connect P3 Peer 3 N->P3 connect P4 Peer 4 N->P4 connect P5 Peer 5 N->P5 connect DNS1->P1 returns IPs DNS1->P2 DNS2->P3 DNS2->P4 HC Hardcoded Fallback Peers HC->P5 fallback P1->N addr relay P2->N block/tx relay P3->N addr relay P4->N ping/pong

Goal: ensure that every honest node can find and maintain diverse peers for transaction relay, block propagation, and consensus updates.

Node Operator Responsibilities

  • Maintain consensus: keep node software updated and aligned with the latest consensus rules.
  • Policy decisions:
    • Choose which implementation or version of Bitcoin to run—especially relevant during forks or upgrades.
    • Configure peer connections, including optional blocklists, whitelists, and connection limits.
  • Economic influence: nodes operated by exchanges, merchants, custodians, and mining pools carry greater weight in practice, since their policy choices affect which rules and transactions the wider ecosystem recognizes.
  • Stewardship role: running a node is both a technical and civic act—operators collectively define the active consensus of the network.

Decisions Nodes Make

  • Consensus rules: choose which version of the protocol to enforce—determining which blocks and transactions are considered valid.
  • Relay policy: set minimum transaction fees, rate limits, or filters that shape what data the node will forward to peers.
  • Network management: select and manage peers, blocking spammy or malicious nodes while prioritizing reliable connections.
  • Principle: each node is a sovereign participant—it independently enforces the rules it accepts, forming consensus through voluntary coordination, not central command.

NodeDecisions NODE1 Individual Node (Operator Policy) CONS Consensus Rules (Which blocks are valid) NODE1->CONS RELAY Relay Policy (Mempool & fee filters) NODE1->RELAY PEERS Peer Selection (Connections & reputation) NODE1->PEERS NETWORK Network Consensus Emerges from many nodes CONS->NETWORK RELAY->NETWORK PEERS->NETWORK

Gossip and Peer Connections

  • After bootstrap: each node learns about new peers through a gossip protocol—nodes share information about other reachable nodes.
  • Address exchange: addr and addrv2 messages advertise known peers, allowing the network to expand organically without a central directory.
  • Connectivity pattern: each node maintains roughly 8 outbound and a variable number of inbound connections, forming a constantly shifting mesh topology.
  • Dynamic behavior: peers are periodically dropped, replaced, or added—promoting redundancy, fault tolerance, and resistance to partitioning or isolation attacks.

GossipMesh A Node A B Node B A->B addr C Node C A->C B->A addr list B->C D Node D B->D addrv2 C->A C->B C->D D->B D->C

Communication Protocol Basics

  • Transport layer: nodes communicate over long-lived TCP connections, exchanging structured messages in both directions.
  • Message types: the Bitcoin protocol defines around 30 core message commands—examples include version, verack, inv, getdata, tx, and block.
  • Message format:
    • Header: contains the command name, payload length, and checksum for integrity verification.
    • Payload: carries the message-specific data (e.g., transaction contents or block headers).
  • Design goal: minimize overhead while ensuring reliable propagation of transactions, blocks, and peer information across a global network.

MessageFormat MSG Message Header Payload HDR Header Command Payload Length Checksum MSG:hdr->HDR PL Payload Structure Depends on Msg Type MSG:pl->PL NOTE Example message types: • version / verack • inv / getdata • tx / block PL->NOTE

Transaction Relay

  • Announcement: when a node receives a new transaction, it advertises it to peers using an inv (inventory) message.
  • Request: peers that don’t already have the transaction respond with a getdata message requesting the full data.
  • Transmission: the originating node then sends the complete transaction using a tx message.
  • Goal: efficient, bandwidth-aware propagation—nodes announce first, then only transmit when requested.

TxRelay A Node A B Node B A->B inv(TX) Advertise new transaction A->B tx(TX) Send full transaction B->A getdata(TX) Request details

Block Propagation

  • Process: block relay follows the same announce–request–transmit pattern as transactions: invgetdatablock.
  • Efficiency improvement: the compact block relay protocol minimizes bandwidth use by sending:
    • Short transaction IDs for transactions peers likely already have.
    • Only full transactions if the peer’s mempool is missing them.
  • Goal: achieve rapid, global block propagation to keep miners in sync and reduce the risk of competing forks.

BlockPropagation A Miner A (Finds New Block) B Peer Node B A->B 1. inv(Block) A->B 3. cmpctblock (short TX IDs) A->B 5. blocktxn (send missing TXs) B->A 2. getdata(Block) B->A 4. getblocktxn (request missing TXs) C Peer Node C B->C 6. inv(Block)

Fault Tolerance

  • Redundant connectivity: each node maintains multiple inbound and outbound links, so losing a few peers does not disconnect it from the network.
  • Gossip resilience: Bitcoin’s peer-to-peer gossip protocol ensures that transactions and blocks eventually reach the entire network, even when some links fail.
  • Potential threats:
    • Eclipse attacks: an adversary surrounds and isolates a node, controlling all its connections.
    • Partitioning attacks: attempt to split the network into disconnected regions to delay consensus or block propagation.
  • Mitigation: peer and route diversity, rotating connections, and independent discovery methods make large-scale isolation difficult and improve overall network robustness.

Network Growth and Concerns

  • Dynamic participation: the number of reachable nodes fluctuates over time as hardware costs, energy prices, and incentives influence who runs infrastructure.
  • Resource demands: as the blockchain grows, running a full node requires increasing storage, bandwidth, and processing power—raising the barrier to entry.
  • Centralization pressures:
    • Mining concentration: large mining pools dominate block production due to economies of scale.
    • Node consolidation: fewer independently operated full nodes reduce network diversity and resilience.
  • Design tension: achieving scalability often increases efficiency at the expense of decentralization—balancing the two is an ongoing challenge.

Introduction to Bitcoin Script

  • Purpose: Bitcoin transactions use a stack-based scripting language to specify the exact conditions required to spend each output (UTXO).
  • Functionality: scripts are executed and validated by nodes—if the conditions evaluate to “true,” the spend is accepted.
  • Design: intentionally not Turing-complete to avoid loops, reduce complexity, and prioritize safety and determinism.
  • Heritage: part of Bitcoin’s design since the Genesis Block—enabling programmable spending rules long before smart contracts became a broader concept.

BitcoinScript L Locking Script (scriptPubKey) Conditions for Spending E Combined Script Execution (stack evaluated → TRUE = valid spend) L->E validation logic U Unlocking Script (scriptSig) Provides Data/Signature U->E pushed to stack

Why Bitcoin Script Exists

  • Original vision: allow transactions to include flexible spending conditions such as multi-signature authorization, time locks, and other constraints.
  • Purpose: make money programmable without requiring a central authority—rules are enforced by consensus, not trust.
  • Role in the system: serves as the foundation for advanced transaction types and later contract layers (e.g., Lightning, sidechains).
  • Example: a time-locked output prevents spending until a specified block height or timestamp is reached.
  • Enforcement: full nodes validate these conditions automatically when a spend is attempted, ensuring deterministic and decentralized rule execution.

ScriptPurpose TXO Unspent Output (UTXO) + Locking Script (Conditions) NODE5 Full Node Validation Executes Script Stack TXO->NODE5 rules + conditions ATTEMPT Spend Attempt (Unlocking Script) ATTEMPT->NODE5 provided data/signature RESULT Valid Spend (if Script evaluates TRUE) NODE5->RESULT TRUE FAIL Rejected (if Script evaluates FALSE) NODE5->FAIL FALSE

Bitcoin Script Basics

  • Two components of a Bitcoin transaction input/output pair:
    • scriptPubKey (locking script): defines the spending conditions for a UTXO—what must be provided to unlock it.
    • scriptSig (unlocking script): provides the data (e.g., signature, public key) needed to satisfy those conditions.
  • Example: Pay-to-PubKey-Hash (P2PKH) — the most common script type.
    • The locking script requires a signature matching a specific public key hash.
    • The unlocking script supplies that signature and corresponding public key.
  • Execution model: nodes concatenate both scripts and evaluate them on a stack; if the result is TRUE, the spend is valid.

ScriptBasics LOCK Locking Script (scriptPubKey: PubKeyHash) STACK Execution Stack (Evaluate Combined Script) LOCK->STACK defines conditions UNLOCK Unlocking Script (scriptSig: Signature + PubKey) UNLOCK->STACK provides data VERIFY Result: TRUE = Valid Spend FALSE = Invalid STACK->VERIFY check conditions

Script Primitives

  • Cryptographic operations:
    • OP_CHECKSIG — verifies a single digital signature.
    • OP_CHECKMULTISIG — validates multiple signatures against a set of public keys.
  • Hashing operations:
    • OP_HASH160 — applies SHA-256 followed by RIPEMD-160 (used in P2PKH).
    • OP_SHA256 — computes a standard SHA-256 hash.
  • Time-based constraints:
    • OP_CHECKLOCKTIMEVERIFY — prevents spending until a specified block height or timestamp.
    • OP_CHECKSEQUENCEVERIFY — enforces relative time locks between transactions.
  • Control flow:
    • OP_IF, OP_ELSE, OP_ENDIF — conditional logic to enable script branches.
  • Data operations:
    • Push, duplicate (OP_DUP), and compare values on the stack.

Example: Pay-to-PubKey-Hash (P2PKH)

  • Overview: the most common and foundational Bitcoin script type—used in standard single-signature payments.

  • Locking script (scriptPubKey):

    OP_DUP OP_HASH160 <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIG
  • Unlocking script (scriptSig):

    <signature> <pubKey>
  • Meaning:

    • The spender must provide a public key whose hash matches <pubKeyHash>.
    • The provided signature must correctly verify against that public key.
  • Execution flow:

    1. The unlocking data is pushed to the stack.
    2. The locking script runs its operations on the same stack.
    3. If the final result evaluates to TRUE, the spend is valid.

Summary

  • Nodes: full nodes independently validate and store the entire blockchain; light clients rely on simplified proofs and full nodes for verification.
  • Network: a decentralized peer-to-peer system using gossip-based communication and redundant connections for resilience and fault tolerance.
  • Bitcoin Script: a stack-based, purpose-built scripting language that enables conditional spending without the risks of general-purpose computation.
  • Design constraints: no loops or unbounded logic—prioritizing determinism, auditability, and security over flexibility.
  • Big picture: Bitcoin’s architecture reflects a deliberate trade-off: security and simplicity take precedence over expressiveness and speed.

References

[1]
S. Nakamoto, “Bitcoin: A Peer-to-Peer Electronic Cash System.” Satoshi Nakamoto Institute, Oct. 31, 2008. Accessed: Sep. 12, 2025. [Online]. Available: https://cdn.nakamotoinstitute.org/docs/bitcoin.pdf
[2]
Bitcoin.org Developers, P2P Network (Developer Guide).” 2024. Available: https://developer.bitcoin.org/devguide/p2p_network.html
[3]
The Bitnodes Project, “Reachable Bitcoin Nodes - Bitnodes.” Accessed: Oct. 27, 2025. [Online]. Available: https://bitnodes.io/
[4]
A. M. Antonopoulos, Mastering Bitcoin: Programming the open blockchain, Second edition. Sebastopol, CA: O’Reilly, 2017.
[5]
J. Risson and T. Moors, “Survey of Research towards Robust Peer-to-Peer Networks,” University of New South Wales, Sydney, Australia, Technical UNSW-EE-P2P-1-1, Sep. 2004. Available: https://www.cs.umd.edu/projects/p2prg/p2p-overview.pdf
[6]
Bitcoin.org Developers, “Operating Modes (Developer Guide).” 2024. Available: https://developer.bitcoin.org/devguide/operating_modes.html
[7]
Bitcoin.org Developers, “Block Chain (Developer Guide).” 2024. Available: https://developer.bitcoin.org/devguide/block_chain.html
[8]
C. Decker and R. Wattenhofer, “Information propagation in the Bitcoin network,” in IEEE P2P 2013 Proceedings, 2013, pp. 1–10. doi: 10.1109/P2P.2013.6688704.
[9]
A. Narayanan, J. Bonneau, E. Felten, A. Miller, and S. Goldfeder, Bitcoin and Cryptocurrency Technologies. Princeton University Press, 2016.
[10]
Bitcoin.org Developers, “Transactions (Developer Guide).” 2024. Available: https://developer.bitcoin.org/devguide/transactions.html
[11]
M. Corallo, BIP 152: Compact Block Relay.” Accessed: Oct. 27, 2025. [Online]. Available: https://github.com/bitcoin/bips/blob/master/bip-0152.mediawiki
[12]
M. Apostolaki, A. Zohar, and L. Vanbever, “Hijacking Bitcoin: Routing Attacks on Cryptocurrencies,” in 2017 IEEE Symposium on Security and Privacy (SP), May 2017, pp. 375–392. doi: 10.1109/SP.2017.29.
[13]
Bitcoin.org Developers, “Contracts (Bitcoin Developer Guide).” 2024. Available: https://developer.bitcoin.org/devguide/contracts.html
[14]
P. Todd, BIP 65: OP_CHECKLOCKTIMEVERIFY.” Accessed: Oct. 27, 2025. [Online]. Available: https://github.com/bitcoin/bips/blob/master/bip-0065.mediawiki
[15]
BtcDrak, M. Friedenbach, and E. Lombrozo, BIP 112: CHECKSEQUENCEVERIFY.” Accessed: Oct. 27, 2025. [Online]. Available: https://github.com/bitcoin/bips/blob/master/bip-0112.mediawiki