SlideShare a Scribd company logo
gething started
geth=
golang + blockchain + ethereum
sathishvj
Talk Set: Utils and Projects in Go
● Identify interesting tools and projects in Go
○ As opposed to focusing only on the language
● Highlight big/awesome projects and inform
dev audience it was written in Go
● Encourage open source contribution in Go
● Promote daily use tools written in Go
● SFO searches Go; BLR searches JSP
○ Courtesy: stackoverflow research data
● For orgs shifting to Go, make available a
wider developer pool
Blockchain
Intro quick highlights of blockchain,
ethereum
Blockchain
A blockchain is a distributed database
that maintains a continuously growing
list of records called blocks secured from
tampering and revision. Each block
contains a timestamp and a link to a
previous block.
4See my more elaborate talk at GDG DevFest: slideshare.net/SathishVJ/blockchain-bitcoin
Transactions & Blocks
5
Bitcoin
A distributed, decentralized,
digital cryptocurrency that relies
on Blockchain technology.
6
Ethereum
A blockchain-based distributed
computing platform, featuring smart
contract functionality. It provides a
decentralized virtual machine that
can execute peer-to-peer contracts
using a cryptocurrency called ether.
7
Blockchain : Bitcoin : Ethereum
Core
Tech
Gen 1: Special
Purpose Apps
Next Gen:
Platform for Apps
8
Ethereum
Clients What all are available?
Ethereum Clients
● Multiple clients based on Ethereum Yellow Paper
● In Go, Rust, C++, Python, JavaScript, etc.
● The Go based Ethereum client is called geth
● Got a dedicated website recently
○ Geth.ethereum.org
● Can also be used a library
○ In Mobiles
○ https://ethereum.karalabe.com/talks/2016-devcon.html
Geth Usage
● Largest ethereum client is the go client,
geth
● Most versions used are up to date, >
1.5.3
Miners in India
● About 100 nodes
● Mostly using geth
Ethereum &
DApps
Architecture Components - Current and Future
Ethereum, Swarm, Whisper
● Contracts: decentralized logic
● Swarm: decentralized storage
● Whisper: decentralized
messaging
Tech Components
● DApp: Distributed Application
● Solidity: a language to write contracts on ethereum
● web3: a library to interact with ethereum blockchain (web3.eth). Contains
other objects like (web3.shh for Whisper)
● Import web3.js in your browser to interact with the blockchain
● General term web3
○ No one definition
○ Multiple meanings in books and magazines
○ Here, it signifies an always “on”, distributed web, capable of massive scale
gething started - ethereum & using the geth golang client
PoW to PoS, Casper & Tendermint
● Strategies to arrive at consensus in a distributed network
● Proof of Work expends too much energy.
● PoW is skewed towards those who can spend more money.
● Proof of Stake puts a certain number of coins to give one a chance to mine.
○ More egalitarian. Greater security with more participating nodes.
● Casper: scenarios where little to no assumptions should be made on the
altruism of users or validators, e.g. public blockchains.
● Tendermint: scenarios where participants have existing trust or where chance
of attack is less, e.g. consortium or private/hybrid blockchains
Using Geth Demo & Cmds to use the geth client
Project Links
● Github: https://github.com/ethereum/go-ethereum
● Releases: https://github.com/ethereum/go-ethereum/releases
● Downloads: https://geth.ethereum.org/downloads/
● Main site: https://www.ethereum.org
● Install command line tools: https://www.ethereum.org/cli
Installing Geth
● Bundled as a part of GUI tools like Mist/Ethereum-Wallet
● Installable from source
● Install with package manager
○ Homebrew, apt-get
● From standalone pre-built bundle
From Pre-built Bundle
● My Demo Setup: Google Compute Engine, small VM, Ubuntu, attached and
mounted disk of 100GB
● wget
https://gethstore.blob.core.windows.net/builds/geth-alltools-linux-amd64
-1.5.5-ff07d548.tar.gz
○ Check for latest version at https://geth.ethereum.org/downloads/
● tar -xvf geth-alltools-linux-amd64-1.5.5-ff07d548.tar.gz
● cd geth-alltools-linux-amd64-1.5.5-ff07d548
● ./geth
○ This default command will start an ethereum client node
○ Mining is not automatic/default
● Add geth to PATH if you want
Ethereum Account
● Your unique id on the Ethereum platform
○ A number like 0x2f2c...
● Online services can provide you an ethereum account (like email)
○ myetherwallet.com, coinbase.com, jaxx.io, etc.
● You can also setup your own account
● For convenience, use the GUIs Mist/Ethereum-Wallet
○ Electron based, cross platform Dapp browser/Wallet
● Or use cmd line
● geth account list
○ Account #0: {...key...}
/home/ethmine/.ethereum/keystore/UTC--2016-12-16T19-26-20.479741815Z--[key]
New Ethereum Account with Geth
● geth account new
Your new account is locked with a password. Please give a password. Do
not forget this password.
Passphrase:
Repeat Passphrase:
Address: {2fcb....}
● geth account list
● Any number of accounts can be created.
Backup Keystore and Password
● When you run your own node, backup your keystore and password
○ Imagine if you ran your own email server
● There is no way you can get to your account otherwise
● Locations on OSs
○ Windows: C:Usersusername%appdata%RoamingEthereumkeystore
○ Linux: ~/.ethereum/keystore
○ Mac: ~/Library/Ethereum/keystore
● Backup entire keystore folder …
● Or individual files that look like UTC--2016-12-03T18-26-12.919550734Z--key
Starting a Node
● You will need about 50GB of space as of now
● geth --datadir mydatadir --keystore ~/.ethereum
○ Datadir contains the blockchain data
○ I wanted the datadir to be on a different mount point
● A full sync in the beginning takes quite some time (a few days on a 1v-cpu, 1GB
machine) ...
● Speed it up on first sync by using the --fast option
○ This finished in many minutes
○ Cannot mine with just the fast sync
Exporting and Importing Chaindata
● Export & import existing blockchain data from existing sync-d node
● To export to binary format
○ geth export <filename>
● To import from binary format
○ geth export <filename>
Attaching UI to Node
● When UI starts, it checks for a running node
● If it exists, UI attaches to node
● If not, UI starts a node
○ Default is geth
○ Can configure others
● If you want to have a particular client …
○ Start the ethereum client on cmd line
○ Then start Mist or Ethereum-Wallet UI
1
2
Dir Structure
$ find mydatadir -maxdepth 2
mydatadir
mydatadir/geth
mydatadir/geth/chaindata
mydatadir/geth/nodes
mydatadir/geth/LOCK
mydatadir/geth/nodekey
mydatadir/geth.ipc
$ find ~/.ethereum/ -maxdepth 2
.ethereum/
.ethereum/history
.ethereum/keystore
.ethereum/keystore/UTC--2016-12-16T1
9-26-20.479741815Z--[your key]
Mining
● Run your ethereum node as a miner with --mine option
● To be a miner, you need at least one account, the ‘etherbase’ account
Coinbase/Etherbase Account
● If you mine a block, you get a reward of ETHs
● This is added to your ‘etherbase’ account
○ In bitcoin it is ‘coinbase’. Not to be confused with a company of the same name
● By default it is account ‘0’
○ … as listed in geth account list
● But you can specify another one
● --mine option without etherbase set will error out
geth console
● An interactive javascript console where you can do ‘web3’ programming
● Start with
○ geth console
● Exit with Ctrl+D or with >exit
● Attach to another running geth instance with
○ geth attach
● Then you can use console functions on one terminal while, say, sync logs show
on the other
● If running in a specific dir,
○ geth attach mydatadir/geth.ipc
Console commands
● miner.start()
● miner.stop()
● admin.datadir
● net.peerCount
● admin.peers
● web3.fromWei(eth.getBalance(eth.coinbase), "ether")
● personal.newAccount("password")
● personal.listAccounts
Thank you
Questions
References
● Ethereum fundraiser infogram, with ether supply:
http://i.imgur.com/eI2mffD.png
●
Investing in
Ethereum Can we invest in it like Bitcoin or the
Share Market?
Cryptocurrency Investments
● Extremely volatile in general
● Some gigantic wins; many large losses
● Ether is the token/currency (ETH)
○ <1$ -> ~20$ -> 7.5$
○ Was $1B+ Market cap, but lower now
● Very strong technology
● Very good, responsive, knowledgeable, open team
● Very positive sentiment
● Many new, popular projects on Ethereum platform
● Long term investors using current lows to enter
Price and Market Cap
Ether Supply
● http://ethereum.stackexchange.com/questions/443/what-is-the-total-supply-
of-ether
The issuance model is not fixed yet. It is an ongoing discussion whether
or not the costs for the consensus needs to be financed by inflation that
basically taxes every coin holder or if transaction fees are sufficient.
Please note that the costs for secure consensus are much lower
with Casper compared to current proof of work. More details here
For this reason it is guaranteed, that the current issuance amount
will not be increased and might even drop to 0. Another ongoing
discussion is whether or not issues of new coins should be used to fund
ongoing development. A prerequisites for this would be a DAO with a
widely accepted mechanism to control spending of funds effectively. But
also in this case the newly issued coins would not increase.
60 million + 12 million + 18million = ~90million
60 million - is the Pre-sale.
12 million - is the dev fund, 0.2coins per 1 coin sold in
the crowdsale.
~18 million - 1 million coins mined per month for 18
months prior to going from POW to POS.
inflation
After a while, 15,626,576 ether won't represent much of the
total ether available, making the system dis-inflationary (i.e.,
inflation perpetually trending towards 0 but never reaching it).
Ad

