0% found this document useful (0 votes)
1 views80 pages

Module 1 Notes

The document provides an overview of blockchain technology, explaining its definition, integration with distributed systems, and historical development from its inception in 1991 to recent advancements like Ethereum 2.0 in 2022. It discusses key concepts such as consensus mechanisms, the CAP theorem, and Byzantine Fault Tolerance, as well as the benefits and limitations of blockchain technology. Additionally, it outlines the architecture of blockchain and the generic elements that comprise it, emphasizing its decentralized nature and potential applications.

Uploaded by

diyakulal05
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)
1 views80 pages

Module 1 Notes

The document provides an overview of blockchain technology, explaining its definition, integration with distributed systems, and historical development from its inception in 1991 to recent advancements like Ethereum 2.0 in 2022. It discusses key concepts such as consensus mechanisms, the CAP theorem, and Byzantine Fault Tolerance, as well as the benefits and limitations of blockchain technology. Additionally, it outlines the architecture of blockchain and the generic elements that comprise it, emphasizing its decentralized nature and potential applications.

Uploaded by

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

Module 1

What is Blockchain?
The blockchain is a distributed database of records of all transactions
or digital events that have been executed and shared among
participating parties.
Each transaction is verified by the majority of participants of the
system.
Or
A blockchain is an open, distributed ledger that can record
transactions between two parties efficiently and in a verifiable and
permanent way without the need for a central authority.
Distributed Systems
Distributed Systems are networks of independent computers that
work together to achieve a common goal.
• In a distributed system, each computer, often referred to as a node,
has its own memory and computing resources, and communicates
with other nodes through message passing.
• These systems are designed to handle large volumes of data,
computational tasks, or services across multiple machines, often
connected via a network.
How Blockchain Integrates with Distributed Systems?

• Decentralization: no one party has absolute authority


• Consensus Mechanisms: nodes must agree on the current state in
the ledger, which is done by applying consensus algorithms of PoW,
or PoS.
• Fault Tolerance: to function as a system even if some of the nodes in
the distributed computing application fail.
• Security and Transparency: It has use of cryptographic hashing while
at the same time the transaction history is made available to all the
members in the network.
Block chain
Block chain can be defined as the Chain of Blocks that contain some
specific Information.

Thus, a Blockchain is a ledger i.e file that constantly grows and keeps
the record of all transactions permanently.

This process takes place in a secure and immutable way.


History of Blockchain
1991: In 1991, researcher scientists named Stuart Haber and W. Scott
Stornetta introduce Blockchain Technology.
These scientists wanted some Computational practical Solution for
time-stamping the digital documents so that they couldn’t be
tempered or misdated.
1992: After that in 1992, Merkle Trees formed a legal corporation by
using a system developed by Stuart Haber and W. Scott Stornetta with
some more features.
• Merkle used a Secured Chain of Blocks that stores multiple data
records in a sequence.
• 2000: In the year 2000, Stefan Konst published his theory of
cryptographic secured chains, plus ideas for implementation.

• 2004: In the year 2004, Cryptographic activist Hal Finney introduced a


system for digital cash known as “Reusable Proof of Work”. This
System helps others to solve the Double Spending Problem by keeping
the ownership of tokens registered on a trusted server.

•2008: After that 2008, Satoshi Nakamoto conceptualized the concept


of “Distributed Blockchain” in his white paper: ”A Peer to Peer
Electronic Cash System”.
2009: In 2009, Satoshi Nakamoto Releases Bitcoin White Paper.
A person named, James Howells was an IT worker in the United
Kingdom, he starts mining bitcoins which are part of Blockchain in 2009
and stopped this in 2013.

(He spends $17,000 on it and after he stopped he sells the parts of his laptop
on eBay and keep the drive with him so that when he needs to work again on
bitcoin he will utilize it but while cleaning his house in 2013, he thrashed his
drive with garbage and now his bitcoins cost nearly $127 million.
This money now remains unclaimed in the Bitcoin system.)
• 2014: The year 2014 is marked as the turning point for blockchain
technology. Blockchain technology is separated from the currency
and Blockchain 2.0 is born. Financial institutions and other industries
started shifting their focus from digital currency to the development
of blockchain technologies.
• 2015: In 2015, Ethereum Frontier Network was launched, thus
enabling developers to write smart contracts that could be deployed
to a live network. In the same year, the Linux Foundation launched
the Hyperledger project.
• 2016: A bug in the Ethereum DAO code was exploited resulting in a
hard fork of the Ethereum Network. The Bitfinex bitcoin exchange
was hacked resulting in 120,000 bitcoin being stolen
• 2017: In the year 2017, Japan recognized Bitcoin as a legal currency.

• 2018: The bitcoin value continued to drop, reaching the value of


$3,800 at the end of the year. Online platforms like Google, Twitter,
and Facebook banned the advertising of cryptocurrencies.

• 2019: In the year 2019, Ethereum network transactions exceeded 1


million per day. Amazon announced the general availability of the
Amazon Managed Blockchain service on AWS.
• 2020: Stablecoins were in demand as they promised more stability
than traditional cryptocurrencies. The same year Ethereum launched
Beacon Chain in preparation for Ethereum 2.0.

• 2022 : Ethereum has shifted from Proof of Work(PoW) to Proof of


Stake(PoS) consensus mechanism. The original Ethereum mainnet
merged with Beacon Chain which has Proof-of-Stake. Now it is
existing as one chain.
Distributed System in Block chain Technology
• The chain of blocks, or ledger, is maintained by a decentralized
network of participants, rather than a central authority.
• Each participant in the network has a copy of the ledger, which is
updated in real-time as new transactions are added.
What is the CAP Theorem in Blockchain?
• CAP Theorem stands for Consistency, Availability, and Partition
Tolerance. According to the theory, a distributed system cannot
always ensure consistency, availability, and partition tolerance.
• When things go wrong, we must prioritize at most two distributed
system features and trade-offs between them.
Byzantine Generals Problem
is an impossibility result which means that the solution to this problem
has not been found yet as well as helps us to understand the
importance of blockchain.
It is basically a game theory problem that provides a description of the
extent to which decentralized parties experience difficulties in reaching
consensus without any trusted central parties.
Byzantine Fault Tolerance (BFT)
• The Byzantine Fault Tolerance was developed as inspiration in order
to address the Byzantine General’s Problem.
• Byzantine Fault Tolerance is one of the core characteristics of
developing trustworthy blockchain rules or features in tolerance.
• When two-thirds of the network can agree or reach a consensus and
the system still continues to operate properly, it is said to have BFT.
• Blockchain networks’ most popular consensus protocols, such as
proof-of-work, proof-of-stake, and proof-of-authority, all have some
BFT characteristics.
• In order to create a decentralized network, the BFT is essential.
Consensus method
•It determines the precise network structure.
•For instance, BFT has a leader as well as peers who can and cannot
validate.
•In order to maintain the sequence of the Blockchain transactions and
the consistency of the global state through local transaction replay,
consensus messages must pass between the relevant peers.
A consensus algorithm is a procedure through which all the peers of
the Blockchain network reach a common agreement about the present
state of the distributed ledger.

•Essentially, the consensus protocol makes sure that every new block
that is added to the Blockchain is the one and only version of the truth
that is agreed upon by all the nodes in the Blockchain.

•The Blockchain consensus protocol consists of some specific objectives


