linera-io/linera-protocol · error
An Evm runtime is required to load user applications. Please
Error message
An Evm runtime is required to load user applications. Please enable the `revm` feature flag when compiling `linera-storage`.
What it means
In load_contract, EVM application bytecode requires the revm execution engine, enabled via the with_revm feature on linera-storage (surfaced as the revm feature flag). If an application with EVM bytecode is loaded and the crate was compiled without with_revm, it panics with instructions to enable the feature. Reached through get_user_contract when a block executes an EVM contract.
Source
Thrown at linera-storage/src/lib.rs:348
.await?
.into())
} else {
panic!(
"A Wasm runtime is required to load user applications. \
Please enable the `wasmer` or the `wasmtime` feature flags \
when compiling `linera-storage`."
);
}
}
}
VmRuntime::Evm => {
cfg_if::cfg_if! {
if #[cfg(with_revm)] {
let evm_runtime = EvmRuntime::Revm;
Ok(EvmContractModule::new(contract_bytecode, evm_runtime)?
.into())
} else {
panic!(
"An Evm runtime is required to load user applications. \
Please enable the `revm` feature flag \
when compiling `linera-storage`."
);
}
}
}
}
}
/// Creates a [`UserServiceCode`] instance using the bytecode in storage referenced
/// by the `application_description`.
async fn load_service(
&self,
application_description: &ApplicationDescription,
txn_tracker: &TransactionTracker,
) -> Result<UserServiceCode, ExecutionError> {
let service_bytecode_blob_id = application_description.service_bytecode_blob_id();View on GitHub (pinned to 6c226ddcb3)
Solutions
- Enable the revm/with_revm feature on linera-storage in your dependency specification
- Build with the standard linera-service feature set, which includes EVM support
- Alternatively, avoid sending EVM applications to a Wasm-only deployment
Example fix
# before (Cargo.toml)
linera-storage = { path = "../linera-storage", default-features = false, features = ["wasmtime"] }
# after
linera-storage = { path = "../linera-storage", default-features = false, features = ["wasmtime", "revm"] } Defensive patterns
Strategy: validation
Validate before calling
const _: () = {
#[cfg(not(feature = "revm"))]
compile_error!("enable the revm feature on linera-storage to load EVM contracts");
}; Prevention
- Enable revm in any binary that will execute or index EVM applications
- Keep contract and service loader features aligned (both load_contract and load_service need it)
- Tag builds with the enabled runtimes so deployments are auditable
When it happens
Trigger: Deploying/executing an EVM application (bytecode with the EVM runtime kind) against a node, indexer, or service binary whose linera-storage dependency lacks the with_revm feature — for example a Wasm-only build, or default-features = false without revm.
Common situations: Nodes built before EVM support or with trimmed features trying to follow chains that run EVM apps; test harnesses that only enabled Wasm features; feature unification in a workspace where no crate opts into revm.
Related errors
- A Wasm runtime is required to load user applications. Please
- Returned AccountInfo should have code: Some(...) and so code
- Returned AccountInfo should have code: Some(...) and so code
- When storage is not selected, the storage-service needs to b
- Cannot apply default storage because the feature 'rocksdb' w
AI-assisted analysis of linera-io/linera-protocol@6c226ddcb3 (2026-08-22).
Data as JSON: /api/errors/aea38f028deedfed.
Report an issue: GitHub.