Blockchain Frameworks — Part 1: Introduction

In this and the next articles, I will make an explanation of the Blockchain technology and its most known frameworks

Antonio Payá González
Coinmonks
Published in
5 min readApr 2, 2020

--

INDEX:

  1. Part 1: Introduction
  2. Part 2: Smart Contracts
  3. Part 3: Blockchain Types
  4. Part 4: Ethereum
  5. Part 5: Hyperledger
  6. Part 6: IOTA
  7. Part 7: Quorum
  8. Part 8: Extra 1; Hedera Hashgraph
  9. Part 8: Extra 2; Libra

Part 1: Introduction

A Blockchain is a distributed, timestamped, append-only ledger of data where each node of the distributed network simultaneously has the ledger information and is identified by an address.

Blockchains employ asymmetric cryptography (with public keys) to ensure that only the owner of an account (the owner of the public and private keys) can initiate transactions associated with that account.

Blockchain transactions are grouped in blocks (where there may be one or more transactions) where each block stores information about the previous block (forming a chain).

Blockchain Demo (source: https://blockchaindemo.io/)

If we change the content of a block, its hash changes too, breaking the chain.

Blockchain Demo2 (source: https://blockchaindemo.io/)

The content that a block contains can change depending on the Blockchain framework that we use, but the content that cannot vary is the one I’m going to list below:

Block Header

  • Block Number
  • Previous Hash
  • Block Hash

Transaction[s] (1-n)

  1. Endorsements (1-n)
  • Endorser-n Identity (Certificate, public key)
  • Endorser-n Signature

2. Transaction Data

Block Metadata (Optional)

Block content

The record can only be changed by appending new blocks, and no valid block can be changed without having to replace all the subsequent ones so a Blockchain can only be updated by adding new blocks.

CONSENSUS:

In blockchain, how to reach consensus among the untrustworthy nodes is a transformation of the Byzantine Generals

(BG) Problem (https://dl.acm.org/doi/pdf/10.1145/3335772.3335936).

In blockchain, there is no central node that ensures ledgers on distributed nodes are all the same. Some protocols are needed to ensure ledgers in different nodes are consistent. Now we will present several common approaches to reach a consensus in blockchain.

An scenario of blockchain branches (the longer branch would be admitted as the main chain while the shorter one would be deserted).

Proof of Work (PoW):

This is a consensus strategy used mainly by Bitcoin where, in order to avoid the random selection of blocks to be added to the chain (since this random selection is vulnerable to possible attacks) the node that wants to publish a new block to the network, a lot of work has to be done to prove that the node is not likely to attack the network.

Generally the work means multiple computer calculations where each node of the network is calculating a hash value of the block header (explained above) that can be easily verified by the server. If the block is validated, other miners would append this new block to their own blockchains. Nodes that calculate the hash values are called miners and the PoW procedure is called mining in Bitcoin.

Example of Blockchain with PoW: Bitcoin and Ethereum in Mainnet

Proof of Stake (PoS):

PoS is an energy-saving alternative to PoW where miners have to prove their ownership of the amount of currencies they have in the network.

This consensus algorithm assumes that people with more currencies would be less likely to attack the network.

As selection based on account balance is quite unfair, as the richest person is destined to be dominant in the network, many solutions are proposed with the combination of the size of the stake to decide who includes the next block to the network.

Example of Blockchain with PoS: Ethereum in research

Practical Byzantine Fault Tolerance (PBFT):

In PBFT, new block is determined in a round. In each round, a primary would be selected according to some rules. And it is responsible for ordering the transaction. The whole process could be divided into three phases: pre-prepared, prepared and commit. In each phase, a node would enter next phase if it has received votes from over 2/3 of all nodes. So PBFT requires that every node is known to the network (private blockchain).

Example of Blockchain with PBFT: Hyperledger Fabric

Delegated Proof of Stake (DPOS):

The major difference between PoS and DPOS is that PoS is direct democratic while DPOS is representative democratic.

In DPOS Stakeholders elect their delegates to generate and validate blocks. With significantly fewer nodes to validate the block, the block could be confirmed quickly, leading to the quick confirmation of transactions. Meanwhile, the parameters of the network such as block size and block intervals could be tuned by delegates. Additionally, users dont need to worry about the dishonest delegates as they could be voted out easily but DPoS systems are vulnerable to centralization as a number of witnesses is strictly limited.

Example of Blockchain with DPOS: BitShare or EOS

Main consensus summary:

Main consensus summary

Other consensus algorithms:

  • Ripple
  • Tendermint

Get Best Software Deals Directly In Your Inbox

--

--