UNIT-I Notes
UNIT-I Notes
UNIT-I Notes
It makes the network more secure and resistant to attack. Since there is no central point
of failure, it is very difficult to hack or corrupt the entire network.
Decentralization makes the network more transparent and accountable. All transactions
are recorded on the blockchain and are visible to everyone on the network. This makes
it difficult to commit fraud or other malicious activities.
Decentralization makes the network more accessible and affordable. Anyone with a
computer and an internet connection can participate in the network. This makes it a
more level playing field for everyone.
In Bitcoin, the blockchain is used to record all cryptocurrency transactions. This makes
it a secure and transparent way to transfer value.
In Ethereum, the blockchain is used to run smart contracts. These are self-executing
contracts that can be used to automate a variety of tasks.
In supply chain management, blockchain can be used to track the movement of goods
and materials. This can help to improve transparency and efficiency.
In healthcare, blockchain can be used to store patient records. This can help to improve
security and privacy.
Reduced Intermediaries: In financial services, decentralization eliminates the need for
intermediaries such as banks or payment processors, which can lead to reduced
transaction costs and increased efficiency.
Data Privacy and Ownership: Users have more control over their data in decentralized
systems, reducing the risk of unauthorized data sharing or exploitation.
1|Page
20CS29- BLOCK CHAIN TECHNOLOGIES UNIT-I
Blockchain technology can address some of these shortcomings. For example, blockchain is
decentralized, meaning that it is not controlled by a single entity. This makes it more secure
and transparent than traditional systems. Blockchain is also more scalable than traditional
systems, meaning that it can handle a large number of transactions without slowing down.
Blockchain technology has several key features that set it apart from traditional centralized
systems. These features work together to provide security, transparency, and decentralization.
Here are the key features of blockchain:
Distributed Ledger
Peer- to – Peer
Transparency
Consensus
Security
Immutability
Programmable
Distributed Ledger: - A ledger is a collection of transactions. With a digitally distributed
ledger or a blockchain, no one owns the ledger. The ledger is distributed among participants in
the network, all running the same blockchain protocols. It is decentralized in that an identical
copy of the ledger exists on every node/computer on the network.
2|Page
20CS29- BLOCK CHAIN TECHNOLOGIES UNIT-I
“A distributed ledger is a database that is shared across multiple nodes in a network. Each node
maintains a copy of the ledger, and all transactions are recorded on each node. This ensures that
the ledger is always up-to-date and that no single node can control or manipulate the data.”
Peer- to – Peer: - The ledger is stored, updated, and maintained by a peer network. Nodes form
the infrastructure of a blockchain network. They store, spread and preserve the blockchain data,
so a blockchain exists on nodes.
Nodes in a blockchain network follow the same rules, but they have different roles. Full nodes
maintain the blockchain by storing a copy of the ledger and verifying transactions. User nodes
interact with the ledger by sending and receiving transactions. Blockchain technology replaces
a centralized authority with a peer-to-peer network.
Transparency: - All transactions on a distributed ledger are transparent, as they are recorded
on every node in the network. This makes it easy to track the history of any asset or transaction.
In a blockchain, we can see all the transactions that have occurred on the shared or distributed
ledger. A blockchain stores details of every transaction that occurred since the first transfer.
Since every node shares a copy of the agreed-upon ledger, there is no friction about the
transactions, everyone has the same agreed-upon copy.
Consensus: - Consensus in blockchain refers to the mechanism by which participants in a
decentralized network agree on the validity and order of transactions and reach a common
understanding of the state of the blockchain ledger. It ensures that all nodes in the network have
a consistent view of the blockchain and prevents malicious actors from tampering with the data.
Various consensus mechanisms exist, such as proof-of-work, proof-of-stake, and practical
Byzantine fault tolerance (PBFT).
Immutability: - Once a transaction is added to a block and the block is added to the chain, it
becomes extremely difficult to alter the data. Each block contains a reference to the previous
block through cryptographic hashes, creating a chronological chain. This immutability ensures
that past transactions remain secure and tamper-proof.
3|Page
20CS29- BLOCK CHAIN TECHNOLOGIES UNIT-I
• Executing business logic: Smart contracts can be used to execute business logic, such as
checking if a user has enough funds to make a purchase. This can help to automate
business processes and reduce the risk of fraud.
• Recording events: Smart contracts can be used to record events, such as the arrival of a
shipment or the completion of a task. This can help to improve traceability and
transparency.
The basic idea behind blockchain is to create a decentralized and transparent digital ledger
that records and verifies transactions or data in a secure and immutable manner. It aims to
enable trust, accountability, and efficiency in various processes without the need for a central
authority.
4|Page
20CS29- BLOCK CHAIN TECHNOLOGIES UNIT-I
Blockchain technology has the potential to transform industries, including finance, supply
chain management, healthcare, voting systems, and more, by improving transparency,
security, and efficiency.
5|Page
20CS29- BLOCK CHAIN TECHNOLOGIES UNIT-I
Security and Data Integrity: Blockchain uses cryptography to secure data and make it
tamper-proof. Data is replicated across multiple nodes, making it more resilient to
hacking. This is relevant in sectors where data accuracy and privacy are critical.
Efficient and Streamlined Processes: Blockchain can streamline and automate
processes with multiple parties and complex workflows. Smart contracts automate
agreements, eliminating intermediaries and speeding up settlement. This is relevant in
areas like supply chain management, international payments, and identity verification.
Improved Traceability and Accountability: Blockchain can track the movement of
goods in supply chains and verify the origin and quality of products. It provides a
transparent and tamper-proof record of transactions, making it ideal for traceability
purposes.
Financial Inclusion and Cross-Border Transactions: Blockchain has the potential to
foster financial inclusion by providing access to financial services for the unbanked or
underbanked. It enables secure and low-cost access to financial services, such as
payments, lending, and remittances. Blockchain also enables faster and more cost-
effective cross-border transactions.
Data Privacy and Ownership: Blockchain can give individuals greater control over their
personal data. It allows individuals to manage and share their personal information
securely and selectively, reducing reliance on centralized databases vulnerable to data
breaches. Users can grant access to specific data elements without exposing their entire
profile, enhancing privacy and data ownership.
6. Describe the fundamental role of cryptography in ensuring the security and integrity of
data within a blockchain network.
Cryptography is the practice of securing information and communications through the use of
codes. Cryptography, the practice of secure communication, ensures that the data stored in a
blockchain remains tamper-proof, confidential, and authentic.
Symmetric cryptography: This type of cryptography uses the same key to encrypt
and decrypt data. This key is shared between the sender and receiver of the data.
Asymmetric cryptography: This type of cryptography uses two different keys: a
public key and a private key. The public key is used to encrypt data, and the private
key is used to decrypt it.
Hash Functions: Hash functions are mathematical algorithms that take an input (data) and
produce a fixed-size string of characters, known as a hash. Hash functions are designed
to be fast to compute and irreversible. In blockchain, hash functions are used to create a
unique digital fingerprint for each block, ensuring its integrity. Even a small change in the
input data results in a completely different hash output.
6|Page
20CS29- BLOCK CHAIN TECHNOLOGIES UNIT-I
Digital Signatures: Digital signatures are used to verify the authenticity and integrity of
data. A digital signature is created using a private key, and it can be verified using a
corresponding public key. In blockchain, digital signatures are used to ensure that
transactions are authorized by the rightful owner and that they haven't been tampered with.
Public-Key Cryptography: Public-key cryptography, also known as asymmetric
cryptography, uses a pair of keys: a public key and a private key. The public key is widely
distributed, while the private key is kept secret. Messages encrypted with the public key
can only be decrypted with the corresponding private key, providing confidentiality.
Public-key cryptography is widely used in blockchain for secure key exchange, digital
signatures, and encryption.
Merkle Trees: A Merkle tree, or hash tree, is a tree structure where each leaf node
represents a data block, and each non-leaf node represents the hash of its child nodes. It
allows efficient verification of data integrity by recursively hashing and comparing nodes
from the bottom (leaves) to the top (root). Merkle trees are used in blockchain to summarize
the transactions within a block and provide a compact proof of the block's integrity.
Elliptic Curve Cryptography (ECC): Elliptic Curve Cryptography is a public-key
cryptography scheme that leverages the mathematics of elliptic curves over finite fields.
ECC offers the same level of security as other asymmetric algorithms (like RSA) but with
much shorter key lengths, making it more efficient for resource-constrained environments
such as blockchain. ECC is widely used in blockchain for digital signatures, key exchange,
and other cryptographic operations
Without cryptography, blockchain would not be secure or reliable. It is the fundamental
technology that makes blockchain possible.
7. Explain about CAP theorem and illustrate the methods of decentralization in detail.
The CAP theorem, also known as Brewer's theorem, is a fundamental theorem in distributed
computing that states that it is impossible for a distributed system to simultaneously provide
more than two out of the following three guarantees:
Consistency (C): In a distributed system, consistency implies that all nodes or participants in
the system see the same data at the same time. In other words, every read operation on the
system returns the most recent write. Achieving strong consistency ensures that there are no
conflicting or outdated versions of data across the distributed nodes.
Availability (A): Availability means that every request (read or write) to the system receives
a response, without guaranteeing that it's the most up-to-date data. Highly available systems
can provide responses even when some nodes or components are down. In an available
system, there might be variations in the data returned because of asynchrony and replication
delays.
Partition Tolerance (P): Partition tolerance addresses the system's ability to continue
functioning even when network partitions (communication failures) occur between nodes in
the distributed system. Network partitions are situations where some nodes can't
7|Page
20CS29- BLOCK CHAIN TECHNOLOGIES UNIT-I
communicate with others due to network issues, but the system should still function without
failures.
The CAP theorem is important because it helps us to understand the trade-offs that we need to
make when designing distributed systems. If we want our system to be consistent and available,
then we need to make sure that there are no partitions in the network. However, this can make
the system more vulnerable to outages. If we want our system to be partition tolerant and
available, then we need to relax the consistency requirement. This means that some nodes in the
system may have different views of the data.
There are a number of methods of decentralization. Some of the most common methods include:
The choice of decentralization method depends on the specific application. For example, a
distributed ledger may be a good choice for a financial application, while a peer-to-peer network
may be a good choice for a file sharing application.
8. Compare fiat currency and cryptocurrency, highlighting their key differences in terms
of origin, regulation, and underlying technology.
Origin:
8|Page
20CS29- BLOCK CHAIN TECHNOLOGIES UNIT-I
Regulation:
Fiat Currency: Fiat currencies are regulated by government central banks and
financial institutions. Governments have control over the issuance, circulation, and
monetary policy of fiat currency. Regulations vary by country and can include factors
such as interest rates, inflation targets, and capital controls.
Cryptocurrency: Cryptocurrencies are relatively new and have faced varied
regulatory responses worldwide. Some countries have embraced cryptocurrencies,
considering them legal forms of payment or commodities, while others have imposed
strict regulations or outright bans due to concerns about money laundering, tax evasion,
and consumer protection.
Underlying Technology:
9. Discuss the types of crypto currency and write the advantages and disadvantages of
crypto currency over traditional currency.
Bitcoin: Bitcoin is the first and most well-known cryptocurrency. It was created in 2009
by an anonymous person or group of people under the pseudonym Satoshi Nakamoto.
Bitcoin is based on a peer-to-peer network and uses cryptography to secure its transactions.
Ethereum: Ethereum is a blockchain platform that allows developers to create
decentralized applications. It was created in 2015 by Vitalik Buterin. Ethereum uses a
different consensus mechanism than Bitcoin, called proof-of-stake.
Tether: Tether is a stablecoin, which means that it is pegged to a fiat currency, such as the
US dollar. This means that the value of Tether is always supposed to be equal to the value
of the fiat currency that it is pegged to.
Binance Coin: Binance Coin is the native cryptocurrency of the Binance exchange. It can
be used to pay for fees on the exchange and to participate in certain liquidity pools.
9|Page
20CS29- BLOCK CHAIN TECHNOLOGIES UNIT-I
10. Explain how blockchain can be used to improve the efficiency of financial
transactions.
10 | P a g e
20CS29- BLOCK CHAIN TECHNOLOGIES UNIT-I
Bitcoin prediction markets are platforms or exchanges where individuals can place bets or
make predictions on the future price or performance of Bitcoin. These markets allow
participants to speculate on the future value of Bitcoin and potentially profit from correct
predictions.
Bitcoin prediction markets operate similarly to traditional financial markets, but with a
focus on Bitcoin-specific predictions. Participants can place bets or trade contracts based
on their expectations of Bitcoin's future performance. The prices of these contracts
fluctuate based on supply and demand, reflecting the collective sentiment and predictions
of the participants.
11 | P a g e
20CS29- BLOCK CHAIN TECHNOLOGIES UNIT-I
In a P2P network, each computer is called a "peer." Peers are connected to each other through the
Internet. A peer-to-peer (P2P) network is a decentralized network of computers that are connected
to each other and share resources. In a P2P network, there is no central server or authority. Instead,
all of the computers on the network are equal and can communicate directly with each other.
P2P networks are used for a variety of purposes, including file sharing, streaming media, and
gaming. They are also used for more specialized applications, such as distributed computing and
disaster recovery.
When a computer wants to share a resource, it broadcasts a message to the network. Other
computers on the network that are interested in the resource respond to the message, and the
resource is shared between the computers.
P2P networks are a powerful way to share resources and collaborate. They are also a more secure
and reliable way to communicate than traditional client-server networks. Benefits of using a peer-
to-peer network:
Scalability: P2P networks can easily scale to accommodate a large number of users and
devices.
Reliability: P2P networks are more reliable than traditional client-server networks because
there is no single point of failure.
Security: P2P networks can be more secure than traditional client-server networks because
there is no central authority that can be hacked or compromised.
Cost-effectiveness: P2P networks can be more cost-effective than traditional client-server
networks because there is no need for a central server.
12 | P a g e
20CS29- BLOCK CHAIN TECHNOLOGIES UNIT-I
13. Explain why the immutability of blockchain records is crucial for maintaining trust in
the integrity of data.
The immutability of blockchain records is crucial for maintaining trust in the integrity of
data for the following reasons:
It ensures that data cannot be tampered with or deleted. This is important for
applications where data integrity is critical, such as financial transactions, supply
chain management, and medical records.
It provides a transparent and auditable record of data. This allows anyone to verify
the authenticity of data and track its changes over time.
It makes it difficult to commit fraud or other malicious activities. This is because
once data is recorded on the blockchain, it cannot be changed or deleted.
Without immutability, blockchain would not be a secure or reliable way to store data. It is
one of the key features that makes blockchain technology so valuable.
Here are some specific examples of how the immutability of blockchain records is used to
maintain trust in the integrity of data:
13 | P a g e
20CS29- BLOCK CHAIN TECHNOLOGIES UNIT-I
Mining: Miners are computers that verify transactions on the blockchain and add
new blocks to the chain. Miners are rewarded with cryptocurrency for their work.
This process helps to secure the blockchain and to prevent fraud.
Wallets: Wallets are software programs that store cryptocurrency. Wallets can be
either hot wallets or cold wallets. Hot wallets are connected to the internet, while
cold wallets are not. Hot wallets are more convenient to use, but they are also more
vulnerable to attacks. Cold wallets are less convenient to use, but they are more
secure.
Nodes: Nodes are computers that run the blockchain software and participate in the
network. Nodes help to verify transactions and to maintain the blockchain.
14 | P a g e