ref-fvm icon indicating copy to clipboard operation
ref-fvm copied to clipboard

EVM runtime: introduce support for `ipld::block_stat` in the Blockstore interface

Open raulk opened this issue 2 years ago • 1 comments

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.

raulk avatar Sep 12 '22 17:09 raulk

  • 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.

Stebalien avatar Sep 12 '22 23:09 Stebalien

@raulk @Stebalien is it needed for M2.1?

maciejwitowski avatar Oct 10 '22 14:10 maciejwitowski

I don't think so?

Stebalien avatar Oct 12 '22 04:10 Stebalien

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.

raulk avatar Oct 12 '22 09:10 raulk