EVM Compatibility
The eSpace implements an Ethereum Virtual Machine (EVM) with alignment to Ethereum's behavior through CIP-645. Below are some differences between eSpace and Ethereum:
Transaction Type
- eSpace initially only supports 155 type transaction (legacy transactions)
- EIP-2930 (type 1) & EIP-1559 (type 2) transactions are supported after hardfork v2.4.0.
- EIP-4844 (type 3) transactions are not supported.
- EIP-7702 (type 4) transactions are supported after hardfork v3.0.0.
EVM Opcodes
As of hardfork v3.0.0 (CIP-645), Conflux eSpace implements multiple Ethereum Improvement Proposals (EIPs) to align behavior with Ethereum's EVM:
Opcode-Specific Changes
- BLOBHASH and BLOBBASEFEE opcodes (EIP-4844) are implemented with consistent "zero" results
Block Time
The NUMBER
opcode will return the tree-graph epoch number
. As a result, block.number
used in eSpace contracts will not grow at a stable and predictable rate, and so it might not be suitable for measuring time.
Block generate rate is 1.25s per block (mainnet), is same as Core Space Epoch time.
Contract Size
Contract max code size is 49152
(double as Ethereum).
Transaction Fees
Storage-Related Gas Costs
Due to Conflux's storage collateral mechanism and high-performance design, storage-related operations have adjusted gas costs (doubled from Ethereum's values):
- SSTORE: 40000 gas (instead of 20000 gas in Ethereum) when changing a storage entry from zero to non-zero
- Contract deployment: Each byte costs 400 gas (instead of 200 gas in Ethereum)
- EIP-7702 PER_EMPTY_ACCOUNT_COUNT: 50000 gas (instead of 25000 gas in Ethereum)
Gas Refunds
- Gas refund cap: In Ethereum, if a transaction's gas limit exceeds the actual gas cost, the remaining gas is fully refunded. In contrast, Conflux refunds a maximum of 1/4 of the gas limit. Check Gas Limit, Gas Used, and Gas Charged for more details.
- EIP-7702 refund difference: When updating delegate addresses (rather than creating a new delegation), Conflux does not issue the 12500 gas refund that Ethereum provides.
BLOCKHASH Gas Pricing
Conflux supports querying a larger range of blocks [n-65535, n]
compared to Ethereum's [n-256, n-1]
. Corresponding gas prices for BLOCKHASH
are adjusted as follows:
- Ethereum:
20 gas
(uniform for all cases) - Conflux:
2100 gas
(for the range[n-65535, n-257]
),100 gas
(for blocks in[n-256, n-1]
)
Transaction Gas limit
- Only blocks whose height is a multiple of
5
can include Ethereum-type transactions. The total gas limit of these transactions cannot exceed half of the block gas limit, which is 30 million gas. - A transaction's gas limit should be no less than 100 times the byte size of its call data. Check CIP-130 for more details.
COINBASE Address Handling
The COINBASE
opcode returns a hex20 address corresponding to Core Space rather than eSpace. The eSpace address with the same hex20 value is not considered "warm" per EIP-2929.
Transaction Balance Handling
When transaction balance cannot afford maximum cost (max gas price × gas limit + tx value
):
- Ethereum: Transaction fails without nonce increment or fee deduction
- Conflux: Nonce is incremented and maximum effective gas price × gas limit is deducted (or entire balance if insufficient)
The maximum effective gas price equals to
gasPrice
ifgasPrice
is specified otherwisemin(maxFeePerGas, baseFeePerGas+maxPriorityFeePerGas)
.