0% found this document useful (0 votes)
8 views240 pages

Understanding Blockchain and DLT Features

blockchain notes

Uploaded by

c9jjrvys8q
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)
8 views240 pages

Understanding Blockchain and DLT Features

blockchain notes

Uploaded by

c9jjrvys8q
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

Blockchain and Distributed Ledger Technology (DLT)

A blockchain is a digital ledger of transactions that are distributed across the


entire network of computers (or nodes) on the blockchain. Distributed ledgers
use independent nodes to record, share, and synchronize transactions in their
respective electronic ledgers instead of keeping them in one centralized server.
A blockchain uses several technologies like digital signatures, distributed
networks, and encryption/ decryption methods including distributed ledger
technology to enable blockchain applications.
Blockchain is one of the types of DLT in which transactions are recorded with
an unchangeable cryptographic signature called a hash. That is why distributed
ledgers are often called blockchains.

What is Distributed Ledger Technology (DLT)?

Distributed Ledger Technology (DLT) is centered around an encoded and


distributed database where records regarding transactions are stored. A
distributed ledger is a database that is spread across various computers,
nodes, institutions, or countries accessible by multiple people around the
globe.

Features:

1. Decentralized: It is a decentralized technology and every node will maintain


the ledger, and if any data changes happen, the ledger will get updated. The
process of updating takes place independently at each node. Even small
updates or changes made to the ledger are reflected and the history of that
change is sent to all participants in a matter of seconds.
2. Immutable: Distributed ledger uses cryptography to create a secure
database in which data once stored cannot be altered or changed.
3. Append only: Distributed ledgers are append-only in comparison to the
traditional database where data can be altered.
4. Distributed: In this technology, there is no central server or authority
managing the database, which makes the technology transparent. To
counter the weaknesses of having one ledger to rule all, So that there is no
one authoritative copy and have specific rules around changing them. This
would make the system much more transparent and will make it a more
decentralized authority. In this process, every node or contributor of the
ledger will try to verify the transactions with the various consensus
algorithms or voting. the voting or participation of all the nodes depends on
the rules of that ledger. In the case of bitcoin, the Proof of Work consensus
mechanism is used for the participation of each node.
5. Shared: The distributed ledger is not associated with any single entity. It is
shared among the nodes on the network where some nodes have a full copy
of the ledger while some nodes have only the necessary information that is
required to make them functional and efficient.
6. Smart Contracts: Distributed ledgers can be programmed to execute smart
contracts, which are self-executing contracts with the terms of the agreement
between buyer and seller being directly written into lines of code. This allows
for transactions to be automated, secure, and transparent.
7. Fault Tolerance: Distributed ledgers are highly fault-tolerant because of
their decentralized nature. If one node or participant fails, the data remains
available on other nodes.
8. Transparency: Distributed ledgers are transparent because every
participant can see the transactions that occur on the ledger. This
transparency helps in creating trust among the participants.
9. Efficiency: The distributed nature of ledgers makes them highly efficient.
Transactions can be processed and settled in a matter of seconds, making
them much faster than traditional methods.
10. Security: Distributed ledgers are highly secure because of their
cryptographic nature. Every transaction is recorded with a cryptographic
signature that ensures that it cannot be altered. This makes the technology
highly secure and resistant to fraud.

How DLT Can Replace Traditional Book-Keeping Methods?

Distributed ledger technology has the potential to effectively improve these


traditional methods of bookkeeping by updating and modifying fundamental
methods of how data is collected, shared, and managed in the ledger. To
understand this, traditionally paper-based and conventional electronic ledgers
were used to manage data that had a centralized point of control. This types of
system require high computing resource and labor to maintain ledgers and also
had many points of failure. Points of failure like:
1. Mistakes made during data entry.
2. Manipulation of data could happen which increases the risk of errors.
3. Other participants contributing data to the central ledger will not able to verify
the legitimacy of data coming from other sources.
However, DLT allows real-time sharing of data with transparency which gives
trust that data in the ledger is up to date and legitimate. Also Distributed Ledger
Technology eliminates the single point of failure which prevents data in the
ledger from being manipulations and errors. In DLT, there is no need for a
central authority to validate transactions here different consensus mechanisms
are used to validate transactions which eventually makes this process very fast
and real-time. Similarly, DLT can reduce the cost of transactions because of
this process.

Types of Distributed Ledger Technology

The Distributed Ledgers can be categorized into three categories:


1. Permissioned DLT: Nodes have to take permission from a central authority
to access or make any changes in the network. Mostly these types of
permissions include identity verification.
2. Permissionless DLT: There is no central authority to validate transactions,
rather existing nodes are collectively responsible for validating the
transactions. Various consensus mechanisms are used to validate
transactions based on predefined algorithms. In the case of bitcoin proof of
work consensus mechanism is used.
3. Hybrid DLT: It is combined with both permissionless and permissioned
DLTs and can benefit from both of them.

Below are some of the types of DLT:

1. Blockchain: In this type of DLT, transactions are stored in the form chain of
blocks and each block produces a unique hash that can be used as proof of
valid transactions. Each node has a copy of the ledger which makes it more
transparent.
2. Directed Acyclic Graphs (DAG): This uses a different data structure to
organize the data that brings more consensus. In this type of DLT, validation
of transactions mostly requires the majority of support from the nodes in the
network. Every node on the network has to provide proof of transactions on
the ledger and then can initiate transactions. In this nodes have to verify at
least two of the previous transactions on the ledger to confirm their
transaction.
3. Hashgraph: In this type of DLT, records are stored in the form of a directed
acyclic graph. It uses a different consensus mechanism, using virtual voting
as the form consensus mechanism for gaining network consensus. Hence
nodes do not have to validate each transaction on the network.
4. Holochain: Holochain is termed as the next level of blockchain by some
people because it is much more decentralized than blockchain. It is a type of
DLT that simply proposes that each node will run on a chain of its own.
Therefore nodes or miners have the freedom to operate autonomously. It
basically moves to the agent-centric structure. Here agent means computer,
node, miner,etc.
5. Tempo or Radix: Tempo uses the method of making a partition of the
ledger this is termed sharding and then all the events that happened in the
network are ordered properly. Basically, transactions are added to the ledger
on basis of the order of events than the timestamp.

Advantages Of Distributed Ledger Technology

1. High Transparency: Distributed ledger presents a high level of


transparency because all the transaction records are visible to everyone.
The addition of data needs to be validated by nodes by using various
consensus mechanisms and if anyone tries to alter or change data in the
ledger then it is immediately reflected across all nodes of the network which
prevents invalid transactions.
2. Decentralized: In a centralized network, there may be a single point of
failure and it can disrupt the whole network because of mistakes at the
central authority level. But in the case of distributed networks, there is no risk
of a single point of failure. Because of the decentralized structure trust factor
also increases in participating nodes. This decentralized nature of validation
reduces the cost of transactions drastically.
3. Time Efficient: As this network is decentralized so there is no need for a
central authority to validate transactions every time. Hence this time for
validation of each transaction reduces drastically. In the case of DLT,
transactions can be validated by members of the network itself by using
various consensus mechanisms.
4. Scalable: Distributed ledger technology is more scalable because many
different types of consensus mechanisms can be used to make it more
reliant, fast, and updated. Because these many advanced DLT technologies
are introduced in the last few years. Such as Holochain, hashgraph are
considered to be advanced and more secure versions of Blockchain DLT.
Blockchain itself is advanced and secure but DLT provides a way to more
advanced technologies.

Uses of Distributed Ledger Technology

Because of all these benefits of distributed ledger technology and this


technology has the potential to revolutionize many sectors like Financial,
energy, healthcare, governance, supply chain management, real estate, cloud
computing, etc.

1. Banking: In the banking sector right now transfer of money can be both
expensive and time-consuming. Also sending money overseas becomes
even more complex due to exchange rates and other hidden fees included.
Here DLT can provide a decentralized secure network that will help to
reduce the time, complexity, and costs required to transfer money. This
decentralized network will eliminate the need for third parties which makes
this system more complex and time-consuming.
2. Cyber Security: Nowadays cyber security has been emerging as a big
threat to governments, enterprises, and individual people also. So it is
essential to find an effective solution to secure our data and privacy against
unauthorized access. In DLT, all information is authorized and securely
encrypted by various cryptographic algorithms. This provides a transparent
and secure environment and none of the data can be tempered by any
entity.
3. Supply chain management: Supply chain is one of the complex structures
itself. In this structure, it is hard to trace where the fault happened. So here
Distributed ledger technology comes into the picture, Using DLT, you can
easily trace the supply chain from the beginning to the end and can easily
find out where a mistake or fault has happened. All the data added to the
DLT is validated and permanent and can not be altered. This transparency of
data enables us to trace from the beginning to the end of the ledger.
4. Healthcare: Distributed Ledger eliminates central authority and ensures
rapid access to secured and untempered data. Here important medical can
be stored securely and no one can change this data, even if someone tries
to change it will be reflected everyone immediately. DLT can be used in the
insurance sector to trace false claims because of its decentralized system.
5. Governance: DLT can be used in the government system to make it
transparent among citizens. Many governments have adopted blockchain in
the governance system because of the robustness of this system. It can be
used as a voting system too. The traditional voting system has many flaws
and sometimes it is found that there are many false voting and illegal
activities that happen during voting. Online voting systems can be used to
vote and with security and fake votes can be easily checked. everyone will
have their own identity. So that any person sitting anywhere in the world can
cast his vote.

How are Blockchain And Distributed Ledger Different?

In general blockchain and Distributed Ledger Technology are considered as


same, but there are some differences between these two technologies.
Blockchain can be classified as a type of Distributed Ledger Technology. We
can say that Blockchain is a type of DLT, but every Distributed Ledger can not
be called a blockchain.
Blockchain is the parent technology of DLT. But the idea behind them is the
same. Blockchain technology has the potential to solve many problems in the
banking and financial industry. Here, blockchain is the advanced version of
Distributed Ledger Technology with many useful functionalities. Developers
have many other variants of DLTs in the technology world. However, they do
not have the many real-life implementations and applications that blockchain
has been able to do.

Basis Distributed Ledger Blockchain Technology


Basis Distributed Ledger Blockchain Technology

In DLT, blocks can be organized In Blockchain, blocks are added in


Block Structure in different forms. the form of a chain.

It is more scalable because it


It is a subset of DLT, the power of
does not need the power of a
the work consensus mechanism
work consensus mechanism for
adds more functionalities and
the validation of each
security.
Power of Work transaction.

It does not require any tokens or In it, tokens must be considered


Tokens digital currency. while working with Blockchain.

It does not require any specific All blocks are arranged in a


Sequence sequence of data. particular series.

Trust among participating nodes


Trust among participating nodes is less than DLT. Decision-making
is high. powers can be on one hand
Trustability because everyone can mine.

Advantages of Using Distributed Ledger Technology In Blockchain

1. Security: All records of every transaction are securely encrypted. Once the
transaction is validated, it is completely secure and no one can update or
change it. It is a permanent process.
2. Decentralization: All network members or nodes have a copy of the ledger
for complete transparency. A decentralized private distributed network
improves the reliability of the system and gives assurance of continuous
operations without any interruption. It gives control of information and data in
the hand of the user.
3. Anonymity: The identity of each participant is anonymous and does not
possibly reveal their identity.
4. Immutable: Any validated transactions can not be changed as they are
irreversible.
5. Transparency: Distributed technologies offer a high level of transparency.
Which is necessary for the sectors like finance, medical science, banking,
etc.
6. Speed: Distributed Ledger Technology can handle large transactions faster
than traditional methods.
7. Smart Contracts: Distributed Ledger Technology supports smart contracts
which are self-executing contracts with the terms of the agreement between
buyer and seller being directly written into lines of code. Smart contracts
reduce the need for intermediaries and offer transparency and automation in
the execution of the contract terms.
8. Lower Costs: Distributed Ledger Technology eliminates intermediaries and
reduces the costs associated with intermediaries, which makes the system
more cost-effective.
9. Improved Efficiency: Distributed Ledger Technology reduces the time and
costs associated with traditional transaction methods. It offers faster
settlement times, reduced paperwork, and increased efficiency.
10. Auditing: Distributed Ledger Technology makes auditing easier as every
transaction is recorded and the ledger cannot be altered. This improves the
transparency and accuracy of financial audits.
11. Resilience: Distributed Ledger Technology is more resilient than
traditional databases as it is spread across multiple nodes. This means that
even if one node goes down, the network can still function as the rest of the
nodes can continue to validate transactions.
12. Traceability: Distributed Ledger Technology offers complete traceability
of assets, from their creation to their current ownership. This improves
accountability and reduces the risks of fraud and theft.

