Module1-BCT - Copy (1)
Module1-BCT - Copy (1)
Technology(21CS734)
Module 1: Chapter-1
Block chain 101-Introduction
In the digital age, where the information is powered and security is
most important, a revolutionary technology as emerged to redefine how
we perceive and refine data—that is Block Chain Technology.
Block Chain Technology is transparent, immutable, decentralized
digital diary that records transactions across many computers.
It is a way to ensure trust, accountability and security.
Its about creating a trust in trust less environment
Block chain 101-Introduction
Why Block Chain
Some advantages of BC over existing systems of different domains
Decentralized, distributed, secure & faster, transparent & immutable.
1. Security: In BC , each block is encrypted and linked to the previous block forming
block chain. This chain of transaction is visible to everyone within network.
Altering one block requires changes to be made in all blocks which requires lot of
computational power.
2. Transparency: Every transaction in the BC is visible to all participants in the network.
This transparency ensures accountability and makes it merely impossible for any
participant to cheat the systems.
Why Block Chain
3. Decentralization: Unlike Traditional Databases that are controlled by a single
entity like Banks or Government.
A Block Chain is distributed across multiple nodes computers. Decentralization
means no single entity has complete control over the entire network.
Data Base Vs. Block Chain Architecture
Why Block Chain
Continued..
The structure of Block Chain
◻This blocks of records are copied to every participating computer in the network
and will have access to it.
Continued..
The great advantage of BC is that it can store any kind of assets, its
ownership details, history of the ownership and location assets in the
network.
The powerful feature of BC is that we can create a shared reality
across non trusting entities.(that is all participating nodes in the network do
not need to know each other or trust each other) because each has the
In BC, there are different notion of linking between nodes and each of these nodes
are called blocks.
Therefore, block chain as a series of blocks and each block is connected to its
previous block by some kind of a link.
Continued..
Blockchain is a combination of three important technologies - cryptographic keys, a
peer-to-peer network, and a digital ledger.
The cryptographic keys are of two types - private key and public key.
Each individual or node has both of these keys and they are used to create a digital
signature.
• Decentralized trust.
• Cost savings, transparency
• Efficiency.
There are multiple challenges too that are an area of active
research on block chain, such as scalability and privacy.
DistributedSystems
Distributed systems are a computing paradigm whereby two or more nodes
work with each other in a coordinated fashion to achieve a common outcome.
It is modeled in such a way that end users see it as a single logical platform.
Eg: Google's search engine is based on a large distributed system, but to a user,
it looks like a single, coherent platform.
Nodes can be honest, faulty, or malicious, and they have memory and a
processor.
DistributedSystems
A node that exhibits irrational behavior(intentionally misleading other nodes in
the network) is also known as a Byzantine node after the Byzantine Generals
Problem.
Every general has an army and surrounds a fort from one side.
• The model was proposed by David Chaum. Since1980s, e-cash protocols have
existed. Digital cash is a form of electronic money that is designed to mimic the
• Double spend problem arises when same money can be spent twice. It is quite
easy to make many copies of digital data, which is a big issue in digital
currencies.
Blind signatures is a type of digital signature in which the signer (usually a bank
or authority) signs a message without knowing its content. This enables a user to
obtain a valid signature on a piece of data without revealing what that data is.
Blind signatures are essential for ensuring privacy in digital cash systems.
Secret sharing is a concept that enables the detection of double spending, that is
using the same e-cash token twice (double spending).
E-Cash
• In 2009, the first practical implementation of an electronic cash (e-cash)
system named Bitcoin appeared.(Later the term crypto currency emerged)
• For the very first time, it solved the problem of distributed consensus in
a trustless network.
This mechanism lists all valid transactions of a coin in a blockchain to build trust in
the coin among traders.
The PoW consensus mechanism requires the network mining nodes to prove that the
work done and submitted by them qualifies them to receive the right to add new
transactions containing blocks to the blockchain.
In PoW, nodes that will add the next block to the blockchain are selected in proportion
to their computing power.
Proof of work-Advantages
Reaches consensus quickly, rules out the possibility of spamming, and is the
most tested protocol over time.
Security. PoW is open to 51% attack along with selfish mining and eclipse attack.
He then handed over Bitcoin development to its core developers and simply
disappeared.
White paper
BlockChain
Layman's definition: Blockchain is an ever-growing, secure, shared record
keeping system in which each user of the data holds a copy of the records,
which can only be updated if all parties involved in a transaction agree to
update.
Technical definition: Block chain is a peer-to-peer, distributed ledger that is
cryptographically-secure, append-only, immutable (extremely hard to change),
and updateable only via consensus or agreement among peers.
This means that there is no central controller in the network, and all
participants talk to each other directly.
• This property allows for cash transactions to be exchanged directly among the
peers without a third-party involvement, such as by a bank.
Distributed ledger
Block chain is a distributed ledger, which means that a ledger is spread across
the network among all peers in the network, and each peer holds a copy of the
complete ledger.
• Ledger is cryptographically-secure to provide security services which make this
ledger secure against tampering and misuse.
• The services include non-repudiation, data integrity, and data origin
authentication.
This verification helps ensure that the data or communication is coming from a
legitimate and trusted source rather than from a malicious or unauthorized entity.
Append-only
methodology.
• This means that blocks can only be created and read in the
blockchain ledger.
• It can be changed in rare scenarios wherein collusion against the blockchain network
succeeds in gaining more than 51 percent of the power.(To gain control over the
network , a group/participants gain 51% of the computational power in PoW or stake in
PoS), so that they can manipulate the blockchain's operation in their favour.
• When a group gains more than 51 percent of the power in a blockchain network,
they can potentially engage in an attack called "51% attack."
Updateable via consensus
• The most critical attribute of a block chain is that it is updateable only via
consensus which gives it the power of decentralization.
• No central authority. Any update made to the blockchain is validated against strict
criteria defined by the block chain protocol and added to the blockchain only after a
consensus has been reached among all participating peers/nodes on the network.
The structure of a block is also dependent on the type and design of a block
chain.
Eg: Suppose one block has 10 transactions, then to identify that block, all 10
transactions to combine and form one Hash Value.
It uses the concept of the binary tree to create the hash of the block and that
value is called the Merkle Root.
Genericstructureofa block
•
Genericelementsof a blockchain- Ethereum blockchain
•
Address
• Addresses are unique identifiers used in a BC transaction to denote senders and
recipients.
• An address is usually a public key or derived from a public key and they are unique..
• A single user may not use the same address again and generate a new one for each
transaction. This newly-created address will be unique.
• Bitcoin is a pseudonymous system. End users are usually not directly identifiable,
but some research in removing the anonymity of Bitcoin users has shown that they
can be identified successfully.
• A good practice is for users to generate a new address for each transaction in order to
avoid linking transactions to the common owner, thus preventing identification.
Address
A blockchain address is a form of identification, usually comprising a sequence
of alphanumeric characters unique to a specific user.
Every blockchain will have wallet addresses that are created by a cryptographic
operation on a computer.
Otherelements
Nodes also perform a transaction signing function. Transactions are first created
by nodes and then digitally signed by nodes using private keys as proof
that they are the legitimate owner of the asset that they wish to transfer to
someone else on the blockchain network.
Business logic helps companies manage and work with large amounts of
data.
With the right software, organizations can use business logic to translate
various company protocols into usable data and instructions to feed into
computer systems.
Now it is a very desirable feature due to the flexibility and power that
it provides to the blockchain applications.
Here, nodes called miners race to finalize the block they've created by
a process known as mining.
Step4:New block Found
Once a miner solves a mathematical puzzle (or fulfills the
requirements of the consensus mechanism implemented in a
blockchain), the block is considered "found" and finalized.
In crypto currency block chains such as Bit coin, the miner who solves
the mathematical puzzle is also rewarded with a certain number of
coins as an incentive for their effort and the resources they spent in
the mining process.
Step5:Add a new block to Block chain
The newly created block is validated, transactions or smart
contracts within it are executed, and it is propagated to other peers.
Block now becomes part of the block chain (ledger), and the next
block links itself cryptographically back to this block. This link is
called a hash pointer.
Working of Block Chain
Thisprocesscanbevisualizedinthediagramas follows
Benefits, Features & Limitations of BC
1. Decentralization: There is no need for a trusted third party or intermediary to validate
transactions; instead, a consensus mechanism is used to agree on the validity of
transactions.
2. Transparency and trust: Because block chains are shared and everyone can see what is
on the block chain, this allows the system to be transparent.
In this model, multiple entities maintain their own databases and data
sharing can become very difficult due to the disparate nature of the
systems.
Here, block chain can serve as a single shared ledger among many
interested parties thereby reducing the complexity of managing the
separate systems maintained by each entity.
Benefits, Features & Limitations of BC
1. Distributed ledgers
3. Block chains
4. Ledgers.
Types of BC
Distributed ledger is a broad term describing shared
databases; hence, all block chains technically fall under the
umbrella of shared databases or distributed ledgers.
This platform is suitable for various use cases, including supply chain
management, financial services, and healthcare.
Private Block chains
• Quorum: Quorum is an enterprise-focused blockchain platform
developed by JPMorgan Chase.
This is a concept whereby coins can be moved from one block chain to
another and moved back again.
This mechanism is also called Proof of Burn (PoB) and is used as an alternative
method for distributed consensus to PoW and Proof of Stake (PoS).
2. Two-way pegged Side Chains
Allows the movement of coins from the main chain to the side chain and
back to the main chain when required.(Bidirectional movement of assests or
data)
This process enables the building of smart contracts for the Bit coin network.
Eg: Rootstock which enables smart contract development for Bit coin side
chains.
It works by allowing a two-way peg for the Bit coin block chain, results in
much faster throughput.
Side Chains
Permissioned Ledger
Is a block chain where participants of the network are already known and trusted.
Do not use distributed consensus mechanism.
An agreement protocol is used to maintain a shared version of the truth about the state of
the records on the block chain.
For verification of transactions on the chain, all verifiers are already preselected by a
central authority and there is no need for a mining mechanism.
Bitcoin can become a permissioned ledger if an access control layer is introduced on top
of it that verifies the identity of a user and then allows access to the block chain.
Shared Ledger
This is a generic term that is used to describe any
application or database that is shared by the public or a
consortium.
All block chains, fall into the category of a shared ledger.
Fullyprivateand proprietaryblockchains
In specific private settings within an organization, there could be a
need to share data and provide some level of guarantee of the
authenticity of the data.
Eg: This type of block chain might be to allow for collaboration and the
sharing data between various government departments.
They are useful only when you need to share data among trusted
parties and not transfer value between nodes, offering benefits like
immutability, security, and consensus-driven updates.
2. Availability means that the nodes in the system are up, accessible for use,
accepting incoming requests and responding with data without any failures
as and when required. i.e data is available at each node and the nodes are
responding to requests.
Availability is achieved if both nodes are up and running and responding
with the latest copy of data.
C A P theorem
3. Fail-stop fault:
• This type of fault occurs when a node has crashed. Fail-stop
faults are the easier ones to deal with of the two fault types.
• Paxos protocol, is normally used to deal with this type of fault.
These faults are simple to deal with.
CAP theorem and block chain
4. Byzantine faults:
• The second type of fault is one where the faulty node exhibits
malicious or inconsistent behavior arbitrarily.