Repository navigation
Test Spark Lightning sends and on-chain deposits - #319
Conversation
talosmachina
left a comment
There was a problem hiding this comment.
No findings. Adds @spark_2 (Lightning send from Spark, settlement checked at the fixture's LDK node, fee and balances reconciled) and @spark_3 (on-chain deposit from mempool to confirmation, claim fee read from the UI, balance and single history row checked again after relaunch), plus the local-backend verbs they need, and makes the launcher run the whole Spark spec. Reviewed 1f4fcb1, full tier.
What I checked, and 6 candidates I ruled out
Read in full: test/specs/spark.e2e.ts, the spark-* cases of scripts/local-backend, scripts/run-spark-e2e.sh; against the pinned bitkit-docker@a73f84c: spark (send, tx, invoice, api), spark-regtest/scripts/fund.sh, lib.sh, miner.sh, spark-regtest/compose.yml.
Helpers traced: ciIt, waitForWalletHomeCondition, tryDismissQuickPayIntroIfVisible, enterAmount, getAmountUnder, launchFreshApp, getClipboardPlaintext.
Build: skipped: talos-pr-run could not confirm the author's permission on this repo and fails closed, so this review is static. The PR has no checks on this repo; the evidence is the linked nightly runs.
Ruled out
spark-fundtxid parse:fund.shlogs[fund] sent <sats> to <addr> in <txid>as its last line and-m 0skips the mine, so([a-f0-9]{64})$matches and the tx is still unconfirmed for the mempool assertion.- Mempool state racing a block: the pinned miner defaults to
SPARK_BLOCK_INTERVAL_SECONDS=0, mining only on request once the stack is ready, soin the mempoolholds untilspark-mine. did not answerretry never matching:execFilerejects with stderr in the message, and the pinnedapi()writes exactly that text when esplora has not indexed the tx yet.spark-txoutput shape:spark txprints the transaction object, then one compact line per outspend;jq -s '.[0]'keeps the transaction only.- Expected 6 sat send fee: 2 sats + 4,000 ppm of 1,000 sats is 6, and funding exactly 1,006 sidesteps the provider's missing leaf swap, as the comment says.
beforeEachwithciItskips: a skippedciItdoes not run the hook, and the launcher unsetsCI, so every attempt reinstalls and runs all three cases.
Merge confidence: 4/5, no findings, but nothing was built or run here and the repo runs no CI on the PR.
|
@ovi-reviewer review |
There was a problem hiding this comment.
Verdict: ✅ Approve
Findings:
- LOW
test/specs/spark.e2e.ts:121The Android deposit-history assertion can miss a duplicate below the fold, including after relaunch. Count entries across the full deposit list.
QA for 1f4fcb1:
The Android nightly dispatch ran the full Spark spec at this commit. The iOS cases ran on iOS 27.0 with XCUITest 12.20.0 and a simulator-only Electrum port override for the isolated fixture. iOS app at c52c593
Receive Lightning into Spark on Android ✅ The nightly verified the 10,000-sat credit in activity, Spending and Spark.
Send Lightning from Spark on Android ✅ The nightly verified settlement of 1,000 sats, a 6-sat activity fee and zero final balances.
Confirm an on-chain Spark deposit on Android ✅ The nightly verified confirmation of the 100,000-sat deposit and checked the net credit and visible history after relaunch.
Receive Lightning into Spark on iOS ✅ Appium verified the 10,000-sat credit in activity, Spending and Spark.
ios-spark-receive.2x.mp4
Send Lightning from Spark on iOS ✅ The fixture verified settlement of 1,000 sats, and Appium verified the 6-sat fee and zero final balances.
ios-spark-send.2x.mp4
Confirm an on-chain Spark deposit on iOS ✅ The fixture verified the 100,000-sat output from mempool to confirmation, and Appium verified the net credit and deposit entry after relaunch.
ios-spark-deposit.2x.mp4
Full review of f148eab…1f4fcb1, covering all four changed files. The README was checked against the launcher and the two nightly workflow definitions.
Reviewed by gpt-6.2-sol-high
talosmachina
left a comment
There was a problem hiding this comment.
Re-review of be1fd44 after 1f4fcb1. My earlier review had no findings. The one new commit makes the Android single-deposit check count the whole history: it scrolls SparkScrollView to its end, then asserts SparkBalance is still on screen before counting SparkDeposit rows. That answers the open point from @ovi-reviewer about UiAutomator2 leaving offscreen rows out. No new findings. Full tier, diff since 1f4fcb1.
What I checked, and 3 candidates I ruled out
Read: getSparkDepositClaimFee whole at be1fd44 and both of its @spark_3 call sites (before and after relaunch); SparkDetailScreen.kt in bitkit-android at 69931fb9, the master commit the nightly ran.
Build: skipped. talos-pr-run could not check the author's permission on this repo and fails closed, so this review is static. The repo runs no CI on the PR, and the PR body's passing nightly is for 1f4fcb1, not this head.
Ruled out
- Rows hidden under the fixed transfer buttons: on Android the buttons sit in their own
Columnbelow thePullToRefreshBox, outsideSparkScrollView, so they cannot cover a row inside the scroll viewport. - Balance-plus-end not covering every deposit: at
69931fb9the deposits section is the first thing after theSparkBalancerow, so with the view scrolled to its end and the balance row displayed, every deposit row is between them and inside the viewport. - A scroll loop that never ends on short content:
mobile: scrollGesturereturnsfalsewhen the element cannot scroll any further, including when it never could, so a fresh wallet whose details fit on one screen passes on the first iteration.
Merge confidence: 4/5. Still no findings, but nothing was built or run here, and nothing has run this head on a device that the PR shows.
There was a problem hiding this comment.
Verdict: ✅ Approve
Findings: None. The Android deposit-history check now reaches the end of the list and verifies the balance above it is still visible before counting deposits. The new assertion also rejected a second deposit in the author's Android 13 run. Resolved thread
QA for be1fd44:
Confirm an on-chain Spark deposit on Android ✅ The hosted Android 13 run passed the updated deposit history check before and after relaunch.
The exact E2E head passed on the first attempt. Android nightly job
Confirm an on-chain Spark deposit on iOS ✅ The 135-sat claim fee, 99,865-sat net credit and single matching deposit persisted after relaunch.
The fixture verified the 100,000-sat output from mempool to confirmation. Appium verified the displayed fee, balance and deposit history on iOS 27.0.
ios-spark-deposit.2x.mp4
The same Android job also passed Lightning receive and send. Both unchanged iOS Lightning cases passed at 1f4fcb1. Earlier review and recordings
The 1f4fcb1…be1fd44 delta changes only the deposit helper. The Android and iOS deposit cases exercise the whole change.
Reviewed by gpt-6.2-sol-high
Summary
@spark_2sends a Lightning payment from a fresh Spark wallet. It verifies settlement at the fixture’s Lightning node and reconciles the outgoing activity, fee, and wallet balances.@spark_3follows one Spark deposit from the mempool to confirmation. It verifies the credit against the displayed claim fee and checks that the balance and single history entry persist after relaunch.The shared fixture in #317 and the Android nightly have merged. The iOS nightly has also merged. Both scheduled workflows now use the launcher on E2E
main.Local validation
1f4fcb1, all three Spark cases passed on an iPhone 17 simulator running iOS 27.2, Xcode 27.2, and XCUITest 12.20.0. The run used the cached ARM64 simulator app from iOS run 44713976121 and the pinnedbitkit-dockerfixture ata73f84c.2f82c25. The iOS 26.0 simulator passed at1de58ca.Android nightly validation
The November 24 nightly received the payment, then failed to read the detailed Spark balance on all three attempts. The fixed transfer buttons clipped the amount while the balance row was already visible. Failed run
Commit 1f4fcb1 checks the visibility of the amount and scrolls it into view before asserting the value. The hosted Linux nightly checked out this exact commit and ran all three Spark cases against Android
masterat69931fb9. All three passed on the first attempt in 5m 11s. Passing Android runAt
be1fd44, the hosted Android nightly again passed all three Spark cases on the first attempt. With two confirmed deposits on a local Android 13 emulator, the history assertion correctly failed withExpected: 1, Received: 2. The same wallet had passed the one-deposit check before and after relaunch. Final Android run · Review fix and evidence