Skip to content

refactor(sdk): drop the vestigial v2 suffix from the finalized-transaction surface - #4325

Merged
QuantumExplorer merged 2 commits into
v4.2-devfrom
refactor/drop-v2-suffix
Aug 6, 2026
Merged

refactor(sdk): drop the vestigial v2 suffix from the finalized-transaction surface#4325
QuantumExplorer merged 2 commits into
v4.2-devfrom
refactor/drop-v2-suffix

Conversation

@QuantumExplorer

@QuantumExplorer QuantumExplorer commented Aug 6, 2026

Copy link
Copy Markdown
Member

Issue being fixed or feature implemented

#4323 removed the v1 split build/sign path, so the v2 markers on the finalized-transaction surface no longer disambiguate anything — they were versioning against a counterpart that no longer exists, and they would otherwise fossilize into the released ABI.

What was done?

Pure rename, no behavior change:

  • C ABI: core_wallet_{broadcast,abandon}_signed_transaction_v2core_wallet_{broadcast,abandon}_signed_transaction; core_wallet_signed_transaction_v2_{free,fee,bytes}core_wallet_signed_transaction_{free,fee,bytes}
  • Rust internals: FFICoreSignedTransactionV2FFICoreSignedTransaction, CORE_SIGNED_TRANSACTION_V2_STORAGECORE_SIGNED_TRANSACTION_STORAGE, publish_v2_handlepublish_finalized_handle, plus test names and doc prose
  • JNI + Kotlin externals: coreWalletBroadcastSignedTransactionV2coreWalletBroadcastSignedTransaction, coreSignedTransactionV2*coreSignedTransaction*
  • Docs: parity-manifest symbol entries, PARITY.md, both example-app TEST_PLANs

