Bitcoin Basics: Blocks and the Blockchain — VegaX Research Report

It has been a few weeks since we published an installment of the Bitcoin Educational Series — regardless, our research team has been hard at work putting together high-quality content covering Decentralized Identifiers “DIDS” and the VeChain protocol. At VegaX, we believe that learning about a wide variety of topics is crucial to developing a unique perspective on the crypto markets.

That same perspective is supported by a robust understanding of fundamental concepts that underlie the greater Web3.0 ecosystem. Whereas in the previous installment, we reviewed technical topics such as hierarchical deterministic bitcoin wallets, this installment is meant to bring us all “back to the basics.”

We explore questions such as “what is a blockchain?”, dig deeper into some lesser-known aspects of blockchain anatomy, and answer some frequently asked questions about blockchains. For this exploration, we will be using the bitcoin network as a referential example as it has demonstrated robustness and anti-fragile qualities.

“Blockchain” as an industry is still in its nascent stages. Unfortunately for retail investors, institutional investors, or anyone who has not yet taken the time to grasp the basics — the space is ripe for grifters and rent-seekers to extract value through nefarious means. But knowledge is power, and once an understanding of the basics of blockchain technology is achieved, investors of all levels are likely to read between the lines and make decisions that best suit their interests.

What is a blockchain?

Fundamentally, a blockchain is a file of transactions (data) — bitcoin transactions, in this case. From a structural perspective, blockchains like bitcoin can be conceptualized as global ledgers of accounts. The caveat is that bitcoin technically does not have “accounts”, rather, the bitcoin network is built upon a series of inputs and outputs. Those “unspent transaction outputs” (UTXOs) are essentially dollar bills in a user’s chosen wallet.

Further, the wallet is not so much a physical device as it is an easily accessible software interface that manages the user’s private keys — which allow them to spend their bitcoin — on the back end. Therefore, on the bitcoin blockchain, the global ledger structure maintains an immutable record of the existing set of UTXOs and the public keys (addresses) associated with that bitcoin.

Another useful metaphor to help us visualize the bitcoin blockchain is that of a series of storage lockers. In this example, each locker is represented by a public key (address), and the contents inside each locker are represented by the UTXO associated with the address. Thus, the only user who would be able to access the contents of the locker would be that person or entity who owns the private keys.

A blockchain is called a “blockchain” because new transactions are added to the existing file in “blocks,” and new blocks are built on top of each other to create a chain of blocks. From a nomenclature perspective, this is why, when referring to the total number of blocks in a chain, we refer to this metric as “block height.” Again, all metaphors aside, the bitcoin blockchain is an immutable, permanent storage for bitcoin transactions.

What is a block?

Frankly, there are several components that actually make up a bitcoin block of transactions, many of which are too technical to fit into the scope of this piece. However, it will be useful for readers to at least gain a baseline understanding of the information in the “block header.” A block header is akin to the metadata associated with the particular block’s transactions. The fields within the block header provide a unique summary of the transactions of the entire block.

The first field is the version number, this allows anyone validating the network (node-runners) to see if the block has been changed in its composition. The second field contains the previous block’s block hash. A block hash is a reference number for a block in a blockchain and it is created by hashing the block header through SHA256 twice. By including the previous block hash into the new block’s header, an unbreakable (encrypted) tie is formed between the two blocks.

The third field contains the Merkle Root — this piece of data can be thought of as all of the transactions in the block, hashed together. The Merkle Root provides a single-line summary of all the transactions in a particular block. Following that field is Time: when a miner attempts to mine this current block, the Unix time at which the block header is being hashed is noted within the block header itself.

After Time comes the Bits field, a shortened version of the “mining target,” which is itself a measure of how difficult it is for a miner to mine the next block (a topic explored in the first installment of this series). The final field in a block header is the nonce, the field that miners change in order to try and get a hash of the block header (Block Hash) that is below the target. For reference, nonce is an abbreviation of “number used once” — recall that changing just one digit in an input drastically changes the output of a SHA256 algorithm.

All six of the fields that comprise the block header are run through the SHA256 algorithm twice in order to produce the block hash of a particular block. Because this (current) block hash is used in the field of the block built on top of it, each block is cryptographically “chained” to its immediate predecessor, who is tied to its immediate predecessor, and so on. An elegant and simple solution to the question of how to relate blocks to one another.

Frequently Asked Questions

The purpose of this section is to address some common questions asked about blockchains. Understandably, with a topic so expansive and deeply technical, certain critical aspects are lost in initial discussions. Without further ado, let’s get started:

How does one get a copy of the blockchain?

First, let’s assume that the user in question has set up their node device. As a brief refresher: a (bitcoin) node is simply a computer device that runs a version of the bitcoin software — this could be an old laptop, desktop, or dedicated micro-computing device.

When a user runs a version of the bitcoin software for the first time, their node will begin to download blocks from other nodes in a process known as the Initial Block Download (IBD). Note that depending on the user’s internet speed, the IBD can take several hours to complete. At the time of writing, the bitcoin network’s block height is 751,759, so there are many blocks to be downloaded.

The interaction between peer nodes on the network begins with a comparison of their respective block heights, literally, “how many blocks do you know of?” If the peer node knows of more blocks than the user’s, the user’s node will request these blocks from its peers until it has an up-to-date copy of the chain.

As a result of this behavior, nodes on the network are constantly in communication, propagating new blocks so that each node on the network maintains a complete blockchain. Much like there is no “single version” of the bitcoin software, there is no “single version” of the bitcoin blockchain; each node maintains its own local copy which can vary from node to node.

How are new blocks added to the blockchain?

This feat is accomplished by the process of mining, where pending transactions sit in a queue (mempool) until a miner moves them into a “candidate block.” Transactions are only confirmed at the time a miner successfully mines a block by using their processing power to produce a block hash that is below a specific target value. A detailed exploration of the bitcoin mining process will be published later this year expanding upon this summary.

Technically, any node on the network can attempt to mine a block, but with technological advancements made in mining protocols — specifically the use of ASICs (Application-Specific Integrated Circuit), the days of mining bitcoin from one’s laptop are over. That said, the differentiation in processing power between ASICs and node devices presents clear roles: ASICs mine blocks, and node devices validate and maintain globally distributed copies of those blocks.

When a mining node successfully mines a block, it will share the new block with other nodes on the network. Other nodes add the new block to their chain, and miners begin the process of building the next block on top of the most recent one. The system is supported by periodic mining difficulty adjustments: every 2016 blocks the average time it took for a new block to be produced is calculated. If that average time is greater than 10 minutes, mining difficulty increases, and conversely, if the average time is less than 10 minutes, mining difficulty decreases.

These difficulty adjustments ensure that no matter how many miners voluntarily choose to enter or leave the network, new blocks are produced in intervals of roughly 10 minutes on average.

Can two blocks be mined simultaneously?

Yes, this is possible and not as uncommon as one might imagine. In the case where two blocks are mined simultaneously, each node will consider the first block it received as a part of its blockchain but will keep the second block just in case. That second block (and the transactions that compose it) will not be considered a part of the “active” blockchain.

Consequently, nodes on the network will be in disagreement about which of the two blocks belongs at the top of the chain. The issue is resolved once the next block is mined — that next block will be built on one of the blocks, creating a new longest chain. Bitcoin nodes are programmed to adopt the longest known chain of blocks as their active blockchain. Thus, those nodes who received the “incorrect” block first will perform a chain reorganization to remove old blocks from their active chain in favor of the blocks that make up the new longest chain.

Therefore, although disagreements between nodes do exist, the conflicts are relatively short-lived, as the combination of new blocks being mined and nodes’ longest chain preference typically resolves disagreements quickly.

So blocks in the blockchain can be replaced?

Yes, as illustrated above, there are routine circumstances in which a node will reorganize its local copy of the blockchain. In fact, chain reorganization is one of the major protocol-level threats to the sustainability of the bitcoin network. If a nefarious actor was able to reorg the chain, they could effectively undo, redo or remove any transactions they wished.

However, it is important to consider the feasibility of such an attack. All miners are incentivized to build on the longest chain: if they successfully mine the next block, they are rewarded with transaction fees plus a “block reward” — 6.25 BTC at the time of writing. It stands to reason that if all miners are incentivized to build on the longest chain, that means that the combined processing power of the entire population of miners on the network is focused on building one chain.

Therefore, while it is certainly possible for a nefarious actor to attempt to build a new chain — one that is more favorable to them from reorganizing and censoring transactions — it would take a staggering amount of processing power to accomplish. This scenario is what is known as a “51% Attack,” meaning that the attack can only be successful if the nefarious actor was in control of > 51% of all processing power on the network. A tall order, to be sure.

Conclusions

Blockchains are, in a general sense, a data storage solution implemented as a distributed network of interconnected computer systems that independently validate the movements of data across the network. The bitcoin network is a great educational reference when learning about blockchains because of the simplistic elegance with which the system was constructed.

Nodes are programmed to share block data they maintain with other nodes who may not have those blocks, and since they are also programmed to adopt the longest-known chain of blocks as their active blockchain, any discrepancies between peers are quickly resolved.

Concurrently, the process of mining incentivizes miners to build on the most recent block, and to use their processing power to participate in the creation of new blocks every 10 minutes on average. The coalescence of these and other incentive structures on the bitcoin network have provided the protocol with a remarkably strong base from which to build higher.

Similarly, when we as humans take the time to truly understand the foundational principles of our areas of study, we find that all subsequent knowledge built on top is much more cohesive and stands the test of time.

We hope that this installment of the Bitcoin Educational Series has helped sharpen your knowledge of blockchain basics, thank you for reading!

🚀Better Indexes, Better Returns — VegaX

Questions? 👉🏼 info@vegaxholdings.com

🎯Follow, Message, Tweet, Clap, & Join Us Here:

As we continue to expand our digital footprint, here is where you can find us:

VegaX Site | VegaX Twitter | VegaX FB | VegaX LinkedIn | VegaX IG

VegaX Holdings creates next-generation indices and financial products that are needed to support the growth of the cryptocurrency industry and improve returns for investors worldwide. Learn how to get better returns today: www.VegaXHoldings.com

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
VegaX Holdings

VegaX Holdings

VegaX: The Future of Digital Asset Management — Innovation of Proprietary Indices and Next-Gen Digital Asset Management Products. https://vegaxholdings.com