1
Building Applications on the Ethereum Blockchain
Eoin Woods Endava @eoinwoodz
licensed under a Creative Commons Attribution-ShareAlike 4.0 International License
Building Applications on the Ethereum Blockchain Eoin Woods Endava - - PowerPoint PPT Presentation
Building Applications on the Ethereum Blockchain Eoin Woods Endava @eoinwoodz 1 licensed under a Creative Commons Attribution-ShareAlike 4.0 International License Agenda Blockchain Recap Ethereum Application Design Development
1
Eoin Woods Endava @eoinwoodz
licensed under a Creative Commons Attribution-ShareAlike 4.0 International License
2
3
4
(integrity & non-repudiation)
(generally – 10s txn/sec)
5
(e.g. transactions, identity)
proof of existence)
6
“If your requirements are fulfilled by today’s relational databases, you’d be insane to use a blockchain” – Gideon Greenspan
digital ledger that tracks and protects valuable assets verifiable supply chains post-trade processing
Keybase
Identity management verified data Georgia government records supply chain efficiency
7
derivatives post- trade processing
8
Public Permissioned Throughput Low Medium Latency High Medium # Readers High High # Writers High Low Centrally Managed No Yes Transaction Cost High “Free”
Based on: Do you need a Blockchain? Karl Wüst, Arthur Gervaisy IACR Cryptology ePrint Archive, 2017, p.375.
9
10
Gavin Wood, Joseph Lubin
13
Ethereum Client Application Ethereum RPC Client Ethereum Mining Node Ethereum Mining Node Ethereum Mining Node Ethereum Light Node
Ethereum Full Node Smart Contracts
RPC Interface Ethereum Full Node
14
https://blog.ethereum.org/2015/11/15/merkling-in-ethereum
15
16
17
18
Web3J makes retrieving events straightforward Log from Solidity
Transaction
Call
19
Difference actually in invocation – ethCall vs ethSendTransaction API calls – rather than the contract
You provide Ether with your transaction invocation. Gas Cost amount is deducted and sent to the miners, balance is refunded to you. 2018/03/25 – est. gas cost is 2 Gwei (0.000000002 Ether ~= 0.0001c)
20 https://ethgasstation.info
21 https://hackernoon.com/ether-purchase-power-df40a38c5a2f Rimba et. al. “Comparing Blockchain and Cloud Services for Business Process Execution” – ICSA 2017
22
https://github.com/ethereum/yellowpaper
23
24
DApp
Client Code
25
API / User Interface / … POJO Transaction Processing Database Driver
DApp
Web3J
26
27
Smart Contract Event E1
Oracle Processor
write getE1Events(…) sendTransaction(…)
Data Sources
28
29
30
Populus Ganache Geth Infura.io Metamask EthGasStation Etherchain Embark Web3J
IDEs Cloud Environments Ethereum Nodes Dev Environment Tools
31
JAR files .bin & .abi files Java source and tests Solidity source & Javascript tests Blockchain Linux deployment Java stubs (.bin files)
32
Emulators Ganache, Embark Lightweight Nodes Ethereumjs-vm, Pyethereum Local Regular Blockchains Geth, Parity Hosted Nodes or Chains Infura, Azure Public Testing Blockchains Rinkeby, Ropsten Public Blockchain Mainnet
33
Solidity source Ganache (local net) Geth (testnet) Geth (mainnet or prod) Contract Unit Tests Java source & tests Build Tool (e.g. Gradle)
Unit Test
Production
34
36
37
38
39
40
41
update, 200 gas/word to read)
42
http://solidity.readthedocs.io/en/develop/frequently-asked-questions.html#what-is-the-memory-keyword-what-does-it-do
43
and code execution environment – with significant tradeoffs
external interaction, identity and key management
44
45
46
47
ethereum-smart-contract-development-e26e38ea6c23
https://www.nctatechnicalpapers.com/Paper/2017/2017-comparing- blockchain-implementations
48
https://thenounproject.com/term/cloud-computing/204953
blockchain
49
51