Recommended

Explaining Ethereum
Explaining Ethereum
Pascal Van Hecke
 
BCHGraz - Meetup #8 - Intro & Ethereum
BCHGraz - Meetup #8 - Intro & Ethereum
BlockchainHub Graz
 
Ethereum under the Hood, intro for developers as preparation for Blockchain H...
Ethereum under the Hood, intro for developers as preparation for Blockchain H...
Pascal Van Hecke
 
Ethereum Intro
Ethereum Intro
Dejan Radic
 
Ethereum VM and DSLs for Smart Contracts (updated on May 12th 2015)
Ethereum VM and DSLs for Smart Contracts (updated on May 12th 2015)
Zvi Avraham
 
Bitcoin, Ethereum, Smart Contract & Blockchain
Bitcoin, Ethereum, Smart Contract & Blockchain
Jitendra Chittoda
 
Intro to smart contract on blockchain en
Intro to smart contract on blockchain en
Nicholas Lin
 
Ethereum Mining How To
Ethereum Mining How To
Nugroho Gito
 
Intro to Blockchain - And, by the way, what the heck is proof-of-work?
Intro to Blockchain - And, by the way, what the heck is proof-of-work?
Jim Flynn
 
Introduction to blockchain and cryptocurrency technologies
Introduction to blockchain and cryptocurrency technologies
Paweł Wacławczyk
 
Every thing bitcoin in baby language
Every thing bitcoin in baby language
Ossai Nduka
 
The Blockchain and JavaScript
The Blockchain and JavaScript
Portia Burton
 
