Blockchain Technology from a non technical perspective | by Chima James Nwakigwe | Oct, 2021
In trying to understand blockchain technology, you would have heard about decentralized ledger or distributed ledger. These are used interchangeably when talking about blockchain but also means the same thing. To be able to understand blockchain, its helps to understand what a ledger is.
A ledger is a book or collection of accounts in which account transaction are recorded. decentralized or distributed ledger means that the transactions and their details are recorded in multiple places at the same time.
The concept of decentralization have been in practice way back before the use of money when the system of bartering was being used. For example:
- A farmer agrees to trade a shoemaker his bushel of wheat for a pair of shoes
- The farmer and shoemaker announce their transaction to the tribe
- Everyone updates their mental ledger, from the point on, they agree that the shoes is owned by the farmer until he decides to trade it.
Blockchain is essentially the digital ledger of the above example. it is a decentralized, distributed ledger that records the provenance of a digital assets. By inherent design, the data on a blockchain cannot be modified, which makes it legitimate disruptor for industries like payment, cybersecurity, IOT and healthcare. Blockchain consists of records called blocks that is used to record transactions.
A block is a group of data packed together in one convenient artifact. it can record any kind of data. The block header contains information about the block like the timestamp, difficulty level, nonce, platform version etc. it also contains the hash output of the previous block data.
How are blocks ‘chain’ together
Cryptography: is a secure communication technique that allows only the sender and intended recipient of a message to view its contents. All data in a block is run through a cryptography hash. Hashes creates a unique output for a specific input. The chain is established by embedding the last block’s hash into the header of the current block. This process makes it impossible to alter any block once chained together unless majority of the participant reached a consensus, this is because changing the data on any block will result in a different hash and the new hash generated as a result of the change will not match the hash in the next block. Hash codes are created by a math function that turns digital information into a string of letters. Therefore, if edited in any way, the hash code changes as well.
Consensus mechanism: In a centralized system, like a database holding key information about an organization, a central administrator has the authority to maintain and update the database. The task of adding, deleting and updating the organization’s dealings is performed by the central authority who remains the sole in-charge of maintaining genuine records.
Public blockchain that operates as decentralized, self regulating system works on a global scale without any single authority. They involve contributions from hundreds of thousands of participants who work on verification and authentication of transaction occurring on the blockchain. There are different types of consensus mechanism algorithms but i will be explaining the two most prevalent.
- Proof of work (POW) : is a common consensus algorithm used by the most popular cryptocurrencies like Bitcoin, Ethereum 1.0, and Litcoin. it requires a participant node to prove that the work done and submitted by them qualifies them to receive the right to add new transaction to the blockchain.
How proof of work consensus works
- when a block is full, each node competes to solve a guessing game problem
- Miners try to guess the “nonce” which is the number added to a hashed block, when rehashed meets the difficulty level restrictions.
- if the result matches the current level of ‘difficulty’ the miner has guessed the right answer then broadcast to the network for other miners to verify if the solution is correct before appending the block to the blockchain.
However, this mining mechanism requires high energy consumption and longer processing time but a proven robust way of maintaining a secure decentralized blockchain.
In proof of work, no way to recoup costs when cheating. This way, miners have no incentive to cheat but strong incentive towards honesty.
Work performed for no reward = cost with no return
2. Proof of stake (POS): was proposed as an alternative to proof of work as a low-cost, low-energy consuming consensus algorithm. it involves the allocation of responsibility in maintaining the public ledger to a participant node in proportion to the number of virtual currency token held by it.
How proof of stake works
- block of transactions created
- when its time for group consensus, all who wish to participate lock up funds in stake.
- A random ‘player’ is selected, that player’s copy of block data is shown to all other participants.
- other player stake on the validity of the block transactions.
- if the majority (51% or above) agree with the proposed block, the random player is rewarded, as are all who staked on that player.
- if the majority disagrees, the random player gets no reward and loses their stake
- then a new player is randomly selected to share their copy of block data
In proof of stake, the more money you stake, the more chances of being selected.
Proof of work Vs Proof of stake
- work for reward vs make a safe bet for a reward
- security vs speed
- capital spent on hardware vs capital spent on staking funds.
- miners vs validators
Other Consensus Algorithms
Proof of Burn
Proof of Capacity
Proof of Elapsed Time
Proof of Authority
Next article will be on smart contracts and how to build a decentralized application.