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

sendpay_failure notifications missing important fields #7430

Open
daywalker90 opened this issue Jun 25, 2024 · 2 comments
Open

sendpay_failure notifications missing important fields #7430

daywalker90 opened this issue Jun 25, 2024 · 2 comments

Comments

@daywalker90
Copy link
Contributor

daywalker90 commented Jun 25, 2024

cln v24.05:
apparently some fields are missing from sendpay_failure notifications:

sendpay_failure notification: {\"sendpay_failure\":{\"code\":204,\"message\":\"failed: WIRE_UNKNOWN_NEXT_PEER (reply from remote)\",\"data\":{\"created_index\":8398,\"id\":8398,\"payment_hash\":\"a6ac55c126b415f9236526fbb6e8c847db5dc1da94db148f85db512ca3dc0c82\",\"groupid\":2,\"partid\":1,\"destination\":\"03f060953bef5b777dc77e44afa3859d022fc1a77c55138deb232ad7255e869c00\",\"amount_msat\":5311800403,\"amount_sent_msat\":5311859832,\"created_at\":1719325305,\"status\":\"pending\",\"erring_index\":1,\"failcode\":16394,\"failcodename\":\"WIRE_UNKNOWN_NEXT_PEER\",\"raw_message\":\"400a\"}}}

missing:

  • erring_node
  • erring_channel
  • erring_direction

Also notice how status is pending instead of failed as promised by the docs:

https://docs.corelightning.org/docs/event-notifications#sendpay_failure

This makes the notification far less useful and also causes a panic in cln-plugin because it expects these fields.

@daywalker90
Copy link
Contributor Author

also:

waitsendpay a6ac55c126b415f9236526fbb6e8c847db5dc1da94db148f85db512ca3dc0c82 10 1 2
{
   "code": 209,
   "message": "Payment failure reason unknown"
}

From the docs:
209: The payment already failed, but the reason for failure was not stored. This should only occur when querying failed payments on very old databases.

The payment was tried just now, so it's not old.

@daywalker90
Copy link
Contributor Author

This is not the case in all sendpay_failure notifications but it still causes cln-plugin to panic alot when theres a plugin subscribing to this notification.

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

1 participant