Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
105 views21 pages

DIY Notes BlockChain

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
105 views21 pages

DIY Notes BlockChain

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 21

Block chain Notes

Unit 1

Q.1.Explain block chain and its uses?

Ans

1. A Blockchain is fundamentally an immutable, distributed ledger.


2. A mathematical structure for storing data in a way that is nearly impossible to fake.
3. It can be used for all kinds of valuable data.
4. Blockchain is a list of records called blocks that store data publicly and in chronological order.
5. The information is encrypted using cryptography to ensure that the privacy of the user is not
compromised and data cannot be altered.
6. Information on a Blockchain network is not controlled by a centralized authority, unlike modern financial
institutions.
7. Blockchain is a peer-to-peer system of transacting values with no trusted third parties in between.
8. The first implementation of blockchain was in Bitcoin, where every “node” in the network has a copy of
the ledger, and “miners” solve a cryptographic puzzle to arrive at a single source of truth.
Lets understand the uses of blockchain one by one:
a) Assets Management:
• Blockchain plays a big part in the financial world and it is no different in asset management.
• In general terms, asset management involves the handling and exchange of different assets that an
individual may own such as fixed income, real estate, equity, mutual funds, commodities, and other
alternative investments.
• This can be expensive especially if the trading involves multiple countries and cross border payment.
• In such situations, Blockchain can be a big help as it removes the needs for any intermediaries such as
the broker, custodians, brokers, settlement managers, etc.
b) Healthcare:
• Blockchain can have a big impact on healthcare using smart contracts.
• These smart contacts mean that a contract is made between 2 parties without needing any intermediary.
• All the parties involved in the contract know the contract details and the contract is implemented
automatically when the contract conditions are met.
• This can be very useful in healthcare wearing personal health records can be encoded via Blockchain so
they are only accessible to primary healthcare providers with a key. c) Internet of Things:
• Internet of things is a network of interconnected devices that can interact with others and collect data
that can be used for gaining useful insights.
• Any system of “things” becomes IoT once it is connected.
• But where does Blockchain come into this? Well, Blockchain is needed for providing security for this
massively distributed system.
• In IoT, the security of the system is only as good as the least secured device which is the weak link. Here
Blockchain can ensure that the data obtained by the IoT devices are secure and only visible to trusted
parties.

d) Copyright and Royalties:


• Copyright and royalties are a big issue in creative sectors like music, films, etc.
• These are artistic mediums and it doesn’t sound like they have any link with Blockchain. Bu this
technology is quite important in ensuring security and transparency in the creative industries.
• There are many instances where music, films, art, etc. is plagiarized and due credit is not given to the
original artists.
• This can be rectified using Blockchain which has a detailed ledger of artist rights.

e)Cryptocurrency:
• one of the most popular applications of Blockchain is in Cryptocurrency. Who hasn’t heard about bitcoin
and it’s insane popularity.
• One of the many advantages of cryptocurrency using blockchain as it has no geographical limitations.
So crypto coins can be used for transactions all over the world.
• However, this option is much better than regional payment apps such as Paytm in India that are only
relevant in a particular country or geographical region and cannot be used to pay money to people in
other countries.

f). Birth and Death Certificates

• There are many people in the world who don’t have a legitimate birth certificate especially in the poorer
countries of the world.
• According to UNICEF, one-third of all the children under the age of five don’t have a birth certificate.
And the problem is similar to death certificates as well.
• However, Blockchain can help in solving this problem by creating a secure repository of birth and death
certificates that are verified and can only be accessed by the authorized people.

Q.2.Explain the structure of Block-chain with a diagram

Ans:

1. Blockchain is a database, or broadly distributed database, used mainly for concurrent transactions.
2. Blockchain has several blocks, also called nodes, and all the blocks are managed with the help of the
block header.
3. Constituents of Block Header are:
• Timestamp • Difficult target
• Version • Nonce.
• Merkle root • Previous hash.
Diagram:
1.Timestamp: Timestamp in the blockchain is used as proof that the particular block is used at what
instance of a time, also this timestamp is used as a parameter to verify the authenticity of any block.
2.Version: It states the version that the particular block is using, there are three types of Blockchain
version.

