Skip to content

chore(vectors): land cross-platform parity gate on code/cash - #1200

Merged
bmc08gt merged 1 commit into
code/cashfrom
chore/cross-platform-test-vectors
Aug 7, 2026
Merged

bmc08gt merged 1 commit into
code/cashfrom
chore/cross-platform-test-vectors

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Establishes test-vectors/ as the version-controlled canonical home for the 7 cross-platform JSON fixtures (inside this repo, as Android is the designated KMP owner); all 7 generator scripts and the README are included.
  • Lands the 5 vector suites that were only on chore/kmp-beachhead (ed25519, base58, slip10, solana_message, compact_message) on top of current code/cash via selective git checkout — kmp/shared-core module scaffolding was excluded, keeping this PR focused.
  • Extends unitTestPaths in settings.gradle.kts to include :libs so the base58 host-JVM gate runs automatically via flipcashTestDebug in CI.
  • Documents the instrumented-test TODO in ci.yml with the exact reactivecircus/android-emulator-runner recipe needed when emulator support is added.

SHA-256 parity (canonical vs per-module copies — all match)

Fixture SHA-256
ed25519.json 9c36bf6b…
base58.json 95669442…
slip10.json dd6f9aee…
curve.json d0746219…
curve_fractional.json b0f2ac09…
solana_message.json 5887320f…
compact_message.json d3683b42…

Test results

Suite Type Result
base58 :libs:encryption:base58:testDebugUnitTest host JVM PASS (executed)
solana_message :services:opencode:testDebugUnitTest host JVM PASS (executed)
compact_message :services:opencode:testDebugUnitTest host JVM PASS (executed)
ed25519 :libs:encryption:ed25519 instrumented compile-only (JNI + android.util.Base64 need device)
slip10 :libs:encryption:mnemonic instrumented compile-only (wordlist res/raw + JNI need device)
currency-math :libs:currency-math instrumented compile-only (already on code/cash; .bin table load needs device)

CI wiring

  • Wired (host JVM): Adding :libs to unitTestPaths means :libs:encryption:base58 now runs under flipcashTestDebug → picked up by the existing ci.yml flipcash-tests job on every PR.
  • TODO (instrumented): ci.yml now contains a fully-specified comment block with the reactivecircus/android-emulator-runner@v2 recipe for a future vector-instrumented-tests job. Not wired yet — the CI only has Ubuntu runners with no emulator support.

Test plan

  • ./gradlew :libs:encryption:base58:testDebugUnitTest — BUILD SUCCESSFUL
  • ./gradlew :services:opencode:testDebugUnitTest --tests "*.SolanaMessageVectorTest" --tests "*.CompactMessageVectorTest" — BUILD SUCCESSFUL
  • ./gradlew :libs:encryption:ed25519:compileDebugAndroidTestKotlin :libs:encryption:mnemonic:compileDebugAndroidTestKotlin :libs:currency-math:compileDebugAndroidTestKotlin — BUILD SUCCESSFUL
  • SHA-256 of all 7 canonical fixtures matches all 7 per-module copies

Add the 6 remaining vector suites (ed25519, base58, slip10, solana_message,
compact_message, plus currency-math which was already present) to the main
branch, and establish the canonical fixture home inside this repo.

Changes:
- test-vectors/: canonical fixtures (7 *.json) + generators (7 gen_*.py)
  + README; this is the version-controlled source of truth for both apps.
  All per-module copies are byte-identical to canonical (sha256 verified).
- libs/encryption/base58: add Base58VectorTest (host JVM) + fixture
- libs/encryption/ed25519: add Ed25519VectorTest (instrumented) + fixture
- libs/encryption/mnemonic: add Slip10DerivationVectorTest (instrumented) + fixture
- services/opencode: add SolanaMessageVectorTest + CompactMessageVectorTest
  (host JVM) + fixtures
- settings.gradle.kts: extend unitTestPaths to include :libs so the base58
  host-JVM gate (and any future lib tests) run via flipcashTestDebug in CI
- .github/workflows/ci.yml: document the TODO for instrumented-test emulator
  support (ed25519, mnemonic, currency-math require connectedAndroidTest)

Host-JVM suites executed and green: base58, solana_message, compact_message.
Instrumented suites compile-checked: ed25519, mnemonic, currency-math.
@bmc08gt
bmc08gt requested a review from jeffyanta as a code owner August 7, 2026 14:38
@github-actions github-actions Bot added type: chore Maintenance, config, CI/CD area: crypto Solana, keys, encryption, signing area: network gRPC, connectivity, API, exchange rates area: build-system Gradle, convention plugins, build-logic labels Aug 7, 2026
@bmc08gt
bmc08gt merged commit c2fdb73 into code/cash Aug 7, 2026
3 checks passed
@bmc08gt
bmc08gt deleted the chore/cross-platform-test-vectors branch August 7, 2026 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: build-system Gradle, convention plugins, build-logic area: crypto Solana, keys, encryption, signing area: network gRPC, connectivity, API, exchange rates type: chore Maintenance, config, CI/CD

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant