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

Lightning Talk about Lightning Network Powered ...

Lightning Talk about Lightning Network Powered by AWS

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

Shu Kobuchi

June 27, 2018
Tweet

More Decks by Shu Kobuchi

Other Decks in Programming

Transcript

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


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


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

    送金者 受取者 支払額 パン屋 Alice Bob ¥1,500 クリーニング屋 Bob Alice ¥2,500 パン屋 Alice Bob ¥2,000 ૬ࡴ͢ΔͳΒ"MJDF͕#PCʹ= ෷͑͹Α͍
  4. #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
  5. "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" }
  6. -JHIUOJOH/FUXPSLͷ࣮ళฮܾࡁ ೥݄೔ ౔ ೔ຊͰॳΊͯͷ-JHIUOJOH/FUXPSL࣮ళฮܾࡁ͕ߦΘΕͨ ◾ϕϧΪʔϏʔϧμΠχϯάαϯλϧψʔ
 ɹɹ—҉߸௨՟ܾࡁͷ੟஍
 ɹɹ—*$0 *OJUJBM$PJO0⒎FSJOH Ͱ໊ݹ԰͔Β
 ɹɹɹ౦ژ੺ࡔʹҠస

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

    IUUQTKBXPSEQSFTTPSHQMVHJOTHPVSM XPPDPNNFSDFCJUDPJOBMUDPJOQBZNFOUHBUFXBZ BEEPO ◾&UIFSFVN
 ɹɹ—&UIFSFVN
 —&3$UPLFOT &UIFSFVN্Ͱൃߦ͞Ε
 ɹɹɹͨ&3$ͱ͍͏ن֨ͷτʔΫϯ IUUQTXXXXQCMPHDPNDSZQUPDVSSFODJFT XPSEQSFTTBOEXPPDPNNFSDFXFCTJUFT