How does blockchain work?

Schematic illustration of transaction processing, validation and linked blockchain records

A blockchain lets participants keep and check a shared transaction history without simply taking one operator’s copy on trust. Transactions follow agreed rules, blocks link back to earlier blocks, and the network has a way to decide which history to accept. That is the useful starting point for understanding blockchain. The blocks organise the records. Cryptography, validation and consensus determine what those records mean and whether they should be accepted. [1] [3]

A payment and a factory’s test report contain very different information, but both raise practical questions: Who submitted this? Were they authorised? What is supposed to change? The answers depend on the platform. Keep Bitcoin and blockchain separate: Bitcoin is one network, not the blueprint every other blockchain must copy. The explanation below follows the basic workflow, then shows where Bitcoin, Ethereum and a permissioned system such as Fabric differ. [2] [10]

About the illustration: The mechanical layout represents signing, checking and linking records. It is a visual analogy, not a physical blockchain machine. Real nodes do not update simultaneously, and consensus is not always a headcount of connected computers.

1. What actually links one block to the next?

A block brings together transactions and the protocol information needed to process them. Apart from the first block, blocks carry a cryptographic reference to an earlier block. In Bitcoin, the block header contains the previous block header’s hash and a Merkle root calculated from transaction identifiers. These commitments connect the transaction records to their place in the chain. A block hash, a transaction identifier and the hash of a report are different things. [3]

A hash is a fixed-length digest calculated from data. It is not an encrypted copy of that data. Feed exactly the same bytes into the same algorithm and you get the same result. Here is a small, reproducible example of checking record integrity: the two strings differ only in their temperature field. Their SHA-256 values were calculated from UTF-8 text with no trailing newline. These are demonstration values, not process settings.

BATCH=042;TEMP_C=180
SHA-256: 8ee5bb74f1d0c4bc43c6cfc91c0b008464c027665519e4bf42775c0283bb909d

BATCH=042;TEMP_C=181
SHA-256: ce5cabbb9d9a2857435ffb82b69d962282d3d4b2502ff02499eec1d5bf117000

The two digests are different, but neither digest tells you why the value changed or which reading is correct. Changing a report’s formatting can also change its hash. For this example to work as a document check, the parties need to agree on the exact file and revision being compared. And they still need to keep that file: a digest cannot reconstruct a report that has been lost. [8]

A Merkle proof can establish that a transaction is included in a particular block without downloading the block’s entire transaction list. That is useful when considering blockchain scalability and data-transfer requirements. But an inclusion proof answers a limited question. It does not replace independent validation of the whole chain and its transaction rules. [3] [4]

2. Someone prepares and signs a transaction

The user or an authorised application first describes the requested change in the network’s transaction format. A typical Bitcoin payment spends earlier unspent transaction outputs (UTXOs) and creates new ones. An Ethereum transaction can transfer value or call contract code. When you use a blockchain application, the interface handles much of this preparation behind the “send” or “submit” button. [2]

A digital signature allows the relevant signing authority and signed data to be checked. The private key is not sent to the network. There is an important limit here: a valid signature does not prove that a physical delivery happened or that an instrument measured correctly. Signing a test report helps establish how it was authorised. It does not perform the test or replace the engineer’s assessment. [2] [9]

3. Submission starts propagation—not final settlement

A transaction reaches a node, which performs the relevant checks and may relay it to peers. In Bitcoin, a node’s collection of pending transactions is called its mempool. There is no single shared waiting room in the centre of the network. Different nodes can receive transactions at different times and apply different local acceptance or retention policies. Submitted, accepted into a mempool and included in a block are separate statuses. [4]

Propagation also takes time. An offline node can catch up when it reconnects; it does not have to receive every update at the moment it is produced. Nor does a full node necessarily retain every historical block file forever. A pruned Bitcoin full node can delete some previously validated block files to reduce storage use. Validating history and keeping every old file are different responsibilities. [4]

4. Validation asks whether a transaction is allowed

Is the signature valid? Is the referenced output still spendable? Does the request conflict with the current state? Those are validation questions. Consensus concerns establishing the accepted history and transaction order. If two payments try to spend the same output, they cannot both succeed. Understanding blockchain security means keeping these jobs separate: a transaction may look acceptable on its own but still compete with another transaction for the same resource. [2] [3]

“Most computers agreed, so it must be valid” is not a general blockchain rule. Bitcoin full nodes reject blocks that violate the rules they enforce. A permissioned application may instead require endorsements from specified organisations. Membership, validation rules, consensus and administration need to be considered separately rather than bundled into the word “decentralised”. [4] [10]

5. Where do proof of work and proof of stake fit?

With Bitcoin’s proof of work (PoW), miners assemble candidate blocks and search for a block-header hash that meets the required target. They are not encrypting the transactions. Other nodes still check the resulting block. Among competing valid histories, Bitcoin follows the chain with the greatest accumulated proof of work. This computation is why any comparison of blockchain energy use needs to name the actual network; not every blockchain uses mining. [3] [5] [10]

In Ethereum’s proof-of-stake (PoS) system, validators stake ETH under the protocol’s rules and take on block-proposal and attestation duties. Simply holding ETH in a wallet does not make someone a validator. Chain selection and finality use stake-weighted rules, not an unweighted count of online computers. Other PoS systems may assign duties and impose penalties differently; Ethereum’s design should not be presented as a universal template. [6]

6. Included, confirmed and finalised are not interchangeable

A transaction appearing in a block is not the same milestone on every network. In Bitcoin, confirmations accumulate as more blocks build on top, and competing chain tips can lead to reorganisations. Ethereum distinguishes inclusion from protocol finality. This is why questions about reversing blockchain transactions need a network-specific answer rather than a blanket promise that nothing can ever change. [3] [6] [7]

Bitcoin’s target average block interval of about 10 minutes is not a ten-minute delivery guarantee for a particular payment. Block discovery varies; transaction demand, fees and the recipient’s confirmation requirements also matter. On Ethereum, an included transaction can fail during execution. An application therefore needs to check the execution result and the required confirmation status—not just whether it received a transaction identifier. [2] [7]

7. What stops somebody rewriting the old blocks?

Hash links make changes detectable; acceptance rules make a replacement history difficult to get accepted. Editing a local copy and calculating fresh hashes does not oblige other participants to use it. That is different from promising that history can never change under any circumstances. NIST describes blockchains in terms of tamper evidence and tamper resistance under normal operation. Those qualifications matter when separating the engineering from common claims about absolute immutability. [1] [3]

Corrections need not mean deleting history. An application can record a new event saying “report 1 superseded; report 2 now applies”. Hyperledger Fabric makes the distinction explicit: the chain holds transaction history, while the world state holds current application values. Updating the current status of a record is not the same operation as rewriting its historical blocks. [10]

8. A verifiable record does not have to be a public record

Bitcoin’s on-chain transaction history is public. An address may not display a person’s name, but activity can be linked to an identity using other information. That is not guaranteed anonymity. Hashing also does not automatically hide transaction contents. Integrity and confidentiality solve different problems. [8]

A permissioned system can define access differently. Fabric private data collections, for example, let authorised organisations hold the actual data while a hash is recorded on the relevant channel’s ledger. Designing industrial data privacy means deciding what each participant stores and what it may disclose. Being able to verify a document does not require handing its complete contents to every participant. [8]

9. Smart contracts apply rules; they do not observe the factory

Smart contracts can specify the conditions for changing a record. A batch might not move to “accepted” until the producer has submitted its report and the customer has recorded approval. On Ethereum, contract logic runs when called by a transaction or by another contract within that transaction. Producing a new block does not mean running every contract again. The programmed rule still needs a call that reaches it. [9]

A temperature reading or delivery event must come from outside the chain through an appropriate oracle or integration service. That introduces another set of questions: who measured it, who supplied it and how current is it? A contract can execute correctly using an incorrect measurement. Getting identical software results does not establish that the underlying physical event happened as reported. [9]

10. A permissioned network can use a different sequence

Consider Hyperledger Fabric, which can support record sharing between organisations. Its workflow separates proposal execution and endorsement from ordering and final validation. Required peers first simulate the proposed transaction and endorse the result. The ordering service then packages transactions into blocks. Peers check endorsements and state conflicts before applying valid updates. The initial simulation does not yet change the committed state. [10]

A transaction marked invalid can still appear in a Fabric block, but it does not update the current state. The application must check that outcome. Fabric also does not require a native cryptocurrency or Bitcoin-style mining. This is a concrete reason not to describe every node as a miner or every blockchain transaction as a payment. [10]

11. Follow a factory report through the process

Imagine a heat-treatment batch shared between a manufacturer, an outside test laboratory and a customer. They need to agree on the batch’s temperature report and acceptance status. In this hypothetical design, blockchain does not control the furnace. It connects the batch identity, report revision and each party’s approval. The problem is industrial supply-chain traceability, not making the furnace respond to a block.

A data logger or historian retains the measurements. An industrial communication link carries records into the IIoT infrastructure, where an edge application prepares a report. In this design, it associates the report hash with a batch identifier and revision. Full temperature curves and data-analysis results remain in authorised storage. There is no requirement to submit every individual sample as a blockchain transaction.

The manufacturer submits the report, the laboratory adds its result and the customer’s authorised representative records acceptance. The network applies the agreed permissions and recording rules. A later copy of the report can be hashed and compared with the recorded value as an industrial data-integrity check. A match helps check that the file is unchanged; it does not prove the furnace reached the correct temperature. Measurement accuracy and calibration still need their own checks.

The furnace’s PID control loop should not wait for this document-approval workflow. In this example, keeping real-time monitoring separate from ledger verification prevents a recording delay becoming a control delay. Control, monitoring and cross-company evidence have different requirements. NIST’s OT security guidance likewise treats security alongside performance, reliability and safety rather than as a replacement for them. [11]

The design still needs report backups, protected signing keys, appropriate device permissions and a recovery procedure for interrupted connections. Industrial cybersecurity does not disappear because a ledger is involved. A pilot should test missing reports, rejected approvals, resubmitted old files and network outages—not just the successful path. These are proposed tests for this example, aimed at exposing integration problems before the workflow is relied upon.

When would a conventional database be enough?

If every participant already accepts one company as the record authority and the job is simply internal record-keeping, a controlled database with signed documents and audit logs may be more straightforward. Weigh the proposed blockchain against its limitations and operating overhead. Before asking how many blocks to store, ask whose ability to change a record unilaterally you actually need to restrict.

The essential workflow is straightforward: prepare a transaction, authorise it, check it against the relevant rules and establish its place in the accepted history. Hash links make the records verifiable; consensus and permission rules determine which history participants accept. That supports consistent record-keeping. It does not, by itself, produce accurate measurements, correct application logic or reliable operations. [1] [9] [10]