Skip to content

# Branch ID Mismatch on Testnet - NU6 Upgrade Support NeededΒ #59

@Kenbak

Description

@Kenbak

The react-native-zcash SDK (v0.9.12) is experiencing a Branch ID mismatch error when connecting to the official Zcash testnet lightwalletd server (lightwalletd.testnet.electriccoin.co:9067). This prevents wallet synchronization and makes the SDK unusable on testnet.

The issue appears to be caused by the recent NU6 network upgrade on testnet, which changed the protocol's branch ID. The native SDKs bundled in react-native-zcash@0.9.12 are outdated and don't support the new branch ID.

Environment

  • react-native-zcash: 0.9.12 (latest on npm)
  • Platform: iOS (also affects Android)
  • Network: Testnet
  • Lightwalletd Server: lightwalletd.testnet.electriccoin.co:9067
  • React Native: 0.81.5
  • iOS Version: 17.6.1

Current SDK Versions (Bundled in v0.9.12)

According to the CHANGELOG:

  • iOS: zcash-swift-wallet-sdk v2.2.6 (November 2024)
  • Android: zcash-android-sdk v2.2.5 (November 2024)

Issue

Error Message

ERROR [ZcashService] ❌ Sync error: {
  "alias": "zchan_1761936978239",
  "level": "error",
  "message": "The remote server you are connecting to is publishing a different branch ID than the one your App is expecting. This could be caused by your App being out of date or the server you are connecting to being either on a different network or out of date after a network upgrade."
}

Synchronizer Status

LOG [ZcashService] πŸ”„ Status changed: DISCONNECTED - isConnected: undefined

Current Behavior

  1. βœ… Wallet creation works
  2. βœ… Address derivation works (Unified, Sapling, Transparent)
  3. βœ… Network connectivity is established (port 9067 reachable)
  4. ❌ Synchronizer immediately disconnects with branch ID mismatch error
  5. ❌ Balance remains at 0 (cannot fetch from blockchain)
  6. ❌ Cannot send transactions (requires sync)

Expected Behavior

The SDK should successfully connect to the testnet lightwalletd server and synchronize with the blockchain.

Root Cause

The testnet underwent the NU6 network upgrade (October 2025), which updated the protocol's branch ID. The native Zcash SDKs bundled in react-native-zcash@0.9.12 are from November 2024 and don't support NU6.

Proof: The official Zashi iOS wallet uses zcash-swift-wallet-sdk v2.3.7 and works perfectly on testnet:

https://github.com/Electric-Coin-Company/zashi-ios/blob/main/modules/Package.swift#L15

.package(url: "https://github.com/Electric-Coin-Company/zcash-swift-wallet-sdk", from: "2.3.7"),

Impact

  • Testnet development is blocked for all developers using react-native-zcash
  • Users cannot test their applications on testnet
  • Funds sent to testnet addresses generated by the SDK are inaccessible via the app (though they're safe on-chain)
  • Mainnet is likely unaffected (NU6 timing differs)

Suggested Solution

Update the bundled native SDKs to NU6-compatible versions:

For iOS

Update react-native-zcash.podspec or bundled framework to use:

zcash-swift-wallet-sdk: 2.3.7 (or later)

For Android

Update android/build.gradle dependencies:

zcash-android-sdk: 2.2.6+ (or latest NU6-compatible version)

Verification

Transaction proof that funds exist on-chain but are inaccessible:
https://testnet.zcashexplorer.app/transactions/83dcb482b153d9a11c9a8d9bb57b37cfe8e15093f2cd1251e9c958456b45161a

Workarounds Attempted

  1. ❌ Overriding Podfile - Doesn't work due to pre-compiled frameworks bundled in npm package
  2. ❌ Installing from GitHub main branch - Same SDK versions as npm release
  3. ⚠️ Using mainnet - Not viable for development/testing

Request

Could you please:

  1. Update the bundled native Zcash SDKs to NU6-compatible versions (2.3.7+ for iOS, 2.2.6+ for Android)
  2. Publish a new npm release
  3. Consider adding a note in the README about testnet compatibility status

This would unblock testnet development for the entire React Native Zcash developer community.

Additional Context

I'm building Zchan, a decentralized messaging app on Zcash using shielded transaction memos. The app architecture is solid, wallet creation/import works perfectly, but synchronization is blocked by this issue.

Thank you for maintaining this crucial SDK! πŸ™


Environment Details:

  • macOS: 14.6 (Apple Silicon)
  • Xcode: Latest
  • Node: v20+
  • CocoaPods: Latest

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions