Unit 2-1
Unit 2-1
BLOCKCHAIN
TECHNOLOGY
BITCOIN
Bitcoin, it's a protocol, a digital currency, and a platform.
It is a combination of peer-to-peer network, protocols, and
software that facilitate the creation and usage of the digital
currency named bitcoin.
Bitcoin with a capital B is used to refer to the Bitcoin protocol,
whereas bitcoin with a lowercase b is used to refer to bitcoin,
the currency.
Nodes in peer-to-peer network talk to each other using the
Bitcoin protocol.
Decentralization of currency was made possible for the first
time with the invention of bitcoin.
The double spending problem was solved in an elegant and
ingenious way in bitcoin
BITCOIN
Keys and addresses :
Elliptic curve cryptography is used to generate public and
private key pairs in the Bitcoin network.
The bitcoin address is created by taking the corresponding
public key of a private key and hashing it twice.
First with the SHA256 algorithm and then with RIPEMD160.
The resultant 160-bit hash is then prefixed with a version
number and finally encoded with a Base58Check encoding
scheme.
The bitcoin addresses are 26-35 characters long and begin with
digit 1 or 3.
A typical bitcoin address looks like a string shown here:
1ANAguGG8bikEv2fYsTBnRUmx7QUcK58wt
BITCOIN
Private blockchains as the name implies are private and are open
only to a consortium or group of individuals or organizations that
has decided to share the ledger among themselves.
Semi-private blockchains
The key idea is that, unlike many other blockchains, the records
are stored contiguously instead of sorted into blocks.
This concept is used in Ripple.
TYPES OF BLOCKCHAIN
Tokenized blockchains
Blockchains are standard blockchains that generate
cryptocurrency as a result of a consensus process via mining
or via initial distribution.
Tokenless blockchains
Probably not real blockchains because they lack the basic unit
of transfer of value but are still valuable in situations where
there is no need to transfer value between nodes and only
sharing some data among various already trusted parties is
required.
PLATFORMS FOR DECENTRALIZATION
Ethereum
Ethereum the first blockchain that introduced a Turing
complete language and the concept of a virtual machine.
This is in contrast to the limited scripting language in bitcoin
and many other cryptocurrencies.
Availability of Turing-complete language called Solidity,
endless possibilities have opened for the development of
decentralized applications.
Proposed in 2013 by Vitalik Buterin and provides a public
blockchain to develop smart contracts and decentralized
applications.
Currency tokens on Ethereum are called Ethers.
PLATFORMS FOR DECENTRALIZATION
Maidsafe
Maidsafe provides a SAFE (Secure Access for Everyone)
network that is made up of unused computing resources, such
as storage, processing power, and the data connections of its
users.
The files on the network are divided into small chunks of data
that are encrypted and distributed throughout the network
randomly.
Data can only be retrieved by its respective owner.
One key innovation is that duplicate files are automatically
rejected on the network, which helps reduce the need for
additional computing resources to manage the load.
It uses Safecoin as a token to incentivize its contributors.
PLATFORMS FOR DECENTRALIZATION
Lisk
Lisk is a blockchain application development and
cryptocurrency platform.
It allows developers to use JavaScript to build decentralized
applications and host them in their own respective sidechains.
Lisk uses the Delegated Proof of Stake (DPOS) mechanism
for consensus where 101 nodes can be elected to secure the
network and propose blocks.
It uses the Node.js and JavaScript backend whereas the
frontend, such as CSS3, HTML5, and JavaScript.
Lisk uses LSK coin as a currency on the blockchain.
Another derivative of Lisk is Rise, which is a Lisk-based
decentralized application and digital currency platform.
It has more focus on the security of the system.
CONSENSUS IN BLOCKCHAIN
Distributed computing concept to provide a means of agreeing
to a single version of truth by all peers on the blockchain
network.
Two categories of consensus :
1. Proof-based, leader-based, or the Nakamoto consensus
where a leader is elected and proposes a final value.
2. Byzantine fault tolerance-based, which is a more traditional
approach based on rounds of votes.
Proof of Work
Proof that enough computational resources have been spent
before proposing a value for acceptance by the network.
Used in bitcoin and other cryptocurrencies.
Only one mechanism successful against Sybil attacks. (A
single node to operate many active fake identities)
Proof of Stake
Works on the idea that a node or user has enough stake in the
system.
Idea was first introduced by Peercoin and is going to be used
in the Ethereum blockchain.
Second important concept is coin age, which is a derived
from the amount of time and the number of coins that have
not been spent.
In this model, the chances of proposing and signing the next
block increase with the coin age.
Delegated Proof of Stake
Used in the bitshares blockchain.
An innovation over standard PoS where each node that has
stake in the system can delegate the validation of a
transaction to other nodes by voting.
Proof of Elapsed Time
Introduced by Intel, it uses Trusted Execution Environment
(TEE) to provide randomness and safety in the leader election
process via a guaranteed wait time.
Requires the Intel SGX (Software Guard Extensions)
processor in order to provide the security guarantee.
Deposit-based consensus
Nodes that wish to participate on the network have to put in a
security deposit before they can propose a block.
Proof of importance
Relies on how much stake a user has in the system but it also
monitors the usage and movement of tokens by the user to
establish a level of trust and importance.
This is used in Nemcoin.
Federated consensus or federated Byzantine consensus
Used in the stellar consensus protocol, nodes in this protocol
keep a group of publicly trusted peers and propagates only
those transactions that have been validated by the majority of
trusted nodes.
Reputation-based mechanisms
Leader is elected on the basis of the reputation it has built
over time on the network.
This can be based on the voting from other members.
Practical Byzantine Fault Tolerance
Byzantine Generals’ Problem
Byzantine Generals’ problem was acknowledged in 1982 as
a logical decision puzzle.
Its basis on how generals of the same side with different
troops might have a communication problem in making
decisions about the next move against the enemy.
The problem states like a group of generals with their army
are about to attack their enemy. They surrounded the enemy’s
castle from 4 different directions. Now how would they
communicate the decision of attacking or retreating at the
same time?
Blockchain seems to resolve this problem with the Byzantine
fault tolerance (BFT) consensus mechanism.
To ensure the success of the generals’ team, they need
an algorithm that could adhere to the following
conditions:
• All the troop generals need to agree on the next action of the
plan.
• The generals should be trustworthy and loyal to the system.
• Generals must not get influenced to become network traitors.
• They need to follow the algorithm of the system.
• The group of generals needs to reach a consensus or decision,
irrespective of the traitors’ actions.
• The system or network should not lead to a 51% attack at any
point of action.
Byzantine Fault Tolerance (BFT) is a consensus approach ,the
system should stay intact even if one of the nodes (or general)
fails.
In addition, BFT aims to reduce the effect of malicious byzantine
Practical Byzantine Fault Tolerance (PBFT)
An attempt to overcome the Byzantine problems, Barbara
Liskov and Miguel Castro introduced a Practical Byzantine Fault
Tolerance (pBFT) consensus algorithm in 1999.
They aim to ensure a practical byzantine state machine
replication for tolerating malicious or byzantine nodes.
Essential aspects of the pBFT consensus algorithm:
• All nodes are assembled in a sequence.
• One network node serves as a leader node, and the rest of
them are backup nodes.
• The primary or leader node serves the client’s request. It
works as a moderator between client and backup nodes.
• All nodes are capable of communicating with other nodes to
check the honest nodes.
• Honest nodes should be able to reach a consensus for the next
global change in the network based on majority rule.
• It identifies the source of the message to make sure it’s sent
by the correct sender.
• Ensures the message has not been modified or corrupted in
between.
ADVANTAGES AND DISADVANTAGES OF
BLOCKCHAIN
Advantages
Open:
Accessible to all means anyone can become a participant in
the contribution to blockchain technology.
One does not require any permission from anybody to join the
distributed network.
Verifiable:
Store information in a decentralized manner so everyone can
verify the correctness of the information by using zero-
knowledge proof .
Permanent:
Records or information , permanent means one needs not
worry about losing the data because duplicate copies are
stored at each local node as it is a decentralized network.
Free from Censorship:
As it does not have control of any single party rather it has the
concept of trustworthy nodes for validation and consensus
protocols that approve transactions by using smart contracts.
Tighter Security:
Uses hashing techniques to store each transaction on a block
that is connected to each other so it has tighter security.
SHA 256 hashing technique for storing transactions.
Immutability:
Data cannot be tampered ,due to its decentralized structure.
Any change will be reflected in all the nodes.
• Transparency:
• Histories of transactions transparent everywhere all the nodes
in the network have a copy of the transaction in the network.
• Any changes occur in the transaction it is visible to the other
nodes.
• Efficiency:
• Removes any third-party intervention between transactions
and removes the mistake making the system efficient and
faster.
• Settlement is made easier and smooth.
• Cost Reduction:
• Needs no third man it reduces the cost for the businesses and
gives trust to the other partner.
• Disadvantages
• Scalability:
• Cannot be scaled due to the fixed size of the block for storing
information.
• The block size is 1 MB due to which it can hold only a couple of
transactions on a single block.
• Immaturity:
• Only a couple-year-old technology so people do not have much
confidence in it.
• Energy Consuming:
• For verifying any transaction a lot of energy is used.
• 0.3 percent of the world’s electricity had been used by 2018 in
the verification of transactions done using blockchain technology.
Time-Consuming:
To add the next block in the chain miners need to compute nonce
values many times .
Legal Formalities:
In some countries, the use of blockchain technology applications
is banned like cryptocurrency due to some environmental issues.
Not promoting to use blockchain technology in the commercial
sector.
Storage:
Blockchain databases are stored on all the nodes of the network
creates an issue with the storage, increasing number of
transactions will require more storage.
Regulations:
Blockchain faces challenges with some financial institution.