Blockchain, bitcoin
Blockchain, bitcoin
Sathish VJ
 
Bitcoin and Ethereum
Bitcoin and Ethereum
Jongseok Choi
 
Dappsmedia smartcontract _write_smartcontracts_on_console_ethereum
Dappsmedia smartcontract _write_smartcontracts_on_console_ethereum
Tomoaki Sato
 
Blockchain and bitcoin fundamentals (usages and applications)
Blockchain and bitcoin fundamentals (usages and applications)
Amir Rafati
 
14 Jan17- Nullmeets -Blockchain concept decoded by Ninad Sarang
14 Jan17- Nullmeets -Blockchain concept decoded by Ninad Sarang
Ninad Sarang
 
Introduction to Ethereum
Introduction to Ethereum
Terek Judi
 
Multi-Signature Crypto-Wallets: Nakov at Blockchain Berlin 2018
Multi-Signature Crypto-Wallets: Nakov at Blockchain Berlin 2018
Svetlin Nakov
 
以比特幣為例的區塊鏈技術介紹 ( Intro to Blockchain using Bitcoin as an example)
以比特幣為例的區塊鏈技術介紹 ( Intro to Blockchain using Bitcoin as an example)
Nicholas Lin
 
Bitcoin in a Nutshell
Bitcoin in a Nutshell
Daniel Chan
 
EDCON 2017 sharing @Taipei Ethereum Meetup
EDCON 2017 sharing @Taipei Ethereum Meetup
Chang-Wu Chen
 
Metadata in the Blockchain: The OP_RETURN Explosion
Metadata in the Blockchain: The OP_RETURN Explosion
Coin Sciences Ltd
 
Introduction to Ethereum
Introduction to Ethereum
Arnold Pham
 
Ethereum
Ethereum
Brian Yap
 
Ethereum Blockchain explained
Ethereum Blockchain explained
EthWorks
 
Blockchain Corporate Style
Blockchain Corporate Style
Narendranath Reddy
 
CBGTBT - Part 3 - Transactions 101
CBGTBT - Part 3 - Transactions 101
Blockstrap.com
 
The Ethereum Experience
The Ethereum Experience
Ethereum
 
Ethereum: From there to here, and ownards yonder
Ethereum: From there to here, and ownards yonder
gavofyork
 

More Related Content

What's hot (20)

Intro to Blockchain - And, by the way, what the heck is proof-of-work?
Intro to Blockchain - And, by the way, what the heck is proof-of-work?
Jim Flynn
 
Introduction to blockchain and cryptocurrency technologies
Introduction to blockchain and cryptocurrency technologies
Paweł Wacławczyk
 
Every thing bitcoin in baby language
Every thing bitcoin in baby language
Ossai Nduka
 
The Blockchain and JavaScript
The Blockchain and JavaScript
Portia Burton
 
Blockchain, bitcoin
Blockchain, bitcoin
Sathish VJ
 
Bitcoin and Ethereum
Bitcoin and Ethereum
Jongseok Choi
 
Dappsmedia smartcontract _write_smartcontracts_on_console_ethereum
Dappsmedia smartcontract _write_smartcontracts_on_console_ethereum
Tomoaki Sato
 
Blockchain and bitcoin fundamentals (usages and applications)
Blockchain and bitcoin fundamentals (usages and applications)
Amir Rafati
 
14 Jan17- Nullmeets -Blockchain concept decoded by Ninad Sarang
14 Jan17- Nullmeets -Blockchain concept decoded by Ninad Sarang
Ninad Sarang
 
Introduction to Ethereum
Introduction to Ethereum
Terek Judi
 
Multi-Signature Crypto-Wallets: Nakov at Blockchain Berlin 2018
Multi-Signature Crypto-Wallets: Nakov at Blockchain Berlin 2018
Svetlin Nakov
 
以比特幣為例的區塊鏈技術介紹 ( Intro to Blockchain using Bitcoin as an example)
以比特幣為例的區塊鏈技術介紹 ( Intro to Blockchain using Bitcoin as an example)
Nicholas Lin
 
Bitcoin in a Nutshell
Bitcoin in a Nutshell
Daniel Chan
 
EDCON 2017 sharing @Taipei Ethereum Meetup
EDCON 2017 sharing @Taipei Ethereum Meetup
Chang-Wu Chen
 
Metadata in the Blockchain: The OP_RETURN Explosion
Metadata in the Blockchain: The OP_RETURN Explosion
Coin Sciences Ltd
 
Introduction to Ethereum
Introduction to Ethereum
Arnold Pham
 
Ethereum
Ethereum
Brian Yap
 
Ethereum Blockchain explained
Ethereum Blockchain explained
EthWorks
 
Blockchain Corporate Style
Blockchain Corporate Style
Narendranath Reddy
 
CBGTBT - Part 3 - Transactions 101
CBGTBT - Part 3 - Transactions 101
Blockstrap.com
 
Intro to Blockchain - And, by the way, what the heck is proof-of-work?
Intro to Blockchain - And, by the way, what the heck is proof-of-work?
Jim Flynn
 
Introduction to blockchain and cryptocurrency technologies
Introduction to blockchain and cryptocurrency technologies
Paweł Wacławczyk
 
Every thing bitcoin in baby language
Every thing bitcoin in baby language
Ossai Nduka
 
The Blockchain and JavaScript
The Blockchain and JavaScript
Portia Burton
 
Blockchain, bitcoin
Blockchain, bitcoin
Sathish VJ
 
Bitcoin and Ethereum
Bitcoin and Ethereum
Jongseok Choi
 
