Back to Fhevm

Version compatibility

sdk/js-sdk/docs/compatibility.md

0.14.0-210.2 KB
Original Source

Version compatibility

Which cryptographic and contract versions line up across a protocol release — and how the SDK picks the right tfhe.wasm version for a given chain. This page is the source of truth for the (protocol, PubKey/CRS, TFHE, KMS) matrix.

For where the SDK runs (browser, Node, Edge, SSR/CSR) rather than which versions are compatible, see Runtime compatibility.

Source repositories

The core limitation

There is no on-chain or Relayer-side signal that tells the SDK the minimum tfhe.wasm version required to deserialize a given PubKey/CRS pair, and the format is not forward-compatible across minor versions:

How the SDK picks a tfhe.wasm version

Lacking a direct signal, the SDK derives the right tfhe.wasm version from a protocol context:

  1. Read ACL.version on the host chain and map it to a protocol version.
  2. Resolve the PubKey/CRS version from what this SDK knows at the time it is written:
    • for known public Relayers, use the PubKey/CRS version they are known to serve at SDK release time;
    • otherwise, use the PubKey/CRS version expected when fresh key material is generated for that protocol line.
  3. Map (protocol version, PubKey/CRS version) to a wasm version:
    • Protocol < v0.13.0 with PubKey/CRS < v1.6.0[email protected]
    • Protocol ≥ v0.13.0 with PubKey/CRS < v1.6.0[email protected] by default, while v1.5.3 remains compatible for the current legacy public PubKey/CRS.
    • Protocol ≥ v0.13.0 with PubKey/CRS ≥ v1.6.0[email protected]

The PubKey/CRS part is a release-time snapshot, not a future-proof signal. After the SDK is published, key rotation or CRS removal can change the material served by a Relayer. The SDK cannot guess those future changes without a direct on-chain or Relayer-side version signal.

The protocol-version part works as long as every protocol release bumps at least one host-contract version.

{% hint style="info" %} A future protocol version could expose this directly via view functions on InputVerifier.sol / KMSVerifier.sol or ProtocolConfig.sol, removing the need for the heuristic above. {% endhint %}

KMS ↔ tfhe-rs

KMS releases pin an exact tfhe-rs crate version via tfhe = "=X.Y.Z" in the workspace Cargo.toml.

KMS versiontfhe-rs crateNotes
0.12.40.12.71.4.0-alpha.3initial line, prerelease alpha
0.13.00.13.31.5.1tfhe minor bump (1.41.5)
0.13.101.5.4tfhe patch bump within 1.5.x
0.13.20-01.6.1tfhe minor bump (1.51.6)

Deployed chains

KMS 0.12.7 generated the PubKey/CRS in December 2025.

ChainProtocolPubKey/CRS
Mainnet0.11.01.4.0-alpha.3
Testnet0.13.01.4.0-alpha.3
Devnet0.13.01.4.0-alpha.3
Polygon-Amoy (Devnet)0.13.01.4.0-alpha.3
Hoodi??

Contract and component versions

On-chain contracts

ProtocolACLFHEVMExecutorKMSVerifierInputVerifierHCULimitProtocolConfigPauserSet
0.10.00.2.00.1.00.1.00.2.00.1.0-0.1.0
0.11.00.2.00.2.00.1.00.2.00.1.0-0.1.0
0.12.00.3.00.3.00.2.00.2.00.2.0-0.1.0
0.13.00.4.00.4.00.3.00.2.00.3.00.1.00.1.0
0.14.00.5.00.5.00.4.00.2.00.4.00.2.00.1.0
0.15.0???????

Off-chain components

ProtocolTFHEKMSExtra data
0.10.01.4.0-alpha.30.12.4v0
0.11.01.5.10.13.3v0
0.12.01.5.40.13.10v1
0.13.01.6.10.13.20-0v1
0.14.01.6.20.13.20-0v2
0.15.0???

PubKey/CRS versions on deployed chains and TFHE readability

ChainProtocolPubKey/CRS (TFHE)TFHE 1.5.3TFHE 1.6.2
Mainnet0.11.01.4.0-alpha.3
Testnet0.13.01.4.0-alpha.3
Devnet0.13.01.4.0-alpha.3

Localstack

ProtocolPubKey/CRS (TFHE)Readable by TFHE 1.5.3Readable by TFHE 1.6.2
0.11.01.5.1
0.12.01.5.4
0.13.01.6.2
0.14.01.6.2?

TFHE WASM API surface

ProtocolTFHETypesFunctions
v0.11.0
v0.12.0
v0.13.0
v0.14.0
v1.5.3
v1.6.2CompactCiphertextList.builder
CompactCiphertextListBuilder.push_boolean
CompactCiphertextListBuilder.push_u8
CompactCiphertextListBuilder.push_u16
CompactCiphertextListBuilder.push_u32
CompactCiphertextListBuilder.push_u64
CompactCiphertextListBuilder.push_u128
CompactCiphertextListBuilder.push_u160
CompactCiphertextListBuilder.push_u256
CompactCiphertextListBuilder.build_with_proof_packed
CompactCiphertextListBuilder.free
CompactPkeCrs.safe_serialize
CompactPkeCrs.safe_deserialize
ProvenCompactCiphertextList.safe_serialize
ProvenCompactCiphertextList.safe_deserialize
ProvenCompactCiphertextList.free
ProvenCompactCiphertextList.len
ProvenCompactCiphertextList.get_kind_of
TfheCompactPublicKey.safe_serialize
TfheCompactPublicKey.safe_deserialize
ZkComputeLoadinit_panic_hook
initThreadPool
setWorkerUrlConfig
getWasmInfo

KMS WASM API surface

ProtocolKMSTypesFunctions
v0.11.0
v0.12.0
v0.13.0
v0.14.0
v0.13.x
v0.14.0Client
PrivateEncKeyMlKem512
PublicEncKeyMlKem512
ServerIdAddr
TypedPlaintextnew_client
new_server_id_addr
ml_kem_pke_keygen
ml_kem_pke_get_pk
ml_kem_pke_pk_to_u8vec
ml_kem_pke_sk_to_u8vec
u8vec_to_ml_kem_pke_sk
process_user_decryption_resp_from_js