Completed clean root directory structure: - Root now contains only: .git, .env, docs/, orig/ - Moved all remaining files and directories to orig/: - Config files (.claude, .dockerignore, .drone.yml, etc.) - All .env variants (except active .env) - Git config (.gitconfig, .github, .gitignore, etc.) - Tool configs (.golangci.yml, .revive.toml, etc.) - Documentation (*.md files, @prompts) - Build files (Dockerfiles, Makefile, go.mod, go.sum) - Docker compose files - All source directories (scripts, tests, tools, etc.) - Runtime directories (logs, monitoring, reports) - Dependency files (node_modules, lib, cache) - Special files (--delete) - Removed empty runtime directories (bin/, data/) V2 structure is now clean: - docs/planning/ - V2 planning documents - orig/ - Complete V1 codebase preserved - .env - Active environment config (not in git) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
43 lines
1.3 KiB
Markdown
43 lines
1.3 KiB
Markdown
# Debug Issue
|
|
|
|
Debug the following MEV bot issue: $ARGUMENTS
|
|
|
|
## Debugging Protocol:
|
|
1. **Issue Understanding**: Analyze the problem description and expected vs actual behavior
|
|
2. **Log Analysis**: Examine relevant log files in `logs/` directory
|
|
3. **Code Investigation**: Review related source code and recent changes
|
|
4. **Reproduction**: Attempt to reproduce the issue in a controlled environment
|
|
5. **Root Cause**: Identify the underlying cause and contributing factors
|
|
|
|
## Debugging Commands:
|
|
```bash
|
|
# Check logs
|
|
tail -f logs/mev-bot.log
|
|
|
|
# Run with debug logging
|
|
LOG_LEVEL=debug ./mev-bot start
|
|
|
|
# Check system resources
|
|
htop
|
|
iostat -x 1 5
|
|
|
|
# Network connectivity
|
|
nc -zv arbitrum-mainnet.core.chainstack.com 443
|
|
|
|
# Go runtime stats
|
|
curl http://localhost:9090/debug/vars | jq
|
|
```
|
|
|
|
## Investigation Areas:
|
|
- **Connection Issues**: RPC endpoint connectivity and WebSocket stability
|
|
- **Parsing Errors**: Transaction and event parsing failures
|
|
- **Performance**: High CPU/memory usage or processing delays
|
|
- **Concurrency**: Race conditions or deadlocks
|
|
- **Configuration**: Environment variables and configuration issues
|
|
|
|
## Output Requirements:
|
|
- Clear problem identification
|
|
- Step-by-step reproduction instructions
|
|
- Root cause analysis
|
|
- Proposed solution with implementation steps
|
|
- Test plan to verify the fix |