0% found this document useful (0 votes)
131 views22 pages

Unit 5

Hyperledger Fabric is an open-source blockchain framework that provides confidentiality, flexibility, resiliency and scalability. It uses a modular architecture that can be adapted for any industry. Transactions are conducted between organizations that are members of the Hyperledger network. Each member has authorized peers that interact to validate transactions through an endorsement process before being submitted to the ordering service and committed to the ledger. Key benefits of Hyperledger Fabric include being private and confidential, with access control and higher performance compared to public blockchains.

Uploaded by

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

Unit 5

Hyperledger Fabric is an open-source blockchain framework that provides confidentiality, flexibility, resiliency and scalability. It uses a modular architecture that can be adapted for any industry. Transactions are conducted between organizations that are members of the Hyperledger network. Each member has authorized peers that interact to validate transactions through an endorsement process before being submitted to the ordering service and committed to the ledger. Key benefits of Hyperledger Fabric include being private and confidential, with access control and higher performance compared to public blockchains.

Uploaded by

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

Unit 5.

Blockchain Application Development

5.1Hyperledger Fabric- Architecture

Hyperledger Fabric is an open-source platform for building distributed ledger solutions,


with a modular architecture that delivers high degrees of confidentiality, flexibility,
resiliency, and scalability. This enables solutions developed with fabric to be adapted for
any industry. This is a private and confidential blockchain framework managed by the
Linux Foundation.

How does Hyperledger Fabric Work?

Components:
 Hyperledger fabric is an enterprise-level permission blockchain network. It is made up
of various unique organizations or members that interact with each other to serve a
specific purpose. For example, these organizations can be a bank, financial institution,
or a supply chain network. Each organization is identified and they have a fabric
certificate authority. These organizations are called members.
 Each member of the fabric can set up one or more authorized peers to participate in the
network using the fabric certificate authority. All of these peers must be authorized
properly.
 There is a client-side application connected to the network written with the software
development kit (SDK) of any particular programming language.
Workflow:
For each and every transaction in the fabric, the following steps are followed-
1. Creation of the proposal: Imagine a deal between a smartphone manufacturer company
and a smartphone dealership. The transaction begins when a member organization
proposes or invokes a transaction request with the help of the client application or
portal. Then the client application sends the proposal to peers in each organization for
endorsement.
2. Endorsement of the transaction: After the proposal reaches the endorser peers (peers in
each organization for endorsement of a proposal) the peer checks the fabric certificate
authority of the requesting member and other details that are needed no authenticate the
transaction. Then it executes the chain code (a piece of code that is written in one of the
supported languages such as Go or Java) and returns a response. This response indicates
the approval or rejection of the following transaction. The response is carried out to the
client.
3. Submission to ordering service: After receiving the endorsement output, the approved
transactions are sent to the ordering service by the client-side application. The peer
responsible for the ordering service includes the transaction into a specific block and
sends it to the peer nodes of different members of the network.
4. Updating the ledger: After receiving this block the peer nodes of such organizations
update their local ledger with this block. Hence the new transactions are now
committed.
Industry Use Cases For Hyperledger Fabric

1. Supply Chain: Supply chains are global or regional webs of suppliers, manufacturers,
and retailers of a particular product. Hyperledger Fabric networks can improve the
transaction processes of the supply chain by increasing the clarity and traceability of
transactions within the fabric. On a Fabric network, enterprises having authentication to
access the ledger can view the data of the previous transactions. This fact increases
accountability and reduces the risk of counterfeiting of the transactions. Real-
time production and shipping updates can be updated to the ledger. Which can help us to
track the product condition in a much faster, simpler, and efficient way.
2. Trading and Asset Transfer: Trading and asset transfer requires many organizations or
members like importers, exporters, banks, brokers. They work with one another. And even
in the era of digitalization a lot of paperwork is going on in this sector. But using
Hyperledger they can transact and interact with each other in a paperless way. The
Hyperledger fabric can add the same layer of trust as the document signed by a trusted
authority. This also increases the performance of the system.
Another benefit of Hyperledger fabric is that assets can be dematerialized on the blockchain
network with the help of Hyperledger fabric. Due to this traders or stakeholders will be able
to have direct access to their financial securities and they can trade it anytime.
3. Insurance: The insurance industry spends billions to avoid insurance frauds or falsified
claims. With the help of Hyperledger fabric, the Insurance company can refer to the
transaction data that is stored inside the ledger. Hyperledger Fabric can also make the
processing of claims faster using the chain code and automate the payment. This process
will be also helpful for multi-party subrogation claims processing. Where it can automate
repayment from the fault party back to the insurance company. Verification of identity or
KYC process will be easy using this private blockchain.
Benefits Of Hyperledger Fabric

1. Open Source: Hyperledger fabric is an open-source blockchain framework hosted by the


