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
Lightning network
Search
Taiki
July 24, 2018
0
97
Lightning network
Taiki
July 24, 2018
Tweet
Share
More Decks by Taiki
See All by Taiki
Blenderで作るCG VR
r_etx
1
74
Slush✖️Privacy
r_etx
0
110
WeArelookingForYou.pdf
r_etx
1
680
Zk-SNRAKS1~4
r_etx
0
37
hakone_hackthon
r_etx
0
76
Dynamics of Blockchain
r_etx
1
55
BancorProtocol
r_etx
4
750
TPS&51%Attack
r_etx
0
260
GHZstate
r_etx
0
45
Featured
See All Featured
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
Statistics for Hackers
jakevdp
797
220k
Music & Morning Musume
bryan
46
6.3k
StorybookのUI Testing Handbookを読んだ
zakiyama
28
5.4k
Producing Creativity
orderedlist
PRO
343
39k
Visualization
eitanlees
146
15k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
27
1.5k
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.3k
Reflections from 52 weeks, 52 projects
jeffersonlam
348
20k
How to train your dragon (web standard)
notwaldorf
89
5.8k
How STYLIGHT went responsive
nonsquared
96
5.3k
Learning to Love Humans: Emotional Interface Design
aarron
274
40k
Transcript
$3:1 (&&, Lightning Network 16/6/2018 Blockchainษڧձ #4 @r_etx
$3:1 (&&, ߴૹۚͰ͖ͳ͍ ϚΠΫϩϖΠϝϯτͰ͖ͳ͍ εέʔϥϏϦςΟʔͳ͍
$3:1 (&&, ͦͦͳͥɺखྉTPS্͕͕Βͳ͍ͷ͔? ϒϩοΫνΣʔϯʹτϥϯβΫγϣϯΛॻ͖ࠐΉ͔Βɻ ඞཁͳ෦͚ͩΛΛBlockchainʹॻ͖ࠐΜͰ ్தͷऔҾΛΦϑνΣʔϯͰΕ͍͍!
$3:1 (&&, Unconfirmed Transaction ඞཁͳ෦͚ͩΛΛBlockchainʹॻ͖ࠐΜͰ ్தͷऔҾΛΦϑνΣʔϯͰΕ͍͍!
$3:1 (&&, Unconfirmed Transaction ඞཁͳ෦͚ͩΛΛBlockchainʹॻ͖ࠐΜͰ ్தͷऔҾΛΦϑνΣʔϯͰΕ͍͍!
$3:1 (&&, ΦϑνΣʔϯ(Blockʹॻ͖ࠐ·ͳ͍)ͰऔҾΛߦ͍ɺࡾͭͷ՝Λղܾ͠Α͏ɻ Lightning network
$3:1 (&&, Unconfirmed Transaction தؒऔҾɺτϥϯβΫγϣϯΛൃߦ͢Δ͕ɺ LNʹࢀՃ͢Δuserͷlocalʹଘࡏ͠ɺϒϩʔυΩϟετ͞Εͳ͍ ΦϑνΣʔϯͰͷτϥϯβΫγϣϯɻ ͔͠͠ɺ͍ͭͰϒϩʔυΩϟετͰ͖Δɻ
$3:1 (&&, Prerequisite knowledge Prerequisite knowledge
$3:1 (&&, Multisig AliceͱBob͕ೋਓͱsignΛ͢Δ͜ͱʹΑͬͯ τϥϯβΫγϣϯ͕࣮ߦͰ͖Δɻ
$3:1 (&&, Time lock Ұఆͷ࣌ؒޙʹར༻ՄೳʹͳΔɻ
$3:1 (&&, Time lock Time lockʹೋछྨ͋Δɻ CLTV(Check Lock Time Verify)ɾɾɾઈରతͳ࣌ؒϒϩοΫߴʹΑ੍ͬͯݶ͢Δɻ
date = 2018/7/21 or height =55555 CSV(Check Sequence Verify)ɾɾɾ૬ରతͳ࣌ؒϒϩοΫߴʹΑ੍ͬͯݶ͢Δɻ now > start_time + 2week
$3:1 (&&, ೋऀؒͰͷpayment
$3:1 (&&, LNͰɺ͡ΊʹऔҾΛߦ͏ਓಉ͕࢜ payment channelΛ։͘ඞཁ͕͋Δɻ
$3:1 (&&, AliceͱBobɺ2-of-2ͷmultisig addressʹΦϯνΣʔϯͰૹۚ͢Δɻ ͜ΕͰνϟϯωϧΛ։ઃ͢Δɻ Opening Transaction
$3:1 (&&, Alice͔ΒBobʹ1BTCΛૹۚ͢Δ ํ͕ɺTxΛൃߦ͢Δ͜ͱͰ ํ͕͍ͭͰϒϩʔυΩϟετͰ͖Δ ঢ়ଶʹͳΔ ͷͰ͜ΕΛૹۚྃͱΈͳ͢ɻ
$3:1 (&&, ٯʹBob͔ΒAliceʹ1BTCΛૹۚ͢Δ ํ͕ɺTxΛൃߦ͢Δ͜ͱͰ ํ͕͍ͭͰϒϩʔυΩϟετͰ͖Δ ঢ়ଶʹͳΔ ͷͰ͜ΕΛૹۚྃͱΈͳ͢ɻ
$3:1 (&&, BobɺҰͭલͷTxΛ͍࣋ͬͯͯ͜ΕΛϒϩʔυΩϟετͰ͖Δɻ double spendͷՄೳੑ
$3:1 (&&, Alice͔ΒBobʹ1BTCΛૹۚ͢Δ ํ͕ɺTxΛൃߦ͢Δ͜ͱͰ ํ͕͍ͭͰϒϩʔυΩϟετͰ͖Δ ঢ়ଶʹͳΔ ͷͰ͜ΕΛૹۚྃͱΈͳ͢ɻ
$3:1 (&&, BobɺҰͭલͷTxΛ͍࣋ͬͯͯ͜ΕΛϒϩʔυΩϟετͰ͖Δɻ double spendͷՄೳੑ ϩοΫʹ༻͍ͨൿີ伴Λ͋Β͔͡Ίަ͓ͯ͘͠
$3:1 (&&, ͍伴͕BobͷkeyͰɺࠓAlice͍ͬͯΔɻ
$3:1 (&&, Bobɺ͜ͷTxΛϒϩʔυΩϟετ͢Δͱɺ Ұఆ࣌ؒͨͳ͍ͱ༻Ͱ͖ͳ͍ɻ ͦͷؒʹɺ伴Λ͍࣋ͬͯΔAlice͕Γͷ͓ۚΛऩͰ͖Δɻ
$3:1 (&&, channelΛ։͍͍ͯͳ͍ਓͱͷΓͱΓ
$3:1 (&&, ؒతʹ͢Ͱʹ։͔Ε͍ͯΔchannelΛ༻͍ͯऔҾΛߦ͏
$3:1 (&&, HTLC(Hash Time-Locked Contracts) CLTVͷϩοΫղআͷͨΊʹɺॺ໊ͱผʹ͞ΕΔ ϋογϡͷݩͱͳΔvalueΛඞཁͱ͢ΔλΠϜϩοΫ (ૹ৴ऀɺҰఆظؒܦͨͳ͍ͱऔΓग़ͤͳ͍) ߹ݴ༿Λݴ͏ͱ։͘ശ(தʹBTC͕٧·͍ͬͯΔ) ͻΒ͚ΰϚ!
IBTI 2BTC
$3:1 (&&, ΩϟαϦϯ Ϙϒ ΞϦε ΩϟαϦϯʹ ૹ͍ۚͨ͠!
$3:1 (&&, ΩϟαϦϯ Ϙϒ ΞϦε ΩϟαϦϯʹ ૹ͍ۚͨ͠! ܅ͱϖΠϝϯτνϟϯωϧ ܨ͕ͬͯͳ͍͔Βࠓ͔Βग़͓͢ͷ ͑Λ͍ͬͯΔਓʹૹۚͯ͠!
$3:1 (&&, ΩϟαϦϯ Ϙϒ ΞϦε ΩϟαϦϯʹ ૹ͍ۚͨ͠! ܅ͱϖΠϝϯτνϟϯωϧ ܨ͕ͬͯͳ͍͔Βࠓ͔Βग़͓͢ͷ ͑Λ͍ͬͯΔਓʹૹ͓ۚͯ͘͠Ε
͓ (hash)
$3:1 (&&, ΩϟαϦϯ Ϙϒ ΞϦε ͓ͷ͑Λ ͍ͬͯΔਓʹ ૹۚ͢Δͥ!! ͓ (hash)
IBTI 2BTC
$3:1 (&&, ΩϟαϦϯ Ϙϒ ΞϦε ͓ͷ͑Λ ͍ͬͯΔਓʹ ૹۚ͢Δͥ!! ͓ (hash)
Θ͑͠Β͵ IBTI 2BTC
$3:1 (&&, ΩϟαϦϯ Ϙϒ ΞϦε ͓ͷ͑Λ ͍ͬͯΔਓʹ ૹۚ͢Δͥ!! ͓ (hash)
IBTI ڭ͑ͯΖ͏ɻ ͦͷΘΓɺΞϦε͕ ૹۚͨ͠Λઌʹ Ϙϒ͞Μ͕ग़͓ͯ͘͠Ε? 2BTC
$3:1 (&&, ΩϟαϦϯ Ϙϒ ΞϦε ͓ͷ͑Λ ͍ͬͯΔਓʹ ૹۚ͢Δͥ!! ͓ (hash)
IBTI 2BTC Θ͔Γਃͨ͠ IBTI 2BTC
$3:1 (&&, ΩϟαϦϯ Ϙϒ ΞϦε ͓ͷ͑Λ ͍ͬͯΔਓʹ ૹۚ͢Δͥ!! ͓ (hash)
IBTI 2BTC ͜Ε͕͓ͷ͑͡Ό! Θͨ͑͠͠Λ ͍ͬͯΔ͔Β ͜ͷശ͕։͚ΕΔὑ IBTI 2BTC ͑
$3:1 (&&, ΩϟαϦϯ Ϙϒ ΞϦε ૹۚͰ͖ͨͥ! ͓ (hash) IBTI 2BTC
ऀ͑Λ ͍ͬͯΔ͔Βɺ ͜ͷശ͕։͚ΕΔ IBTI 2BTC ͑ ͑
$3:1 (&&,
$3:1 (&&, ϖΠϝϯτνϟϯωϧΛ։͍͍ͯΔਓಉ࢜ͷऔҾͰ ෆਖ਼͕ߦΘΕͨͱ͖ʹɺλΠϜϩοΫ͕ղআ͞ΕΔ·Ͱʹ ࢿۚΛऔΓग़͢ඞཁ͕͋Δɻ (৸͍ͯΔͱ͖ʹؾ͔ͮͳ͍ɺిোͳͲʹରԠͰ͖ͳ͍) Υονλϫʔ
$3:1 (&&, ϖΠϝϯτνϟϯωϧΛ։͍ͯด͡Δ·Ͱʹ࠷ೋճͷ TxΛΦϯνΣʔϯͰૹΔͷͰɺ3ճҎ্TxΛૹΒͳ͍߹ɺ ٯʹTx͕ͭ·Δɻ(LNͷҙຯ͕ͳ͍) nݸͷϖΠϝϯτνϟϯωϧΛ։͍͍ͯΔͱ͖ɺ φΠʔϒʹ2n+1ճͷTxΛൃߦ͠ͳ͍ݶΓҙຯ͕ͳ͍ɻ
$3:1 (&&, ಛఆͷϢʔβʔ͕100ສਓͱͭͳ͕Δ ϥΠτχϯάωοτϫʔΫΛߏங͢Δʹɺ 10ݸͷϖΠϝϯτνϟϯωϧΛ։͖ɺͦΕͧΕͷ peer͕ಉ͘͡10ݸͷϖΠϝϯτνϟωϧΛ։͘ ͜ͱΛ6ճ܁Γฦͤྑ͍ #5$
$3:1 (&&, ಛఆͷϢʔβʔ͕100ສਓͱͭͳ͕Δ ϥΠτχϯάωοτϫʔΫΛߏங͢Δʹɺ 10ݸͷϖΠϝϯτνϟϯωϧΛ։͖ɺͦΕͧΕͷ peer͕ಉ͘͡10ݸͷϖΠϝϯτνϟωϧΛ։͘ ͜ͱΛ6ճ܁Γฦͤྑ͍ #5$ #5$
#5$ #5$ #5$ #5$ #5$ #5$ #5$ #5$
$3:1 (&&, ಛఆͷϢʔβʔ͕100ສਓͱͭͳ͕Δ ϥΠτχϯάωοτϫʔΫΛߏங͢Δʹɺ 10ݸͷϖΠϝϯτνϟϯωϧΛ։͖ɺͦΕͧΕͷ peer͕ಉ͘͡10ݸͷϖΠϝϯτνϟωϧΛ։͘ ͜ͱΛ6ճ܁Γฦͤྑ͍ 10ݸͷϖΠϝϯτνϟϯωϧΛ։͘ͱɺ ҰͭͷνϟϯωϧͰɺdepositͨ͠ࢿۚͷ
10%͔͠ϥΠτχϯάωοτϫʔΫͰ͑ͳ͍
$3:1 (&&, ΩϟαϦϯ Ϙϒ ΞϦε ͓ͷ͑Λ ͍ͬͯΔਓʹ ૹۚ͢Δͥ!! ͓ (hash)
IBTI ڭ͑ͯΖ͏ɻ ͦͷΘΓɺΞϦε͕ ૹۚͨ͠Λઌʹ Ϙϒ͞Μ͕ग़͓ͯ͘͠Ε? 2BTC
$3:1 (&&, ΩϟαϦϯ Ϙϒ ΞϦε ͓ͷ͑Λ ͍ͬͯΔਓʹ ૹۚ͢Δͥ!! ͓ (hash)
IBTI 2BTC Θ͔Γਃͨ͠ IBTI 2BTC ΞϦε͔ΒΒ͏લʹ Ϙϒ͕ࢧ͏
$3:1 (&&, ෳਓΛհ͢ΔLNͰɺհ͢Δਓ͕ͨͪઌʹ ࢿۚΛఏڙ͢Δɻ·ͨɺωοτϫʔΫͷϒϥϯν͕͘ͳΔͱ ͜ͷି͠ग़͠ػձ͕૿͑Δɻ ି͠ग़͠ʹΑͬͯࣗͷdepositࢿ͕ۚఈΛ͖ͭɺ LN͕ػೳ͠ͳ͘ͳΔɻ
$3:1 (&&, IUUQTNFEJVNDPN!UJNFWBMVFPGCUDUIFUJNFWBMVFPG CJUDPJOCGE IUUQTCJUDPJONBHB[JOFDPNBSUJDMFTVOEFSTUBOEJOHUIFMJHIUOJOHOFUXPSL QBSUCVJMEJOHBCJEJSFDUJPOBMQBZNFOUDIBOOFM IUUQTCJUDPJONBHB[JOFDPNBSUJDMFTVOEFSTUBOEJOHUIFMJHIUOJOHOFUXPSL QBSUDSFBUJOHUIFOFUXPSL IUUQT[PPNCMDDPNMJHIUOJOHOFUXPSL IUUQTNFEJVNDPN!KPOBMEGZPPLCBMMNBUIFNBUJDBMQSPPGUIBUUIF
MJHIUOJOHOFUXPSLDBOOPUCFBEFDFOUSBMJ[FECJUDPJOTDBMJOH TPMVUJPOC Reference