• Block-chain version 1.0(cryptocurrency) – use a public ledger to store the data, for example, Bitcoin.
• Block-chain version 2.0(smart Contract) – its is called smart contract which is self-executing
programs , for example Ethereum.
• Block-chain version 3.0(DAPPS) – used to create a decentralized structure, for example, tor Browser.
3.Merkle Root: A Merkle root uses mathematical formulas to check if the data is not corrupted, hacked,
or manipulated. For example, Suppose one block has 10 transactions, then to identify that block we need
10 transactions to combine and form one Hash Value, so it uses the concept of the binary tree to create
the hash of the block and that value is called the Merkle Root.
4.Difficult target: It specifies the complexity and the computation power required to mine the network,
if we are having a high difficulty target then it implies that we need more a computationally expensive
machine to mine it. For example, in order to increase the difficulty target algorithms such as SHA-2,
SHA-3. RIPEMD, MD5,BLAKE2 is used.
5.Nonce: It is abbreviated as ‘number only used once’ and it is a number which blockchain miners are
finding and on average, it takes almost 10 times to find out the correct nonce. A nonce is a 32-bit number,
having the maximum value as 2^(32) total possible value, so the job of the bitcoins miners is to find out
the correct integer value which is a random integer between 0 and 2^(32), so it becomes computationally
expensive.
6. Previous Hash : As Blockchain is a collection of several interconnected nodes also called a block, so
previous hash stores the hashed value of the previous node’s address, First block in the blockchain is
called the Genesis Block and has no previous block hash value.
7.Transaction: Blockchain technology is mostly about the transactions that we make digitally for
ourselves. Eventually, these transactions make their way to the various blocks that become part of the
Blockchain later on. So, it is important to understand the transaction life cycle in Blockchain technology.
Transaction in simple words is the process of sending money by the sender and the receiver receiving it.
The Blockchain transaction is also quite similar, but it is made digitally.
Q.3.Different between centralized and Decentralized.

Ans:
Centralized Decentralized
1). A centralized system has a centralized control 1). A decentralized system does not have a centralized
with all administrative authority. control and every node has equal authority.

2).This system are easy design, maintain, impose 2).This system are difficult to design , maintain, govern
Trust And govern. And impose trust.
3).This system are less stable because it have a 3).This system are more stable and fault tolerant because
Central point of failure. It does not have a central point of failure.
4).this system is less secured as compare to 4).this type of system are more secured as compare to
Decentralized. Centralized.
5).Centralization of power can lead to unethical 5). Symmetric system with equal authority to all, so less
operations. scope of unethical operations
6. Scalability is difficult most of the time. 6. Highly scalable.

Q.4.Explain the different Types of Block-chain

Ans:

1. A Blockchain is fundamentally an immutable, distributed ledger.


