The EthereumJ virtual machine was replaced with the Hyperledger Besu virtual machine in the Hedera Services release 0.19 as a result of HIP-26. This migration enables Hedera to maintain parity with Ethereum Mainnet evolutions such as the EVM container formats, new opcodes, and precompiled contracts. The Besu integration is configured to use the “London” hard fork of Ethereum Mainnet.
The smart contract platform is upgraded to support the EVM visible changes for the “London” hard fork. This includes changes introduced in the “Istanbul” and “Berlin” hard forks. Changes relating to block production, data serialization, and the fee market will not be implemented because they are not relevant to Hedera’s architecture.
Starting in the Hedera Services 0.22 release, the __ intrinsic gas cost and input data will be charged. The intrinsic gas cost is a constant that is charged before any code is executed. The intrinsic gas cost is 21,000 gas. The input data is 16 gas per non-zero byte and 4 gas per zero byte. The input data is the data provided to the external contract function parameters when calling a contract. To learn more about gas fees check out this page.
The Hedera Smart Contract Service will use the Gas Schedule from the "London" hard fork. Notable changes include warm/cold account access and refund reductions.
The "Berlin" hard fork introduced the notion of warm and cold accounts and storage slots. The first access to an account or storage slot in a transaction will need to pay the "cold" costs and all subsequent calls will pay the lower "warm" access costs. EIP-2929 contains the full details of the new cost scheduling.
Hedera does not at this time allow for "pre-warming" addresses and storage slots as part of the transaction as seen in EIP-2930. Future HIPs may support this scheme.
In the London gas schedule, the amount of gas that can be returned from storage access usage patterns has been significantly reduced. Account refunds from SELFDESTRUCT
have been completely removed.
Table of Gas Cost Changes
The current opcode gas fees are reflective of the 0.22 Hedera Service release.
Operation | London Cost (Gas) | Current Hedera (Gas) |
---|---|---|
Code deposit | 200 * bytes | Max of London |
|
2600 | 2600 |
|
100 | 100 |
EXP |
10 + 50/byte | 10 + 50/byte |
|
2600 + Mem | 2600 + Mem |
|
100 + Mem | 100 + Mem |
|
2600 | 2600 |
|
100 | 100 |
|
2600 | 2600 |
|
100 | 100 |
|
375 + 375*topics |
Max of London |
|
2100 | 2100 |
|
100 | 100 |
|
22,100 | Max of London |
|
2,900 | 2,900 |
|
100 | 100 |
|
Only transient |
Only transient |
|
2,600 | 2,600 |
|
100 | 100 |
|
9,000 | 9,000 |
|
25,000 | revert |
|
2600 | 2600 |
|
0 | 0 |
The terms 'warm' and 'cold' in the above table correspond with whether the account or storage slot has been read or written to within the current smart contract transaction, even if within a child call frame.
'CALL et al.' includes with limitation CALL, CALLCODE, DELEGATECALL, and STATICCALL
Reference HIP-206