Merge pull request 'fix: fix: increase CALCULATE_PARAMS_GAS_LIMIT from 200k to 500k (#782)' (#787) from fix/issue-782 into master
This commit is contained in:
commit
03bc45371a
3 changed files with 7 additions and 6 deletions
1
STATE.md
1
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)
|
||||
|
|
|
|||
|
|
@ -128,15 +128,15 @@ 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
|
||||
/// 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.
|
||||
|
|
|
|||
|
|
@ -152,13 +152,13 @@ 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
|
||||
/// 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) ────────────────────────
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue