Skip to content

BOLT 12: Inconsistent bech32 padding validation across implementations #1281

@erickcestari

Description

@erickcestari

Differential fuzzing across Lightning implementations revealed inconsistent handling of bech32 padding in BOLT 12 offers. Some implementations enforce BIP-173's 4-bit padding constraint while others not.

  • Lightning-kmp and Eclair enforce it
  • Clightning and rust-lightning do not enforce it

Example of offer with invalid BIP-173 padding: lno1zcss9mk8y3wkklfvevcrszlmu23kfrxh49px20665dqwmn4p72pkseseq

This creates interoperability issues where some nodes reject offers and others accept it. The spec should clarify whether to follow BIP-173 strictly or allow relaxed padding validation.

Should BOLT 12 bech32 encoding follow BIP-173's padding rules?

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