2.A mathematical structure for storing data in a way that is nearly impossible to fake.
3.It can be used for all kinds of valuable data.
4.Blockchain is a list of records called blocks that store data publicly and in chronological order.
5. There mainly three types of Blockchains that have emerged after Bitcoin introduced Blockchain to the
world.
(a). Public Blockchain.
(b). Private Blockchain.
(c). Hybrid Blockchain.
1.Public Block-chain:
• No one in charge, anyone can participate in reading/writing/auditing the blockchain (i.e. Bitcoin,
Litecoin, etc.
• These blockchains are completely open to following the idea of decentralization.
• They don’t have any restrictions, anyone having a computer and internet can participate in the
network.
• As the name is public this blockchain is open to the public, which means it is not owned by anyone.
• In this public blockchain, we can also perform verification of transactions or records
Advantage:

1.Trustable. 3.Anonymous Nature.


2.Secure. 4.Decentralized.
Disadvantage:

1.Prosessing rate of transaction is very slow. So this is very time-consuming process.


2.Energy consumption is very high. It required a good computer hardware to participate in network.
3.Accetance issued due to no central authority .government is facing issues to implement the technology.
Uses cases:

Example of public block-chain are Bitcoin. Ethereum.

2.Private Block-chain:

• A private property of an individual or an organization, there is one in charge of important things such
as read/write or whom to selectively give access to read or vice versa.
• Private block chain are not decentralized like public blockchain . Only selected nodes can participate
in the process, make it more secure that other.
• These are not as open as a public blockchain.
• These blockchains are operated in a closed network.
• They are open to some authorized users only.
Advantage:
1.speed: rate of transaction is very high. 3.Privacy.
2.scalability. 4.balaced.
Disadvantage:
1.security is less bcoz number of nodes in this system is limited so there chances of manipulation.
2.since the system is centralized trust building is one of the main disadvantages.
3.since there is few nodes if nodes go offline the entire system of block chain can be endangered use
Cases:

Example of private block-chain is Hyperledger , corda.

3.hybrid block-chain:

• It is the mixed content of private and public , where some part is controlled by some organization
and other by public blockchain.
• It is a combination of both public and private blockchain.
• Permission-based and permissionless systems are used.
• User access information via smart contracts.
• Even a primary entity owns a hybrid blockchain it cannot alter the transaction
Advantage: 1.most advantage of this system is its hybrid nature. It cannot be hacked as 51% of users do
not have access to the network.
2.Cost: transaction cost are cheap as only a few nodes verify the transaction.
3.architecture: Highly customizable and still maintain integrity , security and transparency.
Disadvantage:

1.less efficient.
2.lack transparency.
3. Due to its closed ecosystem this blockchain lacks the incentives for network participation. Uses
Case:

Example of hybrid block-chain are Ripple network and XRP token.

Q.5. What are the differences between permissioned and permissionless blockchain?
Ans:

1.Permissioned Blockchain:
➢ There are closed network only a set of group are allowed validate transaction or data in a given
blockchain network.
➢ These are used in the network where high privacy and security are required.
Characteristics:
➢ A major feature is a transparency based on the objective of the organization.
➢ It does not have a central authority.
➢ Developer by private authority.
Advantage:
1.this blockchain tends to be faster.
2.they can offer customizability.
3.strong privacy.
4.as few nodes are involved performance and scalability are increased.

Disadvantage:
1.Not truly decentralized as it requires permission.
2.Risk of corruption.
3.anytime owner and operator can change the rules as per the need.

2.Permissionless Blockchain:
➢ It is also known as trust-less or public blockchains, are available to everyone to participate in the
blockchains process that use to validate transactions and data.
➢ These are used in the network where high transparency is required.
Characteristics:
➢ This blockchain has no central authority.
➢ The platform is completely open-source.
➢ Full transparency of the transaction.
➢ Heavy use of token.
Advantage:
1.Anyone can participate in the network.
2.trust among users or entities.
3.high level of transparency.
Disadvantage:
1.poor energy efficiency due to large network.
2.lower performance scalability.
3.Less privacy.

Q.6.Peer to Peer:

Ans:;

1. Peer-to-peer refers to the exchange or sharing of information, data, or assets between parties without the
involvement of a central authority.
2. Peer-to-peer (P2P) involves decentralized interactions among individuals and groups.
3. This approach has been used in computers and networking as well as with trading virtual currencies.
4. In a digital peer-to-peer network, each user is an equivalent owner of and contributor to the network.
5. This kind of network can be used for almost any kind of information or file-sharing.
6. With currencies, P2P refers to the exchange of cryptocurrencies, especially Bitcoin, which was created
with the goal of enabling anonymous P2P transactions that don't require processing by a financial
institution.
Types of peer to peer network:

1. P2P networks can be categorized according to their architectural differences. Three main categories are
described below.
(a). Unstructured P2P Networks.
(b). Structured P2P Networks. (c).
Hybrid P2P Network.

Advantages:

1. Improves network efficiency.


2. Resilience to failure.
3. Privacy.
4. Scalability.
5. Cost efficient.
6. Consensus mechanism.

Disadvantage:

1.slower speed.
2.more difficult to manage. 3.less
computation power.
Unit 2

Q.1.Explain Merkle Tree

Ans:

1. Merkle tree is a fundamental part of blockchain technology. It is mathematical data structure composed
of hashes of different blocks of data, and which serves as a summary of all the transactions in a block.
2. It also allows for efficient and secure verification of content in a large body of data.
3. It also helps to verify the consistency and content of the data. Both Bitcoin and Ethereum use Merkle
Trees structure.
4. Merkle Tree is also known as Hash Tree.
5. The concept of Merkle Tree is named after Ralph Merkle, who patented the idea in 1979.
6. A Merkle tree stores all the transactions in a block by producing a digital fingerprint of the entire set of
transactions.
7. Merkle trees are created by repeatedly calculating hashing pairs of nodes until there is only one hash left.
This hash is called the Merkle Root, or the Root Hash.
8. The Merkle Trees are constructed in a bottom-up approach.
9. Every leaf node is a hash of transactional data, and the non-leaf node is a hash of its previous hashes.
10. Merkle trees are in a binary tree, so it requires an even number of leaf nodes.
11. If there is an odd number of transactions, the last hash will be duplicated once to create an even number
of leaf nodes. Diagram:

Advantage:
• It provides a means to maintain the integrity and validity of data.
• It helps in saving the memory or disk space as the proofs, computationally easy and fast.
 Their proofs and management require tiny amounts of information to be transmitted across networks.

Disadvantage:

1.higher CPU usage and memory footprint compared to other type of tree.
2. With a Merkle tree, you have to compute and store a hash at each node, which can be
computationally expensive.
Merkle tree nodes are frequently updated, and thus the file also needs to be updated and constantly
overwritten.
Q.2.What are the different properties for cryptographic hash functions? Explain the three main properties
in detail.
Ans:
1. A cryptographic hash function is a mathematical function used in cryptography.
2.typical hash functions takes inputs of variable length to return outputs of a fixed length.
3.this functions combines the message—passing capabilities of hash function with security properties.
4.this functions are commonly used in data structures in computing system for tasks.
5. Cryptographic hash functions add security features to typical hash functions, making it more difficult to
detect the contents of a message or information about receiver and senders.

Working of Hash Functions:


1.the hash function takes input of variable lengths and returns outputs of fixed lengths.
2.the transactions are taken as inputs and the hash function gives an output of a fixed size.

Three main properties of cryptographic hash functions:

1.Colllision-Free:

➢ They are “collision-free.” This means that no two input hashes should map to the same output hash.
➢ A hash function H is said to be collision free if: It’s infeasible to find two values X1 and X2, such
that X1!=X2, yet H(X1)=H(X2) Or in other words, It’s infeasible to find two inputs which can
produce the same outputs.
➢ Since, hash function is compressing function with fixed hash length, it is impossible for a hash
function not to have collisions.
➢ This property makes it very difficult for an attacker to find two input values with the same hash.
➢ We can use this property of hash functions to create a digest for a given data.

2.Hidding:
➢ They can be hidden. It should be difficult guess the input value for a hash function form its output.
3.Puzzle-Friendly:
➢ They should be puzzle-friendly. It should be difficult to select an input that provide a pre-defined
output.
➢ Thus the input should be selected from a distributed that as wide as possible.
➢ Puzzle friendly property is used for bitcoin mining.

Q.3.Digital Signature:

Ans:

1. A digital signature is a cryptographic output used to verify the authenticity of data.


2. A digital signature algorithm allows for two distinct operations:
(a).a signing operation, which uses a signing key to produce a signature over raw data (b).a verification
operation, where the signature can be validated by a party who has no knowledge of the signing key
3. The main purposes of a digital signature are:
(a).verification of the integrity of the signed data
(b).non-repudiation if the signer claims the signature is not authentic
4. Digital signatures rely on asymmetric cryptography, also known as public key cryptography.
5. An asymmetric key consists of a public/private key pair.
6.The private key is used to create a signature, and the corresponding public key is used to verify the
signature.
7. digital signature is intended to solve the problem of tampering and impersonation in digital communications.

 Working of digital signature:


1. Digital signatures are based on public key cryptography, also known as asymmetric
cryptography.
2. Using a public key algorithm, such as RSA two keys are generated, creating a mathematically
linked pair of keys, one private and one public.
3.the person who creates the digital signature uses a private key to encrypt Data. While the only way to
decrypt that data is signers public key.
4.if the receiver can’t open the document with signer’s public key , that means there is problem with
the document or the signature. 5.this is how digital signature are authenticated.

Advantage of Digital Signature:


1.Cost Saving.
2.Time saving.
3.traceability.
4.globally accepted and legally compliant. 5.positive
environmental impact.
Disadvantage:
1.Expiry date.
2.need to educate the users.
3.compartibily issues.
4.vulnerability to key loss, theft or compromise.
5.dependency on certificate authorities.

Classes and types of digital signatures:


1. There are three different classes of digital signature certificates (DSCs):
(a).Class 1: Cannot be used for legal business documents as they are validated based only on an email
ID and username. Class 1 signatures provide a basic level of security and are used in environments
with a low risk of data compromise.
(b).Class 2 : Often used for electronic filing (e-filing) of tax documents, including income tax returns
and goods and services tax (GST) returns. Class 2 digital signatures are used in environments where
the risks and consequences of data compromise are moderate.
(c).Class 3: this is the highest level of digital signatures. It require a person or organization to present
in front of certifying authority to prove their identity before signing. They are used in e-auction,
etendering, e-ticketing etc.

Uses of digital signature in different sectors:


1.Government.
2.healthcare,
3.Manufacturing.
4.financial services. 5.Cryptocurrencies.
Unit 3

Q.1. What is double spending problem? Explain with suitable example. How it is handle in bitcoin?
Ans:
1. Although Blockchain is secured, still it has some loopholes. Hackers or malicious users take
advantage of these loopholes to perform their activities.
2. Double spending means the expenditure of the same digital currency twice or more to avail the
multiple services. It is a technical flaw that allows users to duplicate money.
3. Since digital currencies are nothing but files, a malicious user can create multiple copies of the same
currency file and can use it in multiple places.
4. There are also double spends that allow hackers to reverse transactions so that transaction happens
two times.
5. By doing this, the user loses money two times one for the fake block created by the hacker and for
the original block as well.
Diagram:

Example:
1. Suppose a user has 1 BTC.
2.he/she want to avail services from merchant A and Merchant B.
3.The User created multiple copies of the same BTC and stores it.
4.the user first sends the original BTC to Merchant A and gets the Services.
5.Simultaneously the user sends the copied version of 1 BTC to Merchant B.
6.Since the second transaction was not confirmed by other miner the merchant accepts the bitcoin and
sends the services.
7.But the cryptocurrency that was sent is invalid.
8.This is the case of Double spending.
Double spending handled by Bitcoins:
1. Bitcoin is one of the most popular blockchains. To combat Double spending it uses some security
measures.
2. To tackle these double-spending issues, some security measures are taken. They are:
➢ Validation: Validation of transaction by a maximum number of node in the network.
➢ Timestamp: the confirmed transaction are timestamped therefore they are irreversible.
➢ Block Confirmation: Merchant get block confirmations so that they are assured that there was
no case of double spending.
➢ Saving Copies: A copy of each transaction is kept at each node so in case of network failure the
whole network does not go down.
3.These security features have reduced double spending to a large exent.
4 Double Spending can be prevented using two approaches: Centralized and Decentralized.

Q.2. Difference between proof of work and proof of stake:

Proof of Work Proof of Stack


1.The probability of mining a block is determined 1.the probability of validating a new block is
by how much computational work is done by determined by how much coins they possess.
miner.
2.A rewards is given to first miner to solve 2.the validator do not receive a rewards instead
cryptographic puzzle of each block. they collect network fee as their reward.
3.hackers need to have 51% of computation power 3.Hackers need to own 51% for all cryptocurrency
to add malicious block. on network which is practically impossible.
4.this system are less energy efficient and less 4.this system are more cost and energy efficient
costly but more proven. but less proven compare too POW.
5.Initial Investment to buy hardware. 5.Initial investment to buy stake and build
reputation.
6.Speicalized equipment to optimize processing 6.Standars server grade unit is more than enough.
power.
7.Participant role in the POF is “Miners”. 7.Participant role in the POS is “Validators”.
8.Resistance to Sybil attacks. 8.Vulnerable to Sybil Attacks if an attacker can
acquire a significant amount of cryptocurrency.
9.Miners compete like a race to solve puzzles and 9.Validators talk turns like passing a talking stick
add blocks. in a group discussion.
10. Bitcoin is most well known crypto with a 10.Cardano, cosmos are some of the
Proof-of-Work. cryptocurrency that are example of POS.
Q.3. Bitcoin scripting language:
Ans:
1. Bitcoin’s scripting language is simply called Script.
2. All Bitcoin scripts are written in Script. It is a simple language that is not Turing complete, meaning
it lacks several logical functions, including loops.
3. This is done to ensure that no Bitcoin script can consume inordinate computing power and harm
nodes on the network.
4. Script is used almost exclusively to lock and unlock bitcoin, not to build applications or run
programs.
5. Script’s simplicity also gives Bitcoin security and makes it easier for developers to avoid losing
money while designing wallets or applications on top of Bitcoin.
6. All Bitcoin transactions use Script to define how outputs can be spent.
7.Bitcoin has a few different script which is Pay-To-Public-Key-Hash(P2PKH) being the most popular.
P2PKH is the simple script which pays bitcoin to an address.

1.P2PKH:
➢ This type of ScriptPubKey which locks bitcoin to the hash of private ey.
➢ A P2PKH transaction is one where the inputs were locked using the P2PKH ScriptPubKey.
➢ P2PKH is similar to P2PK transactions, except that the bitcoin is locked to the hash of the
public key rather than the public key itself.
Eg: If Alice wants to send 1 BTC to Bob in a P2PKH transaction, Bob provides Alice with
an address from his wallet. Bob’s address is included in the transaction. When Bob tries to
spend the bitcoin he received, he must sign the transaction with the private key
corresponding to the public key whose hash matches the hash provided in Alice’s
transaction.
2.P2SH:
• Pay-to-Script-Hash (P2SH) is a type of ScriptPubKey which allows for the spending of bitcoin based on
the satisfaction of the script whose hash is specified within the transaction.
• A P2SH transaction is a transaction whose inputs were locked using a P2SH ScriptPubKey.

Unit 4

Q.1. Explain the smart contracts with suitable example.

Ans:

1. A Smart Contract is a computer program that directly and automatically controls the transfer of digital
assets between the parties under certain conditions.
2. Smart contracts are programs that execute exactly as they are set up by their creators. Just like a
traditional contract is enforceable by law, smart contracts are enforceable by code.
3. the bitcoin network was the first to use some sort of smart contract by using them to transfer value from
one person to another.
4. There are some common smart contract platforms like Ethereum, Solana, Polkadot, Hyperledger fabric,
etc.
5. The idea behind smart contracts is pretty simple. They are executed on a basis of simple logic, IF-THEN
for example
➢ IF you send object A, THEN the sum (of money, in cryptocurrency) will be transferred to you.
➢ IF you transfer a certain amount of digital assets, THEN the A object will be transferred to you.
➢ IF I finish the work, THEN the digital assets mentioned in the contract will be transferred to me.

Applications of smart contracts:


a) real Estate.
b) Vehicle Ownership.
c).Music Industry.
d).Government elections.
Advantage:
1.Speed, Efficiency and accuracy.
2.Trust and transparency.
3.Security.
4.cost efficient.
5.Reduce fraud.
Disadvantage:
1.Immutablility.
2.Limited functionality.
3.smart contract vulnerabilities are not easy to fix.
4.Seeking legal help is difficult.

Q.2.

Unit 5

Q.1. Explain Ethereum virtual machine in detail.


Ans:

1. Ethereum Virtual Machine (EVM) is designed as the runtime environment for smart contracts in
Ethereum.
2. It is sandboxed and isolated from the other parts of the system.
3. This means that any operation on EVM should not affect your data or programs in any way, no matter
how many times you call a particular function on it.
4. Ethereum contains its own Turing-complete scripting language, called Solidity, and with this comes a
need to execute this code.

Purpose of EVM:
1. The Ethereum Virtual Machine (EVM) is a Turing complete programmable machine, which can
execute scripts to produce arbitrary outcomes.
2. It has been built with the purpose of being a “world computer” and has immense power.
3. It is the computer that stores data on blockchain, like bitcoin, but it also executes code in smart
contracts on the Ethereum network.
4. The machine is made to be able to run any kind of Crypto-contract that can be built on Ethereum’s
blockchain.

Working of EVM:
EVM has two Parts:
1.EVM: The EVM is written in C++ and uses LLVM ass its compiler. It is a full-featured virtual machine
with all the features that you would want in a general purpose Smart Contract Virtual Machine. It also
allows you to write custom EVM bytecode .

2.Uncles: these are small pieces of smart contracts or data stored on the blockchain. This is a useful
feature because it allows for you to store metadata about your program.

