Save 37% off PRO during our Black Friday Sale! »

Lightning Talk about Lightning Network Powered by AWS

Lightning Talk about Lightning Network Powered by AWS

2018年6月27日「bitbank LT Night #1 ~AWS~」にて、Lightning NetworkノードをAWS上で動かす話などについて、LT(Lightning Talk)でお話させていただきました。

D3e027f453bb96ac1398cc98620f2920?s=128

Shu Kobuchi

June 27, 2018
Tweet

Transcript

  1. -JHIUOJOH5BMLBCPVU -JHIUOJOH/FUXPSL 1PXFSFECZ"84 খᔹप4IV,PCVDIJ CJUCBOL-5/JHIUd"84d

  2. ࣗݾ঺հ খᔹपɹ4IV,PCVDIJɹ!TIV@LPCTIVLPCVDIJ ◾ΩϡʔϒγεςϜٕज़ઓུࣨ*5εϖγϟϦετ
 ɹɹ—ϒϩοΫνΣʔϯͷݚڀ։ൃ୲౰ ◾ϒϩοΫνΣʔϯେֶߍ
 ɹɹ—ΤϯδχΞϒϩϯζίʔεमྃ ߹֨  ◾ओͳίϛϡχςΟ׆ಈ
 ɹɹ—҉߸௨՟ྠಡձϏοτίΠϯͱ͔ษڧձ


    ɹɹɹIUUQTDSZQUPDVSSFODZDPOOQBTTDPN
 ɹɹɹӡӦ
 ɹɹ—೔ຊ҉߸௨՟Ϣʔβձ ౦ژࢧ෦ 
 ɹɹɹ04$౦ژ΁ͷग़లɾӡӦ
 
 ɹɹ—೔ຊ҉߸௨՟Ϣʔβձژ౎ࢧ෦
 IUUQTDSZQUPDVSSFODZLZPUPDPOOQBTTDPN
 ɹɹɹൃىਓ
 ɹɹɹ04$ژ౎΁ͷग़లɾӡӦ  
 ɹɹɹژ౎Ͱษڧձ  ϛεϏοτίΠϯ౻ຊਅҥࢯͷΠϯλϏϡʔهࣄ
 IUUQTHPPHMKNRL
  3. #JUDPJOͷεέʔϥϏϦςΟ #JUDPJOͷϊʔυ͸ΈΜͳಉ͡ಇ͖Λ͢Δ ◾#JUDPJOͷॲཧೳྗ
 ɹɹ—ϒϩοΫͷ.#্ݶͰඵ͋ͨΓ
 ɹɹɹτϥϯβΫγϣϯະຬΛαϙʔτ
 ɹɹ—ϒϩοΫαΠζΛແ੍ݶͱ͢Δͱɺ7JTB
 ɹɹɹϐʔΫ࣌ͷ UQTʹରॲ͢Δʹ͸ɺ
 ɹɹɹ̍ϒϩοΫͰ(#Λ෼͝ͱʹੜ੒
 ɹɹ—ͦΕ͸೥ؒ5#Ҏ্ͷσʔλʹͳΔ


    ɹɹ—ͳ͓ɺݱࡏ͸೥ؒͰ(#΄Ͳ ◾7JTBͷॲཧೳྗ
 ɹɹ—೥ͷ࿈ٳதʹ UQT
  USBOTBDUJPOQFSTFDPOE ౸ୡ
 ɹɹ—ݱࡏฏۉ೔͋ͨΓ਺ԯυϧͷऔΓѻ͍ IUUQTCMPDLDIBJOJOGPKBDIBSUTOUSBOTBDUJPOT UJNFTQBOBMM
  4. -JHIUOJOH/FUXPSL ϖΠϝϯτνϟωϧͰԿճ΋ૹ͕ۚߦΘΕͨޙͷ࠷ऴ࢒ߴΛϒϩοΫνΣʔϯʹ ॻ͖ࠐΉ ϖΠϝϯτνϟωϧ ϒϩοΫνΣʔϯ "MJDF ྫʣ"MJDF͸ΫϦʔχϯά԰ΛӦΜͰ͓Γɺ#PC ͸ύϯ԰ΛӦΜͰ͍ͯɺ͓ޓ͍ళΛར༻͢Δ #PC 利用した店

    送金者 受取者 支払額 パン屋 Alice Bob ¥1,500 クリーニング屋 Bob Alice ¥2,500 パン屋 Alice Bob ¥2,000 ૬ࡴ͢ΔͳΒ"MJDF͕#PCʹ= ෷͑͹Α͍
  5. "84Ͱ-JHIUOJOH/FUXPSLϊʔυΛߏங &$Λར༻ ◾ΠϯελϯελΠϓ
 ɹɹ—UTNBMM
 —UNJDSPͩͱ
 ɹɹɹϏϧυ࣌ʹ
 ɹɹɹϝϞϦෆ଍
  ◾ετϨʔδαΠζ
 ɹɹ—ϑϧϊʔυͳΒ


    ɹɹ—5FTUOFUͳΒ(#
 ɹɹ—.BJOFUͳΒ(# ◾".*
 ɹɹ—6CVOUV
 —ϒϩοΫνΣʔϯ
 ɹɹɹͰΑ͘ར༻͞ΕΔ
  6. #JUDPJO$PSFͱDMJHIUOJOHΠϯετʔϧ #JUDPJOϊʔυ͸$ ͷϦϑΝϨϯε࣮૷ͷ#JUDPJO$PSF CJUDPJOE ΍+BWB࣮૷ ͷCJUDPJOKɺHP࣮૷ͷCUDEͳͲ͕͋Γɺ-JHIUOJOH/FUXPSLϊʔυ΋$ݴޠ࣮૷ ͷDMJHIUOJOH MJHIUOJOHE ɺHPݴޠ࣮૷ͷMOEͳͲ͕͋Δɻ
 ࠓճ͸ɺ#JUDPJO$PSF

    CJUDPJOE  DMJHIUOJOH MJHIUOJOHE Λ঺հ #JUDPJODPSFͷΠϯετʔϧ VCVOUV  IUUQTRJJUBDPNUPLVPJUFNTFGEGDGDFC -JHIUOJOH/FUXPSLϊʔυΛ্ཱͪ͛Δํ๏ DMJHIUOJOHฤ  IUUQTRJJUBDPNNVUBJUFNTCFDBGFDE
  7. ։͚Δϙʔτ ηΩϡϦςΟάϧʔϓΠϯό΢ϯυ
 Ͱઃఆ
 ◾.BJOOFUͷ৔߹
 ɹɹ—
 — ◾5FTUOFUͷ৔߹
 ɹɹ—
 — ◾MJHIUOJOH

    .BJOOFU 5FTUOFUڞ௨ 
 ɹɹ—
  8. "84Ͱཱͯͨϊʔυ΁ͷνϟωϧͷషΓํ ௨ৗɺ*1WύϒϦοΫ*1Λ༻͍Δ͕ɺ"84౳Ϋϥ΢υͰ͸
 *1WύϒϦοΫ*1Ͱ͸షΕͳ͍ͷͰɺύϒϦοΫ%/4Λར༻ $ lightning-cli connect 03878c29e98b292d75184e04f8732df71b829e1f027abd881f68ba87f94890f8e2 54.64.156.15:9735 { "code"

    : -1, "message" : "Connection establishment: Connection timed out" } vagrant@vagrant:~/lightning$ lightning-cli connect 03878c29e98b292d75184e04f8732df71b829e1f027abd881f68ba87f94890f8e2 ec2-54-64-156-15.ap-nor theast-1.compute.amazonaws.com:9735 { "id": “03878c29e98b292d75184e04f8732df71b829e1f027abd881f68ba87f94890f8e2" } vagrant@vagrant:~/lightning$ lightning-cli fundchannel 03878c29e98b292d75184e04f8732df71b829e1f027abd881f68ba87f94890f8e2 1000000 { “tx": "02000000000101f8fb8fe048fe4dd0d9c2f854777685b4bf8bc68ba18a7e2b6c092a4a26fee2110100000000f fffffff0240420f0000000000220020117ee3b27964d2fec71ec73fa6c3ac4f14f5a23b6d7dd17b0a925c9d421 62c9859bb650300000000160014be090d0aceb6702c948220f84c9cc1a026ce60a302473044022004d5dc06814 fab006d8658c9d4a76669fbab4c3257e6e377e8b44a2502628262022075564b6dd354a3bac745403b0e16fd7b3 ab8f8e303a17acf75165ea92c8a0026012102f530fbd401090d92b1863cf6db3657c323dc482f12a88ff4a5814 7ac0111acf900000000", "txid": "cfd32c38756a5165cba58c01daf2503de7e220c671f41483949ca8be2bb93e8b", "channel_id": “8b3eb92bbea89c948314f471c620e2e73d50f2da018ca5cb65516a75382cd3cf" }
  9. -JHIUOJOH/FUXPSL&YQMPSFS -JHIUOJOH/FUXPSLνϟωϧΛՄࢹԽͨ͠αΠτ 5FTUOFU 
 IUUQTFYQMPSFSBDJORDP ύϒϦοΫ%/4ͷϊʔυ͸ొ࿥͞Εͳ͍ʁ

  10. -JHIUOJOH/FUXPSL&YQMPSFS -JHIUOJOH/FUXPSLνϟωϧΛՄࢹԽͨ͠αΠτ .BJOOFU 
 IUUQTMONBJOOFUHBCFOXJO ◾03"/(&#&".
 ɹɹ—খᔹ͕.BJOOFUͰཱ͍ͯͯΔϊʔυ ◾5FTUOFUΛ௒͑Δن໛
 ɹɹ—ϊʔυ਺ɺνϟωϧ਺ͱ΋ʹ.BJOOFUͷํ͕ଟ਺

  11. #JUDPJOΛࢧ͑Δ"84 #JUDPJOϊʔυΛՔಇͤ͞Δͷʹ"84͸͔ͳΓ࢖ΘΕ͍ͯΔ
 ੈքͷϊʔυ&YQMPSFS
 IUUQTCJUOPEFTFBSODPNOPEFT R+BQBO

  12. #JUDPJOΛࢧ͑Δ"84 #JUDPJOϊʔυΛՔಇͤ͞Δͷʹ"84͸͔ͳΓ࢖ΘΕ͍ͯΔ
 ੈքͷϊʔυ&YQMPSFS
 IUUQTCJUOPEFTFBSODPNOPEFT R+BQBO

  13. -JHIUOJOH/FUXPSLΛ5FTUOFUͰମݧ 4UBS#MPDLT IUUQTTUBSCMPDLTBDJORDP ◾ձܭ͸23ίʔυಡΈऔΓ
 ɹɹ—εϚϗ౳ͰಡΈऔܾͬͯࡁ
 ɹɹ—#JUDPJOͱ͸ผن֨ͷૹۚํ๏

  14. -JHIUOJOH/FUXPSLͷ࣮ళฮܾࡁ ೥݄೔ ౔ ೔ຊͰॳΊͯͷ-JHIUOJOH/FUXPSL࣮ళฮܾࡁ͕ߦΘΕͨ ◾ϕϧΪʔϏʔϧμΠχϯάαϯλϧψʔ
 ɹɹ—҉߸௨՟ܾࡁͷ੟஍
 ɹɹ—*$0 *OJUJBM$PJO0⒎FSJOH Ͱ໊ݹ԰͔Β
 ɹɹɹ౦ژ੺ࡔʹҠస

    ◾ࣗ਎͸໨ܸऀͱͳΓɺ5XJUUFSͰ͸େ͖ͳ൓ڹ
 ɹɹ—೔ຊͰ-JHIUOJOH/FUXPSL͕େ͖ͳҰาΛ
 ɹɹɹ౿Έग़ͨ͠ IUUQTUXJUUFSDPNTIV@LPCTUBUVT
  15. 8PP$PNNFSDFͷԾ૝௨՟ܾࡁ #JUDPJO΍&UIFSFVNΛ͸͡Ίͱ͢Δ༷ʑͳԾ૝௨՟ܾࡁʹରԠ ◾#JUDPJOͱ"MUDPJO ѥछ 
 ɹɹ—#JUDPJO
 —#JUDPJO$BTI
 —-JUFDPJO
 —%BTI
 ͳͲ

    IUUQTKBXPSEQSFTTPSHQMVHJOTHPVSM XPPDPNNFSDFCJUDPJOBMUDPJOQBZNFOUHBUFXBZ BEEPO ◾&UIFSFVN
 ɹɹ—&UIFSFVN
 —&3$UPLFOT &UIFSFVN্Ͱൃߦ͞Ε
 ɹɹɹͨ&3$ͱ͍͏ن֨ͷτʔΫϯ IUUQTXXXXQCMPHDPNDSZQUPDVSSFODJFT XPSEQSFTTBOEXPPDPNNFSDFXFCTJUFT
  16. Ծ૝௨՟ܾࡁͰ΋࠷৽Λߦ͘8PP$PNNFSDF #JUDPJOͷઌਐٕज़-JHIUOJOH/FUXPSLͷܾࡁʹ΋ରԠ ◾8PP$PNNFSDF(BUFXBZ-JHIUOJOH
 ɹɹ—ੈքతͳ#JUDPJOελʔτΞοϓ
 #MPDLTUSFBN͕ࣾ8PPDPNNFSDFͱซ༻
 ɹɹɹ͢Δ(BUFXBZΛΦʔϓϯιʔεͰఏڙ IUUQTHJUIVCDPN&MFNFOUT1SPKFDUXPPDPNNFSDFHBUFXBZMJHIUOJOH