solidity icon indicating copy to clipboard operation
solidity copied to clipboard

Verifying blobhash causes failure to obtain gasLimit

Open iteyelmp opened this issue 2 years ago • 2 comments

Use the newly supported blobhash opcode to obtain the hash, and determine whether the blob is actually uploaded based on the result. But this will cause estimateGas to error because the blob doesn't exist yet.

 bytes32 dataHash = blobhash(blobIdx);
 require(dataHash != 0, "failed to get blob hash");

iteyelmp avatar Mar 08 '24 07:03 iteyelmp

Can you provide more details? Is this an error from a framework? Geth? Are you using a release binary?

We're actually seeing a similar error from some Hardhat projects after switching to cancun by default (#4851) but that's not merged yet. It would be useful to know if you're seeing this on 0.8.24 with cancun selected or if you're using a build from develop with yet unreleased features.

cameel avatar Mar 08 '24 16:03 cameel

I'm closing this due to not enough information to diagnose and also because we solved the related problem I mentioned above, and it's very likely that this solves it issue too. The solution was that in our external tests we were configuring Hardhat to use cancun as the EVM version for the compiler but not for the hardhat network. That has to be set separately and currently still defaults to shanghai (https://github.com/NomicFoundation/hardhat/issues/4851).

If this does not solve the problem for you and you can provide more information, feel free to repoen, but first please make sure it's actually a problem in the compiler and not in the framework you're using. If the latter is more likely, please report there instead.

cameel avatar Mar 12 '24 18:03 cameel