The blockchain bootcamp · 1. The vocabulary
The blockchain bootcamp · Chapter 1 of 18 · Blockchain · new chapter every Saturday evening By the end of this chapter: Define block, chain, hash, nonce, consensus and finality accurately enough to read anything else. The problem Emma is a front‑end engineer who has just been handed a ticket to add a “view latest block” widget to the company’s dashboard. The design mock shows the block number,…
Chapter 1 of 18 introduces essential blockchain terminology to prepare readers for further learning. Emma, a front-end engineer, encounters several key concepts while attempting to add a "view latest block" widget to her company's dashboard.
A block is a bundle of transactions along with a header that connects it to the preceding block. Important header fields include parentHash, which is the SHA-256 hash of the previous block's header, linking blocks together; number, denoting the sequential block height starting at 0 for the genesis block; timestamp, representing the Unix epoch seconds when the block was proposed; nonce, a 64-bit value adjusted by miners in Proof-of-Work or a placeholder in Proof-of-Stake; and hash, a Keccak-256 hash of the entire block header used as the block's identifier.
The header's significance lies in its cryptographic linkage: any alteration to a block's contents changes its hash, breaking the parentHash link in subsequent blocks. This immutable chain is formed by linking blocks through their hashes, creating an unforgeable sequence where tampering is immediately detectable by the network.
Blocks are chained sequentially, forming an immutable sequence where altering any block necessitates recalculating hashes for that block and all subsequent blocks. Nodes maintain the longest or highest-total-difficulty chain, discarding forks that fail to meet consensus rules. The chain serves as a distributed data structure where all nodes independently arrive at the same ordering through the consensus algorithm.
Hashes serve as the backbone of trust in blockchain. As deterministic one-way functions mapping arbitrary data to a fixed-size output, hashes possess crucial properties: collision resistance (difficulty in finding two different inputs with the same hash), pre-image resistance (infeasibility in reconstructing original input from a hash), and the avalanche effect (minor input changes significantly alter the output).
Consequently, a block's hash uniquely identifies its header, enabling the network to instantly detect inconsistencies and reject tampered blocks.
In Proof-of-Work chains, miners repeatedly change the nonce field and compute the block header hash until it falls below the current target, demanding significant computational effort. In contrast, Proof-of-Stake chains, like Ethereum post-Merge, use the nonce field for compatibility but do not employ it in mining; validators sign blocks instead.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.