Skip to content

Byte-order of chain_hash in messages #237

@cdecker

Description

@cdecker

We did not specify the byte-order of the chain_hash field
in the open_channel and the channel_announcement messages. While
testing integration I noticed that the three implementations disagree
about the ordering:

  • c-lightning and eclair both use the reversed order that bitcoin
    uses internally, i.e., interpreting the hash as a little-endian
    number.
  • lnd uses the non-reversed byte-order that is directly produced by
    the hashing function.

I think both have their merits, however we need to agree on which
order to use, otherwise we'll be unable to open a channel, or exchange
gossip.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions