SlideShare ist ein Scribd-Unternehmen logo
1 von 34
Downloaden Sie, um offline zu lesen
CodeOps Technologies
Ethereum -
Getting Started
Ganesh Samarthyam
ganesh@codeops.tech
Go to EtherScan.io
https://etherscan.io/
What did we observe?
❖ “Ethereum” is a blockchain
❖ “Ether” is the currency (crypto-currency) - ETH
❖ There are “blocks” and “transactions”
❖ The latest block added was 5916712
❖ There are 265.09 M transactions so far
Let’s zoom in
What did we observe?
❖ Current market cap is USD 47 billions
❖ Awesome for something in 3 years (initial release was in 30 July
2015)
❖ The last block was added 14.5 seconds back
❖ That’s typical of the rate in which blocks are added
❖ The transactions per second is 5.2
❖ That’s pathetic in financial industry terms in which a millions
transactions per second is not a big deal
❖ We’ll discuss “Hash Rate” and “Network Difficulty” a bit later
Let’s look at latest blocks
What did we observe?
❖ Every block is sequentially numbered
❖ Starting from zero, which is a special “genesis block”
❖ Each block has many transactions
❖ Not fixed number with wide variations - e.g., one was 19 and
another one was 104
❖ There are different “miners” - like “Ethermine” and “f2pool_2”
here
❖ And they are rewarded with Ethers (typically around 4 ethers)
Let’s zoom in for more details
https://etherscan.io/blocks
The Nth
block
How old is
the block?
How many transactions
are in this block?
How many “uncles”
for this block?
Who was that lucky
miner to get the ethers?
How many Ethers
was the reward to
the miner?
How much gas
was consumed?
What was the
maximum gas
allowed?
How much was the
average gas price per
transaction?
Let’s look at an actual block
How many
transactions are
there in this
block?
What is the hash
value of this
block? (256 bits)
Pointer (hash) to
the previous
block
What is the
name and
address of the
successful
miner?
The size of the
block in bytes
Proof-of-work
value
How many
ethers were
rewarded to the
successful
miner?
Let’s look a few actual transactions
Hashes of the
transactions in
this block
All these transactions
belong to the same block
(mined at the same time)
Addresses of the
transaction initiators
This is a Ether currency
transaction (to this
recipient address)
These three are
transactions to
contract addresses
Every transaction
(transferring ether or to
contract and even failed
ones) costs money (its all
money, honey!)
This is a failed
transaction (Log says:
“Error encountered
during contract
execution [Out of gas])”
Let’s look at an actual transaction
The hash code of
the transaction
(256 bites)
The transaction
is part of this
block
When did this
transaction
happen?
The source
address that
initiated this
currency transfer
transaction
How much Ether
was transferred
to the recipient?
What was the
gas limit and
how much was
consumed?
The money was
sent to this address
What much did the
sender have to shell
out to make this
transfer?
And there are thousands of Tx waiting
What’s this “Gwei” stuff?
1 ether = 1e18 wei
Smallest unit is wei
Unit Wei Value Wei
Wei 1 wei 1
Kwei (babbage) 1e3 wei 1,000
Mwei (lovelace) 1e6 wei 1,000,000
Gwei (shannon) 1e9 wei 1,000,000,000
Microether (szabo) 1e12 wei 1,000,000,000,000
Milliether (finney) 1e15 wei 1,000,000,000,000,000
Ether 1e18 wei 1,000,000,000,000,000,000
Ether Converter
https://etherconverter.online/
Ethereum accounts
Understanding Ethereum Accounts
❖ Two kinds of accounts:
❖ Externally Owned Accounts (EOA), or simply
“Accounts”
❖ Contract Accounts, or simply “Contracts”
❖ Accounts are of 160 bits (shown as “0x” prefixed
hexadecimal values - visually 40 alpha-numeric
characters)
❖ Example:“0x281055Afc982d96fAB65b3a49cAc8b878184Cb16”
Let’s look at an account
It’s all public info!
❖ With just the address, anyone can view the balance,
number of transactions, to which account the ether came
in or went out, etc.
❖ But only if you own the account, you can perform the
transactions ;-)
❖ Transactions could be to other accounts or to contracts
❖ There could be “token transfers” as well - we’ll discuss
tokens later
Let’s look at a contract account
Most of the contract code is public
“Hash” - fingerprint of data
"Priyanka Chopra (Piggy Chops)"
'ee457b98565f0c6f6b013acab80ea02dfa80e7e8'
SHA1
Using SHA-1 in Python
>>> import hashlib
>>> text = b"Priyanka Chopra (Piggy Chops)"
>>> hashlib.sha1(text).hexdigest()
'ee457b98565f0c6f6b013acab80ea02dfa80e7e8'
>>> text = b"Deepika Padukone (Deepi)"
>>> hashlib.sha1(text).hexdigest()
‘4efdf9172c4d3fa56540466f8c8a371a45e472fc’
>>> len('4efdf9172c4d3fa56540466f8c8a371a45e472fc')
40
>>> len('4efdf9172c4d3fa56540466f8c8a371a45e472fc') * 4
160
Using SHA-3 in Python
>>> import hashlib
>>> text = b"Deepika Padukone (Deepi)"
>>> hashlib.sha3_256(text).hexdigest()
'6229691c1f27cb6b9d4bce8b87ca1a3f0521cdc4aaff1b572be5c400946af29d'
>>> len(_)
64
>>> _ * 4
256
‘Ethereum's development coincided with the development of the SHA3
standard, and the standards process made a late change in the padding of
the finalized hash algorithm, so that Ethereum's "sha3_256" and "sha3_512"
hashes are not standard sha3 hashes, but a variant often referred to as
"Keccak-256" and "Keccak-512" in other contexts.’
- From https://github.com/ethereum/wiki/wiki/Ethash
For given text, hex is same!
>>> import hashlib
>>> text = b"Priyanka Chopra (Piggy Chops)"
>>> hashlib.sha1(text).hexdigest()
‘ee457b98565f0c6f6b013acab80ea02dfa80e7e8'
>>> anothertext = b"Priyanka Chopra (Piggy Chops)"
>>> hashlib.sha1(anothertext).hexdigest()
‘ee457b98565f0c6f6b013acab80ea02dfa80e7e8'
>>> variationtext = b"Priyanka Chopra"
>>> hashlib.sha1(variationtext).hexdigest()
‘0a6b5f3111ba3bcc87445942ec2bfcbe2dc28644'
http://www.sha1-online.com/
Using MetaMask
Transfer ether with MetaMask
Programmatic account creation
$ cat createacct.js
const ethers = require('ethers');
var wallet = ethers.Wallet.createRandom();
// var privateKey = "0x0123456789012345678901234567890123456789012345678901234567890123";
// var wallet = new ethers.Wallet(random);
console.log(wallet);
$ node createacct.js
Wallet {
privateKey:
'0xf10107a2dd4e0901374d93324a59ade40512d7c946746cdd9b24dc75ceba81a1',
provider: [Getter/Setter],
defaultGasLimit: [Getter/Setter],
address: '0xCbd98A04812e824fC481e6244A3D776c0cA8Ef4f',
sign: [Function],
mnemonic:
'field crop small food shoe design chronic push fox lazy keep clinic',
path: 'm/44'/60'/0'/0/0' }
$
Programmatic ether transfer
tiny.cc/ethtransfer
// we are using .env file for configuration details (i.e., from & to account addresses & the
private key for the from address)
require('dotenv').config()
// we are only using the 'ethers' module for transferring ether programmatically
const ethers = require('ethers');
const providers = ethers.providers;
// we are currenly using rinkeby test network; change it to mainnet for real transactions (and
improve this code before you do that ;-))
const network = 'rinkeby';
const provider = providers.getDefaultProvider(network);
var address = process.env.FROM_ADDRESS
console.log(`Using the given from and to addresses & the private key for the from address for $
{network} network`);
// first retrive the account balance (you cannot transfer if you have no ether or less ether than
the transfer amount!)
const balance = provider.getBalance(address).then(function(balance) {
var etherString = ethers.utils.formatEther(balance);
console.log(`The balance in your account is: ${etherString}`);
return etherString;
});
Programmatic ether transfer
tiny.cc/ethtransfer
const privateKey = process.env.PRIVATE_KEY
const wallet = new ethers.Wallet(privateKey);
wallet.provider = provider;
// how much ether to transfer
const amountToTransfer = "0.01";
// create a transaction object with the to address and the amount of ether to be transferred
var transaction = {
to: process.env.TO_ADDRESS,
value: ethers.utils.parseEther(amountToTransfer)
};
// get the current estimate for the amount of Gas required for performing the transaction and set that as the gas limit as well
const estimateGasPromise = wallet.estimateGas(transaction);
estimateGasPromise.then(function(gasEstimate) {
console.log(`The estimated gast for performing the transaction is: ${gasEstimate.toString()}`);
console.log(`Keeping the gas limit also the same: ${gasEstimate.toString()}`);
transaction.gasLimit = gasEstimate;
// that's it! do the transaction
var sendTransactionPromise = wallet.sendTransaction(transaction);
// if the transaction succeeds, you'll get here with the transaction hash!
sendTransactionPromise.then(function(transactionHash) {
console.log(`Transaction successful!!! `);
console.log(`The transaction hash is: ${transactionHash.hash}`);
// go to this URL to check more details about the transaction
console.log(`Etherscan transaction URL for complete details: https://${network}.etherscan.io/tx/${transactionHash.hash}`);
});
});
// done!
Programmatic ether transfer
tiny.cc/ethtransfer
$ node working.js
Using the given from and to addresses & the private key for the from address
for rinkeby network
The balance in your account is: 2.979958
The estimated gast for performing the transaction is: 21000
Keeping the gas limit also the same: 21000
Transaction successful!!!
The transaction hash is:
0xd08f20663a1c957490ca1e3e748db7bf1e0e65959c58ad7d608bae93a75c47fd
Etherscan transaction URL for complete details: https://rinkeby.etherscan.io/
tx/0xd08f20663a1c957490ca1e3e748db7bf1e0e65959c58ad7d608bae93a75c47fd
Programmatic ether transfer
tiny.cc/ethtransfer
Important Resources / URLs
❖ https://www.ethereum.org/ - Ethereum homepage
❖ http://ethdocs.org/ - Detailed documentation
❖ https://github.com/ethereum/wiki/wiki - Ethereum
Wiki
❖ etherscan.io - An online blockchain explorer
❖ https://en.bitcoinwiki.org/wiki/Blockchain -
Blockchain description & links
Tools to install
❖ Geth & Tools - https://geth.ethereum.org/downloads/
❖ Solc - http://solidity.readthedocs.io/en/v0.4.21/installing-
solidity.html
❖ Metamask (Chrome extension) - https://chrome.google.com/
webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn
❖ Web3.js - https://github.com/ethereum/web3.js/
❖ Ganache - https://github.com/trufflesuite/ganache
❖ Truffle -https://github.com/trufflesuite/truffle
❖ Mist - https://github.com/ethereum/mist/releases

