Blockchain Technology

Introduction and Fundamentals of Blockchain

 

Odoo CMS - a big picture


Blockchains are incredibly popular nowadays. But what is the blockchain? How do they work, what problems do they solve and how can they be used?


Like the name indicates, a blockchain is a chain of blocks that contain information. This technique was originally described in 1991 by a group of researchers and was originally intended to timestamp digital documents so that it’s not possible to backdate them or to tamper with them. Almost like a notary.


However, it went by mostly unused until it was adapted by “Satoshi Nakamoto” in 2009 to create the digital cryptocurrency Bitcoin.

Odoo image and text block

Here is the diagram you can see that the closer look of the block, each block contains some data the hash of the block and the hash of the previous block. The data is stored inside in a block depends on the type of blockchain.
The bitcoin blockchain for example stores the details about transactions in here, such as sender, receiver and amount of coins.

A block also has a hash. You can compare a hash to a fingerprint. It identifies a block and all of its contents and it’s always unique, just as a fingerprint.
Once a block is created, it’s hash is being calculated, changing something inside the block will cause the hash to change.

Odoo text and image block


So in other words: hashes are very useful when you want to detect changes to blocks. If the fingerprint of a block changes, it no longer is the same block. The third element inside each block is the hash of the previous block.

This effectively creates a chain of blocks and it’s this technique that makes a blockchain so secure.
 

Let’s take an example here: here we have a chain of 3 blocks. As you can see, each block has a hash and the hash of the previous block. So the block no.3 points to block no.2 and block no.2 points to block no.1.

Now the first block is a bit special, it cannot point to previous blocks because it’s the first one. We call this block the genesis block.

 

Now let’s say that you tamper with the second block. This cause the hash of the block to change as well.  
In turn that will make block 3 and all following blocks invalid because they longer store a valid hash of the previous block.
So changing in a single block will make following blocks invalid. But using hashes is not enough to prevent tampering. Computers these days are very fast and can calculate hundreds of thousands of hashes per second.

You could effectively tamper with a block and recalculate all the hashes of other blocks to make your blockchain valid again. So to mitigate this, blockchains have something called proof-of-work. It’s a mechanism that slows down the creation of new blocks.

In bitcoin’s case: it takes about 10 minutes to calculate the required proof-of-work and add a new block to the chain.

This mechanism makes it very hard to tamper with the blocks because if you tamper with 1 block, you will need to recalculate the proof-of-work for all blocks. So the security of a blockchain comes from its creative use of hashing and the proof-of-work mechanism. But there is one more way that blockchains secure themselves and that’s by being distributed. Instead of using a central entity to manage the chain, blockchains use a peer-to-peer network and anyone is allowed to join.

When someone joins this network, he gets the full copy of the blockchain. The node can use this to verify that everything is still in order.

 

Now let’s see what happens when someone creates a new block. That new block is sent to everyone on the network. Each node then verifies the block to make sure that it hasn’t been tampered with. If everything checks out each node adds this block to their own blockchain.

 

All the nodes in this network create consensus. They agree about what blocks are valid and which aren’t. Blocks that are tampered with will be rejected by other nodes in the network. So to the successfully tamper with a blockchain you will need to tamper with all blocks on the chain, redo the proof-of-work for each block and take control of more than 50% of the peer-to-peer network.

 

Only then will your tamper block become accepted by everyone else. So this is almost impossible to do! Blockchains are also constantly evolving.
 

One of the more recent developments is the creation of the smart contract. These contracts are simple programs that are stored on the blockchain and can be used to automatically exchange coins based on certain conditions.
 

The creation of blockchain technology peaked a lot of people’s interest. Soon others realize that the technology could be used for other things like storing medical records, E-notary, collecting taxes.

Centralized vs Distributed Ledger Technology:

Centralized ledgerDistributed Ledger
A centralized ledger tracks asset movements within the financial system between institutions.A distributed ledger eliminates the need for central authorities to clarify asset ownership instead it is held and verified by many institutions to cut down on fraud and manipulation.
The traditional system relies on central authority to generate trust and transfer value.Trust comes from the process itself rather than the status of any one player.
When money passes between participants, a central counterparty records the transfer to prevent cheating.Participants validate changes collectively, and changes are updated across the network almost immediately.
Participants then undertake costly, time-consuming and duplicative reconciliation with their own system.The system has great potential to speed up transaction times, improve transparency and reduce costs


