Extend base_fee_per_gas type to uint256 #2548
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As it's been well spotted by @protolambda
base_fee_per_gas: uint64
is prone to overflow. Supposebase_fee_per_gas = 32 Gwei
, miners will need to produce full blocks for ~150 in a row to overflow this value and eventually brick the Merge.Thus, data structures, constants and arithmetics is update to use extended
uint256
type forbase_fee_per_gas
.UPD
This attack requires
924,730 ETH
to be burned which is of the very high cost taking current ETH price. If the starting point ofbase_fee_per_gas = 1024 Gwei
then the cost drops to81,947 ETH
.