Weitere ähnliche Inhalte

Was ist angesagt?

The Ring programming language version 1.5.2 book - Part 11 of 181
The Ring programming language version 1.5.2 book - Part 11 of 181The Ring programming language version 1.5.2 book - Part 11 of 181
The Ring programming language version 1.5.2 book - Part 11 of 181Mahmoud Samir Fayed
 
The Ring programming language version 1.7 book - Part 14 of 196
The Ring programming language version 1.7 book - Part 14 of 196The Ring programming language version 1.7 book - Part 14 of 196
The Ring programming language version 1.7 book - Part 14 of 196Mahmoud Samir Fayed
 
2019-01-29 - Demystifying Kotlin Coroutines
2019-01-29 - Demystifying Kotlin Coroutines2019-01-29 - Demystifying Kotlin Coroutines
2019-01-29 - Demystifying Kotlin CoroutinesEamonn Boyle
 
Dodging WebCrypto API Landmines
Dodging WebCrypto API LandminesDodging WebCrypto API Landmines
Dodging WebCrypto API LandminesErnie Turner
 
MongoDB.local Berlin: How and when to use multi-document transactions
MongoDB.local Berlin:  How and when to use multi-document transactionsMongoDB.local Berlin:  How and when to use multi-document transactions
MongoDB.local Berlin: How and when to use multi-document transactionsMongoDB
 
