fix(jni): propagate Sapling nullifier computation failures

Draft
FE
4d ago
+66-46

Changes

Expose Sapling nullifier computation as a checked boolean API. The native method writes the caller’s output only after successful computation. The existing void Java method keeps its descriptor and throws IllegalArgumentException on rejection. It delegates to the checked JNI symbol so that an old native library cannot silently discard the failure.

Verification

All 33 SDK tests passed on Linux and macOS, on both x86_64 and arm64. The regression test checks the known nullifier vector, native rejection, preservation of previous output and the legacy method's exception. The four bundled libraries come from this fork build with Rust submodule 45f8049. Each artifact was checked against its platform and the 40 JNI exports, then checked byte-for-byte in the Maven JAR.

Integration

java-tron 4.8.3 calls the legacy void method. With this SDK it can no longer report success after native rejection. To use its existing false-result handling in Wallet and Note, the node wrapper must call the checked method when adopting the new SDK.

This PR and #17 are independently based on master and both replace the four bundled libraries. After the first merges, rebuild the remaining PR's libraries from the combined source and rerun both regression suites.

Both SDK builds currently pin Rust submodule 45f8049. To ship proof-failure recovery alongside these SDK changes, update the submodule after librustzcash #12 merges and rebuild all four libraries before releasing the SDK.