SlideShare a Scribd company logo
The Blockchain and JavaScript
Portia Burton
@pkafei
Node.js Interactive
Who am I?
My name is Portia Burton
I am a full-stack developer at the
Atlantic magazine
Became interested in blockchains
earlier this year
Not a cryptographic expert
Background about Blockchain and Bitcoin
What is a Blockchain?
A blockchain is a cross between a decentralized data store and bittorrent. It is similar
to a database but there isn’t a database administrator.
What is Bitcoin?
Type of Cryptocurrency
Creation based on paper by Satoshi Nakamoto titled
“Bitcoin: Peer-to-Peer Electronic Cash System”
Peer-to-peer which means transactions happen
without a third party. Alice can send money
directly to Bob
Bitcoin vs. Blockchain
Bitcoin is part of a blockchain
Blockchain is a digital ledger of transactions
Each transaction is cryptographically signed
Blockchains are trustless
The bitcoin blockchain is open to everyone
We will focus on the Blockchain
Can an average developer build
blockchain applications?
Yes, We Can!
But first, some more background
Many Different Types of
Cryptocurrencies
The Blockchain and JavaScript
Ethereum
The Blockchain and JavaScript
Introduction to Ethereum
Ethereum is a programmable blockchain, every new blockchain spawned from
Ethereum has the same properties as Ethereum
Ethereum Virtual Machine is the low level machine language
Is Turing complete, unlike bitcoin which does not have looping capabilities
It also is aware of multiple states, unlike bitcoin which is only aware of two states
(spent and unspent)
Different Consensus Mechanisms
Proof of Work: Uses the Etash algorithm. The Etash
algorithm is based on Bitcoin’s the Dagger-Hashimoto
algorithm. ⛏⛓
Proof of Stake: Proof of Stake is another way of validating. It
calculates the weight of the node, being proportional to its
computational resources. It’s less resource intensive than
Proof of Work.
Smart Contracts
What is a Smart Contract?
Stored on the blockchain and
executed by code
Many smart contracts are written in
Solidity (syntax is similar to
JavaScript)
Powered by gas which can be
computationally mined or
purchased in an exchange
People and machines can interact
with it
Transaction: Signed data package that stores a message to be sent
from an externally owned account
GAS: the name for the execution fee that senders
of transactions need to pay for operations on
Ethereum blockchain
VALUE (field): The amount of wei to transfer
from sender to the recipient
STARTGAS (value): Representing the maximum
number of computational steps the transaction
execution is allowed to take
GASPRICE (value): Representing the fee the
sender is willing to pay for gas
Applications of Ethereum Blockchain of Smart Contracts
Self-executing legal contracts
Create “American Idol” where people can vote using generated tokens
Company boards can be ran virtually
Dropbox business model create and sell encrypted storage space
Predicting financial futures based on an oracle
Ethereum Chains
The Blockchain and JavaScript
Different Blockchains
Public blockchain: It is the official Ethereum chain that everyone can read and interact
with
Testnet blockchain: The official test chain of Ethereum. Good way to test contracts
without wasting real ether
Private blockchain: This is a blockchain that you can create yourself. This blockchain
can be freely accessed by others, or you can add addresses by invite only
How to build a custom blockchain?
1. Create a Genesis file
2. Init your blockchain locally on the command line*
3. Start your chain again, this time with parameters (not in the documentation)
*Be sure to run “init” each time
Genesis File
Nonce: a random or pseudo-random number that
can only be used once
gasLimit: is the highest amount you are willing to
pay for a computation
Alloc: how much money that you allocate to your
blockchain
{
"nonce": "0x0000000000000042", "timestamp":
"0x0",
"parentHash":
"0x0000000000000000000000000000000000000000000000000000
000000000000",
"extraData": "0x0", "gasLimit": "0x8000000",
"difficulty": "0x400",
"mixhash":
"0x0000000000000000000000000000000000000000000000000000
000000000000",
"coinbase":
"0x3333333333333333333333333333333333333333",
"alloc": { }
}
CustomGenesis.json
Private Blockchain Parameters
Use these parameters in the cli when creating a custom
blockchain
Nodiscover: Other people will not discover your blockchain
RPC: JS interface for your node
Networkid: Create a custom networkid inter
geth --identity "Testing" --rpc --rpcport "8080" --
rpccorsdomain "*" --datadir "C:chainsTestChain1" --
port "30303" --nodiscover --rpcapi "db,eth,net,web3"
--networkid 1999 console
In Conclusion
Combine Mist and Ethereum
Download Mist
https://github.com/ethereum/mist
Download Democracy Contract:
https://www.ethereum.org/dao
Blockchain Technology Growing Pains
Forces different parties (or contractors) to be savy about code
Still very new platform and technology
Solidity Contract Bugs
Transaction-Ordering Bug (TOD): Smart contract assumes a particular state of a
contract that doesn’t exist
Timestamp Dependence Bug: Asynchronous network is disconnected from a
synchronized global clock. Some contracts assume that network is on global contract
Unchecked Send: Most common exploit. Attacker elicits unexpected behavior from the
contract by calling if from a carefully constructed call-stack
Smart Contract Bloopers
https://ethereum.karalabe.com/talks/2016-hackethon.html#1
Enough About Me: How can you get started today?
Solidity Tutorial: https://solidity.readthedocs.io/en/develop/
Bootstrap Meteor App: https://github.com/SilentCicero/meteor-dapp-boilerplate
Example Dapps: http://ethereum.stackexchange.com/questions/2940/where-can-i-find-some-solidity-smart-contract-source-code-
examples
Command Line Interface of Interacting with the Ethereum Network: https://www.ethereum.org/cli
Meteor: https://www.meteor.com/
Different Ethereum Frameworks
These frameworks provide developers the tools need to create, test, and deploy smart
contracts using Ethereum
Truffle: https://github.com/ConsenSys/truffle
The Dao: https://github.com/slockit/DAO
Embark: https://github.com/iurimatias/embark-framework
Thank You!
References
1. http://ethdocs.org/en/latest/mining.html#what-is-mining
2. http://ethdocs.org/en/latest/frequently-asked-questions/frequently-asked-
questions.html#what-s-the-difference-between-account-and-wallet-contract
3. http://www.coindesk.com/making-sense-smart-contracts/
4. https://github.com/ethereum/go-ethereum/wiki/Command-Line-Options
5. http://www.ethdocs.org/en/latest/contracts-and-transactions/account-types-gas-
and-transactions.html
6. https://blog.ethereum.org/2016/07/12/build-server-less-applications-mist/
Ad

