0% found this document useful (0 votes)
103 views20 pages

Blockchain

Blockchain is a shared, immutable ledger that facilitates recording transactions and tracking assets across a business network. It allows virtually any asset to be tracked and traded, reducing risk and costs for all involved. As an immediate, transparent and secure system, blockchain provides a single shared view of transactions. It can track orders, payments and more, building greater confidence through transparency. Key benefits include security, transparency, speed and efficiency, and access to global markets.

Uploaded by

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

Blockchain

Blockchain is a shared, immutable ledger that facilitates recording transactions and tracking assets across a business network. It allows virtually any asset to be tracked and traded, reducing risk and costs for all involved. As an immediate, transparent and secure system, blockchain provides a single shared view of transactions. It can track orders, payments and more, building greater confidence through transparency. Key benefits include security, transparency, speed and efficiency, and access to global markets.

Uploaded by

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

Explain Blockchain

 Blockchain is a shared, immutable ledger that facilitates the process of recording


transactions and tracking assets in a business network.
 An asset can be tangible (a house, car, cash, land) or intangible (intellectual property,
patents, copyrights, branding).
 Virtually anything of value can be tracked and traded on a blockchain network, reducing risk
and cutting costs for all involved.
 Business runs on information. The faster it’s received and the more accurate it is, the better.
 Blockchain is ideal for delivering that information because it provides immediate, shared
and completely transparent information stored on an immutable ledger that can be
accessed only by permissioned network members.
 A blockchain network can track orders, payments, accounts, production and much more.
 And because members share a single view of the truth, you can see all details of a
transaction end to end, giving you greater confidence, as well as new efficiencies and
opportunities.
Benefits of Blockchain
 Blockchain is a secure, transparent, and efficient way to share data across multiple parties.
 Blockchain cannot be altered or reversed, which means participants can trust the data that
they are presented with.
 In addition, blockchain’s confidential nature protects users from identity theft, making it
attractive to consumers and businesses alike.
 Blockchain enables businesses to transact in real time at any hour of the day, any day of the
year. This is a contrast from bank transfers and payments that are only available during
business hours and have cut-off times.
 Blockchain also lowers costs for businesses, especially those that have high-value, high-
volume transactions that cause fees to add up.

Key Characteristics of blockchain technology


Let's discuss the key characteristics of blockchain technology that make it a game-changer for
businesses worldwide.
1. Security
Blockchain technology is celebrated for its unmatched security. Data is stored in a decentralized
ledger, making it nearly impossible for malicious actors to tamper with it. In an era marked by
cyber threats, this characteristic alone has made blockchain a trusted choice for safeguarding
sensitive information.
2. Transparency and Traceability
Blockchain is built on the principle of transparency. Every transaction is recorded on an
immutable ledger that can be accessed by all relevant parties. This level of transparency not
only reduces fraud but also enhances trust among participants in a network.
3. Speed and Efficiency
Traditional financial transactions can be sluggish, especially when they involve multiple
intermediaries. Blockchain eliminates the need for intermediaries, resulting in faster and more
cost-effective transactions. This speed is crucial in today's fast-paced business world.
4. Global Reach
Blockchain knows no geographical boundaries. It enables businesses to transact globally with
ease, removing the hurdles associated with currency conversions and international regulations.
This characteristic opens up new markets and opportunities for growth.
6. Continual Innovation
Blockchain is a technology that keeps evolving. New use cases and innovations are emerging
every day, from supply chain optimization to digital identity verification. Staying up-to-date with
blockchain trends can give your business a competitive edge.

Limitations of Blockchain.
Blockchain technology has enormous potential in creating trustless, decentralized applications.
But it is not perfect. There are certain barriers which make the blockchain technology not the
right choice and unusable for mainstream application. We can see the limitations of blockchain
technology in the following image.
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.
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.
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.
History of Blockchain

Consensus Algorithm
Proof of Work (PoW)
 Proof of Work is the oldest consensus mechanism used in the Blockchain domain. It is also
known as mining where the participating nodes are called miners.
 In this mechanism, the miners have to solve complex mathematical puzzles using
comprehensive computation power.
 They use different forms of mining methods, such as GPU mining, CPU mining, ASIC mining,
and FPGA mining.
 And the one that solves the problem at the earliest gets a block as a reward.
 However, the process is not that easy. A puzzle can be solved only via trial and error
method. Additionally, the level of complexity of the puzzle increases with the speed at
which blocks are mined. So, it becomes mandatory for one to create a new block within a
certain time frame to cope up with the difficulty level.
Proof of Stake (PoS)
 Proof of Stake is the most basic and environmentally-friendly alternative of PoW consensus
protocol.
 In this blockchain method, the block producers are not miners, but they act like validators.
 They get the opportunity to create a block over everyone which saves energy and reduces
