Skip to main content

Advances, Systems and Applications

Table 1 A selected list of EVM instructions, along with their gas cost (not including memory expansion cost), as of St. Petersburg hardfork, February 28th, 2019

From: Studying gas exceptions in blockchain-based cloud applications

  1. In EVM, there are a spectrum of 32 different PUSH, DUP, and SWAP instructions, each starting from 1 to 32, e.g., PUSH1, DUP8, SWAP32. All of these instructions consume the same amount of gas, i.e., 3 units.
  2. Here {*}COPY stands for CALLDATACOPY, CODECOPY, or RETURNDATACOPY.
  3. There are five LOG instructions in EVM, from LOG0 to LOG4. The variable “n” (as in LOG{n}) represents the number of topics for this log.
  4. The gas cost for CALL-like instructions are very complicated, see [14].