Recommended

An Introduction to Ripple XRP
An Introduction to Ripple XRP
Tradefast
 
Advantages and disadvantages of permissionless blockchain
Advantages and disadvantages of permissionless blockchain
Blockchain Council
 
Cripto currency
Cripto currency
DC Graphics
 
Blockchain
Blockchain
Software Infrastructure
 
Crypto-currency Bitcoin In India
Crypto-currency Bitcoin In India
Dinesh Muniandy
 
How does blockchain work
How does blockchain work
Shishir Aryal
 
Cryptocurrency
Cryptocurrency
MohitYadav291
 
Solidity
Solidity
gavofyork
 
Blockchain Technology
Blockchain Technology
PalakGulati10
 
Blockchain ppt
Blockchain ppt
Wajihawaseem
 
Introduction to Ethereum
Introduction to Ethereum
Akshay Kumar
 
Introduction to Blockchain
Introduction to Blockchain
Jordan Harris
 
Ethereum Smart contract
Ethereum Smart contract
George Theofilis
 
Blockchain and AI
Blockchain and AI
Ahmed Banafa
 
Cryptocurrency Presentation.pptx
Cryptocurrency Presentation.pptx
DhruvJha39
 
Introduction to Blockchain
Introduction to Blockchain
mohammad alkhalil
 
Blockchain Presentation
Blockchain Presentation
Zied GUESMI
 
An in depth presentation of Cryptocurrency.
An in depth presentation of Cryptocurrency.
SanjeebSamanta1
 
Legality of bitcoins by Prashant Mali
Legality of bitcoins by Prashant Mali
Adv. Prashant Mali ♛ [Bsc(Phy),MSc(Comp Sci), CCFP,CISSA,LLM]
 
