Commit graph

1099 commits

Author SHA1 Message Date
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
johba
dc9a053db4 Merge pull request 'fix: Pre-existing: feeDestination source reference also points to wrong line (#913)' (#932) from fix/issue-913 into master 2026-03-17 21:38:36 +01:00
openhands
1d5390be96 fix: Pre-existing: feeDestination source reference also points to wrong line (#913)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-17 20:18:44 +00:00
johba
444da636ad Merge pull request 'fix: txnBot has zero test coverage after deleting recenterAccess.test.ts (#919)' (#930) from fix/issue-919 into master 2026-03-17 20:57:37 +01:00
openhands
074c94dc04 fix: txnBot has zero test coverage after deleting recenterAccess.test.ts (#919) 2026-03-17 19:35:13 +00:00
openhands
3d957bfb76 fix: txnBot has zero test coverage after deleting recenterAccess.test.ts (#919)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-17 19:34:58 +00:00
johba
80f6d94247 Merge pull request 'fix: Bare cd at line 293 in main loop (pre-existing) (#927)' (#929) from fix/issue-927 into master 2026-03-17 20:14:36 +01:00
openhands
db76d648de fix: Bare \cd\ at line 293 in main loop (pre-existing) (#927)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-17 18:47:14 +00:00
johba
415e94243e Merge pull request 'fix: MEMORY_FILE trim may discard DECREASED entries before 4c extraction (#875)' (#926) from fix/issue-875 into master 2026-03-17 19:27:09 +01:00
openhands
8b3fd340ac fix: MEMORY_FILE trim may discard DECREASED entries before 4c extraction (#875)
Address AI reviewer feedback on d1f75a7:

- Wrap cross_file append in try/except so a write failure never prevents
  the memory trim-write from running (bug fix)
- Stamp sweep_id on pre-trim exported entries using the SWEEP_ID env var;
  pass SWEEP_ID from red-team-sweep.sh so entries are attributable to a
  sweep run (data-consistency fix)
- Add inline comment explaining the 3-tuple dedup key (run, ts, strategy)
  and its relationship to step-4c's identity check (clarity nit)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-17 17:58:41 +00:00
johba
e31e7b16fa Merge pull request 'fix: Bare cd in smoke test permanently changes shell working directory (#877)' (#925) from fix/issue-877 into master 2026-03-17 18:46:44 +01:00
openhands
d1f75a790c fix: MEMORY_FILE trim may discard DECREASED entries before 4c extraction (#875)
Before trimming MEMORY_FILE to 50 entries, export any entries that would
be dropped (non-DECREASED entries outside the last 10) directly to
CROSS_PATTERNS_FILE. This ensures no entries are permanently lost before
red-team-sweep.sh step 4c reads the memory file.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-17 17:30:47 +00:00
openhands
315b7777f8 fix: Bare \cd\ in smoke test permanently changes shell working directory (#877)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-17 17:07:17 +00:00
johba
fb68595679 Merge pull request 'fix: sleep 1 polling loop violates AGENTS.md 'never use fixed delays' principle (#878)' (#924) from fix/issue-878 into master 2026-03-17 17:46:45 +01:00
openhands
f481509cf4 ci: retrigger after infra failure 2026-03-17 16:19:02 +00:00
openhands
e2554eb844 fix: \sleep 1\ polling loop violates AGENTS.md 'never use fixed delays' principle (#878)
Replace fixed \`sleep 1\` in the container teardown poll loop with exponential
backoff (100ms → 200ms → … → 2000ms cap). The 30s hard timeout is preserved.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-17 16:07:58 +00:00
johba
bce6d5ddce Merge pull request 'fix: compute_lm_total_eth awk parser reads only the line immediately after == Logs == (#879)' (#923) from fix/issue-879 into master 2026-03-17 16:46:42 +01:00
openhands
f87b6d1fbb ci: retrigger after infra failure 2026-03-17 15:18:24 +00:00