Skip to content

gRPC close method returns txid in inconsistent encoding #8904

@Jhoyola

Description

@Jhoyola

Background

When doing gRPC calls to CLN that return a Bitcoin on-chain txid, it is normally returned as raw bytes (32 bytes).

The issue

On CLN version v25.12.1 the close method returns a list of already hex-encoded txids. So the return value is (a list of) txid as 64 bytes which are 64 ascii characters that is the hex-encoded txid. For consistency the correct return value should be a list of raw byte arrays, 32 bytes each.

Additional information / tests

I tested also that on v25.12.1 FundChannel and Withdraw work as they used to returning the raw bytes.

Before this I used the version v24.05 and there this did not happen. There close response behaved as expected returning the raw bytes of txid. Only one txid was returned so maybe this relates to the change where (to add splicing support), multiple close txids can be returned.

On CLI everything seems ok and the response is consistent. The withdraw response contains
"txid": "58b706eb44a1917cbf3f7b7c28b19197517b1fb56573d8630971f14f106f1a6b",
And close response contains
"txids": ["03524f64f99035788a4e07e855c1c710b6a4cb05f9b4f2e5c8a6a63c205e4b5f"],

Possible fixes

Best would be to find a way of returning it in the same format as it used to for consistency. Alternatively the type in the proto file could be changed.

Currently the return type in the proto file is repeated bytes. If it was changed to repeated string it would convey that the type is different from other txid return types.

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