All About Ethereum
All About Ethereum
Oodles Technologies Pvt. Ltd.
 
Bitcoin
Bitcoin
vishav preet
 
Smart contracts using web3.js
Smart contracts using web3.js
Felix Crisan
 
Blockchain Technology Fundamentals
Blockchain Technology Fundamentals
Experfy
 
Blockchain Study(1) - What is Blockchain?
Blockchain Study(1) - What is Blockchain?
Fermat Jade
 
Blockchain
Blockchain
Frank Calberg
 
Ethereum
Ethereum
Shermin Voshmgir
 
Introducing MQTT
Introducing MQTT
Andy Piper
 
Ethereum
Ethereum
NexThoughts Technologies
 
Java and the blockchain - introducing web3j
Java and the blockchain - introducing web3j
Conor Svensson
 
Proxies are Awesome!
Proxies are Awesome!
Brendan Eich
 

More Related Content

What's hot (20)

Blockchain Technology
Blockchain Technology
PalakGulati10
 
Blockchain ppt
Blockchain ppt
Wajihawaseem
 
Introduction to Ethereum
Introduction to Ethereum
Akshay Kumar
 
Introduction to Blockchain
Introduction to Blockchain
Jordan Harris
 
Ethereum Smart contract
Ethereum Smart contract
George Theofilis
 
Blockchain and AI
Blockchain and AI
Ahmed Banafa
 
Cryptocurrency Presentation.pptx
Cryptocurrency Presentation.pptx
DhruvJha39
 
Introduction to Blockchain
Introduction to Blockchain
mohammad alkhalil
 
Blockchain Presentation
Blockchain Presentation
Zied GUESMI
 
An in depth presentation of Cryptocurrency.
An in depth presentation of Cryptocurrency.
SanjeebSamanta1
 
Legality of bitcoins by Prashant Mali
Legality of bitcoins by Prashant Mali
Adv. Prashant Mali ♛ [Bsc(Phy),MSc(Comp Sci), CCFP,CISSA,LLM]
 
All About Ethereum
All About Ethereum
Oodles Technologies Pvt. Ltd.
 
Bitcoin
Bitcoin
vishav preet
 
Smart contracts using web3.js
Smart contracts using web3.js
Felix Crisan
 
Blockchain Technology Fundamentals
Blockchain Technology Fundamentals
Experfy
 
Blockchain Study(1) - What is Blockchain?
Blockchain Study(1) - What is Blockchain?
Fermat Jade
 
Blockchain
Blockchain
Frank Calberg
 
Ethereum
Ethereum
Shermin Voshmgir
 
Introducing MQTT
Introducing MQTT
Andy Piper
 
Ethereum
Ethereum
NexThoughts Technologies
 

Viewers also liked (6)

Java and the blockchain - introducing web3j
Java and the blockchain - introducing web3j
Conor Svensson
 
Proxies are Awesome!
Proxies are Awesome!
Brendan Eich
 
Becoming a blockchain professional
Becoming a blockchain professional
Portia Burton
 
Blockchain Programming
Blockchain Programming
Rhea Myers
 
Python, Blockchain, and Byte-Size Change
Python, Blockchain, and Byte-Size Change
Portia Burton
 
Bitcoin: What You Need to Know
Bitcoin: What You Need to Know
Portia Burton
 
Java and the blockchain - introducing web3j
Java and the blockchain - introducing web3j
Conor Svensson
 
Proxies are Awesome!
Proxies are Awesome!
Brendan Eich
 
Becoming a blockchain professional
Becoming a blockchain professional
Portia Burton
 
Blockchain Programming
Blockchain Programming
Rhea Myers
 
Python, Blockchain, and Byte-Size Change
Python, Blockchain, and Byte-Size Change
Portia Burton
 
Bitcoin: What You Need to Know
Bitcoin: What You Need to Know
Portia Burton
 
Ad

Similar to The Blockchain and JavaScript (20)

Ethereum
Ethereum
Brian Yap
 
Ethereum Block Chain
Ethereum Block Chain
SanatPandoh
 
