removes MaxFeePerGas for eth_estimateGas #11192
Conversation
EVM Opcode Benchmark DiffAggregated runs: base=3, pr=3 Regressions (1)
|
cda3426 to
246efb5
Compare
|
@claude review , also am i in the right direction |
|
Claude finished @DarkLord017's task in 6m 22s —— View job Code Review
Direction AssessmentYes, you're in the right direction. The root cause is correct: during Issues FoundCritical:
|
|
@claude review pls |
|
Claude finished @DarkLord017's task in 3m 29s —— View job Review
Answering Your Question: Does capping cause issues in
|
|
@claude review |
|
Claude finished @DarkLord017's task in 17m 15s —— View job Review
DirectionThe approach is correct and sound. The previous two reviews identified and tracked issues through two rounds of iteration. This round checks whether all remaining items from Review 2 are resolved. Yes — all items from Review 2 are resolved. The developer took a clean approach: revert the Previous Review Items Status
What's Good
New regression tests in Remaining Minor Items1. Duplicate feeCap computation
// BlockchainBridge.cs
UInt256 feeCap = tx.MaxFeePerGas > UInt256.Zero ? tx.MaxFeePerGas : tx.GasPrice;
if (feeCap > UInt256.Zero && ...) { ... }
// GasEstimator.cs
UInt256 feeCap = tx.MaxFeePerGas > UInt256.Zero ? tx.MaxFeePerGas
: tx.GasPrice > UInt256.Zero ? tx.GasPrice
: UInt256.Zero;Both produce the same result (the 2.
|
|
@claude review |
|
Claude finished @DarkLord017's task in 3m 43s —— View job Review
What Changed Since Review 3
One Minor Observation
|
| Item from Review 2 | Status |
|---|---|
CallAndRestore scoping (critical) |
✅ Resolved — EstimateAndRestore approach replaced with pre-capping |
| Restore logic bug | ✅ N/A — no subtraction skipped, restore is symmetric |
Dead vars gasPriceToReserve/gasLimitToReserve |
✅ Resolved — TransactionProcessor.cs not touched |
error assignment changed semantics |
✅ Resolved — reverted to original if (err is not null && ...) |
| Formatting issues | ✅ Resolved |
PR Description
The checkboxes (type of change, testing) are still unchecked. Please fill them in — they drive automatic labeling. This is the only blocker.
Overall: The implementation is correct and complete. Ready to merge after filling in the PR description checkboxes.
|
@claude review |
|
Claude finished @DarkLord017's task in 4m 31s —— View job Review
What Changed Since Review 4
Previous Review Items Status
Correctness of the
|
Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>
* bypass buygas checks for eth_estimategas and tests * correct tests * complete fix * remove Buy Gas changes and add capping * revert TransactionProcessor and fix failing tests * make generic feecap func * handle transfer failures and correct linting * change transfer message for compatibility with geth * fix linting issues * Transaction.cs optimization Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com> --------- Co-authored-by: Lukasz Rozmej <lukasz.rozmej@gmail.com>
Fixes Closes Resolves #11179 & #11188
Changes
InsufficientBalanceis now a public constant with value"insufficient funds for transfer"(previously a private constant"insufficient balance"), to ensure compatibility with Go-Ethereum error semantics.CapByAllowancenow acceptsfeeCapas an explicit parameter instead of deriving it fromtx.MaxFeePerGas; it usestx.CalculateFeeCap()for accurate EIP-1559 fee handling.Added a pre-cap step before the initial probe:
feeCap = tx.CalculateFeeCap()tx.GasLimitto(balance - value) / feeCapThis prevents
BuyGas-related failures (e.g., insufficient balance due to high gas limit × fee cap combinations) and therefore there are no changes needed in BuyGas as it will never reach that failure also transfer failures will be overriden by the newer errorUpdated error override condition to include
|| err == GasEstimator.InsufficientBalance, allowing"insufficient funds for transfer"(fromGasEstimator) to override the initial probe’s"insufficient sender balance"error.Types of changes
What types of changes does your code introduce?
Testing
Requires testing
If yes, did you write tests?
Notes on testing
Requires E2E testing
Documentation
Requires documentation update
If yes, link the PR to the docs update or the issue with the details labeled
docs. Remove if not applicable.Requires explanation in Release Notes
If yes, fill in the details here. Remove if not applicable.
Remarks