Why Wasm in Substrate and Polkadot?


Jack Fransham from Parity Technologies recently published a blog on why Wasm is being used in Substrate and Polkadot: Wasm on the Blockchain: The Lesser Evil. It is a question that is often asked and I dare say there is a lot more discussion that could be had here. I’ll provide the key points from Jack’s blog below.

Key points:

  • Wasm is a virtual machine specification that is intended to match the semantics of physical machines in the real world today, making it efficiently executable on modern hardware. Hence, avoid inefficiencies in the EVM.
  • It’s also built to be easily verifiable, not necessarily for logical correctness but for memory safety.
  • We can reuse existing tooling.
  • It allows us to have isomorphic blockchain logic code for fork-free upgrades.

Also worth noting that Parity chose not to use existing Wasm engines. The point here is that blockchains have stricter requirements (calculations must be deterministic across all devices).