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
DAppのデプロイ戦略 / DApp Deployment Strategy
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
wshino
July 13, 2018
Technology
3
1.8k
DAppのデプロイ戦略 / DApp Deployment Strategy
7/13のDApps Meetup Tokyo #1の発表資料です
wshino
July 13, 2018
Tweet
Share
More Decks by wshino
See All by wshino
Past, Present and Future
wshino
1
460
libp2p
wshino
7
1.3k
Superiority of Rust
wshino
3
370
Try Cross Compile Then Fail
wshino
0
150
GORMOS - A high performance and scalable design for decentralized applications -
wshino
4
1.9k
Sharding
wshino
4
1.1k
Plasma Debit
wshino
2
2k
ブロックチェーン技術の登場とスマートコントラクト化する社会
wshino
5
5.4k
Truffle + Drizzle と、Ethereumの概況について
wshino
2
1.2k
Other Decks in Technology
See All in Technology
OpenShiftでllm-dを動かそう!
jpishikawa
0
100
超初心者からでも大丈夫!オープンソース半導体の楽しみ方〜今こそ!オレオレチップをつくろう〜
keropiyo
0
110
MCPでつなぐElasticsearchとLLM - 深夜の障害対応を楽にしたい / Bridging Elasticsearch and LLMs with MCP
sashimimochi
0
160
日本の85%が使う公共SaaSは、どう育ったのか
taketakekaho
1
150
Embedded SREの終わりを設計する 「なんとなく」から計画的な自立支援へ
sansantech
PRO
3
2.4k
What happened to RubyGems and what can we learn?
mikemcquaid
0
290
M&A 後の統合をどう進めるか ─ ナレッジワーク × Poetics が実践した組織とシステムの融合
kworkdev
PRO
1
430
Bill One 開発エンジニア 紹介資料
sansan33
PRO
4
17k
20260204_Midosuji_Tech
takuyay0ne
1
150
AWS Network Firewall Proxyを触ってみた
nagisa53
1
220
SREが向き合う大規模リアーキテクチャ 〜信頼性とアジリティの両立〜
zepprix
0
440
OCI Database Management サービス詳細
oracle4engineer
PRO
1
7.4k
Featured
See All Featured
Six Lessons from altMBA
skipperchong
29
4.1k
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
66
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
51
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
1
51
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
1
1.4k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
64
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
110
Visualization
eitanlees
150
17k
Leo the Paperboy
mayatellez
4
1.4k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
3.6k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
21k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.4k
Transcript
DAppのデプロイ戦略 DApps Meetup Tokyo #1 2018.7 DMM.comラボ スマートコントラクト事業部 篠原航
本日のアジェンダ • Smart ContractのUpgrade課題 • Upgradeable Contract • Function Callの問題
自己紹介 篠原航 DMMスマートコントラクト事業 部テックリード。計算リソース の効率化、継続的デリバリや デプロイの開発を支える仕組 み作り、ウォレットの実装を担 当。最近ヨーヨーにはまってい たが上達しないのですでに飽 きた。
https://www.amazon.co.jp/dp/4839965137/
Smart ContractのUpgrade課題 Upgradeable Contract Function Callの問題 Section01 Section02 Section03
Smart Contractは更新ができない • Webサービスのメリットは更新できること • 継続的デリバリ、インテグレーションができないとどうなるのか
更新ができないとこうなる • 新しい機能が実装できない • バグに対処できない • MVP(Minimum Viable Product)に使えない •
パッケージ製品の負の属性を帯びる 誤植発見 新しいの 送ります
Smart ContractのUpgrade課題 Upgradeable Contract Function Callの問題 Section01 Section02 Section03
Upgradeabilityの提案と実装 • ERC897, ERC820, ERC165 ◦ なかじょーさんの資料が詳しい • ZeppelinOS •
AragonOS https://speakerdeck.com/nakajo2011/upgradablity-smartcontract
ZeppelinOS • OpenZeppelinを作成しているZeppelinが開発 • 更新できるコントラクトを実現 • 標準ライブラリの提供 • Function Callを使ったProxy
Pattern
ZeppelinOS 制限事項 • 変数を消すことはできない ◦ 継ぎ足ししかできない • コンストラクタは使えない ◦ コンストラクタはブロックチェーンに残らない
◦ なのでProxyからは絶対に呼べない
AragonOS • Upgradeability • Modular • Proxy Pattern ◦ Base
Contractにビジネスロジックを記述 ◦ Proxyにコントラクトへのアドレスを記述
AragonOSの投票制度 • AragonはDAOを実現するためのプロジェクト • 投票によりコントラクト実行を行う手法 ◦ コントラクトへの実行は一旦プールされる(Forwarder Contract) ◦ 組織の参加者で一定期間投票する
◦ 投票により可決されたらコントラクトが実行される ◦ upgradeも投票制度に
Smart ContractのUpgrade課題 Upgradeable Contract Function Callの問題 Section01 Section02 Section03
FunctionのMethod ID • FunctionはMethod IDを持つ • Method IDはFunction Nameをハッシュ化して最初の4バイト •
get()の場合 1. bytes4("sha3(get()")) 2. bytes4(6d4ce63caa65600744ac797760560da39ebd16e8240936b51f53 368ef9e0e01f) 3. 0x6d4ce63c
Function Call • function.call((bytes4(sha3("get()")))) • 最初の4バイトが重複し意図しない動作をする可能性 • ZeppelinOSはNomic labsによってこの脆弱性が指摘されている
他の手法の提案 • Main ChainとSide Chainで構成する • 利用者が所持するステートコントラクトをMain Chainに • 更新が頻繁に行われるロジックコントラクトはSide
Chainに Main Chain Side Chain Side Chainの参照先を Main Chainに記述。 Side Chainは交換可能に する。
他の手法の提案 • Loom Networkが提供しているDApp Chain, Zombie Chain
• DMMでは様々な人材を募集しています ◦ https://dmm-corp.com/recruit/top • 遊びに来てね 最後に