Disadvantages Of Distributed Ledger Technology

1. 51% Attack: The 51% attack is a bit concerning part of this distributed
ledger technology that is to be checked routinely.
2. Costs of Transaction: The connected nodes are expected to validate the
transaction of a given Distributed Ledger Technology which gives high
transaction cost as the other nodes are paid incentives to validate the
transaction.
3. Slow Transaction Speed: The major disadvantage of this DLT is the slow
speed of transactions as multiple nodes are attached to this network and it
takes time to validate the transaction by all the other nodes.
4. Scalability Issues: Due to low speed and high transaction costs DLT faces
very difficulties to expand on a large scale.
5. Lack of Regulation: As DLT is a decentralized technology, it operates
outside the control of any centralized authority which can lead to a lack of
regulation, making it difficult to hold accountable any wrongdoings or
fraudulent activities on the network.
6. Energy Consumption: Distributed Ledger Technology requires a significant
amount of energy to maintain the network and validate transactions,
especially in the case of Proof of Work consensus mechanisms, which can
lead to a negative impact on the environment.
7. Complexity: Implementing and managing Distributed Ledger Technology
can be complex and requires a high level of technical expertise, which can
be a barrier to entry for many organizations and individuals.
8. Privacy Concerns: While the anonymity of participants on the network is
considered an advantage, it can also be a disadvantage as it can lead to
privacy concerns and illicit activities on the network.
9. Lack of Interoperability: Different Distributed Ledger Technologies may
use different protocols, which can lead to interoperability issues, making it
difficult for different networks to communicate and transact with each other.

Future of Distributed Ledger Technology

1. Experts in this area promote DLT as a solution for many problems that are
present on the internet and will drastically be able to solve all these
problems. Distributed Ledger Technology is termed the “Internet of Value”.
Transactions and processes will occur in real-time with the help of the
internet.
2. Distributed Ledger Technology has the potential to impact problems in
financial or banking, cyber security, healthcare, government, data security,
etc. sectors with effective solutions.
3. Enterprises and visionaries are now faced with the challenge of establishing
networks of entities that together can take advantage of DLT to radically
change how they share and keep records, and innovate where DLT can
enable entirely new processes and business models.
Digital Signatures
What is a Digital Signature in Blockchain?

• A digital signature is a cryptographic technique used to verify the


authenticity of a message, transaction, or document.
• In the context of blockchain, a digital signature is used to prove
ownership of a particular transaction or data by an individual or
entity.
• Digital signatures are an essential feature of blockchain technology.
They ensure the authenticity and integrity of transactions and data on
the network. They provide a secure and decentralized way of verifying
ownership, eliminating the need for intermediaries and increasing
trust between parties.
How a Digital Signature is generated for a
Blockchain Transaction?
1. Public and Private Key Pair
• The user who wants to initiate a transaction generates a pair of public
and private keys. The private key is kept secret and is only known to
the user, while the public key is shared with other users on
the blockchain network.
• 2. Hashing
• The transaction data is then hashed. It then creates a unique digital
fingerprint of the data. This fingerprint is unique to the transaction
and can’t be used to determine the original data.
How a Digital Signature is generated for a
Blockchain Transaction?
• Encryption
• The user then uses their private key to encrypt the hash, creating a
digital signature. This signature is unique to the user and the
transaction data.
• Verification
• When the transaction is broadcast to the blockchain network, other
nodes on the network use the user’s public key to verify the digital
signature.
• If the signature is valid, it means that the user who initiated the
transaction is the true data owner.
How a Digital Signature is generated for a
Blockchain Transaction?
• Adding to the Network
• The transaction is added to the blockchain once the digital signature
has been verified. The transaction data, along with the digital
signature, becomes a block linked to the previous block on the
network.
Can digital signatures be hacked or forged in blockchain technology?
• Digital signatures in blockchain technology are highly secure and virtually
impossible to hack or forge due to their complex cryptographic algorithms.
• The private key used to generate the digital signature is unique to each
user. It is kept securely on their device, making it difficult for hackers to
access.
How can digital signatures contribute to data privacy and security in
blockchain technology?
• Digital signatures in blockchain technology contribute to data privacy and
security by providing a tamper-proof record of transactions that cannot be
altered or deleted. They ensure that only authorized parties can access and
modify data on the blockchain, providing a secure and decentralized way to
share information.
• Also, since digital signatures are generated using unique private keys, they
allow users to maintain anonymity while still ensuring the authenticity and
integrity of their transactions.
Why is Digital Signature Important?
• 1. Security
• Digital signatures provide a high level of security for blockchain transactions. It ensures that only
the true data owner can initiate a transaction and prevents tampering or fraudulent activities.
• 2. Authenticity
• Digital signatures provide authenticity and integrity to the blockchain data. It ensures that the
data has not been altered or modified and the transaction is genuine.
• 3. Non-repudiation
• Digital signatures provide non-repudiation. It means the user who initiates a transaction cannot
deny their involvement. Once the digital signature is added to the blockchain, it becomes
immutable and can’t be deleted or modified.
• 4. Efficiency
• Digital signatures provide an efficient way of verifying the authenticity of blockchain transactions.
It eliminates the need for intermediaries or third parties to verify the transaction, which saves
time and reduces transaction costs.
• 5. Decentralization
• Digital signatures support decentralization by eliminating the need for a centralized authority to
verify the authenticity of transactions. This ensures the blockchain is decentralized and
transparent, providing a trustless and secure transaction environment.
Distributed Ledger
Technology
Origins of ledgers
• Ledgers, which are essentially a record of transactions and similar
data, have existed for millennia in paper form.
• They became digitized with the rise of computers in the late 20th
century, although computerized ledgers generally mirrored what
once existed on paper.
• Ledgers historically have required a central authority to validate the
authenticity of the transactions recorded in them. For example,
banks need to verify the financial transactions that they process.
• modern business networks involve an even broader number of
participants in more regions, and they have more need to record
data for their own uses, as well as satisfy the demands of other
participants in their networks. This has stressed conventional
ledgers, making them costly to maintain and more vulnerable to
errors, computer hacks, manipulation and tampering.
Distributed Ledger Technology
• Distributed ledger technology (DLT) is the technological infrastructure
and protocols that allow simultaneous access, validation, and record
updating across a networked database.
• DLT is the technology blockchains are created from, and the
infrastructure allows users to view any changes and who made them,
reduces the need to audit data, ensures data is reliable, and only
provides access to those that need it.
Distributed Ledgers
• Distributed ledgers are maintained by a network of nodes, each of which
has a copy of the ledger, validates the information, and helps reach a
consensus about its accuracy.
• Distributed ledgers have been around for decades but have become more
well-known, researched, used, and developed since Bitcoin was
introduced.
• Distributed ledgers can be used in nearly every industry where data is
collected and used.
• All blockchains are distributed ledgers, but not all distributed ledgers are
blockchains.
• Though DLT enhances accountability, security, and accessibility, it is still
complex, difficult to scale, and not subject to strong regulation.
• There are several key factors that distinguish blockchain from
distributed ledgers.
• In general, blockchain is a specific type of DLT.
Categories of DLT
• The Distributed Ledgers can be categorized into three categories:
[Link] DLT: Nodes have to take permission from a central
authority to access or make any changes in the network. Mostly
these types of permissions include identity verification.
[Link] DLT: There is no central authority to validate
transactions, rather existing nodes are collectively responsible for
validating the transactions. Various consensus mechanisms are
used to validate transactions based on predefined algorithms. In the
case of bitcoin proof of work consensus mechanism is used.
[Link] DLT: It is combined with both permissionless and
permissioned DLTs and can benefit from both of them.
Types of DLT
1. Blockchain: In this type of DLT, transactions are stored in the form chain of blocks and each block
produces a unique hash that can be used as proof of valid transactions. Each node has a copy of
the ledger which makes it more transparent.
2. Directed Acyclic Graphs (DAG): This uses a different data structure to organize the data that
brings more consensus. In this type of DLT, validation of transactions mostly requires the majority
of support from the nodes in the network. Every node on the network has to provide proof of
transactions on the ledger and then can initiate transactions. In this, nodes have to verify at least
two of the previous transactions on the ledger to confirm their transaction.
3. Hashgraph: In this type of DLT, records are stored in the form of a directed acyclic graph. It uses a
different consensus mechanism, using virtual voting as the form consensus mechanism for gaining
network consensus. Hence nodes do not have to validate each transaction on the network.
4. Holochain: Holochain is termed as the next level of blockchain by some people because it is much
more decentralized than blockchain. It is a type of DLT that simply proposes that each node will
run on a chain of its own. Therefore nodes or miners have the freedom to operate autonomously. It
basically moves to the agent-centric structure. Here agent means computer, node, miner,etc.
5. Tempo or Radix: Tempo uses the method of making a partition of the ledger this is termed
sharding and then all the events that happened in the network are ordered properly. Basically,
transactions are added to the ledger on basis of the order of events than the timestamp.
Basis Distributed Ledger Blockchain Technology

In DLT, blocks can be organized in different In Blockchain, blocks are