Linux foundation. It has an active community of developers The code is designed to be
publicly accessible. Anyone in the community can see, modify, and distribute the code as
they see fit. People across the world can come and help to develop the source code.
2. Private and Confidential: In a public blockchain network each and every node in the
network is receiving a copy of the whole ledger. Thus keeping privacy becomes a much
bigger concern as everything is open to everyone. In addition to this one, the identities of
all the participating members are not known and authenticated. Anyone can participate as it
is a public blockchain. But in the case of Hyperledger fabric, the identities of all
participating members are authenticated. And the ledger is only exposed to the
authenticated members. This benefit is the most useful in industry-level cases, like banking,
insurance, etc where customer data should be kept private.
3. Access Control: In the Hyperledger fabric, there is a virtual blockchain network on top
of the physical blockchain network. It has its own access rules. It employs its own
mechanism for transaction ordering and provides an additional layer of access control. It is
especially useful when members want to limit the exposure of data and make it private.
Such that it can be viewed by the related parties only. As an example when two competitors
are on the same network. The fabric also offers private data collection and accessibility,
where one competitor can control the access to its own data such that the data do not get
exposed to the other competitor.
4. Chaincode Functionality: It includes a container technology to host smart contracts
called chain code that defines the business rules of the system. And it’s designed to support
various pluggable components and to accommodate the complexity that exists across the
entire economy. This is useful for some of the specific types of transactions like asset
ownership change.
5. Performance: As the Hyperledger fabric is a private blockchain network, There is no
need to validate the transactions on this network so the transaction speed is faster, resulting
in a better performance.
5.2Identities and Policies

For Companies

Companies often collect sensitive information about their users and store them alongside
less-sensitive routine business data. This creates new business risks with the rise of user
privacy-centric regulations such as GDPR and the shifting industry focus to corporate IT
responsibility. When these data are relegated to tight-lipped data vaults, they become less
useful in driving product improvements and attaining true customer understanding. Only
after receiving large fines or developing stronger IT capabilities will many enterprises
pursue expensive and risky projects to achieve the right balance between data security and
business needs.

For IoT Devices

There are about 7 billion internet-connected devices. This number is expected to grow to
10 billion by 2020 and 22 billion by 2025. In a still-nascent industry, most IoT
technologies do not incorporate appropriate identity and access management capabilities,
not unlike the early Internet which consisted solely of trusted institutions. Interconnected
internet of things (IoT) devices and objects must identify sensors, monitors, and devices,
and manage access to sensitive and non-sensitive data in a secure manner. Leading IT
vendors have begun to offer IoT management systems to address these service gaps. For
example, it is not uncommon for a single organization to have tens of thousands of IoT
devices, in contrast to the mere dozens or hundreds of traditional servers and user devices.
Mismatching standards across devices is a common ailment with such volume. Security
frequently remains an afterthought to the already-taxing implementation of simple
management capabilities at scale, evident with large-scale IoT hacking emerging as a
vogue topic at top IT security conferences.

For Individuals

Identity is integral to a functioning society and economy. Having a proper way to identify
ourselves and our possessions enables us to create thriving societies and global markets.
At its most basic level, identity is a collection of claims about a person, place or thing. For
people, this usually consists of first and last name, date of birth, nationality, and some
form of a national identifier such as passport number, social security number (SSN),
driving license, etc. These data points are issued by centralized entities (governments) and
are stored in centralized databases (central government servers).

Physical forms of identification aren’t widely available to every human for various
reasons. Approximately 1.1 billion people worldwide don’t have a way to claim ownership
over their identity. This leaves one-seventh of the world’s population in a vulnerable state
– unable to vote in elections, own property, open a bank account, or find employment. The
inability to attain identification documentation jeopardizes a person’s access to the
financial system and in turn, limits their freedom.

Citizens with officially recognized forms of identification continue to lack complete


ownership and control over their identities. They have a fragmented online identification
experience and unknowingly lose the value that their data generates. Companies holding
their data are subjected to frequent hacks, which forces a lifetime of fraud mitigation for
the end-user. Once a social security number is issued and lost, there is little to no recourse.

Why do we need Blockchain for Identity?

Blockchain identity management systems could be used to eradicate current identity issues
such as

 Inaccessibility
 Data insecurity
 Fraudulent identities

Inaccessibility

Approximately 1.1 billion people around the world have no proof of identity, and 45% of
those without an identity are among the poorest 20% on the planet. Cumbersome
identification paperwork processes, expenses, lack of access, and the simple lack of
knowledge around personal identity are primary roadblocks that keep over a billion
individuals outside of traditional identification systems. Without possessing physical
identities, one cannot enroll in school, apply for jobs, get a passport, or access many
governmental services. Having an identity is crucial to gaining access to the existing
financial system. Conversely, 60% of the 2.7 billion unbanked people already own mobile
phones, which paves the way for blockchain-based mobile identity solutions which better
suit the needs of vulnerable citizens.

Data Insecurity

At present, we store our most valuable identification information on centralized


government databases supported by legacy software operate with numerous single points
of failure. Large, centralized systems containing the personally identifiable information
(PII) of millions of user accounts are incredibly appealing to hackers. A recent study
shows that personally identifiable information is the most targeted data for breaches,
comprising 97% of all breaches in 2018. Despite regulatory legislation and enterprise
efforts to increase cybersecurity, 2.8 billion consumer data records were exposed at an
estimated cost of more than $654 billion in 2018.

Fraudulent Identities

Additionally, the user’s digital identity landscape experience is exceptionally fragmented.


Users juggle various identities associated with their usernames across different websites.
There is no standardized way to use the data generated by one platform on another
platform. Furthermore, the weak link between digital and offline identities makes it
relatively easy to create fake identities. Fake identities create fertile ground for the
phenomena of counterfeit interaction, which can help in the perpetration of fraud and lead
to inflated numbers and lost revenue. In society, this vulnerability facilitates the creation
and dissemination of evils like “fake news,” which poses a potential threat to democracy.

