Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
ブロックチェーン概論とインストール大会 / Blockchain Overview and I...
Search
Kenji Saito
PRO
October 12, 2024
Technology
0
28
ブロックチェーン概論とインストール大会 / Blockchain Overview and Installation
慶應義塾大学大学院メディアデザイン研究科「サービスデザインプロジェクトB」2024秋 第2回にて使用したスライドです。
Kenji Saito
PRO
October 12, 2024
Tweet
Share
More Decks by Kenji Saito
See All by Kenji Saito
じわじわ迫ってきている自動化社会 (その先にメタ・ネイチャー) / The Slowly Approaching Automated Society (and its beyond: Meta-Nature)
ks91
PRO
0
2
起こりうる誤った推論/平均・分散・標準偏差・自由度 / Possible false inferences, means, variances, standard deviations and degrees of freedom
ks91
PRO
0
46
LaTeX と Overleaf によるショートペーパー作成 / Short paper writing with LaTeX and Overleaf
ks91
PRO
0
13
R を用いた検定(補講) (1) — Welch 検定 / Tests using R (supplementary) (1) - Welch test
ks91
PRO
0
9
R を用いた検定(補講) (2) — カイ二乗検定 / Tests using R (supplementary) (2) - Chi-squared test
ks91
PRO
0
8
R を用いた分析(補講) (1) — 重回帰分析 / Analysis using R (supplementary) (1) - Multiple regression analysis
ks91
PRO
0
5
R を用いた分析(補講) (2) — 人工データの生成 / Analysis using R (supplementary) (2) - Generating artificial data
ks91
PRO
0
6
GPT-4 を用いたデータ分析 / Data analysis using GPT-4
ks91
PRO
0
10
GPT-4 を用いた論文生成 / Paper generation using GPT-4
ks91
PRO
0
9
Other Decks in Technology
See All in Technology
コーポレートデータマスター構築への道
kworkdev
PRO
0
130
ARRが3年で10倍になったプロダクト開発とAI活用の軌跡
akiroom
0
240
Autonomous Database サービス・アップデート (FY25)
oracle4engineer
PRO
0
260
密着! Bedrockerがre:Invent 2024で過ごした5日間を紹介
minorun365
PRO
3
310
GitHub Actions의 다양한 기능 활용하기 - GitHub Universe '24 Recap
outsider
0
510
スパイクアクセス対策としての pitchfork 導入
riseshia
0
170
品質管理チームのEMとして大事にしていること / QA EM
nihonbuson
0
830
ソフトウェアエンジニアとしてキャリアの螺旋を駆け上がる方法 - 経験と出会いが人生を変える / Career-Anchor-Drive
soudai
13
2.9k
リクルートのデータ基盤 Crois 年3倍成長!1日40,000コンテナの実行を支える AWS 活用とプラットフォームエンジニアリング
recruitengineers
PRO
1
150
JAWS-UG 横浜支部 #76 AWS re:Invent 2024 宇宙一早い Recap LT3Amazon EKS Auto Modeと遊び(パーティ)の話
tjotjo
0
130
宇宙最速のランチRecap LT会(開発者ツール&運用監視編)
nnydtmg
1
180
sre本読んだ感想
pisakun
0
230
Featured
See All Featured
Git: the NoSQL Database
bkeepers
PRO
427
64k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.4k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
Designing for Performance
lara
604
68k
How To Stay Up To Date on Web Technology
chriscoyier
789
250k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.2k
Building Better People: How to give real-time feedback that sticks.
wjessup
365
19k
Six Lessons from altMBA
skipperchong
27
3.5k
Agile that works and the tools we love
rasmusluckow
328
21k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
330
21k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
48
2.2k
Code Review Best Practice
trishagee
64
17k
Transcript
Generated by Stable Diffusion XL v1.0 B 2024 2 (
) B 2024 — 2 — 2024-10-14 – p.1/62
https://speakerdeck.com/ks91/collections/service-design-project-b-2024-fall ( ) ( ) Discord Discord ( / /
) Zoom URL ( ) B 2024 — 2 — 2024-10-14 – p.2/62
( ) 1 10 7 • 2 10 14 •
3 10 21 4 11 28 5 11 4 1 6 11 11 2 7 11 18 8 11 25 ( ) Discord B 2024 — 2 — 2024-10-14 – p.3/62
1. 2. Ethereum 3. B 2024 — 2 — 2024-10-14
– p.4/62
1. B 2024 — 2 — 2024-10-14 – p.5/62
ެ։ா ެ։Ͱͳ͚ΕͳΒͳ͍ ʜ ຊਓ ɾૹۚه ɾίʔυ ɾσʔλͷมԽ ɾ࣮ߦϩά ݕӾͰ͖Δୈࡾऀ ͜Εɺ
ه͍ͨ͠Μ͚ͩͲ ͋ͳͨ ॻ͍ͨΒμϝ ͜ͷ༰ ॻ͍ͨΒμϝ ॻ͍ͪΌͬͨͷʁ ͜͏ॻ͖͑·͠ΐ͏ ॻ͍ͯͳ͍ͷʁ ͜͏ॻ͔Εͨ͜ͱʹ ͠·͠ΐ͏ ॻ͍ͪΌͬͨͷʁ ফ͠·͠ΐ͏ %P4 ߈ܸͱ͔Ͱ ͯ͠ࢭΊ·͠ΐ͏ B 2024 — 2 — 2024-10-14 – p.6/62
Bitcoin . . . : (i.e. ) ( ) :
: : ⇒ ( ) ← B 2024 — 2 — 2024-10-14 – p.7/62
৽ن ϒϩοΫ ܈ Ճ ίετϨδελʔ͖ ா ਖ਼౷ͳཤྺ ఏҊ͞ΕΔ৽͍͠ཤྺ ίετ େ
͕ ࢀ Ճ ݁Ռ B มߋແ͠ C ه D ॻ͖͑ ɾ৽͍͠ཤྺ͕͜Ε·Ͱͷཤྺʹੵ͞Εͨ ɹίετΛ૿େͤ͞ΔΑ͏ͳͷͰͳ͍ͷ ɹͳΒมߋੜ͡ͳ͍ɻ ɾίετ݁ՌతʹɺωΠςΟϒ҉߸ࢿ࢈ ݐͯͰଌΒΕΔɻ ɾாͷҡ࣋ʹࢀՃ͢Εɺ֬తʹେ͖ͳ ใुΛωΠςΟϒ҉߸ࢿ࢈ͰಘΒΕΔɻ ɾใुΛಘΔͨΊʹίετෛ୲ͰϚδϣϦςΟ ଆʹ͍ͳ͚ΕͳΒͳ͍ɻ B 2024 — 2 — 2024-10-14 – p.8/62
4 ( ) ( ) ( ; ) ( )
B 2024 — 2 — 2024-10-14 – p.9/62
( ) ೖྗ σδλϧͳΒԿͰΑ͍σʔλͷू߹ ແݶ ग़ྗ CJU ͳͲݻఆͷͷू߹ ༗ݶ ग़ྗʮμΠδΣετʯͱݺΕΔ
খ ͞ ͍ ॱ ʹ ฒ Μ Ͱ ͍ Δ ͱ ͠ ͯ খ ͞ ͍ ॱ ʹ ฒ Μ Ͱ ͍ Δ ͱ ͠ ͯ 4)"ͳͲͷؔ 4)"4FDVSF)BTI"MHPSJUIN Ұ༷ʹ ϋογϡؔͷੑ࣭ ภͬͯ Ϛοϐϯάʹ๏ଇੑ͕ແ͍Α͏ʹݟ͑ɺ ˠͷํʹ҆ՁʹܭࢉͰ͖Δ͕ɺ ٯͷํʹܭࢉͰ͖ͳ͍ Ұํੑ ҉߸ֶతϋογϡؔͷੑ࣭ ແݶΛ༗ݶʹϚοϐϯά͢ΔͷͰɺҟͳΔೖྗ͕ ಉ͡ग़ྗ݁ՌʹͳΔ߹͘͝رʹ͋Δ িಥ িಥ ͤ͞Δํ๏ ͕ݟ͔ͭͬͨ҉߸ֶతϋογϡ ؔ҆શͱݟͳ͞Εͳ͍ B 2024 — 2 — 2024-10-14 – p.10/62
( ) ൿີ伴 伴ϖΞ ͋Β͔͡Ί ੜ ൿີʹӅ࣋ͭ͠ ͋Β͔͡Ί͓͍ͯͯ͠Α͍ ॺ໊Λ࡞ͬͨͷެ։伴ʹ ରԠ͢Δൿີ伴Λ͑Δ୭
͔ ͢ͳΘͪॺ໊ऀ ͩ͠ɺ ݩͷσʔλॺ໊ޙCJU มΘͬ ͍ͯͳ͍ ͜ͷΈ͕ਖ਼͘͠ಈ࡞͢ΔͨΊʹɺ ड͚औͬͨެ։伴͕ຊʹॺ໊ऀͷͷ Ͱ͋Δͱ͍͏ԿΒ͔ͷূ໌͕ඞཁ ʲॺ໊ΞϧΰϦζϜʳ ೖྗݩͷσʔλɺ ൿີ伴 ग़ྗॺ໊ ʲॺ໊ݕূΞϧΰϦζϜʳ ೖྗݩͷσʔλɺ ॺ໊ɺ ެ։伴 ग़ྗ0,·ͨ/( ެ։伴 ॺ໊ऀ ॺ໊ ΞϧΰϦζϜ ॺ໊ݕূ ΞϧΰϦζϜ 0, ·ͨ /( Πϯλʔωοτ ݕূऀ ެ ެ։ ։伴 伴 ެ։ ެ։伴 ެ ެ։ ։伴 伴 ݩͷ σʔλ ݩͷ σʔλ ॺ໊ ॺ໊ B 2024 — 2 — 2024-10-14 – p.11/62
ϒϩοΫ O ࣌ؒ ϒϩοΫϔομʔ ͍ΖΜͳใ͕ೖ͍ͬͯΔ ϒϩοΫ O ͷ μΠδΣετ औҾ
σʔλ ެ։伴 ˍॺ໊ औҾ σʔλ ެ։伴 ˍॺ໊ औҾ σʔλ ެ։伴 ˍॺ໊ ʜʜ ϒϩοΫ O ϒϩοΫϔομʔ ͍ΖΜͳใ͕ೖ͍ͬͯΔ ϒϩοΫ O ͷ μΠδΣετ औҾ σʔλ ެ։伴 ˍॺ໊ औҾ σʔλ ެ։伴 ˍॺ໊ औҾ σʔλ ެ։伴 ˍॺ໊ ʜʜ ϒϩοΫͷμΠδΣετ ͦͷϒϩοΫΛҰҙʹࣔ͢ ࣝผࢠͱͯ͠༻͍ΒΕΔ औҾσʔλͷআͰϒϩοΫͷ ༰͕มΘΕɺͦͷμΠδΣετ มΘΔͷͰɺໃ६͕ੜ͡Δ औҾσʔλʹૹ৴ऀͷσδλϧ ॺ໊͕͍͍ͯΔͷͰվ͟Μ ࠔ͕ͩɺऔҾσʔλΛؙ͝ͱ আ͢Δ͜ͱͰ͖Δ ࣍ͷϒϩοΫʹμΠδΣετ͕ ֨ೲ͞Ε͍ͯΔ͜ͱͰɺखલͷ ϒϩοΫͷ༰ϩοΫ͞Εͯ ͍Δͱݴ͑Δ͕ʜ ܨ͕͍ͬͯΔϒϩοΫͷϔομʔ ͷதͷμΠδΣετΛ࣍ʑͱॻ͖ ͍͚͑ͯໃ६ͳ͘վ͟ΜͰ͖ ΔͷͰɺϒϩοΫΛ࡞Δ͜ͱࣗମ ʹେ͖ͳίετΛඞཁʹͯ͠कΔ Proof of Work ( ) : ( ) Proof of Stake ( ) : B 2024 — 2 — 2024-10-14 – p.12/62
( : ) ( : ) ← NFT 4 ⇒
B 2024 — 2 — 2024-10-14 – p.13/62
(Confidentiality) 4 ( 4 ) ↑ ( = ) (Integrity)
(Availability) B 2024 — 2 — 2024-10-14 – p.14/62
2009 ↑ 15 ( 5 ) B 2024 — 2
— 2024-10-14 – p.15/62
( ) ADR (Active (space) Debris Removal) : https://doi.org/10.1109/TCSS.2018.2890655 (1930
) ( ) B 2024 — 2 — 2024-10-14 – p.16/62
( ) ( ) ( ) B 2024 — 2
— 2024-10-14 – p.17/62
( ) ( - ) : https://doi.org/10.1016/j.future.2019.05.019 B 2024 —
2 — 2024-10-14 – p.18/62
( ) ( ) ( ) B 2024 — 2
— 2024-10-14 – p.19/62
( ) B 2024 — 2 — 2024-10-14 – p.20/62
/ ( ) ( ) ( ) ( ) B
2024 — 2 — 2024-10-14 – p.21/62
( ) ( ) ( ) B 2024 — 2
— 2024-10-14 – p.22/62
( ) : https://www.lij.jp/html/jli/jli_2017/ 2017summer_p018.pdf B 2024 — 2 —
2024-10-14 – p.23/62
( ) ( ) B 2024 — 2 — 2024-10-14
– p.24/62
B 2024 — 2 — 2024-10-14 – p.25/62
with ( ) ( ) : https://doi.org/10.1016/j.icte.2021.08.012 ( ) B
2024 — 2 — 2024-10-14 – p.26/62
DNS : https://ieeexplore.ieee.org/document/9686409 ( ) IP AS B 2024 —
2 — 2024-10-14 – p.27/62
( ) ( ) : https://ieeexplore.ieee.org/document/9686409 ( ) : https://doi.org/10.1016/j.icte.2021.08.012
(web ) B 2024 — 2 — 2024-10-14 – p.28/62
( ) ( ) ( ) : https://doi.org/10.1016/j.icte.2021.08.012 ( )
( ) ( ) : https://ieeexplore.ieee.org/document/9686409 B 2024 — 2 — 2024-10-14 – p.29/62
( ) ( ) : https://ieeexplore.ieee.org/document/9686409 3D ( ) :
HACCP ( ) B 2024 — 2 — 2024-10-14 – p.30/62
— τʔΫϯ ସ՟ฎ εϚʔτίϯτϥΫτ ݕূՄೳͳঢ়ଶϚγϯ ϓϩϏφϯε དྷྺূ໌ ସՄೳ ঈؐෆೳ
ସՄೳ ঈؐՄೳ ସෆೳ ঈؐՄೳ ସෆೳ ঈؐෆೳ ূ໌͢Δ ಉఆ͢Δ ࢧ͍ ࠷ॳͷԠ༻ *%Χʔυ ηΩϡϦςΟ τʔΫϯ ূ݊ ηϯαʔ ྲྀɾ Ҩݴॻ อݥਃ ͢Δ ײ͢Δ தԝۜߦ σδλϧ௨՟ ҭήʔϜ ൿີ伴Λ͑Δ͔Βຊਓʁ ෛ࠴ Ξηοτͷ දݱΛҠసͰ͖Δʁ ొ͞Εͨίʔυͱ ͦͷ࣮ߦϩάͱ݁Ռͷ ਅਖ਼ੑΛ୲อͰ͖Δʁ ݖҖ͕ Կ͔ͷ༰Λূ໌͢Δʁ ࣋ଓ͢Δଘࡏʹ͍ͭͯ هΛΞοϓσʔτՄʁ ओମ͕͍ͳ͘ͳͬͯ աڈͷσʔλ༗ޮʁ /'5 Ұൠతͳ ೝࣝ ػೳͷ ੳ݁Ռ B 2024 — 2 — 2024-10-14 – p.31/62
2. Ethereum macOS (Sonoma 14.7) + Homebrew Linux (Ubuntu 24.04)
(x86/AMD64 and ARM) Windows 11 + Windows Subsystem for Linux (Ubuntu ) Ethereum solidity brownie Lima on macOS B 2024 — 2 — 2024-10-14 – p.32/62
macOS : Homebrew (Apple macOS ) UNIX macOS Lima Homebrew
brew Apple brew ( ) brew Rosetta brew brew https://github.com/homebrew/install Path : https://zenn.dev/tet0h/articles/a92651d52bd82460aefb $ which brew /opt/homebrew/bin/brew B 2024 — 2 — 2024-10-14 – p.33/62
macOS : Rosetta 2 Apple x86/AMD64 ( ) $ softwareupdate
--install-rosetta lima Rosetta 2 lima B 2024 — 2 — 2024-10-14 – p.34/62
macOS : Lima macOS Linux ( ) https://github.com/lima-vm/lima QEMU (
) Rosetta 2 Apple x86/AMD64 brew $ brew install lima Ubuntu 24.04 (x86/AMD64) “kmd.yaml” ( “kmd.yaml” ) $ limactl start kmd.yaml B 2024 — 2 — 2024-10-14 – p.35/62
macOS : Lima Linux (Ubuntu) x86_64 $ limactl list Linux
(exit ) $ limactl shell kmd Linux limactl list STATUS Stopped limactl start kmd “.lima” diffdisk 100GB B 2024 — 2 — 2024-10-14 – p.36/62
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.27 (10/5 ) $ solc --version brownie py-solc-x solc (dependencies) ( solc py-solc-x ) B 2024 — 2 — 2024-10-14 – p.37/62
Ganache Ethereum RPC npm ( ) macOS https://qiita.com/kyosuke5_20/items/c5f68fc9d89b84c0df09 Linux https://qiita.com/seibe/items/36cef7df85fe2cefa3ea
npm Ganache $ sudo npm install -g ganache B 2024 — 2 — 2024-10-14 – p.38/62
Python3 macOS $ brew install python3 Python 3.8 Homebrew $
brew uninstall --ignore-dependencies
[email protected]
$ brew install
[email protected]
/usr/local/opt/
[email protected]
/bin/python3 Linux ( python3.12.3 OK) $ sudo apt update $ sudo apt install python3-dev python3-venv python3-tk 16.10 python3(.8) apt (PPA ) python3 python3-dev python3-venv python3-tk B 2024 — 2 — 2024-10-14 – p.39/62
macOS : . . . macOS wget brew dyld: Library
not loaded: /usr/local/opt/gettext/lib/libintl.8.dylib $ brew uninstall --force gettext $ brew install gettext B 2024 — 2 — 2024-10-14 – p.40/62
Python (venv) macOS (Linux python3 ) OK Python $ python3
-m venv bbc2env $ source bbc2env/bin/activate (bbc2env) $ pip install -U pip bbc2env ( BBc-2 ) ( ) (bbc2env) $ deactivate B 2024 — 2 — 2024-10-14 – p.41/62
Brownie Python Ethereum https://eth-brownie.readthedocs.io Brownie $ pip install eth-brownie version
1.20.6 (10/5 ) B 2024 — 2 — 2024-10-14 – p.42/62
$ brownie init ( ERC-20 ) $ brownie bake token
$ cd token B 2024 — 2 — 2024-10-14 – p.43/62
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 2024 — 2 — 2024-10-14 – p.44/62
Brownie $ brownie console Python >>> len(accounts) 10 >>> accounts[0].balance()
100000000000000000000 >>> quit() B 2024 — 2 — 2024-10-14 – p.45/62
3. Ethereum Sepolia B 2024 — 2 — 2024-10-14 –
p.46/62
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 2024 — 2 — 2024-10-14 – p.47/62
Sepolia ETH brownie console Sepolia >>> network.disconnect() >>> network.connect(’sepolia’) >>>
len(accounts) 0 >>> accounts.add() <LocalAccount object ’ 16 ’> >>> accounts[0].private_key 16 >>> quit() Sepolia Testnet ETH Faucet ETH https://sepoliafaucet.com ( ) ( ) Sepolia ETH 0.001 ETH 0.05 Sepolia ETH B 2024 — 2 — 2024-10-14 – p.48/62
Sepolia ETH brownie console Sepolia ETH >>> network.disconnect() >>> network.connect(’sepolia’)
>>> len(accounts) 0 >>> accounts.add( 16 ) <LocalAccount object ’ 16 ’> >>> accounts[0].balace() ETH >>> quit() ETH >>> accounts[0].transfer(accounts[1], "0.01 ether") B 2024 — 2 — 2024-10-14 – p.49/62
: Ethereum B 2024 — 2 — 2024-10-14 – p.50/62
Ethereum Vitalik Buterin, “Ethereum White Paper: A NEXT GENERATION SMART
CONTRACT & DECENTRALIZED APPLICATION PLATFORM” 12 (= ) = ⇒ → Dapps ( / / ) B 2024 — 2 — 2024-10-14 – p.51/62
( ) B 2024 — 2 — 2024-10-14 – p.52/62
. . . B 2024 — 2 — 2024-10-14 –
p.53/62
vs. B 2024 — 2 — 2024-10-14 – p.54/62
= run B 2024 — 2 — 2024-10-14 – p.55/62
Ether Ethereum EOA : Externally-Owned Account ( ) Ether EVM
EVM B 2024 — 2 — 2024-10-14 – p.56/62
EVM : Ethereum Virtual Machine ঢ়ଶ ֎෦ΞΫλʔ ΞΧϯτ &7. ίʔυ
&UIFSˠ(BT ىಈ ίϯτϥΫτ ϝοηʔδ͔ɺ৽͍ࣗ͠ಈΦϒδΣΫτ ΞΧϯτؒͰΓऔΓ͞ΕΔσʔλ&UIFS ετϨʔδ ঢ়ଶ` τϥϯβΫγϣϯ ηοτ σδλϧॺ໊ &7. ਓؒͱ͔ ࣗಈ ΦϒδΣΫτ Gas ( EVM = ( burn)) . . . B 2024 — 2 — 2024-10-14 – p.57/62
EVM : : ← : Solidity — JavaScript LLL —
Lisp Vyper — Python Fe — Vyper Rust ← NEW! Solidity Vyper Python B 2024 — 2 — 2024-10-14 – p.58/62
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 2024 — 2 — 2024-10-14 – p.59/62
( , ) (constructor) (deploy) = ( ) ( )
ETH Trusted Actor Model B 2024 — 2 — 2024-10-14 – p.60/62
Ethereum B 2024 — 2 — 2024-10-14 – p.61/62
B 2024 — 2 — 2024-10-14 – p.62/62