-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Rationale
Briefly speaking, we are not fully compatible with EIP-1559 after #6 and #166. The compatibility problem between EIP-1559 and Policies are caused by a different economic model.
- As I've mentioned in Implement
minGasTipCapas minimum effective gas tip #186, EIP-1559 proposed a dynamic fee market scheme withbaseFeeandgasTip. Generally, when there is a network traffic, the gas price increases. But if there is no transaction in the network,baseFeeandgasTipmay drop to nearly 0; - But in N3, we don't have a dynamic price model. Instead, we maintain some price factors in the Neo Policy. As a result, the system fee remains the same regardless of traffic, and the only difference is the network fee.
There are also several facts I've noticed on testnet:
- It is frequent that CNs create empty blocks, so the
gasPrice/baseFeeis pretty low; - To achieve a cost about 0.01 GAS per native transfer transaction (costs 21000 gas in EVM), we need a
gasPriceabout0.01 * 10 ^ 18 / 21000 ≈ 500 Gwei, which is incredibly higher than other EVM chains, e.g. 7 Gwei on Ethereum, 1 Gwei on BNB Smart Chain, 100 Gwei on Polygon and 0.1 Gwei on Optimistic/Arbitrum;
Empty blocks and high gas price may cause problems in EIP-1559 compatible tools, e.g. MetaMask.
We've already modified some RPC APIs to suite Neo X Policies, like changing eth_gasPrice and eth_maxPriorityFeePerGas to provide a minimum acceptable value so that a transaction will not be rejected by txpool. But eth_feeHistory is somehow conflict with our Policy idea, it returns a fee list of recently accepted transactions. It would be confusing when the list is empty, for EIP-1559 compatible tools, this case equals to a zero eth_maxPriorityFeePerGas. Their logics don't consider a minimum value, so when I increase the minGasTipCap limit, MetaMask hits RPC errors.
Implementation
For the MetaMask problem, I found it can be solved by disabling eth_feeHistory RPC API. But this compatibility issue may happen on other tools or custom codes. Maybe they use 0.8*eth_maxPriorityFeePerGas and hit an error.
So we may need a discussion, are we good to continue with this EIP-1559 incompatible? Or we have other ideas about the price thing?