The Undocumented Features of Bitcoin’s (BTC) Architecture

Beginner’s Guide / 23.12.2020

The introduction of Bitcoin in 2009 marked the start of a new financial era marked by the introduction of a decentralized financial control structure that eliminates third parties in financial transactions. Bitcoin is more than just a digital currency; it’s a revolutionary technology that has helped shape the modern economy. 

Bitcoin also helped popularize blockchain technology, which has gained widespread use cases in various sectors, including supply chain services, Internet of Things (IoT), and reputation systems with the launch of blockchain-based applications. 

Despite Bitcoin’s popularity, few people actually understand the technical aspects of the world’s popular cryptocurrency. While the whitepaper lies down Bitcoin’s network architecture, some aspects of the network have been undocumented, outdated, or omitted. Here are some undocumented features of Bitcoin’s architecture.    

Bitcoin Technical

Bitcoin constitutes three main technical components: the consensus protocol, transactions (including scripts), and the communication network. 

Bitcoin architecture is overly complicated and requires a sufficient technical background to understand the network architecture. Nonetheless, here is a simple breakdown of Bitcoin’s architecture. 

Bitcoin Architecture

When analyzing Bitcoin’s architecture, you’ll want to consider five key aspects. These are the Bitcoin application itself, nodes and the nodes discovery process, transactions, security implementation, and adding new blocks to the Bitcoin chain. 

Bitcoin network itself runs on a set of distributed servers. At the core of the network is a transaction database that functions as a secure ledger. The secure ledger is shared by all nodes (servers) that run the Bitcoin protocol’s full-stack—the protocol functions as a decentralized transaction system with the tendencies of a highly transparent ledger. 

Nodes running on the blockchain protocol runs the entire network locally. Bitcoin nodes install the full stack of software in their devices then sync up automatically with other network nodes in a peer-to-peer fashion. Therefore, the nodes ensure that all transactions on the network are valid and are arranged in chronological order, and are enforced by cryptographic rules. 

The nodes in the network employ a peer-to-peer IP network to process and verify transactions. A consensus is reached when nodes are in the same block as individual databases. 

Bitcoin Blockchain Design

The bitcoin blockchain is designed to create and disseminate a global public ledger with a record of all bitcoins in the system. Each entry in the public ledger is a transaction representing the transfer of a crypto coin from one virtual account to another. Bitcoin transactions consist of inputs and outputs: a transaction “spends” a set of transaction inputs and “creates” a transaction output. 

All transactions contain an input reference, i.e., a hash of an output of a previous transaction. As such, each transaction output consists of a value representing the quantity of bitcoin currency plus information regarding the coin owners. Transactions on the network are usually structured as a directed graph to allow users to maintain invariants concerning the transaction log.  

Regarding blocks, the Bitcoin network’s first block was not as a result of the Bitcoin consensus mechanism that supports mining. Instead, the first block was hard-coded into the source code. This was unique since the block doesn’t reference a previous block, and it’s referred to as the Genesis block. 

Another architectural concept in the Bitcoin network was the limited number of Bitcoins, resulting from mining (evaluating) a new block and the reward that a miner can earn from the mining process. On the Bitcoin network, a new block is mined every 10 minutes (regardless of the technology used, as discussed later), and the mining reward at the beginning of the system was 50 Bitcoins per block. The block reward is halved every four years (or every 210 000 blocks on average) 

A crucial aspect of Bitcoin’s architecture is the block size. At the moment, the block size is restricted to 1MB (on average), and one block can therefore cover around 4000 transactions with an average size of 250 bytes. This results in an overall rate of about seven transactions per second (tps.) Each block information is recorded on the Bitcoin blockchain.  

Any node can broadcast transactions on the Bitcoin Network in the system simultaneously. At its best, a Bitcoin transaction comprises three parts, i.e., an input, an amount, and an output.  

The decision on which transactions of those broadcasted to be included in a new block is dependent on the node (the miner) running the proof-of-work (PoW) algorithm since the miners are responsible for picking a transaction from the so-called mem-pool where all validated transactions are stored, grouping them and including them in the block.

The miner’s selection of transactions depends on the transaction fee (the standard fee is 1.000 Satoshi= 10 µBTC = 0.01 mBTC = 0.0001 BTC per kB), which forms a reward for the miner’s efforts in addition to the Coinbase reward. To initiate a transaction on the Bitcoin blockchain, users must first generate the necessary Bitcoin keys starting with a random 256-bit private key. 

This private key is required to sign a transaction and Bitcoins. The elliptic curve DSA algorithm is required to generate a 512-bit public key from the private key. The public key is used to verify the signature for a transaction. However, the public key is not revealed until a transaction is signed.  

The Lightning Network

Following Bitcoin’s scalability challenges, the lighting network was introduced to enable fast transaction time. The Lightning Network is a “layer 2” payment protocol that operates on Bitcoin to allow for fast transactions among participating nodes. 

Transactions conducted on the lightning network are fast, cost much less, and are readily confirmed compared to those confirmed on the bitcoin blockchain. The Lightning Network was designed to decongest the bitcoin blockchain by making transactions off-chain away from the main blockchain and reducing the associated transaction fees. It allows for fast transactions among participating nodes. 

The Bitcoin Network Consensus

Bitcoin Network achieves consensus via mining using the PoW algorithm. While the generation of rewards primarily incentivizes mining in the network, the primary purpose of mining in the Bitcoin network is to achieve a decentralized consensus in a trustless network. Mining enables a network-wide consensus without a central authority. 

Bitcoin’s decentralized consensus arises from the interplay of four processes occurring independently on nodes across the network. Bitcoin’s decentralized network consensus follows four major processes as below: 

  • Independent verification of each transaction by every full node, based on a comprehensive list of criteria
  • Independent aggregation of these transactions into new blocks by mining nodes, coupled with computational efforts using a proof of work algorithm
  • Independent verification of the new blocks by every node and assembly into a chain
  • Independent selection by every node of the chain with the most cumulative computational effort demonstrated through a proof of work.

Since the Bitcoin network is decentralized, two nodes may announce a valid block simultaneously, meaning two blockchains encompass different transactions. The situation is dependent on the block creation time relative to the block propagation time. 

Conclusion 

The Bitcoin network employs peer-to-peer broadcast to confirm blocks and distribute pending transactions. Transactions on the network are first analyzed based on Bitcoin’s protocol rules and then validated using a scripting language based on locking and unlocking scripts. 

For a transaction to be validated on the network, full Bitcoin nodes (miners) will select transactions from the memory-pool, hashing pairs of transaction values until only one hash remains anchoring the transaction tree into the block header. In essence, Bitcoin employs a unique and extraordinary architecture where transactions are private or anonymous.    

Adam is an outgoing young lad who likes adventures and discovering new things. Despite his boring life, he loves writing about cryptocurrencies and exploring what blockchain technology can do for the coming digital world where all adventures will be virtual.