The public Kotlin/Swift API (FinalizedCoreTransaction, finalizeAtomic, broadcastTransactionWithOutcome, abandonTransaction) was already version-free and is untouched, so app consumers (including dashwallet-ios post-#920) are unaffected. The deferred core_wallet_signed_payment_* family is a distinct name family and unchanged. Unrelated v2s (Room migrations, KeychainSigner TODOs, rs-dpp/rs-drive version modules) are deliberately untouched. Prebuilt host artifacts (xcframework, Android JNI .so) are generated out-of-tree and pick up the renamed exports on their next routine rebuild.

How Has This Been Tested?

  • cargo fmt / cargo clippy --all-targets (no new warnings) / cargo test -p platform-wallet-ffi (235 + 26 + 6 pass)
  • Kotlin: :sdk:compileDebugKotlin, :sdk:compileDebugAndroidTestKotlin, :sdk:testDebugUnitTest green
  • Swift: mac-slice xcframework rebuilt at this commit (regenerated headers carry the new symbols), swift build + SignedCoreTransactionTests (5 tests) green
  • Repo-wide sweep confirms zero remaining references to the old names outside generated xcframework headers

Breaking Changes

None (pre-release symbol rename; no behavior change).

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have added "!" to the title and described breaking changes in the corresponding section if my code contains any
  • I have made corresponding changes to the documentation if needed

🤖 Generated with Claude Code

Summary by CodeRabbit

  • API Updates
    • Renamed finalized transaction operations to use consistent, non-versioned names across wallet integrations.
    • Transaction broadcasting, abandonment, fee lookup, byte retrieval, and cleanup retain their existing behavior.
  • Documentation
    • Updated SDK parity references, error descriptions, and transaction guidance to reflect the current naming.
  • Tests
    • Updated Kotlin and Swift test plans and validation coverage for the renamed transaction operations.

…ction surface

With the v1 split build/sign path removed (#4323), the v2 markers on the
finalized-transaction surface no longer disambiguate anything. Rename,
with no behavior change:

- C ABI: core_wallet_{broadcast,abandon}_signed_transaction_v2 ->
  core_wallet_{broadcast,abandon}_signed_transaction;
  core_wallet_signed_transaction_v2_{free,fee,bytes} ->
  core_wallet_signed_transaction_{free,fee,bytes}
- Rust internals: FFICoreSignedTransactionV2 -> FFICoreSignedTransaction,
  CORE_SIGNED_TRANSACTION_V2_STORAGE -> CORE_SIGNED_TRANSACTION_STORAGE,
  publish_v2_handle -> publish_finalized_handle, test names and doc prose
- JNI + Kotlin externals: coreWalletBroadcastSignedTransactionV2 ->
  coreWalletBroadcastSignedTransaction, coreSignedTransactionV2* ->
  coreSignedTransaction*
- parity manifest entries and QA/parity doc references

The public Kotlin/Swift API (FinalizedCoreTransaction, finalizeAtomic,
broadcastTransactionWithOutcome, abandonTransaction) was already
version-free and is untouched. The deferred core_wallet_signed_payment_*
family is distinct and unchanged. Prebuilt-host artifacts (xcframework,
Android JNI .so) pick up the renamed symbols on their next routine
rebuild; both are generated out-of-tree.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 79a81bd8-aac8-42d6-ab66-616fc1eabe62

📥 Commits

Reviewing files that changed from the base of the PR and between a3551a4 and 8b81b84.

📒 Files selected for processing (1)
  • packages/kotlin-sdk/PARITY.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/kotlin-sdk/PARITY.md

📝 Walkthrough

Walkthrough

The PR renames V2 signed-transaction storage and APIs to non-versioned names across Rust FFI, JNI, Kotlin, and Swift. Parity manifests, documentation, tests, and lifecycle assertions use the renamed symbols.

Changes

Signed transaction API rename

Layer / File(s) Summary
Core storage and lifecycle
packages/rs-platform-wallet-ffi/src/core_wallet/transaction_builder.rs, packages/rs-platform-wallet-ffi/src/handle.rs, packages/rs-platform-wallet-ffi/src/manager.rs
Finalized signed-transaction types, storage, publication, teardown, and lifecycle tests use generic names.
Core FFI operations
packages/rs-platform-wallet-ffi/src/core_wallet/broadcast.rs, packages/rs-platform-wallet-ffi/src/core_wallet/signed_payment.rs
Broadcast, abandon, cleanup, fee, and byte-access functions use non-versioned names and storage.
JNI bridge updates
packages/rs-unified-sdk-jni/src/wallet_manager.rs
JNI exports call the renamed native functions.
Kotlin and Swift SDK bindings
packages/kotlin-sdk/sdk/src/main/kotlin/org/dashfoundation/dashsdk/..., packages/kotlin-sdk/sdk/src/androidTest/..., packages/swift-sdk/Sources/SwiftDashSDK/...
Kotlin and Swift transaction builders and managed wallets use the renamed APIs.
Parity manifests and test plans
docs/sdk/sdk-parity-manifest.json, packages/kotlin-sdk/PARITY.md, packages/kotlin-sdk/KotlinExampleApp/TEST_PLAN.md, packages/swift-sdk/SwiftExampleApp/TEST_PLAN.md
Parity references and test-plan entries use the non-versioned symbols.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Possibly related PRs

Suggested reviewers: shumkov, llbartekll, lklimek

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: removing obsolete V2 suffixes from the finalized-transaction API surface.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor/drop-v2-suffix

Comment @coderabbitai help to get the list of available commands.

@thepastaclaw

thepastaclaw commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

🔍 Review in progress — actively reviewing now (commit 8b81b84)
Stage: Codex precheck starting
ETA: complete ~20:50 UTC (median 20m across 30 recent reviews)
Running 9m · Last checked: 2026-08-06 20:40 UTC

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/kotlin-sdk/PARITY.md`:
- Line 161: Update the parity record entry for SendTransaction to replace
“atomic V2 path” with “atomic finalized-transaction path,” while preserving the
referenced API chain and all other wording.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: a2f124ff-dc67-47f6-bd87-30d141b5fefb

📥 Commits

Reviewing files that changed from the base of the PR and between 99a5ce2 and a3551a4.

📒 Files selected for processing (18)
  • docs/sdk/sdk-parity-manifest.json
  • packages/kotlin-sdk/KotlinExampleApp/TEST_PLAN.md
  • packages/kotlin-sdk/PARITY.md
  • packages/kotlin-sdk/sdk/src/androidTest/kotlin/org/dashfoundation/dashsdk/wallet/CoreTxBuilderOpReturnBindingTest.kt
  • packages/kotlin-sdk/sdk/src/main/kotlin/org/dashfoundation/dashsdk/errors/DashSdkError.kt
  • packages/kotlin-sdk/sdk/src/main/kotlin/org/dashfoundation/dashsdk/ffi/WalletManagerNative.kt
  • packages/kotlin-sdk/sdk/src/main/kotlin/org/dashfoundation/dashsdk/wallet/CoreTransactionBuilder.kt
  • packages/kotlin-sdk/sdk/src/main/kotlin/org/dashfoundation/dashsdk/wallet/ManagedCoreWallet.kt
  • packages/rs-platform-wallet-ffi/src/core_wallet/broadcast.rs
  • packages/rs-platform-wallet-ffi/src/core_wallet/signed_payment.rs
  • packages/rs-platform-wallet-ffi/src/core_wallet/transaction_builder.rs
  • packages/rs-platform-wallet-ffi/src/handle.rs
  • packages/rs-platform-wallet-ffi/src/manager.rs
  • packages/rs-unified-sdk-jni/src/wallet_manager.rs
  • packages/swift-sdk/Sources/SwiftDashSDK/PlatformWallet/CoreWallet/CoreTransactionBuilder.swift
  • packages/swift-sdk/Sources/SwiftDashSDK/PlatformWallet/CoreWallet/ManagedCoreWallet.swift
  • packages/swift-sdk/Sources/SwiftDashSDK/PlatformWallet/PlatformWalletResult.swift
  • packages/swift-sdk/SwiftExampleApp/TEST_PLAN.md

Comment thread packages/kotlin-sdk/PARITY.md Outdated
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@QuantumExplorer
QuantumExplorer merged commit 4543673 into v4.2-dev Aug 6, 2026
1 check passed
@QuantumExplorer
QuantumExplorer deleted the refactor/drop-v2-suffix branch August 6, 2026 20:38
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.

2 participants