Dappsmedia smartcontract _write_smartcontracts_on_console_ethereum
Dappsmedia smartcontract _write_smartcontracts_on_console_ethereum
Tomoaki Sato
 
Blockchain and bitcoin fundamentals (usages and applications)
Blockchain and bitcoin fundamentals (usages and applications)
Amir Rafati
 
14 Jan17- Nullmeets -Blockchain concept decoded by Ninad Sarang
14 Jan17- Nullmeets -Blockchain concept decoded by Ninad Sarang
Ninad Sarang
 
Introduction to Ethereum
Introduction to Ethereum
Terek Judi
 
Multi-Signature Crypto-Wallets: Nakov at Blockchain Berlin 2018
Multi-Signature Crypto-Wallets: Nakov at Blockchain Berlin 2018
Svetlin Nakov
 
以比特幣為例的區塊鏈技術介紹 ( Intro to Blockchain using Bitcoin as an example)
以比特幣為例的區塊鏈技術介紹 ( Intro to Blockchain using Bitcoin as an example)
Nicholas Lin
 
Bitcoin in a Nutshell
Bitcoin in a Nutshell
Daniel Chan
 
EDCON 2017 sharing @Taipei Ethereum Meetup
EDCON 2017 sharing @Taipei Ethereum Meetup
Chang-Wu Chen
 
Metadata in the Blockchain: The OP_RETURN Explosion
Metadata in the Blockchain: The OP_RETURN Explosion
Coin Sciences Ltd
 
Introduction to Ethereum
Introduction to Ethereum
Arnold Pham
 
Ethereum Blockchain explained
Ethereum Blockchain explained
EthWorks
 
CBGTBT - Part 3 - Transactions 101
CBGTBT - Part 3 - Transactions 101
Blockstrap.com
 

Viewers also liked (20)

The Ethereum Experience
The Ethereum Experience
Ethereum
 
Ethereum: From there to here, and ownards yonder
Ethereum: From there to here, and ownards yonder
gavofyork
 
Price and ethereum
Price and ethereum
Dan Antonov
 
Ethereum Sentiment Research Spotlight Study
Ethereum Sentiment Research Spotlight Study
CoinDesk
 
Why ethereum is better than bitcoin
Why ethereum is better than bitcoin
Dan Antonov
 
Ethereum 101
Ethereum 101
Chang-Wu Chen
 
Blockchain bootcamp for boards
Blockchain bootcamp for boards
Jason Liew 廖颂成
 
Investing in bitcoin-based technologies
Investing in bitcoin-based technologies
Blockchain Technologies sp. z o.o.
 
Start investing in Bitcoin today - book preview
Start investing in Bitcoin today - book preview
Janne M. Lohvansuu
 
Mining Pools and Profits
Mining Pools and Profits
David Evans
 
Collaborating and Creating shared accountability for the successful implement...
Collaborating and Creating shared accountability for the successful implement...
Leo Barella
 
Get started on ethereum
Get started on ethereum
Kent Barton
 
The evolution of the Architecture of Enterprises (AKA Enterprise Architecture)
The evolution of the Architecture of Enterprises (AKA Enterprise Architecture)
Leo Barella
 
Building Blocks Of A Business Model
Building Blocks Of A Business Model
Lakesia Wright
 
9 BUILDING BLOCKS FOR A SUCCESSFUL BLOCKCHAIN INDUSTRY | BLOCKSTARS.IO
9 BUILDING BLOCKS FOR A SUCCESSFUL BLOCKCHAIN INDUSTRY | BLOCKSTARS.IO
BlockStars.io
 
Ethereum Classic 18 August 2016
Ethereum Classic 18 August 2016
Avtar Sehra
 
Capability-based planning with TOGAF & ArchiMate
Capability-based planning with TOGAF & ArchiMate
Anastasios Papazoglou
 
Eris and Ethereum - Decentralized computing on a blockchain
Eris and Ethereum - Decentralized computing on a blockchain
BlockStars.io
 
Enterprise solution design principles
Enterprise solution design principles
Leo Barella
 
Blockchains 101 - Muneeb Ali, Blockstack Labs
Blockchains 101 - Muneeb Ali, Blockstack Labs
WithTheBest
 
The Ethereum Experience
The Ethereum Experience
Ethereum
 
Ethereum: From there to here, and ownards yonder
Ethereum: From there to here, and ownards yonder
gavofyork
 
Price and ethereum
Price and ethereum
Dan Antonov
 
Ethereum Sentiment Research Spotlight Study
Ethereum Sentiment Research Spotlight Study
CoinDesk
 
Why ethereum is better than bitcoin
Why ethereum is better than bitcoin
Dan Antonov
 
Start investing in Bitcoin today - book preview
Start investing in Bitcoin today - book preview
Janne M. Lohvansuu
 
Mining Pools and Profits
Mining Pools and Profits
David Evans
 
Collaborating and Creating shared accountability for the successful implement...
Collaborating and Creating shared accountability for the successful implement...
Leo Barella
 
Get started on ethereum
Get started on ethereum
Kent Barton
 
The evolution of the Architecture of Enterprises (AKA Enterprise Architecture)
The evolution of the Architecture of Enterprises (AKA Enterprise Architecture)
Leo Barella
 
Building Blocks Of A Business Model
Building Blocks Of A Business Model
Lakesia Wright
 
9 BUILDING BLOCKS FOR A SUCCESSFUL BLOCKCHAIN INDUSTRY | BLOCKSTARS.IO
9 BUILDING BLOCKS FOR A SUCCESSFUL BLOCKCHAIN INDUSTRY | BLOCKSTARS.IO
BlockStars.io
 
