Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
サービスデザインプロジェクトB 第2回「ブロックチェーン概論とインストール大会」 / Over...
Search
Kenji Saito
PRO
October 19, 2020
Technology
1
160
サービスデザインプロジェクトB 第2回「ブロックチェーン概論とインストール大会」 / Overview of Blockchain and Installation
2020年10月19日、慶應義塾大学大学院メディアデザイン研究科の「サービスデザインプロジェクトB (2020 秋)」第2回にて使用したスライドです。
Kenji Saito
PRO
October 19, 2020
Tweet
Share
More Decks by Kenji Saito
See All by Kenji Saito
ワールドカフェI /チューターを改良する / World Café I and Improving the Tutors
ks91
PRO
0
22
自然言語の扱いと翻訳のためのプロンプト / Natural Language Handling and Prompts for Translation
ks91
PRO
0
11
研究って何だっけ / What is Research?
ks91
PRO
0
22
ブロックチェーンと分散ファイナンス概論 / Introduction to Blockchain and Decentralized Finance
ks91
PRO
0
12
大規模言語モデルの原理と使いこなしの原則 / Principles of Large Language Models and Their Use
ks91
PRO
0
16
講師研究紹介 / Research Introduction of the Lecturer
ks91
PRO
0
34
本授業におけるチャットボットの使い方 / How to Use Chatbots in This Class
ks91
PRO
0
42
LLM とプロンプトエンジニアリング/チューターをビルドする / LLM, Prompt Engineering and Building Tutors
ks91
PRO
1
210
講師自己紹介 / Self-Introduction of the Lecturer
ks91
PRO
0
43
Other Decks in Technology
See All in Technology
Tokyo dbt Meetup #13 dbtと連携するBI製品&機能ざっくり紹介
sagara
0
430
Webアプリを Lambdaで動かすまでに考えること / How to implement monolithic Lambda Web Application
_kensh
7
1.2k
AIエージェント開発における「攻めの品質改善」と「守りの品質保証」 / 2024.04.09 GPU UNITE 新年会 2025
smiyawaki0820
0
400
クォータ監視、AWS Organizations環境でも楽勝です✌️
iwamot
PRO
1
240
YOLOv10~v12
tenten0727
3
870
Amazon CloudWatch Application Signals ではじめるバーンレートアラーム / Burn rate alarm with Amazon CloudWatch Application Signals
ymotongpoo
5
310
AWS全冠芸人が見た世界 ~資格取得より大切なこと~
masakiokuda
1
200
Стильный код: натуральный поиск редких атрибутов по картинке. Юлия Антохина, Data Scientist, Lamoda Tech
lamodatech
0
340
AI AgentOps LT大会(2025/04/16) Algomatic伊藤発表資料
kosukeito
0
120
似たような課題が何度も蘇ってくるゾンビふりかえりを撲滅するため、ふりかえりのテーマをフォーカスしてもらった話 / focusing on the theme
naitosatoshi
0
390
Startups On Rails 2025 @ Tropical on Rails
irinanazarova
0
250
Would you THINK such a demonstration interesting ?
shumpei3
1
160
Featured
See All Featured
The Cult of Friendly URLs
andyhume
78
6.3k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
45
7.2k
How STYLIGHT went responsive
nonsquared
99
5.5k
GitHub's CSS Performance
jonrohan
1030
460k
The Language of Interfaces
destraynor
157
24k
StorybookのUI Testing Handbookを読んだ
zakiyama
29
5.6k
Why You Should Never Use an ORM
jnunemaker
PRO
55
9.3k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
227
22k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
26k
Building a Scalable Design System with Sketch
lauravandoore
462
33k
Reflections from 52 weeks, 52 projects
jeffersonlam
349
20k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
34
2.9k
Transcript
B 2020 2 ( ) B 2020 — 2 —
2020-10-19 – p.1/56
https://speakerdeck.com/ks91 Discord Discord ( / / ) Zoom URL (
) B 2020 — 2 — 2020-10-19 – p.2/56
( ) 1 10 12 • 2 10 19 •
3 10 26 4 11 2 5 11 9 1 6 11 16 2 7 11 30 8 12 7 B 2020 — 2 — 2020-10-19 – p.3/56
– : : Ethereum ( ) ( ) Ethereum B
2020 — 2 — 2020-10-19 – p.4/56
– B 2020 — 2 — 2020-10-19 – p.5/56
( ) ( ) ( ) (BP : Blockchain Property
) BP-1 : BP-2 : BP-3 : ( ) ( ) B 2020 — 2 — 2020-10-19 – p.6/56
( ) (LIFO : Last In, First Out) ( )
B 2020 — 2 — 2020-10-19 – p.7/56
( ) ( ) ( ) ( ) ( 16
) SHA (Secure Hash Algorithm) ( ) 1bit B 2020 — 2 — 2020-10-19 – p.8/56
( ) ( ) < , > ( ) ←
: < , > : : < , , > : OK ( 1 ) NG ( ) B 2020 — 2 — 2020-10-19 – p.9/56
BP-1 ( ), BP-2 ( ) BBc-1 f : →
BP-3 ( ) ( ) ( ) ← BP-2 ← BP-3 ( ) ← BP-3 + ← BP-{1,2} B 2020 — 2 — 2020-10-19 – p.10/56
[Lamport 1984][Schneider 1990] (1) (2) (3) (4) ( ) ←
↑ B 2020 — 2 — 2020-10-19 – p.11/56
TX : transaction ( 4 TX ) SMRP (State Machine
Replication Problem) SMRP-1 ( ) SMRP-2 : B 2020 — 2 — 2020-10-19 – p.12/56
( ) ( ) ϒϩοΫ൪߸O ϒϩοΫ൪߸O ϒϩοΫ൪߸O ϒϩοΫ൪߸O
ϒϩοΫ൪߸O ϒϩοΫ൪߸O ϒϩοΫ൪߸O ϒϩοΫ൪߸O ͍ͪΜهɾॻ͖͑ͷίετ͕ߴ͍ྺ࢙ ࠷վ͟Μ͠ʹ͍͘ྺ࢙ ͕༗ޮ ͻͱͭखલͷϒϩοΫͷ ʮμΠδΣετʯ σδλϧॺ໊͞Εͨ ʮτϥϯβΫγϣϯ औҾ ʯ ϒϩοΫΛ࡞ΔͨΊʹɺͦͷʮμΠδΣετʯ͕͋ΔҎԼͱ͍͏݅Λຬͨͨ͠Γ 1SPPGPG8PSL Ծ௨՟ͷ࣋ͪʹԠͨ͡ݖརΛͬͨථͰউͬͨΓ 1SPPGPG4UBLF ͢Δඞཁ͕͋Δ ίετ͕͔͔Δ ϒϩοΫΛ࡞ΔਓͦͷதʹࣗʹѼͯͨ Ծ௨՟ͰͷใुΛॻ͖ࠐΉ͜ͱ͕Ͱ͖ɺ ͦͷϒϩοΫ͕༗ޮͳྺ࢙ͷதʹ͋Δ߹ʹ ݶΓใु༗ޮͱͳΔ τϥϯβΫγϣϯͷଘࡏΛ֬ೝ͢Δ ͨΊͷޮతͳํ๏͕ఏڙ͞ΕΔ ਖ਼ੑ ଘࡏੑ །Ұੑ Proof of Work ( ) . . . → B 2020 — 2 — 2020-10-19 – p.13/56
(BP-3 ) ( : ) (BP-3 ) ( : )
BP-{1,2,3} BP-{1, 2} ⇒ B 2020 — 2 — 2020-10-19 – p.14/56
(Confidentiality) BP-{1,2,3} ↑ ( = ) (Integrity) BP-3 (Availability) BP-2
B 2020 — 2 — 2020-10-19 – p.15/56
: 2009 ↑ 11 B 2020 — 2 — 2020-10-19
– p.16/56
( ) ADR (Active (space) Debris Removal) : https://doi.org/10.1109/TCSS.2018.2890655 (1930
) ( ) B 2020 — 2 — 2020-10-19 – p.17/56
( ) ( ) ( ) B 2020 — 2
— 2020-10-19 – p.18/56
( ) ( - ) : https://doi.org/10.1016/j.future.2019.05.019 B 2020 —
2 — 2020-10-19 – p.19/56
( ) ( ) ( ) B 2020 — 2
— 2020-10-19 – p.20/56
( ) B 2020 — 2 — 2020-10-19 – p.21/56
/ ( ) ( ) ( ) ( ) B
2020 — 2 — 2020-10-19 – p.22/56
( ) ( ) ( ) B 2020 — 2
— 2020-10-19 – p.23/56
( ) B 2020 — 2 — 2020-10-19 – p.24/56
( ) ( ) B 2020 — 2 — 2020-10-19
– p.25/56
B 2020 — 2 — 2020-10-19 – p.26/56
with ( ) ( ) ( ) B 2020 —
2 — 2020-10-19 – p.27/56
DNS IP AS B 2020 — 2 — 2020-10-19 –
p.28/56
( ) ( ) (web ) B 2020 — 2
— 2020-10-19 – p.29/56
( ) ( ) ( ) ( ) ( )
( ) B 2020 — 2 — 2020-10-19 – p.30/56
( ) ( ) 3D B 2020 — 2 —
2020-10-19 – p.31/56
: Ethereum macOS (Catalina 10.15.7) + Homebrew Homebrew Linux (Ubuntu
18.04) Windows 10 + Windows Subsystem for Linux (Ubuntu 18.04 ) WSL Ethereum solidity brownie B 2020 — 2 — 2020-10-19 – p.32/56
Solidity Ethereum http://solidity.readthedocs.io/en/latest/installing-solidity.html Linux (on Windows) “sudo apt”, macOS “brew”
solc 0.7.3 (10/10 ) $ solc --version brownie py-solc-x solc (dependencies) ( solc py-solc-x ) B 2020 — 2 — 2020-10-19 – p.33/56
Python3 macOS $ brew install python3 Linux $ sudo add-apt-repository
ppa:deadsnakes/ppa $ sudo apt update $ sudo apt install python3.8 python3.8-dev python3.8-venv python3.8-tk 16.10 python3(.8) apt B 2020 — 2 — 2020-10-19 – p.34/56
macOS : . . . macOS wget brew dyld: Library
not loaded: /usr/local/opt/gettext/lib/libintl.8.dylib $ brew uninstall --force gettext $ brew install gettext B 2020 — 2 — 2020-10-19 – p.35/56
Python (venv) macOS ‘python3.8’ ‘python3’ $ python3.8 -m venv bbc1env
$ source bbc1env/bin/activate (bbc1env) $ pip install -U pip (bbc1env) $ pip install wheel bbc1env ( BBc-1 ) ( ) (bbc1env) $ deactivate B 2020 — 2 — 2020-10-19 – p.36/56
Ganache CLI Ethereum RPC CLI : Command Line Interface npm
( ) macOS https://qiita.com/kyosuke5_20/items/c5f68fc9d89b84c0df09 Linux https://qiita.com/seibe/items/36cef7df85fe2cefa3ea npm Ganache CLI $ sudo npm install -g ganache-cli B 2020 — 2 — 2020-10-19 – p.37/56
Brownie Python Ethereum https://eth-brownie.readthedocs.io Brownie $ pip install eth-brownie version
1.11.8 (10/10 ) B 2020 — 2 — 2020-10-19 – p.38/56
$ brownie init ( ERC-20 ) $ brownie bake token
$ cd token ( ) $ brownie compile ( ) $ pytest tests B 2020 — 2 — 2020-10-19 – p.39/56
Brownie $ brownie console Python >>> len(accounts) 10 >>> accounts[0].balance()
100000000000000000000 >>> quit() B 2020 — 2 — 2020-10-19 – p.40/56
( ) Ethereum ropsten B 2020 — 2 — 2020-10-19
– p.41/56
infura.io Brownie https://infura.io SIGN UP PROJECT ID infura Ethereum API
infura . . . infura.io PROJECT ID WEB3_INFURA_PROJECT_ID PROJECT ID (∼/.bash_profile ) $ export WEB3_INFURA_PROJECT_ID= PROJECT ID B 2020 — 2 — 2020-10-19 – p.42/56
ropsten ETH brownie console ropsten >>> network.disconnect() >>> network.connect(’ropsten’) >>>
len(accounts) 0 >>> accounts.add() <LocalAccount object ’ 16 ’> >>> accounts[0].private_key 16 >>> quit() Ropsten Testnet ETH Faucet 5.0ETH https://faucet.dimensions.network/ ( ) https://metamask.io/ B 2020 — 2 — 2020-10-19 – p.43/56
ropsten ETH brownie console ropsten ETH >>> network.disconnect() >>> network.connect(’ropsten’)
>>> len(accounts) 0 >>> accounts.add( 16 ) <LocalAccount object ’ 16 ’> >>> accounts[0].balace() ETH >>> quit() ETH >>> accounts[0].transfer(accounts[1], "1 ether") B 2020 — 2 — 2020-10-19 – p.44/56
Ethereum B 2020 — 2 — 2020-10-19 – p.45/56
Ethereum Vitalik Buterin, “Ethereum White Paper: A NEXT GENERATION SMART
CONTRACT & DECENTRALIZED APPLICATION PLATFORM” 15 (= ) = ⇒ → Dapps ( / / ) B 2020 — 2 — 2020-10-19 – p.46/56
B 2020 — 2 — 2020-10-19 – p.47/56
. . . B 2020 — 2 — 2020-10-19 –
p.48/56
vs. B 2020 — 2 — 2020-10-19 – p.49/56
= run B 2020 — 2 — 2020-10-19 – p.50/56
Ether Ethereum EOA : Externally-Owned Account ( ) Ether EVM
EVM B 2020 — 2 — 2020-10-19 – p.51/56
EVM : Ethereum Virtual Machine Gas B 2020 — 2
— 2020-10-19 – p.52/56
EVM : : Solidity — JavaScript LLL — Lisp Vyper
— Python B 2020 — 2 — 2020-10-19 – p.53/56
Solidity ( ) pragma solidityˆ0.5.0; contract IndivisibleAsset { /* */
string public _name; string public _symbol; uint256 public _quantity; address public _owner; constructor(string memory name, string memory symbol, uint256 quantity) public { _name = name; _symbol = symbol; _quantity = quantity; _owner = msg.sender; } function transfer(address to) public returns (bool) { require (_owner == msg.sender); _owner = to; return true; } } B 2020 — 2 — 2020-10-19 – p.54/56
Ethereum B 2020 — 2 — 2020-10-19 – p.55/56
B 2020 — 2 — 2020-10-19 – p.56/56