Blockchain Basics – Data Science Central

Blockchain Basics

Let’s understand ledgers which form the basis of blockchain implementation. A ledger is a document which records summarized financial information as debits and credits, and shows the current balances.

A traditional ledger entry looks like below. In the current world, companies usually store this ledger at a centralized location – following a Client / Server Architecture

There are many challenges with the current way in which these traditional ledgers work. When transferring assets, usually a third party is involved. The involvement of third part not only introduces a mighty fee, but also leads to delays. Since these ledgers are centralized, not all parties have visibility into such transactions, and thus the process is very opaque, and susceptible to frauds. Also, the client server architecture is not as sturdy.

Blockchain is a technology which records movement of assets from one entity to another, and every such movement is called a transaction. When such a transaction occurs, an entry is made into a ledger, recording this movement. A series of related transactions are stored in a block.

Blockchain maintains a distributed digital open ledger system, which records a series (chain) of such blocks, the asset usually being digital coins / virtual currencies / clever contracts, like Bitcoin, Etherium, etc. This ledger is maintained on numerous peer knots in a network.

All this is achieved using a combination of three technologies:

  • Blockchain maintains an open ledger, which means that anyone in the network could send fresh transactions, and create fresh blocks. The ledger records all the transactions, and is essentially stored on the member knots in the network. Each peer in the network maintains a utter copy of this ledger.
  • The ledger is not centrally stored thus blockchain does not rely on a single central authority, and therefore not presenting a risk of a single point of failure.
  • A few systems, which go after such an architecture today are Skype and BitTorrent
  • This cryptographic system uses a pair of keys – public and private keys, to encrypt and decrypt the data. These keys are merely numerical values, which are paired together.
  • Public Key is usually collective with everyone, with whom, the user would like to communicate. Private Key is known only to the user, and is not disclosed to anyone else. This empowers other users to encrypt a message, using the receiver’s public key. However, the message can be read only by the receiver, since the receiver alone has the private key, to decrypt the message.
  • In blockchain, asymmetric cryptography is used to create a set of credentials for your account, to ensure that only you can transfer your tokens (Bitcoin / Etherium), and only the intended recipient receives it.
  • A digital media or a group of digital media when put through a hash function generates a motionless length value (hash value), which uniquely represents that data. If one switches even a single bit in the input (digital media), the hash output is downright different from the original one. Thus, this hash value calculated on the input is used as a digital signature

Blockchain itself is a data structure, and its data can be stored either in a file or a database. It is an ordered linked list of blocks of transactions, where each subsequent block maintains a link (hash) of the previous (parent) block. Each block in the chain has a unique hash, which is computed by the knot on the basis of contents of the block.

The block consists of a header and data about transactions. For the set of transactions in a block, hash values are generated and stored in a Merkle Root for the block. If the contents of a block switch even by a bit, the hash value of the block switches.

Merkle Root is the root of a Merkle tree or a Hash Tree. Merkle tree is a tree in which every non-leaf knot stores the value of hash of hash of its child knots. The leaf knots contain the actual transactions. Hash trees permit efficient and secure verification of the contents of the block data, and are essential for the integrity of the data. It permits to track if there are any switches done to any transaction within the block of the tree, by regenerating the hash and comparing it with the original hash.

When fresh transactions are digitally signed, and submitted in the network, there are special knots called miners, which confirm the validity of the transactions, bundle them in a block, and add it to the blockchain. This block then gets propagated to the network. The miners are required to solve a “proof of work” problem, which requires very mighty computing. In this, the miners are required to guess a number, which when crunched with the rest of the block data, computes a hash that is smaller than a certain number. That number is related to the ‘difficulty’ of mining, and essentially translates to the total network processing power. As more and more computers join in to mine, the difficulty level gets stiffer, in a self-regulating cycle.

Whichever miner is able to find the solution, gets to add the block to the chain, and in turn gets rewarded with the virtual currency. This process of adding blocks to the blockchain network is called mining.

A blockchain network could be Public or Private. In a public network, anyone in the network can read, write, as well as mine the blockchain. Security model is based on “proof of work”. In a private network, the participants are known and trusted, and the ledger is open only to the knots in the private network.

Tho’ there is a common belief that the history in blockchain is immutable, in reality, it is not the case. Once the contents of a block switches even by a bit, a fresh hash is generated for that block. That fresh hash is always different from the original hash. The subsequent block which still holds the original hash of the previous block, now has a cracked link, and thus the chain is violated.

The fact that the regeneration of the same hash for that block is enormously hard, thus re-writing parts of the invalid Blockchain will take a very long time. Once done, one would also be required to sync up with the rest of the growing network. This is what makes the history secure and almost immutable.

Blockchain is still evolving and there are newer better versions of its implementation coming up – like Etherium is an improved version of Bitcoin. There is a lot of potential for Blockchain, and companies are already exploring on how best they can leverage this technology.