Ethereum Classic 18 August 2016
Ethereum Classic 18 August 2016
Avtar Sehra
 
Capability-based planning with TOGAF & ArchiMate
Capability-based planning with TOGAF & ArchiMate
Anastasios Papazoglou
 
Eris and Ethereum - Decentralized computing on a blockchain
Eris and Ethereum - Decentralized computing on a blockchain
BlockStars.io
 
Enterprise solution design principles
Enterprise solution design principles
Leo Barella
 
Blockchains 101 - Muneeb Ali, Blockstack Labs
Blockchains 101 - Muneeb Ali, Blockstack Labs
WithTheBest
 
Ad

Similar to gething started - ethereum & using the geth golang client (20)

The Ethereum Geth Client
The Ethereum Geth Client
Arnold Pham
 
Ethereum introduction
Ethereum introduction
kesavan N B
 
Build your own private blockchain based on ethereum
Build your own private blockchain based on ethereum
Mehran Pourvahab
 
Exploring ethereum
Exploring ethereum
Nikhil Krishna Nair
 
Blockchain Chapter #4.pdf
Blockchain Chapter #4.pdf
ssuser79c46d1
 
Ethereum in a nutshell
Ethereum in a nutshell
Daniel Chan
 
Ethereum
Ethereum
NexThoughts Technologies
 
Ethereum.pptx
Ethereum.pptx
keepsmile22
 
Java and the blockchain - introducing web3j
Java and the blockchain - introducing web3j
Conor Svensson
 
How does ethereum work, anyway?
How does ethereum work, anyway?
philrussell001
 
Ethereum
Ethereum
Shermin Voshmgir
 
Introduction to ethereum_public
Introduction to ethereum_public
antitree
 
Building Apps with Ethereum Smart Contract
Building Apps with Ethereum Smart Contract
Vaideeswaran Sethuraman
 
Ethereum
Ethereum
Suman Nayak
 
Ethereum and its Applications| Introduction to Ethereum.pptx
Ethereum and its Applications| Introduction to Ethereum.pptx
ROHITAHUJA66
 
Ethereum Block Chain
Ethereum Block Chain
SanatPandoh
 
Ethereum Block Chain
Ethereum Block Chain
SanatPandoh
 
Ethereum @ descon 2016
Ethereum @ descon 2016
Predrag Radović
 
Introduction_to_Blockchain_&_Ethereum.pptx
Introduction_to_Blockchain_&_Ethereum.pptx
WijdenBenothmen1
 
Ethereum_New.pptx
Ethereum_New.pptx
SATISHKUMARPRAJAPATI4
 
The Ethereum Geth Client
The Ethereum Geth Client
Arnold Pham
 
Ethereum introduction
Ethereum introduction
kesavan N B
 
Build your own private blockchain based on ethereum
Build your own private blockchain based on ethereum
Mehran Pourvahab
 
Blockchain Chapter #4.pdf
Blockchain Chapter #4.pdf
ssuser79c46d1
 
Ethereum in a nutshell
Ethereum in a nutshell
Daniel Chan
 
Java and the blockchain - introducing web3j
Java and the blockchain - introducing web3j
Conor Svensson
 
How does ethereum work, anyway?
How does ethereum work, anyway?
philrussell001
 
Introduction to ethereum_public
Introduction to ethereum_public
antitree
 
Building Apps with Ethereum Smart Contract
Building Apps with Ethereum Smart Contract
Vaideeswaran Sethuraman
 
Ethereum and its Applications| Introduction to Ethereum.pptx
Ethereum and its Applications| Introduction to Ethereum.pptx
ROHITAHUJA66
 
Ethereum Block Chain
Ethereum Block Chain
SanatPandoh
 
Ethereum Block Chain
Ethereum Block Chain
SanatPandoh
 
Introduction_to_Blockchain_&_Ethereum.pptx
Introduction_to_Blockchain_&_Ethereum.pptx
WijdenBenothmen1
 
Ad

More from Sathish VJ (8)

Why Go Lang?
Why Go Lang?
Sathish VJ
 
Docker and Kubernetes 101 workshop
Docker and Kubernetes 101 workshop
Sathish VJ
 
Apps and Hacks Showreel
Apps and Hacks Showreel
Sathish VJ
 
Microsoft Ventures Hackday 2014 Bangalore - Limitless App
Microsoft Ventures Hackday 2014 Bangalore - Limitless App
Sathish VJ
 
AngularJS Beginners Workshop
AngularJS Beginners Workshop
Sathish VJ
 
Smart Ride - our winning Internet of Things hack at the weekend Apigee hackathon
Smart Ride - our winning Internet of Things hack at the weekend Apigee hackathon
Sathish VJ
 
Google AppEngine - For GBG Bangalore
Google AppEngine - For GBG Bangalore
Sathish VJ
 
Internet of Things GDG Bangalore 2013
Internet of Things GDG Bangalore 2013
Sathish VJ
 
Docker and Kubernetes 101 workshop
Docker and Kubernetes 101 workshop
Sathish VJ
 
Apps and Hacks Showreel
Apps and Hacks Showreel
Sathish VJ
 
Microsoft Ventures Hackday 2014 Bangalore - Limitless App
Microsoft Ventures Hackday 2014 Bangalore - Limitless App
Sathish VJ
 
AngularJS Beginners Workshop
AngularJS Beginners Workshop
Sathish VJ
 
Smart Ride - our winning Internet of Things hack at the weekend Apigee hackathon
Smart Ride - our winning Internet of Things hack at the weekend Apigee hackathon
Sathish VJ
 
Google AppEngine - For GBG Bangalore
Google AppEngine - For GBG Bangalore
Sathish VJ
 
