giga: report EIP-1559 effective gas price on receipt (CON-256)#3384
Merged
wen-coding merged 3 commits intomainfrom May 5, 2026
Merged
giga: report EIP-1559 effective gas price on receipt (CON-256)#3384wen-coding merged 3 commits intomainfrom
wen-coding merged 3 commits intomainfrom
Conversation
executeEVMTxWithGigaExecutor was passing ethTx.GasPrice() into the
core.Message used to construct the receipt. For dynamic-fee txs that
returns GasFeeCap, so receipts wrongly reported maxFee even when the
chain actually charged baseFee+tip < maxFee.
Use the already-computed effectiveGasPrice (line 1866) instead. The
chain's actual fee charge (line 1871's stateDB.SubBalance) was already
correct — only the receipt was wrong.
Non-apphash-breaking: receipt.EffectiveGasPrice is stored in the
ledger receipt store (off-consensus). ExecTxResult.{Code,Data,
GasWanted,GasUsed} which feed LastResultsHash are unchanged.
Test added: documents the WriteReceipt contract that
receipt.EffectiveGasPrice == msg.GasPrice, so the caller must pass
the EIP-1559 effective price.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
wen-coding
added a commit
that referenced
this pull request
May 5, 2026
Mirror the success-branch evmMsg construction (PR #3384): use effectiveGasPrice (computed at line 1866) for receipt's EffectiveGasPrice field instead of ethTx.GasPrice() which returns GasFeeCap for dynamic-fee txs. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).
|
4 tasks
Codecov Report❌ Patch coverage is
❌ Your patch check has failed because the patch coverage (0.00%) is below the target coverage (50.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #3384 +/- ##
==========================================
- Coverage 59.08% 59.07% -0.01%
==========================================
Files 2100 2099 -1
Lines 173008 172972 -36
==========================================
- Hits 102219 102188 -31
+ Misses 61926 61921 -5
Partials 8863 8863
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
masih
approved these changes
May 5, 2026
|
Successfully created backport PR for |
Contributor
|
/backport |
|
Successfully created backport PR for |
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.
GIGA's
executeEVMTxWithGigaExecutorwas passingethTx.GasPrice()into thecore.Messageused to construct the receipt. For dynamic-fee (EIP-1559) txsTransaction.GasPrice()returnsGasFeeCap, so the receipt wrongly reportedmaxFeefor any tx that actually paidbaseFee + tip < maxFee.This breaks EIP-1559 RPC semantics for clients (ethers, hardhat-ethers, etc.) that read
receipt.effectiveGasPriceto compute spend / display per-tx cost.What's actually wrong
V2's
x/evm/keeper/msg_server.goconstructs the message viaserver.GetEVMMessage(ctx, tx, sender), which has the EIP-1559 adjustment built in:GIGA's path hand-rolls a
core.Messageliteral inexecuteEVMTxWithGigaExecutorand missed this step.The fix
Use the already-computed
effectiveGasPrice(line 1866 ofapp/app.go, which already doesmin(baseFee + tipCap, feeCap)and is what the chain actually charges viastateDB.SubBalanceat line 1871) when constructing the receipt'score.Message.The chain's actual fee charge has always been correct — only the value reported on the receipt was wrong.
Things done
app/app.go executeEVMTxWithGigaExecutor:GasPrice: ethTx.GasPrice()→GasPrice: effectiveGasPricegiga/deps/xevm/keeper/receipt_test.godocuments theWriteReceiptcontract:receipt.EffectiveGasPrice == msg.GasPrice(caller is responsible for passing the EIP-1559 effective price)gofmt -sclean🤖 Generated with Claude Code