Blockchain Introduction or Distributed Trust
Blockchain Introduction or Distributed Trust
DEFINITION
Blockchain is a constantly growing ledger that keeps a permanent record of all the transactions
that have taken place in a secure, chronological, and immutable way. It can be used for the
secure transfer of money, property, contracts, etc. without requiring a third-party intermediary
such as bank or government. Blockchain is a software protocol, but it could not be run without
the Internet (like SMTP is for email).
What is Blockchain?
A blockchain is a constantly growing ledger which keeps a permanent record of all the
transactions that have taken place in a secure, chronological, and immutable way.
Let's breakdown the definition,
o Ledger: It is a file that is constantly growing.
o Permanent: It means once the transaction goes inside a blockchain, you can put up it
permanently in the ledger.
o Secure: Blockchain placed information in a secure way. It uses very advanced
cryptography to make sure that the information is locked inside the blockchain.
o Chronological: Chronological means every transaction happens after the previous one.
o Immutable: It means as you build all the transaction onto the blockchain, this ledger can
never be changed.
A blockchain is a chain of blocks which contain information. Each block records all of the recent
transactions, and once completed goes into the blockchain as a permanent database. Each time a
block gets completed, a new block is generated.
Blockchain technology can be integrated into multiple areas. The primary use of blockchains is
as a distributed ledger for cryptocurrencies. It shows great promise across a wide range of
business applications like Banking, Finance, Government, Healthcare, Insurance, Media and
Entertainment, Retail, etc.
Blockchain technology has become popular because of the following.
o Time reduction: In the financial industry, blockchain can allow the quicker settlement of
trades. It does not take a lengthy process for verification, settlement, and clearance. It is
because of a single version of agreed-upon data available between all stakeholders.
o Unchangeable transactions: Blockchain register transactions in a chronological order
which certifies the unalterability of all operations, means when a new block is added to
the chain of ledgers, it cannot be removed or modified.
o Reliability: Blockchain certifies and verifies the identities of each interested parties. This
removes double records, reducing rates and accelerates transactions.
o Security: Blockchain uses very advanced cryptography to make sure that the information
is locked inside the blockchain. It uses Distributed Ledger Technology where each party
holds a copy of the original chain, so the system remains operative, even the large
number of other nodes fall.
o Collaboration: It allows each party to transact directly with each other without requiring
a third-party intermediary.
o Decentralized: It is decentralized because there is no central authority supervising
anything. There are standards rules on how every node exchanges the blockchain
information. This method ensures that all transactions are validated, and all valid
transactions are added one by one.
The blockchain technology was described in 1991 by the research scientist Stuart
Haber and W. Scott Stornetta. They wanted to introduce a computationally practical solution
for time-stamping digital documents so that they could not be backdated or tampered. They
develop a system using the concept of cryptographically secured chain of blocks to store the
time-stamped documents.
In 1992, Merkle Trees were incorporated into the design, which makes blockchain more efficient
by allowing several documents to be collected into one block. Merkle Trees are used to create a
'secured chain of blocks.' It stored a series of data records, and each data records connected to the
one before it. The newest record in this chain contains the history of the entire chain. However,
this technology went unused, and the patent lapsed in 2004.
In 2004, computer scientist and cryptographic activist Hal Finney introduced a system
called Reusable Proof Of Work(RPoW) as a prototype for digital cash. It was a significant
early step in the history of cryptocurrencies. The RPoW system worked by receiving a non-
exchangeable or a non-fungible Hashcash based proof of work token in return, created an RSA-
signed token that further could be transferred from person to person.
RPoW solved the double-spending problem by keeping the ownership of tokens registered on a
trusted server. This server was designed to allow users throughout the world to verify its
correctness and integrity in real-time.
Further, in 2008, Satoshi Nakamoto conceptualized the theory of distributed blockchains. He
improves the design in a unique way to add blocks to the initial chain without requiring them to
be signed by trusted parties. The modified trees would contain a secure history of data
exchanges. It utilizes a peer-to-peer network for timestamping and verifying each exchange. It
could be managed autonomously without requiring a central authority. These improvements were
so beneficial that makes blockchains as the backbone of cryptocurrencies. Today, the design
serves as the public ledger for all transactions in the cryptocurrency space.
The evolution of blockchains has been steady and promising. The words block and chain were
used separately in Satoshi Nakamoto's original paper but were eventually popularized as a single
word, the Blockchain, by 2016. In recent time, the file size of cryptocurrency blockchain
containing records of all transactions occurred on the network has grown from 20 GB to 100
GB.
Advantages of Blockchain :
Blockchain technology has become popular because of the following.
o Time reduction: In the financial industry, blockchain can allow the quicker settlement of
trades. It does not take a lengthy process for verification, settlement, and clearance.
o Unchangeable transactions: Blockchain only allows insertion of data, which means
when a new block is added to the chain of ledgers, it cannot be removed or modified.
o Reliability: Blockchain certifies and verifies the identities of each interested parties. This
removes double records, reducing rates and accelerates transactions.
o Security: Blockchain uses very advanced cryptography to make sure that the information
is locked inside the blockchain. It uses Distributed Ledger Technology where each party
holds a copy of the original chain, so the system remains operative, even the large
number of other nodes fall.
o Decentralized: It is because there is no central authority supervising anything. There are
standards rules on how every node exchanges the blockchain information.
Lack of Awareness
There is a lot of discussion about blockchain, but people do not know the true value of
blockchain and how they could implement it in different situations.
Limited availability of technical talent
Today, there are a lot of developers available who can do a lot of different things in every field.
But in the blockchain technology, there are not so many developers available who have
specialized expertise in blockchain technology. Hence, the lack of developers is a hindrance to
developing anything on the blockchain.
Immutable
In immutable, we cannot make any modifications to any of the records. It is very helpful if you
want to keep the integrity of a record and make sure that nobody ever tampers with it. But
immutability also has a drawback.
We can understand this, in the case, when you want to make any revisions, or want to go back
and make any reversals. For example, you have processed payment and need to go back and
make an amendment to change that payment.
Key Management
As we know, blockchain is built on cryptography, which implies that there are different keys,
such as public keys and private keys. When you are dealing with a private key, then you are also
running the risk that somebody may lose access to your private key. It happens a lot in the early
days when bitcoin wasn't worth that much. People would just collect a lot of bitcoin, and then
suddenly forgot what the key was, and those may be worth millions of dollars today.
Scalability
Blockchain like bitcoin has consensus mechanisms which require every participating node to
verify the transaction. It limits the number of transactions a blockchain network can process. So
bitcoin was not developed to do the large scale volumes of transactions that many of the other
institutions are doing. Currently, bitcoin can process a maximum of seven transactions per
second.
Consensus Mechanism
In the blockchain, we know that a block can be created in every 10 minutes. It is because every
transaction made must ensure that every block in the blockchain network must reach a common
consensus. Depending on the network size and the number of blocks or nodes involved in a
blockchain, the back-and-forth communications involved to attain a consensus can consume a
considerable amount of time and resources.
Benefits of Blockchain:
It is safer than any other technology.
To avoid possible legal issues, a trusted third party has to supervise the transactions and
validate the transactions.
There’s no one central point of attack.
Data cannot be changed or manipulated, it’s immutable.
1. Header: It is used to identify the particular block in the entire blockchain. It handles all
blocks in the blockchain. A block header is hashed periodically by miners by changing the
nonce value as part of normal mining activity, also Three sets of block metadata are
contained in the block header.
2. Previous Block Address/ Hash: It is used to connect the i+1th block to the ith block
using the hash. In short, it is a reference to the hash of the previous (parent) block in the
chain.
3. Timestamp: It is a system verify the data into the block and assigns a time or date of
creation for digital documents. The timestamp is a string of characters that uniquely
identifies the document or event and indicates when it was created.
4. Nonce: A nonce number which uses only once. It is a central part of the proof of work
in the block. It is compared to the live target if it is smaller or equal to the current target.
People who mine, test, and eliminate many Nonce per second until they find that Valuable
Nonce is valid.
5. Merkel Root: It is a type of data structure frame of different blocks of data. A Merkle
Tree stores all the transactions in a block by producing a digital fingerprint of the entire
transaction. It allows the users to verify whether a transaction can be included in a block or
not.
Key Characteristics of Blockchain Architecture :
Decentralization: In centralized transaction systems, each transaction needs to be
validated in the central trusted agency (e.g., the central bank), naturally resulting in cost and
the performance jam at the central servers. In contrast to the centralized mode, a third party
is not needed in the blockchain. Consensus algorithms in blockchain are used to maintain
data stability in a decentralized network.
Persistency: Transactions can be validated quickly and invalid transactions would not
be admitted by persons or miners who mining the crypto. It is not possible to delete or roll
back transactions once they are included in the blockchain network. Invalid transactions do
not carry forward further.
Anonymity: Each user can interact with the blockchain with a generated address,
which does not disclose the real identity
of the miner. Note that blockchain cannot guarantee perfect privacy preservation due to the
permanent thing.
Auditability: Blockchain stores data of users based on the Unspent Transaction Output
(UTXO) model.
Every transaction has to refer to some previous unspent transactions. Once the current
transaction is recorded into the
blockchain, the position of those referred unspent transactions switches from unspent to
spent. Due to this process, the transactions can be easily tracked and not harmed between
transactions.
Transparency: The transparency of blockchain is like cryptocurrency, in bitcoin for
tracking every transaction is done by the address. And for security, it hides the person’s
identity between and after the transaction. All the transactions are made by the owner of the
block associated with the address, this process is transparent and there is no loss for anyone
who is involved in this transaction.
Cryptography: The blockchain concept is fully based on security and for that, all the
blocks on the blockchain network want to be secure. And for security, it implements
cryptography and secures the data using the cipher text and ciphers.
1. Public Blockchain:
A public blockchain is a concept where anyone is free to join and take part in the core
activities of the blockchain network. Anyone can read, write, and audit the ongoing activities
on a public blockchain network, which helps to achieve the self-determining, decentralized
nature often authorized when blockchain is discussed. Data on a public blockchain is secure as
it is not possible to modify once they are validated.
The public blockchain is fully decentralized, it has access and control over the ledger, and its
data is not restricted to persons, is always available and the central authority manages all the
blocks in the chain. There is publicly running all operations. Due to no one handling it singly
then there is no need to get permission to access the public blockchain. Anyone can set his/her
own node or block in the network/ chain.
After a node or a block settled in the chain of the blocks, all the blocks are connected like peer-
to-peer connections. If someone tries to attack the block then it forms a copy of that data and it
is accessible only by the original author of the block.
Advantages:
1. A public network operates on an actuate scheme that encourages new persons to join
and keep the network better.
2. There is no agreement in the public blockchain.
3. This means that a public blockchain network is immutable.
4. It has Rapid transactions.
Disadvantages:
1. Public blockchain can be costly in some manner.
2. The person need not give identity, that’s why there is a possibility of corruption of the
block if it is in under attack.
3. Processing speed is sometimes slow.
4. It has Integration issues.
2. Private Blockchain
Miners need permission to access a private blockchain. It works based on permissions and
controls, which give limit participation in the network. Only the entities participating in a
transaction will have knowledge about it and the other stakeholders not able to access it.
By it works on the basis of permissions due to this it is also called a permission-based
blockchain. Private blockchains are not like public blockchains it is managed by the entity that
owns the network. A trusted person is in charge of the running of the blockchain it will control
who can access the private blockchain and also controls the access rights of the private chain
network. There may be a possibility of some restrictions while accessing the network of the
private blockchain.
Advantages:
1. In a private blockchain, users join the network using the invitations and all are verified.
2. Only permitted users/ persons can join the network.
3. Private Blockchain is partially immutable.
Disadvantages:
1. A private blockchain has trust issues, due to exclusive information being difficult to
access it.
2. As the number of participants increases, there is a possibility of an attack on the
registered users.
3. Consortium Blockchain
A consortium blockchain is a concept where it is permissioned by the government and a group
of organizations, not by one person like a private blockchain. Consortium blockchains are
more decentralized than private blockchains, due to being more decentralized it increases the
privacy and security of the blocks. Those like private blockchains connected with government
organizations’ blocks network.
Consortium blockchains is lies between public and private blockchains. They are designed by
organizations and no one person outside of the organizations can gain access. In Consortium
blockchains all companies in between organizations collaborate equally. They do not give
access from outside of the organizations/ consortium network.
Advantages:
1. Consortium blockchain providers will always try to give the fastest output as compared
to public blockchains.
2. It is scalable.
3. A consortium blockchain is low transaction costs.
Disadvantages:
1. A consortium blockchain is unstable in relationships.
2. Consortium blockchain lacks an economic model.
3. It has flexibility issues.
1.5CREATION OF BLOCKS :
Each block within the blockchain is identified by a hash, generated using the SHA256
cryptographic hash algorithm on the header of the block. Each block also references a previous
block, known as the parent block, through the “previous block hash” field in the block header. In
other words, each block contains the hash of its parent inside its own header. The sequence of
hashes linking each block to its parent creates a chain going back all the way to the first block
ever created, known as the genesis block.
Although a block has just one parent, it can temporarily have multiple children. Each of the
children refers to the same block as its parent and contains the same (parent) hash in the
“previous block hash” field. Multiple children arise during a blockchain “fork,” a temporary
situation that occurs when different blocks are discovered almost simultaneously by different
miners. Eventually, only one child block becomes part of the blockchain and the “fork” is
resolved. Even though a block may have more than one child, each block can have only one
parent. This is because a block has one single “previous block hash” field referencing its single
parent.
The “previous block hash” field is inside the block header and thereby affects the current block’s
hash. The child’s own identity changes if the parent’s identity changes. When the parent is
modified in any way, the parent’s hash changes. The parent’s changed hash necessitates a change
in the “previous block hash” pointer of the child. This in turn causes the child’s hash to change,
which requires a change in the pointer of the grandchild, which in turn changes the grandchild,
and so on. This cascade effect ensures that once a block has many generations following it, it
cannot be changed without forcing a recalculation of all subsequent blocks. Because such a
recalculation would require enormous computation, the existence of a long chain of blocks
makes the blockchain’s deep history immutable, which is a key feature of bitcoin’s security.
Structure of a Block
A block is a container data structure that aggregates transactions for inclusion in the public
ledger, the blockchain. The block is made of a header, containing metadata, followed by a long
list of transactions that make up the bulk of its size. The block header is 80 bytes, whereas the
average transaction is at least 250 bytes and the average block contains more than 500
transactions. A complete block, with all transactions, is therefore 1,000 times larger than the
block header. Table 1-1 describes the structure of a block.
Table 1-1. The structure of a block
4 bytes Block Size The size of the block, in bytes, following this field
Block Header
The block header consists of three sets of block metadata. First, there is a reference to a
previous block hash, which connects this block to the previous block in the blockchain. The
second set of metadata, namely the difficulty, timestamp, and nonce. The third piece of
metadata is the merkle tree root, a data structure used to efficiently summarize all the
transactions in the block. Table 1-2 describes the structure of a block header.
Table 1-2. The structure of the block header
32 Previous Block
bytes Hash A reference to the hash of the previous (parent) block in the chain
32
bytes Merkle Root A hash of the root of the merkle tree of this block’s transactions
4 bytes Difficulty Target The proof-of-work algorithm difficulty target for this block
000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f
Mining
Mining is a resource-intensive process by which new blocks are added to the blockchain. Blocks
contain transactions that are validated via the mining process by mining nodes and are added to
the blockchain. This process is resource-intensive in order to ensure that the required resources
have been spent by miners in order for a block to be accepted. New coins are minted by the
miners by spending the required computing resources. This also secures the system against
frauds and double spending attacks while adding more virtual currency to the bitcoin ecosystem.
Roughly one new block is created (mined) every 10 minute. Miners are rewarded with new coins
if and when they create new blocks and are paid transaction fees in return of including
transactions in their blocks. New blocks are created at an approximate fixed rate. Also, the rate
of creation of new bitcoins decreases by 50%, every 210,000 blocks, roughly every 4 years.
When bitcoin was initially introduced, the block reward was 50 bitcoins; then in 2012, this was
reduced to 25 bitcoins. In July 2016, this was further reduced to 12.5 coins (12 coins) and the
next reduction is estimated to be on July 4, 2020. This will reduce the coin reward further down
to approximately six coins.
Approximately 144 blocks, that is, 1,728 bitcoins are generated per day. The number of actual
coins can vary per day; however, the number of blocks remains at 144 per day. Bitcoin supply is
also limited and in 2140, almost 21 million bitcoins will be finally created and no new bitcoins
can be created after that. Bitcoin miners, however, will still be able to profit from the ecosystem
by charging transaction fees.