The Bitcoin Blockchain
The Bitcoin blockchain is a decentralized and immutable public ledger that contains the history of every bitcoin transaction; decentralized, because the blockchain is maintained by a globally distributed network of nodes, and immutable, because every block contains a reference to the previous block it builds upon, thereby creating a chain which links every block together, all the way back to the first block in the chain called the “genesis block”.
The Bitcoin blockchain is a public ledger, meaning that everyone can look into anybody's transaction history, at least theoretically; instead of assigning balances to a user’s personal details, users are assigned addresses (think safe deposit boxes) where funds are sent and locked until the respective user decides to interact with his funds.
The utilization of addresses instead of personal details render Bitcoin pseudonymous, and thus, no one really knows who exactly is behind a given address.
A Bitcoin Block
Each block in the Bitcoin blockchain consists of a specific set of data and transactions from a specific period of time. The contents of a block are aggregated in a specific way, one can think of it as the following:
The Block Size
The block size refers to the total size of the block, measured in bytes. It encompasses all the data contained within the block, including the block header, transaction data, and any additional information.
The Block Header
A block header serves as a compact summary of a given block’s contents, but also plays a crucial role in linking a block to the rest of the blockchain; the latter is achieved by including the hash of the previous block into the block header of the following block, thus, linking a new block to an existing block, rendering it part of the blockchain. This process continues throughout the entire blockchain, creating a chronological chain of blocks.
Apart from contributing to a chronological blockchain, the process of linking the blocks to each other also contributes to the blockchain’s immutability, security and verifiability: once a new block is added to the chain, altering its contents or the contents of any previous block would lead to a different hash for the given block, which in turn would alter the hashes of all subsequent blocks, pressing the malicious actor to not only mine all the affected blocks anew, but also the blocks which will be mined by honest miners while he’s reworking the previous blocks in order to bring his initial changes to fruition; in order to have a chance at success, he’d need to own more than half of the currently deployed hash rate, an undertaking which in today’s day and age is either computationally infeasible, economically unviable, or both.
The block header and the process of linking the blocks to each other also contributes to the verifiability of the blockchain; nodes utilize a block’s block header to verify the validity of each block, enabling a consistent and agreed-upon history of transactions amongst all participants of the Bitcoin network. The linkage of the blocks, in turn, enable nodes to follow the chain of blocks, starting from the genesis block, and individually verify Bitcoin’s entire transaction history themselves.
The Block Header’s Fields
A block header consists of six fields, each detailing a specific piece of data:
● “Version” denotes the version of the block structure and protocol rules being used for that particular block.
● “Previous Block Hash” denotes the hash of the previous block.
● “Merkle Root” denotes the root of a Merkle tree, which summarizes all transactions in the block.
● “Timestamp” denotes the time when the block was created.
● “Bits (Target Difficulty)” denotes the value that miners aim to meet or undercut when mining a new block.
● “Nonce” denotes an arbitrary number used in the process of mining a new block.
The Transaction Counter
The "Transaction Counter" is a field in the block that specifies the number of transactions included in that particular block. This counter helps network participants quickly ascertain how many transactions are contained in the block without having to analyze the entire block's content.
The Transactions
The actual transactions that are included in a block. Transactions in a Bitcoin block represent the transfer of bitcoin from one address to another. Transactions record the movement of value within the Bitcoin network. Each transaction specifies the sender (input) and the recipient (output) addresses, along with the amount of bitcoin being transferred.
Clarification
The pain of explaining Bitcoin lies within the fact that whenever you try to explain one thing, you automatically touch on two other topics one should be able to understand for the bigger picture to make sense.
I've tried keeping the above content strictly catered to the accompanying headers, and as simple- but complete as possible. I find it difficult, but I enjoy it.
I can add a whole other level of complexity quantity to the above, but I don't know who would be helped with that.
I'm looking forward to corrections / improvements in regards to the above.
It's still a work in progress though, and things that woulda, shoulda, coulda been mentioned already, are reserved for future additions, as it would've absolutely bloated the above, just so you know. 😶🌫️
- Yes, the Bitcoin block structure is also made by me.