ref-fvm
ref-fvm copied to clipboard
EVM runtime: introduce support for `ipld::block_stat` in the Blockstore interface
The Blockstore interface doesn't allow us to stat a block. However, we do have an FVM syscall for this. The lack of this support makes the implementation of EXTCODESIZE
inefficient, as it needs to fetch the block data merely to report its size.
- We may need to rejigger costs if we do that as we currently charge to fetch the block on
open
. - In terms of performance, this likely isn't a huge issue. If we call
EXTCODESIZE
, we're probably going to read the block immediately afterwards.
@raulk @Stebalien is it needed for M2.1?
I don't think so?
We may need to rejigger costs if we do that as we currently charge to fetch the block on open.
Blockstores have a GetSize method, but I don't think the FFI exposes it.
Agree it's not worth it, happy to punt this to M2.2 or beyond.