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
Move for Libra written in Rust
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
cipepser
July 30, 2019
Programming
3.3k
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Move for Libra written in Rust
cipepser
July 30, 2019
More Decks by cipepser
See All by cipepser
long-running-tasks
cipepser
3
500
layerx-fde-practices
cipepser
6
3.1k
NIKKEI Tech Talk#38
cipepser
0
1.2k
LayerXにおけるFDEについて
cipepser
3
3.2k
20250725-bet-ai-day
cipepser
3
660
Criterion-rs
cipepser
0
170
Practical Anonify
cipepser
2
910
procedural-macros
cipepser
0
210
How IBLT Works
cipepser
0
270
Other Decks in Programming
See All in Programming
フロントエンドとバックエンドで「1文字」を揃えよう
youkidearitai
PRO
0
680
脅威をエンジニアリングの糧にして――現場編 / Turning Threats into Engineering Fuel — Field Edition
nrslib
0
280
Creating Composable Callables in Contemporary C++
rollbear
0
130
Observability in Practice:Grafana 與 Edge Device SRE 的那些事
blueswen
0
160
コンテキストの使い捨てをやめる — ビジネスルール駆動開発と miko —
ioki
0
200
Spring Security 実践 ─ GraphQL APIで実務に役立つ 認証・認可 を学ぶ
wagyu
0
230
IBM Bobを活用したレガシーアプリの最新化
oniak3ibm
PRO
1
200
Semantic Version 単位で戦略を柔軟に変えて、パッケージアップデートを自動化する
daitasu
1
240
net-httpのHTTP/2対応について
naruse
0
480
Technical Debt: Understanding it Rightly, Engaging it Rightly #LaravelLiveJP
shogogg
0
220
Claspは野良GASの夢をみるか
takter00
0
190
エージェンティックRAGにAWSで入門しよう!
har1101
8
1.5k
Featured
See All Featured
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.5k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
170
Raft: Consensus for Rubyists
vanstee
141
7.5k
Practical Orchestrator
shlominoach
191
11k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
230
So, you think you're a good person
axbom
PRO
2
2.1k
The SEO Collaboration Effect
kristinabergwall1
1
480
Evolving SEO for Evolving Search Engines
ryanjones
0
220
Building the Perfect Custom Keyboard
takai
2
790
Designing for Timeless Needs
cassininazir
1
250
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.3k
Transcript
Rustで実装された Libra Move言語とは cipepser 2019/7/30 Roppongi.rs #1
自己紹介 • cipepser(さいぺ) • Fintertech株式会社 • Rust歴: 1年半くらい • 経歴
◦ SIerで証券系システムのネットワーク設計、構築 • 最近の趣味プロジェクト ◦ 自作Protocol Buffersデコーダ(Golang) ◦ Monkey言語のRust実装 ▪ Lexerまでは実装済み。AST設計中。 ▪ コンパイラとVMの実装までやりきりたい
本日の内容 • Libraとは • Move言語とは • ブロックチェーン上にアセットを載せる難しさ • 既存のブロックチェーン言語の課題 •
Moveの設計 • Moveに触るには
Libraとは • 2019年6月にFacebookが発表した金融プラットフォーム • ミッション「多くの人びとに力を与える、シンプルで国境のないグローバルな通貨と 金融インフラになる」 • BFTモデルのLibra Blockchainが基盤 •
とにかくメンバーが強い 1) The Libra Whitepaper - Blockchain, Association, Reserve | Libra https://libra.org/ja-JP/white-paper/#introduction 2) Facebook’s cryptocurrency partners revealed—we obtained the entire list of inaugural backers - The Block https://www.theblockcrypto.com/2019/06/14/facebooks-cryptocurrency-partners-revealed-we-obtained-the-entire-list-of-inaugural-backers/
Move言語とは • Libraでスマートコントラクトを書く言語 • Move自体はRustで実装されている ◦ 安全とセキュリティを重視 • 静的型付けのバイトコード言語 ◦
VMで実行 ◦ bytecode verifierによるチェック
デジタル・アセットをオープンシステムに載せる難しさ • Scarcity(希少性) ◦ 無から有を生み出せないこと ◦ 複製できないこと • Access control
◦ 所有者だけがアセットをコントロールできること
既存のブロックチェーン言語の課題 • 資産を直接エンコードできない ◦ 資産をIntegerで表現 ◦ 型がない ◦ エラーハンドリングはどうやって? •
Scarcityの実装が開発者に委ねられる ◦ 言語のサポートなしに、注意深く実装しなければならない • Access controlが柔軟でない ◦ 署名スキームベースが主流
Moveの設計 • first-class assets ◦ resource typeを定義できる(資産を表現) ◦ コピーと破棄は明示的に行う( copy/move)
• flexibility ◦ Move言語: modules/resources/produres ◦ オブジェクト指向言語 : classes/objects/methods • safety ◦ bytecode verifierによるoff-chain解析 • verfiability ◦ 動的ディスパッチを行わない ▪ コールグラフが複雑にならない ◦ mutabilityの制限(valueの変更はreference経由。Rustの所有権システムの力を借りる) ◦ モジュール化によるデータ抽象化
Moveにふれるには • Githubで公開されている ◦ https://github.com/libra/libra/tree/master/language • 社内ブログもご一読ください ◦ Facebook libraのMove言語でスマートコントラクトを書いてみる
▪ https://note.mu/fintertech/n/n3334c5a021e9 • とはいえ、まだまだ発展途上 ◦ 現時点ではLibra Blockchainにデプロイできない ▪ ローカルでのテストはできる ◦ ドキュメントや開発ツールも揃っていない ▪ コードハイライトやsuggestionが早く欲しい ▪ buitlinsの一覧はWPのappendixに載ってる ◦ CollectionやGenericsも将来対応するらしい( WPより) ▪ 今はByteArrayとStructくらい