the time.
 However, for them to become a validator, they are supposed to invest some amount of
money or stake.
 Also, unlike that in the case of PoW, miners are provided with a privilege to take their
transaction fees in this algorithm for there is no reward system in this consensus model.
Proof of Burn (PoB)
 Proof of Burn (PoB) consensus model works on the principle of letting miners ‘burn’ or ‘ruin’
the virtual cryptocurrency tokens, which further provides them with a privilege to write
blocks in proportion to the coins.
 The more coins they burn, the more are the chances of picking the new block for every coin
they get.
 But, in order to burn coins, they are required to send it to the address where it couldn’t be
spent for verifying the block.
 This is widely employed in the case of distributed consensus. And the finest example of this
consensus mechanism is the Slim coin.
Proof of Capacity (PoC)
 In the Proof of Capacity (PoC) mechanism, solutions for every complex mathematical puzzle
are accumulated in digital storages like Hard disks.
 Users can use these hard disks to produce blocks, in a way that those who are fastest in
evaluating the solutions get better chances for creating blocks.
 The process it follows is called Plotting.
 The two cryptocurrencies that rely on PoC blockchain consensus protocol are Burstcoin and
SpaceMint.
10. Proof of Elapsed Time (PoET)
 PoET was introduced by Intel with an intent to take over cryptographic puzzles involved in
PoW mechanism
 It is based on the idea of fairly distributing and expanding the odds for a bigger fraction of
participants. And so, every participating node is asked to wait for a particular time to
participate in the next mining process.
 The member with the shortest hold-up time is asked to offer a block.
 At the same time, every node also comes up with their own waiting time, after which they
go into sleep mode.
 So, as soon as a node gets active and a block is available, that node is considered as the
‘lucky winner’.
 This node can then spread the information throughout the network, while maintaining the
property of decentralization and receiving the reward.

Centralized and Decentralized systems/architecture.


Centralized network systems
A centralized network is a network where the nodes don’t
directly communicate with each other. In this system, a
single server handles the major part of the network’s
processing system. The central server owns all the resources.
If any nodes want to gain access to any other resources, they
get it via the central system.
Advantages of a centralized network
 The data sharing process is faster since the data is owned by a central source. It is much
quicker for the requested data to reach the recipient.
 We have only one machine that has all the data. Therefore, centralized systems are easier to
monitor and deploy, and only one machine needs to be updated.
 A centralized network is relatively affordable due to the limited number of servers.
Disadvantages of a centralized network
 It has a single point of failure. If the central system fails to operate or shuts down for any
reason, the entire network goes down.
 It allows limited scalability.
 It has increased security risks due to one central system.
 Decentralized network system
A decentralized network distributes workload among several
servers without having a single central server to manage
network activity. Each of these servers can act as an
independent central server.
Advantages of a decentralized network
 Decentralization eliminates the single point of failure, as the
load is now distributed amongst all the servers present on
the network, meaning no single server possesses all the
required resources.
 It is easily scalable.
 The decentralized network offers more privacy as information passes through different
servers.
Disadvantages of a decentralized network
 The performance of the network decreases as the number of networks on the system
increases.
 Data may be lost during transit.
 It is more expensive and difficult to deploy.
 It is difficult to maintain due to multiple servers.

Distributed network systems


In a distributed network system, the processing power is
spread evenly across the network. This system can often
seem similar to a decentralized system.
Distributed network system
Advantages of a distributed network
 It has no single point of failure as the processing
ability is split among individual nodes.
 It is more efficient in terms of scalability.
 It is more secure compared to a centralized system.
Disadvantages of a distributed network
 It is more difficult to maintain a network.
 Data may be lost during transit.

Types of decentralization in blockchain


Disintermediation
The concept of disintermediation can be explained with the aid of an example.
 Imagine that you want to send money to a friend in another country. You go to a bank,
which, for a fee, will transfer your money to the bank in that country. In this case, the bank
maintains a central database that is updated, confirming that you have sent the money.
With blockchain technology, it is possible to send this money directly to your friend without
the need for a bank. All you need is the address of your friend on the blockchain. This way,
the intermediary (that is, the bank) is no longer required, and decentralization is achieved
by disintermediation.
 Nevertheless, this model can be used not only in finance but in many other industries as
well, such as health, law, and the public sector. In the health industry, where patients,
instead of relying on a trusted third party (such as the hospital record system) can be in full
control of their own identity and their data that they can share directly with only those
entities that they trust.
 As a general solution, blockchain can serve as a decentralized health record management
system where health records can be exchanged securely and directly between different
entities (hospitals, pharmaceutical companies, patients) globally without any central
authority.
Contest-driven decentralization
 In the method involving competition, different service providers compete with each other in
