Fintech & Banking
Blockchain Fundamentals: Hashes, Consensus, Finality and Trade-offs
Intermediate9 min readUpdated
A blockchain is a replicated append-only log that strangers can agree on without trusting each other. This guide takes it apart — the cryptographic parts, the block structure, the consensus families and their trade-offs — and finishes with a candid section on the many problems for which a blockchain is the wrong tool.
What you will learn
- Explain the agreement problem a blockchain solves and what it costs to solve it
- Describe hashing, digital signatures and Merkle trees and their role in a block
- Compare proof of work, proof of stake and BFT consensus on their real trade-offs
- Distinguish probabilistic from deterministic finality and understand forks
- Judge honestly when a distributed ledger is and is not the right design
Strip away the price charts and the vocabulary, and a blockchain answers one narrow, genuinely hard question: how can a group of parties who do not trust each other, and who cannot rely on any single authority, agree on the same ordered list of facts? Distributed systems research has studied that problem for decades. What was new in 2008 was a way to solve it in an open network where anyone may join, leave or lie, without knowing in advance who the participants are.
That solution has a real cost, and understanding both the mechanism and the cost is what separates useful engineering judgement from enthusiasm. This guide explains the machinery from the cryptographic primitives upward, compares the consensus families honestly, and ends with the cases where the answer is "use a database". The programmable side — contracts, gas, tokens — continues in Ethereum and smart contracts.
The agreement problem
Imagine a shared ledger with no owner. Anyone can propose entries; some participants are offline, some are malicious, messages arrive out of order or not at all. Two honest participants must nevertheless end up with an identical history — otherwise the same unit of value could be spent twice, once against each version.
Classical protocols solve this among a known set of participants, tolerating a fraction that behave arbitrarily. Their limitation is exactly that word "known": in an open network, an attacker can create unlimited identities and outvote everyone. The insight behind public blockchains is to make participation in the decision costly and measurable — burning electricity, or locking up capital — so that influence is proportional to a scarce resource rather than to the number of names you invent.
Everything else follows from that: the block structure exists to make history cheap to verify, the incentives exist to make honest behaviour more profitable than attack, and the performance characteristics are the price paid for open participation.
The cryptographic building blocks
Three primitives do all the heavy lifting. None is specific to blockchains; the combination is.
Cryptographic hash functions map any input to a fixed-length digest, deterministically and irreversibly, with the property that any change to the input produces a completely different output.
sha256("hello") = 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824
sha256("hellp") = fdd7585e08c4e2afd71dcabdb4636c89d557a3f42db9e2040c8bbd1708aa4ce7
One letter changed; every output bit is unrelated. This is the
avalanche property, and it is what makes a hash a tamper-evident
fingerprint of a document, a block or a whole history.
You can try this for yourself with the browser-based hash generator — paste a paragraph, change a comma, and compare the digests.
Digital signatures provide authenticity without shared secrets. A holder of a private key signs a message; anyone holding the corresponding public key can verify the signature and cannot forge one. On a blockchain, an address is derived from a public key, so "owning" an asset means nothing more than possessing the private key able to authorise its transfer. There is no password reset. Key custody — hardware wallets, multi-signature schemes, threshold signatures, institutional custodians — is therefore the entire security story for end users, and losses are overwhelmingly key losses rather than protocol breaks.
Merkle trees compress a set of transactions into one digest by hashing pairs of hashes upward to a single root.
root = H( H12 || H34 )
/ \
H12 = H(h1 || h2) H34 = H(h3 || h4)
/ \ / \
h1=H(tx1) h2=H(tx2) h3=H(tx3) h4=H(tx4)
h(tx1) = 709b55bd3da0f5a838125bd0ee20c5bfdd7caba173912d4281cae816b79a201b
h(tx2) = 27ca64c092a959c7edc525ed45e845b1de6a7590d173fd2fad9133c8a779a1e3
H12 = bbea820f07f7f89aeea1ab4a354ecea39f2f72accd05c64371522ee371cd0c48
The payoff is the Merkle proof: to prove that tx1 is in a block of a million transactions, you supply h2, H34 and the root — a logarithmic number of hashes rather than the whole block. Light clients, cross-chain bridges and rollup fraud proofs all rest on this.
Blocks, chains and state
A block is a header plus a list of transactions. The header contains the hash of the previous block's header, the Merkle root of the transactions, a timestamp and protocol-specific fields.
{
"number": 21493087,
"parentHash": "0x8f1c...a3d2",
"transactionsRoot": "0xbbea...0c48",
"stateRoot": "0x4d7e...91ab",
"timestamp": 1757232000,
"proposer": "0x2b9f...77c1"
}
Because every header commits to its parent, changing an old transaction changes that block's Merkle root, hence its header hash, hence the parent reference of every later block. Tampering is not prevented — it is made evident and expensive, which is the honest way to describe immutability.
Two accounting models exist. The UTXO model treats value as a set of discrete unspent outputs, each consumed entirely and replaced by new outputs; it parallelises validation nicely and keeps a clean audit graph. The account model keeps a balance per address and mutates it, which is far more natural for programmable contracts. The account model needs an explicit nonce per sender to stop a signed transaction being replayed.
Consensus families compared
Consensus decides who may append the next block and how disagreements resolve.
| Property | Proof of work | Proof of stake | BFT (permissioned) |
|---|---|---|---|
| Who may propose | Anyone with hardware | Anyone with stake bonded | A known, admitted set |
| Scarce resource | Energy and hardware | Capital at risk | Identity and reputation |
| Finality | Probabilistic, grows with depth | Explicit after voting rounds | Immediate on commit |
| Energy cost | Very high by design | Low | Low |
| Participants | Unbounded | Unbounded | Tens, occasionally hundreds |
| Main failure mode | Majority hashpower attack | Stake concentration | Collusion of the known set |
Proof of work has proposers search for a header whose hash falls below a target. The search is pure brute force, the difficulty adjusts so blocks arrive at a steady rate, and rewriting history requires out-computing the rest of the network. Its security is easy to reason about and its energy use is not an implementation detail but the mechanism itself.
Proof of stake replaces hardware with bonded capital. Validators lock funds, are selected to propose and attest, and lose part of their stake — slashing — for provable misbehaviour such as signing two conflicting blocks. Ethereum completed this transition, cutting its energy consumption by orders of magnitude while keeping open participation. The trade-off shifts from "energy is expensive" to "capital concentrates", and much of the design effort goes into discouraging that concentration.
Byzantine fault tolerant protocols in the classical family assume a known membership and reach agreement through explicit voting rounds, tolerating up to roughly a third faulty participants. They give immediate finality and high throughput and are the natural fit for permissioned networks, but the membership set must be governed, which is a political problem rather than a technical one.
Public, private and permissioned
A public permissionless network lets anyone read, transact and validate. Its cost model is a fee market and its trust assumption is "no majority coalition of the scarce resource".
A permissioned network admits known organisations, often with channels or privacy groups so participants only see the transactions concerning them. Enterprise consortium platforms sit here: identity is issued by a membership service, consensus is BFT or crash-fault-tolerant, throughput is far higher and confidentiality is achievable.
Between the two, the honest question is always the same: who is the adversary? If the members of a consortium would not defraud each other and a neutral operator is acceptable, a replicated database with strong access control and cryptographic audit logs delivers most of the benefit with a fraction of the complexity. Many consortium projects have quietly reached that conclusion.
Forks, finality and the reorganisation problem
When two valid blocks appear at the same height, the network temporarily forks and then converges by following the chain the protocol prefers. Blocks left behind are orphaned and their transactions return to the pool. This is a reorganisation, and it is an ordinary, expected event — which is why applications wait for confirmations before treating a payment as done. Under proof of stake with explicit finality, waiting for the finalised checkpoint is the stronger guarantee.
Deliberate protocol changes fork too. A soft fork tightens the rules so old nodes still accept new blocks; a hard fork loosens or changes them, so all nodes must upgrade or the network splits permanently. Both are governance events as much as engineering ones.
The practical rule for anyone integrating: never treat an on-chain event as final on first sight. Subscribe to confirmations or finality signals, make your handlers idempotent, and be prepared to reverse an application-level effect if a reorganisation removes the transaction — the same discipline as any distributed transaction with compensations.
Scalability, cost and layer 2
The scalability trilemma frames the constraint: decentralisation, security and scalability, pick two comfortably. Raising throughput by enlarging blocks pushes up the cost of running a node, which reduces the number of independent validators, which reduces decentralisation.
The dominant answer is layer 2: execute transactions off the main chain and use it only for settlement and data availability. Optimistic rollups post batched results and allow a challenge window in which a fraud proof can overturn them. Zero-knowledge rollups post a succinct validity proof, so correctness is verified mathematically and withdrawals need no challenge period. Payment channels let two parties transact privately off-chain and settle only the final balance. All of them inherit the base layer's security while moving execution elsewhere, and all of them add bridge risk, which has historically been where the largest losses occurred.
Costs are worth stating plainly: base-layer transactions are metered and priced by demand, storage is by far the most expensive resource, and confirmation latency ranges from seconds to minutes. Compare that with the instant payment schemes in payment systems fundamentals, which move retail value in under ten seconds at near-zero marginal cost, and it is clear that a blockchain is not competing on throughput or price — it competes only where the absence of a trusted operator is the requirement.
When a blockchain is the wrong answer
Being useful about this technology means being willing to say no. A shared ledger is the wrong tool when:
- One organisation controls the data. You have reinvented a database with worse latency and no
DELETE. - The participants already trust an intermediary. The intermediary is cheaper.
- You need confidentiality. Everything on a public chain is visible forever; privacy requires substantial extra machinery.
- You must delete or correct records. Erasure rights and append-only logs are fundamentally in tension.
- The data originates off-chain. No consensus mechanism can verify that a shipment really arrived; that is the oracle problem, and it moves the trust to whoever reports it.
- You need thousands of transactions per second at low latency. Base layers are not built for that.
The complementary list is short but real: settlement between institutions with no natural common operator, provenance and integrity attestations where the underlying data stays off-chain, and open programmable financial infrastructure where permissionless access is the point. Judge a proposal by whether removing the chain removes something essential — if the honest answer is that a signed audit log would do, build the signed audit log.
Key takeaways
- A blockchain solves agreement among mutually distrusting, unknown participants; that narrow guarantee is what you pay for in cost, latency and privacy.
- Hash chaining plus Merkle trees make tampering evident and proofs of inclusion cheap; digital signatures make key custody the whole security model for users.
- Proof of work buys security with energy, proof of stake with capital at risk, and BFT protocols with a known membership and immediate finality.
- Finality is probabilistic on some chains and explicit on others — always wait for confirmations and design handlers that survive a reorganisation.
- The trilemma pushes throughput off the base layer into rollups and channels, which inherit its security but add bridge risk.
- If a single organisation owns the data, deletion is required, confidentiality matters, or a trusted operator already exists, choose a database and say so.
Sources and further reading
Frequently asked questions
- Is data on a blockchain impossible to change?
- It is expensive to change, not impossible. Rewriting a past block means redoing the work or stake commitments for it and every block after it, faster than the rest of the network extends the current chain. On a large public network that is economically infeasible, which is a much better description than immutable — and on a small or private network it may not be infeasible at all.
- What is the difference between probabilistic and deterministic finality?
- Under proof of work a block is only ever very unlikely to be reversed, and that unlikelihood grows with each block added on top, so applications wait for confirmations. BFT-style and modern proof-of-stake protocols provide explicit finality: once a supermajority has voted, reversing the block would require destroying a large amount of staked value, so it is treated as final.
- Should personal data ever be stored on a blockchain?
- No. An append-only replicated log conflicts directly with data-protection rights such as erasure and rectification, and anything published is visible to every participant forever. The standard pattern is to keep the data off-chain under normal access controls and put only a hash on-chain, so integrity can be proved without disclosure.
- Do I need a blockchain for my project?
- Almost certainly not if a single organisation controls the data, if participants already trust an intermediary, or if you need high throughput, low latency, confidentiality or the ability to delete records. A blockchain earns its cost only when several mutually distrusting parties must share state and no acceptable neutral operator exists.