XoxzoテレフォニーAPI入門2017
XoxzoテレフォニーAPI入門2017XoxzoテレフォニーAPI入門2017
XoxzoテレフォニーAPI入門2017Xoxzo Inc.
 
The Ring programming language version 1.9 book - Part 48 of 210
The Ring programming language version 1.9 book - Part 48 of 210The Ring programming language version 1.9 book - Part 48 of 210
The Ring programming language version 1.9 book - Part 48 of 210Mahmoud Samir Fayed
 
The Ring programming language version 1.10 book - Part 50 of 212
The Ring programming language version 1.10 book - Part 50 of 212The Ring programming language version 1.10 book - Part 50 of 212
The Ring programming language version 1.10 book - Part 50 of 212Mahmoud Samir Fayed
 
GraphQL Los Angeles Meetup Slides
GraphQL Los Angeles Meetup SlidesGraphQL Los Angeles Meetup Slides
GraphQL Los Angeles Meetup SlidesGrant Miller
 
The Ring programming language version 1.5.4 book - Part 40 of 185
The Ring programming language version 1.5.4 book - Part 40 of 185The Ring programming language version 1.5.4 book - Part 40 of 185
The Ring programming language version 1.5.4 book - Part 40 of 185Mahmoud Samir Fayed
 
Synapse india dotnet development web approch part 2
Synapse india dotnet development web approch part 2Synapse india dotnet development web approch part 2
Synapse india dotnet development web approch part 2Synapseindiappsdevelopment
 

Was ist angesagt? (12)

Kitura Todolist tutorial
Kitura Todolist tutorialKitura Todolist tutorial
Kitura Todolist tutorial
 
The Ring programming language version 1.5.2 book - Part 11 of 181
The Ring programming language version 1.5.2 book - Part 11 of 181The Ring programming language version 1.5.2 book - Part 11 of 181
The Ring programming language version 1.5.2 book - Part 11 of 181
 
The Ring programming language version 1.7 book - Part 14 of 196
The Ring programming language version 1.7 book - Part 14 of 196The Ring programming language version 1.7 book - Part 14 of 196
The Ring programming language version 1.7 book - Part 14 of 196
 
2019-01-29 - Demystifying Kotlin Coroutines
2019-01-29 - Demystifying Kotlin Coroutines2019-01-29 - Demystifying Kotlin Coroutines
2019-01-29 - Demystifying Kotlin Coroutines
 
Dodging WebCrypto API Landmines
Dodging WebCrypto API LandminesDodging WebCrypto API Landmines
Dodging WebCrypto API Landmines
 
MongoDB.local Berlin: How and when to use multi-document transactions
MongoDB.local Berlin:  How and when to use multi-document transactionsMongoDB.local Berlin:  How and when to use multi-document transactions
MongoDB.local Berlin: How and when to use multi-document transactions
 
XoxzoテレフォニーAPI入門2017
XoxzoテレフォニーAPI入門2017XoxzoテレフォニーAPI入門2017
XoxzoテレフォニーAPI入門2017
 
The Ring programming language version 1.9 book - Part 48 of 210
The Ring programming language version 1.9 book - Part 48 of 210The Ring programming language version 1.9 book - Part 48 of 210
The Ring programming language version 1.9 book - Part 48 of 210
 
The Ring programming language version 1.10 book - Part 50 of 212
The Ring programming language version 1.10 book - Part 50 of 212The Ring programming language version 1.10 book - Part 50 of 212
The Ring programming language version 1.10 book - Part 50 of 212
 
GraphQL Los Angeles Meetup Slides
GraphQL Los Angeles Meetup SlidesGraphQL Los Angeles Meetup Slides
GraphQL Los Angeles Meetup Slides
 
The Ring programming language version 1.5.4 book - Part 40 of 185
The Ring programming language version 1.5.4 book - Part 40 of 185The Ring programming language version 1.5.4 book - Part 40 of 185
The Ring programming language version 1.5.4 book - Part 40 of 185
 
Synapse india dotnet development web approch part 2
Synapse india dotnet development web approch part 2Synapse india dotnet development web approch part 2
Synapse india dotnet development web approch part 2
 

Ähnlich wie Hands on Ethereum - Getting Started

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
 
Blockchain Technologies for Data Science
Blockchain Technologies for Data ScienceBlockchain Technologies for Data Science
Blockchain Technologies for Data ScienceBruno Gonçalves
 
BlockchainConf.tech - Build a private blockchain workshop
BlockchainConf.tech - Build a private blockchain workshopBlockchainConf.tech - Build a private blockchain workshop
BlockchainConf.tech - Build a private blockchain workshopPad Kankipati
 
How does ethereum work, anyway?
How does ethereum work, anyway?How does ethereum work, anyway?
How does ethereum work, anyway?philrussell001
 
Blockchain for Developers
Blockchain for DevelopersBlockchain for Developers
Blockchain for DevelopersShimi Bandiel
 
Dappsmedia smartcontract _write_smartcontracts_on_console_ethereum
Dappsmedia smartcontract _write_smartcontracts_on_console_ethereumDappsmedia smartcontract _write_smartcontracts_on_console_ethereum
Dappsmedia smartcontract _write_smartcontracts_on_console_ethereumTomoaki Sato
 
Blockchain Demystified
Blockchain DemystifiedBlockchain Demystified
Blockchain DemystifiedMahesh M Reddy
 
PPT FOR EXPLAINING MERKLE tree and SPV.pptx
PPT FOR EXPLAINING MERKLE tree and SPV.pptxPPT FOR EXPLAINING MERKLE tree and SPV.pptx
PPT FOR EXPLAINING MERKLE tree and SPV.pptxmeena466141
 
“Technical Intro to Blockhain” by Yurijs Pimenovs from Paybis at CryptoCurren...
“Technical Intro to Blockhain” by Yurijs Pimenovs from Paybis at CryptoCurren...“Technical Intro to Blockhain” by Yurijs Pimenovs from Paybis at CryptoCurren...
“Technical Intro to Blockhain” by Yurijs Pimenovs from Paybis at CryptoCurren...Dace Barone
 
HASHED LOUNGE Presents: OpenST Mosaic - Scaling blockchain economies to billi...
HASHED LOUNGE Presents: OpenST Mosaic - Scaling blockchain economies to billi...HASHED LOUNGE Presents: OpenST Mosaic - Scaling blockchain economies to billi...
HASHED LOUNGE Presents: OpenST Mosaic - Scaling blockchain economies to billi...OST | Open Simple Token
 
14 Jan17- Nullmeets -Blockchain concept decoded by Ninad Sarang
14 Jan17- Nullmeets -Blockchain concept decoded by Ninad Sarang14 Jan17- Nullmeets -Blockchain concept decoded by Ninad Sarang
14 Jan17- Nullmeets -Blockchain concept decoded by Ninad SarangNinad Sarang
 
OpenST Mosaic Protocol introduced at ETH Berlin: Running meta-blockchains on ...
OpenST Mosaic Protocol introduced at ETH Berlin: Running meta-blockchains on ...OpenST Mosaic Protocol introduced at ETH Berlin: Running meta-blockchains on ...
OpenST Mosaic Protocol introduced at ETH Berlin: Running meta-blockchains on ...OST | Open Simple Token
 
BlockchainDay "Ethereum Dapp - Asset Exchange YOSEMITE alpha" Session
BlockchainDay "Ethereum Dapp - Asset Exchange YOSEMITE alpha" Session BlockchainDay "Ethereum Dapp - Asset Exchange YOSEMITE alpha" Session
BlockchainDay "Ethereum Dapp - Asset Exchange YOSEMITE alpha" Session 병완 임
 
Ethereum Solidity Fundamentals
Ethereum Solidity FundamentalsEthereum Solidity Fundamentals
Ethereum Solidity FundamentalsEno Bassey
 
Blockchain Technology Introduction and Basics
Blockchain Technology  Introduction and BasicsBlockchain Technology  Introduction and Basics
Blockchain Technology Introduction and Basicsjayasris2023
 
Introduction to Ethereum
Introduction to EthereumIntroduction to Ethereum
Introduction to EthereumArnold Pham
 

Ähnlich wie Hands on Ethereum - Getting Started (20)

Bitcoin
BitcoinBitcoin
Bitcoin
 
Ethereum A to Z
Ethereum A to ZEthereum A to Z
Ethereum A to Z
 
Ethereum.pptx
Ethereum.pptxEthereum.pptx
Ethereum.pptx
 
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
 
Blockchain Technologies for Data Science
Blockchain Technologies for Data ScienceBlockchain Technologies for Data Science
Blockchain Technologies for Data Science
 
BlockchainConf.tech - Build a private blockchain workshop
BlockchainConf.tech - Build a private blockchain workshopBlockchainConf.tech - Build a private blockchain workshop
BlockchainConf.tech - Build a private blockchain workshop
 
How does ethereum work, anyway?
How does ethereum work, anyway?How does ethereum work, anyway?
How does ethereum work, anyway?
 
Blockchain for Developers
Blockchain for DevelopersBlockchain for Developers
Blockchain for Developers
 
Dappsmedia smartcontract _write_smartcontracts_on_console_ethereum
Dappsmedia smartcontract _write_smartcontracts_on_console_ethereumDappsmedia smartcontract _write_smartcontracts_on_console_ethereum
Dappsmedia smartcontract _write_smartcontracts_on_console_ethereum
 
Blockchain Demystified
Blockchain DemystifiedBlockchain Demystified
Blockchain Demystified
 
PPT FOR EXPLAINING MERKLE tree and SPV.pptx
PPT FOR EXPLAINING MERKLE tree and SPV.pptxPPT FOR EXPLAINING MERKLE tree and SPV.pptx
PPT FOR EXPLAINING MERKLE tree and SPV.pptx
 
“Technical Intro to Blockhain” by Yurijs Pimenovs from Paybis at CryptoCurren...
“Technical Intro to Blockhain” by Yurijs Pimenovs from Paybis at CryptoCurren...“Technical Intro to Blockhain” by Yurijs Pimenovs from Paybis at CryptoCurren...
“Technical Intro to Blockhain” by Yurijs Pimenovs from Paybis at CryptoCurren...
 
HASHED LOUNGE Presents: OpenST Mosaic - Scaling blockchain economies to billi...
HASHED LOUNGE Presents: OpenST Mosaic - Scaling blockchain economies to billi...HASHED LOUNGE Presents: OpenST Mosaic - Scaling blockchain economies to billi...
HASHED LOUNGE Presents: OpenST Mosaic - Scaling blockchain economies to billi...
 
How do bitcoin transactions work?
How do bitcoin transactions work?How do bitcoin transactions work?
How do bitcoin transactions work?
 
14 Jan17- Nullmeets -Blockchain concept decoded by Ninad Sarang
14 Jan17- Nullmeets -Blockchain concept decoded by Ninad Sarang14 Jan17- Nullmeets -Blockchain concept decoded by Ninad Sarang
14 Jan17- Nullmeets -Blockchain concept decoded by Ninad Sarang
 
OpenST Mosaic Protocol introduced at ETH Berlin: Running meta-blockchains on ...
OpenST Mosaic Protocol introduced at ETH Berlin: Running meta-blockchains on ...OpenST Mosaic Protocol introduced at ETH Berlin: Running meta-blockchains on ...
OpenST Mosaic Protocol introduced at ETH Berlin: Running meta-blockchains on ...
 
BlockchainDay "Ethereum Dapp - Asset Exchange YOSEMITE alpha" Session
BlockchainDay "Ethereum Dapp - Asset Exchange YOSEMITE alpha" Session BlockchainDay "Ethereum Dapp - Asset Exchange YOSEMITE alpha" Session
BlockchainDay "Ethereum Dapp - Asset Exchange YOSEMITE alpha" Session
 
Ethereum Solidity Fundamentals
Ethereum Solidity FundamentalsEthereum Solidity Fundamentals
Ethereum Solidity Fundamentals
 
Blockchain Technology Introduction and Basics
Blockchain Technology  Introduction and BasicsBlockchain Technology  Introduction and Basics
Blockchain Technology Introduction and Basics
 
Introduction to Ethereum
Introduction to EthereumIntroduction to Ethereum
Introduction to Ethereum
 

Mehr von CodeOps Technologies LLP