order to be selected for the provision of services by the system. This paradigm does not
achieve complete decentralization. However, to a certain degree, it ensures that an
intermediary or service provider is not monopolizing the service. In the context of
blockchain technology, a system can be envisioned in which smart contracts can choose an
external data provider from a large number of providers based on their reputation, previous
score, reviews, and quality of service.
 This method will not result in full decentralization, but it allows smart contracts to make a
free choice based on the criteria just mentioned. This way, an environment of competition is
cultivated among service providers where they compete with each other to become the
data provider of choice.
 In the following diagram, varying levels of decentralization are shown. On the left side, the
conventional approach is shown where a central system is in control; on the right side,
complete disintermediation is achieved, as intermediaries are entirely removed. Competing
intermediaries or service providers are shown in the centre. At that level, intermediaries or
service providers are selected based on reputation or voting, thus achieving partial
decentralization:

Cryptography.
 Cryptography is technique of securing information and communications through use of
codes so that only those person for whom the information is intended can understand it and
process it.
 Cryptography prevents unauthorized access to information.
 The prefix “crypt” means “hidden” and suffix “graphy” means “writing”.
Features Of Cryptography are as follows:
Confidentiality: Information can only be accessed by the person for whom it is intended and no
other person except him can access it.
Integrity: Information cannot be modified in storage or transition between sender and intended
receiver without any addition to information being detected.
Non-repudiation: The creator/sender of information cannot deny his intention to send
information at later stage.
Authentication: The identities of sender and receiver are confirmed. As well as
destination/origin of information is confirmed.

Asymmetric Cryptography
 This encryption method uses a pair of keys, an encryption key, and a decryption key, named
public key and private key respectively.
 The key pair generated by this algorithm consists of a private key and a unique public key
that is generated using the same algorithm. It is also called Public-Key Cryptography.
 The use of asymmetric cryptography is where the environment is continuously expanding
and the data is exchanged between different communication partners. The reason is its high
scalability.
 In this type of cryptography, to perform key exchange, one party produces the secret key
and encrypts it with the public key of the receiver. The receiver then can easily decrypt it
using their private key.
 Once the connection is established, the rest of the communication will be completed by
using the secret key as the encryption key.
 However, unlike symmetric key, the problem with asymmetric rises when the public key has
to be authenticated.
 The public key holds the risk of getting tampered with by any malicious third party. However,
this problem can be solved by using Public-key infrastructure (PKI).
 In this method, another third party known as certificate authorities, check the ownership of
the keys. Another method named “web of trust” can also be used to provide authenticity of
key pairs.

Commonly used Cryptographic Primitives


There are many cryptographic primitives, but we will discuss the most commonly used ones.
They are as follows:
 One-way hash function: It is a mathematical function which converts an input of any length
to a binary sequence of fixed length. It cannot be reverted, which means the original string
cannot be retrieved back from the hash. It is to be noted that even a small change in the
input can change the meaning of the whole output. For example, SHA256 is a hash function.
It generates 32-byte strings for any input.
 Symmetric Key Cryptography: It is a popular encryption algorithm and is also known as
symmetric encryption. The principle of this algorithm is a shared key. For example, a person
wants to send some confidential data. He/she encrypts the data and ‘locks’ it with a key. The
same key is used to decrypt or ‘unlock’ the data when the message is received. This
algorithm is mostly used when large amounts of data are sent. The problem is sharing the
key. The sender and receiver parties should have the same key. Examples of Symmetric key
Cryptography are AES, DES, and 3DES.
 Asymmetric key cryptography: It is also known as public key cryptography. This method has
been developed to cope with the disadvantage of Symmetric Key Cryptography. Two types
of keys are used: Public key and private key. The public key is used to encrypt the message,
whereas the private key decrypts the message. Examples are: Diffie-Hellman, DSA and RSA
 Digital Signature: This is used in blockchains to authenticate transactions or other data.
Whenever a digital signature is used, it establishes that the rightful owner has sent it and
the message has not been altered. The here private key is used as a digital signature by the
user, and once it has been sent to the receivers, the receivers validate the message using the
public key.
 Private Information Retrieval: This protocol allows users to retrieve information from the
database without other users knowing about it. Here the user can anonymously retrieve the
information from another server.

Types of BIPS - 3(standard, track, informational and process)


 A Bitcoin Improvement Proposal (BIP) is a design document for introducing features or
information to Bitcoin.
 The BIP should provide a concise technical specification of the feature and a rationale for
the feature.
 This is the standard way of communicating ideas since Bitcoin has no formal structure.
