Sunday, June 04, 2017

Blockchain – Bitcoin as a Mainstream Case Study - Part I

There are many blockchain implementations in existence today, but bitcoin was the first and still is the most significant and the most successful one.


It has been proven—in extensive real-life exploitation so far—as a very robust and fraud-resistant solution.


Many non-payment use cases have also been implemented on top of the same basic bitcoin blockchain infrastructure, which proves it is also fairly flexible.


For that reason, I believe that the good initial understanding of the bitcoin inner workings can be the perfect basis for understanding every other blockchain implementation and its potential.


Let’s review now—again staying at fairly high level—how the bitcoin payment protocol functions on top of the underlying blockchain database content. Again, I am not going to spend much time diving into all of the details of how bitcoin consensus is executed, managed and reached, but instead will spend most of the time focusing on explaining:
  1. What a bitcoin transaction messages structure is
  2. How are bitcoin transaction messages validated by the bitcoin network nodes, i.e., how network ensures that available funds are claimed only by the entitled parties that really ‘own’ them


Bitcoin Transactions Primer

Bitcoin transaction messages are the main content of the bitcoin blockchain database. They are commands for the monetary value transfer, usually between a pair of bitcoin ecosystem participants, only identified via their ‘bitcoin address’.


Every participant is required to have the complementary key pair, which they generate using standard tools. The key pair consists of secret key (‘sk’) and public key (‘pk’).


The ‘bitcoin address’ is basically ‘double-hashed’ output (160 bits long) of the participant’s ‘pk’ (first hashed using SHA-256 method then hashed by RIPEMD-160 hashing algorithm).


All bitcoin transaction messages are grouped and stored inside blockchain blocks that are sequentially linked (via their ‘hash pointers’). Every accepted bitcoin transaction message in the bitcoin network is, therefore, available to every node connected to the network. As we have already seen, the immutable and public nature of the content is the basic characteristic of every ‘non-permissioned’ type of blockchain implementation, including bitcoin.

Bitcoin Transaction Message Types

There are two types of the bitcoin transaction messages
  1. Coinbase’ transactions – transactions submitted by miners when they successfully ‘mine’ the bitcoin block (and as part of mining operation produce a valid proof-of-work or POW). Miners generate and include exactly 1 coinbase transaction into every bitcoin block to reward themselves for the mining operation
  2. Regular’ transactions – when a participant, represented with <Bitcoin Address 1> (including but not limited to miners) wants to transfer ownership of a certain amount of bitcoins (that they can prove they own) to another participant, represented with <Bitcoin Address 2>.

No comments: