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
アンティーク「マイニング」 - 秒速 148 EHash で走るビットコイン -
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
AntiqueR
October 18, 2020
Programming
52
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
アンティーク「マイニング」 - 秒速 148 EHash で走るビットコイン -
KIT Developers Meetup #5 オンラインLT会で発表した資料です。
AntiqueR
October 18, 2020
Other Decks in Programming
See All in Programming
PumaからFalconに移行したRailsアプリケーションでの実践
falcon8823
0
170
AIに “答え“を書かせるのを やめてみた
___akari11
0
120
Vue Fes Japan の “作る側”に関わってみて
naokihaba
0
160
RAG の “R” を Swift で覗いてみる 〜「意味から探す」検索の仕組み〜
nao_randd
0
160
Herb in Rails 8.2: Your ERB views, now HTML-aware @ Kaigi on Rails 2026, Tokyo, Japan
marcoroth
2
220
sbt 2.0: takeoff
eed3si9n
0
160
Event is what happens
moro
2
770
ジョジョの世界をXRで再現する
mofurune
0
160
最近”作らせてる” ローカルAIアプリの話
akit37
0
470
IBM Bob でAI駆動開発『QC-Playbook』
ichirokano2
0
110
パズルゲームの作り方 / how to make puzzle games
kaityo256
PRO
2
290
Next.js: The final boss of Web Performance
guaca
0
250
Featured
See All Featured
Designing for Performance
lara
612
70k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
800
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
590
brightonSEO & MeasureFest 2025 - Winning Strategies for Black Friday CRO & PPC - Christian Goodrich
cargoodrich
3
870
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
310
Between Models and Reality
mayunak
4
500
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
330
Designing for humans not robots
tammielis
254
26k
Embracing the Ebb and Flow
colly
88
5.2k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
630
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
12k
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2.2k
Transcript
アンティーク「マイニング」 - 毎秒 148 Ehash で走るビットコイン -
毎秒 148 Ehash 1垓4800京 ハッシュ / 毎秒
About Me AntiqueR / アンティーカー - C# 好き。 - 最近は
.NET Core でコンソールアプリ。 - MVVM 好き。 - 付喪堂骨董店が好き。 - ブロックチェーン好き。 - 儲かってません。 Twitter : GitHub : AntiquePendant AntiquePendulum
ブロックチェーン
Blockchain ブロックチェーン is ハッシュ値の連続体 出典: Block Chain — Bitcoin :
https://developer.bitcoin.org/devguide/block_chain.html
Blockchain ブロックチェーン is ハッシュ値の連続体 出典: Block Chain — Bitcoin :
https://developer.bitcoin.org/devguide/block_chain.html 前のブロック ハッシュ 前のブロック ハッシュ 前のブロック ハッシュ
Blockchain 前ブロックハッシュ タイムスタンプ Difficulty Nonce トランザクション : 0xFFFF.... : 2020/10/17
: 3 : 2083236893 : Alice から Bob に10コイン { Byte[] } シリアライズ E38193e381aee38199e381b0e381a7e4b880e795aae5 8fafe6849be38184e381aee381afe382a6e382a3e382ba
Blockchain 前ブロックハッシュ タイムスタンプ Difficulty Nonce トランザクション : 0xFFFF.... : 2020/10/17
: 3 : 2083236893 : Alice から Bob に10コイン { Byte[] } シリアライズ E38193e381aee38199e381b0e381a7e4b880e795aae5 8fafe6849be38184e381aee381afe382a6e382a3e382ba SHA256 ダブルハッシュ 32 バイトの値になる。 これがいわゆるブロックID
マイニング
ハッシュ値の「ビーチフラッグス」
Mining マイニング = 誰よりも早く目的のハッシュを計算する。
Mining 上位 n ビットが0のハッシュ n の値は Difficulty によって決定される 条件
Mining なんでそんな面倒なことするの?
Mining 不正を防止するため
Mining 計算が一番かかったチェーン = 正当なチェーン
Mining 世界とのビーチフラッグスに 勝たないといけない。 不正をするためには =世界の51%以上の 計算能力 を保持しないといけない
Mining 不正をしたい!
Mining あらすじ 超天才美少女のアリスは 10 Bitcoin を支払って AntiqueR から 絵画 を買いました。
10 Bitcoin の価値はなさそうなので不正して取り返すことにしました。 絵画
Mining 今のブロックチェーンの状態 Block 1 Block 2 Block 3 Block 4
AからBに 10Bitcoin XからYに 3Bitcoin CからZに 1satoshi アリスから僕に 10Bitcoin 累積 DIfficulty
Mining 不正をすると… Block 1 Block 2 Block 3 Block 4
AからBに 10Bitcoin XからYに 3Bitcoin CからZに 1satoshi Block 3 Block 4 Block 5 支払った過去 をなくす
Mining でも・・・ Block 1 個のブロックに 148E Hash/s の 計算パワーがつぎ込まれている。
Mining でも・・・ Block それを世界より速く? 148E Hash/s なのに?
Mining アリス「無理ゲー!」 少なくとも 74 EHash/s の計算能力を手にしなければいけない。
Mining めでたしめでたし 逆に言えば、採掘者が少ない仮想通貨は 51% 攻撃の被害を受ける可能性が高いということです。
実践 .NET Core 開発環境くらい皆さんありますよね?
Mining それではマイニングやってみよう。 本来は電子署名などが入りますが省いてます。
Blockchain もしハッシュ値が条件をクリアできなかったら?
Mining Nonce++;
Blockchain Nonce の値を変動させることでデータを変化させる。 つまり Hash 値が変わる!
Mining
Mining 上位 18ビットが0のハッシュ 条件 ちょっとかかります。 終わったら Programs.cs の_bits の値を増やして遊んでみて下さい。
Mining while (!token.IsCancellationRequested) { block.Nonce = nonce++; block.Timestamp = DateTime.UtcNow;
var hash = block.ComputeId(); Console.Write("+"); if (!HashCheck(hash, target)) continue; block.Id = new HexString(hash); return true; } Nonce を増加 => ハッシュ化 => 条件と比較 を繰り返す。 Miner.cs
まとめ 35枚 / 20min で走る僕
summary 話したこと - ブロックチェーンとは - ハッシュの連続体 - マイニングとは - ハッシュ値のビーチフラッグス
- Nonce を変化させてダブルハッシュ - なぜ「51%攻撃」なのか - 世界の半分を手に入れろ。
アンティーク「マイニング」 - 毎秒 148 Ehash で走るビットコイン - Twitter : GitHub
: AntiquePendant AntiquePendulum