Closed gofman8 closed 1 month ago
Thanks for finding and reporting this issue. We addressed this in https://github.com/RGB-Tools/rust-lightning/commit/30b9e301e0621b05abcd26af9d87bc36279c165a and https://github.com/RGB-Tools/rgb-lightning-node/commit/c309fbaecd891485b45b5c829ad12788ef269564.
Note that /sendpayment
will not fail, since the API doesn't wait for the payment to be completed. The API will create a new payment with status Pending
and after discovering there are no available routes the payment status will become Failed
.
Please let us know if the fix works for you.
Thanks for finding and reporting this issue. We addressed this in RGB-Tools/rust-lightning@30b9e30 and c309fba.
Note that
/sendpayment
will not fail, since the API doesn't wait for the payment to be completed. The API will create a new payment with statusPending
and after discovering there are no available routes the payment status will becomeFailed
.Please let us know if the fix works for you.
Many thanks for rapid response and fast fix! We just verified that bug was fully resolved and now this payment scenario works as expected!
During our work on RGB OS/Thunderstack Cloud we faced an issue with RLN API critical error. Below we're attaching exact steps to reproduce the issue. Next steps expects to have up and running and initialized a 3 nodes: A,B,C.
Send BTC to Nodes
Run the following command on your server:
Example:
then
do it for A, B, C
Node B:
1. Issue TUSD asset (200 tokens) (RGB on-chain API)
1.1 Create Asset
Call the
/createutxos
endpoint:Call the
/issueassetnia
endpoint with the following example body:rgb:2RCNGGK-SPo4jJYWx-uBR5XwQd4-mUAfzyten-gzxMLo1vG-7Ktxsxp
/assetbalance node B
2. Open channel with Node A with 50 tokens (Channels API)
/assetbalance balance Node B
after mine
/assetbalance balance Node A
3. Open channel with Node C with 50 tokens (Channels API)
/assetbalance balance Node B
after mine
/assetbalance balance Node C
4. Write down inbound/outbound liquidity state for A,B,C here:
5. Send 50 tokens to Node A (Payment API)
call /keysend on node B and sent 50 assets to Node A
call /assetbalance for node B
call /assetbalance for node A
6 Send Send 50 tokens to Node C (/keysend)
Node B
Node C
7. Write down inbound/outbound liquidity state for A,B,C here:
Payment Flow Test: Node A to Node C
8.1 Try to do /sendpayment from A to C (should fail)
Node C calls /lninvoice
Request:
Response:
Node A decodes the invoice
Request:
Node A sends the payment (/sendpayment)
Request:
Response:
Node B API Issues
After the above operations, some APIs on Node B stop working. For Nodes A and C, the following endpoints work:
Endpoint: /listchannels
Endpoint: /listassets and /assetbalance
Node logs