daywalker90 / summars

A core lightning plugin to show a summary of your channels and optionally recent forwards.
MIT License
8 stars 2 forks source link

summars-forwards fails with missing field `received_time` #9

Closed Sjors closed 4 months ago

Sjors commented 7 months ago

I'm seeing a failure when summars-forwards is set:

"Error calling list_forwards: Error: Failed to deserialize response : missing field `received_time`"

Perhaps because the installation is fresh and no forwards happen yet?

I configured with:

summars-forwards=24
summars-pays=24
summars-invoices=24

It works once I drop summars-forwards.

Running c-lightning v24.02.1, and the plugin built from source at v3.1.0

This might be a different issue though, I'll open a new issue.

daywalker90 commented 6 months ago

I opened an issue with CLN since this is a problem with the cln-rpc dependency. My guess is you have some really old forwards that do not have the received_time field present. The cln-rpc dependency requires this field. My suggestion: use listforwards to find these and then delete them with delforward. Alternatively you could run autoclean-once (or configure autoclean to run periodically). If the reason for your missing received_time field is indeed because the forwards were done on an old CLN version where this field was not created, then this will probably not get a fix.

Sjors commented 6 months ago

My guess is you have some really old forwards

My node is about 5 years old so that could be. I'll try some of the workarounds / fixes.

Sjors commented 4 months ago

Indeed I had a bunch of them, found with:

lightning-cli listforwards | jq '.forwards|  map(select(.received_time == null)) 

And deleted with:

lightning-cli listforwards | jq -r '.forwards|  map(select(.received_time == null)) | .[] | "\(.in_channel) \(.in_htlc_id) \(.status)"' | xargs -l1 lightning-cli delforward
Sjors commented 4 months ago

These involved channels created between blocks 540,000 - 570,000 (assuming that's what the first part of in_channel refers to). Most of those failed.