Blockstream / greenlight

Build apps using self-custodial lightning nodes in the cloud
https://blockstream.github.io/greenlight/getting-started/
MIT License
117 stars 27 forks source link

trampoline: log payment success/failure #537

Open JssDWt opened 3 weeks ago

JssDWt commented 3 weeks ago

A snippet from a failing trampoline payment:

2024-10-31T20:02:52+04:00 {} stdout: DEBUG   plugin-gl-plugin-internal: New trampoline payment via xxx: lnbcxxx
2024-10-31T20:02:52+04:00 {} stdout: DEBUG   plugin-gl-plugin-internal: Await peer connection to xxx
2024-10-31T20:02:52+04:00 {} stdout: DEBUG   plugin-gl-plugin-internal: Checking if peer xxx is connected
2024-10-31T20:02:52+04:00 {} stdout: DEBUG   plugin-gl-plugin-internal: Received event Ok(RpcCall(\"/greenlight.Node/TrampolinePay\")) from gl_plugin
2024-10-31T20:02:52+04:00 {} stdout: DEBUG   plugin-gl-plugin-internal: overpay=12345, total_amt=12345
2024-10-31T20:02:52+04:00 {} stdout: DEBUG   plugin-gl-plugin-internal: Received event Ok(RpcCall(\"/cln.Node/Datastore\")) from gl_plugin
2024-10-31T20:02:52+04:00 {} stdout: DEBUG   plugin-gl-plugin-internal: Received event Ok(RpcCall(\"/cln.Node/Pay\")) from gl_plugin
2024-10-31T20:02:52+04:00 {} stdout: DEBUG   plugin-gl-plugin-internal: Awaiting gossip sync to complete for up to 29
2024-10-31T20:02:52+04:00 {} stdout: INFO    plugin-gl-plugin-internal: Blocksync is not required, skipping.
2024-10-31T20:02:52+04:00 {} stdout: INFO    plugin-gl-plugin-internal: Starting 1 tasks to wait for channels to be ready
2024-10-31T20:02:52+04:00 {} stdout: DEBUG   plugin-gl-plugin-internal: Checking if peer xxx is connected
2024-10-31T20:02:52+04:00 {} stdout: DEBUG   plugin-gl-plugin-internal: Received event Ok(RpcCall(\"/cln.Node/Getinfo\")) from gl_plugin
2024-10-31T20:02:52+04:00 {} stdout: DEBUG   plugin-gl-plugin-internal: Checking if channel 1x1x1 is ready
2024-10-31T20:02:52+04:00 {} stdout: DEBUG   plugin-gl-plugin-internal: Channel 1x1x1 is established

The reason for failure is not logged. It would be very useful to log this to debug issues using the greenlight session logs. Also paymet success would be useful to log.