hierarchical interac ons between ethereum m sma mart
play

Hierarchical interac,ons between Ethereum m sma mart contracts - PowerPoint PPT Presentation

Hierarchical interac,ons between Ethereum m sma mart contracts across Te Testnets Yao-Chieh Hu, Ting-Ting Lee, Dimitris Chatzopoulos, Pan Hui yhuag@ust.hk, tleeae@ust.hk, dcab@cse.ust.hk, panhui@cse.ust.hk The Hong Kong University of Science


  1. Hierarchical interac,ons between Ethereum m sma mart contracts across Te Testnets Yao-Chieh Hu, Ting-Ting Lee, Dimitris Chatzopoulos, Pan Hui yhuag@ust.hk, tleeae@ust.hk, dcab@cse.ust.hk, panhui@cse.ust.hk The Hong Kong University of Science and Technology 1

  2. Background Knowledge • What is Ethereum Blockchain? 2

  3. Background Knowledge • What is Smart Contract? 3

  4. Background Knowledge • Ether(ETH) vs. Gas 4

  5. Background Knowledge • What is Test Networks (testnets)? 5

  6. Background Knowledge • What is a dApp (decentralized applicaRon)? Add a pic of DApp 6

  7. The Problem • Smart contracts cannot share common states • Our proposal: 7

  8. Exis,ng Alterna,ves • Smart Contract Inheritance • Share logic, not data 8

  9. Exis,ng Alterna,ves • Libraries • Share logic, not data 9

  10. Comparison with DApp DApps can access everything on the client Custodian contracts can only access the contracts shared state of the client contracts 10

  11. Use Case - eTickets 11

  12. Use Case • Custodian Contract (movie company) creates client contracts as Rckets 12

  13. Use Case • Alice buys Rcket • Client contract ownership transfers from movie seller to Alice 13

  14. Use Case • Alice sells her Rcket to Bob • Client contract transfers Rcket ownership from Alice to Bob 14

  15. Use Case • Movie Rcket expiring Rme changed • Custodian contract changes the shared variable “ expireTime ” in every client contract 15

  16. Technology Used • Ethereum Blockchain and Solidity • Testnets • Ropsten (196 nodes | PoW) • Rinkeby (49 nodes | PoA) • Kovan (145 nodes | PoA) • MetaMask • The Truffle Framework 16

  17. Experiments • Latency • Deployment • Shared state update • Gas Usage • Deployment • Shared state update 17

  18. Deployment latency 18

  19. Deployment latency per contract Client Contract Deployment EffecRve Latency across testnets 19

  20. Deployment gas usage Client Contract Deployment Gas Usage on Ropsten testnet 20

  21. State muta,on sec Shared state mutaRon latency across Ethereum testnets 21

  22. State muta,on gas usage Shared state mutaRon gas usage on Ropsten testnet 22

  23. Max number of clients that can be mutated at once Maximum batch size of shared state mutaRon across testnets 23

  24. Conclusion • Hierarchical structure of Ethereum smart contract can allow shared states between contracts! 24

  25. Any ques;ons? yhuag@ust.hk 25

  26. Back up Slides 26

  27. Experiments (1) sec Custodian Contract Deployment Latency across Testnets 27

  28. Experiments (2) Custodian Contract Deployment Gas Usage across testnets 28

  29. Experiments (3) sec Client Contract Deployment Total Latency across testnets 29

  30. Experiments (6) sec Shared state mutaRon latency across Ethereum testnets 30

  31. Experiments (7) Shared state mutaRon average latency across Ethereum testnets 31

  32. Experiments (8) Shared state mutaRon gas usage on Ropsten testnet 32

  33. State muta,on per contract Shared state mutaRon average latency across Ethereum testnets 33

  34. Solu,on Breakdown - Architecture 34

  35. Architecture • Custodian contract • Supervise, track and manage Client contracts • Client contract • Only be created from its Custodian contract • Only shared states are externally modifiable 35

Recommend


More recommend