Blockchain Technologies F-CSIT358-B.pdf this is saple

malikmeeranaik 0 views 133 slides Oct 15, 2025
Slide 1
Slide 1 of 133
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33
Slide 34
34
Slide 35
35
Slide 36
36
Slide 37
37
Slide 38
38
Slide 39
39
Slide 40
40
Slide 41
41
Slide 42
42
Slide 43
43
Slide 44
44
Slide 45
45
Slide 46
46
Slide 47
47
Slide 48
48
Slide 49
49
Slide 50
50
Slide 51
51
Slide 52
52
Slide 53
53
Slide 54
54
Slide 55
55
Slide 56
56
Slide 57
57
Slide 58
58
Slide 59
59
Slide 60
60
Slide 61
61
Slide 62
62
Slide 63
63
Slide 64
64
Slide 65
65
Slide 66
66
Slide 67
67
Slide 68
68
Slide 69
69
Slide 70
70
Slide 71
71
Slide 72
72
Slide 73
73
Slide 74
74
Slide 75
75
Slide 76
76
Slide 77
77
Slide 78
78
Slide 79
79
Slide 80
80
Slide 81
81
Slide 82
82
Slide 83
83
Slide 84
84
Slide 85
85
Slide 86
86
Slide 87
87
Slide 88
88
Slide 89
89
Slide 90
90
Slide 91
91
Slide 92
92
Slide 93
93
Slide 94
94
Slide 95
95
Slide 96
96
Slide 97
97
Slide 98
98
Slide 99
99
Slide 100
100
Slide 101
101
Slide 102
102
Slide 103
103
Slide 104
104
Slide 105
105
Slide 106
106
Slide 107
107
Slide 108
108
Slide 109
109
Slide 110
110
Slide 111
111
Slide 112
112
Slide 113
113
Slide 114
114
Slide 115
115
Slide 116
116
Slide 117
117
Slide 118
118
Slide 119
119
Slide 120
120
Slide 121
121
Slide 122
122
Slide 123
123
Slide 124
124
Slide 125
125
Slide 126
126
Slide 127
127
Slide 128
128
Slide 129
129
Slide 130
130
Slide 131
131
Slide 132
132
Slide 133
133

About This Presentation

This is sample documentation


Slide Content

wo?
Blackeh nisin

IR DEL or
dan a en

Blockchain Technologies

AMI’ DIRECTORATE OF DISTANCE &
OAMITY ONLINE EDUCATION

(© Amity Univers Press

‘All Rigs Reserved
No parts of his publication may be reproduced, stored in a retrieval system cr transmite
in any form oc by any means, electronic. mechanical, photocopying recording er thorwise
Without he pre permission ofthe publisher.

SLM & Leaming Resources Committee

Chairman Prof Adina Kumar

Members Dr. Divya Bansal
Dr Coral] Baboza
Dr. Monica Rose

Dr Winnie Sharma

Menter Sert : Ma. Rita Naskar

Fed y Any Un Pres or ease wr of Any Dr af Ds and One ce
ay Ue Ni DD

11

12

21

22

Page ho.

Introduction to Blockehain o

Basic of Blockchain

144
112
113
114
115
116
147
118

Introduction to Blockchan
Distributed Database

‘Two General Problem

‘Byzantine General Problem and Faut Tolerance
Hadoop Distributed Fl System

Distributed Hash Table

ASIC Resistance

Turing Complete

‘cryptosrapy in Blockcain

121
122
123
124
125
126
127

Introduction to eyptography
Benefts of Cryptography in Blockchain
Types of Cryptography in Blockchain
Hash Funcion

Digital Signature ECDSA

Memory Hard Algrahm

Zero Knowledge Proof

1 Block Chain Technology so

Overview of Biens

211
212
213
214
215
216
247
218

introduction to Blockehae Systems
Advantage Over Converional Distributed Database
locken Network

Mining chant

Diaruted Consensus

Merkle Pat Tres

Gas Lint

“ransvetions and Fee

Blockchain Systems

224
222
223
224
225
226

Anonymity
Reward

Chan Poly

