fix(eth/gasestimator): cap osaka estimate hi at maxtxgas, #32348#2235
fix(eth/gasestimator): cap osaka estimate hi at maxtxgas, #32348#2235gzliudan wants to merge 1 commit intoXinFinOrg:dev-upgradefrom
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
Updates the gas estimation logic to better align with Osaka (EIP-7825) per-tx gas caps, and adjusts related test scaffolding in the override package.
Changes:
- Cap the gas estimator’s upper bound (
hi) toparams.MaxTxGaswhen estimating for Osaka. - Add handling for
core.ErrGasLimitTooHighinside the gas estimation execution helper. - Update a precompile test stub in
override_test.go.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| internal/ethapi/override/override_test.go | Adds a Name() method to the precompile test double. |
| eth/gasestimator/gasestimator.go | Caps estimator upper bound for Osaka and adds an ErrGasLimitTooHigh special-case in execute. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
9b59638 to
7aabbd5
Compare
Cap Estimate gas upper bound to params.MaxTxGas when Osaka rules apply, so the initial execution path cannot start above the EIP-7825 transaction gas cap. Add TestEstimateCapsHiAtMaxTxGasOnOsaka to lock this behavior and prevent regressions where estimation would fail with transaction gas limit too high.
7aabbd5 to
5a66ae9
Compare
Proposed changes
Cap Estimate gas upper bound to params.MaxTxGas when Osaka rules apply, so the initial execution path cannot start above the EIP-7825 transaction gas cap.
Add TestEstimateCapsHiAtMaxTxGasOnOsaka to lock this behavior and prevent regressions where estimation would fail with transaction gas limit too high.
Ref: ethereum#32348
Types of changes
What types of changes does your code introduce to XDC network?
Put an
✅in the boxes that applyImpacted Components
Which parts of the codebase does this PR touch?
Put an
✅in the boxes that applyChecklist
Put an
✅in the boxes once you have confirmed below actions (or provide reasons on not doing so) that