Skip to content

Conversation

@erdoganishe
Copy link
Collaborator

@erdoganishe erdoganishe commented Dec 22, 2025

Fixes #7973.

This PR fixes the description field being returned as empty in gRPC responses for listpays and listsendpays.
The field already existed, but was not being populated correctly in these gRPC paths.

After this change, the description is correctly propagated and returned for completed payments.

Examples:

$ l1-cli listsendpays                    
{
   "payments": [
      {
         "created_index": 1,
         "id": 1,
         "payment_hash": "8aeb87ea41d9a116336c8051a42484e01f7e366b51a6d66141226c794fcea817",
         "groupid": 1,
         "updated_index": 1,
         "destination": "02270cc33bf20e7f7a84ee2efb7343926f6d0c341f7f3a45f4d9ca51647feaa1c4",
         "amount_msat": 1000,
         "amount_sent_msat": 1000,
         "created_at": 1766404635,
         "completed_at": 1766404635,
         "status": "complete",
         "payment_preimage": "32b6f55f6eec622b917f7495e739818523d8fa42cade6e81a05a17154d12af6e",
         "bolt11": "lnbcrt10n1p55jv0ysp5uwls677d6nad0krd7265kmwsaqmzgqg5kkps9gz3yqkqj6lr436qpp53t4c06jpmxs3vvmvspg6gfyyuq0hudnt2xndvc2pyfk8jn7w4qtsdq5w3jhxapqwpshjmt9de6qxqyjw5qcqp2fp4p0367fw5vnsq80lyvqv753rhd07e2rfkce204gmh0wyc6u7rzu4hq9qxpqysgq0lyg3e87e7lzxs0r5hyfvztlv24t2wfd0n6j23rajnn98tnl3h8n2u25nn4nywqjs4ze5wv35ch9ccl7xurlsxj052erj3hlnqwve9sp89u92x",
         "description": "test payment"
      }
   ]
}
l1-cli listpays                        
{
   "pays": [
      {
         "bolt11": "lnbcrt10n1p55jv0ysp5uwls677d6nad0krd7265kmwsaqmzgqg5kkps9gz3yqkqj6lr436qpp53t4c06jpmxs3vvmvspg6gfyyuq0hudnt2xndvc2pyfk8jn7w4qtsdq5w3jhxapqwpshjmt9de6qxqyjw5qcqp2fp4p0367fw5vnsq80lyvqv753rhd07e2rfkce204gmh0wyc6u7rzu4hq9qxpqysgq0lyg3e87e7lzxs0r5hyfvztlv24t2wfd0n6j23rajnn98tnl3h8n2u25nn4nywqjs4ze5wv35ch9ccl7xurlsxj052erj3hlnqwve9sp89u92x",
         "description": "test payment",
         "destination": "02270cc33bf20e7f7a84ee2efb7343926f6d0c341f7f3a45f4d9ca51647feaa1c4",
         "payment_hash": "8aeb87ea41d9a116336c8051a42484e01f7e366b51a6d66141226c794fcea817",
         "status": "complete",
         "created_at": 1766404635,
         "completed_at": 1766404635,
         "preimage": "32b6f55f6eec622b917f7495e739818523d8fa42cade6e81a05a17154d12af6e",
         "amount_msat": 1000,
         "amount_sent_msat": 1000,
         "created_index": 1,
         "updated_index": 1
      }
   ]
}

No schema change is required: the description field already existed in both the database and RPC definitions.
The fix ensures the field is correctly populated and forwarded in gRPC responses.
Existing SQL tests pass without modification, since description is an additional optional field and does not affect existing column expectations.

@erdoganishe erdoganishe force-pushed the fix/pays-missing-description branch from b3ff08b to c40f304 Compare December 22, 2025 14:10
@erdoganishe erdoganishe force-pushed the fix/pays-missing-description branch from c40f304 to ea6f718 Compare January 6, 2026 12:51
@erdoganishe erdoganishe requested a review from cdecker as a code owner January 6, 2026 12:51
@erdoganishe erdoganishe force-pushed the fix/pays-missing-description branch from ea6f718 to b232f37 Compare January 6, 2026 13:10
Copy link
Member

@cdecker cdecker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent find, and great job generating all the dependent files.

ACK

@ShahanaFarooqui ShahanaFarooqui force-pushed the fix/pays-missing-description branch from b232f37 to 3a8c6a9 Compare January 7, 2026 17:49
@rustyrussell
Copy link
Contributor

No. The "description" field here is:

            "The description matching the bolt11 description hash (if pay supplied one)."

It's usually missing. This is not the description field of the bolt11 / bolt12.

@erdoganishe erdoganishe force-pushed the fix/pays-missing-description branch 6 times, most recently from f07c413 to b949921 Compare January 9, 2026 11:31
Changelog-Added: Fix empty `description` field for gRPC `listpays` and `listsendpays`. No schema change required; the field already existed but was not populated.
Changelog-Added: Fix empty `description` field for gRPC `listpays` and `listsendpays`. No schema change required; the field already existed but was not populated.
@erdoganishe erdoganishe force-pushed the fix/pays-missing-description branch from b949921 to 824f467 Compare January 9, 2026 11:49
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

Successfully merging this pull request may close these issues.

Grpc: listpays & listsendpays returns empty description

3 participants