Skip to content

Include interactive funding candidates on broadcast#4570

Merged
TheBlueMatt merged 2 commits into
lightningdevkit:mainfrom
jkczyz:2026-04-splice-transaction-type
May 7, 2026
Merged

Include interactive funding candidates on broadcast#4570
TheBlueMatt merged 2 commits into
lightningdevkit:mainfrom
jkczyz:2026-04-splice-transaction-type

Conversation

@jkczyz

@jkczyz jkczyz commented Apr 17, 2026

Copy link
Copy Markdown
Contributor

Include every negotiated funding candidate (original + RBF replacements) at broadcast time so downstream consumers can update their own state tracking from the broadcaster callback. The local contribution data isn't recoverable from the on-chain transaction, and the replaced txids aren't either, so the broadcaster callback is the only place where this information can be observed.

  • TransactionType::Splice is replaced with TransactionType::InteractiveFunding { candidates: Vec<FundingCandidate> }. Each FundingCandidate carries its txid and the channels participating in it; each ChannelFunding carries the channel id, counterparty node id, purpose (Establishment / Splice), and the local node's contribution for this candidate. The list covers every negotiated candidate in order — original first, then each RBF replacement — letting downstream reconcile any historical txid, not just the immediate predecessor. The alternative (reacting to SplicePending) was worse: that event races with BDK wallet sync and doesn't carry the replaced txid.
  • The new variant is structured to be forward-compatible with batches and V2 (dual-funded) channel establishment, neither of which is implemented today. For the current single-channel splice path, each candidate's channels list has length 1.
  • FundingCandidate, ChannelFunding, and FundingPurpose implement Writeable / Readable so downstream can persist them directly without mirroring.
  • FundingContribution gains public getters for estimated_fee, inputs, and max_feerate; feerate is elevated from pub(super) to pub. Combined with existing value_added, outputs, change_output, this exposes everything a downstream consumer needs without reaching into the raw transaction.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

6 participants