Skip to content

Static loop-in fails with DeadlineExceeded: "Loop-in not stored in db, can't update" #922

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

Open
TrezorHannes opened this issue Apr 19, 2025 · 2 comments

Comments

@TrezorHannes
Copy link

Expected behavior
Follow up from Slack Thread
Copying in @Liongrass and @alexbosworth as a heads-up, that this is a follow-up from our slack-convo.

Static Loop in first try, I'm trying to loop in with one specified UTXO to fixedfloat, with
litloop static in --utxo 15a7deda35cbf2c71b2f0a97709be17d050c195d47eb19ab6624807b50c9c2dd:0 --last_hop 037f990e61acee8a7697966afd29dd88f3b1f8a7b14d625c4f8742bd952003a590 --payment_timeout "90s" --label "static loop in fixedfloat" -v

Actual behavior
It should take the UTXO and loop in with the last hop specified.

To reproduce
When confirming without the --payment_timeout "90s" flag, I get the following error

CONTINUE SWAP? (y/n): y
[loop] rpc error: code = DeadlineExceeded desc = unable to initiate the loop-in with the server: rpc error: code = DeadlineExceeded desc = context deadline exceeded

Logs

025-04-18 18:37:31.680 [INF] SADDR: StaticAddr loop-in 0000000000000000000000000000000000000000000000000000000000000000: Current: InitHtlcTx
2025-04-18 18:37:31.680 [DBG] SADDR: Deposit 15a7deda35cbf2c71b2f0a97709be17d050c195d47eb19ab6624807b50c9c2dd:0: NextState: LoopingIn, PreviousState: Deposited, Event: OnLoopInInitiated
2025-04-18 18:38:01.715 [ERR] FSM: StateMachine error: unable to initiate the loop-in with the server: rpc error: code = DeadlineExceeded desc = context deadline exceeded
2025-04-18 18:38:01.715 [INF] SADDR: StaticAddr loop-in 2b7b3b802e15b815b7af48ed78bdf51d47e77ece9b60eabbb4c9927caa873df2: Current: UnlockDeposits
2025-04-18 18:38:01.715 [ERR] SADDR: Error initiating loop-in swap: unable to initiate the loop-in with the server: rpc error: code = DeadlineExceeded desc = context deadline exceeded
2025-04-18 18:38:01.725 [WRN] SADDR: StaticAddr loop-in 2b7b3b802e15b815b7af48ed78bdf51d47e77ece9b60eabbb4c9927caa873df2: Loop-in not stored in db, can't update
2025-04-18 18:38:01.725 [DBG] SADDR: Deposit 15a7deda35cbf2c71b2f0a97709be17d050c195d47eb19ab6624807b50c9c2dd:0: NextState: Deposited, PreviousState: LoopingIn, Event: OnError
2025-04-18 18:38:01.730 [INF] SADDR: StaticAddr loop-in 2b7b3b802e15b815b7af48ed78bdf51d47e77ece9b60eabbb4c9927caa873df2: Current: Failed
2025-04-18 18:38:01.730 [WRN] SADDR: StaticAddr loop-in 2b7b3b802e15b815b7af48ed78bdf51d47e77ece9b60eabbb4c9927caa873df2: Loop-in not stored in db, can't update

System information
loop version 0.29.0-beta commit=v0.29.0-beta

litcli status
{
    "sub_servers": {
        "accounts": {
            "disabled": false,
            "running": true,
            "error": "",
            "custom_status": ""
        },
        "faraday": {
            "disabled": false,
            "running": true,
            "error": "",
            "custom_status": ""
        },
        "lit": {
            "disabled": false,
            "running": true,
            "error": "",
            "custom_status": ""
        },
        "lnd": {
            "disabled": false,
            "running": true,
            "error": "",
            "custom_status": ""
        },
        "loop": {
            "disabled": false,
            "running": true,
            "error": "",
            "custom_status": ""
        },
        "pool": {
            "disabled": false,
            "running": true,
            "error": "",
            "custom_status": ""
        },
        "taproot-assets": {
            "disabled": false,
            "running": true,
            "error": "",
            "custom_status": ""
        }
    }
}
{
    "state": "SERVER_ACTIVE"
}

I can't / don't want to rapidely reproduce the error, since the fees from the first try raked up 4x right now, I'd rather wait for a cheaper time window again.

Estimated on-chain fee:                         0 sat
Loop service fee:                           11218 sat
Estimated total fee:                        11218 sat

Conf target:                                    0 block
CLTV expiry delta:                              0 block
Now it's at
Estimated on-chain fee:                         0 sat
Loop service fee:                           42860 sat
Estimated total fee:                        42860 sat
With the same amount of sats. quote in reports the same
Estimated total fee:                        43517 sat

I guess the route loop => last_hop raked up the fees in that one hour, so a cheap hop depleted.

@bhandras
Copy link
Member

Hi @TrezorHannes, thanks for reporting this!

The error message might be a bit misleading. What actually happened is that with the given last hop, we couldn't reach you, so the service fee defaulted to a generic rate (which is usually just the routing fee + 1 sat).

@TrezorHannes
Copy link
Author

TrezorHannes commented Apr 22, 2025

Thanks @bhandras , so just to confirm: your hypothesis is, that the loop in route

  • couldn't reach me due to a time-out
  • or to a liquidity bottleneck

whereby my question to the former would be, is this mitigatable with the --payment_timeout "90s"
and wrt the latter, couldn't we get more verbose with the error messaging?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants