Skip to content

Update zodl for rebased SDK#24

Merged
p0mvn merged 4 commits into
shielded-votefrom
greg/update-zodl-android-for-rebased-sdk
May 14, 2026
Merged

Update zodl for rebased SDK#24
p0mvn merged 4 commits into
shielded-votefrom
greg/update-zodl-android-for-rebased-sdk

Conversation

@greg0x

@greg0x greg0x commented May 13, 2026

Copy link
Copy Markdown

Summary

  • wire the rebased Android SDK backend into the local included build
  • adapt voting crypto code to call the SDK backend/JNI voting APIs directly
  • update voting call sites for the rebased SDK witness, commitment, and cast-vote signing APIs

Validation

  • ./gradlew :ui-lib:compileZcashtestnetInternalDebugKotlin
  • ./gradlew :ui-lib:compileZcashtestnetInternalDebugUnitTestKotlin
  • ./gradlew :ui-lib:testZcashtestnetInternalDebugUnitTest
  • ./gradlew :app:assembleZcashtestnetInternalDebug

Notes

  • detektAll and ktlint currently fail on origin/shielded-vote before this branch, so they are not included as branch-specific validation.

@greg0x

greg0x commented May 13, 2026

Copy link
Copy Markdown
Author

Handoff context: zodl companion for the updated shielded-vote SDK known state.

Goal

  • Make zodl build and run against the rebased SDK shielded-vote state from SDK #1924.
  • The SDK goal was to preserve the known shielded-vote fixes while moving onto upstream main, which already contains PR6/PR7 split work (SDK #1951 and SDK #1952) plus SDK #1937.
  • This zodl PR is a compatibility/testing branch for that SDK state, not a separate feature rewrite.

Current state

  • This PR is greg/update-zodl-android-for-rebased-sdk -> shielded-vote; current head is 7f2d3593.
  • The repo is set up to consume the local SDK checkout through SDK_INCLUDED_BUILD_PATH=../zcash-android-wallet-sdk.

What changed to get the app compiling/running

  • Added cash.z.ecc.android:zcash-android-backend to zodl dependencies and included-build substitution, so the app can use the local SDK :backend-lib alongside :sdk-lib.
  • Removed the zodl DI binding to the old SDK TypesafeVotingBackend; that wrapper is now internal to the rebased SDK path.
  • Reworked VotingCryptoClientImpl to manage VotingRustBackend / VotingRustBackend.VotingDb directly and map JNI voting models back into zodl app models.
  • Added SynchronizerProvider.getVotingWalletDbPath() as a narrow shim around the SDK voting DB path, because zodl still needs that path for voting setup and recovery flows.
  • Updated witness generation/storage for the rebased SDK API: pass networkId into witness generation, select the bundle-specific notes from the witness result, and pass those bundle notes into storeWitnesses.
  • Updated vote commitment/signing call sites: pass accountIndex into commitment generation, and pass the full commitment JSON into cast-vote signing instead of reconstructing the signature input from individual fields.
  • Updated the affected test fake for the new SynchronizerProvider API.

Decisions made

  • Use the rebased SDK API as-is rather than re-exposing the old SDK wrapper just for zodl.
  • Keep the wallet DB path shim intentionally narrow; it is only there to let the app exercise the current SDK voting path.
  • Keep this PR focused on SDK compatibility and testing. Avoid unrelated zodl cleanup or repo-wide formatting churn.
  • Do not treat detektAll / ktlint as branch-specific blockers here because those global tasks already fail on origin/shielded-vote before this branch.

PR8 boundary

  • This PR follows the SDK #1924 API surface, including the recovery/full-commitment JSON pieces that overlap with PR8 (SDK #1953).
  • It does not port PR8 wholesale into zodl.
  • Anything that is PR8-only and not required by the rebased SDK #1924 API should stay on the PR8 review/test track.

Validation already run

  • ./gradlew :ui-lib:compileZcashtestnetInternalDebugKotlin
  • ./gradlew :ui-lib:compileZcashtestnetInternalDebugUnitTestKotlin
  • ./gradlew :ui-lib:testZcashtestnetInternalDebugUnitTest
  • ./gradlew :app:assembleZcashtestnetInternalDebug

Suggested next verification

  • Check out SDK PR SDK #1924 and this zodl PR together in the workspace.
  • Re-run the validation commands above after pulling both branches.
  • Install the :app:assembleZcashtestnetInternalDebug APK on an emulator/device and exercise the voting flow against the rebased SDK, especially witness generation/storage, vote commitment generation, cast-vote signing, hotkey seed propagation, and recovery/share tracking.

@p0mvn p0mvn merged commit 1469c12 into shielded-vote May 14, 2026
2 checks passed
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