0% found this document useful (0 votes)
30 views5 pages

Blockchain Technology: 1.1. Distributed Systems

The document provides an overview of blockchain technology, focusing on distributed systems and consensus mechanisms. It discusses the challenges of designing distributed systems, including the CAP theorem, Byzantine fault tolerance, and the history of electronic cash leading to the invention of Bitcoin. Key concepts such as consensus algorithms and various consensus mechanisms are also explored, highlighting their importance in achieving agreement among nodes in a decentralized network.

Uploaded by

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

Blockchain Technology: 1.1. Distributed Systems

The document provides an overview of blockchain technology, focusing on distributed systems and consensus mechanisms. It discusses the challenges of designing distributed systems, including the CAP theorem, Byzantine fault tolerance, and the history of electronic cash leading to the invention of Bitcoin. Key concepts such as consensus algorithms and various consensus mechanisms are also explored, highlighting their importance in achieving agreement among nodes in a decentralized network.

Uploaded by

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

BLOCKCHAIN TECHNOLOGY

MODULE 1
1.1. DISTRIBUTED SYSTEMS
 Precisely it is a decentralized distributed system.
 Distributed systems are a computing paradigm whereby two or more nodes work with each other in a
coordinated fashion in order to achieve a common outcome and it's modelled in such a way that end
users see it as a single logical 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 have their own memory and processor.
 A node that can exhibit arbitrary behaviour is also known as a Byzantine node.
 Generally, any unexpected behaviour of a node on the network can be categorized as Byzantine.
 This term arbitrarily encompasses any behaviour that is unexpected or malicious:

 Design of a distributed system; N4 is a Byzantine node, L2 is broken or a slow network link


 The main challenge in distributed system design is coordination between nodes and fault tolerance.
 Even if some of the nodes become faulty or network links break, the distributed system should tolerate
this and should continue to work flawlessly in order to achieve the desired result.
 This has been an area of active research for many years and several algorithms and mechanisms has
been proposed to overcome these issues.
 Distributed systems are so challenging to design that a theorem known as the CAP theorem has been
proved and states that a distributed system cannot have all much desired properties simultaneously.

CAP theorem
 This is also known as Brewer's theorem.
 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 latest copy of
data
 Availability means that the system is up, accessible for use, and is accepting incoming requests and
responding with data without any failures as and when required
 Partition tolerance ensures that if a group of nodes fails the distributed system still continues to
operate correctly
 It has been proven that a distributed system cannot have all the afore mentioned three properties at
the same time.
 In order to achieve fault tolerance, replication is used.
 This is a common and widely used method to achieve fault tolerance.
 Consistency is achieved using consensus algorithms to ensure that all nodes have the same copy of
data.
 This is also called state machine replication.
 Blockchain is basically a method to achieve state machine replication.
 In general there are two types of fault that a node can experience: where a faulty node has simply
crashed and where the faulty node can exhibit malicious or inconsistent behavior arbitrarily.
 This is the type which is difficult to deal with since it can cause confusion due to misleading
information.
Byzantine Generals problem
 Before discussing consensus in distributed systems, events in history are presented that are precursors
to the development of successful and practical consensus mechanisms.
 In September 1962, Paul Baran introduced the idea of cryptographic signatures with his paper On
distributed communications networks. This is the paper where the concept of decentralized networks
was also introduced for the very first time. Then in 1982 a thought experiment was proposed
by Lamport et al. whereby a group of army generals who are leading different parts of the Byzantine
army are planning to attack or retreat from a city. The only way of communication between them is a
messenger and they need to agree to attack at the same time in order to win. The issue is that one or
more generals can be traitors and can communicate a misleading message. Therefore there is a need
to find a viable mechanism that allows agreement between generals even in the presence of
treacherous generals so that the attack can still take place at the same time. As an analogy with
distributed systems, generals can be considered as nodes, traitors can be considered Byzantine
(malicious) nodes, and the messenger can be thought of as a channel of communication between the
generals.
 This problem was solved in 1999 by Castro and Liskov who presented the Practical Byzantine Fault
Tolerance (PBFT) algorithm. Later on in 2009, the first practical implementation was made with the
invention of bitcoin where the Proof of Work (PoW) algorithm was developed as a mechanism to
achieve consensus.
Consensus
 Consensus is a process of agreement between distrusting nodes on a final state of data.
 In order to achieve consensus different algorithms can be used.
 It is easy to reach an agreement between two nodes (for example in client-server systems) but when
multiple nodes are participating in a distributed system and they need to agree on a single value it
becomes very difficult to achieve consensus.
 This concept of achieving consensus between multiple nodes is known as distributed consensus.
Consensus mechanisms
 A consensus mechanism is a set of steps that are taken by all, or most, nodes in order to agree on a
proposed state or value.
 For more than three decades this concept has been researched by computer scientists in the industry
and Academia.
 Consensus mechanisms have recently come into the limelight and gained much popularity with the
advent of bitcoin and blockchain.
 There are various requirements which must be met in order to provide the desired results in a
consensus mechanism.
 The following are their requirements with brief descriptions:

 Agreement: All honest nodes decide on the same value.

 Termination: All honest nodes terminate execution of the consensus process and eventually reach a
decision.

 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 in the presence of faulty or malicious
nodes (Byzantine nodes).

 Integrity: This is a requirement where by no node makes the decision more than once. The nodes
make decisions only once in a single consensus cycle.

