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

なぜBlockchainはRustを選ぶのか #roppongirs / why-blockchain-chooses-rust

なぜBlockchainはRustを選ぶのか #roppongirs / why-blockchain-chooses-rust

2019/07/30 Roppongi.rs #1 登壇資料

jkcomment

July 30, 2019
Tweet

More Decks by jkcomment

Other Decks in Technology

Transcript

  1. 自己紹介 - About me
 @ DMM.com Jikyung Kim(金 志京) ・DMM.com

    Blockchain Engineer ・Blockchain研究・開発 ・スニーカー、ロードバイク @jkcomment 2
  2. Rust?
 @ DMM.com • Rustとは? ◦ システムプログラミング言語 ◦ 安全性(型安全、メモリ安全) ◦

    速度(C, C++並) ◦ コンパイラが優秀 ◦ FireFox, Dropbox, Dwango etc... 6
  3. Blockchain Nodeの実装例
 @ DMM.com • C++: bitcoin, EOS, Zilliqa •

    Go: Ethereum, Klaytn, Quorum • Rust: Ethereum(Parity), Polkadot(Substrate), Holochain, NEAR, Grin, Conflux, CodeChain, Purple Protocol, Enigma(core), zero-chain, Plasm, Edgeware… 14
  4. なぜRustなのか② - モジュール(Networking)
 @ DMM.com • Networking(P2P) ◦ BlockchainはP2Pでネットワークを形成する ◦

    P2P(Peer to Peer)? ▪ 対等の者同士が対等な立場で相互にやり取りをおこなう ▪ 実現するために必要な機能が多い • Transport, Discovery, Peer Routing, NAT越えなど 20
  5. なぜRustなのか③ - wasm
 @ DMM.com • wasmとは? ◦ WebAssembly •

    他の言語でも書けるじゃん? ◦ Go/C#の場合、runtimeのライブラリが大きすぎてバイナリのサイズが 大きくなるし、C/C++の場合、wasmへのプロセスが面倒 ◦ Rustはバイナリが小さい、楽、wasmにしてもメモリ安全 23
  6. なぜRustなのか④ - Substrate
 @ DMM.com • Substrateとは? ◦ Parity社が開発したBlockchain Framework

    ◦ 誰でも簡単(?)に独自のBlockchainが作れる ◦ Substrateベースのプロジェクトが増えている ▪ zero-chain, Plasm, Edgeware, shasper, ChainX... 25
  7. まとめ
 @ DMM.com • BlockchainでRustが選ばれる理由は特にない ◦ RustはBlockchainでよく選ばれているのは事実 ▪ RustはBlockchainと相性が良い!(かも) •

    Blockchain以外でもRustは全然イケる! • ものづくりは楽しむべき。Rustで楽しんで行きましょう! ◦ Blockchain楽しいですよ:D 31
  8. 参考
 @ DMM.com 32 https://insights.stackoverflow.com/survey/2018#most-loved-dreaded-and-wanted https://www.parity.io/why-rust/ https://lib.rs/cryptography https://www.parity.io/wasm-smart-contract-development/ https://github.com/WebAssembly/meetings/blob/master/2018/CG-04.md#webassembly-in-blockchain https://github.com/paritytech/substrate

    https://grin-tech.org/ https://libp2p.io/implementations/ https://github.com/libp2p/specs https://github.com/rust-in-blockchain/awesome-blockchain-rust https://github.com/klaytn/klaytn https://github.com/libra/libra https://github.com/substrate-developer-hub/awesome-substrate https://github.com/darwinia-network/darwinia-appchain https://github.com/servo/servo https://github.com/actix https://github.com/SergioBenitez/Rocket https://github.com/libp2p/rust-libp2p https://github.com/rust-lang/book