AWS Serverless Event-driven Architecture - in lastminute.com meetup
AWS Serverless Event-driven Architecture - in lastminute.com meetupAWS Serverless Event-driven Architecture - in lastminute.com meetup
AWS Serverless Event-driven Architecture - in lastminute.com meetupCodeOps Technologies LLP
 
BUILDING SERVERLESS SOLUTIONS WITH AZURE FUNCTIONS
BUILDING SERVERLESS SOLUTIONS WITH AZURE FUNCTIONSBUILDING SERVERLESS SOLUTIONS WITH AZURE FUNCTIONS
BUILDING SERVERLESS SOLUTIONS WITH AZURE FUNCTIONSCodeOps Technologies LLP
 
APPLYING DEVOPS STRATEGIES ON SCALE USING AZURE DEVOPS SERVICES
APPLYING DEVOPS STRATEGIES ON SCALE USING AZURE DEVOPS SERVICESAPPLYING DEVOPS STRATEGIES ON SCALE USING AZURE DEVOPS SERVICES
APPLYING DEVOPS STRATEGIES ON SCALE USING AZURE DEVOPS SERVICESCodeOps Technologies LLP
 
BUILD, TEST & DEPLOY .NET CORE APPS IN AZURE DEVOPS
BUILD, TEST & DEPLOY .NET CORE APPS IN AZURE DEVOPSBUILD, TEST & DEPLOY .NET CORE APPS IN AZURE DEVOPS
BUILD, TEST & DEPLOY .NET CORE APPS IN AZURE DEVOPSCodeOps Technologies LLP
 
CREATE RELIABLE AND LOW-CODE APPLICATION IN SERVERLESS MANNER
CREATE RELIABLE AND LOW-CODE APPLICATION IN SERVERLESS MANNERCREATE RELIABLE AND LOW-CODE APPLICATION IN SERVERLESS MANNER
CREATE RELIABLE AND LOW-CODE APPLICATION IN SERVERLESS MANNERCodeOps Technologies LLP
 
CREATING REAL TIME DASHBOARD WITH BLAZOR, AZURE FUNCTION COSMOS DB AN AZURE S...
CREATING REAL TIME DASHBOARD WITH BLAZOR, AZURE FUNCTION COSMOS DB AN AZURE S...CREATING REAL TIME DASHBOARD WITH BLAZOR, AZURE FUNCTION COSMOS DB AN AZURE S...
CREATING REAL TIME DASHBOARD WITH BLAZOR, AZURE FUNCTION COSMOS DB AN AZURE S...CodeOps Technologies LLP
 
WRITE SCALABLE COMMUNICATION APPLICATION WITH POWER OF SERVERLESS
WRITE SCALABLE COMMUNICATION APPLICATION WITH POWER OF SERVERLESSWRITE SCALABLE COMMUNICATION APPLICATION WITH POWER OF SERVERLESS
WRITE SCALABLE COMMUNICATION APPLICATION WITH POWER OF SERVERLESSCodeOps Technologies LLP
 
Training And Serving ML Model Using Kubeflow by Jayesh Sharma
Training And Serving ML Model Using Kubeflow by Jayesh SharmaTraining And Serving ML Model Using Kubeflow by Jayesh Sharma
Training And Serving ML Model Using Kubeflow by Jayesh SharmaCodeOps Technologies LLP
 
Deploy Microservices To Kubernetes Without Secrets by Reenu Saluja
Deploy Microservices To Kubernetes Without Secrets by Reenu SalujaDeploy Microservices To Kubernetes Without Secrets by Reenu Saluja
Deploy Microservices To Kubernetes Without Secrets by Reenu SalujaCodeOps Technologies LLP
 
Leverage Azure Tech stack for any Kubernetes cluster via Azure Arc by Saiyam ...
Leverage Azure Tech stack for any Kubernetes cluster via Azure Arc by Saiyam ...Leverage Azure Tech stack for any Kubernetes cluster via Azure Arc by Saiyam ...
Leverage Azure Tech stack for any Kubernetes cluster via Azure Arc by Saiyam ...CodeOps Technologies LLP
 
YAML Tips For Kubernetes by Neependra Khare
YAML Tips For Kubernetes by Neependra KhareYAML Tips For Kubernetes by Neependra Khare
YAML Tips For Kubernetes by Neependra KhareCodeOps Technologies LLP
 
Must Know Azure Kubernetes Best Practices And Features For Better Resiliency ...
Must Know Azure Kubernetes Best Practices And Features For Better Resiliency ...Must Know Azure Kubernetes Best Practices And Features For Better Resiliency ...
Must Know Azure Kubernetes Best Practices And Features For Better Resiliency ...CodeOps Technologies LLP
 
Monitor Azure Kubernetes Cluster With Prometheus by Mamta Jha
Monitor Azure Kubernetes Cluster With Prometheus by Mamta JhaMonitor Azure Kubernetes Cluster With Prometheus by Mamta Jha
Monitor Azure Kubernetes Cluster With Prometheus by Mamta JhaCodeOps Technologies LLP
 
Functional Programming in Java 8 - Lambdas and Streams
Functional Programming in Java 8 - Lambdas and StreamsFunctional Programming in Java 8 - Lambdas and Streams
Functional Programming in Java 8 - Lambdas and StreamsCodeOps Technologies LLP
 
Distributed Tracing: New DevOps Foundation
Distributed Tracing: New DevOps FoundationDistributed Tracing: New DevOps Foundation
Distributed Tracing: New DevOps FoundationCodeOps Technologies LLP
 
"Distributed Tracing: New DevOps Foundation" by Jayesh Ahire
"Distributed Tracing: New DevOps Foundation" by Jayesh Ahire  "Distributed Tracing: New DevOps Foundation" by Jayesh Ahire
"Distributed Tracing: New DevOps Foundation" by Jayesh Ahire CodeOps Technologies LLP
 

Mehr von CodeOps Technologies LLP (20)

AWS Serverless Event-driven Architecture - in lastminute.com meetup
AWS Serverless Event-driven Architecture - in lastminute.com meetupAWS Serverless Event-driven Architecture - in lastminute.com meetup
AWS Serverless Event-driven Architecture - in lastminute.com meetup
 
Understanding azure batch service
Understanding azure batch serviceUnderstanding azure batch service
Understanding azure batch service
 