Block Structure
forms. added in the form of a chain.
It is a subset of DLT, the
It is more scalable because it does not need
power of the work consensus
Power of Work the power of a work consensus mechanism for
mechanism adds more
the validation of each transaction.
functionalities and security.
In it, tokens must be
It does not require any tokens or digital
Tokens considered while working
currency.
with Blockchain.
It does not require any specific sequence of All blocks are arranged in a
Sequence
data. particular series.
Trust among participating
nodes is less than DLT.
Trustability Trust among participating nodes is high. Decision-making powers can
be on one hand because
everyone can mine.
Benefits of DLT
• Increased visibility into and transparency of data contributed to the
ledger.
• Lower operational costs thanks to the elimination of a central
authority.
• Faster transaction speeds because there's no lag in updates to
ledgers.
• Greatly reduced risks of fraudulent activity, tampering and
manipulation.
• Increased reliability and resiliency because there's no longer a
central system that creates the potential for a single point of failure.
• Significantly higher levels of security.
Challenges of distributed ledger technology
• Scalability
• DLT systems often face scalability issues as the number of participants and transactions increases.
Traditional blockchains have limitations in terms of transaction throughput and confirmation times.
However, advancements in technology and the exploration of alternative consensus mechanisms,
such as directed acyclic graph (DAG), are addressing these scalability challenges.
• Interoperability
• Interoperability between different distributed ledger systems is crucial for seamless data exchange
and collaboration. However, achieving interoperability remains a complex task due to the lack of
standardized protocols and compatibility issues between different DLT platforms. Efforts are
underway to develop interoperability solutions and bridge the gap between different networks.
• Regulatory and legal frameworks
• The regulatory landscape surrounding DLT is still evolving. As DLT disrupts existing systems and
introduces new paradigms, regulatory frameworks must adapt in order to ensure consumer
protection, privacy and security.
• User education and adoption
• DLT technologies are relatively new and complex, requiring a certain level of technical knowledge
and expertise to fully comprehend and exploit their potential. User education and awareness are
crucial for widespread adoption of DLT, and its complexity can sometimes prevent adoption.
Features of DLT
[Link]: It is a decentralized technology and every node will maintain the
ledger, and if any data changes happen, the ledger will get updated. The
process of updating takes place independently at each node. Even small updates
or changes made to the ledger are reflected and the history of that change is
sent to all participants in a matter of seconds.
[Link]: Distributed ledger uses cryptography to create a secure database in
which data once stored cannot be altered or changed.
[Link] only: Distributed ledgers are append-only in comparison to the
traditional database where data can be altered.
[Link]: In this technology, there is no central server or authority managing
the database, which makes the technology transparent. To counter the
weaknesses of having one ledger to rule all, So that there is no one authoritative
copy and have specific rules around changing them. This would make the
system much more transparent and will make it a more decentralized authority.
In this process, every node or contributor of the ledger will try to verify the
transactions with the various consensus algorithms or voting. the voting or
participation of all the nodes depends on the rules of that ledger. In the case of
bitcoin, the Proof of Work consensus mechanism is used for the participation of
each node.
Features of DLT
5. Shared: The distributed ledger is not associated with any single entity. It is shared
among the nodes on the network where some nodes have a full copy of the ledger while
some nodes have only the necessary information that is required to make them functional
and efficient
6. Smart Contracts: Distributed ledgers can be programmed to execute smart contracts,
which are self-executing contracts with the terms of the agreement between buyer and
seller being directly written into lines of code. This allows for transactions to be
automated, secure, and transparent.
7. Fault Tolerance: Distributed ledgers are highly fault-tolerant because of their
decentralized nature. If one node or participant fails, the data remains available on other
nodes.
8. Transparency: Distributed ledgers are transparent because every participant can see
the transactions that occur on the ledger. This transparency helps in creating trust among
the participants.
9. Efficiency: The distributed nature of ledgers makes them highly efficient. Transactions
can be processed and settled in a matter of seconds, making them much faster than
traditional methods.
10. Security: Distributed ledgers are highly secure because of their cryptographic nature.
Every transaction is recorded with a cryptographic signature that ensures that it cannot be
altered. This makes the technology highly secure and resistant to fraud.
DLT consensus mechanisms
DLT implementations
• Distributed Ledger Technology (DLT) has seen various implementations across
different industries and use cases. Below are some notable examples of DLT
implementations:
[Link]:
1. Bitcoin (BTC): The original and most well-known blockchain, Bitcoin, uses a decentralized
ledger to record and verify transactions. It introduced the concept of proof-of-work (PoW)
consensus.
2. Ethereum (ETH): Ethereum is a blockchain platform that introduced smart contracts,
allowing developers to create decentralized applications (DApps) on its blockchain. It uses a
proof-of-stake (PoS) consensus mechanism and is a significant player in decentralized finance
(DeFi) and non-fungible tokens (NFTs).
[Link] Projects:
1. Hyperledger Fabric: An open-source enterprise-grade permissioned blockchain framework
hosted by the Linux Foundation. It's designed for developing solutions where multiple
parties can trust a single system of record.
2. Hyperledger Sawtooth: Another Hyperledger project that focuses on simplicity and
modularity. It supports both permissioned and permissionless deployments.
DLT implementations
1. Corda:
Corda is a DLT platform designed for businesses. It's an open-source blockchain platform that enables
direct transactions between parties. Corda is particularly popular in the financial sector.
2. Ripple:
Ripple utilizes a consensus algorithm to validate transactions on its network. It aims to facilitate cross-
border payments by providing a fast and low-cost solution for financial institutions.
3. IOTA:
IOTA employs a unique structure called the Tangle, a directed acyclic graph (DAG), instead of a traditional
blockchain. It's designed for the Internet of Things (IoT) and aims to provide a scalable and feeless system
for microtransactions.
4. Quorum:
Quorum is an enterprise-focused version of Ethereum developed by JPMorgan Chase. It is designed for
financial institutions and supports private transactions.
5. Stellar:
Stellar focuses on facilitating fast and low-cost cross-border payments. It is used by various financial
institutions and payment service providers.
6. Hashgraph:
Hashgraph is a DLT that uses a different consensus algorithm called the Hashgraph consensus. It claims to
offer high throughput and low latency, making it suitable for various applications.
DLT implementations
7. VeChain:
VeChain utilizes blockchain technology to improve supply chain management and business
processes. It provides tools for tracking and verifying the authenticity of products throughout
the supply chain.
8. Digital Identity Platforms:
Several DLT implementations are used for digital identity management, allowing users to have
more control over their personal information and facilitating secure and efficient identity
verification.
Ethereum blockchain
Bitcoin and Ethereum are two blockchains with their own
cryptocurrencies, bitcoin and ether.
Ethereum- Intro
• Ethereum is a blockchain-based platform best known for
its cryptocurrency, ether (ETH).
• The blockchain technology that powers Ethereum enables secure digital
ledgers to be publicly created and maintained.
• Bitcoin and Ethereum have many similarities but different long-term visions
and limitations.
• Ethereum proposed to use blockchain technology not only for maintaining
a decentralized payment network but also to power tamper-proof
decentralized financial contracts and applications.
• Ethereum changed from proof of work to proof of stake in September
2022.
• Ethereum is the foundation for many emerging technological advances
based on blockchain.
Ethereum
• The Ethereum platform was launched in 2015 by Buterin and Joe
Lubin, founder of the blockchain software company ConsenSys.
• The founders of Ethereum were among the first to consider the full
potential of blockchain technology beyond just enabling the secure
virtual payment method.
• Since the launch of Ethereum, ether as a cryptocurrency has risen to
become the second-largest cryptocurrency by market value. It is
outranked only by Bitcoin.
Consensus in Ethereum
• Ethereum uses the proof-of-stake algorithm, where a network of
participants called validators creates new blocks and works together
to verify the information they contain.
• The blocks contain information about :
• the state of the blockchain, a list of attestations (a validator's signature and
vote on the validity of the block), transactions, and much more.
Proof-of-Stake Mechanism

• Proof-of-stake differs from proof-of-work in that it doesn't require the


energy-intensive computing referred to as mining to validate blocks.
• It uses a finalization protocol called Casper-FFG and the algorithm
LMD Ghost, combined into a consensus mechanism called Gasper,
which monitors consensus and defines how validators receive
rewards for work or are punished for dishonesty.
• Solo validators must stake 32 ETH to activate their validation ability.
Individuals can stake smaller amounts of ETH, but they are required
to join a validation pool and share any rewards.
Proof-of-Stake Mechanism
• A validator creates a new block and attests that the information is valid in a
process called attestation, where the block is broadcast to other validators
called a committee who verify it and vote for its validity.
• Validators who act dishonestly are punished under proof-of-stake.
• Validators who attempt to attack the network are identified by Gasper,
which identifies the blocks to accept and reject based on the votes of the
validators.
• Dishonest validators are punished by having their staked ETH burned and
being removed from the network. Burning refers to sending crypto to a
wallet that has no keys, which takes them out of circulation.
What Are Some Similarities Between Bitcoin
and Ether?
• Ether and bitcoin are alike in many ways.
• Each digital currency is traded on online exchanges and stored in
cryptocurrency wallets.
• Both are decentralized, meaning they are not issued or regulated by a
central bank or other authority, and both use blockchain technology.
Key Differences between bitcoin and
ethereum
• While both the Bitcoin and Ethereum networks are powered by the
principle of distributed ledgers and cryptography, the two differ technically
in many ways.
• For example, transactions on the Ethereum network may contain
executable code, while data affixed to Bitcoin network transactions is only
used to record transaction information.
• Other differences include block time (an ETH transaction is confirmed in
seconds, compared with minutes for BTC), and their consensus
mechanisms are different: Bitcoin uses proof-of-work, while Ethereum uses
proof-of-stake.
How Many BTC and ETH are Currently in
Circulation?
• As of Oct. 26, 2023, there were 19.52 million BTC and 120.26 million
ETH in circulation.
Ether generally has four purposes:

• It is traded as a digital currency on exchanges,


• held as an investment,
• used to purchase goods and services, and
• used on the Ethereum network to pay transaction fees.
What is an Ethereum account?

There are two types of accounts in Ethereum:


• Externally Owned Accounts (EOA) and Contract Accounts.
• An EOA is controlled by a private key, has no associated code, and can send
transactions.
• A contract account has an associated code that executes when it receives a
transaction from an EOA.
• A contract account cannot initiate transactions on its own. Transactions must
always originate from an EOA.
What is an Ethereum transaction?

• A transaction in Ethereum is a signed data message sent from one


Ethereum account to another. It contains :
• the transaction sender and recipient information,
• the option to include the amount of Ether to be transferred,
• the smart contract bytecode, and
• the transaction fee the sender is willing to pay to the network validators to
have the transaction included in the blockchain, known as gas price and limit.
How can I pay for transactions on Ethereum?

• You can pay for transactions using Ether.


• Ether serves two purposes.
• First, it prevents bad actors from congesting the network with unnecessary
transactions.
• Second, it acts as an incentive for users to contribute resources and validate
transactions (mining).
• Each transaction in Ethereum constitutes a series of operations to occur on
the network (i.e. a transfer of Ether from one account to another or a
complex state-changing operation in a smart contract).
• Each of these operations have a cost, which is measured in gas, the fee-
measure in Ethereum. Gas fees are are paid in Ether, and are often measured
in a smaller denomination called gwei. [1 ether = 1,000,000,000 gwei (10^9)]
Where can I get Ether, and where do I store it?

• You can buy Ether with fiat currency from a cryptocurrency exchange
like Coinbase or Kraken.
• Ether is associated with your Ethereum account. To access your
account and Ether, you must have your account address and the
passphrase or the private key.
Gas in Ethereum
Ethereum Features

• Ether: This is Ethereum’s cryptocurrency.


• Smart contracts: Ethereum allows the development and deployment
of these types of contracts.
• Ethereum Virtual Machine: Ethereum provides the underlying
technology—the architecture and the software—that understands
smart contracts and allows you to interact with it.
• Decentralized applications (Dapps): A decentralized application is
called a Dapp (also spelled DAPP, App, or DApp) for short. Ethereum
allows you to create consolidated applications, called decentralized
applications.
• Decentralized autonomous organizations (DAOs): Ethereum allows
you to create these for democratic decision-making.
Gas in ethereum
• Like Bitcoins, ether is a peer-to-peer currency.
• Apart from being used to pay for transactions, ether is also
used to buy gas, which is used to pay for the computation of
any transaction made on the Ethereum network.
• Ethereum gas fees exist because operating the Ethereum network
uses resources in the form of computational power.
• Gas refers to the cost required to complete a deal on the
Ethereum network.
Gas
• On the Ethereum blockchain, gas refers to the cost necessary to
perform a transaction on the network.
• Gas prices are based on supply and demand for the network's
validation requests.
• Transaction prices are based on the gas limit and gas price.
• Transaction prices are denoted in tiny fractions of ether called gwei or
in ETH.
How do Ethereum gas fees work?

• Suppose you want to buy ETH for your crypto wallet. Here’s the step-by-step
process that illustrates how Ethereum gas fees work:
[Link] initiate a transaction. Using the platform or crypto exchange of your
choice, you can initiate a transaction—to purchase ETH, in this example. You
would input your desired purchase amount and other relevant information.
[Link] approve an estimated gas fee. The platform provides you with an
estimate for the Ethereum gas fee. Many platforms and exchanges automatically
evaluate current Ethereum gas fees and current network demand to suggest a gas
fee that balances cost with transaction speed. If the estimated gas fee is
acceptable, then you can submit the transaction for processing.
[Link] transaction is sent to the Ethereum blockchain. Your ETH purchase
order is sent to the Ethereum network. The data included with the purchase order
places an upper limit on the total gas fee that you’re willing to pay.
4.A proof-of-stake validator creates a new block. Ethereum network
How do Ethereum gas fees work?

validators assemble new blocks for the Ethereum blockchain by


selecting which transactions to validate. Transactions with the highest
gas fees typically get selected first, as they’re the most profitable for
validators. Your transaction is generally classified as complete once it’s
included in a block and the block is added to the blockchain.
[Link] digital wallet balance updates. With your transaction
published to the blockchain, your Ethereum balance updates and the
gas fee is withdrawn. Your transaction total is the ETH purchase
amount plus the gas fee.
[Link] validator receives gas fees. The validator that processed
your transaction receives the tip portions of your gas fee and the gas
fees from all the transactions in the block. The base fees are
“burned”—removed from circulation—to prevent ETH currency
inflation.
GWEI

• Gwei is a combination of “giga” and “wei”.


• Gas prices are delivered in the form of Ethereum’s born money,
the currency of Ethereum is ETH.
• Gas costs are indicated in “gwei” which is a movement of
Ethereum, every single “gwei” is equivalent to 0.000000001
ETH.
• For sample, rather than stating that the gas costs
0.000000001 ether, say, the gas costs 1 “gwei”.
• The term “gwei” means “Giga-wei”, which is equivalent to
1,000,000,000 “wei”.
Understanding Gas in Ethereum

