Skip to content

fix: preserve boosted activity fee rates - #1429

Draft
pwltr wants to merge 1 commit into
masterfrom
codex/fix-rbf-activity-fee-rate
Draft

pwltr wants to merge 1 commit into
masterfrom
codex/fix-rbf-activity-fee-rate

Conversation

@pwltr

@pwltr pwltr commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Related: iOS #485.

This PR preserves outgoing RBF boost fee rates during activity sync so replacement transactions retain the correct confirmation estimate.

Depends on bitkit-core #166. Companion: iOS #879.

Draft dependency gate: the published 0.5.18 SDK does not expose the two new core APIs. Before merging, publish the core fix, update the Android dependency to that release, and rerun integration checks against the released SDK. Current core master includes changes beyond 0.5.18 that must be accounted for during the upgrade. The temporary local SDK build and dependency substitution are deliberately excluded from this PR.

Description

  • Records the replacement transaction ID and selected rate atomically after a successful RBF boost so either replacement arrival order retains the correct fee rate.
  • Uses fee-preserving core updates for payment sync and replacement, reorg, and eviction events so stale snapshots cannot undo the boosted rate.
  • Preserves real transaction fees and wallet-specific metadata instead of rewriting the original activity from an outdated snapshot.
  • Keeps a successful node boost successful if activity persistence fails, and preserves coroutine cancellation.
  • Ports the shared RBF verification journey from iOS and adds focused Android regression coverage.

Out of Scope

Design

N/A — no UI changes.

Preview

BeforeAfter
before.mov
Screen.Recording.2026-10-06.at.17.44.28.mov

QA Notes

Journeys

  • new rbf-replacement-fee-rate.xml — verifies a low-fee outgoing transaction's replacement shows the boosted confirmation estimate, retains its real total fee after sync/reopening, and confirms normally.

The author reproduced the original issue on Android master and manually verified the RBF fix using the local ARM64 core SDK built on a 0.5.18-compatible snapshot. The same fix has been manually verified on iOS; iOS tag/contact carryover and ordinary send/receive checks also passed. The full shared journey remains listed for reviewer execution against the final released SDK.

Manual Tests

N/A

Automated Checks

  • added ActivityServiceRbfTest.kt — verifies the atomic core recording API and fee-preserving payment sync, reorg, and eviction updates.
  • updated ActivityRepoTest.kt — verifies wallet scoping, activity/tag notifications, storage failure propagation, and cancellation.
  • updated BoostTransactionViewModelTest.kt — verifies successful and failed RBF boosts, capturing the submitted rate, and preserving broadcast success after a storage failure; existing CPFP coverage remains passing.
  • ran compile, all 3,351 unit tests, lint, and the dev APK build against the temporary local core SDK — passed; lint reports existing findings in unchanged code. The built APK contained the updated ARM64 core library and was installed and launched on the emulator. CI cannot use the new APIs until the released dependency is updated.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant