UNIT IV HYPERLEDGER FABRIC & ETHEREUM
Architecture of Hyperledger fabric v1.1- chain code- Ethereum:
Ethereum network, EVM, Transaction fee, Mist Browser, Ether, Gas,
Solidity.
Hyperledger
● Hyperledger is not a blockchain, but it is a project that was initiated by the Linux
Foundation in December 2015 to advance blockchain technology.
● This project is a collaborative effort by its members to build an open source
distributed ledger framework that can be used to develop and implement
cross-industry blockchain applications and systems.
● The principal focus is to develop and run platforms that support global business
transactions. The project also focuses on improving the reliability and performance
of blockchain systems.
● Projects under Hyperledger undergo various stages of development, starting from
proposal to incubation and graduating to an active state.
● Projects can also be deprecated or in end-of-life state where they are no longer
actively developed. For a project to be able to move into the incubation stage, it must
have a fully working code base along with an active community of developers.
Hyperledger as a protocol
● Hyperledger is aiming to build new blockchain platforms that are driven by industry
use cases. As there have been many contributions made to the Hyperledger project
by the community, Hyperledger blockchain platform is evolving into a protocol for
business transactions.
● Hyperledger is also evolving into a specification that can be used as a reference to
build blockchain platforms as compared to earlier blockchain solutions that address
only a specific type of industry or requirement.
● To understand various projects that are under development in the Hyperledger
project, it is essential to understand the foundations of Hyperledger first.
● Fabric is also the name given to the code contribution made by IBM to the
Hyperledger foundation and is formally called Hyperledger Fabric.
Hyperledger Fabric The fabric is the contribution made initially by IBM and Digital
Assets to the Hyperledger project. This contribution aims to enable a modular, open, and
flexible approach towards building blockchain networks.
● Various functions in the fabric are pluggable, and it also allows the use of any
language to develop smart contracts. This functionality is possible because it is
based on container technology (Docker), which can host any language.
● Chaincode is sandboxed in a secure container, which includes a secure operating
system, chaincode language, runtime environment, and SDKs for Go, Java, and
[Link]. Other languages can be supported too in future, if required, but needs some
development work.
● Smart contracts are called chaincode in the fabric. This ability is a compelling
feature compared to domain-specific languages in Ethereum, or the limited scripted
language in Bitcoin.
● It is a permissioned network that aims to address issues such as scalability, privacy,
and confidentiality.
● The fundamental idea behind this is modularization, which would allow for
flexibility in design and implementation of the business blockchain. This can then
result in achieving scalability, privacy, and other desired attributes and fine tune
them according to the requirements.
● Transactions in the fabric are private, confidential, and anonymous for general users,
but they can still be traced and linked to the users by authorized auditors. As a
permissioned network, all participants are required to be registered with the
membership services to access the blockchain network. This ledger also provided
auditability functionality to meet the regulatory and compliance needs required by
the user.
Membership services
These services are used to provide access control capability for the users of the fabric
network. The following list shows the functions that membership services perform:
● User identity verification
● User registration
● Assign appropriate permissions to the users depending on their roles
Membership services make use of a certificate authority in order to support identity
management and authorization operations. This CA can be internal (Fabric CA), which is a
default interface in Hyperledger Fabric or an organization can opt to use an external
certificate authority. Fabric CA issues enrollment certificates (E-Certs), which are
produced by enrollment certificate authority (E-CA). Once peers are issued with an
identity, they are allowed to join the blockchain network. There are also temporary
certificates issued called T- Certs, which are used for one-time transactions.
All peers and applications are identified using certificate authority. Authentication service
is provided by the certificate authority. MSPs can also interface with existing identity
services like LDAP.
Blockchain services
Blockchain services are at the core of the Hyperledger Fabric. Components within this
category are as follows.
Consensus services
● A consensus service is responsible for providing the interface to the consensus
mechanism. This serves as a module that is pluggable and receives the transaction
from other Hyperledger entities and executes them under criteria according to the
type of mechanism chosen.
● Consensus in Hyperledger V1 is implemented as a peer called orderer, which is
responsible for ordering the transactions in sequence into a block. Orderer does not
hold smart contracts or ledgers. Consensus is pluggable and currently, there are two
types of ordering services available in Hyperledger Fabric:
● SOLO: This is a basic ordering service intended to be used for development and
testing purposes.
Kafka: This is an implementation of Apache Kafka, which provides ordering service.
It should be noted that currently Kafka only provides crash fault tolerance but does
not provide byzantine fault tolerance. This is acceptable in a permissioned network
where chances of malicious actors are almost none.
● In addition to these mechanisms, the Simple Byzantine Fault Tolerance (SBFT)
based mechanism is also under development, which will become available in the
later releases of Hyperledger Fabric.
Chain Code
● chain code in blockchain like a digital version of a paper trail. Imagine you have
a notebook where you write down every transaction you make with someone.
● Each new transaction is recorded on a new page, and the pages are stapled
together in order.
● Chaincodes define the data schema in the ledger, initialize it, perform updates
when triggered by applications, and respond to queries.
● A chaincode typically handles business logic agreed to by members of the
network, so it may be considered as a “smart contract”.
● State created by a chaincode is scoped exclusively to that chaincode and can’t
be accessed directly by another chaincode. However, within the same network,
given the appropriate permission a chaincode may invoke another chaincode to
access its state.
● Chaincode is a program, written in Go, [Link], or Java that implements a
prescribed interface.
● Chaincode runs in a secured Docker container isolated from the endorsing peer
process.
● Chaincode initializes and manages ledger state through transactions submitted
by applications.
● This project aims to build a blockchain explorer for Hyperledger Fabric that can
be used to view and query the transactions, blocks, and associated data from the
blockchain. It also provides network information and the ability to interact with
chain code.
● In Hyperledger Fabric same concept of smart contracts are implemented but they
are called chain code instead of smart contracts. They contain a parameters to
execute transactions and update the ledger. Chaincode is usually written in
Golang and Java.
Ethereum
● Ethereum is like a supercharged version of a regular blockchain. In a regular
blockchain, like Bitcoin, the main focus is on recording transactions, typically
involving a digital currency. But Ethereum goes beyond that
● Imagine if Bitcoin is like a simple calculator, Ethereum is like a powerful
computer. It's a decentralized platform that allows developers to build and deploy
smart contracts and decentralized applications (dApps).
Here's the breakdown:
1. Smart Contracts: These are like self-executing contracts with the terms of the
agreement directly written into code. Once deployed on the Ethereum
blockchain, they automatically execute when certain conditions are met. For
example, you could have a smart contract that automatically releases payment to
a supplier once a shipment is delivered.
2. Decentralized Applications (dApps): These are applications that run on a
decentralized network of computers (nodes), rather than a single centralized
server. They often use smart contracts for their functionality. Examples include
decentralized finance (DeFi) platforms, decentralized exchanges (DEXs), and
blockchain-based games.
3. Ether (ETH): Just like Bitcoin has its currency called bitcoin (BTC), Ethereum
has its currency called ether (ETH). Ether is used to pay for transaction fees and
computational services on the Ethereum network. It's also used as a form of
digital currency and as a means of participating in various Ethereum-based
applications.
4. Ethereum Virtual Machine (EVM): This is the runtime environment for executing
smart contracts in Ethereum. It's like a virtual computer that runs on the
Ethereum network, executing code exactly as programmed without any
possibility of downtime, censorship, fraud, or third-party interference.
Overall, Ethereum opens up a whole new world of possibilities beyond simple
transactions, enabling developers to create a wide range of decentralized
applications and programmable digital assets. It's like the operating system of a
decentralized internet where anyone can build and innovate without relying on
traditional intermediaries.
Ethereum Network:
● The Ethereum network is a peer-to-peer network where nodes participate in order to
maintain the blockchain and contribute to the consensus mechanism. Networks can be
divided into three types, based on requirements and usage. These types are described
in the following subsections.
Mainnet:
○ This is the primary Ethereum blockchain where real transactions take place using
ether (ETH) and where most of the activity and development occur. It's like the
main city where everyone lives and does business.
○ The Ethereum Mainnet is the primary and most widely used blockchain network
within the Ethereum ecosystem. It serves as the foundation for decentralized
applications (dApps), smart contracts, and transactions involving the native
cryptocurrency, ether (ETH).
○ One key aspect of the Mainnet is its decentralized nature. Instead of being
controlled by a single entity or authority, it operates on a network of thousands of
interconnected computers (nodes) around the world. This decentralization
ensures transparency, security, and censorship resistance.
○ On the Ethereum Mainnet, users can send and receive ether (ETH) as well as
interact with smart contracts. These transactions are recorded on the blockchain,
a distributed ledger that is immutable and transparent. Each transaction requires
a small fee, known as gas, which incentivizes miners to validate and add
transactions to the blockchain.
○ The Ethereum Mainnet enables the deployment and execution of smart
contracts, which are self-executing contracts with the terms of the agreement
directly written into code. Developers can create decentralized applications
(dApps) using smart contracts to automate processes, manage digital assets,
and facilitate various types of transactions.
○ The Ethereum Mainnet is designed to be upgradeable through a process known
as Ethereum Improvement Proposals (EIPs). These proposals allow for
enhancements, optimizations, and new features to be introduced to the network
through community consensus. Major upgrades, such as Ethereum 2.0, aim to
improve scalability, security, and sustainability.
○ Despite its popularity and success, the Ethereum Mainnet faces challenges
related to scalability, particularly during periods of high network congestion.
Solutions such as layer 2 scaling solutions and Ethereum 2.0 are being
developed to address these challenges and improve the network's capacity and
performance.
TestNet:
● The bitcoin node can be started in the testnet mode if you want to test the Bitcoin v
network and run an experiment. This is a faster network as compared to the live network
and has relaxed rules for mining and transactions.
● Various faucet services are available for the bitcoin test network. One example is Bitcoin
TestNet sandbox,where users can request bitcoins to be paid to their testnet bitcoin
address.
● This is very useful for experimentation with transactions on testnet.
The command line to start up testnet is as follows:
bitcoind --testnet -daemon
bitcoin-cli --testnet <command>
bitcoin-qt --testnet
● Testnet is also called Ropsten and is the widely used test network for the
Ethereum blockchain.
● This test blockchain is used to test smart contracts and DApps before being
deployed to the production live blockchain.
● Moreover, being a test network, it allows experimentation and research.
● The main testnet is called Ropsten
● which contains all features of other smaller and special purpose testnets that
were created for specific releases.
● If testnet is used, then syncing completes relatively faster as the size of testnet
(Ropsten) is not as big as mainnet.
● The first task is to set up a development environment. This section introduces the
Ethereum setup for testnet and private net.
● Testnet is called Ropsten and is used by developers or users as a test platform
to test smart contracts and other blockchain-related proposals.
● The private net option in Ethereum allows the creation of an independent private
network that can be used as a shared distributed ledger between participating
entities and for the development and testing of smart contracts.
● There are multiple ways to develop smart contracts on Ethereum. A usual and
sensible approach is to develop and test Ethereum smart contracts either in a
local private net or a simulated environment, and then it can be deployed on a
public testnet.
● After all the relevant tests are successful on the public testnet, the contracts can
then be deployed to the public mainnet.
● At times, it is not possible to test on the testnet and mainnet is obviously not a
place to test the contracts.
● Private net can be time-consuming to set up at times. EthereumJS' TestRPC
comes in handy when quick testing is required and no proper testnet is available.
● It also makes it easier to deploy the contracts to any private net,public, or testnet
Ethereum blockchain.
● Also, asset pipeline is provided, which makes it easier for all JavaScript files to
be processed, making them ready for use by a browser.
● For this example, browser solidity, Truffle, and TestNet (already running Network
ID 786, created earlier) will be used.
Private/Permissioned Networks:
● As the name implies, private blockchains are just that—private. 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.
● These are Ethereum networks that are not open to the public. They're often used
by organizations, companies, or groups who want to utilize blockchain
technology for their specific needs but want more control over who can
participate.
● In these networks, participants need permission to join, and transactions may not
be visible to the public.
● If consensus is maintained internally by a consortium, then a private blockchain
should be used; otherwise, if consensus is required publicly among multiple
entities, then a public blockchain solution should be considered.
● Another type of Oracle, which essentially emerged due to the decentralization
requirements, is called decentralized Oracles.
● These types of Oracles can be built based on some distributed mechanism.
● It can also be envisaged that the Oracles can find themselves source data from
another blockchain, which is driven by distributed consensus, thus ensuring the
authenticity of data.
● For example, one institution running their private blockchain can publish their
data feed via an Oracle that can then be consumed by other blockchains.
● Key rotation is used as a standard mechanism to ensure the security of the
private blockchain.
● Private blockchains have the more desirable property of maintaining high
performance as the number of nodes increase, but the aforementioned proposals
lack this feature.
Semi Private blockchains:
● With semi private blockchains, part of the blockchain is private and part of
it is public. Note that this is still just a
● concept today, and no real world POCs have yet been developed. With a
semi-private blockchain, the private
● part is controlled by a group of individuals, while the public part is open for
participation by anyone.
● This hybrid model can be used in scenarios where the private part of the
blockchain remains internal and shared among known participants, while
the public part of the blockchain can still be used by anyone, optionally
allowing mining to secure the blockchain.
● This way, the blockchain as a whole can be secured using PoW,
thus providing consistency and validity for both the private and
public parts.
● This type of blockchain can also be called a semi-decentralized
model, where it is controlled by a single entity but still allows for
multiple users to join the network by following appropriate
procedures.
● With a semi-private blockchain, the private part is controlled by a
group of individuals, while the public part is open for participation by
anyone.
● A semi-private blockchain is usually run by a single organization or
a group of individuals who grant access to any user, who can either
be a direct consumer or for internal organizational purposes. This
type of blockchain has a public part exposed to the general
audience, which is open for participation by anyone.
● It is a distributed ledger that operates as a closed database
secured with cryptographic concepts and the organization's needs.
Only those with permission can run a full node, make transactions,
or validate/authenticate the blockchain changes.
● Consensus network is like a semi private blockchain architecture
which is owned and controlled by a preselected group of members.
These groups of members decide on future memberships, rules,
etc. The right to read the blockchain may be public, or restricted to
the participants.
● In contrast to public chain applications where anyone can
participate, and private chain applications (consortium or not)
where participants are tightly managed, semi-private chain-based
applications are run by a single company who grants access to any
user who qualifies, and they typically target business-to-business
users.
● Semi-private blockchain applications will be similar to private Web
applications in terms of how they are managed.
● As long as users qualify according to pre-established criteria,
credentials or profile, they are given access.
● There should not be significant discrimination for access. And in
some cases, access might be completely open.
● For example, when we check the tracking status of a package on a
carrier website (FedEx, UPS or other), we don’t need to identify
ourselves, but we just enter the tracking number.
● In the near future, companies will provide “trust-related services”
that consumers can use to check a particular status or update.
Fully private and proprietary blockchains:
● There is no mainstream application of these types of blockchains, as they
deviate from the core concept of decentralization in blockchain technology.
● Nonetheless, in specific private settings within an organization, there could be a
need to share data and provide some level of guarantee of the authenticity of the
data.
● An example of this type of blockchain might be to allow for collaboration and the
sharing data between various government departments.
● In that case, no complex consensus mechanism is required, apart from simple
state machine replication and an agreement protocol with known central
validators.
● Even in private blockchains,tokens are not really required, but they can be used
as means of transferring value or representing some real-world asset.
● With the shared ledger of Blockchain at their core, they communicate on-chain
and off-chain between multiple participants to orchestrate end-to-end business
transactions, and capture some data as immutable proofs.
● A full stack blockchain developer is someone who can develop and maintain a
blockchain application from start to finish. They possess a deep understanding of
how blockchain technology works and how they can build applications that are
secure, scalable, and user-friendly.
Fully private and proprietary Ethereum networks are those that are created and
operated by specific organizations or entities for their internal use. Here's what each
term means:
1. Fully Private: These networks are accessible only to a select group of
participants, often restricted to employees, partners, or approved individuals
within a particular organization. Unlike the public Ethereum mainnet, where
anyone can participate and view transactions, fully private networks have
restricted access, ensuring that only authorized parties can interact with the
network.
2. Proprietary: A proprietary Ethereum network is built and owned by a single
entity or organization. They have full control over the network's rules,
governance, and operations. Unlike public blockchains like the Ethereum
mainnet, which operate on open-source principles and are maintained by a
decentralized community, proprietary networks are centralized and managed by a
single entity according to their specific needs and requirements.
● Fully private and proprietary Ethereum networks are often used by enterprises
and businesses that require privacy, security, and control over their blockchain
infrastructure. These networks can be customized to meet the specific needs of
the organization, such as implementing permissioned access, tailored consensus
mechanisms, and confidential transactions. They provide a secure and controlled
environment for conducting business processes and implementing blockchain
solutions without relying on public networks.
Tokenless blockchains:
● These blockchains are designed in such a way that they do not have the basic
unit for the transfer of value.
● However, they are still valuable in situations where there is no need to transfer
value between nodes and only the sharing of data among various trusted parties
is required.
● This is similar to full private blockchains, the only difference being that use of
tokens is not required.
● This can also be thought of as a shared distributed ledger used for storing data. It
does have its benefits when it comes to immutability, security, and consensus
driven updates but are not used for common blockchain application of value
transfer or cryptocurrency.
● This ends our examination of the various types of blockchain, we'll now move in
the next section to discuss the concept of census.
● These blockchains are designed in such a way that they do not have the basic
unit for the transfer of value.
● However, they are still valuable in situations where there is no need to transfer
value between nodes and only the sharing of data among various trusted parties
is required.
● This is similar to full private blockchains, the only difference being that use of
tokens is not required.
● This can also be thought of as a shared distributed ledger used for storing data. It
does have its benefits when it comes to immutability, security, and consensus
driven updates but are not used for common blockchain application of value
transfer or cryptocurrency.
● These blockchains are designed in such a way that they do not have the basic
unit for the transfer of value.
● However, they are still valuable in situations where there is no need to transfer
value between nodes and only the sharing of data among various trusted parties
is required.
● This is similar to full private blockchains, the only difference being that use of
tokens is not required.
● This can also be thought of as a shared distributed ledger used for storing data.
● It does have its benefits when it comes to immutability, security, and consensus
driven updates but are not used for common blockchain application of value
transfer or cryptocurrency.
● only private blockchains can avoid using digital assets. Here's how it works.
Public blockchains can be accessed by everyone, but to be able to interact with
the blockchain you need some sort of token that allows you to complete your
transactions.
● This means a blockchain or distributed ledger which lacks an intrinsic token (e.g.
Ripple without the XRP), however asset-backed tokens are likely to still be used.
'Tokenless' refers to lack of intrinsic token, and not the lack of asset-backed
token.
Ethereum Virtual Machine:
● The Ethereum Virtual Machine (EVM) is like a giant computer that exists on the
Ethereum network.
● It's responsible for executing smart contracts, which are self-executing programs
stored on the blockchain.
● The EVM runs on every node in the Ethereum network, ensuring that smart
contracts behave consistently and securely across the entire system.
● It's a crucial component of Ethereum's decentralized platform, enabling the
creation and execution of a wide range of decentralized applications (DApps) and
programmable digital assets.
● In simple terms, the Ethereum Virtual Machine is like the engine that powers
Ethereum's smart contracts. It's a virtual computer that exists on the Ethereum
network, executing code and ensuring that everything runs smoothly and
securely.
● Ethereum Virtual Machine (EVM) is a software that sets the rules of computing
the state of the Ethereum network from block to block. The EVM is a core part of
Ethereum as it executes smart contracts, processes transactions, and updates
account balances.
● Solidity. Solidity is the most popular blockchain programming language of the
Ethereum Virtual Machine (EVM), also widely used across a range of
EVM-compatible blockchains.
● The Ethereum Virtual Machine (EVM) is purpose-built for these smart contracts,
typically scripted in high-level programming languages such as Solidity.
Developers transform their code into bytecode, a low-level language
comprehensible to the EVM.
● Electronic Voting Machine (also known as EVM) is voting using electronic means
to either aid or take care of the chores of casting and counting votes
● EVM helps you make better-informed decisions and achieve successful
outcomes by giving you real-time insights into project progress and budgeted
cost. Using EVM, you can identify potential overruns or delays at an earlier
stage, so you can take action and avoid costly mistakes
● An EVM chain, short for Ethereum Virtual Machine, is a family of blockchains that
are compatible with the EVM.
● Most of us are familiar with Ethereum and its versatility, but as the popularity of
smart contracts and decentralized applications rises, the EVM chain is becoming
the standard for web3 chains.
● EVM compatibility enables developers to quickly create decentralized
applications as the same technologies can be used on all EVM compatible
blockchains.
● The user experience is also simplified, as wallets generally behave the same way
on all EVM compatible chains.
● The use cases of EVM compatibility are growing as tech leaders continue to
innovate and this article will go over some of the benefits of using this technology
whether you’re a company or a really enthusiastic individual.
● One of the key advantages of the EVM is it allows users to create and execute
smart contracts. These are software used to make secure transactions, mint
non-fungible tokens (NFT), work on decentralized applications and much more.
● The Ethereum Virtual Machine functions in similar ways, such as acting as a
runtime environment to the Ethereum network.
● Like any virtual machine, the EVM is a computer – some call it the world
computer and it stores immutable data on Ethereum and executes the codes in
smart contracts.
● Those smart contracts could be tokens, NFTs, governance dApps, gaming
dApps, etc.
● As mentioned, an EVM compatible blockchain implements what we call the
Ethereum Virtual Machine.
● If you’ve used a virtual machine before, you know that it’s essentially a computer
that’s running on top of another computer.
● The EVM is a computer running on top of a blockchain.
Binance Smart Chain (BSC)
This EVM blockchain is built by Binance, the largest crypto exchange via its Binance
Smart Chain. It’s very popular among DeFi projects and decentralized exchanges for its
fast and low-cost transactions.
Polygon (MATIC)
Polygon is popularly known as the Layer2 solution for Ethereum. This EVM chain is built
on top of the Ethereum network to increase scalability and allow transactions and
workloads from the main net to flow more smoothly and efficiently.
Tron
Tron EVM chain is an advocate of a decentralized internet and is building a highly
scalable infrastructure that can accommodate a growing user base. Some may also
know TRON through the dApp
Avalanche
Avalanche is a multi-chain network that offers fairly high throughput and low latency,
allowing for fast and low-cost transactions. It has a consensus mechanism called
Avalanche-X that can further enhance the user experience.
● The EVM operates on a unique set of instructions which allow for the creation
and execution of smart contracts.
● The EVM is also responsible for managing the state of the Ethereum blockchain,
including the storage of data, the processing of transactions, and the calculation
of gas fees.
● The EVM is designed to be a Turing-complete virtual machine, which means it is
capable of executing any algorithm or program.
● A powerful feature of the EVM is its ability to execute code ‘deterministically,’
which means that any given smart contract will always produce the same output
for the same input, regardless of where it is executed or who is executing it.
● This determinism is essential for the consensus mechanism of the Ethereum
network, which requires all nodes to agree on the state of the network.
● Deterministic execution also ensures that smart contracts are executed exactly
as written without interference from external sources.
● The EVM is also designed to be isolated from the rest of the computer's
operating system, ensuring security and protecting the network from attacks.
● Smart contracts are executed within the EVM environment, which provides a
secure sandbox for the code to run in.
● This isolation means that the EVM can only interact with the Ethereum network,
preventing malicious actors from accessing the underlying system or
compromising the security of the network.
● EVM compatibility refers to the ability for a blockchain to run the EVM and
execute Ethereum smart contracts.
● This means that developers can write & deploy the same smart contracts across
multiple EVM blockchains, without needing to make significant changes to their
code.
● These smart contracts can then interact with other EVM-compatible blockchains
through the EVM, allowing anyone to create multi-chain dApps.
Which blockchains are EVM compatible?
There are many EVM-compatible blockchains that developers can deploy smart
contracts on today, each with its own unique features. Some of the most popular
examples, in order of TVL (total value locked), include:
1. Ethereum
2. BSC
3. Arbitrum
4. Polygon
5. Avalanche
6. Optimism
7. Fantom
8. Cronos
9. Klayton
10. Canto
Benefits of EVM compatible blockchains:
The EVM comes with a number of benefits for developers writing smart contracts &
building dApps on EVM-compatible blockchains:
● Portability & interoperability: Smart contracts and dApps developed for one
EMV-compatible chain (like Ethereum) can be easily migrated to other
EVM-compatible chains (like Polygon) with minimal code modifications.
● Lower costs: The EVM provides a standardized environment to write smart
contracts and develop dApps — allowing developers to write code once and
deploy it on any EVM-compatible chain, without having to create separate
codebases for each chain. Because everything can be written in Solidity — one
of the most widely-used programming languages for Ethereum — the learning
curve is also much lower across EVM-compatible blockchains.
● Broader user base & developer ecosystem: dApps built on
EVM-compatible blockchains are also built on top of the Ethereum network by
nature — meaning that they have access to its much broader user base of
100M+ unique wallets, making mass adoption easier for web3 applications built
on EVM-compatible networks.
● In conclusion, EVM-compatible blockchains are extremely beneficial in that they
can optimize for scalability and efficiency — while also being built on top of the
Ethereum network and leveraging everything it has to offer.
● Because the EVM provides a standardized environment for dApps, any
application built on an EVM-compatible blockchain is portable and interoperable
with other EVM networks — enabling access to the broader Ethereum ecosystem
for all dApps built on those blockchains.
● We hope this blog post has helped you better understand what EVM (Ethereum
Virtual Machine) is, why EVM compatibility unlocks powerful functionality for
blockchains, and which EVM-compatible networks you can build on top of.
Transaction Fee:
● A transaction fee, often referred to as a "gas fee" in the context of Ethereum,
is a small amount of cryptocurrency paid by the sender to the network for
processing and validating their transaction.
● A Blockchain transaction fee is an amount that a user has to pay to the miners to
have their transaction validated on the Blockchain.
● Any request made to the Blockchain network that doesn’t result in a mining
reward will also be charged a transaction fee.
● These fees are usually denominated in the token that serves as the Blockchain
network’s native currency.
● However, for transparency purposes, many Blockchain networks let you set the
fees you want to pay for your transaction.
● A Blockchain transaction fee is a small amount that is charged to the users who
send transactions to the Blockchain network.
● These fees help in the mining process and reward the miners for providing their
computing power for the operations.
How do transaction fees in Blockchain work?
● When a user sends transactions to the Blockchain network, it is broadcasted to
all the nodes in the Blockchain network for validation.
● If the majority of the nodes accept the transaction, it will be added to the
Blockchain ledger as a new block.
● Since the miners receive the transaction fees (mined tokens) as an incentive in
their wallet, they verify the transaction as quickly as possible.
● In simple terms, the transaction fee is a nominal amount that the user has to pay
to the miners to have their transaction verified and added to the Blockchain
ledger.
● Each Blockchain network has a maximum limit on the transaction fee users can
set for their transactions.
● The transaction fee can be set at a nominal amount, or it can be set at zero.
● If you set your transaction fee to zero, it means that you are willing to wait longer
for the validation of your transaction by the miners because they won’t receive
any incentives for verifying your transaction.
Why do transaction fees in Blockchain exist?
● The transaction fees are charged to the users who want to send their
transactions to the Blockchain network.
● These fees exist for various reasons, but the main reason is to reward the miners
for validating the transactions.
● When users send a transaction to the Blockchain network, it is verified by the
miners, who use their computing power to unlock new blocks in the Blockchain
network.
● The miners also verify the transactions in the Blockchain and add them to the
ledger.
● In this process, the miners receive the transaction fees in the form of the native
cryptocurrencies of the Blockchain network.
● If there are no transaction fees, the miners will lose their incentive to validate the
transactions because they won’t get anything in return.
● Transaction fees also help in avoiding spam transactions sent to the Blockchain
network.
● If someone wants to spam the Blockchain network, they will send a huge number
of transactions to the network to disrupt the operations.
● However, if there are transaction fees, the spammer will have to pay a nominal
amount to verify their transactions.
● This will reduce the number of spam transactions sent to the Blockchain network
and help reduce the number of spam attacks.
Example of transaction fees in Blockchain:
● Let’s assume that you are sending 1 Ether from your wallet to another person. In
the case of Bitcoin, the transaction fee will be about 10-15 Satoshis or 0.0001
BTC per 1 transaction.
● In order to get your 1 Ether sent, you will have to pay about 0.001-0.002 ETH in
transaction fees. If you want to send 100 Ether in one go, then it will cost you
0.1-0.2 ETH in transaction fees.
● If you want to send 1,000 Ether, you will have to pay 1-2 Ether in transaction
fees.
● Each Blockchain network has a different transaction fee structure, and it is
important to understand the transaction fee structure of your preferred
Blockchain network.
How are transaction fees calculated?
● The transaction fees charged by the Blockchain networks are in the form of
cryptocurrencies.
● To calculate the transaction fees, you will have to find out the mining difficulty of
the Blockchain network and the mining reward for the last block.
● The mining difficulty is related to the number of miners who are mining on the
Blockchain network.
● The mining difficulty of the Blockchain network is usually high, and it decreases
when the mining difficulty of the Blockchain network is low.
● The mining reward is related to the number of rewards the miners will receive for
unlocking the next block in the Blockchain network.
● The transaction fee is calculated based on the mining difficulty and mining
reward.
● For example, let’s say that the mining difficulty of a Blockchain network is 10, and
the mining reward per block is 1.
● The transaction fee will be 10% of the mining reward per block, which will be 1.
● The transaction fee can be calculated differently depending on the Blockchain
network.
Types of transaction fees
There are three types of Transaction fees in the Blockchain network. They include;
exchange fees, network fees, and wallet fees.
Exchange fees:
● Exchanges are websites and apps where users can buy and sell
cryptocurrencies.
● These exchanges are centralized systems that are controlled by a single entity.
● Although these exchanges are a convenient way to trade and sell digital tokens,
you will have to pay a small transaction fee to the exchange.
● This transaction fee is charged per transaction basis and can vary depending on
the volume of transactions and the size of funds being exchanged.
● The transaction fee can be paid through the exchange’s native token or other
popular cryptocurrencies like Bitcoin and Ether.
Network fees:
● Network fees are the transaction fees charged by the underlying Blockchain
network.
● These fees are charged for adding a new transaction to the Blockchain network.
However, the network fee amount is not fixed and is autonomously determined
by the Blockchain network.
● Sometimes, Blockchain networks might impose a “gas limit” for a specific
transaction.
● This means that the transaction will only be confirmed if the sender pays the
appropriate network fee.
● These network fees can be very high during periods of high network usage and
can significantly impact the transaction time.
Wallet fees:
● Wallet fees are the transaction fees charged by the wallet service provider.
● Some well-known wallet providers are Coinbase, Binance, Bittrex, etc.
● A wallet is an online service where you can store your cryptocurrencies. These
wallets charge a nominal fee on a per-transaction basis.
Conclusion:
● Transaction fees have always been an essential part of the financial and
investment services sectors, and Blockchain is no exception.
● This is because miners use the funds collected from these fees on the
Blockchain network to help incentivize them for their services.
Mist Browser:
● The Mist browser was an Ethereum interface intended to allow users to access
the various dApps available on the Ethereum network.
● It was also known as the Ethereum dApp Browser. 1 Ethereum is a popular
blockchain optimized for smart contracts and other decentralized applications.
● Mist is a fully synchronized wallet, which means that you have to download the
entire Ethereum blockchain, which exceeds 1 TB.
● Mist is an Electron framework-based application that is used for the management
of Ethereum wallet and Ethereum applications.
● The Mist browser is a user-friendly interface for end users with a feature-rich
graphical user interface that is used to browse Decentralized Applications
(DApps) and for account management and contract management.
● When Mist is launched for the first time, it will initialize Geth in the background
and will sync with the network.
● It can take from a few hours to a few days depending on the speed and type of
the network to fully synchronize with the network.
● If testnet is used, then syncing completes relatively faster as the size of testnet
(Ropsten) is not as big as mainnet.
● Mist browser is not a wallet; in fact, it is a browser of DApps and provides a
user-friendly user interface for the creation and management of contracts,
accounts, and browsing decentralized applications.
● Ethereum wallet is a DApp that is released with Mist.
● A wallet is a generic program that can store private keys and based on the
addresses stored within it, it can compute the existing balance of Ether
associated with the addresses by querying the blockchain.
● It can also be used to deploy smart contracts.
1. Understanding the Basics of Mist Browser
● Mist Browser is a user-friendly wallet that allows you to store, send, and receive
Ethereum and Ethereum-based tokens.
● It's available for Windows, Mac, and Linux operating systems. One of the
advantages of Mist Browser is its ease of use.
● You don't need to be a technical expert to use the wallet and it comes with a
user-friendly interface that makes it easy to navigate.
2. How to Set Up Mist Browser
● Setting up Mist Browser is a straightforward process.
● The first step is to download the wallet from the official Ethereum website.
● Once you've downloaded and installed the wallet, you'll need to create a new
account.
● This involves setting a password that will be used to encrypt your private key.
● You'll also need to generate a backup phrase that you can use to recover your
account if you ever lose your password.
3. How to Send and Receive Ether Using Mist Browser
● Sending and receiving Ether using Mist Browser is a simple process.
● To send Ether, you'll need to click on the "Send" button and enter the recipient's
address and the amount of Ether you want to send.
● To receive Ether, you'll need to give the sender your public address.
● This is a long string of letters and numbers that identifies your account.
4. How to Use Mist Browser to Browse Decentralized Applications
● Mist Browser is also a full-fledged browser that allows you to browse
decentralized applications (decentralized apps) built on the Ethereum blockchain.
● To access a decentralized app, you'll need to know its URL. Once you've entered
the URL, you'll be taken to the dapp's interface where you can interact with it just
like you would any other website.
Mist Browser is a versatile tool that can be used for a range of cryptocurrency-related
tasks. Whether you're looking to store, send, or receive Ether, or you want to browse
decentralized applications, Mist Browser has you covered. With its user-friendly
interface and ease of use, it's a great option for beginners and experienced users alike.
Ether:
● Ether (ETH) is the native cryptocurrency of the Ethereum blockchain, and it plays
a fundamental role in the Ethereum ecosystem
● Ethereum is a decentralized global software platform powered by blockchain
technology.
● It is most commonly known for its native cryptocurrency, ether (ETH).
● Anyone can use Ethereum—designed to be scalable, programmable, secure,
and decentralized—to create any secured digital technology.
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%.
Type of Ethereum Accounts:
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 can read/write the message to the local
storage, send messages and create contracts.
How Does Ethereum Work?
● Ethereum implements an execution environment called Ethereum Virtual
Machine (EVM).
● When a transaction triggers a smart contract all the nodes of the network will
execute every instruction.
● All the nodes will run The EVM as part of the block verification, where the nodes
will go through the transactions listed in the block and run the code as triggered
by the transaction in the EVM.
● All the nodes on the network must perform the same calculations for keeping
their ledgers in sync.
● Every transaction must include:
○ Gas limit.
○ Transaction Fee that the sender is willing to pay for the transaction.
● If the total amount of gas needed to process the transaction is less than or equal
to the gas limit then the transaction will be processed and if the total amount of
the gas needed is more than the gas limit then the transaction will not be
processed the fees are still lost.
● Thus it is safe to send transactions with the gas limit above the estimate to
increase the chances of getting it processed.
Benefits of building on Ethereum:
● Ethereum offers an extremely flexible platform on which to build
decentralized applications using the native Solidity scripting language and
Ethereum Virtual Machine.
● Decentralized application developers who deploy smart contracts on
Ethereum benefit from the rich ecosystem of developer tooling and
established best practices that have come with the maturity of the protocol.
● This maturity also extends into the quality of user-experience for the
average user of Ethereum applications, with wallets like MetaMask, Argent,
Rainbow and more offering simple interfaces through which to interact with
the Ethereum blockchain and smart contracts deployed there.
● Ethereum’s large user base encourages developers to deploy their
applications on the network, which further reinforces Ethereum as the
primary home for decentralized applications like DeFi and NFTs.
● In the future, the backwards-compatible Ethereum 2.0 protocol, currently
under development, will provide a more scalable network on which to build
decentralized applications that require higher transaction throughput.
Gas:
● Gas is used to control access to blockchain networks.
● The gas limit defines the total cost computationally associated with a transaction.
● The gas price defines the price per unit of computation a participant is willing to
pay. Gas is priced in Ether on Ethereum.
● Gas is the fee required to successfully conduct a transaction or execute a
contract on the Ethereum blockchain platform.
● Gas is the fee required to successfully conduct a transaction or execute a
contract on the Ethereum blockchain platform. Fees are priced in tiny fractions of
the cryptocurrency ether (ETH)—denominations called Gwei (10-9 ETH). Gas is
used to pay validators for the resources needed to conduct transactions.
● Computational Work: Every operation performed on a blockchain network, such
as sending cryptocurrency, deploying a smart contract, or executing a function
within a smart contract, requires computational resources to process.
● Gas Units: Gas is a unit of measurement that represents the amount of
computational work required for a specific operation. Each operation on the
blockchain network consumes a certain amount of gas, depending on its
complexity and resource requirements.
● Transaction Fees: Users pay transaction fees in the form of gas to compensate
network validators, often called miners or validators, for the computational
resources they expend to process and validate transactions. The transaction fee
is calculated based on the amount of gas consumed by the operation and the
current gas price, which is denominated in cryptocurrency (e.g., Ether in the case
of Ethereum).
● Gas Limit and Gas Price: When submitting a transaction or deploying a smart
contract, users specify both the gas limit and the gas price. The gas limit is the
maximum amount of gas they are willing to consume for the operation, while the
gas price is the price they are willing to pay per unit of gas. Multiplying the gas
limit by the gas price gives the maximum transaction fee the user is willing to pay.
● Optimizing Transactions: Users can adjust the gas limit and gas price to
optimize transaction fees. Setting a higher gas price may incentivize miners to
prioritize their transaction, while setting a lower gas limit can help prevent
unintentional excessive gas consumption.
In conclusion, "gas" in cryptocurrency and blockchain technology is a unit of
measurement representing the computational work required to execute operations or
transactions on a blockchain network. It serves as a mechanism for users to pay
transaction fees to network validators in exchange for processing and validating
transactions. Gas fees are determined by the complexity and resource requirements of
the operation, with users specifying both a gas limit (the maximum amount of gas they
are willing to consume) and a gas price (the price they are willing to pay per unit of gas).
By understanding and managing gas usage, users can optimize transaction fees and
ensure efficient and cost-effective interactions on the blockchain network.
Solidity:
● Solidity is one such language that has been introduced with Ethereum blockchain
to write smart contracts.
● Vyper is another language that has been recently introduced for Ethereum smart
contract development.
● Solidity is an object-oriented, high-level programming language for implementing
smart contracts that run on the Ethereum Virtual Machine (EVM).
● Solidity is inspired by well-known programming languages like C++ and
JavaScript.
● As a web3 developer, working with Solidity is beneficial to learning web3
development.
● Solidity uses an identical syntax to C++ for variable declarations and for loops.
Additionally, there is support for C++ style function overloading, which is needed
when two functions have the same name but differ in the parameters they
accept.
How does Solidity interact with the EVM?
● Writing Smart Contracts: Developers use Solidity to write smart contracts,
which are self-executing agreements with predefined rules and conditions. These
smart contracts can facilitate various functions and transactions, such as
transferring cryptocurrency, managing digital assets, or executing complex logic.
● Compiling Solidity Code: Once the Solidity code is written, it needs to be
compiled into bytecode before it can be deployed to the Ethereum blockchain.
The Solidity compiler compiles the high-level Solidity code into EVM bytecode,
which consists of a series of opcodes (machine-level instructions) that the EVM
can execute.
● Deploying Smart Contracts: After compilation, the bytecode is deployed to the
Ethereum blockchain as a smart contract. This deployment involves sending a
special transaction to the network that includes the bytecode of the smart
contract. Miners or validators on the network then execute this transaction,
deploying the smart contract to the blockchain.
● Interacting with Smart Contracts: Once deployed, smart contracts can be
interacted with by sending transactions to them. These transactions trigger
specific functions within the smart contract, which are executed by the EVM. For
example, sending Ether to a crowdfunding smart contract may trigger the
contract to release funds to a project if certain conditions are met.
● Execution by the EVM: When transactions involving smart contracts are
included in a block and added to the blockchain, the EVM executes the bytecode
of the smart contract. It follows the instructions encoded in the bytecode,
performing calculations, updating data storage, and executing the logic defined in
the smart contract.
In summary, Solidity serves as the programming language for writing smart
contracts, which are then compiled into bytecode and deployed to the Ethereum
blockchain. The EVM is responsible for executing this bytecode, ensuring that
smart contracts behave as intended and facilitating decentralized and trustless
interactions on the Ethereum [Link] programming language driving smart
contracts and DApps on the Ethereum blockchain, stands as a testament to the
incredible potential of blockchain technology.