• The concept of gas was introduced to compensate miners for their work
done on maintaining and securing the blockchain. Ater the proof of stake
algorithm was rolled out in September 2022, gas fees became the reward
for staking ETH and participating in validation—the more a user has staked,
the more they can earn.
• "Gas limit" is the maximum amount of work you're estimating a validator
will do on a particular transaction. A higher gas limit usually means the
user believes the transaction will require more work. "Gas price" is the
price per unit of work done. So, a transaction cost is the gas limit multiplied
by the gas price. Many transactions also include tips, which are added to
the gas price (the more you pay, the faster your transaction is completed).
The lower a user estimates their gas limit, the lower the priority in the
queue they will be.
Gas Fee
• What Is a Gas Fee on NFTs?
• A gas fee is a blockchain transaction fee, paid to network validators for their
services to the blockchain. Without the fees, there would be no incentive for
anyone to stake their ETH and help secure the network.
• How Is the Gas Fee Calculated?
• The gas fee is calculated using Gas Limit * Gas Price per Unit.
• So if the gas limit was 20,000 and the price per unit was 200 gwei, the
calculation would be 20,000 * 200 = 4,000,000 gwei or 0.004 ETH.
Federated Byzantine
Algorithm
• The Federated Byzantine Agreement (FBA) is a consensus
mechanism designed to achieve Byzantine Fault Tolerance (BFT) more
decentralised and flexibly than traditional BFT algorithms. FBA is well-
suited for decentralised networks and environments with diverse and
changing participants. It allows nodes to select their trusted peers,
ensuring that consensus can be reached even in the presence of
malicious or faulty nodes.
Quorum Slices and Quorums

• FBA relies on the concepts of quorum slices and quorums to achieve


consensus. A quorum slice is a subset of nodes within the network
that a particular node trusts. Each node defines its quorum slices
based on understanding the network and its trusted peers. A quorum
is a set of nodes that contains at least one quorum slice for every
node within the cluster. In other words, a quorum is a group of nodes
that collectively trust each other enough to reach a consensus.
FBA Consensus Algorithm

• The FBA consensus algorithm consists of the following steps:


• a. Node selection: Each node selects its quorum slices based on trust
in other nodes. These quorum slices are locally defined and can vary
from node to node.
• b. Voting: Nodes vote on statements like transaction validity or ledger
version. A node accepts a statement if it believes that a quorum
supports the statement.
• c. Acceptance and ratification: Nodes propagate accepted statements
to other nodes in the network. Once a node sees that a quorum
accepts a statement, it considers the statement ratified and acts
accordingly.
Advantages of FBA

• FBA offers several advantages compared to traditional BFT consensus


mechanisms:
• a. Decentralisation: FBA allows for open membership, making it more
decentralised than traditional BFT mechanisms that rely on a fixed set
of validators.
• b. Flexibility: Nodes can choose their quorum slices, allowing them to
adapt to the changing network conditions and trust relationships.
• c. Scalability: FBA's quorum structure can be designed to minimise
the communication overhead, making it more scalable than
traditional BFT algorithms.
• A special implementation of the FBA consensus mechanism is the
Stellar Consensus Protocol (SCP), which powers the Stellar network.
SCP has proven to be an effective consensus mechanism for the
Stellar network, enabling fast and secure transactions while
maintaining decentralisation.
Safety and Liveness

• FBA ensures both safety and liveness within the network. Safety
means that the system never reaches an incorrect or conflicting
decision. Liveness ensures that the system will eventually reach a
decision. FBA achieves these properties by relying on the quorum
structure and iterative voting process, which ensures that the nodes
reach an agreement even when some nodes are Byzantine or faulty.
Cascading Failures and Resilience

• One of the challenges FBA addresses is the risk of cascading failures.


In a decentralised network, a single node's incorrect decision could
spread throughout the network, causing a systemic collapse. FBA
mitigates this risk by relying on the quorum structure, ensuring that
nodes cross-validate each other's decisions before accepting them.
This process of checks and balances makes the FBA consensus
mechanism highly resilient to cascading failures.
Network Dynamics and Trust

• FBA recognises that trust relationships in a decentralised network can


change over time. The flexible quorum slice structure allows nodes to
trust relationships as the network evolves dynamically. This adaptive
nature of FBA enables the consensus mechanism to accommodate
diverse, fluctuating, and expanding networks more effectively than
traditional BFT mechanisms.
• Use Cases
• The FBA consensus mechanism is well-suited for various decentralised
applications, including financial systems, supply chain networks, and others
requiring robust, secure, and scalable consensus. It is particularly suitable for
environments where the network participants may not necessarily trust each
other yet still need to reach a consensus on transactions and other critical
decisions.
• Limitations and Challenges
• One of the main challenges in the FBA consensus is ensuring that the quorum
structure remains balanced and secure, as an improperly designed quorum
structure could compromise the safety and liveness properties of the network.
• Additionally, FBA may not be as efficient as other consensus mechanisms, as it
requires iterative voting and communication among nodes to reach a consensus.
• In conclusion, the Federated Byzantine Agreement consensus mechanism offers a
robust and flexible solution for achieving Byzantine Fault Tolerance in
decentralised networks.
Implementation of private
and public blockchain
Module 2

1
PART 1: Implementation of Public Blockchain

• A public blockchain is fully decentralized and open to anyone. The


most common example is Ethereum.
Tools:
• Ethereum (Ganache / Remix / MetaMask)
• Solidity for smart contracts
• Step-by-Step: Ethereum (Public Blockchain)

2
Implementation of Public Blockchain
Step 1: Install Tools
• Ganache – Local Ethereum blockchain
• MetaMask – Wallet browser extension
• Remix IDE – Web-based IDE for Solidity
• Step 2: Write Smart Contract
• Step 3: Compile and Deploy (using Remix)
• Use Remix IDE
• Inject Web3 provider (MetaMask)
• Deploy contract to testnet (e.g., Rinkeby or Ganache)
• Step 4: Interact with Contract
• Call the function in smart contract
• View the updated state

3
PART 2: Implementation of Private Blockchain

• A private blockchain is permissioned and controlled by a single


organization or consortium. A good framework to use is Hyperledger
Fabric.

4
Steps to Implement a Private Blockchain

1. Define Objectives and Use Case


• Identify why you need a private blockchain (e.g., supply chain
tracking, healthcare data sharing, carbon credits, EV charging,
finance, etc.).
• Decide if you need features like immutability, privacy, high
throughput, or smart contracts.

5
2. Choose the Blockchain Platform
Popular frameworks for private blockchains:
• Hyperledger Fabric – modular, enterprise-grade, widely used in
supply chain and healthcare.
• Quorum – Ethereum-based, suited for finance.
• Corda – focused on financial institutions.

6
3. Set Up the Infrastructure
• Decide on-premises vs cloud deployment.
• Set up servers/nodes that will participate in the network.
• Install required dependencies (e.g., Docker, Kubernetes, Go/Java for
Hyperledger Fabric).

7
4. Configure the Blockchain Network
• Define network policies:
• Who can read/write transactions?
• Who validates transactions?
• Configure consensus mechanism:
• PBFT (Practical Byzantine Fault Tolerance), RAFT, or Proof of Authority (PoA)
— typically used in private chains.
• Assign node identities with cryptographic certificates.

8
5. Develop Smart Contracts
• Write business logic as smart contracts (Ethereum/Quorum: Solidity;
Hyperledger Fabric: Go/JavaScript/Java).
• Test contracts locally before deploying.

9
6. Deploy and Connect Nodes
7. Build Client Applications
• Use SDKs (Fabric SDK for [Link]/Java, [Link] for Ethereum/Quorum).
• Connect your apps to the blockchain for submitting queries, transactions,
and retrieving ledger data.
8. Security and Governance
• Implement access control (identity management with certificates).
• Define governance model: how new members join, how disputes are
resolved.
• Enable audit logging and monitoring of nodes.

10
Implementations of DLT-
Hashgraph, Holochain, DAG
Module 2

1
1. Blockchain-based Implementations
• Public Blockchains
• Anyone can join and participate.
• Examples:
• Bitcoin (PoW consensus)
• Ethereum (PoS after “Merge”)
• Solana, Cardano
• Use case: Cryptocurrencies, DeFi, NFTs.
• Private/Permissioned Blockchains
• Access restricted to approved participants.
• Examples:
• Hyperledger Fabric (IBM, Linux Foundation)
• R3 Corda (financial institutions)
• Quorum (JP Morgan, enterprise Ethereum variant)
• Use case: Supply chain, banking, healthcare.
• Consortium/Hybrid Blockchains
• Controlled by a group (not public, not fully private).
• Examples:
• Energy Web Chain (energy sector)
• B3i (insurance consortium blockchain)
• Use case: Interbank settlement, trade finance.

2
2. Directed Acyclic Graph (DAG)-based Implementations
• Instead of blocks, transactions are structured as a DAG.
• High scalability, lower energy cost.
• Examples:
• IOTA (Tangle) – IoT microtransactions
• Hedera Hashgraph – enterprise DLT with gossip protocol
• Nano – lightweight, fee-less transactions
• Use case: IoT, real-time payments, supply chain.

3
3. Hashgraph Implementations
Hashgraph: A fast, fair, energy-efficient DLT using gossip and virtual
voting. Ideal for global consensus with low latency.
• Uses “gossip about gossip” and virtual voting.
• Fast, fair, energy-efficient compared to blockchain.
• Example: Hedera Hashgraph
• Use case: Enterprise-grade finance, healthcare, gaming.

4
4. Holochain
Holochain: A radical departure — no global ledger. Each user maintains
their own data. Great for distributed apps with local interactions.
It’s a DAG-based aBFT consensus system that ensures every node
reaches the same final order of transactions without forks.
• Agent-centric DLT (unlike blockchain’s data-centric approach).
• Each user runs their own chain validated by peers.
• Use case: Decentralized apps (dApps), distributed social media.

5
Hashgraph

6
Hashgraph
• Nodes gossip (share data) with random peers.
• Each message contains a history of who gossiped to whom (this is the
gossip-about-gossip).
• The system can calculate consensus timestamps and event order
virtually (no need for active voting).
• Final consensus is reached efficiently through virtual voting logic.

7
Hashgraph

Feature Description
Data Structure Directed Acyclic Graph (DAG)
Consensus Mechanism Gossip about Gossip + Virtual Voting

No PoW or PoS — instead, uses efficient consensus


No Mining
algorithms
Asynchronous Byzantine Fault Tolerant (aBFT) Ensures robustness against faulty/malicious nodes
Fast & Fair High throughput, low latency

8
How Hashgraph Works –In detail

• 1. Data Structure
• Unlike blockchain’s linear chain of blocks, Hashgraph is a Directed
Acyclic Graph (DAG) of events.
• Each “event” = a small packet of information that contains:
• Transactions
• Timestamps
• Hashes of two earlier events (from other nodes)
• This creates a graph structure where every new event is connected to
two earlier events → ensuring immutability and transparency.

9
2. Gossip Protocol ("Gossip about Gossip")
• Gossip: Each node randomly selects another node and shares all the
events it knows about.
• Over time, this spreads information very fast (like rumors).
• Gossip about gossip: In addition to transactions, nodes also share
metadata about who they heard it from and when.
• This allows nodes to reconstruct the full history of communication.
• So every node ends up with the same view of the transaction order.

10
3. Virtual Voting
• Traditional voting requires lots of messages between nodes
(expensive).
• Hashgraph avoids this with virtual voting:
• Since all nodes eventually know the entire gossip history, each node can
independently calculate how every other node would have voted.
• This eliminates the need for explicit voting messages.
• Saves bandwidth and boosts speed.

11
4. Consensus & Finality
• Consensus is achieved by using the gossip metadata and virtual
voting:
• Each event gets a timestamp when most nodes first became aware of it.
• Events are placed in order based on these consensus timestamps.
• Once consensus is reached, it’s final (no forks like in blockchain).
• Consensus algorithm: Asynchronous Byzantine Fault Tolerance
(aBFT)
• Tolerates up to 1/3 malicious nodes
• No leader election (avoids bottlenecks and attacks)

12
5. Key Properties
• Speed: Hundreds of thousands of TPS (theoretically) since no mining
and no block creation.
• Fairness: Consensus timestamp is based on when the majority
received the event, not on a miner’s discretion.
• Security: aBFT ensures robustness against malicious actors.
• Energy efficiency: No Proof-of-Work mining → low energy use.