such as coming to an agreement, collaboration, cooperation, equal
rights to every node, and mandatory participation of each node in the
consensus process.
Proof of Work (PoW):
This consensus algorithm is used to select a miner for the next block
generation.
• Bitcoin uses this PoW consensus algorithm.
• The central idea behind this algorithm is to solve a complex
mathematical puzzle and easily give out a solution. This mathematical
puzzle requires a lot of computational power and thus, the node who
solves the puzzle as soon as possible gets to mine the next block
Proof of Stake (PoS):
•In this type of consensus algorithm, instead of investing in expensive
hardware to solve a complex puzzle, validators invest in the coins of
the system by locking up some of their coins as stakes.
•After that, all the validators will start validating the blocks. Validators
will validate blocks by placing a bet on them if they discover a block
that they think can be added to the chain.
•Based on the actual blocks added in the Blockchain, all the validators
get a reward proportionate to their bets, and their stake increase
accordingly.
• Delegated Proof Of Stake (DPoS): The users delegate their votes to
other users. Whichever user then mines the block will distribute the
rewards to the users who delegated to that particular vote.

• Proof of Burn (PoB): With PoB, instead of investing in expensive


hardware equipment, validators ‘burn’ coins by sending them to an
address from where they are irretrievable.
Thus, burning coins here means that validators have a long-term
commitment in exchange for their short-term loss. The more coins
they burn, the better their chances of being selected to mine the next
block.
• Proof of Capacity: validators are supposed to invest their hard drive
space instead of investing in expensive hardware or burning coins.
The more hard drive space validators have, the better their chances
of getting selected for mining the next block and earning the block
reward.

• Proof of Elapsed Time: every validator on the network gets a fair


chance to create their own block. All the nodes do so by waiting for a
random amount of time, adding proof of their wait in the block.
Kindly Note: from here(slide no. 25) most of the
slides are based on Text book and are can be
considered as appropriate for Exam point of view
Blockchain architecture
Blockchain architecture
• the lowest layer is the Network, which is usually the internet and
provides a base communication layer for any blockchain.
• A peer-to-peer network runs on top of the Network layer, which
consists of information propagation protocols such as gossip or
flooding protocols.
• the Cryptography layer, which contains crucial cryptographic
protocols that ensure the security of the blockchain
• the Consensus layer, which is concerned with the usage of various
consensus mechanisms to ensure agreement among different
participants of the blockchain.
• Execution layer provides executions services on the blockchain and
performs operations such as value transfer, smart contract execution,
and block generation.
Blockchain architecture
• the Applications layer, which is composed of smart contracts,
decentralized applications, DAOs, and autonomous agents. This layer
can effectively contain all sorts of various user level agents and
programs that operate on the blockchain.
Generic elements of a blockchain(different parts
of block chain)
Elements of a generic blockchain are described here one by one:
• Address: Addresses are unique identifiers used in a blockchain transaction to
denote senders and recipients. An address is usually a public key or derived from
a public key.

• Transaction: A transaction represents a transfer of value from one address to


another.

• Block: A block is composed of multiple transactions and other elements, such as


the previous block hash (hash pointer), timestamp, and nonce.
Hash pointer: A reference to a previous block is also included in the block
unless it is a genesis block. This reference is the hash of the header of the
previous block.
A genesis block is the first block in the blockchain that is hardcoded at the
time the blockchain was first started.
A nonce is a number that is generated and used only once.
A nonce is used extensively in many cryptographic operations to provide replay
protection, authentication, and encryption.

A timestamp is the creation time of the block

A Merkle root in a blockchain is present in the block header section of a block,


which is the hash of all transactions in a block.
This means that verifying only the Merkle root is required to verify all
transactions present in the Merkle tree instead of verifying all transactions one
by one.

A transaction is a record of an event, for example, the event of transferring cash


