Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Docker (Windows) でブロックチェーン
Search
yochi
December 01, 2017
Technology
2.1k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Docker (Windows) でブロックチェーン
【ブロックチェーン技術に興味のあるエンジニア対象】bitFlyer Drink Meetup! #9 の発表資料です。
yochi
December 01, 2017
Other Decks in Technology
See All in Technology
銀行勘定系システムにおける開発プロセス刷新×AIによる環境モダナイゼーション / Development Process Transformation and AI-Driven Environment Modernization
muit
0
870
20260912_スクフェス三河
kgnkhkr
0
330
コーディングエージェントでM5Stack系の開発を少し試した時の話 / M5 Japan Tour 2026 Autumn 東京
you
PRO
0
190
2026_devsumi_ozono.pdf
o3
3
450
日経電子版を支えていく Kasane Design System/fec_fukuoka
nikkei_engineer_recruiting
0
1.2k
新機種発売前に見直そう!端末移行で再ログインが要るアプリ・要らないアプリは何が違うのか 〜シームレスに再開できる設計と実装〜
zozotech
PRO
0
150
Oracle Cloud Infrastructure IaaS 新機能アップデート 2026/6 - 2026/8
oracle4engineer
PRO
0
200
Deploying a Full-Stack Bun-Native Framework on Cloudflare Workers
7nohe
0
160
The Agent Builder Loop from Daily Work to OSS
minorun365
PRO
3
160
Snowflakeのコスト最適化を支えるアーキテクチャ設計
ktatsuya
1
1.5k
コスト最適化の「めんどくさい」を AWS FinOps Agent でチョット楽にする
classmethod_kaz
0
330
NW運用でNWトポロジ可視化ツールに期待すること/shumoku-meetup1
corestate55
2
120
Featured
See All Featured
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.8k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.6k
Context Engineering - Making Every Token Count
addyosmani
9
1.1k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
680
The Illustrated Children's Guide to Kubernetes
chrisshort
51
53k
Test your architecture with Archunit
thirion
2
2.4k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.3k
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
820
How to train your dragon (web standard)
notwaldorf
97
6.8k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.6k
So, you think you're a good person
axbom
PRO
2
2.2k
Git: the NoSQL Database
bkeepers
PRO
432
67k
Transcript
Docker (Windows) で ブロックチェーン 越智 佳景
本日の内容 • ブロックチェーン • Docker • Hyperledger Sawtoothを動かす
ブロックチェーン
ブロックチェーン • Bitcoinで開発された技術 • 改ざん困難な記録(ブロックチェーン) <=台帳 • 構成要素 • トランザクション
• ブロック • … • Hyperledger (Hyper=すごい Ledger=台帳) • Linux Foundationで開発 • Hyperledger Sawtooth
Bitcoinトランザクション • コインを使う(AB) • Input: Aのアドレス • Output: Bのアドレス+金額 •
OutputからInputを生成 • Output: Aの公開鍵 • Input: Aの秘密鍵でダイジェスト • 鍵が合う=持ち主だけが正しいトラン ザクション生成可能 A:1 A B:0.99 A’ C:0.99 持ち主によるコインの移動 input output 本物 偽物 output Z input
Bitcoinブロック • ヘッダのハッシュ値が規定値より小さ くなるようNonceを調整(PoW) • Nのヘッダのハッシュ • トランザクションのハッシュ • Nonce
• … 改ざん困難なチェーンの実現 TX TX TX … Height N TX TX TX … Height N+1 000000…01234abcd 000000…020000000 < Nonce=0,1,2…
Sawtoothトランザクション • アプリ開発者が任意に設計 • ValidatorがTransaction Processor に問い合わせ • IntegerKey •
State • {Name:Value} • Transaction • {Verb, Name, Value} ステート変更 N V TP OK S-> S’ My口座 ¥1000 My口座 ¥750 Verb: dec Name: My口座 Value: 250
Sawtoothブロック • 代表ノードが作成 • Nを指すブロックヘッダを署名 • コンセンサスの取れたブロック追加 改ざんには秘密鍵必要 TX TX
TX … Height N TX TX TX … Height N+1
Docker
Docker • コンテナ技術の一種 • ホストのLinuxカーネルを使用して、コンテナ(=プロセス) を実行 • Mac, Windowsでは仮想OSを使用して利用 Linux
HW Virtualization SW Guest OS Virtual HW Linux HW Container 仮想化 Docker
Docker の種類 • 種類 • EE (Enterprise Edition) • CE
(Community Edition) • Windows • Docker for Windows (Hyper-V上のLinux上で動作) • Docker ToolBox (VirtualBox上のLinux上で動作)
準備 • CPUの仮想機能有効化(BIOS) • Hyper-Vの有効化
インストール • Docker for Windowのダウンロード&インストール • https://store.docker.com/editions/community/docker-ce-desktop- windows • 起動後エラー
• ユーザーをdocker-usersグループへ
設定 1. タスクトレイのクジラアイコン右クリック 2. Settingクリック 3. Shared Drives クリック 4.
マウントしたいドライブレターをチェック
動作確認 • コマンドプロンプト C:¥> docker run hello-world
実行方法 Dockerfile docker build . Image docker run Container docker-compose.yaml
Container docker-compose up
Hyperleger Sawtoothを動かす
実行 • Github • https://github.com/hyperledger/sawtooth-core • zipをダウンロード(v1.0.0rc2) • Docker関係のディレクトリ •
https://sawtooth.hyperledger.org/docs/core/releases/latest/app_d evelopers_guide/docker.html • Dockerディレクトリで以下のコマンドを実行 C:¥> docker-compose –f sawtooth-default.yaml up
コンテナ構成 validator shell1 shell2 settings-tp intkey-tp-python xo-tp-python rest-api 8008 4004
4004 sawtooth-default.yaml
◦✕ゲーム • Spec • ステート • <name>,<board>,<game-state>,<player-key-1>,<player-key-2> • トランザクション •
<name>,<action>,<space>
◦✕ゲーム • 遊び方 # sawtooth keygen [ユーザー名] # xo create
--url http://rest-api:8008 --username [ユーザー名] [ゲーム名] # xo list --url http://rest-api:8008 # xo take --url http://rest-api:8008 [ゲーム名] [場所] # xo show --url http://rest-api:8008 [ゲーム名] 1 2 3 4 5 6 7 8 9
コマンドの流れ shell1 shell2 validator xo-tp-python sawtooth keygen xo create sawtooth
keygen STATE: P1-NEXT Signer: Body: game1,create TX, State <<game1>> Player1: Player2: Board: []
コマンドの流れ shell1 shell2 validator xo-tp-python xo take 1 Signer: Body:
game1,take,1 xo take 2 STATE: P2-NEXT STATE: P1-NEXT <<game1>> Player1: Player2: Board: [1] <<game2>> Player1: Player2: Board: [1,2] Signer: Body: game1,take,2 TX, State TX, State STATE: P1-NEXT
コマンドの流れ shell1 shell2 validator xo-tp-python xo take 5 <<game1>> Player1:
Player2: Board: [1,2] Signer: Body: game1,take,5 TX, State STATE: P1-NEXT STATE: P1-NEXT Invalid!!
まとめ • ブロックチェーンはBitcoin発祥 • 様々な実装 • Hyperledger Sawtooth • トランザクションを自由に設計
• Dockerで簡単に動作確認
ありがとうございました