SlideShare une entreprise Scribd logo
1  sur  29
Ethereum
History - how Ethereum come about....
● Started in October 2013, Vitalik Buterin visited Mastercoin team in Israel. He
suggested a few features, to make their protocol more generalized and support
more types of contracts. But Mastercoin has their own vision to move forward.
● December 2013, Vitalik published his first Ethereum protocol. Subsequently,
Gavin Wood joined to further refine the protocol and build the C++
implementation. At the same time, Jeffrey Wilcke lead to build the Go client.
● Source: https://vitalik.ca/general/2017/09/14/prehistory.html
● ...the scripting systems of Bitcoin, and even proto-cryptocurrency 2.0 alternatives like Ripple
and Mastercoin, are far too limited to allow the kind of arbitrarily complex computation
that "decentralized autonomous corporations"s require...take cryptocurrency 2.0, and
generalize it - create a fully-fledged, Turing-complete (but heavily fee-regulated)
cryptographic ledger that allows participants to encode arbitrarily complex contracts,
autonomous agents and relationships that will be mediated entirely by the
blockchain….become trivial to implement….
Evolution of blockchain
Bitcoin vs ethereum
Bitcoin Blockchain Ethereum Blockchain
Both powered by the principle of distributed ledgers and cryptography
Initial Distribution Mining ICO
Function as a cryptocurrency - transfer currency transfer currency and general program
application (decenrtalized smart contract)
Consensus Proof of Work, energy waste for security Proof of Work with later transition to Proof of
Stake, Casper Friendly Finality Gadget
Mining Hash Secure Hash Algorithm (SHA-256) ETHASH - require more memory to mine hence
harder to be mined with ASICs
Fee Fee based on transaction size Gas based on operation and usage of storage
Finality 6 block confirmations, average 60 mins. 12(25) block confirmations, average 3(6) min.
Extensibility hard, simple scripting language Turing Complete Language - smart contract
Scalability 3 Tx/s, Plan: payment channels (Lightning) 15 Tx/s, Plan: payment channels (Plasma),
sharding
Basic of ethereum
● has a built-in Turing-complete programming language used to create
"contracts"
● Similar to Bitcoin, Ethereum uses Blockchain as a globally shared transaction
database.
● Ethereum store these in the Blockchain
○ User accounts state (Eth balance)
○ Smart contract code
○ Smart contract state
● Transaction is the only thing that can trigger a change of states in Blockchain.
● Mining process is used to group and validate transactions in Block.
● Miner who can solve a mathematical puzzle quickest can propagate the block
to the network and claim mining reward.
Basic of ethereum - Account #1
Accounts
● Global state of Ethereum comprises of many ‘accounts’
● Two kinds of accounts:
○ Externally owned accounts(EOAs) - owned and controlled by users and have no code
associated with it. Owner has private key to access funds or contracts on the account.
○ Contract accounts - controlled by the associated contract code. The contract code is
executed through transactions sent by EOA’s or messages send by other contracts.
● Each account has a 20-byte address and a state associated with it.
● An EOA
○ can send messages to other EOA (ether transfer)
○ can send messages to other contract accounts (code invocation)
Basic of ethereum - Account #2
Source: https://www.coindesk.com/information/how-ethereum-works/
UTXO vs Account basedAccount object has 4 pieces of data:
• Nonce (replay protection)
• Balance
• Code hash (empty for EOA)
• Storage trie root
Source:https://medium.com/@darthrevan344/blockchain-ethereum-iot-poc-
machine-maintenance-part-i-272524c16edf
Basic of Ethereum - Transaction
Transaction
• Transactions are signed messages originated by an EOA.
• Transactions to an EOA is value transfer.
• Transactions to a contract resulted the code to be executed and the payload is
the input data.
• Transaction has the following data:
• nonce (replay attack protection)
• to (destination address)
• value (ETH amount to send)
• data (contract code)
• gas price (amount eth/unit gas)
• startgas (maximum gas consumable)
• v, r, s (ECDSA signature values)
Basic of Ethereum - Ether
Ether
• Native currency of the Ethereum blockchain.
• It is used as payment for using the network.
Unit Wei
Wei 1
Kwei 1,000
Mwei 1,000,000
Unit Wei
Gwei 1,000,000,000
Szabo 1,000,000,000,000
Ether
1,000,000,000,000,000,
000
Basic of ethereum - Gas #1
● Due to Turing-complete of Ethereum, Gas is used as a workaround for Halting
Problem.
● A unit of measurement of the computation work of running transactions in the
Ethereum network.
● This is similar to the using of kilowatts to measure electricity.
● Used to decouple the ETH and the unit of computational measurement. Thus,
avoiding the situation in which an increase in the price of ETH resulting changes
to all gas prices.
● Different kinds of transaction require a different amount of gas. For example:
○ Sending Ether between accounts typically cost 21,000 Gas
○ Using store OPS code in smart contract is more than 20,000 Gas
Basic of ethereum - Gas #2
● How much does it cost?
● Each transaction sender define price of
Gas Price (Gwei) and Gas Limit.
● Miner then execute transactions with the
highest gas price first. Thus low price gas
might end up taking longer time to
process (e.g. during CryptoKitties)
● How much to pay?
● Refer to statistics on average Gas price
e.g. GasStation/Etherscan.
Source: etherscan.com
Source: ethgasstation.info
Flow of a Transaction to Block
demo
● Transfer of Ether
● Hello World Smart Contract
Source: https://ethereum.stackexchange.com/questions/268/ethereum-block-architecture
Source: https://medium.com/@micheledaliessi/how-does-ethereum-work-8244b6f55297
• DApps definition (https://en.wikipedia.org/wiki/Decentralized_application):
“is an application that is run by many users on a decentralized network with trustless
protocols. They are designed to avoid any single point of failure. They typically have
tokens to reward users for providing computing power.”
Layers of Ethereum Platform
State of Decentralized Application
Source:https://www.stateofthedapps.com/stats
(Jul2018)
Programming languages for smart contracts
● A few programming languages for smart contracts:
○ Solidity: a high-level language. JavaScript like syntax and is the flagship language for
programming Smart Contract in Ethereum due to good documentation and support.
○ Serpent: One of the earliest smart contract programming language. Based on Python.
○ Lisp-Like-Language, LLL: a lower-level language than Solidity (i.e. direct access to
memory and storage, direct usage of EVM opcodes. Based on Lisp.
○ Vyper: an experimental programming language. Based on Python. Currently it is
under development.
Tools for Development of Smart Contract
• User Interface
• Metamask
• Mist
• Remix
• MyEtherWallet
• Any Javascript Framework + Web3JS
• Development Environment
• Truffle
• Remix
• Embark
• Blockchain Environment
• Testnet (Ropsten, Rinkeby, Kovan)
• Private Ethereum Blockchain
• Ganache
• Remix (Javascript VM)
• Library
• OpenZeppelin
Solidity
Write and Deploy contract
● Write smart contract in Solidity
● Compile Solidity using Solidity Compiler(Solc) into EVM bytecode (bin)
and interface (abi).
● Deploy compiled contract to Ethereum network i.e. blockchain.
Deployment require payment in ether.
● Once contract has successfully been included in blockchain, the
contract address will be returned.
Source: https://blockgeeks.com/guides/smart-contract-development/
Smart Contract - Development to Deployment
Source: http://pospi.spadgos.com/2016/10/01/solidity-smart-contracts-primer/
Solidity - code example
Solidity
Invocation of deployed contract - transactions vs calls
Calls
● A local invocation of a contract function. It does not yield publication on
blockchain. It is read-only operation and free of Ether to run.
● Return value of the contract function returned immediately.
● Create an instance of the contract object using deployed contract address and
ABI.
● Use web3js.API web3.eth.call or JSON-RPC eth_call.
Transactions
● A transaction is a call on contract function that will be published on blockchain. It is
a write-operation that will affect state of the blockchain and consume Ether.
● Use web3js.API web3.eth.sendTransaction or JSON-RPC eth_transaction.
Web3JS - Invocation of contract
ERC 20 - Token Standard
ERC 20 - Using OpenZeppelin Library
Remix
Remix is a suite of tools to interact with the Ethereum blockchain in order to debug
transactions. Remix IDE is an IDE for Solidity dApp developers. Online version is available at
https://remix.ethereum.org. Source: https://blockgeeks.com/guides/smart-contract-development/
Remix
Contract Deployment
Contract
Invocation
Source: https://techburst.io/solidity-101-intro-to-ethereum-smart-contracts-and-solidity-82e9889b1736
Mist
Source: https://blog.abuiles.com/blog/2017/06/13/smart-contracts-for-the-impatient/
Mist is the browser for decentralized web apps. What Mozilla Firefox or
Google Chrome are for the Web 2.0, the Mist Browser will be for the Web 3.0
Future - Proof of Stake (Casper)
● Instead of miner uses validator to create and validate
blocks.
● How it works?
○ Interested validators will stake their Ethereum for
eligibility to validate.
○ Validator discover block and place a bet on it. If block
gets appended, validators get a reward proportionate
to their bets.
○ If validator acts maliciously, stake is being slashed.
● 2 versions of Casper in research and development
○ Casper Friendly Finality Gadget (FFG)
■ Hybrid of PoW and PoS
○ Casper Friendly GHOST Correct-by-Construction (CBC)
■ Fully PoS
■ Instead of fully specifying the protocol, provides
ability to specify properties and work backward to
derive the protocol.
Source: https://blockgeeks.com/guides/ethereum-mining-
proof-stake

Contenu connexe

Tendances

Bitcoin, Ethereum, Smart Contract & Blockchain
Bitcoin, Ethereum, Smart Contract & BlockchainBitcoin, Ethereum, Smart Contract & Blockchain
Bitcoin, Ethereum, Smart Contract & BlockchainJitendra Chittoda
 
Introduction to Solidity and Smart Contract Development (9).pptx
Introduction to Solidity and Smart Contract Development (9).pptxIntroduction to Solidity and Smart Contract Development (9).pptx
Introduction to Solidity and Smart Contract Development (9).pptxGene Leybzon
 
Blockchain, Ethereum and ConsenSys
Blockchain, Ethereum and ConsenSysBlockchain, Ethereum and ConsenSys
Blockchain, Ethereum and ConsenSysWithTheBest
 
Introduction To Solidity
Introduction To SolidityIntroduction To Solidity
Introduction To Solidity101 Blockchains
 
ERC20 Step-by-Step - Creating Your First Ethereum Token
ERC20 Step-by-Step - Creating Your First Ethereum TokenERC20 Step-by-Step - Creating Your First Ethereum Token
ERC20 Step-by-Step - Creating Your First Ethereum TokenCodeOps Technologies LLP
 
Ethereum in a nutshell
Ethereum in a nutshellEthereum in a nutshell
Ethereum in a nutshellDaniel Chan
 
Ethereum Solidity Fundamentals
Ethereum Solidity FundamentalsEthereum Solidity Fundamentals
Ethereum Solidity FundamentalsEno Bassey
 
Blockchain Explained | Blockchain Simplified | Blockchain Technology | Blockc...
Blockchain Explained | Blockchain Simplified | Blockchain Technology | Blockc...Blockchain Explained | Blockchain Simplified | Blockchain Technology | Blockc...
Blockchain Explained | Blockchain Simplified | Blockchain Technology | Blockc...Edureka!
 
Blockchain Essentials and Blockchain on Azure
Blockchain Essentials and Blockchain on AzureBlockchain Essentials and Blockchain on Azure
Blockchain Essentials and Blockchain on AzureNuri Cankaya
 
Write Smart Contract with Solidity on Ethereum
Write Smart Contract with Solidity on EthereumWrite Smart Contract with Solidity on Ethereum
Write Smart Contract with Solidity on Ethereum劉 維仁
 
Blockchain Presentation
Blockchain PresentationBlockchain Presentation
Blockchain PresentationZied GUESMI
 
An Overview of Stablecoin
An Overview of StablecoinAn Overview of Stablecoin
An Overview of Stablecoin101 Blockchains
 
Ethereum Blockchain explained
Ethereum Blockchain explainedEthereum Blockchain explained
Ethereum Blockchain explainedEthWorks
 
Ethereum Tutorial - Ethereum Explained | What is Ethereum? | Ethereum Explain...
Ethereum Tutorial - Ethereum Explained | What is Ethereum? | Ethereum Explain...Ethereum Tutorial - Ethereum Explained | What is Ethereum? | Ethereum Explain...
Ethereum Tutorial - Ethereum Explained | What is Ethereum? | Ethereum Explain...Simplilearn
 

Tendances (20)

Ethereum 2.0
Ethereum 2.0Ethereum 2.0
Ethereum 2.0
 
Bitcoin, Ethereum, Smart Contract & Blockchain
Bitcoin, Ethereum, Smart Contract & BlockchainBitcoin, Ethereum, Smart Contract & Blockchain
Bitcoin, Ethereum, Smart Contract & Blockchain
 
Ethereum
EthereumEthereum
Ethereum
 
Introduction to Solidity and Smart Contract Development (9).pptx
Introduction to Solidity and Smart Contract Development (9).pptxIntroduction to Solidity and Smart Contract Development (9).pptx
Introduction to Solidity and Smart Contract Development (9).pptx
 
Blockchain, Ethereum and ConsenSys
Blockchain, Ethereum and ConsenSysBlockchain, Ethereum and ConsenSys
Blockchain, Ethereum and ConsenSys
 
Introduction To Solidity
Introduction To SolidityIntroduction To Solidity
Introduction To Solidity
 
ERC20 Step-by-Step - Creating Your First Ethereum Token
ERC20 Step-by-Step - Creating Your First Ethereum TokenERC20 Step-by-Step - Creating Your First Ethereum Token
ERC20 Step-by-Step - Creating Your First Ethereum Token
 
Ethereum in a nutshell
Ethereum in a nutshellEthereum in a nutshell
Ethereum in a nutshell
 
Ethereum Solidity Fundamentals
Ethereum Solidity FundamentalsEthereum Solidity Fundamentals
Ethereum Solidity Fundamentals
 
Blockchain Explained | Blockchain Simplified | Blockchain Technology | Blockc...
Blockchain Explained | Blockchain Simplified | Blockchain Technology | Blockc...Blockchain Explained | Blockchain Simplified | Blockchain Technology | Blockc...
Blockchain Explained | Blockchain Simplified | Blockchain Technology | Blockc...
 
Blockchain Essentials and Blockchain on Azure
Blockchain Essentials and Blockchain on AzureBlockchain Essentials and Blockchain on Azure
Blockchain Essentials and Blockchain on Azure
 
Smart contracts
Smart contractsSmart contracts
Smart contracts
 
Write Smart Contract with Solidity on Ethereum
Write Smart Contract with Solidity on EthereumWrite Smart Contract with Solidity on Ethereum
Write Smart Contract with Solidity on Ethereum
 
Blockchain Presentation
Blockchain PresentationBlockchain Presentation
Blockchain Presentation
 
Ethereum A to Z
Ethereum A to ZEthereum A to Z
Ethereum A to Z
 
An Overview of Stablecoin
An Overview of StablecoinAn Overview of Stablecoin
An Overview of Stablecoin
 
Ethereum Blockchain explained
Ethereum Blockchain explainedEthereum Blockchain explained
Ethereum Blockchain explained
 
Ethereum Tutorial - Ethereum Explained | What is Ethereum? | Ethereum Explain...
Ethereum Tutorial - Ethereum Explained | What is Ethereum? | Ethereum Explain...Ethereum Tutorial - Ethereum Explained | What is Ethereum? | Ethereum Explain...
Ethereum Tutorial - Ethereum Explained | What is Ethereum? | Ethereum Explain...
 
Bitcoin
BitcoinBitcoin
Bitcoin
 
Blockchain 101
Blockchain 101Blockchain 101
Blockchain 101
 

Similaire à Ethereum

Building Apps with Ethereum Smart Contract
Building Apps with Ethereum Smart ContractBuilding Apps with Ethereum Smart Contract
Building Apps with Ethereum Smart ContractVaideeswaran Sethuraman
 
Ethereum Block Chain
Ethereum Block ChainEthereum Block Chain
Ethereum Block ChainSanatPandoh
 
Block chain - Smart contacts.pptx
Block chain - Smart contacts.pptxBlock chain - Smart contacts.pptx
Block chain - Smart contacts.pptxshraddhaphirke1
 
How to not Destroy Millions in Smart Contracts
How to not Destroy Millions in Smart ContractsHow to not Destroy Millions in Smart Contracts
How to not Destroy Millions in Smart ContractsLeonid Beder
 
Best practices to build secure smart contracts
Best practices to build secure smart contractsBest practices to build secure smart contracts
Best practices to build secure smart contractsGautam Anand
 
Stefano Maestri - Blockchain and smart contracts, what they are and why you s...
Stefano Maestri - Blockchain and smart contracts, what they are and why you s...Stefano Maestri - Blockchain and smart contracts, what they are and why you s...
Stefano Maestri - Blockchain and smart contracts, what they are and why you s...Codemotion
 
Ethereum Block Chain
Ethereum Block ChainEthereum Block Chain
Ethereum Block ChainSanatPandoh
 
How to Write & Deploy a Smart Contract
How to Write & Deploy a Smart ContractHow to Write & Deploy a Smart Contract
How to Write & Deploy a Smart ContractAll Things Open
 
Jerome de Tychey - Building Web3.0 with Ethereum - Codemotion Berlin 2018
Jerome de Tychey - Building Web3.0 with Ethereum - Codemotion Berlin 2018Jerome de Tychey - Building Web3.0 with Ethereum - Codemotion Berlin 2018
Jerome de Tychey - Building Web3.0 with Ethereum - Codemotion Berlin 2018Codemotion
 
Jerome de Tychey - Building Web3.0 with Ethereum - Codemotion Berlin 2018
Jerome de Tychey - Building Web3.0 with Ethereum - Codemotion Berlin 2018Jerome de Tychey - Building Web3.0 with Ethereum - Codemotion Berlin 2018
Jerome de Tychey - Building Web3.0 with Ethereum - Codemotion Berlin 2018Codemotion
 
Smart contracts in Solidity
Smart contracts in SoliditySmart contracts in Solidity
Smart contracts in SolidityFelix Crisan
 
Ethereum Devcon1 Report (summary writing)
Ethereum Devcon1 Report (summary writing)Ethereum Devcon1 Report (summary writing)
Ethereum Devcon1 Report (summary writing)Tomoaki Sato
 
Top open source blockchain platforms of 2018
Top open source blockchain platforms of 2018Top open source blockchain platforms of 2018
Top open source blockchain platforms of 2018Parangat Technologies
 

Similaire à Ethereum (20)

Building Apps with Ethereum Smart Contract
Building Apps with Ethereum Smart ContractBuilding Apps with Ethereum Smart Contract
Building Apps with Ethereum Smart Contract
 
Ethereum Block Chain
Ethereum Block ChainEthereum Block Chain
Ethereum Block Chain
 
Block chain - Smart contacts.pptx
Block chain - Smart contacts.pptxBlock chain - Smart contacts.pptx
Block chain - Smart contacts.pptx
 
Evaluation of Ethereum
Evaluation of Ethereum Evaluation of Ethereum
Evaluation of Ethereum
 
What is ethereum
What is ethereumWhat is ethereum
What is ethereum
 
Chapter 3.pptx
Chapter 3.pptxChapter 3.pptx
Chapter 3.pptx
 
How to design, code, deploy and execute a smart contract
How to design, code, deploy and execute a smart contractHow to design, code, deploy and execute a smart contract
How to design, code, deploy and execute a smart contract
 
Exploring ethereum
Exploring ethereumExploring ethereum
Exploring ethereum
 
Ethereum vs fabric vs corda
Ethereum vs fabric vs cordaEthereum vs fabric vs corda
Ethereum vs fabric vs corda
 
How to not Destroy Millions in Smart Contracts
How to not Destroy Millions in Smart ContractsHow to not Destroy Millions in Smart Contracts
How to not Destroy Millions in Smart Contracts
 
Best practices to build secure smart contracts
Best practices to build secure smart contractsBest practices to build secure smart contracts
Best practices to build secure smart contracts
 
Stefano Maestri - Blockchain and smart contracts, what they are and why you s...
Stefano Maestri - Blockchain and smart contracts, what they are and why you s...Stefano Maestri - Blockchain and smart contracts, what they are and why you s...
Stefano Maestri - Blockchain and smart contracts, what they are and why you s...
 
Ethereum Block Chain
Ethereum Block ChainEthereum Block Chain
Ethereum Block Chain
 
How to Write & Deploy a Smart Contract
How to Write & Deploy a Smart ContractHow to Write & Deploy a Smart Contract
How to Write & Deploy a Smart Contract
 
Jerome de Tychey - Building Web3.0 with Ethereum - Codemotion Berlin 2018
Jerome de Tychey - Building Web3.0 with Ethereum - Codemotion Berlin 2018Jerome de Tychey - Building Web3.0 with Ethereum - Codemotion Berlin 2018
Jerome de Tychey - Building Web3.0 with Ethereum - Codemotion Berlin 2018
 
Jerome de Tychey - Building Web3.0 with Ethereum - Codemotion Berlin 2018
Jerome de Tychey - Building Web3.0 with Ethereum - Codemotion Berlin 2018Jerome de Tychey - Building Web3.0 with Ethereum - Codemotion Berlin 2018
Jerome de Tychey - Building Web3.0 with Ethereum - Codemotion Berlin 2018
 
Smart contracts in Solidity
Smart contracts in SoliditySmart contracts in Solidity
Smart contracts in Solidity
 
Ethereum Devcon1 Report (summary writing)
Ethereum Devcon1 Report (summary writing)Ethereum Devcon1 Report (summary writing)
Ethereum Devcon1 Report (summary writing)
 
Programming Decentralized Application
Programming Decentralized ApplicationProgramming Decentralized Application
Programming Decentralized Application
 
Top open source blockchain platforms of 2018
Top open source blockchain platforms of 2018Top open source blockchain platforms of 2018
Top open source blockchain platforms of 2018
 

Dernier

"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Bhuvaneswari Subramani
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 

Dernier (20)

"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 

Ethereum

  • 2. History - how Ethereum come about.... ● Started in October 2013, Vitalik Buterin visited Mastercoin team in Israel. He suggested a few features, to make their protocol more generalized and support more types of contracts. But Mastercoin has their own vision to move forward. ● December 2013, Vitalik published his first Ethereum protocol. Subsequently, Gavin Wood joined to further refine the protocol and build the C++ implementation. At the same time, Jeffrey Wilcke lead to build the Go client. ● Source: https://vitalik.ca/general/2017/09/14/prehistory.html ● ...the scripting systems of Bitcoin, and even proto-cryptocurrency 2.0 alternatives like Ripple and Mastercoin, are far too limited to allow the kind of arbitrarily complex computation that "decentralized autonomous corporations"s require...take cryptocurrency 2.0, and generalize it - create a fully-fledged, Turing-complete (but heavily fee-regulated) cryptographic ledger that allows participants to encode arbitrarily complex contracts, autonomous agents and relationships that will be mediated entirely by the blockchain….become trivial to implement….
  • 4. Bitcoin vs ethereum Bitcoin Blockchain Ethereum Blockchain Both powered by the principle of distributed ledgers and cryptography Initial Distribution Mining ICO Function as a cryptocurrency - transfer currency transfer currency and general program application (decenrtalized smart contract) Consensus Proof of Work, energy waste for security Proof of Work with later transition to Proof of Stake, Casper Friendly Finality Gadget Mining Hash Secure Hash Algorithm (SHA-256) ETHASH - require more memory to mine hence harder to be mined with ASICs Fee Fee based on transaction size Gas based on operation and usage of storage Finality 6 block confirmations, average 60 mins. 12(25) block confirmations, average 3(6) min. Extensibility hard, simple scripting language Turing Complete Language - smart contract Scalability 3 Tx/s, Plan: payment channels (Lightning) 15 Tx/s, Plan: payment channels (Plasma), sharding
  • 5. Basic of ethereum ● has a built-in Turing-complete programming language used to create "contracts" ● Similar to Bitcoin, Ethereum uses Blockchain as a globally shared transaction database. ● Ethereum store these in the Blockchain ○ User accounts state (Eth balance) ○ Smart contract code ○ Smart contract state ● Transaction is the only thing that can trigger a change of states in Blockchain. ● Mining process is used to group and validate transactions in Block. ● Miner who can solve a mathematical puzzle quickest can propagate the block to the network and claim mining reward.
  • 6. Basic of ethereum - Account #1 Accounts ● Global state of Ethereum comprises of many ‘accounts’ ● Two kinds of accounts: ○ Externally owned accounts(EOAs) - owned and controlled by users and have no code associated with it. Owner has private key to access funds or contracts on the account. ○ Contract accounts - controlled by the associated contract code. The contract code is executed through transactions sent by EOA’s or messages send by other contracts. ● Each account has a 20-byte address and a state associated with it. ● An EOA ○ can send messages to other EOA (ether transfer) ○ can send messages to other contract accounts (code invocation)
  • 7. Basic of ethereum - Account #2 Source: https://www.coindesk.com/information/how-ethereum-works/ UTXO vs Account basedAccount object has 4 pieces of data: • Nonce (replay protection) • Balance • Code hash (empty for EOA) • Storage trie root Source:https://medium.com/@darthrevan344/blockchain-ethereum-iot-poc- machine-maintenance-part-i-272524c16edf
  • 8. Basic of Ethereum - Transaction Transaction • Transactions are signed messages originated by an EOA. • Transactions to an EOA is value transfer. • Transactions to a contract resulted the code to be executed and the payload is the input data. • Transaction has the following data: • nonce (replay attack protection) • to (destination address) • value (ETH amount to send) • data (contract code) • gas price (amount eth/unit gas) • startgas (maximum gas consumable) • v, r, s (ECDSA signature values)
  • 9. Basic of Ethereum - Ether Ether • Native currency of the Ethereum blockchain. • It is used as payment for using the network. Unit Wei Wei 1 Kwei 1,000 Mwei 1,000,000 Unit Wei Gwei 1,000,000,000 Szabo 1,000,000,000,000 Ether 1,000,000,000,000,000, 000
  • 10. Basic of ethereum - Gas #1 ● Due to Turing-complete of Ethereum, Gas is used as a workaround for Halting Problem. ● A unit of measurement of the computation work of running transactions in the Ethereum network. ● This is similar to the using of kilowatts to measure electricity. ● Used to decouple the ETH and the unit of computational measurement. Thus, avoiding the situation in which an increase in the price of ETH resulting changes to all gas prices. ● Different kinds of transaction require a different amount of gas. For example: ○ Sending Ether between accounts typically cost 21,000 Gas ○ Using store OPS code in smart contract is more than 20,000 Gas
  • 11. Basic of ethereum - Gas #2 ● How much does it cost? ● Each transaction sender define price of Gas Price (Gwei) and Gas Limit. ● Miner then execute transactions with the highest gas price first. Thus low price gas might end up taking longer time to process (e.g. during CryptoKitties) ● How much to pay? ● Refer to statistics on average Gas price e.g. GasStation/Etherscan. Source: etherscan.com Source: ethgasstation.info
  • 12. Flow of a Transaction to Block
  • 13. demo ● Transfer of Ether ● Hello World Smart Contract
  • 15. Source: https://medium.com/@micheledaliessi/how-does-ethereum-work-8244b6f55297 • DApps definition (https://en.wikipedia.org/wiki/Decentralized_application): “is an application that is run by many users on a decentralized network with trustless protocols. They are designed to avoid any single point of failure. They typically have tokens to reward users for providing computing power.” Layers of Ethereum Platform
  • 16. State of Decentralized Application Source:https://www.stateofthedapps.com/stats (Jul2018)
  • 17. Programming languages for smart contracts ● A few programming languages for smart contracts: ○ Solidity: a high-level language. JavaScript like syntax and is the flagship language for programming Smart Contract in Ethereum due to good documentation and support. ○ Serpent: One of the earliest smart contract programming language. Based on Python. ○ Lisp-Like-Language, LLL: a lower-level language than Solidity (i.e. direct access to memory and storage, direct usage of EVM opcodes. Based on Lisp. ○ Vyper: an experimental programming language. Based on Python. Currently it is under development.
  • 18. Tools for Development of Smart Contract • User Interface • Metamask • Mist • Remix • MyEtherWallet • Any Javascript Framework + Web3JS • Development Environment • Truffle • Remix • Embark • Blockchain Environment • Testnet (Ropsten, Rinkeby, Kovan) • Private Ethereum Blockchain • Ganache • Remix (Javascript VM) • Library • OpenZeppelin
  • 19. Solidity Write and Deploy contract ● Write smart contract in Solidity ● Compile Solidity using Solidity Compiler(Solc) into EVM bytecode (bin) and interface (abi). ● Deploy compiled contract to Ethereum network i.e. blockchain. Deployment require payment in ether. ● Once contract has successfully been included in blockchain, the contract address will be returned. Source: https://blockgeeks.com/guides/smart-contract-development/
  • 20. Smart Contract - Development to Deployment Source: http://pospi.spadgos.com/2016/10/01/solidity-smart-contracts-primer/
  • 21. Solidity - code example
  • 22. Solidity Invocation of deployed contract - transactions vs calls Calls ● A local invocation of a contract function. It does not yield publication on blockchain. It is read-only operation and free of Ether to run. ● Return value of the contract function returned immediately. ● Create an instance of the contract object using deployed contract address and ABI. ● Use web3js.API web3.eth.call or JSON-RPC eth_call. Transactions ● A transaction is a call on contract function that will be published on blockchain. It is a write-operation that will affect state of the blockchain and consume Ether. ● Use web3js.API web3.eth.sendTransaction or JSON-RPC eth_transaction.
  • 23. Web3JS - Invocation of contract
  • 24. ERC 20 - Token Standard
  • 25. ERC 20 - Using OpenZeppelin Library
  • 26. Remix Remix is a suite of tools to interact with the Ethereum blockchain in order to debug transactions. Remix IDE is an IDE for Solidity dApp developers. Online version is available at https://remix.ethereum.org. Source: https://blockgeeks.com/guides/smart-contract-development/
  • 28. Mist Source: https://blog.abuiles.com/blog/2017/06/13/smart-contracts-for-the-impatient/ Mist is the browser for decentralized web apps. What Mozilla Firefox or Google Chrome are for the Web 2.0, the Mist Browser will be for the Web 3.0
  • 29. Future - Proof of Stake (Casper) ● Instead of miner uses validator to create and validate blocks. ● How it works? ○ Interested validators will stake their Ethereum for eligibility to validate. ○ Validator discover block and place a bet on it. If block gets appended, validators get a reward proportionate to their bets. ○ If validator acts maliciously, stake is being slashed. ● 2 versions of Casper in research and development ○ Casper Friendly Finality Gadget (FFG) ■ Hybrid of PoW and PoS ○ Casper Friendly GHOST Correct-by-Construction (CBC) ■ Fully PoS ■ Instead of fully specifying the protocol, provides ability to specify properties and work backward to derive the protocol. Source: https://blockgeeks.com/guides/ethereum-mining- proof-stake

Notes de l'éditeur

  1. The halting problem is to never be sure if a transaction will complete without actually running it, so it is very important for the protocol to provide runtime workarounds.
  2. Gas limit — that’s the maximum amount of Gas that user commits to the transaction. If transaction will need more Gas than it was defined in Gas limit, transaction will fail with “out of Gas” status Gas used by transaction — that’s actual amount of Gas that was used during execution. Gas price — that’s the Gas price in ETH that sender defined at transaction creation Actual Tx Cost — gas used by transaction * gas price (in ETH) Cumulative gas used — The total amount of gas used when this transaction was executed in the block (gas used by previous transactions and this one together)
  3. an ABI tells us the specifications that are needed to interact with the smart contract. It tells us of the various ways in which this contract can be called from an external source (like web3 in our case)
  4. Nothing at Stake issue with PoS - in which as no physical resources to waste (as in compare to POW the CPU), when there is a fork, a validator would stake at each of the fork so not to lose out (so regardless of the final outcome the validator will win). Advantage of PoS . more environmentally friendly - as no energy consumption . stronger alignment of incentives - PoW interest of miners may not align with coin holders, e.g. miner sell coin they mine as they only care about short term. Another issue is the ability to lease hashrate, with the lesee having no economic interest in the long term prospect of the system. . Mining centralisation and ASICs - improving decentralisation. ASIC are expensive hence only mid-size and above company can operate, many aspects of mining cn have economies of scale, such as maintenance costs and energy cost.