Skip to content
This repository has been archived by the owner on Jul 5, 2024. It is now read-only.

Check correct value of CumulativeGasUsed for empty blocks #342

Open
davidnevadoc opened this issue Dec 14, 2022 · 0 comments
Open

Check correct value of CumulativeGasUsed for empty blocks #342

davidnevadoc opened this issue Dec 14, 2022 · 0 comments

Comments

@davidnevadoc
Copy link
Contributor

This issue arises from the discussion in #337
When we have an empty block the value of CumulativeGasCost is currently not constrained. However, we should ensure its value is 0 in this case. @ed255 proposed the following solution:

  1. Adding a new entry to the block table: GasUsed
  2. In EndTx, if block is empty, lookup to block_table with (GasUsed, 0). If block is not empty, lookup to block_table with (GasUsed, cumulative_gas)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Status: 🆕 Product Backlog Items
Development

No branches or pull requests

1 participant