Open optout21 opened 1 week ago
Also, after we bump our MSRV we can drop all the Box
es we added in serialization.
In rust-bech32
, option with no-trimming 5-bit-to-8-bit conversion is on its way. When it's available (in a new release), the pre-padding in LDK can be removed -- in Bolt11Features
serialization and in invoice hash computation.
https://github.com/rust-bitcoin/rust-bech32/pull/201
Some followups to Base32/Bech32 changes #3270
Bolt11InvoiceFeatures
are serialized to 5-bit values internally, but in a way that is not compatible with Bech32. The grouping of bits is done in reverse (both byte order and bit order). The current native implementation could be switch to be based onrust-bech32
(increased reuse), and iterative approach (less allocations). See: https://github.com/lightningdevkit/rust-lightning/pull/3270#discussion_r1746676131Change
fn from_base32(b32: &[Fe32])
to take iterator instead of slice; see https://github.com/lightningdevkit/rust-lightning/pull/3270#discussion_r1750763305Also: (minor) https://github.com/lightningdevkit/rust-lightning/pull/3270#discussion_r1755635294