Integration with EVM and WASM
ZK wrappers are seamlessly integrated with both EVM and WASM environments, leveraging the strengths of each runtime:


EVM Integration
Proof Pods, functioning as Substrate's off-chain workers, execute circuits defined in tools Circom or ZoKrates, generate zero-knowledge proofs . These proofs are submitted to verification contracts deployed on Substrate's EVM pallet through the Frontier compatibility layer. The contracts leverage optimized operations for proof verification within Substrate's weight-based execution model.

WASM Integration
For native performance, Proof Pods generate proofs that are verified through Substrate's native runtime pallets. These pallets, typically written in Rust, offer direct integration with Substrate's consensus, governance, and storage mechanisms. WASM's near-native execution speed makes it ideal for complex operations like AI inference, where performance is critical.
Dual-Runtime Benefits
This dual-runtime integration allows developers to choose based on their needs: EVM for Ethereum compatibility and familiar tooling, or WASM for superior performance and deeper Substrate integration. Both paths utilize the same Proof Pod infrastructure for proof generation, ensuring consistent privacy guarantees across the ecosystem.

State Management and Consistency
State updates follow State_{t+1} = Apply(State_t, Tx):
EVM: Patricia Trie storage through Substrate's unified account system.
WASM: Patricia Tries, natively managed by Substrate's runtime.

Technical Integration
EVM and WASM share Substrate's unified state management through Patricia Tries, with the runtime interface enabling seamless communication (e.g., EVM contracts calling native pallets and WASM modules). Transactions update state consistently across both environments, verified via Merkle proofs and Substrate's state root system.