from a sender's account to a beneficiary's account.
The generic structure of a block
Generic structure of a blockchain network
How blockchain works
• Nodes are either miners who create new blocks and mint
cryptocurrency (coins) or block signers who validate and digitally sign
the transactions.
• A critical decision that every blockchain network has to make is to
figure out which node will append the next block to the blockchain.
• This decision is made using a consensus mechanism.
Figure 1.9: How a block is generated
• 1. Transaction is initiated: A node starts a transaction by first creating
it and then digitally signing it with its private key. Transactions are
usually either a cryptocurrency transfer (transfer of value) or smart
contract invocation that can perform any desired operation. A
transaction occurs between two or more parties.
• 2. Transaction is validated and broadcast: A transaction is
propagated (broadcast) usually by using data-dissemination
protocols, such as Gossip protocol, to other peers that validate the
transaction based on preset validity criteria.
• 3. Find new block: When the transaction is received and validated by
special participants called miners on the blockchain network, it is
included in a block, and the process of mining starts. This process is
also sometimes referred to as "finding a new block."
• 4. New block found: Once a miner solves a mathematical puzzle (or
fulfills the requirements of the consensus mechanism implemented in
a blockchain), the block is considered "found" and finalized. At this
point, the transaction is considered confirmed.
Benefits, features, and limitations of blockchain
The notable benefits of blockchain technology are as follows:
1. Decentralization: There is no need for a trusted third party or
intermediary to validate transactions; instead, a consensus
mechanism is used to agree on the validity of transactions.
2. Transparency and trust: As blockchains are shared and everyone can
see what is on the blockchain, this allows the system to be
transparent. As a result, trust is established.
3. Immutability: Once the data has been written to the blockchain, it is
extremely difficult to change it back.
4. High availability: As the system is based on thousands of nodes in a
peer-to-peer network, and the data is replicated and updated on
every node, the system becomes highly available.
5. Highly secure: All transactions on a blockchain are cryptographically
secured and thus provide network integrity.
6. Simplification of current paradigms: as a blockchain can serve as a
single shared ledger among many interested parties, this can result in
simplifying the model by reducing the complexity of managing the
separate systems maintained by each entity.
7. Faster dealings: In the financial industry, especially in post-trade
settlement functions, blockchain can play a vital role by enabling the
quick settlement of trades.
Blockchain does not require a lengthy process of verification,
reconciliation, and clearance because a single version of agreed-upon
data is already available on a shared ledger between financial
organizations.
8. Cost-saving: As no trusted third party or clearing house is required in
the blockchain model, this can massively eliminate overhead costs in
the form of the fees, which are paid to such parties.
9. Platform for smart contracts: A blockchain is a platform on which
programs can run that execute business logic on behalf of the users.
10. Smart property: It is possible to link a digital or physical asset to the
blockchain in such a secure and precise manner that it cannot be
claimed by anyone else.
Limitations of block chain
• Scalability: Currently, blockchain networks are not as scalable as, for
example, current financial networks. This is a known area of concern and
a very ripe area for research.
• Adoption: The challenge here is to allow blockchain networks to be easier
to use so that adoption can increase.
In addition, several other challenges such as scalability(introduced
previously) exist, which must be solved in order to increase adoption.

• Regulation: Due to its decentralized nature, regulation is almost


impossible on blockchain. consumers have a certain level of confidence
that if something goes wrong they can hold someone accountable.
However, in blockchain networks, no such regulatory authority and
control exists, which is an inhibiting factor for many consumers.
• Relatively immature technology: As compared to traditional IT
systems that have benefited from decades of research, blockchain is
still a new technology and requires a lot of research to achieve
maturity.
• Privacy and confidentiality: Privacy is a concern on public blockchains
such as Bitcoin where everyone can see every single transaction.
This transparency is not desirable in many industries such as the
financial, law, or medical sectors.
Tiers of BCT
Tier 1: ( Blockchain 1.0)
• This tier was introduced with the invention of Bitcoin, and it is
primarily used for cryptocurrencies.
• All alternative cryptocurrencies as well as Bitcoin fall into this
category.
• It includes core applications such as payments and applications.
• This generation started in 2009 when Bitcoin was released and ended
in early 2010
Tier 2: Blockchain 2.0:
• This second blockchain generation is used by financial services and
smart contracts.
• This tier includes various financial assets, such as derivatives, options,
swaps, and bonds.
• Applications that go beyond currency, finance, and markets are
incorporated at this tier.
• Ethereum, Hyperledger, and other newer blockchain platforms are
considered part of Blockchain 2.0.
• This generation started when ideas related to using blockchain for
other purposes started to emerge in 2010.
Tier 3: • Blockchain 3.0:
• This third blockchain generation is used to implement applications
beyond the financial services industry and is used in government,
health, media, the arts, and justice.
• Again, as in Blockchain 2.0, Ethereum, Hyperledger, and newer
blockchains with the ability to code smart contracts are considered
part of this blockchain technology tier.
• This generation of blockchain emerged around 2012 when multiple
applications of blockchain technology in different industries were
researched
Tier 4: Blockchain X.0:
• This generation represents a vision of blockchain singularity where
one day there will be a public blockchain service available that
anyone can use just like the Google search engine.
• It will be a public and open distributed ledger with general-purpose
rational agents(Machina Economicus) running on a blockchain,
making decisions, and interacting with other intelligent autonomous
agents on behalf of people, and regulated by code instead of law or
paper contracts.
This does not mean that law and contracts will disappear, instead law
and contracts will be implementable in code.
• Machina Economicus is a concept which comes from the field of
Artificial Intelligence (AI) and computational economics. It can be
defined as a machine that makes logical and perfect decisions.
Consensus