13
Example of Transaction Flow in Hashgraph
• Alice sends 10 tokens to Bob.
• Her node creates an event with this transaction + links to two previous
events.
• Her node gossips this event to a random neighbor node.
• That neighbor continues gossiping to others.
• Within a few gossip rounds, every node in the network knows about Alice’s
transaction.
• Each node uses virtual voting to decide the consensus order.
• Once ordered and timestamped, the transaction is finalized → no forks, no
waiting for multiple confirmations.

14
Holochain

15
Holochain
• Holochain is not a blockchain — it’s a distributed framework for
building peer-to-peer applications without a global ledger.
• While blockchain is data-centric (one global ledger shared by all),
Holochain is agent-centric (each participant maintains their own
chain and validates against shared rules).
Feature Description
Data Structure Agent-centric DHT (Distributed Hash Table)
Consensus Mechanism Validation Rules + Gossip + DHT
Founder Arthur Brock, Eric Harris-Braun
No Global Ledger Each user (agent) maintains their own chain
Scalable & Low Energy No mining, no consensus bottlenecks
16
Holochain
• Each user runs their own source chain, signing their actions.
• Transactions are validated and shared to a DHT (like BitTorrent).
• Validators in the network check if actions conform to the app’s rules.
• There’s no need for global consensus — each agent operates
autonomously but shares validated data.

17
Holochain –In detail
1. Core Idea
• In blockchain, there’s one global ledger of truth.
• In Holochain, every participant (agent) has their own source chain
that records their actions.
• These chains are validated against a set of shared DNA (rules), and
relevant data is stored/distributed in a DHT (Distributed Hash Table).
• So instead of global consensus, Holochain relies on local validation +
shared data integrity.

18
2. Components of Holochain
• Source Chain (per agent)
• A private append-only hash chain that records the agent’s actions.
• Each entry is cryptographically signed.
• Example: Alice’s chain records “Alice sends 5 tokens to Bob”.
• DNA (Application Rules)
• Defines the rules of the app (like smart contracts in blockchain).
• Every node must follow these rules when validating.
• Example: In a currency app, DNA may say “no double spending allowed”.
• DHT (Distributed Hash Table)
• A decentralized database where validated data is stored and shared.
• Each agent stores pieces of the data (sharding).
• Ensures redundancy and availability.
• Validation
• When an agent commits an action, peers validate it against DNA rules.
• If valid → published to DHT.
• If invalid → rejected and flagged (agent may be blacklisted).

19
3. How Transactions Work
• Let’s say Alice sends tokens to Bob:
• Alice records the action in her source chain → entry includes hash of
the previous entry (immutability).
• Alice publishes the transaction to the DHT.
• Peers validate the transaction:
• Is Alice authorized?
• Does she have enough balance?
• Is there a double-spend attempt?
• If valid → peers store it in the DHT (so everyone can later confirm).
• Bob sees the confirmed transaction in the shared DHT.
• No mining, no global ledger, no consensus overhead.

20
4. Consensus Model
• Unlike blockchain, there is no global consensus.
• Each agent is the authority of their own chain.
• Shared consistency comes from:
• Validation rules (DNA)
• DHT gossip (peers share and cross-check data)
• Malicious or invalid actions are rejected locally (by validators).
• This is called “Agent-Centric Validation” instead of “Ledger
Consensus”.
21
5. Key Features
• Scalability: Since no global ledger exists, adding users doesn’t
bottleneck the system. Each agent only validates what’s relevant.
• Energy Efficiency: No Proof-of-Work → lightweight.
• Resilience: Data is sharded and replicated → no single point of failure.
• Privacy: Each agent controls their own chain. Only necessary info
goes to DHT.
• Flexibility: Different apps can have different DNAs (rules).

22
Example Use Case
• Imagine a decentralized social network (like Twitter on Holochain):
• Each user has their own source chain recording posts.
• Posts are published to DHT so others can read them.
• Peers validate posts against DNA (e.g., no spam, authenticity rules).
• If a user tries to post invalid data, it’s rejected and flagged.
• Result: A distributed social app with no central server and no
blockchain bottleneck.

23
• Holochain works by giving each participant their own chain of truth
and using a DHT for distributed storage + validation rules (DNA) for
consistency. Instead of consensus across the whole network, it uses
local validation and peer gossip, which makes it lightweight,
scalable, and agent-centric.

24
Comparison Blockchain with Holochain

Feature Blockchain Holochain


Ledger Type Global shared ledger Local chains + DHT
Consensus PoW, PoS, BFT, etc. Agent-centric validation
Scalability Limited (global sync needed) Scales linearly with users
Energy Usage High (mining) Very low
Data Ownership Shared by all Each agent owns their chain
Forks Possible Not applicable

25
Comparison Blockchain, Hashgraph and
Holochain
Feature Blockchain Hashgraph Holochain
Agent-centric source
Structure Linear chain Directed Acyclic Graph
chains
App-defined validation
Consensus PoW / PoS Gossip + Virtual Voting
rules
Energy Usage High (PoW) Low Very low
Scalability Limited High Very high
Fast DApps, token Peer-to-peer apps, social
Use Case Fit Cryptocurrencies
networks DApps

26
DAG

27
DAG
• DAG (Directed Acyclic Graph) is another important DLT (Distributed
Ledger Technology) structure, and it works very differently from
blockchain or Holochain.
• DAG works by having each new transaction approve earlier ones,
creating a graph of confirmations instead of a chain. Consensus is
achieved by the weight of accumulated approvals. This makes it fast,
scalable, and fee-less, but security and tip-selection mechanisms are
still areas of research.

28
What is DAG in DLT?

• DAG = Directed Acyclic Graph.


• A graph of transactions, not blocks.
• Directed → each transaction points to others (like arrows).
• Acyclic → no loops; once a transaction is added, it only moves
forward.
• Unlike blockchain’s single chain of blocks, DAG is a network (web) of
transactions, where each transaction confirms previous ones.

29
2. Core Mechanism
• Each new transaction must approve (reference) one or more earlier
transactions.
• Usually 2 parent transactions are chosen randomly (weighted by their
importance).
• Example: If Alice sends coins, her transaction approves Bob’s and Charlie’s
earlier transactions.
• By approving, Alice indirectly confirms not only Bob’s and Charlie’s
transactions, but also the entire history behind them.
• Over time, this creates a graph of approvals, where newer
transactions build on older ones.

30
3. Consensus in DAG
• No mining (unlike blockchain).
• Consensus emerges naturally from accumulated approvals:
• The more future transactions reference your transaction, the more “confirmed” it
becomes.
• Each node runs a lightweight algorithm to select which transactions to
approve (avoiding conflicts like double spending).
• Example:
• Alice’s transaction is referenced by 100 other transactions.
• Bob’s transaction is only referenced by 2.
• The network considers Alice’s as “more confirmed” than Bob’s.

31
4. Validation
• When a new transaction is created, the issuing node:
• Checks validity (signature, no double spend).
• Chooses two previous transactions to approve (using algorithms like random
walk or tip selection).
• Broadcasts it to the network.
• Other nodes validate and store it in their local DAG copy.

32
5. Finality
• In DAG, finality is probabilistic:
• The more approvals a transaction accumulates, the more secure it becomes.
• At some threshold (e.g., 95% of tips indirectly reference it), the network treats
it as final.

33
Example
Imagine 5 people sending transactions:
• Alice sends Tx1.
• Bob sends Tx2 → approves Tx1.
• Carol sends Tx3 → approves Tx1 & Tx2.
• Dave sends Tx4 → approves Tx2 & Tx3.
• Eve sends Tx5 → approves Tx3 & Tx4.
• This forms a web of confirmations, not a chain.

34
Key Properties

• Scalability: Higher transaction rate actually helps confirm older


transactions faster (opposite of blockchain congestion).
• No miners: Every user who transacts participates in validation.
• Low/Zero fees: Since there’s no mining, transactions can be fee-less
(important for microtransactions & IoT).
• Parallel processing: Multiple transactions can be added
simultaneously → higher throughput.

35
Challenges
• Tip selection: Choosing which transactions to approve is tricky (must
avoid lazy tips that never confirm).
• Security: Small networks are vulnerable to attacks (e.g., parasite chain
or double spending).
• Coordination: Some DAGs (like IOTA’s Tangle) use a temporary
centralized coordinator for protection until network grows.

36
Examples of DAG-based DLTs
• IOTA (Tangle) → IoT micropayments.
• Nano (Block-lattice DAG) → instant fee-less payments.
• Hedera Hashgraph → gossip + virtual voting on DAG.
• Obyte → DAG-based cryptocurrency.

37
Keyless Signature
Infrastructure (KSI)
Motivation behind KSI
• The blockchain mechanism works well in a permission less environment, i.e., an open-for-all environment.
What if someone wants to deploy blockchain in a restricted or permission environment like an industry? In
that case, the following issues may arise:
1. The system will not be decentralized. It will be under a central authority that will defeat the purpose of a
ledger-based trust. The administration can, at some point, collude and change the ledger.
2. Due to memory constraints in a restricted environment or due to implicit trust, not all users of the network
will store a copy of the blockchain.
3. The frequency of transactions is lower than that in an open-for-all or permission less environment. So, there
will always be a danger of manipulation of the blockchain. Users can collude and share their private keys and
manipulate some transactions on the previous blocks in the blockchain. Since the frequency of mined blocks
is low, they will have enough time to manipulate to mine the following blocks in the chain, validating their
change in the previous block.
• From the issues mentioned above, we can conclude that the integrity of the blockchain in a permission
environment relies solely upon the assumption that the users’ private keys are not compromised for a long
time.
• Hence, we need an infrastructure that does not rely upon the asymmetric key encryption scheme.
• Asymmetric keys are the foundation of Public Key Infrastructure (PKI) a cryptographic scheme requiring two different keys,
one to lock or encrypt the plaintext, and one to unlock or decrypt the cyphertext. Neither key will do both functions. One key
is published (public key) and the other is kept private (private key).
This is what motivated the development of Keyless Signature Infrastructure (KSI).
KSI
• The usage of blockchain in a restricted environment motivated the
development of Keyless Signature Infrastructure (KSI). KSI resolves
some common issues faced while using the traditional blockchain in a
permissioned environment and does not require using a Public Key
Infrastructure (PKI). It is an intelligent application of cryptographic
hash functions to maintain the users’ anonymity.
• KSI Blockchain was designed and deployed on a large scale by Estonia,
a country in Europe.
• KSI BCT is used on top of existing security products. Provides
undeniable proof of integrity in near real-time.
• Increasing the security of the system is done by eliminating the need
for a single point of trust (certificate authority).
• KSI only stores hash values (“cryptographic fingerprint”) providing
scalability.
• No customer data is stored, making it impossible to recreate the data
from the hash.
• KSI timestamping is designed for data integrity but does not
require keys - the timestamps are verifiable without reliance on
trusted authorities.
• KSI is a public ledger that provides proof-of-time, integrity and
identity of electronic data.
• Used by governments since 2007.
• Benefits:
• Performance
• Scalable
• Secure
• Distributed
• Low maintenance
Understanding Merkle trees
• we need to know how Merkle Trees work because they are
extensively used in KSI.
• A Merkle tree, also known as a binary hash tree, is a data structure
used to summarize and verify the integrity of large data sets
efficiently. Merkle trees are binary trees containing cryptographic
hashes.
• these trees are usually displayed upside down with the “root” at the
top and the “leaves” at the bottom of a diagram.
Merkle trees
• Merkle trees summarize all the transactions in a block, producing an
overall digital fingerprint of the entire set of transactions, and
providing a very efficient process to verify whether a transaction is
included in a block.
• A Merkle tree is constructed by recursively hashing pairs of nodes
until only one hash, called the root, or Merkle root.
• Figure. 1 shows how the root of a Merkle tree is generated from the
individual hashes.
Merkle trees
• When N data elements are hashed and summarized in a Merkle tree,
you can check to see if any one data element is included in the tree
with at most 2log₂(N) calculations, making this a very efficient data
structure. Figure. 2 shows how the existence of hash can be verified
in log₂(N) steps.
• The blockchain users in the permission less environment used the
concept of “proof-of-work” to validate a block in the chain and ensure
that they had the correct copy of the blockchain.
• Contrary to this, KSI uses “proof-of-time” to serve the same purpose
and resolve all the previously-mentioned issues.
KSI Components -Application
• This is a platform where users can process their transactions.
• These individual transaction requests are hashed using a
cryptographic hash function (SHA256) and sent to the gateway.
• The application performs the hashing step that forms the signing
request.
• The signing request is sent to the gateway that provides services to
the end user.
KSI Components -Gateway
• This component collects all the transaction requests it receives every
second and sends them to the aggregator network in batches.
• An extender in the gateway offers signature token verification
services to the users.
• A signature token is essentially a path to the Merkle root, it is the
proof that the data existed at a specific time and the request was
received through a particular access point.
KSI Components –Aggregation Network
• The aggregators working in rounds of equal duration gather the
incoming requests to build a hash tree and pass the top hash values
to their upstream aggregators.
• The requests received during a particular round are aggregated into
the same hash tree.
• An aggregator sends responses to all its child aggregators along with
the hash path of its tree after receiving a response from its upstream
aggregator.
KSI Components –Core Cluster
• The top hash values are linked together in a globally unique hash tree
called the hash calendar by the core cluster. The core cluster is
responsible for publishing the root hash into a hash calendar after
every second. The time value is encoded in the hash calendar’s shape.
Overall Working of KSI
• KSI works in three stages, namely, hashing, aggregation, and
publication.
• The user sends the hash of a statement through the KSI gateway to
obtain a signature in response to the hash. A global per-round hash is
created using the aggregators to represent all the transactions signed
during a round. The global per-round hashes’ top values are linked
into a perpetual hash tree and published in hard-to-modify and
widely witnessed media such as newspapers.
How KSI solves the issues
[Link] issue of decentralization is resolved by making the hash calendar publicly
available. Any change in the hash calendar will change the shape of the hash
calendar, which in turn will change the time value associated with it. The users of
the network can easily detect this change.
[Link] restrictions are no longer a problem because the infrastructure gateway
sends a signature token that the user can use to validate their transactions at any
point. So, the users are not required to store the complete copy of the hash
calendar.
[Link] are no asymmetric key encryption schemes since all the transactions are
processed and passed through the infrastructure as unreadable hashes. So, the
system’s integrity is no longer dependent upon the secrecy of the users’ private
keys.
[Link] frequency of transactions is resolved since the core cluster publishes a new
root hash every second, making executing a blockchain manipulation attack
computationally infeasible. So, the danger of changing the transactions in a node
of the hash calendar is rectified.
BCSE324L - FOUNDATIONS OF BLOCKCHAIN TECHNOLOGY
Module 2: DISTRIBUTED LEDGER TECHNOLOGY

