Repository navigation
Conversation
Rename the GasId table-slot accessors so they read as the regular (non-state) portion they store, distinct from the GasParams methods of the same name that return the combined total: GasId::tx_eip7702_per_empty_account_cost -> tx_eip7702_regular_gas GasId::tx_eip7702_auth_refund -> tx_eip7702_regular_refund The GasParams::tx_eip7702_per_empty_account_cost / tx_eip7702_auth_refund methods (which sum regular + state gas) keep their names. The name() / from_name() string keys are renamed to match. Also drop the unused reservoir parameter from Handler::last_frame_result.
Merging this PR will not alter performance
Comparing Footnotes
|
Have tx_eip7702_state_gas delegate to tx_eip7702_state_refund(1, 1) and generalize the latter's parameter names (refunded_* -> num_*) so it reads as a shared primitive for both the pessimistic per-auth charge and the per-transaction state-gas refund.
Member
Author
|
Fn rename |
RealiCZ
added a commit
to megaeth-labs/revm
that referenced
this pull request
Sep 16, 2026
…ar-gas GasId names (bluealloy#3725)
43 tasks done
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.
Summary
Addresses the confusing overlap where
GasId::tx_eip7702_per_empty_account_cost()returns the regular (non-state) cost whileGasParams::tx_eip7702_per_empty_account_cost()returns the total (regular + state). TheGasIdaccessors are renamed to say what the table slot actually holds; theGasParamstotal-returning methods keep their names.GasId(slot = regular portion)GasParamsmethod (returns total)tx_eip7702_per_empty_account_cost()→tx_eip7702_regular_gas()tx_eip7702_per_empty_account_cost()(unchanged)tx_eip7702_auth_refund()→tx_eip7702_regular_refund()tx_eip7702_auth_refund()(unchanged)The
name()/from_name()string keys are renamed to match ("tx_eip7702_regular_gas","tx_eip7702_regular_refund"), and the doc comments now spell out the regular-vs-total split and cross-link theGasParamsmethods.Also drops the unused
reservoirparameter fromHandler::last_frame_result(and the inspector's call site).Breaking change
The gas-override string keys changed: anyone overriding by name must switch from
"tx_eip7702_per_empty_account_cost"/"tx_eip7702_auth_refund"to"tx_eip7702_regular_gas"/"tx_eip7702_regular_refund".Testing
cargo build --workspace— cleancargo test -p revm-context-interface --lib gas_params— 5 passed (incl.name/from_nameround-trip coverage)