Bitcoin: Bitcoin Header and its ledger system

Estimated read time 5 min read

For some days, I have been speaking about Blockchain, Decentralization, Centralization, and Attack methods on Blockchain. So far, the following were my main topics: Navigating the financial revolution: AI, Blockchain, and Traditional banking, Exploring the Depths of Blockchain: Decentralization, Smart Contracts, and Beyond, and Blockchain Network and its Security issues underneath. I should admit that I wrote mostly about generic technology. But now, I’m going to focus more on Bitcoin. In this blog post, will write more about some technical parts of a Bitcoin header and Bitcoin itself. A Bitcoin header is complex. I cannot cover everything here. However, whilst writing and researching, I will try to put some most interesting bits and pieces. For more information please refer to the Bitcoin headers section on the Bitcoin.org website.

Photo Credits: developer.bitcoin.org
Photo Credits: developer.bitcoin.org

Bitcoin Header

  1. Version – The version number indicates the software version used to create the block. It helps track changes or upgrades to the Bitcoin protocol.
  2. Previous Block Hash – Cryptographic hash of the header of the previous block in the blockchain
  3. Merkle Root – The Merkle root is a hash of all the transactions included in the block. – summary of that structure
  4. Timestamp – The time the block is added to the chain
  5. Bits – The bits field encodes the difficulty target for mining the block. It specifies the maximum allowed value for the block header’s hash to be considered valid.
  6. Nonce – The nonce is a 32-bit (4-byte) field that miners can adjust to find a hash of the block header that meets the difficulty target. It is incremented during the mining process until a valid hash is found.

In a transaction, you will have another hash representing the transaction itself. Other values include Reference value total, Receiver address, and Receiver value. etc… The value of the sender and receiver are always the same.

The whole boom in the crypto industry is Bitcoin. It’s composed of a decentralized specialized ledger database that accommodates transaction data. Most people around the globe do not want to use Bitcoin as a payment system because of its value which is not stable. There is also a fee associated with it. One of the contributions that led to the Bitcoin price change is investor sentiment. Data is limited to transactions only in Bitcoin.

Data Structure and Transaction in a Bitcoin Ledger System

Let’s look at this simple transaction(I purposely started labeling them from 0 because in an array everything starts by 0)

  • 0. A is a coin miner of 50 coins (Output 50 BTC )
  • 1. A paid 10 BTC to B
  • 2. B paid  8 BTC to C
  • 3. C paid 5 BTC to D
  • 4. D paid 5 BTC to A
  • 5. A paid 2 BTC to E

In a Bitcoin ledger system, this is recorded in terms of input and output. Let’s look into the details below:

Initial Transaction (Coinbase Transaction): Miner A successfully mines a block and receives a reward of 50 BTC (output: 50 BTC).

This transaction is known as the Coinbase transaction, and it is the initial creation of new bitcoins. Subsequent transactions are generated and broadcasted on the Blockchain.

 Subsequent Transactions:

A pays 10 BTC to B (A’s balance: 40 BTC, B’s balance: 10 BTC).

  • There is also a hash pointer pointing to its initial Coinbase transaction which is: 0[1] where 1 refers to 50 BTC(the pointer)

B pays 8 BTC to C (B’s balance: 2 BTC, C’s balance: 8 BTC).

  • Then it follows to B with the hash pointer as follows: A pointer becomes B start of the transaction: 1[1] where the first 1 is the second transaction following 0 and the second 1 refers to where the BTC originates for B

C pays 5 BTC to D (C’s balance: 3 BTC, D’s balance: 5 BTC).

  • Then C pointer becomes B transaction:2[1]: the same concept where 2 means the third transaction and 1 means where the BTC originate

D pays 5 BTC to A (D’s balance: 0 BTC, A’s balance: 45 BTC).

  • Again, the same concept for transaction 3[1]

A pays 2 BTC to E (A’s balance: 43 BTC, E’s balance: 2 BTC).

Now the index has changed slightly: 1[3],4[1] where its covering 2 transactions: 

      • 1[3] -> His First transaction after receiving BTC from D and 3 is the origin of himself
      • 4[1] -> Fith transaction in the loop and 1 is the origin that is from D

Each transaction involves inputs and outputs. In Bitcoin, these inputs and outputs are controlled by cryptographic keys. The sum of the inputs must equal or exceed the sum of the outputs, and any difference represents transaction fees or miner rewards.

Keep in mind that this is a simplified example, and in a real-world scenario, each of these transactions would be part of a block. Miners validate and include these transactions in blocks, and the blocks are then added to the blockchain through a process called mining.

In brief, this is the basic concept of the UTXO (unspent transaction outputs) principle in the context of Bitcoin, the UTXO model is used to keep track of the ownership of bitcoins. This model has of goal to reach primarily ownership tracking and consensus mechanism as described in my previous blog post.

Nitin J Mutkawoa https://tunnelix.com

Blogger at tunnelix.com | Founding member of cyberstorm.mu | An Aficionado Journey in Opensource & Linux – And now It's a NASDAQ touch!

You May Also Like

More From Author