BlockChain Technologies (20CS32015)
BlockChain Technologies (20CS32015)
BlockChain Technologies (20CS32015)
10x2=20
b.
c.
Smart contracts are code written into a blockchain that executes the
terms of an agreement or contract from outside the chain. It
automates the actions that would otherwise be completed by the
parties in the agreement, which removes the need for both parties to
trust each other.
f.
A consensus mechanism is any method used to achieve agreement,
trust, and security across a decentralized computer network. In the
context of blockchains and cryptocurrencies.
Blockchain Consensus Algorithms Popular in the Market
Proof of Work (PoW) ...
Proof of Stake (PoS) ...
Proof of Authority. ...
Byzantine Fault Tolerance (BFT) ...
Direct Acyclic Graph (DAG) ...
Proof of Capacity (PoC) ...
Proof of Burn (PoB) ...
Proof of Identity (PoI)
g.
PART- B
2
a. Types of Blockchain 5 Marks
The basic application of the blockchain is to perform transactions in a secure
network. That’s why people use blockchain and ledger technology in different
scenarios. One can set up multichain to prevent unauthorized access to sensitive
data. It is not available to the public, and can only be available to authorized
entities in the organization. It depends on the organization which type it requires to
choose for their work.
By using blockchain we can track orders and payments from end to end.
Advantage using blockchain :
It provides greater trust among users.
It provides greater security among data.
Reduce the cost of production.
Improve Speed.
Invocation and tokenization.
It provides immutable records.
Smart contracts
Public Blockchain.
Private Blockchain.
Hybrid Blockchain.
Consortium Blockchain.
Types of Blockchain
1. Public Blockchain
As the name is public this blockchain is open to the public, which means it is not
owned by anyone.
Anyone having internet and a computer with good hardware can participate in this
public blockchain.
All the computer in the network hold the copy of other nodes or block present in
the network
In this public blockchain, we can also perform verification of transactions or
records
Advantages:
Trustable: There are algorithms to detect no fraud. Participants need not worry
about the other nodes in the network
Secure: This blockchain is large in size as it is open to the public. In a large size,
there is greater distribution of records
Anonymous Nature: It is a secure platform to make your transaction properly at the
same time, you are not required to reveal your name and identity in order to
participate.
Decentralized: There is no single platform that maintains the network, instead
every user has a copy of the ledger.
Disadvantages:
Processing: The rate of the transaction process is very slow, due to its large size.
Verification of each node is a very time-consuming process.
Energy Consumption: Proof of work is high energy-consuming. It requires good
computer hardware to participate in the network
Acceptance: No central authority is there so governments are facing the issue to
implement the technology faster.
Use Cases: Public Blockchain is secured with proof of work or proof of stake they
can be used to displace traditional financial systems. The more advanced side of
this blockchain is the smart contract that enabled this blockchain to support
decentralization. Examples of public blockchain are Bitcoin, Ethereum.
2. Private Blockchain
These blockchains are not as decentralized as the public blockchain only selected
nodes can participate in the process, making it more secure than the others.
Speed: The rate of the transaction is high, due to its small size. Verification of each
node is less time-consuming.
Scalability: We can modify the scalability. The size of the network can be decided
manually.
Privacy: It has increased the level of privacy for confidentiality reasons as the
businesses required.
Balanced: It is more balanced as only some user has the access to the transaction
which improves the performance of the network.
Disadvantages:
Count- Since there are few nodes if nodes go offline the entire system of
blockchain can be endangered.
Use Cases: With proper security and maintenance, this blockchain is a great asset
to secure information without exposing it to the public eye. Therefore companies
use them for internal auditing, voting, and asset management. An example of
private blockchains is Hyperledger, Corda.
3. Hybrid Blockchain
It is the mixed content of the private and public blockchain, where some part is
controlled by some organization and other makes are made visible as a public
blockchain.
Ecosystem: Most advantageous thing about this blockchain is its hybrid nature. It
cannot be hacked as 51% of users don’t have access to the network
Cost: Transactions are cheap as only a few nodes verify the transaction. All the
nodes don’t carry the verification hence less computational cost.
Architecture: It is highly customizable and still maintains integrity, security, and
transparency.
Operations: It can choose the participants in the blockchain and decide which
transaction can be made public.
Disadvantages:
4. Consortium Blockchain
It is a creative approach that solves the needs of the organization. This blockchain
validates the transaction and also initiates or receives transactions.
Speed: A limited number of users make verification fast. The high speed makes
this more usable for organizations.
Authority: Multiple organizations can take part and make it decentralized at every
level. Decentralized authority, makes it more secure.
Privacy: The information of the checked blocks is unknown to the public view. but
any member belonging to the blockchain can access it.
Flexible: There is much divergence in the flexibility of the blockchain. Since it is
not a very large decision can be taken faster.
Disadvantages:
Approval: All the members approve the protocol making it less flexible. Since one
or more organizations are involved there can be differences in the vision of
interest.
Transparency: It can be hacked if the organization becomes corrupt. Organizations
may hide information from the users.
Vulnerability: If few nodes are getting compromised there is a greater chance of
vulnerability in this blockchain
Use Cases: It has high potential in businesses, banks, and other payment
processors. Food tracking of the organizations frequently collaborates with their
sectors making it a federated solution ideal for their use. Examples of consortium
Blockchain are Tendermint and Multichain.
b. 5 Marks
Merkle tree: A Merkle tree is a binary tree formed by hash pointers, and
named after its creator, Ralph Merkle.
The different types of nodes in a Merkle tree are:
Root node: The root of the Merkle tree is known as the Merkle root and this
Merkle root is stored in the header of the block.
Leaf node: The leaf nodes contain the hash values of transaction data. Each
transaction in the block has its data hashed and then this hash value (also
known as transaction ID) is stored in leaf nodes.
Non-leaf node: The non-leaf nodes contain the hash value of their respective
children. These are also called intermediate nodes because they contain the
intermediate hash values and the hash process continues till the root of the
tree.
Further, a Merkle tree is binary in nature. This means that the number of
leaf nodes needs to be even for the Merkle tree to be constructed properly.
In case there is an odd number of leaf nodes, the tree duplicates the last
hash and makes the number of leaf nodes even.
Why Merkle Trees are Important For Blockchain?
In a centralized network, data can be accessed from one single copy. This
means that nodes do not have to take the responsibility of storing their own
copies of data and data can be retrieved quickly.
However, the situation is not so simple in a distributed system.
Let us consider a scenario where blockchain does not have Merkle trees. In
this case, every node in the network will have to keep a record of every single
transaction that has occurred because there is no central copy of the
information.
This means that a huge amount of information will have to be stored on every
node and every node will have its own copy of the ledger. If a node wants to
validate a past transaction, requests will have to be sent to all nodes,
requesting their copy of the ledger. Then the user will have to compare its own
copy with the copies obtained from several nodes.
Any mismatch could compromise the security of the blockchain. Further on,
such verification requests will require huge amounts of data to be sent over the
network, and the computer performing this verification will need a lot of
processing power for comparing different versions of ledgers.
Without the Merkle tree, the data itself has to be transferred all over the
network for verification.
Merkle trees allow comparison and verification of transactions with viable
computational power and bandwidth. Only a small amount of information
needs to be sent, hence compensating for the huge volumes of ledger data that
had to be exchanged previously.
Merkle trees use a one-way hash function extensively and this hashing separates
the proof of data from data itself
3
A
5 Marks
Digital signatures are often used to implement electronic signatures, a broader term
that refers to any electronic data that carries the intent of a signature, but not all
electronic signatures use digital signatures. Digital signatures employ asymmetric
cryptography. Asymmetric cryptography, also known as public key cryptography
(PKI), uses public and private keys to encrypt and decrypt data. The keys are
simply large numbers that have been paired together but are not identical
(asymmetric). One key in the pair can be shared with everyone; it is called
the public key. The other key in the pair is kept secret; it is called the private key.
Either of the keys can be used to encrypt a message; the opposite key from the one
used to encrypt the message is used for decryption.In many instances they provide a
layer of validation and security to messages sent through a non-secure channel.
Digital signatures are equivalent to traditional handwritten signatures in many
respects, but properly implemented digital signatures are more difficult to forge
than the handwritten type.
Digital signing in blockchain technology aims to authenticate transactions. That
means checking if the sender is authorized to make the transactions. The user has
to prove to the network that he’s authorized to spend his balance. The balance is
also verified by checking the transactions made to the account.
Each node in the network verifies the submitted transaction and then makes an
informed decision asking the whole network to add it. And that’s how the use of
digital signing network participants can authorize the transaction and account.
5
A
Marks 5
A smart contract is just a digital contract with the security coding of the
blockchain.
It has details and permissions written in code that require an exact sequence
of events to take place to trigger the agreement of the terms mentioned in
the smart contract.
It can also include the time constraints that can introduce deadlines in the
contract.
Every smart contract has its address in the blockchain. The contract can be
interacted with by using its address presuming the contract has been
broadcasted on the network.
The idea behind smart contracts is pretty simple. They are executed on a basis
of simple logic, IF-THEN for example: