feat(lightning): buying inbound liquidity is on, on mainnet

GroupLightningRollout.LIQUIDITY_ENABLED is true, by decision, ahead of the plan's own Phase 0 check
on mainnet: ACINQ's LSP has not yet been seen to accept a splice whose funding key from us does not
change, so the first purchase there is that check. If it refuses, the splice aborts before anything is
signed into it and the purchase is reported failed. A purchase is bounded meanwhile by the mainnet
channel cap, the fee cap the group signs, and every co-signer's checks. The wallet screen now shows Add
liquidity, and the operator's node buys what the group authorises.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Kgothatso NgakoandClaude Opus 5.5 committed 2026-11-01 13:09:42 +02:00
1 parent 67351eeaa5
commit 4f1b4a4384
3 files changed
+10 -6

No files matched your search

@@ -40,10 +40,14 @@ object GroupLightningRollout {
/**
* Whether a member may ask the group to buy inbound liquidity, and the operator's node buys it
* (`docs/group-lightning-liquidity.md`). Co-signers check a purchase whether or not it is on, so a
* group whose devices all run this build is ready when it lifts.
* (`docs/group-lightning-liquidity.md`). Co-signers check a purchase whether or not it is on.
*
* On, on mainnet, by decision, ahead of the plan's Phase 0 mainnet check: ACINQ's LSP has not yet
* been seen to accept a splice whose funding key from us does not change. If it refuses, the splice
* aborts before anything is signed into it, and the purchase is reported as failed. What bounds a
* purchase meanwhile is [MAINNET_CHANNEL_CAP], the fee cap the group signs, and every co-signer's checks.
*/
const val LIQUIDITY_ENABLED: Boolean = false
const val LIQUIDITY_ENABLED: Boolean = true
/** The most a channel on [chain] may hold, or null where there is no cap. */
fun channelCapFor(chain: Chain): Satoshi? = MAINNET_CHANNEL_CAP.takeIf { chain.isMainnet() }
+1 -1
View File
@@ -151,7 +151,7 @@ arguing with either, and its two tables of what the build found before
changing anything it describes.
The group Lightning liquidity note is a phased plan that has been built, but for
its Phase 9, and is off until a purchase is made on mainnet.
its Phase 9, and is on, on mainnet, by decision ahead of its own mainnet check.
It is the group Lightning wallet note's check 8 built for one kind of splice:
read that note's D6, Phase 9 and Phase 13 first, and the lightning
remediation README's step 2, which this plan waits for, then its six
+2 -2
View File
@@ -6,7 +6,7 @@ group's Lightning wallet the same button. The difference is who presses it. In P
person decides and one key signs. Here the group decides, with a FROST-signed authorisation,
and `2t-1` co-signers sign a splice that every one of them has checked.
**Built, but for Phase 9, and off.** Written against `84984ca8` on `bennu-lightning`, with the
**Built, but for Phase 9, and on, on mainnet.** Written against `84984ca8` on `bennu-lightning`, with the
`lightning-kmp-app` submodule at `6f3f792` and lightning-kmp at `bd78ed62` (branch
`claude/group-lightning-wallet`). The library phases land on a new branch,
`claude/group-lightning-liquidity`, in both `lightning-kmp-app` and `experimental/lightning-kmp`;
@@ -38,7 +38,7 @@ differently, this table says so.
| 7 | done, behind `GroupLightningRollout.LIQUIDITY_ENABLED`, which is off until Phase 10: `GroupLightningLiquidityScreen` and its route, view model and state; *Add liquidity* on the wallet's balance card, or the reason it is not there; a purchase's state on its channel row; *Inbound liquidity added* in the payment list; and two transcript lines from the snapshot, added and failed. `LiquidityPrice` works out the price on the member's device, and matches what eclair charged in Phase 0 to the sat. Tests: `LiquidityPriceJvmTest`, and two more cases in `LightningPaymentRowJvmTest`. `m3Audit` meets every budget |
| 8 | **run**, in `GroupLightningRegtestJvmTest`, between *receive* and *pay*: a member prices 200,000 sats from the operator's snapshot, the group authorises it at the default cap, the operator's node splices, every co-signer checks the splice and none refuses; the channel grows from 100,000 to 299,779 sats for 2,521 sats, the figure the member's device estimated; a 50,000-sat payment then arrives with no on-the-fly splice; and *pay*, *close* (124,295 sats to the onchain wallet) and *sweep* run on the spliced channel. Sixty seconds from a fresh network |
| 9 | **not built**, as the plan leaves it: whether the LSP may splice the channel to deliver a payment nobody asked for is the group's decision, and a statement field to record it. Until then such a splice is refused at its first commitment, by every co-signer, as *the group has not authorised buying liquidity for this channel* |
| 10 | the documents, and `GroupLightningRollout.LIQUIDITY_ENABLED` is **off**. Phase 8 passed, which is what the plan named for it, but Phase 0's mainnet half was not run: ACINQ's LSP has not been seen to accept a splice in which our funding key does not change, nor its rates read. Both need a node on mainnet and a purchase with real money, which is the owner's to make. Until then the button is not shown and the operator's node buys nothing; every co-signer checks a purchase regardless, so the group is ready when it lifts |
| 10 | the documents, and `GroupLightningRollout.LIQUIDITY_ENABLED` is **on, on mainnet, by decision**, ahead of the mainnet half of Phase 0. Phase 8 passed, which is what the plan named for the gate, but ACINQ's LSP has not been seen to accept a splice in which our funding key does not change, nor its rates read; the first purchase on mainnet is that check. If ACINQ refuses, the splice aborts before anything is signed into it, the snapshot reports the purchase failed with lightning-kmp's reason, and the group's money is where it was. What bounds a purchase meanwhile: `MAINNET_CHANNEL_CAP`, which every co-signer holds the new funding output to, the fee cap the group signs, and S1 to S6 on every device. Every member's device needs this build: one on an older build refuses the splice, and after it every commitment on the new output |
| what the plan said | what it turned out to be |
|---|---|