diff --git a/src/pages/ethereum/execution/gas-profiler/SimulatePage.types.ts b/src/pages/ethereum/execution/gas-profiler/SimulatePage.types.ts
index 5cedabc38..f8b433520 100644
--- a/src/pages/ethereum/execution/gas-profiler/SimulatePage.types.ts
+++ b/src/pages/ethereum/execution/gas-profiler/SimulatePage.types.ts
@@ -23,7 +23,7 @@ export interface GasSchedule {
// Storage - SSTORE (Istanbul+: EIP-2200 net metered)
SSTORE_SET?: number; // Istanbul+: 20000
- SSTORE_RESET?: number; // Istanbul+: 2900
+ SSTORE_RESET?: number; // Istanbul+: 5000 (legacy EIP-2200 value; backend charges SSTORE_RESET - SLOAD_COLD as the write surcharge)
// Calls - access costs (pre-Berlin: single CALL_BASE, post-Berlin: cold/warm)
CALL_BASE?: number; // pre-Berlin: varies by fork
@@ -123,8 +123,8 @@ export const GAS_PARAMETER_GROUPS: GasParameterGroup[] = [
// Post-Berlin (EIP-2929): cold/warm access costs
{ key: 'SLOAD_COLD', label: 'SLOAD Cold', min: 0, max: 10000, step: 100 },
{ key: 'SLOAD_WARM', label: 'SLOAD Warm', min: 0, max: 1000, step: 10 },
- { key: 'SSTORE_SET', label: 'SSTORE Set', min: 0, max: 50000, step: 1000 },
- { key: 'SSTORE_RESET', label: 'SSTORE Reset', min: 0, max: 10000, step: 100 },
+ { key: 'SSTORE_SET', label: 'SSTORE Set', min: 0, max: 150000, step: 1000 },
+ { key: 'SSTORE_RESET', label: 'SSTORE Reset', min: 0, max: 25000, step: 100 },
],
},
{
@@ -145,9 +145,9 @@ export const GAS_PARAMETER_GROUPS: GasParameterGroup[] = [
{ key: 'CALL_COLD', label: 'CALL Cold', min: 0, max: 10000, step: 100 },
{ key: 'CALL_WARM', label: 'CALL Warm', min: 0, max: 1000, step: 10 },
{ key: 'CALL_VALUE_XFER', label: 'Value Transfer', min: 0, max: 20000, step: 500 },
- { key: 'CALL_NEW_ACCOUNT', label: 'New Account', min: 0, max: 50000, step: 1000 },
- { key: 'CREATE', label: 'CREATE', min: 0, max: 100000, step: 1000 },
- { key: 'CREATE2', label: 'CREATE2', min: 0, max: 100000, step: 1000 },
+ { key: 'CALL_NEW_ACCOUNT', label: 'New Account', min: 0, max: 300000, step: 1000 },
+ { key: 'CREATE', label: 'CREATE', min: 0, max: 300000, step: 1000 },
+ { key: 'CREATE2', label: 'CREATE2', min: 0, max: 300000, step: 1000 },
{ key: 'SELFDESTRUCT', label: 'SELFDESTRUCT', min: 0, max: 10000, step: 100 },
],
},
@@ -320,41 +320,41 @@ export const GAS_PARAMETER_GROUPS: GasParameterGroup[] = [
/**
* Glamsterdam (EIP-8007) gas schedule preset.
- * Applies all gas parameter changes proposed for the Glamsterdam fork.
+ * Values match the frozen glamsterdam-devnet-8 repricing (ACDT #90).
*
- * EIP-7904: Compute repricing (opcodes + precompiles)
+ * EIP-2780: Intrinsic transaction gas decomposition
* EIP-7976: Calldata floor cost increase
- * EIP-2780: Transaction base cost reduction
- * EIP-8038: State access repricing (TBD - using current values as placeholders)
+ * EIP-7981: Access list data cost (folded into per-entry costs)
+ * EIP-8037: State creation gas (state-gas dimension folded into execution gas)
+ * EIP-8038: State access repricing
+ *
+ * EIP-7904 (compute repricing) is now Informational and recommends no changes,
+ * so the preset no longer overrides compute opcodes or precompiles.
*/
export const GLAMSTERDAM_PRESET: Record = {
- // EIP-7904: Compute repricing
- DIV: 15,
- SDIV: 20,
- MOD: 12,
- MULMOD: 11,
- KECCAK256: 45,
- PC_BLAKE2F_BASE: 170,
- PC_BLAKE2F_PER_ROUND: 2,
- PC_BLS12_G1ADD: 643,
- PC_BLS12_G2ADD: 765,
- PC_BN254_ADD: 314,
- PC_BN254_PAIRING_PER_PAIR: 34103,
- PC_KZG_POINT_EVALUATION: 89363,
+ // EIP-2780: TX_BASE_COST; create tx intrinsic = TX_BASE_COST + CREATE_ACCESS (EIP-8038)
+ TX_BASE: 12000,
+ TX_CREATE_BASE: 24000,
// EIP-7976: Calldata floor
- TX_FLOOR_PER_TOKEN: 15,
+ TX_FLOOR_PER_TOKEN: 16,
+
+ // EIP-8038: State access repricing
+ CALL_COLD: 3000, // COLD_ACCOUNT_ACCESS
+ SSTORE_RESET: 12100, // SLOAD_COLD 2,100 + STORAGE_WRITE 10,000
+ CALL_VALUE_XFER: 11300, // CALL_VALUE = ACCOUNT_WRITE 9,000 + CALL_STIPEND 2,300
- // EIP-2780: TX base cost
- TX_BASE: 4500,
+ // EIP-8038 per-entry cost + EIP-7981 data cost (64 gas/byte)
+ TX_ACCESS_LIST_ADDR: 4180, // 2,900 + 1,280
+ TX_ACCESS_LIST_KEY: 4048, // 2,000 + 2,048
- // EIP-8038: State access repricing (TBD - current values)
- SLOAD_COLD: 2100,
- SLOAD_WARM: 100,
- SSTORE_RESET: 2900,
- CALL_COLD: 2600,
- TX_ACCESS_LIST_ADDR: 2400,
- TX_ACCESS_LIST_KEY: 1900,
+ // EIP-8037: State creation gas (CPSB = 1,530 per state byte)
+ SSTORE_SET: 97920, // GAS_STORAGE_SET = 64 * CPSB
+ CALL_NEW_ACCOUNT: 183600, // GAS_NEW_ACCOUNT = 120 * CPSB
+ CREATE: 195600, // GAS_CREATE 183,600 + CREATE_ACCESS 12,000
+ CREATE2: 195600,
+ CREATE_DATA: 1530, // GAS_CODE_DEPOSIT per byte
+ TX_AUTH_COST: 35190, // PER_AUTH_BASE_COST = 23 * CPSB
};
/**
diff --git a/src/pages/ethereum/execution/gas-profiler/components/GasScheduleDrawer/GasScheduleDrawer.tsx b/src/pages/ethereum/execution/gas-profiler/components/GasScheduleDrawer/GasScheduleDrawer.tsx
index b2053c823..393d6a483 100644
--- a/src/pages/ethereum/execution/gas-profiler/components/GasScheduleDrawer/GasScheduleDrawer.tsx
+++ b/src/pages/ethereum/execution/gas-profiler/components/GasScheduleDrawer/GasScheduleDrawer.tsx
@@ -59,25 +59,29 @@ interface CategoryGroup {
}
/**
- * Derive slider constraints from default value
+ * Derive slider constraints from the default value, widening the range to keep
+ * the current value (e.g. an applied preset) within the slider scale
*/
-function getSliderConstraints(defaultValue: number): { min: number; max: number; step: number } {
+function getSliderConstraints(
+ defaultValue: number,
+ currentValue: number = defaultValue
+): { min: number; max: number; step: number } {
if (defaultValue === 0) {
- return { min: 0, max: 100, step: 1 };
+ return { min: 0, max: Math.max(100, currentValue), step: 1 };
}
if (defaultValue <= 10) {
- return { min: 0, max: Math.max(50, defaultValue * 5), step: 1 };
+ return { min: 0, max: Math.max(50, defaultValue * 5, currentValue), step: 1 };
}
if (defaultValue <= 100) {
- return { min: 0, max: Math.max(500, defaultValue * 5), step: 10 };
+ return { min: 0, max: Math.max(500, defaultValue * 5, currentValue), step: 10 };
}
if (defaultValue <= 1000) {
- return { min: 0, max: Math.max(5000, defaultValue * 5), step: 50 };
+ return { min: 0, max: Math.max(5000, defaultValue * 5, currentValue), step: 50 };
}
if (defaultValue <= 10000) {
- return { min: 0, max: Math.max(50000, defaultValue * 5), step: 100 };
+ return { min: 0, max: Math.max(50000, defaultValue * 5, currentValue), step: 100 };
}
- return { min: 0, max: defaultValue * 5, step: 1000 };
+ return { min: 0, max: Math.max(defaultValue * 5, currentValue), step: 1000 };
}
/**
@@ -462,7 +466,7 @@ export function GasScheduleDrawer({
if (!param) return null;
const currentValue = schedule[key] ?? param.value;
const isModified = schedule[key] !== undefined && schedule[key] !== param.value;
- const { min, max, step } = getSliderConstraints(param.value);
+ const { min, max, step } = getSliderConstraints(param.value, currentValue);
return (
- , the upcoming Ethereum execution layer upgrade. It bundles compute repricing, calldata floor increases, and
- transaction base cost reductions into a single preset you can simulate against real blocks.
+ , the upcoming Ethereum execution layer upgrade. It bundles state access and state creation repricing,
+ calldata floor increases, and the intrinsic transaction gas decomposition into a single preset you can
+ simulate against real blocks.
- Values below are pre-filled with the proposed changes. You can adjust any parameter before simulating.
+ Values below are pre-filled with the frozen glamsterdam-devnet-8 repricing. You can adjust any parameter
+ before simulating.