Upgrade to Pro — share decks privately, control downloads, hide ads and more …

GORMOS - A high performance and scalable design for decentralized applications -

wshino
August 17, 2018

GORMOS - A high performance and scalable design for decentralized applications -

2018/08/17 Hi-Ether Fukuoka #7 の発表資料です。20分に収めるために色々省略しています。

wshino

August 17, 2018
Tweet

More Decks by wshino

Other Decks in Technology

Transcript

  1. GORMOS Hi-Ether Meetup #7 Fukuoka 2018.8 DMM.com スマートコントラクト事業部 篠原航 A

    high performance and scalable design for decentralized applications
  2. GORMOS ? • 6/18にWhite Paper Draft公開 • Loi Luu, Yaron

    Velner, Alex Xiong at KyberNetwork • SecurityとScalabilityの両立 • 数百万 TXs/sで低レイテンシ • アプリケーション特化で高速なtx処理を実現 ◦ 応用範囲 = DEX, Game, Payment and Social Network https://www.dropbox.com/s/y9a36dqcl0vbf0d/gormos.pdf
  3. 他の解決方法は? • 階層型Plasma ◦ Plasma on Plasma ◦ = Security

    trade-off on Security trade-off • Sharding ◦ Shard間通信が問題 • Payment Channel ◦ Globalなオーダーブックが実現不可能
  4. System Architecture So Gormos is inspired by sharding in centralized

    systems very much. 人力シャード? ex. Blog, Online Game
  5. Shardの分離指針 • Trading Pairを異なるShardに分離 ◦ ex. ETH / KNC と

    BTC / OMG は相互に影響がない • 新しくTrading Pairを増やす時はShardを作成する ◦ 既存のShardに影響しない • ShardingでPlasmaを拡張 ETH / KNC BTC / OMG
  6. Main Shard and Local Shard • Main Shard ◦ Local

    Shardの処理結果を取得、集約 ◦ 基軸通貨(ETH, BTC)を処理 • Local Shard ◦ 設定されたToken Pairの取引を処理
  7. Use Case • 基軸通貨はMain Shardで処理してからLocal Shardに移動 • Shard間通信が走るのは基軸通貨を移動する時のみ ◦ 必ずメインシャードを通して移動する

    • Local Shardでは複数pairを扱わない ◦ リスクの分離 ◦ ex. コントラクトのバグなどで特定のトークンの取引を停止
  8. Consensus Validator • Shard内の合意に関与 • Local Shardごとに20ほど必要 ◦ Confirmationを2秒にする場合 ◦

    溢れた場合はShard Inspectorに • 登録にはKNCが必要 ◦ デポジットを下げて大量に雇用 ◦ 公開市場で一定数バリデータ数のみを許可 tx承認します
  9. Validator Pool • Shard Inspector -> Consensus Validator • Consensus

    Validator -> 別ShardのShard Inspector • Shard InspectorはすぐにValidatorとして活動できる ◦ Sharding v1 specのlookahead periodみたいなもの • Root ChainのBlock Hashを元にVRFかRandHoundでローテート Another Shard 実際にはGORMOSがローテートを行う のですが、簡略化してます
  10. Interoperability • PeaceRelay ◦ EVM baseのTokenをEthereumに入れたり出したりできる • Trustless Custodian approach

    ◦ ETHやERC20などを担保にBTC Tokenを作成する保管人を用意 • MakerDao’s approach ◦ ETHをBTC Tokenを作成するための担保として使用 ◦ 担保を超えなければ安定する
  11. Tx Format (addr, shard id, src token id, des token

    id, order type, src amount, fee, metadata, nonce)
  12. Block Format • Local Block Format ◦ (shard id, block

    number, prev block hash, new order merkle root, balance merkle root, avail balance merkle root, open order MMR root, closed order MMR root, cancelled order MMR root, timestamp, signatures)
  13. Block Format • Main Block Format ◦ (block number, prev

    block hash, new local headers merkle root, new order merkle root, balance merkle root, avail balance merkle root, open order MMR root, closed order MMR root, cancelled order MMR root, timestamp, signatures)
  14. Consensus Argorithm • HoneyBadger BFT を検討 ◦ 64 Nodeで 12,000

    TXs/s • 各Local Shardは非同期にブロックを生成して送信 • Main Shardはその時に取り込み可能なブロック全てを記録