Advantage:
1.Easy to write stateful contract.
2.Robust against failure.
3.Can run complex smart contracts.
4.Execute untrusted code without risking data.

Disadvantage:
1.High cost of storing data.
2.High gas cost.
3.high gas price during network congestion.
4.Technical expertise required.

Q.2. Explain Hyperledger fabric in detail


Ans

1. Hyperledger Fabric is an open source, permissioned blockchain framework, started in 2015 by The
Linux Foundation.
2. It is a modular, general-purpose framework that offers unique identity management and access control
features, which make it suitable for a variety of industry applications such as track-and-trace of supply
chains, trade finance, loyalty and rewards, as well as clearing and settlement of financial assets.

Need Of Hyperledger:
1. Hyperledger was founded to advance the discovery as well as the adoption of cross-industry
blockchain systems. It is backed by major corporations such as IBM and many others across a wide
range of sectors, including finance, IoT, banking, industry, etc.
2. One thing to keep in mind is that Hyperledger was designed to assist and stimulate the advancement
of blockchain technology, not any particular cryptocurrency.
3. This Hyperledger neither has any nor will have its coin. It is a vital thing to keep in mind about
Hyperledger.

Features of Hyperledger fabric:


1.Private and Permissioned: rather than permissionless which is open for all the member of Hyperledger
fabric network enroll through an MSP which is completely trusted.
2.Privacy: unlike other network where privacy is not a top concern this blockchain projects supports
privacy which is crucial requirement.
3.Smart contract functionality: Hyperledger fabric supports smart contracts written in chain code that
can be implemented in several programming languages.
Advantages:
1.Offers high level of privacy.
2.Supports modularity.
3.Enable efficient processing.
4.facilitates secure transactions

