Skip to content

Follow the BLAKE2b BOLT changes, and apply a one-hop blinded path's CLTV delta - #3

Merged
kwsantiago merged 4 commits into
0.3from
blake2b-spec-conformance
Oct 8, 2026
Merged

kwsantiago merged 4 commits into
0.3from
blake2b-spec-conformance

Conversation

@kwsantiago

Copy link
Copy Markdown

Brings follow_blake2b in line with the BOLT changes just merged into lightning-blake2b/bolts, and fixes a BOLT 12 interop failure with Core Lightning.

  • Coinbase funding (BOLT 2): a fundee fails a channel whose funding transaction is a coinbase unless it is zero-conf (by channel_type or a trusted minimum_depth of 0), and we do not fund a channel from a coinbase ourselves. A spend of a coinbase output does not relay for far longer than its maturity on this network, so the channel's commitment transactions could not be broadcast while its HTLCs expire.
  • Splicing (BOLT 2): no splice of a channel without option_unified_sigs. splice_channel and funding_contributed refuse, and an inbound splice_init or tx_init_rbf is answered with tx_abort after the usual validation, leaving quiescence as any abort does. Together with the existing refusal on unified channels, no channel is spliced while follow_blake2b is set.
  • Gossip (BOLT 7): we do not announce a channel funded below the chain's BLAKE2b activation height. The check is shared with the existing gossip floor.
  • Router: a one-hop blinded path (the introduction node is the recipient) now applies payinfo.cltv_expiry_delta. BOLT 4 has the recipient fold its min_final_cltv_expiry_delta into that value; LDK ignored it, so a payment to Core Lightning, which advertises 10, failed whenever LDK's random CLTV padding was smaller. simple_blinded_route_hints asserted the old value for one hop and now asserts the advertised one.

No public API changes beyond the existing follow_blake2b: no new variants, and the changed splice_init/tx_init_rbf signatures are crate-private.

Tests: cargo test --workspace passes, every commit builds, fuzz tests pass, and c_bindings, taproot and no-std check clean. New tests in blake2b_tests.rs and scid_utils.rs. Against Core Lightning v26.06.9 on Knots regtest with BLAKE2b active, a Lampo node built on this stack opens a unified channel, pays and is paid over BOLT 11 and BOLT 12, and closes cooperatively, in 5 of 5 runs.

@kwsantiago
kwsantiago merged commit a0f9b16 into 0.3 Oct 8, 2026
18 of 33 checks passed
@kwsantiago
kwsantiago deleted the blake2b-spec-conformance branch October 8, 2026 00:25
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.

1 participant