From 5d8a7292f9b60f190e99f180583886237a5524e0 Mon Sep 17 00:00:00 2001 From: Matty Evans Date: Thu, 12 Feb 2026 19:13:57 +1000 Subject: [PATCH 1/3] feat(gas-profiler): add toggle to simulate with max gas limit - introduce checkbox to override tx gas limit with EIP-7825 max - add explanatory dialog clarifying why this prevents false OOG errors - pass simulatedGasLimit=16_777_216 when option is enabled --- .../execution/gas-profiler/SimulatePage.tsx | 67 ++++++++++++++++++- 1 file changed, 66 insertions(+), 1 deletion(-) diff --git a/src/pages/ethereum/execution/gas-profiler/SimulatePage.tsx b/src/pages/ethereum/execution/gas-profiler/SimulatePage.tsx index 92f99cd6e..ed75f2aa2 100644 --- a/src/pages/ethereum/execution/gas-profiler/SimulatePage.tsx +++ b/src/pages/ethereum/execution/gas-profiler/SimulatePage.tsx @@ -15,6 +15,7 @@ import { ExclamationTriangleIcon, BoltIcon, CubeIcon, + InformationCircleIcon, } from '@heroicons/react/24/outline'; import clsx from 'clsx'; import ReactEChartsCore from 'echarts-for-react/lib/core'; @@ -30,6 +31,8 @@ import { Stats } from '@/components/DataDisplay/Stats'; import type { Stat } from '@/components/DataDisplay/Stats/Stats.types'; import { Alert } from '@/components/Feedback/Alert'; import { Input } from '@/components/Forms/Input'; +import { Checkbox } from '@/components/Forms/Checkbox'; +import { Dialog } from '@/components/Overlays/Dialog'; import { Button } from '@/components/Elements/Button'; import { useNetwork } from '@/hooks/useNetwork'; import { useThemeColors } from '@/hooks/useThemeColors'; @@ -50,6 +53,9 @@ echarts.use([LineChart, BarChart, GridComponent, TooltipComponent, LegendCompone /** Maximum number of blocks that can be simulated in one range */ const MAX_BLOCKS = 50; +/** EIP-7825 maximum transaction gas limit (used when "use max gas limit" is enabled) */ +const MAX_TRANSACTION_GAS = 16_777_216; + /** Available block count options */ const BLOCK_COUNT_OPTIONS = [5, 10, 25, 50]; @@ -225,6 +231,10 @@ export function SimulatePage(): JSX.Element { // Preset modal state const [presetModalOpen, setPresetModalOpen] = useState(false); + // Gas limit override state + const [useMaxGasLimit, setUseMaxGasLimit] = useState(false); + const [gasLimitInfoOpen, setGasLimitInfoOpen] = useState(false); + // Selection state const [selectedBlockIndex, setSelectedBlockIndex] = useState(null); @@ -494,6 +504,7 @@ export function SimulatePage(): JSX.Element { body: JSON.stringify({ blockNumber, gasSchedule: { overrides: gasSchedule }, + ...(useMaxGasLimit && { simulatedGasLimit: MAX_TRANSACTION_GAS }), }), }); @@ -506,7 +517,7 @@ export function SimulatePage(): JSX.Element { const apiResult: ApiBlockSimulationResponse = await response.json(); return transformApiResponse(apiResult); }, - [gasSchedule, currentNetwork] + [gasSchedule, currentNetwork, useMaxGasLimit] ); // Run the range simulation @@ -780,6 +791,30 @@ export function SimulatePage(): JSX.Element { + {/* Advanced Options */} +
+ + + +
+ {/* Validation / Loading / Error messages */} {inputError && ( + + {/* Gas Limit Info Dialog */} + setGasLimitInfoOpen(false)} + title="Simulated Gas Limit Override" + size="sm" + > +
+

+ When gas prices change, transactions that succeeded under old pricing may run out of gas + under new pricing — not because the transaction logic is wrong, but because the original + gas limit was set for the old costs. +

+

+ With this option enabled, the simulated execution uses the maximum transaction gas limit + ({formatGas(MAX_TRANSACTION_GAS)} gas) instead of the original transaction's gas limit. + This prevents artificial out-of-gas failures and shows the true gas cost under the new + pricing. +

+

+ The original execution always uses the real transaction gas limit, so you can still + compare the two. +

+
+ Note: This overrides each + transaction's individual gas limit, not the block gas limit. +
+
+
); } From 23b6da912d3d2f808ec54a9ace381c5bf22bdd29 Mon Sep 17 00:00:00 2001 From: Matty Evans Date: Thu, 12 Feb 2026 19:20:55 +1000 Subject: [PATCH 2/3] style(SimulatePage): reformat JSX and text for consistent line length fix(routeTree): remove trailing slash from /xatu-data route path --- .../execution/gas-profiler/SimulatePage.tsx | 29 +++++++------------ src/routeTree.gen.ts | 6 ++-- 2 files changed, 13 insertions(+), 22 deletions(-) diff --git a/src/pages/ethereum/execution/gas-profiler/SimulatePage.tsx b/src/pages/ethereum/execution/gas-profiler/SimulatePage.tsx index ed75f2aa2..1ce439f88 100644 --- a/src/pages/ethereum/execution/gas-profiler/SimulatePage.tsx +++ b/src/pages/ethereum/execution/gas-profiler/SimulatePage.tsx @@ -793,16 +793,12 @@ export function SimulatePage(): JSX.Element { {/* Advanced Options */}
- + @@ -1278,23 +1274,18 @@ export function SimulatePage(): JSX.Element { >

- When gas prices change, transactions that succeeded under old pricing may run out of gas - under new pricing — not because the transaction logic is wrong, but because the original - gas limit was set for the old costs. -

-

- With this option enabled, the simulated execution uses the maximum transaction gas limit - ({formatGas(MAX_TRANSACTION_GAS)} gas) instead of the original transaction's gas limit. - This prevents artificial out-of-gas failures and shows the true gas cost under the new - pricing. + When gas prices change, transactions that succeeded under old pricing may run out of gas under new pricing — + not because the transaction logic is wrong, but because the original gas limit was set for the old costs.

- The original execution always uses the real transaction gas limit, so you can still - compare the two. + With this option enabled, the simulated execution uses the maximum transaction gas limit ( + {formatGas(MAX_TRANSACTION_GAS)} gas) instead of the original transaction's gas limit. This prevents + artificial out-of-gas failures and shows the true gas cost under the new pricing.

+

The original execution always uses the real transaction gas limit, so you can still compare the two.

- Note: This overrides each - transaction's individual gas limit, not the block gas limit. + Note: This overrides each transaction's individual + gas limit, not the block gas limit.
diff --git a/src/routeTree.gen.ts b/src/routeTree.gen.ts index 7318c274e..4a47c238c 100644 --- a/src/routeTree.gen.ts +++ b/src/routeTree.gen.ts @@ -416,7 +416,7 @@ export interface FileRoutesByFullPath { '/xatu/geographical-checklist': typeof XatuGeographicalChecklistRoute '/xatu/locally-built-blocks': typeof XatuLocallyBuiltBlocksRoute '/experiments/': typeof ExperimentsIndexRoute - '/xatu-data/': typeof XatuDataIndexRoute + '/xatu-data': typeof XatuDataIndexRoute '/beacon/block-production/live': typeof BeaconBlockProductionLiveRoute '/beacon/slot/live': typeof BeaconSlotLiveRoute '/ethereum/consensus/overview': typeof EthereumConsensusOverviewRoute @@ -589,7 +589,7 @@ export interface FileRouteTypes { | '/xatu/geographical-checklist' | '/xatu/locally-built-blocks' | '/experiments/' - | '/xatu-data/' + | '/xatu-data' | '/beacon/block-production/live' | '/beacon/slot/live' | '/ethereum/consensus/overview' @@ -781,7 +781,7 @@ declare module '@tanstack/react-router' { '/xatu-data/': { id: '/xatu-data/' path: '/xatu-data' - fullPath: '/xatu-data/' + fullPath: '/xatu-data' preLoaderRoute: typeof XatuDataIndexRouteImport parentRoute: typeof rootRouteImport } From 68918120c099bad9cf425f8ca83cc54a48471966 Mon Sep 17 00:00:00 2001 From: Matty Evans Date: Fri, 13 Feb 2026 08:09:03 +1000 Subject: [PATCH 3/3] refactor(gas-profiler): replace hard-coded max gas limit with boolean flag Remove MAX_TRANSACTION_GAS constant and send maxGasLimit=true instead of simulatedGasLimit=. This simplifies the API and lets the backend decide the actual limit. Update UI copy to reflect that the limit is "lifted" rather than set to a specific value, and drop the explanatory note about overriding individual limits. Add onEnableMaxGasLimit callback to BlockSimulationResultsV2 so users can enable max gas limit directly from pre-execution error alerts. --- .../execution/gas-profiler/SimulatePage.tsx | 28 +++++++++------- .../BlockSimulationResultsV2.tsx | 33 +++++++++++++++++-- 2 files changed, 47 insertions(+), 14 deletions(-) diff --git a/src/pages/ethereum/execution/gas-profiler/SimulatePage.tsx b/src/pages/ethereum/execution/gas-profiler/SimulatePage.tsx index 1ce439f88..ddf89a2a4 100644 --- a/src/pages/ethereum/execution/gas-profiler/SimulatePage.tsx +++ b/src/pages/ethereum/execution/gas-profiler/SimulatePage.tsx @@ -53,9 +53,6 @@ echarts.use([LineChart, BarChart, GridComponent, TooltipComponent, LegendCompone /** Maximum number of blocks that can be simulated in one range */ const MAX_BLOCKS = 50; -/** EIP-7825 maximum transaction gas limit (used when "use max gas limit" is enabled) */ -const MAX_TRANSACTION_GAS = 16_777_216; - /** Available block count options */ const BLOCK_COUNT_OPTIONS = [5, 10, 25, 50]; @@ -504,7 +501,7 @@ export function SimulatePage(): JSX.Element { body: JSON.stringify({ blockNumber, gasSchedule: { overrides: gasSchedule }, - ...(useMaxGasLimit && { simulatedGasLimit: MAX_TRANSACTION_GAS }), + ...(useMaxGasLimit && { maxGasLimit: true }), }), }); @@ -1224,7 +1221,18 @@ export function SimulatePage(): JSX.Element { {/* Reuse existing BlockSimulationResults */}
- + { + setUseMaxGasLimit(true); + setGasLimitInfoOpen(true); + } + } + />
)} @@ -1278,15 +1286,11 @@ export function SimulatePage(): JSX.Element { not because the transaction logic is wrong, but because the original gas limit was set for the old costs.

- With this option enabled, the simulated execution uses the maximum transaction gas limit ( - {formatGas(MAX_TRANSACTION_GAS)} gas) instead of the original transaction's gas limit. This prevents - artificial out-of-gas failures and shows the true gas cost under the new pricing. + With this option enabled, the simulated execution lifts the transaction gas limit so it is no longer a + constraining factor. This prevents artificial out-of-gas failures and shows the true gas cost under the new + pricing.

The original execution always uses the real transaction gas limit, so you can still compare the two.

-
- Note: This overrides each transaction's individual - gas limit, not the block gas limit. -
diff --git a/src/pages/ethereum/execution/gas-profiler/components/BlockSimulationResultsV2/BlockSimulationResultsV2.tsx b/src/pages/ethereum/execution/gas-profiler/components/BlockSimulationResultsV2/BlockSimulationResultsV2.tsx index f316fd2a9..7e3bcc105 100644 --- a/src/pages/ethereum/execution/gas-profiler/components/BlockSimulationResultsV2/BlockSimulationResultsV2.tsx +++ b/src/pages/ethereum/execution/gas-profiler/components/BlockSimulationResultsV2/BlockSimulationResultsV2.tsx @@ -31,6 +31,8 @@ export interface BlockSimulationResultsV2Props { result: BlockSimulationResult; /** Names of gas params the user explicitly modified (e.g. ['SSTORE_SET', 'SLOAD_COLD']) */ modifiedParams?: string[]; + /** Callback to enable max gas limit and open the info modal. When provided, a hint is shown on pre-execution errors. */ + onEnableMaxGasLimit?: () => void; className?: string; } @@ -598,9 +600,11 @@ type TxSort = 'delta' | 'index' | 'gas'; function TransactionImpactView({ transactions, blockNumber, + onEnableMaxGasLimit, }: { transactions: TxSummary[]; blockNumber: number; + onEnableMaxGasLimit?: () => void; }): JSX.Element { const [filter, setFilter] = useState('all'); const [sortBy, setSortBy] = useState('delta'); @@ -873,7 +877,27 @@ function TransactionImpactView({ {/* Pre-execution error (e.g. intrinsic gas too low) */} {hasPreExecError && ( - + +
{tx.error}
+ + + ) : ( + tx.error + ) + } + className="mt-3" + /> )} {/* Error cards (if any) */} @@ -957,6 +981,7 @@ function TransactionImpactView({ export function BlockSimulationResultsV2({ result, modifiedParams, + onEnableMaxGasLimit, className, }: BlockSimulationResultsV2Props): JSX.Element { // Overall gas delta @@ -1105,7 +1130,11 @@ export function BlockSimulationResultsV2({ {/* TRANSACTIONS TAB */} {/* ============================================================ */} - +