Skip to content

The ultimate guide to the Bitcoin blockchain: Understanding how it works and its potential

The history of the Bitcoin blockchain dates back to 2008, when an individual or group, identified as Satoshi Nakamoto, published a groundbreaking paper presenting a pioneering system of decentralized digital money. This event marked the beginning of a financial and technological revolution that changed the perception of money and trust in the traditional system.

Before the advent of Bitcoin, several attempts were made to create similar systems, such as Digicash, B-Money and Hashcash. However, none could fully address the significant challenges of decentralization, preventing double spending (where the same digital asset can be spent more than once), and trust between unknown parties.

Satoshi Nakamoto set a milestone by designing a system that effectively solved these problems using blockchain technology. This innovative solution provided a secure and transparent way to record transactions, eliminating double spending and ensuring network integrity through decentralized consensus.

Satoshi, blockchain de Bitcoin, Pow, proof of work, hash, merkle. wallets, keys, lighting network

Within the structure of the blockchain, transactions are similar to entries in a ledger, with each transaction consisting of inputs and outputs. This structure, along with a system of transaction fees, ensures the integrity and accuracy of every exchange made on the network.

Blockchain Features

Blockchain technology has changed the way we think about and conduct financial transactions. In the case of bitcoin, the first and most recognized digital currency, it not only serves as a medium of digital exchange, but also offers a number of unique features that distinguish it from traditional financial systems. In this context, we will now examine the various characteristics that make the bitcoin blockchain an important financial and technological innovation:

  • Decentralized: With thousands of nodes distributed around the world, the bitcoin blockchain has no single point of control or failure, increasing its security and making it resistant to censorship.
  • Immutable: Once a transaction is confirmed on the blockchain, it is virtually impossible to change it. Each block in the chain is linked to the previous one, creating a continuous and verifiable sequence of transactions.
  • Transparent: All bitcoin transactions are public and can be viewed by anyone on the blockchain. However, the identity of the parties involved in a transaction can remain anonymous if they wish to do so.
  • Pseudo-anonymous: Although transactions on the Bitcoin network are public, the identities of the users behind those transactions are protected by Bitcoin addresses, which are strings of numbers and letters.
  • Secure: Bitcoin’s security is based on robust cryptographic algorithms, such as SHA-256 for hashing and ECDSA for digital signatures, that guarantee the integrity and authenticity of transactions.
  • Scarce: The total supply of bitcoin is limited to 21 million units, making it deflationary by design. Each bitcoin unit can be divided into smaller fractions called satoshis, after the system’s creator, Satoshi Nakamoto. One bitcoin consists of 100 million satoshis.
  • Consensus Proof of Work (PoW): Bitcoin uses a consensus algorithm called Proof of Work (PoW), in which miners compete to solve complex mathematical problems and validate the addition of blocks to the chain. This process secures the network and avoids double spending.
  • Accessible: Bitcoin is an open network and accessible to anyone who wants to participate. There are no barriers to entry for using the network, sending or receiving payments.

Now that we have explored the essential features of the Bitcoin blockchain, it is time to dive into its inner workings. In the next section, we will examine in detail the processes and mechanisms that allow this technology to operate securely and efficiently, from the creation of new transactions to their validation and storage on the blockchain.

How does Bitcoin work?

The Bitcoin protocol is based on users holding private keys to digital wallets containing public addresses (public keys). These users make transactions, which are grouped into blocks that are processed and propagated by miners through the network of nodes. In addition to transactions, the process of issuing new bitcoin units is an integral part of the network’s operation.

Before being included in a block, transactions are temporarily stored in the mempool (memory pool), where they await confirmation by miners. This process results in the creation of a decentralized and secure ledger, known as the Blockchain, which records all transactions transparently and forever.

To understand how it works, we have used the detailed analysis of a bitcoin transaction as a window into the intricacies of this technology.

  • Digital keys and wallets: Each Bitcoin user has one or more digital wallets containing digital keys, which consist of a private key and a public key. These keys, based on Elliptic Curve Cryptography (ECDSA), are essential for the security and authentication of transactions.
  • Addresses: In the process of a transaction, the sender specifies the amount of bitcoins to be sent and the public address of the recipient. This address, which is unique to each transaction, is a string of numbers and letters associated with the recipient’s public key.
  • Transactions: Once the recipient and the amount to be sent have been specified, the transaction is digitally signed using the sender’s private key. This digital signature is unique and serves as proof of authorization for the transaction. The transaction can then be verified using the sender’s public key.
  • Blocks and miners: Signed transactions are grouped into blocks that are validated by miners. These miners compete to solve a complex mathematical problem that verifies and guarantees the transactions in the block. In addition to validating transactions, miners are also responsible for creating new Bitcoins as a reward for their work.
  • Nodes: All nodes in the network receive and verify new blocks added to the chain. If the block is valid, each node adds it to its local copy of the blockchain and transmits it to other nodes in the network. This process ensures that each node has an up-to-date, agreed-upon copy of the blockchain, guaranteeing the integrity and decentralization of the Bitcoin system.

