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