Closed gofman8 closed 1 month ago
some clarification, also tried to reproduce this issue with two nodes, this case should be easier to reproduce
Run Two Nodes
Issue 200 Assets on Node A /issueassetnia
Open Channel with Node B /openchannel
50 assets
Check Asset Balance
{
"settled": 200,
"future": 150,
"spendable": 0,
"offchain_outbound": 50,
"offchain_inbound": 0
}
{
"settled": 0,
"future": 0,
"spendable": 0,
"offchain_outbound": 0,
"offchain_inbound": 50
}
Create Invoice on Node B for 25 Assets /lninvoice
Pay the Invoice from Node A /sendpayment
The channel disappears after the payment. Here are the updated balances:
{
"channels": []
}
{
"settled": 150,
"future": 150,
"spendable": 150,
"offchain_outbound": 0,
"offchain_inbound": 0
}
{
"settled": 0,
"future": 0,
"spendable": 0,
"offchain_outbound": 0,
"offchain_inbound": 0
}
{
"payments": [
{
"amt_msat": 3000000,
"asset_amount": 25,
"asset_id": "rgb:Vhjv2DL-u2jGJ6uMU-3SxKf1QPv-igCpbD4Mt-VoR7CWtuK-TeTKgt",
"payment_hash": "a493ffba0fd3196e0d59ae6d6c7d627f21723c6f76ff8e520a712f39b32b2213",
"inbound": true,
"status": "Succeeded"
}
]
}
I think maybe the channels you opened have closed(Because the transaction between the state channels is finished), and then the transaction sent to the regtest network, so the status changed to Succeeded
, and the channels are disappeared.
I think maybe the channels you opened have closed(Because the transaction between the state channels is finished), and then the transaction sent to the regtest network, so the status changed to
Succeeded
, and the channels are disappeared.
Could you please explain this with more details? We are doing off-chain transaction only, I though the only way to close the channel it's to initiate channel closing by one on the counterparty. So it's happening by protocol design? where I can read about this?
@gofman8 @bandrivskiy We are trying to reproduce this with a test but the nodes are not behaving as you reported. Could you please provide the data directories of the nodes? Also, could you confirm you're doing this on a Linux machine and maybe provide more info on the system that's running this?
@zoedberg Issue has been resolved! Many thanks for your feedback, it was critical to identify the issue. The problem was because of docker specific, we launch RLN process with the following parameter: --ldk-peer-listening-port 9735 but actual port though which nodes connected was different: containerPort = 9735
but hostPort = min(65535, 9000 + tonumber(each.value))
. We believe because of this mismatch channels were force closed with the following LDK error: HTLCTimedOut
Now everything works as expected. Closed. Many thanks for your feedback!
Issue 2 : Channels disappearing
Preparing
Run nodes A,B,C
Run nodes A,B,C call
/init
&/unlock
for each node.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:On Node B and open channel to Node A and C (50 assets) -> channels successfully created and
/listchannels
returns 2 channel items/keysend 25 assets from Node B to Node A -> payment success
Node C calls
/lninvoice
(25 assets) Request:Response:
Node A sends the payment (/sendpayment)
Request:
Response:
Node Issues
After these steps, something went wrong:
Node B
/listchannels
returns/listpayments
node C
/listpayments
It seems no errors in logs just some warnings