BCT Unit IV Blockchain Components and Consensus
BCT Unit IV Blockchain Components and Consensus
What is Ethereum?
Ethereum is a Blockchain network that introduced a built-in Turing-complete programming language
used for creating various decentralized applications(also called Dapps).
The Ethereum network is currently famous for allowing the implementation of smart contracts.
Smart contracts can be thought of as ‘cryptographic bank lockers’ which contain certain values.
These cryptographic lockers can only be unlocked when certain conditions are met.
Unlike bitcoin, Ethereum is a network that can be applied to various other sectors.
Ethereum is often called Blockchain 2.0
The consensus mechanism used in Ethereum is Proof of Stakes(PoS), which is more energy efficient
when compared to that used in the Bitcoin network, that is, Proof of Work(PoW).
History of Ethereum
2013: Ethereum was first described with the goal of developing decentralized applications.
2014: In 2014, EVM formal development of the software 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 for reducing transaction fee volatility.
2022: In 2022, Ethereum has shifted from PoW( Proof-of-Work ) to PoS( Proof-of-State ) consensus
mechanism..
Features of Ethereum
1. Smart contracts: Ethereum allows the creation and deployment of smart contracts. Smart contracts
are created mainly using a programming language called solidity. Solidity is an Object Oriented
Programming language that is comparatively easy to learn.
2. Ethereum Virtual Machine (EVM): It is designed to operate as a runtime environment for
compiling and deploying Ethereum-based smart contracts.
3. Ether: Ether is the cryptocurrency of the Ethereum network. It is the only acceptable form of payment
for transaction fees on the Ethereum network.
4. Decentralized applications (Daaps): Dapp has its backend code running on a decentralized peer-to-
peer network. It can have a frontend and user interface written in any language to make calls and
query data from its backend. They operate on Ethereum and perform the same function irrespective of
the environment in which they get executed.
5. Decentralized autonomous organizations (DAOs): It is a decentralized organization that works in a
democratic and decentralized fashion. DAO relies on smart contracts for decision-making or
decentralized voting systems within the organization.
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:
Agreements
Banking systems: Due to the decentralized nature of the Ethereum block chain 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.
Crowd funding: Applying Ethereum smart contracts to block chain-based crowd funding platforms
helps to increase trust and information symmetry
Domain names: Allows the crypto users to buy and manage their own domain names on Ethereum,
Benefits of Ethereum
Drawbacks of Ethereum
Ethereum Virtual Machine (EVM) is designed as the runtime environment for smart
contracts in Ethereum.
It is isolated from the other parts of the system.
This means that any operation on EVM do not affect your data or programs in any way
Ethereum contains its own Turing-complete scripting language, called Solidity, and with this comes a
need to execute this code.
A program called the Ethereum Virtual Machine (EVM) can do this task.
It runs on top of the Ethereum network, meaning that all nodes reach a consensus about what code
should be executed at every given time.
Purpose of EVM
It is the computer that stores data and also executes code in smart contracts on the Ethereum network.
The machine run any kind of Crypto-contract that can be built on Ethereum’s blockchain by using a
programming language called Solidity.
The intention behind writing code on the Ethereum network is to create smart contracts and programs
that automatically execute things when certain conditions are met.
If a terms or condition is not met, the system can execute it in an “exit” function as well.
For example, if an account has been hacked, the hacker cannot steal money from the system, because
they don’t have authority to do so.
Ethereum Virtual Machine (EVM) is a program which executes scripts used to implement certain
operations and generate smart contract. These contracts allows exchange of money and information.
These contracts are predefined by the creator of the smart contract to ensure outcome as per
happening.
Ethereum Virtual Machine provides Turing complete environment for execution of scripts and smart
contracts. This means that anything that can be implemented with a computer can be run on EVM.
Ethereum Virtual Machine ensures that all transactions and smart contracts made on the Ethereum
blockchain are executed in correct and expected manner as desired by the smart contract code.
It serves as a platform for applications to be executed on.
In simple words, it can be said that Ethereum Virtual Machine facilitates DApp creation and execution on
the blockchain.
Benefits of EVM
High cost of storing data: The high cost of storing data on the blockchain, more than 3TB
High gas cost: In Ethereum, all transactions require a fee to execute. These fees are called “gas”, and
are paid in ETH tokens. Gas is priced at the moment of execution, and depends on the complexity of
executing a transaction. The more difficult the computation for a transaction, the higher its gas cost
will be.
High gas price during network congestion: During times when there is high network congestion due
to many transactions being pushed onto the blockchain, gas prices rise because there are fewer
transactions that can go through (the same amount of computational power has to service more
transactions).
Technical expertise required: Writing smart contracts and using EVM requires technical expertise.
Ethereum Nodes are a system that operates in a Point to Point network model. There are 3 types of
Nodes:
1. Full Node: The responsibility of a full node is to verify and validate each and every transaction that
takes place inside the network and maintain the state of the blockchain. When a smart contract
transaction occurs, full nodes also execute all of the instructions in the smart contract. It determines
whether or not the smart contract execution is producing the expected results. These nodes maintain a
full copy of the blockchain data.
.
2. Archive Nodes: Archive nodes are complete nodes that have the “archive mode” option enabled.
While a Full Node only stores the latest state of the transaction, the Archive nodes hold all of the
blockchain’s history data dating back to the genesis block.
3. Light Nodes: A light node, unlike a full node, does not hold the complete current block chain state
and stores only the block header. It is suitable for low memory and computational devices since
maintaining a light node involve the least investment in hardware, running costs, and technical skill.
Light nodes rely on full nodes to function.
These nodes do not need to run continuously or read and publish a large amount of data on the block
chain.
It provides an easy way to create a wallet, especially for beginners.
What is Ethereum Client?
An Ethereum client is a software program that is used to implement the Ethereum specification and
connect with other Ethereum clients over a network.
Different Ethereum clients can communicate with one another if they follow the reference
specification and the defined communication protocols.
While these many clients are created by various teams and in various programming languages, they all
follow the same protocol.
2. Light Client: Ethereum clients do not always need to necessary keep all of the data, so often, when
data storage and performance are concerns, developers utilize the “light clients”. Light clients provide a
portion of full client capability. Because light clients do not keep the entire Ethereum blockchain,
as a result, they can provide quick delivery and free up data storage space.
The functionality of a light client is adapted to the purposes of the Ethereum client.
Light clients, for example, are widely used within wallets to maintain private keys and Ethereum
addresses.
3. Remote Client: A remote client is much like a light client. The primary distinction is that a remote
client does not keep its own copy of the blockchain or validate transactions or block headers. Remote
clients, on the other hand, rely entirely on a full or lite client to have access to the Ethereum blockchain
network. These clients are mostly used as wallets for transmitting and receiving transactions.