Types of consensus mechanism


 There are various types of consensus mechanism; some common types are described as follows:

 Byzantine fault tolerance-based: With no compute intensive operations such as partial hash inversion,
this method relies on a simple scheme of nodes that are publishing signed messages. Eventually, when
a certain number of messages are received, then an agreement is reached.

 Leader-based consensus mechanisms: This type of mechanism requires nodes to compete for
the leader-election lottery and the node that wins it proposes a final value.

 Many practical implementations have been proposed such as Paxos, the most famous protocol
introduced by Leslie Lamport in 1989.
 In 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
agreement among a majority of nodes.
 Another alternative to Paxos is RAFT, which 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 now have to go
through the Leader, who commits the proposed changes once replication on the majority of follower
nodes is completed.

1.2. THE HISTORY OF BLOCKCHAIN:


 Blockchain was introduced with the invention of bitcoin in 2008 and then with its practical
implementation in 2009.
 The concept of electronic cash or digital currency is not new.
 Since the 1980s, e-cash protocols have existed that are based on a model proposed by David Chaum.
Electronic cash
 Just as understanding the concepts of distributed systems is necessary in order to understand
blockchain technology, the idea of electronic cash is also essential to appreciate the first and
astonishingly successful application of blockchain: the bitcoin, or broadly cryptocurrencies.
 Theoretical concepts in distributed systems such as consensus algorithms provided the basis of the
practical implementation of Proof of Work algorithms in bitcoin; moreover, ideas from different
electronic cash schemes also paved the way for the invention of cryptocurrencies, specifically bitcoin.
 In this section, the reader will be introduced to the idea of electronic cash and then various other
concepts that existed before cryptocurrencies that led to the development of bitcoin are presented.
The concept of electronic cash
 Fundamental issues that need to be addressed in e-cash systems are accountability and anonymity.
 David Chaum addressed both of these issues in his seminal paper in 1984 by introducing two
cryptographic operations, namely blind signatures and secret sharing.
 These terminologies and related concepts will be discussed in detail in Chapter 3, Cryptography and
Technical Foundations.
 At the moment, it is sufficient to say that blind signatures allow signing a document without actually
seeing it and secret sharing is a concept that allows the detection of using the same e-cash token twice
(double spending).
 After this other protocols emerged such as Chaum, Fiat, and Naor (CFN), e-cash schemes that
introduced anonymity and double spending detection.
 Brand's e-cash is another system that improved on CFN, made it more efficient, and introduced the
concept of security reduction to prove statements about the e-cash scheme.
 Security reduction is a technique used in cryptography to prove that a certain algorithm is secure by
using another problem as a comparison.
 Put another way, a cryptographic security algorithm is as hard to break as some other hard problem;
thus by comparison it can be deduced that the cryptographic security algorithm is secure too.
 A different but relevant concept called hashcash was introduced by Adam Back in 1997 as a PoW
system to control e-mail spam.
 The idea is quite simple: if legitimate users want to send e-mails then they are required to compute a
hash as a proof that they have spent a reasonable amount of computing resources before sending the
e-mail.
 Generating hashcash is a compute intensive process but does not inhibit a legitimate user from
sending the e-mail because the usual number of e-mails required to be sent by a legitimate user is
presumably quite low.
 On the other hand, if a spammer wants to send e-mails, usually thousands in number, then it becomes
infeasible to compute hashcash for all e-mails, thus making the spamming effort expensive; as a result
this mechanism can be used to thwart e-mail spamming.
 Hashcash takes a considerable amount of computing resources to compute but is easy and quick to
verify.
 Verification is performed by the user who receives the e-mail.
 Hashcash is popularized by its use in the bitcoin mining process.
 This idea of using computational puzzles or pricing functions to prevent e-mail spam was introduced
originally in 1992 by Cynthia Dwork and Moni Naor.
 Pricing function was the name given to the hard functions that are required to be computed before
access to a resource can be granted.
 Later, Adam Back invented hashcash independently in 1997, which introduced the usage of computing
hash functions as PoW.
 In 1998 b-money was introduced by Wei Dai and proposed the idea of creating money via solving
computational puzzles such as hashcash.
 It's based on a peer-to-peer network where each node maintains its own list of transactions.
 Another similar idea by Nick Szabo called BitGold was introduced in 2005 and also proposed solving
computational puzzles to mint digital currency.
 In 2005 Hal Finney introduced the concept of cryptographic currency by combining ideas from b-
money and hashcash puzzles but it still relied on a centralized trusted authority.
 There were multiple issues with the schemes described in infeasible preceding paragraphs.
 These problems range from no clear solution of disagreements between nodes to reliance on a central
trusted third party and trusted timestamping.
 In 2009 the first practical implementation of a cryptocurrency named bitcoin was introduced; for the
very first time it solved the problem of distributed consensus in a trustless network.
 It uses public key cryptography with hashcash as PoW to provide a secure, controlled, and
decentralized method of minting digital currency.
 The key innovation is the idea of an ordered list of blocks composed of transactions and
cryptographically secured by the PoW mechanism.
 Looking at all the aforementioned technologies and their history, it is easy to see how ideas and
concepts from electronic cash schemes and distributed systems were combined together to invent
bitcoin and what now is known as blockchain.
 This can also be visualized with the help of the following diagram:

 The various ideas that helped with the invention of bitcoin and blockchain.

You might also like