Internet of Things GDG Bangalore 2013
Internet of Things GDG Bangalore 2013
Sathish VJ
 

Recently uploaded (20)

PyCon SG 25 - Firecracker Made Easy with Python.pdf
PyCon SG 25 - Firecracker Made Easy with Python.pdf
Muhammad Yuga Nugraha
 
Raman Bhaumik - Passionate Tech Enthusiast
Raman Bhaumik - Passionate Tech Enthusiast
Raman Bhaumik
 
Wenn alles versagt - IBM Tape schützt, was zählt! Und besonders mit dem neust...
Wenn alles versagt - IBM Tape schützt, was zählt! Und besonders mit dem neust...
Josef Weingand
 
Information Security Response Team Nepal_npCERT_Vice_President_Sudan_Jha.pdf
Information Security Response Team Nepal_npCERT_Vice_President_Sudan_Jha.pdf
ICT Frame Magazine Pvt. Ltd.
 
AI vs Human Writing: Can You Tell the Difference?
AI vs Human Writing: Can You Tell the Difference?
Shashi Sathyanarayana, Ph.D
 
Using the SQLExecutor for Data Quality Management: aka One man's love for the...
Using the SQLExecutor for Data Quality Management: aka One man's love for the...
Safe Software
 
OpenACC and Open Hackathons Monthly Highlights June 2025
OpenACC and Open Hackathons Monthly Highlights June 2025
OpenACC
 
OWASP Barcelona 2025 Threat Model Library
OWASP Barcelona 2025 Threat Model Library
PetraVukmirovic
 
ReSTIR [DI]: Spatiotemporal reservoir resampling for real-time ray tracing ...
ReSTIR [DI]: Spatiotemporal reservoir resampling for real-time ray tracing ...
revolcs10
 
Techniques for Automatic Device Identification and Network Assignment.pdf
Techniques for Automatic Device Identification and Network Assignment.pdf
Priyanka Aash
 
War_And_Cyber_3_Years_Of_Struggle_And_Lessons_For_Global_Security.pdf
War_And_Cyber_3_Years_Of_Struggle_And_Lessons_For_Global_Security.pdf
biswajitbanerjee38
 
MuleSoft for AgentForce : Topic Center and API Catalog
MuleSoft for AgentForce : Topic Center and API Catalog
shyamraj55
 
FIDO Seminar: Targeting Trust: The Future of Identity in the Workforce.pptx
FIDO Seminar: Targeting Trust: The Future of Identity in the Workforce.pptx
FIDO Alliance
 
Enhance GitHub Copilot using MCP - Enterprise version.pdf
Enhance GitHub Copilot using MCP - Enterprise version.pdf
Nilesh Gule
 
Lessons Learned from Developing Secure AI Workflows.pdf
Lessons Learned from Developing Secure AI Workflows.pdf
Priyanka Aash
 
AI VIDEO MAGAZINE - June 2025 - r/aivideo
AI VIDEO MAGAZINE - June 2025 - r/aivideo
1pcity Studios, Inc
 
From Manual to Auto Searching- FME in the Driver's Seat
From Manual to Auto Searching- FME in the Driver's Seat
Safe Software
 
Securing Account Lifecycles in the Age of Deepfakes.pptx
Securing Account Lifecycles in the Age of Deepfakes.pptx
FIDO Alliance
 
Connecting Data and Intelligence: The Role of FME in Machine Learning
Connecting Data and Intelligence: The Role of FME in Machine Learning
Safe Software
 
Cyber Defense Matrix Workshop - RSA Conference
Cyber Defense Matrix Workshop - RSA Conference
Priyanka Aash
 
PyCon SG 25 - Firecracker Made Easy with Python.pdf
PyCon SG 25 - Firecracker Made Easy with Python.pdf
Muhammad Yuga Nugraha
 
Raman Bhaumik - Passionate Tech Enthusiast
Raman Bhaumik - Passionate Tech Enthusiast
Raman Bhaumik
 
Wenn alles versagt - IBM Tape schützt, was zählt! Und besonders mit dem neust...
Wenn alles versagt - IBM Tape schützt, was zählt! Und besonders mit dem neust...
Josef Weingand
 
Information Security Response Team Nepal_npCERT_Vice_President_Sudan_Jha.pdf
Information Security Response Team Nepal_npCERT_Vice_President_Sudan_Jha.pdf
ICT Frame Magazine Pvt. Ltd.
 
AI vs Human Writing: Can You Tell the Difference?
AI vs Human Writing: Can You Tell the Difference?
Shashi Sathyanarayana, Ph.D
 
Using the SQLExecutor for Data Quality Management: aka One man's love for the...
Using the SQLExecutor for Data Quality Management: aka One man's love for the...
Safe Software
 
OpenACC and Open Hackathons Monthly Highlights June 2025
OpenACC and Open Hackathons Monthly Highlights June 2025
OpenACC
 
OWASP Barcelona 2025 Threat Model Library
OWASP Barcelona 2025 Threat Model Library
PetraVukmirovic
 
ReSTIR [DI]: Spatiotemporal reservoir resampling for real-time ray tracing ...
ReSTIR [DI]: Spatiotemporal reservoir resampling for real-time ray tracing ...
revolcs10
 
Techniques for Automatic Device Identification and Network Assignment.pdf
Techniques for Automatic Device Identification and Network Assignment.pdf
Priyanka Aash
 
War_And_Cyber_3_Years_Of_Struggle_And_Lessons_For_Global_Security.pdf
War_And_Cyber_3_Years_Of_Struggle_And_Lessons_For_Global_Security.pdf
biswajitbanerjee38
 
