Skip to content

lightningd: treat channels funded before the activation as private in gossip - #87

Merged
kwsantiago merged 1 commit into
blake2b-unifiedfrom
pre-activation-private
Oct 31, 2026
Merged

kwsantiago merged 1 commit into
blake2b-unifiedfrom
pre-activation-private

Conversation

@kwsantiago

Copy link
Copy Markdown

Summary

A local channel funded before the BLAKE2b activation can never be announced, but derive_channel_state put it in CGOSSIP_ANNOUNCED when its announce flag was set. On every start lightningd logged "gossipd lost track of announced channel", rebroadcast its channel_update to every peer, and kept signing a node_announcement that upgraded nodes drop.

  • is_private now also covers a usable channel whose scid predates the activation, so it is handled like an unannounced channel: its channel_update goes only to its peer, it does not count toward has_announced_channels, and stale peer sigs are dropped on entering CGOSSIP_PRIVATE.
  • New transitions for the paths into and out of that state: going live, a zeroconf funding mined below the activation (also while closing), a zeroconf funding reorganized out, and a splice above the activation, which takes the channel back to the public path.
  • announcement_signatures for such a channel are ignored quietly, since the peer may not know the activation height.
  • On start, gossipd still hands back the channel_update of a closed channel funded before the activation. It is now dropped instead of tripping the state checks.

Closes #80

Test plan

  • test_gossip_prefork_channel_not_reannounced: two restarts start in CGOSSIP_PRIVATE with no re-announce, a new alias is never announced, and invoices still carry a route hint that a third node pays through.
  • test_gossip_prefork_channel_closed_restart and test_gossip_prefork_zeroconf_closing_mined fail without the change (a BROKEN log and an illegal transition) and pass with it.
  • The existing activation tests, including the splice above the activation, pass.
  • Locally: test_gossip, test_invoices, test_splicing, test_blake2b_differentiation and test_closing on v1, plus test_gossip, test_splicing and test_closing with dual funding.

Changelog-None

@kwsantiago
kwsantiago merged commit 5225726 into blake2b-unified Oct 31, 2026
87 of 90 checks passed
@kwsantiago
kwsantiago deleted the pre-activation-private branch October 31, 2026 22:41
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.

lightningd: channels funded before the activation are re-announced on every start

1 participant