Javascript toolset for Ethereum Smart Contract development
Javascript toolset for Ethereum Smart Contract development
BugSense
 
The JavaScript toolset for development on Ethereum
The JavaScript toolset for development on Ethereum
GreeceJS
 
Exploring ethereum
Exploring ethereum
Nikhil Krishna Nair
 
Blockchain Chapter #4.pdf
Blockchain Chapter #4.pdf
ssuser79c46d1
 
Evaluation of Ethereum
Evaluation of Ethereum
Giuseppe Andreetti
 
Ethereum in a nutshell
Ethereum in a nutshell
Daniel Chan
 
Blockchain, Ethereum and Business Applications
Blockchain, Ethereum and Business Applications
Matthias Zimmermann
 
Understanding blockchain
Understanding blockchain
Priyab Satoshi
 
Introduction to Ethereum
Introduction to Ethereum
Arnold Pham
 
Ethereum
Ethereum
V C
 
Block chain - Smart contacts.pptx
Block chain - Smart contacts.pptx
shraddhaphirke1
 
BCHGraz - Meetup #8 - Intro & Ethereum
BCHGraz - Meetup #8 - Intro & Ethereum
BlockchainHub Graz
 
The Foundation of Smart Contract Development on Ethereum
The Foundation of Smart Contract Development on Ethereum
NAtional Institute of TEchnology Rourkela , Galgotias University
 
Ethereum Block Chain
Ethereum Block Chain
SanatPandoh
 
Etherium Intro for techies
Etherium Intro for techies
Joseph Holbrook, Chief Learning Officer (CLO)
 
Introduction to Blockchain with an Ethereuem Hands-on
Introduction to Blockchain with an Ethereuem Hands-on
Johann Romefort
 
Blockchain for Developers
Blockchain for Developers
Shimi Bandiel
 
Jerome de Tychey - Building Web3.0 with Ethereum - Codemotion Berlin 2018
Jerome de Tychey - Building Web3.0 with Ethereum - Codemotion Berlin 2018
Codemotion
 
Ethereum Block Chain
Ethereum Block Chain
SanatPandoh
 
Javascript toolset for Ethereum Smart Contract development
Javascript toolset for Ethereum Smart Contract development
BugSense
 
The JavaScript toolset for development on Ethereum
The JavaScript toolset for development on Ethereum
GreeceJS
 
Blockchain Chapter #4.pdf
Blockchain Chapter #4.pdf
ssuser79c46d1
 
Ethereum in a nutshell
Ethereum in a nutshell
Daniel Chan
 
Blockchain, Ethereum and Business Applications
Blockchain, Ethereum and Business Applications
Matthias Zimmermann
 
Understanding blockchain
Understanding blockchain
Priyab Satoshi
 
Introduction to Ethereum
Introduction to Ethereum
Arnold Pham
 
Ethereum
Ethereum
V C
 
Block chain - Smart contacts.pptx
Block chain - Smart contacts.pptx
shraddhaphirke1
 
BCHGraz - Meetup #8 - Intro & Ethereum
BCHGraz - Meetup #8 - Intro & Ethereum
BlockchainHub Graz
 
Ethereum Block Chain
Ethereum Block Chain
SanatPandoh
 
Introduction to Blockchain with an Ethereuem Hands-on
Introduction to Blockchain with an Ethereuem Hands-on
Johann Romefort
 
Blockchain for Developers
Blockchain for Developers
Shimi Bandiel
 
Jerome de Tychey - Building Web3.0 with Ethereum - Codemotion Berlin 2018
Jerome de Tychey - Building Web3.0 with Ethereum - Codemotion Berlin 2018
Codemotion
 
Ad

Recently uploaded (20)

A Guide to Telemedicine Software Development.pdf
A Guide to Telemedicine Software Development.pdf
Olivero Bozzelli
 
Introduction to Agile Frameworks for Product Managers.pdf
Introduction to Agile Frameworks for Product Managers.pdf
Ali Vahed
 
From Data Preparation to Inference: How Alluxio Speeds Up AI
From Data Preparation to Inference: How Alluxio Speeds Up AI
Alluxio, Inc.
 
Folding Cheat Sheet # 9 - List Unfolding 𝑢𝑛𝑓𝑜𝑙𝑑 as the Computational Dual of ...
Folding Cheat Sheet # 9 - List Unfolding 𝑢𝑛𝑓𝑜𝑙𝑑 as the Computational Dual of ...
Philip Schwarz
 
Threat Modeling a Batch Job Framework - Teri Radichel - AWS re:Inforce 2025
Threat Modeling a Batch Job Framework - Teri Radichel - AWS re:Inforce 2025
2nd Sight Lab
 
Decipher SEO Solutions for your startup needs.
Decipher SEO Solutions for your startup needs.
mathai2
 
CodeCleaner: Mitigating Data Contamination for LLM Benchmarking
CodeCleaner: Mitigating Data Contamination for LLM Benchmarking
arabelatso
 
Canva Pro Crack Free Download 2025-FREE LATEST
Canva Pro Crack Free Download 2025-FREE LATEST
grete1122g
 
Advance Doctor Appointment Booking App With Online Payment
Advance Doctor Appointment Booking App With Online Payment
AxisTechnolabs
 
Streamlining CI/CD with FME Flow: A Practical Guide
Streamlining CI/CD with FME Flow: A Practical Guide
Safe Software
 
arctitecture application system design os dsa
arctitecture application system design os dsa
za241967
 
ElectraSuite_Prsentation(online voting system).pptx
ElectraSuite_Prsentation(online voting system).pptx
mrsinankhan01
 
Key Challenges in Troubleshooting Customer On-Premise Applications
Key Challenges in Troubleshooting Customer On-Premise Applications
Tier1 app
 
Which Hiring Management Tools Offer the Best ROI?
Which Hiring Management Tools Offer the Best ROI?
HireME
 
Sysinfo OST to PST Converter Infographic
Sysinfo OST to PST Converter Infographic
SysInfo Tools
 
Zoneranker’s Digital marketing solutions
Zoneranker’s Digital marketing solutions
reenashriee
 
OpenChain Webinar - AboutCode - Practical Compliance in One Stack – Licensing...
OpenChain Webinar - AboutCode - Practical Compliance in One Stack – Licensing...
Shane Coughlan
 
How Automation in Claims Handling Streamlined Operations
How Automation in Claims Handling Streamlined Operations
Insurance Tech Services
 
Zoho Creator Solution for EI by Elsner Technologies.docx
Zoho Creator Solution for EI by Elsner Technologies.docx
Elsner Technologies Pvt. Ltd.
 
MOVIE RECOMMENDATION SYSTEM, UDUMULA GOPI REDDY, Y24MC13085.pptx
MOVIE RECOMMENDATION SYSTEM, UDUMULA GOPI REDDY, Y24MC13085.pptx
Maharshi Mallela
 
A Guide to Telemedicine Software Development.pdf
A Guide to Telemedicine Software Development.pdf
Olivero Bozzelli
 
Introduction to Agile Frameworks for Product Managers.pdf
Introduction to Agile Frameworks for Product Managers.pdf
Ali Vahed
 
From Data Preparation to Inference: How Alluxio Speeds Up AI
From Data Preparation to Inference: How Alluxio Speeds Up AI
Alluxio, Inc.
 
Folding Cheat Sheet # 9 - List Unfolding 𝑢𝑛𝑓𝑜𝑙𝑑 as the Computational Dual of ...
Folding Cheat Sheet # 9 - List Unfolding 𝑢𝑛𝑓𝑜𝑙𝑑 as the Computational Dual of ...
Philip Schwarz
 
Threat Modeling a Batch Job Framework - Teri Radichel - AWS re:Inforce 2025
Threat Modeling a Batch Job Framework - Teri Radichel - AWS re:Inforce 2025
2nd Sight Lab
 
Decipher SEO Solutions for your startup needs.
Decipher SEO Solutions for your startup needs.
mathai2
 
CodeCleaner: Mitigating Data Contamination for LLM Benchmarking
CodeCleaner: Mitigating Data Contamination for LLM Benchmarking
arabelatso
 