Types of Bitcoin Improvement Proposals (BIPs)
BIP approval process depends majorly on its type. There are three types of BIPs: Standards
Track, Informational, or Process BIPs. Let’s look at each of them and what they entail.
1. Standards Track BIPs –
Such types of BIPs entail making changes to the network protocol, block, or transaction
validation method. It also intends to affect the interoperability of the two versions of BIPs or
Bitcoin. This type of BIP certainly requires community consensus. An example of this is BIP 91.
2. Informational BIPs –
Such types of BIPs highlight the design issues, general guidelines, and supporting information.
Informational BIPs, as the name suggests, are just for information’s sake and can be taken
seriously or ignored by the community. An example of this is BIP 32.
3. Process BIPs –
These types of BIPs describe or propose a change in the process. They are similar to Standards
Track BIPs and require community consensus. They can’t be ignored, but unlike Standards Track
BIPs, they intend to be applied outside the Bitcoin protocol. An example of this is BIP 2.

Bitcoin
 Launched in 2009, Bitcoin is the world's largest cryptocurrency by market capitalization.
 Unlike fiat currency, Bitcoin is created, distributed, traded, and stored using a decentralized
ledger system known as a blockchain.
 Bitcoin and its ledger are secured by proof-of-work (PoW) consensus, which also secures the
system and verifies transactions.
 Bitcoin can be purchased via various cryptocurrency exchanges.
 Bitcoin's history as a store of value has been turbulent; it has undergone several boom and
bust cycles over its relatively short lifespan.

Working of Bitcoin Mining:


In the Bitcoin ecosystem, there is a network of miners who use their CPUs to process
transactions.
 Once a user who intends to send Bitcoin enters the public address, number of Bitcoins to be
sent and affixes the private key to generate signature, the encrypted information is then
sent to the network of miners who are given the task to verify whether there is sufficient
balance to transfer and authenticate the transaction.
 The faster the CPU of the miner, the greater are the chances that they will verify and that
miner gets rewarded in Bitcoins for facilitating the transfer.
 Here the miner’s job is only to provide CPU power, which automatically runs the Bitcoin
program to validate Bitcoin transfers. There is no manual intervention by the Bitcoin miner.
 Once the transaction is processed by a Bitcoin miner, this number of transactions is then
broadcasted to the network of miners who get the copy or download of the same block.
 These blocks through a timestamp mechanism are stored in a sequential or chronological
order forming a blockchain. Each miner in the network is supposed to have the updated and
complete copy of the ledger or the blockchain if they want to facilitate transfer and earn
Bitcoins.

Genesis Block
 A Genesis Block is the first block in a cryptocurrency blockchain.
 A blockchain consists of a series of blocks that are used to store information related to
transactions that occur on a blockchain network.
 Each block contains a unique header, and each such block is individually identified by its
block header hash.
 These blocks are chained together by their encrypted headers, with the Genesis Block being
the foundation—and they grow in number.
 A block's number is referred to as its height on the blockchain.
 So, the Genesis Block has a height of zero, the following block has a height of one, and so
on.
 The chained information in each block is one of the things that makes a blockchain so
secure.
 Bitcoin's Genesis Block was the first instance of a proof-of-work blockchain system and is the
template for all other blocks in its blockchain.

Orphan Blocks
 In blockchain terms, orphan blocks are blocks mined simultaneously as another block but
not accepted by the blockchain.
 Most of the time, this is because there are not enough blocks generated from that block for
the network to recognize it as the longest fork.
 There can be two miners who solve valid blocks simultaneously. The network uses both
blocks until one chain has more verified blocks. Then, the blocks in the shorter chain are
orphaned.
 Orphan blocks are a regular occurrence in a distributed blockchain such as Bitcoin.
 The Bitcoin blockchain discards orphan blocks; however, other blockchains may use them for
different purposes.
 Technically, orphan blocks are called stale blocks, but because most people refer to them as
orphans or uncles, the name orphan (and uncle) block has stuck.

CAP theorem
CAP theorem, also known as Brewer's theorem, was introduced by Eric Brewer in 1998 as
conjecture. In 2002, it was proven as a theorem by Seth Gilbert and Nancy Lynch. The
theory states that any distributed system cannot have consistency, availability, and partition
tolerance simultaneously:
 Consistency is a property which ensures that all nodes in a distributed system have a single,
current, and identical copy of the data.
 Availability means that the nodes in the system are up, accessible for use, and are accepting
incoming requests and responding with data without any failures as and when required. In
other words, data is available at each node and the nodes are responding to requests.
 Partition tolerance ensures that if a group of nodes is unable to communicate with other
nodes due to network failures, the distributed system continues to operate correctly. This
can occur due to network and node failures.
It has been proven that a distributed system cannot have consistency, availability, and partition
tolerance simultaneously. This is explained with the following example. Let's imagine that there
is a distributed system with two nodes. Now let us apply the three theorem properties on this
smallest of possible distributed systems only with two nodes.
 Consistency is achieved if both nodes have the same shared state; that is, they have the
