Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Blockchain技術勉強会 #Lightning Networkの技術と最前線

Blockchain技術勉強会 #Lightning Networkの技術と最前線

東大ブロックチェーン開発団体BitPenguin主催
Blockchain技術勉強会@EastVenturesオフィス
2018/05/26

Takaya Imai

May 26, 2018
Tweet

More Decks by Takaya Imai

Other Decks in Technology

Transcript

  1. ϏοτίΠϯͷ εέʔϦϯά໰୊ εέʔϦϯά໰୊ ඵؒऔҾ਺͕̓݅ఔ౓ 1MB / 256byte /10෼/60ඵ = 6.8औҾຖඵ

    Segwit (Segregated Witness)༗ޮԽޙɺ̍ϒϩοΫʹ̍MBΑΓೖΔΑ͏ʹͳͬͨͨΊɺඵؒऔҾ਺ ͸લΑΓվળ ϒϩοΫνΣʔϯαΠζͷ૿େ ̍̒̔GB (2018/5/26ݱࡏ) τϥϯβΫγϣϯख਺ྉͷߴಅ ૹ෇͞ΕΔτϥϯβΫγϣϯͷ਺͕૿͑ΔͱɺϚΠφʔ͸ΑΓख਺ྉͷߴ͍τϥϯβΫγϣϯ͔Β ϒϩοΫʹऔΓࠐ΋͏ͱ͢Δ ࠷ۙ͸̍ճͷૹۚ͋ͨΓ20ԁఔ౓(5satoshi/byte) 2017೥12݄͸ϐʔΫͰ̍ճͷૹۚ͋ͨΓ4000ԁఔ౓ͷͱ͖΋͋ͬͨ
  2. ͍Ζ͍Ζͳղܾࡦ ΦϯνΣʔϯଆ ผͷϒϩοΫνΣʔϯʹॲཧΛԡ͠΍Δ αΠυνΣʔϯ/υϥΠϒνΣʔϯ τϥϯβΫγϣϯͷσʔλͷҰ෦Λผ࿮ʹԡ͠΍Δ SegWit (Segregated Witness) ϒϩοΫαΠζΛେ͖͘͢Δ ϏοάϒϩοΫ

    ϒϩοΫͷ఻ୡํ๏ͷվળɺGraphen τϥϯβΫγϣϯͷαΠζΛখ͘͢͞Δ γϡϊΞॺ໊(Schnorr Signature) ࢖Θͳ͍τϥϯβΫγϣϯεΫϦϓτΛল͘ɺ Graftroot … ΦϑνΣʔϯଆ ϥΠτχϯάωοτϫʔΫ Ethereum(ϥΠσϯωοτϫʔΫɺϚΠΫϩϥΠσ ϯ)
  3. #MPDLDIBJO DPOOFDUFEUP #JUDPJO ;DBTI #MPDLDIBJO &UIFSFVN #MPDLDIBJO #JUDPJO #MPDLDIBJO ʜ

    -JHIUOJOH/FUXPSL "UPNJD 4XBQ 1BZQBM 7JTB *OUFS#MPDLDIBJO #MPDLDIBJO DPOOFDUFEUP TPNF CMPDLDIBJOT 3BJEFO/FUXPSL ΦϯνΣʔϯଆ ΦϑνΣʔϯଆ 4JEFDIBJO ϒϩοΫνΣʔϯ֎ ֤ٕज़ͷؔ࿈Πϝʔδ *OUFSMFEHFS
  4. Layer Blockchain Lightning Payment Channel Routing Algorithm Atomic Multi-Path Payments

    Lapps Physical Layer Link Layer Network Layer Transport Layer Application Layer Sphinx Presentation Layer Lightning Internet HTLC Session Layer
  5. ϥΠτχϯάωοτϫʔ Ϋʁ جຊతͳΞΠσΞ̍ ຖճऔҾΛϒϩοΫνΣʔϯʹॻ͖ࠐΉͷͰ͸ͳ͘ɺ֤औҾͷ݁Ռͱͯ͠ਖ਼ຯͷ͓ۚΛ࠷ޙʹ ϒϩοΫνΣʔϯʹॻ͖ࠐΉ ֓೦ྫ(ݫີʹ͸ͪΐͬͱҧ͍·͕͢) 1. A͞Μ͕B͞Μʹ1000ԁିͨ͠ 2. B͞Μ͕A͞Μʹ500ԁ෼͝൧୅Λग़ͨ͠

    3. ݁ہɺB͞Μ͸A͞Μʹ500ԁฦͨ͠ ͜ΕΛͰ͖ΔΑ͏ʹ͢ΔೋऀʹΑΔ࠷খߏ੒୯ҐΛνϟωϧͱ͍͏ɻ νϟωϧ͸HTLC(Hashed Time Lock Contractɺϋογϡ෇੍͖࣌ؒݶίϯτϥΫτ)Λ࢖ͬͯ࡞ Δ ࠷ऴঢ়ଶΛϒϩοΫνΣʔϯʹॻ͖ࠐΉ·Ͱ͸ɺ྆ऀͷ߹ҙͷ্Ͱঢ়ଶͷߋ৽Λ͢Δ
  6. ϥΠτχϯάωοτϫʔ Ϋʁ ૹۚऀ डۚऀ "MJDF #PC $BSPM $BSPM ϓϨΠϝʔδϋογϡ )

    ᶃϓϨΠϝʔδϋογϡ)ૹ෇ UYXJUI) OFFE3 UPVTF UYXJUI) OFFE3 UPVTF ᶄ59XJUI)ૹ෇ UYXJUI) OFFE3 UPVTF ᶅ59XJUI)ૹ෇ ᶆϓϨΠϝʔδ3ૹ෇ 3 ᶇϓϨΠϝʔδ3ૹ෇ 3 $BSPM ϓϨΠϝʔδ 3 ໿ଋ͸͢Δ͚Ͳ౪Ίͳ͍ Carol͸ R͕͋Δ͔Β ड͚औΕΔ
  7. ϥΠτχϯάωοτϫʔ Ϋʁ ϊʔυ ϊʔυ ϊʔυ*% ϊʔυ νϟωϧ ϊʔυ νϟωϧ νϟωϧ

    νϟωϧ ϊʔυ ϊʔυ*% ϊʔυ*% ϊʔυ*% ϊʔυ νϟωϧ ϊʔυ*% νϟωϧ ϊʔυ ϊʔυ*% ͷେ͖͞͸νϟωϧʹ৐͍ͬͯΔϏοτίΠϯͷྔ
  8. ϥΠτχϯάωοτϫʔΫ ϊʔυϓϩδΣΫτҰཡ $PNQBOZ 0SHBOJ[BUJPO -JHIUOJOH -BCT .*5%$* #MPDLTUSFBN "$*/2 CDPJOPSH

    /BZVUB 1SPEVDU /BNF MOE MJU MJHIUOJOHE FDMBJS QMBTNB QUBSNJHBO MOXBMMFU $PNNJUPST 5IBEEFVT %SZKB  +PTFQI 1PPO  0MBPMVXB 0TVOUPLVO 5IBEEFVT %SZKB 3VTUZ3VTTFM  $ISJTUJBO %FDLFS 1JFSSF.BSJF 1BEJPV  'BCSJDF %SPVJO  EQBE $ISJTUPQIFS +F⒎SFZ OBZVUBVFOP "OUPO ,VNBJHPSPET LJ -BOHVBHF (P (P $ 4DBMB /PEFKT $ 4DBMB pSTUDPNNJU +45        NBTUFS MBTUFTU DPNNJU +45        HJUIVC IUUQT HJUIVCDPN MJHIUOJOHOFU XPSLMOE IUUQT HJUIVCDPN NJUEDJMJU IUUQT HJUIVCDPN &MFNFOUT1SPK FDUMJHIUOJOH IUUQT HJUIVCDPN "$*/2FDMBJS IUUQT HJUIVCDPN CDPJOPSH QMBTNB IUUQT HJUIVCDPN OBZVUBDP QUBSNJHBO IUUQT HJUIVCDPN CUDPOUSBDU MOXBMMFU PUIFST BOESPJEBQQ
  9. Layer Blockchain Lightning Payment Channel Routing Algorithm Atomic Multi-Path Payments

    Lapps Physical Layer Link Layer Network Layer Transport Layer Application Layer Sphinx Presentation Layer Lightning Internet HTLC Session Layer
  10. ஫໨͍ͯ͠Δ ϥΠτχϯάٕज़΍ϓϩδΣΫτ Atomic Multi-Path Payments(ෆՄ෼ͳෳ਺ܦ࿏ࢧ෷͍ɺϥΠτχϯάωοτϫʔΫඇதԝूݖԽ/ଟֹૹۚ) b+l wallet (ड͕ۚͰ͖Δݱࡏ།ҰͷϥΠτχϯά΢ΥϨοτ) eltoo(νϟωϧߋ৽ͷγϯϓϧԽ) Splicing(νϟωϧσϙδοτͷಈతมߋ)

    Data Loss Protection(νϟωϧঢ়ଶͷอଘ) Olympus Server(νϟωϧঢ়ଶͷόοΫΞοϓ෼ࢄҕୗͱҕ೚ΠϯηϯςΟϒઃܭ) Outsourcing WatchTower (τϥϯβΫγϣϯ؂ࢹͷ֎෦Խ/ҕୗ) Atomic Swap(ϥΠτχϯάΛ࢖ͬͨϒϩοΫνΣʔϯؒෆՄ෼ίΠϯަ׵) Streaming Payments (ϥΠτχϯάૹۚͷ͞ΒͳΔޮ཰ԽɺૹۚϧʔτҰճҰճดͣ͡ʹϧʔτΛ࢖͍ճ͢)
  11. ஫໨͍ͯ͠Δ ϥΠτχϯάٕज़̍ AMP: Atomic Multi-Path Payments(ෆՄ෼ͳෳ਺ܦ࿏ࢧ෷͍) ݱঢ় ૹۚऀ͔Βडۚऀ΁ͷૹۚܦ࿏͸̍ͭ ྫ͑͹ɺ100ԁΛૹΓ͍ͨ৔߹ɺૹۚऀ͔Βडۚऀ΁ͷܦ࿏ͷશͯͷνϟωϧ͕100ԁૹۚՄೳͰͳ͍ͱ ͍͚ͳ͍

    ໰୊఺ ·ͱ·͓ͬͨۚΛૹΕͳ͍ ̍ສԁͳͲ͋Δఔ౓·ͱ·͓ͬͨۚ͸ɺϥΠτχϯάωοτϫʔΫΛ࢖Θͳ͍΄͏͕͍͍ͱ͸ࢥ͍ ·͢ νϟωϧʹଟ͘ͷ͓ۚΛஔ͍͓ͯ͘ͷ͸ࢿ͕ۚ๛͔ͳਓ -> தԝूݖԽ 1ͭͷૹۚܦ࿏ʹґଘͯ͠͠·͏ ૹۚܦ࿏্ͷϊʔυ͕ૹۚதʹ൓Ԡ͠ͳ͘ͳΔͳͲ໰୊͕ى͖ͨ৔߹ɺૹ్͕ۚதͰࢭ·ͬͯ͠ ·ͬͯಈ͔ͳ͘ͳΔͱ͍͏͜ͱ͸ͳ͍͕ɺૹۚ׬ྃ·Ͱ͕͔͔࣌ؒͬͯ͠·͏
  12. ஫໨͍ͯ͠Δ ϥΠτχϯάٕज़̍ AMP: Atomic Multi-Path Payments(ෆՄ෼ͳෳ਺ܦ࿏ࢧ෷͍) ղܾํ๏ ̍ճͷૹۚΛɺෳ਺ͷૹۚܦ࿏ʹ෼ׂͯ͠ૹΔ ྑ͍఺ ૹۚܦ࿏ͷબ୒ࢶ͕΋ͬͱ૿͑ɺϥΠχϯάωοτϫʔΫશମͷϦιʔεΛ͏·͘࢖͑Δ

    νϟωϧʹେ͖ͳ͓ۚΛஔ͍͓͔ͯͳͯ͘΋ɺϥΠτχϯάωοτϫʔΫʹߩݙͰ͖Δ ѱ͍఺ ϥΠτχϯάωοτϫʔΫશମͰͷૹۚॲཧ਺͸૿͑ΔͨΊɺ෼ׂ਺Λେ͖͗͘͢͠ΔͱϥΠτ χϯάωοτϫʔΫ͕๞࿨ͯ͠͠·͏
  13. ஫໨͍ͯ͠Δ ϥΠτχϯάٕज़̎ ໘ന͍఺ τϥϯβΫγϣϯ؂ࢹͷ؆қԽ͕࣮૷ͯ͋͠Γɺ؂ࢹͷ֎෦ҕ೚Λ؇࿨Ͱ͖Δ ୯७ʹ͸ɺεϚϗΞϓϦ͸ϥΠτχϯάωοτϫʔΫʹࢀՃͰ͖·ͤΜ εϚϗͷి஑͕੾ΕΔɺΠϯλʔωοτʹ઀ଓͰ͖ͳ͘ͳΔͳͲͯ͠ɺτϥϯβΫγϣϯͷ؂ࢹ͕ Ͱ͖ͳ͘ͳΔͨΊɻ ૹ͚ۚͩͰ͋Ε͹Ͱ͖·͕͢ɺϥΠτχϯάωοτϫʔΫͷҰ෦ͱͯ͠ૹۚܦ࿏ʹߩݙ͢Δʹ͸ૹ ۚͱडۚͷ྆ํ͕ඞཁ τϥϯβΫγϣϯ؂ࢹ͕ෆཁͱ͍͏Θ͚Ͱ͸ͳ͍Ͱ͢

    εϚϗ্ͷτϥϯβΫγϣϯσʔλ͕յΕͯ͠·ͬͨ౳ͳ͘ͳͬͯ͠·ͬͨͱ͖ͷͨΊʹɺόοΫΞοϓΛ औ͓ͬͯ͘͜ͱ͕Ͱ͖Δ όοΫΞοϓอଘͷ෼ࢄҕ೚Λड͚ΔଆʹͱͬͯͷΠϯηϯςΟϒ͕͢Ͱʹ࣮૷ͯ͋͠Δ ͜ΕΒΛߦ͏ͷ͕ɺOlympusαʔόͰ͢ɻ εϚϗΞϓϦϋϯζΦϯΛ΍͍ͬͯΔͷͰɺͦ͜Ͱਐల۩߹͸ެ։͍͖ͯ͠·͢ɻ
  14. ஫໨͍ͯ͠Δ ϥΠτχϯάٕज़̐ Data Loss Protection νϟωϧঢ়ଶͷอଘ ҉߸௨՟ʹ͸෮ݩϑϨʔζ(mnemonic code)͕͋Γɺ΢ΥϨοτ͕յΕ ͯ͠·͏ɾεϚϗ͕յΕͯ͠·͏ͱ͍ͬͨ࣌ʹ΋෮ݩϑϨʔζΛ࢖͑͹ ΢ΥϨοτΛݩʹ໭ͤΔ

    ͔͠͠ɺΦϑνΣʔϯٕज़Ͱ͋ΔϥΠτχϯάͰ͸औҾσʔλ͸ϒϩο ΫνΣʔϯʹ͸ͳ͍ͨΊ෮ݩϑϨʔζͰνϟωϧঢ়ଶͷ෮ݩ͸Ͱ͖ͳ͍ ͜ͷͨΊɺ΢ΥϨοτͷ෮ݩϑϨʔζͰνϟωϧঢ়ଶ΋෮ݩͰ͖ΔΑ͏ ͳ࢓૊Έ͕ඞཁ
  15. ஫໨͍ͯ͠Δ ϥΠτχϯάٕज़̑ Olympus Server νϟωϧঢ়ଶόοΫΞοϓͷ෼ࢄҕ೚ͱҕ೚ΠϯηϯςΟϒઃܭ http://lightning-wallet.com/what-does-olympus-server-do#what-does-olympus-server-do b+l walletͱ࿈ܞͯ͠Քಇ͢Δ࢓૊Έ νϟωϧΛ։͘ͱOlympus Serverʹνϟωϧঢ়ଶΛ҉߸Խͨ͠ঢ়ଶͰૹ෇͠ɺb+l

    wallet͸ϥΠτχϯάܦ༝Ͱ όοΫΞοϓख਺ྉΛ෷͏ Olympus Server͕ཪ੾ΔՄೳੑ(νϟωϧঢ়ଶΛ໭ͯ͘͠Εͳ͍)͕͋ΔͨΊɺෳ਺ͷOlympus Serverʹνϟωϧঢ় ଶΛૹΔ෼ࢄҕୗͷํ͕ྑ͍Α͏ʹࢥ͏
  16. ஫໨͍ͯ͠Δ ϥΠτχϯάٕज़̒ Outsourcing WatchTower τϥϯβΫγϣϯ؂ࢹͷ֎෦Խ/ҕୗ νϟωϧΛҡ࣋͢Δʹ͋ͨͬͯɺνϟωϧ૬ख͕ෆਖ਼Λ͠ͳ͍Α͏ʹνϟωϧ͕উखʹด͡ΒΕͳ ͍͔Λ؂ࢹ͠ͳ͍ͱ͍͚ͳ͍ εϚϗ্ͷϥΠτχϯάΞϓϦͷ৔߹ɺεϚϗ͕յΕΔ·ͨ͸ి஑͕੾ΕΔͱ͍ͬͨ৔߹ʹ͜ͷ τϥϯβΫγϣϯ؂ࢹ͕Ͱ͖ͳ͘ͳΔͨΊɺ؂ࢹͷ֎෦Խ/ҕୗ͕ඞཁʹͳΔ ಛʹɺडۚͷࡍʹ͜ͷτϥϯβΫγϣϯ؂ࢹ͕ॏཁɻݱࡏ΄ͱΜͲͷϥΠτχϯάΞϓϦͰૹۚͷ

    Έ͔͠Ͱ͖ͳ͍ͷ͸ɺૹۚʹτϥϯβΫγϣϯ؂ࢹ͕ෆཁͳͨΊɻ b+l walletͰ͸ݱࡏτϥϯβΫγϣϯ؂ࢹ͕ͳ͍ʹ΋ؔΘΒͣड͕ۚͰ͖Δ(·ͩςετωοτ)ɻෆ ਖ਼ଆʹର͢Δࢿۚ࢖༻੍࣌ؒݶΛࡾϲ݄ͱ͔ʹͯ͠ɺ௕͍ͱ͍͑Ͳ΋εϚϗ͕Ұϲ݄΋Πϯλʔ ωοτ͔Β੾Γ཭͞ΕΔ͜ͱ͸ͳ͍ΑͶʁͱ͍͏͍͏͜ͱΛར༻͠ɺͦΕͳΓʹ҆શʹड͕ۚͰ͖ ΔΑ͏ʹ͍ͯ͠Δɻ
  17. Layer Blockchain Lightning Payment Channel Routing Algorithm Atomic Multi-Path Payments

    Lapps Physical Layer Link Layer Network Layer Transport Layer Application Layer Sphinx Presentation Layer Lightning Internet HTLC Session Layer