Skip to content

Instantly share code, notes, and snippets.

@yyforyongyu
Created October 29, 2019 11:07
Show Gist options
  • Save yyforyongyu/67596108f3c60172771141de22d9a0b4 to your computer and use it in GitHub Desktop.
Save yyforyongyu/67596108f3c60172771141de22d9a0b4 to your computer and use it in GitHub Desktop.
alice_bob_lnd_payment
Alice's log(sends bitcoins to Bob)
========================================================================================================================
...
2019-10-21 12:38:20.476 [DBG] PEER: Sending Ping to 02d933bf399aadf537f78a48aa3d25a80fd87c3d0a861d7e35ffbcd06523313cf9@172.19.0.3:9735
2019-10-21 12:38:20.479 [DBG] PEER: Received Pong from 02d933bf399aadf537f78a48aa3d25a80fd87c3d0a861d7e35ffbcd06523313cf9@172.19.0.3:9735
2019-10-21 12:38:26.713 [DBG] CRTR: Found route: probability=0.6, hops=1, fee=0 mSAT
2019-10-21 12:38:26.740 [DBG] CRTR: Payment 83e1c34af5ea9b3f840f5c5d0f18985ff9f81958cd2c92fd2c62910c030ce032 (pid=1) successfully sent to switch
2019-10-21 12:38:26.740 [DBG] HSWC: ChannelLink(401:1:0) Queueing keystone of ADD open circuit: (Chan ID=0:0:0, HTLC ID=1)->(Chan ID=401:1:0, HTLC ID=0)
2019-10-21 12:38:26.741 [DBG] PEER: Sending UpdateAddHTLC(chan_id=3918d9d451fccc282250508991109007deecb6cafa73b6df9360a2bd589ec7c2, id=0, amt=10000000 mSAT, expiry=600, hash=83e1c34af5ea9b3f840f5c5d0f18985ff9f81958cd2c92fd2c62910c030ce032) to 02d933bf399aadf537f78a48aa3d25a80fd87c3d0a861d7e35ffbcd06523313cf9@172.19.0.3:9735
2019-10-21 12:38:26.798 [DBG] HSWC: ChannelLink(401:1:0) removing Add packet (Chan ID=0:0:0, HTLC ID=1) from mailbox
2019-10-21 12:38:26.811 [DBG] PEER: Sending CommitSig(chan_id=3918d9d451fccc282250508991109007deecb6cafa73b6df9360a2bd589ec7c2, num_htlcs=1) to 02d933bf399aadf537f78a48aa3d25a80fd87c3d0a861d7e35ffbcd06523313cf9@172.19.0.3:9735
2019-10-21 12:38:26.832 [DBG] PEER: Received RevokeAndAck(chan_id=3918d9d451fccc282250508991109007deecb6cafa73b6df9360a2bd589ec7c2, rev=1c3404bbee4a3b538929b35045b518e99b2b6df1e11be1578f8b3ff5a6424d10, next_point=03bbed8297832970c3b3ecf110b58d2cddc1c1619a23ac779b6697f2a751546d92) from 02d933bf399aadf537f78a48aa3d25a80fd87c3d0a861d7e35ffbcd06523313cf9@172.19.0.3:9735
2019-10-21 12:38:26.854 [DBG] PEER: Received CommitSig(chan_id=3918d9d451fccc282250508991109007deecb6cafa73b6df9360a2bd589ec7c2, num_htlcs=1) from 02d933bf399aadf537f78a48aa3d25a80fd87c3d0a861d7e35ffbcd06523313cf9@172.19.0.3:9735
2019-10-21 12:38:26.863 [DBG] PEER: Sending RevokeAndAck(chan_id=3918d9d451fccc282250508991109007deecb6cafa73b6df9360a2bd589ec7c2, rev=35ea731b7e54314c2a2d4184aed93c11f70ac9d905282846e1af789e730e6b5a, next_point=038e8483cc47d0a40495ff69ecc00b7753359cb087920ea9375b86eb75ff2e0067) to 02d933bf399aadf537f78a48aa3d25a80fd87c3d0a861d7e35ffbcd06523313cf9@172.19.0.3:9735
2019-10-21 12:38:26.895 [DBG] PEER: Received UpdateFulfillHTLC(chan_id=3918d9d451fccc282250508991109007deecb6cafa73b6df9360a2bd589ec7c2, id=0, pre_image=52ca5bbdfc32c0c8ffb823ff11108ee87dd0d3a53acfd73ce7d840c7db2fe3cd) from 02d933bf399aadf537f78a48aa3d25a80fd87c3d0a861d7e35ffbcd06523313cf9@172.19.0.3:9735
2019-10-21 12:38:26.897 [DBG] HSWC: Closed completed SETTLE circuit for 83e1c34af5ea9b3f840f5c5d0f18985ff9f81958cd2c92fd2c62910c030ce032: (0:0:0, 1) <-> (401:1:0, 0)
2019-10-21 12:38:26.910 [DBG] HSWC: Tearing down open circuit with SETTLE pkt, removing circuit=(Chan ID=0:0:0, HTLC ID=1) with keystone=(Chan ID=401:1:0, HTLC ID=0)
2019-10-21 12:38:26.910 [DBG] CRTR: Payment 83e1c34af5ea9b3f840f5c5d0f18985ff9f81958cd2c92fd2c62910c030ce032 succeeded with pid=1
2019-10-21 12:38:26.912 [DBG] CRTR: Reporting pair success to Mission Control: pair=032808aefe118e2839914e2114c948e6acfc67120aa48354811a8792e0aec0f432 -> 02d933bf399aadf537f78a48aa3d25a80fd87c3d0a861d7e35ffbcd06523313cf9
2019-10-21 12:38:26.919 [DBG] PEER: Received CommitSig(chan_id=3918d9d451fccc282250508991109007deecb6cafa73b6df9360a2bd589ec7c2, num_htlcs=0) from 02d933bf399aadf537f78a48aa3d25a80fd87c3d0a861d7e35ffbcd06523313cf9@172.19.0.3:9735
2019-10-21 12:38:26.919 [INF] SRVR: Adding preimage=52ca5bbdfc32c0c8ffb823ff11108ee87dd0d3a53acfd73ce7d840c7db2fe3cd to witness cache
2019-10-21 12:38:26.922 [DBG] HSWC: Closed completed SETTLE circuit for 83e1c34af5ea9b3f840f5c5d0f18985ff9f81958cd2c92fd2c62910c030ce032: (0:0:0, 1) <-> (401:1:0, 0)
...
Bob's log
========================================================================================================================
...
2019-10-21 12:37:27.327 [DBG] INVC: Invoice(83e1c34af5ea9b3f840f5c5d0f18985ff9f81958cd2c92fd2c62910c030ce032): added (*channeldb.Invoice)(0xc0001b4540)({
Memo: ([]uint8) {
},
Receipt: ([]uint8) <nil>,
PaymentRequest: ([]uint8) (len=191 cap=192) {
00000000 6c 6e 62 63 72 74 31 30 30 75 31 70 77 36 6d 66 |lnbcrt100u1pw6mf|
00000010 35 38 70 70 35 73 30 73 75 78 6a 68 34 61 32 64 |58pp5s0suxjh4a2d|
00000020 6e 6c 70 71 30 74 33 77 73 37 78 79 63 74 6c 75 |nlpq0t3ws7xyctlu|
00000030 6c 73 78 32 63 65 35 6b 66 39 6c 66 76 76 32 67 |lsx2ce5kf9lfvv2g|
00000040 73 63 71 63 76 75 71 65 71 64 71 71 63 71 7a 70 |scqcvuqeqdqqcqzp|
00000050 67 35 33 34 35 76 32 79 39 32 72 35 34 68 74 38 |g5345v2y92r54ht8|
00000060 61 33 73 79 75 75 39 6d 79 67 75 74 38 63 38 32 |a3syuu9mygut8c82|
00000070 66 64 64 33 65 77 32 6b 35 37 33 35 38 6a 35 66 |fdd3ew2k57358j5f|
00000080 38 6d 66 38 34 6a 37 79 71 38 37 6c 35 6d 79 71 |8mf84j7yq87l5myq|
00000090 77 35 7a 6b 72 78 6d 61 64 36 33 79 6c 36 75 77 |w5zkrxmad63yl6uw|
000000a0 73 79 38 68 77 35 79 30 6b 33 72 34 66 77 68 70 |sy8hw5y0k3r4fwhp|
000000b0 71 36 70 63 74 6b 71 67 70 6c 67 6d 6d 38 64 |q6pctkqgplgmm8d|
},
FinalCltvDelta: (int32) 40,
Expiry: (time.Duration) 1h0m0s,
CreationDate: (time.Time) 2019-10-21 12:37:27.326300614 +0000 UTC m=+2062.879033166,
SettleDate: (time.Time) 0001-01-01 00:00:00 +0000 UTC,
Terms: (channeldb.ContractTerm) {
PaymentPreimage: (lntypes.Preimage) (len=32 cap=32) 52ca5bbdfc32c0c8ffb823ff11108ee87dd0d3a53acfd73ce7d840c7db2fe3cd,
Value: (lnwire.MilliSatoshi) 10000000 mSAT,
State: (channeldb.ContractState) Open
},
AddIndex: (uint64) 0,
SettleIndex: (uint64) 0,
AmtPaid: (lnwire.MilliSatoshi) 0 mSAT,
Htlcs: (map[channeldb.CircuitKey]*channeldb.InvoiceHTLC) <nil>
})
...
2019-10-21 12:38:26.742 [DBG] PEER: Received UpdateAddHTLC(chan_id=3918d9d451fccc282250508991109007deecb6cafa73b6df9360a2bd589ec7c2, id=0, amt=10000000 mSAT, expiry=600, hash=83e1c34af5ea9b3f840f5c5d0f18985ff9f81958cd2c92fd2c62910c030ce032) from 032808aefe118e2839914e2114c948e6acfc67120aa48354811a8792e0aec0f432@172.19.0.6:53770
2019-10-21 12:38:26.813 [DBG] PEER: Received CommitSig(chan_id=3918d9d451fccc282250508991109007deecb6cafa73b6df9360a2bd589ec7c2, num_htlcs=1) from 032808aefe118e2839914e2114c948e6acfc67120aa48354811a8792e0aec0f432@172.19.0.6:53770
2019-10-21 12:38:26.826 [DBG] PEER: Sending RevokeAndAck(chan_id=3918d9d451fccc282250508991109007deecb6cafa73b6df9360a2bd589ec7c2, rev=1c3404bbee4a3b538929b35045b518e99b2b6df1e11be1578f8b3ff5a6424d10, next_point=03bbed8297832970c3b3ecf110b58d2cddc1c1619a23ac779b6697f2a751546d92) to 032808aefe118e2839914e2114c948e6acfc67120aa48354811a8792e0aec0f432@172.19.0.6:53770
2019-10-21 12:38:26.853 [DBG] PEER: Sending CommitSig(chan_id=3918d9d451fccc282250508991109007deecb6cafa73b6df9360a2bd589ec7c2, num_htlcs=1) to 032808aefe118e2839914e2114c948e6acfc67120aa48354811a8792e0aec0f432@172.19.0.6:53770
2019-10-21 12:38:26.864 [DBG] PEER: Received RevokeAndAck(chan_id=3918d9d451fccc282250508991109007deecb6cafa73b6df9360a2bd589ec7c2, rev=35ea731b7e54314c2a2d4184aed93c11f70ac9d905282846e1af789e730e6b5a, next_point=038e8483cc47d0a40495ff69ecc00b7753359cb087920ea9375b86eb75ff2e0067) from 032808aefe118e2839914e2114c948e6acfc67120aa48354811a8792e0aec0f432@172.19.0.6:53770
2019-10-21 12:38:26.885 [DBG] INVC: Invoice(83e1c34af5ea9b3f840f5c5d0f18985ff9f81958cd2c92fd2c62910c030ce032): settled, amt=10000000 mSAT, expiry=600, circuit=(Chan ID=401:1:0, HTLC ID=0)
2019-10-21 12:38:26.889 [DBG] HSWC: ChannelLink(401:1:0) Received hodl settle event for 83e1c34af5ea9b3f840f5c5d0f18985ff9f81958cd2c92fd2c62910c030ce032
2019-10-21 12:38:26.889 [INF] HSWC: ChannelLink(401:1:0) settling htlc 83e1c34af5ea9b3f840f5c5d0f18985ff9f81958cd2c92fd2c62910c030ce032 as exit hop
2019-10-21 12:38:26.892 [DBG] PEER: Sending UpdateFulfillHTLC(chan_id=3918d9d451fccc282250508991109007deecb6cafa73b6df9360a2bd589ec7c2, id=0, pre_image=52ca5bbdfc32c0c8ffb823ff11108ee87dd0d3a53acfd73ce7d840c7db2fe3cd) to 032808aefe118e2839914e2114c948e6acfc67120aa48354811a8792e0aec0f432@172.19.0.6:53770
2019-10-21 12:38:26.918 [DBG] PEER: Sending CommitSig(chan_id=3918d9d451fccc282250508991109007deecb6cafa73b6df9360a2bd589ec7c2, num_htlcs=0) to 032808aefe118e2839914e2114c948e6acfc67120aa48354811a8792e0aec0f432@172.19.0.6:53770
2019-10-21 12:38:26.936 [DBG] PEER: Received RevokeAndAck(chan_id=3918d9d451fccc282250508991109007deecb6cafa73b6df9360a2bd589ec7c2, rev=5660a4b09abce63ead7bf4eb98b236a6742f3e76311f2484fb9b0738ee3f88cd, next_point=02edec0a78b1390a3d7ea4daadf6893efa43b550cb6f11ae72d4a814c4a972d679) from 032808aefe118e2839914e2114c948e6acfc67120aa48354811a8792e0aec0f432@172.19.0.6:53770
2019-10-21 12:38:26.959 [DBG] PEER: Received CommitSig(chan_id=3918d9d451fccc282250508991109007deecb6cafa73b6df9360a2bd589ec7c2, num_htlcs=0) from 032808aefe118e2839914e2114c948e6acfc67120aa48354811a8792e0aec0f432@172.19.0.6:53770
2019-10-21 12:38:27.006 [DBG] PEER: Sending RevokeAndAck(chan_id=3918d9d451fccc282250508991109007deecb6cafa73b6df9360a2bd589ec7c2, rev=27efd66181ce395263b71da8536bb98e98f193be2c0870d7c1ff19b8d13e15b1, next_point=03dfe81d3a3dd4d72ce44ae0c5ee648ef2426f11603d2509efdfdc5a0dfbe9dbaa) to 032808aefe118e2839914e2114c948e6acfc67120aa48354811a8792e0aec0f432@172.19.0.6:53770
2019-10-21 12:38:34.334 [DBG] HSWC: Sent 0 satoshis and received 10000 satoshis in the last 10 seconds (0.200000 tx/sec)
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment