feat(evm): split gas tracking into execution vs storage creation gas (TIP-1016)#2734
Open
feat(evm): split gas tracking into execution vs storage creation gas (TIP-1016)#2734
Conversation
|
rakita
reviewed
Feb 17, 2026
crates/evm/src/block.rs
Outdated
|
|
||
| /// Tracks full cumulative gas used (execution + storage creation) for receipts. | ||
| /// This differs from block gas limit accounting which only counts execution gas. | ||
| cumulative_full_gas_used: u64, |
Contributor
There was a problem hiding this comment.
cumulative_total_gas_used total naming is used in tip1016
Member
Author
There was a problem hiding this comment.
ok changed total_gas -> full_gas
rakita
reviewed
Feb 17, 2026
crates/evm/src/block.rs
Outdated
| // the EVM-level tracking is implemented. | ||
| let storage_creation_gas: u64 = 0; | ||
|
|
||
| let full_gas_used = self.inner.commit_transaction(inner)?; |
Contributor
There was a problem hiding this comment.
I see, we need to change alloy/evm traits
…for TIP-1016 storage creation gas exemption
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes CHAIN-791
Adds block-level plumbing to track execution gas and storage creation gas separately in
TempoBlockExecutor.cumulative_full_gas_usedandcumulative_storage_creation_gasfields toTempoBlockExecutorcommit_transactionnow computesexecution_gas = full_gas - storage_creation_gasand only execution gas counts toward block gas limits (non_shared_gas_left,non_payment_gas_left)cumulative_full_gas_usedcontinue to track full gas (execution + storage creation)finish()returns execution gas (not full gas) for the block header gas fieldstorage_creation_gasis hardcoded to0with a TODO — it will be populated once handler-level tracking lands (CHAIN-789 / PR feat!(evm): split intrinsic gas between regular and state gas for T2+ (TIP-1016) #2714)Note: hardfork gating is not required. With
storage_creation_gas = 0, all gas accounting is identical to the current behavior. The hardfork gate (T2) lives in the handler layer, not here. This is pure plumbing that becomes active only when upstream EVM tracking is enabled.