Sunday, 25 December 2016

MultiChain

MultiChain  - multichain.com
  • Open Platform for BlockChain applications
  • Technically a software which can help you setting up private BlockChain quickly
  • A Fork/extension of Bitcoin core
  • Many extended features which are not available in Bitcoin core
    • Permission management
    • Data streams transactions
    • Native asset transactions
    • Mining and Block signatures
    • Extended peer-peer handshaking
    • & more
    •  
Hashes
  • It is digest of data or crunched data
  • Result of crunching any data into fixed length of alphanumeric string. (one-way method)
  • Many algorithms exists example SHA-1, SHA-256, RIPEMD-160
  • In Bitcoin, Hash is computed twice and most of the time it is SHA-256
  • RIPEMD-160 is used for wallet addresses
MERKLE TREE
  • Binary tree of hashes
  • Bitcoin uses double SHA-256 hashes
  • In case of odd number of nodes in a row, last node's digest taken twice to make it even

BlockChain

BlockChain is a consensus based secure decentralized public database/ledger which stores information immutably over peer-to-peer network.
  • It is a decentralized database which stores information in the form of transactions.
  • It can be private or public
  • It generally stores data in immutable manner
  • It is highly secure. It is secure than traditional storage
  • Data gets stored via consensus based algorithms
  • Uses Cryptography very heavily. (Cryptography is a method of encrypting a data in such a format so that it cannot be read or understood by someone very easily, until and unless he is the owner or has the key).
BITCOIN is a decentralized virtual cryptocurrency built on top of blockchain. It is a product built on top of BlockChain technology.
  • Bitcoin is the largest cryptocurrency built on top of Blockchain technology.
  • Bitcoin removes the dependency on trusted third party to execute the transaction
  • Transaction gets executed by peers based on consensus based algorithm & recorded in the blocks by the miners
  • As of Nov 2016 there are 16M bitcoins in circulation & 1bitcoin(BTC) is worth 730 USD
  • Bitcoins allows you to execute a transaction with out trusting the receiving party within fraction of seconds
  • Yes. Even cross border transaction can be executed in seconds
 BITCOIN is a decentralized virtual cryptocurrency built on top of blockchain

MINING is the process of recording the transactions as a block into the block chain of that currency
  • The are many ways to get any virtual currency
  • Simplest way is to buy is using flat currency(ie govt exchange) through exchange
  • Another way is to earn it through mining by investing computational power into it.
  • So what will miners do if they mine a particular virtual currency?
  • Answer is that they are asked to solve a very complex computational problem to identify that next block in the block chain
  • In return of doing this computation they are rewarded with some virtual coins like bitcoins, Ethereum etc. 
  • Miners use CPU power to identify a nonce (number used only once) through which they can create the digest/signature of the next block n the BlockChain which is less that the recently added block. Miners who do it first announce the answer to entire network & get the reward. 
Consensus Algorithm is Computation methodology of resolving conflicts in BlockChain

BlockChain in Real Life  is a data structure - Arrangement of data in a computer memory(a structured way of storing data)

More details:
  • It can be imagined like a book where each page reference to the previous page through a page number one less than the current page number.
  • Easy to detect if a page has been removed
  • Easy to arrange the pages & identify suspicious activity. That's why page numbers are important in agreements
  • What if the content has been altered? It can also be identified as page numbers are produced by crunching the content of the previous page. If any one changes the content of the page then next page number will not match if we try to regenerate it using altered page content
Even More details:
  • In real Block chain case, each block is built on top of the recent block and use its previous block's content as a signature.
  • Building a block  and adding it in the blockchain is the task of the miner nodes
  • In a public Block chain it is made computationally difficult to add a block to prevent attacks.
  • Miners try to guess a number in such a way that if it gets crunched with the most recent block's fingerprint than it will create a new fingerprint  which will be less that the last/most recent block in the Blockchain.
  • It takes time and computational power to add a block in the Blockchain. Hence there is some reward (25 BTC in case of bitcoin block chain)
  • Private blockchain can choose other methods to add a block as they can trust the miners using a contract etc.
In Summary:
  • It is a decentralized distributed ledge (data structure) where data is being stored inside blocks in form of transactions.
  • Remove the dependency on the trusted third party for recording the data in Blocks
  • In Public blockchain, more complex algorithm require to avoid the malicious activities
  • Since each block is built on top of previous block immutablitiy has been achieved
  • Very difficult to fake a block and very very easy to detect the fake block
  • This all exits in memory of the computers
  • Every participant of the block chain contain the almost same copy of the block chain
Priave and Public Blockchain 
  • Public Blockchain
    • Anyone can read/write without explicit authorization
    • More complex rules for better security
    • Complex consensus algorithm
    • Computationally expensive to mine & add a block
    • No one owns it
    • Computational power is distributed globally
    • example: Bitcoin block chain, Ethreum Blockchain etc
  • Private Blockchain
    • Only authorized nodes can read/write the transaction data
    • Private, hence security can be implemented easily
    • One authorized node can be the arbitrator for any dispute
    • Easy or computatinally less expensive to add a block
    • One or more private entities own the block chain
    • eg: RecordsKeeper blockchain, Icici bank's blockchain etc
When to use a blockchain
  • When you want to store something immutably
  • When things keep adding but older one do not change
    • eg: Court Judgements, Health records
  • When you want to decentralize the control
    • eg: identity management system
  • Proof of ownership.
    • When you want to prove that you are the owner of the digital document
      • proof of existence systems like Block.ai
Why Block chain is considered more secure:
  • Nodes follow longest chain rule
  • Computationally expensive
  • Decentralized in nature
How Blockchain can be attacked:
  • 51% attack
    • Often considered as a very large flaw in public BlockChain like bitcoins blockchain
    • Let's say if a single entity contributed the majority of the network's mining hashrate, then they would have power to manipulate the public ledger
    • It is theoretically possible because Blockchain is publically open
  • Eclipse attack
    • Cripple a node in such a way that it can not talk to other nodes in the network
    • In that case less percentage owner of the network hashrate can launch the attack
    • eg: 3 nodes with 30%, 30% & 40% network hashrate power 
    • If node 2 is crippled in such a way that it cannot talk to node1 then node 3 can control the Blockchains public ledger
Can I setup my own blockchain
  • There are many ways to setup your own block chain 
  • Private blockchain will be fully owned by you. You will be responsible for its security
  • You need to take care of miners. You setup your own miners
  • Multichain
    • Multichain is the most easy way to setup a private blockchain
    • It is opensource and founded by Mr. Gideon Greenspan
    • RecordsKeeper is the official partner of Multichain. 
  • OpenChain
    • It is open source distributed ledger technology. It is suited for organizations wishing to issue and manage digital assets in a robust, secure and scalable way.
      • Anyone can spin up a new Openchain instance within seconds
      • Adiministrator defines the rules
      • Every transaction on the ledger is digitally signed, like with Bitcoin.
  • Ethereum
    • One can setup a private blockchain in Ethereum using Geth
  • Bitcoin Core
    • If you are a tech savvy you can also fork the bitcoin repository and setup your own blockchain
    • It will be complex
RecordKeeper and summary:
  • Record keeper is a record keeping solution for individuals and businesses
  • Records or documents stored in recordskeeper are immutable
  • Records remain highly structured without explicit structure
  • Highly private using PKI infrastructure
  • Available in SaaS and onpremise implementation
Use Cases:
  • Managing and structuring corporate records through automation
  • Health record management for health care industry
  • Invoice & receipt management system for supply-chain, logistic & E-com industry
  • KYC solutions for banks
  • Archiving solutions for large enterprises
  • Proof of ownership, creation and existence