Disadvantages:
1.Requires high computational power.
2.Limited scalability.
3.complex setup process.
4.No native cryptocurrency support.

Q.3. What is Ethereum? Explain the architecture of Ethereum also explain the different components in
Ethereum network.
Ans:

1. Ethereum is an open-source public service that uses blockchain technology to facilitate smart contracts
and cryptocurrency trading securely without a third party.
2. There are two accounts available through Ethereum:
• externally owned accounts (controlled by private keys influenced by human users) and
• contract accounts.
3. Ethereum allows developers to deploy all kinds of decentralized apps.
4. Even though Bitcoin remains the most popular cryptocurrency, it’s Ethereum’s aggressive growth that
has many speculating it will soon overtake Bitcoin in usage.

Advantage of Ethereum:
➢ It allows individual and companies to do much more than just transfer money between entities.
➢ The hottest platforms in the world of cryptocurrency and blockchain and companies such Jp
morgan , intel and Microsoft invest in it.

Architecture of Ethereum:
➢ After bitcoin the second most used cryptocurrency is Ethereum. Unlike bitcoin, Ethereum is proposed
to be the more simple means of exchange or store of value.
➢ Ethereum refers as a decentralized computer network based on the blockchain technologies.
➢ Ethereum is build on top of blockchain network.
➢ Everyone on the Ethereum network has an exact copy of this ledger which allows them to view all
previous transactions.
➢ The Ethereum network allows users to build and run apps, smart contracts and other transaction these
features are not available in bitcoin.
➢ There is no boundary on how much Ether tokens can be produced while Bitcoin can only deliver 21
million coins.

