Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug]: rfq process error results in tapd crash #1010

Closed
HannahMR opened this issue Jul 11, 2024 · 0 comments · Fixed by #1011
Closed

[bug]: rfq process error results in tapd crash #1010

HannahMR opened this issue Jul 11, 2024 · 0 comments · Fixed by #1011
Assignees
Labels
bug Something isn't working needs triage

Comments

@HannahMR
Copy link

The Issue

When generating an invoice for an asset held in an asset channel, if the rfq process fails, due to non-responsiveness of the peer, incorrect config, etc., the tapd process crashes and litd needs to be restarted. Doesn’t seem to happen when there is no rfq config and the
[litcli] peer [peer pub key] sent back an invalid quote, status: PRICE_ORACLE_QUERY_ERR
error is returned. But it does happen when the process times out and this error is received,
[litcli] error adding sell order: rpc error: code = Unknown desc = timeout waiting for response from peer

the tapd process then fails with this error visible in the output of $ litcli status
"error": "received critical error from sub-server (taproot-assets), shutting down: failed to handle outgoing message: error sending outgoing message to stream handler: unable to send message to peer: rpc error: code = NotFound desc = peer is not connected",

My environment

I’m on the v0.13.99-alpha.rc3 release of litd on a Ubuntu machine.

Steps to reproduce

Check that everything is up and running.
$ litcli status

Attempt to create an asset based invoice in a situation where it will fail… other node is down, config is incorrect, etc.
$ litcli --network=testnet --macaroonpath=~/.lnd/data/chain/bitcoin/testnet/admin.macaroon ln addinvoice --asset_id [asset id] --asset_amount 100

Check on that status of tapd
$ litcli status

Expected behavior

The invoice creation cli command will return error message but litd and tapd will continue running.

Actual behavior

The invoice creation cli command returns an error message and litd stays running, but tapd fails.

Attached are logs from a tapd crash after a failed invoice creation.
lndJulRFQCrash.log

@HannahMR HannahMR added bug Something isn't working needs triage labels Jul 11, 2024
guggero added a commit that referenced this issue Jul 11, 2024
Fixes #1010.

With this commit we introduce a new fn.CriticalError type and only send
RFQ errors to the main error channel (which causes the daemon to shut
down) if an error is critical to the operation and can't just be logged.
@ffranr ffranr moved this from 🆕 New to 👀 In review in Taproot-Assets Project Board Jul 11, 2024
@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in Taproot-Assets Project Board Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

2 participants