same up-to-date copy of the data.
 Availability is achieved if both nodes are up and running and responding with the latest
copy of data.
 Partition tolerance is achieved if communication does not break down between two nodes
(either due to network issues, Byzantine faults, and so forth), and they are able to
communicate with each other.

Special signature primitives for blockchains:


1. Ring signatures:
Anonymity is always required in information systems, especially in the e-cash system.
However, Bitcoin can only provide pseudonymity due to the linkability of transactions.
Therefore, many new
alternative cryptocurrencies have been proposed to address this problem.
However, only ring signature and its variants have been used in blockchains for anonymity.
2. One-time (ring) signatures:
Lamport in 1979 (Lamport, 1979) proposed the concept of one-time signature (OTS), where the
signing key can
be used securely but only once, and the signing key would be revealed if it is used twice or
more. OTS is
frequently used as a building block in constructions of encryptions and authenticated key
agreements.
3. Borromean (ring) signatures:
A cryptographic protocol that enables signers to stay anonymous among multiple public keys in
a ring. Borromean ring signatures are used in Liquid to enhance privacy by protecting the
sender's identity and allowing for verification that at least one party from a predefined set
signed a message without disclosing the specific signer's identity. The ring should include the
signer's public key and several other public keys owned by other users. The larger the ring, the
more privacy it provides.
4. Multi-signatures:
The primitive of multi-signature allows a single signature to work as several ordinary signatures
on the same
message. One of the critical requirements of multi-signature is that the single signature has the
same size as one
regular signature.

S.N
O Private Key Public Key

The private key is faster than the public


It is slower than a private key.
1. key.

In this, the same key (secret key) and In public-key cryptography, two keys are
algorithm are used to encrypt and used, one key is used for encryption, and the
2. decrypt the message. other is used for decryption.

In private key cryptography, the key is In public-key cryptography, one of the two
3. kept a secret. keys is kept a secret.

The private key is Symmetrical because The public key is Asymmetrical because
there is only one key that is called a there are two types of keys: private and
4. secret key. public keys.

In this cryptography, the sender and In this cryptography, the sender and receiver
5. receiver need to share the same key. do not need to share the same key.
S.N
O Private Key Public Key

In this cryptography, the public key can be


In this cryptography, the key is private.
6. public and a private key is private.

7. It is an efficient technology. It is an inefficient technology.

8. It is used for large amounts of text. It is used for only short messages.

There is the possibility of losing the key There is less possibility of key loss, as the key
9. that renders the systems void. is held publicly.

The private key is to be shared


The public key can be used by anyone.
10. between two parties.

What Is a Private Key?


 In cryptography, a key is a string of randomly generated bits used to scramble and
unscramble data.
 Keys are generated by algorithms that ensure that each key is unpredictable and unique.
The more bits used in the key, the harder it is to break.
 So, in the context of encryption and decryption, a private key is a key used both for
encryption and decryption. Both parties, the sender and receiver, use the private key for
encryption and decryption purposes.
 The encryption algorithm is the inverse of the decryption algorithm.
 Thus, if the encryption algorithm was created with multiplication and addition, the
decryption algorithm would use division and subtraction to “break” the code.
 Private keys are also called “symmetric” because it’s the only key copied and shared by
another user to decode the received cipher.

What Is a Public Key?


 A public key is an encryption method that uses a pair of private and public keys to secure
data communication. First, the public key encrypts the plain text, converting it into
ciphertext, then the private key is used for decrypting the converted ciphertext so the
recipient can read the message.
 The public receives the appropriately named public key, and the receiver gets the private
key. Public key cryptography is called asymmetric cryptography.
 Some people describe public keys as the same thing as looking up a company’s address on
the Internet.
 Anyone can look up that information and share it as they wish.
 Each public key is paired with a private key. Using our company address analogy, the private
key is like the key to that company’s front door.
 The public knows the company's location because the address (public key) can be easily
found. But only people with a key to the front door of the building (private key) can gain
entry.

Bitcoin Wallets
“A Bitcoin wallet (and any crypto wallet, for that matter) is a digital wallet storing the encryption
material giving access to a Bitcoin public address and enabling transactions,”
Bitcoin wallets not only hold your digital coins, but they also secure them with a unique private
key that ensures that only you, and anyone you give the code to, can open your Bitcoin wallet.
Think of it like a password on an online bank account.
With a crypto wallet, you can store, send and receive different coins and tokens.
Types of Bitcoin Wallets
As with physical wallets, Bitcoin wallets come in a range of styles, each offering a tradeoff
between convenient access and security against theft.
Mobile
Mobile wallets, like WazirX multi-cryptocurrency wallet and Exodus bitcoin wallet are those that
run as apps on phones, tablets and other mobile devices.
Web
Web-based wallets, like Guarda Bitcoin Wallet, store your coins through an online third party.
You can gain access to your coins and make transactions through any device that lets you
connect to the internet. These web-based wallets are frequently associated with crypto
exchanges that allow you to trade and store crypto all in one place.
Desktop
Desktop wallets, like Guarda and Exodus, are programs you can download onto a computer to
store coins on your hard drive. This adds an extra layer of security versus web and mobile apps
because you aren’t relying on third-party services to hold your coins. Still, hacks are possible
because your computer is connected to the internet.
Hardware
Hardware wallets are physical devices, like a USB drive, that are not connected to the web.
These include Ledger Nano X Bitcoin Wallet and Trezor Model T Bitcoin Wallet available in India.
To make transactions, you first need to connect the hardware wallet to the internet, either
through the wallet itself or through another device with internet connectivity.
Paper Wallets
In a paper wallet, you print off your key, typically a QR code, on a paper document. This makes it
impossible for a hacker to access and steal the password online, but then you need to protect
the physical document.

Bitcoin types of Transaction. (p2p-kh, p2sh, pay to multisig, pay to pub key)
P2PK
Pay-to-Public-Key (P2PK) is the original method of receiving bitcoin, and it does not involve an
address. Instead, as the name suggests, bitcoin is paid directly to an exposed public key.
P2PK is no longer used because it is a more expensive, less private, and less secure way of
receiving bitcoin than subsequent methods.
P2PKH
Pay-to-Public-Key-Hash (P2PKH) was available for use at bitcoin’s beginning, and it showed up
on the blockchain for the first time less than two weeks after the genesis block. P2PKH makes
several improvements upon P2PK, such as utilizing an address. P2PKH addresses are typically 34
or 33 characters in length, and they are encoded in Base58 format. They begin with a prefix
of 1 and are currently responsible for receiving and securing 43% of the mined bitcoin supply,
more than any other address type.
P2MS
Pay-to-Multisig (P2MS) is a trivial transaction type that was only briefly relevant and has never
been responsible for holding more than 100 bitcoin at one time across all network participants.
Nevertheless, P2MS is a part of bitcoin’s history.
P2MS was introduced as a standard script in early 2012, as specified by BIP 11. However, this
transaction type suffered from the same problems as P2PK since it included exposed public keys
and did not use any address format. It also limited the number of public keys in a multisig
quorum to three.
P2SH
Pay-to-Script-Hash (P2SH) was introduced to bitcoin as a soft fork in accordance with BIP 16 on
April 1, 2012. P2SH shares a lot in common with P2PKH. The main difference is that the address
is created by hashing a redeem script instead of hashing a single public key.
A redeem script can be thought of as coded instructions specifying how bitcoin received to the
P2SH address can be spent in the future. There could be a wide range of possibilities, including
multiple different public keys. The receiver, not the sender, determines the script details, and
the spending instructions are not exposed publicly until bitcoin is spent out of the address.

The Transaction Life Cycle of a Bitcoin


 A bitcoin transaction consists of three main components, these are inputs, outputs, and the
amount that is intended to be transferred between parties.
 The cycle starts with party A creating a transaction, inputs, outputs, and the amount are
embedded in a transaction.
 Similar to a banker's cheque referencing an account as the source of funds, bitcoin
transactions reference previous transactions(inputs).
 The next step involves the use of digital signatures to sign the transaction, this means that A
authorizes B to spend the funds to be transferred.
 At this point the transaction is fully formed, it holds all the needed information to initiate an
exchange of funds between parties.
 The transaction is then broadcasted to the entire network which might take some time since
the network is very large.
 Broadcasting transactions might be considered unsafe in the case of credit cards and banks
but in bitcoin, no sensitive data is embedded in a transaction, furthermore, ways exist to
ensure anonymity.
Broadcasting transactions ensures that all nodes in the network recognize the amount X has
changed ownership from A to B and can be spent by B.
 A single miner on the blockchain is responsible for validating the transaction and adding it to
his/her block if valid, then propagating it to other network nodes. If valid the transaction is
successful otherwise it is rejected. The block is stored on the distributed ledger to ensure
security and immutability.
At this point, B now owns the amount X and can spend it in a new transaction in a new cycle
of ownership.
 The bitcoin network is resistant to attacks since every node in the network validates a
transaction before sending it to other nodes. Furthermore, invalid transactions are not
propagated beyond a single node.

