What Is Blockchain
Blockchain is a distributed shared database/ledger with multiple non-trusting writers to be modified directly and transactions can be independently verified and processed by every node which maintains a copy of the database/ledger. Where interaction between transaction created collaboratively by multiple writers, without either party exposing themselves to risk. Blockchain’s job is to be the authoritative final transaction log, on whose contents all nodes provably agree.
Blockchain is a distributed database/ledger that maintains chronologically ordered continuously growing list of records/transactions in blocks in the database/ledger and in a distributed network. Each block and records/transactions has timestamp and a hash. Each Block link to previous block. Once data is recorded in a block it cannot be altered. A blockchain DB consist of transactions and blocks.
Figure 1 PWC — Blockchain Definition
Each Blocks holds batches of valid transactions that are hashed and encoded in Merkle Tree. Each Block has the hash of previous block which links each other. These links forms a chain. This process confirms integrity starting from original genesis block.
Blockchain formation. The main chain (black) consists of the longest series of blocks from the genesis block (green) to the current block. Orphan blocks (purple) exist outside of the main chain.
Figure 2 Wikipedia Merkle Tree of Blockchain
Blockchain Ecosystem Components
· Shared Ledger
Node/Application: Any Computer that connects to the distributed network called nodes. Full nodes download every block and transaction and check them against consensus rules. Similar to applications interacting with databases, decentralized apps will interact and execute logic against blockchain. Nodes are divided in 2 categories:
Mining Nodes: Process and commit transactions to the underlying distributed ledger through a consensus. Mining nodes communicate with other mining nodes to come to concensus on the state of the distributed ledger. There is no need for client application to communicate with these nodes. Mining nodes collects fees for mining.
DApp: Decentralized application has its backend code running on decentralized p2p network. Dapp usually have its frontend and user interface that make calls to the backend.
Contracts: Decentralized Logic
Swarm: Decentralized Storage
Whisper: Decentralized Messaging
Figure 3 Ethereum Consortiom Network Architecture
Figure 3 Ethereum Consortiom Network Architecture
User is interacting with transaction nodes using Dapp.
Figure 4 Depiction of Transaction from Ethereum enterprise Consortium
Consensus Algorithm: The consensus algorithm is implemented as part of the node application, providing the ‘rules of the game’ for how the ecosystem will arrive at a single view of the ledger. Such as Proof of Stake like Casper for Ethereum, Proof of Work in Bitcoin.
Proof Of Work: Is a mathematical problem which requires strong processing power that is difficult to solve by a mining node but easy to verify by other mining nodes.
Proof Of Stake: In general, a proof of stake algorithm looks as follows. There exists some set of coin holders that place their coins into a proof of stake mechanism and thereby become validators. Given a particular blockchain “head” (ie. the latest block in a blockchain), the algorithm randomly selects one of these validators (the randomness being weighted by deposit size, so a validator with 10000 coins has 10x the chance of a validator with 1000 coins) and assigns to them the right to create the next block. If that validator does not create a block within some period of time, then a secondary validator is selected that can create the block instead. Just like in proof of work, the “longest chain” is considered to be the canonical one.
Virtual Machine: is a representation of a computer implemented as part of software operated with instructions that every participant runs in the ecosystem.
Token: Tokens are sometimes referred to as Digital Bearer Bonds which simply means establishing a digitally unique identity for something that can be owned or that can own other things. Use of cryptographic one-way hashes allows for any asset, whether it be a digital or physical asset, to be represented as a token, a secure identity. However, identity tokens are not the whole picture, you need a second piece to make a complete secure identity, the identity proof. The proof of identity is determined with public/private keys. Together an identity token paired with proof provides a solution for secure identity for everything. Such a digital token allows us to track provenance, ownership, relationships and lineage of the asset. Today, we can and often do tokenize things, unique and non-unique things to be precise. In fact, this usage of digital tokens is the backbone of trust established for existing e-commerce systems.
Smart Contract: Are self-executing contractual clauses that has automated trustworthy workflow between parties in the form of a code that stored on blockchain. (Automatically executing transfer of digital tokens or assets between parties under specified conditions)
Off-Chain: An off-chain transaction is the movement of value outside of the block chain. There are two types of off chain transaction. Trusting party and payment channel. In the trusting party transaction first done at the internal ledger of the trusting party and verified internally then broadcasted to the public or on chain blockchain. (Or just changing balances internally then broadcasting to public). In the payment channel transactions are done peer to peer between two parties by mutual trust at the closure it is broadcasted on chain.
Hard Fork: A hardfork is a change to the protocol that makes previously invalid blocks/transactions valid, and therefore requires all users to upgrade. Any alteration to blockchain which changes the block structure (including block hash), difficulty rules, or increases the set of valid transactions is a hardfork.
Soft Fork: A softfork is a change to the protocol wherein only previously valid blocks/transactions are made invalid. Since old nodes will recognise the new blocks as valid, a softfork is backward-compatible. This kind of fork requires only a majority of the miners upgrading to enforce the new rules. New transaction types can often be added as softforks, requiring only that the participants (sender and receiver) and miners understand the new transaction type. This is done by having the new transaction appear to older clients as a “pay-to-anybody” transaction (of a special form), and getting the miners to agree to reject blocks including these transaction unless the transaction validates under the new rules.
Private Blockchain: Write permissions are kept central to one organization, Read permissions may be public or restricted to extend to the parties involved.
Consortium Blockchain: When consensus process is controlled by a selected set of nodes.
Public Blockchain: Anyone can read, send transactions and participates consensus process.
Blockchain Use Case Decision Algorithm (Where Blockchain Make Sense)
Rule Number 1 Shared Database
Rule Number 2 Multiple Writers
Rule Number 3 Absence Of Trust
Rule Number 4 Trusted Third Party (Disintermediation)
Rule Number 5 Transaction Interaction
In the absence of these rules and based on your requirements you can check File Storage, Central database, DB replication (Master-Slave), Multiple DBs with pub-sub
Rule Number 6 What is your TPS Requirements?
If you have high TPS requirements consider to use SGX based solution.
Rule Number 7 What is your Governance and Privacy Rules?
Think about zero knowledge proof and acls on transactions and governance rules about your nodes your consensus, your validators, conflict resolution, etc.
Rule Number 8 What are the assets and Who is behind them?
Blockchain Proof Of Concept for Trade Finance
Step 1: Importer creates an LC application for the Importer Bank to review and stores it on the Blockchain.
Step 2: Importer Bank receives notification to review the LC and can then approve or reject it based on the data provided. Once checked and approved, access is then provided to the Exporter Bank automatically for approval.
Step 3: Exporter Bank approves or rejects the LC. Once approved, the Exporter is able to view the LC requirements and is prompted to view through the application.
Step 4: Exporter completes the shipment, adds gps sensor along with shipment. Adds invoice and export application data and attaches a photo image of any other required documents. Once validated, these documents are stored on the Blockchain.
Step 5: Exporter Bank approves or rejects the application and documents.
Step 6: Importer Bank reviews the data and images against the LC requirements, marking any discrepancies for review by the Importer. When approved, the LC goes straight to completed status or is sent to the Importer for settlement.
Step 7: If required due to a discrepancy, the Importer can review the export documents and approve or reject them.
Provenance (The primary purpose of tracing the provenance of an object or entity is normally to provide contextual and circumstantial evidence for its original production or discovery, by establishing, as far as practicable, its later history, especially the sequences of its formal ownership, custody, and places of storage.)
Financial Technology (Especially remittance, Capital Markets, Trade Finance, Regulatory Compliance and Audit, Anti Money Laundering & Know Your Customer, Insurance, Peer to peer transactions, Smart Contracts, Smart Assets, Clearing and Settlement, Payments, Digital Identity etc.)
Corporates (Supply Chain Management, Healthcare, Real Estate, Media, Energy etc.)
Governments (Records Management, Identity, Voting, Taxes, Government & Non-Profit Transparency, Legislation)
Cross Industry (Accounting, IOT, Data Storage, Digitizing Assets, Content Management etc.)
Originally published at https://www.linkedin.com on April 26, 2017.