Blockchain Basics – Data Science Central

Blockchain Basics

Let’s understand ledgers which form the basis of blockchain implementation. A ledger is a document which records summarized financial information as debits and credits, and shows the current balances.

A traditional ledger entry looks like below. In the current world, companies usually store this ledger at a centralized location – following a Client / Server Architecture

There are many challenges with the current way in which these traditional ledgers work. When transferring assets, usually a third party is involved. The involvement of third part not only introduces a mighty fee, but also leads to delays. Since these ledgers are centralized, not all parties have visibility into such transactions, and thus the process is very opaque, and susceptible to frauds. Also, the client server architecture is not as sturdy.

Blockchain is a technology which records movement of assets from one entity to another, and every such movement is called a transaction. When such a transaction occurs, an entry is made into a ledger, recording this movement. A series of related transactions are stored in a block.

Blockchain maintains a distributed digital open ledger system, which records a series (chain) of such blocks, the asset usually being digital coins / virtual currencies / clever contracts, like Bitcoin, Etherium, etc. This ledger is maintained on numerous peer knots in a network.

All this is achieved using a combination of three technologies:

  • Blockchain maintains an open ledger, which means that anyone in the network could send fresh transactions, and create fresh blocks. The ledger records all the transactions, and is essentially stored on the member knots in the network. Each peer in the network maintains a utter copy of this ledger.
  • The ledger is not centrally stored thus blockchain does not rely on a single central authority, and therefore not presenting a risk of a single point of failure.
  • A few systems, which go after such an architecture today are Skype and BitTorrent
  • This cryptographic system uses a pair of keys – public and private keys, to encrypt and decrypt the data. These keys are merely numerical values, which are paired together.
  • Public Key is usually collective with everyone, with whom, the user would like to communicate. Private Key is known only to the user, and is not disclosed to anyone else. This empowers other users to encrypt a message, using the receiver’s public key. However, the message can be read only by the receiver, since the receiver alone has the private key, to decrypt the message.
  • In blockchain, asymmetric cryptography is used to create a set of credentials for your account, to ensure that only you can transfer your tokens (Bitcoin / Etherium), and only the intended recipient receives it.
  • A digital media or a group of digital media when put through a hash function generates a motionless length value (hash value), which uniquely represents that data. If one switches even a single bit in the input (digital media), the hash output is downright different from the original one. Thus, this hash value calculated on the input is used as a digital signature

Blockchain itself is a data structure, and its data can be stored either in a file or a database. It is an ordered linked list of blocks of transactions, where each subsequent block maintains a link (hash) of the previous (parent) block. Each block in the chain has a unique hash, which is computed by the knot on the basis of contents of the block.

The block consists of a header and data about transactions. For the set of transactions in a block, hash values are generated and stored in a Merkle Root for the block. If the contents of a block switch even by a bit, the hash value of the block switches.

Merkle Root is the root of a Merkle tree or a Hash Tree. Merkle tree is a tree in which every non-leaf knot stores the value of hash of hash of its child knots. The leaf knots contain the actual transactions. Hash trees permit efficient and secure verification of the contents of the block data, and are essential for the integrity of the data. It permits to track if there are any switches done to any transaction within the block of the tree, by regenerating the hash and comparing it with the original hash.

When fresh transactions are digitally signed, and submitted in the network, there are special knots called miners, which confirm the validity of the transactions, bundle them in a block, and add it to the blockchain. This block then gets propagated to the network. The miners are required to solve a “proof of work” problem, which requires very intense computing. In this, the miners are required to guess a number, which when crunched with the rest of the block data, computes a hash that is smaller than a certain number. That number is related to the ‘difficulty’ of mining, and essentially translates to the total network processing power. As more and more computers join in to mine, the difficulty level gets tighter, in a self-regulating cycle.

Whichever miner is able to find the solution, gets to add the block to the chain, and in turn gets rewarded with the virtual currency. This process of adding blocks to the blockchain network is called mining.

A blockchain network could be Public or Private. In a public network, anyone in the network can read, write, as well as mine the blockchain. Security model is based on “proof of work”. In a private network, the participants are known and trusted, and the ledger is open only to the knots in the private network.

However there is a common belief that the history in blockchain is immutable, in reality, it is not the case. Once the contents of a block switches even by a bit, a fresh hash is generated for that block. That fresh hash is always different from the original hash. The subsequent block which still holds the original hash of the previous block, now has a violated link, and thus the chain is cracked.

The fact that the regeneration of the same hash for that block is enormously hard, thus re-writing parts of the invalid Blockchain will take a very long time. Once done, one would also be required to sync up with the rest of the growing network. This is what makes the history secure and almost immutable.

Blockchain is still evolving and there are newer better versions of its implementation coming up – like Etherium is an improved version of Bitcoin. There is a lot of potential for Blockchain, and companies are already exploring on how best they can leverage this technology.

Related video:

Leave a Reply