Skip to content

[#1677] Add multi-server transaction submission#34

Closed
czarcas7ic wants to merge 2 commits into
adam/auto-manual-modefrom
adam/multi-server-submit-v2
Closed

[#1677] Add multi-server transaction submission#34
czarcas7ic wants to merge 2 commits into
adam/auto-manual-modefrom
adam/multi-server-submit-v2

Conversation

@czarcas7ic

@czarcas7ic czarcas7ic commented Apr 14, 2026

Copy link
Copy Markdown

Closes: zodl-inc#1677

Depends on the auto/manual connection-mode branch.
Depends on the merged Swift SDK Broadcaster API work for the new SDK APIs.

Summary

  • Transactions are now created locally and broadcast through the shared multi-server submission path
  • First successful response wins, eliminating single-server failure as a blocker
  • Remaining servers get a 5-second grace period for best-effort propagation
  • 30-second global timeout as safety net
  • Normal send, Keystone (PCZT) send, auto-shielding, Flexa, and swap-and-pay now use the same create-and-submit infrastructure
  • Automatic mode broadcasts to all known servers; manual mode submits to the user's selected server only

Draft dependency note: Package.swift intentionally uses a local SDK path while this PR waits for a tagged Swift SDK release containing the Broadcaster APIs. The upstream merge commit is 348a9dfff2604f986590c64272ce12dd4a83c943, but pinning that commit directly is not buildable yet because the SDK source currently expects unpublished libzcashlc symbols. Before merge, this should be switched back to the tagged SDK release once available.

Behavior note: Per-transaction partial-submit status is no longer stored in SendConfirmation state. If a later transaction in a multi-transaction proposal fails after local creation, the send flow falls back to the existing pending/failure result presentation instead of surfacing per-transaction status strings.

Testing

  • Wired the new APIs into zodl.
  • Tested both regular and Keystone send paths with multi-server broadcast.
  • Verified automatic mode (9 servers) and manual mode (1 server) on physical device.
  • Added automated coverage for regular multi-transaction submission, all-server rejection, endpoint selection, direct submission helper behavior, first-success behavior, and the PCZT broadcaster/reset path.
  • git diff --check
  • swift package --package-path modules dump-package
  • xcodebuild -list -project secant.xcodeproj
  • Focused xcodebuild test is currently blocked before zodl code by the untagged SDK package artifact mismatch described above.

Video from testing:

https://screen.studio/share/1mgC0NYH

If you check the logs in the video, we can see a perfect example of why this feature is good, as one of the endpoints was faulty with an Orchard anchor error, but the other endpoints successfully submitted it.


Author

  • Self-review: Did you review your own code in GitHub's web interface?
  • Does the code abide by the Coding Guidelines?
  • Automated tests: Did you add appropriate automated tests for any code changes?
  • Code coverage: Did you check the code coverage report for the automated tests?
  • Documentation: Did you update Docs as appropriate?
  • Run the app: Did you run the app and try the changes?
  • Did you provide Screenshots of what the App looks like before and after your changes as part of the description of this PR?
  • Rebase and squash: Did you pull in the latest changes from the main branch and squash your commits before assigning a reviewer?

Reviewer

  • Checklist review: Did you go through the code with the Code Review Guidelines checklist?
  • Ad hoc review: Did you perform an ad hoc review?
  • Automated tests: Did you review the automated tests?
  • Manual tests: Did you review the manual tests?
  • How is Code Coverage affected by this PR?
  • Documentation: Did you review Docs, README.md, LICENSE.md, and Architecture.md as appropriate?
  • Run the app: Did you run the app and try the changes?

@czarcas7ic czarcas7ic changed the title [1677] Add multi-server transaction submission [#1677] Add multi-server transaction submission Apr 14, 2026
@czarcas7ic czarcas7ic force-pushed the adam/auto-manual-mode branch 2 times, most recently from 205f176 to a07749f Compare May 4, 2026 20:27
@czarcas7ic czarcas7ic force-pushed the adam/multi-server-submit-v2 branch 2 times, most recently from 6e24219 to dfee2c8 Compare May 4, 2026 22:25
Comment thread modules/Package.swift
.package(url: "https://github.com/pointfreeco/swift-url-routing", from: "0.6.2"),
.package(url: "https://github.com/zcash-hackworks/MnemonicSwift", from: "2.2.5"),
.package(url: "https://github.com/zcash/zcash-swift-wallet-sdk", from: "2.4.9"),
.package(path: "../../zcash-swift-wallet-sdk"),

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

This will change once zcash/zcash-swift-wallet-sdk#1678 is merged and tagged.

@czarcas7ic czarcas7ic force-pushed the adam/auto-manual-mode branch from a07749f to 129d50f Compare May 8, 2026 17:16
Create transactions locally with the SDK Broadcaster API, then broadcast each transaction to the selected endpoint set with first-success semantics. Add regular and PCZT coverage for the new send flow and document the draft SDK dependency state in the PR body.
@czarcas7ic czarcas7ic force-pushed the adam/multi-server-submit-v2 branch from dfee2c8 to 8829050 Compare May 8, 2026 17:50
@czarcas7ic

Copy link
Copy Markdown
Author

Closing in favor of zodl-inc#1751

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