Commit graph

1116 commits

Author SHA1 Message Date
johba
240d3ae1ac Merge pull request 'fix: No upper-bound validation for ci/anchorShare/discoveryDepth outputs (#960)' (#980) from fix/issue-960 into master 2026-03-18 22:06:20 +01:00
openhands
8fbac32717 fix: No upper-bound validation for ci/anchorShare/discoveryDepth outputs (#960)
Add assertUint256Max1e18 validator in index.ts and apply it to the ci,
anchorShare, and discoveryDepth output literals. Programs emitting values
> 1e18 for these fields now fail with a clear transpiler-level error instead
of silently violating LiquidityManager invariants at runtime.

Add tests 12-14 in test_transpiler_clamping.sh covering the over-range
rejection for each of the three fields.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-18 20:48:25 +00:00
johba
0e10d091a6 Merge pull request 'fix: evolution.patch has no apply-validation step in CI or evolve.sh (#866)' (#962) from fix/issue-866 into master 2026-03-18 21:33:54 +01:00
openhands
5a6df66541 fix: replace sleep+continue with exit 1 on stale patch to comply with AGENTS.md (#866)
AGENTS.md principle #1/#3 forbids fixed delays. When evolution.patch fails
the pre-flight --check, exit 1 lets the process supervisor handle restart
timing instead of a hardcoded sleep 300 busy-spin.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-18 20:07:21 +00:00
johba
7842d787cd Merge pull request 'fix: evaluate.sh detects docker compose vs docker-compose binary; red-team-sweep.sh does not (#964)' (#971) from fix/issue-964 into master 2026-03-18 20:56:40 +01:00
openhands
33123cfd1d fix: evaluate.sh detects docker compose vs docker-compose binary; red-team-sweep.sh does not (#964)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-18 18:57:36 +00:00
openhands
0fa80de0b9 ci: retrigger after infra failure (#866) 2026-03-18 18:49:23 +00:00
openhands
acda1f72bb fix: add sleep before continue in stale-patch error path to avoid busy loop (#866)
When git apply --check fails, the daemon now sleeps 300s before retrying,
preventing a tight busy loop that would hammer the git remote indefinitely.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-18 18:49:23 +00:00
openhands
9f5aaccd63 ci: retrigger after infra failure (#866) 2026-03-18 18:49:23 +00:00
openhands
57b83b6fe9 fix: evolution.patch has no apply-validation step in CI or evolve.sh (#866)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-18 18:49:23 +00:00
johba
da672070a6 Merge pull request 'fix: Optimizer.sol base class only guards slots 0 and 1 (#968)' (#969) from fix/issue-968 into master 2026-03-18 19:44:55 +01:00
openhands
28ce5ec8cd fix: Optimizer.sol base class only guards slots 0 and 1 (#968)
Replace the two per-slot require checks with a loop over all 8 input slots
so future subclasses using slots 2-7 are protected from silent uint256 wrap.
Add testCalculateParamsRevertsOnNegativeMantissaSlots2to7 to verify the guard.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-18 18:24:18 +00:00
johba
b30e3a8d51 Merge pull request 'fix: feat: LLM seed — Balanced Adaptive optimizer (#676)' (#965) from fix/issue-676 into master 2026-03-18 16:25:40 +01:00
openhands
7949640b04 fix: feat: LLM seed — Balanced Adaptive optimizer (#676)
Add llm_balanced.push3: arithmetic-only optimizer that keeps all
outputs in a balanced mid-range. anchorShare=40-60% (linear with
percentageStaked), anchorWidth=10-200 ticks (linear with taxRate),
discoveryDepth=30-50% (linear with percentageStaked), ci=0. No
EXEC.IF branches — all transitions via multiplication and division.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-18 14:10:36 +00:00
johba
55034057f8 Merge pull request 'fix: No forge compile verification in transpiler CI (#904)' (#961) from fix/issue-904 into master 2026-03-18 15:06:31 +01:00
johba
4ee3e72ae1 Merge pull request 'fix: EXIT trap omits container teardown on script interruption (#862)' (#963) from fix/issue-862 into master 2026-03-18 15:06:17 +01:00
openhands
044f8d41f8 fix: EXIT trap omits container teardown on script interruption (#862) 2026-03-18 13:37:23 +00:00
openhands
7c68177f9d fix: add via_ir to temp forge project in transpiler tests
The 30-way threshold lookup in optimizer_seed.push3 generates enough
local variables to trigger "Stack too deep" without IR compilation.
Add via_ir = true to the minimal foundry.toml created in both test
scripts, matching the setting in onchain/foundry.toml.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-18 13:17:18 +00:00
openhands
1fe5673ce5 fix: No forge compile verification in transpiler CI (#904)
- test_transpiler_clamping.sh: add Test 11 that runs forge build on the
  valid Solidity output from Test 6; fails if the transpiled contract
  does not compile (regression guard for #900)
- test_inject_extraction.sh: add SCRIPT_DIR, then Test 5 that transpiles
  optimizer_seed.push3 and runs forge build on the generated contract;
  ensures the full push3→Solidity→compile pipeline stays green
- .woodpecker/ci.yml: add transpiler-tests step that installs npm deps
  and runs both test scripts with forge on PATH

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-18 13:11:33 +00:00
johba
f4201ee7ef Merge pull request 'fix: ci, anchorShare, discoveryDepth casts are unguarded for the same literal problem (#905)' (#959) from fix/issue-905 into master 2026-03-18 13:57:55 +01:00
openhands
73c91e70b5 fix: ci, anchorShare, discoveryDepth casts are unguarded for the same literal problem (#905)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-18 12:41:01 +00:00
johba
feff600dbd Merge pull request 'fix: CREATE2 self-destruct bypass in onchain/src/LiquidityManager.sol (#921)' (#957) from fix/issue-921 into master 2026-03-18 13:29:30 +01:00
openhands
534382f785 fix: CREATE2 self-destruct bypass in onchain/src/LiquidityManager.sol (#921)
The previous guard blocked setFeeDestination when feeDestination.code.length > 0
but did not persist feeDestinationLocked — a revert undoes all state changes. An
attacker could CREATE2-deploy bytecode to the EOA fee destination, triggering the
block, then SELFDESTRUCT to clear the code, then call setFeeDestination again
successfully (lock was never committed).

Fix: detect bytecode at the current feeDestination first; if found, set
feeDestinationLocked = true and RETURN (not revert) so the storage write is
committed. A subsequent SELFDESTRUCT cannot undo a committed storage slot.
Updated NatSpec documents both the protection and the remaining limitation
(atomic CREATE2+SELFDESTRUCT in a single tx cannot be detected).

Added testSetFeeDestination_CREATE2BytecodeDetection_Locks covering:
set EOA → vm.etch (simulate CREATE2 deploy) → verify lock committed → vm.etch
empty (simulate selfdestruct) → verify setter still blocked.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-18 11:58:28 +00:00
johba
18c19c66a6 Merge pull request 'fix: webapp-entrypoint.sh and e2e.yml hardcode Sepolia SwapRouter (#951)' (#956) from fix/issue-951 into master 2026-03-18 12:36:59 +01:00
openhands
45770d274f fix: webapp-entrypoint.sh and e2e.yml hardcode Sepolia SwapRouter (#951) 2026-03-18 11:07:17 +00:00
johba
be453a8db4 Merge pull request 'fix: AttackRunner.s.sol: V3_FACTORY still hardcoded to Base mainnet (#953)' (#955) from fix/issue-953 into master 2026-03-18 12:04:49 +01:00
openhands
9b157883b4 fix: AttackRunner.s.sol: V3_FACTORY still hardcoded to Base mainnet (#953)
Make V3_FACTORY injectable via vm.envOr("V3_FACTORY", DEFAULT_V3_FACTORY),
preserving the Base mainnet address as the default for existing fork runs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-18 10:40:33 +00:00
johba
16616d868e Merge pull request 'fix: Kraiken.setStakingPool() allows stakingPool == liquidityManager with no guard (#935)' (#954) from fix/issue-935 into master 2026-03-18 11:17:06 +01:00
openhands
ee867b256e fix: add symmetric InvalidAddress guard to setLiquidityManager (#935)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-18 09:45:43 +00:00
openhands
4c1a3940ec ci: retrigger after infra failure (#935) 2026-03-18 08:20:49 +00:00
openhands
f3238a9685 fix: Kraiken.setStakingPool() allows stakingPool == liquidityManager with no guard (#935)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-18 08:09:43 +00:00
johba
256377ef1f Merge pull request 'fix: red-team.sh and AttackRunner.s.sol still use Base mainnet addresses (#939)' (#952) from fix/issue-939 into master 2026-03-18 08:58:47 +01:00
openhands
13f406b5a9 fix: red-team.sh and AttackRunner.s.sol still use Base mainnet addresses (#939)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 07:33:54 +00:00
johba
79b98feef9 Merge pull request 'fix: bootstrap-common.sh has no network-aware SWAP_ROUTER selection (#948)' (#950) from fix/issue-948 into master 2026-03-18 08:18:45 +01:00
openhands
5156c607b2 fix: bootstrap-common.sh has no network-aware SWAP_ROUTER selection (#948)
Add detect_swap_router() that queries chain ID from $ANVIL_RPC and selects
the Base mainnet SwapRouter (0x2626...e481) for chain ID 8453, falling back
to Base Sepolia (0x94cC...2bc4) for all other networks. Called lazily with
idempotency from bootstrap_vwap() and seed_application_state().

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 06:49:20 +00:00
johba
9875257d91 Merge pull request 'fix: DeployLocal.sol v3Factory still uses Base Sepolia address (#714)' (#943) from fix/issue-714 into master 2026-03-18 03:56:02 +01:00
johba
f18afe6958 Merge pull request 'fix: evo_run004_champion fitness also stale after #655 (#847)' (#942) from fix/issue-847 into master 2026-03-18 03:46:03 +01:00
openhands
98d4676016 ci: retrigger after infra failure (#714) 2026-03-18 00:42:37 +00:00
openhands
69d161aef1 fix: DeployLocal.sol v3Factory still uses Base Sepolia address (#714)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 00:31:48 +00:00
openhands
26df0a15dc fix: evo_run004_champion fitness also stale after #655 (#847)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 00:17:46 +00:00
johba
1a567441a0 Merge pull request 'fix: bootstrap-light.sh missing validation guards for KRK, STAKE, OPT (#872)' (#941) from fix/issue-872 into master 2026-03-18 01:06:06 +01:00
openhands
04388538b3 fix: bootstrap-light.sh missing validation guards for KRK, STAKE, OPT (#872)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-17 23:37:01 +00:00
johba
19cf05afc4 Merge pull request 'fix: export-attacks.py SWAP_ROUTER_ADDR inconsistent with helpers/ (#873)' (#938) from fix/issue-873 into master 2026-03-18 00:29:01 +01:00
openhands
53b3b995a6 fix: also update red-team.sh addresses to Base Sepolia (#873)
red-team.sh produces the stream JSONL that export-attacks.py parses, so
they must agree on addresses. Update SWAP_ROUTER and NPM in red-team.sh
to Base Sepolia and fix the invariant comment in export-attacks.py.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-17 23:05:26 +00:00
openhands
99b3a8bc80 fix: export-attacks.py SWAP_ROUTER_ADDR inconsistent with helpers/ (#873)
Update SWAP_ROUTER_ADDR and NPM_ADDR in export-attacks.py from Base
mainnet addresses to the correct Base Sepolia addresses, matching
helpers/market.ts and helpers/swap.ts.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-17 22:39:25 +00:00
johba
7aa266b3a1 Merge pull request 'fix: txn-bot healthcheck missing timeout field (#909)' (#936) from fix/issue-909 into master 2026-03-17 23:26:02 +01:00
openhands
1d229fbc6a ci: retrigger after infra failure (#909) 2026-03-17 21:38:14 +00:00
openhands
b91edf5721 fix: txn-bot healthcheck missing timeout field (#909)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-17 21:27:07 +00:00
johba
e927f44359 Merge pull request 'fix: Double-subtraction if stakingPoolAddr == feeDestination (#911)' (#933) from fix/issue-911 into master 2026-03-17 22:17:20 +01:00
openhands
e4225b364b fix: Double-subtraction if stakingPoolAddr == feeDestination (#911) 2026-03-17 20:49:46 +00:00