Due to the increasing sophistication of smartphones, advances in cryptography and the


advent of blockchain technology, we have the tools to build new identity management
systems; digital identity frameworks based upon the concept of decentralized identifiers
(DIDs) – potentially including a new subset of decentralized identities known as self-
sovereign identity (SSI).

How do Decentralized Digital Identities Work on Ethereum?

Blockchain technology allows for users to create and manage digital identities through the
combination of the following components:

 Decentralized identifiers
 Identity management
 Embedded encryption

What is Digital Identity?

A digital identity arises organically from the use of personal information on the web and
from the shadow data created by the individual’s actions online. A digital identity may be
a pseudonymous profile linked to the device’s IP address, for example, a randomly-
generated unique ID. Data points that can help form a digital identity include usernames
and passwords, drivers license number, online purchasing history, date of birth, online
search activities, medical history, etc. Biometrics, Behavioral, Biographic are the modals
that make up a person’s identity.

How is Digital Identity Created?

In one example, users sign up to a self-sovereign identity and data platform to create and
register a DID. During this process, the user creates a pair of private and public keys.
Public keys associated to a DID can be stored on-chain in case keys are compromised or
are rotated for security reasons. Additional data associated with a DID such as attestations
can be anchored on-chain, but the full data itself should not be stored on-chain to maintain
scalability and compliance with privacy regulations.

What is a Decentralized Identifier?

A decentralized identifier (DID) is a pseudo-anonymous identifier for a person, company,


object, etc. Each DID is secured by a private key. Only the private key owner can prove
that they own or control their identity. One person can have many DIDs, which limits the
extent to which they can be tracked across the multiple activities in their life. For example,
a person could have one DID associated with a gaming platform, and another, entirely
separate DID associated with their credit reporting platform.

Each DID is often associated with a series of attestations (verifiable credentials) issued by
other DIDs, that attest to specific characteristics of that DID (e.g., location, age, diplomas,
payslips). These credentials are cryptographically signed by their issuers, which allows
DID owners to store these credentials themselves instead of relying on a single profile
provider (e.g., Google, Facebook). In addition, non-attested data such as browsing
histories or social media posts can also be associated to DIDs by the owner or controllers
of that data depending on context and intended use.

How are decentralized identities secured?

A key element of securing decentralized identities is cryptography. In cryptography,


private keys are known only to the owner, while public keys are disseminated widely. This
pairing accomplishes two functions. The first is authentication, where the public key
verifies that a holder of the paired private key sent the message. The second is encryption,
where only the paired private key holder can decrypt the message encrypted with the
public key.

How are decentralized identities used?

Once paired with a decentralized identity, users can present the verified identifier in the
form of a QR code to prove their identity and access certain services. The service provider
verifies the identity by verifying the proof of control or ownership of the presented
attestation — the attestation had been associated with a DID and the user signs the
presentation with the private key belonging to that DID. If they match, access is granted.
What Are the Use Cases of Blockchain in Identity Management?

Decentralized and digital identification can be used in many ways. Here are some of the
top use cases that ConsenSys has identified:

 Self Sovereign identity


 Data Monetization
 Data Portability

What is Self Sovereign identity?

Self-sovereign identity (SSI) is the concept that people and businesses can store their own
identity data on their own devices; choosing which pieces of information to share to
validators without relying on a central repository of identity data. These identities could be
created independent of nation-states, corporations, or global organizations.

What is Data Monetization?

As the world begins to examine who owns and should profit from user-generated data,
blockchain-based self-sovereign identities and decentralized models give users control and
carves a path to data monetization.

Data Monetization refers to using personal data for quantifiable economic benefit. Data on
its own has value, but insights derived from personally identifiable data substantially
increases the value of the underlying data. There are quintillion bytes of data created each
day, by 4.39 billion internet users. Over 60% of the global GDP is expected to be digitized
by 2022, meaning personal data will continue to increase in value.

Currently, the online data that we generate is intangible, invisible, and complex.
Attribution is critical in the processes of ownership, and SSI makes it possible to attribute
your online data to your DID. From there, individuals could monetize their personal data,
for example, by renting it to AI training algorithms or choosing to sell their data to
advertisers. Users would also have the option to keep their data hidden and protected from
corporations or governments.

What is Data Portability?

Article 20 of the European Union General Data Protection Regulation (EU GDPR) grants
users the right to data portability, which pertains to the data subject’s right to have their
personal data transmitted directly from one controller to another, when technically
feasible. This right has the potential to enhance user experience, cutting down on the need
to reverify their identity across various services and platforms. With DIDs and verifiable
credentials, it is possible to migrate identities that were anchored on one target system to
another with ease. Data portability reduces friction for the user, while simplifying the sign-
up process which increases user adoption. DID data portability also allows for reusable
credentials, where user can quickly re-verify themselves while meeting regulatory Know
Your Customer (KYC) requirements. This is especially useful to reduce customer
onboarding time that avoids drop-out rates and cut costs in the financial sector by skipping
the cumbersome identity verification process where usually a lot of documents need to be
provided and checked.”
How does blockchain enable increased economic contribution?

Digital ID is expected to contribute greatly to economic growth worldwide over the next
10 years, and it is considered inclusive since it benefits individuals largely while
stimulating economic activity for the global market. For example, a McKinsey study
reveals that reaching the unbanked population in ASEAN could increase the economic
contribution of the region from $17 billion to $52 billion by 2030.