• Consensus is a process of achieving agreement between distrusting nodes on the


final state of data.

• This process of attaining agreement on a common state or value among multiple


nodes despite the failure of some nodes is known as distributed consensus.
Consensus mechanism
A consensus mechanism is a set of steps that are taken by most or all nodes in a
blockchain to agree on a proposed state or value.

There are various requirements for a consensus mechanism such as:


• Agreement: All honest nodes decide on the same value.
• Integrity: This is a requirement that no node can make the decision more than once in a
single consensus cycle.
• Validity: The value agreed upon by all honest nodes must be the same as the initial
value proposed by at least one honest node.
• Fault tolerant: The consensus algorithm should be able to run correctly in the presence
of faulty or malicious nodes (Byzantine nodes).
• Termination: All honest nodes terminate the execution of the consensus process and
eventually reach a decision.
Types of consensus mechanisms
All consensus mechanisms are developed to deal with faults in a
distributed system and to allow distributed systems to reach a final
state of agreement.
There are two general categories of consensus mechanisms:
1. Proof-based consensus mechanisms
2. Traditional fault tolerance-based mechanisms
• Proof-based consensus mechanisms:
This arrangement requires nodes to compete in a leader-election
lottery, and the node that wins proposes the final value.

The algorithm works on the principle of providing proof of some work


and the possession of some authority or tokens to win the right of
proposing the next block.

For example, the PoW mechanism used in Bitcoin falls into this
category, where a miner who solves the computational puzzle as
proof of computational effort expended wins the right to add the
next block to the blockchain.
Traditional fault tolerance-based:
this type of consensus mechanism relies on a simple scheme of nodes
that publish and verify signed messages in a number of phases.

• Eventually, when a certain number of messages are received over a


period of rounds (phases), then an agreement is reached.
In general, there are two types of faults that a node can experience:
• Fail-stop faults:
This type of fault occurs when a node merely has crashed.
Fail-stop faults are the easier ones to deal with. Paxos or the RAFT
protocol are normally used to deal with this type of fault.
• Byzantine faults:
The second type of fault is one where the faulty node exhibits
malicious or inconsistent behavior arbitrarily.
This type is difficult to handle since it can create confusion due to
misleading information.
This can be a result of an attack by adversaries, a software bug, or
data corruption. SMR protocols such as Practical Byzantine Fault
Tolerance (PBFT) was developed to address this second type of faults.
Paxos
• is the most famous of these protocols.
• It was introduced by LeslieLamport in 1989.
• With Paxos, nodes are assigned various roles such as Proposer, Acceptor,
and Learner.
• Nodes or processes are named replicas, and consensus is achieved in the
presence of faulty nodes by an agreement among a majority of nodes.
RAFT
• works by assigning any of three states; that is, Follower, Candidate, or
Leader to the nodes.
• A Leader is elected after a Candidate node receives enough votes, and all
changes then have to go through the Leader.
• The Leader commits the proposed changes once replication on the majority
of the follower nodes is completed.
Consensus in blockchain
Two main categories of consensus mechanisms:
1. Proof-based, leader-election lottery-based, or the Nakamoto consensus
• a leader is elected at random (using an algorithm) and proposes a final
value.
• This category is also referred to as the fully decentralized or permissionless
type of consensus mechanism.
• This type is well used in the Bitcoin and Ethereum blockchain in the form of
a PoW mechanism.
2. Byzantine fault tolerance (BFT)-based
• is a more traditional approach based on rounds of votes.
• This class of consensus is also known as the consortium or permissioned
type of consensus mechanism.
The consensus algorithms
1. Proof of Work (PoW): This type of consensus mechanism relies on proof that
adequate computational resources have been spent before proposing a value for
acceptance by the network.
This scheme is used in Bitcoin, Litecoin, and other cryptocurrency blockchains.
It is successful against any collusion attacks on a blockchain network, such as the
Sybil attack
2. Proof of Stake (PoS): This algorithm works on the idea that a node or user has
an adequate stake in the system; that is, the user has invested enough in the
system so that any malicious attempt by that user would outweigh the benefits
of performing such an attack on the network.
This idea was first introduced by Peercoin, and it is going to be used in the
Ethereum blockchain version called Serenity
Another important concept in PoS is coin age, which is a criterion derived from
the amount of time and number of coins that have not been spent.
3.Delegated Proof of Stake (DPoS):
This is an innovation over standard PoS, whereby each node that has a
stake in the system can delegate the validation of a transaction to other
nodes by voting.
It is used in the BitShares blockchain.
4. Proof of Elapsed Time (PoET):
Introduced by Intel in 2016, PoET uses a Trusted Execution Environment
(TEE) to provide randomness and safety in the leader election process via a
guaranteed wait time.
It requires the Intel SGX (Software Guard Extensions) processor to provide
the security guarantee for it to be secure.
5. Proof of Deposit (PoD):
In this case, nodes that wish to participate in the network have to make a
security deposit before they can mine and propose blocks.
This mechanism is used in the Tendermint blockchain.
6 Proof of Importance (PoI):
PoI not only relies on how large a stake a user has in the system, but
it also monitors the usage and movement of tokens by the user in
order to establish a level of trust and importance.
It used in the NEM coin blockchain.
7. Federated consensus or federated Byzantine consensus:
This mechanism is used in the stellar consensus protocol. Nodes in
this protocol retain a group of publicly-trusted peers and propagate
only those transactions that have been validated by the majority of
trusted nodes.
8. Reputation-based mechanisms:
As the name suggests, a leader is elected by the reputation it has built
over time on the network. It is based on the votes of other members.
9. Practical Byzantine Fault Tolerance (PBFT):
This mechanism achieves SMR(State Machine Replication), which provides
tolerance against Byzantine nodes.

10. Proof of Activity (PoA):


It utilizes a new concept called "Follow the Satoshi."
In this scheme, PoW and PoS are combined together to achieve consensus and a
good level of security.

11. Proof of Capacity (PoC):


This scheme uses hard disk space as a resource to mine the blocks. This is
different from PoW, where CPU resources are used, and is also known as hard
drive mining.
This concept was first introduced in the BurstCoin cryptocurrency.
12.Proof of Storage:
This scheme allows for the outsourcing of storage capacity. This
scheme is based on the concept that a particular piece of data is
probably stored by a node, which serves as a means to participate in
the consensus mechanism.

13. Proof of Authority (PoA):


Validators(participants) are known and have the authority to propose
new blocks.
Commonly used PoA algorithms are Clique and Aura.
CAP theorem and blockchain
The CAP theorem, also known as Brewer's theorem, was introduced
by Eric Brewer in 1998.

In 2002, it was proven as a theorem by Seth Gilbert and Nancy Lynch.

The theorem states that :


any distributed system cannot have consistency, availability, and
partition tolerance simultaneously
• Consistency : is a property that ensures that all nodes in a distributed
system have a single, current, and identical copy of the data.
Consistency is achieved using consensus algorithms in order to
ensure that all nodes have the same copy of the data. This is also
called state machine replication(SMR)

