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
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
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
470
libp2p
wshino
7
1.3k
Superiority of Rust
wshino
3
380
Try Cross Compile Then Fail
wshino
0
160
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
Phase12_総括_自走化
overflowinc
0
350
Visional 28新卒プロダクト職(エンジニア/デザイナー)向け 会社説明資料 / Visional Company Briefing for Newgrads 28
visional_engineering_and_design
1
110
【Λ(らむだ)】最近のアプデ情報 / RPALT20260318
lambda
0
130
テストプロセスにおけるAI活用 :人間とAIの共存
hacomono
PRO
0
110
[2] Power BI Deep Dive [2026-03]
ohata_bi
0
110
Phase04_ターミナル基礎
overflowinc
0
560
Phase05_ClaudeCode入門
overflowinc
0
510
20年以上続く PHP 大規模プロダクトを Kubernetes へ ── クラウド基盤刷新プロジェクトの4年間
oogfranz
PRO
0
140
Agent Skill 是什麼?對軟體產業帶來的變化
appleboy
0
160
ReactのdangerouslySetInnerHTMLは“dangerously”だから危険 / Security.any #09 卒業したいセキュリティLT
flatt_security
0
370
【社内勉強会】新年度からコーディングエージェントを使いこなす - 構造と制約で引き出すClaude Codeの実践知
nwiizo
7
4.6k
大規模ECサイトのあるバッチのパフォーマンスを改善するために僕たちのチームがしてきたこと
panda_program
1
320
Featured
See All Featured
Typedesign – Prime Four
hannesfritz
42
3k
Principles of Awesome APIs and How to Build Them.
keavy
128
17k
Skip the Path - Find Your Career Trail
mkilby
1
87
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
180
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.6k
Test your architecture with Archunit
thirion
1
2.2k
My Coaching Mixtape
mlcsv
0
82
Become a Pro
speakerdeck
PRO
31
5.9k
Building Adaptive Systems
keathley
44
3k
Building the Perfect Custom Keyboard
takai
2
720
Speed Design
sergeychernyshev
33
1.6k
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 • 遊びに来てね 最後に