In the next section, we will explore the basic structure of the Bitcoin blockchain in detail, providing a more detailed overview for those interested in understanding the inner complexities of this technology.

Bitcoin architecture

The Bitcoin blockchain is composed of blocks that store transactions verified by miners abd are linked by cryptographic hashes. This structure, along with the PoW consensus algorithm, guarantees the immutability of the chain. Each block contains a header that includes the hash of the previous block, a timestamp, the root of the block’s Merkle tree of transactions, and a nonce used in the mining process to meet the difficulty of the network.

Transactions

A transaction is a fundamental component of the system that enables the transfer of value from a source of funds, known as the input, to a receiver, known as the output. These transactions are organized using the Merkle tree, a data structure that aggregates and validates transactions in a block. In addition, before being included in a block, transactions wait in the mempool, a temporary store where they await validation by miners.

In the Bitcoin context, unspent transactions (UTXO) are indivisible pieces of currency assigned to specific owners and recorded on the blockchain as valid units of currency recognized by the entire Bitcoin network.

Bitcoins can be divided into multiple transactions and blocks as UTXO (Unspent Transaction Outputs). This means that there is no total balance stored in a Bitcoin address or account; instead, there are multiple scattered UTXOs, each assigned to a specific owner and associated with individual transactions within the blocks of the Bitcoin blockchain.

In addition, most bitcoin transactions generate change, where a UTXO is split into two: one for the recipient of the payment and one to return the change to the user. The output of a transaction consists of two parts: an amount of bitcoin denominated in satoshis, and a blockchain script that specifies the conditions that must be met in order to spend that output. This relationship between transactions, the mempool, and UTXOs is crucial to understanding the functioning and security of the Bitcoin network.

Transaction structure

The structure of a bitcoin transaction includes several essential fields that are necessary to securely conduct and verify transactions on the network. Below is the basic structure of a Bitcoin transaction, including inputs, outputs and other key elements that determine how bitcoin transfers are conducted and validated.

  • Version: Specifies the version of the transaction format used, represented by a 4-byte integer.
  • Inputs: The inputs of a transaction are references to previous transactions (UTXOs) that the user wishes to spend. Each input contains:
    • Previous Transaction ID: Identifies the previous transaction from which the UTXO is taken.
    • Output index: Indicates which output of the previous transaction is being used.
    • Unlock Script (ScriptSig): Provides the data to unlock and issue the UTXO.
  • Outputs: The outputs of a transaction are the new UTXOs created as a result of the transaction. Each output includes:
    • Amount of bitcoin.
    • Lock Script (ScriptPubKey): Acts as a digital lock that is placed on bitcoins when they are sent to a specific address. This lock defines the conditions that must be met in order for those bitcoins to be spent in the future. For example, it may require a specific digital signature to unlock it, or it may require certain pre-defined conditions to be met.
  • Witness and Witness Block: These are used to support token segregation (SegWit) and store the signature data and network scripts needed to validate the transaction.
  • Sequence Number: This number controls the reordering or swapping of transactions in a block by miners.
  • Locktime: Defines the time or block from which the transaction can be included in a transaction.

In addition to these fields, Bitcoin transactions are protected by the digital signature of each record, which is verified using the corresponding public key. This structure provides the technical basis for the secure transfer of bitcoins on the Bitcoin network.

Blocks

Blocks are essential pillars of blockchain technology, that serve as the foundation for the integrity and security of the entire network. These data structures consolidate critical information that ensures the validity and reliability of transactions on the blockchain. Below, we detail the key elements that make up these blocks, including the header, transactions, nonce and hash of the previous block. These elements work together to ensure the immutability and consistency of the blockchain.

  • Set of confirmed transactions: Each block contains a set of transactions that have been verified and confirmed by miners on the network.
  • Block header: A block’s header contains critical information that identifies it and links it to other blocks in the chain. This includes:
    • Unique hash: Each block has a unique hash calculated using a cryptographic algorithm. This hash acts as a unique “fingerprint” for the block and is generated from all the information it contains, including transactions and the header. This hash is used to ensure the integrity of the block and to securely link it to the previous block in the chain.
    • Timestamp: The block header also contains a timestamp that indicates when the block was created. This timestamp helps maintain an orderly record of transactions on the blockchain and facilitates synchronization between different nodes in the network.
    • Reference to the previous block: Each block references the previous block in the chain, thus creating a chronological sequence of blocks that make up the blockchain. This reference to the previous block is made using the unique hash of the previous block, which ensures that each block is securely linked to the previous block and that any attempt to modify a previous block would affect the entire chain, providing a high level of security and resistance to manipulation.