Additionally, the reported value attributed to digital identities is estimated to expand by


22% yearly, with economic benefits of close to €330 billion for European businesses and
governments by 2020, and nearly twice as much value for consumers – €670 billion.
Decentralized identity models give users the chance to unlock this value, which will, in
turn, grow the global economy.

What Are the Benefits of Decentralized Identity?

Regulations such as the EU General Data Protection Regulation (EU GDPR) strengthen
identity standards that require modern identity solutions. Governments look towards
distributed ledger technology to bestow identities to the unidentified and to protect
citizen’s personally identifiable information.

Blockchain technology offers the following benefits:

 Decentralized Public Key Infrastructure (DPKI)


 Decentralized Storage
 Manageability and Control

Decentralized Public Key Infrastructure (DPKI)

DPKI is the core of Decentralized Identity. Blockchain enables DPKI by creating a


tamper-proof and trusted medium to distribute the asymmetric verification and encryption
keys of the identity holders. Decentralized PKI (DPKI) enables everyone to create or
anchor cryptographic keys on the Blockchain in a tamper-proof and chronologically
ordered way. These keys are used to allow others to verify digital signatures, or encrypt
data to the respective identity holder. Before DPKI, everyone had to buy or obtain digital
certificates from traditional certificate authorities (CA). Thanks to Blockchain technology,
there is no need for a centralized CA anymore. In turn, DPKI is an enabler for many use
cases, namely verifiable credentials (VC). Many people today use the term verifiable
credentials (VCs) to refer to digital credentials that come with such cryptographic proofs.

Decentralized Storage

Identities anchored on blockchains are inherently safer than identities stored on centralized
servers. By using the cryptographically secure Ethereum blockchain, in combination with
distributed data storage systems like InterPlanetary FileSystem (IPFS) or OrbitDB, it’s
possible to disintermediate existing centralized data storage systems while still
maintaining trust and data integrity. Decentralized storage solutions, which are tamper-
proof by design, reduce an entity’s ability to gain unauthorized data access in order to
exploit or monetize an individual’s confidential information.

Decentralized storage is one of the core components of secure identity data management.
In a decentralized framework, credentials are usually stored directly on the user’s device
(e.g., smartphone, laptop) or securely held by private identity stores.

Such private identity stores are referred to as identity hubs such as uPort’s TrustGraph or
3Box. When solely under the control of the user, identities are considered self-sovereign.
This, in turn, means the user can both fully control access to the data without having to
worry about access being revoked. Data under the user’s control makes the information
more interoperable, allowing the user to employ data on multiple platforms, use the
information for different purposes, and protect the user from being locked into one
platform.

Manageability and Control

In centralized identity systems, the entity providing the identity is generally responsible
for the security of the identity data. In a decentralized identity framework, security
becomes the responsibility of the user, who may decide to implement his or her own
security measures or outsource the task to some service like a digital bank vault or a
password-manager like app. Additionally, blockchain-powered, decentralized identity
solutions forces hackers to attack individual data stores, which is costly and generally
unprofitable.

5.3Membership and Access Control

Blockchain Access Control Technology Overview

You might have heard that blockchain technology (for visual demo please follow
the link) is the backbone of Bitcoin. However, recently this ingenious invention has
found many applications, in particular as far as the Internet of Things (IoT) goes.
Thanks to the blockchain technology security of Access Control can now be reinforced.

Blockchain and its Application in Blockchain Access Control Technology

Blockchain technology has proven to be incorruptible and highly transparent. It provides


end-to-end security and encryption thanks to being decentralized. Because of its
distributed nature, blockchain eliminates the risk of human errors and safeguards against
hacker attacks. All this is of a paramount importance when it comes to Access Control,
and especially Access Control as a Service.

Advantages of blockchain technology


Although it has a number of advantages, regular Access Control technology presupposes
that all the information is stored at a server, where all the processed data is centralized.
This means providers might gain unauthorized access to the data and control operations
of their clients’ devices. Click here for an unauthorized access example. Thus, when
outsourcing your company’s security to a third party, you have to put a lot of trust in
them. Then again, in case you want to change your cloud-based Access Control operator,
what happens to the data they possess? How can you be sure that it won’t be tampered
with? Another downside of a legacy Access Control is that it’s vulnerable to various
attacks and in some cases can easily be broken.

By implementing blockchain access control the above mentioned threats are eliminated.
All the information is distributed within a network of nodes, and is not stored at one or a
few servers. All the end devices act autonomously. Moreover, an end user should be able
to choose which personal data to share in the network. Last but not least, blockchain
access control technology is cheaper to run than a cloud-based back-end server.

Blockchain Access Control. Unlock its Potential

These days many blockchain-powered startups are trying to bring about revolutionary
changes to companies’ security by implementing blockchain access control. Their aim is
to withstand security issues, and thanks to the blockchain access control technology
enable the end user to be in control of the data.

Blockchain access control is applied in REMME’s innovative solution that


makes passwords obsolete. Their blockchain access control unlocks new level of security
thanks to specific SSL certificates located on each device instead of a traditional
password. The data on the certificate is managed on Blockchain. This makes it hacker -
proof.

IBM ‘s blockchain access control protects Everledger - company that certifies diamonds
– by making sure that only authorized people have access to the online platform and by
eliminating any possible internal or external threat.