MuleSoft for AgentForce : Topic Center and API Catalog
MuleSoft for AgentForce : Topic Center and API Catalog
shyamraj55
 
FIDO Seminar: Targeting Trust: The Future of Identity in the Workforce.pptx
FIDO Seminar: Targeting Trust: The Future of Identity in the Workforce.pptx
FIDO Alliance
 
Enhance GitHub Copilot using MCP - Enterprise version.pdf
Enhance GitHub Copilot using MCP - Enterprise version.pdf
Nilesh Gule
 
Lessons Learned from Developing Secure AI Workflows.pdf
Lessons Learned from Developing Secure AI Workflows.pdf
Priyanka Aash
 
AI VIDEO MAGAZINE - June 2025 - r/aivideo
AI VIDEO MAGAZINE - June 2025 - r/aivideo
1pcity Studios, Inc
 
From Manual to Auto Searching- FME in the Driver's Seat
From Manual to Auto Searching- FME in the Driver's Seat
Safe Software
 
Securing Account Lifecycles in the Age of Deepfakes.pptx
Securing Account Lifecycles in the Age of Deepfakes.pptx
FIDO Alliance
 
Connecting Data and Intelligence: The Role of FME in Machine Learning
Connecting Data and Intelligence: The Role of FME in Machine Learning
Safe Software
 
Cyber Defense Matrix Workshop - RSA Conference
Cyber Defense Matrix Workshop - RSA Conference
Priyanka Aash
 

