Created
September 13, 2018 16:49
-
-
Save yuntai/9ddc6349df50fcb63c4f4a4dbf5f9484 to your computer and use it in GitHub Desktop.
rust-lightning htlc transcript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
============================================================== | |
create chanel node1 <=> node2 | |
============================================================== | |
node1.create_channel() | |
node1 !SendOpenChannel | |
node1 => node2 msgs::open_channel | |
node2 => node1 msgs::accept_channel | |
node1 !FundingGenerationReady | |
------------------------------------------------------------------- | |
node1 peer(node2) | |
node2(remote) commit #281474976710655 | |
value_to_self(10001) value_to_remote(99806827) total_fee(183172) #htlc(0) | |
HTLC total amt local(0) remote(0) | |
channel(100000000) reserve(1000000) | |
pending HTLC inbound(0) outbound(0) | |
Message(3e5db6361b3502f0a9b01f85322ca62d08d490be4e4210c78e302e0f5c82b6bb) | |
------------------------------------------------------------------- | |
node1 !SendFundingCreated | |
node1 => node2 msgs::funding_created | |
------------------------------------------------------------------- | |
node2 peer(node1) | |
node2(local) commit #281474976710655 | |
value_to_self(10001) value_to_remote(99806827) total_fee(183172) #htlc(0) | |
HTLC total amt local(0) remote(0) | |
channel(100000000) reserve(1000000) | |
pending HTLC inbound(0) outbound(0) | |
Message(3e5db6361b3502f0a9b01f85322ca62d08d490be4e4210c78e302e0f5c82b6bb) | |
------------------------------------------------------------------- | |
------------------------------------------------------------------- | |
node2 peer(node1) | |
node1(remote) commit #281474976710655 | |
value_to_self(99806827) value_to_remote(10001) total_fee(183172) #htlc(0) | |
HTLC total amt local(0) remote(0) | |
channel(100000000) reserve(1000000) | |
pending HTLC inbound(0) outbound(0) | |
Message(391e86c2cf56585095e93637b18ccd1560b72b50cd0beee9d92fd8319adb08f7) | |
------------------------------------------------------------------- | |
node2 => node1 msgs::funding_signed | |
------------------------------------------------------------------- | |
node1 peer(node2) | |
node1(local) commit #281474976710655 | |
value_to_self(99806827) value_to_remote(10001) total_fee(183172) #htlc(0) | |
HTLC total amt local(0) remote(0) | |
channel(100000000) reserve(1000000) | |
pending HTLC inbound(0) outbound(0) | |
Message(391e86c2cf56585095e93637b18ccd1560b72b50cd0beee9d92fd8319adb08f7) | |
------------------------------------------------------------------- | |
node1 => node2 msgs::funding_locked | |
node2 => node1 msgs::funding_locked | |
============================================================== | |
create chanel node2 <=> node3 | |
============================================================== | |
node2.create_channel() | |
node2 !SendOpenChannel | |
node2 => node3 msgs::open_channel | |
node3 => node2 msgs::accept_channel | |
node2 !FundingGenerationReady | |
------------------------------------------------------------------- | |
node2 peer(node3) | |
node3(remote) commit #281474976710655 | |
value_to_self(10001) value_to_remote(99806827) total_fee(183172) #htlc(0) | |
HTLC total amt local(0) remote(0) | |
channel(100000000) reserve(1000000) | |
pending HTLC inbound(0) outbound(0) | |
Message(7b9030869637190ee8ab35b740cde5e5dd1a865e3cc33316eaaf4561847598ac) | |
------------------------------------------------------------------- | |
node2 !SendFundingCreated | |
node2 => node3 msgs::funding_created | |
------------------------------------------------------------------- | |
node3 peer(node2) | |
node3(local) commit #281474976710655 | |
value_to_self(10001) value_to_remote(99806827) total_fee(183172) #htlc(0) | |
HTLC total amt local(0) remote(0) | |
channel(100000000) reserve(1000000) | |
pending HTLC inbound(0) outbound(0) | |
Message(7b9030869637190ee8ab35b740cde5e5dd1a865e3cc33316eaaf4561847598ac) | |
------------------------------------------------------------------- | |
------------------------------------------------------------------- | |
node3 peer(node2) | |
node2(remote) commit #281474976710655 | |
value_to_self(99806827) value_to_remote(10001) total_fee(183172) #htlc(0) | |
HTLC total amt local(0) remote(0) | |
channel(100000000) reserve(1000000) | |
pending HTLC inbound(0) outbound(0) | |
Message(05ecc36577dc2c1529a1d532909ee78cb985e695326ffa9c17db0c91fd113b61) | |
------------------------------------------------------------------- | |
node3 => node2 msgs::funding_signed | |
------------------------------------------------------------------- | |
node2 peer(node3) | |
node2(local) commit #281474976710655 | |
value_to_self(99806827) value_to_remote(10001) total_fee(183172) #htlc(0) | |
HTLC total amt local(0) remote(0) | |
channel(100000000) reserve(1000000) | |
pending HTLC inbound(0) outbound(0) | |
Message(05ecc36577dc2c1529a1d532909ee78cb985e695326ffa9c17db0c91fd113b61) | |
------------------------------------------------------------------- | |
node2 => node3 msgs::funding_locked | |
node3 => node2 msgs::funding_locked | |
============ ROUTE PAYMENT =============== | |
TRACE [lightning::ln::router : src/ln/router.rs, 692] Got route: node_id: node2, short_channel_id: 1099511627776, fee_msat: 239, cltv_expiry_delta: 288 | |
node_id: node3, short_channel_id: 1099511693312, fee_msat: 8000000, cltv_expiry_delta: 32 | |
node1.send_payment() | |
------------------------------------------------------------------- | |
node1 peer(node2) | |
node2(remote) commit #281474976710654 | |
value_to_self(10001) value_to_remote(91763072) total_fee(226688) #htlc(1) | |
HTLC offered(false) amount_msat(8000239) | |
HTLC total amt local(8000239) remote(0) | |
channel(100000000) reserve(1000000) | |
pending HTLC inbound(0) outbound(8000239) | |
Message(75bab397e6369540dcec0a22c53ddbac33b0416eb6d9719bbf2f5ade7ea01b85) | |
------------------------------------------------------------------- | |
node1 !SendEvent | |
node1 => node2 msgs::update_add_htlc | |
node1 => node2 msgs::commitment_signed | |
------------------------------------------------------------------- | |
node2 peer(node1) | |
node2(local) commit #281474976710654 | |
value_to_self(10001) value_to_remote(91763072) total_fee(226688) #htlc(1) | |
HTLC offered(false) amount_msat(8000239) | |
HTLC total amt local(0) remote(8000239) | |
channel(100000000) reserve(1000000) | |
pending HTLC inbound(8000239) outbound(0) | |
Message(75bab397e6369540dcec0a22c53ddbac33b0416eb6d9719bbf2f5ade7ea01b85) | |
------------------------------------------------------------------- | |
------------------------------------------------------------------- | |
node2 peer(node1) | |
node1(remote) commit #281474976710654 | |
value_to_self(91763072) value_to_remote(10001) total_fee(226688) #htlc(1) | |
HTLC offered(true) amount_msat(8000239) | |
HTLC total amt local(0) remote(8000239) | |
channel(100000000) reserve(1000000) | |
pending HTLC inbound(8000239) outbound(0) | |
Message(22f6a4349dff707db989f1494e0e26d63bcf99f59136cd6d978083c6f6e21275) | |
------------------------------------------------------------------- | |
node2 => node1 msgs::revoke_and_ack | |
node2 => node1 msgs::commitment_signed | |
------------------------------------------------------------------- | |
node1 peer(node2) | |
node1(local) commit #281474976710654 | |
value_to_self(91763072) value_to_remote(10001) total_fee(226688) #htlc(1) | |
HTLC offered(true) amount_msat(8000239) | |
HTLC total amt local(8000239) remote(0) | |
channel(100000000) reserve(1000000) | |
pending HTLC inbound(0) outbound(8000239) | |
Message(22f6a4349dff707db989f1494e0e26d63bcf99f59136cd6d978083c6f6e21275) | |
------------------------------------------------------------------- | |
node1 => node2 msgs::revoke_and_ack | |
node2 !PendingHTLCsForwardable | |
------------------------------------------------------------------- | |
node2 peer(node3) | |
node3(remote) commit #281474976710654 | |
value_to_self(10001) value_to_remote(91763311) total_fee(226688) #htlc(1) | |
HTLC offered(false) amount_msat(8000000) | |
HTLC total amt local(8000000) remote(0) | |
channel(100000000) reserve(1000000) | |
pending HTLC inbound(0) outbound(8000000) | |
Message(c0577e1d8792175c73c1f72eb4cfb95a46ccdd8716a98420528b34361e1c2586) | |
------------------------------------------------------------------- | |
node2 !SendEvent | |
node2 => node3 msgs::update_add_htlc | |
node2 => node3 msgs::commitment_signed | |
------------------------------------------------------------------- | |
node3 peer(node2) | |
node3(local) commit #281474976710654 | |
value_to_self(10001) value_to_remote(91763311) total_fee(226688) #htlc(1) | |
HTLC offered(false) amount_msat(8000000) | |
HTLC total amt local(0) remote(8000000) | |
channel(100000000) reserve(1000000) | |
pending HTLC inbound(8000000) outbound(0) | |
Message(c0577e1d8792175c73c1f72eb4cfb95a46ccdd8716a98420528b34361e1c2586) | |
------------------------------------------------------------------- | |
------------------------------------------------------------------- | |
node3 peer(node2) | |
node2(remote) commit #281474976710654 | |
value_to_self(91763311) value_to_remote(10001) total_fee(226688) #htlc(1) | |
HTLC offered(true) amount_msat(8000000) | |
HTLC total amt local(0) remote(8000000) | |
channel(100000000) reserve(1000000) | |
pending HTLC inbound(8000000) outbound(0) | |
Message(50845b6b323de0f5aed936547b908a73c22f50b6f10b896ac1a37b9f5b84d6cd) | |
------------------------------------------------------------------- | |
node3 => node2 msgs::revoke_and_ack | |
node3 => node2 msgs::commitment_signed | |
------------------------------------------------------------------- | |
node2 peer(node3) | |
node2(local) commit #281474976710654 | |
value_to_self(91763311) value_to_remote(10001) total_fee(226688) #htlc(1) | |
HTLC offered(true) amount_msat(8000000) | |
HTLC total amt local(8000000) remote(0) | |
channel(100000000) reserve(1000000) | |
pending HTLC inbound(0) outbound(8000000) | |
Message(50845b6b323de0f5aed936547b908a73c22f50b6f10b896ac1a37b9f5b84d6cd) | |
------------------------------------------------------------------- | |
node2 => node3 msgs::revoke_and_ack | |
node3 !PendingHTLCsForwardable | |
node3 !PaymentReceived | |
============ CLAIM PAYMENT =============== | |
node3.claim_funds() | |
------------------------------------------------------------------- | |
node3 peer(node2) | |
node2(remote) commit #281474976710653 | |
value_to_self(91806827) value_to_remote(8010001) total_fee(183172) #htlc(0) | |
HTLC total amt local(0) remote(0) | |
channel(100000000) reserve(1000000) | |
pending HTLC inbound(8000000) outbound(0) | |
Message(b2f1a8e670b4d7d67bf1005cf97a843ff8aca7fd96f4dde4bd766fbdb6f80f78) | |
------------------------------------------------------------------- | |
node3 !UpdateHTLCs | |
node3 => node2 msgs::update_fulfill_htlc | |
------------------------------------------------------------------- | |
node2 peer(node1) | |
node1(remote) commit #281474976710653 | |
value_to_self(91806588) value_to_remote(8010240) total_fee(183172) #htlc(0) | |
HTLC total amt local(0) remote(0) | |
channel(100000000) reserve(1000000) | |
pending HTLC inbound(8000239) outbound(0) | |
Message(fb0435d4ae8b8076022341f382270708fa78e70fffe20cfc60a752f942f118aa) | |
------------------------------------------------------------------- | |
node3 => node2 msgs::commitment_signed | |
------------------------------------------------------------------- | |
node2 peer(node3) | |
node2(local) commit #281474976710653 | |
value_to_self(91806827) value_to_remote(8010001) total_fee(183172) #htlc(0) | |
HTLC total amt local(0) remote(0) | |
channel(100000000) reserve(1000000) | |
pending HTLC inbound(0) outbound(8000000) | |
Message(b2f1a8e670b4d7d67bf1005cf97a843ff8aca7fd96f4dde4bd766fbdb6f80f78) | |
------------------------------------------------------------------- | |
------------------------------------------------------------------- | |
node2 peer(node3) | |
node3(remote) commit #281474976710653 | |
value_to_self(8010001) value_to_remote(91806827) total_fee(183172) #htlc(0) | |
HTLC total amt local(0) remote(0) | |
channel(100000000) reserve(1000000) | |
pending HTLC inbound(0) outbound(8000000) | |
Message(2bc80f2a6525bb1f086fba869a54fe5f44b88538b2d412e0d749ae737efe75c5) | |
------------------------------------------------------------------- | |
node2 => node3 msgs::revoke_and_ack | |
node2 => node3 msgs::commitment_signed | |
------------------------------------------------------------------- | |
node3 peer(node2) | |
node3(local) commit #281474976710653 | |
value_to_self(8010001) value_to_remote(91806827) total_fee(183172) #htlc(0) | |
HTLC total amt local(0) remote(0) | |
channel(100000000) reserve(1000000) | |
pending HTLC inbound(0) outbound(0) | |
Message(2bc80f2a6525bb1f086fba869a54fe5f44b88538b2d412e0d749ae737efe75c5) | |
------------------------------------------------------------------- | |
node3 => node2 msgs::revoke_and_ack | |
node2 !UpdateHTLCs | |
node2 => node1 msgs::update_fulfill_htlc | |
node2 => node1 msgs::commitment_signed | |
------------------------------------------------------------------- | |
node1 peer(node2) | |
node1(local) commit #281474976710653 | |
value_to_self(91806588) value_to_remote(8010240) total_fee(183172) #htlc(0) | |
HTLC total amt local(0) remote(0) | |
channel(100000000) reserve(1000000) | |
pending HTLC inbound(0) outbound(8000239) | |
Message(fb0435d4ae8b8076022341f382270708fa78e70fffe20cfc60a752f942f118aa) | |
------------------------------------------------------------------- | |
------------------------------------------------------------------- | |
node1 peer(node2) | |
node2(remote) commit #281474976710653 | |
value_to_self(8010240) value_to_remote(91806588) total_fee(183172) #htlc(0) | |
HTLC total amt local(0) remote(0) | |
channel(100000000) reserve(1000000) | |
pending HTLC inbound(0) outbound(8000239) | |
Message(ef15b0c580f479595df6fa0ac1a9133243a44c2fad455000f52e44fa5c1d3235) | |
------------------------------------------------------------------- | |
node1 => node2 msgs::revoke_and_ack | |
node1 => node2 msgs::commitment_signed | |
------------------------------------------------------------------- | |
node2 peer(node1) | |
node2(local) commit #281474976710653 | |
value_to_self(8010240) value_to_remote(91806588) total_fee(183172) #htlc(0) | |
HTLC total amt local(0) remote(0) | |
channel(100000000) reserve(1000000) | |
pending HTLC inbound(0) outbound(0) | |
Message(ef15b0c580f479595df6fa0ac1a9133243a44c2fad455000f52e44fa5c1d3235) | |
------------------------------------------------------------------- | |
node2 => node1 msgs::revoke_and_ack | |
node1 !PaymentSent |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment