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.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(gas-fees): use effective gas price in RefundGas #2076
fix(gas-fees): use effective gas price in RefundGas #2076
Changes from all commits
15c6c78
a347a72
d4e2e6e
ddaaee7
3e9cbc6
b99631b
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Check warning on line 42 in app/ante/gas.go
Codecov / codecov/patch
app/ante/gas.go#L42
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codebase verification
Issues Found: Incomplete
RefundGas
ImplementationsThe verification reveals that only the
fixedGasMeter
struct implements theRefundGas
method as a no-op. OtherGasMeter
implementations do not provide this method, which means the objectives from issue #2059 are not fully addressed.Action Items:
RefundGas
in AllGasMeter
Structs: Ensure that everyGasMeter
implementation includes theRefundGas
method, handling gas refunds appropriately.RefundGas
methods correctly utilize the effective gas price and prevent negative gas refunds across all implementations.🔗 Analysis chain
Overall impact: Partial implementation of PR objectives
The addition of
ConsumeGas
andRefundGas
as no-op methods maintains the integrity of thefixedGasMeter
concept and ensures it fully implements theGasMeter
interface. These changes partially address the objectives from issue #2059.However, some objectives mentioned in the PR summary and linked issue are not fully addressed in this file:
RefundGas
function.Consider the following actions:
RefundGas
method of other gas meter implementations.To verify the implementation of these objectives in other files, you can run the following script:
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
Length of output: 5840
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codebase verification
Non-Pointer
EVMKeeper
Usages FoundThe following instances of
EVMKeeper
are still using the non-pointer type:app/evmante/interfaces.go
:app/evmante/evmante_verify_eth_acc.go
:app/evmante/evmante_increment_sender_seq.go
:app/evmante/evmante_can_transfer.go
:Please update these instances to use
*EVMKeeper
and ensure that appropriate nil checks are implemented where necessary.🔗 Analysis chain
LGTM! Consider adding nil checks.
The change from
EVMKeeper
to*EVMKeeper
is a good optimization. It allows for more efficient usage of theEVMKeeper
and enables nil checks.To ensure the change is implemented correctly throughout the codebase, run the following script:
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
Length of output: 2495
Check warning on line 54 in app/evmante/evmante_can_transfer.go
Codecov / codecov/patch
app/evmante/evmante_can_transfer.go#L54
Check warning on line 62 in app/evmante/evmante_can_transfer.go
Codecov / codecov/patch
app/evmante/evmante_can_transfer.go#L61-L62
Check warning on line 49 in app/evmante/evmante_mempool_fees.go
Codecov / codecov/patch
app/evmante/evmante_mempool_fees.go#L49