Repository navigation
chore: update breez sdk to 0.28.3 - #1893
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. |
[High impact] The PR appears safe to merge; no actionable issues were found. SummaryUpdates
Diagram%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Older invoice after restore] --> B{Local history shows paid or pending?}
B -->|Yes| C[Keep existing paid or pending result]
B -->|No| D{Operators report no Lightning send?}
D -->|Send found, error, or disconnected| E[Refuse payment]
D -->|No send| F{Spark preferred and address present?}
F -->|Yes or address check fails| E
F -->|No| G[Continue through final send checks]
Reviews (1) · Last reviewed commit: "chore: breez sdk 0.28.3" · Reviewed by Greptile |
|
Milestone 3.2.0: this PR moves the Spark integration to Breez SDK 0.28.3, which adds |
Regtest APKDownload bitkit-dev-debug universal APK (expires in 30 days). |
talosmachina
left a comment
There was a problem hiding this comment.
No findings. Bumps breez-sdk-spark 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 it cannot have gone out as a direct Spark transfer. Reviewed 56d5781, full tier, static: per this repo's track rules an automated review does not build the branch, 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 SparkRepo.kt, SparkService.kt, CacheStore.kt, BackupRepo.kt, SparkRepoTest.kt, SparkServiceTest.kt; LightningRepo.payInvoice around the holdsRestoredInvoices() call.
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, the Spark address extraction in crates/spark/src/services/lightning.rs, prepare/bolt11.rs.
CI: build-and-test, lint, detekt, build-local, compose-ui green; the e2e shards were still running when this was written.
Ruled out
- Spark address hint constant:
SPARK_ADDRESS_HINT_SCID(17592187092992000001) equalsRECEIVER_IDENTITY_PUBLIC_KEY_SHORT_CHANNEL_ID, and the SDK finds the address the same way, by any route hint hop carrying that scid, socarriesSparkAddressagrees with what a Spark-preferring send pays. - "No send" read too loosely: the SDK returns
Noneonly for an empty preimage request list, an unknown request status is an error, and any returned request isFailed, whichisUnsentPerOperatorsrefuses. Every failure path (error, not connected, unparseable invoice) returns false and refuses. - Dropping the unseeded refusal leaves a gap: both restore paths in
BackupRepo(lines 1086 and 1251 at this head) setsparkHistoryUnseededSinceandsparkRestoredAtin the same update, so any invoice the removed check refused is still caught byrefuseUnverifiedRestoredInvoice, now with the operators' answer.holdsRestoredInvoices()narrowing tosparkRestoredAttherefore still decodes the invoice whenever the hold applies. - Upgraded installs carrying only the old marker: both markers came in on unreleased commits (no tag contains them), so no shipped install holds
sparkHistoryUnseededSincewithoutsparkRestoredAt. - A default that pays: the test fake's status fetch throws unless a test sets an answer, so a case that forgets to stub it is refused, and the new cases cover completed, pending, failed, no send with and without a Spark address or preference, and an unreachable operator on both rails.
Merge confidence: 4/5, no findings and unit CI green, but the e2e shards had not finished and the branch was not built here.
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
- Operators' FAILED status still locks a pre-restore invoice out until it expires (app/src/main/java/to/bitkit/repositories/SparkRepo.kt:1480-1483)
nits
- seedRestoredSendHashes KDoc still describes the removed holds (app/src/main/java/to/bitkit/repositories/SparkRepo.kt:1569-1572). The KDoc says seeding "ends only the wait for Spark's first listing" and that "an older invoice Spark hasn't listed stays refused until it expires". This PR removed the wait for the first listing, and that invoice now pays when the operators show it unsent. The CacheStore and BackupRepo comments were updated, but this one was missed.
- New log line does not start with a verb (app/src/main/java/to/bitkit/repositories/SparkRepo.kt:1481)
|
Merging: CI is green, @coreyphillips approved this head and every thread is answered. The non-blocking points go in follow-up PRs: #1896 (a FAILED operator status no longer locks out a pre-restore invoice) and #1895 (overlapping Spark sends of one invoice). |
|
@coreyphillips the stale |
Description
breez-sdk-sparkfrom 0.28.2 to 0.28.3. From 0.28.2 it brings:fetch_lightning_send_status, which asks the Spark operators whether this wallet sent an invoice over Lightning, without the local payment list.fetch_lightning_send_statusbefore paying:sparkHistoryUnseededSincestays for seeding the kept send hashes.Breez docs caveat:
fetch_lightning_send_statussees 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.Design
N/A — no UI changes.
Preview
N/A
QA Notes
Automated Checks
SparkRepoTest, each case on both rails (the node'searlierLightningSendand Spark'spayInvoice) for a valid invoice dated before the restore:SparkServiceTest: only spark-sdk's Spark-address short channel id counts as a Spark address hint.