Block Chain Technology
Block Chain Technology
Technical Definition:
Blockchain is a peer-to-peer, distributed ledger that is cryptographically-secure,
append-only, immutable (extremely hard to change), and updateable only via
consensus or agreement among peers
peer-to-peer
no central controller in the network, and all participants talk to each other
directly
distributed ledger
ledger is spread across the network among all peers in the network, and
each peer holds a copy of the complete ledger.
cryptographically-secure
cryptography has been used to provide security services which make this
ledger secure against tampering and misuse. Uses SHA256 Algorithm.
append-only
data can only be added to the blockchain in time-ordered sequential
order. once data is added to the blockchain, it is almost impossible to change that
data and can be considered practically immutable
updateable only via consensus
any update made to the blockchain is validated against strict criteria
defined by the blockchain protocol and added to the blockchain only after a
consensus has been reached among all participating peers/nodes on the network
A Merkle tree stores all the transactions in a block by producing a digital fingerprint of
the entire
set of transactions.
It allows the user to verify whether a transaction can be included in a block or not.
Since each block contains information about the previous block, they
effectively form a chain, with each additional block linking to the ones
before it.
Blockchain transactions are irreversible, once they are recorded, the data in
any given block cannot be altered retroactively without altering
subsequent blocks.
TECHNOLOGIES USED
2. The data section contains the main and actual information like
transactions and smart contracts which are stored in the block.
Faster Settlement
Secure
Decenterlized
Census
Distributed
Immutable
HOW BLOCKCHAIN ACCUMULATES BLOCKS
4. The newly-created block now becomes part of the ledger, and the
next block links itself cryptographically back to this block. This link
is a hash pointer. At this stage, the transaction gets its second
confirmation and the block gets its first confirmation.
Distributed: All network participants have a copy of the ledger for complete
transparency.
Unanimous: All the network participants agree to the validity of the records
before they can be added to the network. When a node wants to add a block
to the network then it must get majority voting otherwise the block cannot
be added to the network.
1991
A cryptographically secured chain of blocks is described for the first time by Stuart Haber and W
Scott Stornetta
19
98 Computer scientist Nick Szabo works on ‘bit gold’, a decentralised digital currency
20 Stefan Konst publishes his theory of cryptographic secured chains, plus ideas for implementation
00
Developer(s) working under the pseudonym Satoshi Nakamoto release a white paper establishing the model for a blockchain
20
08 Nakamoto implements the first blockchain as the public ledger for transactions made using bitcoin
Blockchain technology is separated from the currency and its potential for other financial, interorganisational transactions is explored.
20 Blockchain 2.0 is born, referring to applications beyond currency
09 The Ethereum blockchain system introduces computer programs into the blocks, representing financial instruments such as bonds.
These become known as smart contracts.
20
14
TIERS OF BLOCKCHAIN TECHNOLOGY
BENEFITS
Decentralization
Transparency and trust
Immutability
High availability
Highly secure
Simplification of current paradigms
Faster dealing
Cost saving:
TYPES OF BLOCKCHAIN
Public Blockchain
YPES OF BLOCKCHAIN
Hybrid/Semiprivate blockchains
Real Estate: Hybrid networks can be used for this industry, allowing real
estate firms to use them to operate their systems and share information
with the public.
Consortium Blockchain
Eg:
1. Money transfer system 2. Disintermediation 3. Bitcoin 4.
Atomicity
Distributed Systems
It is modeled in such a way that end users see it as a single logical platform.
Eg:
1. Money transfer system
2. Disintermediation
3. Bitcoin 4. Atomicity
.
A node can be defined as an individual player in a distributed system.
The problem states like a group of generals with their army are about
to attack their enemy. They surrounded the enemy’s castle from 4
different directions. Now how would they communicate the decision
of attacking or retreating at the same time?
The Byzantine generals problem has several key parts that are important
to understand:
the parties cannot rely on a central authority and must coordinate their
actions in a decentralized environment
How can a general make sure if he received the message from the expected general?
What if other generals become traitors and they send the message to attack, but
they
actually retreat.
How can the system be sure that each general will attack at the same
time from their designated location? Is there no way but to trust each other
completely?
Blockchain seems to resolve this problem with the Byzantine fault tolerance (BFT)
consensus mechanism.
BFT system is able to continue operating even if some of the nodes fail or
act maliciously
BYZANTINE FAULT TOLERANCE (BFT)
To ensure the success of the generals’ team, they need an algorithm that could adhere to the
following conditions:
All the troop generals need to agree on the next action of the plan.
The group of generals needs to reach a consensus or decision, irrespective of the traitors’
actions.
The system or network should not lead to a 51% attack at any point of action.
fail-stop and
arbitrary node.
A pBFT-based system has one primary node, also called a leader node.
Any node in the system can become a primary node. For example, if
the primary node fails, a secondary node can become a primary node.
existing primary node and replace it with the next node in line.
pBFT consensus takes place as follows:
All the nodes (primary and secondary) execute the client request.
Next, they send the client a reply.
achieves decentralization.
the keys are used to determine the location of the data in the table.
In a DHT, each node is responsible for storing and managing a portion of the
data.
compact key.
This key is then linked with the data (values) on the peer-to-
peer network.
Fault Tolerant: System is reliable with lots of nodes joining, leaving, and
failing at all times.
millions of nodes.
get (key)
HADOOP DISTRIBUTED FILE SYSTEM
What is DFS?
DFS stands for the distributed file system, it is a concept of
storing the file in multiple nodes in a distributed manner.
NameNode(Master)
DataNode(Slave)
HDFS
HDFS stores the data in the form of the block where the size of
each data block is 128MB in size which is configurable means
you can change it according to your requirement in hdfs-
site.xml file in your Hadoop directory.
FEATURES OF HDFS
HDFS has in-built servers in Name node and Data Node that helps
used for storing the Metadata i.e. the data about the data.
Meta Data can be the transaction logs that keep track of the user’s activity in
a Hadoop cluster.
Meta Data can also be the name of the file, size, and the information
about the location(Block number, Block ids) of Datanode that
Namenode stores to find the closest DataNode for Faster
Communication.
DATANODE:
Fault tolerance - The HDFS is highly fault-tolerant that if any machine fails,
the other machine containing the copy of that data automatically become
active.
Distributed data storage - Here, data is divided into multiple blocks and
Portable - HDFS is designed in such a way that it can easily portable from
platform to another.
ASIC
Mining requires lot of space and time, so miners need to set up entire device
or partition memory for mining purpose.
As the bitcoin value goes up, ASICs began dominating the mining industry. Its
impossible for people to mine bitcoins with their home computers.
ASIC RESISTANCE
decentralized
Ethereum (ETH, or Ether): The ETH coin uses the Keccak256 hashing
Safex Cash (SFX): Its mining algorithm, RandomSFX, was developed based on
Monero's algorithm, RandomX
From the developer's perspective, ASIC-resistant technology is the only solution to keep the
crypto sphere decentralized.
TURING COMPLETE
CRYPTOGRAPHY
HASHING
DIGITAL SIGNATURE
WHAT IS HASHING?
Hashing is converting an original piece of data into a digest or hash.
Cryptographic hash functions are irreversible. That means it’s
a 1- way function, and one can’t generate the message back
using the digest.
pads the message with data until the length reaches the next highest
multiple of 512-bit.
SHA-1 is no longer considered secure against well-funded
adversaries. All major web browser manufacturers stopped
accepting SHA-1 SSL certificates in 2017.
SHA-2
Collision resistant: No two input values can produce the same hash
output. This ensures that every block in the blockchain ledger is
assigned a unique hash value.
Preimage resistance: The input can not be recreated given a hash
value. This ensures that during the proof of work in bitcoin, the
miners cannot guess the value of nonce by converting the acceptable
hash back into the input
Large output: The 256-bit output adds up to 22562256 possibilities
making it impossible to apply the brute force solution to crack the hash.
Avalanche effect: If there is a small change in the input, the output
changes dramatically. This makes sure that the hash value can not
be guessed based on the input values. This makes the hash more
secure.
DIGITAL SIGNATURES
A digital signature is a mathematical technique used to
validate the authenticity and integrity of a message,
software, or digital document.
The steps followed in creating digital signature are :
Message digest is computed by applying hash function on the message
and then message digest is encrypted using private key of sender to form
the digital signature.
Digital signature is then transmitted with the message.
Receiver decrypts the digital signature using the public key of sender.
The receiver now has the message digest.
The receiver can compute the message digest from the message
The message digest computed by receiver and the message
digest (got by decryption on digital signature) need to be
same for ensuring integrity.
• Only the intended receiver can decrypt and read the message using its own
private key
Both of these keys are generated using the Elliptic Curve cryptography
method.
Firstly, it creates the private key and then it creates a public key from the
private key using the Elliptic Curve Algorithm (aka ECDSA).
It requires a lot of computational power and time to brute force the private
key which is next to impossible.
DIGITAL WALLET
private key, public key, and the public address is kept secure in a software
known as Wallet.
DIGITAL SIGNATURES
COMPONENTS OF ECDSA:
Recalculating R and S
formula:
S' = (H(m) / e) (mod n)
Here's what these terms represent:
"H(m)" is the hash of the message.
2. Address Generation:
3. Block Validation:
Many blockchain platforms use ECDSA to generate the public and private keys for
creating
digital assets, tokens, or non-fungible tokens (NFTs).
5. Immutable Records:
ZERO-KNOWLEDGE PROOFS
Commitment Phase:
In the commitment phase, the prover initially commits to the truth of the
statement without revealing any specifics. This commitment is like saying, "I
can prove this statement is true, but I won't reveal how just yet."
In the response phase, the prover provides a convincing response to the verifier's
challenge, effectively demonstrating their knowledge or possession of the secret.
However, this response doesn't reveal the actual secret itself. It only proves that
the prover has the necessary information to make such a response.
Completeness :
Soundness
Zero-knowledge property
Example of iZKPs:
Zero-Knowledge Proof of Knowledge (ZK-PoK): Proves
that the prover knows a secret without revealing the
secret itself.
Privacy enhancement
Improved security
Complexity and computational cost
Scalability concerns NON-INTERACTIVE ZERO-KNOWLEDGE PROOFS (NIZKPS)
Examples of NIZKPs:
zk-SNARKs (Zero-Knowledge Succinct Non-Interactive Argument of
Knowledge): Used in privacy-focused cryptocurrencies like Zcash.
Bulletproofs: Efficient NIZKPs for proving the correctness of
arithmetic computations.
MEMORY-HARD ALGORITHMS
miners with specialized hardware can solve puzzles faster and mine more
cryptocurrency.
This can discourage individual miners or smaller operations from participating.
competitively.
ETHASH
Ethash plays a crucial role in ensuring the security, decentralization, and fairness of
the
Ethereum network.
Mining Process:
ADVANTAGES:
Security Enhancement
Privacy Protection
Memory-Hard Characteristics:
The algorithm uses a large dataset known as the "DAG" (Directed Acyclic
Graph), which is stored in memory. The size of the DAG grows over time,
forcing miners to have a substantial amount of memory to mine efficiently.
This contributes to the decentralization of the network and enhances its overall
security.
Permissioned
Nodes have to take permission from a central authority to access or make any
changes in the network. Mostly these types of permissions include identity verification.
Permissionless
Hybrid
HOW DLT WORKS
This eliminates the need for a central authority and reduces the
TYPES OF DLT
Blockchain:
Here transactions are stored in the form chain of blocks and each block produces a unique
hash that can be used as proof of valid transactions.
Each node has a copy of the ledger which makes it more transparent.
Directed Acyclic Graphs (DAG):
This uses a different data structure to organize the data that brings
more consensus.
Validation of transactions mostly requires the majority of support from the nodes in the
network.
Every node on the network has to provide proof of transactions on the ledger and then can
initiate transactions. In this nodes have to verify at least two of the previous transactions
on the ledger to confirm their transaction.
Hashgraph:
It uses a different consensus mechanism, using virtual voting as the form consensus
mechanism for gaining network consensus. Hence nodes do not have to validate each
transaction on the network.
Holochain:
Each node will run on a chain of its own. Therefore nodes or miners have the freedom
to operate autonomously. It basically moves to the agent-centric structure. Here agent
means computer, node, miner,etc.
Tempo or Radix:
Tempo uses the method of making a partition of the ledger this is termed sharding and then
all the events that happened in the network are ordered properly. Basically, transactions are
added to the ledger on basis of the order of events than the timestamp.
ADVANTAGES OF DISTRIBUTED LEDGER TECHNOLOGY
High Transparency
Decentralized
Time Efficient
Scalable
USES OF DLT
HEALTH CARE
SUPPLY CHAIN
BANKING
GOVERNANCE,CYBER SECURITY
REAL ESTATE
DISADVANTAGES
51% Attack
Costs of Transaction
Slow Transaction Speed
Scalability Issues
Lack of Regulation
Energy Consumption
Complexity
Privacy Concerns
Lack of Interoperability
HOW ARE BLOCKCHAIN AND DISTRIBUTED LEDGER DIFFERENT?
MINING STRATEGIES & REWARDS
BLOCK REWARDS
A Block Reward is basically a reward given to a Bitcoin Miner for every Block for which he
has solved the complex mathematical algorithm, and thus, the transaction records are
added to the Blockchain.
Halving Process is associated with Bitcoin that the Block Reward just halves itself once
every 2016 Blocks are mined, every 4 years.
2009-50.00 BTC.
ASIC mining: This type of device is made to mine a specific cryptocurrency. It's expensive, but
it also typically provides the highest hash rate, meaning it offers more mining power.
GPU mining: Mining using GPUs, commonly known as graphics cards. These also provide
considerable mining power but at a somewhat high up-front cost.
CPU mining: Mining using a computer's CPU. CPUs don't have nearly as much mining power as
ASICs and GPUs.
Mining pools: Groups of miners who work together to mine crypto and share block rewards.
Miners pay a small percentage of those block rewards as a pool fee.
Solo mining: Mining on your own. It's much harder to earn block rewards this way, so mining
pools are often the better choice.
Cloud mining: Paying a company to mine crypto on your behalf with its own mining devices.
Cloud mining requires a contract, and the terms almost always favor the company and not the
miner.
ETHEREUM
These cryptographic lockers can only be unlocked when certain conditions are met.
2013: Ethereum was first described in Vitalik Buterin’s white paper in 2013 with the goal of
developing decentralized applications.
2014: In 2014, EVM was specified in a paper by Gavin Wood, and the formal development
of the software also began.
2015: In 2015, Ethereum created its genesis block marking the official launch of the platform.
capitalization.
2021: In 2021, a major network upgrade named London included Ethereum improvement
proposal 1559 and introduced a mechanism for reducing transaction fee volatility.
2022: In 2022, Ethereum has shifted from PoW( Proof-of-Work ) to PoS( Proof- of-State )
consensus mechanism, which is also known as Ethereum Merge. It has reduced Ethereum’s
energy consumption by ~ 99.95%.
DAO is an organization that allows implementing rules. These rules are encoded as a computer
program and are not owned by the government.
DAOs allow us to work with like-minded folks around the globe without trusting a benevolent
leader to manage the funds or operations.
There is no CEO who can spend funds on a whim. Instead, blockchain-based rules baked into the
code define how the organization works and how funds are spent.
The distributed ledger technology and smart contracts are at the heart of the DAO ecosystem,
where governance rules are written, automated and enforced using software, and the participants
oversee contributed funds, eliminating the need for third-party involvement.
HOW DAO WORKS?
Smart contracts are used to construct the DAO's rules, which are set by a core team of community members.
These smart contracts are evident, verifiable and publicly auditable and lay the groundwork for the DAO's operations.
They allow any potential member to comprehend how the protocol will operate at all times fully.
The next step is for the DAO to work out how to receive financing and how to impart governance once these rules have been
formally inscribed onto the blockchain.
HOW DAO WORKS?
Funding is generally gathered using the token issuance method, wherein the protocol sells
tokens in exchange for funds.
Token holders receive voting rights in exchange for their money, which are usually
proportional to their holdings.
The stakeholders of the DAO decide the rules, and these rules and transaction records are
stored on a blockchain with complete transparency.
One of the most remarkable aspects of DAOs is that, once the codes are written and
implemented, they cannot be changed and no member holds any special authority to
make it happen.
Any changes to be made have to first gather member voting, and upon
is when the proposal gathers votes from a majority of stakeholders or when the proposal
fulfills a certain set of rules in the network consensus rules that the changes are
implemented.
Token Holders (Community): Individuals or entities that hold tokens in the DAO,
representing their ownership and influence over the organization.
Smart Contract (DAO's Code Rules): The heart of the DAO, consisting of code that defines
the rules, governance, and functionalities of the organization. It automates decision-making
processes.
Proposals and Voting (Decisions and Governance): Token holders can create proposals to
suggest actions or changes within the DAO. These proposals are voted upon by token
holders to reach a consensus on whether to execute them.
Execution of Actions: Once a proposal is approved through voting, the smart contract
automatically executes the specified action, which can include transferring funds,
distributing rewards, or implementing changes in rules.
TYPES OF DAO
Protocol DAOs
When tokens serve as a voting metric for implementing any changes in the protocol, such a
governance structure represents protocol DAOs
Examples
It has created a protocol allowing anyone with ETH and a MetaMask wallet to
lend themselves money in the form of a stablecoin called DAI.
Protocol DAOs.
Maker DAO
UNISWAP
YEARN Finance
DAOS
COLLECTOR DAOS
Pool funds together so that the collective community can invest treasury funds in blue
chip NFT art and other collectibles, where each member owns a share corresponding to
their personal investment. Flamingo and Constitution
Example:
GRANT DAOS
The primary objective of a Grant DAO is to offer financial support to projects that drive
meaningful change, ultimately working towards a future that is fairer and more sustainable.
Examples:
MolochDAO : Its noble objective is to contribute capital with a singular purpose: to allocate
funds towards the development and sustenance of Ethereum’s infrastructure, a crucial digital
public good.
GitCoin DAO: helping thousands of projects grow their open source ecosystems and
distributed millions in funding.
PHILANTHROPY DAOS
Philanthropy DAOs aim to help progress social responsibility by organizing around a shared
purpose to create impact in the world of Web3.
UkraineDAO uses the ENS domain, ukrainedao.eth, to send donations to Ukrainian soldiers, and
support the Ukrainian organization, Come Back Alive.
SOCIAL DAOS
Collaboration platforms for social networking in the crypto space like Blockster
are called Social DAOs. Such platforms offer digital democracy where everyone's
opinions are heard, and people can share their common interests.
Examples:
INVESTMENT DAOS
They allow capital pooling to democratize investing for various DeFi operations.
Example:
Krause House: governed by basketball fans to operate the National Basketball Association.
META CARTEL
BESSEMER DAO
MEDIA DAOS
Example:
Decrypt is another media DAO example that empowers users to vote on what
types of content they want to see.
SMART CONTRACT
A Smart Contract (or cryptocontract) is a computer program that directly and automatically
controls the transfer of digital assets between the parties under certain conditions.
HOW DOES SMART CONTRACT WORKS?
Network updates: After smart contracts are executed, all the nodes on the network update
their ledger to reflect the new state. Once the record is posted and verified on the
blockchain network, it cannot be modified, it is in append mode only.
VULNERABILITY, ATTACKS
Phishing, SYBIL
This scam attempts to attain a user’s credentials without their knowledge through
email.
Fraudsters send wallet key owners emails posing as a legitimate, authoritative source
asking users for their credentials using fake hyperlinks.
User’s credentials and other sensitive information in possession of hackers can result in
losses for the user and the blockchain network
• Reconfirm with the support or partner if you receive an email requesting login details
regarding the problem.
• Don’t click on the links until you've thoroughly reviewed it. Rather than clicking on the links,
enter the address into your browser’s private tab.
blockchain.
An attacker can divide a network into two (or more) distinct components using routing
attacks. The attacker blocks the communication between nodes in a certain chain and the
attacker creates parallel blockchains. When the attack is over, all blocks mined within the
smaller chain are discarded. Any transactions and the earnings of the miners are discarded
as well.
Hackers can intercept data as it’s transferring to internet service providers hijacking IP
consensus.
ROUTING ATTACKS
In a routing attack, blockchain participants typically can’t see the threat, so everything looks
normal. However, fraudsters have extracted confidential data or currencies
• Use encryption.
•Educate yourself and your workers about the risks associated with information
security.
SYBIL ATTACKS
In a Sybil attack, hackers create and use many false network identities to flood
the network and crash the system.
using those nodes, the hacker will acquire majority consensus and disrupt the chain’s
transactions. As a result, a large-scale Sybil assault is nothing quite a 51% attack.
• Monitor other nodes’ behavior and check for the nodes that are only
forwarding blocks from one user.
51% ATTACKS
But if a miner, or a group of miners, could rally enough resources, they could attain more
than 50% of a blockchain network’s mining power. Having more than 50% of the power
means controlling the ledger and manipulating it to reverse transactions.
In 2018, three renowned cryptocurrency platforms experienced issues from 51% attacks.
The three platforms were Ethereum Classic, ZenCash, and Verge. Globally, enterprises lose
around $20 million annually due to 51% attacks
51% ATTACKS
A 51% attack occurs when a single individual or organization (malicious hackers) collects
more than half of the hash rate and seizes control of the entire system, which can be
disastrous.
Hackers can modify the order of transactions and prevent them from being confirmed.
They can even reverse previously completed transactions, resulting in double-spending.
SIDECHAIN
It enables tokens or other digital assets to be transferred between the mainchain and the
sidechain.
It is designed to address scalability issues and allows for the exploration of unique
blockchain functionalities.
A sidechain can be public or private, and each sidechain has its own token, protocol,
consensus mechanism, and security.
Sidechains can be used to run blockchain applications like decentralised apps (dapps),
taking some computational load off the mainchain and helping to scale the blockchain.
Popular sidechains include Polygon for Ethereum and Rootstock for Bitcoin.
HOW DO SIDECHAINS WORK?
A sidechain is a blockchain that stems from the main blockchain and runs in parallel to
it.
It is attached to the main blockchain by means of a two-way peg.
This enables the interchangeability of digital assets between the parent
blockchain and its sidechain.
Two-way peg:
It’s called a “two-way” peg because the connection can go both ways — from the main
blockchain to the sidechain and back again.
Smart contracts:
Smart contracts, to put it simply, are blockchain-based algorithms that execute when
certain criteria are satisfied.
They are often used to automate the implementation of an agreement so that all parties
can be certain of the conclusion right away, without the need for an intermediary or
additional delay.
They can also automate a workflow such that when circumstances are met, the following
action is executed. By requiring validators on the mainnet and sidechain to perform
honestly while validating cross-chain transactions, smart contracts are utilized to ensure
that fraud is kept to a minimum.
Permissioned Sidechains
They are primarily used by businesses and organizations that need to control who has
access to the sidechain and the data contained therein.
PUBLIC SIDECHAINS
The operate under the same principles as public blockchains, meaning anyone can participate in their
consensus protocol and validate transactions.
Public sidechains are ideal for applications that require transparency and open
systems.
FEDERATED SIDECHAINS
They are not fully open like public sidechains, they are also
Federated sidechains can offer a balance between control and openness, making
them ideal for applications that require some level of privacy but also want to
leverage the consensus benefits of a larger, select group of participants.
BENEFITS
Scalability
Interoperability
Customized Functionallty
Limitation:
Security Risk
Centralization Concern
Regulatory and Compliance Issues.
Liquid Network
It leverages the prominent features of sidechains for reducing the block discovery
time to one minute, in comparison to the ten minutes of the Bitcoin mainnet.
It enables fast, secure, and confidential transactions, providing a solution for financial
institutions and exchanges that require speedy and private Bitcoin transactions.
Liquid issues its own native asset, Liquid Bitcoin (L-BTC), which is a “wrapped” version of BTC. L-
BTC is always created and burned by an equal amount of BTC locked on the mainchain by the
Liquid governance.
When a user wants to swap their L-BTC back to BTC on the Bitcoin network, they can do so
by initiating a “peg-out.” To start the process, the L-BTC must first be sent to a burn
address, where the funds will be permanently removed from the Liquid Network. Once this
transaction is confirmed, the Liquid Federation will release an equivalent amount of BTC
on the Bitcoin network and send it back to the user.
RSK (Rootstock)
Open-source smart contract platform with a 2-way peg to Bitcoin.
It merges the capabilities of Ethereum's smart contracts with the Bitcoin network, effectively
bringing the flexibility and versatility of Ethereum to Bitcoin.
RSK enhances the Bitcoin ecosystem by enabling more complex applications without compromising
the security of the Bitcoin network.
RSK has created a robust platform for smart contract development and
execution.
It enables developers to build dapps using Solidity, the same programming language used
in Ethereum.
PowPeg is a proof-of-work secured, two-way peg used by RTS to evaluate Bitcoin consensus rules
and allow users to convert BTC to RBTC and vice versa.
RSK (ROOTSTOCK)
Every smart contract deployed on Rootstock can also be deployed on Ethereum with full
compatibility.
Scalability
Transactions on RSK can be confirmed, bundled, and then sent to Bitcoin’s base layer for final
settlement. Bundling increases Bitcoin’s throughput, therefore expanding the network’s capacity
to host many more users, applications, and transactions.
Near-instant settlement
RSK creates new blocks about every 33 seconds. This is remarkably faster than Bitcoin’s 10-
minute block time. RSK can also process about 10-20 transactions per second (tps), which is more
efficient than Bitcoin’s capacity of about 5 transactions per second.
Smart contracts
Rootstock's smart contracts are fully autonomous and eliminate the need for an intermediary to
facilitate transactions. Since Bitcoin’s base layer has limited programmability, RSK implements
smart contract functionality to build decentralized applications on top of the larger Bitcoin
network.
Merged Mining
Miners can engage in merged mining to mine for the Bitcoin and RSK blockchains
simultaneously.
Bitcoin and RSK consume the same mining computing power, so miners can contribute
hash rate to mine blocks on RSK.
additional resources.
Merged mining allows RSK to validate transactions, create blocks, and send them to
Bitcoin
RSK BRIDGES
Powpeg - RSK's 2-way peg used to complete conversions between BTC and R-BTC.
Plasma
It's essentially a network of sidechains (also known as child chains) designed to perform
complex operations off the Ethereum mainnet, reducing the load on the main Ethereum
blockchain and enhancing its scalability.
Each Plasma sidechain can operate independently and handle its transactions, reducing the
overall load on the Ethereum mainnet.
This means the Ethereum network can handle more transactions and operate more
efficiently, making it more scalable.
NAMECOIN
Namecoin is "a peer-to-peer naming system based on Bitcoin" created in 2011 from a fork
of the Bitcoin blockchain.
It is designed to act as a blockchain and token for a decentralized domain name system
(DNS), where token holders can claim a specific name for their websites.
Namecoin attempts to replace existing domain name server technology with blockchain
technology.
DNS.
NAMECOIN
allows users to protect domain name servers (DNS) by embedding them on a distributed ledger.
Standard DNS domains use top level domains (such as .com) which are controlled by central
authorities. The central authority which controls a top-level domain is able to disable any
website which uses their top-level domain if it so chooses, which enables censorship.
The .bit top level domain provided by Namecoin is not controlled by a central authority and
changes to websites which use .bit domains can only be performed using their
corresponding private keys.
Namecoin uses Bitcoin's Proof of Work (PoW) mechanism for its consensus and distributes
DNS on the blockchain network by securely registering human-readable names.
Namecoins introduced merged mining, which allows a miner to mine on more than one
chain simultaneously.
The idea is simple but very effective: miners create a Namecoin block and produce a hash
of that block.
Then the hash is added to a Bitcoin block and miners solve that block at equal to or greater
than the Namecoin block difficulty to prove that enough work has been contributed
towards solving the Namecoin block.
The coinbase transaction is used to include the hash of the transactions from Namecoin.
The mining task is to solve Bitcoin blocks whose coinbase scriptSig contains a hash pointer to
Namecoin block
If a miner manages to solve a hash at the bitcoin blockchain difficulty level, the bitcoin block is
built and becomes part of the Bitcoin network. In this case, the Namecoin hash is ignored by
the bitcoin blockchain.
On the other hand, if a miner solves a block at Namecoin blockchain difficulty level a new
block is created in the Namecoin blockchain.
The core benefit of this scheme is that all the computational power spent by
the miners contributes towards securing both Namecoin and Bitcoin.
ADVANTAGES
GHOST
The principle of GHOST is that the sender only sends a ghost (or dummy) packet to the
receiver, which can then reply with as many packets as it needs.
The sender creates a digital signature by encrypting the packet with the receiver’s
public key.
The receiver decrypts it using his private key (the public key is used to encrypt).
If the decryption was done correctly, the sender is assumed to be who he claims to
be, and the transaction is accepted.
He may also send this ghost packet to other receivers (i.e., the
transaction is broadcasted) using the same procedure.
Since there may be more than one receiver, this protocol is called “GHOST”, which stands
for ” Greedy Heaviest Observed Sub-Tree”, as a reference to how it routes packets
through other nodes in addition to its direct route between sender and receiver.
In PoW blockchains like Bitcoin, Ethereum, etc due to the random nature of hashing two
miners can be working on the same transaction producing two blocks.
This means that all the work done by the second miner on
verifying the second block is lost (orphaned).
The miner does not get rewarded. These blocks are called uncle blocks in Ethereum.
GHOST protocol is a chain selection rule that makes use of previously orphaned blocks and
adds them to the main blockchain and partially rewards the miner also.
Stakeholder
types Primary
This group includes all those who enjoy an economic relationship with the
organization, such as shareholders, workers, suppliers, and customers.
Secondary
Secondary stakeholders are all those groups that do not participate directly in any
exchange with a specific company, but they can be affected by the actions of the company.
Developers- create and optimize the blockchain protocols that serve networks and design
the architecture of blockchain systems
Validators, Delegators and Formulators (Miners) - They add transactions, bundled into
blocks, to the network by solving complex mathematical problems and require considerable
computing power and electricity
The Internal Revenue Service (IRS) does not consider cryptocurrency to be legal tender but
defines it as “a digital representation of value that functions as a medium of exchange, a
unit of account, and/or a store of value” and has issued tax guidance accordingly.
The key has always been to reduce financial crime and bring transparency
The Biden administration’s new framework also sees “significant benefits” from creating a
central bank digital currency (CBDC) or a digital form of the U.S. dollar.
Federal Reserve Chairman Jerome Powell has remarked that the key reason to release a
CBDC would be to eliminate the need for alternative coin use in the country.
BITCOIN STAKEHOLDERS
CANADA
Cryptocurrencies: Not legal tender
Canada became the first country to approve a Bitcoin exchange-traded fund (ETF), with
As for crypto trading platforms, the Canadian Securities Administrators (CSA) and
the Investment Industry Regulatory Organization of Canada (IIROC) require that crypto
trading platforms and dealers in the country register with provincial regulators.
Canada classifies all crypto investment firms as money service businesses (MSBs) and
requires that they register with the Financial Transactions and Reports Analysis Centre of
Canada (FINTRAC).
JAPAN
Cryptocurrencies: Legal, treated as property
Cryptocurrency Exchanges: Legal, must register with the Financial Services Agency
Meanwhile, crypto exchanges in the country must register with the Financial Services Agency
(FSA) and comply with AML/CFT obligations. Japan established the Japanese Virtual Currency
Exchange Association (JVCEA) in 2020, and all crypto exchanges are members.
Japan treats trading gains generated from cryptocurrency as miscellaneous income and taxes
investors accordingly.
The country has been working on several aspects when it comes to regulation, including
taxation. In September 2022, the government announced it would introduce remittance rules
as early as May 2023 to prevent criminals from using cryptocurrency exchanges to launder
money.
CRYPTOCURRENCY REGULATION IN UK
Cryptocurrencies: Not legal tender
Cryptocurrency exchanges: Legal, registration requirements with FCA
The European Union (EU) has accepted blockchain and digital assets as part of the investable
universe. In January 2020, the governing bodies signed the 5th Anti-Money Laundering
Directive (5AMLD) into law, marking the first time cryptocurrency providers will fall under
regulatory purview. The law states that member states must document the identities and
addresses of all digital asset owners.
Unlike the U.S., where the SEC imposes a standard capital gains tax, EU member states have
different tax rules for cryptocurrencies. Some European countries collect 0 to 50% on derived
profits while others take nothing.
The People’s Bank of China (PBOC) bans crypto exchanges from operating in the country,
stating that they facilitate public financing without approval.
Furthermore, China placed a ban on Bitcoin mining in May 2021, forcing many engaging in
the activity to close operations entirely or relocate to jurisdictions with a more favorable
regulatory environment. And in September 2021, cryptocurrencies were banned outright.
However, the country has been working on developing the digital yuan (e- CNY). In August
2022, it officially began rolling out the next round of its central bank digital currency (CBDC)
pilot test program.
INDIA
There is a bill in circulation that prohibits all private cryptocurrencies in India, but it has yet
to be voted on.
There is a 30% tax levied on all crypto investments and a 1% tax deduction at source
(TDS) on crypto trades.
Overall, India continues to hesitate to ban crypto outright or to regulate it. Current
regulations are unclear at best and don’t provide much guidance for investors. The country
launched its tokenized rupee pilot program in late 2022.
Note:
https://www.investopedia.com/cryptocurrency-regulations-around-the-world-5202122
CRYPTOCURRENCY EXCHANGE
Cryptocurrency exchanges are digital marketplaces that enable users to buy and sell
cryptocurrencies like Bitcoin, Ethereum, and Tether.
The crypto exchanges also provide trading of various cryptocurrency such as margin or
lending trading, and future and options trading.
2 types:
Centralized cryptocurrency exchanges act as an intermediary between a buyer and a seller and
make money through commissions and transaction fees.
Popular Crypto Exchanges are Binance, Coinbase Exchange, Kraken and KuCoin.
Like stock trading websites, these exchanges allow cryptocurrency investors to buy and sell
digital assets at the prevailing price, called spot, or to leave orders that get executed when the
asset gets to the investor’s desired price target, called limit orders.
Pros
Great liquidity.
Cons
Easier for hackers as CEX stores valuable user data across centralized
servers.
Binance
Coinbase Exchange
Kraken
KuCoin
Binance.US
Bitfinex
Gemini
Coincheck
Bitstamp
Bybit
A decentralized exchange allows peer-to-peer transactions directly from your digital wallet
without going through an intermediary.
Pros
Full custody of their funds.
More security and privacy.
Distributed hosting reduces the risk of cyber attacks.
Cons
Low liquidity.
TOP DECENTRALIZED EXCHANGES
Uniswap (v3)
dYdX
Curve Finance
Kine Protocol
PancakeSwap (v2)
DODO (Ethereum)
Sun.io
ApolloX DEX
Uniswap (V2)
Perpetual Protocol
To place trades on crypto exchanges in India, they have to first register and complete the
Know-Your-Customer (KYC) process. Once the user’s account is opened and verified, then they
can transfer funds in the form of fiat currencies such as INR or digital currency onto the
platform, which can be further used to make purchases.
Step 2: Register with the exchange and open an account with them.
Step 3: Fund your account or crypto wallet either by depositing fiat or digital currencies.
Step 4: Now, select the cryptocurrency you want to buy and how much. For instance, if you
wish to buy Bitcoin worth INR 10,000.
Step 5: Follow the necessary steps to initiate and complete a transaction.
Step 6: Check your account to verify that the transaction was a success.
Pros
There are many exchanges which offer their users with tax forms,
making it easier to compute crypto taxes.
Cons
If the exchanges go bankrupt, users will not be able to access their funds or place
trades.
In most of the exchanges, users do not have the right to hold their private keys.
KEY DIFFERENCES BETWEEN CRYPTO EXCHANGES AND WALLETS:
BLACK MARKET & GLOBAL ECONOMY
government-sanctioned channels.
Underground markets trade in illegal goods and services, legal goods and services to avoid
taxes, or both.
Examples:
sale of illegal drugs, weapons, human trafficking, and the illegal wildlife trade.
Underground markets can have a negative impact on the economy because the
activity is not reported and taxes are not collected on the transactions.
Underground markets do provide some benefits, such as creating jobs for those who may not
be able to find employment in traditional markets and allowing access to medicine and
healthcare to those individuals that might not have had access otherwise.
Illegal Economy
Economic activities that violate legal laws defining the legitimate source of the economy.
Unreported Economy
Amount of economy not reported to the tax authority. A measure of such an economy
is the tax gap.
economic activities that operate outside of the formal, regulated economic system. These activities
are often unregistered, untaxed, and not monitored by the government or official institutions.
It is the part of the economy that is not taxed, included in the gross national product (GNP), or
monitored by the government. It is hidden from the state for various taxes but is legal in every other
aspect.
Unrecorded Economy
Economic activities that are not officially tracked or documented, often because they take place
outside formal systems.
unrecorded income that should be recorded in the national accounting system but is not done.
After the rise of technology and the internet, most underground market transactions are
now conducted online, such as on the dark web, with the help of digital currencies.
These markets can take a toll on the economy as they are considered shadow markets
whose economy is not recorded and taxes are not paid.
Also, these asset classes are out of government control, which means it cannot control
the supply of these assets in the economy. This is what makes it dangerous and harmful
to economic stability.
Regulations-Driven Black Market Conditions
people wanted to exchange or buy goods and services prohibited by the government
reason for black markets is irregularities in the demand and supply equation.
don't follow government laws, such as not reporting the taxable price of transactions
and not paying employment tax
can not afford to invest the time and economy to obtain the necessary licenses.
illegal immigrants obtain jobs, students traveling abroad avail employment without a
proper work visa, child labor.
ETHEREUM
Turing-complete language that allows the development of arbitrary programs (smart
contracts) for blockchain and decentralized applications.
This concept is in contrast to Bitcoin, where the scripting language is limited in nature and allows necessary operations only.
Addresses are derived from the public keys which are a 20-bytes code used to
identify accounts.
1. Private key is randomly chosen (256 bits positive integer) under the rules
defined by elliptic curve specification.
2. Public key is then derived from this private key using ECDSA recovery
function.
3. An address is derived from the public key which is the right most 160 bits of
the Keccak hash of the public key.
ACCOUNTS
Public key’s hash acts as the account number to which Ether can be sent.
CodeHash: Empty string as EOA does not have any associated code.
Storage: Empty string as EOA does not have any data to store.
They can get triggered and execute code in response to a transaction or a message
from other contracts. The code is executed by Ethereum Virtual Machine (EVM) by
This account has a unique address to receive Ether. However, it does not need any
private key to generate the transactions as it is already deployed and trusted by the
network.
CodeHash: The hash of the smart contract code is stored in this field.
Storage: This field contains the data of the storage variables within the smart
contract.
digitally signed data packet using a private key that contains the instructions that,
when completed, either result in a message call or contract creation.
TYPES OF TRANSACTION
Sender
Available gas
Gas price
The sender
Recipient
Available gas
Value
Gas price
It can either be sent via a smart contract or from an external actor in the form of a
transaction that has been digitally signed by the sender.
Messages only exist in the execution environment and are never stored.
current nonce
Gas limit must not be less than the gas used by the transaction
The sender's account contains enough balance to cover the execution cost.
THE TRANSACTION SUBSTATE
created during the execution of the transaction that is processed immediately after
Suicide set or self-destruct set: a set of accounts (if any) that will be discarded after the
transaction completes.
Log series: allow the monitoring and notification of contract calls to the entities external
Refund balance: amount to be refunded to the sender account after the transaction.
Refunds are not immediately executed; the state is finalized by determining the amount
of unused gas to be refunded to the sender. In addition to the unused gas, the sender is
also refunded some allowance from the “refund balance”
TRANSACTION RECEIPTS
Elements :
The post-transaction state: state after the transaction has been executed. It is
encoded as a byte array.
Gas used: total amount of gas used in the block that contains the transaction receipt.
The value is taken immediately after the transaction execution is completed. The total
gas used is expected to be a non-negative integer.
Set of logs: Log entries contain the logger's address, a series of log topics, and the log
data.
The bloom filter: created from the information contained in the set of logs. It is a
probabilistic data structure that helps to identify whether an element is likely to be in
a set. It's used to Search for and retrieve data, find transferred tokens etc
ETHER CRYPTOCURRENCY / TOKENS
Ethereum Virtual Machine ensures that all transactions and smart contracts made
on the Ethereum blockchain are executed in correct and expected manner as
desired by the smart contract code.
PARTS OF EVM:
full-featured virtual machine with all the features such as support for multiple
programming languages, security features, runtime environments and more.
Uncles:
These are small pieces of smart contracts or data stored on the blockchain.
EVM Assembly: This is the bytecode of EVM, which you can use as
your programming language.
In block creation, EVM sets standards for managing the state from block to block.
These states are stored in a Merkle Patricia Trie and hold the ground truth state for
Ethereum.
In transaction execution, the EVM executes tasks (e.g., function calls to a smart
contract) by interpreting the instructions in Opcodes. To get the data into
bytecode, use a programming language such as Solidity (i.e., the native
programming language for smart contracts) to compile and deploy the smart
contract using bytecode.
When the EVM executes tasks, it is limited to the amount of gas provided by the
transaction and the overall limitations of the EVM.
Stack:
last-in, first-out container with a fixed size and maximum depth of 1,024 items to
which values can be pushed and popped.
Each stack item is 256 bits long. This was chosen to facilitate
the Keccak- 256 hash scheme and elliptic- curve computations.
Memory:
Key/value store:
used as the long term account storage for the smart contract.
The more opcodes there are, the higher your gas fees will be.
Gas refers to the unit that measures the amount of computational effort
The gas fee is the amount of gas used to do some operation, multiplied by the cost
per unit gas.
Gas prices are usually quoted in gwei, which is a denomination of ETH. Each gwei is
The total gas you pay is divided into two components: the base fee and the
priority fee (tip).
The base fee is set by the protocol - you have to pay at least this
The priority fee is a tip that you add to the base fee to make your transaction
attractive to validators so that they choose it for inclusion in the next block.
Max fee: To execute a transaction on the network, users can specify a maximum
limit they are willing to pay for their transaction to be executed. This optional
parameter is known as the maxFeePerGas. For a transaction to be executed, the
max fee must exceed the sum of the base fee and the tip.
HOW ARE GAS FEES CALCULATED?
SMART CONTRACT
Self executing contracts which contains the terms and conditions of an agreement
between the peers
Smart contracts are the executable programs that run on the Ethereum blockchain.
written using specific programming languages like solidity and vyper that compile to
EVM bytecode
Geth runs on the nodes and connects to the peer-to-peer Ethereum network
from where blockchain is downloaded and stored locally
account management.
The local copy of the blockchain is synchronized regularly with the network
web3.js library
When a transaction triggers a smart contract all the nodes of the network will execute
every instruction.
All the nodes will run the EVM as part of the block verification, where the nodes will go
through the transactions listed in the block and runs the code as triggered by the
All the nodes on the network must perform the same calculations for keeping their ledgers
in sync.
If the total amount of gas needed to process the transaction is less than or equal to the
gas limit then the transaction will be processed and if the total amount of the gas needed
is more than the gas limit then the transaction will not be processed the fees are still lost.
Thus it is safe to send transactions with the gas limit above the estimate to increase the
Dapp main components are smart contract and files for web user interface
front-end/back-end
DAPP CREATION WORKFLOW
SIX MAIN IMPLEMENTATIONS OF ETHERUM PROTOCOL
It is implemented in GO language
By installing and running geth, you can take part in frontier
Mine Ether
Transfer Fund between different addresses
Create smart contract and deploy it
Create a node
Create an account
Check Account Balance
Unlock Account
Start mining
Transfer funds
Add fees
Contract creation
Deploy Contract etc
Pool Mining
Solo Mining
Cloud Mining
ETHEREUM MINING & REWARDS
All transactions taking place in the Ethereum network need to get approved by
the miners.
Miners use a Hashing Scrypt (Ethash) to solve computationally hard puzzles for
successfully mining the blocks of transactions, in the Ethereum Blockchain
Network.
This process helps secure the network from attacks like hacking or manipulation
of identity.
POOL MINING
Pool Mining is the easiest and fastest way to get started with Ethereum Mining.
Miners will work along with other people together in a single pool.
Pool size
Minimum Payout
Pool fee
Pool size is the factor that determines the number of blocks you find in the
Ethereum network and its share rewards. As the number of miners increases, the
chances to get rewards also increase.
Minimum Payout is the minimum amount of Ethereum you need to mine before
it gets credited to your wallet.
Pools with large Minimum Payouts are not beneficial as you will have to wait in
the same pool for a longer period before getting your reward.
Pool fee is the amount to be paid to continue using the pool. This amount is
percentage-based, on the amount of Ethereum you are mining. It mainly varies
between 1% to 3%
SOLO MINING
In Ethereum Solo Mining, you will get rewarded only if you solve the puzzle and
mine the Ethereum block first.
Disadvantages:
Electricity costs
Space
CLOUD MINING
In Ethereum Cloud Mining, you pay someone else with the equipment to mine
Ethereum for you.
You pay some amount of money as fees to them for investing their time and
resources, and in return, they provide you with the reward they gain by mining
Ethereum.
HOW DOES THE MINING PROCESS WORK?
HOW DOES THE MINING PROCESS WORK?
A user requests a transaction with the help of the private key of his
The miner then verifies and validates the requested transaction and
Once the requested transaction is verified and it stores a copy of it in EVM, the
process of "Proof-of-Work" begins for the respective block.
Then, the nodes of the Ethereum Network verify that the checksum of
the state of the miner's block matches the checksum of their updated
state of EVM after execution of all transactions.
Blockchain Network.
TYPES OF REWARDS
Block reward
Gas fee
Burned fee
Uncle /Nephew Block reward
Block reward:
The rate at which a user pays for those gas units changes based on a
block’s baseFeePerGas and the user specified
maxPriorityFeePerGas (miner tip).
To calculate the total amount of burned fees in a block you can use the following
formula:
An uncle block occurs when two miners create blocks at almost the same time.
While both blocks are valid, the network can only accept one block at a time.
Therefore one block is rejected and labeled as an uncle block.
Instead of letting this block go stale, a nephew reward equal to 1/32 of a block
reward is issued to any miner willing to later include this uncle block inside a block
they are mining. Additionally, an uncle reward is issued to the miner of the uncle
block.
Miner Reward = Block reward+ gas fee+ uncle block reward – burned fee
Unit 5 Hyper Ledger Frabic
INTRODUCTION
Distributed ledger,
consensus algorithm,
Smart Contracts
transactional log that keeps a complete record of the entire history of data changes.
immutable and append-only
Consensus algorithms
ensure that the members in the network have an agreed-upon method to allow
transactions and data to be committed to the ledger and execution of smart contract
code.
If the consensus requirements aren't met, then the transaction or operation is considered
invalid.
Smart contracts
define the rules of a business contract and are executed programatically when the
preconditions for the contract are met.
HYPERLEDGER
open-source platform
BENEFITS OF HYPERLEDGER
open-source
Suitable for Wide-Ranging Industry
Quality Code
In blockchain networks, every peer needs to validate each and every transaction and run
consensus at the same time, take a huge blow in terms of scalability.
Example: Consider a situation when person X wants to buy medicine from person Y, who
was a doctor living in another country.
In case of public blockchain, every transaction will get updated in the network to all the
peers. In hyperledger, the parties are directly connected and the concerned people’s
ledger will be updated.
Identity management services, which validates the identities of users and systems.
blockchain projects
blockchains.
HOW DOES HYPERLEDGER WORK?
BLOCKCHAIN FRAMEWORK PROJECTS UNDER HYPERLEDGER
Hyperledger Sawtooth, is being used in the fishing industry to track the journey of fishes
Hyperledger Iroha, finds usage in mobile application optimization with the help of
blockchain
Hyperledger Cello
Hyperledger Composer
Hyperledger Explorer
Hyperledger Quilt
INDUSTRY USE CASES FOR HYPERLEDGER FABRIC - SUPPLY CHAIN
Companies with access to the ledger can view the same immutable data, which enforces
accountability and reduces the risk for counterfeiting.
Production updates are added to the ledger in real time, which makes tracking
provenance faster and simpler during events like product recalls or food contamination
outbreaks.
INSURANCE
With Hyperledger Fabric, insurance companies can reference transaction data stored on
the ledger to identify duplicate or falsified claims.
Blockchain can also make multi-party subrogation claims processing faster by using
smart contracts to automate repayment from the at-fault party back to the insurance
company.
Insurers can use Hyperledger Fabric to streamline Know Your Customer (KYC) processes
by storing customer data on a distributed ledger and automating the verification of their
identity documents with smart contracts.
Using Hyperledger Fabric, financial and trading consortiums can easily create a
blockchain network where all parties can transact and process trade-related paperwork
Each organization has a Fabric certificate authority and one or more peer
peer node endorses the transactions, stores and executes smart contract code
Fabric clients interact with peer nodes to read the ledger, add new chaincode to the
Endorser:
Endorser nodes are responsible for simulating transactions specific to their network
and preventing unreliable and non- deterministic transactions.
Consenter:
validate the transaction by verifying the result produced by the affiliated peers who
want to proceed with a transaction.
COMPONENTS OF FABRIC
Ledger
Chaincode
Consensus mechanism
Access control
Events
System monitoring and management
Wallets
System integration components
TRANSACTIONS
Transactions in the fabric are private, confidential, and anonymous for general users, but
they can still be traced and linked to the users by authorized auditors.
As a permissioned network, all participants must register with the membership services
to access the blockchain network.
This ledger also provided auditability functionality to meet the regulatory and compliance
needs required by the user.
MEMBERSHIP SERVICES
2. User registration
There are also temporary certificates issued called TCerts, which are used for one-
time transactions.
This provider is used to authenticate clients who want to join the blockchain
network.
CA is used in MSP to provide identity verification and binding service.
TRANSACTION MESSAGES
Types:
Deployment transactions
Invocation transactions
BLOCK STRUCTURE
Block Metadata consists of creator identity, relevant signatures, last configuration block
number, flag for each transaction included in the block, and last offset persisted.
PEER TO PEER PROTOCOL
P2P protocol in the Hyperledger Fabric is built using google RPC (gRPC).
discovery,
transaction,
synchronization, and
consensus.
Discovery messages are exchanged between nodes when starting up in order to discover
other peers on the network.
Synchronization messages are passed between nodes to synchronize and keep the
blockchain updated on all nodes.
LEDGER STORAGE
An alternative is to use CouchDB which provides the ability to run rich queries.
SMART CONTRACTS
In Hyperledger Fabric same concept of smart contracts is implemented but they are
They have conditions and parameters to execute transactions and update the ledge.
Chaincode is usually written in Golang and Java
CHAINCODE SERVICES
allow the creation of secure containers that are used to execute the chaincode.
Secure container: Chaincode is deployed in Docker containers that provide a locked down
sandboxed environment for smart contract execution.
External applications can listen to these events and react to them if required via event
adapters.
APIs include interfaces for identity, transactions, chaincode, ledger, network, storage, and
events.
Suited for networks with a limited number of participants who are trusted and well-
known.
RAFT:
used to maintain a consistent state across multiple nodes. Suited for networks where the
participants are unknown and potentially untrusted.
Solo:
These code files serve as a smart contract that users can interact with via APIs.
Users can call functions in the chaincode that result in a state change, and consequently
updates the ledger.
Init(): invoked when chaincode is deployed onto the ledger. This initializes the chaincode and
results in making a state change, which accordingly updates the ledger.
Invoke(): used when contracts are executed. Results in a state change and writes to the
ledger.
Query(): used to query the current state of a deployed chaincode. This function does not
make any changes to the ledger.
4(): This function is executed when a peer deploys its own copy of the chaincode. The
chaincode is registered with the peer using this function.
APPLICATION MODEL
MVC-B architecture
View logic: This is concerned with the user interface. It can be a desktop, web application,
or mobile frontend.
Control logic: This is the orchestrator between the user interface, data model, and APIs.
Blockchain logic: This is used to manage the blockchain via the controller and the data
model via transactions.
CONSENSUS IN HYPERLEDGER FABRIC
2. The transaction is simulated by endorsers which generates a read-write (RW) set. This is
achieved by executing the chaincode but instead of updating the ledger, only a read-
write set depicting any reads or updates to the ledger is created.
4. Submission of endorsed transactions and read-write (RW) sets to the ordering service by
the application.
5. The ordering service assembles all endorsed transactions and read-write sets in order into
a block, and sorts them by channel ID.
Open Source
Access Control
Chaincode Functionality
Performance
COMPARISON BETWEEN FABRIC & OTHER TECHNOLOGIES