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
ブロックチェーン概論とインストール大会 / Overview of Blockchain an...
Search
Kenji Saito
PRO
October 18, 2021
Technology
0
170
ブロックチェーン概論とインストール大会 / Overview of Blockchain and Installation
2021年10月18日(月)、慶應義塾大学大学院メディアデザイン研究科「サービスデザインプロジェクト B」2021秋 第2回で使用されたスライドです。
Kenji Saito
PRO
October 18, 2021
Tweet
Share
More Decks by Kenji Saito
See All by Kenji Saito
スマートコントラクトプログラミング / Smart Contract Programming
ks91
PRO
0
4
AI が研究する時代に、人はどう育つのか? — GAMER PAT にみる "シリアスゲームとしての知的訓練" / In an era where AI conducts research, how will humans develop? — "Intellectual Training as a Serious Game" Seen in GAMER PAT
ks91
PRO
0
36
FinTech 5-6 : The World of Apps
ks91
PRO
0
67
生成AI による論文執筆サポート・ワークショップ ─ サーベイ/リサーチクエスチョン編 / Workshop on AI-Assisted Paper Writing Support: Survey/Research Question Edition
ks91
PRO
0
66
ブロックチェーン概論とインストール大会 / Introduction to Blockchain and Installation Workshop
ks91
PRO
0
2
FinTech 3-4 : Internet Technology and Governance
ks91
PRO
0
71
民主主義と博愛(Humanitarianism) / Democracy and Humanitarianism
ks91
PRO
0
6
ブロックチェーン概論 / Introduction to Blockchain
ks91
PRO
0
12
ブロックチェーンと分散ファイナンス概論 / Introduction to Blockchain and Decentralized Finance
ks91
PRO
0
65
Other Decks in Technology
See All in Technology
Sansan Engineering Unit 紹介資料
sansan33
PRO
1
3k
Performance Insights 廃止から Database Insights 利用へ/transition-from-performance-insights-to-database-insights
emiki
0
270
AIツールでどこまでデザインを忠実に実装できるのか
oikon48
6
3.4k
なぜAWSを活かしきれないのか?技術と組織への処方箋
nrinetcom
PRO
4
890
Findy Team+ QAチーム これからのチャレンジ!
findy_eventslides
0
190
LLMアプリの地上戦開発計画と運用実践 / 2025.10.15 GPU UNITE 2025
smiyawaki0820
1
560
20251007: What happens when multi-agent systems become larger? (CyberAgent, Inc)
ornew
1
280
そのWAFのブロック、どう活かす? サービスを守るための実践的多層防御と思考法 / WAF blocks defense decision
kaminashi
0
200
能登半島地震で見えた災害対応の課題と組織変革の重要性
ditccsugii
0
930
衛星画像超解像化によって実現する2D, 3D空間情報の即時生成と“AI as a Service”/ Real-time generation spatial data enabled_by satellite image super-resolution
lehupa
0
170
PHPからはじめるコンピュータアーキテクチャ / From Scripts to Silicon: A Journey Through the Layers of Computing Hiroshima 2025 Edition
tomzoh
0
140
AWS Control Tower に学ぶ! IAM Identity Center 権限設計の第一歩 / IAM Identity Center with Control Tower
y___u
0
170
Featured
See All Featured
RailsConf 2023
tenderlove
30
1.2k
Thoughts on Productivity
jonyablonski
70
4.9k
The Straight Up "How To Draw Better" Workshop
denniskardys
238
140k
The Illustrated Children's Guide to Kubernetes
chrisshort
49
51k
Done Done
chrislema
185
16k
Optimizing for Happiness
mojombo
379
70k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.5k
Site-Speed That Sticks
csswizardry
12
900
The Cult of Friendly URLs
andyhume
79
6.6k
Product Roadmaps are Hard
iamctodd
PRO
54
11k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
20
1.2k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
3.7k
Transcript
B 2021 2 ( ) B 2021 — 2 —
2021-10-18 – p.1/58
https://speakerdeck.com/ks91 ( ) Discord Discord ( / / ) Zoom
URL ( ) B 2021 — 2 — 2021-10-18 – p.2/58
( ) 1 10 11 • 2 10 18 •
3 10 25 4 11 1 5 11 8 1 6 11 15 2 7 11 22 8 11 29 Discord B 2021 — 2 — 2021-10-18 – p.3/58
– : : Ethereum ( ) ( ) Ethereum B
2021 — 2 — 2021-10-18 – p.4/58
– B 2021 — 2 — 2021-10-18 – p.5/58
( ) ( ) ( ) ↓ ( ( ))
(BP : Blockchain Property ) BP-1 : ( ) BP-2 : ( ( ) ) BP-3 : ( ) ( ) ( ) B 2021 — 2 — 2021-10-18 – p.6/58
( ) (LIFO : Last In, First Out) ( )
B 2021 — 2 — 2021-10-18 – p.7/58
( ) ( ) ( ) ( ) ( 16
) SHA (Secure Hash Algorithm) ( ) 1bit B 2021 — 2 — 2021-10-18 – p.8/58
( ) ( ) < , > ( ) ←
: < , > : : < , , > : OK ( 1 ) NG ( ) B 2021 — 2 — 2021-10-18 – p.9/58
BP-1 ( ), BP-2 ( ) BBc-1 f : →
BP-3 ( ) ( ) ( ) ← BP-2 ← BP-3 ( ) (BP-2 ) ( ) ← BP-3 (?) + ← BP-{1,2} B 2021 — 2 — 2021-10-18 – p.10/58
[Lamport 1984][Schneider 1990] (1) (2) (3) (4) ( ) ←
↑ B 2021 — 2 — 2021-10-18 – p.11/58
TX : transaction ( 4 TX ) SMRP (State Machine
Replication Problem) SMRP-1 ( ) SMRP-2 : B 2021 — 2 — 2021-10-18 – p.12/58
( ) ( ) ϒϩοΫ൪߸O ϒϩοΫ൪߸O ϒϩοΫ൪߸O ϒϩοΫ൪߸O
ϒϩοΫ൪߸O ϒϩοΫ൪߸O ϒϩοΫ൪߸O ϒϩοΫ൪߸O ͍ͪΜهɾॻ͖͑ͷίετ͕ߴ͍ྺ࢙ ࠷վ͟Μ͠ʹ͍͘ྺ࢙ ͕༗ޮ ͻͱͭखલͷϒϩοΫͷ ʮμΠδΣετʯ σδλϧॺ໊͞Εͨ ʮτϥϯβΫγϣϯ औҾ ʯ ϒϩοΫΛ࡞ΔͨΊʹɺͦͷʮμΠδΣετʯ͕͋ΔҎԼͱ͍͏݅Λຬͨͨ͠Γ 1SPPGPG8PSL Ծ௨՟ͷ࣋ͪʹԠͨ͡ݖརΛͬͨථͰউͬͨΓ 1SPPGPG4UBLF ͢Δඞཁ͕͋Δ ίετ͕͔͔Δ ϒϩοΫΛ࡞ΔਓͦͷதʹࣗʹѼͯͨ Ծ௨՟ͰͷใुΛॻ͖ࠐΉ͜ͱ͕Ͱ͖ɺ ͦͷϒϩοΫ͕༗ޮͳྺ࢙ͷதʹ͋Δ߹ʹ ݶΓใु༗ޮͱͳΔ τϥϯβΫγϣϯͷଘࡏΛ֬ೝ͢Δ ͨΊͷޮతͳํ๏͕ఏڙ͞ΕΔ ਖ਼ੑ ଘࡏੑ །Ұੑ Proof of Work ( ) ( ) . . . → B 2021 — 2 — 2021-10-18 – p.13/58
(BP-3 ) ( : ) (BP-3 ) ( : )
← NFT BP-{1,2,3} BP-{1, 2} ⇒ B 2021 — 2 — 2021-10-18 – p.14/58
(Confidentiality) BP-{1,2,3} ↑ ( = ) (Integrity) BP-3 (Availability) BP-2
B 2021 — 2 — 2021-10-18 – p.15/58
2009 ↑ 12 ( 5 ) B 2021 — 2
— 2021-10-18 – p.16/58
( ) ADR (Active (space) Debris Removal) : https://doi.org/10.1109/TCSS.2018.2890655 (1930
) ( ) B 2021 — 2 — 2021-10-18 – p.17/58
( ) ( ) ( ) B 2021 — 2
— 2021-10-18 – p.18/58
( ) ( - ) : https://doi.org/10.1016/j.future.2019.05.019 B 2021 —
2 — 2021-10-18 – p.19/58
( ) ( ) ( ) B 2021 — 2
— 2021-10-18 – p.20/58
( ) B 2021 — 2 — 2021-10-18 – p.21/58
/ ( ) ( ) ( ) ( ) B
2021 — 2 — 2021-10-18 – p.22/58
( ) ( ) ( ) B 2021 — 2
— 2021-10-18 – p.23/58
( ) : https://www.lij.jp/html/jli/jli_2017/ 2017summer_p018.pdf B 2021 — 2 —
2021-10-18 – p.24/58
( ) ( ) B 2021 — 2 — 2021-10-18
– p.25/58
B 2021 — 2 — 2021-10-18 – p.26/58
with ( ) ( ) : https://doi.org/10.1016/j.icte.2021.08.012 ( ) B
2021 — 2 — 2021-10-18 – p.27/58
DNS : https://arxiv.org/abs/2011.05442 ( ) IP AS B 2021 —
2 — 2021-10-18 – p.28/58
( ) ( ) : https://arxiv.org/abs/2011.05442 ( ) : https://doi.org/10.1016/j.icte.2021.08.012
(web ) B 2021 — 2 — 2021-10-18 – p.29/58
( ) ( ) ( ) : https://doi.org/10.1016/j.icte.2021.08.012 ( )
( ) ( ) : https://arxiv.org/abs/2011.05442 B 2021 — 2 — 2021-10-18 – p.30/58
( ) ( ) : https://arxiv.org/abs/2011.05442 3D HACCP ( )
B 2021 — 2 — 2021-10-18 – p.31/58
2. Ethereum macOS (Big Sur 11.6) + Homebrew Linux (Ubuntu
20.04.3) (x86/AMD64 and ARM) Windows 10 + Windows Subsystem for Linux (Ubuntu ) Ethereum solidity brownie B 2021 — 2 — 2021-10-18 – p.32/58
Solidity Ethereum ( ) http://solidity.readthedocs.io/en/latest/installing-solidity.html Linux (on Windows) “sudo apt”,
macOS “brew” Linux ARM git clone dependencies solc 0.8.9 (10/6 ) $ solc --version brownie py-solc-x solc (dependencies) ( solc py-solc-x ) B 2021 — 2 — 2021-10-18 – p.33/58
Ganache CLI Ethereum RPC 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 2021 — 2 — 2021-10-18 – p.34/58
Python3 macOS $ brew install
[email protected]
python3 python 3.9 (12/2
) 3.9 3.8 3.9 $ brew uninstall --ignore-dependencies
[email protected]
$ brew install
[email protected]
/usr/local/opt/
[email protected]
/bin/python3 Linux $ sudo apt update $ sudo apt install python3.8 python3.8-dev python3.8-venv python3.8-tk 16.10 python3(.8) apt (PPA ) python3 python3-dev python3-venv python3-tk B 2021 — 2 — 2021-10-18 – p.35/58
macOS : . . . macOS wget brew dyld: Library
not loaded: /usr/local/opt/gettext/lib/libintl.8.dylib $ brew uninstall --force gettext $ brew install gettext B 2021 — 2 — 2021-10-18 – p.36/58
Python (venv) macOS (Linux python3 ) ‘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 2021 — 2 — 2021-10-18 – p.37/58
Brownie Python Ethereum https://eth-brownie.readthedocs.io Brownie $ pip install eth-brownie version
1.16.4 (10/6 ) B 2021 — 2 — 2021-10-18 – p.38/58
$ brownie init ( ERC-20 ) $ brownie bake token
$ cd token B 2021 — 2 — 2021-10-18 – p.39/58
contracts (macOS Linux (x86/AMD64) ) $ brownie compile Linux (ARM)
(AMD64 ) $ python # >>> import solcx >>> solcx.compile_solc(’0.6.12’) # >>> quit() /tmp ~/.solcx/solc-v0.6.12 ( ) $ pytest tests B 2021 — 2 — 2021-10-18 – p.40/58
Brownie $ brownie console Python >>> len(accounts) 10 >>> accounts[0].balance()
100000000000000000000 >>> quit() B 2021 — 2 — 2021-10-18 – p.41/58
3. Ethereum ropsten B 2021 — 2 — 2021-10-18 –
p.42/58
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 2021 — 2 — 2021-10-18 – p.43/58
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 2021 — 2 — 2021-10-18 – p.44/58
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 2021 — 2 — 2021-10-18 – p.45/58
Ethereum B 2021 — 2 — 2021-10-18 – p.46/58
Ethereum Vitalik Buterin, “Ethereum White Paper: A NEXT GENERATION SMART
CONTRACT & DECENTRALIZED APPLICATION PLATFORM” 15 (= ) = ⇒ → Dapps ( / / ) B 2021 — 2 — 2021-10-18 – p.47/58
( ) B 2021 — 2 — 2021-10-18 – p.48/58
. . . B 2021 — 2 — 2021-10-18 –
p.49/58
vs. B 2021 — 2 — 2021-10-18 – p.50/58
= run B 2021 — 2 — 2021-10-18 – p.51/58
Ether Ethereum EOA : Externally-Owned Account ( ) Ether EVM
EVM B 2021 — 2 — 2021-10-18 – p.52/58
EVM : Ethereum Virtual Machine Gas ( EVM = (
burn)) . . . B 2021 — 2 — 2021-10-18 – p.53/58
EVM : : ← : Solidity — JavaScript LLL —
Lisp Vyper — Python Fe — Vyper Rust ← NEW! Solidity Vyper Python B 2021 — 2 — 2021-10-18 – p.54/58
Solidity ( ) pragma solidityˆ0.7.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 2021 — 2 — 2021-10-18 – p.55/58
( , ) (constructor) (deploy) = ( ) ( )
ETH Trusted Actor Model B 2021 — 2 — 2021-10-18 – p.56/58
Ethereum B 2021 — 2 — 2021-10-18 – p.57/58
B 2021 — 2 — 2021-10-18 – p.58/58