There are online tools that allow users to track and explore information related to the blockchain. These block explorers provide access to data such as recent transactions, balances, block details and other statistics related to the Bitcoin network.

Some of the most popular block explorers for Bitcoin are blockchain.com, Blockchair and Block Explorer. Each of these explorers offers an easy-to-use interface and a variety of features

The mining process

Mining is an essential component of the Bitcoin ecosystem, not only providing a means for the creation of new bitcoins, but also maintaining the security and integrity of the network by validating and confirming transactions.

Miners play a crucial role in solving a specific mathematical challenge known as Proof of Work (PoW), which verifies and guarantees the validity of every transaction and block on the Bitcoin blockchain.

Bitcoin

To solve this challenge, miners must find a nonce value (a one-time random number) that, when combined with other data in the block, such as the transactions it contains and the hash of the previous block, and processed by a cryptographic hash function such as SHA-256, produces a result that meets certain requirements set by the network. These requirements are determined by the difficulty of the network, which specifies the number of zeros that must precede the resulting hash in order for it to be considered valid.

In practice, this means that miners must make numerous attempts, modifying the value of the nonce, until they find one that, when applied to the hash function along with the other data in the block, produces a hash that meets the established difficulty criteria. This process is highly computational and energy intensive because it involves performing complex calculations repeatedly and simultaneously.

This process is repeated continuously for each new block that is attempted to be added to the blockchain. The first miner to solve this problem has the right to add the block to the blockchain and receive the reward in bitcoins for his work. This reward includes both the transaction fees associated with the transactions included in the block and a certain amount of newly created bitcoins, known as the block reward.

Wallets

Bitcoin wallets play a key role in the management and protection of bitcoins, and offer a wide range of options that vary in terms of security, functionality, and convenience. From solutions that provide full control over the blockchain to those that prioritize accessibility and ease of use, the choice of wallet should be made with security in mind and tailored to the user’s individual needs.

Available options include full clients that download and store a complete copy of the blockchain, ensuring full control over funds and robust security. On the other hand, there are web and mobile wallets that offer greater convenience by allowing quick access to funds from anywhere with an internet connection. However, the latter may present additional security risks, such as exposure to cyber-attacks.

It is important to understand that wallets do not store the coins themselves, but the keys that allow access to them. Each user has a wallet that contains private/public key pairs. Transactions are digitally authenticated using these keys, which guarantees ownership of the transaction outputs (the bitcoins). These transactions are recorded on the blockchain as transaction outputs, providing an immutable record of the transfer of wealth.

At Block&Capital, we always recommend using Bitcoin Core or a cold wallet such as Trezor and/or Ledger to safely store your bitcoins. Avoid leaving your funds on exchanges, as this can expose them to risks such as cyber attacks or platform shutdowns. So remember:

Not your keys, not your coins.

Governance, forks and upgrades

Governance and protocol updates, represented by Bitcoin Improvement Proposals (BIPs), are fundamental pillars in development and maintenance of the Bitcoin network. In this context, a framework of decisions and procedures is established to ensure the stability, security and continuous development of the protocol.

Governance

Governance in the Bitcoin ecosystem is a critical aspect that encompasses decision making, rules and network management. Unlike traditional governance structures where a centralized structure has authority over decisions, bitcoin governance is based on decentralization and community participation. This means that critical decisions about the future of Bitcoin are made by consensus among community members, including developers, miners, users, and other participants.

Forks

Forks are an essential part of the Bitcoin update and evolution process. They arise when there is disagreement within the community about a proposed change to the protocol. This disagreement can lead to two main types of forks:

  • A hard fork occurs when the community cannot reach consensus on a significant change to the protocol. This causes the blockchain to split into two different branches, each with its own version of the protocol. Users who disagree with the change can choose to continue using the previous version of the software, resulting in two separate and divergent networks.
  • A soft fork occurs when a change is made to the protocol that is backward compatible with previous versions of the software. This means that nodes that do not upgrade their software can still participate in the network, although they may be excluded from certain new or improved features. Although the blockchain remains unified, users who wish to take full advantage of new features will need to upgrade their software.

Bitcoin Improvement Proposals (BIPs)

Bitcoin Improvement Proposals (BIPs), on the other hand, are formal documents that describe proposed improvements to the Bitcoin protocol. These proposals can cover a wide range of changes, from minor technical changes to major upgrades. BIPs are submitted by members of the community and can be discussed, reviewed and approved by other participants before being implemented in the Bitcoin software.

