A complete visual walkthrough of how a Bitcoin transaction travels through the network — from signing to final confirmation.
Every miner independently assembles their own candidate block. They decide which transactions to include from their local mempool, the order of those transactions, and point the block reward to their own wallet. But they operate within strict boundaries they cannot cross.
Even if a miner includes whatever transactions they want, every full node on the network still independently validates that block against consensus rules. One invalid transaction = the entire block is rejected. The miner burns energy and earns nothing.
Every block header contains the SHA-256 hash of the previous block. Change any transaction in an old block and its hash changes — which breaks the next block's header, and every block after it. An attacker would need to re-mine every subsequent block faster than the entire rest of the network combined.
At 600 exahashes per second, this is computationally infeasible. This chain of hashes is why Bitcoin's history is effectively permanent after a few confirmations.
Bitcoin doesn't track account balances. Instead it tracks Unspent Transaction Outputs (UTXOs) — individual "coins" locked to addresses. When you spend bitcoin, your wallet selects UTXOs as inputs, creates new outputs for the recipient and yourself (change), and the old UTXOs are destroyed. Your "balance" is just the sum of all UTXOs locked to your keys.