Skip to content

TX for claiming funds for a peer's swap-in fails to be broadcasted? #338

@tsjk

Description

@tsjk

Running CLN v23.11.2 with peerswap 9d41480.

Scenario:
Peer initiated swap-in, but the on-chain funds never arrived to my wallet. Note that there are no errors or anything indicating strangeness. Just funds unclaimed. =)

From my side the status is:

      "asset": "lbtc",
      "type": "swap-in",
      "role": "receiver",
      "state": "State_ClaimedPreimage",

CLN logs:

2024-12-27T04:33:17.827Z DEBUG   plugin-peerswap: [Messenger] From: <nodeid> got msgtype: a455 for swap: <swapid>
2024-12-27T04:33:17.858Z INFO    lightningd: Sending <amount>000msat over 1 hops to deliver <amount>000msat
2024-12-27T04:33:26.728Z INFO    <nodeid>-chan#212: htlc 2549 failed from 0th node with code 0x400f (WIRE_INCORRECT_OR_UNKNOWN_PAYMENT_DETAILS)
2024-12-27T04:33:27.161Z DEBUG   plugin-peerswap: [FSM] event:id: <swapid>, Event_SwapInReceiver_OnRequestReceived on
2024-12-27T04:33:27.169Z DEBUG   plugin-peerswap: [FSM] event:id: <swapid>, Event_ActionSucceeded on State_SwapInReceiver_CreateSwap
2024-12-27T04:33:27.170Z INFO    plugin-peerswap: [Swap:<swapid>] swap-in request received: peer: <nodeid> chanId: <chanId> initiator: <nodeid> amount <amount>
2024-12-27T04:33:27.174Z DEBUG   plugin-peerswap: [FSM] event:id: <swapid>, Event_ActionSucceeded on State_SwapInReceiver_SendAgreement
2024-12-27T04:33:27.851Z DEBUG   plugin-peerswap: [Messenger] From: <nodeid> got msgtype: a45d for swap: <swapid>
2024-12-27T04:33:28.013Z DEBUG   plugin-peerswap: [FSM] event:id: <swapid>, Event_OnTxOpenedMessage on State_SwapInReceiver_AwaitTxBroadcastedMessage
2024-12-27T04:33:28.032Z INFO    plugin-peerswap: adding tx watcher for <swapid>
2024-12-27T04:33:28.032Z DEBUG   plugin-peerswap: starting chain observer for <swapid>
2024-12-27T04:33:28.034Z DEBUG   plugin-peerswap: Await confirmation for tx with id: <txid> on swap <swapid>
2024-12-27T04:33:28.034Z DEBUG   plugin-peerswap: new block height=3180754, starting_height=3180754, safety_limit=30 for <swapid>
2024-12-27T04:33:35.648Z DEBUG   plugin-peerswap: new block height=3180755, starting_height=3180754, safety_limit=30 for <swapid>
2024-12-27T04:33:37.793Z DEBUG   plugin-peerswap: [Messenger] From: <nodeid> got same message for swap: <swapid>
2024-12-27T04:33:47.764Z DEBUG   plugin-peerswap: [Messenger] From: <nodeid> got same message for swap: <swapid>
2024-12-27T04:33:57.764Z DEBUG   plugin-peerswap: [Messenger] From: <nodeid> got same message for swap: <swapid>
2024-12-27T04:34:07.755Z DEBUG   plugin-peerswap: [Messenger] From: <nodeid> got same message for swap: <swapid>
2024-12-27T04:34:17.759Z DEBUG   plugin-peerswap: [Messenger] From: <nodeid> got same message for swap: <swapid>
2024-12-27T04:34:27.789Z DEBUG   plugin-peerswap: [Messenger] From: <nodeid> got same message for swap: <swapid>
2024-12-27T04:34:36.200Z DEBUG   plugin-peerswap: new block height=3180756, starting_height=3180754, safety_limit=30 for <swapid>
2024-12-27T04:34:37.775Z DEBUG   plugin-peerswap: [Messenger] From: <nodeid> got same message for swap: <swapid>
2024-12-27T04:34:47.791Z DEBUG   plugin-peerswap: [Messenger] From: <nodeid> got same message for swap: <swapid>
2024-12-27T04:34:57.766Z DEBUG   plugin-peerswap: [Messenger] From: <nodeid> got same message for swap: <swapid>
2024-12-27T04:35:07.767Z DEBUG   plugin-peerswap: [Messenger] From: <nodeid> got same message for swap: <swapid>
2024-12-27T04:35:17.756Z DEBUG   plugin-peerswap: [Messenger] From: <nodeid> got same message for swap: <swapid>
2024-12-27T04:35:27.772Z DEBUG   plugin-peerswap: [Messenger] From: <nodeid> got same message for swap: <swapid>
2024-12-27T04:35:35.608Z DEBUG   plugin-peerswap: new block height=3180757, starting_height=3180754, safety_limit=30 for <swapid>
2024-12-27T04:35:35.804Z DEBUG   plugin-peerswap: [FSM] event:id: <swapid>, Event_OnTxConfirmed on State_SwapInReceiver_AwaitTxConfirmation
2024-12-27T04:35:37.790Z DEBUG   plugin-peerswap: [Messenger] From: <nodeid> got same message for swap: <swapid>
2024-12-27T04:35:45.879Z INFO    lightningd: Sending <amount>000msat over 1 hops to deliver <amount>000msat
2024-12-27T04:35:47.798Z DEBUG   plugin-peerswap: [Messenger] From: <nodeid> got same message for swap: <swapid>
2024-12-27T04:35:50.253Z DEBUG   plugin-peerswap: [FSM] event:id: <swapid>, Event_ActionSucceeded on State_SwapInReceiver_ValidateTxAndPayClaimInvoice
2024-12-27T04:35:50.253Z DEBUG   plugin-peerswap: [FSM] event:id: <swapid>, Event_ActionSucceeded on State_SwapInReceiver_ClaimSwap
2024-12-27T04:35:50.253Z INFO    plugin-peerswap: [Swap:<swapid>] Swap claimed with preimage <preimage>
2024-12-27T04:40:09.098Z INFO    <nodeid>-channeld-chan#212: Peer connection lost
2024-12-27T04:40:09.098Z INFO    <nodeid>-chan#212: Peer transient failure in CHANNELD_NORMAL: channeld: Owning subdaemon channeld died (62208)
2024-12-27T04:41:00.405Z INFO    <nodeid>-channeld-chan#212: Splice resume check with local_next_funding: omitted, remote_next_funding: empty, inflights: 0

elementsd (Elements Core version v23.2.4 (release build)) logs:

2024-12-27T04:35:49Z [peerswap] keypool added 1 keys (1 internal), size=2000 (1000 internal)
2024-12-27T04:35:49Z [peerswap] keypool reserve <n>
2024-12-27T04:35:49Z [peerswap] keypool keep <n>
2024-12-27T04:35:50Z [peerswap] AddToWallet <txid>  new

listtransactions:

  {
    "address": "<address>",
    "category": "receive",
    "amount": n.m,
    "amountblinder": "...",
    "asset": "...",
    "assetblinder": "...",
    "label": "peerswap -- ClaimByInvoice(swap id=....)",
    "vout": 0,
    "confirmations": 0,
    "trusted": false,
    "txid": "<txid>",
    "walletconflicts": [
    ],
    "time": 1735274150,
    "timereceived": 1735274150,
    "bip125-replaceable": "yes"
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions