Files
mev-beta/safety_test_final.log
Administrator 7694811784 ...
2025-11-17 20:45:05 +01:00

14 KiB

[2025-11-11 00:22:26] ========================================
[2025-11-11 00:22:26] MEV Bot V2 - Safety Mechanisms Testing
[2025-11-11 00:22:26] ========================================
[2025-11-11 00:22:26]
[2025-11-11 00:22:26] TEST 1: Starting Anvil fork...
[2025-11-11 00:22:28] Waiting for Anvil to start (PID: 716379)...
✅ PASS: Anvil started successfully at block 398940003
[2025-11-11 00:22:33] Test account balance: 10000000000000000000000 wei
✅ PASS: Test account has balance
[2025-11-11 00:22:33] TEST 2: Creating safety configuration...
✅ PASS: Safety configuration created
[2025-11-11 00:22:33] Configuration file: /docker/mev-beta/.env.safety.test
[2025-11-11 00:22:33] TEST 3: Building Docker image...
✅ PASS: Docker image built successfully
[2025-11-11 00:24:07] TEST 4: Deploying bot with safety configuration...
[2025-11-11 00:24:07] Waiting for bot initialization (10 seconds)...
✅ PASS: Bot deployed and running
[2025-11-11 00:24:18] Initial bot logs:
{"time":"2025-11-10T23:24:22.338408009Z","level":"INFO","msg":"connected to sequencer","component":"sequencer_reader"}
{"time":"2025-11-10T23:24:22.338449818Z","level":"ERROR","msg":"subscription failed","component":"sequencer_reader","error":"subscription response failed: read tcp 127.0.0.1:58458->127.0.0.1:8545: i/o timeout"}
{"time":"2025-11-10T23:24:22.339035559Z","level":"INFO","msg":"connected to sequencer","component":"sequencer_reader"}
{"time":"2025-11-10T23:24:22.33911681Z","level":"ERROR","msg":"subscription failed","component":"sequencer_reader","error":"subscription response failed: read tcp 127.0.0.1:58470->127.0.0.1:8545: i/o timeout"}
{"time":"2025-11-10T23:24:22.340916553Z","level":"INFO","msg":"connected to sequencer","component":"sequencer_reader"}
{"time":"2025-11-10T23:24:22.340997133Z","level":"ERROR","msg":"subscription failed","component":"sequencer_reader","error":"subscription response failed: read tcp 127.0.0.1:58472->127.0.0.1:8545: i/o timeout"}
{"time":"2025-11-10T23:24:22.341544664Z","level":"INFO","msg":"connected to sequencer","component":"sequencer_reader"}
{"time":"2025-11-10T23:24:22.341577194Z","level":"ERROR","msg":"subscription failed","component":"sequencer_reader","error":"subscription response failed: read tcp 127.0.0.1:58474->127.0.0.1:8545: i/o timeout"}
{"time":"2025-11-10T23:24:22.342003828Z","level":"INFO","msg":"connected to sequencer","component":"sequencer_reader"}
{"time":"2025-11-10T23:24:22.342108975Z","level":"ERROR","msg":"subscription failed","component":"sequencer_reader","error":"subscription response failed: read tcp 127.0.0.1:58478->127.0.0.1:8545: i/o timeout"}
{"time":"2025-11-10T23:24:22.342738027Z","level":"INFO","msg":"connected to sequencer","component":"sequencer_reader"}
{"time":"2025-11-10T23:24:22.342776037Z","level":"ERROR","msg":"subscription failed","component":"sequencer_reader","error":"subscription response failed: read tcp 127.0.0.1:58484->127.0.0.1:8545: i/o timeout"}
{"time":"2025-11-10T23:24:22.343221167Z","level":"INFO","msg":"connected to sequencer","component":"sequencer_reader"}
{"time":"2025-11-10T23:24:22.343250121Z","level":"ERROR","msg":"subscription failed","component":"sequencer_reader","error":"subscription response failed: read tcp 127.0.0.1:58490->127.0.0.1:8545: i/o timeout"}
{"time":"2025-11-10T23:24:22.344202365Z","level":"INFO","msg":"connected to sequencer","component":"sequencer_reader"}
{"time":"2025-11-10T23:24:22.344247339Z","level":"ERROR","msg":"subscription failed","component":"sequencer_reader","error":"subscription response failed: read tcp 127.0.0.1:58494->127.0.0.1:8545: i/o timeout"}
{"time":"2025-11-10T23:24:22.344749735Z","level":"INFO","msg":"connected to sequencer","component":"sequencer_reader"}
{"time":"2025-11-10T23:24:22.344804096Z","level":"ERROR","msg":"subscription failed","component":"sequencer_reader","error":"subscription response failed: read tcp 127.0.0.1:58504->127.0.0.1:8545: i/o timeout"}
{"time":"2025-11-10T23:24:22.345704744Z","level":"INFO","msg":"connected to sequencer","component":"sequencer_reader"}
{"time":"2025-11-10T23:24:22.345747544Z","level":"ERROR","msg":"subscription failed","component":"sequencer_reader","error":"subscription response failed: read tcp 127.0.0.1:58516->127.0.0.1:8545: i/o timeout"}
[2025-11-11 00:24:22] TEST 5: Verifying safety configuration loaded...
[2025-11-11 00:24:26] ✓ Dry-run mode detected in logs
[2025-11-11 00:24:27] ✓ Circuit breaker mentioned in logs
[2025-11-11 00:24:27] ✓ Position size limits mentioned
[2025-11-11 00:24:27] ✓ Chain ID (42161) confirmed
[2025-11-11 00:24:27] ✓ RPC URL pointing to local Anvil
✅ PASS: Safety configuration verified (5/5 checks)
[2025-11-11 00:24:27] TEST 6: Testing emergency stop mechanism...
[2025-11-11 00:24:27] Bot is running, creating emergency stop file inside container...
[2025-11-11 00:24:28] Emergency stop file created: /tmp/mev-bot-emergency-stop
[2025-11-11 00:24:28] Waiting 15 seconds for bot to detect and stop...
❌ FAIL: Bot did not detect emergency stop file
[2025-11-11 00:24:55] WARNING: Note: Emergency stop mechanism may not be implemented yet in current code
[2025-11-11 00:24:55] Recent logs:
{"time":"2025-11-10T23:24:50.258869154Z","level":"ERROR","msg":"subscription failed","component":"sequencer_reader","error":"subscription response failed: read tcp 127.0.0.1:44626->127.0.0.1:8545: i/o timeout"}
{"time":"2025-11-10T23:24:50.259985554Z","level":"INFO","msg":"connected to sequencer","component":"sequencer_reader"}
{"time":"2025-11-10T23:24:50.260120816Z","level":"ERROR","msg":"subscription failed","component":"sequencer_reader","error":"subscription response failed: read tcp 127.0.0.1:44630->127.0.0.1:8545: i/o timeout"}
{"time":"2025-11-10T23:24:50.261297518Z","level":"INFO","msg":"connected to sequencer","component":"sequencer_reader"}
{"time":"2025-11-10T23:24:50.261457977Z","level":"ERROR","msg":"subscription failed","component":"sequencer_reader","error":"subscription response failed: read tcp 127.0.0.1:44646->127.0.0.1:8545: i/o timeout"}
{"time":"2025-11-10T23:24:50.262324742Z","level":"INFO","msg":"connected to sequencer","component":"sequencer_reader"}
{"time":"2025-11-10T23:24:50.262453272Z","level":"ERROR","msg":"subscription failed","component":"sequencer_reader","error":"subscription response failed: read tcp 127.0.0.1:44662->127.0.0.1:8545: i/o timeout"}
{"time":"2025-11-10T23:24:50.267210365Z","level":"INFO","msg":"connected to sequencer","component":"sequencer_reader"}
{"time":"2025-11-10T23:24:50.267560007Z","level":"ERROR","msg":"subscription failed","component":"sequencer_reader","error":"subscription response failed: read tcp 127.0.0.1:44664->127.0.0.1:8545: i/o timeout"}
{"time":"2025-11-10T23:24:50.269163674Z","level":"INFO","msg":"connected to sequencer","component":"sequencer_reader"}
{"time":"2025-11-10T23:24:50.269348678Z","level":"ERROR","msg":"subscription failed","component":"sequencer_reader","error":"subscription response failed: read tcp 127.0.0.1:44678->127.0.0.1:8545: i/o timeout"}
{"time":"2025-11-10T23:24:50.279929192Z","level":"INFO","msg":"connected to sequencer","component":"sequencer_reader"}
{"time":"2025-11-10T23:24:50.280188896Z","level":"ERROR","msg":"subscription failed","component":"sequencer_reader","error":"subscription response failed: read tcp 127.0.0.1:44682->127.0.0.1:8545: i/o timeout"}
{"time":"2025-11-10T23:24:50.281192355Z","level":"INFO","msg":"connected to sequencer","component":"sequencer_reader"}
{"time":"2025-11-10T23:24:50.28146819Z","level":"ERROR","msg":"subscription failed","component":"sequencer_reader","error":"subscription response failed: read tcp 127.0.0.1:44684->127.0.0.1:8545: i/o timeout"}
{"time":"2025-11-10T23:24:50.282747833Z","level":"INFO","msg":"connected to sequencer","component":"sequencer_reader"}
{"time":"2025-11-10T23:24:50.282903553Z","level":"ERROR","msg":"subscription failed","component":"sequencer_reader","error":"subscription response failed: read tcp 127.0.0.1:44692->127.0.0.1:8545: i/o timeout"}
{"time":"2025-11-10T23:24:50.284142813Z","level":"INFO","msg":"connected to sequencer","component":"sequencer_reader"}
{"time":"2025-11-10T23:24:50.284317458Z","level":"ERROR","msg":"subscription failed","component":"sequencer_reader","error":"subscription response failed: read tcp 127.0.0.1:44696->127.0.0.1:8545: i/o timeout"}
{"time":"2025-11-10T23:24:50.285965979Z","level":"INFO","msg":"connected to sequencer","component":"sequencer_reader"}
[2025-11-11 00:24:55] WARNING: Emergency stop needs verification
[2025-11-11 00:24:55] TEST 7: Testing circuit breaker (simulation)...
[2025-11-11 00:24:55] Checking circuit breaker configuration in logs...
✅ PASS: Circuit breaker configuration detected
[2025-11-11 00:25:16] Circuit breaker settings:
{"time":"2025-11-10T23:24:07.998240217Z","level":"INFO","msg":"circuit breaker","enabled":true,"max_consecutive_losses":3,"max_hourly_loss_eth":"0.1000","max_daily_loss_eth":"0.5000"}
{"time":"2025-11-10T23:25:08.008387369Z","level":"INFO","msg":"📈 Stats Report","pools_cached":5,"tx_processed":0,"opportunities_found":0,"executions_attempted":0,"circuit_breaker_open":false,"daily_volume":"0"}
[2025-11-11 00:25:17] WARNING: Full circuit breaker testing requires actual losing trades (testnet recommended)
[2025-11-11 00:25:17] TEST 8: Verifying position size limits...
✅ PASS: Position size limits configured
[2025-11-11 00:25:43] Position limit settings:
{"time":"2025-11-10T23:24:07.998217013Z","level":"INFO","msg":"risk limits","max_position_size_eth":"-8.4467","max_daily_volume_eth":"7.7663","max_slippage_bps":200,"max_gas_price_gwei":50}
[2025-11-11 00:25:44] TEST 9: Creating test swap to trigger detection...
[2025-11-11 00:25:44] Nonce before test swap: 14035
[2025-11-11 00:25:44] Pool accessible, creating test swap...
✅ PASS: Test swap created: 0xd9840410a8469f02fe8f026e72e3fb00f12bacaa0c6416cc87feca9e908579e4
[2025-11-11 00:25:48] Nonce after test swap: 14036 (delta: 1)
[2025-11-11 00:25:48] Waiting 5 seconds for bot to detect swap...
[2025-11-11 00:26:11] WARNING: Bot may not have detected swap (expected for dry-run mode)
[2025-11-11 00:26:11] Recent logs:
{"time":"2025-11-10T23:26:11.103855824Z","level":"ERROR","msg":"subscription failed","component":"sequencer_reader","error":"subscription response failed: read tcp 127.0.0.1:40914->127.0.0.1:8545: i/o timeout"}
{"time":"2025-11-10T23:26:11.105315172Z","level":"INFO","msg":"connected to sequencer","component":"sequencer_reader"}
{"time":"2025-11-10T23:26:11.105617286Z","level":"ERROR","msg":"subscription failed","component":"sequencer_reader","error":"subscription response failed: read tcp 127.0.0.1:40922->127.0.0.1:8545: i/o timeout"}
{"time":"2025-11-10T23:26:11.107185046Z","level":"INFO","msg":"connected to sequencer","component":"sequencer_reader"}
{"time":"2025-11-10T23:26:11.107404155Z","level":"ERROR","msg":"subscription failed","component":"sequencer_reader","error":"subscription response failed: read tcp 127.0.0.1:40936->127.0.0.1:8545: i/o timeout"}
{"time":"2025-11-10T23:26:11.109016358Z","level":"INFO","msg":"connected to sequencer","component":"sequencer_reader"}
{"time":"2025-11-10T23:26:11.109737492Z","level":"ERROR","msg":"subscription failed","component":"sequencer_reader","error":"subscription response failed: read tcp 127.0.0.1:40942->127.0.0.1:8545: i/o timeout"}
{"time":"2025-11-10T23:26:11.111387937Z","level":"INFO","msg":"connected to sequencer","component":"sequencer_reader"}
{"time":"2025-11-10T23:26:11.111645647Z","level":"ERROR","msg":"subscription failed","component":"sequencer_reader","error":"subscription response failed: read tcp 127.0.0.1:40958->127.0.0.1:8545: i/o timeout"}
{"time":"2025-11-10T23:26:11.113019988Z","level":"INFO","msg":"connected to sequencer","component":"sequencer_reader"}
[2025-11-11 00:26:11] TEST 10: Verifying dry-run mode (no real transactions)...
[2025-11-11 00:26:11] Nonce before test swap: 14035
[2025-11-11 00:26:11] Nonce after test swap: 14036
[2025-11-11 00:26:11] Nonce now: 14036
[2025-11-11 00:26:11] Test swap transactions: 1 (expected: 1)
[2025-11-11 00:26:11] Bot transactions since swap: 0 (expected: 0 for dry-run)
✅ PASS: Dry-run verified: only test swap executed (bot created 0 transactions)
[2025-11-11 00:26:39] WARNING: Dry-run confirmation not explicit in logs (check safety configuration)
[2025-11-11 00:26:39]
[2025-11-11 00:26:39] ========================================
[2025-11-11 00:26:39] Test Summary
[2025-11-11 00:26:39] ========================================
[2025-11-11 00:26:39] Tests Passed: 10
[2025-11-11 00:26:39] Tests Failed: 1
[2025-11-11 00:26:39] Total Tests: 11
[2025-11-11 00:26:39]
[2025-11-11 00:26:39] Generating test report...
[2025-11-11 00:26:40] Test report generated: /docker/mev-beta/SAFETY_TEST_RESULTS.md
[2025-11-11 00:26:40] ========================================
[2025-11-11 00:26:40] Test Complete
[2025-11-11 00:26:40] ========================================
[2025-11-11 00:26:40] Results: /docker/mev-beta/SAFETY_TEST_RESULTS.md
[2025-11-11 00:26:40] Logs: /docker/mev-beta/safety_test.log
[2025-11-11 00:26:40]
[2025-11-11 00:26:40] ⚠️ Some tests failed. Review results before proceeding.
[2025-11-11 00:26:40] Cleaning up test environment...
mev-bot-v2-safety-test
mev-bot-v2-safety-test
[2025-11-11 00:26:40] Cleanup complete