Introduction about Blockchain Technology

Hi Guys

My name is manish Kumar.I am student of Master of computer Application from Pondicherry University(India).Today i am going to write blog about Blockchain Technology

  1. What is BlockChain?
  2. Role of hashing in the Blockchain?
  3. What kind of Blockchain are there?
  4. What does Blockchain really do?

What is a blockchain?

A list of blocks (records) that are linked together using hashes, maintained as a distributed, decentralised database.

Let’s first look at what constitutes a block:

Typical constituents of a block

Each block in the blockchain consists of :

previous_block_hash : Hashing is fundamental in creation of a blockchain. It involves taking a string of characters of any length, running an algorithm (Bitcoin uses SHA-256) and giving an output of fixed length. More on this in a bit.

index : Identifies the block’s number

data : This is the portion which allows money or contracts to be programmable. It can be an object that contains information such as ‘to’ , ‘from’ addresses and ‘amount’ (for currencies) or details/logic for executing a contract.

timestamp: When the block is created

current_block_hash : As we will see in the following section, blockchain’s immutability arises from here.

nonce : A string (arbitrary) that is added to the hash of the block, meant for establishing Proof-of-Work (PoW), which is required for competing nodes to come to an agreement on whose block to accept as the next in a growing blockchain.

Role of Hashing in the Blockchain

Hashing based on block’s constituents

A hash is used to uniquely identify a block’s contents. As shown in the code above, a block’s hash is generated using SHA-256 from all of the following: previous block’s hash, index, data and timestamp.

As a result, a unique hash is generated that now identifies the block. If any of the above are changed, the corresponding hash will be different and thus one can know that the block’s contents have been changed.

Moreover, as the block is part of a longer blockchain, the next block’s previous_block_hash will be different, so that will also become incongruent. This in turn affects the block after it and so on.

Thus, hashing enhances the security of the block, and preceding ones, all the way to the genesis block (i.e. first block). Such a method of securing the blockchain makes it practically immutable. Given that a blockchain is distributed (i.e. resides on different nodes/computers), a bad actor needs to have enough hashing power to update several blocks and also control the network to propagate his version of the blockchain. This becomes much tougher when the blockchain is decentralised, as shared in the next section.

In the code repository, when you run ruby blockchain_generator.rb, the output would look something like this:

{"index":0,"data":"First block is genesis block","timestamp":"2017-10-06 11:48:48 +0800","previous_block_hash":"0","hash":"71474149f9785a5ab14df5196b6848a82c904132397750dfbd24a698fc4c801e"}
{"index":1,"data":"I've been added, my index is 1","timestamp":"2017-10-06 11:48:48 +0800","previous_block_hash":"71474149f9785a5ab14df5196b6848a82c904132397750dfbd24a698fc4c801e","hash":"c6c429f3773cf7e5d3f9ca3a4b1b59b437fbff9cdcb2d260418464abd7ab423b"}
{"index":2,"data":"I've been added, my index is 2","timestamp":"2017-10-06 11:48:48 +0800","previous_block_hash":"c6c429f3773cf7e5d3f9ca3a4b1b59b437fbff9cdcb2d260418464abd7ab423b","hash":"8bda54e3697cd4a849b6dd46041eb1c0b20fe33adc8269bd7a7897341dd5cffe"}

The output shows how blocks in the blockchain would look if generated by one node, forming a centralised blockchain. It is secure to a certain extent because of the use of hashing mechanism per block and its security would grow as the length of blockchain grows. Storing the blockchain on more nodes would make it distributed, further enhancing its security through having additional copies.

Due to the immutable, distributed nature of blockchain, Distributed Ledger Technology (DLT) improves on how data can be recorded or shared in a way that ensures consistent, tamper-proof view across multiple parties, any of whom are free to check it. Several industries can achieve a huge improvement in efficiency through DLT where verified, encrypted and timestamped transactions are recorded in a transparent manner.

Building on what we have covered so far, if the nodes were able to update one another without the need of a central authority, the blockchain would be decentralised.

What kind of blockchains are there?

A blockchain can be public, private, permissioned, permissionless, centralised, decentralised.

All of these are configurations that can be set up based on the network’s requirements. At this point, governments and corporations are trying out their own ways of using DLT in a centralised/decentralised manner to improve tracking goods in a supply chain, settle trades better, cut duplicate insurance claims, improve cross-border payments and so on. Variations of the blockchain are being experimented upon.

What does the Blockchain really do?

Considering the daily churn of news around blockchain, not to mention the skyrocketing value of Bitcoin and other cryptocurrencies that rely on the technology, you may be wondering what the hell blockchain actually is.

A global network of computers uses blockchain technology to jointly manage the database that records Bitcoin transactions. That is, Bitcoin is managed by its network, and not any one central authority. Decentralization means the network operates on a user-to-user (or peer-to-peer) basis.

A blockchain, originally block chain, is a continuously growing list of records, called blocks, which are linked and secured using cryptography. … For use as a distributed ledger, a blockchain is typically managed by a peer-to-peer network collectively adhering to a protocol for validating new blocks.

Ledgers, the foundation of accounting, are as ancient as writing and money.

Their medium has been clay, wooden tally sticks (that were a fire hazard), stone, papyrus and paper. Once computers became normalized in the 1980s and ’90s, paper records were digitized, often by manual data entry.

These early digital ledgers mimicked the cataloguing and accounting of the paper-based world, and it could be said that digitization has been applied more to the logistics of paper documents rather than their creation.

Paper-based institutions remain the backbone of our society: money, seals, written signatures, bills, certificates and the use of double-entry bookkeeping.

Computing power and breakthroughs in cryptography, along with the discovery and use of some new and interesting algorithms, have allowed the creation of distributed ledgers.

In its simplest form, a distributed ledger is a database held and updated independently by each participant (or node) in a large network. The distribution is unique: records are not communicated to various nodes by a central authority, but are instead independently constructed and held by every node. That is, every single node on the network processes every transaction, coming to its own conclusions and then voting on those conclusions to make certain the majority agree with the conclusions.

Once there is this consensus, the distributed ledger has been updated, and all nodes maintain their own identical copy of the ledger. This architecture allows for a new dexterity as a system of record that goes beyond being a simple database.

Distributed Ledgers are a dynamic form of media and have properties and capabilities that go far beyond static paper-based ledgers.

What Can a Blockchain Do?

For now, the short version is they enable us to formalize and secure new kinds of relationships in the digital world.

The gist of these new kinds of relationships is that the cost of trust (heretofore provided by notaries, lawyers, banks, regulatory compliance officers, governments, etc…) is avoided by the architecture and qualities of distributed ledgers.

The invention of distributed ledgers represents a revolution in how information is gathered and communicated. It applies to both static data (a registry), and dynamic data (transactions). Distributed ledgers allow users to move beyond the simple custodianship of a database and divert energy to how we use, manipulate and extract value from databases — less about maintaining a database, more about managing a system of record.

References/Resources

Where it all began in 2008: Bitcoin White Paper
More on Bitcoin: Mastering Bitcoin, Programming the Open Blockchain
More on Hashing: Blockgeeks
Truth About Blockchain: From HBR