Skip to content

Blockchain The Easy Way

hungbv edited this page Sep 25, 2021 · 13 revisions

Preface

Terms

These terms below are scoped in a specific blockchain implementation such as Cardano or Bitcoin Network.

  • Transaction (Tx) -> a movement of asset(1) in the network - smallest data-unit.
  • Block -> a piece of data/information, it usually is a set of transactions.
  • Chain -> a collection of blocks in which each block have a "unbreakable"(2) link/connection to the previous one.

Why?

There are a lot of reasons explain why blockchain technology existence. The list below focus on finance domain.

  • The conventional finance organizations such as commercial banks require a centralized ledger(maybe a database or a heap of papers) for recording all Tx in and out.
  • The accountants will do their jobs mapping all Tx in and Tx out with some complicated tax and fee formulas -> finance reports
  • The finance reports are transferred to the upper level of the pyramid such as CFO or CEO.

All the processes above are not transparent, they are processed behind-the-scenes.

Numbers manipulation will twisted the truth for optimize the stakeholders benefits.

Centralized systems could be evolved to monopoly disaster such as Wall Street Crash.

There is not a warning sign before it happened, information is manipulated.

Blockchain does exist to decentralize the complicated finance system.

It's an enlightenment on how to make the systems become more transparent and difficult to manipulation.

As the Bitcoin Genesis Block secret message :

The Times 03/Jan/2009 Chancellor on brink of second bailout for banks.

This message reveal about Bailout Banks which is a typical for "too-big-to-fail" or centralized/monopoly system.

What?

Blockchain is an irreversible database. Blocks of data/information are chained to together like the image below.

In order to modify a block content, it need to update all the previous block which require tremendous effort to recalculate.

However, blockchain itself cannot build a decentralized system. It need a consensus protocol defining the "game" rules.

The rules in which all the "players" must follow. There is no exception, no discrimination and no referees/middle-man.

There are a lot of consensus protocols, each protocol offers a difference system characteristic

The combination of blockchain and consensus protocols is the foundation layer of all blockchain applications. This foundation layer is fortified by several cryptography techniques and other technologies which could be defensed against cyber attack or hackers.

There is a mathematical proof about Blockchain Trilemma, pick any two over three vertexs.

For example:

  1. Proof Of Work offers Decentralized and Security vertexs
  2. Proof Of Stake offers Security and Scalability vertexs

How?

Blockchain irrevesible

Take Legacy Bitcoin implementaion as an example:

  • Oneway function is SHA256 (explain below)
  • Chain parameter:
    • Previous BlockHash (store the digital fingersprint of the previous block)
      • If Previous Block content is manipulated -> the new BlockHash will violated the old BlockHash stored in next Block
      • In a word, to modified a old Block, it requires to recalculate all blocks after that block.
    • Nonce ( what make Bitcoin need to mine )
      • it is a random number which guarantees that the block digital fingersprint achieve Network Diffculty
    • Network Diffculty is a dynamic parameter setting "game rules".

Proof Of Work mining diagram

  • The game rule is to find a Nonce satisfied Network Diffculty
  • Every miner/worker must accept this rule -> Decentralized System

Oneway function

  • It is easy to calculate f(x)
  • inverse-f(x) is impossible to calculate (ideal function)
  • In the above example , it requires to bruteforce guessing Nonce number in digest space 2^256
  • There is an analogy between SHA256 digest space and total grains of sand on Earth.

Asset Ownership

Oneway trapdoor function

The public-key cryptographies or oneway trapdoor functions are the foundation layer of asset ownership on blockchain.

  • Each Tx has the source-address and the destination-address
  • Depend on the specific implementation:
    • Each private-key has only one public-key and only one address
    • Each private-key has multiple public-key , each public-key creates the corresponding address
  • The private-key owner has the asset ownership on its addresses .
  • To send the asset on a source-address to another one, the system need to verify whether the private-key is correct. It relate to signing-algorithm .

Ownership

Private-key is the ownership proof As Your key, your coin. If you do not have the private-key , you do not own the blockchain-asset.

Seed phrase/Mnemonic code

It is difficult to remember the private-key contain random letters.

5Kb8kLf9zgWQnogidDA76MPL6TsZZY36hWXMssSzNydYXYB9KF

Thus, there are several wrapper or application provides the convinience way to remember the private-key.

primary hood cattle assault leisure acid six spot sudden angry bunker layer heavy say jungle upon glass decorate mad ice vendor tackle grief midnight

The seed phrase or Mnemonic code is equivalent to private-key

Decentralized ledger

To made blockchain become a decentralized system, there are multiple full-nodes connecting each other through internet.

  • Each full-node store a full-history Blockchain data
  • All the nodes must follow the consensus protocol in order to insert new block to the chain(3)

Notes

  • (1) asset in blockchain usually refer to digital asset such as tokens. Cardano native token is ADA. Bitcoin native token is BTC. There is an analogy between national currencies and native tokens. The native token is fully/widely used in their Network.
  • (2) "unbreakable" chain could be cracked in the extreme conditions such as 51% attack or split-brain network.
  • (3) the hard-fork or chain-split will happen, if there are several nodes do not follow the rules.

Rerferences

  1. Prof. Dang Minh Tuan's research
  2. 101blockchain.com
  3. Blockchain Trilemma
  4. Trilemma mathmatical proof