Repository navigation
chore: update breez sdk to 0.28.3 - #1312
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c15b1fce23
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
[High impact] No new actionable issue remains beyond the overlapping Spark-send risk explicitly deferred by ovitrif. SummaryUpdates Breez SDK to
Diagram%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Unlisted pre-restore invoice] --> B{Operators answer?}
B -->|Error or any send| C[Refuse payment]
B -->|No send| D{Direct Spark transfer possible?}
D -->|Yes or check fails| C
D -->|No| E[Continue normal send checks]
Reviews (7) · Last reviewed commit: "chore: breez sdk 0.28.3" · Reviewed by Greptile |
|
SwiftFormat crashed on the runner (exit code 139) before linting, so I reran the job; nothing in the diff changed. |
|
Milestone 3.2.0: this PR is the iOS twin of synonymdev/bitkit-android#1893 and moves the Spark integration to Breez SDK 0.28.3, which adds |
{"kind":"bitkit-retarget-execution-v1","repository":"synonymdev/bitkit-ios","pr":1312,"generation":"43261280463-1","sourceSha":"96225a120f3e60673506f483d78237fd8cea485e","sourceRef":"master","owner":"github-actions[bot]"}
|
The retarget e2e run stopped at its merge-checkout check: the checked-out merge no longer matched the PR base after the retarget to |
{"kind":"bitkit-retarget-execution-v1","repository":"synonymdev/bitkit-ios","pr":1312,"generation":"43261975464-1","sourceSha":"96225a120f3e60673506f483d78237fd8cea485e","sourceRef":"96225a120f3e60673506f483d78237fd8cea485e","owner":"github-actions[bot]"}
talosmachina
left a comment
There was a problem hiding this comment.
No findings. Bumps the Breez SDK to 0.28.3 and lets the restore hold pay a pre-restore invoice once the Spark operators show no Lightning send of it and, on a Spark-preferring build, the SDK quotes no Spark transfer for it. Reviewed c15b1fc, full tier, static: iOS does not build on this reviewer's Linux host, so this is reasoned from the code, the SDK source and CI.
What I checked, and 5 candidates I ruled out
Read in full: the diff of LightningService.swift, SparkManager.swift, ChannelFreeRailTests.swift, the package pins; settledEarlierAttempt whole at this head.
SDK source checked (breez/spark-sdk at tag 0.28.3): fetch_lightning_send_status in crates/breez-sdk/core/src/sdk/payments/lightning_send_status.rs, prepare/bolt11.rs, the Spark address extraction in crates/spark/src/services/lightning.rs.
CI: SwiftFormat green on its rerun (the first run segfaulted inside swiftformat_linux, exit 139, not a lint finding). e2e-status is red because the retarget run's build-local stopped at "Checked-out merge does not match the PR's current base and head", a checkout precondition, before any test ran. Run Tests and the integration tests were still pending when this was written.
Ruled out
- Transfer check proxy: the SDK sets
spark_transfer_fee_satstoSome(0)exactly when it extracts a Spark address from the invoice, sopaysBySparkTransfer(prefersSpark:sparkTransferFeeSats:)matches what apreferSparksend does, and it only prepares a payment whenprefersSpark(regtest). - "No send" read too loosely: the SDK returns no status only for an empty preimage request list, an unknown status is an error, and any returned request is
Failed.refuseUnverifiedRestoredInvoicerefuses on every status and on every thrown error, rethrowing its own refusal unchanged. - Dropping the unseeded refusal leaves a gap: the restore entry point sets
sparkHistoryUnseededSinceKeyandsparkRestoredAtKeytogether (LightningService.swift:1217), andclearSparkRestoreclears both, so an invoice the removed branch refused still reaches the operators' check. - Rail not started: falling back to
channelFreePaymentHistorykeeps the operators reachable while the send rail is down, and with neither set but Spark supported it throwsChannelFreeRailUnavailableand refuses, whichtestAPreRestoreInvoiceIsRefusedWhenNoSparkRunsToAskcovers. - Node already paid it: the operators are still never asked when the node's row is succeeded (
isPaidOverTheNode), so a paid invoice reads as paid rather than refused.
Merge confidence: 3/5, no findings, but e2e-status is red on a checkout mismatch rather than a test and the unit suite had not reported when this was written.
Reviewer model: Claude Opus 5.5
Reasoning effort: Not exposed (the run metadata available to this reviewer does not carry it)
coreyphillips
left a comment
There was a problem hiding this comment.
Two independent reviews, nothing blocking a merge.
worth doing, does not block
- No test covers paying while Spark can't list right after a restore (BitkitTests/ChannelFreeRailTests.swift:1387-1394)
{"kind":"bitkit-retarget-execution-v1","repository":"synonymdev/bitkit-ios","pr":1312,"generation":"43264850905-1","sourceSha":"95a29d0946783ed0504ab77905c6930e12da38b9","sourceRef":"95a29d0946783ed0504ab77905c6930e12da38b9","owner":"github-actions[bot]"}
|
Restarted the retarget E2E with a fresh dispatch: the earlier run and its rerun both stopped at the checkout check, because master moved after the merge sha was taken. No test had run. |
{"kind":"bitkit-retarget-execution-v1","repository":"synonymdev/bitkit-ios","pr":1312,"generation":"43265844771-1","sourceSha":"95a29d0946783ed0504ab77905c6930e12da38b9","sourceRef":"95a29d0946783ed0504ab77905c6930e12da38b9","owner":"github-actions[bot]"}
|
Closing and reopening this PR to make GitHub rebuild its merge commit. It still merged onto the old Spark base (bbf02ca) after the retarget to master, so the retarget E2E stopped at its checkout check every time. Approvals and code stay as they are. |
{"kind":"bitkit-retarget-execution-v1","repository":"synonymdev/bitkit-ios","pr":1312,"generation":"43267063350-1","sourceSha":"95a29d0946783ed0504ab77905c6930e12da38b9","sourceRef":"95a29d0946783ed0504ab77905c6930e12da38b9","owner":"github-actions[bot]"}
|
Reopened this PR twice more to clear stale checks. The runs the first reopen started had checked out the old merge commit and failed their checkout check, and a rerun repeats that commit. So the first reopen rebuilt the merge commit on current master (21e87d6), and the second started fresh E2E and integration runs on it. Code and approvals are unchanged. |
|
Closing and reopening to rebuild the merge ref on current master (#1309 just merged), then rerunning the retarget E2E so the failed |
{"kind":"bitkit-retarget-execution-v1","repository":"synonymdev/bitkit-ios","pr":1312,"generation":"43305067817-1","sourceSha":"caf4f7d215bd436962025d1e6332c2df6cc36205","sourceRef":"caf4f7d215bd436962025d1e6332c2df6cc36205","owner":"github-actions[bot]"}
|
Merging: approved on this head; required checks green on a merge with current master (SwiftFormat crash, one ProfileRecovery UI test and the @transfer_2 E2E case passed on rerun); no open threads. |
Description
fetchLightningSendStatus, which asks the Spark operators whether this wallet sent an invoice over Lightning, without the local payment list.PaymentTokenMetadata, with extra fields. Bitkit doesn't use it. The rest is docs and CLI samples.fetchLightningSendStatusbefore paying:sparkHistoryUnseededSincestays, so the sends Spark lists keep holding the node across a relaunch.Breez docs caveat:
fetchLightningSendStatussees only Lightning sends. A payment the SDK made as a direct Spark transfer to the invoice's Spark address isn't found, which is why "no send" pays only when that can't have happened. A Spark-preferring send pays that address by transfer, and Bitkit prefers Spark only on regtest, so on mainnet "no send" always pays and the extra check never runs.Design
N/A — no UI changes.
Preview
N/A
QA Notes
Automated Checks
ChannelFreeRailTests, for a valid invoice dated before the restore, with the operators' calls counted:testOnlyASparkPreferringSendPaysAnInvoicesSparkAddressByTransfercovers the four combinations of the transfer check.ChannelFreeRailTestsandSparkConfigTestspass locally on a simulator; SwiftFormat lint is clean.