Structure of a block.
Let’s just draw a conceptual image of a block with reference
to a ledger of transactions.
The above image will create a simpler conceptual block
visualization in your head. However, the actual block contains
a lot more information than the ledger image above.
Following are the significant elements of a block –
Block Height –
It’s the sequence number of the block in the chain of blocks.
Block Height: 1 is the genesis block (first block in the network).
Block Size –
It’s a 4-bytes or 32-bit field that contains the size of the block.
It adds size in Bytes. Ex – Block Size: 216 Bytes.
Block Reward –
This field contains the amount rewarded to the miner for adding a block of transactions.
Tx Count –
The transaction counter shows the number of transactions contained by the block. The field has
a maximum size of 9 bytes.
Block Header –
The Block header is an 80-Byte field that contains the metadata – the data about the block.
Let’s briefly discuss the 6 components of the Block Header.
 Time – It’s the digitally recorded moment of time when the block has been mined. It is
used to validate the transactions.
 Version – It’s a 4-bytes field representing the version number of the protocol used. Usually,
for bitcoin, it’s ‘0x1’.
 Previous Block Hash – It’s a 32-bytes field that contains a 256-bits hash of the previous
block. This helps to create a linear chain of blocks.
 Bits – It’s a 4-bytes field that tells the complexity to add the block. It’s also known as
“difficulty bits.”
 Nonce – It’s a 4-bytes field that contains a 32-bit number. These are the only changeable
element in a block of transactions.
 Merkle Root – A 32-bytes field containing a 256-bit root hash. It’s constructed hierarchically
combining hashes of the individual transactions in a block.
Transactions
It’s a variable-size field that includes the list of all transactions contained in the block.
FYI, each bitcoin block contains about 2000 transactions. The size of each block is approx. 1MB.
The size and number of transactions in a block vary in blockchains. It’s decided based on
network congestion and communication overhead.

Ethereum
 Ethereum is a decentralized global software platform powered by blockchain technology.
 It is most commonly known for its native cryptocurrency, ether (ETH).
 Ethereum can be used by anyone to create any secured digital technology.
 It has a token designed to pay for work done supporting the blockchain, but participants can
also use it to pay for tangible goods and services if accepted.
 Ethereum is designed to be scalable, programmable, secure, and decentralized.
 It is the blockchain of choice for developers and enterprises creating technology based upon
it to change how many industries operate and how we go about our daily lives.

Cryptocurrency
 Cryptocurrency is a digital payment system that doesn't rely on banks to verify transactions.
 It’s a peer-to-peer system that can enable anyone anywhere to send and receive payments.
Instead of being physical money carried around and exchanged in the real world,
cryptocurrency payments exist purely as digital entries to an online database describing
specific transactions.
 When you transfer cryptocurrency funds, the transactions are recorded in a public ledger.
Cryptocurrency is stored in digital wallets.
 Cryptocurrency received its name because it uses encryption to verify transactions.
 This means advanced coding is involved in storing and transmitting cryptocurrency data
between wallets and to public ledgers.
 The aim of encryption is to provide security and safety.
 The first cryptocurrency was Bitcoin, which was founded in 2009 and remains the best
known today.
 Much of the interest in cryptocurrencies is to trade for profit, with speculators at times
driving prices skyward.

Explain EVM.
 The Ethereum Virtual Machine (EVM) is the computation engine for Ethereum that manages
the state of the blockchain and enables smart contract functionality.
 The EVM is contained within the client software that you need in order to run a node on
Ethereum.
 Nodes on Ethereum keep copies of transaction data, which the EVM processes to update
the distributed ledger.
 Generally speaking, nodes on Ethereum natively support the EVM as the client software
implements this functionality.
 The EVM participates in block creation and transaction execution.
 In block creation, the EVM sets standards for managing the state from block to block.
 In transaction execution, the EVM executes tasks by interpreting the instructions
in Opcodes; however, the data is formatted in bytecode.
 To get the data into bytecode, you can use a programming language such as Solidity (i.e., the
native programming language for smart contracts) to compile and deploy the smart contract
using bytecode.

Explain the elements of Ethereum Blockchain


Component-1 :
Nodes –
There are two types of nodes in an Ethereum network. They are as follows.
1. Mining Node –
These nodes are responsible for writing all the transactions that have occurred in the
Ethereum network in the block.
2. Ethereum Virtual Machine Node –
These are the nodes in the Ethereum network in which Smart Contracts (it is a type of
contract between supporter and developer in which there are a set of rules based on
which both the parties agree to interact with each other. The agreement will be
automatically executed when the pre-defined rules are met.) are implemented. By
default, this node utilizes a 30303 port number for the purpose of communication
among themselves.
Component-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. The first one is Bitcoin. Other
cryptocurrencies can be used to get ether tokens, but vice versa is not true.
 It is used in the Ethereum algorithm as an incentive for miners who connect blocks to
the blockchain using a proof-of-work method.
 It is the only currency that can be used to pay transaction costs, which go to miners as
well. The block reward, as well as transaction fees, provide miners with an opportunity
to keep the blockchain rising.
Component-3 :
Gas –
 Gas is an internal currency of the Ethereum network. We need gas to run applications on