DEVOPS AND MACHINE LEARNING
DEVOPS AND MACHINE LEARNINGDEVOPS AND MACHINE LEARNING
DEVOPS AND MACHINE LEARNING
 
SERVERLESS MIDDLEWARE IN AZURE FUNCTIONS
SERVERLESS MIDDLEWARE IN AZURE FUNCTIONSSERVERLESS MIDDLEWARE IN AZURE FUNCTIONS
SERVERLESS MIDDLEWARE IN AZURE FUNCTIONS
 
BUILDING SERVERLESS SOLUTIONS WITH AZURE FUNCTIONS
BUILDING SERVERLESS SOLUTIONS WITH AZURE FUNCTIONSBUILDING SERVERLESS SOLUTIONS WITH AZURE FUNCTIONS
BUILDING SERVERLESS SOLUTIONS WITH AZURE FUNCTIONS
 
APPLYING DEVOPS STRATEGIES ON SCALE USING AZURE DEVOPS SERVICES
APPLYING DEVOPS STRATEGIES ON SCALE USING AZURE DEVOPS SERVICESAPPLYING DEVOPS STRATEGIES ON SCALE USING AZURE DEVOPS SERVICES
APPLYING DEVOPS STRATEGIES ON SCALE USING AZURE DEVOPS SERVICES
 
BUILD, TEST & DEPLOY .NET CORE APPS IN AZURE DEVOPS
BUILD, TEST & DEPLOY .NET CORE APPS IN AZURE DEVOPSBUILD, TEST & DEPLOY .NET CORE APPS IN AZURE DEVOPS
BUILD, TEST & DEPLOY .NET CORE APPS IN AZURE DEVOPS
 
CREATE RELIABLE AND LOW-CODE APPLICATION IN SERVERLESS MANNER
CREATE RELIABLE AND LOW-CODE APPLICATION IN SERVERLESS MANNERCREATE RELIABLE AND LOW-CODE APPLICATION IN SERVERLESS MANNER
CREATE RELIABLE AND LOW-CODE APPLICATION IN SERVERLESS MANNER
 
CREATING REAL TIME DASHBOARD WITH BLAZOR, AZURE FUNCTION COSMOS DB AN AZURE S...
CREATING REAL TIME DASHBOARD WITH BLAZOR, AZURE FUNCTION COSMOS DB AN AZURE S...CREATING REAL TIME DASHBOARD WITH BLAZOR, AZURE FUNCTION COSMOS DB AN AZURE S...
CREATING REAL TIME DASHBOARD WITH BLAZOR, AZURE FUNCTION COSMOS DB AN AZURE S...
 
WRITE SCALABLE COMMUNICATION APPLICATION WITH POWER OF SERVERLESS
WRITE SCALABLE COMMUNICATION APPLICATION WITH POWER OF SERVERLESSWRITE SCALABLE COMMUNICATION APPLICATION WITH POWER OF SERVERLESS
WRITE SCALABLE COMMUNICATION APPLICATION WITH POWER OF SERVERLESS
 
Training And Serving ML Model Using Kubeflow by Jayesh Sharma
Training And Serving ML Model Using Kubeflow by Jayesh SharmaTraining And Serving ML Model Using Kubeflow by Jayesh Sharma
Training And Serving ML Model Using Kubeflow by Jayesh Sharma
 
Deploy Microservices To Kubernetes Without Secrets by Reenu Saluja
Deploy Microservices To Kubernetes Without Secrets by Reenu SalujaDeploy Microservices To Kubernetes Without Secrets by Reenu Saluja
Deploy Microservices To Kubernetes Without Secrets by Reenu Saluja
 
Leverage Azure Tech stack for any Kubernetes cluster via Azure Arc by Saiyam ...
Leverage Azure Tech stack for any Kubernetes cluster via Azure Arc by Saiyam ...Leverage Azure Tech stack for any Kubernetes cluster via Azure Arc by Saiyam ...
Leverage Azure Tech stack for any Kubernetes cluster via Azure Arc by Saiyam ...
 
YAML Tips For Kubernetes by Neependra Khare
YAML Tips For Kubernetes by Neependra KhareYAML Tips For Kubernetes by Neependra Khare
YAML Tips For Kubernetes by Neependra Khare
 
Must Know Azure Kubernetes Best Practices And Features For Better Resiliency ...
Must Know Azure Kubernetes Best Practices And Features For Better Resiliency ...Must Know Azure Kubernetes Best Practices And Features For Better Resiliency ...
Must Know Azure Kubernetes Best Practices And Features For Better Resiliency ...
 
Monitor Azure Kubernetes Cluster With Prometheus by Mamta Jha
Monitor Azure Kubernetes Cluster With Prometheus by Mamta JhaMonitor Azure Kubernetes Cluster With Prometheus by Mamta Jha
Monitor Azure Kubernetes Cluster With Prometheus by Mamta Jha
 
Jet brains space intro presentation
Jet brains space intro presentationJet brains space intro presentation
Jet brains space intro presentation
 
Functional Programming in Java 8 - Lambdas and Streams
Functional Programming in Java 8 - Lambdas and StreamsFunctional Programming in Java 8 - Lambdas and Streams
Functional Programming in Java 8 - Lambdas and Streams
 
Distributed Tracing: New DevOps Foundation
Distributed Tracing: New DevOps FoundationDistributed Tracing: New DevOps Foundation
Distributed Tracing: New DevOps Foundation
 
"Distributed Tracing: New DevOps Foundation" by Jayesh Ahire
"Distributed Tracing: New DevOps Foundation" by Jayesh Ahire  "Distributed Tracing: New DevOps Foundation" by Jayesh Ahire
"Distributed Tracing: New DevOps Foundation" by Jayesh Ahire
 

Kürzlich hochgeladen

Amazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilitiesAmazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilitiesKrzysztofKkol1
 
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingOpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingShane Coughlan
 
Understanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM ArchitectureUnderstanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM Architecturerahul_net
 
Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldKeeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldRoberto Pérez Alcolea
 
Data modeling 101 - Basics - Software Domain
Data modeling 101 - Basics - Software DomainData modeling 101 - Basics - Software Domain
Data modeling 101 - Basics - Software DomainAbdul Ahad
 
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxUI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxAndreas Kunz
 
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4jGraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4jNeo4j
 
Ronisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited CatalogueRonisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited Catalogueitservices996
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Rob Geurden
 
Pros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdf
Pros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdfPros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdf
Pros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdfkalichargn70th171
 
Zer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdfZer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdfmaor17
 
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonLeveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonApplitools
 
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...OnePlan Solutions
 
Strategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsStrategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsJean Silva
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLarge Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLionel Briand
 
Introduction to Firebase Workshop Slides
Introduction to Firebase Workshop SlidesIntroduction to Firebase Workshop Slides
Introduction to Firebase Workshop Slidesvaideheekore1
 
Best Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh ITBest Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh ITmanoharjgpsolutions
 
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdfAndrey Devyatkin
 
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxThe Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxRTS corp
 
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full RecordingOpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full RecordingShane Coughlan
 

Kürzlich hochgeladen (20)

Amazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilitiesAmazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilities
 
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingOpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
 
Understanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM ArchitectureUnderstanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM Architecture
 
Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldKeeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository world
 
Data modeling 101 - Basics - Software Domain
Data modeling 101 - Basics - Software DomainData modeling 101 - Basics - Software Domain
Data modeling 101 - Basics - Software Domain
 
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxUI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
 
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4jGraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
 
Ronisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited CatalogueRonisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited Catalogue
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...
 
Pros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdf
Pros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdfPros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdf
Pros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdf
 
Zer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdfZer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdf
 
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonLeveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
 
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
 
Strategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsStrategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero results
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLarge Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and Repair
 
Introduction to Firebase Workshop Slides
Introduction to Firebase Workshop SlidesIntroduction to Firebase Workshop Slides
Introduction to Firebase Workshop Slides
 
Best Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh ITBest Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh IT
 
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf
 
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxThe Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
 
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full RecordingOpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
 