{te of Blockchan Appleton
‘Soft and Hard Fork

Private and Public Blockchain

32

42

51

ln Distributed Consensus
Overview of Consensus Mecharism in Distributed Systems
3.14 Dentin of Consensus Mechanism

312 Features of Consensus Mechanism

313 WaystoAchivingt
314 Applcatons of Distibuted Consensus.
Consensus Mechanisms

321 Nakamoto Consensus

322 Proof of Werk

323 Proof of Stake

324 Proof of Bum

325 Difeuty Level

320 Syaiatack

327 Energy Ulisaon and Alternate

Consensus Mechanism

IV Cryptocurency and Cryptocurrency Regulations
Aspects of Coptocutency

411 History Overview and Features of Cryptocurency
412 Distributed Ledger

413 Bieon Protocol Mining Strategy and Rewards

414 Eihereum - Construction

415 DO
418 Smart Contract

417 GHOST

448 Sidechain

419 Namecoin Stakeholders

Ccryptocurency Regulations

421 Root of Bteoin
422 Legal Aspects -Cryptocurency Exchange
423 Black Market and Global Economy

Ve Blockehain Applications
Blockesain in Healthcare and 1OT
511 imemet of Things

512 Heatheare

513 Domain Name Sense
544 Personal dently Sacurty
515 Logialcs

518 Money Transfer

517 Smart Contracts

518 Case Susy

#0

m

25

Module -

: Introduction to Blockchain
Notes

Learning Objectives:
[At the end ofthis topic, you will be able 1:

+ Inferthe basics ofblckehain
+ Define the concept ofHadocp distributed fle system
+ > Understand the basics of Cryptography |
‘Define the various funcions in Cryptography

Introduction

Welcome to the Blockchain word. Blockchain is expected to achieve for
transactions what the Interne os fr infomation. That is o say, £ provides fer
‘enhanced trust and effeieney in pracicaly every transaction. Blochaln has the
potential to fundamentally ater he way the world operates. If youve ever purchased a
ome, youve probably had to sign a large stack of paperwork fom a variety of partes
in order to complete the transaction. If youve ever had to register a veil, you know
how aggravating ican be. went even begin to describe how cult may boo keep
track of your medial documents,

Elockchan, which is most simply characterised as a share, unchangeable ledger.
has the potential to revoslnise those and other operatons. To be clea, Im net
‘refering to oi when say bockcham. Im refering tothe digital basis tt underpins
applcticns Ike icon, Bockchan, onthe ether hand, has far-reaching implcatons
nat go far beyond bacon.

44 Basics of Blockchain

Blockehn isa shared, immutable ledger that actes the process of recording
lwansactons and tacking asset in a business network. An asset can be tangle
(a house, car, cash, land) or intangible (ntlectual property, patents, copytighs.
branding). Vitualy anything of value can be tacked and traded on a bleckchan
network reducing ick and ung costs forall involved

Business runs on information, The aster i's received and the more accurate 4
ls, th better. Blckchain is ideal fr delvering that infomation because it provides
Immediate, shared and completely transparent information stored on an immutabl
ledger that can be accessed only by pemissoned network members. A bockchain
network can track orders, payments, accounts, production and much more. And because
members share a single view ofthe th, you can see al deal ofa transaction end to
‘end. hing you greater confidence, as wel as new efíciencies and opportunities.

1.1. Introduction to Blockchain

Pleckohan is a decentralised, shared ledger that makes & easier to record
lransastions and rack asses in a corporate network. tangible asset, such as a house
a, cash, land, or an intangible set sch as electa! property, such as patents,

2 leche Testi

copyrights, or branding, are examples of assets. On a blockchain network, vitualy
Notes Anything of value can be recorded and traded, lowering risk and eating coste fora
partes involved.

In November 2008, the concept of a blocichain was originaly proposed. À
‘wtepaper on à digtal payment system named Btcoin was publshed by the person
or entity known only by the pseudonym Satoshi Nakameto. In 2006. the system
‘was indaled and launched for the Ars time, introducing a filly functional and
distributed ledger. Bon I but on a peertopeer (P2P) network that synchronises
all transatons en a single public ledger As a resul, every network pacpant has.
access to the whole transaction history. Transactions can ony be wrtan or updated by
utherised partspants hanks tothe use of safe cnptogrephy techn gues,

Bicoln efectivo incomorated prior centbutions from decades of research. and
most crucial, soVed several base chalenges in a smart and practical manner. o
the world of computer stience,blocehain technology ls til a rlalvely new method.
It isa new technology thats current being researched and evaluated fra variety of
application and use scenarios,

Since we early 18808, the concept of totaly ditibuted meney has been
detussed,A ange organisation does ne conte or operate distributed money. should
{uly eliminate intermediaries such as banks, allowing only a payment sender and
receiver to transfer ownership rights. tempts to construct distributed currencies in the
past have always fled because they al rely on a ru model wth a central authority
that provides a clearinghouse service for transaction verkcalen and ownership
record organisation.

As a resul, such authoties have complete contre over the infermaton held on
centralised ledgers. The concept ofa fly dsbuted ledger was introduced to tackle
this problem. The power to contol the sored data should nat be vested in a single
or exchsively designated group of autores. The concept of distibuted storage
of transaction data in redundant ledger copies is refered to as Distrbuted Ledger
"echncogy (LT) The data distribution a welAnoun and sed issue. The task and
purpose ist obtain agreement on all strbuted data copes.

A blockahain is a new way of mplementng a atrbuted ledger. Unt the debut

con, however, al temps to construct a completely dtrbuted cureney were

| doomed to fa due to a fundamental unsolvable problem. The rik of twice spending
cote was a problem for disrbuted curencies, Because dial copies are easy lo

| make, a single sender might send the same cain o tuo or more ilerent reciente at
‘the same time.

For distributed eurenies, he so-called “double spending" problem sa significant
change. Satoshi Nakamoto proposed a sltion to this challenge wäh the publishing
of Btcoin in 2008. The concept desanbed bythe werd blockchan fhe central strategy
of this solution, By specthing a chronological order of al transactions, a blockchain
overcomes the problem of dublespending tw or mee transactions are fund to be
in confit, only the frst Is approved, and the thers ae deleted. Asa recu, one might
think ofa blockchain system ae a databued timestamp server. This nation als fr a
ge ledger tobe used as a single source of uth n a decentralised P2P sytem, the
problem isto reach a consensus onthe satus ofthe ledger among al pacpant,

lech Tercios 3

The Gyzantine Generals Dilemma has the same chalenges as the dovble-
‘spending problem (BGP). The BGP addresses the issue of reaching mutual agreement Notes
‘on à consistent sate fr distbuted data. The dificuty of diferent spalaly perse

‘generals besieging a ety and tying to agree on the ideal moment for an ack is
described in te famous analogy. I a challenge of communication, coordi

and synetvnisation.

A practical soon to this problem is far rom simple, especial in the presence of
‘sesh ev individuals, such as a general acting as a trite, reduce the concept of
eng mechanism as one way o handle this challenge in a decentralised cortex. by
theory ifthe majoriy of peers are honest. a veing etwerk of peers can reach a tue
and consistent nebwerk tate. As à resul, election can lead to avai ledger sat, Lo.
‘systemwide consensus.

‘There are no problems ifthe paricparts tust one ther and can communicate
‘recy, A remote veting mechanism, on the ether hand, introduces weaknesses
and is vulnerable to a variety of stack vectors. As ong as the term n 2 31 + 1 is
satisfed, Ihe BGP reaches consensus under the premise of syncroncle and reliable
‘communication The original problem description describes n physi ita: generals
tempting to agree on abate strategy via messengers. Ftatrs, o tr other hand
aim to sabotage the deal wth fn. As lng as he number of mallious participants is
less than one-hird of al patipats, a decenvalsed system can tolerate falures (or
trator). Byzantine Faut Tolerant systems are those thet are resistant to byzartine
{ales (BF.

From a practical standpoint, Nakamct's beckehain archtecture masters the BGP
and sks a balance between feasbilly and security, Bteoin's ambitious design alows
{or an increased BFT ofn 2 21+1.As a resul, te proportion of malevolent paripants
as rien rom less than a thi to less than half fal paicparts. As a resi, icon
‘serves as a practical example ofthe theoretical assumption of consensus networks
based on a majerty vote The neerk wl have a quorum and fraly tn consensus
51 percent of all wansaclon valdaters are honest, Btcoln, or more precisely,
the Nakamoto consensus process that runs on marked watershed moment m
practical decetralsatin

A blockehain can be charactoised as an immáable ledger for recording
transactions ha is mainte inside a datrbuted network of mutualy unrusing peers
on a technical level. A copy of te edger is kept by each peer. To valdate transactions,
organise them into Blocks, and bul a hash chain over the blocks, the peers use a
‘consenaus mechani. Ths procedure creates the ledge by arranging the transactons
In the order required fer consistency. Ban (ip bin or) pioneered bleckchann
technology. whichis widely regarded as a promising technlogy for running reliable
ital exchanges,

A Btcoinblockchain is public, er pemissoness nthe sense that anyone can jon
without revealing the ideniy. The consensus protocol fr such Bleckchansis usualy
‘based cn prof of work (PoW) and economic incentives. Pemissioned bleckchains,
‘on the other hand, have emerged as a new technique to run ablockchain between a
group of knoun,identífable members. A permissoned bickchan secures interactions
between a st of ents that have a common im but do nat ente trust one another.
“such as fms that exchange dolar, gods, r information. A permissioned bleckehan

‘4 ere Teclas

is one that is based on the iderites of is peers and may thus use Ihe radical
Notes Byzartinefautolerant (BFT) consensus. BFT is a methodology fer reacting an
agreement about the ate of malunctoring noes in a network that has been widely
‘lied in IT solutions. This protocol is based on the Byzantine Generals Pretiem, m
“which a group of generals must agree ona strategy yet one ofthem could be a ar.

ihereum (htp/fehereum org isan example of how blockchans can execute
arbitrary. programmable transaction logic in the frm of smart cenrats. cc scripts
were the forerunners of this nein. À smart contract i$ a tuswarhy,lstibued
application that derives its securty rom the blockchaln and undering peer consensus.

For businesses wishing to use the bleckchain plat, alitinguising permits
‘tom a permissionlessblockehain is cial. The use case determines the technology.
to be used. which is influenced by consensus systems, governance model, data
structure, and cher factors, We can perform some ofthe things we present do with
pemissened blockchans, but in a marginaly better way, which can be substantia
In the dagram below, you can see how a group of banks may wise Hypertedger, a
Dermissioned blockchain, to clear and sale thor transactions wihou ring on a
central clearinghouse:

ao, 84
DT,

Because banks do not fly trust each cher, dearng houses were created

Lo act az an intermediary between trades, rcucing the risk that one party wll not

‘honour his terms. This chapter wil not address the debate over pomisioned versus
pemissintess bleckehains, but bleckchain can present a way to ether transform or

| let eurer business and business models, Permisioned beckham archtecures.
are uses inthe majority ol use cases in regulated businesses

Visio pemisiriess lockchains provide a foundation for new business
models such as peertopeer (P2P) transactions and dsimemedatoried models,
Ppemissionless blockehan architecture by detntion reles on a very computation.
intensive compite modelo ensure transaction inti, Regardless ofthe blocichain
archtecure chosen, he technelogy offers numercus oppertuniies fr transformation
and dsuptin

As a technology platform, blockehn has enomous promise, Blockehain
can provide:

A design strategy that Keeps transaction daa, value, and state natural near
ote business logic inthe fm

lech Tercios s

‘Secure execution of business transactions, cated by a communiy, va a
secure procedure that supports the trust and transaction processing that are. Notes
fundamental to bIoekchain.

Apermisioned, atemaive technology that comples with existing resticons
‘racing Blockchair's Origin

You can gain a deeper understanding of blockchain by explering the contes in
‘which & was developed — the need fr an efclert,costfectve, reliable, and secure
system for conducting and recording fnancal transactions. |

‘The Shortcomings of Current Transaction Systems

‘Throughout history, tools of st have arisen to enable the exchange of valve and
‘safeguard buyers and sellers, such as coined cons, paper money, lees of crest
and banking systems. Telephone Ines, cre card systems, the Item, and able
tecinloges have al enhanced ransachen convenience, speed, and eficancy while
lowering, andin some cases ital eliminating, the distance between buyers aná slr.

The complextis, rss, Ineicences, and costs of present ransacicn systems
vin undoubtedly Increase as trancaion volumes grow rapidy over the word. The
development ol vansacton volumes has been spured by he growth o ecommerce,
‘online banking, and inapp purchases, as we a the increasing mehlty of individuals
around the wor. And withthe growth ofthe Internet of Things (OT) — autonomous
Items tke refigerators that buy groceries when suppkes run low and automobiles that
ing themselves to your house, stepping or gas along the way — transaction volumes
wil skyrocket

To overcome these and ther issues, the we need rapid payment neto
with a mechanism that establishes confidence doesnot require specialised equipment.
oes na have chargebacks or monthly fees, and provides a communal bookkeeping
‘salto fr maintaining transparency and tus

In the intenet of Things (IST). Bloschsin (BC) is revoluonary technology that
uses a decentalsed, dstbuted, publ, and reakime ledger to hold transactions
between IT nodes. A blockchain is à collection of Blocks, each of which inked to
the ones before A. The enplograpiv hash code, previous Mock hash, and data are at
included in each lock. The haie unis lts to transpa data between IT nodes m
BC are transactions. IT nodes ar a vañety of physical yet smart devices that have
‘embedded sensors, acuatrs and programmes, as well a the aby to communicate
vith ter oT nodes

The role of SC in the Internet of Things is to provide a method for securely
processing data records though loT nodes. BC is a safe and open technology that
may be used by anyone. This type of tecnalegy is requires fr lo to facitate safe
‘communication across loT nodes in a heterogeneous envrorment. Anyone who is
‘uihentiated to communicate within the loT could rack and inesgate the vansactons
in BC. The use of BC in he Intemet of Things could help to increase communication
seu. In ie work, looked into ths approach, ts benefits and drawbacks,

‘The Itemet of Things (oT) is growing at an exponential rat, induding 56
technologies such as Smart Homes and Cites, e Heat, distributed intligence, and

Soon, yet faces security and pvacy issues. The Inemet of Things devices are linked
Notes in a decentralised manner. As a resul, using normal existing securty measures in LT.
node cemmuricaton is quite deut

The BC is a mechanism that ensures the secunty of loT device transacions. À
provides a decentralised, cstibed, and pubiy accessible shared ledger for sting
the data of processed and validated lock in an OT network. Using a peer-to-peer
archtecture, the data in the pubic ledgerishandled automatically,

‘The BC is a mechani that allows OT nodes to send transactions in the form of
13 block The blocks are connected, and each device retain its former device address,
‘The blockchain and IT work together inthe LOT and Cloud tegration architecture, Te
BC wil transtorno communication nthe tur.

Disruptive innovations have emerged in several induties as a resu of the gal
age in recent years, Media, telecormunicatons, an commerce are al examples.
‘These innovations create new markets and dratcaly aer existing ones. As a os,
they nave à large socal impact, similar o what mass produchen of automebies had
Previously. They begin wih weak signals that are frequenty ignored by established
markt leaders, culminate in a dramatialy atered market sueur, and have a far
broader impact than antcated in thee early years. New teemnoogies, such as the
invention of he steam engine, mass production machines, and the Intemet, are en
the catalysts for dsnpive innovations.

4.4.2 Distributed Database

Disiuted databace management systems (DDBMS) have sisted since
‘the 10005. To understand the potential of Blockchain technology. i is essential to
understand the vale sd over preexisting systems.

Diarbuted databases sore data across a common network rather than at a
centralzedlocaon. Vth the development of he Internet in the nineties, businesses
needed soluons thet coud process huge amounts of stuctred and unstucured data
‘which could scale across networks. DDEMS sde this problem though consensus
mechanisms such as Paxos or Raf which contol readhwnte pemisions and estab
secure cormuniaion channels among partcpants. Common applications of this
technology include NoSOL, NewSOL, and Hadoop databases, Gut these protocols
assume that each partpant cooperates in good fh which ims Ihr application to
Private networks under a cenvalizedauthory here paricpants can be rue,

Distributed Ledgers (DL) are Ike DOSMS proocos in that they maintain a
| consensus about the existence and satus of a shared set of fats bu they do nat rely

on ths assumption of good fal» They achieve this by leveraging strong enplography
to decentralze authonty They are diferent rom generic dstrbuted databases in two
‘fundamental ways:

1. The conrlofthereadhrite access is truly decentralized (whereas, it remains
Logcaly centralized for distributed databases) and

2, The integrity ofthe data can be assured in adversarial environments without
emplosing trusted Ic partes (whereas, dsrbited databases ey on rusted
aminas)

lech Tercios 7

Blcckohan, Distributed database. These terms are ofen used carelesay and
more ofen than not, incorrect. Bah blockchains and dlstibuted databases have a Notes
‘Siar goal of maintaining a consistent copy of a paar dataset across a numberof

‘nodes Maintaining consensus onthe data that stored, as wel as keeping redundant
copies ofthis dataset, are the major similares between the technologies.

(On the surface ther ndamental technology is quie similar, but that's as deep as
A goes Similar doesnot mean interchangeable.

This folowing secton wit explore the nuanced dierences between blockchal |
and distributed databases by focusing on three important aspects: intnsc nature, cere
‘value propestion and storage technology

‘The aiterences in nature

4. Centralized vs decentralized management

Pubic Diockehains are a colabortve creation, with ther utimats goal being
to crete a word that is completely decentaized, and where the ownership of dial
assets I protected and transferable at al mes. On the other hand, distributed
‘databases ae cetraly managed by serdoe provider Tei goal o create a logica!
‘center, that can provide effin, low cost services with great scab

2. Tiles

Both technologies face technical temas, which is refering to the duty
of optimizing a technology while Balancing traces. Far example, the blcckchan
emma is concurrently achieving igh security, decetralzaion and sels},

Le is easier to achieve high security and salbity by sacificing decentralization
Distibuted databases face a fundamertaty diferent set of issues. As a senice
provider, DD managers must consider bushes supper, engineering implementation
ompleity and evolving hardware requirements.

3. Consensus mechanisms:

Blockchain systems atempt 1a solve the Byzantine Generals Problem with clever
algorithms, thereby becoming Byzantine Faut Tolerant, or BFT. In shot, this is how
Dlockehains reach verifiable decentaized consensus, even wäh malkius nodes, The
most commonly used consensus alerts Proof of Wor/Prof of Stake (probabity
based alorthms) and Practical BFT (eteminisc algothms). The consensus generated
based on the probably clase of POWPOS algorthms ie temporary. meaning & can
reurten. As time goes by and addona Blocks are ded tothe chain, the probably
‘of overturning the previous blocks become smaller, approaching zero. Byzantine fau.
tolerant alorime often have por pertomance, witha low tolerance of 19 fay nodes
PBFT determine algorthms are imeversble ance consensus is reached. That is, the
‘consenausrett wil avays be fl

Disbuted database systems rarely have to soe the Byzanine Generals
Problem, since there is a central pont of contol that cocránates the whe sytem, but
have t consider system fares. Mainstream algorithms used by DDs include Pasos
land Ra. These fauittleant algorithms tend to perform better and process faster, and
{erate faulty nodes that donot exceed over 172 ofthe network

a leche Testi

‘The dtference in value propositions
Notes
The core value of blockchain technology is nal to provide rudimentary data

services (he the decetralized database), but to bu a new ecosystem of dices
data assets and automated trust senáces. The global blockchin updates & ate
autonomously, and data is waceabletoits source.

On the other hand, the core value of dstibuted database is to provide data
storage and access services to business systems. Th database i designed to provide
peratonabsuppor mainly for business products and development projets, wi Ihe
data being stored wi a focus on supporting analysis and retrieval

1.1.3 Two General Problem

‘Blockchain is quchy rising to the top ofthe ist of dstbted ledger technologies.
In contrast to a tributed ledger, which is a consensus of egal data that has been
replicated. shared, and synced, blockchain uses a series of interconnected blocks to
successtly ofr a secure distributed consensus,

According o a reprt by a UK research orgarisation, more than half othe wars
large frms are considering instaling blockchai, even though blckchain is only ane of
the data formats deemed to e a disti2a0 ledge.

‘The most fascinating infermaton | discovered when researching bleckchaln was
related to Byzantine fault iclerance (SFT). The fat that Hockchain has a high BFT was
itskey benef

The characteris of a system that tleates the Byzantine Generals problem
class of ales, which ie regarded asthe most chatenging class of fallures, ae known
as BFT. Any Byzantne fire has the unseting characteristic of presening many
symptoms to various viewers

‘The actons of group of generale in contr of various dusions ofthe Byzantine
amy are (rar desenbed in the account. The army ls now dvded ito several
postions and has surounded the ct they intended to atack, These generals wart to
devise an offensive strategy forthe cy

The generals must simply decide whether to attack or retreat and wansmit this
| word a thai messengers because they are physical slated from one ancther and

thai amy group. While some may choose to assaut and some riet, the main point
| isto reach an agreement

The presence of betraying generals makes the situation more deu there
are seven generals, twee may pass the message to attack, the fllowng three may
support retreat, and the seventh general may send messages to one haf of the squad
tovthéraw andthe oe hate assaut. Moreover, messengers themselves have been
known t lose messages.

lt would have a devastating outcome. tis posse to accomplish byzantine faut
tolerance the dependable (nonfat) generals agree on he same course of action

This consensus resute in the block chain, Blockchains are resistant to data
manipulation by design, and ence à block has been receded, cannot be changed

lech Tercios °

without also changing al subsequent blocks. a bad” block is created, it might do so
{fora time before being rejected bythe major. Notes

1.1.4 Byzantine General Problem and Fault Tolerance

‘The Byzantine Generals Problem was created in 1982 by Marshall Pease, Robert
‘Shostak, and Lesle Lampert. An impossibity finding forthe Byzantine Generals
Problem indicates that a scuton has not et been found fr the issue and alo claritos
the Sgnifcanee of lockchan. is esseníaly a game theory problem that deserbes
how Mc is for dspersed pares to come lo a consensus when thee are no |
rolable ental partes,

‘The Byzantine Generals Problem is a wellánoun puzzle in wich the
Byzantine amy is divided ito numerous battalions, each of which is
‘commanded by a diferent general

The generals communicate by messenger to decide an a common course of
action in which al bata wok together and launch smutaneous stacks
‘fom al drecions in order tobe succes

rates wil Iely attempt to thwart ther goal by intercepting or tering
the transmissions.

This challenges goal is or al of the loyal commanders to come to an
agreement without iterterence om the imposters

‘Money and Byzan

Inthe beginning, precious metals and rare goods ware chosen as money because
their value was seen equaly throughout the society, but in some cases, such as with
precious metas, the put ofthe meals could not be know for sure or checking the
puny was an incredibly laborious task, Monay ie one of those commodities whose
‘value shouldbe he same throughout the society, that, everyone should agree upon
the value ofa certain amount of money, despte all the ierences

1 General's Problem

But as ime wert on, became clear that nose central parie, no mater how
competent they were, were sl ot enel retable ice lt was so easy fr them to
fatty the data

‘Te Byzantine Generals dma, which demands that u be verified in an
explaty wansparen fashion, isnot addressed by centralised systems since
they provide no transparency. rating the isk of data tampering,

‘Tey chcove to ignore the issue Italy and forego transparency In order to
achieve effeency quil.
The fundamental problem with centralised systems, however, I that they
aro susceptible to being tainted by the central authaiy. which implies that
anyone who has access tothe database Rel can manipuate the data. This is
because centralized systems concentrate all utherty inthe hands of à single
entra decision maker

In rde to make meney verfable, counteret-esstant,tustiess, and independent

{rom à central auf coin was created using the bochchai.

10

Notes

How Bitcoin Solves the Byzantine General's Problem?

The unatered agreement that al the devoted generals must concur to in the
‘Byzantine Generals Diemma 1 the Bcckchan lockchan isa decentralised, oper ledger
that sores all ransactonal data, The Eteon netwofe nodes, or users might estaba
‘working, decentalsedfnancial system wahout the need for à ental athorty provided
they could all agree on he transaction hat tok place andin what order

Blockehain largely relies on a consensus approach to validate transactions
because ofits decenvalsed nature. Risa pee-io-pee network that provides users wih
ut and transparency. What distinguishes a ram cher systems ists dist buted ledge
Any system tat needs accurate verfctien can use blockahain tech.

Proof of Work: The Byzantine Generals Dilemma would be slve bythe network
being verifiable, countertetproot, and tustess, The Byzantine Generals Dilemma
was saved by Bain by using a Prootot Work method to provide a precise, imparta!
Standard for the blockcain. Prof of wrk (Pol sa echriqu for adding new blocks
of transactions o a enptocurency’s Bleckchan, Creating a hash (a lengthy sing of
characters) that correspond 1 the appropriate ac fr the current block is the work at
and in his soenano.

Counterfeit Resistant: For thelr block. or piece of information, network
participan must submit proof of hir abour inthe um ofa vl hash in order for
‘tobe considered valid under the Proct-o Werk alg, Pook Work encourages.
mines to broadcast accurate nermalion and so protects the network by making
them spend alo of time and money o create blocks. One ofthe few methods fr a
decentralised network to concur on a single source of truth, whichis necessary fora
monetary system, Is teugh Preototirk. The rules on the Blockchain network
are objective, thus there can be no disagreement or tampering wit he data. The
technique fer selecting whe can mint new Btcons aswell asthe reset defining which
twansactons are acceptable and which are invalió are both goals.

Provable: A bleck is extremely dicto remove from the lockchain ater
‘thas been upleaded, making Blecin's past unchangeable. As a resul, users of the
Diockchain network may always concur on the Blockchain's current status and al of ts
ansacton, Each node separately checks the complance of ransacons wih extra
requitemonis and he Prooof\Wor citer or locks,

Trustee: AN network nodes instant ently any for to broadcast false
infomation as objectively invalid and ignore. is unnecessary o place your trust in
ter network paricpants because every node on Ih Ban network is capable of

| veitjing every piece of information onthe network, making Bitecin tusiless system.

Byzantine Faut Tolerance (BFT)

To solve the Byzantine Generals Dilemma, the Byzantine Faut Tolerance was
created as an example, The inspiration fr BFT came fom the Byzantine Generals
Dilemma, alogealthinking exercise where severa generals must asau acy.

Faut byzantine One ofthe fundamental requirements for creating reliable
lockehain nds or features is tlerance,

It is considered to have BFT when words ofthe network can concur or
cometo an agreement andthe sytem sil funcions as intended

lech Tercios 1

‘The most widely used consensus protocols fr blockchain netwrks, such as
prochofwatk prootofstake, and prootoFauthoriy, al have some BFT tats Notes
‘The BFT is rial or blking a decentralised network
The precise network suture is determined by the consensus technique. For
Instance, BFT has a leader and peers who can and cannot validate,

(Consensus messages must travel through he pertinent peers inorder to preserve
the order ofthe Blocichin SC transactions andthe consistency ofthe overall tate
through local transaction replay. |

As more people and businesses look Ino distibuted and decertraised systems,
mere creative ways to create BFT systems wil be discovered and implemented. |
(Outside of bloichais,indusies ncucng nucear energy, space travel, and ation
also use BFTbased systems.

ak DOOD) tcs

mar Abn

Byzantins Generals Problem ina Distributed System

Honest nodes (such computers or eter physical devices) must be able to cometo
an agreement inthe presence of shonest nodes in arr L solve is problem

[As a matter of cours, there vi be sme tensions as regards the amount of
times and the amount of times that wi be devoted tothe subject ofthe next
egotations. In the consensus problem, evry processor has ts ou staring
‘ali, and linen faulty processors must agree on a single common vale.
Computer networks show the postion af the Byzantine amy,

‘The commanders canbe fought of a8 software operating a ledger that recorde
transactions and events inthe order that they ak place, andthe divisions can be
thought of as computer nodes in the netwerk. A systems use the same ledgers,
and one of them i leed, the others are updated as wel ithe changes are
confimed tobe accurate. A resu, al dsrbutedledgers should agree,

Byzantine General's Problem Example

A dt! signal tat is stuck at 1722 ora voltage that ie anywhere between the
values for à vali ioglea 0° and a valid logical “1,” fa fundamental example of à
Byzantine faut Ute amounts of noise en the gates input um into massive amounts
‘of noise on the gates ouput because these volages are close to the maximum gan
(ofthe gates transfer funcion. This is because “al cul are merely analogue
eulry vento extremes.”

This issue can be resolved sine, in the presence of à dominating input, even a
Byzantine mputhas no effect onthe output.

2

Notes

‘The popular input majority loge voter is a great composite example.
None oftheinputs is 1/2" and he other wo are bath Oo bath , the resus
‘ther Oot. (a a result ofthe votes masking)

hen one of the inputs is "1/2 and the other two are diferent values, the
put can be O, “127 or 1, depending on Ihe precise gan and Ihres
otages ofthe voter gates andthe properties of the “17 signal

1.1.5 Hadoop Distributed File System

‘The Hadoop Distributed Fle System (HOFS) I a distributed io system designed
Lo store and manage large volumes of data across multiple commosty servers R ie
pat ofthe Apache Hadocp open source framework, whichis widely usd for dstbuted
storage and processing of big data

Hadoop provides a distributed fe system and 2 famework forthe analysis and
manipulan of very large data sets using the MapReduce paracigm. Hadoop's abit
o partion data and computation across many (thousands ef hosts) and un aplication
calculations in parte lose to tel data a key fsture,

A Hadoop cluster can expand its computing, storage, and 10 bandwith by by
adding more commen servers, Yahoo! has 25 0 Hadocp dusers, the largest of which
has 3500 servers, and can hol 25 peta es of application data, Across the word, 100,
addiional companies use Hadeep

Al of Hadoop's componente are accessible under he Apache open sourcelicence
because it is an Apache project. 80% of Hadoop' core has been created and improved
by Yahoo! (HOFS and MapReduce). HBase was Italy created at Powersel, which is
nov à dion of Micros

Facebook is where Hive was created and developed. Pi, ZooKeeper, and Chukwa
‘were conceived and developed at Yahoo! Yahoo! is where Avr fra started, and
Cloudera 1 working ont together.

‘The Hadoop Me system is cated HOFS. Although the UNIX fe system served
as Inspiration fr Ihe HOFS interface, standards adherence was fersaken in favour of
beterpertormance forthe relevant appicatons

Applicaton data and fe system metadata are stored independenty in HOFS
HOFS stores metadata on a dedicated server knoum asthe NameNode, jus ke other
Aistited fl systems ke PUFS, Lust, and GFS, DataNodes ae addiional servers
‘hat held application data. TCP-based protocols are used for communication between

| ak server, vin ae all completely connected

The Dataliodes in HDFS do nat use data protecion technologies lke RAID to
make the data persistent, in contrat to Lustre and PUES. For rolabity the fle content
is instead repicated across many OataNodes, much Ike GFS. This approach has the
additonal beneft of increasing data anspor bandwidth and creating more chances for
Placing computation coset the required data, al whe maintaining data durability.

NameNode

A fle and rectory hierarchy exists within the HOFS namespace. In the
NameNode, fles and drectores are represented by Inodes, which keep tack of

lech Tercios 8

Information Ike as permissions, medifeation and access times, namespace, and disc
space aliments Large potions of the fes content (usually 128 megabytes, but user. Notes
ect fle-byfle) are chided up ino smaller blocks, and each block is separately
copied at several Daaliodes (ypicaly tee, but user selectable fle-by-le). The
‘namespace tee and the mapping of le blocks to OataNodes are maintained by the
‘NameNede (he physical locaton of le data),

While reading a fle, an HOFS dient fst asks the Namenode for the locations of
the data blocks that make up the fe. The cient then reads the contents of the data
blocks from the DataNode that is nearest othe en! The cet asks the NameNode o
‘suggest 3 group of three DataNodesto host ne block replicas when wring dat. After
that the cleat pipelines data tte Dates.

For each cluster, the present design uses a single NameNode, Due othe ft that
each Dataliode may un numerous eancurentapplatio jobs, the cluster may cortan
thousands of Dataliodes and tens of thousands of HFS cents

‘The ful namespace is kept in Memory by HDFS, The metadata of the naming
system known as the mage is made up of the inode data anda list ofthe block that
‘belong to each fe. A checkpcinis a permanent copy ofthe picture tal kept in the
‘alive es system of te localhost The native fe system ofthe oca hosts where the
‘NameNede maintains the image's journal, which isa moditatio og

Its posse to create duplcate checkpaint and jouma copies on diferent servers
fer increased durabliy, The NareNode rebulds the namespace during estas by
reading the namespace and replaying the joumal, Bock repica locaton are not
Included in the permanent checkpont and may change over time.

Datattodes

Each block replica on a DataNode is represented by two fles in th local host's
atve fle system. The frst fle contains the data Asef and the second fle is block's
‘metadata ineusing checksums forthe biock data and the Blocks generation samp. The
2e ofthe data le equals the actual length ofthe block and does nat require exra
‘pace to round it upto the nominal block size as in tradona le systems. Thus, a
block is al flit needs ony af ofthe space ofthe fl block on local dive.

During startup each GataNode connects to the NameNode and peros a
handshake, The purpose of the handshake isto very the namespace 1D and the
sofvare versen of Ine Daatlode. ether does not match that of he NameNcds the
Dataliode automaticaly shuts down,

‘The namespace ID i assigned 1 the le system instance when ls farmed, The
namespace 1D is pesitnty seed on al nodes of the ctr. Nodes wih a dient
namespace wince alt já the uste hu preserving the igi ofthe Bos tm.

The consistency of sofware versions is importar because incompatible version
may cause data comupton or loss. and on large cluster of thousands of machines itis
easy to evrlack nodes that di ot shut down propery par othe sofware upgrade cr
‘were net valable during the upgrade.

À DataNode that ie ney niaized and without any namespace ID is permite to
Join the ester and eceve the cluster namespace D.



Notes

A DataNode identifies block repicas in ts possession tothe NameNdeby sending
a block apor A lock report contains the block i the generation stamp andthe length
{ex ach block replica the server hosts. The fra block repo is sent immediately ater the
Datalode registration. Subsequent block repo are sent every how and previ the
Nametiode with an update view of where lock replicas are located onthe cluster

HDFS Cie

‘The HOFS cient, a code brary that export the HDFS fe system interface, is
used by user programmes to access he fle system. Simla tothe nao o radtional
le systems, HOFS provides operations to create and destroy drectvies in adton to
operations to read, wre, and delete fes Pate inthe namespace are used by the user
o refer to fes and drecores, In most cases, the user applcaton doesn need to be
aware that he storage and metadata forthe fle system are located on various servers,
rat some Docks have several replicas.

When a fle is being read by an application, the HOFS cient frst queries the
NameNode for a lt of DataNodes hosting copies ef the fs blocks. Ar that
makes a dect reques forthe transer ofthe requred Block o a DataNcde, When a
cient wies, ra requests hat the Namellode select DataNodes to serve as host or
replicas ofthe He's inital lock

‘The ent sets up a pipeine between rodes and passes the data through it. The
ent asks for new DataNodes te be selected to host repkca ofthe folowing block
‘once the previous block has bean es. The cien transters the fa addional bytes as
3 new pipelines set up. The DataNodes selected wil probably var. The diagram below
Shows how the cient Namelede, and Dataiodes communicate wth one anther.

=>
amas

ou Duc
Pre Les

ea

Figure: By providing the Nameiode withthe le path an HOFS exer creates a
new fle, The NameNode runs alist of OataNodes to host ts replcas foreach block
in te Sle, Once the selected DataNodes have confmed the formation of the block
replicas tothe NameNode, the cert then pipes daa to them.

In contrast to tradtonal fe systems, HOFS offers an API that makes fle block
locations accessible, This enhances read perfomance by enabing programmes ike the
MapReduce framework to schedule a ask close to where the data are placed. À fies
teplcaton factor can also be set by an application using this feature, The replication
{acter fora les tree by defaut, A greater replication factor increases read bandwidth
and improves faut tolerance for crucial le or fs that are requested ofen,

lech Tercios

Image and Journal

The fle system metadata known as the namespace image explains how
applcton data is organised into directores and les. A checkpai is a permanent
‘copy ofthe image that has been saved to der. A wileahend commit record fer
‘madicatons to the fle sytem that need to be durable the jcumal, The update is
documented in the joumal foreach ciertintates transaction, andthe journal fle is
‘lushed and synched before the medication is committe tothe HOFS cer

‘The checkpoint le is never atered by the NameNode; instead, It fs complet |
modited whenever a restan occu, when the administrator requests one, of by the
(Checkpainlade covered inthe folowing section, The NameNodeialses the namespace
image om the checkpoint during sat and then repays ural changes unt the image
reflects the most recent fle system state. Before the NameNode begins serving cents, à
Fresh checkpoint and an empty oumal are witenbackto the storage directores

‘The Namelode is a mlireaded system that handles requests fom numerous cents
at once. Since al other treads must wat unl the synchronous fus-andsyne procedure
‘statedby one ofthe is finished, saving a transaction to is creates a btleneck.

‘The NameNiode groups together several transactions stated by various dents in
‘order to streamline tis procedure. Al transactons that are batching the moment a
NNameNode lead stats a fush-and-syne operalon are commited calectivly. The
remaining threads dont need to start a fush-ané-sync operation; they just need to
make aire ther transactions have been preserved

Checkpointiode

In addio tots core funcion of responding to cent queres, the NameNode in
HOFS also has the option of acting as ether a Checkponlide or a BackupNode
Upon node itialzaion, the ees defined

À fresh checkpoint and an empty jounal are created every so ofen by the
(Checkpainalode by combining the ol checkpoint and ural. Given that it needs the
same amount of RAM as the NameNode does, the CheckpoitNode ofen operates
on a ferent hos. The eurent checkpoint and joumal les are dounicaded fem the
‘NameNade, combined local, and tn new checkpoint is sent back othe Nametlode,

One method of saeguarng the metadata ofthe fle system isto crete regular
checkpaits If none oft other persistent copie of the namespace image or journal
are avaiable, the system can restart fom the most recent checkpoint

Wien a new choctpont is uploaded 1 the NameNode, tis possible to truncate the
Joumals tal by creating a checkpoint. HDFS clusters operate contnuousy for extended
period of ine who restarts, causing the joumal o increase, The kelhood ofthe journal
le being lost or comupted rises as gets larger A extremely large joumal ls increases
the eng oftme needed to reta the NameNode, A weeks worth of jural ens are
processed foralarge cluster in an hour ifs a good idea to establish a daly check.

rackuptlode

The BackupNode is a functionality of HOFS that was just receniy added. The
BackupNode can create perio checkpoins, ut like a CheckpcirtNode, butt also

45

Notes

16

Notes

Keeps an up-to-date, inmemoy picture ofthe filesystem namespace that is constant
‘synchronised with the state of he NameNode

The Backuplode recaves the namespace transaction joumal stream from the
active NameNode,stoes the namespace transactions to ts own storage directory.
and then applies the namespace transactions to its own namespace image in memory
‘The NameNode eat the GackupNode the same way does joumal fle ts storage
¿rectores as a joumal str, I the NameNode fas, the Backuptiode' image in
emery and the checkpoint on ds sa record ofthe latest namespace stat.

Since it aready has a current namespace image nis memory. he BackupNode
may construct a checkpoint without downloading checkpoint and journal les fom the
acive NameNede. As a resut, the Backuplode's checkpon procedures quicker
because itjustneedsto store the namespace to ts local erage directory

The BackupNode can be thought of as a Nametode that is read-only. Every fle
system metadata—all but block locaons-— contained there. I is capable of al
rdnary NameNode actions that dont require namespace alteration or knowledge
of block locations. By using a BackupNode, you have the hace of runing the
NameNode witout persistent storage and aiving the BackupNode contol over
namespace state persistence.

4.4.6 Distributed Hash Table

A Distributed Hash Table (OHT) s a technique for storing data that is desrbed.
as data based on key ale par, As there I no certaiad contol in this system, al
nodes funcion independently of ane ancher. Because they support repeated over
several nodes data, they ar regulary fauttlerant

OHT can scale to handie massive data volumes across numerous nodes. The data
values might ca lake any form. OHT fl an easy approach o access infomatin
‘tom a large collection of data, Nodes in a OHT can alo be realy added or withdrawn
without signant rebalancing the clusters data,

IA haëh tables an abstract data type for associative rays lso refered to as a
data stature. ts structure allows for the mapping of keys o values, A hash code I
the rest of «funtion that ealeuates an index into an array of buckets tom which the
des value can be retieved Hash tables are useful for storing data and prog
uk access

Any process's typical executon tine is unatfectd bythe volume of data, The key-
value string technique isthe foundation of how hash tables function, Hash tables are
constructed using two primary processes: hashing and colision

In the process of hashing.” the key forthe hash table is obtained using a hash
neben, and tis then converted ito an Índex ra pins to various arays of buckets,
‘which are where the data wil be kept. The hashing function chooses where to put
‘the data and where 1 look p in the hash table. A decent hash funcio fs ref
necessary fer a good hashtable,

Hash tables heavy rely on colision», When the hash function plays a hash key
er an already occupied lation, à coliin occurs, A sal hash function is heefore

lech Tercios

Important fr preventing coisions. This functon must share the keys consistent and
‘shouldbe smpleto callate

‘OT teles tot distribution of he uN tio among various places. Bas on dstibutad
hash table tchroog PFS is adecntalsed system with no siga poto aro.

Flowing peer peer computer networks in 2002, Kademia is a distritos hash
table. Kademia technology s used by IPFS to dently which nodes conta which types
of data It fers a lookup service based on key-value pairs hat are kept in a OMT. As a
res, takes the least amount of te for all network user to reteve the value Inked

toa gven key.

In order to alleviate excessive fe redundancy, IPFS is a decentraised storage
tocol. distinct hash foreach saved fl isthe rest of IPFS. Wh the use of IPFS
Gateway, users can obtain ie fle by creating the correct hash address, Hence, PFS
ie inthe decentralised and immutable storage cles

‘The primary characterise of IPFS s that it stores data regardless of te amount of
the data. The data is divided ito numerous lite sections, each of which is recognised
by a unique hash address. or CID, These components are spread acros addtional
node that are asnearto the publisher node as possible.

When a user makes a query request al the components can be pu back together
to recensrt the main object ater viewing the smaller componer. In all operating
systems, IPFS includes command Ine and graphical user interfaces that make
performing simple or novice users.

A hash table is a daa structure used to map Keys Lo values. Itemally, a hash
unebon is used Lo Agur ou wherein an aay o buckets to look or he needed data
Records ae keptin buckets using a hash hey ani are arranged in a specie order.

Keeping e above concept in mind, one might imagine a DHT as a data structure
in which dat i persed across a number of nodes, where nodes are comparable o
Buckelsin a peertopeer network

‘The operation of a DHT is depicted In the dagram below. A hash funcion is
‘used to process the data and produce a smal key. The data (valves) onthe peerto-
peer network are then associated wih this Key. Each node on the network can then
be asked to Ind the matching data nen users on the newark request the data (va
the flename). The flename can then be hashed ence more to clan he same key.
Scalaltyfaultolranco, and decentralisation are al features of DMT.

Data Key Distributed
Ta] Network

CL, bomen

Mach | ERE)
>| fase, amar

Wash
function

y

ELSON



Notes

18

Notes

‘Another application of hash functions is in digital signatures, where they can be
used in combination wih asymmetric eryptography.

14.7 ASIC Resistance

ASIC resistance refers to Ihe design ola blokehai prtoco in such à Way that
it makes dct e unpoftabe for specialized mining hardware called Application.
‘Specie Integrated Gui (ASICs) to parichate in the mining process.

‘The goal of ASIC resistance Isto ensure a mare decentiaized and demecraie
Astron of mining power among individual mines, rather than alo ing a smal group
fof mining pools ar cerperations to controle network. By designing a protocol that Ie
ASIC-resitant the nebwork becomes more resistant to centaizalion and censorship,
asitreducesthe Ikehood of a single ety having too much power over the network,

To achieve ASIC resistance, some blockeain prlocus use algorithms that require
more memory such as the Ethashalgoithm used in Ethereum. This makes i more
expensive fr ASICS to mine the Dockchain since they would require a arge aut of
memory wich isnot costefective for ASICS o imploment

However Es worth noting that ASIC resistance is not a teapot soliton to
centralzaicn, as cher specaized hardware or ming pools could stil emerge to
dominate the network Moreover, ASICesistantalgrthms can also be susceptble
to attacks by bomets or eer fer of attacks. Therefore, i's important to consider
a vañety of factors when evaluating the level of decenraizaton and secunty of a
Diockchain protocol,

1.1.8 Turing Complete

“Turing complete" is a tem used in computer science to descrbe a system or
programming language that is capable of performing any computacn that can be
pertomed by a Turing machine a theoretic machine invented by Bish mathematician
‘Alan Tuta in the 19908. A Turing machine ls hypothecal computing device that
can fead and unte symbols on an infinitely long tape, and move its “hele Hight
along the top. The machine's behaviors defined by ase of rules that determine how it
moves he tape, reads and wnes symbol, and tanstons between sates.

A programming language or system that I Turing complete 1 capable of simulating
any other Turing machine, whieh means tha £ can compute any computable function
In other word, if a system is Tung complete tis power enough to save any
problem that can be saved by a computer, given enough ime and memory

Most modem programming languages, such as Java, Python, and Ce, are Turing
complete, meaning tha they can be used to write any algrifim or program that can be
‘wien in any oher Tuing-complee language. However, there are some systems that
are not Turing complete, such as regular expressions and fite-tate machines, which
ae less powerul and can ony recognize a subset of al possible languages.

In the content of bleckchan, “Tung complete” is oten used to describe smart
contract platforms that allow developers to create complex programs and apptcatons
fon top ofthe Blockchain. A smart contract isa seltexecuting contract wäh the tems of
the agreement between buyer and seller being directly wen ito Ines of code. Smart

lech Tercios

‘contracts can automate the execulon of transactions and enforce the terms of the
agreement without the need fr intermediaries er tuted third partes.

À blockchain platform that is Turing complete allows developers to create smart
contacts that can perform any computation that can be perfomed by a Turing
machine. This means that developers can create sophisticated applications on top of
the blockchain, suchas decentralized exchanges, predcon markets, and even entre
decentralzed autonomous organizations (DAOS).

Flhereum is one ofthe most wellknown Turing complete blockchain platforms.
as k alows developers to wite smart contrats in a Turing complete language cales
‘Solty, Omer blokchain plaíoms, such as EOS and NEO, also support Turing"
complete smart contacts

Wile Turing completeness allows for greater fexbilly and complexiy in smart
contract programming, ao ineduces new security fake and potential fr unintended
consequences. AS smart contracts become more complex, it becomes increasingly
Important thoroughly test and aust them to prevent vulneabitles and potent expos,

Blockchan technology has been touted as a revolutionary innova with the
tential to transtom various industries. One of the most promising applications of
blockehain technology is inthe creston of decentralized appications (Apps) that
can run on top ofthe Blockchain. These dApps can be used to automate processes,
Tacitatepeerto-pee transactions, and create new decentazed business models

Cone of the key features of bockchain-based dApps isthe ably to use smart
contracts, which are settexecutng contracts with the tans ofthe agreement between
the buyer and seller being drecty wen into Ines of code. Smart contracts can
automate the execuon of ansactons and enfrce the erms o Iv agreement, without
Ihe need for itermediavies trusted hrd pas,

To create these smart contacts, developers need a programming language that is
compatible wth the blcckchan platform hey ae using In order to suppor the creation
‘of complex smart contacts, some Blskchain platoons have implemented Turing-
complete programming languages,

Turing completeness I a concept in computer science that describes a system cr
programming language that can perixm any computation that can be performed by a
‘Tung machine, A Turing machine hypothe! computing device that can read and
rte symbols on an fl long tape, and move ts head” eto ight along the ape
‘The machine's behavior is defined by a set of rules that determine how it moves the
tape, reads and urtes symioci, aná tanstens between sates

A programing language or system that is Turing complete is capable of smutting
any other Tur machine, which means hat ean compule any compusable funcion
In other words, a system is Tung complete tis powerful enough to solve any
Problem that can be solved by a computer, given enough time and memory.

In Die context of blockchain, Tung completeness retes lo the ably of a
programming language or system to perform any computation thal can be performed
y a Tuing machine. blockehain platten that i Tung complete alows developers
to create smart contacts that can perform any computation that can be performed by à
“Tung machine.

19

Notes

20 leche Testi

Tuting-completeblockchan platforms offer several advantages over non Turing
Notes complete platforms. Fs, they provide greater fexbilty and power to developers

Who can create complex smart contacts that can execute complex algoritmo.
and calclaiens. This opens up new possibles for bleckchain appleatora, such
as decentalzed exchanges, predicion markets, and even entre decentraired
autonomous crganizatons (DAOS)

‘Secondly, Turing-complete smart contracts can enable more advanced features,
such as condalonl statements, loops, and functons, These features alow fer more
complex decisin-making within smart contracts, which can be sofa fer ceating more
sophisticated pps.

However, Turing completeness also introduces new chalenges and risks. The
increased complexity of Tumnpcomplete smart contacts can make them harder
to develop and mote prone to bugs and winerabiies This can lead to unexpected
behavior e even explo that can resul inthe loss of funds or other asets stored on
the bookchain,

In adétion, Turing completeness introduces the possibly finite loops or ether
forms of computation that can consume largo amounts of resources, such as CPU
cyeles or storage space. This can lead to salat Issues on the blockchain and may
require addtional measure, such as gas fees or resource ints, to prevent abuse and
ensure the stabity ofthe network

Despte these challenges, mary blokchain plafemms have embraced Turing
completeness as a way to enable more povertl and fexble smart contracts.
Elhereum, the secondHorgest Liocichan platform by market captalzation, is perhaps
the bestknown example ofa Tuing-completeblocichain platform. Ehereum supports
a Tung compete programming language called Soi, whichis used t create smart
contracts that can execute complex algorthms and calculations

Other siockchan platfams that support Tuing-campete smart contracts
include EOS and NEO. EOS uses a Tuing-complete programming language cated
\WebAssembly, whle NEO supports several programming languages, including 08,
Python, and JavaScript

Wie Turing completeness alows for greater fexiity and complexity in smart
contrast programming, ls introduces new secuny risks and potential for unintended
consequences. As smart contacts become more complex, i becomes increasingly
| Imprtant to thoroughly test and au hem 1 preven vulnerables and potential expo,

| smart Contracts and Turing Completeness

‘Smart contracts are seltevecuting cenracts wäh the tems of the agreement
between buyer and seller being drecy writen into ines of code, Smart contacts can
automate the exeoulon of ansactions and enforce the tems of te agreement, without
ne need fr intermediaries or trusted third partes. They are cen used to create dApps
that run ontop ofeblockchan

Tung completeness is a tem used to descbe a system or programming
language that is capable of performing any computation that can be performed by a
Tumg machine, Inthe contest of Blockchain, Turng completeness allows for the

lech Tercios

‘creation o smart contracts that are capable ol performing any computation that can be
performed by a Turing machine. This means that developers can create sophisticated
applications on top ofthe blockchain, such as decentralzed exchanges, prediction
‘markets, and even entre decentralized autonomous organizations (DAOS)

Turing completeness is an important feature of icekcha platorms because 1
alows for greater teibity and complexdy in smart contact programming. However,
‘also nvoduces new securt risks and potential fer unntended consequences, As smart
‘contacts become more complex, £ becomes increasingly important to thoroughly test
and audi them t preven wunerabites and potential explo

Examples of Turing Complete Blockchain Platforms,

Ethereum is one ofthe most welnoun Turing complete blockchsin platforms,
as k allows developers to unte smart contacts in a Turing complet language cales
Solty. Other blockchan platforms, such as EOS and NEO, also support Ting:
complete smart contacts.

Ethereum was designed specifcaly to support smart contracts, and & is the
most widely used blockehainplatfom for dApps. is programming language, Sol.
is Tung complete, whieh allows for the creation of sophisticated and complex smart
contacts, Sold 1 snr to C++ syntax, and iis designe 1 be used for erating
“Apps and smar contracts that run onthe Eihreum Virtual Mache (EVM)

EOS is naher Turing complete bockchain platform that designed special
er dApps and smart contacts, EOS is unique in that uses a delegated prootot
‘ake consensus mechanism, which allows fer faster and more scalable transactions.
EOS also supports a programming language called WebAssembly, which is a lowievel,
language hai designed tobe used for high-performance appleatons

[NEO is a blockchain platform hat 1 ofen referred 19 as the “Chinese Ethereum™
because & is similar in funciona iy ana design to Ethereum. ike Ethereum, NEO
‘supports smart contacts. and it I Turing cemplte. However, NEO's programming
language, called NecCentrat is designed 1 be mere developer-endly than Sebi,
‘which makes easter fr developers towne complex smart contract.

‘Advantages of Turing Complete Blockchain Platforms.

(One ofthe main advantages of Turing complete blockchain platforms i that ey
‘alow for greater Yes and complesiy in smart contract programming. This means
that developers can create sophisticated and complex applications on top of the
Dlockchain, such as decentralized exchanges, preccion markets, and even entire
‘decentralized aulonamaus organizations (PACS).

Anaher advantage of Turing complete blockchan platforms i that they allow for
‘greater iterporablty between diferent dApps and smart contacts. Because Turing
complete languages are capable of perfeming any computation that can be performed
bby Tuning machine.

4.2 Cryptograpy in Blockchain

Ccoptosaphy is a Wal component of blecichin technclogy. is the use of
‘mathematical agrthms and pretocosto secure nfrmabon, transactions, and dettes

a

Notes

2 cken Testi

on the blockchain. Cryptography haps to ensure the contenía, inegty. and
Notes autheny of data on the blockchan, making an essential par of blockchain secu

Ccyptopaphy plays cial len the securty of blockchain systems. t's cre,
iockchan technology relies on eryptgraphic prtocos to ensure the confidentially,
integity and authentic of data and transactions.

‘One ofthe key cryptographic primitives used in blockchain technology is ne hash
funeton. Hash funcions are mathematical functions that take input data and produce
3 fxe¢length output, called a hash. The hash funcion is designed to be a one
‘way funcion, meaning its easy to compute the hash value fom the input data, but
computational infeasble to compute the original input data fem tne hash valve. In
Diockchain systems, hashes are used to create a unique Angerprnt of data, such a a
block of transactions, that can be easy veía by anyone onthe network

‘Another important cryptographic primitive used in hockehain technalogy is puble-
key exptography. Publokey eyptography is a method of encryption that uses two
Keys, a public key anda private Key, o secure communications. I blockehain systems,
Publ-key cryptography is used to create digital signatures, which are used to vey the
Auen ofransactons,

[Each patipant in the Blockshain neck has a unique pub private key pa
and when a transaction is made, the sensor uses their private key to create a digital
Sonate thats attached tothe transaction, The reaver can then use the sender's
Public key to very the gta signature and ensure thatthe transaction has not been
tampered with

Public Key Cryptography

Public key enptography. also known as asymmetic cryptography, is a commen
om of rypography used in lcekchai technology. In publ key rypography. each
user has a pair of keys: a publ key and a private key. The publ Key is shared wit
other users onthe beckchai, we the private Keys kept secret

When a user sends 3 transaction on the bockchai, they sign the transaction
using ther private key. The signature can be verd by other users en the blockchain
using the sender's publi key. This helps to ensure the auhentcty and integre} of
tho transaction

(One ofthe key advartages of public key cryptography is at à allows for secure
communication without the need fora shared secret In rastonal eryplography, bob
the sender and receiver must have a shared secret, e Key, in order to encrypt and
decrypt messages, With publ key eryptography, the public hey can be freely shared
‘without compremising ecurty

Hash Functions

Hash functions are another important component of bockehain cnptography. A
hash uncon sa mathematical funtion that takes an put and produces a fe eng
cupit, known as a hash, Hach funcions are used in lockehan technology to create
gta Angerprnts of data, such as transactions or blocks, which can be used to very
einge and authenticity,

lech Tercios »

In beckehai technology, transactions and blocks are hashed together to create a
chain of blocks, or lockehan. Each block contains a hash ofthe previous block, which Notes
creates a tamperetdent record of al transactions on the blockchain, I any par of
the blockehain s atred, e hash ofthat block wil change, which wil be immediately
apparent to al users en he blockehai

One ofthe key advantages ofhash funtion sra hey ae onesvay functions, This
means tat it i vitally impossible to determine the original input rom the hash output
‘This proper helps to ensure the confdentalty and Integrity data onthe Biockchan

Hashing techniques can be broadly classified into two categories: eyplographis
hashing and nomerptoraphic hashing

Cnptographie Hashing: Cryptographic hashing ls a method of producing a
‘xedsize ouput, called a hash or message digest, fom an input message of
any sz. R is designed to be a one-way function, meaning ha tf racially
imposstle to revere the process and obtain he original input message fom the
hash, Cryptographic hashing gets are used in many appicaions ining
gal signatures, password storage, and data integrty checks. Examples of
ceyploraphic hashing algethmsincude SHA-25, SHAS, and 05,
Non-Crptographie Hashing: Noweryptographic hashing Is a method of
producing a fued-ze output from an input message, hit A is nl designed
Lo be a onesvay function. The goal of nomerptegraphe hashing is to
‘minimize colisions or situations where two ferent input messages produce
the same ouput hash. Nowerptographic hashing algorthms are used in
many appcatons, incuding data indevng, choskeums, and data structures
Ike hash tables, Examples of norcrptegraphic hashing algrthims include
(CtyHash, Mumurtach, and FNV hash

Digital Signatures

Digital signatures are ancther important component of bloichain cryptography
Dial signatures are used to authenticate the identy of a user and ensure the
Integy of a transaction, in blockchain technology, hal signatures are used to sgn
transactions and very ther auhesy.

Wen a user sign a transacin on the Backchan, they use thi privat key to create
dot signature. The gta signature canbe verified by eter users on the blockchain
sing the sender publ key. This heps to ensure thatthe transaction vas created by the
ser who claims te have create ,andthat the wansacton has not been tampered vith,

One of the key advantages of digtal signatures is that they provide non.
‘repudiation. Non-epudiaton is the property of a system that prevents users fom
‘denying that ty performed a paricuar action. In blockchan technology. gta!
‘signatures hip to ensure hat users cannot deny that they sent a pata transaction

Zero Knowledge Proofs

Zero knowedge proof are a relatively new and advanced form of enplography
{nat are becoming increasingly impertant in blockchain technology. Zero knowledge
roots alow users to prove that they have knowledge of a paticuar piece of
information without evealing that information

2 leche Testi

In bcckchain technology, zero knowledge proofs can be used to very the
Notes autnentty of transactions without reveaing any information about the transactions

‘themselves, This can be use in applications where privacy i impoant, such as in
financial transactions or medical records

1.24 Introduction to Cryptography

A Brief History about Cryptography

Humans began to become grouped int bes, cans, and Kings as eizations
developed. Rea resul, concept ike polis, supremacy. warfare. and power began to
take shape. These concepts futher stimulated people's inate news to communicate
covertly with chosen recipirts, which n tum insured that eryplography would continue
to advance

Despite being used to conceal signals fer thousands of year, eyptlogy has only
recent undergone systematic study asa science (and possny an an.

Inserptons engraved in the main chamber of the Egyptian nobleman Khnumntep
Ils tomb rom circa 1800 BC provide the fst known examples of the use of
enpiography (in some fem). The scribe occasionally substuted strange hieroglyphic
symbols with more common ones. The intention wasnt to conce the message, ut
rather to give a more dgnifed appearance by changing the manner it was presented.
‘The insrpton the eldest text todo co, had some sor of ateaton ofthe original text
even though it was net a fom ef hidden uneng. In most sgnifcant early crains,
there is evidence of some use of eyptography.An ancent counterpart of James Bend
"Arthshachtra” a famous test on satecat by Kautalya, discusses the Indian spy
agency and Includes haring ares assignments in secret ing”

The last uo years have seen a 90% increase in global data production.
Ccyptographers have been working nonstop to develop ever-more-complex encryption
sltinsin err to keep up wth his huge explosion of data creation and transmission

In ral. the ar oferypography requires wo steps rt the data must be encrypted,
and second, ne eoreet—andonly—reent must have access tothe desrypto key The
second assignment ls more chalenging in some ways than the fst, Her, we look at Sve
radical encryption techniques as well asa number ofcument tcs

arty Cryptography
Caesar Cipher

ulus Caesar created the substtuton cypher when he wanted to communicate
wih his mitary commanders in the feld secre, The shit vale isthe secret to
substuton cyphers. By subsiding each eter wih the one fom two alphabetic
postions eae, for instance, i we wished to encryp! the word dog using à shit value of
2, e resul would be me,

This type of encryption is bviusi ar fam safe here are thee obvious issues
it it Fr, there ls the issue of tling the frontine generals the shit vale. That
‘wasnt realy possible to pint tat the top of the letter. Furthermore, the Caesar Cpher
experiences à problem known as Paltemizabon even ifthe recipiert has the SR
Value (petnaps you included itn an eaer communication), The most frequent late,

lech Tercios

for instance, in English ise. The easiest way to break the code would beto iden
the most frequent eter inthe encoded message. get the appropriate shit vale, and
then decrypt the entre message. Atematively, you may look for Ihe words that only
ave one later, guess hat i's the ltr a, and make the same inference, Final, since
English has 25 different shit values, you may just run though each one unt you find
the ight one.

‘Te Caesar Cipher is one of the oldest and simplest encryption techniques in the
history of erptography. Its a substtulon per in which each eter n Ihe plaitet is
replaced by alter axed numberof postions down the alphabet.

For example, ifwe use a hi of, the eter A would be replaced by D, Bby E, ©
bby F.and soon. The shit wraps around the alphabet, so ar Z comes A again. Thus.
the plaintext HELLO” would be enenpted as KHOOR

‘The Caesar Ciphers easy cracked, as there are only 25 possible shitty tis
also vinerale to frequency analysis atack as ne frequency distribu of eters
the ciphertext isthe same as inthe plante, Just hited

espe ts wesknesses, the Caesar Cipher played an Important role in he history
‘of cryptography and paved the way for more sophisicated eneryion techniques.
Ris also sil used today as a fun and educatonal toa for tosching encryption and
xplography concepts o beginners.

Seytale

‘The Spatans created a very diferent ype of ection tha rst appears o have
addressed some ofthe aforementioned issues, À short pale was wrapped in tape, and
‘writing was done lngth-wse across the pole to create the Sete Cipher. The text wil
become unreadable once he tape has been unwaund from the poe. The diameter of
the pole being used is therefore crucial

Of course, the recipient wil si need 10 receive the pole damater used for
encrpton, but at least Patemizatonselated problems are less obvious. However.
because the message is wien in plier, R can sometimes be simpler to identity
individual weds the sequence.

Functioning of Seytle
‘The setae is simple yet fective encryption teal that works as fellows

À stip of parent or leather is wound tightly around a cyinder-shaped rod
known asa yat.

‘The message is writen along the length ofthe sip, usually in sprl fasion
Each ler is writen ena diferent pat ofthe sip, so thatthe message is dstbuted
‘along the entre length ofthe strip.

‘When the message has been ween, the sip is removed rom the scale and

santto he repent

To decrypt the message. the recpient must have a soya ofthe same size and
‘shape as the senders sele. The recpent wind the stip of parchment or leather
araund the sale, matching up the spa patter of the message.

2s

Notes

2 leche Testi

‘Once the si is wound around the soytle, the message is revealed in a straight
Notes line readable from top 1obatom.

The soytale works because the circumference of the seytale is the “key” to
decrypting the message. Without a scale ofthe same size and shape, the message
appears as a jumbled mess. The scale was a simple yet efcive way to enayet
‘messages, and was used by ancient czations such as the Greeks and Romans.

Vigenere

lumping ahead to 1853, an Ralan by the name of Giovan Batista Belaso
developed an improved version ofthe Caesar Cipher known: as l cite ndechfrable
(te indecipherable cypher, wich remained unanswered unt 1363. In Is format, the
cypher key determines the sit value foreach ltr ofthe message I your cypher key
islong enough (Le. has enough bits) to prevent repetion then solving one word in the
message went help you save the rest ofthe message

‘The Vigenere Cipher is a polyalphabeticsubstution cipher invented bythe French
ú“eryplographer Bis de Vigeere in he 16h century. is a more sophisticated version
ofthe Caesar Cipher. anditismuch harder fo rack

‘The Vigenere Cipher works by using a sotes of interwoven Caesar Ciphers, each
one using a diferent shit value based on a Keyword Here's how R works:

1. Choose a keyword, such as SECRET” Thiskeywordisrepested ver and over
again to create along sing hat is as long asthe plaintext message.

2. Convert the plas message ino a series of numbers, where each number
represents a eter of he alphabet Fer example, A=0,8=1,0=2, and soon

3. For each tir of the plaintext message, fnd Ie coresponding lee inthe
Heynor sing, and use that tes postion in the phabet asthe shit value
fora Caezar Cipher.

4. App the Caesar Cipher tothe letter using the hit value, and record the
resulting epherest ter as a number

Repeat steps 3-4 foreach eter ofthe plaintet message
Convert the seres of ciphartent numbers back into lts to get the tal
| ‘encrypted message.

To decrypt the message, the repent must know the Keyword used to encrypt it
and apply the opposte shitsto each eter inthe ciphertext message

‘The Vignere Cipher is much harder to crack than the Caesar Cipher, because &
uses a deren shit valu fr each eter ofthe plaintext message, making frequency
analysis much more dificut. However, can sil be broken using statistical methods
and computer algorithms.

Vera

The only eurent code ha has been mathematialy shown to be impenetrable is
‘the Verna Cipher, aso known as a onetime pad (OTP). The secret? Wh a hey that
has at east as many bts as the message tobe hidden, create a Vigenere Cipher, and
then discard te Key ater each usage, The Soviets went a stepfather by developing

lech Tercios

'OTPsthatrequred a special magniing glass o read because they were so smal. The
theory behind this i thatthe decryption process wil get exponertialy harder the more
randomization layers ae usedin the encryption process,

TPs are now saved for emergency stutions where regular types of encryption
are rendered inaccessible, despite being largely cbsolete due to the difculies in
‘shang the keys (e9.feleconic communication is ut of.

‘The Vernam Cipher, also known as the One-Tme Pad, isa symmetric encryption
algorithm that was inveted by Gibet Veram in 1917. tis considered te be one ofthe
most secure encryption techniques in existence, andi sill used today in eran Ne
security applications,

‘The Vemam Cipher works by using a random key ofthe same length as the
plaintext message, whichis combined win the paintet using bise XOR (excuse
(OR) operation. Here's how it works:

1. Choose a random key ofthe same length asthe plintet message, The hey
shouldbe dy random, and must only be used once. I must be kept secre,
and ony shared between the sender and receiver through» secure channel

‘Convert both the plaintext message and the key into binary orm.

Periom a biwise XOR operation between each bof the plaintex message
and the corresponding bi ofthe key This produces a new sequence of bis,
whichis the ciphertext,

4. Comer the epheret back into a readable fort, such as ASCII or Unicode,
to et tre nl encrypted message.

To decrypt the message. the recplent must have the same key as the sender, and
perform the bitwise XOR operation on the ciphertext and the key This wl reveal the
Orginal paintet message,

‘The Vernam Cipher is extremely secure, as long as the key istry random, only
used once, and kept sere. However isnot practical fer most everyday applications,
as à requires a new random key fr every message, and Ihe key must be securely
transmite othe recipient

Enigma

Rotary encryption was utised by the German Enigma during Word War I Enigma
used a series of dcs that were inseted in a machine in accordance wäh a epectic
‘sequence (the key), which woud then decode the message for you, even though the
‘concept is essential) he same as other substtaon methods. The Germans simply
‘added a fourth ae tothe Enigma ater the three-dek original was broken efctvely
rendering Indesiucibie

Enigma coud not be craked uni the Alias discovered pattems In he texts (each
message began withthe date, for example), and withthe ak of an early computer
developed by Alan Turing.

Ha cial to keepin mind that no solution exis fr the issue of communicating the
key in any ofthese encryption methods. You had to somehow provide the recpent the
Key ouside of he encrypted transmission, “cut-otband, and then cross your Angers.

Ed

Notes

2 cken Testi

that no one ese found a. Tis is eurent refed o as symmetric eneyptin (he
Notes same ke used fr both enenpton and decir), However. the development of
asymmeis eneypton compete ter evening

Modern Cryptography
RSA

Asymmetic encryption is similar touting lock and hey. My lock is pen to
anyone. but only | have the key to open Lets imagine Bob wishes to communicate
‘wth Sally. Bob can just 10% ne message with Salys lock (uhich is made pub), and
Saly can then use her private key to open it, a opposed to dong e wth his own lock
and ansmitng his ey to her (as we saw before) In exchange. 8 wi use his private
Key to unlock Sal publi lock when she sends him a message, Saly and Bob went
have to provide ther secret keys to one ander in this manner

Vie now refer to this as public-key enerypton, and the RSA encryption system
created in tre late 19708 was one oft int uses. (RSA is an acronym forthe MIT
enplographers Rivest ShamirAdieman who crested)

‘ating is a common sep inthe process of encrypting passwords. This sep has
been used sine the 19708. Simply ut, te “sl” fs a random sting of alphanumere
characters thats added tothe end oí he password before itis encrypted. That way,
even afte the password has be derypted, you wil sl need to subrat the sat before
you can use the password, Satin has been a grat way o sop the spread of hash
{ables (a it of common passwords along ith their encrypted format). n ther words,
even if you use a common password, the salt will make it ferent enough thatthe
encrypted fom ofthe passer wont be abeto be rea,

To lustate, ts say you set your password as password. Since ths is very
commen. the encrypted version o the password wil alo be wel known (and therefore
in the atacke’s has table. But aer the password has been sald, it might lok Ike
“passwordanJO78304FN" wth the addtional characters being added at random).
Now, when the salted passwerd is put rough the encryption alarm, twill produce a
unique vate thats almost impossible to Age cut

| Advanced Encryption Standard (AES)

| since 2001, he US government has used AES asi default metod of encnpton.
[AES uses a method called “substition permutation networking” I this method, the
resus ofthe frst round of encryption are fed into the second rund of encryption, and
50 on. So, a small change inthe planes wil become Bigger and bigger with each
round of encryption, making the fal product impossible to tack,

[AS AES becomes more popular, the Data Encryption Standard (DES), which used
tobe te standard fr encryption. seen as weak and should be avoided.

1.22 Benefits of Cryptography in Blockchain

Cryptography is a Wal component of Blockchain tecnclogy, providing secure
communication and data storage on a decentralized netwerk. Cryptography helps to

lech Tercios »

ensure the confentaliyinterty, and authentic o dat on the bleckchain, making t
an essential par of lockehan security. Notes

CContidertiaity

Confidenbalty is the property of data that prevents unautherzed access to
sensitive infomation, In blckchain technology, confdenialty is achieved though the
use of exyptographic techniques, such as encryption and hashing. Eneryption is the
process of conveting plantes data nto cphertex data using a cryptographie key.
‘which can any be decrypted by ne authrzed recipient. |

In Mockchaln techndlogy, encryption Is used 1 protect sensitive infomation, such
as pate keys and personal data, fom unauthorized access. For example, when a user
rates a wallet onthe Blockchain, their private key is encrypted using a cryptographie
igor to ensure nat A cannot be accessedby anyone cer than the user

Hashing is another cryptographie technique used in blockehan technology to
ensure confdenialiy. Hashing Is the process of generating a unique dal Ingerpint:
‘of data, known ae a hash, using a enpiographe algo. Hashing is a one-way
neon, meaning that tis vitualy impossBle to determine the original input fom the
hash output

In blockchaln technlogy, hashing is used to ensure the condentaly of data
by creating digital fingerprints of ransactions and Docks, which can be used 1 very
thai integrty and auherticty. For example, when a user sends a transaction onthe
blockchain, the transaction is hashed using a cyptographi lortm to create a unique
ital ingerprnt. This apta Angerrint can be used to vet the authenicty of the
transaction without reveaing any sensitue information about he transaction el,

Innegrity

Integy is the property of data that ensures that has na been tampered wih or
red in any way. In blockchaintectncogy eg is achieved trough the use of
‘explograpic techniques, such as hash tincons and dial signatures

Hash function are used in iockchain technology to create digtal Sagerrints of
ata, such as transactions and Licks, which ean be used to very thet inte and
‘authentity, Each lock in the blockenan contains a hash of the previous bloc, which
‘creates a tampereiacot record of al transactions on the blockehan, I any pat of
the blockehain s aered, e hash ofthat block wi change, which wil be immediately
apparent to al users cn he boskchab,

Digtal signatures are ancther eryplagraphie technique used in bleckehan
technology o ensure the itepity of daa. Digta signatures are used to auterticate
the identity ot user and ensure the intgrty of transaction In blockchain technology.
(tal signatures are used sign ransacbons and very thelr utrentaty

When a ser signs a transaction on the Bockehai, they use thelr private Key to
create a digital signature. The gta signature can be verfld by oer users onthe
‘Slockchain using the sender's publ key. Ths helps to ensure thatthe transaction was
<reated by the user who claims to have created and that the transaction has nt been
tampered wih

30 leche Testi

Authenticity

Authentic isthe property of data that ensures that £ comes from a used source
and has net been are in any way. In blockchain technology. authentt is acrieved
through the use of cryptographic techniques, such as public Key cryptography and
gta signatures,

Notes

Publ key enptography, aso known as asmmetie enptography is a commen
om of rypography used in Boskehai technology. I publ key enyptography. each
user has a pair of keys: a pull key and a private key. The publ key is shared wit
her users on he Bockchain, we the private Keys kept secret

hen a user sends 3 transaction on the Blockchain, they on the transaction
using ther private key The signature can be veria by other users en the blockchain
using the senders publ key. This helps to ensure the authentic and integrity of the
ransacton

Cryptography provides several beneftsin various feld, including secuty privacy.
authentication, and itegriy Here ar some ofthe key Benes of ptography

1. Security: Cryptography provides secure communication and storage of
senstive data. Encryption alerts ensure that data is kept confidemial by
‘making i unreadable to unauthaized paris. Cryptographic hash functions
ensure data integrty by detecting any unauthrized changes in data

2. Privacy: Cryptography helps to protect the privacy ot individuals by proving
a secure means of ernmunicaton and data storage. For example, encryption
can be used to cure personal infomation such as cri card numbers, social
security numbers, nd ater senstie data,

3. Authentication: Coplography provides a means of vefng the ientty of
users and ensuing the authentcty of data, Digital signatures ae sed to very
the authentay of data and transactions, ensuring that they have not been
tampered wh or ater in any way

4. Imogriy: Coptography provides a means of ensuring the nteaty of data by
detecing any unauthorized changes. Cryptographic hash funcions are used
to create a unique digtal fmgerpnt of daa, making & possible to detect any
changes one data,

5. Trust: Cryptography provides a basis for trust in online transseions and
«communication, By sing cryptographie techniques, users can be assuredthat
their dat is secure, pate, and authentic

| 6. Compliance: Cryptography is cen required by aw and regulations to ensure

the securty and prvacy of sensitive data For example, the Heath Insurance

Porta and Accountbity Act (HIPAA) requires the use of cryptography to

Protect patent heath information.

7. Efleoney: Cryptography can also provide efficiency banafs by reducing the
amount of data that needs tobe transmitted or stored. By using cryptographic
hashes. large amount of data can e summarizedinto a amalieigtal ingerpt
teduzing the amount of storage required

lech Tercios

1.23 Types of Cryptography in Blockchain
The to pes of eyptography are:

Symmetiekey eryplography
Asymmetickey cryptography
Symmetrickay Encryption: It works withthe same key for both encryption and
decryption. Most importany, the symmetric key encryption method can also be used
Lo encrypt data or secure connections to webster. ti also called cryptography with a
‘secret key" The cy problem is thatthe sender and receiver have to exchange keys 5
a safe way, Data Encryption System is a popular system for symmetirkeyencryptien

DES) The key in a cyphers sed by the exyptographicalgriin o encrypt he data. |

and the data must be accessed fo be read. The data can be read by anyone who has
the secret key Examples: AES, DES, le

Features
Ris aloknoun as Secret key eyptography.
Bath parties have the same key tokeeping secrets.
iis suited forbuk eneyptione
Itrequres 1 computational power and faster transe.

see
À h

y re | vo.

“TTT | Enenption | SSL | Deenption ys

ur eure: Pe

Asymmettiokey Encrypton: Different keys are used for encryption and
decryption inthis eryptographie technique. Publ and private key approaches ae used
In this encryption technique. This publ Key technique enables previcut unidentified
persons to exchange information, such as emal addresses. Private keys ald in both
message decryption and the valdaton of digital signatures. The public key can be
‘generated rom the pate key, but the reverse is tue in tems ofthe mathematical
relations betuom the keys, Consider ECC, DSS, ee.

Features:
iis alzoknown as Publickey cryptography
iis oten used for sharing secret keys of symmebie enplography
Itrequres a long processing time for execution.
Plays a sigifcant role in website server authentic.

a

Notes

2 leche Testi

Notes

DT eS Decryption
Public Key Private Key”
Pin Text ier Test Plain Text

4.2.4 Hash Function

CChptogaphic hash funcions accept input data (ci manipulate 1) and produce a
retum witha specfid size (or diges!).Checksome is the outcome, Amos no chance
ests of recovering the Input rom the hash fren suk is clear tom this that hash
unebons are net encryption because the input aná cuputcannet be decrypted

The MOS or "message digest 5° hash funcion is one of the most popular
enplographie hash funcions. For the Cat input, MOS generates a 128: message
gest, whichis commonly stated as a 52g hexadecimal integer. Regardiess of he
size of the input, MOS hashes ave atin for various inputs, MOS hashses appear
5 flows.

Hash This I) B7130838alt1bede09c9380125151ca0

Figure: Hexadecimal representation of input by más

is frequently used to confi that a programmetranstered fe arived safely. For
|intanen. fe you dounload fom the Intemet or 3 server may be comupted, or here

maybe data loss asa result of a us, hack attack, e loss of connection, among other
| ings. Making an MOS hash ofthe fle onthe server and agan forthe downloaded
|e and comparing the reits wi show whether the downloaded fe i identical tothe
| one you intended they match, your fe is fauess. Databases also employ to store
passwords as hashes rather than the anal input

Professor Ronald Rivest created the ‘message digest 5° (MDS) agri. In
addition to develping the RSA, RCS, and MD-message dgest hashing methods,
Rivest la presser at MIT. A Oneway hashing funcion ls MOS. Therefore, must
satis tuo qulties by definition, One, fis one-way, which means that while a hash
vale can be generated fom a message, the message self cant be recreated using
the hash value. Two, there should net be any collins, which means that no two
separate messages may have the same hash value,

lech Tercios

In 1989, Rivest created MD2 for & computers. First, padding I apled tothe
gina! message to make 16bk able A TG-byte checksome is alo added to &
resuting in total ash value or message digest of 128 bis, However, MO? colisins
were qu discovered

Then, in 1900, Rivest created MDS for 32-bt computers. Many cryptographic hash
methods, including MOS and SHA-1, were infuenced by MOS. MOS collins wth MD2
were quickly discovered. Even Ronald Rivest has ericised MDS since A was created
‘ith speed in min, which created numerous security problems.

In 1901, MOS was developed. MOS is almost identical to MDA but has “safety
eta” Though more secure than MD4, itis slower. But over time, MOS colons were
‘iscovered. In 1990, Den Boer and Bosseners discovered the fst colision in MDS.
A projet dubbed MOSCRK was started in March 2004 with the goal of employng
Birthday Attack to ¡ent clio in MOS, ARer Xaoyun Wang, Dengguo Feng, Aue
La, aná Hongbo Yu demonstrated an analical assaut that uns in ust one hour on an
18M 690 cluster, the project was abandoned as early as August 2004, Cea of thee
method were not revealed or securty reasons.

From data provided, MOS generates a 1261 message digest The output needs
to dtingush Rat trom ner message digests

Think of a bits message to process. We must take fe steps in order to
‘comprehend this information, By padding and atacting the input message's bis.
Professor Rivest employed the fist two processes to get I ready for digestion. He
‘employed four word bufrs and four aullary functions that ae intialised as helper
functions inthe hid and fourth steps,

‘Append Padding Bits

‘The fest step isto pad the bus message (he input) so that ts length is equal
Lo 448 dies by 512 In simpler term, the message should be 64 bts shat of beng
a muliple of 512. Thats, the message plus 64 bits of padding should be dise by
512. (Meseages64yS12 wil have reminder 0, W's alvays done, no matter how big the
message is. A 1" iis added tothe message rst, folowed bya series of bs.

Message us +90 088

ame
rg
HERR ole to trot! 01101000
IS sacos ore NON ETES
totor oros ONG oxen orar
roto oros nina eres amonio!
E

Figure: 400 bits original message

2

Notes

En cran cit

Notes mime ER
es
om | + [1] + | EEE

Figure: Fist one" bits added andthen 0 bits

For example, if ur message is 400 is, we add one “1 bit and 47 “2 Bits, which
ives us 448 bas, whieh fs 64 bts short of being dwabe by 512. the size of our
message is 1200 bts, we add one “bit and 271°" bts to get 1472 bits. 1472 plus
64 1 less than S12, Atleast 1 it and no more than S12 ie are added tothe origina
message to make longer

Ancihr important aspect of potetng and making te blockchain unchangeable
is hashing. The term “eryptographic hashing’ refers to the process of convertng
informaton or data on the blockehain into an urveadable unhackable text. This ie
accomplished through the use of the SHA-250 hashing algorthm (Secure Hash
‘Algorthm). generates ahash valu that is 2 bytes ong

Regardless of he length ofthe input vale, the hash is alvays Ihe same length
However, having the same hash values or tint input is impossible, our Input data
is datata for example, the hash value wi be

“o7e42324202ee38fe1SOGS8da8Ssad8dO357BO2 deSescld7SeBSeeds3¥I6387

However. we alter ourinput Data” ith wo capla trs, the hash becomes

S4sSc3aade400eabe 67704 5445e8463Gen64MDe 760149046905 17067

Because of how specsised the hashing process is, even a minor modification in
ne input, such as eter, wilresu à fret output. This allows for quick and easy
detection of reas to data and security

1.2.5 Digital Signature - ECDSA

A mathematical formula used to prove the validly of digtal messages or
documents is known as a digital signature. A recpient has reason to trust that a
| message was created by the slated sender (authentication, thatthe sender cannot
reta sending the message (nn-repudtin) and hat the message was not alered in
| anse thanks toa vad dgtal signature (ntegriy,

| sau ta ene ate nya al dto eve

ined osas gire nae free pro ar ny
stares aaa hun an prone a dre ome oc nd
taba! dure Bane pened a epee un
e een mein nun Y po hy recor Pen
Lepr neni tn pre np e hee
comma

‘The public key. which is ane ofthe pai keys canbe used by anyone. The private
Key isthe other key in the par that is kept private. Any ofthe keys can be used to
encrypt a message, and the key that was used to decrypt must e the opposite of the

lech Tercios

Key that was used to encrypt They Fequerly add a layer af protection and vallon
to messages sent across an insecur route. In many ways, gal signatures are the
same as conventional handuriten ones, yet when used propery they are more diu
to forge than handuriten ones

Lats explore tis idea from a blockchain perspective using he folowing Busan

A publ key (Pu) and a private Ke(Pr are required fer the oyplographie scheme
Hnoun as puble key explography. You maintain the prvate key to yourself wile
distbuimg your pubic hey to everyone. For instance, your Elhereum address is a
publi Key, and your private Key i kept ether in your hardware walet or your browser
‘rbot, Think at your publi key as your bank account number; al someone needs to
‘ive you money (Ether is your public (accourt) address. Nevertheless, because only
eu know your private Key, whichis akin to your bank account password, no ons else
(an access the meneyin your account

You can use your pair of keys lo enerpt, decrypt, sgn, and validate
‘communications using pubic key cnptography, Les examine the flow ofthese phases
using an exemple

4. Signing the message with private key: A ene-way hash af te electron
ata that needs to be signed is produced by signing Software (ike an ema
programme) in order o create a dal signature. The hash then encrypted
Using the private key, The dial signature consists of the encrypted hash
25 well as other deals ke the hashing technique. As a hash funcion may
transfer any input into a set length vale wth 2 predetermined length hat is
‘yplealy significant sharers preferable to enciypt the hash rather than the
ful message or document. As hashing is sigifcanty quicker han ring this
aves ime

2. Voriing the message with public Koy: There would be two parts in is
process: creating the message's hash and deenpting the signature. was
Possble lo decrypt the hash using the signers publ key, This decyped
hash confems thatthe data has changed since twas signed it agrees
wth ances computed hash ofthe same data the two hashes dont match,
ther the data has heen atered (integiy) or the signature was made using
a private key that doesnt match the public key thatthe signer has provided
(cutherticaton)

Role of Digital Signatures in Blockchain

Blockchans essential bulding compenent, digital signatures, are primarily used
to authenticate transactions. Users must prohbt her users ram using the funds by
“ubmiting transactions that demonsate to every node in he system that they have
the ight odo, To agree on conectate, every node in the network wil cont the
transaction that has been submited and check the work of every other node,

\ Aloe wishes to transfer Bob 1 bean, she must use her private key to sign a
transaction that uses 1 con in inputs and submit it to network nodes. The terms of
te tansación wil then be reviewed and the signature wil be von by the miners
using her publ key. A alter or miner can now false the Bock containing that
transaction ater validly has been established,

as

Notes

26 leche Testi
What is ECDSA?

{pte cure cryptography Keys are used by the Epic Curve Dial Signature
Algorithm, à Digital Signature Aigorthm (OSA). It is a very eecivo equation that
is based on publi-key enptography. ECDSA is utised in many secury systems, la
Popular in encrypted messaging apps, and isthe Backbone of Bol security ut
Bco addresses funetining as public keys)

Epic Curve Digtal Signature Algerthms (ECDSA) have recently gained
substantial interes, particularly fom standards developers, as aternatves to existing
Standard enptosytems such as Integer factorzaion erypiosystems and discrete
legarthm proble cyptosystems. Crypto-algorthms are alvays the most impertant
foundational instrument in securty aplcalons

Notes

Digital Signature of ECDSA

A igtal signatures the handurten signature electrons counterpart that enables
a redpient to convince a thd party that a message was acualy sent by the sender.
Compared to digial signatures, handuriten signatures are much less secure. A
gta signature cannot in any manner be faker The fact hat hey apply to the entire
message gives dial signatures another Benet ave handurien one.

‘The signature key has an impact on every aspect of the dial message. The
application of à handuraten signsure Lo the Bolom of a paper document. Nothing
presents the text that appears above the serbbled signature from being changed
as long as the signature lie says me same. Such modifcabons are not permites
‘wth dgtal signatures A muthervatcal proble that forms the basis of today's digital
Signature techniques can be used to assi them:

Integer Factorzaion (IF) Schemes: They base their safety on the
lntracabity ofthe Integer factorization issue. One Husraln is the RSA
‘Signature Sytem,

Diserete Logarithm (DL) Schemes: Their seeur Is predeated on the
“serte logarthm challenges insurmountable duty in a fete fla

Elipto Curve (EC) Schemes: They base ther safety on the itracabilty
tthe diseetelogattm problem for lie cures. For instance, the Elite
‘Curve Digtal Signature Algorthm, which is unquestionably the most eurent of
the various designs is being used in ne inquiy.

| Domain Parameter of ECDSA

| Acharcterstcaly characterised ele cure E over a dscree space Fqwth a base
point G Doman parameters maybe shared by several ene or specie one user.

‘Domain parameter generation methods:

The fallowing is an example of how to ceate domain parameters that are
enpiographialy secure:

Step 1 Select counts a and rom Fa verifae using a random method
Step 2 Comput the value cf number N.
‘Step 3: Very Nis dile by ql or each k where kranges rom 11020

lech Tercios
‘Step 4: Very N doesnot sible by ak 1 foreach k where k ranges rom 1 o 20.
Step 5: Very N isnot equalto a i nt then goto te 1
Step 6: Select an arbitrary pin Ge Ng and set G = (un

Domain parameter validation:

Domain parameter validation verifes thatthe parameters have the required arithmetic
‘ropes, Domain parameter validation card aun practice fortwo reasons:

To avoid the purpose insertion of ncomect domain parameters, which cou |

facitate some stacks

To ind unintentional coding er communication errs. |

The intended security quaties may become useless ifthe wrong callcton of

domain setings is used. was show tat domain parameter validation fra signature
‘scheme is not dene, a speci (lbelt improbable) atack can be caried out. The
ElGamal signature technique based key agreement protocol isthe target ofthe attack.

Steps for Domain Parameter Validation,
Step 4: Usage of specif algortim i usedto do explct domain parameter vation,
Step 2: Dis generated by A utizing a trustworthy system,

Step 3: À cbtains confmaten from usted pat , a caricaton authority that T
‘validated D's explicit domain parameters using a specified algrthim

Step 4: A btins assurance from a trustworthy thes party T that D was generated
sing a trustworthy system

Benefits of ECDSA

1. High Security isapariculrly power! equationbasedonpubickey cryptography
(PKC), ECDSA is commonly used in eneypted messaging apps and I the bass
ot Bites security. Smaller keys ae prefered over larger keys fr a variety of
reasons, Faster algortms can create signatures since the arm ei is easier with
mater keys

2. Good application performance: The ECDSA dial signature algrthm uses
ECO to const he key pas required forthe signing and vertiation ofthe dal
Signature. Due tos benefi over anerpublickey algrthms, ECC is eommenly
employed in bckenai applications to sign transactions or events

3. High speed of verification: An ECDSA signature is valdated using the signed
message mag, the signature r,s produced by the signing method, and the publ
Key pubKey that matches te signer pvate key A boolean value, ether valid or
inva ite outcome,

4. Support government standards: The Oigtal Signature Algrthm (OSA) standards
are contained in the Digital Signature Standard (DSS), a Federal Information
Processing Standard (FIPS) o he US government, The securty ofthe discrete
!ogathm problem (DLP) is based en the computational nratabty ofthe DLP in
prime order subgroups ofZ

E

Notes

Notes

5. Complaints with modern requirement: ECO comple with FIPS because, along
swith RSA and DSA, ECDSA is one ofthe FIPS-approvedalgorthms fer asymmetric
key functions in FIPS 1402. | uses public key eryptography ands avery power
equation (PKC)

Limitaions of ECDSA

1. Standard curve: Secure implementation i chalenging and dif, especialy tor
raditonal cres, Partculry ECDSA, which isa hack in comparison to Sehncer
Signatures, modern standards are out of date,

2. Signing verification error: Ifa flawed or carupted random number generator is
used fe signing, the Key is compromises

3. There are sil some patent dut, particulary for binary curves. might be
prey

4. Problem with curves: sl has some patent ifcuties, particular for binary
curves. it might be pricey. The development of quantum computing esearch and
ne ing use of etic curves have dashed

5. Tho sizeof eneyption process: The main isadvartage of ECC encryption over
IRSA encryption ital significan increases the ze ofthe encrypted message.
“The ECC agotthm salsotiekirtoimplementthan RSA whichraisesthe possibilty
ofimplementaton ners and redctes the securty of the method

6. Tho same random value: Private key fo ion obtained via ECDSA signatures.
“The usage ofthe same nonce value across many messages is one ofthe flaws

‘Applications of ECDSA

‘+ Systems that rely on ECDSA, Ike Bien, are an appropiate lsraon. Each
Bain address is produced by enptagraphicaly hashing an ECDSA publ key
“The actual ours of the account is whoever has access tothe ECDSA rate key.

‘+ Tiis suggest that ECDSA and RSA can both provide the same level of security
‘he ulliing smaller keys. Smaler keys are preferred ove larger keys fr a
Variety freasens, Faser algorithms can create signatures since the anthmei Is
faster vith smaller keys

‘Smaller publ keys imply smaller certificates, thus less data must be provided in
order to establish a TLS connecton. This leads to quicker connectivity and quicker
page leading

1.25 Memory Hard Algorithm

A memory hará algrthm is a type of computer algorithm that is designed to
consume a large amount of memory (RAM) in order to pefom a computation. Tis is
in contrast traditional algorithms, wich focus en miming the numberof operations
required to pero a computation

The goal of memenshard algorithms is to make computaonaly expensive for
an atacker to perorm certain types of computations, such as hash computations or

password cracking. By requii a large amount of memory. these alorths can make it
prohbitvely expensive for an atckerto perform the computation on a standard computer,

lech Tecos

‘There are several popular memary-ardalgerims in use toda, eluding Argo,
‘np and benpt, These alors are commonly used in password hashing and hey
eva functions, where is Important to protect sensitive data rom brute re ack

Memoryhad algorthms are commonly used in Biockehai technology special
in the mining process of certan cyplocurencis. The most popular memory hará
algrthm usd in blockehain mining is Ethash, whichis used by the Bhereum network

In bcckchain mining, miner compete to solve a complex mathematical puzzle,
‘which requires signant computational power. By using a memory-har algorithm Ike |
Ethash he puzzle becomes much more dic o soe, as A requires a large amount
‘of memory to complete, This means hat miners must invest inexpensive hardware win
it memary capacity tobe abe to mine fiin.

The use of memon-hard algorithms in Blockchain mining has several Benes.
Fir, aps to decentalzo the ining process as becomes mere del for miners
with a lot of computing power to dominate the network, Second, R heps o prevent
the use of specialized hardware Ike ASICS, which can give cera minera untar
“advantage. Final, can make te mining process more nergy-efciet as miners are
Incentive to use hardware wih a higher memory capacty rater than ring on aw
‘computational power

Memory hará functions (MME) ae functions that are moderately felt to compute
bath in terms of time and memory, he sense tha her computation Is subject to a
trade-off between the Me: relative fast computation necesstates memory whereas low
memory imples slow (or even very slow) computation. This guarantees, for instance, that
the areacime complex of spciased hardware (such as ASICs) required to evaluate
MHFS is high (and consequent thatthe price of this hardware is high), and this fac
makes them suitable fr password hashing, password based key derivation, and prof of
‘workin enplocurenies, where attackers may use such hardware

Percival suggested Serypt, the fist usable MHF. Begining with Alwen and
Serbinenko, a number of studies have been devoted tothe theoretical study of MHS
(eh e 9.[1-2.12:14)revealng tas in resort design Ike Argon2 (he winner ofthe
passuordhaching competion), Catena, and Baloon hashing

1.2.7 Zero Knowledge Proof

Zero knowledge proc is a cryptographic technique used to prove the authenciy
‘of statement without revesing any addtional infomation ether than the vaky of the
statement. In or words, it alows one paty to prove 10 ancther party ha they have
Knowledge of a specie pace onfrmation, without actualy revealing te information se.

This iscinique is used in various fell, ncludng blockehain technology.
enptogrphs. and authentication systems. One example of a use case for zeo-
knowledge proof isin password autentica, where à user can prove tha hey know
a pascwerd vial revealing the actual password tothe authentication system,

The base idea behind zeroknowedge proofs is that one pay the prover
demorsrates to another party, the veer, that they know a secret value or have
access to a particular resource, without revealing any adioaliformaton about the
reel value or resource. The proof is accomplahed bya seres of interactions between

»

Notes

« leche Testi

the prover and verifier, during wich the prover provides evidence that convinces the
Notes verter ofthe tru ofthe statement, but out revealing any ational infomation,

Some examples of zeroknowledge proof protocols inde 2k SNARKS (este.
nowedge succinct noninteractive arguments of knowedge). which are used i
privacyfocused erplecumences the Zcas, and buletprcca. which are used in
Monero. These protocols allow for secure and private transactions witout reveatng
any ational infomation beyond the val ofthe transaction isl,

Technology development has lato an expansion inthe brendh of Saudulet actions
over ime. Hence, one ofthe key dus involved inthe transaction process i malting
secu protocol, though blockchain has emerged as one of the most promising
breakthroughs, we sl require entra secury measures to guaratee transaction secuiy.
Zero Knowledge Prof often known as ZKP, à good chic in certain stations.

‘Blockchain has been Inkad to oyplography since 1 conception. But flowing
the introduction of ZKP. many have stated to pay atenicn tothe blockchain and
enplography combo, On a bleckchain plat, the transaction ie entirely secured
ang eyptgraphie methode In ter words, a secure method of conducting Snancia
ansactons has been provided bythe combination of leckchain and enplography.

Zero-Knowledge Proof is a enptsgraptic technique where no information is
revealed during a transaction except fr Ie interchange of some value known to bot
the prover and vers (he two ense ef he process), The idea behind zeroxnowledge
proof that a user can prove te ances user tat they know an absolut vale thot
actualy reveaing any oer er extra information

ZKPs have he following three inherent properties
Inherent Properties of Zero-Knowledge Proof

E omy
== «=»

Completeness: The completion property Indicates thatthe transaction has been
| confirmed and thatthe provers fee to proceed wih processing A. The verter has the
poner o gue the prover the input he intially requested when the wansacton assertion

Soundness: The transaction conect and not connected to any fraudulent
ac according tothe soundness property. That means thatthe verter cann be
persuaded under any circumstances ifthe transaction scenario is diferent and the
statement ls flo, In ths cae, nether the prover nor the provers request fr ne inputs
maybe centted bythe verte.

Zerorknowledge: The only information availabe to the venir is the eurent
statement and whether o not Ihe statement is authente. Al ther infomation and
personal data rom diferent parties wil be concealed

lech Tercios

At the most fundamental level, construcing a Zero-Knoviedge Proof necessiates
the ver asking the prove a sequence of questons about the actions that can be
taken when the prover accurately understands all the necessary fats. Ris more tkely
thatthe vee test wil imately show the prover tobe inceret

“The flowing are examples of he to primary categories of 2KPs:

Interactive KP

The concepts” accompanying actions relate vith mathematical probably. I
Interactive ZKP a prover must persuade a pau

‘each addtional vere, To persuade the vere of a particular fact in interactive ZKPa.
the prover must cary cut a et of tasks.

Nom interactive 2KP

‘There is no veluntriy occuring interaction between the prover and the ver in
onvinteracive ZKPs, Wh non-interactive ZKP, a prover provides a piece af evidence
that anyone can check, and the verfeation process can even be deferred. The require
‘specialised software n order to improve the noninteractive ZKPs! mechanism,

Lets now comprehend the ZKP notion and how it relates 10 technology, Zeash
ls a wet-known applcaton of Zero Knowedge proof. The fst use of M SNARKS
as nthe eypocureney Zeadh, wich lso serves as the bass fr Zeo-Knowledge
explography,

Now, we must comprehend what 2k SNARKS are. Zoro Knowedge Suscnct Non
Inerachve Argument of Knowledge, or zk SNARs, 1 a0 acronym, Atechneogy called
2A-SNARKs makes advantage of noninteractive ZKP.

‘The three methods let below are suppeted by 2 SNARK.

Key Generator
A parameter is set by a key generator lo create a key pal Here, ater creating a
private or public key pair. a usted source can remove the private data. Then, using the
avalable data, anew key pais create, One of these would be used for prono, and
the ober woud be used for vera
Prover
‘The person who needs to vr ther knowledge is given the proving ey He wil
gehe secret key, check, andihen send the statement on
Veriter
‘The prover vl provide input, andthe ver wil confi the veracy ofthe statement.
Moreover Ze SNARKS must upheld the folowing four characteristics.
‘Te statements the ony thing the verter wl erm should ony take afew
roliseconde to complete a challenge need to be brit.
Noriteractive: The procedure ought to nt involve any interacton

‘The proof must adhere tothe soundness principle and use zeroknoweige
enclin.

verte befere doing the same for |



Notes

2

Notes

without aralable winess, neither the prover nr the verifier can continue the
procedure
‘Advantages of Zero Knowledge Proof
Simplicity
Maybe the most welbknown characterise of ZKPs is simple, ARR A doesnt
require any sotware expertise to use, it can provide better soluens that have an

impact on cur daly He. Furthermore, because it is enr unenented ya extremely
safe, may easly provide the best ofboth wor,

Vient comes to transfering information, ZKPs are que safe As a rest, a user
can use & confidently wihout having lo be an exper n coding cr analytes to grasp
ite fundamental,

Advantager of 1ero-Knonisdge Proof

g 0.3 æ 6

Time saver

ZKPs reduce the amount of tine needed for Bockehain transactions wile
providing users wth value in an honourable way.

Privacy

‘The most admired quality of ZKP Is protection of users’ privacy, never calls
Torthe disclosure of pvat information, making incre, private overall

Safety

Users of 2KPs are aware that ZKPs must exchange data, and they should avoid
any business that requests access to ther personal data witout a good jusiiaton

‘Applications of Zero-Knowledge Proof
ZKPs ae also uted in privat transactions that conceal financial data and sender
and receiver information, in alten to seme blockchains Ike ZCash. 2KPs some facts

about fin data canbe used by the decertralsed Oracle networks that otr smart
contacts of chan data that telly disclosing o-chan information,

ZKPs are used on the blockchain by DECO, a pivacy-contoled crave system
running on the Chainink network DECO extends HTTPSITLS, the most fundamental
data transfer protocols, o ensure that dala wil remain private and impenetrable. DECO
uses the most recent TLS version, require no specialised hardware, and functions
Dackwardcompatblely wih no server-side medications. Hence, DECO-enabled
chainink oracle nodes can very the authentic of data obtained from reliable servers

lech Tecos

without disclosing on-chain information. Banking and fnancial organisations can offer
ündercolateraszed loans ater the borower has established credtwortiness thanks o
“mar contacts that resemble DECO, Without disclosing privat or confidential infomation,
the borromer can produce credentials based on records fom rlabl sources.

Users can access plafoms powered by ZKP where Decentralized dently protools
Ike CanDID are avalablo where they can cblan their data and credentials wahout
depending on a third party These credentials are authenticated by issuers who can
‘conclusively Ink user clins to things Ike eazenshp, employment, and edicabonat
background. A concealed type of Sybil resistance, DECO permis an existing web server
to act asthe issuer wäh key-shaing management and back up accounts and pricy
‘using Social Secunty Numbers and cnr unambiguous unique entr (SSNs),

DECO assists conventional instutons and data provers in a private way by
‘ing a mechanism to monebse the confidential and excuse dataset. These service
rovers can acess attestaons fom ZKPS to conti facts about he data that wil De
published rater than uploading all data on-chain. Win no data leakage, opens up a
‘ew market or data providers to monetize and boos the revenue from tha datasets,

summary

+ Blockchain is a gta ledger technology that allows fr secure, transparent and
tamper-proof rcorskeeping, is essentaly a dbuted database that stores
Information across a network of computer, uh no ingle entty in contr e the
data, Each block in he cain contains a record of recen trnsactions, and ence a
Dock added to the cha carnat be atered.

+ Ina Blokchaln network, the distributed database isthe core component ofthe
System. A distributed databases a database tals spread across mutile nodes
or computers, rather than being tores in singe location. Each node inthe
network has a copy ofthe entre database, which I updated in regime as new
blocks are added the locken

+ Two Generals’ Problem refers to the challenge of achieving consensus in a
decentraized network. Consensus is the process of agreeing on a single version
ofthe truth, whichis necessary fr the blockchain network o function efect

+ The Two Generals Problem is related tothe Byzenine Generals Problem, which
is ancther classic computer scence problem that descrbes the challenge of
achieving consensus na distrbuted system where some nodes may be malicious
faulty In leekchin, Mis is ofen refered to as the Byzantine Faut Tolerance
problem, which is he challenge of achieving consensus ina network where some
nodes may be conpromised or Behaving malciousy. SoMng these problems is
essen for ensuring the secunty and relabity o blockehain networks.

+The Hadoop Distiuted File System (HOF) i distributed fle system designed
Lo store ard manage large amounts of data across mutile computers in cluster
lis core component ofthe Apache Hadoop ecosystem, whichis widely used for
big sata processing and analysis.

© A fom of dsrbuted system known as a dtrbuted hashtable (OHT) offers a
ookup funcion resembling that ofa hash able. Data is saved and retieved ram
hash table using keys, and the keys ar used to identity te das placement in



Notes

“ cken Testi

‘he table, Sinise toa traditional hast tale, aditröute hash table stores data
Notes Over several network des as opposed to just one.

‘Cryptography is a means of protecting sensitive information agains unauthorised
access. Coptographic techniques are used in securly protocals on the
Bockchan, ensures that a transacton between two nodes in a Wckchan

networks secure,

+ À memaryharé algorthm Is a type of enptographic agorihm designed to
be computationally intensive while also requiing a lage amount of memory
tobe executed. The gel of a memor-har algorithm is to make a deu and
expensive for attackers to perform certain types of aacks, such as brite force
attacks and Ime-memory rade-of attacks.

‘© Hash functions are widely used in cryptography for various puposes,incluing
(igtal signatures, message auhenteaton, and password storage. In these
applications, hash funcions ae used to genarae a unique dial Ingerprn of à
message, which can be used to detect any changes or medifetins made othe
orginal message,

Glossary

+ POP: Peerto Peer

© DLT Distributes Ledger Techrciony

+ EGP: Byzantine Generals Diemma

+ BFT Byzantine Faut Tran

Po Prot of Werk

oT iemat of Tings

+ Bloekchin: A blockesn is callcton of locke, each of which is linked tothe
ones before

+ DDBMS: Disrbuted Database Management Systems
+ Pos: Prot of Stake

+ HDFS Hadoop Distributes File System

| + APt:Appleatien Programming terface

+ Check paint A checkpoints a permanent copy ofthe image hat has been saved
tod

| + RAM: Random Access Memary

‘+ DT: Distributed Hash Table, A Distributed Hash Table (OMT) is
storing dat hat is described as data based on keyvalue pairs.

‘+ Hash table:A hash table is dat srucure used to map keys to values.
‘© ASIOS Applcaton-Specit Integrated Crus

+ As: Decentralized Autonomos Organizations

technique for

© EVA: Ethereum Vital Machine

+ OTP:onTime Password

lech Tercios
+ AES: Advanced Enarypton Standard

‘+ DES: Data Encryption Standard

+ MDS Message Digest 5

+ SHA: Secure Hash Algen

+ PK Pub Key nfastucture

‘+ DSA: Dpt Signature Algora

+ EGDSA Bip Curve Digital Signature Algorithme
+ PKC: Pub Key Cryptography

+ DDS: Digital Signature Standard

+ DLP: Disrete Logarthm Problem

+ FIPS Federal infermation Processing Standard
+ MHFs: Memor Hard Functions

+ Sole: Social Securiy Numbers

Check Your Understanding

1. What is a decentralized, shared ledger that makes it easier to record transactions
and rack assets in a corporate network?

2 or
b. Bockchain
e Cryptography
Bteoin
2. What isa witepaper on a Gal payment system called and who published?
a. Cryptography, Von Nuemanm
b. econ, Satoshi Nakamoto
©. Merosot, Bil Gates
4. Nene ofthese

3. What isthe conce o stituted storage of transaction data in redundant edger
copies roer to 257

Bocca
Bteoin

Distinsted Ledger Technology
Coryptocurency

4. Which ype ofblockchain secures interactions between a set o entities that have a
commen aim but do nt ently ust ene anther?

à. Permisioned
D. Pemissiniess

4s

Notes

se leche Testi

es ©. Bhereum

lotes 4. Bacon

5. What isa methodology or reaching an agreement about the sat o matunsioning
nodes na network that has been widely uiized in IT solutions?

2 or
D. Baco
e Biockcnain
a er

6. What are ODBMS proocaisi that they maintain a consensus about he existence
and status of a shared set of facts but they do not rly on this assumption of

good ath?
3. Biockenain
D. Bacon

©. Distritos lees
4. An ofte above

7. What is a technique for adding new blocks of transactions to a eyptocunency's
Dockchain?

a Proofot Work
b. Proofot Stake
©. Prootot Power
4. an ofie above

8. Vilchis a dstbuted fe sytem designed to store and manage large volumes of
data across mutiple commodiy servers?

a. Disrbuted database management system
D. Disrbuted network

©. Dirbutes framework

| a. Hap astrbuted fie system

9. In which fies and drecoies are represented by Inodes, which Keep tack of
information ike permissions, modicaton and access mes, namespace, and dsc
| space atten?

am
>. Hors
© Namenode

4. store above
10. What sa permanent copy ofthe image that has been saved to ise?
a. image
bo Checkpoint

lech Tercios
e doumal
4. Metadata

11. The Mle system metadata known as Ihe _ expla
orgarisedinto directores and les.

2 joumal
D. checkpcnt
©: namespace image.
4 storage

12. Wnatis technique fr string data that is deserved as data based on key-value pas?
a. Distributed nash table
bo Disibutad le system
©. Distributed database

how application data is

4. Distributed network

13, In which process the key or he hash tables obtained using a hasi funtion, and
‘tis then converted into an index na! pins to various arrays of burtets which ae
‘were the data wi kept?

2 joumal
B. colision
& Anton
4. ashing

14, Vitis result ofa function that caleites an index nto an ray of buckets fom
which he desired value canbe reieved?

a. Hash code
bo Hashtable
6 Hasting
4 Hash nein
15, What isa data structure used to map keys to values?
hash codes
hash tables
hash funcions

none ofthe above
16. What isused to process the data and produce asma! key?
hash code

hast function

hash able

hash data



Notes

«e leche Testi

17. Which resistance refers tothe design ofa bockchain protocolin such a way at
Notes makes fut er unproftable for specialized mining hardware call to patate
Inthe mining process?

a où
Bor
©. Application speci integrate cuts
s. our

18, What is a rm used in computer since to desenbe a system cr programming,
language ati eapableofpererming any computation rat can be performed by a
“Turing machine?

a Hashing
D. Decenratzation
€. Resistance

4. Tuing complete

19. What are settexecuting contracts with the tems ofthe agreement between buyer
and sal being drcly writen Into Ines ct code?

Smart contracts
Turing complete
Hashing
Dietrbuted system

20. What ae the methods used to authenticate the ety ofa user and ensure the
integay ota ransacion?

hashing
D. gta signatures
zero knowledge proofs
6 Mole ove

| exercise

Defnethe tem bicckchan
Vite hor note on Hadoop Distibuted Fe System
What do understand by two general problems?

Explain cryptography and various types of eryptography,
Detmeinetem

3. ASICResisanee
b. Tuing Compe

©. Digital Signature ECDSA
44. Memory HardAlgeithm

lech Tercios

Learning Activities

4 Define the blockchain use cases in Healthcare sector. And How Blockchain

transforming eatheare?

2. Elan various Pubic and permissoned bockchain and atleast explain 1-1
enplocurency fom each type.

‘check Your Understanding - Answers

1.
a

1
15
w
19

Further Readings and Bibliography
1. Blackhain fr Intemational Security, Cindy Vestrgnard
2. Disruptive Technologies: Understand, Evaluate, Respond, Book by Paul Amstrong
3. The Future of Disruptive Technolgies, Srikanth Gaddam

4. Blockchain Revoluton: How the Tecnology Behind een Is Changing
Money, Business, and the Wo, Alex Tapsct and Don Tapscat

5. The Basics of Becoins and Blockehains: An Introduction to Cryptoourencies
and the Technaogy that Fowers Them, Antony Lewis

|. Mastering Btcoin: Programming the Open Blekchain, Andreas Antonopoulos
7. Blockchain, Melanie Swan

2
4
6
a
10
12
16
18
20

»

“o

Notes

Module - I

Notes : Block Chain Technology

Learning Objectives:
[At the end of his topic, you wll be able to:

Define the basics of Blockchain systems
+ Infer te base concept of Blockchan network
+ Explain the process of Wining

‘© Define thee of Blokchain application

Introduction

Blockchan is technique for string data tha makes A difcut or impossible
forthe system to be alered, hacked, or therwise abused, A blockchain isa type of
diirbuted ledger that distibutes and copies transactions among the network of
computers involved,

Blockehain technology ie a framework fer string puble transactional records
(sometimes refered to as lock’) across mle databases in a network connected
bypeertopeer nodes. This ype of storage is requenty referred toas gta ledger”

[Every transaction In this ledger s validated and protected against fraud by the
‘owner’ dial signature, which also serves o authenticate the transaction AS a result,
the data inthe dial ledgers quo sate.

‘The dial ledger can be described as a neberk of computers sharing a Google
spreadsheet where transactional data are kept according to acu purchases. The
Intriguing aspects tat whe everyone may view the data, cannot be atered

How Does Biockchain Technology Work?

You may have observed that several companies have been incorporating
Blckchain technology in recent years. But how does Blockchan technology actually
operate? Is this a substantal modifeaon or merely an addition? Lets sar wit
damystiving Blockchln techneogy sine its sil i its nancy and has the potential to
| be evaationary inthe ture

‘Combining three popular technologies, lechal
Cryptographic keys
Apeer-to-peernetwak containing a shared ledger
Ameans of computing, tre the transactions and records ofthe network

‘Two keys make up a erptography key: a private key and a public key These
secrets ald in the execution of success transactions invohing two partes. These
two keys are unique to each person and are used to create a secure digita identity
reference, The most signifeart component of Biockchln technology is this
protected identification. This identity is known as a “gta signature in the real of
enplocurencies ands used approve and manage transactions.

lech Tercios

The peertopeer network and the dgtal signature are combined; many people
ho serve as autherites use the gta signature to agree on transactions and other
mater, As soon as they pprove a vansaclon, kis mathematically verte to ensure
that ffs val, whieh leads fo a success secured transaction between the two
networkeconnected pares In condusion, cryptography keys are used by Blockehain
users to conduct various Hinds of digital exchanges across he peer-to-peer network

2.1 Overview of Blockchain

In 1000, he fle sharing network Napster introduced a hybrid peer-to-peer network |
{bd since & us a central rectory server) that made it simple to dstrbute audio
es typically containing music). That fle-sharing netwerk dd more than just distrito
muslo Mes: also permitted al users to keep copies of those shared fs, resuling
in an inte number of perfect copies across a worldwide newark fem a ange.
ital asset, Tower Records was forced to cose al of is 89 cutlets in the United
‘States by 2006 because to the casual esse with which anyone wäh a computer could
leverage technology.

The subprime mortgage crisis occured in 2008, during which long-established,
prominent US. fancilinttuions and insurance fms fled bankruntey or were an
the verge of doing so. In order to avoid a domestic and posely worldwide Ananda
disaster, quick federal government intervention was requires This significant
‘occurrence made the public wary of centralised banks and highighted the dangers
‘of fnancial ledgers being dose to puble scutny. The Heanland Payment Systems
‘ata breach, which occuned in March 2008, revealed! mere than 130 millon ced card
‘umber, many of which were later used to make fraudulent purchases.

“These incidents highight the dangers of hing na ia, inked work that eles on
transactonfee-generatng middlemen and exposes people to ital abuses, avarice
and criminal act. The academie question became how to develop adsintermedited
‘ital Infrastructure on whieh à gta asset can be openly and relably tansered
(caer than duplated and shared) fom owner Lo cum, that is secure and can be
usted, and that has no comuptble or fable central auhariy.

The Biteoinbleckehaln isthe fst pracca appication of blockehain technology
in the word As a resul of this sino, 'blcckchan” is frequenty mistaken as
8 synonym for “leon” Mosem blockchain technology product, on Ihe other hand,
mener dgta assets other than digital currendes, and those Mockchains cperate in a
ver dret way fe Btcors lockehan

Further, ne Sitcom bockcha pepularsed the concept of a blockchain as a
data structure that vituatzes a bank ledger by tracking cres and debits wile also
rowing an nova, eryptogaphi soliton that effectively prevets enplocureney
unis fem being double spent. As resul, phrases Ike "al ledger” and “double
spend" have come tobe linked with Bican beckchains. Nonetheless, these words
wily apply to tracking ownership and enforcing a single digital asset transfer. Dont
‘assume these terms just reer to eyptocureney-elated blekehaintechnlogies when
you se thom.

st

Notes

s leche Testi

24.1 Introduction to Blockchain Systems

Eleckchain is a decentralised, shared ledger that makes easier to record
transactions and rack asses in a corporate network. A tangible asset, suchas a hause,
ar. cash, or land, or an intangible asset, such as inallctual property, such as patents,
copyrights, or branding, are examples of assets. On a blockchain network, Vitualy
anything of value can be recorded and traded, lowering risk and cuing costs fora
pats involved,

Notes

In November 2008, the concept of a blocichain was cviginy proposed. A
‘wtepaper on à digita payment system named Bicoin was publshed by the person
or entity known only by the pseudonym Satoshi Nakamoo. In 2008, the system
was insaled and launched fr the fx time, ntroducng à fully funcional and
dsrbuted ledger. Bin I ui en a peertopeer (P2P) network that synchronises
all tansactons en a single pubse ledger As a res, every network partpant has
access to the whole transaction history. Transactions can ony be wrten or updated by
Bunrsed paipants hanks tothe use of sat cspiography techniques

lin eecvel Incaporated prior cenibuiens from decades of research, and
most eral, soved several base chalengez in a smart and practcal manner. ln
the world of computer scence, blocichatn technology ls tl a rlatvely new method
It isa new technology thats current being researched and evaluated fra variety of
applications and use scenarios,

‘Since the ea 1080, the concept otal distributed meney has been discussed.
A single organisation does not contol or operate distbuted money. I should fly
eliminate intrmesiris suchas banks, allowing only a payment sender and receive to
transfer oumersip rights. tempts to construct distiouted curencies inthe past have
always fled because they all rely on a trust model wih a central authority that provides.
A clearinghouse sent or tansacton vefesen and ownership reer organisation

As a recut, such authors have complete coil over the infermaton held on
centralised ledgers. The concept of a fly dsbuted ledger was introduced to tackle
this problem. The power to contol Ihe stored data should not be vested in single
or exchcnvly designated group of autores. The concept of distibuled storage
of tarsarion data in redundant ledger copies is refered to as Distrbuted Ledger
‘Teeinlogy (LT). The data distribution a wel-Anoun and soles issue. The task and
| purpese sto obtain agreement on al distributed data copies

A blockehain is a new way of mplementng a atrbuted ledger. Unt the debut
| of Bo, however, a attempts to construct a completely distributed curency were

doomed to fal due to a fundamental unsolvable problem. The risk of twice spending
tins was a problem for dirbuted curencies, Because dial copies are easy lo
make, a single sender might send te same cin to two or mare diferent recipients at
the same tim.

For distributed eurenies he so-called “double spending problem isa significant
change. Satoshi Nakamoto proposed a sion to this challenge wäh the publishing
of Btcon in 2008. The concept described bythe word blockchain ls the central strategy
of this son. By specthing a chronologial order of al ransacions, a blockchan
overcomes the problem of double spending we or mee transactions are fund o be
in conti, only thefts approved, and the ethers ae deleted As a resi, one might

lech Tercios ss

think of a bochchan system as a distributed timestamp server. This notion allows fora
‘ingle ledger to be used asa single source of truth. In a decentralised P2P system the Notes
Problem isto reach a consensus en the status ofthe ledger among al partant,

‘The Byzartine Generals Diemma has the same challenges as he dovble-spending
problem (BGP). The BGP addresses the issue of reaching mutual agreement cn a
consistent sate fr distributed data, The if of ferent spatial persed generals
besieging a ty and tying lo agree on he ideal moment for an attack is described inthe
{famous analogy Ns a chalenge of communication, coordination, and synetvonsaton

A practical salue to this problem is far rom simple, especialy in the presence cf
selfch rev individual, such as a general acting as a rater Introduce the concept cf
a eting mechanism as one way to handle this challenge in a decentralised context. In |
theory ithe majority of peers are honest. avetng network of pers can reach a tue
and consistent netwerk slate. AS resul, election can lead to avai ledger sae, Le
‘systemwide consensus.

‘There are no problems if the paricparts trust one ther and can communicate
dreciy. À remote veting mechanism, on the ether hand, nroduces weaknesses
and is vulnerable to variety of stack vectors. As long as the term n 2 31+ 1 is
said, the BGP reaches consensus under the premise of synchroneus and reliable
‘communication. The original problem description describes n physically distant generals
attempting to agree on abate strategy via messengers. F rars on the other hand
aim to sabotage the deal wth fn. As long as he number of malicious panicpants is
less than oneshied of al patpants, a decenvalsed aystes can tlrate fates (or
trator). Byzantine Faut Tolerant systems are those tha! ae resistant to byzartine
tales (SFT.

From a practical standpoint Nakamotos ockchan architecture master the 8GP
and stikes a balance between easy and securty Blc amblious design allows for
an increased BFT of 2 21+1. As a resut the proportion of malevolent paricpants has
‘sen fom ess than a thio less than hallo al paricipants. Asa res, can serves
as a praccal example of he theoretical assuinpton of consensus networks based on a
‘matty ve. The network wilhave a quorum and fnaly attain consensus if St percent of
all vansacton valdatrs are hones. Bion, or more precise). the Nakamoto consensus
process hat rons on A marked a walershed moment in practical décentralisation

A blockehain can be characterised as an immable ledger for recording
transactions that is maintained inside a atributed network of mutuly unrusing peers
on a technical level. A copy ofthe edger is kept by each peer To valdate transactions,
organise them into Rocks, and bull a hash chain over the blocks, the peers use a
‘consensus mechanism. This procedure creates the ledger by arranging the transacons
In he order roruire for consistency. Bol (Mp / Dicln om) pioneered blcekchain
technology, which is widely regarded as a promising technology fr running relaie
digital exchanges.

À Bol lockchan is public. or pemissoness in th sense that anyone can on
without revealing the identiy. The consensus protocol fr such leckchans is usual

ases on proof of work (PoW) and economic incentives. Permissoned blekchains,
‘onthe other hand, have emerged as a new technique to run a blockehan between a
graup of known, identifiable members. A permissioned bockchain secures interactions

se leche Testi

between a set of ent that have a common im but do nat entre) trust one ances,
Notes such as fms that exchange dollars, goods, er infomation. A permisioned blockchain
{sone that i based on the idetes of ts peers and may thus use the tadiona:
Byzamine-autolerant (BFT) consensus. BFT is a methodology fer reacting an
agreement about the state of malunctoring noes in a network that has been widely
used in IT solutions. This protocol is based on the Byzantine Generals Probar, in
‘which a group of generals must agree on a strategy, yet one oftnem could bea trator.

Ethéreum (htp/tnereum erg is an example of how blockcains can execute
ablar programmable transaction logic in the fom of smart contracts. Btcan scripts
‘were the forerunners of tis nein. A smart contact i a trustworthy, danbuted
application that derives its securty rom theblockchan and undering peer consensus.

For businesses wishing to use the bleckchain platter, disinguishing permits
tom a permissonless blockchain is el. The use eave determines Ihe technology
10 be used, which is infuenced by consensus systems, governance model, data
structure, and other factors. We can perform some ef the things we presently do with
Permisiones blokchains, but In a marginally better way. which can be substantial
In he diagram below, you can see how a group of banks may use Hyperledger, a
permissiones biockenan, to clear and see tri transactions who. relying on a
centra clearing house

DOT,

Because banks do not fly st each ether, dearng houses were created
to actas en intemediary between trades, reducing the risk that one party wil not
oncur his terms. This chapter wil not address the debate over pemisioned versus
pemisinless bleckchans, but blockehan can present a vay to ether transform or
‘disrupt curent business and business models. Permissioned bockchain architectures
are used inthe majority of use cases in regulated businesses

While permissinless iockchains provide a foundation for new business
models such as peertopeer (P2P) transactions and disntermedatoried models,
pemisseness bockchain archtecure by defniien rales on a very computaton-
intensive compite modelo ensure transactional inte Regardless ofthe blockchain
archtecture chosen, the techncogy offers numercus opportunities fr transformation
and disruption,

[As a technology platform, blokchain has enormous promise. Blockehaln can provide:

A design strategy that keeps transaction daa, value, and state natural near
tothe business loge inthe fem

lech Tercios

‘Secure execution of business transactions, cated by a communiy, via a
secure procedure that supports the us and transaction processing that are
fundamental BIoekchain.

[A permission alternative technology hat complies wth existing restons

‘racing Blockchain's Origin

You can gain a deeper understanding of blockchain by exploring the content in
‘which t was developed — the need for an een, coateflectve,relale, and secure
“system for conducting andrecordng fnancial transactions

‘The Shortcomings of Current Transaction Systems

Throughout history, tools of st have arisen fo enable the exchange of valve and
safeguard buyers and sellers, such as coined cons, paper money, lees of crest
and banking systems, Telephone Ines, cre card systems, the terme, ans noble
echnloges have al enhanced ransachen convenience, speed, and eficieny wie
lowering, andin some cases ital eliminating, the distance between buyers ad sellers

The complexes, sk, ieticlences, and costs of present transaction systems wi
undoubted increase as transaction volumes grow api over he werd. Tha development
‘of tansacion volumes has been spured by th grouth of ecommerce, one banking, and
Inapp purchases, as well asthe increasing mobity of indviualsatound the wold. And
with the rout of the Intemet of Things (IT) — autonoma; rs ike rfigraors that
‘buy graces hen supplies run low and automobles ha bring Memsves to your house,
‘sopping fo gas along the way — vansacton volumes wil skyrocket

To overcome these and cine issues, the werd needs rapid payment neto
‘ith a mechanism that establishes confidence, does rot require speciatzed equipment,
does na have chargebacks or monthly fees. and provides a communal bookkeeping
‘salon fr maintaining transparency and trust

‘The Emergence of Btcoin

cin, a digtal currency introduced in 2009 by a mysterious person (or persons)
“dented only by the pseudonym Satoshi Nakamat, Is one solution that has been
‘developed to address the eumpieties, wnerabiies, inefiencies, and costs of
eurent vansaction systems

Bco does not have a central monetary authority. uniko radonal cuencos.
which are issued by central banks, Ite not under anyone's control, Btcoine arent
Issued tke dolare or eos; instead, theyre “mined” by indvidals and increasingly
‘caperations using sofware to solve mathematical puzles on computes all around
the wert, coin is enabled by a peecto peer computer network made up ofits users!
machines, smiar tothe networks that power Beret and Skype, rather than relying
on a central ronetary author to monte, very, and approve transactions and contrat
ne money supply

‘The Binh of Blockehain

ein is based en Ihe Diockchin tehnelogy, which acta as brcoins shared
Ledger. Consider blockehain to be an operating system similar to MicrosoR Windows
1 MacOS, wth coin being nly one of many applications that maybe launched cn

ss

Notes

se leche Testi

i. The shared ledger tha bloichai provides for receding bitcintrnsacions may
Notes also be used to record any transaction and ace the movement of any tem. whether

angie, inmaterial, er digital, Blockchain, fr example, allows secures tobe sted in
minutes rather than days. can also be Used to asis businesses in managing the Now
of goods and elated payments, as wei as allowing manufacturers 1 share production
records wth OEMs and regulators o reduce product recall.

‘The main pont to remember is ra lon and blockchain are nc he same thing.
Although locken is used to record and preserve bicintransacions,£ has many
(her applications tein is ony the fest application o lockctaintesnciogy

Revolutioniing the Traditional Business Network

Traditional methods of recoding transactions and tracking assets require network
Participants to keep thelr own ledgers and other records, as depicted in Figure below
fon the le. This olf method can be cosy, In pat Because it requires the use of
internes wo colec fees for thelr senices. Due Lo delays in aigning agreements
and the dupicaion of ot required to maintain mule ledgers, & is manesty
| nennt fs also vulnerable because a central system (such as a bank) is hacked,
‘wether through fraud, a cyberatack, or a simple oversight, the entre corporate
| networks harmed,

| Business networks that employ bockchain are depicted on the right in Figure

below. The blockchain design alows users to share a ledger that is updated every
time a transaction occurs via peerto-peer replication. Each network parcpant (node)
serves as bath a publisher and a subscribe in peer-to-peer repicaton. Each node can
receive er send ransactons to he nodes, and data synced a raves throughout
thenetwork

lech Tercios

A

Ez

om

losa

Figure: Business networks before and after blockchain

Because & eliminates duplcalon of er and lowers the need for nterneslaes.
the bockchain new is cotefecive and eficient i's also less valnerble because &
Validate data using consensus models. The transactions ar sate secure, and verfabl.

ockehain

The design of Btcon, and hence the concept of a blckchain system, is based
on a network having a distributed and chrondlogicaly ordered transachon database
that is used to store linear data records In a manipulation proof manner. symbolises
a continuously developing open ledger and alows for distributed consensus among
‘untrustwothypatipats.

Aspects ofthe bulking blocks defined by the slenie cischlnes of cryptography
ecentalsaton, and game theory secure any stored data tom unauthorised alerlln,
Each topic wi be discuss ne content of blockenain systems inthe sections tat low,

The ingeious mixing of vious study discipines hs rested inthe revolutonary
qualies of blocihain systems. They make possble to get rd of intermediaries,
central authors, and data moncpoles resulting in exceptona protection against data
‘manpulation and eensership resistance.

‘cryptography

Cryptography she most crucial component ofa blockchain system. Data is stored
in eyptography in inmutable blocks with a predetermined chronological oder. As
seen In Figure below, cach ack le Inked othe preceding one by a backward pointer
to the prevous block header. This concatenation creates a hash inked lst, which is
made possible by each blocks unique and unforgeable hash value. Any changesto the
data stored in previous blocks would render all subsequent newer blocks inval An
‘attacker would he to recalculate al blocks stating am that pa. This is practical
Impossible because e creation entals a large amount of computer work.

‘Asa resi, carter blocks cannot be tampered with wihout being detected, and the
hash inked Et thus provides a safe data history wäh a high level of intgrty. A past
lransason data ls secure by the contents ofthe eurent Dick as long as the Eoked
ashes ctay vali from star to fish reducing the need for confidence foreach block
Individually Ts structure gets stronger with each new brick

s

Notes

se leche Testi

En

ve) [no]
[a Jue]

Figure: Hash linked blocks

Notes

Cryptography als allows for the concept of ownership rights. Fr each published
transaction, unforgeable dial signatures centbute to the sacufäy features of
authentety,non-repultion, and inegrt. They add an exa degree of protection and
‘alidaon to transactions sent through an unsecure commuricaton channel (rere)
All generated wansactons must be dgtaly signed to provide secure transfer of
‘unforgeable ownership right. Signature vericatons ater that are simple o do.

Decentralization

Unauthorized manipulation is possible with decentralised system architectures.
Because any sate change requires consensus fom the majrty of the network,
ilegtimate manipulaton is mere easiy detected. The entre history of data kept on a
Diockchain is ble o eveyene onthe nator, There sno entra storage ste and no
hierarchically ordered organisation. A bockchai is neher produced o administered by
2 central author, ut rather by each coming nodein the network independently. A
‘at endo: architecture based ana P2P netwerk stores al data redundant. Bean,
{for example, communicates va an unsrutured and decentralised P2P newark based
on persistent TCP connections

| :

| Figure: P2P Service Based Network

| tna! nodes, or pests, provide a decentralized ecosystem that contibutes
to distributed consensus among al prcipants without the need or a superordinae

ary As aresut any data ataron must be approved and cared out by the networks
majriy, The network is consistent and has a system-wide consensus as long as
this majorty is honest. In addon to achieving the goal of immutable daa storage,
redundancy improves the dat avallabty and failure telerance, as well as eliminating
sage paints of alu inthe event of data loss, This has promising and unprecedented
quaties in terms ofeureney or payment systems

Game Theory

Finaly, anther impotart feature of a secure mode of operation or blockehain
systems is game theory. The study of mathematical modeling for decision-making

lech Tercios

‘scenarios is known as game theory. Ls bull on logical decision makers interacting
stategealy Each srategys success or falure is determined by more than just one's
‘own actions. Indhidual behaviour based on the network protocl defnes success
and falure fr blockehain decison-makers. The noton of game theory outines
major potions ofthe ut model ofthe system for valuable digital assets such as
plocumences. By rewarding honest network participants with economic incentives,
{ne need or bind conídence in other network partipantss decreased.

As a result, dishonest paripans are penalised by missing out on any of these

Incentives, This rewar-penaly relationship allows for an economic racnaly system |

based on logical reasoning. If an honest obtained reward is more valuable than
the output of a success attack forthe same efe, a malevolent partpart is best
‘advised to pick a technique that follows the stated network protocol. A rational sl
Interested decisionmaker wil instead contrbute to the common good, fstring
‘consensus and the network's corect sale. Blckchain appicatins, such as Bkcin.
are ofen referred to as trustess consensus methods on hs premise,

ockchain Basics

Blockchin is frequently refer to as one of cur generation's most innovative
and promising technologies, Yu lean about blockhainteehaology and some of ts
most prominent applications inthis chapter. Youll learn what bleckchan is and how
‘connecting this new technology's capablties wth business goals can unlock new
tus that were prevcusy unattainable

Eleckehain technclogy is a gamechanging meihos of managing decentralised
data, Ws basicaly a data ledger hats duplicate to various locations, or nodes, that
may or may nt us each other. The technelogy ensures that the daa is consistent
‘across all nodes. Even ifthe pares tansactng business do not know each othe,
this develops contdence. The entire pont of lackchan isto guarantee data integity
without relying on a canal author. This concept is kncum as decentralised trust
bated on eee facts

Eleckchan technology was test proposed to enable iio, a new decentralised
form of tal currency. Blockchan data is commonly referred to asa ledger because
much ofthe data onthe nia bockehain were simple nancial transactions.

Examining blockchain suture

‘The word blocicnsin stems fam the fac that af data is stored in blocks, each of
‘which I inked tothe one before establishing a cine structure. Yu can only ad
(append) new blocks to a Hockchain; you cant change the content o existing blocks
‘or delete them once they've been added

As ls connection, each block sores a cryptographic hash ofthe previous block
A exytograpic hash funcion takes data as input and ouputs a fediengn sting of
‘characters that represents the data. The hash value isthe value that is retumed. You
‘obtain a een hash value you ater the input data and run the hash lot again

Changes in blockchain blocks can be easly detected using hash values. Any
‘change a block nvalidates the Ink fem the next lock, effectively breaking the chan.

so

Notes

so leche Testi

Every block in the chan saves the previous blocks original hash value. Changes
Notes to any block cause the hash value ofthat loko change, which implies the hash valve

recorded inthe next block no longer matches the hash value ofthe eurent lock. Any
node may stay see any Docks have changed since they vere frst insertas

When a new fll node joins the bleckchain network, downloads a copy of aï of
the chain's blocks. The new node receives any new blocks ater it syncroriss wih the
other nodes and has tre most recent blckchain version, just ike the ther nodes.

Blockchan network nodes come in a variety of shapes and sizes. Full nodes keep
a complete copy ofthe bleckehain on their computers. Lightweight ncdes just have the
most recent locks an hand and can request ler blocks as needed

Creating new blocks

Any acti that wites data to the blokchaln is ffered to as a blockehain
transaction, Users send transactions to Bockchass nodes, and when there are enough
transactions to waran new block anode reduces ene

Blockchains, unike typical database systems. only handle Read and Append
operations. You can only add new infemáton to the Bockehän and rea information
‘that has already been recorded there,

Despite the fact that each blocichain implementation approaches block eration
and validation diferent. they al agree an he fundamentas of consensus. The fe
formed block is vald and shoisd bo added to the Blockchain if a simple majonty of
nodes (one node mere than hal) agree

root of Work (Po, which is used by the Bain and Eihereum biodkchans, is
one of the mos prominent consensus mechanisms. In à PoW system, some nodes
accept fresh suggested biceks and compete to solve a chalenging mathematical
cralenge. The winnie i ewarded for thee eats. Mining f the process of sching the
problem that results na legitimate block, Miners are nodes tha patiopat in mining

In PoW mining, the procedure entals calculating a hash value that satin
paricular complesty requirements In Bon, a particular amount of leading zeros
in he Bash vale res is required. Miners determine the block's hash value as wel
235 3 unique integer known as a nonce. Miners experiment with a variety of nonce
‘values until they nd one that matches the ouput complexity requement. This Ime-
consuming procedure yield a block that a nodes agree on and accept as legimate.
Findng the corect nonce is áficut, but compuing the blacks hash value is
staightonvard A faulty Dick an be immediately ¡denied by any node.

When a miner mines a new block success, # istbutes it to all odes and t
becomes the cha ast Bock

Controting computation

‘The value of blckchain extends far beyond data sharing with unrusworthy
nodes. You may also specity restrictions for how people access the blockchain that
are folowed by al nodes. You can cone! how people create transactions and even
‘at data they may see. The programmes that are par ofthe blokchain and contol
access tlt are known as smart contacts Assume youre a member of a supply chain

lech Tercios

consortium that employs blocichain tecnclogy to track products fom producer to
customer. Every ownership transfer shuld take place only when the parts have met
certain reia, Smart contracts st the rules hat every Blockchain node must otow in
a bleckchain content. The rules cannt be dsregarded by any node. Because you trust
the technology. the promise of enforced compliance pers you o do business with
enitis you dont ust.

a node vas the res, the data it writes to the Blckchain ars fem what
‘other nodes wie, reulin in a black inconsistency. The majety of nodes decides
‘wich version vali

‘You can trust thatthe code you released 1 the code that everyone is running she
“smart contrat code I pat of the Beckchai, Furthermore, each node ensures that
smart contrat code executes consistently across all nodes, Youll never have te worry
about one nade receiving a diferent response than another Al smart contract code ls
«termini, which means you can expe the same resul everywhere,

“Types of Blockchains

Al blockchains are not created equal. Some blockchains are uit to functon as
public repostores, Others keep information that should nt be accesible tthe general
Publ, Diferent bleckehain vsbity models have emerged as a eau various needs,

Public blockchains: Sharing de

‘The intial Iockchan plan called for a blockchan that could be shared with any
node that wished t join the network wieutimtaticn To an the bleckchan network
nodes do nat require permission. This srt of Licckchan is known as a public or
pemissioniess blockchain, and ts the one that most oyplocumences use. There
ls an extremely low level of trust because anyone can jin. That i why complicated
‘consensus agen Ike Pol are so cus, When no us exists between nodes,
consenaus techniques create tus the tetaical eve

with the whole world

Private ockchains:

rotecting sensitive data

Orgarizatons quiiy realised the benefi of blockchains as pat of ther IT
arentecure, Bloekchins alow data tht vas previous locked away in slo to be
shared. Although users inside the company have a degree of trust for one another.
Independent orgaisaionalunts may not have otal tru fr ene another. Organizations
‘an use a private or pemissoned blockehain to add access rules tothe lecken
‘whe tit sharing data ir 2 sem-tusted environment. À pamisionedblockchain alows
{you to restic access to those who have been given permission o access the data,

Hybrid blockehains: Striking a balance between public and private

‘Some bicekchan-enabled appicatons are nether totally publ nor completely
private. A supiy cain isa group of unrelated actors that collaborate to move goods
fiom a producer to a consumer, There may be several supply chain parlant who
are not affated with the same company. Partcparis and competitors alike desire
‘haved supply chain data. A hybrid or consortum bleckchan Is ideal fer this pe of
se case. A hybrid blockchain isa semiprivate blockchaln in which access mes are
‘managed by a meteorganzaton to limit which companies can parpate The

Notes

a leche Testi

Diockchain i only accessible to members ofthe supply chain consortium, Authorized
Notes participants have access to data in the same way that a publi blockchain does.

Comparing Popular Blockchain Implementation

‘The third generation of blockchain technology is now avalable. Each generan
has developed to meet everincreasing needs, Blockcaln can provide a wide range of
benefits, fom bccn to enlrprse-scale applications.

Making digital currency work

When Satoshi Nakamato published "tin: A Peerto-Peer Electronic Cash
‘System’ in October 2008, it was the begining ofthe frst generation of blockchain
technology. To make possible. the paper advocated the Bitcon crylecurency and
Diockchain technology,

Satoshi Nakamotos ideniy is a mystery. Tho name could be a pseudonym for
a single person ora group of people. The fst biscchain generation was but wit
enplocurency in mind, Aside trom processing yplocurreney transfer transactions,
had minima tuneboalty

Providing computation control

VialkButein provided an updated Uoekchain implementation concept in late
2013. By extending Atcin's imite scripting capac, Bein’ blockehan, Ethereum,
enhanced the functionalty ofthe Btesin block

Flhereum is an open-source blockchain prjee that includes a comprehensive
programming language caled smart contras that enables for complicated
programmes. Smart contracts allow fora wide range of ransachonal cotas. Wit
the incorporation of smart cunvacts and the release ofthe Eiersum code, Ihe second
generation of blocichain --the computation central generation — was bom.

Scaling to meet enterprise needs

Forardthinking businesses understood the potential of Bockchain fom the
stat ofthe Bockchln boom, but they also noticed scalng challenges, Transparency
and consensus algrthms are two of the most fundamental archtectual elements of
| blecichain. vile making al data open 1 al users is benefell for pubie dat sharing. t
makes string sense information on a blockehain eu. How can a company comply
| swt rracy rgurements ft stores private data on a pub block, fr example?

| Tue Hypeiedger project was stated by the Linux Foundation in late 2015,
‘with support from high-profle technology and sofware fs, as well as academic
insituions. The Hypetedger projects major goals to provide open-source blockchain
implementations tat ful enterprise goals and scale to sui operational needs.

Blockchain Architecture

Data structure: A blockcha's data structure, whether publie or private, à inked
list of blocs holding transactions. A pointer tothe previous Block is included in each
entry ofthe It Furthermore, each block's reference contas the previous book's
hash, This hash ls crucial tothe blockchain's securty. Indeed, anyone may iden

lech Tercios

an adversary attempting to change the content of a block by computing its hash
‘and comparing it to the hash stored in the flowing block to check wheter there is
any inconsistency

To evade discovery the adversary could attempt to modiy all hashes from the
tampered block to the most recent block However. without the approval of more than
half ofthe participants, this i net possible (see Section IHMOe) AS a rel, changing
the content of a block on a public chain ls impossible, Members of private chains, on
the ther hand, can easly reach an agreement fine and change data content (1)
Private chains are append-ony databases wih the primary objective of data sharing
and synctvoisation within a consortium

Network and privacy: A blockchain, in adation tos data structure, is bull on a
peertopeer network that connects ts users The network can be pub. everyone
an access it) or private, depending on how the Blockchain i implemented (ve. only
accounts that are allowed can patipate). ata privacy is ensured by the netuon‘’s

stided access. Futhemore, eran private blockchains provide for Enr rad
data Vsbliy contol by proving data encryption at the transaction level. Nodes
can read data and request thatthe network add additonal data; these awaiting data
are eubeequerly elected by miners, which are special nodes (also krown as block
generatos or validators)

Security and scalability: Miners, also known as vaidsors, are nodes wing
to share ter computing power in order o add blocks 1 the blockchain. Consensus
tocol refers tothe process of picking the real node that wil add the net block
“among all alates, This consensus is cial forte leg and security of data m
A tstesspuble setup, Miner frequently have to sole a computationally expensive
‘erplographe puzzle o confem the commimert and prevent malcicus behaviour .e,
Proof Wor

On the other side, because miners & father validators are known and trusted
to some extent in private chains, ts procesa of selection can be sped up in tems
of computational power. The consensus protocls simply is reduced, which
¡immediately leads to greater vansaction treughputscalablty

Forks and responsiveness: Vihen a mine’ block is chosen, A is added to the
bockchain and the data 1s broadeast. Multiple miners Blocks are selected in some
‘tuations due to network efscs,resuting in various versions of the blockchain in
ifren pats ofthe network. The Blockchan slt into branches, wich is known as
3 fork. In this cicumstance, nodes should evetuallycenverge on a single, dental
Version ofthe blocks

The Proof of Work consensus accomplshes this result in practice by obliging
mers to ork on the longest branch they see. However, even if a transaction is
approved, thee is no guarantee that it wil remain on the man chan. In ican, users
"yplcaly wat sx blocks fora vansacton tobe considered val As resul, there is à
Ink tien the Ikeihood ofa fork and the blockchain's reactivity. The mplementaben
‘ofan updated consensus alarm on private chains reduces the ikethood o forks and
Improves system responsiveness by reducing confmation walt times.

Forks and updates: Miners’ sofware Is also updated from tine to time to
crea faute or provide new features. This can lso lead to forks, a8 nodes may

e

Notes

“ cken Testi

est transacions dieran depending on their sotware versions. Tica. we
Notes deinguich between:

So forks happen when Ihe transactions hal Ih new version considers va
are aso vad forthe old version,

hen a hard fe occurs, transactons that were prewously decared invalid
may become vald in the new version. Whe synchronising the software on
public blockchains i dit because tothe large number of ananymaus
users and the potential or arguments, itis simple on prvate Dockchains

‘sere members know each other and can api reach an agreement

The Fundamental disons between puble and prvate _Blockehain
implementations were emphasised in this review of iockchain architectural
components. In Ihe next pat, wel 90 though some ofthe most common consensus
algorthms used in prvate Dockchlns, which allow fr higher transaction throughput
than traditional agortnms Ike Prot of Wek o Proof o State,

Consensus Algorithms:

Proof of Elapsed Timo: Miners wat fora random amount of tine atthe end of
each eye. Before repeating this process, the fest mine fr whom the wang period
has elapsed is chosen to validate a lock. nether words, the miner who has wated the
least amount of tine gts chosen as the leader Ths approach s ulied, fr example,
in Quorum, à permissoned fork of Eihereum. Because miners can cheat on the
| random generation, hiss one ofthe last secure consensus protocols sted at private
| exi vin rg trust among ick producers

| vo assure stay and randomization, el advocated using a Trusted Execution
| emúrcament (TEE) suchas Sofware Guard Extensions (ne SGX), The aim o use

enclaves, wich ae protected erection regions, to safeguard code and data om
disdosure o ateraton Adding a ving consensus on top ofthe elapsed me prota
is acter tecmique lo prevent mines fm chesing and monopaling network
leadership. inte iis less secure than ts competor (nce does nt use safely
protocol). noneheles incre qu and salable

Leader Based Consensus: This category contains algorthms that aim to save
the agreement problem, in which dictrbutelasynchronous processes must agree
on a val leader process, While ls mathematical demonstrated that his problem

lech Tercios

cannot be solved (Le, if one process fa, tha elections teminationvaly cannot
be guaraeed), in pracice, some algorthms are able to cbain agreement wih a
probably lose to one, Ths accomplished by use eher a random number generator
‘or fare detection ora combination ofthese)

Practical Byzantine Fault Tolorance(PBFT): The PBFT algortm is a replication
algrthm that an telerate Byzantne errors Simply si, along as 29 of the networks
odes are safe, this approach ensures consensus consistency (Le. not malicious er
faulty), Tis is accomplished by duplicating generating node behaviours (1. state
machines) and applying procedures for selecing a leader among them. However,
because al of the generating nodes must communicate, this strategy necesstaes that
they all now each ether To putt ancther way, al parties must agree onthe precise fst
of participants

Federated Byzantine Agreement (FBA): The FEA consensus procedure
removes the requirement of a PBFT membership ist that has been unanimously
‘agreed by aloving any new partipants o jin the network. Each patant is avare
of some key nodes and waits fr the majority of them, as wel asthe majory ofthe

St ofthe network, to agree on a new transaction before deeming it geruine. The
preocols biggest rauta i its performance: costs alot of messages (Le. newark
‘communication and has alt oatene.

Tondermin: Tendemint is 2 stale machine-based byzrtine faut tolerant
mechanism that allows nodes to propose and vete forthe net validator. Because the
time actor i 9 important inthis protect i assumes hate network is only partial
_synronised, A validator node is chosen in a roung-obn fashion fr each new block
‘and must propose a block. This block 6 then caseminated around the network and
must receive more than two-thirds of member votes tin specifed time rae before
being added tothe blockchain. These members, on the other hand, are chosen based
On her investment, which binds tutto escurce meti,

Diversity Mining Consensus: MultChain suggested the mining dversty
consensus technique to overcame the pcblem of a single patispant in a private
blockchain monopolsing the mining process. The method ena imting the number of
blocks that a single miner can create in a given amount of time This enfores around
robin scheme, in which each licenced miner must Bud blocks in a random order A
mining versity parameter species how rigorous the rain shouldbe, with a value of
1 indican that every lenced miner should e included inthe roaion and a value 010
Indicating that here shcul eno mitico ata

24.3 Conventional Distributed Database

À database is a structured colecton of pertinent data that was created with a
‘specie goa n mind. A database can be st up asa colon of dierent ables, where
each table cnesponde to a real ent or element. Each table contains a variety
‘offs that indicate the disinee qualities ofthe ety,

A corporation database, for instance, might have tables for projets. personnel
(depanments, goods, and financial information, The Employee table may have feds
uch as Name, Company Id, ate of Jing and ethers

6}

Notes

A group of programmes called a database management system make it posse
Notes to create and maintain databases, OBMS isa sofware package that makes teaser

to deme, create, manipulate, and share data in a database À database's structure Is
described as pat af ts defniion. The process of bling a database includes actualy
storing the data on any kind of storage device, Rebievig data m a database. making
changes toa database, and producing reports ar all examples of manipulator. Data
sharing enables data tobe accessed by several people or programmes.

Examples of DBMS Application Areas
Automated tee systems Reservation system for trans Sysiem for Managing
Employees Information system or students
‘Examples of DBMS Packages.
msar
oracle
SOL Server
BASE FoxPro
Posigresal. de

Distributed DEMS

The term "itibuted database” refers to a colecton of linked databases that
are dispersed treughout a computer network or the intenet, A dsbuted database
management system (DDBMS) contels the distibuted database and ofrs tots that
enable users to see rough the databases. In these systems, data is purposely
spread among numerous nodes to ensure that the business can make the best use of
allots computing capabities,

Data is persed ameng several database systems win an organisation, as
opposed to a centralised database system, in distibuted systems. Communications
links connect these database systems. These Inks make it easier for consumers to
‘obtain the data

‘Examples ofthe Distributed database are Apache Cassandra, HBase, grite, te

lech Tercios

Homogeneous DDB: database systems that employ the same hardware
compañents, the same application process, and the same operating system

Heterogeneous DDB: Those database systems that use various hardware
devices and run under various operating systems and applet procedures.
À distributed database is made up of a number of iterconnected databases that

are spread out physicaly across diferent locations and connec to one ancther over a
‘computer network

Features
The collctons databases are logically connected to one another. They
frequent standin fr a single logica database.

‘Several locations physical sore data. Each site's data can be maintained by
2 DBMS that ion dependent on the others.

network connects the processors atthe various lations. Thay are na set
ep wah many processors,
Aloosly coupled fle system is not a distributed database,
though a dstibuted databace uses transaction processing, a transaction
Processing system isnot the same thing

tributed Database Management System

A centralsed software system called a dtibited database management sytem

(ODEMS) administers a dtbuted database as fit were al kept none place.

Features
Distributed databases can be create, rveved, update, and deleted using

By synchronising the database, Liso ofers access controls that make the
dstnbuton transparent to users.

I guarantees tha al tes receive pates to data thats amended

Is uiid in applications where several people can al access and handle
‘massive amounts of data at once.

Iisimended to work wih vious database architectures
‘The databases asta ntegriy and condeiay are maintained

Factors Encouraging DDEMS

Scattered Character of Organizational Unts — The majety of organisations
nowadays ae vided into numerous components that are geographically
disperses. Each component needs cun unique set focal data, As a resul, no
‘organization's whole database i catered

‘The numerous exgaisational uns frequertly need to communicate with one
another and share thei resources and daa. Ths ncesstates the usage of shared
databases or repeated databases that must be used in synchronisation
Support for Both OLTP and OLAP Onine transaction processing (OLTP) and
nine analytical processing (OLAP) ae two diferent but related systems that may
use the same dala. By providing synchronised data, distibuted database systems
support both of these processing steps

e

Notes

se leche Testi

+ Replication of data across various stes is one of the approsches frequent

Notes employed in DDBMS for database recovery 11a database at any Ste s carupted,

{ata relation automaticaly ais in data recovery. When the broken ste i beng

rebult, users can access data from other ates AS a resul, database fare may
become vital ins to users,

‘+ Support for Various Applcaton Sofware ~ Most businesses employ ot

applications, each witha unique set of database requirements, Aunied fenctonaly
for using he same data across several platforms provided by ODBMS,

‘Advantages of Distributed Databases

+ Modular Development Win centralised database systems, exvending the system
o new locations or additonal unte necessitates sgnifcant work and causes.
disturbance to how things are curently runing In contrast there Is no need to
Stop using existing services while insaling new computers and local data a the
new location because they wil eventually be connected 19 ne distributed system,

+ More Dependable The entre system cf cenraised databases comes to a
Sand in the event of database falures. Yet, wth atrbuted systems, # a
component fl, Ihe system may sti funcion, abei at à less een level
[DDEMS is hance more dependable,

+ Improved Response If data is dtnbuled active user requests canbe sated
‘tom local data, resulting na faste response time. On the cer hand, centralised
soins require that al queries be processed though a single compute, which
lengthens the response im:

+ Reduce Communication Cost In distributed database systems, communication
coats fr dala manipulation canbe reduced if data sept cose to where tis most
‘Hequenty needed. In cetalsed systems, ts na possbleto dois.

‘Adverse of Distributed Databases

+ Sofware that is complicated and frequently expensive is required by DDEMS in
order to coordinate data between the many sites and ensure data transparency.

+ Processing overhead Even straightforward procedures may involve numerous
exchanges and entra computations to ensure data consistency between the tes.

‘+ Dataintegay issues as rom the requirement to update data across numerous stes
‘© Corts associated with inaccurate data dtbuion The responsiveness of queres
1% is heavy reliant on accurate data dissemination, Poor data distribution fequenty
| resutsin an extremely poor response lime o customer request,

Computer databases known as distributed databases are dispersed across several

actual places and oten connected by a network. The folowing are some benefits of
rbuted databases:

Improved scalability: The network can be expanded vith new nodes to
enable horizontal scaling of distributed databases. As data and user demand
increase, tis enables higher capacity and performance,

Increased availablity: By dviing the data over several nodes, distibutes
databases can boost avalablty and uptime. The data can sl be accessed
‘fom other nodesin the network even one node als

lech Tercios

Increased flexibility: In comparison to centralised databases, distributed
databases may be more adaptable, enabing dat tobe stored in a manner
that best meets ne demande ofthe application or user.

Improved faut tolerance: Redundancy and falover measures that enable
the system to function even in Ihe case ofa node flute can be bul into
anbuted databases,
Improved security: By incorporating securty mechanisms atthe network,
node, and application levels, distrouied databases can be more secure han
centraised databases, |
Compared to centralise databases, istibued databases have better scaly,
avalabilly perfomance, fexiity, faut tolerance, and secuiy, Because to these |
benetts, distributed databases are Hequenly used in large-scale applications where
Sta must be accessed by several people or aplcatons vera wide geographic re,

2.4.3 Blockchaln Network

Blockchan is a dstibuted ledger where data can be safdy stored, mating
ÍA impossible forthe ata to be changed. In ther tes. we can characterise i as a
platerm for decenralsed computing and information sharing hat enables a number
of authoritative domains to colaborate on logical decsio~making. The tems
“decenralsed™ and “dstbuted” here refer o the fact that each node has an equal
ory and astbutesits resources among Hei
As implied bythe name “Blocichaln” informatica (transactions) wl be kept as
blocks of data. Each node can view the block, but hey are unable to ater it.The hash
vale inked to a tampered block vale changes, and the modified block is removed
ftom the network. Every node in the bleckchain network receives the most recent
blockchainin an average of 128 seconds. Tre Blockchain Network is the underhing
technology of btcoins. The elements 1a Blockchain network ae as flows:
Node
Ledger
Viste
Nonce
Hash
1 Nos
Its of wo types Full Node and Pata ode
Full Mode: it keeps a complete copy of every transaction, It is equipped to
very, approve, and reject transactions.
Paria Node: Because & doesnt keep a compete copy ofthe blockchain
ledger, tis alo knoun as a Lightweight Node I just keeps the wansaclon's
hah value, This hash vale i the sole way to oa the entre transacton
‘These nodes have litle processing power and storage
2 Ledger
isa dgtalinfomatonal database. Since icon form of gt! currency thats
traded between multiple nodes, we have used the erm gta here. Tree arent
ledger kinds exist. These are

oo

Notes

7

Notes

Public Ledger —
his accessbleto anyone and transparent. ntheblockchain network, everthing
can be read or wien by anyone.

Distributed Ledger —

Exch node in this ledger has a local copy ofthe database. Here, a number of
odes work together o complete the task, such as verying transaction and
ing blocks tthe blockchain

Decentralized Ledger —

"No single node or eallcton ofnodes inthis Inder has acetal contol. Every
node takes par inthe obs executon,

Water =

‘Auser may stor ther rplocurencyin this djl wale. The blockchain networks

nodes each have wallet Using publ and pate key pas, a blockchaln network

may mainain the privacy ofa wal. There no need for currency conversion ina
walet because the money ini accepted anywhere. Twotypes of enptocurency
valet predominate:

1 Hot wa
Daly one transactions related t the itemet are conducted using these
wallets Duettsintemet comsction is valle vanerableto hacker aac,
Hot walt can also be ávidos into tuo catagories

Online! Web wallets —

‘These wallets run on the cloud platform. Examples - MyEiher Wal,
Metalica,

bo Sofware wallets —

‘There ae desktop wallets and moble vatets nit On a desktop, desktop
was can be downloaded, and the user has complete central over the
wallet. Elcrum i an ustracn ofa desktop wallet

©. Mobile waltts —
‘They are designedto operate on smartphone devices. Example-myedin
2. Cold Walter —

‘Te internet isnot accessible wih these wallets. Ris incredbiy secure and
amet be attacked by hackers. The user purchases these wallets. Paper and
hardware wallets ae two examples.

+ Paper wallet: These are offine wales in which the crypto address is
rite on a piece ol paper. The private key has a QR code printed on.
Totransactin enpocurencies, aOR code is scans

+ Hardware Wale: Hardware walesuse a randem number generator that
ls connected tothe walt and are tangible electronic devices.

“The fous ofvalletsis an these three things =—

1 Privacy

lech Tercios n
2. Transactions should be secure

3 Essytouse

Public and private key pars are used to maintain the confentaliy ofa wate.
Because a pate hey i requredto send money and decrypt encrypted messages,
transacions ae safe

Notes

4. once
‘The term number ery used once" nonce) refers o a number hat is added to a
hashed or encrypted block na blockchain, The 32. Integer at helps to produce |
ne block or vadat a rancacion is crested randomly just once. is employed
toinerease the ransacton's secuty |
Finding a numberthat may beused asa nonceis felt Aslgnfiant degree of ial
and error is necessary A mine fst guesses a nonce. The guessed nonce s then
Added tothe euren headers hath, The value is hen hathed again, and hi ash
ls compared tothe target hash. Now it detemines whether or nt tre generated
hash value sais the specfeations.Ater al the requirements ao std, the
miner has produced an answer ands given te Block

5 Ham
Hashing 6 used to map he data o a predetemined size. ls crucial othe e
‘of eryptograpy. On a blockchan ner. ne input fr ene transaction i ta has
value. The folowing are the hash function's propeies:

Colson resistant
Hang
Puzzle frendiness

2.4.4 Mining Mechanism

The computational labour that nodes in the Blockchainnetwerk doin the aim of
‘earning anal tokens is refered lo as “mining” In actually, miners are being
‘compensated for acting as audtors. They are in charge of ensuring that Bco
transactions are legitimate. Satoshi Nakamoto, the founder of Bcn, devised this
‘standard 10 keep Bioon users honest. 1 Miners help to prevent he “doublespending
proble by coming trar sacos

À scenario in which à Blain owner spends the same bin twice ls known as
double spending. This ent an issue with actual curren: when you hand someone a
$20 ate to buy a bottle cf vodka, you no longer have A, thus there's no ik of hem
using it to buy ley tickets next dor, Though counterfeit money ls a possi. is
nat the same as spring the same dolar ute, “There a possibilty thatthe elder
‘could make a done ofthe dial token and give it a merchant or another party wile
{etaning the original according to the Investopedia glossary

Lets pretend you have one genuine $20 bill and one counter $20 bl. H you
tried to spend both the actual and phoney bis, someone who locked atthe serial
numbers on each of them would notice tha they were the same, indicating that one of
‘ham had t be fake. A blockchain miner works in a similar way. checking transactions
to ensure that users have not atempted to spend the same bon tice. This ist a
tes parallel, as wel cuss futher down,

n leche Testi

Blockchan mining is a peer-to-peer computer acy thats used to safequard and
Notes alte tin transactions. Biol transaction data i added to Bkcans worldtäe.
Public ledger of prior transactions by Blockchain miners. Slockehan miners pre
Bicksin the ledgers, which are ten inked together to form a chan

In comparison to typical nandal services systems, its donot have a central
Clearinghouse. Bicon transactions are typically confimed in decentralsed caring
systems, in which users contrbute computing resources tothe process. Mining is the
team forthe process of coming ransactons. It is most likely referred 10 as mining
because itis akin tothe mining of commodities such as gelé—ining gol requires a
Ic of labour and resources but there isa limited quantty cf gold, so the amount of
god produced each year says relatively constant. In the same way, mining bicins
consumes a significant amount of computational power. Over Ime, the quantity of
Bits generated by mining decreases. There isa fia supply of bons, according
to Satoshi Nakameto, There wil en ever be 21 millon Uns creates

The phrase ‘tlockchain mining’ descrbes the process of adäng transaction
records tothe Dicoin blokehai atts most basi eve. The process of adding blocks
to the lockchain is how Btcoin transactions and money are processed and moved
securely. The process of Blockchan mining is cared out by a global network o people
known as Bockehai miners

Anyone with a computer can apply to oe a Blockchain miner. These Blockchain
miners set up and run specialised Bckchaln mining sotware on ther computers,
‘which alows them to safely connect weh one another. When a machine downloads.
the sotware, connects to te network, and sats mining bin, ie refered to as
a node AI of these nodes work together to iteract weh one ancther and process
ransactons in order 16 add new blocks tothe lockehan, alo known as ne icon
network. This bein ntc is atve 24 hours a day. Since inception in 2009, &
has never been hacked or encountered doumtme while processing millon of dar in
bacan tansactons.

Why Mine Biteoin?

Mining has ancther imparant purpose besides feeding mines) pockets and
supporting the Bacon ecosystem: £ ls the only way to release fresh bien into
escuation. To put another way, miners are escentaty “minting” curency. For
[instance there were just under 19 milion btcains in culation in March 2022, out ofa
{ofa of 21 milo,

Aside from the eurencies created by the genesis block (he fst block created
by founder Satoshi Nakamoto) miners are responsible fr the creation ofall icons.
Blcon as a network would continue to exist and be use in the absence of miners,
but no new icon would ever be created However, because the rate at which bicins
are “mined” decreases overtime, the Anal bcn wil not be ccusted un around
2140, Tis isnt to say that transactions wont be confmed. To maintain the Integiy of
Bco network, miners will contaue to validate transactions and wi be compensated
forthai efits

To eam fresh bitcoins, you must be the fst miner to solve a numere issue
comet, or as near o comely as possible. Prof of work ie another name fr his

lech Tercios

procedure (PON) T begin mining. you must rt engage in is proof work acy in
‘order to sole the problem.

There is no advanced math or computation inveved. You might have heard that
mners save tough mathematical problemes is corect, but not because the
arithmetic is die In and of tse. Theyre attempting tobe the fst miner to generate
2 Gigi hexadecimal number (a “hash thats ether less than or equal othe goal
hash, i's essentaly a guessing game.

So its a mater of chance, but wih bilans of possible esimates for each of
these problems, i's tremendously cut jo. With each miner who enters the mining
network. the number of feasible solutions (also known asthe level of mining deu)
ons. Miners require a ot of computational power to sole an issue tal, You need
a High hash rate to mine success, wich is measured in ggahashes per second
(Oh) and teranashes per second (THs),

Being a coin miner can provide you “ote” power when modifications tthe icon
network proc are suggested, in ation tothe chartern payot of newly generated
Dain, A Bcn improvement Protoel Is what is ale (IP) In ther werds, ners
have some infuence on decisionmaking in aras Ike forking, The mare hash power
eu have, the more vetes you must eatin suppor of such schemes,

‘What You Need to Mine Bicoins

Early on in Beis existence, individuals were able 1 font fr blocks using a
typical athome personal computer, however this sno longer the case. This because
the duty of mining Bccin fuctates over Im,

The Bitccn network stves to produce one Block every 10 minutes or so to
guarantee thatthe blockchain runs smoothly ard can process and validate transactions.
However, #1 millon mining rigs compete to save the hash problem, they wil most
"ely ao at solution faster than if 10 mining rigs work on the same problem. Asa
eu. every 2016 blocks, or roughly every Mo weeks, Bicon evaluates and adjusts
the ditty of ming

When adational processing power is pooled to mine icons, the act level of
mining ses in ceder to maint consistent rate of Bock production The complexity
level deceases as computational power decreases. A personal computer mining for
Doin vil very dette fd noting a todays network ie,

Mining hardware

Al f this means that in order to compete inthe mining Industry, miners must now
Invest in sophisticated computer equipment suchas a graphics processing uni (GPU)
or more resical an application spectfc integrated cut (ASIC) (ASIC). They can
‘cost anyaheze fom $500 1o tens of thousands of dlrs, Indu graphics cards are
purchased by some mines, paculry Etereum mines, a a low-cost option to put
together mining operation.

Today, Bon mining technology is nea completely made up cf ASIC computers,
“nhc inthis ease, pariculai accomplish one thing and one thing oly: Bois can
be mined, Today's ASICs are many erdrs of magntide more powerful than CPUs er
‘GPUs, and new chips are created and deployed every few months, increasing both

7

Notes

7

Notes

hashing power and energy efficiency A cy 27.5 jules per terahash,todays miners
can produce nealy 200 TH

An analogy

Lets say tel tree fiende Im thinking of à number between one and one
hundred, and 1 Jott down on a sheet of paper and enclose it in an envelepa. My
buddies are not required to guess the exact number instead, they must be ie fst to
estimate any number that sess than or equal 1. There is no mi loe number of
guesses hey can get.

Lats pretend Im considering the number 19. They lose i rend À prets 21
because 21 > 10. Because 16 19 and 12 19 are both acceptable slulons, if Friend
B guesses 16 and Friend C guesses 12. theyve both theoretcaly arrived at viable
answers. Even though Friend B's answer was closer to the aim of 18, there is no
“bers crei fr him. Consider the folowng scenar: | ak three ends to predict
‘wnat number Im thinking of But Im net thinking of a number between 1 and 100
Rather, Im asking a dit hexadecimal number 16 tens of milens of would
miners You can see how feu it willbe to guess the correct answer. When 8 and C
bath respond a the same time, the system fs.

Simutanecus replies are common in Bein, but there can only be ene winning
answer at the end ofthe day When many sinutaneous answers are equal to or fewer
‘than the target number, the Stein network wl choose which miner to honour based en
a simple majrty 51 percent.

Typialy the miner who has completed the most Labour, or who has verified the
most wansactons isthe winner After hä, the losing lock is refered to as a “organ
Dock” The tem “ophan Dick refers to a block that has not been added tothe

Diockchain. Bei s not gan to miners who seve the hash problem but do nat vey
the most transaction.

The Mining Process
‘What ls a 64-Digt Hexadecimal Number"?
Here's on example ofa number ke this:
00900009000000000S Ice 08C10130405627.5B10203.4067acSBeadäätee.

‘The above number has 64 digs. So far, 5 been realy simple to comprehend. As
you may have een, that number includes both numbers and eer ram the alphabet

| Wat isthe reason Sor is?

Lats unpack the tem “hexadecimal to see what these leer are ding in the
middle of numbers
‘The decimal system is based on factors of 100 (or example, 1 percent Equals 001)
As a resul each gn a muït-dig number has 100 possible values, ranging rom zero
1000. The decimal system is simplified to bae 10, or Zero through in, in computing,
Because ‘he is derived fem the Greek word fr six and “deca” is derived tom

the Greek word for ten, hexadecimal” signs base 16. Each ii inthe hexadecimal
system has 16 posse values, However, our numerical system only provides ten

lech Tercios

ferent methods o express numbers (zero through nine). That's why youll need to
Inchie eters ike A, 8,G, D, E, and.

You dent need to caleuat the total worth ofthat Gt figure if youre mining
Bitcoin (he hash). You dont need to calculate a hast total value | repeat

What is a 64 digit hexadecimal number?

[Na]

057 + ACS
Decimal system Heradecimal system
Mösmtmmemsiterey he Geek Mec amare
DOME ee

E oh tele a
ane be eral

Deimiigue [0 1 3 3 4 5 6 7 6 io à 0 uw

‘What do ‘St. hexadecimal numbers have to do with teen mining?

Remember he analogy where you had to wi Ihe number 19 on a sheet of paper
and put it in a sealed envelope? The target hash 4 the metaphorical undisclosed
nunberin the envelope in Ban mining parace

Miners are guessing at the target hash using those massive processor and
dozens of cooing fans. Miners make these assumptions by creating as many 'nonces”
as they can as soon as they can, The key (0 generating these Gb hexadecimal
numbers | keep discussing s a nonce, which stands for number only used ance” A
‘nonce in Bicoln mining is 32 bis ong, much smaler than the hah, which is 266 bts
Hong. The first miner to generate a hash that sles than or equa tothe target has is
rested win completing the block and receives 625 BTC as a reward

You eau theoretically achieve the same resur by rating a 16-ided ice 64 mes
te getrandom numbers but why would you wart 197

The image below, derive from the website Blockchaininf, may assis you in
Ping all of his information together quick, Youre looking ata timeline of events
‘surounding the mining of block 400163. 731511405 was the nonce that created the
inning" hash. On op. the target hash is displayed. The term "Relayed by AnlPoa"
fer tothe ict that Ani one ofthe most success mining pool, completed this
area beck (more abou mining pools below),

As you can seo, they eonfrmed 1.768 transactions for ths block, which is a
‘igeifeantcontibuton tothe Bei community Got this page and sel down tthe
Transactions section you realy wantto see al 176 transactions or is block.

15

Notes

Notes

ere Teclas

lock 490169,
‘summary

Number of Transaction 1768

Output Teal 6.008 20862618 BTC
Estate Transaction Volume 249, 56466563 BTC
Transacton Fess 141004004 aT
Height 490163(Main Chain
Timestamp 2017-1046 182007
Received Tine 2017-10-16 152007
Relayed By Ano

Deus 1.108792.004,008 70.

How dot guess atthe target hash?

A ang of leading Zeroes appears atte star of every target hash, There ls no
minimum aim, however the Blain Proeal has set a maximum target. There is no
target that can be higher than is

o)

Abiten miner's winning hac is ono that contains at east the number of leading
zeroes species bythe mining ut.

Here are some intances of randomised hashes, as well as the era for
determining they wil eadto miner success:

How to win fora given block

ner EA

You need a fast mining setup or, more realsaly jon a mining pool which is
group of eurèney miners that pod thei processing power and spit the produced
Bco. Mining pools are simiar to Powerball clubs, in which members buy a large
number of try tickets and agree to slt any profs. Pools mine a spropotionately
large numberof blocks compared to india miners.

lech Teton

To put & another vay, Ks purely a numbers game. You cant create a preston
based on pro target hashes or guess the pattern. The chances of discovering the
inning Vale fora single hash are one in tens of tons at today’s ately Levels, 5
Even wth a super powerful miing gear you dent stand a chance you're werking alone

Miners must nt only evaluate the expenses of expensive equipment required to
‘sive a hash problem, but they must also consider he huge quantity electrical power
required by mining rigs to generate vast volumes of nonces In quest ofthe sluton
As of is wing, Btcoin mining Is largely unproftable for most ndvidual miners.
‘CrypteCempare has a handy calculator where you can plug in sais Ike your has
‘ate and electcty expenses to get an approximation ofthe costs and advantages.

curreney = |
= a)
© Ss

-E
ea

Types of Mining

‘The mining process can become extremely sophisticated and a standard desktop
ot PC wil nat be able to Keep up. AS a resul, necesstates a specite collection of
hardware and sotware that is userfiendiy. I's beneficia to have a custom set
dedicated to mining spi boots,

The miing process canbe broken down nto thee categories:

4. Individual Mining

hen mining is don by an inkl, he or she must rt register as a miner
As soon as a transaction is completed, all single users in Ihe blockchain network are
‘assigned a mathematical puzzle to solve The one who seves ft is evaded,

Once the soliton is discovered, al ner miners in the blockchain network
win validate the decrypted value before adding A to the blockchain. As a resul, the
transaction is vería

2. Pool Mining

A group of users callaborates to authorise a transaction in pool mining. The
‘complet ofthe data encoded in the blocks might ten make Impossible or a user
19 decrypt the encoded data on thei own. As ares, a group of miners colaborate



Notes

rn

Notes

to find a solution. Following he valdaton of the cutcome, the reward divided among
aluzer,

3. Cloud Mining

(Computer hardware and sotware are no longer required for cloud mining, 1' a
Simple way for extracting blocks. Managing al ofthe machinery, order schedules, and
sling eanings is no longer a constant concer with oud mining.

White iis convenient. comes wäh ts oun set of drawbacks, The operational
unebonalty is Imied due to Micom hashing lts. Because the revard profis are
modest, the operational expenses rise. Upgrades to sofware are limited, as isthe
vetfeation process

Uses of Blockchain Mining
4. Validating Transactions
Every day. massive amounts of bcn kansacions are made, Crptocurencies
operate thou a central administration, therefore the level of insecuty associated
‘wth transactions can be significant So. how do you very the authenticity of such
enplocurencies? New Blocks are added 1 he blokchain on the network vith each
transaction, and the validation comes tem the Liockchain mines mining results.

2. Confirming Transactions

Miners use the blockchan mining process to detemino whether ce not a
transaction is genuine, The Blockchain then updated with al conmes transactions

3. Securing Network

toi miners coatorate to secure the transaction network, The blockehain
networks secunty improves as more users mine the Bockehain. Crptecurency
network secur asures that no audulent operations are taking place.

24.5 Distributed Consensus

A disbuted consensus achieves agreement on a proposal or assures data
consensus among nodes in a disuted system. Any technicians that work wit
diaruted systems Ike HDFS, MO, Reda and Elasicsearch may be quite familar with
{his subject. Developers have continuously locked ito potential solitons to address.
this enduring Issue due tothe rapid development and ring complet of dispersos
networks in theory and practice

The consensus problem has also gamered a lt of ateton recently due to the
development of lockchain technology paru public blockchain in pen networks
and private blockchans in permssioned networks, and itis necessary o approach
tom a fresh angle

Problems and Challenges of Distributed Consensus
Crash Fault

Fit, let's consider cath faults crash ut ina distributed network oten may be
related to one of he flowing issues:

lech Tercios
Nodes or replicas may ever face downtime, in which they temporary hat
operating before restarting.
Everytime the network could be interupted.
Atransmited communication might nt ative because t was losin trans.
‘Acemmuricaton transmite may take some time to reach ts ecient.
During delivery messages may face the cutter issue
The network can be sp. For instance, the ente network may be splt

into two sub-networs forthe China dusters and US clusters as a rest of
Inadequate connectivity between the two clusters ia China and the US,

In dstibute systems, the aforementioned issues are typical. These essential |

represent the dangers that dstrbuted systems! unstable and umelable physical
hardware ental, Netwerks or communication channels, or stance, can avays be
‘dependable and steady Physical devices or Processors des went always bo in good
‘shape. Consequently it is acceptable to argue thatthe most fundamental and typical
ut type tobe fixed in dit systems are crash faut

“The Byzantine Faut

The crash faults are founded on a svaighforward premise: Either nodes do net
function er reply normally, even if they do function and respond mal, they cannot
Implement inconsistency. In ether words, they can stay ie host commiting mistakes.
‘The consensus problem is more challenging to resolve in networks where malicious
des have the ability to ater and fake daa at anytime. These bothersome issues that
ave the potential to aer and fai data e response information are tequert refered
1035 Byzantine faut. Anon-Byzantine faut sine name given tothe crash issue.

Byzantium is a product of Lampor's work. Byzantine faut tolerance (BFT) is
without a doubt the mos intcate and exacting tolerance model. By way of lusraton,
imagine a group of generals planning an assault en a castle. Each general has the
‘option to Iaunch the assaut oo rercat Bui, for the generals to De success in
‘captring the cast, they must all act snutaneousy, Next, messengers are used to
delver communications because the generals are oo ar apart to do drei.

Messages. however, are na tustwathy, They may take a very long time to
areal transmit communication, they could all to delver messages, e they could
‘even ater vih messages, The generals might also nt be Rushworth, or instance, one
‘of them might be a ltr who doesnt flow the plan. In ti tale the generas stand in
{or nodes and the messengers for communication pas indebted networks.

a OK

Byzantine faut toler

1

Notes

so leche Testi

Faut Tolerance

Notes The challenge of how to implement certainty and consensus, whch can be fu of

‘sks and uncertainties, such that relabl consensus resulte ar etumed over the entire
désrbuted network, is the most Important one that derbuted consenss agora
need to address Crash defects are natural rather simple o fx. Crash faut tolerance
(CFT) algorithms or non-Byzantine fault tolerance algerihms are terms used to
describe algrthms that solve this type of issue. Unautherzed alterations cold result
‘tom byzantine Raus, which ae also more complex and challenging tof Byzantine
faut tolerance techniques are what are used to solve Ines issues

Crash Fut Tolerance

In general ita system is connects to a trustworthy intemal network, we ust need
to thiok about the crash fau tolerance issue (CFT). We just need to take CFT into
account, fr stance, for dstibuted components used in many businesses, such as
desrbuted storage, message queues, and died senices. The flowing are the
Justcatons: Several frewals suround and eafeguad the whole company network,
Preventing outside access and threats

lis extremely unie thatthe computers and operating sotware wil be ateos
without the required auhorty because individual nodes are deployed in a unfed
manner At his point, he detrbuted network is tll most “lea” and cur focus sould
only be on the hardware ofthe machines and the communication netwerk. We must
take into account machine falures and downtime as wel as network nsabiy,Inteney
and nta

Byzantine Fault Tolerance

Then there I Bxzants faut tolerance (BFT), which is concemed wit assessing
the entre distributed netwek ina bigger setingIn addon o actual hardware, various
“man-made” variables must be considered. Because space people, not automated
systems, commit wrongdoing. Suppose that a dspersed netwerk is largely open. Ike
a private network comprising a few dozen businesses in a single sector Alemalvey
imagine 3 network that is enel accessible to everyone fo instance

navi businesses or people deploy the node machines and the sofware that
| runs on them. A person may execute DDOS atacks on one of these nodes, atering the
oftware code, the code execution logic, or even the data that is persistent on network
| storage, ite Benett i ai enough. We have greater cuties in this stuaton
Vie also need to take ino account and address the “troublemakers” inthe system, in
addition tothe unstable communication networks and machine haróvare

‘The Distributed Consensus Algorithm

‘Several soliions have been created based an theoretical advice to handle
a vary of real and dffeut problems and chalenges in distributed systems. The
implementation specifes and differences of these algrthims are not covered in thie
article, Instead, simply abasic overdew i provided to alow ora more comprehensive
overall comparisen

lech Tercios a

‘The Paxos Algorithm

Paros, a dstíbuted consensus algorthm proposed by Lampor, sone of the most
\welnoun despite its natoius” complet. This innovative approach which Lamport
described, is workable, implementable though engineering. and can maximise the
consistency of detrbuled systems, Chubby and Zookeeper are only two examples
‘ofthe many distritos systems that use Paxos. Base Pasos, or the decision to only
agree upon a single value each lime, seves two funcions. An active proposal value
can be made by a propose ater processing a clent request. An Acceptor cass a vote
on the proposals put forth, passively responds to the data given by a Proposer. and
maitains values and sates throughout the decisionmaking process. To simply tne
paradigm, the Learer role might be ignered Ths does not ater the decison making in |
the model

Notes

The twophase commit technique is used in the consensus dedsin-msting
Process, a nated in the figure:

During the fest phase, broadcast the Prepare RPC command o discover ne
protocols inal value and stop unfrished previous bids.
During the second phase, broadcast the Accept RPC command to demand
that Accepors accep the predetemined value. Several Basic Pas instances
make up Mult-Paxcs, which is capable of selecting a range of values
Pasos pracicabl is also predicated on a number of assumptions and Imiacns.
Paxos is ite to processing CFT; it cannot handle Byzantine fares. I is a nom
Byzantine fut tolerance algorithm as a result, According to FLP, Pasos adopts faut
tolerance and safety while giving up Iveness (safe but nt Ie). In ether words, tis
algorithm might never Anh e come to an agreement, abet is gute une.

In terms of CAP, Pasos merely srenghens the amount of avalabity while
‘ensuring C (consistency) and P (parton tolerance). We can Increase the number of
Leamers in order to increase the avast of Paxos sytem

Notuthstanding these drawbacks, Paxos is nonetheless dependable, fit,
and pracicetestes In a mushel, Pasos is a distributed consensus protocol that is
(dominant in asynchrenaus systems. There is just one consensus mechanism, and that
ls Paxos, according tothe costo of Chubby. al aterative methods are essential
broken eraions of Paxos.

‘The fact that Pasos conátons are tpialy iu tiger is why itworks so wel
In practico. These fctors could affect he liveness and avalabity o Paros systems. If
thotecraumstances do materias, the cuteome is also not val trade,

Notes

Basic Paxos

Propose | ps
conan propos umber
2) Broadcast Prepon oat

TD » respon orga

er ©
a u IA
= aoe
ane LT

Aceeptors must record minProposal, accaptedProposal
‘and accoptedValue on stable storage (sk)

Figure: Basic Paxos RPC communication and decision-making process

The Rat Algorithm

(Owing to Paxos'complexiy, Ongars introduced the simpler method Raft in 2014
Rat is a much simpler to comprehend and use in engineering. This was Rats origina
purpose as well There ar ciumerous simpleto understand design elements, provided
at functionality i unateios,

An asymmetric leader-based paradigm isthe Rat algrthm. A node ina system
can only bein one uf the tee states leader folower, or candiate—at any one
time, Inthe beginning, every node is à flower Anode (lower) must run for oe
as a candidate and sat Ihe electoral process inorder to become the leader, The node
revers to being a folower if it does not acquie enough votes. The node, however
becomes the leader itt obtains a matty ofthe votes, The fst leader immediately
revers tothe folower state i it experiences falures and discovers that a new leader
has been chosen after it recovers ram those dffeuies.

In order to quickly dant information that has espred, Ra adetenaly ntoduces
‘the Term nation. Atem i comparable toa Zookeeper epeeh le. One leader ean only be
| elected ina partcular period, and the number oftems increases manotoicly over tine
| The tog wih the ater terms more recent he logs at ente have iferent terms

Moreover, Raf introduces the timeout and heartbeat packet, An lected leader
needs to communicate wih the oer nodes in the cluster on a regular basis in order
te keep is postion of power. A falower changes is status to candidate and itiates à
leader election it doesnot receive the heartbeat packet ora specific election timeout,
which pot the leaders thought o ave crashed,

In Raf, the random timeout and heartbeat are used t pick the leader The leader
receive the cient command, ads tots og, and then duplicates the log to the other
{olowers. This is how log repcatonis cad cul. Rat maintain safety by Imting who
can decide whether to commit alo or at the leader alone,

lech Tercios

We wont go no great depth here about election and replication. For atonal
tas on Rafts election and repletion. Keep in mind that the selection ofthe leader
and the regular actives he or she oversbes are quite sraigifonard. In Rat, the
procedure of changing the leader is tie more Intcate.

Although though Paxos and Ratt operate on diferent pncples and mechanisms,
ner approaches to song issues and choosing trade-offs can be compared, Rat,
then, emphasises fu tolerance. safety and consistency while weakening the level of
lens and avalablt and can only crash problems,

Raft Protocol Summary
|

ere

a SERRES

A — y sd tng

menu
SS

Figure: Raft overview

Practica Byzantine Fault Tolerance (PBFT)

Since Lamport presented the Byzantine Generals Diemma in 1982, there
have Seen several talks on BFT sions, nevertheless, many of these solitons
ate Inefecive, cumbersome, and slow. When Castro and Liskov introduced the

e

Notes

“ cken Testi

Pracical Byzantine Faut Tolerance (PBFT) method in 1008, ne station sgitcanty
Notes improved. The fst algorit of ts kind wäh polynomial rather than exponential eves

of complenty is PBFT. In practice, PBFT allows for many thousand TPS and workable
Schals to maicious nodes. I has been demonstrated thatthe PBFT algorthm wit

unebon nomaly ifthe proprion of malcicus nodes in a system does na oxebed 113
oallnades,

A PBFT system's nodes are aranged in sequential order, wäh one seing as
the leader node and the ret as Backup nodes. A system's nodes communicate win
one ancther and cometo an agreement using the majrty prie. PEFT consensus
rounds are refered to as ews. Every view involves a ion leading node, andi
Predetermined amount o time has passed without Ihe leading node broadeasing the
request, he prtocl known as a view change can be used to replace it This replica
timecut technique makes sure that the mallious o erashed leader canbe found and
at anew view starts by electing anew leader again,

Five steps are encountered from the cet inking queries to receiving responses.
as lustrated in the figure. The threephase protocl Is adopted by the consensus
procedure, The ve steps are succncty deserbed inthe st ae is

CNE CPEIADIM | «comer si

El
= | 1

Figure: PBFT normal operations

Although PBFT uses an asynchroncus neberk mode to ensure safety trees on
message timeouts to cary out perode synchrenisatn. The message synchronisation
method is very quick and sequental wrling Is also used because the leader-plan
ln is used, Re-sleton of the leader I changing, nevetnless. When the
time is very close tothe timeout window, a malevlen leader can begin to trans

lech Tercios as

3 message, severely sloving the system. This drawback can be used o attack ho
network and make propery functioning nodes appear to be malfunctioning, leading to Notes
‘endless leader election,

Paros and Rat cannd process as many problems as PBFT can: I can process
Byzantine fsues that could cause issues and unauthorised changes in addin to
crash faults. Nonetheless, PBFT is sll comparable to Paxos and Rain terms ofthe
trade-off poly thas implemented. From the standpoint of LP, PBFT alo stengthens
the level of safety and faut tolerance wile weakening the level of Ivelness, Fem the
‘standpoint of CAP, PBFT strengthens the love of avalablty while emphasising the |
tolerance to network parton aus and consistency.

Notthstanding these draubacks, PEFT is nevertheless practical and ecient |
the propotion of matıneining or mais nodes does not exceed one-ird of the
total number of nodes. Net ll BFT algritms use PBFT. Other BFTike algonthms are
‘also developing. Lampert ence proposed BFT Paxos (an improved version of Pasos) to
handle Byzantine aus, for instance. The BFT Raft method whch combines PBFT and
Rat, was recent introduced

‘Mechanisms for Distributed Consensus

In beckchain networks, a number of mechanisms are ulises o reach dstribtes
consensus, including

Proof of Work (Po)

Many blockchain network, Inn Btcoln and Eihersum, use the Pret of Werk
technique, With proototwark (POW), miners employ the processing capacity to solve
chalenging mathematical puzzes. The fest mines to solve the puzzle receives a new
‘cain as payment. PoW i intended to be secure since solving the mathematical Issue
cored cals fora sizable computer resource

roof of Stake (POS)

A more enerayeticient alternative to Prot of Work is Proof of Stake. In a POS
network, nodes are chosen acceding to the quantity of icon they possess. The
fationale behind this is Mat nodos wih a large cnplocureney holding are more
Malvado protect the nesaeks seeutilyandietegty

Delegated Proof of tac (DPOS)

Delegated Prot of Stake isa variation of POS in which nodes can vote o select
a group of nodes that il be responsible for validating transactions and adding new
blocks to he Bockchain. DPOS is designed tobe more efcient than POS, ast reduces
therumber ef nodes that nee to parteipate in the consensus process

Practical Byzantine Fault Tolerance (PBFT)
Reablorld Byzantine Err In the face of Byzantine flues, tolerance I a lol used
to resch consensus, When nodes vee on Ihe condilon ofthe network, PBFT uses a
mai vate to determine the outcome, Du tothe fat tat just a small numberof nodes
must partipate inthe consensus process, PBFTs intended tobe quick andefectve

a6 leche Testi

Rat Consensus

a A process caled Rat Consensus ls intended to achieve consensus in a

dsrbwted system. Rak operates by electing a leader node, who organisez the
consensus procedure, Ra is a preferred option for many dstibuted systems since itis
staightorvard and simple to comprehend

24.6 Merkle Patricia Tree

‘The accounts and corresponding states are mapped in Eihereum Werd States
refers to the mapping between al Ehereum accounts, including EOAS and Contact
Accounts, and thee slates, The MPT dataructur i use in Eihareum to held tis
mapping data. Therefore, MP, often known asthe Merle Pan ti, isthe main data
structure employed by Etereum. The Bien chapter itoduced us tothe Mere trees,
‘which pus us hallvay therein our understanding of MP. In realy. MPT was created
by combining eompenents rom the Patricia and Merke trees

Mere tees are binary hash trees where each noviaf node has the hashes of ts
child nodes andthe leat nodes have the ashes ofthe data blocks. When such a data
structure is used, iis simple to determine whether a certin transaction was a pat of a
block. Providing proof of membership was only made simple by using relatively ite
data tom the entre block Le by using ni the Merle branch rather than the entire tree,

Marido tees enable quick ané secure content verification in dstibuted systems.
Instead of downloading every ransacion and every block, light clents can oy
(download the chain of block headers, which are 80-bye chunks of data foreach block
that only contain fve pieces of information: the root hash ofthe Merle tree containing
al ofthe transaction for thet lock, the Emestamp the miing fu}, andthe nonce
‘alu that siste Pol

Even wie iis prety intriguing and use, ake note tat there fant much you can
do besides vertyng a transactions evidence of membership in a Block. One notable
ravbaek i tha the current state cannot be ved (eg, aa gta set holding,
name regisvatons, satus of fhancial contract), There ls a signiteant amount of
searching and authenticating required, even o see how many Bain you curently own

(onthe eier side, Paria tees are varity of Radix tees, “Practical Algorthm
16 Rovieve malen Coded In Alphanumer” ls what PATRICIA stands for A
Pata tee makes inserting and deleting data easier and more effective. The Pata
| eee’ key-value lookups are extremely efectve. The path is alvays encyped using

Keys. Therefore, “key is the path that you take from the rot til he leaf node where
| the value” is kept. Typical. Keys are the sing that guide the path’ descent, each

character indicating which child node should be followed to reach the leaf node and
access the valet contains

Hence, al (key, value) bindings in Ehereum are stored ina data structure that
has been crplographicaly valdated by the MPTs. Du 1 her complete determinism,
Pata trees wäh identical (key, vale) bindings wil avays be exact the same,
Fight down tothe last bye. With (login) complet the inset, lookup, and delete
operations ae quite efectve, Because ofthe Merke compenent in MPT, a node's hash
is used as the potter to the node, and the MPT is ui in accordance with this

lech Tercios
Key == SHANALP vale),

The Patria pat fers an eíete information retieval function, we the Merkle
pat ofers a tamper-proof and determins tree structure. As a resul the rot node in
MPTtumsinto a yplogrphi fngerprit ofthe etre data structure, you ok closely.
‘hen transactions are tranemite over the wire on the Ethereum P2P network, each
mining node that received them assembles them. The nodes create a Tre (also known
as ati) ater wich they caleulate the oot hash 1 ad tothe Block header

‘The transactions are serialsed to lts before being forwarded to cher nodes
or ers, however they are inal sored lcaly inthe tree. Receiving partes must
deserakze then m order to reconstuc the transaction tree and compare A to the
tock hash, Furthermore take note that MPTs have been sight adjusted in Enereum
to beter align with Eihereum implementation, Hexadecimal, which consists of X
characters fom a 16-character “aphabet” is used in place of binary. Hence, nodes
In the tee or bie have a maximum depth of X and 16 child nodes (the 16 charaier
hexadecimal sphabel).| should point out that a hex character is fequenty refered o
sa nbble in many cents,

‘The fundamental prinple of an MPT in Ethereum is that wl any change the
bare minimum number of nodes necessary to compute the rect hash dung a single
‘operation, Storage requirements and complexy are reduced as a resul

24.7 Gas Limit

The Eihereum blockchai gas Imt, which consols the maximum amount of
_cemputation that may be done in a block, a rue component Lis crucial element
in determining the networks overall scalabiy and transaction fee

What is Gas Limit?

The greatest amount o processing that can be done in a single Eihereum Bock ls
calé the gas mi A fixed quantity of computainal resources, denoted in unit of gas.
are needed fr each transaction o be processed on the Etereum blockehan, Gas la
the eurency used to pay fo computing tasks lke running smart contrats or vefing
transactional infomation, The maximum amount of gas tat can be used in à block is
‘termined bythe gas int

Significance of Gas Limit

‘The Eiereum neiverk’s bit to function depends ciealy an the gas limit. By
iting the amount of processing that may be dene ina single block, makes sure the
bockchain runs sci, Without a gas cap, th network might Become overburdened
with wansacions, resting In delays and fing transaction costs. Due to the fact
that each vansacton uses a specife quant of gas, which must be purchased, the
925 reticion also serves to prevent halle acters rom flooding the network with oo
many transactions.

Saieulaion of Gas Limit

‘The miners who buld new blocks for the Eihereum network set the gas cap
Because they can prof rom ransacion fees, miners have an incentivo to include as

e

Notes

es leche Testi

many transactions as they can in ther blocks. However, each block has a maximum
Notes size iit and incorporating to many transactions could ead the block to supass is

lint AS a resul, miners need to re a balance between the quali of gas needed to
execute each transaction and the number of transactions thy include.

The Ethereum protocol regulates the gas Umit, whichis presently 15 mon gas
teach block The miners who make new blocks can, however, change the actual gas
cap. The network could get congested and transactions might tke longer to process if
‘the gas limi 1 st too leu A block's maximum size can be exceeded ithe gas Im ls
set to high, which may encourage miners o ad to many ansachons

Impact of Gas Limit on Eihereum Ecosystem

‘The gas imi has a sigicant impact on the Eiereum ecosystem, as it afects
btn he transaction fees andthe overal scalabit ofthe network. Transaction fees are
determined by the amount of gas required to execute a transaction, mulled by the
gas rice. The gas pice Is set by the sender of he transacen, and represents the
amount of Ether they are wing to pay per unt gas

‘The gas mi also acts the overall scalaity ofthe Einereum nebwek. the gas
lim 1100 low, the network may become congestad, and transactions may take longer
to be processed This can lead 10 a poor user experience and reduced adoption ofthe
Ethereum bleckchain. On the other hand, ithe gas Imk is too high, miners may be
incentvizes to include too many transactons, causing the block to exceed ts maximum
Size mt. This can lead t higher transaction fees and reduced decentralization of the
network, as only he most wel-unded miners willbe able to partopat,

In conctusion, gas tmnt ls a crtical aspect of the Ethereum bleckchain that
determines the maximum amount of computational work that can be performed in a
block. plays a crucis rte in the functioning of he network, ensuring that it operates
ficenty while preventing malicious acters fom spamming the network with too many
ransactons. The gas lint is determined by the miners who create new blocks, and
it has a significant impact onthe transaction fees and the overall scalability ofthe
Einereum ecosystem

21.8 Transactions and Fee

| ___Blotkchain transactions are a fundamental component of blockchain technology. A

Diockchain i a decentralzes digital ledger that records vansactons between paies.
Itis secured using enplography and sitibuted among a network of nodes, making it
| immutable and resistant to tampering

A bockehain wansadion involves transfering ata or assets between two partes
on the blockchan. This transaction can involve eyptocurencies such as Bicoin or
Elhereum, or any the type of digital asset. The transaction is inated bya sender and
confirmed by the network of nodes on the blckchain,

To inte a transacton the sender must have a dial wall, which isa sofware
application that stores the sender's private keys. Private keys are used to sign
transactions and very ownership of dgtal assets. The sender must also have access
to the blockchain neberk, whieh can be achieves through a node ora web interface
provided by athie-party sende,

lech Tercios

Once the sender ntites the transaction Ai broadcast tothe network of nodes
‘on th bieckehan. The nodes valdate the transaction o ensure thatthe sender has
cent funds or assets to complete the transaction, They also check the sender's
‘ial signature to ensure thatthe transactions estimate

the transaction is vald, the nodes add to a block, which is a group of
transactions that are bundled together. The block is then added tthe blockchain which
sa chrondogicl and immutable record ol ransacions onthe network

(Once the block is added tothe blockchain, the ransachon is considered complete
‘The receiver of he transaction can then access ther gta wal fo view the receives
funds or assets

(One ofthe key features of bockchain transactions is thatthe are secured using
‘explography, Each transaction is signed using the senders private key, whieh enures
that only he ouner ofthe private key can inate transactions using ther account. This
‘eliminates the need fora tusted thee-partyinermesiay. such asa bank or payment
processor to very the transactions legitimacy,

Anctner key feature of blockchain transaction is that they are decentraze The
bockchain network is dstrbuted among a network of nodes, which eiminates the
need for a cenvalzed authority to validate transactions This makes the network more
resistant te hacking and aud. as there isn single paint of fare

However, the decentralized nature of blockehantransadtions also presents some
úchalenges. One ofthe main challenges is salabity. As the number of transactions on
the Diockenain network grows, the network can becemo congested, which can result
‘slower ransachon times and higher transaction tim.

‘Transaction feos

Blockehain networks that use proofafeik (POW) oF proototstake (POS)
consensus processes must include transacon fees as a fundamental component
Users that want thelr transactions to be recorded in the Dlocichain and handle by the
‘network must pay these fees

How Transaction Fees Work

Users pay wansacton fees to encourage netwerk members (miners in POW
networks or valdatrs in POS networks) to include thee Wansactons on the blockchaln
‘When a user transmits a transaction, they also add the fee they ar prepared to pay for
thenetworkto conduct tie transaction

‘The transaction fee is ten determined by the transactions pray, the networks
level of congestion, and the transaction size in bytes, The network prortises and
‘moves mot rpily through transactions wth higher fees than those wi lower fees.

In POW networks, miners are motivated to process transactions with larger fees
‘nce they an include them i the flowing block they mine and receive the related fee
as 8 reward, In PoS networks, validators are encourage to include transactions with

igher fees since they can proft fom a piece ofthe transaction fees as a reward for
ing pat inthe consensus mechanism.

Notes

so leche Testi

‘Since miners and validators can make a sizable sum of bieen by processing
Notes transactions, transaction fees are a substanial source of income for them. Sy

encouraging users to give prior to their transactions and lowering the Ukelnood
‘of network congestion, they also play a erlia part in preserving the secuity and
‘ffeciveness ofthe network,

How Transaction Fees are Calculated

DDepensing on the particular blockchain network in question, different methods
might be used to caleate transaction fees. However, transaction fees are ofen
determined bythe transaction sport, size in bytes, and network congestion

‘The number of inputs and outputs, as well as ne length ofthe transaction script
are used to determine the size ofthe transaction. The transaction ize and ansaction
encres wth the number ofinputs and cuputs as wel asthe length ofthe sort

The number of pending transactions and the networks avaiable processing
capacty bath affect how congested the netvork is. Transactions with greater fees
are gen pricy over those wi lesser fees when the network is busy, and they are
processed more rapidly,

‘Tne age of the inputs (older inputs are gen pry). the quant of eptocurency
being delvered (bigger transacions are given priory), and the urgency of the
transaction al afec the transacton's pronty (ransadiens wih Ime-sensive
requirements are given priory).

Why Transaction Fees are important

Blockehain networks must include transaction fees because they give network
users a way to be rewarded for processing Fansacions and uphaling the network's
security and effiency. Without transaction es, nether miners nor validators woud be
matvated to ada transactions to the Blockchain, making the network open to assaults
and ther secu is

By encouraging users to prise ei transactions according to ther urgency
and importance, transaction fees also help to avoid network congeston. This
ensures that transatons are processed more quiiy and lowers the possibilty of
network congestion

Last but not east transaction fees give miners and valdaters a source e income,
asssing in maintaining the networks long-term vabity. Miners and validators are
encouraged to keep using the network and presening ts securty and efeciveness by
calecting transaction fees.

‘Blockehain networks must have transaction fees, but they also ofer advantages
and disadvantages. Let's examine some ofthe benefs and dranbacks of transaction
eosin more detal

Pros:

‘+ Incentvize Network Participants: Transaction fees offer a way to malvate
miners and valdlors to add transactions to the Bockshain and hande them
quick and efetvely Tis qurantees tat transactions are completed as quickly
as possible and aid in maintaining the network's eficiency and security.

lech Tercios

+ Provent Network Congestion: Tansacion fees encourage users to price
their transacions depending on their urgency and importance, which helps to
reduce network congestion, This ensures that transactons are processed more
qui andlowers he posit of network congestion

+ Provide a Source of Revenue: Transaction fees give miners and valdators a
soute of income, which helps to secure the network’ longterm vat. Miners
and validators are encouraged to keep using the netwerk and preserving ls
Security and effectiveness by caleting transaction fees

cone:

+ High Fees: Transaction fees can cccasinaly be rather high, particulary when the |
networks heavy congested, Users may nd À cost 1 transmit transactions as a
resut, especially when sending modest amount of eryptocurency.

+ Complexity: For consumers who are unfamiliar ith the technical deals of
blockchain networks, calculating transaction fees might be complicated. Same
customers may find It challenging to comprehend how much they wil have to
spend to submt a ransachon and howto determine the bes fee ws result

+ Unoqual Access: With those who can ford to pay greater fees having an
edge over those who cannot. transaction fees can lead to uneven access tothe
retwock This can reat hurdles o entrance fr some users and má e genera
Intuit ofthe network

In order to reward network users, minimise network congestion, and ge miners
and vatdators a way to make money, transaton foes are a crucial component of
blockchain networks. Ye, they may also be price. inate, and result in unequal
network access. For blockehain network tobe inclusive and sustainable over the ong
term, Ris null to src a balance between ess rte

2.2 Blockchain Systems

Blockchan systems are digital ledges that use cplography to secure and very
transactions and maintain a tamperproot record of data. Here are some of the key
cempanents ofa blockehan system

Nodes: Blockchan systems ae somposed of nodes, which are computers that un
the blockchain software and partipae inthe network. Each node maintains a copy of
the bockehai, and they work together to validate wansactons and add new blocks to
the chan.

‘Transactions: Transactons are the base unt of data in a bockchai sytem. They
represent Ih transfer of digita assets r information from ene user to another and hey
are validates by the network to ensure that hey are legate,

Blocks: Blocks are groups of transactions that are added to the Mockchain in a
sequential order. Each block contains a cryptographic hash ofthe previous lock, which
‘creates a chain of blocks that are inked together.

Consensus mechanisms: To ensure that al nades have the same copy of the
blockchain, blockchain systems use consensus mechanisms, which are a set of es
tht determino how new blocks are added to the chain, There are several ferent

e

Notes

9 leche Testi

consensus mechanisms, including prootokwork, proofstake, and delegated proof
Notes ost,

cryptography: Blockchain systems use advanced eryptographic techniques to
secure the data and prevent unautherzed access or tampering. Tis includes publie.
Key cryptography, gta signatures, and hash function.

Smart Contracts: Some blockchain systems support the use of smart contras
‘which ae setexecutng contracts that automate the process of vesit/ng and enfoeng
the tems of an agreement. Smart contracts can be used to create decentralized
applications (dApps) hat operate en heblockchan.

Overall, Mockchain systems are designed to be secure, transparent, and
decentralized, making them wellsuted for a wide range of appicaons, inclui
‘nani! transactions, supply chain management, and voting systems, among others.

224 Anonymity

Blockchain anonymiy is the capaciy of users to conduct ransactons on the
Diockehan network wAheu isclsng their tue etes. Users can conduct transactions
on a decentalsed platform made posse by blockchain technology wahout the use
of middlemen. Blckcha technology has become a weliked platform fr Marc
transactions, supply chain management, and dial asset management due to As
transparency and immutabity. The tarsparency of the blockchain network, however
also puts users privacy a isk Biockehai technology takes anonymiy seriously ince
enables users to ransat safely wthoutdsclosing he personal information

Benefit of Anonymity in Blockehain
Privacy

(One of the main advantages of anonymity in blockchain technology is privacy
Users can patlopate online actes without dicesng thei true names, securing
their personal nrmatin and siciáng themselves from any threats. This ls crucial in
financial transactions when anonymity is necessary to thwart fraud, identity thet, and
other nefarious practices.

Fiscdem of Speech

Blockehain technology's ancnymiy enables people to vice ther ideas without

\wonyéng about reprisals. Those who express ther thoughts one run he risk of beng
Punished by the govemment er other autores in seme nations where teedom of

| expression is resis. Blockchan technology's anonymiy enables people 1 freely
share thelr thought without worying about retrbutic,

Protection Against Discrimination

Users of blockchan technology are shielded fom discrimination based on ther
personal charaterstes, Including age, ethnics, gender, and region, thanks to
anonmiy. There isa I of discrminatien based on personal female in It of
‘ferent industries, including employment healthcare, and financial serves. Users can
avoid predice and receive services based on thee met rather than thee personal
information by keeping the anonymity

lech Tercios

Challenges of Anonymity in Blockchain
Regulation

Anonymity in blockchin technology can make it chalenging for regulators
Lo enforce laws related to money laundering, terrorism financing, and cher legal
activities. Regulators may need to strike a balance between privacy and transparency
to ensure thatthe iockehain network is not used fr ilegal actives. The anonymity
‘of users makes & ic Lo identity individuals involved in egal activos and enforce
laws against them,

Trust

‘Anonym in blckchain technology can erode trust between users, a is eut
to verity the identity of the cher party in a transaction. Tis can make it challenging
for users to transact wih each cer and may limit the adoption of blockchan
technology. In adiinal financial systems, tust is established though Intermedia
such as banks, which verity the identities of users before facing trancanons in
à decentratzed blockhain nebork, rus is established though the Lechnaogy ee
‘making anonymity crucial consieraten for trust.

Scalability

Blockchainbased anonymty methods Ike möcrs and ring signatures might
be computationally expensive. This can make scalng slockchain networks wile
preserving anonymiy fie. Sally. which defines how many transactions can be
‘completed at once, is cuca ater in blockchain technology. Bickehain technlogy
has a big issue in scaling while preserdng anonymity

“Techniques Used to Achieve Anonymity in Blockchain
Psaudonymous Addresses

Users do business on a blockehin network ling addresses rather than ther
actua names. Tplcaly, a user's wale programme generates these addresses, wich
are unrelated to their personal deta. Although addresses can be tracked, they are not
‘Seely connected to a user's deny nthe actual wor

Mixers tumblers

Users can submit thr bien to a pod along wih other users! money using
a mixer or tumbier senvce. Aer then, the money are mingled or tumbled, making
It chalenging to ently who sent the cons inthe fst place. I is challenging to
recenaret the transacton History because ar the cons have been mixes hey are
‘retuned tthe users na diferent rato than when they were rt sent.

Coinsein

"is chatenging to track individual transactions when ring the Coin on approach
‘which combines several transactions ito one. When using Cindcin,mutipe users can
send ther eryptocurency to he same address and the transaction is handled as one.
‘This method protects the users anonymity by making it impossible to determine which
user sent which component ofthe transaction.

a

Notes

9 leche Testi

ees Ring Signatures
lotes
A user can sign a message on behalf ofa group of uses using ring signatures, à

st o gta signature. With a ing signature a ser can sign a message with a number
of erent publ keys, making it challenging to idenity who signed the message in
realty. This strategy provides anonymity othe user involved inthe transact,

Zoro Knowledge Proots

Zero knowledge proof (ZKPs) are cryptographic methods that ot user validate a
ransacion while keeping al fe vansacto’s deals secre. A use can demonstate
Anomedge of a secret in a ZKP without dvlging the actual sec. By using this
method, the user can remain anonymous while the transaction’ ality is upheld

Stealth Addresses

A person can receive erptocurency using a special kind of address called a
stealth address uthout dsleing the publ address. À person can create a one-time
address caled a “tea address that is connected to (ner publie address but cannot
be vaced back to . With the usage ofthis metvod he user can sl get eryptecuency
ie maintaining the privacy.

In conclusion. anonymity is a crucial factor to take into account while using
biockchan technology because I ataws users Lo deal safely without disclosing ther
personal infermaton. Users benaft fam anenymity in tems of pivacy, feedom
of speech, and protection fora disceminacn, bik t also comes with problems
‘wih regulation, tusk, and scaibilly. Pseudonymous addresses, micerstumbles,
Concn, ing signatures, zecoknowiedge procs, and stealth addresses are just a
feu of the methods wind in Ioekchin nebwerks Lo maintain anonymity. is a huge
issue for blockchain tecnology to accomplish anonymiy while upholding the integrity
and transparency of the bockchain network, and wil require constant study and
development to srke a balance between privacy and transparency

22.2 Reward

In the blockchain, rewards are incentives given to users for their networking
fos. These benefts are crucial for metivating network users to perform Renourably
and protect the network. Partipants that complete certain tasks that support network
{peraton,nluing validating transactions orbldng adaonal blocks, are rewarded,

| Blockehain incentives come in many dierent forms, such as Block rewards
ransacton fees, aking rewards, and mining rewards

The block chain known as blockchain. A block includes a piece of data in
encrypted frm, such as a transaction, along wih a hash thal serves as the datas
unique ieniter For secunty reasens, he blocks are interconnected, A blcckchan, in
its broadest sense, sa distibuted, decentralised ledger that houses data and enables
network sharing,

‘What is Block Reward?

Miners are rewarded fer approving transactions witha block reward. Users often
receive this exyptecurency ater they “mine” a block. Crptocurencies employ the

lech Tercios ES

mining process to create new coins and validate fresh transactions. The block reward

consis oftwo parts: Notes
Block subsidy: That constutes the bulk ofthe award. isthe quant of
newy created coins.
‘Transaction fees: The fees paid by the transactions included in the block
make up the other component

Users are frequent rewarded for solving challenging mathematics problems.
User of Bein, forinstance, receive biccins aera succes Transaction verfeaton,
Aer four years, or # the user has mined more than 210000 blocks, the payout is
reduced to hal. This is done to manta a high level of demand and enhance the vase
‘of bicoins. Rewards therfore change overtime in nature. Ye, the system has gained
popula since mining provides mines wih a franca reward.

‘What i Block Reward Used For?

As we are al aware, a block revard i a revard paid to mines for approving
transactions as well as for resching chalenging mathematical puzzies. They are
therefore the main draw fom both a security and an economic tandpoint

‘Security: The network is secured using the rewards that miners receive.
‘Tere is no involvement of a centralised authory to secure the network
because bockehai is highly decentalised, So, ts the mines duty to protect
the locks,

Economie: The sde methods for circulating the newest crypocurencies on
the market are Block Rewards. The nate ayptosoftne network ae used as
rewards whenever aminersuccessuly validates a block The new currency is
epersed in this manner

How are Block Rewards Crested?

Lats saya user wishes to transact For the transaction, a block is made. Each user
receives the block. The transaction svete by the users. The users who patipated
in the decisionmaking process receive revards ater a success transaction
Protocols facitate the delivery of reward. The database is updated andthe transaction
ls fished ater success veigcaten. The reward is nt fed because afeent
preects produce varying revards, The total amount of eyplocurreney in ereuaton,
how long it takes for erypto asses to generate, and transaction costs are just afew of
the variables that go nto calling the black reward,
Circulation of Cryptos: Native cons are used to pay out he rewards So,
ls important te spread crptos widely in order to maintain her value
[Goneration Time of CryptoAssets: It emphasises how long the broadcast
wil las, The value of the enpto asset decines over time if network
broadcasing ses

‘Transaction Fees: The higher the transaction fees, the mare cowed the
networks

Notes

ation of lock
schonen
pr | nenbick | Mnenperom
arab
sandie

‘Why Is Block Reward important?

‘Some of he factors supporting the significance of Bock reward include the ones

listed below.

Enhancement of decentrlizeion: Elockchain has a highly decentralised
nature, I only the exyptocurency isin creation, users can uttse the
‘money, and block rewards make this possible. Asa result production and
management enable the development of a decentralised economie system.
The protects create reward for those involved in vation when a user
success verfes a lock. Protocols are used to ialse the incentives
because there io Invlvemen rom a centralised authorty,

Using the new coins: In order to introduce additonal money ito the market
{he system also uses Block rewards. The created cans can be used on
‘ne exchanges.

Pros of Block Reward

‘These are the Benes of block revards:

To protect the network: Users receive rare to protest hi mining operations.
Financial Boneft: Because the miners receive incentives that canbe put to
‘se inthe fture, they are given financial freedom.

Increased Investments: Individuals fequeniy make addtional investments
in cyplocurences, which helps massfcaon. As a resul, Mockchain
technlogyis growing in popular.

Cons of Block Reward

‘The disadvantages of Block Rewards are as flows:

Varying Rewards: The incentives change tom projecto project. The block
evards and reward schedules offered by varousprjets vay.

Increase in costs: Specialized hardware is needed for mining. Mining
‘fequertl leads in high electric expenses, which causes miners 1 lose more
‘money than they make, raising costs

lech Tercios

Staking rewards

Network users that possess a particular quantiÿ of enptocumency and take
part in the network's consensus mechanism are eigbie for staking Incentves. By
taking, network users secure a specific amount of enplocurency as seul} to
‘ery transactions and add new blocks to the blockehan, As compensation fr thee
Partition inthe network, nes individuals ean stakng incentives,

In Proof f Stake (PoS)blockchain networks, the consensus process depends on

validators that hold a particular amount of eryptecutency to confim tansactons and |

add new Blocks tothe Blockchain, Staking rewards are frequenty used in these
networks, POS networks rely en staking as a method of network secuty, as opposed
16 Proof of Work (Po) networks, where miners must save chalenging mathemati
Problems to validate transactions

In POS networks. valéators oten receive staking rewards based on Ihe amcunt
‘of eryplocurency they have staked. A validate’ lloc of being chosen o alle
transactons and add new blacks increases wi the amount of eryptocuency they
‘ake, as do ther potential taking rewards.

‘Staking payouts in POS netwerks depend on a number of vases Including the
networks inflation ate, the total amount of eryptocurency staked, and the ttl number
‘of players. Ian rate refers 1 Ihe rate a which new Boni added 1 the network,
‘which might afect the amount of staking rewards granted to valdatrs. While higher
infation rates might increase staking reward, they can slo increase price voa
{or erptocurencies.

‘Staking incentives can also be impacted by the tata enptocurency staked and
the number of patcipants. Lower staking incentives may be the resul of creased
competion ameng valdators to process tansacions and add new blocks as more
Doin i staked. The competion, onthe cher hand, overs when fewer people are
‘aking, which might lead tigger staking rewards.

The governance stucture ofthe netwerk may also have an impact on staking
rewards. In some POS networks, validators can vote on proposals and protocol
‘erations to take par inthe nebsors decision-making process. As an incentive for
thei artcipation inthe networ'sdestien-making process, valdaors who take patin
‘goverance may be ego fr Ather ncentves

oS blokchain networks must nude staking rewards because they encourage
users fo hold and state cnptocurrency and take part in the networks consensus
process, By enccuraging valdatos o act honouraly and defend the network ram
attack, they also adn ensuring the security and longterm Wabi ofthe network,

How Staking Rewards ao Created?

Coinage, cen known as “con age, is the process though which staking rewards
are generated, À fied amount of blo must be held by vakdator in proctottale
(POS) blockchai network as calateral, or sake, in order 1 take part in the network's
consensus mechanism. A validator’ “coinage” increases the longer they keep their
plosumeney as security. A valéato's coinage is determined by the quantty and
duration of eryptecurency that they now hl

e

Notes

se leche Testi

Valdators receive taking incentives proporioal 1 their coinage when they aro
Notes chosen to validate transactions and pulg new block, The higher the staking revares

axe, the more cols a valdator wil have. Valdatrs frequent receive staking revards
inthe om ofnewy created bici er trnsacin fees.

Amber of variables, Ike as the networks inflation rate andthe tta amount of
cnplocurencies taked in the network can influence the amount of staking rewards
generated tough coinage, increased inflation rates can increase sang rewards but
also increase price voatity for cyptocuencies. The eampettion arson valdatrs to
approve transactions and add new blocks also rises as more cryplocureny is take
inthe network, which may lead to decreased staking rewards.

‘Several POS networks ackitonaly use other ways to generale staking rewards in
addition to coinage. For instance, as an added incentive for taking par in the networks
consensus mechanism, some networks may give validators a share of transaction fees.
‘The networks govemance process, which includes voiny on proposals and protocol
updates, may also enile validates to adational incentives.

‘Staking revards are general produced by a combination of coinage and other
techniques, and they are intended to encourage network uses to keep and stake
enplocurencies as well as take par in the network's consensus mechanism. They
encourage validators to perform honourably and defend the network agains eats,
contbuting 10 15 secur and long-term ay,

‘The benefi and raubacks of saling rewards might vary based onthe particular
prootottake (Pes) blockehan networkin issue. Among the main benefts and
Aravbacks of taking revards ao.

+ Promotes involvement: Staking incentives encourage network users to held and
Stake cyptocurencies and take par in the networks consensus mecharism. This
can corte 6 axing the long-term vty aná securty ofthe network.

+ Reduced energy consumption: Staking uses comparatively les energy than
preototwerk (Po netwerks, which need miners to use large amounts of
Processing power to solve cficuk mathemalcal problems. POS networks may
become more economical and ecological benignas a rs

+ improves network efficiency: By lowering the time needed 1 validate transactions
and create new blocks, staking can help to enhance network performance This may
lead reduced transaction cots aná faster transaction times

+ Possibility of addtional benefits: Some POS networks gue validators extra
pies for aking par in network governance actives Ike voting on proposals and
Protocol updates. In ation to increasing the networks paricpation incentives,
this can alo neresse ne networks chances of longterm success

Cons:

«increased volatility: The networks inflation rate and the total number of
enptocrrencies staked in the network might have an impact on staking rewards.
The price of the eryplecurency may become more volatile as a result, maling &
chalenging for validators to forecast thal ttre profs

lech Tercios

+ Lockupporiods: In order totake patin staking, validators must lock up a specie
amount of eyptocurency as colitral, This mig ead to a reducton in uit
and make hard fr validators to sel the exyptocuency when necessary

+ Contalization risks: a small number of validators contol a sible percentage
of the networks enplocurency, PoS networks may be vulnerable to these
azords. This might rau in a concentration of power and possible securty les

+ Weak network security: Staking incentives may encourage validates to piece

ther own interests above the securty ofthe network. This may res potential |

network assault and securty holes.
Umaely, te benefits and dravbacks of staking rewards should be care

weighed by network users before determining whether to engage in staking. Making |

an informed choice based on unique circumstances and risk tolerance requires an
understanding ofthe various rks and benefits inked to each PeS network

Mining rewards

Bleckchan networks that employ the proototwerk (POI) consensus mechanism
preminenty incude mining paycuts. These incentives are given te miners that supply
the network with processing capacity to very transactions and create new blocks Io
the boskchan

How Mining Rewards Work

In a blockchain network that roles on proototverk, miners compete to find
tions to challenging mathematical puzzles tat wit vadate transaeions and add
ne blocks tothe Mockchal. A Block eward,e fed sum of bic, gen tothe fst
miner to correct save he challenge as compensation fr ther network fr.

For instance, the eurent block reward on the Ben network ls 525 BTC per
‘lock. This incentive is reduced by hal rough ever four ears in an ef to Keep the
total number f Bacon cin at 21 milion

For each transaction they include in the Block they mine, miners receive
transaction fein addon tothe Bick revard, These fees are pai by the transaction
sender and ae gathered bythe minor as compensation fe thei labour,

Hence, the block reward plus al associated transaction fees are added to
determine the total mining revard fo a block The miner who success verifies the
block and add tot bockchaireceves his reward

Distribution of fining Rewards

The miner that solves the block receives mining rewards automaticaly in the
maj of Discichln networks. The network may then recognise the proper reciient
and transmit the reward o them by using a public key connected to the mine's
‘wate adress

In some networks, a group of miners who cocperate as a mining poo! share
the mining revard more fay. Through the use of these pois, independent miners
can pool Ir computing resources and sp the mining profls without engaging in
Sec competion

A

Notes

100

Notes

"The health and stabilty of the Dlocichain ecosystem can be sgnifcanty impact
by how mining tevards are Sitrbuted. I rewards are set excessively high, there may
be a growth in miners and competion for computing power, which coud resu in
network congestion and higher costs.

On the ether hand, irewards are oo low, fewer miners would jin the network,
‘which might make ess secure and raise the posait of 51% attacks.

Impact of Mining Rewards onthe Blackehain Ecosystem

Inthe blockeain ecosystem, mining payments are essential because hey ge miners
an incentive to contribute processing power o th network. By encouragag pariciants to
Actin te network’ best interest, is contest ts secan and sy

‘The ecology, however, may experience unereseen effects fom mining rewards,

+ Energy Consumption: An anomous amount of processing power is neaded for
the enptocurency mining process, which in tum uses alt of energy. Concerns
regarding the endrcnmentl elects of mining have arisen as a recut, especialy
in networks where incentives are High and there is ferce competion for
computational resources.

+ Contalization: Because larger mine's are able to invest in mere power
computing rescurces and receive a larger share ofthe rewards, mining rewards in
some networks might resul in cenalzation. This could lead Lo a stuation where
3 small number of minars contre the bulk of the networks computing power,
reducing the networ’s décentralisation and raising the possibilty of 51% attack.

+ Economie Inequality: As those who can afford to invest in more power!
computing rescures ate able to receive more rewards, the distrito of mining
incentives can also contribute to eccnomicinequaby within the ecosystem, Ths
might cad toa sation where a select few people or groups control à giant
porto ofthe near benefi, which would make less inclusive and democrat

The incenive provided to miners who take part in the process of validating
transactions on a bleckehaln network is rfere to a mining rewards. These benefits
are presented as newly created ton, transaction fes, ra mix ofthe two. Pros and

| dounsides of mining rewards are sed blow:

Pros:

Miners are motivated to validate transactions onthe blockchain network by mining
cewarós. Whew these benefts, miners woulda? be encouraged to employ ther
computing resources to very transaction,

‘Secury ofthe Blockchain network is increased via mining rewards, wich make
it mare fut for hole ators to take over the network. This is because the more
miners there are, the more computational power Is avaable to validate transactions,
‘which increases network secuty

Helps the eryptocurrency ecosystem: By enabling the creation of new coins,
mining revards contribute to the sustainability o he eyplocuteney Industry The price
fie eryptocurancy may be sablisedas resul ofthe increased lid,

lech Tercios
Cons:

Impact on he environment: Mining revards need ac of processing power. which
might be harm to th envronment, This is due 1 the fact thatthe energy needed to
run te mining machines is requety produced using nonenewable resources

Ceraalizaion: As a resul of mining rewards, the network may become more
‘concentrated inthe hands ofa small number a very powerfd miners As a resul, the
network may become sigitcanty controlled by a small number ofbusinesses,

Into: Whe new cs ar cn big added tthe cena mining ncenbves
miga cause inflation. Asa result the vale of the erypocurency may veu deci.

Ultimate. mining incentives are an important pat ofthe cxyptocurency ecosystem.
but they have both advantages and disadvantages. Wile asessing the elect of mining
incentive onthe network, is crucial o take these aspect into account

2.2.3 Chain Policy

A blockchain's chain poley species the procedures to be followed while adding
blocks, vadatng transactions. and resching disputes. Is an essenlal part of a
biockehain network since establishes the tas and Behaviour ct two, whieh
um govems ts dependably, secur, and efciency.

he chan poloy cutines the guidelines and imitations hat control several facets of
the network, suchas

Block size and frequency: The chain poley establishes the maximum block Sze
and the frequency of new block addons tothe bockehan. These variables have an
Impact on thenetwotés performance, scalabity nd tansacton fe cots,

Mining reward and duty The ch poly oxties the mining reward for adding
‘anew bac tothe Bockcain as wel asthe level of cul The net security fam
assauts and he incentives fr minrs 1 paricpateareimpactedby these characteristics.

“Transaction validation rules: The format o ransacton, the legtimacy of inputs
and outputs, and the signatures necessary to alow transactions are all details that ae
specified in he chain poley Cry egimate transactions are processed and added to
the bloskchain, hanks to these regulon,

Consensus algorithm: The consensus mechanism thal the network uses to
decide on the folowing block: to be added to Ihe blockchain is specite by the chan
pal. The consensos mechanism guarantees that all nodes in the network concur on
the ledgers cust state and guards agains attacks ike double spending and ches.

Governance and decision-making: The chain polie might spect guideines or
network governance and decision making, such as how new features and funcionales
are inroduced to the network, how updates and upgrades are submited and
‘authorised, and how disagreements are sel.

{Changes to the chain poly ae typically proposed and discussed by stakeholders
inch miners, developers, users, and reguators as part of a community-ven
Process. To guarantee thatthe networks able and meet the needs ofits uses, the
Poly must ske a balance between he opposing interest of various stakeholders.

101

Notes

102 leche Testi

The chain palcy may adétionaly describe factors such as the maximum amourt
Notes ftokens that can be ised, the dtbution of tokens among stakeholders, and the

methods fr reaching consensus in the event of newer ps confi in aden to
the aforementioned features,

In general. a blockchain networks chain polcy is essential since it makes sure
the neck is secure, dependable, and tustwethy. To guarantee that tbe net is
sustainable and meets the demands ofits uses, the poly must balance the competing
interests of numercus stakeholders while defining the characteristics and bohaviur of
thenetwork.

The block ize and fequency are two essential components ofthe chain poly
‘The maximum number of transactions that may be completos on the network per
second depends on the maximum block size and frequency, The networks capacty
can be increased by increasing the block size and fequency but this might also
resut in slower confimation Imes and mere expensive transactions. A smaler block
size and lover frequency, on the other hand, can crease the netwerks securty and
decentralisation ut alo Im te potential toscas.

The chain paley algo takes into acecunt the mining reward and deu. The
motivation fo miners to jin the network and contigo fre blocks tothe bloekehin
isthe mining payout. To manta a steady pace o block emergence and prevent the
network from becoming overloaded wth new blocks, the mining process dfcuty
is controled. Mere miners may jen the network # the mining incentive is bigger, but
this may also increase competion and use more energy. Lower mining rewards can
minimise energy use, but Bey might alo make the netwek less secure.

The format. substance, and prerequstes for acceplble transactions inclusion
in the blockehain are id down in the transaction valtaon rules. Ony legitimate
transactions are completed thanks to these restons, which also maintain the
networks dependably and securty. For instance, the rules could sipulte that a
transaction must receive a certain numberof cenfmations before being deemed fnal
and ireversble, soy could demand aparcular kind of cryptographic signature to be
used as autherzaton

The network decides on the folowing block tobe added tothe blockehan using
the sonsensus algrthm. The networks nodes are guaranteed to have ential copies
fine hlockenan because o the cansensus method, which also shields against other
assauts ike double spending. The networks chosen consensus algrthm—atich may
be proototuork,prostottake, or anther consensus algorthm—is specifed bythe
chan poly.

“The chain policy may als include guidelines for network govemance and decision-
making. These guidelines cule the procedures fr proposing and approving policy
changes, resohing legal depute, and inoducing new features and funcionales to
ne network Rules for govermance and decision making make guarantee the network is
always open, responsible, and respensive to user demands.

2.2.4 Life of Blockchain Application

Appicatons are being developed that use blockchain as a backend database
hidden behind a web server and apptcations that are fly decerralsed wah no

lech Tercios

Centralized server An example of a bloekchain application wihout a server to submit
requests o is the Bacon lockchan, The ente network receives a broadcast ofeach
transaction, Yet, tis conceivable fr a web applcation Lo be developed and hosted in
2 single web serve, which would then perform necessary Btoinbockchain updates.
‘See Figure below to see how a Btein node breadeasts transactions o oer nades
that can be reached atthe te.

Figure: Bitcoin Bockchain nodos.

Every node is independent and keeps is own copie ofthe Elcicnain database
in terms of software applications. The blockchain applcatons without cantralsed
‘servers seem to be the most authentically decentralised applicators. andthe majety
‘ofthem come within the “publi lackehain”classifcation,usby the Bco lech
as a benchmark, Using resources from cloud series providers Ike Microsoft Azure.
IBM Bluemix, etc Is on not yet very common fr such public bleckchains. Yet cloud
‘service providers are staring fo become more and meca popular for the majerty of
pivate blockchains. To provide an ikstraton, magine thal there are several web
applications fr vañous departments or actors, each weh ther om Blockchin backend,
but al ofthe tockchains are ai m syne wth one another.

‘Though technical decentralization is achieve in such a stuaton policy it may
‘be centralised, Due o easy access to a single source of th, the system is stil
‘able to uphold openness and tus even when control or governance is applied Look at
Figure below, which may ret the major o blckchain prof of concepts (POCs) o
apps now beng developed on the technology. In this example, blockchains are hosted
bya cloud serie provider, and users use thei Heckchan-as 2 sence (B225) ofrng

conne couse cease

SAB 2

ES & © wa
AA A 02

Figure: Cloudpowered blockchan system

103

Notes

108 leche Testi

Having separate web applications for each depariment may not be essential. th
the right access central techniques, one web applcaton may manage requests fem
numerous decent sytem actor. Havng inahdualblockehains for each acto n the
system would be a smart idea

Notes

Having a local copy of the blockchain nat only helps to maintain system
transparency, but R may also help to produce datadriven insights because the data
is always avalable. With to consensus algrms Ike PoW POS, ele, the various
"Vockchins' maintained by various sytem actors ate consent by design

To reduce high resource consumption and conserve electr and computer
resources as much as possble, the majrty of private bockctains prefer any
Consensus ago other than PoW. Private or consofium blskshains frequent use
the POS consensus technique. A blockchan solution in the cloud witha “pay as you
use” approach is gaining populaty because blockchan 1 upending many elements of
organisations and there was no beter way to enable ransparency among them. Wt
Ite up-fot investment, lod services are anabing organzatons to accelerate their
Joumey towards a digital anstomation powered by blockchan

In the Eihereum Diockchin network, decentralized apps (OApps) are also
being developed. On a private Ethereum nebverk, these applications might require
Permissions whereas ona publie Etheraun network, thay might net. Adaltonaly these
applications might be on the same open Ethereum network fr various use cases. Even
‘though we wil discuss Ethereum specif speci later in is book, you may get a
highievl idea efhow those applications might seem by looking at Figure below:

8 8 80

+. E 5 oie

| EthereumBlockchain |

Figure: DApps on Etheroum network

(ones creatvty is the sole reticton when cresting blockchain applications
‘Applications created ently on the blockchain are possble. As well as hybrid
application that employ both classic programmes and blckchain for a single function,
applications that use Dockchain alone as a backen are also being developed,

lech Tercios

Applications of Blockchain

4

‘Asset Management

Asset management is no diferent from the fnancial industry in that blockehaln
Plays a significant role in it. Asset management in general, nta the handing
and trading of many assets tha a person may own, including fed inceme, real
estate, stock, mutual funds, commodities, and ether alemalve investments
Regular asset management trading can be quite expensive, pariulary when it
Iivetves numerous nations and cross-berder payments AS £ eliminates the need
fer mddlemen Ik the broker, custodans, brokers, tement administrator, et, |
Blckchain can be a huge ad in these cumstances. Instead, he blockchain ledge
fers a straighforvard and transparent procedure that eliminates room fer error. |

Cross-Border Payments

Have you ever attempted to send money across international borers in à dirt
ureney? The money may not ame at ls desinahen fr several aye due to
is lengthy and complicated process. Bleckchan's aby to provide endo-end
remitance series without any middlemen has contibutd to the impicaton of
these cross-border ansters Blockchain serves are provided by aio otremitance
providers, and they can e Used to send money intemaicnsiy wihln 24 hous
Healthcare

Vi smart contacts, blockchaln can sinifeanyinfuence he heatheare industry.
‘These clever contrats enable wo pas o enter into a contract direc wäh one
another. The terms ofthe contract are knoun taal partes, and A is automatically
implemented when ts requrements are said. Personal health record can be
encrypted using Blockchain technology so that they are only avaiable o primary
healthcare practioner wih a key. This can be very help in the heathcare
Industry Also, they suppor the HIPAA Privacy Regulaton, which guarantees the
privacy and rectos acces to patient infomation.

Cryptoeureney

tel is arguably one ofthe most velbknown uses o bckchai technctogy Who
hasnt heard of icon and is astronomical rise to fame? One of the numerous
benefits of adopting blocichan for cypocumencies is that £ has no tetra
resticions. AS a resul, enplocureney can be used fer ransacions everwhere.
Exchange rates and ine possibly that some people may lose money during is
Process ae the any essential considerations. This atematweis super toregional
Payment applications Ike Pay in Inda, which are only used within specie
nain or geographical area and cannot be used to send money to individuals
abroad

Birth and Death Contato

Many people around the world, particulary in the words poerr nations ack a
‘vad bi certe. One-third of al ehren under the age of fve lack a bith
cetitzate, accoráng to UNICEF. Als, the issue with death cetfiats is smiar
‘lockchain can assist in esolving is issue, though, by etablshing a secure store
of validated bith and death cerfeates that i accessible only to these with the
proper permissions.

108

Notes

108

Notes

Online Identity Verification

Wahout cie identiy and authentication, no financial vansaction may be
completed online. And this is true for any polen service provider hat any user
inthe banking and financial sete might have, Blockchain can, however, canal
the ene dently vefcaion process, aloving individuals to share Ihr der
in whatever service provider they want ate us having to authenticate # ence
Using the blocchaln. Also, users have a chic of deny verraten techniques,
including user authentication, facial recogntion, te

7. Internet of Things

‘The interet afthings"i a system ofinterconnected gadgets that san communicate
it one ancther and gather information that may be use to make informed
decisions. Once connected, any collection of things becomes an oT system. The
‘Smart House, where al home equipment Be his, thermostats, sr condtioners,
smoke alams, etc. may be networked together on a angle platform, may be the
most wel-known example of oT. Where does Blockchain tinto is, though? Wel,
this widely distribute System needs security, which Blokchain can proud. The
secuñty ofan leT system is only as eng asthe weakest Ink, er device, nthe
chan. Inthe case, lockchain can make sur that the data colected by OT devices
is secure and accessible to only the right people,

Copyright and Royalties

Inthe creative industries, sue as muse, cinema, et. copyright and royales are
major problems, These ar ai fms of expression, and doesnt appear that
they relate in any vay to biockehain. Nenetheless, this technology is ruca for
ensuring securty and openness in he creative sectors. There are numerous cases
ofplaiaam inmusie, moves, at, ee, when he original creators ae net given the
proper re. Bieekehan, which maintains a complet edge fais rights, can be
used corel this. Besides transparent blockchain can offer a safe record of ast.
royaties and agreements wth major preducdon coperalions Digtal eurenles Ike
cain can also be used to administer roya payments

2.25 Soft and Hard Fork

Secause pub beckchains (such those used by Bin and Eihereum) are

| deceniraises the network's users must be able o agree on the blockehair a shared

stole (shared puble ledger and blocks and the blockchan priocl) When al ofthe

| network nodes agree, a single Blockehai i creates wäh valiéted data (ransachens)
a the network clans tobe accurate,

Unfotunatey, the networks nodes fequenty are unable to agree on the
Dockchai's future state in unanimiy This leads to fork, which refers tothe paint at
‘which the idea “single” chain of blocks is divided into two or mare chain that are al
‘valid (ike a tuning fork used in experimental scence),

Forks in Blockéhain:

To put it simply, a fork in a blockehan is when the source code ls copied and
odie to produce a new piece of sotvare or tem. Forks are frequent used and
particularly prevalent in open-source projects. Hence, cyptocurencies Ike Bien and

lech Tercios

Eihereum are open source, decentralisedprogrammes that anybody may contrbute
16. Being open-source, they depend on their communities to srenginon the security
and dependabity ofthe sofware. Moreover, open source vih the id of forking can
Improve user Interface by making it more dynamic and atracive, aiding In obtaining
more people globally As there are no copyright protections for such operations,
‘anybody ean see, modif, and access he code in pen source projet,

For instance: One of the most popular operating systems for Linux is Tor, an open
source browser. Simla o how lon and the Elhereum prlecl are open sourced,
‘operating systems are also.

FORK
r——
remous = Accent ror

Figure: Types of Forks

For the most par, forks al into one of two categonos: codebase forks of Sve
blockehain fork, Then the Live Blockchain Fark i uhr separated nto the Deiberate
Fork and Accidental Fork, which are father aed ito the Sot Fork and Hard Fark as
you can see inthe above mentened graphic.

Types of Forks:

Codebase Fork: You can clone the ful scurce code of cenalnpece of stare
in a codebase blockchain fot. Lats use Bon as an example. Assume tht you
‘copied Ihe entre blockchain code and modíed o sut your needs. For example.
let's say that you sped up the process of creating blocks, made seme important
adjustment, and produce a ‘aster software than Btoin, Final, publish or launch the
new sofware under your name afer completing the entre white paper work process.
In this manner, a new Bostonain wal be produced rom a blank, empty ledge.
1 fact that many ofthe ALT CONS that are curenty actve on the blockchaln ware
produced in this manner only by means of a codebase fork, meaning that thet brand.
new ALT COIN was produced by making miner up and down adjustments 1 the original
BITCON code

Live Blockahain Fork: A Sve blockehain fork cuts when a running blockeain is
her sit nt two sections or directions. Hence, wth Ive blockchain, the sofware is
the same at a partcular page, andthe chain is spt into two sections trom that parlar
pal. The Live Blockehain Fark can therefore happen in rlaton to this fork for
two teasers:

‘+ Accidental Fork / Temporary Fork: The entre network might not concur on
{he selection ofthe new block when several miners begin mining a new block at
almost the same time. While cthers can agree on the other options (o blocks)

107

Notes

108

Notes

some can accept the block mined by one person resulting to a separate chan of
blocks rom that point on. Because takes a Imted amount ome fr information Lo
spread throughout the uhaleBockchain network, stvatans Ike this one can happen
‘when there are divergent views on the sequence in which events occur. Two or
moe blocks wäh the same lock height can be ound in is branch. Because the
major of the full odes chose the ler chain to add new backs a and syne wh
‘when one ofthe chains des cut (becomes erphaned, temporary forks eventual
resolve themselves.

Example Temporary Fork Accidental Fark: Temporary fo tequenty occur and
mining a bock by mutiple partes tor almost atthe same Ime ic atypical scenario
‘that causes ti for

Intention Fork: With an intentional fork Ihe sotware's code is purposely
modified while being aware of the restrictions of the blockchain. Due to the
bockchal proce’ backwards compatbilty and te ime at which a new block
Is reated, vo diferent srt of fos can happen. The two types o intentona fork
areas flows.

1. Soft Fork: When the Blockchan protocol updatedin a backwards compatible
way. Wha oh fork, new rules aro typically added such that they dont confit
with the existing ones. Hence, the of regulations and the new rules have no
bearing on one another. Sof far rules have been tightened. The previous.
version ofthe software stil accept a valió he new lock minedn accordance
wth te new rules ( the Biockchain protec!) when the sofware that runs
on the nodes (beter known as “il nodes" to act asa network paripant) Is
‘changed. Also known as backwards compatili this feature,

Example (Soft Fork): Wh the Seguit update 1 he Bcn network, a new
dass of adéresses was added (Bech32 et the prexisting P2SH adresses
‘were sl valid. An efeciv transaction coude performed y a complete node
wih a P2SH type address and anode win a Bech32 ype address.

2. Hard Fork: when changes tothe blockchan protocol are made that are net
backwarde-compatile. The opposite of a sof fork isa hard fork, when the
esbictons are mote lax. The ol version of the sofware does net recognise
the new blocks that are mined based on the new rues (inthe Blckshain
roles) when the sofware that runs on the full nodes to act as a network
member is changed, When there is a hard fork, new money is created along
‘wth the original money, as happened win Eiereum (original: Ethereum, new.
Etnereum Classi and Sitcom (ginal: Bin, new Btecn cash). The entre
‘odes hat choose to upgrade Ihr sofware are given an equivalent amount of
cash preventing any material losses, Such sharp forks are requeniyncapute
(generang confcsin he communty Te complete node has the final ay on
‘hetnertojain a spec chan. fa node chooses to inthe new chain, must
upgrade ts sotware in rder to make newer transaction valid, whereas nodes
that do na upgrade their sofware connue 1 function as before

Example (Hard Fork) The Ethereum Blocchain has recent undergone the
(Casper update. in wich the consensus process wil sich from a Proof ot
Werk (POS) type toa Prof of Stake kind (POS), The new consensus protocal

lech Tercios

wil be used by the nodes that instal the Casper update. Te Casper update wit
make the fll nodes that choose nat intl it incompatible wih the ull modes
that.

Reasons forthe occurrence of a blockchain fork:

‘Add new functionality: Code fer Blockchain is updated frequently. Since
the majrty of publie blockchains are open source, people from al over the
word develop them. When tis appropriate, new version, improvements, and
problems ae generate, fied, and released

Fix security issues: In comparison to traditonal curency (noes, cons, and
checks), blockchain (and eryptocurencies on top off) are relatively new
technloges, and study is current being dene 1 properly comprehend them.
AS a result, updates and version bumps are made to adéress any security
problems hat appear.

Reverse transactions: If any transactions are discovered to have been
malcous} compromised, Ihe community has the power to ancl ae them
from a given time paros,

Difference between Hard Fork and Soft Fork

‘The communities supporting blckehan and cyptocuencies degree onthe best way
to fork Diockchain networks, Although though each typeof fork has benefits, communities
ar sigifcanty more divided over the crawoacke due to thei greater engagement

‘The mider ofthe two, so forks have the own st of dangers. The most obvious
threat fom these rss is that dishonest people could use a sof fork to trek funde
sere and miners ino eonfrming egal transaction.

By maintaining a complete copy ofthe bleckchain network at al times, fubnode
consumers act as the Blockehain networks audio. They are in charge of making
‘sue that every new block complies withthe nues ofthe previous blokchaln network
la group of users on the Blockchaln testo impose new rules whut informing the
platform's complete node paricipans, he netwer’seeabity may bein jeopardy.

For instance, icon maintains is decentralized nature by having fuknode users
‘and miners who colabora wäh us another and independent contm the veacty
‘ofthe ledger. Tis strengthens fundamental economic pincpies Ike the proiiten of
double spending and e nation formula inthe Blockshain. ut if dishonest operators
are success in persinding fullnode users and miners to approve blocks hat lt
the rues, the blcckchaln may start accepting false blocks, which woud lead to the
platform's demise. Blockchain platforms have therefore made an eff to lower this risk
by ensuring that al so forks are avaiable o tre pubic.

Hard frke aso resul in their own areas of wor, aide fom this, Fr f al itis
el recognises that hard forks separate communities. This I so because a hard fork
lacks a midway posi in contrast toa sof ek, Second, many contend that hard forks
are bad because they divide the platform's hashing power. lvering the ses over
Felt and processing capacty

109

Notes

mo cken Testi

2.26 Private and Public Blockchain
Notes
Many large-scale data management systems have exploted the immutabliy

transparency, provenance, and authertcty of blockchans to deploy a wide range
ot distibuted applications, including supply chain management. heethcare, and
Permisiones crowdwcrting. Unike perissoniess blockchain systems, such as
Bcn, where anybody can parate without revealing ther identity, a permiscioned
Diockchain system is made up of group of known, denied nodes that may or may
o ly ust each ofr

While pemissioned blockchains have properties that appeal to a wide range
of largescale data management systems, these systems must meet ur primary
requirements. confdentalty, veflabity, perlormance, aná sait}. Various
approaches, with varied assumptions and prices, have been developed in industry and
academies to meet these needs. This tutorial vl demonstrate many ofthese strategies
‘wale emphasising the trade-offs between them

Vie itustrate how such techniques can be used 10 sats the requirements of
three diferent applications, namely supply chain management large-scale databases,
and multiplatform crowdwerking envronments, and how they can be used t fl the
requirements of such applications

Public Blockehain

The networkin a bickehan Ike this is dispersed and open tothe publ, with no
resticions on reading data fom it A publ blockchan, on te other hand, might be
permisioned or permissonless in the context of wring. Anyone can wate into the
network itis pemissionles, but if tis permssioned, ony certain node are authors
to carry out new tansastions (wing into the blckchain), very the transactions by
her nodes, and acess the exsing transactions (reading the blockchain),

The public bockchal is trustworthy because of the prookotwerk consensus.
‘The numberof nodes entering the newark is usually high (as lis publely ble),
and more nodes equals a mere distibuted network, hence such blockehain is
ragarded safe, Furthermore, all nodes have access tothe records ledger, making the
Dockchain transparent. However, such a Bockchain has some disadvantages, such
34 slow processing speed due tothe vast numberof nodes in the network. Proof
| work reaures a lot of time and energy in verfying requests, therefore scalbilty and
ficiency are alo issues in such bi hais,

“The most popular pubfe bicckchains onthe market today are Bon. Liteon, and
Etnereum; a diagrammatic representation of such blockenane is Hlustrated in Figure
below, in which diferent types of nodes are connected to one another and share a
commen dabuted newer:

lech Tercios

‘There ae no constraints on a publie Bockchin, Anyone wth a compute aan intenet
connection can jin the network and begin valatag Blocks and sending transactions.
Type, such net reward users who vate locks with some sa of evar

In any case, this network vaióxtes transactons using Prof af Werk or Prof of
‘Stake consensus techniques nthe tues sense, ta pull” network,

twas the model proposed by Satoshi Nakamato in 2008. I's been dubbed ‘mother
technology” Later, enterprise organisations were mlerestad in blocichai technology.
mositying the decentralised ledger’ nature and rtroducing private blockchains

You can dounload he protocol a any time in a publi blockchainarcitecture, and
you went need anyone's permission. Puble blockchains represent the ideal model that
has made the I industry so proftable

As a result, the ecosystem is fly decentralsed; no single organisation has
aha overt À pate blockchaln, onthe other hand, can be eed and amended
by the ent hat ouns it

A publ blockchain has eimmate the need for a third party, The system has ts
‘own natural flou sini oa flowing ver. Despite the fact hat noone has contrl over
the fow channel, everyone uses So, how can you quekly characterise 1? À dgtal
public edge that is ei governing, tty decentraised, and autonomous

‘Advantages of Public Blockchain
Greater Transparency

‘The uses of a publ bockchain network have a common shared consensus.
someone asks ay the pubic network i supeñor il explain. Transparency wl be the
Ar response. The fact that blockchains are transparent and no one has contol over
anything makes them the new menetaing sytem,

was a huge move up from central and federal bank, which had been in charge
‘of how transactions were conducted. In addon, whenever you send maney to
someone using the usual manner, you must pay a variety of fees.

m

Notes

m

Notes

Furthermore, al transaction history are kept secret fom the general publ. Satoshi
(demonstrated to the ret of ne word that our traditional system had became obsolte
inthe igtal age

Everyone can maintain track ofthe common digital ledger when is shares wi
à large group of people. As a resul, ere Is more openness and the reuiement ora
thie party to very ransacbos.

True Decentralized structure

‘The network infrastructure is completly decentralised, As a res, every node in
‘the system wi have ts own ledger copy. They can also use consensus mechanisms to
‘update the ledger qui.

Because no central authority Is necessary at any stage, this type of lockehain
provides a tly decentralised ramewok.

User Empowerment

Anyone vit access tothe itemet can dounisad a copy ofthe bckchain and
‘ead or rent wth complete author Thats he control panel sin the hands ofthe
commen puble, not an ev company!

Inability

‘The public network cannot be changed in any way. This means that no one can
hackthe system ortake the funds someone tiesto tamper wäh he blocks, such as by
double spending, the transaction wil be rejected by all ter nodes. As a resul, aiden
suchas tx faud and a vane of ether issues can be miigated with this technology.

Private Blockchain

As the name ingles. a private bockchan is smart a private asset oumed by an
individual or business, À private blockehain, in contrat to a publ Bockchain, has an
administrator who oversees crucial tasks and cotas acces to read or Dock access
Because ofthe imitations on who can take part in transactions and validations, Is
also known as a permissionedBlockcain. In developing the bleckchan application, he
relevant auhorty and chain developers selected the ens that would make up this
netwock. Companies wont want the publi to have access t this Bockchain because it
is used nteraly by he company

Characteristics:

I perorms beter in database administration and austin than & does in other
dcisines by nature.

+ Not eveyone has the ability lo run a node and begin mining
+ On ie chain, no ne can conduct transactions,
+ Not everyone has access to the blocichain explorer to examine he biockchai

+ Risa Permissioned Network because access ot requires authorization fem the
bockchan auton,

+ As tewer nodes parscipae, perfomance accelerates

lech Tercios m
+ itismore appeating tothe user inc can provide servoe as needed

Notes
Implications:

1 Privle blockchains are used by businesses increasingly Fequentyto create mul
paty transactions.

‘© An organisation attempting o gain contol over the blcichain network

Advantages:

+ Security: Infomation cannct be changed since is immutable. The use of private |
Bockehain helps to top fraud. This Blockcain vetes membership and access
redentals using deny, and it nomaly only allows wellknown organisations to
son up.

+ Performance: Due to the fact that there are fewer nodes, performance ls
improved because I takes less time to valdate a block. AS the volume of
transactions increases, tis form of bleckehain à Better throughput and Tower
latency become more important, Smultors for dspersed and ad hos networks are
crucial telson wich performance depends

+ Scalability: By readly implementing the adusments end functionalities, a
network that doesnt support milens of users can increase scalabity. Some
research has discovered that tis sort of Bockchai Is curreily scaleable o
2 eater degree. The scalabilty process involves a number of inerelated and
interacting parameters.

+ Throughput: This ind of bloschain has a higher troughput because there are
{ever users. The business benef more tom ths thoughput because requires
quete transaction, which the private leckchan ean realy sup.

+ Trust The fact that users on the private network are not anonymous boosts
confidence in the private blockehan, The appcations that demand th fact that a
business can achieve data privacy and contol over data sharing are best suited
fer privatebockchain

+ Energy: As there are fewer users on a blockchaln, less energy and material,
aro used. The least ene:pyirtonsive option avatabl to businesses is a private
blockcain because is network nt as extensive a a publ blcichain

Disadvantages:

‘+ Absence of Trust Outside partes are required to have ah ina pivate blockchain
network rout having any Infuence on the verfcalon, New valdated
transactions would be reported to the rest of he network by these trusted pares.

‘© Conwaization: With just a few nodes, it's feasible fr shady characters to take
cantol he netwerk. As businesses and corporations use these blockcains the
most, they are tpialy centalsed. Private Mockchain automatically becomes.
centralised even tough he blockchain was designed to audit.

+ Integrity: The ongoing authorised users) er paricpant determine Integy. or
‘he transaction to be val, trust is required. takes mare than confdentali to
in over paticpans o a privat blckchain. To gain fiin private blockhain
Integy alo necessary.

Notes

‘© Control: With fewer users, the hacker has an easier me seizing corto ofthe
network and modiyng the data on it. That can ocur when two minors callate
‘he block'shash simultaneously and arive at the same conclusion, The Blockchain
‘wi vide as a su, ging users access to two separate blockchans.

Permissioned Blockchain

Blockchan systems ae largescale peertopeer networks that combine a variety
of encryption, istibuted systems, and database techniques and praocols. In a
Diockchain system, nodes across a broad network of potential uresterthy people
agree onthe shared states. Pemissonessblockchan systems are what Blain and
her erptocuencies a

Permissoniess bleckchaln systems are open to the public, allowing computing
nodes with no pie knowledge ofeach other's ¡denia to jen or leave the network
at any moment. A permissioned blockchain system, un the other hand, manages the
blockchain though a network of api known and identifiable nodes. The Bockehain
ledger isthe basic underying dala suture in blockcrain systems. Its an append
only fly replicated structure thats shared among al paricpants and ensures that al
Participants in the system have a consistent sow of al user transactions

‘The overall order of transaction biocks in the blcckchan ledger ie captured by
chaning blocs together, ie. each Blok includes the enptographic hash of the
Previous block. The dagram below shows an example of a pemizsionedblocichain
System wi ve nodes, each of which keeps copy ofthe blockchain ledger.

Figure: A Permissioned Blockchain System

A se ol nodes in an asynchronous big dstrbuted system make up the Blockchain
‘Architecture. Nodes in the sytem may crash, which means that when a node ais,
it sops processing completely, e they may behave malciousy, which means that
when a node fats, t may act arar, which is known as the Byzantine faire
model Blckchain systems use the State Machine Replication (SMR) technique, in
‘which nodes agree on an ordenng of incoming tansactons to ensure the copies of
the ditrbuted ledger are equal, to ensure consistency among the data duplcaed on
diferent nodes,

lech Tercios

SUR governs the deterministic execution of client transacions across nodes,
‘ensuring that each nertaulty node completes each transaction inthe same order. Ina
permissioned blockhain system, nodes use asynchronous faulttlerant pretocls tke
Paves or PBFT to reach consensus on Ihe unique sequence in wich wansactons are
‘appended tothe Biockchai edger

Techniques

Pemissionedbiockchain systems have presented a variety of ways to fl the four
Key needs of large-scale deta management systems during the last several years. We
90 trcugh these techniques in depth inthis section, as wel as the systems tat use
them to sat the four primary requirements: confidentiality, verifabity, performance, |
and sesabity,

Confidentiality

Data confidentiality is necessary in many colaboralve distributed systems, such
as supply chain management, where several crganiatons collaborate Lo deiver
diferent senices based on Service Level Agreements (SLAs). To deploy dstibted
applications across several collaborative erganisations, ablockchain system must alow
‘bath internal transactions and crossenterprise transactions, which indicate collaboration
‘between enterprises ile data accessed through eross-enerpine transactions should
be Ve to all organisations the intemal data accessed rough intemal ancacons
may be confential.

In calaberative distrbuted systems, each organisation can retain its om
Independent din blockchain and facitate erossetspree callaberation using
techniques the atomic cross<hain tansactons or the Ineredger proce These
methods are frequent expensive, sophisicated, and primaniy developed for
pemissinies bockchains. On the ther hard, techniques that support collaborative
ferterpises on a single blockchain ether do nat support internal transactions of
‘enterprises resulting in data integration issues, or sue fom confidently iss
because the entre edger is visible o al entries, such a single channel Fabric

Cryptographic and viewbased (Le. shardng-based) strategies have been
proposed to achieve confiderity. Data Is encrypted or hashed using eyplopraphie
procedures, making À inaccessible to third paris. Instead of using eryplographie
techniques, vewbased techniques have been used o estabish confdentay in which
‘each party (Le, a company or a group of enterprises) retains jus is wn view of data
(incising records that ae vibe tothe party), obviating the necessty for them. Caper,
mut-chamel Hypetedger Fabric, and private data gathering are discussed (used
within each chant of Hyperedger Fabric)

View-Snsed Approaches: Well stat with a look at viewbased techniques.
Each enterprize in Caper keeps two sons of data: private and pubk, andthe system
can hande bath internal and eros-enerrise transactions, Internal transactions are
hanced by a single enterprise, while rose enteprise transactions are handled by al
In Caper, sach company orders and conduclsis own internal transactions, while cross.
company transactions are publ and vibe fo al companies, Furthermore, Caper'
blockchain ledger a directed acycie graph that contains every enterprise's intemal
transactions as wel 2s al rose enterprise transaction,

ns

Notes

ns

Notes

Nonetheless, the blockchain ledger isnot maintained by any node fr the sake
of privacy I fc, each company has ts own local representation ofthe ledge, which
ineudes both intemal and crosocompany transactions. Caper proposes several
consensus methods to globaly order crose-entrprise transactions, as ordering ero
enterprise wansactonsnecesstates global agreement among all organisations

To maintain confdntalty, Hyperedger Fabric adds channels. À mullichannel
Hyperiesger Fabric is made up of diferent channels, each with its own set of
companies, Each enterprise has its cun set of execuor (endorser) nodes Mn a
channel, and ts enderser nodes execute the enterprise's transactions. As ares, the
enterprise logic embedded ts smart contacts is hidden trom the businesses.

However, because al fms in a channel share the same blockchin ledger and
Diockchain date (Le. datasore), any transaction inthe channel wil be mired on
the ledgers of al channel members (le, entries), Dieret channels, on Ihe other
hand, are fly isolated frm one another and have no access tothe blockchain ledger
othe state of aer channels bockenais, Even i ferent channels share the same
se of order nodes, this isn't always the case. Ordrers reach an agreement on a
channels transaction order.

Orders should be tustd by all channel members since they have access to
transaction data. ls also worth nabng at an organisation can be a part of mute
channels, such as 2 manufacturer active in various supply chain management
scenarios. Futhemere, conducting (publ) transaction across two channels
necesstates he use ofa Irustworhy channel or an atomic commit protocol

Cryptographic Techniques: When a subset of ms in a cross-enterpise
application needs to make confidential ransactons and keep the transaction data
private rom other eterpaes, cryptographic techniques can betis, In Hyperedger
are, fr example, a set of fms on a channel needs to keep data private ram
her enterpises on the channel, hey can buld a new channel tha ely contains the
enterprises hat need scoess othe data. Creating disina channels, onthe eter hand,
cds tothe aduiisaive burden and raises data inegrty concens (between publ
and privat data.

rate dota election ae proposed by Hypetedger Fabric to manage secret data
that vo ot more ergansatins on a single channel desre to keep hidden fom other
enterprises onthe same channel Hashing is a cryptographic technique used in private
dat clectng A subset of exganisations on a channel saves their secret data in a
private database replicated on each authorised peer by defining a private data colecion

Every peer on the channels blockchain ledgers sl contains a hash of the private
data, The hash s lied for see validation and serves as prof ofthe transaction
tner businesses can sil check for rear cones dung the validation phase by
using the hash. An organisation may be involved in several prvate data collections,
each ofuhich has ts oun private database thats mires on Ke peers

In managing ews, such as seting channels in Hyperledger Fabre, ew-based
scitens are expensive. Furthermore, completing public transactions necesstates
reaching an agreement among al paies involved (eg. enterprises, channels). Cape.
in contras to Hyperedger Fabric, maintains enterpise level confidentiality (ph loge
and dat), While exyptographi techniques minimise the cost of centring ews, hey

lech Tercios

increase the overhead keeping data in he blockchain ledger aná
firelevant Sms.

bockchain state

Veritabily

Many crossenterpise systems requre organisations to valdate transactions
Intated by other enterprises in oder to ensure at gcbalinitatons are met wile
maintaning privacy. Ths may happen in crowdworidng scenario I mulpie platforms
that dont rut each aber are requires to enforce global standard, such asa workers
‘weekly work mit of 40 hours Ar ares, the Bockehain system must apply verfabity
approaches while maintaining paipant anonym. Verfablty is aso required in

‘enplocurences vi greater privacy, such as Zeash, where transaction dat is kept |

vate and nodes mus ver Ihe ansacion without knowing who ser it who received.
A, orhow much cost

Cryptographic approaches (zero-knowledge proof) have been proposed to
achieve verifabit. A zeroknowledge proof is a method in eryptegraphy by which
‘one party he prover) can prove to another party (he verifier that they know a value
x wähost revealing any mare nfemation than that they know the value x. Token-
sed strategies can also be used to esablah vetfabity, in which a centralised
‘organisation issues vefable tokens based on global restiions and dtbutes ther
tothe appropiate parties, We introduce Quorum and Separ and expan how these two
systems handle verifabity.

‘cryptographic Techniques,

‘Quorum presents two consensus mechaniems az an Ebereum-based permissioned
iockehan: a crash faleantprotocel based on Rat and a Byzanine fautolerant
system named Istanbul GFT, Both public and private transactions are supported by
‘Quorum, and both are aranged using the same consensus prlacl. To very te
verity of private transactions, Quorum employs the Zer-knowfedge proof technique

Zeroknoutedge proots allow forthe transfer of digtal assets on a darbuted
ledger wihout revealing any infermation about the sender, recipient, or quanty of
‘assets wie ensuring thatthe sender is authorise to transfer oumership ofthe assets,
thatthe assets have net Been spent previously (Jouble-spend), and thatthe transaction
Inputs equal the transaction ctputs (mass censeraton). To enable veifabilty in a
‘ngle-platfom seing, zercknowledge proofs have been employed in erowdworkng
systems such as ZebraLance, 2KGrowd, and Pro.

Token-Based Techniques: Spar is a mutiplatfam blockchain-based
‘rowdwerting system that ensures verfablty Enough a tokenbased approach
In Separ, à conrotsed tusted authorty uses anonymous tokens to model global
regulations ard distbutes them to partcipans. For example. # a global constant
‘ales that a workers otal week work hours must not exceed 40 hours inorder to
‘comply wth FLSA the authrty aocates 40 tokens to each worker, which the worker
might use whenever he or she contsbutes to job. Separ is a prvacy-presening
Loker-based system bull ontop of a Blockchai ledger shared across plates, with
the sibal state ofthe system governed via derbuled consensus procedures among
cromdwerking platforms.

“7

Notes

m

Notes

There is no reguirement fra trustworthy ently because cryptographic techniques
are realy decenvalsed, Zeroknowledge proof, on Ihe cr hand ncu a significant
overhead. Because of the overhead, using such strategies isnot beneficia, especialy
in an encrcnment where mos transactions are local Toker-based techniques, on Ihe
her hand, necesstate the creation oftokens by a centralised shorty Al parents
must have fat in the centralised authory, However, there s no nee Lo feet
transactions on each node, which reste in peter speed

erfrmance

Many large-scale data management applcatons, such as fnarcial applications,
necessiate high throughput and latency. Pemissoned Bisckehaun systems might
take an optimistic or pessimistic approach to processing transacions, Depending on
the degree and frequency of disagreement and confid among transactions, these
techniques fer pertormancetrade-ofe

The optimise method execites transactions without fa performing a consensus
procedure to deftly establish an ordering, whereas the pessimisie approach orders
luansactons before executing them. Three primary archtecures fer permissioned
Dockchain systems have been presented tem an architectural standpoint

The pessimiste method is used by the order execute (OX) and orderpaatet
execute (OXI) arehtectures, whereas the Olimisbe approach I used by the execute:
ordervaldate (XOV) architecture. Tencermint ParBlocekhain, Hyperedger Fabre,
Fax Fabre, Fabricos, FabreSharp, and XOX Fabric are examples of permissioned
Dlockchain systems at hand the performance fut.

Pessimistic Approaches: I orderexecue permisioned bleckehains, a group
of nodes (caled orderers) uses fault-tolerant protocls to agree on a unique order
{or recehing transactions. A Byzanine, 6.9, PBFT, Hals, a cash, 69. Pasos
Raft or even a hyd, e 3. SeeMoRe, Upfig, faul-lerant protocol can be utlised
depending cn ie falure model of nodes. Ate hat, orderer nodes create and muticast
Diocksto ther nodes (Le. executer).

The tansadions of a block are executed sequentially In Ihe same order by
executer redes, which append transactions tothe blockchain ledger and ater the
blozchain sale (Le. datastore). Tendemint, Quorum, Mulichan, Chain Core,
| Hyperiedger tra, and Corda are al permissioned bockchain systems that use the
orderexecte design

| Tendermint in example, employs a PBFT-based consensus process that ders

| om the oignal PBFT in a numberof respect. To begin. ony a subset of nodes,

known as validator, engage inthe consensus protocol, which requires nodes to lock
their cons in order to become validators, Second, Tendermint employ the leader
rotation strategy, which he leader i rated ter each run (i. aer each attempt
te bulda Doc) Ina round-obin ashen

Tondernint's thir feature i a Poot Stake consensus mechani. In actuality
validators in Tendermint do not have the same "weight" in the consensus procedure
and a validate’ voing power is proportional othe numberof ts bounded cuencies.
As a resul the proportions of etal vong power, rather than the number of validators,
are used te define ened or twothids ofthe validators,

lech Tercios

The pessimisio: method is flowed by the crderparalel execute (OXI)
archtecture, which is comparable 10 erderexecute architecture. distinct set o nodes
(orderers) creates consensus on the order of coming Wansactons and constructs
blocks in the OXI architecture. Orderer nodes cxeate a dependency graph or the
transactions within a Bock ers but

A dependency graph creates a pañal order based on transaction confits and
lows nor-contiting wansactons 16 un in paral. The transacions ae then cared
out by executer nodes in accordance wth the dependency graph that has been created
PerBlockchin is based on the OXII archtecure and can handle mutkenteprse
systems. Each enterprise has ts cum se of executor nodesin a mulkenterprie sytem,
‘and the conesponding executer nodes execute he ransacions ofeach enterprise

Optimistic Approaches: Finally, Hypetledger Fabric introduces the optimistic
OV arentecur (ginal proposed by Eve in the content of Byzantine faut oran
‘SMR by reversing the execution and order phases. Each enterprise's executor nodes
(Le. endorsers) execute transactions in parallel in Fabric. The transacicos are then
‘isseminated o al endorser nodes using a consensus technique (mal based on
Raf). The ransactons are subsequertly verified and added tothe lar by endorsers.

While Fabre enhances efcency by unning wansacton in parallel and suppoting
non deterinistic transaction execuñon. it mus ignore the consequences of competing
transactions in the workload (whichis prevalent in distributed systems), Because
Fabre rune transactions fra and verges them last, any ende dependencies
‘between transactions inthe same Dock ae nat recognised ut ve las phase, Fabi's
performance has been improved through a variety of ways while remaining rue to ts
XOV archtect.

To boost Fabrics thcughput for confitos transaction werkoads, FastFabric
‘employs several data structures and caching srteges, as well as parlelzing the
transacton valdaton pipdline, Fabices uses database concutency control techniques
te abot or réorganise transaction ate the order phase in order t resolve any confits.

FabrieSharp goes much further, presenöng an alarm for detecting transactions
that can never be reordered and a reorderng technique thal avoids supertuous
aborts (due to Fabsct+s strong soialzablty guarantees, whereas Fabre requires
serait guarantees) Final, the XOX Fable model includes a pre-order and post
‘otderexeciion stp, ih the iter invoduced ae the validation sage to re-exeeute
transactions that have been invalidated ouing to rendit conti,

Because all transactions are executed sequently in the OX design. has poor
pertemance, but bat the OX and KOV archtetures can execue transactions in
parate While XOV vatdstesreagunte confit lat, leading in poor performance, OXI
‘enables contentious workloads by detecting conficing transactions during the order phase
and constuctng dependency graphs, whereas XOV validates readamto confit fast
OV, on the aber hand, allows for nondetemiiste transaction exeeton by eonductg
transactons fest and discoveing any inconsistencies early on, whereas OXIl executes
transactions las. making it ost to abort transactons ifthe result are inconsistent,

Scalability
One of he most significant bares to commercial adoption of biockehain systems

no

Notes

m

Notes

is scalaily, pariculany in fnandial an large-scale database systems. Clusteng ls
mos used in pemissonedblockchan systems to boost scalabity. Nodes are partoned
into faukoleant clusters in clusteing algortms Ike Blockplane, where each stes
processes (or atleast arranges) a diet se of transactions, To improve by,
Pemissioned lockcha systems employ sg ledger or shardedledger approaches,

‘The complete ledger is repeated on al clusters nthe single-ledger technique, and
all nodes execute every vansacton. The ledger is pationed into many shards that are
maintained by various clusters inthe shardededger technique. Permissioned blockchain
systems witha sharded leer pero inta-shard and ros-shar ansactins

The coordnata-based technique othe fattened approach can e used to handle
crossshard transactions in a centalsed or decentalised vay. ReslentDB, AHL,
‘Sharer, Saguaro, and N-channel Fabric are al discussed in depth

Single-Ledger Appronches: To reduce the cost of soba connect, ReskentOB
employs. toplgicly aware clustering method that divides the network into local faut
tolerant clusters However, all clusters copy the ful edger on every node, and each
round, each cluster obtains local agreement on à sigle transaction before muticasing
the lcaly replated transaction to oer clusters. Then, in a preset order, all users
execute al transactions ofthat round. Thee Is no concept of tra. and crose=hard
ansacions in RestletOB because al rensachons are completed by a clusters

‘Sharded-Ledger Approaches: To improve scalabilty, AHL employs Ihe
sharing technique. Nodes are raademiy assigned to clusters in AML, comparable to
permissioness blockchains Esto, OmniLedger aná Rapidchan (caia commatees)
Each committee must have atleast 80 nodes (instead of 600 in OmniLedger to
ensure high chance of safely. AHL uses trustworthy hardware 1 reduce the number of
required nodes inside each committe by lining a node's harmful acy. A malicious
node cannot multeest nctsistent messages, such as messages wih inconsistent
sequence numbers o diferent nodes using usted hardware. AHL processes cross
shard transactions in a cantraised manner by relying on an extra set of nodes (cated
a reference cummitee) to act asthe coordinate. The reference commitee uses the
standard two-phase commit (2PC) and twophase locking (2PL) pretocls to perform
‘rose shed transactions between the clusters involved,

‘SharPer ie another permissoned sharded blockchain system, consising of a
ceseaon of ulboleant users, each of which maintains a shard ofthe blocichain

fader In contras to AHL, SharPer provides determinis safety assurances by using
tor pre-determined fautolerant cluster or presuming thatthe numberof nodes is.

| scostanialy more than the numberof falures. SharPer uses decenvalised fattened

Consensus proteccsto execute cross shar ransacons amang the relevant clusters in
decentralised way (without the need fr a reference commitee)

The nedes in Saguaro are crganised in a hierarchical stucture that folows
the wide-area network inastucture fom edge devees to edge. fog, and coud
servers, with nodes at each level clustered into faulolerant clusters, Saguaro, Ike
‘Sharer, keeps a shard of he blockchain ledger on each cluster at a lower level.
the processing of coss-shard transaction, Saguaro, onthe ther hand, benefts fem
the netvor’sherarheal stucture. The intemal Custer wäh the shortest total tance
‘tom all involved clusters, e. the lowest common ancestor ofall concemed clusters, =
chosen asthe coordinate fr each cros-ahard transaction, resulting in shorter latency.

lech Tercios 1a

Finaly. while channels are primarily used to improve confidentiality in mut-channet
Fabric, they can also be used to partion the system and data. À channel isa shard Notes
‘ofthe whole sytem that is admiistere independent by a (ogcaty) dierent group
‘of nodes while remaining aware o the larger system to which belongs. Fabric uses
hans to eficieny hande inta-shard transactions using a faulkilerat prtoco
In mutichenne Fabric, ctose-shard transactions are processed certralsed and need
‘ther the avalbilty ofa trusted channel among the partes to act as a coedinater cr
‘an atomic commit mechanism.

The primary diference between shardeduedger systems is how they handle
ross shard transactions. Teleraing Byzantine fur requires a high number of intra
and crosscluster communication phases, so centralsed processing of crossehara
transactions is easier and closer to the typical two-phase comme, Le. instead of a
Single coordinator node, a coordinator cluster I required,

‘The decentralised soon, an the ther hand, does net require an addons! set
‘of nodes, processes transactions in fewer phases across the pariipatng users, and
can process erose-hard transactions in paral wih non-overapping clusters.

However, achieving croseshard consensus among involved deste, which
requires numerous rounds of message forwarding resutsin high ateney if the cuters
are fa apa. Sngle-edger atematives, such as ResliemDB, onthe other hand, ao.
the latency of eross-shard transactions by duplicating al data across all clusters
Messages must sl be exchanged between all utes for sach ansacton,resuing m
‘excessive latency

1 Acces Thisfoom of lockchan ws This sot ofblockchain isa
anyeneto read, vite, ard permissionedbleckchain
Pafcpateinit As a asu its since read and wre access
| permisionies blocéchain sony granted to those who
open to ie general public. have been invited,

2 Neo Dontimow each ober Know each oer
tors x

3 Decenvalzed Apubte bleckchanis A private blockehain is mere
ve “decentaizes, centalzes,
Centazed

4 Orderot — Becauseñtisighterand When comparedtothe
Magnitude provides transactional pui blackehain, the order

|ieughput. a publie blockchaln of magnitude is higher
as a lower order of magnitude

than a private blckchain,
(5 Native Token Yes Not necessary

© Speed Slow Fat

T Transadions Apuble blockchan has fewer When comparedto publ
| preseconé Iransachonspersecond. blockchain transaction per

second higher.

= Waren Tender
Notes © Ge Dee tecno Apratenbckcnmie |
Andachveengsgemen.a _ mirewuneabltencks, |
pb net mare secre, harass, and ca recen
Ii pracy npoesletermarpulen hen pun
Dadacortosste became fe
em ad ban conolot bad art pune etre
tue uit
theincreeed number node ses ne.
inthe netvok LS
9 Eng Becuseireqreslage … Prateboctane ue alt
Gonsumpten arnt of estic restes less ener and aca
oran ad enero tan pui occ.
Conce, pub
consumes more energy an.
aa ean ia
10 Consenais Prost work, prot fake, On ae ich can
orme prosfefbum poofafspur. une rot peed Tie
And soon ea fe eros, (PED, Ra dam BF.

Ace Neomknmmuhoench __ Mmercalisensare
valoro pte imposstiin private
Disko vire he Biche Each vadaer
possi facon oa St sien and has ne
Pere ana goup mers necesary recents on
Long mars han 50% othe eme.
neo compter po)

12 (Een batas asthe [antaines
“pollo spt present and ta redndancy a wall
Corporate modes nas, ss ela legacy tens,
contare cheaper Trees ve ao mp
ne nest senda tot dosument handingand
money en seers tem _ elmnaing sen-manul
pr a mr
cost deveoing anónimo
à decenataed pesto 2

Host rede atop)

12 amples con, Eereum neo. 9 Ganks).EWF (Enea

\ ewan Das, Liezen Ser, BA (Insurance) Corda

N Stecmi te.

Summary

+ Blockchain is a decentralsed, shared ledge that makes it ender to record
transactions and track assets corporate network. A tangible asset, such as à
house, car. cas, er land, ran ntangble asset such as intellectual property. such
as patents, copyighis, branding. are examples of assets.

+ The Byzantine Generals Diemma has the same challenges as the double
spending problem (BGP). The BGP addresses the issue of reaching mutual
agreement on a consistent tate for ditibuted data. The ditfcuy of deren

lech Tercios 12

spatly dispersed generals besieging a cty and ring to agree onthe ideal
Moment or an attack is deserbed in he famous analogy, Notes

+ Apermissioned blockchain secures interactions between ase o entities hat have
common aim but do nat entirely trust one another, such as fms that exchange
dolar, 9004, or information, À permisioned bleckehan is one thats based on
the identities ofits peers and may thus use the rational Byzantinefautolerant
(GFT) consensus

+ The design of Bitcon, and hence the concept of a blokchain system, is based |
on a neiwerk having a distibuted and chrendogicaly ordered transaction
database hats Used Yo store Inear data records in a manipuain-proof manner.
I symbaises a coninuousty developing open ledger and allows fr dstibuted
consensus among untustwathy partipant,

+ A database isa sructured collection of perinen data that was creates wth a
speci gol in mind A database can be setup as a collection of @ferent tables,
Were each table corresponds to à reahword ently or eerient Each taco
contin avait of fds at indicate he dative quals ofthe ently

+A datibuted database management system (DDBMS) corroe the dseibuted
databace and offers cols that enable users to see though he databases, In these
systems, data is purposefuly spread among numercus nodes to ensure thatthe
business can make he best use of al ofs computing capable

+ Blockehin mining i a peertopeer computer actvy hat is used to safeguard
and validate bien tansactons, Btesin wansacion data fe added to Beans
\wotdvide public ledger of price transactions by Bosichain miners. Blockchain
miners protect locks in he ledgers, wich are then Ine together to form a cha.

+ À diarbuted consensus achieves agreement on a proposal or assures data
consensus among nodes ina dates system, Any technicians that werk vith
distributed systems Ike HDFS, MO, Resi, and Elastesearch may be quie familar
‘vt hi subject. Developers have eontinucuy looked into potential sclutons to
address this enduring issue due 1 the rapid development and ising complex of
Alepersed networks in theory and practice

+ Byzantine autilerance (BF) concerned wih assessing the entre stud never
in a iger sting. nado to actual hardware, various man-made" ails must be
conside Bacaur specie pele, nt atomstad systems, comm wrong

+ Merkletrees ae binary hash tres where each nonlea node has he hashes ofits
child nodes andthe at nodes have the hashes ofthe data locks, When such a
data truce is used, simple to detemine whether a cra transaction was
2 par ofa block

+ The greatest amount of processing that can be dene in a single Ethereum block
ls ealled the gas Im. A fred quanty of computational resources, denoted in
units of gas, re needed for each transaction to be processed on the Ehereum
bloc chain. Gas is the cumency used to pay for computing asks Ike running smart
contrasts or vrfying transactional infomation

+ Blockchain transactions are a fundamental component of beckchan technology.
A lockehain is a decentralzed digital ledger al records transaction between

124

Notes

paris. i is secured using cryptography and disrouted among a network of
nodes, making inmutable and resistant to tampering

+ Blockchain networks that use proototwork (Pol) or proototstake (POS)
consensus processes must include vansaction fees asa fundamenta! component
[Users hat want ther transactions to be recorded in he blockehain and hands by
‘he network mus pay these fees

‘© Blockchain anonymity is the capaciy of users to conduct transactions on the
bockchaln network wiheut disclosing thelr rue Identities. Users can conduct
transactions on a decentralised platform made possible by bleckchain technology
vitro the use of middlemen. Blockehain tchnclog) has become a wellikes
Platform for financial rancactons, supply chain management, and Gglal asset
management due lots transparency and mmuaabiy.

‘Network users that possess a particular quanty of eyptocurency aná take pat in
{ho networks consensus mechanism are ate forsaking incentives By staking
network users secure a specific amourt of eyptocureney as secunty to verify
transaction» and add new blocks to the ockchan. As compensation or ther
Participation nthe network, these individuals am staking incentives.

+ Aforin a bleckehan is when he source code scoped and modified to produce a
new piece of software or tem. Forks are Fequrty used and particulary prevalent
in cpen-souce projects. Hence, ryptocurences Ike Bcoin and Eihereum are
open source, decentralisadprogrammes that anybedy may centibuteto.

Glossary

‘© DLT Distributes Ledger Technology

+ BFT Byzantine Faut Tolerant

+ EGP: Byzantine Generals Dilemma

Po Prot of Werk

+ tor temet of mings

+ TCP Transer Control Protec

Data srucure: A blockchain’s data tuctur, whether publ or private, a inked
listo blacks holding transaction.

‘+ TEE: Trusted Exeeutlon Environment

+ SGX: Software Guard Extensions

PET Practical ByzanineFauk Trance, Pacicl Byzantine Faut Tolerance (PBFT)
“The PBFT algortmisarepicaton alot that cn tolerate Byzantine errs.

‘+ FBA: Federated Byzantine Agreement, The FBA consensus procedure removes
‘the requement o a PBFT membership is that has been unanimously agreed by
losing any new paripants to jin the network.

+ Proof ape Tn: Minar walt for random amount oft atthe end ofeach eye,

‘+ Leader Based Consensus: This category contains lgeihms that aim to solve the
agreement problem, in which dstrbutedasynehvonous processes must agree ona
‘valid leader process.

lech Tercios

Tendernit: Tendemint ie 3 state machnebased byzantine fai tolerant
‘mecranism that lows nodes to propose and vote or the next validator.

Diversity Mining Consensus: MuliChain suggest the mining diversity consensus
technique to overeome the problem ofa single pacipant in a private bleckehaln
moncpalzng the mining process

DDBMS: Distributed Database Management System
OLTP: Onine Transaction Processing

CLAP: Onine Anaicl Processing

once: number only used once

Double spending: A scenario in wich a Bein owner spends the same bio |

ce is known as double spending
Gis: Giga Hashes per second

‘THis Tera Hashes per second

BP: Bco Improvement Protocol

GPU: Graphics Processing Unt

[ASIC: Application Specie tegrated Gr

(CFT Crash Faust Tolerance

POS: Prot o Stake

DPoS: Delegated Prot of Stake

(MPT: Merkle Patricia tie

PATRICIA: Practical Algorthm to ReteveInfmation Coded In Alphanumeric
2KPs: Zero-Knowledge Pros

Check Your Understanding

1

In wich year the concept of blockchain was original proposes?
2 2008
>. 1988
©, 2000
u. 2005

‘What isa doserivalze, shared ledger that makes it easier to record transactions
and vack assets in a corporate network?

a. Bon
5. Blocichain

e Coptocureney
a. Cryptography

he concept of ested storage of transaction dat in redundant edger copies
reed to as hat?

125

Notes

1

Notes

3. Biockenain
D. Gnptography
©. Distributed Ledger Technology
4. Cnptocurency

Wat is an example of how blcckchains can execute arbitrary, programmable
ransadion loi in he fom of smart contrats?

a. Cnptocurency
> er

& Blockenain
4. Einereum

‘What among he flou cana blackchaln provide?

a. À design strategy hat Keeps transaction dat, vals, and state naturally near
tothe business logic in ne fem

b. Secure execution of business transactons, certified by a communty, a a
secure procedure that supports the tus and transaction processing hat are
fundamental to bieen

©. Apermissioned,ateratveechnclogy that complies weh existing restítions
a. Auottne above
“The study of mathematical modeling for decision-making scenario is known as?

2. game theory
b. currency
© protects
4. cryptecurercy

‘What takes data as input and outputs a fed lengh sting of characters that
represents the data?

a. seh table
5. exypographic hash function
ash value
4. hash code

‘Any aetvty that writes data to the blockchai remet as what?
protocol

quieine

Bockenain transaction

Bockchain network
ati te process of song he problem that results In a lepimate block?

a secuny

lech Tercios
bo consistency
e seb
a mining
10. Weichtypeofbockehai doesnt require permission ojintheblockchain network?
a. pemissioness
b. permissioned
o tata
4. allot the above

11. In which type of eonsensus algo contains agodthms that aim to soe the |

agreement problem, in which dstrButedasynehronous processes must agree ona
‘valid leader process?

3. proof of elapsed time
b. lenderbased consensus
e Part
a FBA

12. Vich ls a state machine-based byzantine fault tolerant mechanism tha atouts
‘nodes to propose and vote forthe next alter?

a. par
bo FRA

©. Tendermint

4. Diverstymiing consensus

13, Which ype of database contes the distibuted database and ofers tools that
enable users to ses trough he databases?

Dams
bo ROSS
e MysoL
4. Doans

14, What term is used when a number is added toa hashed or encrypted block in a
blockeain?

boas
© mining
4 sharing

15, The computational labor that nodes in the Blockchain network do in the aim of
samig addtional tokens is efredto as what?

a hashing

127

Notes

128 ere Teclas
D. mining

0 shading

4. allofthe above

16. The process of bleckchaln mining is cared cut by a global network of people can,
aswha?

Notes

a. data miners
B. miners
©. blackeain minera

Eteraum cents

17. What are diferent types of mining?
a nb
b. pou
© dus
4. alot the above

18, The greatest amount of processing (nat can be done in a single Eihereum blocks
called as?

Gas it
Pow
mer
Pos

19, Mat are dita ledgers that use csptograshyto secure and ve transactions and
maintain a tamperproo! record of data?

‘Sman contacts
Bickenain systems
‘staring

Perr

20. Wat species the procedures to be followed while adding blocks, validating
10 transaction, and resoling disputes?

a. Mining rewards
D. Biockehain application
© Chainpaiey

a. Auottne above

Exercise
4. Defne Blockchin Systems and te advantages over conventonal debited
databace.

2. What do you mean by blockchain network?
Tags