Dr. Senthil Prakash P.N.


Assistant Professor Senior Grade 1,
School of Computer Science and Engineering,
Vellore Institute of Technology,
Chennai – 600127
Distributed Ledger Technology
• DLT stands for Distributed Ledger Technology. It is also known as a “shared ledger” or
simply distributed ledger.

• It is a digital system that lets users and systems record transactions related to assets. A
distributed ledger technology stores the information at multiple locations at any given point
of time.

• DLT, unlike traditional databases, does not have any central place to store information.

• The decentralization feature also provides better security, transparency, and trust among
parties using it.
Origin of Ledger
• DLT originates from the peer-to-peer(P2P) network. In any P2P network, peers
communicate with each other without the need for a centralized entity. Technically, a
distributed ledger technology is possible through a peer-to-peer network.

• A consensus algorithm is utilized to make decentralization work.


Types of Distributed Ledger Technology
• Centralized Ledger: All parties reconcile their local databases with a centralized electronic
ledger that is maintained and controlled by a trusted central party.

Centralized Ledger
Types of Distributed Ledger Technology
• Distributed Ledger (Permissionless): Each node in a P2P network owns a full and up-to-
date copy of the entire ledger. Every proposed local addition to the ledger by a network
participant is communicated across the network to all nodes. Nodes collectively validate the
change through an algorithmic consensus mechanism. After validation is accepted, the new
addition is added to all respective ledgers to ensure data consistency across the entire
network.

Distributed Ledger (Permissionless)


Types of Distributed Ledger Technology
• Distributed Ledger (Permissioned): In a permissioned system, nodes need permission
from a central entity to access the network and make changes to the ledger. Access controls
can include identity verification.

Distributed Ledger (Permissioned)


Features of Distributed Ledger Technology
Distributed Nature of the Ledger:

• Recordkeeping has always been a centralized process that requires trust in the record
keeper. The most important innovation of DLT is that control over the ledger does not lie
with any one entity but is with several or all network participants – depending on the type
of Distributed Ledger.

• The removal of the central party can increase speed and potentially remove costs and
inefficiencies associated with maintaining the ledger and subsequent reconciliations.
Features of Distributed Ledger Technology
Consensus Mechanism:

• The distributed nature of the DL requires the participants in the network (‘nodes’) to reach
a consensus regarding the validity of new data entries by following a set of rules.

• A consensus mechanism is necessary to establish whether a particular transaction is


legitimate or not.

• The consensus mechanism is also important to handle conflicts between multiple


simultaneous competing entries - for example, different transactions on same asset are
proposed by different nodes.
Features of Distributed Ledger Technology
Cryptographic Hash Functions and Digital Signatures:

• Cryptography is at the core of DLT, in particular for blockchain implementations.

• Each new data entry, i.e. a transaction record, is “hashed”, which means that a cryptographic
hash function is applied to the original message.

• The blocks are signed with a digital signature, which binds the sender to the contents of the
block, akin to a signature on a contract. DLT uses ‘public key cryptography’ for digital
signatures
Features of Distributed Ledger Technology
Cryptographic Hash Functions and Digital Signatures:
Ecosystem of Distributed Ledger Technology
An ecosystem is a collection of stakeholders such as organizations and users in conjunction
with other entities, performing separate roles. There are four aspects of DLT ecosystems:

• Hardware aspect,

• Business aspect,

• Software development aspect and

• Protocol development aspect

To get a better understanding of distributed ledger technologies, we also need to learn about
its ecosystem.
Ecosystem of Distributed Ledger Technology
Hardware aspect of the DLT ecosystem:

The hardware aspect of DLT ecosystems is comprised of a large number of nodes where each
node could either be a computer, server, or storage device. Three modalities of nodes can
exist:

• block producing full validating nodes: participates in a consensus process and contains
an entire replica of the distributed ledger

• non‐block producing full validating nodes: does not participate in a consensus process
and contains an entire replica of the distributed ledger

• partial/light nodes: only a partial transaction list but must be connected in some way to a
full node
Ecosystem of Distributed Ledger Technology
Business aspect of the DLT ecosystem:

The business aspect of the DLT ecosystem consists of users, investors, block producers,
corporations, and developers.

• DLT users: engage with a DLT by using a DLT application, product or service.

• Investors: the people or organizations that provide capital to create the DLT ecosystem.

• Block producers: full validating nodes that actively participate in a given DLT network's
consensus mechanism.

• Corporations: utilize DLT for business activities and deliver technologies to a large group
of customers or end-users.
Ecosystem of Distributed Ledger Technology
Software aspect of the DLT ecosystem:

• DLT leverages various types of software applications.

• DLT applications can be written in a variety of languages including C++, Java, Go, Rust,
Solidity, JavaScript, Python, and many others.

• DLTs are not language-specific and can work with any programming language or tools based
on the requirement. The choice of the programming language depends on the language’s
weakness and strength.

• These applications generally fall into three categories: financial, semi‐financial, and non‐
financial applications.
Ecosystem of Distributed Ledger Technology
Protocol aspect of the DLT ecosystem:

• The protocol aspect of DLT ecosystems consists of developers and academia.

• Developers are involved with setting up DLT protocols that serve networks. The protocol
layer is concerned mostly with how cryptographic keys interact with the network.

• There are two kinds of protocols: open-source and closed-source.

• Researchers and academia aid in educating others on the implications of DLT systems and
defining its limitations.
Ecosystem of Distributed Ledger Technology
Implementation of Distributed Ledger Technology
Distributed ledger technology has seen multiple implementations over the years. However,
there are a few implementations that have more impact than others.

Blockchain:

• One of the prime examples of distributed ledger implementations is the blockchain!

• In 2008, Satoshi Nakamoto introduced bitcoin to the world. It utilizes blockchain


technology to the world, which enables peers to send and receive digital currency without
the need for a centralized entity.

• Immutability is one of the key features of blockchain.

• Another feature that makes blockchain so amazing is transparency. The transactions that
are done through the blockchain can be traced and validated if needed.
Implementation of Distributed Ledger Technology

Distributed ledger technology has seen multiple implementations over the years. However,
there are a few implementations that have more impact than others.

Ethereum:

• Ethereum is another amazing example of a distributed ledger technology implementation.

• One of the limitation of bitcoin is the use of the Proof of Work consensus algorithm as it
required a lot of energy to compute and validate transactions.

• Ethereum fixed it by providing an alternative consensus method known as Proof of Stake.

• It also introduced smart contracts, a way to automate tasks within the network. This also
gave rise to decentralized apps which can automate a large aspect of the requirement.
Implementation of Distributed Ledger Technology

Distributed ledger technology has seen multiple implementations over the years. However,
there are a few implementations that have more impact than others.

Corda:

• Corda is an open source blockchain project, designed for business from the start. Only
Corda allows you to build interoperable blockchain networks that transact in strict privacy.
Corda's smart contract technology allows businesses to transact directly, with value.

• Smart contracts that can be written in Java and other JVM languages.

• Enables the development of distributed apps called CorDapps.


Implementation of Distributed Ledger Technology
Distributed ledger technology has seen multiple implementations over the years. However,
there are a few implementations that have more impact than others.

Hashgraph:

• Hashgraphs don’t bundle data into blocks as blockchains do. Instead, hashgraph nodes use a
“gossip about gossip” system, wherein they organically transmit messages.

• Gossip protocol-In hashgraph, when sending information between nodes, "Alice" will choose
another member at random, such as "Bob". Then Alice will tell Bob all of the information
she knows so far. Alice then repeats this information with a different random member.

• The synchronization of information between two members through the gossip protocol is
called a gossip sync.
Implementation of Distributed Ledger Technology
Hashgraph: Cont…

Upon completion of a gossip sync, each participating member commemorates the gossip sync
with an event.

Each event on hashgraph contains the following:


• Timestamp
• Two hashes
Self-parent
Other-parent
• Transactions
• Digital signature
Implementation of Distributed Ledger Technology
DAGs:

• A directed acyclic graph (DAG) is a graphical representation of a series of activities. A series


of nodes and edges visually represent the order of these activities.

• Vertex (node), represents an activity that needs to be added to the decentralized network.
An edge, shows that a DAG moves only in a forward direction. There is no path back to a
previous vertex.

• Each new transaction must reference a previous one before getting into the network. Each
vertex represents a transaction. Each transaction is built on top of the other.

• Unlike a blockchain, transaction data is not collected and added to a block. Nodes must link
each transaction to previous transactions to ensure double-spend protection.
Public vs Private Ledgers
Public Ledger:

• Open Access: Anyone can join and participate in the network, making it highly transparent
and decentralized. Think of it as a giant, publicly readable spreadsheet.

• Security through Consensus: Complex cryptographic algorithms and consensus


mechanisms like Proof-of-Work ensure data integrity and tamper-proof records. No single
entity controls the network, fostering trust and security.

• Examples: Bitcoin, Ethereum, Litecoin - these blockchains are accessible to anyone,


allowing anyone to view transaction data and participate in mining or validating
transactions.
Public vs Private Ledgers
Private Ledger:

• Restricted Access: Only authorized participants, pre-approved by a central authority, can


access the network. This makes them ideal for businesses or organizations requiring
controlled data sharing.

• Enhanced Control and Scalability: Permissions can be set for different users, and the
network can be fine-tuned for specific needs. This flexibility allows for faster transaction
processing and tailored applications.

• Examples: Hyperledger Fabric, R3 Corda, Quorum - these permissioned blockchains are


used by enterprises for supply chain management, trade finance, and other confidential use
cases.
Public vs Private Ledgers
Feature Public Ledger Private Ledger
Accessibility Open to anyone Permissioned only
Transparency Highly transparent Controlled access and privacy

Strong through consensus High security with additional control


Security
mechanisms measures

Decentralization Fully decentralized Can be centralized or federated

