Tuesday 20 February 2018

Consensus

Consensus is a process whereby the peers synchronize the data on the blockchain.There are a number of consensus mechanisms or algorithms.

One is Proof of Work. Another is Proof of Stake.There's also Proof of Elapsed Time, as well as Simplified Byzantine Fault Tolerance.

Bitcoin uses Proof of Work, while Ethereum uses Proof of Work currently, but is moving towards Proof of Stake.The Hyperledger Sawtooth uses Proof of Elapsed Time.
While Bitcoin is focused upon transferring monetary value between parties, it has a very limited programming language.

Ethereum, on the other hand, uses a more expansive set of programming languages and tools to allow for many other types of programs and applications.

The core invention of Ethereum is it's EVM, or Ethereum Virtual Machine.The EVM runs on the Ethereum network, and it runs a Turing-complete software.

Vitalik Buterin is the person who wrote the white paper for Ethereum.

Some of its key features include the immutability of data, that unauthorized users cannot make changes to that data,the Ethereum development platform is designed to make corruption and tamper proof applications,the secure apps are sent decentralized and secured with cryptography,and they're protected against hacking attacks and fraudulent activities,and lastly, it's designed with zero downtime.

That is because the applications on the network are decentralized, and on many, many machines,if some of those machines go down, the Ethereum network maintains a stable state of the Ethereum network.

Ethereum applications do not have a middleman; instead, users interact in a P2P fashion with other users through a variety of interfaces - social, financial, gaming,
etc. Since the applications are developed on the decentralized consensus-based network itself, third-party censorship is virtually impossible. Malicious actors cannot
secretly tamper with the application by changing the code and compromise all application users (or nodes that are actively interacting with it). These Decentralized

Applications have come to be known as Dapps.
Since they are cryptographically secured, Dapps are referred to as 'secure applications'. Some of the high profile Dapps built on the Ethereum platform include:
•Augur, which is a Decentralized Prediction Market. Learn more at https://augur.net/.
•Digix, which tokenizes gold on Ethereum. Learn more at: https://digix.global/.
•Maker, which is a Decentralized Autonomous Organization (DAO). Learn more at: https://makerdao.com/.
The Ethereum network is a distributed global public network, which means it is not run on central servers in a certain geographical location. Instead, the computing

power that runs the network is contributed by nodes that are spread across the globe. In other words, Dapps have 'zero downtime' - they never go down and, in general,
cannot be switched off.
With the advent of the Ethereum blockchain platform and the scripting functionality or smart contracts that it enables, there are ongoing attempts to do the same for

the Bitcoin blockchain, which does not allow for this, due to security reasons. RSK is one such smart contract platform that seeks to achieve this "with a 2-way peg to
Bitcoin". The added functionality can go a long way in making the Bitcoin blockchain useful for use cases other than cash Transfers.

Types of Blockchains

A blockchain can be both permissionless (like Bitcoin or Ethereum) or permissioned (like the different Hyperledger blockchain frameworks). A permissionless blockchain is also known as a public blockchain, because anyone can join the network. A permissioned blockchain, or private blockchain, requires pre-verification of the participating parties within the network, and these parties are usually known to each other.


The supply chain management is an ideal use case for permissioned blockchains. You would not want non-vetted companies participating in the network. Each participant that is involved in the supply chain would require permissions to execute transactions on the blockchain. These transactions would allow other companies to understand where in the supply chain a particular item is.


Cryptocurrencies and Initial Coin Offerings (which are not backed by national governments) usually involve implementations of permissionless blockchains.

Blockchain Transactions

The record of an event, cryptographically secured with a digital signature, that is verified, ordered, and bundled together into blocks, form the transactions in the blockchain. In the Bitcoin blockchain, transactions involve the transfer of bitcoins, while in other blockchains, transactions may involve the transfer of any asset or a record of some service being rendered. Furthermore, a smart contract within the blockchain may allow automatic execution of transactions upon meeting predefined criteria.

Cryptography has a key role to play both in the security, as well as in the immutability of the transactions recorded on blockchains. Cryptography is the study of the techniques used to allow secure communication between different parties and to ensure the authenticity and immutability of the data being communicated. For blockchain technologies, cryptography is used to prove that a transaction was created by the right person. It is also used to link transactions into a block in a tamper-proof way, as well as create the links between blocks, to form a blockchain.


Differences between Blockchains and Databases