gething started - ethereum & using the geth golang client

  • 1. gething started geth= golang + blockchain + ethereum sathishvj
  • 2. Talk Set: Utils and Projects in Go ● Identify interesting tools and projects in Go ○ As opposed to focusing only on the language ● Highlight big/awesome projects and inform dev audience it was written in Go ● Encourage open source contribution in Go ● Promote daily use tools written in Go ● SFO searches Go; BLR searches JSP ○ Courtesy: stackoverflow research data ● For orgs shifting to Go, make available a wider developer pool
  • 3. Blockchain Intro quick highlights of blockchain, ethereum
  • 4. Blockchain A blockchain is a distributed database that maintains a continuously growing list of records called blocks secured from tampering and revision. Each block contains a timestamp and a link to a previous block. 4See my more elaborate talk at GDG DevFest: slideshare.net/SathishVJ/blockchain-bitcoin
  • 6. Bitcoin A distributed, decentralized, digital cryptocurrency that relies on Blockchain technology. 6
  • 7. Ethereum A blockchain-based distributed computing platform, featuring smart contract functionality. It provides a decentralized virtual machine that can execute peer-to-peer contracts using a cryptocurrency called ether. 7
  • 8. Blockchain : Bitcoin : Ethereum Core Tech Gen 1: Special Purpose Apps Next Gen: Platform for Apps 8
  • 9. Ethereum Clients What all are available?
  • 10. Ethereum Clients ● Multiple clients based on Ethereum Yellow Paper ● In Go, Rust, C++, Python, JavaScript, etc. ● The Go based Ethereum client is called geth ● Got a dedicated website recently ○ Geth.ethereum.org ● Can also be used a library ○ In Mobiles ○ https://ethereum.karalabe.com/talks/2016-devcon.html
  • 11. Geth Usage ● Largest ethereum client is the go client, geth ● Most versions used are up to date, > 1.5.3
  • 12. Miners in India ● About 100 nodes ● Mostly using geth
  • 14. Ethereum, Swarm, Whisper ● Contracts: decentralized logic ● Swarm: decentralized storage ● Whisper: decentralized messaging
  • 15. Tech Components ● DApp: Distributed Application ● Solidity: a language to write contracts on ethereum ● web3: a library to interact with ethereum blockchain (web3.eth). Contains other objects like (web3.shh for Whisper) ● Import web3.js in your browser to interact with the blockchain ● General term web3 ○ No one definition ○ Multiple meanings in books and magazines ○ Here, it signifies an always “on”, distributed web, capable of massive scale
  • 17. PoW to PoS, Casper & Tendermint ● Strategies to arrive at consensus in a distributed network ● Proof of Work expends too much energy. ● PoW is skewed towards those who can spend more money. ● Proof of Stake puts a certain number of coins to give one a chance to mine. ○ More egalitarian. Greater security with more participating nodes. ● Casper: scenarios where little to no assumptions should be made on the altruism of users or validators, e.g. public blockchains. ● Tendermint: scenarios where participants have existing trust or where chance of attack is less, e.g. consortium or private/hybrid blockchains
  • 18. Using Geth Demo & Cmds to use the geth client
  • 19. Project Links ● Github: https://github.com/ethereum/go-ethereum ● Releases: https://github.com/ethereum/go-ethereum/releases ● Downloads: https://geth.ethereum.org/downloads/ ● Main site: https://www.ethereum.org ● Install command line tools: https://www.ethereum.org/cli
  • 20. Installing Geth ● Bundled as a part of GUI tools like Mist/Ethereum-Wallet ● Installable from source ● Install with package manager ○ Homebrew, apt-get ● From standalone pre-built bundle
  • 21. From Pre-built Bundle ● My Demo Setup: Google Compute Engine, small VM, Ubuntu, attached and mounted disk of 100GB ● wget https://gethstore.blob.core.windows.net/builds/geth-alltools-linux-amd64 -1.5.5-ff07d548.tar.gz ○ Check for latest version at https://geth.ethereum.org/downloads/ ● tar -xvf geth-alltools-linux-amd64-1.5.5-ff07d548.tar.gz ● cd geth-alltools-linux-amd64-1.5.5-ff07d548 ● ./geth ○ This default command will start an ethereum client node ○ Mining is not automatic/default ● Add geth to PATH if you want
  • 22. Ethereum Account ● Your unique id on the Ethereum platform ○ A number like 0x2f2c... ● Online services can provide you an ethereum account (like email) ○ myetherwallet.com, coinbase.com, jaxx.io, etc. ● You can also setup your own account ● For convenience, use the GUIs Mist/Ethereum-Wallet ○ Electron based, cross platform Dapp browser/Wallet ● Or use cmd line ● geth account list ○ Account #0: {...key...} /home/ethmine/.ethereum/keystore/UTC--2016-12-16T19-26-20.479741815Z--[key]
  • 23. New Ethereum Account with Geth ● geth account new Your new account is locked with a password. Please give a password. Do not forget this password. Passphrase: Repeat Passphrase: Address: {2fcb....} ● geth account list ● Any number of accounts can be created.
  • 24. Backup Keystore and Password ● When you run your own node, backup your keystore and password ○ Imagine if you ran your own email server ● There is no way you can get to your account otherwise ● Locations on OSs ○ Windows: C:Usersusername%appdata%RoamingEthereumkeystore ○ Linux: ~/.ethereum/keystore ○ Mac: ~/Library/Ethereum/keystore ● Backup entire keystore folder … ● Or individual files that look like UTC--2016-12-03T18-26-12.919550734Z--key
  • 25. Starting a Node ● You will need about 50GB of space as of now ● geth --datadir mydatadir --keystore ~/.ethereum ○ Datadir contains the blockchain data ○ I wanted the datadir to be on a different mount point ● A full sync in the beginning takes quite some time (a few days on a 1v-cpu, 1GB machine) ... ● Speed it up on first sync by using the --fast option ○ This finished in many minutes ○ Cannot mine with just the fast sync
  • 26. Exporting and Importing Chaindata ● Export & import existing blockchain data from existing sync-d node ● To export to binary format ○ geth export <filename> ● To import from binary format ○ geth export <filename>
  • 27. Attaching UI to Node ● When UI starts, it checks for a running node ● If it exists, UI attaches to node ● If not, UI starts a node ○ Default is geth ○ Can configure others ● If you want to have a particular client … ○ Start the ethereum client on cmd line ○ Then start Mist or Ethereum-Wallet UI 1 2
  • 28. Dir Structure $ find mydatadir -maxdepth 2 mydatadir mydatadir/geth mydatadir/geth/chaindata mydatadir/geth/nodes mydatadir/geth/LOCK mydatadir/geth/nodekey mydatadir/geth.ipc $ find ~/.ethereum/ -maxdepth 2 .ethereum/ .ethereum/history .ethereum/keystore .ethereum/keystore/UTC--2016-12-16T1 9-26-20.479741815Z--[your key]
  • 29. Mining ● Run your ethereum node as a miner with --mine option ● To be a miner, you need at least one account, the ‘etherbase’ account
  • 30. Coinbase/Etherbase Account ● If you mine a block, you get a reward of ETHs ● This is added to your ‘etherbase’ account ○ In bitcoin it is ‘coinbase’. Not to be confused with a company of the same name ● By default it is account ‘0’ ○ … as listed in geth account list ● But you can specify another one ● --mine option without etherbase set will error out
  • 31. geth console ● An interactive javascript console where you can do ‘web3’ programming ● Start with ○ geth console ● Exit with Ctrl+D or with >exit ● Attach to another running geth instance with ○ geth attach ● Then you can use console functions on one terminal while, say, sync logs show on the other ● If running in a specific dir, ○ geth attach mydatadir/geth.ipc
  • 32. Console commands ● miner.start() ● miner.stop() ● admin.datadir ● net.peerCount ● admin.peers ● web3.fromWei(eth.getBalance(eth.coinbase), "ether") ● personal.newAccount("password") ● personal.listAccounts
  • 34. References ● Ethereum fundraiser infogram, with ether supply: http://i.imgur.com/eI2mffD.png ●
  • 35. Investing in Ethereum Can we invest in it like Bitcoin or the Share Market?
  • 36. Cryptocurrency Investments ● Extremely volatile in general ● Some gigantic wins; many large losses ● Ether is the token/currency (ETH) ○ <1$ -> ~20$ -> 7.5$ ○ Was $1B+ Market cap, but lower now ● Very strong technology ● Very good, responsive, knowledgeable, open team ● Very positive sentiment ● Many new, popular projects on Ethereum platform ● Long term investors using current lows to enter
  • 38. Ether Supply ● http://ethereum.stackexchange.com/questions/443/what-is-the-total-supply- of-ether The issuance model is not fixed yet. It is an ongoing discussion whether or not the costs for the consensus needs to be financed by inflation that basically taxes every coin holder or if transaction fees are sufficient. Please note that the costs for secure consensus are much lower with Casper compared to current proof of work. More details here For this reason it is guaranteed, that the current issuance amount will not be increased and might even drop to 0. Another ongoing discussion is whether or not issues of new coins should be used to fund ongoing development. A prerequisites for this would be a DAO with a widely accepted mechanism to control spending of funds effectively. But also in this case the newly issued coins would not increase. 60 million + 12 million + 18million = ~90million 60 million - is the Pre-sale. 12 million - is the dev fund, 0.2coins per 1 coin sold in the crowdsale. ~18 million - 1 million coins mined per month for 18 months prior to going from POW to POS. inflation After a while, 15,626,576 ether won't represent much of the total ether available, making the system dis-inflationary (i.e., inflation perpetually trending towards 0 but never reaching it).