Furthermore, I think the description of the precompile is not entirely clear. I assume the assert
statements if hit, will result in an OOG outcome (i.e. consume all passed gas in the call). While the successful run will not result in an OOG case, but will return 0 bytes (i.e. returndatasize
will equal 0).
Furthermore it is unclear whether it pads inputs with zeroes, or would signal failure if the input is not exactly 192 bytes.
Is that correct?
The closest precompile to this is ECPAIRING (EIP-197: Precompiled contracts for optimal ate pairing check on the elliptic curve alt_bn128) which returns U256(0)
or U256(1)
depending on the outcome. I think it is nice to avoid the need for checking return values if this can be delegated to only checking the success value of CALL
, but nevertheless it is something breaking consistency with other precompiles. In this case likely it makes sense however.
Suggestion is to just clarify the description in the EIP.