Scalability Can be slower due to large network Potentially faster and more scalable

Supply chain management, trade


Use cases Cryptocurrencies, open data sharing finance, confidential business
applications
Public vs Private Ledgers
Ledger: It refers to chronological record of all transactions ever made on a blockchain.

Registries: Specific subsets of data within a ledger, focusing on a particular type of asset or
information.

Both ledgers and registries play crucial roles in building trust, transparency, and efficiency in
various applications of blockchain technology.
Keyless Signature Infrastructure
Merkle tree, also known as a binary hash tree, is a data structure used to summarize and
verify the integrity of large data sets efficiently. Merkle trees are binary trees containing
cryptographic hashes.

Merkle trees summarize all the transactions in a block, producing an overall digital
fingerprint of the entire set of transactions, and providing a very efficient process to verify
whether a transaction is included in a block.

A Merkle tree is constructed by recursively hashing pairs of nodes until only one hash, called
the root, or Merkle root.
Keyless Signature Infrastructure
Keyless Signature Infrastructure
• Keyless Signature Infrastructure (KSI) is a blockchain technology that provides massive
scale data authentication without the reliance on centralized authorities. It solely relies on
the security of hash functions and the blockchain.

• With the help of KSI or Keyless Signature Infrastructure we eliminate the need of symmetric
or asymmetric keys for the purpose of verification.

• KSI only makes use of hashes, so to verify whether the given data is the original data, all
we'd need to do is hash the original file and compare it with that of the given data's and if
they match, then the data isn't compromised
Keyless Signature Infrastructure
Keyless Signature Infrastructure
Keyless Signature Infrastructure (KSI) has four major components:

• Application

• Gateway

• Aggregator Network

• Core Cluster
Keyless Signature Infrastructure
Keyless Signature Infrastructure (KSI) has four major components:

• Application: The individual transaction requests are hashed using a cryptographic hash
function (SHA256) and sent to the gateway.

• Gateway: An extender in the gateway offers signature token verification services to the
users. A signature token is essentially a path to the Merkle root.

• Aggregator Network: The aggregators working in rounds of equal duration gather the
incoming requests to build a hash tree and pass the top hash values to their upstream
aggregators.

• Core Cluster: The top hash values are linked together in a globally unique hash tree called
the hash calendar
Keyless Signature Infrastructure
Keyless Signature Infrastructure (KSI) has four major components:
Practitioner Perspective - DLT
Transparency as a Strategic Risk:

• In many situations, transparency is a double-edged sword, and some of the parties that may
benefit the most from it and also suffered a lot from it.

• A host of research shows that institutional investors, in particular, are very concerned that
competitors might imitate their trading strategies.

• In addition to situations when some parties desire privacy, there are situations where
privacy is a necessity. A good example is blockchain based voting. The underlying idea of
using a blockchain for voting is to issue digital, single-use tokens to eligible voters.

• Existing blockchain technology can address many of the issues of transparency highlighted
here.
Practitioner Perspective - DLT
Transparency as a Strategic Risk:

Holdings of ether associated with a particular identifier


Practitioner Perspective - DLT
Transparency as a Strategic Assert ‐ Reputation and perceived integrity:

• A common approach of firms to increase trust is to publish the adopted ethical codes of
conduct, which makes it easier for employees to know what is expected and create
credibility in business dealings.

• A common approach of firms to increase trust is to publish the adopted ethical codes of
conduct, which makes it easier for employees to know what is expected and create
credibility in business dealings.

• Furthermore, sharing relevant information with partners and supply-chain members in a


timely manner improves trust, and can generally lift a firm’s brand.
Practitioner Perspective - DLT
Transparency as a Strategic Assert ‐ Reputation and perceived integrity:

As Tapscott outlines, there are five elements for firm success with increased transparency and
public scrutiny. Firms need to:

• Create true value that withstands the scrutiny that transparency brings about.

• Understand customers and build relationship capital.

• Protect customers’ privacy.

• Behave with integrity since lapses are caught quickly in a transparent world.

• Be candid as shortcomings can be seen quickly.


Practitioner Perspective - DLT
Transparency as a Strategic Assert ‐ Reputation and perceived integrity:

• An extreme case of transparency is the decentralized autononmous organization (DAO). Set


up as a venture fund, all DAO investments and its entire governance are transparent by
design, because the underlying code is open-source and visible to all.

• In the digital era, it is often impossible to credibly and efficiently reveal all of a
government’s relevant transactions and business dealings—but when all transactions and
contracts are recorded on a blockchain, nothing remains hidden
Practitioner Perspective - DLT
Transparency as a Strategic Assert – Disintermediation and improved governance

• Yermack highlights that the immutability of public blockchains improves (corporate)


governance. In the current system, land records can be forged, corporate income statements
can be manipulated, and option grants can be backdated.

• When all these data are recorded on a public blockchain, performing such manipulations
becomes prohibitively difficult and expensive.
Technological approaches to privacy in blockchains

Usage of multiple IDs:

• Hierarchical deterministic (HD) wallets algorithmically generate a new public key for every
piece of a larger trade.

• Generally, users must make a backup of each key whenever a new one is generated. That
said, if the wallet’s details are lost, all of the addresses and keys would also be lost.

• Hierarchical deterministic wallets took the place of JBOK wallets since users could back up
HD wallets using a single seed and greatly benefit from extended keys. Therefore, a wallet
that generates its public and private keys from a seed is referred to as a hierarchical
deterministic wallet.
Technological approaches to privacy in blockchains
Public & Private Blockchains
• Public and private blockchains differ in terms of accessibility, transparency, and
control. Public blockchains are open to anyone and operate on the principle of
transparency, allowing anyone to join the network, validate transactions, and contribute to
the consensus process. In contrast, private blockchains are restricted to authorized
participants, offering enhanced privacy and control.
Public & Private Blockchains
Zero Knowledge Proofs
Zero-knowledge proofs can be understood as a construct or a protocol through which a
‘prover’ can present proof to a ‘verifier’ that the prover knows a ‘secret’, without revealing any
information about the secrete.

The verifier, upon examining the presented proof, will be convinced that the prover indeed
knows the secret without learning anything else (zero-knowledge) about the secret.
Zero Knowledge Proofs
Zero-knowledge proofs must satisfy the following conditions.

• Completeness – If the prover’s claim is true, an honest verifier who is following the
protocol will be convinced that the claim is true.

• Soundness – If the prover’s claim is false, the protocol makes extremely difficult for a
prover to convince a honest verifier.

• Zero knowledge – The protocol will not leak any information about the secret. The verifier
learns nothing except that the claim is true.
Zero Knowledge Proofs
There are two categories of Zero knowledge proofs.

Interactive – Protocols are defined through which the verifier can send one or more
challenges to the prover and evaluate the responses to convince themselves that the provers
claim about the knowledge secrete is correct.
Zero Knowledge Proofs
There are two categories of Zero knowledge proofs.

Interactive – Protocols are defined through which the verifier can send one or more
challenges to the prover and evaluate the responses to convince themselves that the provers
claim about the knowledge secrete is correct.

Example: Ali baba cave


Zero Knowledge Proofs
There are two categories of Zero knowledge proofs.

Non interactive – There is no interaction is required between the prover and the verifier. The
prover creates a cryptographic proof of the claim that can be instantly authenticated by the
verifier.
Zero Knowledge Proofs
There are two categories of Zero knowledge proofs.

Non interactive – There is no interaction is required between the prover and the verifier. The
prover creates a cryptographic proof of the claim that can be instantly authenticated by the
verifier.

Example: Waldo Puzzle


Zero Knowledge Proofs
• ZK‐SNARKs, or “Zero Knowledge Succinct Non-Interactive Argument of Knowledge,” are
cryptographic proofs that allow one to validate the claim without repeating lengthy
computations and keeping some inputs private.

• ZK‐STARKs, or “Zero Knowledge Scalable Transparent Argument of Knowledge,” are a


specific type of zk-SNARKs. STARK protocols are ideal when working with witnesses of
large size. They also provide higher transparency.
Zero Knowledge Proofs
ZK-SNARK ZK-STARK
Low. Allow for EVM data
Proof Size High. Driving the costs up
availability
Trust Setup Requires a trusted setup Does not require a trusted setup
Faster times only with large
Verification Time Fast verification times
datasets
Quantum Security Not quantum-resistant Quantum-resistant
Less transparent due to trusted More transparent using public
Transparency
setup verifiable randomness
Scalability Less scalable, linear increase Highly scalable
Best for systems where proof size Best where transparency and
Use Cases
and speed are key quantum-resistance are priorities
Dapps
All the best . . .
Practical Byzantine Fault
Tolerance (PBFS)
What is Byzantine Fault Tolerance?
• Byzantine Fault Tolerance(BFT) is the feature of a distributed
network to reach consensus(agreement on the same value)
even when some of the nodes in the network fail to respond or
respond with incorrect information.
• The objective of a BFT mechanism is to safeguard against the
system failures by employing collective decision making(both –
correct and faulty nodes) which aims to reduce to influence of
the faulty nodes.
• BFT is derived from Byzantine Generals’ Problem.
• Proposed by Miguel
The Byzantine Generals Problem

• The Byzantine Generals Problem is a game theory problem, which


describes the difficulty decentralized parties have in arriving at
consensus without relying on a trusted central party. In a network
where no member can verify the identity of other members, how can
members collectively agree on a certain truth?
The Byzantine Generals Problem
• Imagine that several divisions of the Byzantine army are camped outside
an enemy city, each division commanded by its own general. The generals
can communicate with one another only by messenger. After observing
the enemy, they must decide upon a common plan of action. However,
some of the generals may be traitors, trying to prevent the loyal generals
from reaching an agreement. The generals must decide on when to attack
the city, but they need a strong majority of their army to attack at the
same time. The generals must have an algorithm to guarantee that (a) all
loyal generals decide upon the same plan of action, and (b) a small
number of traitors cannot cause the loyal generals to adopt a bad plan.
The loyal generals will all do what the algorithm says they should, but
the traitors may do anything they wish. The algorithm must guarantee
condition (a) regardless of what the traitors do. The loyal generals should
not only reach agreement, but should agree upon a reasonable plan.
Byzantine fault tolerance

• Byzantine fault tolerance can be achieved if the correctly


working nodes in the network reach an agreement on their
values.
• There can be a default vote value given to missing messages
i.e., we can assume that the message from a particular node is
‘faulty’ if the message is not received within a certain time limit.
Furthermore, we can also assign a default response if the
majority of nodes respond with a correct value.
Practical Byzantine Fault Tolerance (PBFS)
• A practical Byzantine Fault Tolerant system can function on the
condition that the maximum number of malicious nodes must not be
greater than or equal to one third of all the nodes in the system. As
the number of nodes increases, the system becomes more secure.
Types of Byzantine Failures
• There are two categories of failures that are considered. One is
fail-stop(in which the node fails and stops operating) and other
is arbitrary-node failure. Some of the arbitrary node failures are
given below :
• Failure to return a result
• Respond with an incorrect result
• Respond with a deliberately misleading result
• Respond with a different result to different parts of the system
How pBFT works ?
• pBFT tries to provide a practical Byzantine state machine replication
that can work even when malicious nodes are operating in the
system.
• Nodes in a pBFT enabled distributed system are sequentially
ordered with one node being the primary(or the leader node) and
others referred to as secondary(or the backup nodes).
• Note here that any eligible node in the system can become the
primary by transitioning from secondary to primary(typically, in the
case of a primary node failure). The goal is that all honest nodes
help in reaching a consensus regarding the state of the system
using the majority rule.
pBFT consensus rounds are broken into
3 phases
1. The client sends a request to the primary(leader) node.
2. The primary(leader) node broadcasts the request to the all
the secondary(backup) nodes.
3. The nodes(primary and secondaries) perform the service
requested and then send back a reply to the client.
4. The request is served successfully when the client receives
‘m+1’ replies from different nodes in the network with the
same result, where m is the maximum number of faulty
nodes allowed.
pBFT
• The primary(leader) node is changed during every view(pBFT
consensus rounds) and can be substituted by a view change
protocol if a predefined quantity of time has passed without
the leading node broadcasting a request to the
backups(secondary). If needed, a majority of the honest nodes
can vote on the legitimacy of the current leading node and
replace it with the next leading node in line.
Advantages of pBFT

