fix(transaction-controller): use node-authoritative gas estimation - #10245
Merged
Merged
Conversation
pedronfigueiredo
marked this pull request as ready for review
September 15, 2026 13:56
matthewwalsh0
self-requested a review
September 15, 2026 14:04
matthewwalsh0
previously approved these changes
Sep 15, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Sep 15, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Sep 15, 2026
pedronfigueiredo
force-pushed
the
pnf/node-estimation-conf-1995
branch
from
September 15, 2026 16:15
b07b5d7 to
4f787cc
Compare
pedronfigueiredo
enabled auto-merge
September 15, 2026 16:15
…onf-1995 # Conflicts: # packages/transaction-controller/CHANGELOG.md
matthewwalsh0
approved these changes
Sep 16, 2026
Merged
3 of 4 tasks
pull Bot
pushed a commit
to Reality2byte/core
that referenced
this pull request
Sep 16, 2026
## Explanation Creates monorepo release 1258.0.0 with one package release: - `@metamask/transaction-controller` 70.1.0 This release removes the fixed 21,000 gas-limit shortcut for ordinary transactions without caller-provided gas. Transaction Controller now uses the selected network client's existing node/simulation estimation path, preserving caller-provided gas and existing estimation-failure behavior. This makes gas-limit estimation node-authoritative across legacy and EIP-2780-enabled networks without a client-side activation schedule. The release also includes the pending `uuid` runtime dependency update from `^9.0.1` to `^11.1.1`. ## References - MetaMask#10245 - MetaMask#10243 - [CONF-1995](https://consensyssoftware.atlassian.net/browse/CONF-1995) ## Validation - `yarn changelog:validate` - `yarn constraints` - `yarn install --immutable` - `yarn workspace @metamask/transaction-controller run test` ## Checklist - [x] I've updated the test suite for new or updated code as appropriate - [x] I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate - [x] I've communicated my changes to consumers by updating changelogs for packages I've changed - [ ] I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them — not applicable; this is a minor release without breaking changes [CONF-1995]: https://consensyssoftware.atlassian.net/browse/CONF-1995?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > Propagates a minor release that changes default gas-limit behavior for many transaction flows; impact is behavioral rather than mechanical dependency wiring. > > **Overview** > Prepares **monorepo release 1258.0.0** by cutting **`@metamask/transaction-controller` 70.1.0** and aligning dependents on **`^70.1.0`** (from `^70.0.1`). > > The release documents behavior already shipped in that package: **plain transfers without caller-supplied gas no longer get a hard-coded 21,000 limit** and instead use the **selected network client’s gas estimation path**, plus a **`uuid` dependency bump** (`^9.0.1` → `^11.1.1`). This PR itself is **versioning only**—root `package.json`, per-package `package.json` / `CHANGELOG.md`, and **`yarn.lock`**—across assets, bridge, client-utils, EIP-5792 middleware, phishing, wallet, and other packages that depend on transaction-controller. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit cd730cd. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.
Explanation
Transaction Controller currently skips
eth_estimateGasfor ordinary no-data transfers to recipients without code and assigns a fixed 21,000 gas limit. That assumption is not valid across transaction shapes and active fork rules, including EIP-2780 networks, and cannot account for node state such as account creation or delegation resolution.This change removes the fixed-gas shortcut so transactions without caller-provided gas use the selected network client's existing node/simulation estimation path. Caller-provided gas remains authoritative, and existing percentage/fixed-feature fallbacks plus
simulationFailsreporting are preserved when estimation fails.Specifically, this changes gas-limit estimation, not gas-price estimation. For an ordinary transaction without caller-provided
gas, Transaction Controller callseth_estimateGason the node selected bynetworkClientIdand may apply the existing gas buffer.gasPrice,maxFeePerGas, andmaxPriorityFeePerGascontinue to come from the existing gas-fee estimation flows; the eventual transaction fee combines those prices with the node-estimated gas limit.The focused test matrix covers legacy and upgraded node responses for self-transfers, zero-value transfers, existing and new recipients, contract creation, and delegated sender/recipient cases. It also verifies complete transaction-shape forwarding and estimation failure behavior. Existing type-4 composition remains unchanged because it is owned by CONF-1997.
Validation
yarn workspace @metamask/transaction-controller run testyarn buildyarn workspace @metamask/transaction-controller run buildyarn workspace @metamask/transaction-controller run changelog:validateReferences
Checklist
Note
Medium Risk
Changes default gas limits for many wallet-initiated sends, which affects fees and inclusion; wrong estimates could cause reverts, though fallbacks and explicit
gasremain.Overview
Gas limit estimation no longer short-circuits plain no-data transfers to empty recipients with a hard-coded
0x5208(21,000) limit. The removedrequiresFixedGas/eth_getCodepath andFIXED_GASexport are gone; when the caller does not setgas,updateGasalways goes throughestimateGason thenetworkClientIdclient (simulation when enabled, otherwiseeth_estimateGas), with existing buffers and failure fallbacks unchanged.Caller-provided
gasis still used as-is. Gas price flows are untouched. Tests and integration mocks now expecteth_estimateGasfor simple sends and cover varied shapes (self-transfer, new accounts, contract creation, EIP-7702 delegation). The changelog documents the behavior change.Reviewed by Cursor Bugbot for commit ab91ca6. Bugbot is set up for automated code reviews on this repo. Configure here.