edr icon indicating copy to clipboard operation
edr copied to clipboard

Limit blockchain access in `execute_in_block_context` to the blocks present in the block context

Open Wodann opened this issue 1 year ago • 0 comments

When the execute_in_block_context function is called, the callback receives an immutable reference to a blockchain. Currently, we always return the latest blockchain or a pending blockchain. For historic blocks, the view of the blockchain should be limited to the range of blocks that had already been mined.

The design of this fix could be affected by #284.

Definition of Done A test demonstrating the soundness issue when retrieving "future" blocks and a fix that ensures the proper error is returned when an unknown block is requested.

Wodann avatar Feb 05 '24 16:02 Wodann