Components of Ethereum network:


1.nodes: nodes are individual computers that participate in the Ethereum network. They store a copy of the
entire blockchain and communicate with each other to maintain the network integrity.

2.Ether:
➢ Ether is a type of cryptocurrency used in the Ethereum network just like a bitcoin is used in a
blockchain network.
➢ It is a peer-to-peer currency, similar to Bitcoin. It tracks and promotes each transaction in the
network.
➢ It is the second-largest cryptocurrency in the world.

3.Gas:
➢ To complete every transaction on the Ethereum network, a consumer must first make a payment—
send out ethers—and the intermediate monetary value is known as gas.
➢ Gas is a unit of measurement on the Ethereum network for the computing power used to execute a
smart contract or a transaction.
➢ The price of gas is very low compared to Ether.
➢ The execution and resource utilization costs are predetermined in Ethereum in terms of Gas units,
called gwei.

4.Ethereum accounts: there are two types of Ethereum accounts, they are as follows:
a)Externally owned account- these are used to store transaction.
b)Contract accounts- these accounts store the details of smart contracts.

5.Nonce:
➢ For externally owned accounts, nonce means the number of transactions via this account.
➢ For a contract account, nonce means the number of contracts generated via this account.

6.Storage Root:
➢ It is the main root node of a Merkle tree.
➢ Hash of all details of the account is stored here.
➢ The root of the Merkle tree is the verification of all transactions.