Scalability and challenges

Bitcoin faces significant scalability challenges, which affect the network’s ability to efficiently handle a larger volume of transactions. Two of the most prominent challenges are block size, which is limited to one megabyte, and network congestion, or bottlenecks, which have sparked discussions on how to effectively address them. These congestion issues can result in slower transactions and higher transaction fees, thus hindering bitcoin’s ability to function as a fast and inexpensive medium of exchange.

Scalability Proposals

A number of solutions have been proposed to address these challenges, including

  • Segregated Witness (SegWit): was activated on the Bitcoin mainnet in August 2017 with the activation of SegWit block number 481,824. SegWit is an enhancement to the Bitcoin protocol that separates transaction information from its signature, resulting in an optimization of block storage space. This solution increases the effective capacity of each block, which could result in lower transaction fees and faster confirmation times.
  • Lightning Network: The Lightning Network is like the Visa card of the traditional system. It acts as a second-layer payment channel network that operates on top of the Bitcoin blockchain. Similar to how a Visa card allows transactions outside of the main banking system, the Lightning Network allows transactions outside of the Bitcoin main chain. This means it can handle a higher volume of transactions per second and offer lower fees. By using smart contracts and two-way payment channels, the Lightning Network aims to improve the scalability and speed of transactions on the Bitcoin network.
  • Schnorr signatures: Schnorr signatures are a more efficient and flexible digital signature technique than the ECDSA signatures currently used in Bitcoin. The implementation of Schnorr signatures could reduce the size of transactions, allowing for a higher number of transactions per block and greater efficiency in the network.
  • Schnorr Taproot: is a proposal that combines Schnorr signatures with Bitcoin scripting technology to improve privacy and transaction efficiency. It allows for signature aggregation, meaning that multiple signatures can be combined into one, reducing the size of transactions on the blockchain. It provides greater privacy by hiding spending terms in multi-signature transactions.
  • Colored coins: This technique allows users to “color” bitcoins to represent specific digital assets or tokens on the Bitcoin blockchain. While not directly focused on scalability in terms of transaction processing, colored coins increase the utility of bitcoin by enabling a wider range of use cases and applications.
  • Block size expansions: Increasing the block size is a proposal that has been discussed in the Bitcoin community. Increasing the block size would allow more transactions to be included in each block, thereby increasing the network’s capacity to handle a larger volume of transactions.
  • Sidechains: Sidechains are separate but interoperable blockchains that can be linked to the main bitcoin blockchain. They allow assets to be transferred between blockchains in a reliable and secure manner, which could help relieve pressure on the main bitcoin chain by shifting some transactions to secondary blockchains.
  • Network optimizations: These include improvements to Bitcoin’s node software to optimize transaction processing and block propagation on the network, which can increase overall network efficiency and reduce confirmation times.

These proposals represent some of the most significant efforts to address Bitcoin’s scalability challenges and improve its ability to efficiently handle larger transaction volumes. However, the implementation and adoption of these solutions face technical challenges and consensus considerations within the Bitcoin community.

In addition to the challenges mentioned above, other relevant issues include:

  • Power consumption: The Bitcoin mining process requires a significant amount of electricity, which has raised concerns about its environmental impact and the long-term sustainability of the network.
  • Decentralization: As bitcoin grows in popularity, there is a risk that the network will become more centralized, with a small number of actors controlling the majority of processing power, which could compromise the security and censorship resistance of the system.

Conclusion

The impact of bitcoin goes far beyond being a simple digital currency. The creation of bitcoin has solved historical problems, such as the Byzantine Generals Problem, thanks to its blockchain technology. By introducing a new paradigm of decentralized trust in financial transactions, Bitcoin offers revolutionary potential for the transfer of value in the digital age.

Moreover, Bitcoin’s architecture, with its system of digital keys and wallets, and the structure of its transactions and blocks, has enabled a secure network without the need for intermediaries. This has not only provided an alternative to the traditional financial system, but has also paved the way for the development of new applications and technologies based on blockchain technology.

In conclusion, we could say that Bitcoin represents both a revolutionary technological achievement and an ongoing challenge to adapt and continuously improve. Its impact on the financial and technological world is indisputable, and as this technology continues to mature and find new applications, it is clear that we are facing a significant change in the way values are transferred and managed in the digital age.

If you found this article interesting and would like to learn more about the topic, we recommend this talk by Bitcoin expert Andreas Antonopoulos.

At Block&Capital, we strive to create an environment where growth and success are accessible to all. If you’re ready to take your career to the next level, we encourage you to join us.

Resources:
[1] Mastering Bitcoin
[2] Github Bitcoin

Want to learn more about blockchain technology? Don’t miss these resources!