Repository navigation
Conversation
|
QA: 🟢 Receive on an empty wallet, Send from a lightning: link, Receive more than the channel holds (splice-in), Transfer to savings, Phone to phone, Send while the primary is offlineReceive on an empty wallet On an empty wallet, Receive › Spending › Receive Lightning Funds opens the amount editor. A 20,000-sat invoice comes from the primary, the outside wallet pays it, and Received Instant Bitcoin shows. The primary opened a 30,000-sat channel with zero confirmations.
Send from a lightning: link A 5,000-sat invoice from the outside wallet, opened as a
Receive more than the channel holds (splice-in) With about 15,000 sats of inbound, a 25,000-sat receive goes through the primary. The primary spliced 35,000 sats into the same channel (30,000 to 65,000) and forwarded the payment; no second channel opened.
Transfer to savings Spending › Transfer To Savings moves the spending balance to savings. The channel closed cooperatively and the close confirmed on chain.
Phone to phone The Android build of pair PR synonymdev/bitkit-android#1728 pays a 10,000-sat invoice from this build. Both phones are clients of the same primary, which forwarded the payment between their channels. Android left, iOS right, time-aligned.
Send while the primary is offline With the primary stopped, paying a 1,000-sat invoice from the Android build waits on Connecting to Network, since the primary is the wallet's only peer. Once the primary is back, the wallet reconnects, shows the confirm screen, and the payment completes.
Findings:
Not run:
|
d4d1eba to
07e5199
Compare
|
Closing, I won't be exploring this direction via these PRs. |
Twin: synonymdev/bitkit-android#1728
This PR tries Corey's Lightning-first approach on mainnet, next to the Spark drafts (synonymdev/bitkit-android#1697, #1128). Bitkit runs ldk-node built from coreyphillips/ldk-node
feat/lfbw-wallet-clientand uses a primary node as its liquidity provider: the primary opens a channel just in time, or grows the existing one by splicing, from its own on-chain funds. Anyone can run a primary; this build points at a Beignet primary run for this test. Where the sunset left Transfer to Spending on manual setup, it now opens a channel with the primary.Description
lfbw-bitkit(Corey's branch plus regenerated Swift bindings, which his branch had not refreshed), whoseLDKNodeFFI.xcframeworkis thev0.7.0-rc.77-lfbw.1release asset.LiquiditySourceInsufficientFunds,LiquidityRequestRejected,LiquidityRequestTimedOut,LiquidityReceiveAmountTooSmall) inAppError.Env.primaryNode(mainnet only):024a6cc6…299c@bore.pub:39101. The primary runs Beignet 0.35.1 with its liquidity-provider role on and zero fees; ldk-node's client dials only TCP, not Tor, so the phones reach it through a public TCP relay. The transport stays BOLT 8 end to end.Builder.setPrimaryNode, which also trusts its zero-conf channels, and connects to it when the node starts. Idle-peer cleanup leaves it connected, so an empty wallet can receive.receiveViaPrimary) when no ready channel has the inbound for it: the primary opens a channel on the first payment, or splices into the existing one when the payment is larger than its inbound. The fee ceiling is the primary's quote. Without an amount, Receive on Spending opens the amount editor, and Receive from the Spending screen opens Receive, instead of the Transfer Unavailable screen.PRIMARY_NODE_URIconfig value (Info.plist build setting, or the launch environment in debug) that overrides the primary, so regtest builds can point at a local primary.Out of Scope
Services/LightningService.swift: the primary is hardcoded; choosing or scanning another primary is not built.Risks for review
setPrimaryNodeadds the primary totrustedPeersNoReserve, the setting that made ldk-node skip broadcasting force closes with Blocktank peers. A force close with the primary may stall until the primary broadcasts.bore.pubrelay; when either is down, receiving beyond existing inbound fails.Design
N/A — no design available.
Preview
N/A
QA Notes
Setup
xcodebuild -scheme Bitkit -configuration Release -destination generic/platform=iOS(Release runs on mainnet), on a fresh wallet. The build replaces any installedto.bitkitdevelopment build and keeps its wallet.bitkit.to:9999, liquidity provider on, reached at024a6cc6…299c@bore.pub:39101.Journeys
N/A — not drivable; see Manual Tests.
Manual Tests
Automated Checks
ReceiveLiquidityDecisionTests.swift— a primary covers fixed amounts without channels and needs no extra liquidity actionEvidence
Release builds for device with the app, notification and widget targets; the test target compiles (
build-for-testing). Unit tests run on CI only, since this machine runs no simulators.The relay carries Lightning: a second Beignet node completed the BOLT 8 handshake with the primary through
bore.pub:39101.Regtest run with recordings: feat: lightning-first primary node #1160 (comment)
Gaps
Models used
claude-opus-5-5(reasoning:Not exposed)claude-opus-5-5(reasoning:Not exposed)