Canva Pro Crack Free Download 2025-FREE LATEST
Canva Pro Crack Free Download 2025-FREE LATEST
grete1122g
 
Advance Doctor Appointment Booking App With Online Payment
Advance Doctor Appointment Booking App With Online Payment
AxisTechnolabs
 
Streamlining CI/CD with FME Flow: A Practical Guide
Streamlining CI/CD with FME Flow: A Practical Guide
Safe Software
 
arctitecture application system design os dsa
arctitecture application system design os dsa
za241967
 
ElectraSuite_Prsentation(online voting system).pptx
ElectraSuite_Prsentation(online voting system).pptx
mrsinankhan01
 
Key Challenges in Troubleshooting Customer On-Premise Applications
Key Challenges in Troubleshooting Customer On-Premise Applications
Tier1 app
 
Which Hiring Management Tools Offer the Best ROI?
Which Hiring Management Tools Offer the Best ROI?
HireME
 
Sysinfo OST to PST Converter Infographic
Sysinfo OST to PST Converter Infographic
SysInfo Tools
 
Zoneranker’s Digital marketing solutions
Zoneranker’s Digital marketing solutions
reenashriee
 
OpenChain Webinar - AboutCode - Practical Compliance in One Stack – Licensing...
OpenChain Webinar - AboutCode - Practical Compliance in One Stack – Licensing...
Shane Coughlan
 
How Automation in Claims Handling Streamlined Operations
How Automation in Claims Handling Streamlined Operations
Insurance Tech Services
 
Zoho Creator Solution for EI by Elsner Technologies.docx
Zoho Creator Solution for EI by Elsner Technologies.docx
Elsner Technologies Pvt. Ltd.
 
MOVIE RECOMMENDATION SYSTEM, UDUMULA GOPI REDDY, Y24MC13085.pptx
MOVIE RECOMMENDATION SYSTEM, UDUMULA GOPI REDDY, Y24MC13085.pptx
Maharshi Mallela
 

The Blockchain and JavaScript

  • 1. The Blockchain and JavaScript Portia Burton @pkafei Node.js Interactive
  • 2. Who am I? My name is Portia Burton I am a full-stack developer at the Atlantic magazine Became interested in blockchains earlier this year Not a cryptographic expert
  • 4. What is a Blockchain? A blockchain is a cross between a decentralized data store and bittorrent. It is similar to a database but there isn’t a database administrator.
  • 5. What is Bitcoin? Type of Cryptocurrency Creation based on paper by Satoshi Nakamoto titled “Bitcoin: Peer-to-Peer Electronic Cash System” Peer-to-peer which means transactions happen without a third party. Alice can send money directly to Bob
  • 6. Bitcoin vs. Blockchain Bitcoin is part of a blockchain Blockchain is a digital ledger of transactions Each transaction is cryptographically signed Blockchains are trustless The bitcoin blockchain is open to everyone
  • 7. We will focus on the Blockchain
  • 8. Can an average developer build blockchain applications?
  • 10. But first, some more background
  • 11. Many Different Types of Cryptocurrencies
  • 15. Introduction to Ethereum Ethereum is a programmable blockchain, every new blockchain spawned from Ethereum has the same properties as Ethereum Ethereum Virtual Machine is the low level machine language Is Turing complete, unlike bitcoin which does not have looping capabilities It also is aware of multiple states, unlike bitcoin which is only aware of two states (spent and unspent)
  • 16. Different Consensus Mechanisms Proof of Work: Uses the Etash algorithm. The Etash algorithm is based on Bitcoin’s the Dagger-Hashimoto algorithm. ⛏⛓ Proof of Stake: Proof of Stake is another way of validating. It calculates the weight of the node, being proportional to its computational resources. It’s less resource intensive than Proof of Work.
  • 18. What is a Smart Contract? Stored on the blockchain and executed by code Many smart contracts are written in Solidity (syntax is similar to JavaScript) Powered by gas which can be computationally mined or purchased in an exchange People and machines can interact with it
  • 19. Transaction: Signed data package that stores a message to be sent from an externally owned account GAS: the name for the execution fee that senders of transactions need to pay for operations on Ethereum blockchain VALUE (field): The amount of wei to transfer from sender to the recipient STARTGAS (value): Representing the maximum number of computational steps the transaction execution is allowed to take GASPRICE (value): Representing the fee the sender is willing to pay for gas
  • 20. Applications of Ethereum Blockchain of Smart Contracts Self-executing legal contracts Create “American Idol” where people can vote using generated tokens Company boards can be ran virtually Dropbox business model create and sell encrypted storage space Predicting financial futures based on an oracle
  • 23. Different Blockchains Public blockchain: It is the official Ethereum chain that everyone can read and interact with Testnet blockchain: The official test chain of Ethereum. Good way to test contracts without wasting real ether Private blockchain: This is a blockchain that you can create yourself. This blockchain can be freely accessed by others, or you can add addresses by invite only
  • 24. How to build a custom blockchain? 1. Create a Genesis file 2. Init your blockchain locally on the command line* 3. Start your chain again, this time with parameters (not in the documentation) *Be sure to run “init” each time
  • 25. Genesis File Nonce: a random or pseudo-random number that can only be used once gasLimit: is the highest amount you are willing to pay for a computation Alloc: how much money that you allocate to your blockchain { "nonce": "0x0000000000000042", "timestamp": "0x0", "parentHash": "0x0000000000000000000000000000000000000000000000000000 000000000000", "extraData": "0x0", "gasLimit": "0x8000000", "difficulty": "0x400", "mixhash": "0x0000000000000000000000000000000000000000000000000000 000000000000", "coinbase": "0x3333333333333333333333333333333333333333", "alloc": { } } CustomGenesis.json
  • 26. Private Blockchain Parameters Use these parameters in the cli when creating a custom blockchain Nodiscover: Other people will not discover your blockchain RPC: JS interface for your node Networkid: Create a custom networkid inter geth --identity "Testing" --rpc --rpcport "8080" -- rpccorsdomain "*" --datadir "C:chainsTestChain1" -- port "30303" --nodiscover --rpcapi "db,eth,net,web3" --networkid 1999 console
  • 28. Combine Mist and Ethereum Download Mist https://github.com/ethereum/mist Download Democracy Contract: https://www.ethereum.org/dao
  • 29. Blockchain Technology Growing Pains Forces different parties (or contractors) to be savy about code Still very new platform and technology
  • 30. Solidity Contract Bugs Transaction-Ordering Bug (TOD): Smart contract assumes a particular state of a contract that doesn’t exist Timestamp Dependence Bug: Asynchronous network is disconnected from a synchronized global clock. Some contracts assume that network is on global contract Unchecked Send: Most common exploit. Attacker elicits unexpected behavior from the contract by calling if from a carefully constructed call-stack
  • 32. Enough About Me: How can you get started today? Solidity Tutorial: https://solidity.readthedocs.io/en/develop/ Bootstrap Meteor App: https://github.com/SilentCicero/meteor-dapp-boilerplate Example Dapps: http://ethereum.stackexchange.com/questions/2940/where-can-i-find-some-solidity-smart-contract-source-code- examples Command Line Interface of Interacting with the Ethereum Network: https://www.ethereum.org/cli Meteor: https://www.meteor.com/
  • 33. Different Ethereum Frameworks These frameworks provide developers the tools need to create, test, and deploy smart contracts using Ethereum Truffle: https://github.com/ConsenSys/truffle The Dao: https://github.com/slockit/DAO Embark: https://github.com/iurimatias/embark-framework
  • 35. References 1. http://ethdocs.org/en/latest/mining.html#what-is-mining 2. http://ethdocs.org/en/latest/frequently-asked-questions/frequently-asked- questions.html#what-s-the-difference-between-account-and-wallet-contract 3. http://www.coindesk.com/making-sense-smart-contracts/ 4. https://github.com/ethereum/go-ethereum/wiki/Command-Line-Options 5. http://www.ethdocs.org/en/latest/contracts-and-transactions/account-types-gas- and-transactions.html 6. https://blog.ethereum.org/2016/07/12/build-server-less-applications-mist/