Repository navigation
fix: only fee-bump transactions the wallet broadcast - #1706
Conversation
Codex Review SummaryThis 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: 3eff12b36e
ℹ️ 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".
[Medium impact] The behavior change is limited to on-chain transaction boosting. The PR appears safe to merge, with a non-blocking request to test the new rejection rule. Findings
SummaryUpdates
Acknowledged scope from
Reviews (1) · Last reviewed commit: "fix: name the missing broadcast record i..." · Reviewed by Greptile |
talosmachina
left a comment
There was a problem hiding this comment.
No findings. Bumps ldk-node-android to 0.7.0-rc.78, so bumpFeeByRbf refuses any txid this wallet did not build and broadcast, and maps the new NodeException.TransactionNotBroadcastByWallet in LdkError. Reviewed 3eff12b, full tier (dependency manifest). Static review: the auto review does not build bitkit-android branches.
What I checked, and 5 candidates I ruled out
Read: the v0.7.0-rc.77..v0.7.0-rc.78 diff of synonymdev/ldk-node (src/wallet/mod.rs, src/payment/onchain.rs, src/error.rs, bindings/ldk_node.udl, the generated Kotlin), Errors.kt, BoostTransactionViewModel.kt, the boost gating in ActivityDetailScreen.kt, and the send path in LightningService.kt / OnchainSendAttemptStore.kt.
Release: tag v0.7.0-rc.78 is 1976754, published, and contains the merge of synonymdev/ldk-node#129 (e794b35).
CI at review time: lint, detekt, build-local green; build and the e2e shards (including onchain_boost_receive_widgets and send) still running.
Ruled out
- Bitkit's own sends get no broadcast record: Bitkit never calls
send_to_address; every on-chain send goes throughprepareSendToAddress/prepareSendAllToAddressandPreparedOnchainSend.broadcast()(LightningService.kt:991-1017, alsoPaykitPaymentProofRepo.kt:578). rc.78 callsrecord_broadcast_txidinsidebroadcast()before dispatch (onchain.rs:224), so a send made after the update is boostable. - Boosting a boost: the RBF and CPFP paths record the replacement/child txid before broadcasting, and cancel the wallet tx if the record write fails, so a second RBF on the replacement still passes the check.
- Record lost on restore: the record is written through the node's
kv_store, which Bitkit builds as the VSS store (buildWithVssStore), so it travels with the rest of the node state. - FFI error index shift:
TransactionNotBroadcastByWallettakes index 59 and every laterNodeExceptionmoves up one, but reader and writer ship together in the same AAR, and the app matches by type (PaykitPaymentProofRepo.kt:762,QuickPayRepo.kt:845), never by index. - Sends from before the update can no longer be boosted: they fail into the existing generic boost-error toast. Stated under Out of Scope, so deliberate.
Merge confidence: 4/5, no findings, but the dependency bump has no automated test of the Boost path, the build and e2e shards had not finished, and manual tests 1 to 3 are unrun.
Regtest APKDownload bitkit-dev-debug universal APK (expires in 30 days). |
|
Pushed 2a08963: adds |
|
Pushed 5996ce1: |
jvsena42
left a comment
There was a problem hiding this comment.
Code scan: no HIGH or MEDIUM.
- Every legitimate bump still works: RBF on your own sends (all app sends go through the prepared broadcast, including recovery re-preparation), CPFP on received transactions, and bumps after a restore, since the broadcast record lives in the VSS store.
- Hardware-wallet sends and transfers stay excluded from Boost.
- A counterparty-crafted RBF is refused with nothing queued.
- Sends made before the upgrade (v3.0.0 ships ldk-node rc.74) can no longer be bumped, which the PR body acknowledges.
Performance-relevant: ldk-node rc.78 adds a synchronous VSS write (record_broadcast_txid) to every send and boost. That is one extra round trip normally, and up to 180 s of retries when VSS is degraded.
Device gate (partial): not run yet. Pending: boost/rbf-own-send.xml and boost/cpfp-receive.xml, and timing a send against master on the same network.
|
Device gate (partial):
Still running: the negative check (a transaction the wallet didn't broadcast offers no RBF), and send timing against master for the ldk-node rc.78 broadcast-record write. |
jvsena42
left a comment
There was a problem hiding this comment.
Approving. The code scan had no HIGH or MEDIUM, and the device gate passed.
Device gate: 5996ce1 (CI APK), Gate_Throwaway emulator, regtest on staging. The wallet was created and funded on master, then upgraded in place to this build.
-
boost/rbf-own-send.xml: pass. The fee went from 141 to 422 sat, the TXID changed, the activity shows "BOOSTED TRANSACTION 1 (RBF)", and it confirmed after mining. The re-run was needed because a shared staging block confirmed the first send before the Boosting status could be seen. -
boost/cpfp-receive.xml: pass. A Boost Fee entry appeared, the receive kept its TXID, and both confirmed. -
Negative check: an incoming payment offers only CPFP.
-
A send broadcast before the upgrade still opens the RBF sheet. The swipe then fails with "this wallet has no broadcast record for it" and the generic "Boost Failed" toast. The PR body already lists this as out of scope.
-
Upgrading an on-chain-only wallet from ldk-node rc.77 to rc.78 kept the node starting, the history intact, and sends and boosts working.
-
Perf, 6 sends per build, alternating builds:
this PR master Swipe to "Accepted on-chain send", median 1.95 s 1.75 s "Created new transaction" to "Successfully broadcast", median 0.234 s 0.168 s The ~65 ms difference is about one VSS round trip, from the new broadcast-record write.
Observation, not from this PR: right after a boost, the activity list shows the boost sheet's estimate until the next sync (-10 626 for RBF against an actual 10 422).
CI is green at 5996ce1.
Twin: synonymdev/bitkit-ios#1140
Refs: synonymdev/ldk-node#129
This PR updates LDK Node to
0.7.0-rc.78, which contains synonymdev/ldk-node#129, so Boost only replaces outgoing transactions this wallet sent.Description
ldk-node-androidto0.7.0-rc.78ingradle/libs.versions.toml. After it,bumpFeeByRbfreplaces only transactions the wallet built and broadcast. Any other transaction ID returns the newNodeException.TransactionNotBroadcastByWalletbefore a replacement is built.NodeException.TransactionNotBroadcastByWalletinErrors.ktto "No broadcast record for this transaction", next to the other LDK Node errors.Out of Scope
app/src/main/java/to/bitkit/ui: a dedicated Boost error message. The new error reaches the user through the existing LDK Node error text.Design
N/A — no UI changes.
Preview
N/A — no user-visible UI change.
QA Notes
Setup
Regtest with on-chain funds, on a build of this PR.
Journeys
journeys/boost/rbf-own-send.xml— boost an unconfirmed send this wallet made: the replacement keeps the amount, raises the fee, gets a new TXID and confirms — passed at 5996ce1 (@jvsena42's run)journeys/boost/cpfp-receive.xml— boost an unconfirmed incoming payment: a Boost Fee child appears, the receive keeps its TXID and both confirm — passed at 5996ce1 (@jvsena42's run)Manual Tests
0.7.0-rc.77with an existing wallet and channels → the node starts, channels reconnect and balances match — upgrade path not in CapabilitiesAutomated Checks
compileDevDebugKotlinandtestDevDebugUnitTestagainst the published0.7.0-rc.78; both pass, including the newNodeException.TransactionNotBroadcastByWalletmapping.Gaps