A Windows Forms graphical user interface for the PoCX mining client.
WORK IN PROGRESS - Core infrastructure is complete, but the UI integration is not yet finished.
- MinerProcess.cs - Subprocess management for pocx_miner.exe with YAML config generation
- SettingsManager.cs - User settings persistence (chains, plot dirs, CPU settings, etc.)
- DeviceManager.cs - CPU detection via WMI
- ProgressParser.cs - Output parsing for miner logs (ready for structured output when implemented)
- AddressValidator.cs - Address format validation (Base58, Bech32)
- Settings infrastructure - Complete application settings schema
- MinerForm.cs - Needs integration with MinerProcess, SettingsManager, and ProgressParser
- UI Controls - Wire up Start/Stop buttons, configuration tabs, output display
- Testing - End-to-end testing with actual pocx_miner executable
This GUI is a wrapper around the pocx_miner Rust command-line tool. It:
- Provides a user-friendly interface for configuring mining parameters
- Generates YAML configuration files for pocx_miner
- Launches and manages the miner subprocess
- Parses output and displays mining status in real-time
- Persists user settings between sessions
- Windows OS (Windows 7+)
- .NET Framework 4.5.2 or higher
- Visual Studio 2015+ or MSBuild
- pocx_miner.exe (from the pocx workspace)
- Open
PoCXMinerGUI.sln - Restore NuGet packages:
- Tools > NuGet Package Manager > Restore NuGet Packages
- Build Solution (F6)
- Run (F5)
cd pocx_miner_gui
msbuild PoCXMinerGUI.csproj /p:Configuration=Release- YamlDotNet 11.2.1 - YAML configuration file parsing and generation
- NBitcoin 7.0.36 - Address validation (Base58Check and Bech32 encoders)
- System.Management - WMI for CPU detection
The GUI manages a YAML configuration file for pocx_miner with the following structure:
chains:
- name: "primary_pool"
base_url: "http://pool.example.com:8080"
api_path: "/pocx"
accounts:
- account: "your_account_id"
plot_dirs:
- "/path/to/plots1"
- "/path/to/plots2"
cpu_threads: 8
cpu_worker_task_count: 4
hdd_reader_thread_count: 4
hdd_use_direct_io: true
show_progress: true
show_drive_stats: true
timeout: 5000
get_mining_info_interval: 3000The GUI stores minimal settings in Windows registry/AppData. All mining configuration is stored in miner_config.yaml.
Application settings (Windows registry):
- ConfigFilePath - Path to miner_config.yaml file (default: miner_config.yaml)
- MinerExecutablePath - Path to pocx_miner.exe (default: pocx_miner.exe)
- WindowState/WindowLocation/WindowSize - Window position persistence
Mining configuration (miner_config.yaml):
- All chains, plot directories, CPU/HDD settings, timeouts, etc.
Manages the pocx_miner subprocess:
- Launches pocx_miner.exe with reference to miner_config.yaml
- Captures stdout/stderr streams
- Provides events for output and process exit
- No temp file generation - uses existing miner_config.yaml directly
Data models for miner configuration:
MinerConfig- Top-level configuration with chains, plot dirs, settingsChainConfig- Individual chain/pool configuration with name, URL, accounts
Handles configuration and settings persistence:
LoadConfig(path)- Loads MinerConfig from miner_config.yaml fileSaveConfig(config, path)- Saves MinerConfig to miner_config.yaml fileLoadWindowSettings(form)/SaveWindowSettings(form)- Window positionGetConfigPath()/SetConfigPath(path)- Config file pathLoadMinerPath()/SaveMinerPath(path)- Miner executable path
Hardware detection utilities:
DetectCPUs()- Returns list of CPU devices with thread countsGetTotalLogicalProcessors()- Total threads across all CPUsGetRecommendedThreadCount()- Recommended mining thread countGetSystemInfo()- Formatted system information string
Parses miner output:
ParseLine(line)- Parses a single line of output- Events:
DeadlineFound,NewBlock,ChainStatusChanged,PlotsLoaded - Ready for structured output markers when pocx_miner implements them
Address format validation:
DetectFormat(address)- Returns Base58, Bech32, or UnknownIsValidAddress(address)- Validates checksumGetValidationMessage(address)- Human-readable validation result
- Complete MinerForm.cs UI integration
- Add error handling and user feedback
- Implement configuration management UI (add/edit/remove chains)
- Real-time mining statistics display
- Mining statistics charts and graphs
- Historical deadline tracking
- System resource monitoring
- Auto-update functionality (via GitHub releases)
- System tray support for background mining
The current ProgressParser is designed to work with the existing log output format from pocx_miner. When pocx_miner implements structured progress output (similar to plotter's --line-progress with markers like #TOTAL, #HASH_DELTA, etc.), the parser will be updated to handle those markers for more accurate progress tracking.
This GUI follows the same architecture as pocx_plotter_gui, which is a complete and working reference implementation. Key patterns borrowed:
- Subprocess management with async I/O
- Settings persistence via application settings
- Device detection via WMI
- Progress parsing with event-based updates
- YAML configuration generation
See CLAUDE.md for detailed development guidelines and architecture documentation.
Part of the PoCX project. See main repository for license information.