In sum, distributed technology such as blockchain access control unlock a new level of
cyber security. Encryption methods as well as private-key permissions are indispensable
to the decentralized technology and allow for a safer business environment in which
organizations can have peace of mind when it comes to many aspects of IoT, including
Access Control System.

5.3 Channels

A channel is a private communication pathway between two or more members of a


Hyperledger Fabric network on Amazon Managed Blockchain. Each transaction on a
Hyperledger Fabric network occurs on a channel. A network must contain at least one
channel and a network on Managed Blockchain can have up to eight channels.

Each channel has its own transaction ledger. The ordering service on the network manages
transactions according to a channel configuration that a member creates. The channel
configuration specifies which members participate in the channel, the peer nodes that can
transact on the channel, and the policies that govern channel updates.

To participate on a channel, a member must join at least one peer node to the channel. A peer
node can belong to multiple channels, but ledger data from one channel can't pass to ledger
data in another channel. A member shares their admin certificates and root CA with the
channel creator when they join the channel. These artifacts allow the ordering service to
authenticate and authorize members of the channel when they join their peer nodes to the
channel.

Optionally, a channel also can contain private data collections. A private data collection
allows a subset of channel members to share ledger data independently of the ordering
service. Private data collections are supported only with Hyperledger Fabric 1.4 or later.
Private data collections require that at least one peer node for a member is set up as an anchor
peer. For more information, see Add an Anchor Peer to a Channel and Work with Private
Data Collections in Hyperledger Fabric on Managed Blockchain.
Create a Channel

A channel creator is a member that uses their Hyperledger Fabric client to create a channel
configuration file. The channel creator then runs a command that outputs a channel
transaction file based on that configuration file. Finally, the channel creator uses the
transaction file to run a command that creates the channel with the Hyperledger Fabric
ordering service on Managed Blockchain. The channel creator must get security artifacts
from channel members to be able to add the members to the channel.

After the channel is created, channel members, including the channel creator, download the
channel genesis block to their respective Hyperledger Fabric client machines and join peer
nodes to the channel.

To create and join a Hyperledger Fabric channel on Managed Blockchain

The following steps specify file locations in terms of both the Hyperledger Fabric client
machine's file system and the Hyperledger Fabric CLI Docker container file system, as
appropriate. When the CLI is installed, the Docker Compose configuration file maps these
locations to one another. For more information, see step 4.4 in the Getting Started tutorial of
this guide.

In the following examples, the client machine directory /home/ec2-user is mapped to the
container directory /opt/home. In steps where you save artifacts, the steps use the client
machine file system. In steps where you reference artifacts in CLI commands and
configuration files, the steps use the container file system.

1. Each member that joins a channel shares its security artifacts with the channel creator. The
channel creator saves the artifacts on the Hyperledger Fabric client machine. The channel
creator then references the location of these artifacts in the next step. For more information
about sharing artifacts, see Step 8.4 and 8.5 in the getting started tutorial of this guide.
Sharing artifacts is a prerequisite for the steps below.
2. On your Hyperledger Fabric client machine, create a configuration file in yaml format
named configtx.yaml. Save this file to a file location on your Hyperledger Fabric client
machine that is mapped to the CLI container file system. The following steps use /home/ec2-
user, which is mapped to /opt/home.
Use the examples below as a starting point. For more information about configuration files,
see Channel configuration (configtx) in the Hyperledger Fabric documentation. Replace the
following configuration parameters as appropriate for your channel, and add sections as
required for additional members.
 Org<n>MemberID is the respective member ID for each channel participant, for
example, m-K46ICRRXJRCGRNNS4ES4XUUS5A.
 Org<n>AdminMSPDir is the Docker container file system directory where security artifacts
for each corresponding member are saved. For
example, /opt/home/Org2AdminMSP references artifacts saved to /home/ec2-
user/Org2AdminMSP on the channel creator's client machine.
The configtx file for a network on Hyperledger Fabric 1.4 or later includes application
settings to enable expanded features. These settings are not supported in Hyperledger Fabric
1.2 channels. Examples for version 1.2, 1.4, and 2.2 networks are provided below.

5.4Transaction Validation

There are several key steps a transaction must go through before it is added to the
blockchain. Today, we’re going to focus on authentication using cryptographic
keys, authorisation via proof of work, the role of mining, and the more recent
adoption of proof of stake protocols in later blockchain networks.

Authentication

The original blockchain was designed to operate without a central authority (i.e.
with no bank or regulator controlling who transacts), but transactions still have to
be authenticated.
This is done using cryptographic keys, a string of data (like a password) that
identifies a user and gives access to their “account” or “wallet” of value on the
system.

Each user has their own private key and a public key that everyone can see. Using
them both creates a secure digital identity to authenticate the user via digital
signatures and to ‘unlock’ the transaction they want to perform.

Authorisation

Once the transaction is agreed between the users, it needs to be approved, or


authorised, before it is added to a block in the chain.

For a public blockchain, the decision to add a transaction to the chain is made by
consensus. This means that the majority of “nodes” (or computers in the network)
must agree that the transaction is valid. The people who own the computers in the
network are incentivised to verify transactions through r ewards. This process is
known as ‘proof of work’.

Proof of Work

Proof of Work requires the people who own the computers in the network to solve a complex
mathematical problem to be able to add a block to the chain. Solving the problem is known as
mining, and ‘miners’ are usually rewarded for their work in cryptocurrency.

