Skip to main content

Instruction Limits

The Internet Computer uses WebAssembly as the platform for executing messages of smart contracts. Since WebAssembly is Turing-complete, it can express different kinds of computations including non-terminating computations. The Internet Computer protects against non-terminating computations by limiting the number of WebAssembly instructions per message execution. The instruction limit depends on the message type as shown in the following table.

Message typeInstruction limit
Update messages20 billion instructions
Query messages5 billion instructions
Heartbeats and timers5 billion instructions
Canister install and upgrade200 billion instructions

Notes:

  • The instruction limit for update messages, heartbeats, and timers is planned to be raised to 30 billion instructions in near future.