0% found this document useful (0 votes)
24 views

Unit-III-a

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views

Unit-III-a

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 24

Blockchain Technology

– IOE411

Dr. Shajulin Benedict


[email protected]
Syllabus
• Introduction – blockchain history, basics, architectures, Types of
blockchain, Base technologies – dockers, docker compose, and
data structures, hashes, Digital Signature - ECDSA, Zero
Knowledge Proof.

• Bitcoins – Fundamentals, aspects of bitcoins, properties of


bitcoins, bitcoin transactions, bitcoin P2P networks, block
generation at bitcoins, consensus algorithms.

• Introduction to Ethereum- Consensus Mechanism -


Implementation, Transactions, demonstrations, Smart Contracts
(Blockchain hyperledger – Fabric architecture, implementation,
networking, fabric transactions, demonstration, smart contracts.)

• Applications – blockchain applications, e-governance, smart


cities, smart industries, anomaly detections, use cases, trends on
blockchains, serverless blocks, scalability issues, blockchain on
clouds.
Blockchain 1.0, 2.0, and 3.0

• Blockchain1.0 was used for cryptocurrencies.


• i.e., simple cash transactions.
Blockchain1.0

• properties and smart contracts. These smart contracts impose


specific conditions and criteria to be met before registering
them in the blockchain.
Blockchain
2.0 • Registration takes place without the intervention of a third party.

• The focus is to develop more comprehensive solution to real


