- Setting Up Three Lightning Network (LN) Nodes
- Funding LN Nodes
- Use Case 1: Payment Successful
- Use Case 2: Payment Failed - Multipart Payment (MPP) Timeout Error
- Importing Mission Control State
To set up 3 lightning nodes in the network using multipass
and scripting, follow these steps:
-
Clone Repository: Clone my repository Bootstrap-Lightning-Network.
-
Launch Nodes: Launch three Lightning Nodes named
Alice
,Bob
, andCarol
:multipass launch --name alice --cpus 1 --memory 1G 22.04 multipass launch --name bob --cpus 1 --memory 1G 22.04 multipass launch --name carol --cpus 1 --memory 1G 22.04
-
Install Dependencies: Install dependencies, Go, Bitcoin Core, and LND from the latest commit in the master branch:
multipass exec alice -- bash -c "curl -sSL https://raw.githubusercontent.com/mohamedawnallah/bootstrap-lightning-network/main/setup_ln | bash -s $BITCOIN_IP $LN_NODE_ALIAS" multipass exec bob -- bash -c "curl -sSL https://raw.githubusercontent.com/mohamedawnallah/bootstrap-lightning-network/main/setup_ln | bash -s $BITCOIN_IP $LN_NODE_ALIAS" multipass exec carol -- bash -c "curl -sSL https://raw.githubusercontent.com/mohamedawnallah/bootstrap-lightning-network/main/setup_ln | bash -s $BITCOIN_IP $LN_NODE_ALIAS"
This way, you can easily set up three Lightning Network nodes named Alice, Bob, and Carol using the provided script and multipass
.
To fund Lightning Network (LN) Nodes, follow these steps:
-
Create Bitcoin Wallet: Create a bitcoin-wallet using this command:
bitcoin-cli createwallet test
-
Generate Blocks: Generate at least 101 blocks for coinbase block maturity using this command:
bitcoin-cli -generate 150
-
Generate Pay to Witness Key Hash: Generate Pay to Witness Key Hash for each LN node using this command:
lncli newaddress p2wkh
-
Send Bitcoins: Send bitcoins to those addresses using this command:
bitcoin-cli sendtoaddress <your_lnwallet_address> <bitcoins>
-
Confirm Transactions: Mine at least one block after each send to be confirmed in the lnwallet using this command:
bitcoin-cli -generate 1
-
Ready for Payment Channels: Now we have enough bitcoins on each LN node to create multiple scenarios for creating payment channels.
By following these steps, you'll successfully fund the LN nodes and prepare them for setting up payment channels.
-
Create Payment Channel from Alice to Bob:
lncli openchannel --node_key <Bob's Identity Public Key> --connect <Bob's Node Ip Address>:9735 30000
Mine at least three blocks to confirm the funding tx marking the channel as open:
bitcoin-cli -generate 3
-
Create Payment Channel from Bob to Carol:
lncli openchannel --node_key <Carol's Identity Public Key> --connect <Carol's Node Ip Address>:9735 30000
Mine at least three blocks to confirm the funding tx marking the channel as open:
bitcoin-cli -generate 3
-
Generate Invoice from Carol:
lncli addinvoice 5000
Obtain payment request from the response:
{ "r_hash": "11f0370839dacb202b1f1a54190461cc9049910ad431d0d7ddd9ff7cd348d8dd", "payment_request": "lnbcrt50u1pnpkh0qpp5z8crwzpemt9jq2clrf2pjprpejgynyg26scap47am8lhe56gmrwsdqqcqzzsxqyz5vqsp5gmc6l8zaq5m273mn5qmd4tgkvc5hk88ssaq8q3h7anntm0w5gefq9qyysgqxeksdq3hs896hpg3ke0e3qafn9hks82mvkathez4lnrc40jwntez6qkgx3d4dpvrz5ydak4g0zwsanzr7qxxje8wvr3sc3dp2eams7spx65x6r", "add_index": "1", "payment_addr": "46f1af9c5d0536af4773a036daad1666297b1cf087407046feece6bdbdd44652" }
-
Pay Invoice from Alice:
lncli payinvoice lnbcrt50u1pnpkh0qpp5z8crwzpemt9jq2clrf2pjprpejgynyg26scap47am8lhe56gmrwsdqqcqzzsxqyz5vqsp5gmc6l8zaq5m273mn5qmd4tgkvc5hk88ssaq8q3h7anntm0w5gefq9qyysgqxeksdq3hs896hpg3ke0e3qafn9hks82mvkathez4lnrc40jwntez6qkgx3d4dpvrz5ydak4g0zwsanzr7qxxje8wvr3sc3dp2eams7spx65x6r
-
No Route Error after paying the invoice:
Payment hash: 11f0370839dacb202b1f1a54190461cc9049910ad431d0d7ddd9ff7cd348d8dd Description: Amount (in satoshis): 5000 Fee limit (in satoshis): 250 Destination: 029ab357867f95efd81d3cff3c043dcea8cb3f96db8f5754b1a4155a590f8d50f3 Confirm payment (yes/no): yes +------------+--------------+--------------+--------------+-----+----------+----------+-------+ | HTLC_STATE | ATTEMPT_TIME | RESOLVE_TIME | RECEIVER_AMT | FEE | TIMELOCK | CHAN_OUT | ROUTE | +------------+--------------+--------------+--------------+-----+----------+----------+-------+ +------------+--------------+--------------+--------------+-----+----------+----------+-------+ Amount + fee: 0 + 0 sat Payment hash: 11f0370839dacb202b1f1a54190461cc9049910ad431d0d7ddd9ff7cd348d8dd Payment status: FAILED, reason: FAILURE_REASON_NO_ROUTE [lncli] FAILED
-
Specify Outgoing Channel ID:
Okay, So we should specify the first hop channel id in our case the outgoing channel id with
Bob
. We could get this usinglncli listchannels
command and search for the corresponding channel id in our case it would be169324790743040
. -
Repeat Payment:
Pay the invoice again, ensuring the outgoing channel ID is specified.
lncli payinvoice --outgoing_chan_id 169324790743040 lnbcrt50u1pnpkh0qpp5z8crwzpemt9jq2clrf2pjprpejgynyg26scap47am8lhe56gmrwsdqqcqzzsxqyz5vqsp5gmc6l8zaq5m273mn5qmd4tgkvc5hk88ssaq8q3h7anntm0w5gefq9qyysgqxeksdq3hs896hpg3ke0e3qafn9hks82mvkathez4lnrc40jwntez6qkgx3d4dpvrz5ydak4g0zwsanzr7qxxje8wvr3sc3dp2eams7spx65x6r
-
Successful Payment:
Now our payment went through returning back this response:
Payment hash: 11f0370839dacb202b1f1a54190461cc9049910ad431d0d7ddd9ff7cd348d8dd Description: Amount (in satoshis): 5000 Fee limit (in satoshis): 250 Destination: 029ab357867f95efd81d3cff3c043dcea8cb3f96db8f5754b1a4155a590f8d50f3 Confirm payment (yes/no): yes +------------+--------------+--------------+--------------+-------+----------+-----------------+------------+ | HTLC_STATE | ATTEMPT_TIME | RESOLVE_TIME | RECEIVER_AMT | FEE | TIMELOCK | CHAN_OUT | ROUTE | +------------+--------------+--------------+--------------+-------+----------+-----------------+------------+ | SUCCEEDED | 0.075 | 0.592 | 5000 | 1.005 | 332 | 169324790743040 | bob->carol | +------------+--------------+--------------+--------------+-------+----------+-----------------+------------+ Amount + fee: 5000 + 1.005 sat Payment hash: 11f0370839dacb202b1f1a54190461cc9049910ad431d0d7ddd9ff7cd348d8dd Payment status: SUCCEEDED, preimage: 22e998c44efc6704fba9575d03cd6549eae43b87aa72bdb4c3edc03857e9ea48
-
Report Payment Status to Mission Control:
After we get payment result back we report the payment state to the mission control store (bolt db) and it updates the mission control persistent storage and its in-memory state.
-
Query Mission Control:
Run
lncli querymc
in theAlice
sender node to check updated mission control data:{ "pairs": [ { "node_from": "02c60c3aea280fe7b161ba08722206a3fc6895fa4fb8c07ff68985a4bccb4992a4", "node_to": "03dbd084631519fcaccfd3a72cad4a65f42d808b86b7e362629aa221d097cb0f71", "history": { "fail_time": "0", "fail_amt_sat": "0", "fail_amt_msat": "0", "success_time": "1713070997", "success_amt_sat": "5001", "success_amt_msat": "5001005" } }, { "node_from": "03dbd084631519fcaccfd3a72cad4a65f42d808b86b7e362629aa221d097cb0f71", "node_to": "029ab357867f95efd81d3cff3c043dcea8cb3f96db8f5754b1a4155a590f8d50f3", "history": { "fail_time": "0", "fail_amt_sat": "0", "fail_amt_msat": "0", "success_time": "1713070997", "success_amt_sat": "5000", "success_amt_msat": "5000000" } } ] }
-
Decoding Mission Query Response:
a. The response we get is of type
PairHistory
.b. There are two pair histories: one for the payment from
Alice
(source vertex) toBob
, and the second for the payment fromBob
toCarol
(target_vertex).c. Notice that there are two HTLCs here: one between
Alice
andBob
, and the other betweenBob
andCarol
. They must be fulfilled atomically—either all succeed or all fail, with no partial success. In our case, all succeeded.d. Additionally, note that the
success_amt_sat
in the first pair history betweenAlice
andBob
is5001
, not5000
as specified in the payment invoice byCarol
. This difference is due to the configured routing fee forBob
, which is 1 satoshi, acting as an incentive to forward the payment. -
Repeat Invoice Creation:
Generate another invoice from Carol with a different amount 5200 sats to figure out if
success_amt_sat
gets updated with the recent value i.e temporal locality or the new value must be greater than the currentsuccess_amt_sat
value.lncli addinvoice 5200
Obtain payment request from the response:
{ "r_hash": "241d2438dafc3baedf940b13d994cc4763f25ffb308ae6ef2c4d9f4b34b2f23d", "payment_request": "lnbcrt52u1pnpkugtpp5yswjgwx6lsa6ahu5pvfan9xvga3lyhlmxz9wdmevfk05kd9j7g7sdqqcqzzsxqyz5vqsp57xea7ydkrulzq9c35q5t5lapwd74qduhw243e7jlm0626g58u7rq9qyysgqvpvknjelaqytuk9awf2kyvr66m5fzycpy9n83t5kuatfvxwj96xrz3l43vxzqafglw0mvryu692rejdhf329rcc343hcp2fyujgr79sqvr0f88", "add_index": "4", "payment_addr": "f1b3df11b61f3e201711a028ba7fa1737d50379772ab1cfa5fdbf4ad2287e786" }
-
Pay the new invoice:
Pay the invoice again without the outgoing channel id since the route is already persisted:
lncli payinvoice lnbcrt52u1pnpkugtpp5yswjgwx6lsa6ahu5pvfan9xvga3lyhlmxz9wdmevfk05kd9j7g7sdqqcqzzsxqyz5vqsp57xea7ydkrulzq9c35q5t5lapwd74qduhw243e7jlm0626g58u7rq9qyysgqvpvknjelaqytuk9awf2kyvr66m5fzycpy9n83t5kuatfvxwj96xrz3l43vxzqafglw0mvryu692rejdhf329rcc343hcp2fyujgr79sqvr0f88
-
Successful Payment:
Now our payment went through returning back this response:
Payment hash: 241d2438dafc3baedf940b13d994cc4763f25ffb308ae6ef2c4d9f4b34b2f23d Description: Amount (in satoshis): 5200 Fee limit (in satoshis): 260 Destination: 029ab357867f95efd81d3cff3c043dcea8cb3f96db8f5754b1a4155a590f8d50f3 Confirm payment (yes/no): yes +------------+--------------+--------------+--------------+-------+----------+-----------------+------------+ | HTLC_STATE | ATTEMPT_TIME | RESOLVE_TIME | RECEIVER_AMT | FEE | TIMELOCK | CHAN_OUT | ROUTE | +------------+--------------+--------------+--------------+-------+----------+-----------------+------------+ | SUCCEEDED | 0.202 | 1.825 | 5200 | 1.005 | 332 | 169324790743040 | bob->carol | +------------+--------------+--------------+--------------+-------+----------+-----------------+------------+ Amount + fee: 5200 + 1.005 sat Payment hash: 241d2438dafc3baedf940b13d994cc4763f25ffb308ae6ef2c4d9f4b34b2f23d Payment status: SUCCEEDED, preimage: 49afed7761e183e7da2eed03cf3e842c585adae7d9e9b8a306267efdb6fee880
-
Report Payment Status to Mission Control:
After we get payment result back we report the payment state to the mission control store and updates its in-memory state like the previous example.
-
Query Mission Control:
Run
lncli querymc
in theAlice
sender node to check updated mission control data:{ "pairs": [ { "node_from": "02c60c3aea280fe7b161ba08722206a3fc6895fa4fb8c07ff68985a4bccb4992a4", "node_to": "03dbd084631519fcaccfd3a72cad4a65f42d808b86b7e362629aa221d097cb0f71", "history": { "fail_time": "0", "fail_amt_sat": "0", "fail_amt_msat": "0", "success_time": "1713074461", "success_amt_sat": "5201", "success_amt_msat": "5201005" } }, { "node_from": "03dbd084631519fcaccfd3a72cad4a65f42d808b86b7e362629aa221d097cb0f71", "node_to": "029ab357867f95efd81d3cff3c043dcea8cb3f96db8f5754b1a4155a590f8d50f3", "history": { "fail_time": "0", "fail_amt_sat": "0", "fail_amt_msat": "0", "success_time": "1713074461", "success_amt_sat": "5200", "success_amt_msat": "5200000" } } ] }
-
Decoding Mission Query Response:
a. Observing Success Amount Satoshis: - We receive the highest
success_amt_sat
, not necessarily the most recent one. This observation is particularly relevant in cases of a Bimodal Statistical Distribution, where two local maximums (peaks) may occur.b. Documentation and Changes: - The highest value for the
success_amt_sat
field, along with its recent changes, is documented in the router.proto PairData message. -
Explore Route Probabilities:
Query routes to Carol with different payment amounts to observe how success probabilities vary.
lncli queryroutes --use_mc 029ab357867f95efd81d3cff3c043dcea8cb3f96db8f5754b1a4155a590f8d50f3 5200
We get response like this:
{ "routes": [ { "total_time_lock": 329, "total_fees": "1", "total_amt": "5201", "hops": [ { "chan_id": "169324790743040", "chan_capacity": "30000", "amt_to_forward": "5200", "fee": "1", "expiry": 249, "amt_to_forward_msat": "5200000", "fee_msat": "1005", "pub_key": "03dbd084631519fcaccfd3a72cad4a65f42d808b86b7e362629aa221d097cb0f71", "tlv_payload": true, "mpp_record": null, "amp_record": null, "custom_records": {}, "metadata": "", "blinding_point": "", "encrypted_data": "", "total_amt_msat": "0" }, { "chan_id": "172623325626368", "chan_capacity": "30000", "amt_to_forward": "5200", "fee": "0", "expiry": 249, "amt_to_forward_msat": "5200000", "fee_msat": "0", "pub_key": "029ab357867f95efd81d3cff3c043dcea8cb3f96db8f5754b1a4155a590f8d50f3", "tlv_payload": true, "mpp_record": null, "amp_record": null, "custom_records": {}, "metadata": "", "blinding_point": "", "encrypted_data": "", "total_amt_msat": "0" } ], "total_fees_msat": "1005", "total_amt_msat": "5201005" } ], "success_prob": 0.9025 }
Here's the restructured and simplified version:
-
Decoding Routing Possibilities:
a. Total Time Lock: -
total_time_lock
represents the cumulative (final) time lock across the entire route until all HTLCs are settled from the destination to the source.b. Total Fees and Hops: -
total_fees
is one satoshi, which is the routing fee advertised by Bob. - Thehops
include the first hop, which is the payment channel between Alice and Bob, and the second hop, which is the payment channel between Bob and Carol.c. Success Probability: -
success_prob
represents the probability of routing 5200 satoshis to Carol through Bob, based on previous history data. - Note: The probability is high in this case because the maximum payment amount we have is already 5200 satoshis, and anything less than or equal to 5200 would yield similar probabilities. -
Explore Route Probabilities with Different Payment Amount:
Query routes to Carol with payment amount greater than 5200 sats to observe how success probabilities vary.
lncli queryroutes --use_mc 029ab357867f95efd81d3cff3c043dcea8cb3f96db8f5754b1a4155a590f8d50f3 5300
We get response like this:
{ "routes": [ { "total_time_lock": 329, "total_fees": "1", "total_amt": "5301", "hops": [ { "chan_id": "169324790743040", "chan_capacity": "30000", "amt_to_forward": "5300", "fee": "1", "expiry": 249, "amt_to_forward_msat": "5300000", "fee_msat": "1005", "pub_key": "03dbd084631519fcaccfd3a72cad4a65f42d808b86b7e362629aa221d097cb0f71", "tlv_payload": true, "mpp_record": null, "amp_record": null, "custom_records": {}, "metadata": "", "blinding_point": "", "encrypted_data": "", "total_amt_msat": "0" }, { "chan_id": "172623325626368", "chan_capacity": "30000", "amt_to_forward": "5300", "fee": "0", "expiry": 249, "amt_to_forward_msat": "5300000", "fee_msat": "0", "pub_key": "029ab357867f95efd81d3cff3c043dcea8cb3f96db8f5754b1a4155a590f8d50f3", "tlv_payload": true, "mpp_record": null, "amp_record": null, "custom_records": {}, "metadata": "", "blinding_point": "", "encrypted_data": "", "total_amt_msat": "0" } ], "total_fees_msat": "1005", "total_amt_msat": "5301005" } ], "success_prob": 0.5699999999999985 }
-
Decoding Routing Possibilities:
a. Impact of Payment Amount on Success Probability: - The success probability of a payment significantly decreases when querying a route for a payment with an amount greater than 520 satoshis.
b. Analysis of Failure Data in Mission Control: - When querying the mission control data, the fields related to payment failure are not set because our payment was successful. - However, to understand the effect of failure on the data fields, let's attempt to fail one of the HTLCs in the route and examine the values of those fields:
"fail_time": "0", "fail_amt_sat": "0", "fail_amt_msat": "0",
-
Create Payment Channel from Alice to Bob:
lncli openchannel --node_key <Bob's Identity Public Key> --connect <Bob's Node Ip Address>:9735 60000
Mine at least three blocks to confirm the funding tx marking the channel as open:
bitcoin-cli -generate 3
-
Create Payment Channel from Bob to Carol:
lncli openchannel --node_key <Carol's Identity Public Key> --connect <Carol's Node Ip Address>:9735 40000
Mine at least three blocks to confirm the funding tx marking the channel as open:
bitcoin-cli -generate 3
-
Generate Invoice from Carol:
lncli addinvoice 50000
Obtain payment request from the response:
{ "r_hash": "fdb67053597cf8bfd66e5a3e28a41d7805adb4eeb86118ac68437f23eb38331b", "payment_request": "lnbcrt500u1pnphymapp5lkm8q56e0nutl4nwtglz3fqa0qz6md8whps33trggdlj86ecxvdsdqqcqzzsxqyz5vqsp5yq5xcl6nvr8g0umsgvpqq66uc92dgm75lfp3h23tg7984ayvu8xq9qyysgq0l5mznrce7xfgahq8raw0yg73vl6ekvz63x0a7muawvm858zyu887gpn6j83wxpq2gf5al3802u2eff7w4zy8k0rzpngdpw6wlhpdvspqqr6g0", "add_index": "8", "payment_addr": "20286c7f5360ce87f3704302006b5cc154d46fd4fa431baa2b478a7af48ce1cc" }
-
Pay Invoice from Alice:
lncli payinvoice lnbcrt500u1pnphymapp5lkm8q56e0nutl4nwtglz3fqa0qz6md8whps33trggdlj86ecxvdsdqqcqzzsxqyz5vqsp5yq5xcl6nvr8g0umsgvpqq66uc92dgm75lfp3h23tg7984ayvu8xq9qyysgq0l5mznrce7xfgahq8raw0yg73vl6ekvz63x0a7muawvm858zyu887gpn6j83wxpq2gf5al3802u2eff7w4zy8k0rzpngdpw6wlhpdvspqqr6g0
-
No Route Error after paying the invoice:
Payment hash: fdb67053597cf8bfd66e5a3e28a41d7805adb4eeb86118ac68437f23eb38331b Description: Amount (in satoshis): 50000 Fee limit (in satoshis): 2500 Destination: 029ab357867f95efd81d3cff3c043dcea8cb3f96db8f5754b1a4155a590f8d50f3 Confirm payment (yes/no): yes +-------------------------------------+--------------+--------------+--------------+-------+----------+-----------------+------------+ | HTLC_STATE | ATTEMPT_TIME | RESOLVE_TIME | RECEIVER_AMT | FEE | TIMELOCK | CHAN_OUT | ROUTE | +-------------------------------------+--------------+--------------+--------------+-------+----------+-----------------+------------+ +-------------------------------------+--------------+--------------+--------------+-------+----------+-----------------+------------+ | HTLC_STATE | ATTEMPT_TIME | RESOLVE_TIME | RECEIVER_AMT | FEE | TIMELOCK | CHAN_OUT | ROUTE | +-------------------------------------+--------------+--------------+--------------+-------+----------+-----------------+------------+ | IN_FLIGHT | 0.462 | - | 25000 | 1.025 | 343 | 188016488415232 | bob->carol +-------------------------------------+--------------+--------------+--------------+-------+----------+-----------------+------------+ | HTLC_STATE | ATTEMPT_TIME | RESOLVE_TIME | RECEIVER_AMT | FEE | TIMELOCK | CHAN_OUT | ROUTE | +-------------------------------------+--------------+--------------+--------------+-------+----------+-----------------+------------+ | IN_FLIGHT | 0.462 | - | 25000 | 1.025 | 343 | 188016488415232 | bob->carol +-------------------------------------+--------------+--------------+--------------+-------+----------+-----------------+------------+ | HTLC_STATE | ATTEMPT_TIME | RESOLVE_TIME | RECEIVER_AMT | FEE | TIMELOCK | CHAN_OUT | ROUTE | +-------------------------------------+--------------+--------------+--------------+-------+----------+-----------------+------------+ | MPP_TIMEOUT @ 2nd hop | 0.462 | 121.467 | 25000 | 1.025 | 343 | 188016488415232 | bob->carol | | TEMPORARY_CHANNEL_FAILURE @ 1st hop | 0.584 | 1.065 | 25000 | 1.025 | 343 | 188016488415232 | bob->carol | | TEMPORARY_CHANNEL_FAILURE @ 1st hop | 1.181 | 1.550 | 12500 | 1.012 | 343 | 188016488415232 | bob->carol | +-------------------------------------+--------------+--------------+--------------+-------+----------+-----------------+------------+ Amount + fee: 0 + 0 sat Payment hash: fdb67053597cf8bfd66e5a3e28a41d7805adb4eeb86118ac68437f23eb38331b Payment status: FAILED, reason: FAILURE_REASON_NO_ROUTE [lncli] FAILED
-
Decoding No Route Error after Payment:
a. The payment failed due to a capacity bottleneck in the payment channel between
Bob
andCarol
, which has a capacity of 40,000 sats, smaller than the invoice amount of 50,000 sats fromCarol
.b.
lnd
attempted multipart payments to overcome this limitation. It divided the payment into two parts: 25,000 sats routed through the Alice-Carol channel and another 25,000 sats routed through the Bob-Carol channel.c. However, the multipart payment failed with a timeout error on the second payment channel between
Bob
andCarol
. -
Report Payment Status to Mission Control:
After we get payment result back we report the payment state to the mission control store and updates its in-memory state like the previous examples.
-
Query Mission Control:
Run
lncli querymc
in theAlice
sender node to check updated mission control data after the failed payment:{ "pairs": [ { "node_from": "02c60c3aea280fe7b161ba08722206a3fc6895fa4fb8c07ff68985a4bccb4992a4", "node_to": "03dbd084631519fcaccfd3a72cad4a65f42d808b86b7e362629aa221d097cb0f71", "history": { "fail_time": "0", "fail_amt_sat": "0", "fail_amt_msat": "0", "success_time": "1713083397", "success_amt_sat": "25001", "success_amt_msat": "25001025" } }, { "node_from": "03dbd084631519fcaccfd3a72cad4a65f42d808b86b7e362629aa221d097cb0f71", "node_to": "029ab357867f95efd81d3cff3c043dcea8cb3f96db8f5754b1a4155a590f8d50f3", "history": { "fail_time": "1713083277", "fail_amt_sat": "25000", "fail_amt_msat": "25000001", "success_time": "1713083397", "success_amt_sat": "25000", "success_amt_msat": "25000000" } } ] }
-
Decoding Mission Query Response:
a. In the route from
Alice
toBob
, all HTLCs succeeded due to the sufficient payment channel capacity. Thefail_time
,fail_amt_sat
, andfail_amt_msat
fields remain zero. Thesuccess_amt_sat
is updated to 25,000 sats, the peak value reached.b. Conversely, in the route from
Bob
toCarol
, the multipart payment timed out due to insufficient channel capacity to route the full payment fromCarol
. Consequently, thefail_time
andfail_amt_sat
are updated to reflect the failure, with thesuccess_amt_sat
reaching its peak at 25,000 sats.
Importing Mission Control State Feature was implemented in this PR routing: add mission control import rpc.
Cold Cache: When the cache is empty or has irrelevant data, so that CPU needs to do a slower read from main memory for your program data requirement. Operating with a cold cache can result in suboptimal routing decisions and potentially longer pathfinding times because the system needs to rebuild its memory of past routing decisions and channel performance metrics. This rebuilding process can take time and may lead to timeouts during pathfinding attempts, particularly if users have strict time limits for their operations. Example wallets are Blixt
.
Hot cache: When the cache contains relevant data, and all the reads for your program are satisfied from the cache itself. It is used in Lightning Network to reduce the search space since we avoid channels with failed payments or in effective routes for example.
We could import the mission control state to in-memory intenral repsentation (yet) using the following command:
lncli importc [source node] [dest node] [unix ts seconds] [amount in msat]