Blockchain vs Distributed Ledger Technology: 

BlockchainDistributed Ledger Technology
A distributed ledger is a database that exists across several locations or among multiple participation.A blockchain is essentially a shared database filled with entries that must be confirmed and encrypted.
The blockchain is just one type of distributed ledger although blockchain is a sequence of blocks.Distributed ledgers do not require such chain.
The blockchain is a true peer-to-peer network that will reduce on some types of third-party intermediaries.Removing the intermediary party from the equation is what makes the concept of distributed ledger technology so appealing.
The name blockchain refers to the “block” that get added to the chain of transaction records.A distributed ledger doesn’t necessarily need to have a data structure in blocks.
Blockchain utilizes the concept of the distributed ledger to store its transactions.A distributed ledger is merely a type of database spread across multiple sites, region, or participants.

Private, Public and Permission-based Blockchain Networks: 

Public Blockchain NetworkPrivate Blockchain NetworkPermissioned blockchain Network
A public blockchain network is completely open and anyone is free to join and participate in the core activities of the blockchain network.A private blockchain network allows only selected entry of verified participants, like those for a private business, one can OPT (Optional Practical Training) for a private blockchain implementation.A permission blockchain network allows a mixed bag between the public and private blockchains with lots of customization options.
In this network, anyone can join or leave, read, write and audit the ongoing activities on the public blockchain network which helps to maintain it’s self-governed nature.A participant can join such a private network only through an authentic and verified invitation, and a validation is necessary either by the network operators or by a clearly defined set protocol implemented by the network.The available options include allowing anyone to join the permissioned network after suitable verification of their identity, and allocation of select and designated permissions to perform only certain activities on the network.
The public network operates on an incentivizing scheme that encourages new participants to join and keep the network agile.The primary distinction between the public and private blockchains is that private blockchains control who is allowed to participate in the network, execute the consensus protocol that decides the mining rights and rewards, and maintain the shared ledger.Such blockchains are built such that they grant special permissions to each participant for specific functions to be performed—like read, access and write information on the blockchains.
Public blockchains offer the particularly valuable solution from the point of view of a truly decentralized, democratized and authority-free operation.In true sense, a private blockchain is not decentralized and is a distributed ledger that operates as a closed, secure database based on cryptography concepts.Businesses and enterprises are increasingly opting for permissioned blockchain networks, as they can put in the necessary restrictions selectively while configuring the networks, and control the activities of the various participants in the desired roles.

Peer-to-Peer Network: The peer-to-peer or decentralized network is a group of independent computers called nodes which are interconnected with each other to share data with each other without the use of the centralized computer.


Advantages of Blockchain:

Transparency: if any member of the network tries to make a change to a block everyone else in the chain can see where changes happened and can decide whether this is an authorized change.

Tamper-proof information: in practice,  say the distributed ledger is shared across 5000 computers and hacker wanted to change some information recorded in one of the blocks, they would have to hack all 5000 computers simultaneously. This is an arduous task.

Instantaneous transfer: Reconciliation and payment of transaction happen in less than 10 minutes versus an average of few days for the third-party system.

Trustless: Blockchain allows digital transactions to happen between parties who do not trust each other. Imagine a digital coin stored in a file on your computer. You may copy and paste the file an infinite number of times. The value of this digital currency would close to zero. In the past, central authorities (banks) have acted as ledgers, keeping records of the number of coins each of us has available as a centralized Ledger, to avoid the problem of duplication.

Immutable: Once a transaction is agreed and shared across the distributed network it becomes close to impossible to undo. In fact, over time, it becomes harder and harder to undo. In a public ledger, like Bitcoin, this means that you can explore the blockchain and discover the number of Bitcoins in anyone's account, or trace where funds were distributed to. In other scenarios, this could be used to track supply chains or check who accessed certain files on a network.

Future Scopes

  • Full stack blockchain

  • Decentralized prediction platform

  • Decentralized borderless virtual nations

  • Electronic contract

  • Anti-counterfeit platform

  • Helping local economies to grow

  • Asset protection

  • Internet of things

  • Data storage on the network