Commit graph

889 commits

Author SHA1 Message Date
openhands
28a5059344 ci: retrigger after infra failure 2026-03-14 20:32:14 +00:00
openhands
9ae12acb9d chore: update STATE.md for #760 2026-03-14 20:21:40 +00:00
openhands
89580171b7 fix: DeployLocal.sol feeDest 0xf6a3... may have code on Base Sepolia fork (#760) 2026-03-14 20:21:32 +00:00
johba
99d6da7032 Merge pull request 'fix: batch-eval.sh MANIFEST_DIR (mktemp -d) has no cleanup trap (#763)' (#773) from fix/issue-763 into master 2026-03-14 21:06:17 +01:00
openhands
a19c2c9fa1 fix: batch-eval.sh MANIFEST_DIR (mktemp -d) has no cleanup trap (#763) 2026-03-14 19:46:56 +00:00
openhands
17c904aaa3 fix: batch-eval.sh MANIFEST_DIR (mktemp -d) has no cleanup trap (#763) 2026-03-14 19:46:50 +00:00
johba
5837af0ad7 Merge pull request 'fix: fitness.sh individual-scoring path still silences errors (#766)' (#772) from fix/issue-766 into master 2026-03-14 20:38:32 +01:00
openhands
e388b4de87 fix: fitness.sh individual-scoring path still silences errors (#766) 2026-03-14 19:07:36 +00:00
openhands
ab40930812 fix: fitness.sh individual-scoring path still silences errors (#766) 2026-03-14 19:07:17 +00:00
johba
a734c5b3f6 Merge pull request 'fix: No mainnet VWAP bootstrap runbook (#728)' (#768) from fix/issue-728 into master 2026-03-14 20:05:42 +01:00
openhands
4d16a51650 fix: address review feedback on mainnet-bootstrap runbook (#728)
- docs/mainnet-bootstrap.md: fix Step 4c to use SwapRouter02 7-field
  struct (no deadline field); the 8-field ABI was for SwapRouter v1 but
  the address is SwapRouter02
- docs/mainnet-bootstrap.md: correct Step 1 to no longer falsely claim
  that pre-bootstrap transactions succeed when Forge aborts on simulation
  failure; Step 1 now reflects the try/catch behaviour added below
- docs/mainnet-bootstrap.md: Step 6 drops --private-key flag (Foundry
  ignores it when vm.startBroadcast(privateKey) is called internally)
  and documents that the .secret seed-phrase file must be present
- docs/mainnet-bootstrap.md: remove no-op `export LM_ADDRESS="$LM_ADDRESS"`
- docs/mainnet-bootstrap.md: cite exact line range (101-145) in
  Troubleshooting workaround instead of informal marker description
- onchain/script/DeployBase.sol: wrap liquidityManager.recenter() and
  seed buy in try/catch so a fresh-pool TWAP revert skips the inline
  bootstrap with a warning rather than aborting the entire simulation
- onchain/script/DeployBase.sol: fix --fork-url to --rpc-url in the
  post-deploy console.log hint

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-14 18:35:48 +00:00
openhands
973caff062 fix: No mainnet VWAP bootstrap runbook (#728) 2026-03-14 18:04:24 +00:00
openhands
023c661ee7 fix: No mainnet VWAP bootstrap runbook (#728)
Add docs/mainnet-bootstrap.md with the full two-phase bootstrap
sequence: pool init, 300 s TWAP warm-up wait, first recenter + seed
buy (exact cast commands), 60 s cooldown wait, second recenter via
BootstrapVWAPPhase2.s.sol, and verification/troubleshooting steps.

Update the inline bootstrap comment in DeployBase.sol to warn that the
attempt always reverts on a fresh pool and direct operators to the new
runbook.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-14 18:04:11 +00:00
johba
9a9f0bc603 Merge pull request 'fix: feat: evolution-daemon.sh — perpetual evolution loop on DO box (#748)' (#767) from fix/issue-748 into master 2026-03-14 18:54:42 +01:00
openhands
524a05286e fix: address review feedback on evolution-daemon.sh (#748)
- Stream evolve.sh output directly to stderr instead of buffering in a
  command substitution; long runs (tens of minutes) are now visible live.
- Use an array (EVOLVE_ARGS) for evolve.sh arguments instead of an
  unquoted DIVERSE_FLAG string variable.
- Abort the current run (continue to next loop iteration) when the patch
  fails to apply, rather than silently running with wrong evaluation semantics.
- Fix notify() to pass the message via stdin to avoid SSH single-quote
  interpolation breakage on messages containing special characters.
- Fix step comment/counter mismatch: "Step 7" comment now reads "Step 6"
  to match the [6/7] log label for the summary-write step.
- Clarify in evolution.conf that GAS_LIMIT and ANCHOR_WIDTH_UNBOUNDED are
  documentation-only (they document what evolution.patch does); editing
  them has no runtime effect.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-14 17:39:20 +00:00
openhands
bbf3b871b3 fix: feat: evolution-daemon.sh — perpetual evolution loop on DO box (#748)
- Add tools/push3-evolution/evolution-daemon.sh: single-command daemon that
  runs git-pull → apply-patch → clean-tmpdirs → evolve.sh → summary →
  notify → revert-patch → loop, handling SIGINT/SIGTERM cleanly.
- Add tools/push3-evolution/evolution.conf: config file (EVAL_MODE, BASE_RPC_URL,
  POPULATION=20, GENERATIONS=30, MUTATION_RATE=1, ELITES=2, DIVERSE_SEEDS=true,
  GAS_LIMIT=500000, ANCHOR_WIDTH_UNBOUNDED=true).
- Add tools/push3-evolution/evolution.patch: overrides CALCULATE_PARAMS_GAS_LIMIT
  200k→500k in Optimizer.sol + FitnessEvaluator.t.sol, and removes
  MAX_ANCHOR_WIDTH=100 cap in LiquidityManager.sol for unbounded AW exploration.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-14 17:21:51 +00:00
johba
833ae45882 Merge pull request 'fix: fix: evolve.sh silences all batch-eval errors with 2>/dev/null (#749)' (#765) from fix/issue-749 into master 2026-03-14 18:06:24 +01:00
openhands
f355974cc8 fix: fix: evolve.sh silences all batch-eval errors with 2>/dev/null (#749)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-14 16:51:04 +00:00
openhands
1453139d31 fix: fix: evolve.sh silences all batch-eval errors with 2>/dev/null (#749) 2026-03-14 16:27:15 +00:00
openhands
89a9d3e575 fix: fix: evolve.sh silences all batch-eval errors with 2>/dev/null (#749)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-14 16:27:09 +00:00
johba
cf94d4c342 Merge pull request 'fix: fix: evolve.sh stale tmpdirs break subsequent runs (#750)' (#762) from fix/issue-750 into master 2026-03-14 17:19:42 +01:00
johba
24d05cbbba Merge pull request 'feat: add recovered LLM seeds (floor hugger + contrarian)' (#710) from chore/seed-consolidation into master 2026-03-14 16:55:24 +01:00
openhands
e54f0430ce fix: fix: evolve.sh stale tmpdirs break subsequent runs (#750) 2026-03-14 15:48:15 +00:00
openhands
b168a05930 fix: fix: evolve.sh stale tmpdirs break subsequent runs (#750)
Replace `mktemp -d` with a fixed working directory `evolved/.work/` that
is wiped at startup.  Stale `/tmp/tmp.*` directories from killed runs can
no longer interfere with batch-eval.sh path resolution.  Run outputs are
already preserved in `evolved/run_NNN/` before the work dir is cleaned.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-14 15:48:07 +00:00
openhands
564f0c5c69 fix: add fitness_flags to evo_run004, fix run007 note accuracy
- evo_run004_champion: added missing fitness_flags field
- evo_run007_champion: clarified both branches (staked<=88% vs >88%)
2026-03-14 15:43:58 +00:00
openhands
37ecf413d8 fix: resolve manifest.jsonl conflict markers 2026-03-14 15:43:58 +00:00
openhands
648e247ce3 feat: add run 7 champion to kindergarten
evo_run007_champion: fitness 7.117e21, anchorWidth=153 (unbounded),
discoveryDepth=0. Simplified to single percentageStaked>88% threshold.
Evolved under IL crystallization attack pressure.
2026-03-14 15:43:58 +00:00
openhands
34f142ae17 feat: add run7 evolution champion to seed pool 2026-03-14 15:43:58 +00:00
openhands
5f7d002e2a feat: add recovered LLM seeds (floor hugger + contrarian)
Recovered from reflog after rebase accident destroyed PRs #692, #699.
Balanced Adaptive (#688) was garbage collected — will be regenerated.
Kindergarten (#683) needs fresh implementation due to evolve.sh conflicts.

Closes #672, #675.
2026-03-14 15:43:58 +00:00
johba
969c910b04 Merge pull request 'fix: bootstrap + red-team on forked networks' (#684) from fix/fitness-factory-address into master 2026-03-14 16:39:59 +01:00
openhands
e9397891ed fix: remove setRecenterAccess from red-team.sh — recenter() is now public 2026-03-14 15:10:59 +00:00
openhands
2cdc1f7234 fix: restore bootstrap_vwap from master 2026-03-14 13:31:23 +00:00
openhands
8826c0b812 ci: retrigger (mirror available) 2026-03-14 13:31:23 +00:00
openhands
70a1fabec7 ci: retrigger 2026-03-14 13:31:23 +00:00
openhands
b0ff16f3ec ci: retrigger 2026-03-14 13:31:23 +00:00
openhands
ab800d07f6 fix: fund FEE_DEST before impersonation in grant_recenter_access
FEE_DEST is now a keccak-derived address with zero ETH balance.
anvil_impersonateAccount succeeds but cast send fails on gas deduction.
Add anvil_setBalance before impersonation, matching the same fix
already applied in red-team.sh.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-14 13:31:23 +00:00
openhands
130e22d189 fix: sync FEE_DEST in bootstrap-common.sh with DeployLocal.sol feeDest
DeployLocal.sol changed feeDest to keccak256('harb.local.feeDest') =
0x8A9145E1Ea4C4d7FB08cF1011c8ac1F0e10F9383 but bootstrap-common.sh
still had the old address 0xf6a3eef9088A255c32b6aD2025f83E57291D9011.
Mismatch caused setRecenterAccess to revert (impersonating wrong address).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-14 13:31:23 +00:00
openhands
bf2d261cd9 ci: retrigger 2026-03-14 13:31:23 +00:00
openhands
af8bd07c7d feat: add red-team discovered IL crystallization attack (31.9 ETH optimal)
Single-cycle attack extracts 21.3 ETH (2.13%) from 1000 ETH LM:
  buy 31.9 ETH → recenter → sell all KRK

Key finding: thin pre-recenter positions allow massive price impact,
recenter rebuilds deep positions at manipulated price, sell through
deep positions recovers most ETH. IL crystallized during recenter.

This is the optimal single-buy amount — 31.95+ hits max tick,
<31 ETH extracts proportionally less.
2026-03-14 13:31:23 +00:00
openhands
dbf78de793 fix: bootstrap + red-team on forked networks
Bootstrap fixes:
- Idempotency check: skip if Kraiken already deployed on Anvil
- anvil_setCode to strip ERC-4337 code from deployer + feeDest
- DeployLocal.sol: feeDest derived from keccak256('harb.local.feeDest')

Red-team fixes:
- New bootstrap-light.sh: Anvil-only, ~30s deploy
- red-team.sh uses bootstrap-light instead of full docker compose
- anvil_setBalance for feeDest before impersonation
- forge --color never, path resolution, docker chown

Address fixes (all Base mainnet, in both FitnessEvaluator + AttackRunner):
- V3_FACTORY: 0x33128a8fC17869897dcE68Ed026d694621f6FDfD
- SWAP_ROUTER: 0x2626664c2603336E57B271c5C0b26F421741e481
- NPM_ADDR: 0x03a520b32C04BF3bEEf7BEb72E919cf822Ed34f1
2026-03-14 13:31:23 +00:00
johba
8607c097eb Merge pull request 'ci: use local git mirror as clone reference' (#758) from fix/ci-local-mirror into master 2026-03-14 14:30:24 +01:00
johba
b7a76aa0e1 Merge pull request 'fix: feat: LLM seed — Defensive Floor Hugger optimizer (#672)' (#759) from fix/issue-672 into master 2026-03-14 14:17:36 +01:00
openhands
ecc64d20b7 fix: feat: LLM seed — Defensive Floor Hugger optimizer (#672) 2026-03-14 12:48:34 +00:00
openhands
fafe317fa5 fix: feat: LLM seed — Defensive Floor Hugger optimizer (#672)
Add llm_floor_hugger.push3: pure-constant Push3 optimizer that keeps
anchorShare=0.05e18, anchorWidth=5 ticks, discoveryDepth=0.05e18, CI=0.
Ignores all staking/tax inputs — floor position is always maximised.
Transpiles without error; manifest.jsonl updated.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-14 12:48:22 +00:00
openhands
22e328e12b ci: use local git mirror as clone reference
Eliminates Codeberg git clone rate limiting. The mirror at
/git-mirrors/harb.git (synced every 2 min) provides objects locally,
so the clone step only fetches deltas from Codeberg.

Volume mounted via WOODPECKER_BACKEND_DOCKER_VOLUMES.
2026-03-14 12:44:08 +00:00
johba
057737e293 Merge pull request 'fix: fix: EVAL_MODE defaults to anvil — should default to revm (#751)' (#754) from fix/issue-751 into master 2026-03-14 13:37:20 +01:00
openhands
cd86774ac8 fix: address review findings for #751 — STATE.md and script header docs
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-14 12:17:23 +00:00
openhands
21ff729509 fix: fix: EVAL_MODE defaults to anvil — should default to revm (#751) 2026-03-14 11:56:57 +00:00
openhands
83ab1683f5 fix: fix: EVAL_MODE defaults to anvil — should default to revm (#751)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-14 11:56:52 +00:00
johba
fd1a06ec9f Merge pull request 'fix: feat: evolve.sh auto-incrementing per-run results directory (#752)' (#753) from fix/issue-752 into master 2026-03-14 12:47:13 +01:00