Remaining of Unit-4 (BC-403)
Remaining of Unit-4 (BC-403)
Solidity divides data into many types, just like other programming languages. However,
Solidity is relatively distinctive in that it offers several simple kinds that can be merged to
necessary to specify the type of each variable. The compiler can verify the proper
application of the variables thanks to data types. The Zero-State default values for the
declared types include some default values, such as False is the default value for the
bool type. Solidity has Value types and Reference types, which are specified below.
Value-type variables store their data. These are the fundamental data types that Solidity
offers. These variables are always passed by value. Whenever the variables are utilized
1. Boolean: Only the values True or False are supported by this data type.
2. Integer: This data type holds integer values; signed and unsigned integers are
denoted by int and uint.
3. Fixed Point Numbers: The Solidity documentation states that these data types
are not yet fully supported. Fixed and unfixed fixed-point numbers of different
sizes can be signed or unsigned.
4. Bytes and Strings: A fixed-sized character set is stored in bytes, but a character
set larger than or equal to a byte is stored in a string. When we know the length
of the data, it is better to utilize a byte because it takes less gas. While the length
of a byte can vary from 1 to 32, that of a string is constant.
5. Enums: These are used to generate user-defined data types and to give names
to integral constants in contracts, making them easier to read, manage, and
make them less prone to mistakes. Unsigned integer numbers beginning at 0 can
represent the options of enums.
6. Address: The length of an Ethereum address is represented by a 20-byte
integer in addresses. An address can be used to receive or transfer a balance
using the balancing and transfer technique.
contract HelloWorld {
Ethereum
History of Ethereum
● 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.
● 2018: In 2018, Ethereum took second place in Bitcoin in terms of market
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%.
Features of Ethereum
Ethereum has two types of accounts: An externally owned account (EOA), and a
Contract account. These are explained as following below:
● Externally owned account (EOA): Externally owned accounts are controlled
by private keys. Each EOA has a public-private key pair. The users can send
messages by creating and signing transactions.
● Contract Account: Contract accounts are controlled by contract codes.
These codes are stored with the account. Each contract account has an ether
balance associated with it. The contract code of these accounts gets
activated every time a transaction from an EOA or a message from another
contract is received by it. When the contract code activates, it allows to
read/write the message to the local storage, send messages and create
contracts.
● Voting: Voting systems are adopting Ethereum. The results of polls are
available publicly, ensuring a transparent fair system thus eliminating voting
malpractices.
● Agreements: With Ethereum smart contracts, agreements and contracts can
be maintained and executed without any alteration. Ethereum can be used for
creating smart contracts and for digitally recording transactions based on
them.
● Banking systems: Due to the decentralized nature of the Ethereum
blockchain it becomes challenging for hackers to gain unauthorized access to
the network. It also makes payments on the Ethereum network secure, so
banks are using Ethereum as a channel for making payments.
● Shipping: Ethereum provides a tracking framework that helps with the
tracking of cargo and prevents goods from being misplaced.
● Crowdfunding: Applying Ethereum smart contracts to blockchain-based
crowdfunding platforms helps to increase trust and information symmetry. It
creates many possibilities for startups by raising funds to create their own
digital cryptocurrency.
● Domain names: Ethereum name service allows crypto users to buy and
manage their own domain names on Ethereum, thus simplifying decentralized
transactions without putting users to remember long, machine-readable
addresses.
Benefits of Ethereum
Drawbacks of Ethereum
● Complicated programming language: Learning solidity from programming
smart contracts on Ethereum can be challenging and one of the main
concerns is the scarcity of beginner-friendly classes.
● Volatile cryptocurrency: Ethereum investing can be risky as the price of
Ether is very volatile, resulting in significant gains as well as a significant loss.
● Low transaction rate: Bitcoin has an average transaction rate of 7TPS and
Ethereum has an average speed of 15 TPS which is almost double that of
bitcoin but it is still not enough.
Hyperledger
History of Hyperledger:
● Hyperledger was founded in 2016 by 30 business members.
● The Linux Foundations created Hyperledger, a platform where developers
and businesses can connect and collaborate to construct a blockchain
foundation.
● Hyperledger currently has over 200 members, including IBM, Intel, Cisco,
SAP, Baidu, and others.
● The Linux Foundations have also founded more than 70 open-source
organizations based on Hyperledger, which Intel developed.
Hyperledger Fabric
Hyperledger Architecture
1. Consensus Layer:
3. Communication Layer:
5. Crypto Abstraction:
6. Identity Service:
7. Policy Service:
● Policy Services is in charge of policy management for the system’s numerous
policies, including the endorsement policy, consensus policy, and group
management policy. It communicates with and is dependent on another
module to enforce the different policies.
● Fabric policies reflect the process through which members agree to approve
or reject changes to the network, a route, or a smart contract. Policies are
agreed upon by channel members when the channel is first set up, but they
can also be changed as the channel evolves.
● Policies are one of the features that distinguish Hyperledger Fabric from other
blockchains such as Ethereum or Bitcoin. Transactions in those systems can
be generated and confirmed by any node in the network.
8. API: It enables clients and applications to interface with blockchains. there are three
types of API used in hyperledger they are:
9. Interoperation:
● Allows separate blockchain instances to communicate with one another.
● Interoperability, supported by comprehensive data and transaction standards,
is required to capitalize on this powerful technology. The food industry, for
example, has made tremendous progress in leveraging data standards to
promote food safety and product visibility use cases.
● Interoperability and integration are currently top-of-mind challenges in the
blockchain sector.
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.
where the participants are known and trusted, which can limit its scalability for
large-scale public networks.
2. Performance: The performance of Hyperledger Fabric can be impacted by
The applications of blockchain in cloud computing are linked to the Cloud of Things
(CoT), a combination of cloud computing and the Internet of Things (IoT). So, before we
dive into blockchain cloud computing and blockchain-based cloud, let’s first discuss
what exactly the Cloud of Things is.
Many industries use IoT systems to collect data from surroundings and store and
analyze it to get valuable information for taking the right action. However, IoT devices
have limited storage capacity, so they use the cloud to store large sensor data, and this
is what forms CoT. There are different cloud service options available, such as public
clouds, private clouds, and hybrid clouds.
If you want to learn about IoT and cloud computing in detail, check out Ridge’s article on
IoT and the Cloud.
● With cloud computing, users have limited control over their data, processes, and
code once they upload them to the cloud servers.
● With cloud computing, users don’t know much about the internal operation
mechanisms, and they have to trust cloud providers for data processing, which
can lead to security and privacy concerns.
● CoT uses centralized communication models, which makes it difficult to scale the
service operation and expand the IoT networks to a larger deployment.
Centralized network infrastructure also increases communication latency and
increases power consumption for IoT devices due to large data transmissions.
3. Fault Tolerance: Cloud can help replicate blockchain data across a network of
computing servers that are interconnected with each other robustly by collaborative
clouds. This will minimize the single-failure risks because of the disruption of any cloud
node so they enable uninterrupted services.
Multichain Blockchain
Multi-chain applications are a solution for developers to access the widest possible net
of users, but they come with their own set of limitations.
Technical Burden
The effort to build, maintain, and update a multi-chain application is immense, especially
because new blockchains are constantly emerging. For each new blockchain,
developers must change their code to fit the blockchain’s specific technical
requirements, ensure the code is well-written and secure, and maintain each instance
separately.
This is why multi-chain applications often stay within a certain ecosystem, reducing the
technical complexity of launching a new application. Applications on Ethereum are far
more likely to expand to EVM-compatible chains, for example.
Isolated Liquidity
Geth Blockchain
Stellar Blockchain
Stellar is a blockchain network developed by Stellar Development Foundation. The
organization's currency, called the lumen, is traded under the symbol XLM on various
cryptocurrency exchanges.
Lumens are designed to be used on the Stellar network to pay transaction and account
initialization fees. The network was created to connect banks, payment systems, and
people to facilitate low-cost, cross-border, cross-asset financial transactions.
In 2018, Stellar signed a deal with TransferTo for cross-border payments to more than
70 nations. It also became the first distributed technology ledger to obtain a
Shariah-compliance certificate for payments and asset tokenization and was selected
as a partner by IBM (IBM) for a double-pegged stablecoin project.
Ripple Blockchain
Ripple is a blockchain-based digital payment network and protocol that uses its own
cryptocurrency, XRP. Ripple's main focus is as a payment settlement asset exchange
and remittance system, similar to the SWIFT system for international money and
security transfers used by banks and financial intermediaries dealing across currencies.
The token used for the cryptocurrency is premined and uses the ticker symbol XRP.
Ripple is the name of the company and the network, and XRP is the cryptocurrency
token. The purpose of XRP is to serve as an intermediate mechanism of exchange
between two currencies or networks—as a sort of temporary settlement layer
denomination. Ripple was first released in 2012 and was co-founded by Chris Larsen
and Jed McCaleb.
● Ripple is a blockchain-based digital payment network and protocol with its own
cryptocurrency, XRP.
● Rather than use blockchain mining, Ripple uses a consensus mechanism, via a
group of bank-owned servers to confirm transactions.
● Ripple transactions use less energy than Bitcoin, are confirmed in seconds, and
cost very little, whereas Bitcoin transactions use more energy, take longer to
confirm, and include higher transaction costs.
● Ripple (XRP) ranks among the most valuable blockchain-based tokens by market
capitalization.
● The Ripple payment system is intended to be used primarily by banks, but
individual investors can speculate on the price of XRP.
History of Ripple
● Chris Larsen and Jed McCaleb launched Ripple in 2012 with the intention of
developing a quicker, more affordable, and more dependable payment
mechanism for international trade. The company initially launched the Ripple
payment protocol, which was designed to provide a secure and efficient way
for banks and other financial institutions to transfer funds internationally.
● In 2013, the company introduced the XRP token, which was later used to
power the RippleNet network. Over the years, Ripple has expanded its
partnerships and collaborations with various financial institutions and payment
providers, with the aim of making it easier for its customers to send and
receive money across borders.
● Ripple has faced some controversy and regulatory hurdles along the way,
including concerns about the centralization of its network and the status of
XRP as a security. Despite these difficulties, the business has persisted in
expanding and growing, becoming one of the top blockchain-based services
for international payments.
● As of 2022, Ripple is one of the largest cryptocurrencies by market
capitalization and has a significant presence in the global financial industry,
with partnerships with major banks and financial institutions around the world.
Working of Ripple
Limitations of Ripple
R3 Corda Blockchain
R3 Corda is built on privacy, security, and interoperability principles. It allows for the
secure and efficient exchange of data and value between parties. The platform is also
modular, so it can be easily customized to meet the specific needs of each user.
Many major financial institutions have used R3 Corda to streamline their operations and
reduce costs. Some of the world's largest banks, such as HSBC, ING, and J.P. Morgan,
have all built applications on top of R3 Corda.
When a transaction occurs, it is only shared with the parties involved, ensuring that
sensitive data remains private and confidential. Once all parties involved in that
transaction have verified and agreed to it, it is then added to each user's ledger.
This approach has several advantages over other DLT platforms, such as Bitcoin's
blockchain:
Conclusion: R3 Corda is a DLT platform that was specifically designed for financial
services. It uses a "shared ledger" approach to DLT and "smart contracts" to automate
certain aspects of transactions. Several major financial institutions have already built
applications on top of R3 Corda.
Blockchain API
Blockchain APIs offer a number of benefits for developers. They can help to streamline
the process of developing applications and make it easier to integrate with other
systems. In addition, Blockchain APIs can provide access to data that is stored on the
blockchain, making it easier for developers to create applications that make use of this
crypto data.
Blockchain APIs can also help to reduce the costs associated with developing
applications. By making it easier to access data stored on the blockchain, developers
can avoid the need to build their own infrastructure to support their decentralized
application. This can lead to significant savings in both time and money.
In addition, Blockchain APIs can provide developers with a way to monetize their
applications. By charging for access to data or functionality provided by an API,
developers can generate revenue from their applications. This can help to offset the
costs of developing and maintaining a decentralized application.
Finally, Blockchain APIs can help to create a more open and accessible ecosystem for
applications. By making it easier for developers to access data and functionality
provided by other applications, Blockchain APIs can help to create an environment
where applications can interoperate with each other. This can lead to new and
innovative app development being created that would not be possible without the use of
APIs.
● BlockCypher API
The BlockCypher API is one of the most popular blockchain APIs available
today. It offers a simple interface that makes it easy to get started with blockchain
development. allowing the developer to interact with Bitcoin, Etherum, Litecoin,
and Dogecoin on a variety of platforms. The versatile development tools gives
you the ability to interact with a smart contract, get notified about an unconfirmed
transaction or create a multi signature transaction. Other features include:
● CoinBase API
The CoinBase API can be a great alternative option for blockchain development.
Coinbase Pro provides an API that makes it easy to carry out various tasks. This
includes sourcing real-time prices, storing digital currency safely, buying or selling
cryptocurrencies, and processing digital wallets. They also offer a premium
option with a much more advanced API for your blockchain solution. Some of the
features CoinBase API offers:
It has several aspects that make it a competitive provider in the market. This
includes data storage in blockchain, which is done in block form. The result of
this is JSON data, which deals with transactions. Blockchain’s offline-first
approach also means that they don’t need additional cryptocurrency storage
services. It has a vast developer community and low timeouts, as well as an
accessible JSON data format. You can also access the blockchain network
through e-wallet accounts.
● Block.io API
The Block.io API offers a simple interface that makes it easy to get started with
blockchain development. Block.io also provides support for multiple programming
languages, making it a good choice for developers who want to write code in
their language of choice. Don’t forget to test your application thoroughly and
always keep your private key confidential.
● BitPay API
The BitPay API an international digital asset, BitPay’s API allows you to perform
a wide range of tasks. BitPay provides a standards-based REST interface that
enables application developers to interact in powerful and secure ways with their
BitPay account. Using the BitPay API, clients can manage invoices, issue
refunds, view merchant records, and more.Developers may choose to call the
API over HTTPS using the language of their choice, or take advantage of our
code libraries. And, if their preferred language isn’t listed, they can still customize
the integration.
● GetBlock API
The GetBlock API is another popular choice for a blockchain developer to
explore. GetBlock provides a simple, easy way to use the power of blockchains.
Discover their high-speed running nodes and secured access to API for bitcoin
and Binance’s Smart Chain on blockchains, like Bitcoin, that allow you to run a
decentralized app efficiently. GetBlock offers API, smart contract, and explorer
data services. It also provides a blockchain development program which has
access to raw data. When you use our service, you are guaranteed speedy
access over blocks, transactions, and contracts that can be achieved by simply
using the base API data. GetBlock API has helpful technical guides and
documents and offers custom SLAs that are tailored solutions to suit your
business needs.
Blockchain Sandbox
A crypto regulatory sandbox is a live-like testing environment used to ensure regulatory
compliance and security checks for financial operations, including cryptocurrencies and
blockchain networks.
● A sandbox refers to an isolated—but fully functional—testing environment where
software, applications (apps), and programs can be tested.
● A crypto regulatory sandbox allows governments and companies to test whether
cryptocurrencies can be effectively adopted and how to implement regulations.
● In November 2020, the government of Spain signed a law creating a sandbox for
the cryptocurrency and fintech ecosystem.
● In February 2023, the European Commission launched a regulatory sandbox for
innovative use case for blockchain solutions.
● European Commission. "Launch of the European Blockchain Regulatory
Sandbox."
The European Blockchain Sandbox has been set up and is being operated to facilitate
the dialogue between regulators and innovators for private and public sector use cases.
Legal advice and regulatory guidance will be provided in a safe and confidential
environment. The dialogues will be held across industry sectors and geographic
regions, which will help to identify and communicate best practices in the interest of the
wider EU/EEA blockchain community. The sandbox is open to use cases based on any
blockchain infrastructure.
The European Blockchain Regulatory Sandbox for innovative use cases involving
Distributed Ledger Technologies (DLT) is an initiative of the European Commission. The
sandbox establishes a pan-European framework for regulatory dialogues to increase
legal certainty for innovative blockchain technology solutions.
Blockchain and other Distributed Ledger Technologies are innovative developments and
are deployed across industry sectors such as energy & utilities, education, healthcare,
mobility, finance & insurance, and logistics & supply chains.
The European Blockchain Sandbox has been set up and is being operated to facilitate
the dialogue between regulators and innovators for private and public sector use cases.
Legal advice and regulatory guidance will be provided in a safe and confidential
environment. The dialogues will be held across industry sectors and geographic
regions, which will help to identify and communicate best practices in the interest of the
wider EU/EEA blockchain community. The sandbox is open to use cases based on any
blockchain infrastructure.
The regulatory Sandbox aims to provide legal certainty through facilitating regulatory
dialogue and cooperation between innovators and regulators at the national and the EU
level. Blockchain companies participating in the Sandbox have the opportunity to
demonstrate their innovative solutions and highlight their needs regarding regulatory
guidance and legal certainty to regulators and supervisors in a safe and confidential
environment. They will receive legal advice from legal experts and be part of a
constructive dialogue with national and EU regulators. Also, they will be able to develop
their regulatory understanding and extend their network and reputation through their
participation in this pan-European project. No fee will be charged for the application and
participation in the Sandbox but there will not be reimbursement of costs.
Starting in 2023, the sandbox will annually accept cohorts of 20 blockchain use cases.
They will be matched with relevant national and EU regulators for a safe and
constructive dialogue on the most relevant regulatory issues. Use cases will be selected
on the basis of the maturity of the business case, legal/regulatory relevance and their
contribution to the EU’s wider policy priorities. Every year, the most innovative regulator
participating in the sandbox will be awarded a prize.