Repository navigation
Check intrinsic gas in EVM-only CheckTx - #4895
Conversation
CheckTx now computes the transaction's intrinsic gas, and the EIP-7623 calldata floor when Prague is active, under the next block's rules, and refuses a transaction whose gas limit is below either. These are the same limits the executor applies before running the transaction, so admission now agrees with block execution on them.
|
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 @@
## main #4895 +/- ##
==========================================
+ Coverage 61.62% 61.65% +0.02%
==========================================
Files 2080 2080
Lines 162041 162063 +22
==========================================
+ Hits 99865 99914 +49
+ Misses 62171 62144 -27
Partials 5 5
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
PR SummaryMedium Risk Overview Admission uses go-ethereum’s A new table-driven test covers zero gas, transfer/create thresholds, and calldata-floor cases. Reviewed by Cursor Bugbot for commit e92ee6c. Bugbot is set up for automated code reviews on this repo. Configure here. |
There was a problem hiding this comment.
EVM-only CheckTx now rejects transactions whose gas limit is below the intrinsic gas, or below the EIP-7623 calldata floor when Prague is active. It uses the same rules and error wrapping as the go-ethereum fork's state transition, so admission matches what execution charges, and the change comes with table tests at each boundary; I found nothing blocking. The only other reader, codex, found nothing, which agrees with this review, so there was nothing from it to keep or drop.
seidroid review · decision approve · session e17214add73248f89a7a00bcf33cafc1 · turn resp_claude_fb3b4341e9c87d1e313a6f1f20752b8b · item 83563f7ca1b051bb81b9e4657499e536
Findings: 0 blocking | 0 non-blocking | 0 posted inline
EVM-only
CheckTxvalidated the signature, fee cap and that the sender could covergas * price + value, but it did not check the gas limit against the intrinsic gas the executor deducts before running a transaction. A transaction with too little gas for that was admitted and only rejected once it reached block execution.CheckTxnow computes the intrinsic gas with go-ethereum'score.IntrinsicGas, and the EIP-7623 calldata floor withcore.FloorDataGaswhen Prague is active, under the rules of the block after the committed one. It refuses a transaction whose gas limit is below either, using the same errors the state transition returns, before the balance check runs.