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
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
440
libp2p
wshino
7
1.3k
Superiority of Rust
wshino
3
360
Try Cross Compile Then Fail
wshino
0
150
GORMOS - A high performance and scalable design for decentralized applications -
wshino
4
1.8k
Sharding
wshino
4
1.1k
Plasma Debit
wshino
2
2k
ブロックチェーン技術の登場とスマートコントラクト化する社会
wshino
5
5.3k
Truffle + Drizzle と、Ethereumの概況について
wshino
2
1.2k
Other Decks in Technology
See All in Technology
AI駆動で進める依存ライブラリ更新 ─ Vue プロジェクトの品質向上と開発スピード改善の実践録
sayn0
1
320
【SORACOM UG Explorer 2025】さらなる10年へ ~ SORACOM MVC 発表
soracom
PRO
0
150
「タコピーの原罪」から学ぶ間違った”支援” / the bad support of Takopii
piyonakajima
0
140
webpack依存からの脱却!快適フロントエンド開発をViteで実現する #vuefes
bengo4com
4
3.4k
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
14
82k
CREが作る自己解決サイクルSlackワークフローに組み込んだAIによる社内ヘルプデスク改革 #cre_meetup
bengo4com
0
340
QA業務を変える(!?)AIを併用した不具合分析の実践
ma2ri
0
150
Azureコストと向き合った、4年半のリアル / Four and a half years of dealing with Azure costs
aeonpeople
1
300
AIプロダクトのプロンプト実践テクニック / Practical Techniques for AI Product Prompts
saka2jp
0
110
AWS re:Invent 2025事前勉強会資料 / AWS re:Invent 2025 pre study meetup
kinunori
0
320
ラスベガスの歩き方 2025年版(re:Invent 事前勉強会)
junjikoide
0
180
20251027_findyさん_音声エージェントLT
almondo_event
2
440
Featured
See All Featured
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
36
6.1k
Testing 201, or: Great Expectations
jmmastey
45
7.7k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.2k
Making Projects Easy
brettharned
120
6.4k
Building a Scalable Design System with Sketch
lauravandoore
463
33k
A Modern Web Designer's Workflow
chriscoyier
697
190k
Keith and Marios Guide to Fast Websites
keithpitt
411
23k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.5k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.2k
Building Flexible Design Systems
yeseniaperezcruz
329
39k
Statistics for Hackers
jakevdp
799
220k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
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 • 遊びに来てね 最後に