From 87a088bc668ac364c628e7f5911bf4bb942b9200 Mon Sep 17 00:00:00 2001 From: openhands Date: Sun, 15 Mar 2026 00:00:56 +0000 Subject: [PATCH 1/4] fix: fix: increase CALCULATE_PARAMS_GAS_LIMIT from 200k to 500k (#782) Co-Authored-By: Claude Sonnet 4.6 --- onchain/src/Optimizer.sol | 6 +++--- onchain/test/FitnessEvaluator.t.sol | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/onchain/src/Optimizer.sol b/onchain/src/Optimizer.sol index 4efa74c..58a6371 100644 --- a/onchain/src/Optimizer.sol +++ b/onchain/src/Optimizer.sol @@ -132,11 +132,11 @@ contract Optimizer is Initializable, UUPSUpgradeable, IOptimizer { /// preventing unbounded growth from blocking recenter(). /// /// Note (EIP-150 / 63-64 rule): the outer getLiquidityParams() call must - /// arrive with at least ⌈200_000 × 64/63⌉ ≈ 203_175 gas for the inner - /// staticcall to actually receive 200 000. Callers with exactly 200–203 k + /// arrive with at least ⌈500_000 × 64/63⌉ ≈ 507_937 gas for the inner + /// staticcall to actually receive 500 000. Callers with exactly 500–508 k /// gas will see a spurious bear-defaults fallback. This is not a practical /// concern from recenter(), which always has abundant gas. - uint256 internal constant CALCULATE_PARAMS_GAS_LIMIT = 200_000; + uint256 internal constant CALCULATE_PARAMS_GAS_LIMIT = 500_000; /** * @notice Initialize the Optimizer. diff --git a/onchain/test/FitnessEvaluator.t.sol b/onchain/test/FitnessEvaluator.t.sol index 9434163..5b91eca 100644 --- a/onchain/test/FitnessEvaluator.t.sol +++ b/onchain/test/FitnessEvaluator.t.sol @@ -152,7 +152,7 @@ contract FitnessEvaluator is Test { /// @dev Must match Optimizer.CALCULATE_PARAMS_GAS_LIMIT. Candidates that exceed /// this limit would unconditionally produce bear defaults in production and /// are disqualified (fitness = 0) rather than scored against their theoretical output. - uint256 internal constant CALCULATE_PARAMS_GAS_LIMIT = 200_000; + uint256 internal constant CALCULATE_PARAMS_GAS_LIMIT = 500_000; /// @dev Soft gas penalty: wei deducted from fitness per gas unit used by calculateParams. /// Creates selection pressure toward leaner programs while keeping gas as a From cb10af703cb9adb31def595fd46de9715548324a Mon Sep 17 00:00:00 2001 From: openhands Date: Sun, 15 Mar 2026 00:01:14 +0000 Subject: [PATCH 2/4] fix: fix: increase CALCULATE_PARAMS_GAS_LIMIT from 200k to 500k (#782) --- STATE.md | 1 + 1 file changed, 1 insertion(+) diff --git a/STATE.md b/STATE.md index 33e3634..940eab1 100644 --- a/STATE.md +++ b/STATE.md @@ -34,3 +34,4 @@ - [2026-03-14] llm_contrarian.push3 AW=150/250 clamped to 100 — three rounds unaddressed (#756) - [2026-03-14] bootstrap.sh hardcodes BASE_SEPOLIA_LOCAL_FORK even on mainnet forks (#746) - [2026-03-14] remove MAX_ANCHOR_WIDTH clamp in ThreePositionStrategy (#783) +- [2026-03-14] increase CALCULATE_PARAMS_GAS_LIMIT from 200k to 500k (#782) From 8c50578be105862c521685f4ace78d4f0b5504b9 Mon Sep 17 00:00:00 2001 From: openhands Date: Sun, 15 Mar 2026 00:28:12 +0000 Subject: [PATCH 3/4] fix: update stale comments after CALCULATE_PARAMS_GAS_LIMIT bump to 500k Co-Authored-By: Claude Sonnet 4.6 --- onchain/src/Optimizer.sol | 2 +- onchain/test/FitnessEvaluator.t.sol | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/onchain/src/Optimizer.sol b/onchain/src/Optimizer.sol index 58a6371..954c775 100644 --- a/onchain/src/Optimizer.sol +++ b/onchain/src/Optimizer.sol @@ -128,7 +128,7 @@ contract Optimizer is Initializable, UUPSUpgradeable, IOptimizer { /// @dev Gas budget forwarded to calculateParams via staticcall. /// Evolved programs that exceed this are treated as crashes — same outcome /// as a revert — and getLiquidityParams() returns bear defaults instead. - /// 200 000 gives ~13x headroom over the current seed (~15 k gas) while + /// 500 000 gives ~33x headroom over the current seed (~15 k gas) while /// preventing unbounded growth from blocking recenter(). /// /// Note (EIP-150 / 63-64 rule): the outer getLiquidityParams() call must diff --git a/onchain/test/FitnessEvaluator.t.sol b/onchain/test/FitnessEvaluator.t.sol index 5b91eca..1b30c55 100644 --- a/onchain/test/FitnessEvaluator.t.sol +++ b/onchain/test/FitnessEvaluator.t.sol @@ -158,7 +158,7 @@ contract FitnessEvaluator is Test { /// Creates selection pressure toward leaner programs while keeping gas as a /// secondary criterion (ETH retention still dominates). /// At 15 k gas (current seed): ~1.5e17 wei penalty. - /// At 200 k gas (hard cap boundary): ~2e18 wei penalty. + /// At 500 k gas (hard cap boundary): ~5e18 wei penalty. uint256 internal constant GAS_PENALTY_FACTOR = 1e13; // ─── Anvil test accounts (deterministic mnemonic) ──────────────────────── From 0f2692efaf9572eac74fc7c03d57d163465ad86d Mon Sep 17 00:00:00 2001 From: openhands Date: Sun, 15 Mar 2026 00:39:31 +0000 Subject: [PATCH 4/4] ci: retrigger after infra failure