• Energy efficiency : pBFT can achieve distributed consensus without


carrying out complex mathematical computations(like in PoW). Zilliqa
employs pBFT in combination with PoW-like complex computations
round for every 100th block.
• Transaction finality : The transactions do not require multiple
confirmations(like in case of PoW mechanism in Bitcoin where every node
individually verifies all the transactions before adding the new block to
the blockchain; confirmations can take between 10-60 minutes
depending upon how many entities confirm the new block) after they
have been finalized and agreed upon.
• Low reward variance : Every node in the network takes part in
responding to the request by the client and hence every node can be
incentivized leading to low variance in rewarding the nodes that help in
decision making.
Limitations of pBFT

The pBFT consensus model works efficiently only when the number
of nodes in the distributed network is small due to the high
communication overhead that increases exponentially with every
extra node in the network.
• Sybil attacks : The pBFT mechanisms are susceptible to Sybil attacks,
where one entity(party) controls many identities. As the number of nodes in
the network increase, sybil attacks become increasingly difficult to carry out.
But as pBFT mechanisms have scalability issues too, the pBFT mechanism is
used in combination with other mechanism(s).
• Scaling : pBFT does not scale well because of its communication(with all
the other nodes at every step) overhead. As the number of nodes in the
network increase(increases as O(n^k), where n is the messages and k is the
number of nodes), so does the time taken to respond to the request.
Platforms using pBFT variants
• Zilliqa – pBFT in combination with PoW consensus
• Hyperledger Fabric – permissioned version of pBFT
• Tendermint – pBFT + DPoS(Delegated Proof-of-Stake)
Zero Knowledge Proof (zkp)
Zero Knowledge Proof (ZKP)
• Zero Knowledge Proof (ZKP) is an encryption scheme
originally proposed by MIT researchers Shafi Goldwasser,
Silvio Micali and Charles Rackoff in the 1980s.
• An increasingly common way privacy is achieved on public blockchain
networks is through zero-knowledge proofs (ZKPs)—a method for one
party to cryptographically prove to another that they possess
knowledge about a piece of information without revealing the actual
underlying information.
Examples of ZKP
• Example-1: A Colour-blind friend and Two balls :
There are two friends Sachin and Sanchita, out of whom Sanchita is colour blind.
Sachin has two balls and he needs to prove that both the balls our of different
colour. Sanchita switches the balls randomly behind her back and shows it to
Sachin who has to tell if the balls are switched or not. If the balls are of the
same colour and Sachin had given false information, the probability of him
answering correctly is 50%. When the activity is repeated several times, the
probability of Sachin giving the correct answer with the false information is
significantly low. Here Sachin is the “prover” and Sanchita is the “verifier”.
Colour is the absolute information or the algorithm to be executed, and it is
proved of its soundness without revealing the information that is the colour to
the verifier.
• Example-2: Finding Waldo :
Finding Waldo is a game where you have to find a person called Waldo from a
snapshot of a huge crowd taken from above. Sachin has an algorithm to find
Waldo but he doesn’t want to reveal it to Sanchita. Sanchita wants to buy the
algorithm but would need to check if the algorithm is working. Sachin cuts a
small hole on a cardboard and places over Waldo. Sachin is the “prover” and
Sanchita is the “verifier”. The algorithm is proved with zero knowledge about it.
Categories of ZKP
[Link] Zero Knowledge Proof –
It requires the verifier to constantly ask a series of questions about
the “knowledge” the prover possess. The above example of finding
Waldo is interactive since the “prover” did a series of actions to
prove the about the soundness of the knowledge to the verifier.
[Link]-Interactive Zero Knowledge Proof –
For “interactive” solution to work, both the verifier and the prover
needed to be online at the same time making it difficult to scale up
on the real world application. Non-interactive Zero-Knowledge
Proof do not require an interactive process, avoiding the possibility
of collusion. It requires picking a hash function to randomly pick the
challenge by the verifier. In 1986, Fiat and Shamir invented the Fiat-
Shamir heuristic and successfully changed the interactive zero-
knowledge proof to non-interactive zero knowledge proof.
Properties of Zero Knowledge Proof
• Zero-Knowledge –
If the statement is true, the verifier will not know that the statement
or was. Here statement can be an absolute value or an algorithm.

• Completeness –
If the statement is true then an honest verifier can be convinced
eventually.

• Soundness –
If the prover is dishonest, they can’t convince the verifier of the
soundness of the proof.
Types of Zero-Knowledge Proofs
• There are various implementations of ZKPs, with each having its own
trade-offs of proof size, prover time, verification time, and more. They
include:
• zk-SNARKs
• SNARKs, which stands for “succinct non-interactive argument of
knowledge”, are small in size and easy to verify. They generate a
cryptographic proof using elliptical curves, which is more gas-efficient
than the hashing function method used by STARKS.
Types of Zero-Knowledge Proofs
• zk-STARKs
• STARK stands for “scalable transparent argument of knowledge”. STARK-based
proofs require minimal interaction between the prover and the verifier, making
them much faster than SNARKs.
• PLONK
• Standing for “permutations over Lagrange-bases for oecumenical noninteractive
arguments of knowledge,” PLONKs use a universal trusted setup that can be used
with any program and can include a large number of participants.
• Bulletproofs
• Bulletproofs are short non-interactive zero-knowledge proofs that require no
trusted setup. They are designed to enable private transactions for
cryptocurrencies.
• There are already a number of zero-knowledge projec
Use cases for ZKP
• Zero-knowledge proofs unlock exciting use cases across Web3, enhancing security, protecting user privacy,
and supporting scaling with layer 2s.
• Private Transactions
• ZKPs have been used by blockchains such as Zcash to allow users to create privacy-preserving transactions that keep the
monetary amount, sender, and receiver addresses private.
• Verifiable Computations
• Decentralized oracle networks, which provide smart contracts with access to off-chain data and computation, can also
leverage ZKPs to prove some fact about an off-chain data point, without revealing the underlying data on-chain.
• Highly Scalable and Secure Layer 2s
• Verifiable computations through methods such as zk-Rollups, Validiums, and Volitions enable highly secure and scalable layer
2s. Using layer 1s such as Ethereum as a settlement layer, they can provide dApps and users with faster and more efficient
transactions.
• Decentralized Identity and Authentication
• ZKPs can underpin identity management systems that enable users to validate their identity, while protecting their personal
information. For example, a ZKP-based identity solution could enable a person to verify that they’re a citizen of a country
without having to provide their passport details.
zk-SNARKs
What is the main purpose of zk-SNARKs in
blockchain technology?
• Zk-SNARK is a robust proof system that ensures secure and
confidential transactions.
• Its primary objective is convincing the verifier that the prover
possesses specific information without revealing the data.
• This process fosters trust and authenticity between parties without
direct communication.
Zk-SNARK
• The term "zk-SNARK" is an acronym that stands for "Zero-Knowledge
Succinct Non-Interactive Argument of Knowledge." Each part of the
name refers to a characteristic of zk-SNARKs, so it helps to look at
each component separately:
• Zero-Knowledge: The prover can show the verifier that they have a
piece of information without providing the information itself.
• Succinct: The proof can be verified within a few milliseconds since
the proof length is only a few hundred bytes at most.
• Non-Interactive: The proof consists of a single message from the
prover to the verifier.
• Argument: Argument is the term used for these proofs because they
don't quite fit the traditional definition of proofs, but they effectively
serve the same purpose.
• Knowledge: Knowledge refers to the information possessed by the
prover.
zk-SNARKs
• In cryptocurrency, zk-SNARKs are a way for transactions to be
private and fully encrypted on the blockchain while still being
validated using the network's consensus rules.
• zk-SNARKs can show that the sender has the amount of funds
they want to transfer without making that information public.
zk-SNARKs
• zk-SNARKs comes from the concept of the zero-knowledge
proof, which was first introduced in a 1985 paper written by
Shafi Goldwasser, Silvio Micali, and Charles Rackoff.
• A 2012 paper by Nir Bitansky, Ran Canetti, Alessandro Chiesa,
and Eran Tromer coined the term "zk-SNARK" to describe a new
zero-knowledge protocol.
• Unlike prior methods, it wouldn't require interaction between the
prover and verifier outside of a single message.
In zk-SNARK, the equation is represented as
follows:
• f(x, w) = True/False
• Where:
• f represents the function that undergoes verification.
• x is the public input.
• w is the private key.
• The verifier’s ability to prove that the equation is a truth defines zk-
SNARK.
Alice and Bob example
• In a ZK-SNARK protocol, there are two parties:
• The prover (Alice) and,
• The verifier (Bob)

The prover makes a claim and uses the ZK-SNARK mechanism to


produce proof to convince the verifier that the claim is true without
revealing the referenced information.
Alice and Bob example
• Alice and Bob are engaged in a cryptographic interaction in this
hypothetical scenario. Alice wishes to demonstrate to Bob that she
possesses knowledge of a secret number denoted as “x.” However,
Alice is unwilling to disclose the actual value of “x” to Bob.
• To achieve this, they employ a zero-knowledge proof system known
as zk-SNARK. Using zk-SNARK, Alice generates proof that validates her
knowledge of “x” without revealing the value itself. She then shares
this proof with Bob. Bob, utilizing a public verification key, can verify
the authenticity of Alice’s proof. Through zk-SNARK, Bob can be
convinced that Alice indeed knows the secret number “x” without
gaining any knowledge of the specific value.
How to create a zk-snark?
• Creating a zk-snark involves the following steps in a transaction:
– Establish a common string between the sender and receiver during
the initialization phase.
– Use three algorithms (G, P, and V) where G is a key generator, P
represents a proving key, and V is the verification key.
– The prover then utilizes the proving key (P) and the verification key
(V) to interact with the verifying network.
How is a zk-snark implemented?
• The implementation of a zk-snark involves the following steps:
– Formulate the computation or transaction as a set of constraints.
– Reduce the restrictions to polynomial equations.
– Develop a mathematical proof based on elliptic curve cryptography
to prevent false proofs.
– The other party verifies the proof by solving the mathematical
equation.
Pros and cons of zk-SNARKs

• The primary benefits of zk-SNARKs are the privacy and


efficiency they offer. They shield sensitive information, it takes
just milliseconds to verify them, and they don't require extended
interaction between the parties involved. All that's needed is
one message from the prover to the verifier.
• Although zk-SNARKs don't have any glaring drawbacks, if
someone has the private key used to set up the protocol, they'd
be able to create false proofs and counterfeit funds. Privacy
coins that use zk-SNARKs must take steps to ensure no single
party has access to that private key.
zk-SNARK example

• The most well-known example of zk-SNARKs is their use in


shielding cryptocurrency transactions. Zcash is the first
widespread application of zk-SNARKs. This privacy coin allows
users to choose between private and transparent addresses.
When a user chooses a private address, zk-SNARKs shield the
transaction data.
Zk-STARK
Zk-STARK
• Zero-knowledge‘ refers to the preservation of privacy;
• ‘Scalable‘ indicates that verification time is substantially less
than the time taken for naïve computations;
• ‘Transparent‘ reflects the lack of a trusted setup requirement;
• ‘Argument‘ and ‘knowledge‘ relate to the security and
robustness of the cryptographic scheme.
• The invention of zk-STARKs is credited to Eli-Ben Sasson, a
professor at the Technion-Israel Institute of Technology.
ZK-STARKS
• ZK-STARKS do not rely on private-public key pairings, but rely on
collision resistant hashing for interactive solutions (which Grover’s
algorithm does not meaningfully break), and a random oracle model
(a model that is typically used instead of general cryptographic hash
functions where strong randomness assumptions are required for the
oracle output) for non-interactive proofs (zk-nSTARK, n = non-
interactive), therefore ZK-STARKs are currently resistant to quantum
computer attacks.
Where zk-STARK can be used?
[Link] systems
[Link] a computation and verifying its results, such as a
blockchain’s past transactions
[Link] verification of information, such as for proving identity or
credentials
How Do Zero-Knowledge STARKs Work?
• Zero-Knowledge STARKs work by leveraging leaner
cryptography, specifically collision-resistant hash functions, to
validate the truth of a statement without sharing the details
behind it.
• zk-STARKs generate proofs that are typically 10 to 100 times
larger than those created by zk-SNARKs, thus making them
more expensive and potentially less practical for certain
applications.

You might also like