Repository navigation
tapchannel: derive initial commitment from negotiated configs behind feature bit - #2278
Merged
Merged
Conversation
The aux funding controller is now handed the negotiated local and remote channel configs when it derives the initial commitment.
Signals that the initial commitment of an asset channel is derived from the negotiated local and remote channel configs. Advertised as optional for now, the next release makes it required.
Older peers derive the initial commitment from zeroed channel configs, as that is what lnd used to hand out at funding time. To arrive at the same commitment transaction we do the same for peers that don't signal the negotiated-chan-cfg feature. Once we advertise the feature as required, such peers fail the funding flow instead.
GeorgeTsagk
force-pushed
the
negotiated-chan-cfg-bit
branch
from
September 3, 2026 12:50
6065262 to
05ce31e
Compare
jtobin
approved these changes
Sep 4, 2026
| re-derived on an immediate force close. A new aux channel feature bit, | ||
| `negotiated-chan-cfg`, is advertised as optional. When a peer doesn't | ||
| signal it, the previous derivation from zeroed configs is used so that | ||
| channels can still be opened with older versions. The next release |
Member
There was a problem hiding this comment.
👍 I made a v0.10 milestone; we should create an issue re: making this feature required, and then lump it under that, so as not to forget.
Member
Author
There was a problem hiding this comment.
Opened #2288 as a draft for the flip, on the v0.10 milestone.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
lightningnetwork/lnd#10804 hands the aux funding controller the negotiated
local and remote channel configs when the initial commitment is derived.
That makes the height zero state consistent with what is re-derived on an
immediate force close, but it also changes the commitment we build at
funding time. Peers on older versions still derive it from zeroed configs,
so funding a channel between a node on lnd master and a v0.8.0 node fails
with
counterparty's commitment signature is invalid(theCompat Testsjob on #2177 shows this).
This PR bumps lnd to a master commit that includes #10804 and gates the new
derivation behind an aux channel feature bit:
negotiated-chan-cfg(bits 4/5) is added totapfeaturesand advertisedas optional.
commitment is derived. That is exactly what older lnd passed at that
point, so both sides arrive at the same commitment transaction.
funding flow fails with
ErrNegotiatedChanCfgRequired. This path isinactive until the bit is flipped.
Phase 2 (next release) is a follow-up that moves the bit to required. At
that point peers without it are rejected at init by
checkRequiredBits,with the funding check as a second line of defence.
Manually verified with the bit flipped to required: a v0.8.0 peer is
dropped at connect time with
peer does not support required feature: negotiated-chan-cfg, new to new channels keep working.Needed by #2177 (its compat job goes green once this lands).
Testing
combinations, plus a guard that the bit is advertised as optional.
TestBackwardsCompatChannels(v0.8.0 vs tip) passes again and takes thezeroed config path.
TestCustomChannels/force_closepasses without touching the fallback.