world problems.
Blockchain • Hence, many applications were developed in various sectors
3.0 such as government, education, health, and science.
Ethereum
• Earlier, Bitcoin is meant only for money.
• We learned, Bitcoin is a decentralized money.
• What is Ethereum?
• Ethereum is a global, decentralized platform for money and
new kinds of applications (general-purpose blockchain).
• Ethereum was initially described in a white paper by Vitalik
Buterin-- a programmer and co-founder of Bitcoin Magazine,
in late 2013 with a goal of building decentralized applications
(Wikipedia…)
• Ethereum grants developers the freedom of creating complex
applications/logics to be executed on the blockchain.
• Ethereum is an open access platform that offers data-
friendly services for everyone.
• It's a community-built technology behind the
cryptocurrency Ether (ETH).
Ethereum
• Enterprise Ethereum Alliance was formed in March
2017 with 30 founding members.
• Ethereum 2.0 is open-source.
Differences between Bitcoin and Ethereum
Bitcoin Ethereum
P2P Electronic Cash Decentralized Applications
Bitcoin Ether is the cryptocurrency; many
more cryptocurrencies are possible.
Developers could not develop any Smartcontracts are utilized to
new logics. develop any logics for developing
decentralized applications.
It is similar to an app It is similar to an Appstore
Consensus mechanism – PoW Consensus mechanism – PoS (32
percent stake)
Block time – 10 minutes Block time – 12 seconds
Max. block size = 21 billion bitcoins Max. block size = infinite
(but annual max. blocksize = 18
million
Ethereum Design Goals – 5 Goals

Minimize
Improve
complexity Increase Reduce
up-time and
by security by barriers to
keep the Ensure
simplifying using entry (even
Ethereum longevity
the design laptops or
network
Ethereum techniques. mobiles)
live.
blockchain.
Ethereum Characteristics
• As like bitcoin, the validity of Ether is provided by a
blockchain.
• Blockchain is a continuously growing list of records.
– Records are linked and secured using cryptographic hashes.
Ethereum – To Discuss

The
Ethereum Ethereum Ethereum
Accounts Network Mining

Ethereum Ether &


Virtual Gas
Machine
Ethereum Accounts
• Two types of Accounts
• External Accounts
– These accounts are generally controlled with the help of public
key cryptography algorithms.
– The main purpose of External accounts is to serve as a medium
for users to interact with the Ethereum Blockchain.
• Contract Accounts
– These accounts are a collection of code that resides on the
blockchain at a specific address.
– These contracts are invoked by external accounts, or by other
contracts through a specific call-to-action function.
– These contracts are written in high-level scripting languages like
Solidity, Serpent, or so forth.
Ethereum Virtual Machine
• EVM is the heart of the Ethereum blockchain.
• It is a runtime environment for smart contracts.
• i.e., a virtual environment for executing smart contracts.
• EVM holds the blocks and the deployed contracts.
• EVM is a sandboxed environment.
• Ie.., it is not running on a network or the filesystem

Solidity Code

Compiler
Ethereum Virtual Machine
(in Sandboxed Environment,
Contracts run here)
Smart Contracts
• Smart contracts are developed on EVMs.
• They are written in several languages such as Solidity,
Vyper, Bamboo, Serpent, and so forth.
• Solidity is more popular among these programming
languages.
• Smart contracts are run by Ethereum nodes on EVMs.
Ethereum Network
• It is a public blockchain network.
• It forms the P2P network in which the decentralized
applications run.
• The network comprises of two types of nodes:
• Full nodes
• Light weight nodes
• Full nodes:
• They contain the entire history of transactions since the
genesis block.
• Full nodes have to contain each and every transaction that
has been verified according to the rules set up by Ethereum’s
specifications.
Ethereum Network
• Lightweight Nodes
• These nodes contain a subset of the entire blockchain.
• These types of nodes are mostly used in e-wallets which have
to be light-weight in nature and hence the entire blockchain
cannot be stored on them.
• These nodes, in contrast, do not verify every block or
transaction and may not have a copy of the current blockchain
state.
• They rely on full nodes to provide them with missing details.
Ether and Gas
• Ether is the name of the crypto-currency used to pay
for transactions on the ethereum network.
• Ether is also used to buy Gas (Computations), which
in turn is used to pay for computation within the EVM.
• Ether is the metric unit and has a lot of denominations
which help accurately pay for transactions and gas.
• The smallest denomination i.e., the base unit is called
Wei.

• Gas is used as a metric to pay for the computational


resources on the network.
• There is a gas limit – i.e., maximum amount of gas
that it can use for its computations.
Ethereum Mining
• Miners compete to validate the block or incoming
transactions.
• A sort of proof of work.
• The miners get rewards.
• Upon successful mining, the transaction between two
people become success.
• i.e., ether is transferred from one person to the other.
Life cycle of Transactions
• When we interact with Ethereum, transactions are
executed and the states are updated.
• Step 1: You should have an Ethereum Client (for e.g., Geth or
Parity) on the computer to connect to the network (for e.g.,
TestNet or Mainnet).
• Step 2: Already, the contract would be loaded in the network
(for e.g., Voting contract).
• Step 3: We instantiate the contract and execute a method (for
e.g. VoteForCandidate with the candidate name).
• Step 4: Transaction is signed and broadcasted to the entire
blockchain network.
• Step 5: Miner nodes add the transaction to the candidate pool
for verification (based on gas price).
– The higher the gas price, the more likely the transaction is
included in the next block.
• Step 6: Finally, the block is added into the chain.
dApps – Decentralized Applications
• Ethereum uses smart contracts to develop newer
logics.
• The smart contracts can be designed in such a way that they
avoid central authorities.
• Hence, it is named as censorship resistant.
• E.g., consider a centralized application.
• Some central control agency could block a person or data if
they found illegal (for instance, removing some data).
• But, in dApps, it is not possible (data immutable).
dApps – Decentralized Applications
• They will not be offline.
• The implementation is handled using cloud systems.
• They are run using 100s of 10000s of servers.
• For e.g.
• Decentralized Finance is a technology that adopts dApps.
• Tools such as Defi (https://ethereum.org/en/defi/)
• Defi dApp Send money around the globe

Access stable currencies

Borrow funds with collateral

Borrow without collateral

Start crypto savings

Trade tokens (invest options)

Fund your ideas

Buy insurance
dApps – Decentralized Applications
• Game dApps
• Cryptokitties – sell kittens using Ethereum
– It is a gaming software
– https://www.cryptokitties.co/
• ZedRun
– It is a gambling game (racing horses)
– Winner and loser are shared using ethers.
• Poker, Chess, and so forth.
dApps – Decentralized Applications
• Tracking applications
• E.g., Zapper.fi (to find objects).
• https://studio.zapper.xyz/docs/apis/getting-started
• It has APIs for web3.0
• The assets are recorded in the wallet.
• Next, the assets are tracked using blockchain network.
• It is opensource and free to use.
• It has dashboard to display all tracking information.
dApps – Decentralized Applications
• Marketplace applications
• E.g., Rarible
• Rarible is an NFT marketplace.
• Rarible uses Non-Fungible Tokens (Non-fungible tokens
(NFTs) are assets like a piece of art, digital content, or video
that have been tokenized via a blockchain. )
• It is built on Ethereum blockchain.
• It supports
– Digital art
– Music
– Memes
– Games
• E.g., Bidali
• Used for gift cards
dApps – Decentralized Applications

Educational
applications
• Certificate management
• Learning outcome
management
• Evaluating student’s ability
• Fees and credit transfer
• Examination review
• Supporting lifelong
learning with credit points
dApps Development – Tools and Frameworks
• Web3 js
• is required for the client side app (to communicate with
blockchain.
• Metamask
• It is a browser extension code.
• It is required to enable browsers to talk to blockchain
• Ganache
• local development blockchain
• Remix IDE or Truffle
• Remix IDE is a browser-based IDE for smart contract
development
• Truffle works using node.js (node install truffle).

You might also like