Upgrade to Pro — share decks privately, control downloads, hide ads and more …

イーサリアム(Ethereum)入門 / Introduction to Ethereum

イーサリアム(Ethereum)入門 / Introduction to Ethereum

2018年10月24日(水)、ブロックチェーンハブ主催で開催されたブロックチェーンアカデミー「【ハンズオン】スマートコントラクトプログラミング(1) イーサリアム(Ethereum)入門」にて使用したスライドです。

Kenji Saito

October 24, 2018
Tweet

More Decks by Kenji Saito

Other Decks in Technology

Transcript

  1. ( ) SFC ( ) CSO (Chief Science Officer) 1993

    ( ) 2006 ( ) SFC 18 P2P (Peer-to-Peer) 2011 SFC 2018 → ( ) (Ethereum) — (1) — 2018-07-11 – p.2/38
  2. ( ) (1) (2) (3) (4) ( ) state machine

    replication (Ethereum) — (1) — 2018-07-11 – p.5/38
  3. 1) 2) 3) ⇒ ⇒ · / (dependable ) (Ethereum)

    — (1) — 2018-07-11 – p.6/38
  4. /DLT ( ) Bitcoin ( ) Open Assets Protocol (OAP)

    ( ) Ethereum ( ) ( ) EOS (↓ ) (DLT) ( ) Hyperledger (Linux Foundation) Fabric (IBM/DAH), Sawtooth (Intel), Iroha ( ) Corda (R3), Tangle (IOTA), . . . , BBc-1 ( ) (Ethereum) — (1) — 2018-07-11 – p.7/38
  5. /DLT ( ) ( ) ( vs. ) ( )

    ( ) ( ) ⇒ ( : BBc-1) DLT : : (Ethereum) — (1) — 2018-07-11 – p.8/38
  6. Vitalik Buterin, “Ethereum White Paper: A NEXT GENERATION SMART CONTRACT

    & DECENTRALIZED APPLICATION PLATFORM” 15 (Ethereum) — (1) — 2018-07-11 – p.9/38
  7. 2. macOS (High Sierra 10.13) + Homebrew Linux (Ubuntu 16.04)

    Windows 10 + Windows Subsystem for Linux geth, solidity populus (Ethereum) — (1) — 2018-07-11 – p.10/38
  8. Python3 macOS $ brew install python3 Linux $ sudo add-apt-repository

    ppa:deadsnakes/ppa $ sudo apt update $ sudo apt install python3.6 python3.6-dev python3.6-venv 16.10 python3 apt (Ethereum) — (1) — 2018-07-11 – p.13/38
  9. Python (venv) macOS ‘python3.6’ ‘python3’ $ python3.6 -m venv popenv

    $ source popenv/bin/activate (popenv) $ pip install -U pip (popenv) $ deactivate (Ethereum) — (1) — 2018-07-11 – p.14/38
  10. Populus Python http://populus.readthedocs.io/en/latest/quickstart.html Open SSL Populus $ pip install populus==2.1.0

    $ pip install -U web3==3.16.5 $ pip install -U eth-utils==0.7.4 version 2.1.0 (Ethereum) — (1) — 2018-07-11 – p.15/38
  11. (1) http://beyond-blockchain.org/public/BcH-smart-contract-programming.zip Python (init.py, run.py, deploy.py) project.json genesis.json $ python

    init.py $ touch MyToken.sol Solidity 0.4.22 test_one_time_escrow.py (populus ) (Ethereum) — (1) — 2018-07-11 – p.17/38
  12. (2) $ geth init genesis.json $ geth account new 16

    (Ethereum) — (1) — 2018-07-11 – p.18/38
  13. “run.py” ‘--etherbase’ 0x ( run.py): http://beyond-blockchain.org/public/modified_run_py.zip $ python run.py $

    tail -f geth.log process id kill (Ethereum) — (1) — 2018-07-11 – p.19/38
  14. EVM : : Solidity — JavaScript LLL — Lisp (Ethereum)

    — (1) — 2018-07-11 – p.28/38
  15. Solidity ( ) pragma solidity ˆ0.4.24; contract IndivisibleAsset { /*

    */ string public _name; string public _symbol; uint256 public _quantity; address public _owner; constructor (string name, string symbol, uint256 quantity) public { _name = name; _symbol = symbol; _quantity = quantity; _owner = msg.sender; } function transfer(address to) external returns (bool) { require(_owner == msg.sender); _owner = to; return true; } } (Ethereum) — (1) — 2018-07-11 – p.29/38
  16. The DAO ( ) The DAO Split ( ) 360

    ETH (50∼60 ) (2016/6/17) ( ) ( ; ) (2016/7/20 ) (Ethereum) — (1) — 2018-07-11 – p.35/38