Blockchain Intermedio
Blockchain Intermedio
Prelude
Welcome to the course Blockchain Intermedio. This course is a continuation of the
course - Blockchain - Potentes Nexus.
If you want to touch upon blockchain basics, please visit the previous course.
However, if you are ready to dive deeper into blockchain, then let's proceed with
the next set of topics.
Distributed System
An understanding of distributed systems is critical to understanding blockchain
technology, as blockchain is a distributed system at its core. A distributed system
can be centralized or decentralized.
A distributed system is a network of autonomous computers(processors) that are
connected together to form a system in which they communicate and share resources
to perform a specific task.
The independent computing units of the distributed systems are known as Nodes.
Coordination among different nodes in the presence of corrupted nodes or in case of
network failure is the primary challenge faced by the distributed systems.
CAP Theorem
CAP Theorem
CAP Theorem is a design principle/ tool that is used to design a Distributed
Systems. It states that Distributed systems cannot achieve Consistency,
Availability, and Partition Tolerance simultaneously.
Consistency: At any given time, all nodes in the network must return the same,
recent value.
Availability: Every working node in the network must return a response to a request
within a specific amount of time.
Partition Tolerance: The network continues to operate, even if the nodes are
partitioned and cannot communicate with each other for an arbitrary length of time.
Background of Blockchain
Background of Blockchain
The concept of blockchain was first introduced in a white paper published by a
person. A group of people known by the name Satoshi Nakamoto in 2008.
This paper proposed the term ‘chain of blocks’. Later, the term ‘chain of blocks’
evolved into the word blockchain.
Blockchain is a distributed, decentralized database(ledger) in which transactions
can be added as blocks through consensus mechanisms.
Blockchain Defined
Blockchain is a distributed, peer-to-peer ledger that is immutable, append-only,
cryptographically-secure, and updateable only through agreement or consensus among
peers.
Blockchain is a distributed and decentralized, peer to peer ledger system that is
almost immutable and is secured cryptographically.
The data can only be appended to the blockchain but cannot be edited or deleted.
Data once added to the blockchain is distributed and copied to all the peers in the
distributed system and is stored permanently.
The transactions in a blockchain are verified and added by using different
consensus algorithms like Proof of Work and Proof of Stake.
For example, for cash transfers, banks act as a trusted third party. In financial
trading, a central clearinghouse serves as an arbitrator between two trading
parties.
Nodes: Nodes are the autonomous computing units that form the peer-to-peer
blockchain network. The blockchain is stored on each node of the network.
Transactions: A transaction generally contains details about the exchange of some
information or digital assets that are recorded in a blockchain. The transactions
are bundled into a block and added to a blockchain. Transactions are the building
blocks of the blockchain.
Example :
In case of Bitcoin, a transaction is an exchange of value from one address to
another.
Blockchain Architecture
Blocks: Blocks are collections of transactions that are bundled together to be
added to the blockchain. Blocks are created by the process of Mining. You'll learn
more about Blocks and the Mining process in the later topics.
Consensus Mechanism: It is a set of rules that are satisfied to verify and add
transactions to blockchain. There are several consensus algorithms that are used to
verify transactions like Proof of Work and Proof of Stake.
Limitations of Blockchain
The major disadvantages of blockchain technology are:
Block Structure
Block Structure
Block is a collection of transactions bundled together to be added to the
blockchain.
A block is divided into two parts, a block header containing the metadata used for
verifying the block and the** transactions** to be added to the blockchain.
Block header
The important components of the block header are.
Mining
Mining is a process of verifying transactions, bundling them into blocks, and
adding those blocks to the blockchain.
The nodes in the network that verify transactions are called mining nodes or simply
Miners.
The process requires the nodes to run consensus algorithms like Proof of Work and
Proof of Stake.
Solving Proof of Work problems requires extensive computing power, so the miners
are rewarded with tokens like bitcoin and ethereum for solving them.
Distributed Ledgers
Distributed ledger describes shared database; so, all blockchains come under the
league of distributed ledgers or shared databases.
All blockchains are distributed ledgers but all distributed ledgers need not be a
blockchain.
Types of Blockchain
Blockchain can be divided into several types based on different criteria.
Public Blockchains
These type of blockchains are not owned by any single person or organizations.
They are public, and anyone running the blockchain can become a node of the
blockchain network.
All nodes have a copy of the blockchain and can participate in mining and auditing
process.
in these type of blockchains the transactions are verified and added to the
blockchain using decentralized consensus mechanisms.
Examples of public blockchain are Bitcoin and Ethereum
Private Blockchains
These blockchains are owned and controlled by a particular individual or
organization.
That is, they are open only to a consortium or group of individuals or
organizations who have decided to share the ledger among themselves.
There are various blockchains now available in this category, such as HydraChain
and Quorum.
Optionally, both of these blockchains can also run in public mode if required, but
their primary purpose is to provide a private blockchain.
Consortium blockchains
These type of blockchains are not governed by a single person or organization.
They are controlled by a group of Organizations.
All the transactions are verified by all or some of the participating members of
the different organizations.
Examples of these type of Blockchains are r3 and EWF
Permissioned vs. Permissionless Blockchains
Permissioned blockchains are usually private blockchains which require special
permissions to become a node of the blockchain network.
Some public blockchain networks can also be permissioned, anyone can read from
these blockchains but special permissions are needed to add transactions.
Example of a public permissioned blockchain is Ripple. In Ripple, anyone can
perform transactions, but only permissioned nodes can verify and add them to the
blockchain.
Permissionless blockchains are the public blockchains in which anyone can become a
node and can participate in the process of mining using various consensus
algorithms.
Most public blockchains like Bitcoin and Ethereum are permissionless
Sidechains
Sidechains are emerging mechanisms that allow tokens and other digital assets from
one blockchain to be securely used in a separate blockchain and then be moved back
to the original blockchain if needed.
Sidechain functionality holds tremendous potential to enhance the capabilities of
existing blockchains.
A sidechain is a separate blockchain that is attached to its parent blockchain
using a two-way peg.
The two-way peg enables interchangeability of assets at a predetermined rate
between the parent blockchain and the sidechain.
The original blockchain is usually referred to as the main chain and all additional
blockchains are referred to as ‘sidechains’.
Benefits of Blockchain
Decentralization: As a consensus mechanism is used to agree on the validity of
transactions, there is no need for a trusted third party or intermediary to
validate transactions.
Transparency and trust: Additionally, every node has a private copy of data on the
blockchain, making the system transparent. As a result, the need to derive trust
from a central entity is eliminated, thus decentralizing trust.
Immutability: As a consequence of decentralized storage and data integrity assured
by cryptographic hashing, it is extremely difficult to change the data once it is
finalized. This results in a permanent auditable ledger of transactions.
Benefits of Blockchain
High availability: As each node stores a copy of the blockchain locally, the
networks functions even if some of the nodes are not available.
Simplification of current paradigms: In many industries, such as finance or health,
multiple entities maintain their own databases, this makes it difficult to update
and audit data. Blockchain solves the problem as it has a shared ledger stored in
all the nodes of the network. Blockchain makes the process of auditing faster.
Cost saving: Because blockchain does not require a trusted third party or clearing
house, overhead costs, such as fees paid to intermediaries, can be eliminated.
Consensus
Consensus is the backbone of every distributed system, as all nodes of the system
have to agree on the transaction order. In systems where participants can be
trusted, a fail-stop tolerant algorithm like PAXOS suffices. Such systems can only
tolerate nodes that stop on failure but do not behave maliciously.
Blockchains typically use Byzantine consensus algorithms, as the nodes are not
centrally controlled. Additionally, the choice of the consensus algorithm is
governed by the size and type of blockchain in use. In other words, that is not all
consensus mechanisms are suitable for all types of blockchains.
Practical Byzantine Fault Tolerance (PBFT) Algorithms: this method relies on the
exchange of messages among nodes that follow a distributed protocol to come to an
agreement. These algorithms put a limit on the number of nodes in the network
because the communication overhead increases as the network grow.
Consensus
Leader election-based consensus mechanisms: This arrangement is decentralized and
requires nodes to compete in a leader-election lottery and the winning node that
wins proposes a final value. For example, Bitcoin’s proof-of-work the PoW used in
Bitcoin falls into this category.
In public permissionless Blockchains, the election-based consensus is typically
used, as PBFTs cannot support the number of nodes needed in a public blockchain.
Permissioned Blockchains usually use PBFT algorithms or even non-byzantine
consensus as they support higher transaction throughput.
Consensus Requirements
Various requirements must be met to provide the desired results in a consensus
mechanism, including the following:
Types of Consensus
Proof of Work (PoW): This type of consensus mechanism relies on proof that adequate
computational resources have been spent before proposing a value for acceptance by
the network.
This idea was first introduced by Peercoin, and it is going to be used in the
Ethereum blockchain version called Serenity.
Another critical concept in PoS is coin age, which is a criterion derived from the
amount of time and number of coins that have not been spent.
In this model, the chances of proposing and signing the next block increase with
the coin age.
Types of Consensus
Delegated Proof of Stake (DPoS): This is an innovation over standard PoS, whereby
each node that has a stake in the system can delegate the validation of a
transaction to other nodes by voting.
It requires the Intel Software Guard Extensions (SGX) processor to ensure the
security guarantee for it to be secure.
Proof of Deposit (PoD): In this case, nodes that wish to participate in the network
have to make a security deposit before they can mine and propose blocks.
This mechanism is used in the Tendermint blockchain.
Types of Consensus
Proof of Importance (PoI): This idea is significant and different from PoS. PoI not
only relies on how large a stake a user has in the system, but it also monitors the
usage and movement of tokens by the user to establish a level of trust and
importance.
Nodes in this protocol retain a group of publicly-trusted peers and propagate only
those transactions that have been validated by the majority of trusted nodes.
Types of Consensus
Reputation-based mechanisms: As the name suggests, a leader is elected by the
reputation it has built over time on the network.
Various other protocols including PBFT, PAXOS, RAFT, and Federated Byzantine
Agreement (FBA) are also being used or have been proposed for use in many different
implementations of distributed systems and blockchains.
Types of Decentralization
Architectural (de)centralization: How many physical computers is a system made up
of? How many of those computers can it tolerate breaking down at any single time?
Political (de)centralization: How many individuals or organizations ultimately
control the computers that the system is made up of?
Logical (de)centralization: Does the interface and data structures that the system
presents and maintains, look more like a single monolithic object, or an amorphous
swarm? One simple heuristic is: if you cut the system in half, including both
providers and users, will both halves continue to operate as independent units
fully?
Decentralization in Blockchain
Decentralization is a core benefit and service provided by blockchain technology.
By design, blockchain is a perfect vehicle for providing a platform that does not
need any intermediaries, and that can function with many different leaders chosen
through consensus mechanisms. This model allows anyone to compete to become the
decision-making authority. This competition is governed by a consensus mechanism.
Decentralization is applied in varying degrees from a semi-decentralized model to a
fully decentralized one depending on the requirements and circumstances.
Decentralization can be viewed from a blockchain perspective as a mechanism that
provides a way to remodel existing applications and paradigms, or to build new
applications, to give full control to users.
Benefits of Decentralization
The major advantages of using Decentralized systems are:
Challenges to Decentralization
While there are many benefits of decentralization, including transparency,
efficiency, cost-saving, development of trusted ecosystems, and in some cases
privacy and anonymity, some challenges, such as security requirements, software
bugs, and human errors need to be examined thoroughly.
For example, in a decentralized system such as Bitcoin or Ethereum where security
is typically provided by private keys, how can one ensure that a smart property
associated with these private keys cannot be rendered useless if the private keys
are lost or, due to a bug in the smart contract code or the decentralized
application becomes vulnerable to attack?
Before embarking on a journey to decentralize everything using blockchain and
decentralized applications, it is essential to understand that not everything can
or needs to be decentralized.
Smart Contracts
Smart contracts refer to immutable computer programs that run deterministically in
the context of an Ethereum Virtual Machine as part of the Ethereum network
protocol, that is, on the decentralized Ethereum world computer.
A smart contract is a secure and unstoppable computer program representing an
agreement that is automatically executable and enforceable.
A smart contract is a business logic or a legal agreement that is coded using a
programming language.
Another fundamental idea is that smart contracts are automatically executed when
certain conditions are met.
Minimalism/simplicity
Code reuse
Code quality
Readability/audibility
Extensive testing
Oracles
Oracles are systems that provide external data sources to Ethereum smart contracts.
The term Oracle comes from Greek mythology, where it referred to a person in
communication with the gods who could see visions of the future.
In the context of blockchains, an oracle is a system that can answer questions that
are external to Ethereum.
Ideally oracles are systems that are trustless, meaning that they do not need to be
trusted because they operate on decentralized principles.
Oracle
Oracle
Oracles, ideally, provide a trustless (or at least near-trustless) way of getting
extrinsic (that is, “real-world” or off-chain) information, such as the results of
football games, the price of gold, or truly random numbers, onto the Ethereum
platform for smart contracts to use.
They can also be used to relay data securely to DApp frontends directly.
Oracles can, therefore, be thought of as a mechanism for bridging the gap between
the off-chain world and smart contracts.
Allowing smart contracts to enforce contractual relationships based on real-world
events and data broadens their scope dramatically.
Drawback of Oracles
Oracles can also introduce external risks into Ethereum’s security model.
Consider a “smart will” contract that distributes assets when a person dies.
This is something frequently discussed in the smart contract space and highlights
the risks of a trusted oracle.
If the inheritance amount controlled by such a contract is high enough, the
incentive to hack the oracle and trigger distribution of assets before the owner
dies is very high.
Oracle Data
Examples of data that an oracle might provide:
Oracle Functions
All oracles provide a few key functions, by definition. These include the ability
to:
Collect data from an off-chain source.
Transfer the data on-chain with a signed message.
Make the data available by putting it in a smart contract’s storage.
Once the data is available in a smart contract’s storage, it can be accessed by
other smart contracts through message calls that invoke a “retrieve” function of
the oracle’s smart contract; it can also be accessed by Ethereum nodes or network-
enabled clients directly by “looking into” the oracle’s storage.
Tokens
Often restricted to specific businesses, organizations, or locations, physical
tokens are not easily exchangeable and typically have only one function.
With blockchain tokens, these restrictions are lifted or, more accurately,
completely redefinable.
Many blockchain tokens serve multiple purposes globally and can be traded for each
other or other currencies on global liquid markets.
Token Usage
As the following list shows, currency is just the first “app”:
Currency - A token can serve as a form of currency, with a value determined through
private trade.
Resource - A token can represent a resource earned or produced in a sharing economy
or resource-sharing environment; for example, a storage or CPU token representing
resources that can be shared over a network.
Asset - A token can represent ownership of an intrinsic or extrinsic, tangible or
intangible asset; for example, gold, real estate, a car, oil, energy, etc.
Token Types
Access - A token can represent access rights and grant access to digital or
physical property, such as a discussion forum, an exclusive website, a hotel room,
or a rental car.
Equity - A token can represent shareholder equity in a digital organization (For
example, a DAO) or legal entity (For example, a corporation).
Attestation - A token can represent a certification or attestation of fact by some
authority or by a decentralized reputation system (For example, marriage record,
birth certificate, college degree).
Utility - A token can be used to access or pay for a service.
Token Types
Native or Built-in Tokens
Built-in tokens like bitcoin, ether, etc., are used as Digital Currency for
transactions, as incentives and rewards for mining blocks,
Application Tokens
Blockchains like Ethereum have specific tokens called Gas that are used to interact
with the application layer. These tokens can be used as a computational fee.
Asset-backed Tokens
These are a form of digital currencies that have a certain value and can be
exchanged with real-world currencies and assets like Gold for a fixed price. These
exchanges are controlled by third parties.
Cryptography in Blockchain
Cryptography is mainly of two types, symmetric and asymmetric.
Blockchain technology utilizes cryptography as a means of protecting the identities
of users, ensuring transactions are executed safely and securing all information
and value stores.
Therefore, anyone using blockchain can have a high level of confidence that once
something is recorded on a blockchain, it is done so legitimately and in a manner
that preserves security.
Symmetric Cryptography
Cryptography is the method of disguising and revealing, otherwise known as
encrypting and decrypting, information through complex mathematics. This means that
the information can only be viewed by the intended recipients and nobody else. The
method involves taking unencrypted data, such as a piece of text, and encrypting it
using a mathematical algorithm, known as a cipher. This produces a ciphertext, a
piece of information that is completely useless and nonsensical until it is
decrypted.
Both encryption and decryption typically employ a key, a series of bytes controlled
by a user.
When the same key is used for both encryption and decryption, the key is typically
safeguarded securely.
This method of encryption is known as symmetric key or private key cryptography.
Asymmetric Cryptography
Public-key cryptography, also known as asymmetric cryptography, represents an
improvement on standard symmetric-key cryptography as it allows information to be
transferred through a public key that can be shared with anyone.
Rather than using a single key for encryption and decryption, as is the case with
symmetric key cryptography, separate keys (a public key and a private key) are
used.
Documents encrypted using a user’s public key can be decrypted using the private or
vice versa.
It is impossible to figure out the private key is based on the public key.
Therefore, a user can send their public key to anyone without worrying that someone
will gain access to their private key.
The sender can confidently encrypt files and rest assured that they will only be
decrypted by the intended party.
Digital Signature
Digital Signature
Digital Signature is a way of verifying the authenticity of digital messages and
documents over the Internet.
Digital signature uses hash functions and asymmetric cryptography to check the
sender for certain information.
A private key is used to sign the message or document and a public key is used by
the recipient to verify the signature and ensure that the right information is
received.
In case of blockchains like Ethereum the public key is the Externally owned account
address.
The private key is stored locally and is not shared to other users.
Blockchain Governance
Blockchain Governance
Generally, governance is about decisions that ultimately affect “stakeholders”.
It’s about the processes and coordination mechanisms that stakeholders use to make
decisions.
It includes the establishment, maintenance, and revocation of the legitimacy of
decisions, decision-making processes, norms, and other mechanisms for coordination.
Blockchains are distributed systems. They are necessarily consensus protocols,
which means that different nodes in the network (For example, computers on the
internet) have to run compatible software.
Blockchain Governance
Public blockchains typically have “communities” that rely on them and govern the
blockchain protocol.
“Node operators” are the owners and managers of nodes that run blockchain
protocols.
Most node operators do not want to write much software code, and it is challenging
for anyone to independently write compatible implementations of a consensus
protocol, even if they have technical specifications.
As a such, node operators rely on software repositories (usually hosted on
Microsoft/Github servers) to provide them with the required software.
Trademark
“Core developers” of a blockchain are software developers who work on the software
that implements a protocol.
Developers have processes that assure the quality of the software they release.
They are generally very committed to maintaining the legitimacy of their software
repositories because they want people to use their software (as opposed to someone
else’s).
Blockchains are typically associated with trademarks.
Trademark
A blockchain’s trademark may or may not be registered, but blockchain communities
use trademarks for marketing their blockchain and for making it easy for users to
identify which blockchains they interact with.
For a blockchain community to successfully govern its blockchain, the members need
to coordinate their activities.
At a minimum, this means that node operators, developers, and the users of the
trademark have to work together.
Blockchain Governance
Blockchains can have significant communities that form diverse ecosystems that
include many participants and stakeholders that aren’t core developers, node
operators, and users of trademarks.
These stakeholders might consist of block explorers and other low-level service
providers, exchanges, speculators, application developers, users, journalists, and
passive observers, to name just a few.
On the other hand, blockchain communities might also be just a team of core
developers running their nodes, promoting their protocol in hopes of one day having
a more significant community.
Blockchain Governance
This says something about the decisions that blockchain governance necessarily
makes: Core developers have to choose how to release software, that node operators
have to decide what software to run, that trademark users have to determine how
they use the blockchain’s trademark, and that these decisions have to be
coordinated by the blockchain community.
But it notably says nothing about the processes, norms, coordination mechanisms,
and politics that will inevitably drive these decisions for any large blockchain
community.
Forking
Forking
Forking is the splitting of the main blockchain into two or more chains (like a
fork). This can happen due to many reasons.
When some members of the blockchain community do not agree with the rules, and a
consensus cannot be reached regarding the future state of the blockchain.
When there is a new software update or change in the consensus algorithm.
Example: Bitcoin cash and Ethereum classic
Types of Forks
Types of Forks
Hard Fork
This introduces a new set of rules and software updates to the forked blockchain
network.
Hard Forks usually change the consensus algorithm and block architecture, this
makes it backward-incompatible with the original blockchain software.
Soft Fork
These types of forks introduce software updates that are backward-compatible with
the software and architecture of the original blockchain.
In Soft Fork, the consensus mechanism is usually similar to the parent chain.
Power Law
As a general rule, there is naturally a “power law” distribution, where a majority
of blockchains have relatively small communities relative to a small number of
blockchains with relatively large communities.
This “power law” rule means that even though forks are possible, there will only
ever be a small number of forks that are ultimately successful enough to be
considered a“major” blockchains”.
As a result, the blockchain governance regimes of a small number of major
blockchains will determine governance outcomes for the entire blockchain category.
This is why we need to be concerned about the governance of every major public
blockchain.
Is high data throughput required? If the answer to this question is yes, then use a
traditional database.
Are updates centrally controlled? If yes, then use a conventional database.
Do users trust each other? If yes, then use a traditional database.
Are users anonymous? If yes, then use a public blockchain; if not, then use a
private blockchain.
If consensus is required to be maintained within a consortium then use a private
blockchain, otherwise, use a public blockchain.
Answering all these questions can provide an understanding of whether or not a
blockchain is required.
Ethereum has its own cryptocurrency called Ether. It also has another token called
Gas which is used as a fee for program executions.
Using these Turing complete languages you can develop Smart Contracts and DApps
(Decentralized Applications) on Ethereum.
Ethereum has an Ethereum Virtual Machine which runs the programs on the Ethereum
Blockchain.
It has its own Proof of Work (PoW) consensus algorithm called the Ethash.
Ethereum Accounts
An Ethereum account is an address that stores the “state” of ownership of ether
tokens, and transaction between these accounts is the change in ownership of
tokens. There are two types of Ethereum Accounts.
Ethereum Accounts
Contract Accounts (CAs)
Ethereum DApp
Ethereum started as a way to make a general-purpose blockchain that could be
programmed for a variety of uses.
But very quickly, Ethereum’s vision expanded to become a platform for programming
DApps.
DApps represent a broader perspective than smart contracts.
A DApp is, at the very least, a smart contract and a web user interface.
More broadly, a DApp is a web application that is built on top of open,
decentralized, peer-to-peer infrastructure services.
A DApp is composed of at least: Smart contracts on a blockchain. and A web frontend
user interface.
In addition, many DApps include other decentralized components, such as: *A
decentralized (P2P) storage protocol and platform A decentralized (P2P) messaging
protocol and platform
Ethereum Network
Mainnet - Mainnet is the current live network of Ethereum.
Ethereum Network
Testnet - Testnet are public networks that are used by Developers to test Smart
Contracts/Decentralize Applications in a production like environment.
This test blockchain is used to test smart contracts and DApps before being
deployed to the live production blockchain.
Moreover, being a test network, it allows experimentation and research.
There are different testnets namely Rpopsten, Rinkeby, Kovan and Gorli. Ropsten is
widely used as it closely represents the mainnet.
Private net - As the name suggests, this is the private network that can be created
by generating a new genesis block.
This is usually the case in private blockchain distributed ledger networks, where a
private group of entities start their blockchain and use it as a permissioned
blockchain.
Problem statement
Since there is corruption and cheating everywhere , Tamilnadu government asked DPK,
Father of blockchain to create a Voting smart contract.
So that the voting process will happen smoothly and no malicious activities will
happen.
The results also will be announced after the voting portal closes.
So no waiting period will be there.
Your task is to create a smart contract based on the above conditions and deploy it
in the ethereum blockchain.
Step 1 – Installation
Web3
Web3 generally refers to the next generation of the worldwide web.
It has been adopted by the Ethereum ecosystem and co-opted to refer to a
decentralized web.
Put simply then, Web3 is Web2 without the centralized servers and data silos.
In time, the decentralized architecture will simply become an infrastructure
choice, just like MongoDB vs. Firebase or REST vs. GraphQL is today — your EC2
instance might be replaced by Ethereum, and your static assets could be stored on
Swarm.
The changeover will be gradual, on Web 2.0, we’ll increasingly see sites whose
back-ends utilize Web 3.0-like components such as Bitcoin, BitTorrent, NameCoin.
Eventually, the Web 3.0 platform, Ethereum, will likely be used by sites that wish
to provide transactional evidence of their content, for example, voting sites,
exchanges, and prediction markets.
Hyperledger Foundation
Hyperledger is an open-source project that came out of the Linux Foundation and was
created to help advance cross-industry blockchain technologies.
Open source is a software licensing model. This means that the user has the rights
to the code and is free to use it, enhance it, or even redistribute it, provided
this is done on an open-source basis.
This enables an organization to adapt the technology to achieve true usability with
minimal effort.
Many applications that are backed by open source technologies can be assembled,
like building blocks, to solve business problems.
Focus on rich and easy-to-use APIs: The focus here is to ensure that blockchain
systems have not only enterprise middleware access, but access to business
networks, existing participants, and new systems without exposing the details of
blockchain-powered business networks.
These events are consumed by event adapters, which may further deliver events using
vehicles such as WebHooks or Kafka.
Fabric-committing peers provide an event stream to publish events to registered
listeners. As of v1.0, the only events that get published are Block events.
A Block event gets published whenever the committing peer adds a validated block to
the ledger.
This provides the ability to query and write data across distributed ledgers. There
are two options:
Level DB (default embedded KV DB) supports keyed queries, composite key queries,
and key range queries.
Couch DB (external option) supports keyed queries, composite key queries, key range
queries, plus full data-rich queries.
Client SDK: A client SDK enables the creation of applications that deploy and
invoke transactions atop a shared ledger.
The Hyperledger Fabric Reference Architecture supports both Node.js and Java SDK.
A software developer kit is like a programming kit or set of tools that provide
developers with the environment of libraries to write and test chaincode
applications.
SDKs are critical in blockchain application development. Specific capabilities
included in the SDK are the application client, chaincode, users, events, and
crypto suite.
The ordering service accepts endorsed transactions and orders them according to the
plug-in consensus algorithm, and then delivers them on the channel.
Peers on the channel receive transactions and validate before committing to the
ledger.
Transaction validation
By using this transformative technology, legal service or law firm can implement a
variety of contracts as self-executing programs on a blockchain.
The following options are some of legal agreement types that utilize blockchain:
A solution that uses blockchain can reduce the prevalence of counterfeits for the
aftermarket auto parts.
Users can utilize smartphones for scanning an aftermarket part and quickly identify
if it is genuine. By recognizing the item at the time of buying, users can
authenticate and buy real products.
Use Case 4 – Healthcare (Disparate Recordkeeping)
Disparate record-keeping systems can result in patient consent forms and medical
histories that are incomplete, conflicting or ambiguous.
Blockchain-stored records can offer full longitudinal health records for people,
providing all patients control over their data through verifiable consent.
With blockchain, every patient record reflects the best-known medical facts — from
genomics data to diagnostic medical imaging — and can be reliably transferred when
needed, with no need for a central gatekeeper.
Course Summary
Finally, you have arrived at the end of the course. Let's list down the topics that
you explored in this course.
Distributed systems
Blockchain and its elements
Types of Blockchain
Consensus
Decentralization
Smart contracts
Tokens
Cryptography
Governance
Ethereum
Web3
Hyperledger fabric
Use cases