polkadot-evm / frontier

Ethereum compatibility layer for Substrate.
Apache License 2.0
574 stars 487 forks source link

fix: block cumulative gas calculation #1467

Closed 0x00000002 closed 3 months ago

0x00000002 commented 4 months ago

The cumulative gas spent should be the sum of the gas spent across all transactions.

boundless-forest commented 3 months ago

This is incorrect. I previously asked the same question in https://github.com/polkadot-evm/frontier/pull/602. Please refer to https://github.com/polkadot-evm/frontier/blob/master/frame/ethereum/src/lib.rs#L650-L658 for more details.