• Availability means that the nodes in the system are up, accessible for
use, and are accepting incoming requests and responding with data
without any failures as and when required.

• Partition tolerance ensures that if a group of nodes is unable to


communicate with other nodes due to network failures, the
distributed system continues to operate correctly.
A Venn diagram is commonly used to visualize the CAP theorem:

Figure 1.11: CAP theorem


The diagram shows that only two properties at a time can be achieved.
Either AP, CA, or CP.
In summary:
1. If we opt for CP (consistency and partition tolerance), we sacrifice
availability.
2. If we opt for AP (availability and partition tolerance), we sacrifice
consistency.
3. If we opt for AC (availability and consistency), we sacrifice partition
tolerance.
Example:
Let's imagine that there is a distributed system with two nodes.
Now, let's apply the three theorem properties on this possible
distributed systems only with two nodes:
• Consistency is achieved if both nodes have the same shared state;
that is, they have the same up-to-date copy of the data.

• Availability is achieved if both nodes are up and running and


responding with the latest copy of data.

• Partition tolerance is achieved if, despite communication failure or


delay between nodes, the network (distributed system) continues to
operate.
CAP Theorem in Block chain
• In blockchains, consistency is sacrificed in favor of availability and
partition tolerance.
• In this scenario, Consistency (C) on the blockchain is not achieved
simultaneously with Partition tolerance (P) and Availability (A), but it
is achieved over time.
• This is called eventual consistency, where consistency is achieved as
a result of validation from multiple nodes over time.
• It means that there can be a temporary disagreement between nodes
on the final state, but it is eventually agreed upon.

• For example, Multiple confirmations of a transaction over time


provide eventual consistency in Bitcoin.

• For this purpose, the process of mining was introduced in Bitcoin.


Distributed systems
Distributed systems are a computing paradigm whereby two or more
nodes work with each other in a coordinated fashion to achieve a
common outcome.
• It is modeled in such a way that end users see it as a single logical
platform. For example, Google's search engine is based on a large
distributed system; however, to a user, it looks like a single, coherent
platform.
• A node can be defined as an individual player in a distributed system.
• All nodes are capable of sending and receiving messages to and from
each other.
• Nodes can be honest, faulty, or malicious, and they have memory and
a processor. A node that exhibits irrational behavior is also known as
a Byzantine node after the Byzantine Generals problem.
The Byzantine Generals problem
• In 1982, a thought experiment was proposed by Lamport et al. in their
research paper, The Byzantine Generals Problem.
• In this problem, a group of army generals who lead different parts of the
Byzantine army is planning to attack or retreat from a city.
• The only way of communicating among them is via a messenger.
• They need to agree to strike at the same time in order to win.
• The issue is that one or more generals might be traitors who could send a
misleading message. Therefore, there is a need for a viable mechanism that
allows for agreement among the generals, even in the presence of the
treacherous ones, so that the attack can still take place at the same time.
• As an analogy for distributed systems, the generals can be considered
honest nodes, the traitors as Byzantine nodes (that is, nodes with arbitrary
behavior), and the messenger can be thought of as a channel of
communication among the generals.
This problem was solved in 1999 by Castro and Liskov who presented
the Practical Byzantine Fault Tolerance (PBFT) algorithm, which
solves the consensus problem in the presence of Byzantine faults in
asynchronous networks by utilizing the state machine
replication(SMR) protocol.
• A small-scale example of a distributed system is shown in the
following diagram.
• This distributed system has six nodes, out of which one (N4) is a
Byzantine node leading to possible data inconsistency. L2 is a link
that is broken or slow, and this can lead to a partition in the network.