Q.4.difference between Ethereum and bitcoin:

Bitcoin Ethereum
1.Bitcoin trade in cryptocurrency. 1.Ethereum offers several method of exchange
including cryptocurrency, smart contracts and
EVM.
2.bitcoin use a “Proof Of Work” system. 2. Ethereum use a “Proof Of Stake” system.
3.Bitcoin allows only public 3.Ethereum allows both permissioned and
transaction(permissionless). permissionless transactions.
4.For Bitcoin the computer running he platform and 4.Ethereum does not offer block rewards and
verifying the transaction receive rewards. instead allows miners to take transaction fees.
5.the purpose of bitcoin was to replace national 5.the purpose of Ethereum was to utilize blockchain
currency during financial crisis. technology.
6.Bitcoin runs on the SHA-256 hash algorithm. 6.Ethereum runs on the Keccak-256 hash
algorithm.
7.the bitcoin blockchain has a block limit of 1mb. 7.the Ethereum blockchain does not have a block
limit.
8.the block time of bitcoin is 10 minutes. 8. The block time of Ethereum is 14 to 15 seconds.
9.Energy consumption is very high. 9. Energy consumption is very low.
10.structure oof bitcoin is simple and robust. 10. Structure of Ethereum is complex and feature
rich.
11. assets of Bitcoin is BTC. 11. Assets of Ethereum is Ether.

You might also like