the Ethereum network, much as we need gas to run a vehicle.
 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.
Component-4 :
Ethereum Accounts –
There are two types of Ethereum accounts. They are as follows.
1. Externally owned account –
These accounts are used to store transactions.
2. Contract account –
As the name itself suggests, these accounts store the details of Smart Contracts.
Component-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.
Component-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.
Component-7 :
Ethash –
The intended PoW algorithm for Ethereum 1.0 is Ethash. It’s the most recent version of Dagger-
Hashimoto, however, it’s no longer proper to call it that because many of the algorithms’ initial
characteristics have been dramatically altered in the previous month of study and development.

Smart Contract
 A Smart Contract (or cryptocontract) is a computer program that directly and automatically
controls the transfer of digital assets between the parties under certain conditions.
 A smart contract works in the same way as a traditional contract while also automatically
enforcing the contract.
 Smart contracts are programs that execute exactly as they are set up(coded, programmed)
by their creators.
 Just like a traditional contract is enforceable by law, smart contracts are enforceable by
code.
 The bitcoin network was the first to use some sort of smart contract by using them to
transfer value from one person to another.
 The smart contract involved employs basic conditions like checking if the amount of value to
transfer is actually available in the sender account.
 Later, the Ethereum platform emerged which was considered more powerful, precisely
because the developers/programmers could make custom contracts in a Turing-complete
language.
 It is to be noted that the contracts written in the case of the bitcoin network were written in
a Turing-incomplete language, restricting the potential of smart contracts implementation in
the bitcoin network.
 There are some common smart contract platforms like Ethereum, Solana,
Polkadot, Hyperledger fabric, etc.
Ricardian Contract
 A Ricardian Contract is a legal contract that was introduced first in 1995 by a well-known
programmer, Ian Grigg.
 “It is a form of digital documents that act as an agreement between two parties on the
terms and condition for an interaction between the agreed parties.”
 What makes it unique is – it is cryptographically signed and verified.
 Even when it is a digital document, it is available in a human-readable text that is also easy
to understand for people (not only lawyers).
 It is a unique legal agreement or document that is readable for computer programs as well
as humans at the same time.
 Simply put, it has two parts or serves two purposes. First, it is an easy-to-read legal contract
between two or more parties. Your lawyer can easily understand it, and even you can read it
and understand the core terms of the Contract.
 Second, it is a machine-readable contract as well. With blockchain platforms, these contracts
can now easily hashed, signed, and can be saved on the blockchain.
 All in all, Ricardian Contracts merge legal contracts with technology, blockchain
technology to be precise. They bind the parties into a legal agreement before the execution
of the actions on the blockchain network.

Externally Owned Accounts vs Contract Based Accounts
Below are the differences between Externally owned accounts and contract-based accounts.
S.
No. Externally Owned Accounts Contract Accounts

1. This account is controlled by humans. This account is controlled Contract Code.

2. The private key is needed to access EOAs. No key is needed to access Contract Accounts.

EASs are created automatically on creating


3. CA require EOAs to be activated.
a wallet.

EOAs do not have their own associated


4. CAs have their own associated code.
code.

5. No execution fee is associated with EOAs. The execution fee is associated with CAs.

Code hash represents the code associated with


6. Code hash is an empty string.
the account.
Explain Hyperledger.
 Hyperledger is a collection of open source projects created to support the development of
blockchain-based distributed ledgers.
 It aims to create the needed frameworks, standards, tools and libraries to
build blockchains and related applications.
 Since Hyperledger's creation by the Linux Foundation in 2016, the project has had
contributions from organizations such as IBM and Intel, Samsung, Microsoft, Visa, American
Express and blockchain startups such as Blockforce..
 Hyperledger acts as a hub for different distributed ledger frameworks and libraries.
 With this, a business could use one of Hyperledger's frameworks, for example, to improve
the efficiency, performance and transactions in their business processes.
 Hyperledger works by providing the needed infrastructure and standards for developing
blockchain systems and applications.
 Developers use Hyperledger Greenhouse (the frameworks and tools that make up
Hyperledger) to develop business blockchain projects.
 Network participants are all known to each other and can participate in consensus-making
processes.

Disadvantages of transaction processing system (TPS)


 Setup cost:
The initial setup cost of TPS is high. You have to buy a license for TPS software. Also, you need to
buy computers, cameras and price detecting devices.
 Incompatible:
Sometimes your software and hardware have compatibility problems. Some hardware has
drivers problems.
 Overload problem:
Sometimes there occurs a high number of transactions on the TPS so it slows down the system
or it stops working.
 High internet:
Users need to have a high internet connection to use the TPS.
 Standard format:
TPS lacks a standard format.

You might also like