Figure 1.3: Design of a distributed system: N4 is a Byzantine node and L2 is broken or a slow network link
• The primary challenge of a distributed system design is the
coordination between nodes and fault tolerance.
• Distributed systems are so challenging to design that a theory known
as the CAP theorem has been proven, which states that a distributed
system cannot have all three of the much-desired properties
simultaneously;i.e, consistency, availability, and partition tolerance.
The history of blockchain and Bitcoin
• Blockchain was introduced with the invention of Bitcoin in 2008. Its practical
implementation then occurred in 2009.
The events that led to blockchain
• 1960s – Invention of computer networks
• 1969 – Development of ARPANET
• 1970s – Early work on secure network communication including public key cryptography
• 1970s – Cryptographic hash functions
• 1973 – Extension of ARPANET to other geographic locations
• 1974 – First internet service provider, Telenet
• 1976 – Diffie–Hellman work on securely exchanging cryptographic keys
• 1978 – Invention of public key cryptography
• 1979 – Invention of Merkle Trees (hashes in a tree structure) by Ralph C. Merkle
• 1980s – Development of TCP/IP
• 1980 – Protocols for public key cryptosystems, Ralph C. Merkle
• 1982 – Blind signatures proposed by David Chaum
• 1982 – The Byzantine Generals Problem (Bitcoin can be considered a solution to the
Byzantine Generals Problem; however, the original intention of the Bitcoin network was
to address the previously unsolved double-spending problem)
• 1985 – Work on elliptic curve cryptography by Neal Koblitz and Victor Miller
• 1991 – Haber and Stornetta work on tamper proofing document timestamps. This can be
considered the earliest idea of a chain of blocks or hash chains
• 1992 – Cynthia Dwork and Moni Naor publish Pricing via Processing or Combatting Junk
Mail. This is considered the first use of Proof of Work (PoW)
• 1993 – Haber, Bayer, and Stornetta upgraded the tamper-proofing of document
timestamps system with Merkle trees
• 1995 – David Chaum's Digicash system (an anonymous electronic cash system) started
to be used in some banks
• 1998 – Bit Gold, a mechanism for decentralized digital currency, invented by Nick
Szabo. It used hash chaining and Byzantine Quorums
• 1999 – Emergence of a file-sharing application mainly used for music sharing, Napster,
which is a P2P network, but was centralized with the use of indexing servers
• 1999 – Development of a secure timestamping service for the Belgian
project TIMESEC
• 2000 – Gnutella file-sharing network, which introduced
decentralization
• 2001 – Emergence of BitTorrent and Distributed Hash Tables (DHTs)
• 2002 – Hashcash by Adam Back
• 2004 – Development of B-Money by Wei Dei using hashcash
• 2004 – Hal Finney, the invention of the reusable PoW system
• 2005 – Prevention of Sybil attacks by using computation puzzles, due
to James Aspneset al.
• 2009 – Bitcoin (first blockchain)
Various Technical definitions of Block chain:
Technical definition: Blockchain is a peer-to-peer, distributed ledger
that is cryptographically secure, append-only, immutable (extremely
hard to change), and updateable only via consensus or agreement
among peers.
• Peer-to-peer(P2P )
This means that there is no central controller in the network, and all
participants (nodes) talk to each other directly.
• Distributed ledger
blockchain is a "distributed ledger," which means that a ledger is
spread across the network among all peers in the network, and each
peer holds a copy of the complete ledger.
• Cryptographically secure
means that cryptography has been used to provide security services
that make this ledger secure against tampering and misuse.
• Append-only
means that data can only be added to the blockchain in
time-sequential order.
This property implies that once data is added to the blockchain, it is
almost impossible to change that data and it can be considered
practically immutable.
• Updatable via consensus
The most critical attribute of a blockchain is that it is updateable only
via consensus. This is what gives it the power of decentralization.
In this scenario, no central authority is in control of updating the
ledger.
Instead, any update made to the blockchain is validated against strict
criteria defined by the blockchain protocol and added to the
blockchain only after a consensus has been reached among all
participating peers/nodes on the network.
To achieve consensus, there are various consensus facilitation
algorithms that ensure all parties agree on the final state of the data
on the blockchain network and resolutely agree upon it to be true.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy