Professional Documents
Culture Documents
L5_ Ethereum_Blockchain
L5_ Ethereum_Blockchain
Blockchain
Ethereum Blockchain
Learning Objectives
EEA members represent a wide range of sectors from around the globe, such as technology,
banking, government, healthcare, energy, pharmaceuticals, marketing, and insurance.
Accenture, Banco Santander, BlockApps, BNY Mellon, CME Group, ConsenSys, IC3, Intel, J.P.
Morgan, Microsoft, and Nuco were among the founding members of the Enterprise Ethereum
Alliance.
Features of Ethereum
Contracts are compiled into bytecode on the Ethereum Virtual Machine and deployed to the
Ethereum blockchain for execution.
Various languages may be used to write these contracts, but these are the most popular.
Ethereum Virtual Machine (EVM)
Smart Contract Byte Code ● Ethereum Virtual Machine (EVM) is the runtime
environment for smart contracts in Ethereum.
Storage ● Developers can create applications that run on the EVM
using user-friendly programming languages such as
Ethereum Virtual Machine Solidity.
● The EVM is sandboxed and completely isolated to
Node protect the host computers from the threat of viruses or
malicious intrusion attempts.
Ether
Bitcoin Ether
Used as currency for purchasing goods Used as a currency and for making
and services decentralized apps
Gas is a unit of measuring the amount of computational power required to run a smart contract or
perform a transaction.
The externally owned account is controlled by a private key that can send Ethers
and messages from the account.
Is managed by
human
Contract Account
A contract account is a smart contract that is managed by code and put on the blockchain.
Is managed by
code
Ethereum Mining
Ethereum uses a proof of work mechanism to ensure security. The algorithm used is Ethash.
Ethereum Mining
1 Eth
4 2
3 3
Eth Eth
Eth Eth
Bob Alice Bob Alice
In this case, In this scenario, Ethereum does not use the UTXO model, but rather a
transaction state change, as illustrated in the picture. This occurs when Ethereum changes
the state from the previous to the new state.
Uncle Block
When two valid blocks are mined at the same time and broadcasted in the Ethereum network,
but one block is not accepted in the main network, such a block is referred to as an uncle block.
Uncle Block
Block3b
Uncle Reward
It is given to the miner who creates the uncle block which is included in
the main block. Its formula to calculate is:
(Uncle Number + 8 — Block Number) * Miner’s Reward / 8
It is given to the miner who includes the uncle block in their confirmed
block.
The miner gets a fixed 0.0625 Eth as a reward.
Ethereum Transaction
The Ethereum ecosystem consists of technologies that help enable decentralized browsers and
applications such as storage, dynamic communication, and distributed computation.
Decentralized Browser
Ethereum Blockchain
Swarm
Web 1.0
Tor is a decentralized network that provides anonymity by encrypting internet traffic and
routing it through a series of servers before arriving at its final destination.
BitTorrent is a distributed transfer protocol for transferring files over the internet.
Swarm IPSF
Once it runs on the user's device, it gets connected with other nodes present in swarm over
peer-to-peer network.
Clef
Clef is an Ethereum blockchain tool. It signs the transactions before they are permanently
added to the blockchain.
Bee has its version of clef known as Bee-clef. It is customized particularly for its needs.
Whisper
The Ethereum development environment allows users to build Ethereum smart contracts and
develop decentralized applications. Some common Ethereum development environments are:
Truffle Remix
Ethereum Development Environment
Truffle Remix
Remix IDE has a text editor and special smart contract building features such as:
Custom Browser-
Smart Contract Smart Contract
Based Ethereum
Development Testing
Network
Duration: 10 Min.
Problem Statement:
You are given a task to explore the Remix IDE in the web browser.
Assisted Practice: Guidelines
Truffle is a development environment, asset pipeline, and testing framework for blockchain networks
based on the Ethereum Virtual Machine (EVM).
Truffle supports full life cycle projects based on Ethereum, Hyperledger, Quorum, and many other
platforms.
Features of Truffle
Scriptable
2
1 Automated tools
4
3 5 Networking
Package support
User interactive
Features of Truffle
Scriptable
Automated tools
Networking
Package support
User interaction
• Truffle features an interactive interface for
communicating directly with clients.
Developers can create, compile, and test
smart contracts using this console.
Develop
Truffle Smart Contract Life Cycle
The smart contract development life cycle includes critical processes that ensure a secure and smart
contract creation and deployment on the blockchain.
Ethereum Networks
Ethereum Networks
Networks are different Ethereum environments that you can access for developing, testing, and
releasing various decentralized applications. They are categorized into the following types:
Mainnet is a live or a production network of the Ethereum Blockchain. This is the network on
which the actual monetary transactions take place, and the Dapps are hosted on it.
Exploring the Ethereum Mainnet
Duration: 10 Min.
Problem Statement:
You are given a task to explore the Ethereum Mainnet.
Access:
1. Click on the Labs tab on the left side panel of the LMS
2. Copy the username and password that is generated
3. Click on the Launch lab button
4. Enter the username and password in the respective fields and click Login
Assisted Practice: Guidelines
Ethereum provides a few test networks for developers to test their protocols, smart contracts,
features, and applications before deploying them to the production network.
Test Networks
Görli
A proof-of-authority testnet that works across clients.
Kovan
A proof-of-authority testnet for those running OpenEthereum
clients.
Rinkeby
A proof-of-authority testnet for those running the Geth client.
Ropsten
A proof-of-work testnet, which means it's the best like-for-like
representation of Ethereum.
Explore an Ethereum Test Network
Duration: 10 Min.
Problem Statement:
You are given a task to explore one of the Ethereum test networks.
Access:
1. Click on the Labs tab on the left side panel of the LMS
2. Copy the username and password that is generated
3. Click on the Launch lab button
4. Enter the username and password in the respective fields and click Login
Assisted Practice: Guidelines
Duration: 10 Min.
Problem Statement:
You are given a task to Install Ganache Blockchain network on your system.
Access:
1. Click on the Labs tab on the left side panel of the LMS
2. Copy the username and password that is generated
3. Click on the Launch lab button
4. Enter the username and password in the respective fields and click Login.
Assisted Practice: Guidelines
Duration: 10 Min.
Problem Statement:
You are given a task to explore the Ganache Blockchain network.
Access:
1. Click on the Labs tab on the left side panel of the LMS
2. Copy the username and password that is generated
3. Click on the Launch lab button
4. Enter the username and password in the respective fields and click Login.
Assisted Practice: Guidelines
Duration: 10 Min.
Problem Statement:
You are given a task to explore the Remix IDE in the web browser.
Assisted Practice: Guidelines
Ethereum wallets help in connecting with the Ethereum blockchain network, storing ether, and
performing monetary transactions from one account to another.
Types of Ethereum Wallets
Desktop Wallets
Mobile Wallets
Light-weight mobile
Hardware Wallets
applications.
Most secure as they store
keys in physical devices.
Metamask
Problem Statement:
Add the Metamask extension to your browser, create an account, and configure your
Ethereum wallet.
Access:
1. Click on the Labs tab on the left side panel of the LMS
2. Copy the username and password that is generated
3. Click on the Launch lab button
4. Enter the username and password in the respective fields and click Login
Assisted Practice: Guidelines
Problem Statement:
You are given a task to connect your Metamask wallet to a Ganache test blockchain network.
Access:
1. Click on the Labs tab on the left side panel of the LMS
2. Copy the username and password that is generated
3. Click on the Launch lab button
4. Enter the username and password in the respective fields and click Login
Assisted Practice: Guidelines
Ethereum clients provide an interface to become full nodes. They can then verify transactions,
parse blockchain and smart contract data, and mine and create blocks.
Gateway
to
Mainnet
Geth is a terminal-based Ethereum client implemented in the Go language. It was developed by the
Ethereum Foundation, and it provides a command-line interface for exercising full node powers.
Features of Geth
Geth allows users to connect to the Ethereum mainnet, Ropsten, and Rinkeby network. Geth
does not allow users to connect to the Kovan network. They need to use Parity for that.
Geth client connects with the other peers and downloads the latest blockchain data to the local
machine. Data gets stored in below locations and it can be changed with the --datadir parameter.
Problem Statement:
You are given a task to install Geth client and explore the basic commands.
Access:
1. Click on the Labs tab on the left side panel of the LMS
2. Copy the username and password that is generated
3. Click on the Launch lab button
4. Enter the username and password in the respective fields and click Login
Assisted Practice: Guidelines
Problem Statement:
You are given a task to set up a private Blockchain node in your machine using Geth.
Access:
1. Click on the Labs tab on the left side panel of the LMS
2. Copy the username and password that is generated
3. Click on the Launch lab button
4. Enter the username and password in the respective fields and click Login
Parity
Parity is a light-weight, fast, and multi-network Ethereum client written in the Rust
language. This software is an alternative for the Geth Ethereum client.
Features of Parity
Parity client allows us to connect to the Ethereum mainnet, Ropsten, and Kovan network.
Parity is a lightweight Ethereum client that helps connect to peers and synchronize the latest
Blockchain data into the local machine. It stores the Blockchain data in the following folders:
Linux ~/home/you/.local/share/io.parity.ethereum
~/AppData/Local/Parity/Ethereum Windows
Web3.js is a JavaScript library for communicating with an Ethereum node that is hosted Ethereum
network or the live chain.
It can also be used to access information on tokens and the Ether cryptocurrency.
Web3 Classes and Modules
Web3.utils: Utility functions are also exposes on the Web3 class object directly.
Web3.modules: Will return an object with the classes of all major sub modules
Web3-eth is a sub-package of web3.js. It allows the user to interact with an Ethereum blockchain and
Ethereum smart contracts.
NFT
Fungibility Introduction
Any good or asset that can be interchanged for another asset of the same kind
without sacrificing its value is known as a fungible asset.
Money Bitcoin
NFT stands for Non-Fungible Token, and it is a record stored on blockchain that certifies
that a digital asset is unique and the ownership of that asset.
Images
NFT Key Attributes
Indivisible
Limited Ownership
Unique Transparent
Fungible and Non-Fungible
Cryptokitties Decentraland
Colored Coins Counterparty
and CrptoPunks
2012 2014 2017
2017
NFT uses the ERC-721 token standard, which is used for non-fungible tokens
as opposed to the ERC-20 token, which is used for fungible tokens.
NFT smart contracts run on Ethereum blockchain. They only create new
NFTs and transfer their ownership.
Prerequisites for Buy and Sell NFT
Leading Marketplaces
• Opensea.io
• Rarible.com
• Mintable.app
• SuperRare.co
• Foundation.app
• KnownOrigin.io
Prerequisites for Buy and Sell NFT
B. DAO
C. ICO
D. Smart Contract
Knowledge
Check
The application developed in Ethereum is known as?
1
B. DAO
C. ICO
D. Smart Contract
A. ethash
B. SHA-256
C. SHA-1
D. NTLM
Knowledge
Check
Which hash algorithm is used in Ethereum?
2
A. ethash
B. SHA-256
C. SHA-1
D. NTLM
A. Mainnet
B. Ropsten
C. Julia
D. Kovan
Knowledge
Check
Which of the following is an Ethereum test network? (Select all that apply)
3
A. Mainnet
B. Ropsten
C. Julia
D. Kovan
Ropsten and Kovan are two of the many test networks provided in the Ethereum network.
Knowledge
Check
What does an Ethereum Client do? (Select all that apply)
4
Clients help in parsing and verifying the Blockchain. Clients are also allowed to create transactions and mine blocks
using interfaces.
Knowledge
Check
Which command would you use to connect Geth to the Ropsten network?
5
A. geth
B. geth --testnet
C. geth --mainnet
D. geth --rinkeby
Knowledge
Check
Which command would you use to connect Geth to the Ropsten network?
5
A. geth
B. geth --testnet
C. geth --mainnet
D. geth --rinkeby
Ropsten is the most widely used testing network in Ethereum and hence it is referred to as testnet.
Performing Ether Transactions in Metamask
You are a Blockchain expert in a Fintech enterprise and have been tasked
to credit salaries to all employees in Ethers. Perform the following steps: