lightninglabs / taproot-assets

A layer 1 daemon, for the Taproot Assets Protocol specification, written in Go (golang)
MIT License
464 stars 111 forks source link

[bug]: FundChannel Ack Timeout Issue #1038

Closed vanditshah99 closed 3 months ago

vanditshah99 commented 3 months ago

We tried the following scenario

We minted an asset on Tapd Standalone Instance (T1)

{
    "version": "0.4.0-alpha.rc4 commit=v0.4.0-rc4",
    "lnd_version": "0.18.1-beta",
    "network": "testnet3",
    "lnd_identity_pubkey": "02ac55f686b46ae6fc60924fe2115b1a7b64d4d71c0de2265a1ef0136d680b1c61",
    "node_alias": "SpeedDev2",
    "block_height": 2869499,
    "block_hash": "00000000000000076bad3bf7db76e38f1842c50b3b32bd104bab93b056c778c6",
    "sync_to_chain": true
}

And transferred few Bucks to LiT-Tapd Instance (T2)

Now from T2 we raise an fundchannel request

litcli -n testnet --rpcserver=localhost:8443 --macaroonpath=~/.lnd/data/chain/bitcoin/testnet/admin.macaroon ln fundchannel --node_key=02ac55f686b46ae6fc60924fe2115b1a7b64d4d71c0de2265a1ef0136d680b1c61 --asset_amount=50000000 --asset_id=f8ffc554dad8a3780c408297a70b70af1c8d96cae3c167ff55cbd6308edb2a08 --push_amt=50000

This fails stating

[litcli] error funding channel: rpc error: code = Unknown desc = error funding channel: didn't receive funding ack after 30s

The logs of t1 are as follows t1 tapd node.txt t1 lnd node.txt

The logs of T2 node are following t2_ack.txt

Also, when this error is encountered, we face this issue of asset not showing in asset list grpc.

https://mempool.space/testnet/tx/6718cd84a2a5104b5ce7e1f6765750c1a6bf3f885248a9cae4bb5a71ab239e17#vout=0

5 conf already at this moment

Also litcli getinfo(T2 Node)

{
    "version": "0.13.99-alpharc4 commit=v0.13.99-alpha.rc4"
}
guggero commented 3 months ago

Asset channels are only available with nodes that run the full litd stack. A node that doesn't will not know the new p2p messages and simply not respond. That's why the didn't receive funding ack after 30s is expected behavior.

The asset will show again after 10 minutes, they were just locked/leased for 10 minutes, if they're not used for the funding they will be shown again.

I just noticed that we only have the include_leased flag on the RPC but forgot to add it on the CLI, so I created this PR: https://github.com/lightninglabs/taproot-assets/pull/1039

Roasbeef commented 3 months ago

Working on adding a fast fail check, so we just bail out if the other nodes doesn't support the channel type sooner with a nice error message.

Roasbeef commented 3 months ago

This is fixed by https://github.com/lightninglabs/taproot-assets/pull/1041