lea-improvement-proposals

Abstract

This LIP provides a technical explanation of the supported and unsupported WebAssembly (WASM) features in the LEA Virtual Machine. It clarifies which features are enabled to ensure deterministic execution and high security, and which are disabled to prevent non-determinism and potential consensus failures. This document serves as a guide for developers building applications on the LEA platform.

Motivation

The LEA WebAssembly (WASM) Virtual Machine is a specialized runtime designed for environments that demand high security and deterministic execution, LEA VM's feature set is tailored to ensure that every operation produces an identical result across all nodes in a network, which is critical for achieving consensus. A clear specification of supported features is necessary for developers to build compatible and secure smart contracts.

Specification

Based on the requirements for determinism and security, the LEA VM supports a core set of stable, deterministic WebAssembly features while actively disabling experimental or non-deterministic ones.

The LEA VM is optimized for safety and predictability. The following WebAssembly features are considered safe and are supported:

Unsupported and Discouraged Features

To maintain determinism and security, the LEA VM explicitly avoids features that could introduce unpredictable behavior or security risks. The following are not supported:

Rationale

The selection of WASM features is strictly guided by the core requirements of a blockchain environment: determinism, security, and consensus. The enabled features (bulk-memory, sign-ext, multivalue) are all stable, well-defined, and guaranteed to produce identical results on any compliant hardware. Features like SIMD and atomics are disabled because they can introduce implementation-defined behavior or break the single-threaded execution model, which would make it impossible to guarantee consensus. By restricting the VM to a core, stable, and deterministic subset of WebAssembly, the LEA platform ensures a robust and secure foundation for smart contracts.

Backwards Compatibility

This LIP is purely informational and defines the capabilities of the LEA VM. It does not introduce any backwards compatibility issues with the LEA protocol itself.

Security Considerations

The feature set described in this LIP is fundamental to the security model of the LEA platform. By disabling non-deterministic and experimental features, the VM reduces the attack surface and prevents a class of vulnerabilities related to state divergence and consensus splits. Adherence to this specified feature set is critical for maintaining the security and integrity of all applications running on the LEA network.

This LIP is licensed under the MIT License, in alignment with the main LEA Project License.