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
TPS&51%Attack
Search
Taiki
June 30, 2018
Research
0
250
TPS&51%Attack
Taiki
June 30, 2018
Tweet
Share
More Decks by Taiki
See All by Taiki
Blenderで作るCG VR
r_etx
1
72
Slush✖️Privacy
r_etx
0
110
WeArelookingForYou.pdf
r_etx
1
670
Zk-SNRAKS1~4
r_etx
0
37
hakone_hackthon
r_etx
0
74
Dynamics of Blockchain
r_etx
1
54
Lightning network
r_etx
0
97
BancorProtocol
r_etx
4
750
GHZstate
r_etx
0
44
Other Decks in Research
See All in Research
データサイエンティストをめぐる環境の違い 2024年版〈一般ビジネスパーソン調査の国際比較〉
datascientistsociety
PRO
0
580
RSJ2024「基盤モデルの実ロボット応用」チュートリアルA(河原塚)
haraduka
3
650
Weekly AI Agents News!
masatoto
25
24k
「並列化時代の乱数生成」
abap34
3
830
SNLP2024:Planning Like Human: A Dual-process Framework for Dialogue Planning
yukizenimoto
1
330
Weekly AI Agents News! 10月号 プロダクト/ニュースのアーカイブ
masatoto
1
120
EBPMにおける生成AI活用について
daimoriwaki
0
180
Active Adaptive Experimental Design for Treatment Effect Estimation with Covariate Choices
masakat0
0
220
研究の進め方 ランダムネスとの付き合い方について
joisino
PRO
55
19k
snlp2024_multiheadMoE
takase
0
430
工学としてのSRE再訪 / Revisiting SRE as Engineering
yuukit
19
11k
Weekly AI Agents News! 8月号 プロダクト/ニュースのアーカイブ
masatoto
1
190
Featured
See All Featured
Practical Orchestrator
shlominoach
186
10k
Raft: Consensus for Rubyists
vanstee
136
6.6k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
27
4.3k
Scaling GitHub
holman
458
140k
Into the Great Unknown - MozCon
thekraken
32
1.5k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
GraphQLの誤解/rethinking-graphql
sonatard
67
10k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
[RailsConf 2023] Rails as a piece of cake
palkan
52
4.9k
The Pragmatic Product Professional
lauravandoore
31
6.3k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
How To Stay Up To Date on Web Technology
chriscoyier
788
250k
Transcript
ABOUT TPS & 51% ATTACK CRYPGEEK 30/6/2018 Blockchainษڧձ #10 @r_etx
Proof of WorkͷΈͰɺTPSΛ͍࣋ͬͨ͋͛ͨ
TPSͱɺ
transaction per secͷུͰɺҰඵؒ͋ͨΓʹ͚͞Δ transactionͷྔΛද͢ɻ TPS͕খ͍͞ͱtransaction͕٧·ͬͯঝೝʹ͕͔͔࣌ؒΔɻ VISA 2000TPS( daily peak rate
of 4000 TPS) Pay Pal 115TPS so let’s take 4000 TPS as starting goal!!
transaction per secͷུͰɺҰඵؒ͋ͨΓʹ͚͞Δ transactionͷྔΛද͢ɻ TPS͕খ͍͞ͱtransaction͕٧·ͬͯঝೝʹ͕͔͔࣌ؒΔɻ VISA 2000TPS( daily peak rate
of 4000 TPS) Pay Pal 115TPS BTC 7TPS
transaction per secͷུͰɺҰඵؒ͋ͨΓʹ͚͞Δ transactionͷྔΛද͢ɻ TPS͕খ͍͞ͱtransaction͕٧·ͬͯঝೝʹ͕͔͔࣌ؒΔɻ more over Online game 100000TPS
transaction per secͷུͰɺҰඵؒ͋ͨΓʹ͚͞Δ transactionͷྔΛද͢ɻ TPS͕খ͍͞ͱtransaction͕٧·ͬͯঝೝʹ͕͔͔࣌ؒΔɻ Ωπ͍͡ΌΜ!
Proof of WorkͷΈͰɺTPSΛ͍࣋ͬͨ͋͛ͨ
TPSͷఆࣜԽ TPS(λ, b) = β(λ, b) ⋅ b ⋅ K
K ; 1KB͋ͨΓͷτϥϯβΫΫγϣϯ β ;ϒϩοΫ͕ϝΠϯνΣʔϯʹՃ͞ΕΔׂ߹ b ; ϒϩοΫͷ࠷େऩ༰αΠζ(KB)
TPS(λ, b) = β(λ, b) ⋅ b ⋅ K ҰඵؒͰ͑ΔKB
1/KB ͋ͨΓͷTx K ; 1KB͋ͨΓͷτϥϯβΫΫγϣϯ β ;ϒϩοΫ͕ϝΠϯνΣʔϯʹՃ͞ΕΔׂ߹ b ; ϒϩοΫͷ࠷େऩ༰αΠζ(KB) TPSͷఆࣜԽ
TPS(λ, b) = β(λ, b) ⋅ b ⋅ K ҰඵؒͰ͑ΔKB
1/KB ͋ͨΓͷTx TPSͷఆࣜԽ β ɺɹ ͷؔɻ ͱɹ ͷҧ͍? β λ λ
ωοτϫʔΫͰ৽͍͠Block͕ੜ͞ΕΔ·Ͱ ฏۉ10(=600[s])ʹͳΔΑ͏ʹઃఆ͞Ε͍ͯΔɻ λ ; Block Treeʹblock͕Ճ͞ΕΔׂ߹ ϒϩοΫ͕ٿ্Ͱڞ༗͞ΕΔͷʹ͔͔Δ࣌ؒΑΓ ৽͍͠Block͕ੜ͞ΕΔ·Ͱͷ͔͔Δ ฏۉͷ͕࣌ؒ͘ͳΔΑ͏ʹઃఆ͞Ε͍ͯΔɻ BitcoinͰɺ
λ = 1 600
ωοτϫʔΫͰ৽͍͠Block͕ੜ͞ΕΔ·Ͱ ฏۉ10(=600[s])ʹͳΔΑ͏ʹઃఆ͞Ε͍ͯΔɻ λ = 1 600 β ;ϒϩοΫ͕ϝΠϯνΣʔϯʹՃ͞ΕΔׂ߹ (Networkʹ͓͚ΔԆForkΛߟྀ͍ͯ͠Δ) λ
; Block Treeʹblock͕Ճ͞ΕΔׂ߹
ωοτϫʔΫͰ৽͍͠Block͕ੜ͞ΕΔ·Ͱ ฏۉ10(=600[s])ʹͳΔΑ͏ʹઃఆ͞Ε͍ͯΔɻ λ ; Block Treeʹblock͕Ճ͞ΕΔׂ߹ BitcoinͰɺ λ = 1
600 β ;ϒϩοΫ͕ϝΠϯνΣʔϯʹՃ͞ΕΔׂ߹ (NetworkͰͷԆؚΜͰ͍Δ) β(λ, b)
0OFNPSF
Topology of network
Topology of network ࠓճߟ͑ͳ͍ɻ
TPSͷఆࣜԽ TPS(λ, b) = β(λ, b) ⋅ b ⋅ K
TPSΛ૿͔ͨͬͨ͠Βɺࡾͭͷํ๏͕͋Δ ҰඵؒͰ͑ΔKB 1/KB ͋ͨΓͷTx K ; 1KB͋ͨΓͷτϥϯβΫΫγϣϯΛ૿͢ β ;ϒϩοΫ͕ϝΠϯνΣʔϯʹՃ͞ΕΔׂ߹Λ૿͢ b ; ϒϩοΫͷ࠷େऩ༰αΠζ(KB)Λ૿͢
Txͷ༰ྔΛখ͘͢͞Δɻ SegwitͳͲ K ; 1KB͋ͨΓͷτϥϯβΫΫγϣϯΛ૿͢ β ;ϒϩοΫ͕ϝΠϯνΣʔϯʹՃ͞ΕΔׂ߹Λ૿͢ b ; ϒϩοΫͷ࠷େऩ༰αΠζ(KB)Λ૿͢
Big Block Bitcoin CashͳͲͰ࠾༻ K ; 1KB͋ͨΓͷτϥϯβΫΫγϣϯΛ૿͢ β ;ϒϩοΫ͕ϝΠϯνΣʔϯʹՃ͞ΕΔׂ߹Λ૿͢ b
; ϒϩοΫͷ࠷େऩ༰αΠζ(KB)Λ૿͢
10ؒʹҰͰͳ͘ɺ ͬͱ͍࣌ؒʹBlock͕ੜ͞ΕΔΑ͏ʹ͢Δ K ; 1KB͋ͨΓͷτϥϯβΫΫγϣϯΛ૿͢ β ;ϒϩοΫ͕ϝΠϯνΣʔϯʹՃ͞ΕΔׂ߹Λ૿͢ b ; ϒϩοΫͷ࠷େऩ༰αΠζ(KB)Λ૿͢
K ; 1KB͋ͨΓͷτϥϯβΫΫγϣϯΛ૿͢ β ;ϒϩοΫ͕ϝΠϯνΣʔϯʹՃ͞ΕΔׂ߹Λ૿͢ b ; ϒϩοΫͷ࠷େऩ༰αΠζ(KB)Λ૿͢ 5ISPVHIQVU 514
#MPDLTJ[F C #MPDLSBUF Е 'PSLJO #MPDL5SFF 4FDVSJUZ ЌЕ
K ; 1KB͋ͨΓͷτϥϯβΫΫγϣϯΛ૿͢ β ;ϒϩοΫ͕ϝΠϯνΣʔϯʹՃ͞ΕΔׂ߹Λ૿͢ b ; ϒϩοΫͷ࠷େऩ༰αΠζ(KB)Λ૿͢ ͲͪΒͷ߹ɺϑΥʔΫ͕ى͖͘͢ͳΓ ҆શੑ͕Լ͢Δɻ(51%
Atttackʹऑ͘ͳΔ)
51% Attack
Security Attacker͕ɺHonest nodeͷ computational power ͷ q ͷׂ߹ʹ૬͢Δcomputational power Λ͍࣋ͬͯΔͱ͢Δɻ
λh β(λh , b) > qλh AttackerͷBlock Creation rate honest nodeͷmain chain creation rate Ͱ͋Ε҆શɻ
Larger Blocks Blockͷେ͖͕͞૿͑Δͱɺάϥϑʹࣔ͢Α͏ʹɺ Ԇ͕࣌ؒ૿Ճ͢ΔɻͦͷͨΊɺ৽͍͠Bock͕ੜ͞Εͨnode ͔ΒΕͨnodeͷup date͕͘ͳΔɻ β(λh , b) >
qλh Easy to attack β become smaller
Acceleration Block Creation Blockͷੜ͕༰қʹͳΓɺ৽͘͠ݟ͔ͭͬͨBlock͕ ൖͯ͘͠ΔΑΓલʹɺઌʹࣗͷnodeͰBlock͕ੜ͞ΕΔ Honest nodeඇޮʹɺAttackerޮతʹϚΠχϯάͰ͖Δ β(λh , b)
> qλh Easy to attack qλh become bigger
Using a GHOST GHOSTΛ༻͍Δ͜ͱʹΑͬͯɺForkͷͨ͠ ແବʹͳΒͣSecurityʹߟྀ͞ΕΔɻ β(λh , b) > qλh
λh > qλh
Using a GHOST β(λh , b) > qλh λh >
qλh 1 > q GHOSTΛ༻͍Δ͜ͱʹΑͬͯɺForkͷͨ͠ ແବʹͳΒͣSecurityʹߟྀ͞ΕΔɻHonest node ͱಉ͡ computational power ͕ͳ͍ͱ߈ܸ͕ޭ͠ͳ͍!!
Using a GHOST β(λh , b) > qλh λh >
qλh 1 > q Block creation rateΛ͋͛ΒΕΔɻ Block sizeΛ͋͛ΒΕΔɻ
͓·͚
BobɺAlice͔Β͓ՖΛങͬͯࢧ͓ͬͨۚΛୣ͍͍ͨɻ ͋Δ࣌ࠁtʹൃߦͨ͠txʹରͯ͠ɺTඵਐΜͩ࣌ࠁt+Tʹɺͦͷtxؚ͕·ΕΔ ϒϩοΫ͔Β͞Βʹ3ݸͷϒϩοΫ͕ঝೝ͞ΕͨͷΛ֬ೝ͠ɺAliceɺBobʹ ͓ՖΛൃૹͨ͠ɻ ͜ͷঢ়گͰɺAlice͕Bob͔Βٗʹ߹͏֬ΛٻΊΑɻ ͨͩ͠ɺBobminerͰcomputational powerΛ 100͍࣋ͬͯΔɻ ͦΕҎ֎ͷਖ਼ͳminer͕͍࣋ͬͯΔ Computational
power ͕ 300Ͱ͋Δͱ͢Δɻ
લఏʀ"UUBDLFS"MJDF͕ՖΛૹΔ·ͰӅΕͯ#MPDLΛੜ͢Δɻ BUUBDLFSͷDPNQVUBUJPOBMQPXFSɺIPOFTUOPEFͷ )POFTUOPEFɺ"MJDF͕ՖΛૹΔ·Ͱʹ#MPDLੜͨ͠ɻ ͜ͷͱ͖ɺ"UUBDLFSOPEFͰɺ"MJDF͕ՖΛૹΔ·ͰʹLCMPDLੜ͢Δ֬ɺ QPJTTPOͰܭࢉͰ͖ͯɺ P(k) = λke−λ k! ͜͜Ͱɺ"UUBDLFSͰͷ#MPDLੜͷׂ߹ͷฏۉɹɹɺ
λ λ = 3 × 1 3 = 1
Lͷ߹ɺӅΕͯੜ͍ͯͨ͠#MPDL͕NBJODIBJOͱͯ͠࠾༻͞ΕΔɻ ҰํɺӅΕͯੜ͍ͯͨ͠DIBJO͕Lͷ࣌ɺ͞Βʹ#MPDLੜ͕ඞཁɻ ͕ͨͬͯ͠ɺ߈ܸ͕ޭ͢Δ֬ɺ P = ∞ ∑ k=0 λke−λ k!
× ( 1 3 ) 3−k JGL JGL 1 = 0.19597 Ͱޭ͢Δɻ ݁ߏͰ͔͍ "UUBDLFSɺ͜ͷ߈ܸͰಘΒΕΔϝϦοτͱ௨ৗͷOPEFͱͯ͠ NJOJOHใुͷϝϦοτΛൺֱͯ͠߹ཧతͳஅΛ͢Δɻ
BobɺAlice͔Β͓ՖΛങͬͯࢧ͓ͬͨۚΛୣ͍͍ͨɻ ͋Δ࣌ࠁtʹൃߦͨ͠txʹରͯ͠ɺTඵਐΜͩ࣌ࠁt+Tʹɺͦͷtxؚ͕·ΕΔ ϒϩοΫ͔Β͞Βʹ3ݸͷϒϩοΫ͕ঝೝ͞ΕͨͷΛ֬ೝ͠ɺAliceɺBobʹ ͓ՖΛൃૹͨ͠ɻ ͜ͷঢ়گͰɺAlice͕Bob͔Βٗʹ߹͏֬ΛٻΊΑɻ ͨͩ͠ɺBobminerͰcomputational powerΛ 100͍࣋ͬͯΔɻ ͦΕҎ֎ͷਖ਼ͳminer͕͍࣋ͬͯΔ Computational
power ͕ 300Ͱ͋Δͱ͢Δɻ
https://eprint.iacr.org/2013/881.pdf Reference https://bitcoin.org/bitcoin.pdf [1] [2]