Blockchain technology has some key differentiators from databases.
A blockchain is a write-only data structure, where new entries get appended onto the end of the ledger. Every new block gets appended to the block chain by linking to the previous block's 'hash' (you can check the Glossary tab for a refresher on hash functions). There are no administrator permissions within a blockchain that allow editing or deleting of data.

In a relational database, data can be easily modified or deleted. Typically, there are database administrators who may make changes to any part of the data and/or its structure. Additionally, blockchains were designed for decentralized applications, whereas relational databases, in general, were originally designed for centralized applications, where a single entity controls the data.

Bitcoin Blockchain

In the Bitcoin network, miners must solve a cryptographic challenge to propose the next block. This process is known as 'proof of work', and requires significant computing power .

Timestamping is another key feature of blockchain technology. Each block is timestamped, with each new block referring to the previous block. Combined with cryptographic hashes, this timestamped chain of blocks provides an immutable record of all transactions in the network, from the very first (or genesis) block.

A block commonly consists of four pieces of metadata:

  • The reference to the previous block
  • The proof of work, also known as a nonce
  • The timestamp
  • The Merkle tree root for the transactions included in this block.

The Merkle tree, also known as a binary hash tree, is a data structure that is used to store hashes of the individual data in large datasets in a way to make the verification of the dataset efficient. It is an anti-tamper mechanism to ensure that the large dataset has not been changed. The word 'tree' is used to refer to a branching data structure in computer science



Difference between DLT & Blockchain


What is the difference between distributed ledger technology and blockchain technology?

Distributed ledgers are a great, new kind of decentralized database, that have a copy of a series of transactions that is kept absolutely in sync.

The specific term for that data structure used to be called blockchain, but now, everybody seems to be applying the term blockchain to anything on the spectrum of Distributed ledgers




Distributed Ledger Technology (DLT) - BlockChain

A distributed ledger is a type of data structure which resides across multiple computer devices, generally spread across locations or regions.

Distributed Ledger Technology includes blockchain technologies and smart contracts. While distributed ledgers existed prior to Bitcoin, the Bitcoin blockchain marks the convergence of a host of technologies, including timestamping of transactions, Peer-to-Peer (P2P) networks, cryptography, and shared computational power, along with a new consensus algorithm.

In summary, distributed ledger technology generally consists of three basic components:

  • A data model that captures the current state of the ledger

  • A language of transactions that changes the ledger state

  • A protocol used to build consensus among participants around which transactions will be accepted, and in what order, by the ledger.


A blockchain is a peer-to-peer distributed ledger, forged by consensus, combined with a system for smart contracts and other assistive technologies.
Together, these can be used to build a new generation of transactional applications that establish trust, accountability, and transparency at their core,while streamlining business processes and legal constraints.
With all distributed ledgers, there's an initial record or, in this case, a block, or a genesis block

Each block will include one or more transactions.
Connecting to a blockchain involves people connecting to this distributed ledger via, typically, an application.

So, an example of this would be a wallet.

One person may transfer ownership of a digital asset, like a cryptocurrency, from one person to another,and that asset will move from one person's wallet to another person's wallet,
and then, that transaction will be shown on a blockchain.

So, this distributed ledger transaction, such as a payment, will move from peer-to-peer throughout the network,

and there's no intermediaries, like a bank, or a payment company, to process this transaction.

Can you give an example of a blockchain which has been in production since a few years?

Blockchain is actually best known because of Bitcoin.And Bitcoin's blockchain has been in existence since 2009.
It's a cryptocurrency, but, interestingly, people confuse the two terms.

Blockchain is actually not Bitcoin, or vice versa.
Blockchain is a distributed ledger. The blockchain then tracks various assets, other than cryptocurrencies, such as Bitcoin.
Those transactions are grouped into blocks, and there can be any number of transactions per block. Turns out, nodes or machines on a blockchain network group up these transactions and they send them throughout the network.

The process of blockchains syncing up have to do with a concept of consensus - an agreement among the network peers.

Eventually, each machine has an exact copy of the blockchain throughout the Network.


Smart contracts are simply computer programs that execute predefined actions when certain conditions within the system are met.Smart contracts provide the language of transactions that allow the ledger state to be modified. They can facilitate the exchange and transfer of anything of value (e.g. shares, money, content, property).


Consensus refers to a system of ensuring that parties agree to a certain state of the system as the true state.