EIP-7266 Removal of the BLAKE2 compression precompile (Remove BLAKE2 compression precompile)
No call decision · EVM & execution · EIP status Stagnant · created 2023-07-03
A proposal to change the Ethereum Virtual Machine's blake2f (0x09) precompile so that calling it always fails, effectively removing this rarely used feature.
Why it is needed
EIP-152 added a precompile at address 0x09 calling the BLAKE2b compression function with the December 2019 Istanbul hard fork, but it was included without its actual usage being verified beforehand. As of July 2023, when this EIP was written, 0x09 had been called only 22,131 times in history, with the most recent call on October 6, 2022. The proposer views keeping a precompile with no use case in the EVM as unnecessary complexity, and aims to simplify the EVM by removing a rarely used feature that every client must continue to implement and maintain.
What changes
Today
- Calling address 0x09 executes the BLAKE2b compression function (F) operation normally.
- A rarely used precompile that has been called only 22,131 times since the 2019 Istanbul upgrade.
- Every EVM client must continue to implement and maintain this rarely used feature.
After EIP-7266
- CALL, CALLCODE, DELEGATECALL, and STATICCALL calls to address 0x09 are all treated as exceptional aborts, consuming all gas and returning no result.
- The very small number of applications that called blake2f will no longer function.
- One precompile with no real-world usage is removed from the EVM specification.
Who is affected
- Users: Since almost no apps use blake2f, most users will notice no change.
- Wallet & app developers: The handful of contracts or services that call 0x09 directly will have those calls fail after the fork, so they need an alternative.
- Client teams: The hard fork must change the EVM implementation so that calling blake2f logic always results in an exceptional abort.
- Validators: There is no direct change in behavior, but because this is a hard fork, nodes must sync with an upgraded client.
In depth
Background and figures
EIP-152 added the blake2f precompile at address 0x09 in the Istanbul hard fork (block 9,069,000) on December 7, 2019, but it was included without a proven use case. As of this EIP's writing on July 3, 2023, 0x09 had been called only 22,131 times in its history, with the most recent call on October 6, 2022. The proposer views the lack of upfront validation of a use case before inclusion as the reason for this failure.
Specification: changing to exceptional abort
This EIP defines all CALL, CALLCODE, DELEGATECALL, and STATICCALL calls to address 0x09 as triggering an exceptional halting state. An exceptional abort consumes all the gas supplied to the call and returns no data. In other words, rather than erasing the code of the blake2f operation itself, this effectively disables the function by always turning the result of calling that address into a failure.
Rationale: simplifying the EVM
The proposer cites the Yellow Paper's characterization of precompiles as a 'provisional architecture that may later become native extensions,' and concludes that since blake2f has seen no real-world use 3.5 years after being added, there is no prospect of it ever being converted into a native opcode. The goal is to remove this unused precompile and simplify the EVM down to only the instructions that are actually used, and the proposer explains that this removal could serve as a precedent for phasing out other unused EVM features in the future.
Backward compatibility
This change alters the consensus rules, so it requires a hard fork. The original text states that very few applications are affected and that a lead time of 6 to 12 months should be sufficient.
Security considerations
The original text states that this change introduces no additional security considerations.
Current status
This EIP is currently in Stagnant status. No separate fork-inclusion decision for this EIP has been confirmed in the call records either. The specification or its adoption may therefore still change.