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
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
BancorProtocol
r_etx
4
750
TPS&51%Attack
r_etx
0
250
GHZstate
r_etx
0
44
Featured
See All Featured
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
How to Ace a Technical Interview
jacobian
276
23k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.3k
Imperfection Machines: The Place of Print at Facebook
scottboms
265
13k
StorybookのUI Testing Handbookを読んだ
zakiyama
27
5.3k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
6.9k
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.4k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5k
The Power of CSS Pseudo Elements
geoffreycrofte
73
5.3k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
665
120k
The World Runs on Bad Software
bkeepers
PRO
65
11k
A Philosophy of Restraint
colly
203
16k
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