But mining isn’t easy. The mathematical problem can only be solved by trial and error and
the odds of solving the problem are about 1 in 5.9 trillion. It requires substantial computing
power which uses considerable amounts of energy. This means the rewards for undertaking
the mining must outweigh the cost of the computers and the electricity cost of running them,
as one computer alone would take years to find a solution to the mathematical problem.

The Power of Mining

The Cambridge Bitcoin Electricity Consumption Index estimates the bitcoin mining network
consumes almost 70 terawatt-hours (TWh) of electricity per year, ranking it the 40th largest
consumer of electricity by ‘country’. By way of comparison, Ireland (ranked 68th) uses just
over a third of Bitcoin’s consumption, or 25 TWh, and Austria at number 42 consumes 64.6
TWh of electricity per year, according to 2016 data compiled by the CIA.

The Problem with Proof of Work

To create economies of scale, miners often pool their resources together through companies
that aggregate a large group of miners. These miners then share the rewards and fees offered
by the blockchain network.
As a blockchain grows, more computers join to try and solve the problem, the problem gets
harder and the network gets larger, theoretically distributing the chain further and making it
ever more difficult to sabotage or hack. In practice though, mining power has become
concentrated in the hands of a few mining pools. These large organisations have the vast
computing and electrical power now needed to maintain and grow a blockchain network
based around Proof of Work validation.

Proof of Stake

Later blockchain networks have adopted “Proof of Stake” validation consensus protocols,
where participants must have a stake in the blockchain - usually by owning some of the
cryptocurrency - to be in with a chance of selecting, verifying & validating transactions. This
saves substantial computing power resources because no mining is required.

In addition, blockchain technologies have evolved to include “Smart Contracts” which


automatically execute transactions when certain conditions have been met.

5.5 Writing smart contract using Hyperledger Fabric

Developing Blockchain applications really means developing smart contracts, or as they are

also called: chain code. Smart contracts can be compared to stored procedures in the database

world and mostly deal with getting and setting parameters on business objects, in addition to

doing anything else we want them to do by using either one of the following languages:

JavaScript, TypeScript, Java or Go

Developing Smart Contracts for Hyperledger Fabric is best done in the open source Visual

Studio Code environment https://code.visualstudio.com with the IBM

Blockchain plugin https://marketplace.visualstudio.com/

A typical Blockchain system is shown below: we have two — or more — organizations, a

Seller and a Buyer, that trade in automobiles, buying and selling cars. The transactions

between the two organizations are stored on an immutable ledger, like an appendable secure

and shared log file with consensus, provenance, immutability and finality.
The Java class above defines an abstract class that lets you create an asset and get and set the

value of your assets. This may seem a little too simple but for business systems it is very

nearly the norm.

The first step is to follow the typical workflow from:

1. generating a new smart contract project,

2. deploying the smart contract to the Local Fabric runtime environment, and

3. testing out your transactions via an application gateway.

5.6 Smart contract using Ethereum


With the advent of blockchain technology, another technology has gained popularity: smart
contracts. A smart contract is a self-executing contract in which the contents of the agreement
are written directly into the lines of code. In simple terms, you can think of smart contracts as
a collection of code and data that resides on the Ethereum network.

As a concept, smart contracts were proposed by Nick Szabo, a computer scientist and legal
scholar in the 1990s. According to Szabo, who designed the virtual currency “Bit Gold” in
1998, smart contracts are transaction protocols that enforce and execute contract conditions.

Smart contracts are not controlled by a user, instead, they are self-executing programs on the
Ethereum blockchain. Users can interact with smart contracts by submitting transactions that
trigger a function encoded in the smart contract. Similar to regular contracts, smart contracts
can define rules, but unlike normal contracts, the terms of the contract are enforced
automatically through code and not through human intervention. A perfect analogy to
describe a smart contract would be a digital vending machine. To get a snack from a vending
machine you have to input an instruction, which automatically triggers a certain output.

The logic of the operation is programmed into the machine. Similar to a vending machine, a
smart contract has logic programmed into its code. Also, a vending machine eliminates the
need for operators to handle the machines. Likewise, smart contracts have the potential to
replace intermediaries in many sectors.

Smart contracts have several benefits. For one, they are transparent. Participants can audit
and view encrypted transaction logs. Smart contracts are also permissionless, meaning that
anyone can write a smart contract and deploy it onto the Ethereum blockchain. More
importantly, smart contracts are composable and can connect with other smart contracts
within the Ethereum network.

To deploy a smart contract, you need to pay gas in the same way you would pay for an ETH
transaction. The greater a smart contract’s complexity, the more expensive it is to run that
smart contract on the public blockchain. A concrete example is given by Eric Lastname, a
blockchain developer. According to him, the cost of deploying a simple smart contract is
anywhere around $500. However, for a moderate-sized contract, you may have to spend north
of $5,000 just on deployment costs.

DIFFERENT SMART CONTRACT PLATFORMS


While most smart contracts are built on Ethereum, other blockchains support smart contracts
too. This includes Solana (SOL), Polkadot (DOT), BNB Chain, and more. However,
Ethereum remains the most popular smart contract protocol. Information on the number of
smart contracts deployed on Ethereum remains sketchy, but a 2020 study revealed there were
over 1 million smart contracts on Ethereum. This number must have grown a lot since then.
According to Yahoo Finance, the number of smart contracts deployed in Ethereum peaked in
June 2021, at 2.5 million.

Having said that, there are different languages for smart contract deployment.

 Solidity is a programming language designed to allow developers to create smart


contracts. Solidity is based on existing programming languages like C++, JavaScript,
and Python. Solidity runs on the Ethereum virtual machine (EVM).
 Rust is a fast and memory-efficient programming language that is used to
build scalable protocols. Rust supports smart contract blockchains such as Solana,
Polkadot, and Near blockchain. JavaScript is a general-purpose programming
language that is mostly used by developers new to the blockchain space to enable
them to start building decentralized products quickly. The programming language is
used in Hyperledger Fabric, Solana, or the Icon blockchain.
 Vyper is a Python-like programming language that is contract-oriented and targets the
Ethereum virtual machine (EVM). Vyper was built to improve on the security issues
of Solidity.
 Finally, Yul is an intermediate programming language that is used by Solidity and
addresses the needs of different backends. Yul is already used in most Ethereum-
based projects.

HOW TO CREATE A SMART CONTRACT


Below is a step-by-step guide on how to create and deploy a smart contract on Ethereum.

Step 1: Connect to the Ethereum network.


You can connect to the Ethereum mainnet by downloading and installing a MetaMask wallet
on your Chrome browser and enabling it. Once you have completed the setup, proceed to
connect it to the Ethereum mainnet.
Step 2: Choose a test network.

You will find a list of test networks in your Metamask wallet. Select one, which will be used
to test the smart contract you are building. The test networks include:

 Robsten Test network


 Rinkeby Test network
 Kovan Test network
 Goerli Test network.

Step 3: Fund your wallet with Testnet ETH.

Eventually, when you are ready to test your smart contract, you will need to have Testnet
ETH in your wallet. Fortunately, the process of adding Testnet ETH in MetaMask is
straightforward. Click on the “Deposit” and “Get Ether” buttons under the Test Faucet and
proceed with the instructions.
Step 4: Use the Remix browser to write your smart contract.

You can use the editor in Remix browser IDE to write your smart contract in Solidity. Remix
browser is the best option for writing smart contracts as it comes with several features and is
usually used to write basic smart contracts.
Step 5: Create a .sol extension file.

Open the Remix Browser and click on the (+) icon on the left side to create a .sol extension.
This makes any programmed file solidity-compatible.
Step 6: Complete your smart contract code.

Choose a version of the compiler from the Remix browser and compile the solidity smart
contract code.
Step 7: Deploy the smart contract.

Deploy the smart contract on your selected Ethereum test network by clicking on the deploy
button on the Remix browser. Once the transaction is complete, the address of the smart
contract will appear on the right-hand side of the Remix browser.
Step 8: Make smart contract ready to go live.

To prepare a smart contract to go live on a blockchain, procedures such as testing or auditing


are strongly recommended, besides other considerations. Once reassured that the smart
contract is ready to hit the market, the smart contract can be deployed to the Ethereum
mainnet.

5.7Overview of Ripple and Corda


Founders- Arthur Britto, David Schwartz, Ryan Fugger

Developers- Ripple Labs Inc.

Initial launch- 2012

Stable launch- 0.0/ 15 may 2018

Repository- com/ripple

Programming language- C++

OS- Server: Linux (RHEL, CentOS, Ubuntu), Windows, macOS

Type- Real-time gross settlement, currency exchange, remittance

License- ISC license

Website-com

Ripple is a seriously weird normalized exchange rates and remittance platform developed by
Ripple Labs Inc., which is an efficient innovative located in the United States. Ripple, which
debuted in 2012, is based on a distributed free software network that accepts assets reflecting
fiat cash, cryptocurrencies, products, or other trade measures, including frequent flyer miles
or cell minutes. Ripple claims to be able to facilitate "secure, instantaneous, and practically
free worldwide banking transactions of any amount with no payment." The database makes
use of the local coin XRP.

Ripple Laboratories and two of its employees were prosecuted by the SEC (Securities and
Exchange Commission) in December 2020 for marketing XRP coins.

Definition of Ripple Cryptocurrency

Ripple is a financial system that functions as both a bitcoin and an online payment platform.
It was initially launched in 2012 by Chris Larsen and Jed McCaleb. The core process of
Ripple is an account reporting commodity interchange and repatriation platform, comparable
to the Banking network for international investment and safety exchanges, which is used by
customers and monetary intermediates trading between currencies.
The cryptocurrency's coin is pre-mined and trades under the trading sign XRP. The firm and
system are known as Ripple, and the digital coin is known as XRP. The objective of XRP is
to act as a type of interim payment layer currency, acting as an intermediary method of trade
between two currencies or systems.

Important Leftovers

o Ripple is a distributed ledger electronic payment infrastructure and technology, as


well as the creator of its digital currency, XRP.
o Instead of using cryptocurrency extraction, Ripple confirms transactions using a
consensus process via a network of bank-owned computers.
o Ripple operations use fewer resources than bitcoin operations, are acknowledged in
seconds, and have extremely lower operating costs. However, bitcoin operations use
more resources, take more time to validate, and have a higher cost of capital.
o Ripple is one of the top five highest significant cryptocurrency assets in terms of
market valuation.

History of Ripple

Ripple was founded by Jed McCaleb and Arthur Britto, and David Schwartz. He also
engaged Ryan Fugger, who had launched in 2005 like a banking transaction to give safe
payment alternatives to participants of an internet group over a worldwide network. Fugger
had created an OpenCoin platform that would turn into XRP. The business has developed its
blockchain technology, dubbed XRP, to enable investment banks to transfer funds with little
cost and a waiting period. In 2013, the firm stated that banks were interested in using their
payment method.

Almost 100 banks have joined up by 2018, however, the majority of them were just using
Ripple's XCurrent transmission software, ignoring the XRP coin owing to its instability
issues. In 2018, a Ripple official said that "we began with the traditional ledger, which we
like. However, banks have stated that you cannot bring the full globe on a blockchain."

Ripple is based on a shared blockchain, which is a decentralized system that stores data about
all Ripple funds. According to Chris Larsen of the Stanford College Of business, the network
is administered by a group of specialized computers to analyze their financial data, and that
machines may theoretically belong to anybody, even banks or market participants. Ripple
immediately verifies funds and balances for transaction transfer and sends payment
notifications in a matter of seconds.

Ripple Laboratories remained the principal provider of software to the Ripple disagreement
verification mechanism. The method gained accustomed to the US financial system in 2014,
despite privacy and regulatory concerns.

Recognizing the Ripple Effect


Ripple works on an accessible, peer-to-peer autonomous network that enables the smooth
movement of money in every currency, including euros, dollars, yen, and bitcoins such as
bitcoin and litecoin. Ripple is a worldwide transactions infrastructure that serves significant
banks and financial institutions. XRP is used in its services to allow for fast currency
exchange among multiple currencies.

Ripple as a Visual Electronic Money System

To ensure that the platform works, recognize an online payment configuration where the
parties involved use their favored intermediaries to collect the funds on either end of the
conversation. Ripple serves as a digital hawala company. Hawala is an unofficial method of
transmitting cash, generally between nations, without any physical currency changing.

For example

Let's say John has to transfer $100 to Peter, who lives in another city. John gives the cash for
Peter to be forwarded to his local contractor, Kate. John also gives the cash with a
cryptographic signature, which Peter must successfully reply to get the cash in his hometown.
Kate notifies peter's broker, Rose, of the transaction records, including the receiver, the cash
to be repaid, and the login. Rose will offer Peter $100 if he provides the correct passcode.

Therefore, because the funds come from Rose's bank, Kate pays Rose $100. Rose can either
keep a log of all Kate's amount, which Kate will settle on an agreed-upon date, or perform
opposition actions to equalize the amount. For instance, if Rose was also Martin's
representative and Martin was required to transmit $100 to Itios's representative, Kate, this
would equalize out the $100 unpaid to Rose because Itios would be earned from Kate's fund.

Whereas the Ripple ecosystem is slightly more sophisticated than this instance, it shows the
fundamentals of how the Ripple process works. Confidence is necessary to begin a trade, as
demonstrated by the examples above: trust among John and Kate, Kate and Rose, and Peter
and Rose.

Ripple employs a channel defined as Gateway as the connection in the assurance path among
two people interested in conducting a trade. Gateway serves as a financial middleman,
accepting and sending money to online accounts via the Ripple system. Someone or some
company can enroll and create a portal, allowing the applicant to operate as a mediator to
convert coins, develop and sustain, and transmit funds on the platform.

XRP as a digital currency of Ripple

XRP, a cryptocurrency, serves as gateway cash between other currencies. It sees no


difference in paper currency, making it simple to swap one cash for another. USDsnapswap,
CADBluzelle, and BTCbitstamp are the gateways for each coin in the network. John does not
have to receive any digital currency if Peter requested cryptocurrency as money for the
activities he provided to Peter. He may send in CAD (Canadian dollars) to his portal, and
Peter can get crypto from his portal.

Maintaining funds with a portal subject the customer to partner risk, which exists in the
conventional banking system as well. If the portal fails to meet its obligations, the customer
may risk the return on investment kept at that portal. Customers who do not accept a portal
can trade with a certified portal, interacting with the "unsecure" portal. The IOU will be
exchanged via the trustworthy or creditworthy-certified portal in this manner. Because a
customer's coin is not another customer's IOU or debt, transaction costs do not pertain to
digital currency (and most alternative coins).

Working of Ripple

The Ripple platform does not use a PoW (proof-of-work) or a PoS (proof-of-stake) method
like BTC or Litecoin. Rather, activities on the platform depend on a smart contract to confirm
bank balances and activities. The agreement seeks to strengthen the platform's authenticity by
eliminating duplicate expenditure.

All but the initial activity will be destroyed if a Ripple customer starts a trade with several
portals but tries to transmit the similar $100 to the intermediate networks. Single dispersed
endpoints use agreement to determine which transaction occurred first. The approvals are
immediate and require around five seconds. The Ripple network is defined as randomized
since there is no central body that selects who may establish a network and access the data.

Ripple maintains a record of all IOUs in a specific cryptocurrency for every customer or
portal. The Ripple agreement record makes public IOU payments and activity streams across
Ripple accounts. Even though cash transfer record is openly documented and given access on
a network, the information is not connected to any single or corporate Identity or bank.
Unfortunately, because the blockchain is a public domain of all transactions, the data is
vulnerable to de-anonymization techniques.

Specific Factors

Ripple addresses several of the shortcomings of conventional banks. On the Ripple platform,
payments are processed in moments. In contrast, banks may take several days to execute a
money transfer. The payment price on Ripple is similarly low, with the lowest transaction
value for a typical transaction fixed at 0.00001 XRP, in comparison to the huge costs paid by
banks for performing merge transfers.

You might also like