Hands on Ethereum - Getting Started

  • 1. CodeOps Technologies Ethereum - Getting Started Ganesh Samarthyam ganesh@codeops.tech
  • 2.
  • 4. What did we observe? ❖ “Ethereum” is a blockchain ❖ “Ether” is the currency (crypto-currency) - ETH ❖ There are “blocks” and “transactions” ❖ The latest block added was 5916712 ❖ There are 265.09 M transactions so far
  • 6. What did we observe? ❖ Current market cap is USD 47 billions ❖ Awesome for something in 3 years (initial release was in 30 July 2015) ❖ The last block was added 14.5 seconds back ❖ That’s typical of the rate in which blocks are added ❖ The transactions per second is 5.2 ❖ That’s pathetic in financial industry terms in which a millions transactions per second is not a big deal ❖ We’ll discuss “Hash Rate” and “Network Difficulty” a bit later
  • 7. Let’s look at latest blocks
  • 8. What did we observe? ❖ Every block is sequentially numbered ❖ Starting from zero, which is a special “genesis block” ❖ Each block has many transactions ❖ Not fixed number with wide variations - e.g., one was 19 and another one was 104 ❖ There are different “miners” - like “Ethermine” and “f2pool_2” here ❖ And they are rewarded with Ethers (typically around 4 ethers)
  • 9. Let’s zoom in for more details https://etherscan.io/blocks The Nth block How old is the block? How many transactions are in this block? How many “uncles” for this block? Who was that lucky miner to get the ethers? How many Ethers was the reward to the miner? How much gas was consumed? What was the maximum gas allowed? How much was the average gas price per transaction?
  • 10. Let’s look at an actual block How many transactions are there in this block? What is the hash value of this block? (256 bits) Pointer (hash) to the previous block What is the name and address of the successful miner? The size of the block in bytes Proof-of-work value How many ethers were rewarded to the successful miner?
  • 11. Let’s look a few actual transactions Hashes of the transactions in this block All these transactions belong to the same block (mined at the same time) Addresses of the transaction initiators This is a Ether currency transaction (to this recipient address) These three are transactions to contract addresses Every transaction (transferring ether or to contract and even failed ones) costs money (its all money, honey!) This is a failed transaction (Log says: “Error encountered during contract execution [Out of gas])”
  • 12. Let’s look at an actual transaction The hash code of the transaction (256 bites) The transaction is part of this block When did this transaction happen? The source address that initiated this currency transfer transaction How much Ether was transferred to the recipient? What was the gas limit and how much was consumed? The money was sent to this address What much did the sender have to shell out to make this transfer?
  • 13. And there are thousands of Tx waiting
  • 14. What’s this “Gwei” stuff? 1 ether = 1e18 wei Smallest unit is wei Unit Wei Value Wei Wei 1 wei 1 Kwei (babbage) 1e3 wei 1,000 Mwei (lovelace) 1e6 wei 1,000,000 Gwei (shannon) 1e9 wei 1,000,000,000 Microether (szabo) 1e12 wei 1,000,000,000,000 Milliether (finney) 1e15 wei 1,000,000,000,000,000 Ether 1e18 wei 1,000,000,000,000,000,000
  • 17. Understanding Ethereum Accounts ❖ Two kinds of accounts: ❖ Externally Owned Accounts (EOA), or simply “Accounts” ❖ Contract Accounts, or simply “Contracts” ❖ Accounts are of 160 bits (shown as “0x” prefixed hexadecimal values - visually 40 alpha-numeric characters) ❖ Example:“0x281055Afc982d96fAB65b3a49cAc8b878184Cb16”
  • 18. Let’s look at an account
  • 19. It’s all public info! ❖ With just the address, anyone can view the balance, number of transactions, to which account the ether came in or went out, etc. ❖ But only if you own the account, you can perform the transactions ;-) ❖ Transactions could be to other accounts or to contracts ❖ There could be “token transfers” as well - we’ll discuss tokens later
  • 20. Let’s look at a contract account
  • 21. Most of the contract code is public
  • 22. “Hash” - fingerprint of data "Priyanka Chopra (Piggy Chops)" 'ee457b98565f0c6f6b013acab80ea02dfa80e7e8' SHA1
  • 23. Using SHA-1 in Python >>> import hashlib >>> text = b"Priyanka Chopra (Piggy Chops)" >>> hashlib.sha1(text).hexdigest() 'ee457b98565f0c6f6b013acab80ea02dfa80e7e8' >>> text = b"Deepika Padukone (Deepi)" >>> hashlib.sha1(text).hexdigest() ‘4efdf9172c4d3fa56540466f8c8a371a45e472fc’ >>> len('4efdf9172c4d3fa56540466f8c8a371a45e472fc') 40 >>> len('4efdf9172c4d3fa56540466f8c8a371a45e472fc') * 4 160
  • 24. Using SHA-3 in Python >>> import hashlib >>> text = b"Deepika Padukone (Deepi)" >>> hashlib.sha3_256(text).hexdigest() '6229691c1f27cb6b9d4bce8b87ca1a3f0521cdc4aaff1b572be5c400946af29d' >>> len(_) 64 >>> _ * 4 256 ‘Ethereum's development coincided with the development of the SHA3 standard, and the standards process made a late change in the padding of the finalized hash algorithm, so that Ethereum's "sha3_256" and "sha3_512" hashes are not standard sha3 hashes, but a variant often referred to as "Keccak-256" and "Keccak-512" in other contexts.’ - From https://github.com/ethereum/wiki/wiki/Ethash
  • 25. For given text, hex is same! >>> import hashlib >>> text = b"Priyanka Chopra (Piggy Chops)" >>> hashlib.sha1(text).hexdigest() ‘ee457b98565f0c6f6b013acab80ea02dfa80e7e8' >>> anothertext = b"Priyanka Chopra (Piggy Chops)" >>> hashlib.sha1(anothertext).hexdigest() ‘ee457b98565f0c6f6b013acab80ea02dfa80e7e8' >>> variationtext = b"Priyanka Chopra" >>> hashlib.sha1(variationtext).hexdigest() ‘0a6b5f3111ba3bcc87445942ec2bfcbe2dc28644' http://www.sha1-online.com/
  • 28. Programmatic account creation $ cat createacct.js const ethers = require('ethers'); var wallet = ethers.Wallet.createRandom(); // var privateKey = "0x0123456789012345678901234567890123456789012345678901234567890123"; // var wallet = new ethers.Wallet(random); console.log(wallet); $ node createacct.js Wallet { privateKey: '0xf10107a2dd4e0901374d93324a59ade40512d7c946746cdd9b24dc75ceba81a1', provider: [Getter/Setter], defaultGasLimit: [Getter/Setter], address: '0xCbd98A04812e824fC481e6244A3D776c0cA8Ef4f', sign: [Function], mnemonic: 'field crop small food shoe design chronic push fox lazy keep clinic', path: 'm/44'/60'/0'/0/0' } $
  • 29. Programmatic ether transfer tiny.cc/ethtransfer // we are using .env file for configuration details (i.e., from & to account addresses & the private key for the from address) require('dotenv').config() // we are only using the 'ethers' module for transferring ether programmatically const ethers = require('ethers'); const providers = ethers.providers; // we are currenly using rinkeby test network; change it to mainnet for real transactions (and improve this code before you do that ;-)) const network = 'rinkeby'; const provider = providers.getDefaultProvider(network); var address = process.env.FROM_ADDRESS console.log(`Using the given from and to addresses & the private key for the from address for $ {network} network`); // first retrive the account balance (you cannot transfer if you have no ether or less ether than the transfer amount!) const balance = provider.getBalance(address).then(function(balance) { var etherString = ethers.utils.formatEther(balance); console.log(`The balance in your account is: ${etherString}`); return etherString; });
  • 30. Programmatic ether transfer tiny.cc/ethtransfer const privateKey = process.env.PRIVATE_KEY const wallet = new ethers.Wallet(privateKey); wallet.provider = provider; // how much ether to transfer const amountToTransfer = "0.01"; // create a transaction object with the to address and the amount of ether to be transferred var transaction = { to: process.env.TO_ADDRESS, value: ethers.utils.parseEther(amountToTransfer) }; // get the current estimate for the amount of Gas required for performing the transaction and set that as the gas limit as well const estimateGasPromise = wallet.estimateGas(transaction); estimateGasPromise.then(function(gasEstimate) { console.log(`The estimated gast for performing the transaction is: ${gasEstimate.toString()}`); console.log(`Keeping the gas limit also the same: ${gasEstimate.toString()}`); transaction.gasLimit = gasEstimate; // that's it! do the transaction var sendTransactionPromise = wallet.sendTransaction(transaction); // if the transaction succeeds, you'll get here with the transaction hash! sendTransactionPromise.then(function(transactionHash) { console.log(`Transaction successful!!! `); console.log(`The transaction hash is: ${transactionHash.hash}`); // go to this URL to check more details about the transaction console.log(`Etherscan transaction URL for complete details: https://${network}.etherscan.io/tx/${transactionHash.hash}`); }); }); // done!
  • 31. Programmatic ether transfer tiny.cc/ethtransfer $ node working.js Using the given from and to addresses & the private key for the from address for rinkeby network The balance in your account is: 2.979958 The estimated gast for performing the transaction is: 21000 Keeping the gas limit also the same: 21000 Transaction successful!!! The transaction hash is: 0xd08f20663a1c957490ca1e3e748db7bf1e0e65959c58ad7d608bae93a75c47fd Etherscan transaction URL for complete details: https://rinkeby.etherscan.io/ tx/0xd08f20663a1c957490ca1e3e748db7bf1e0e65959c58ad7d608bae93a75c47fd
  • 33. Important Resources / URLs ❖ https://www.ethereum.org/ - Ethereum homepage ❖ http://ethdocs.org/ - Detailed documentation ❖ https://github.com/ethereum/wiki/wiki - Ethereum Wiki ❖ etherscan.io - An online blockchain explorer ❖ https://en.bitcoinwiki.org/wiki/Blockchain - Blockchain description & links
  • 34. Tools to install ❖ Geth & Tools - https://geth.ethereum.org/downloads/ ❖ Solc - http://solidity.readthedocs.io/en/v0.4.21/installing- solidity.html ❖ Metamask (Chrome extension) - https://chrome.google.com/ webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn ❖ Web3.js - https://github.com/ethereum/web3.js/ ❖ Ganache - https://github.com/trufflesuite/ganache ❖ Truffle -https://github.com/trufflesuite/truffle ❖ Mist - https://github.com/ethereum/mist/releases