Backport release/v6.4: giga: report EIP-1559 effective gas price on receipt (CON-256)#3390
Merged
masih merged 1 commit intorelease/v6.4from May 5, 2026
Merged
Conversation
GIGA's `executeEVMTxWithGigaExecutor` was passing `ethTx.GasPrice()`
into the `core.Message` used to construct the receipt. For dynamic-fee
(EIP-1559) txs `Transaction.GasPrice()` returns `GasFeeCap`, so the
receipt wrongly reported `maxFee` for any tx that actually paid `baseFee
+ tip < maxFee`.
This breaks EIP-1559 RPC semantics for clients (ethers, hardhat-ethers,
etc.) that read `receipt.effectiveGasPrice` to compute spend / display
per-tx cost.
## What's actually wrong
V2's `x/evm/keeper/msg_server.go` constructs the message via
`server.GetEVMMessage(ctx, tx, sender)`, which has the EIP-1559
adjustment built in:
```go
baseFee := k.GetBaseFee(ctx)
if baseFee != nil {
msg.GasPrice = msg.GasPrice.Add(msg.GasTipCap, baseFee)
if msg.GasPrice.Cmp(msg.GasFeeCap) > 0 {
msg.GasPrice = msg.GasFeeCap
}
}
```
GIGA's path hand-rolls a `core.Message` literal in
`executeEVMTxWithGigaExecutor` and missed this step.
## The fix
Use the already-computed `effectiveGasPrice` (line 1866 of `app/app.go`,
which already does `min(baseFee + tipCap, feeCap)` and is what the chain
actually charges via `stateDB.SubBalance` at line 1871) when
constructing the receipt's `core.Message`.
The chain's actual fee charge has always been correct — only the value
reported on the receipt was wrong.
## Things done
- [x] Single-line code change in `app/app.go
executeEVMTxWithGigaExecutor`: `GasPrice: ethTx.GasPrice()` → `GasPrice:
effectiveGasPrice`
- [x] Unit test in `giga/deps/xevm/keeper/receipt_test.go` documents the
`WriteReceipt` contract: `receipt.EffectiveGasPrice == msg.GasPrice`
(caller is responsible for passing the EIP-1559 effective price)
- [x] `gofmt -s` clean
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Masih H. Derkani <m@derkani.org>
(cherry picked from commit 7004ef1)
3 tasks
arajasek
approved these changes
May 5, 2026
masih
approved these changes
May 5, 2026
|
The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## release/v6.4 #3390 +/- ##
================================================
- Coverage 58.40% 58.40% -0.01%
================================================
Files 2091 2091
Lines 173016 173016
================================================
- Hits 101052 101051 -1
- Misses 62959 62960 +1
Partials 9005 9005
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
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.
Backport of #3384 to
release/v6.4.