Commit graph

72 commits

Author SHA1 Message Date
snider
bec2accf1a feat: Add OpenCL GPU support for ProgPowZ, ETChash, and Blake3DCR
Implement GPU mining backends for three new algorithms:

- ProgPowZ (Zano): DAG-based ProgPow variant with 512 parents, dynamic
  program generation per period
- ETChash (Ethereum Classic): Standard Ethash with 256 parents and
  ECIP-1099 epoch calculation for post-block 11.7M
- Blake3DCR (Decred): Simple Blake3 hash kernel with no DAG requirement,
  processing 180-byte block headers

Each implementation includes OpenCL kernels, GPU runners, thread
generators, and build system integration. Also adds fast modulo
optimization to ETCCache for GPU kernel performance.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 23:01:16 +00:00
snider
b1aced8341 feat: Add stratum integration and mining support for new algorithms
- Stratum protocol integration for ETChash, ProgPowZ, Blake3DCR
- EthStratumClient selection for DAG-based algorithms
- Nonce offset handling for all new algorithm families
- AutoClient support for new algorithm detection
- Coin definitions for ETC, ETH, ZANO, DCR

Worker integration:
- CPU worker support for Blake3DCR mining
- GPU worker stubs for ETChash, ProgPowZ, Blake3
- Proper algorithm family handling in CpuWorker/OclWorker

Go CLI integration:
- Updated xmrig_start.go with coin field support
- Improved pool configuration for new algorithms

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 20:56:19 +00:00
snider
9cf0db802a feat: Add Blake3DCR algorithm support (Decred)
- Add Blake3 cryptographic hash library (portable C implementation)
- Create Blake3DCR wrapper for Decred mining (180-byte block headers)
- Register BLAKE3_DCR algorithm ID (0x62100000) with dcr/decred aliases
- Support for block header hashing and nonce iteration

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 20:30:05 +00:00
snider
b7af288374 feat: Add ProgPowZ algorithm support (Zano)
- Add core crypto implementation (ProgPowZHash.cpp, ProgPowZCache.cpp)
- ProgPowZ uses standard Ethash 30000 block epochs
- Period length 50 (vs 3 for KawPow), CNT_CACHE 12, CNT_MATH 20
- Integrate with OpenCL and CUDA backends for memory calculation
- Register PROGPOWZ_ZANO algorithm ID (0x70100000)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 20:19:54 +00:00
snider
353afe46ae feat: Add ETChash/Ethash algorithm support
- Add core crypto implementation (ETChash.cpp, ETCCache.cpp)
- Implement ECIP-1099 epoch calculation for Ethereum Classic
- Add Ethash support with standard 30000 block epochs
- Integrate with OpenCL and CUDA backends for memory calculation
- Register ETCHASH_ETC and ETHASH_ETH algorithm IDs

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 20:08:36 +00:00
snider
327a4968e1 chore: Update gitignore for build artifacts
Add miner C++ build directories and legacy miner-cli binary

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 19:44:59 +00:00
snider
69376b886f feat: Rebrand xmrig to miner and vendor XMRig ecosystem
Complete rebranding of all components:
- Core miner: xmrig -> miner (binary, version.h, CMakeLists.txt)
- Proxy: xmrig-proxy -> miner-proxy
- CUDA plugin: xmrig-cuda -> miner-cuda
- Heatmap: xmrig-nonces-heatmap -> miner-nonces-heatmap
- Go CLI wrapper: miner-cli -> miner-ctrl

Vendored XMRig ecosystem into miner/ directory:
- miner/core - XMRig CPU/GPU miner
- miner/proxy - Stratum proxy
- miner/cuda - NVIDIA CUDA plugin
- miner/heatmap - Nonce visualization tool
- miner/config - Configuration UI
- miner/deps - Pre-built dependencies

Updated dev fee to use project wallet with opt-out (kMinimumDonateLevel=0)
Updated branding to Lethean (domain, copyright, version 0.1.0)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 19:43:02 +00:00
snider
876253f194 feat: Add dual CPU+GPU mining support with separate pools/algos
- Add GPU config fields: GPUEnabled, GPUPool, GPUWallet, GPUAlgo, CUDA, OpenCL
- XMRig config now supports separate pool/algo for GPU vs CPU mining
- CPU can mine RandomX while GPU mines KawPow on different pools
- Add xmrig_gpu_test.go with tests for dual, GPU-only, and CPU-only configs
- Make getXMRigConfigPath a variable for test overriding

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 17:23:59 +00:00
snider
ab47bae0a3 feat: Add CPU throttling, settings manager, and multi-miner tests
- Add CPUMaxThreadsHint, priority, pause-on-active/battery to XMRig config
- Create SettingsManager for app preferences (window state, miner defaults)
- Add settings API to desktop app service (GetSettings, SaveWindowState, etc)
- Create throttle_test.go with multi-miner CPU usage verification tests
- Create settings_manager_test.go with concurrent access tests
- Desktop app now remembers window size between launches

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 16:35:02 +00:00
snider
a23dbbedc0 feat: Add Playwright Trace Viewer with initial HTML, CSS, and JavaScript files 2025-12-30 03:12:31 +00:00
snider
425e7358a3 docs: Add desktop app section to CLAUDE.md
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 03:09:46 +00:00
snider
80d2c56047 feat: Add Wails desktop app with cross-platform GitHub Actions build
Create native desktop application using Wails v3 with Angular frontend.
The app wraps the mining CLI backend and exposes functionality via
TypeScript bindings for system info, miner control, profiles, and stats.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 01:55:14 +00:00
snider
3057701ac1 feat: Add SQLite persistence, enhanced dashboard UI, and comprehensive E2E tests
- Add SQLite database package for hashrate history persistence with configurable retention
- Enhance dashboard with responsive stats bar, improved chart component, and worker selector
- Add terminal modal component for console output viewing
- Implement comprehensive E2E test suite with page objects pattern
- Add history API endpoints for historical data queries
- Update worker message handling with proper registration
- Add new UI pages structure with layouts and components
- Update Docker configuration for Go 1.24
- Add PostCSS configuration for Tailwind CSS processing

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 00:03:30 +00:00
snider
b9f9143336 feat: Add avg difficulty per share statistic to dashboard
- Add AvgDifficulty and DiffCurrent fields to PerformanceMetrics
- Calculate avg difficulty as HashesTotal/SharesGood in XMRig stats
- Add difficulty data to TT-Miner stats using pool difficulty
- Display "Avg Diff" stat in stats panel with k/M/G/T formatting
- Add WriteStdin to MockMiner for test interface compliance

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 23:41:26 +00:00
snider
f10e7a16e2 feat: Add stdin console commands, SQLite persistence, and P2P enhancements
- Add stdin pipe support for sending console commands to running miners (XMRig/TT-Miner)
- Add base64 encoding for log transport to preserve ANSI escape codes
- Add SQLite database for persistent hashrate history storage
- Enhance P2P worker to handle remote miner commands (start/stop/stats/logs)
- Add console UI page with ANSI-to-HTML rendering and command input
- Add E2E tests for navigation, UI elements, and miner start flow
- Update Dockerfile to use Go 1.24 with GOTOOLCHAIN=auto

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 23:30:19 +00:00
snider
e0c9c92244 feat: Implement logging functionality for miners with log buffer and retrieval endpoint 2025-12-29 22:10:45 +00:00
snider
5f3fe0deee feat(ui): Add loading states with spinners to action buttons
Add visual feedback for async operations across UI components:
- Profile list: Start, Delete, and Save buttons show spinners during actions
- Profile create: Create Profile button shows spinner during submission
- Nodes page: Initialize Node, Add Peer, Ping, and Remove buttons show spinners

Buttons are disabled while their action is in progress to prevent
duplicate submissions.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 22:08:01 +00:00
snider
9a781ae3f0 feat: Add multi-node P2P mining management system
Implement secure peer-to-peer communication between Mining CLI instances
for remote control of mining rigs. Uses Borg library for encryption
(SMSG, STMF, TIM) and Poindexter for KD-tree based peer selection.

Features:
- Node identity management with X25519 keypairs
- Peer registry with multi-factor optimization (ping/hops/geo/score)
- WebSocket transport with SMSG encryption
- Controller/Worker architecture for remote operations
- TIM/STIM encrypted bundles for profile/miner deployment
- CLI commands: node, peer, remote
- REST API endpoints for node/peer/remote operations
- Docker support for P2P testing with multiple nodes

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 19:49:33 +00:00
snider
8460b8f3be feat: Add multi-miner dashboard support and TT-Miner implementation
Dashboard:
- Add aggregate stats across all running miners (total hashrate, shares)
- Add workers table with per-miner stats, efficiency, and controls
- Show hashrate bars and efficiency badges for each worker
- Support stopping individual workers or all at once

TT-Miner:
- Implement Install, Start, GetStats, CheckInstallation, Uninstall
- Add TT-Miner to Manager's StartMiner and ListAvailableMiners
- Support GPU-specific config options (devices, intensity, cliArgs)

Chart:
- Improve styling with WA-Pro theme variables
- Add hashrate unit formatting (H/s, kH/s, MH/s)
- Better tooltip and axis styling

Also:
- Fix XMRig download URLs (linux-static-x64, windows-x64)
- Add Playwright E2E testing infrastructure
- Add XMR pool research documentation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 22:48:20 +00:00
Snider
9dbcf7885c feat: Enhance dashboard layout with responsive stats bar and chart integration 2025-12-11 16:04:17 +00:00
Snider
7d6e6e9c42 feat: Add stats bar component to display miner performance metrics and update dashboard layout 2025-12-11 15:22:58 +00:00
Snider
aefe328254 feat: Add start miner button to profile list for improved user interaction 2025-12-11 15:01:43 +00:00
Snider
52b4a1c6eb feat: Refactor profile selection to support multiple miners and improve event handling 2025-12-11 14:52:36 +00:00
Snider
eab37128cd feat: Refactor profile selection logic to support multiple miners and improve UI layout 2025-12-11 14:52:29 +00:00
Snider
a513ba4670 feat: Rename checkSystemState to forceRefreshState and refactor polling logic for improved clarity 2025-12-11 14:36:08 +00:00
Snider
d132cdc8ff feat: Refactor profile edit form to use custom element bindings and improve event handling 2025-12-11 14:29:08 +00:00
Snider
47a27669f9 feat: Enhance profile creation form with custom element bindings and improved styling 2025-12-11 14:19:45 +00:00
Snider
f913410563 feat: Refactor profile creation form for improved accessibility and styling 2025-12-11 14:08:15 +00:00
Snider
a3ff0bbdaf feat: Optimize saveProfiles method by removing unnecessary read lock 2025-12-11 14:08:02 +00:00
Snider
0d412e6faa feat: Add setup wizard and profile management components with styling 2025-12-10 22:17:38 +00:00
Snider
8f888a3749 feat: Refactor dashboard layout and integrate admin panel functionality 2025-12-07 18:31:27 +00:00
Snider
0d531032bf feat: Implement admin panel for miner management with setup wizard 2025-12-07 17:08:26 +00:00
Snider
816f860b73 feat: Enhance mining configuration management and API documentation 2025-12-07 16:26:18 +00:00
Snider
2576d4bc1b feat: Update server configuration and add XMRig miner management functionality 2025-12-07 15:14:30 +00:00
Snider
6795a928d1 fix: Update .gitignore to exclude log files and miner-cli binary 2025-12-07 12:53:45 +00:00
fa618b41a2
Merge pull request #10 from Snider/add-docs-folder
Add descriptive markdown documentation to docs folder
2025-11-25 00:09:27 +00:00
google-labs-jules[bot]
960ae087fa Add descriptive markdown documentation to docs folder
Added comprehensive documentation including:
- API.md: REST API reference.
- CLI.md: Command Line Interface usage.
- ARCHITECTURE.md: System design and components.
- DEVELOPMENT.md: Developer guide.
- README.md: Index for the documentation.
2025-11-25 00:03:35 +00:00
d9dfb242d6
Merge pull request #7 from Snider/add-docstrings-to-mining-package
Add comprehensive docstrings to the mining package
2025-11-14 14:35:28 +00:00
google-labs-jules[bot]
6412362ea6 feat: Add comprehensive docstrings to the mining package
This commit adds comprehensive Go docstrings to the `pkg/mining` package,
including `mining.go`, `manager.go`, `manager_interface.go`, and `xmrig.go`.

The docstrings cover all public types, interfaces, functions, and methods,
and include examples where appropriate to illustrate usage.

This change improves the developer experience by making the code easier to
understand and use.
2025-11-14 14:32:57 +00:00
27ccac2eb5
Merge pull request #6 from Snider/feature-good-bad-ugly-tests
feat: add _Good, _Bad, _Ugly tests
2025-11-13 21:26:33 +00:00
google-labs-jules[bot]
e107920b16 feat: add _Good, _Bad, _Ugly tests
Refactors the existing test suite to use a `_Good`, `_Bad`, and `_Ugly` testing structure. This new format improves the clarity and organization of the tests by distinguishing between happy path scenarios (_Good), expected failures (_Bad), and edge cases (_Ugly).

In addition to reorganizing the existing tests, this change also introduces new `_Bad` test cases to `xmrig_test.go` to cover previously untested failure modes, such as a missing miner binary and an unreachable API. This improves the overall quality and robustness of the test suite.
2025-11-13 21:24:25 +00:00
71efcb71e2
Merge pull request #5 from Snider/feature-increase-test-coverage
Feature increase test coverage
2025-11-13 19:50:29 +00:00
google-labs-jules[bot]
0533a9fb9c fix(ui): Correct UI build and server configuration
Corrected the build script in `ui/package.json` to correctly bundle the Angular application. Also updated `pkg/mining/service.go` to serve the correct bundled JavaScript file.

Verified the backend server is running and accessible by testing the Swagger UI endpoint.
2025-11-13 19:49:58 +00:00
google-labs-jules[bot]
c74f360dd0 feat(mining): Increase test coverage for service and manager
Added tests for GetMiner and ListMiners in the manager, and for the GetInfo and Doctor endpoints in the service. This increases the overall test coverage of the pkg/mining package.
2025-11-13 19:23:33 +00:00
google-labs-jules[bot]
1e2fa7a85a feat(mining): Increase test coverage for manager
Added tests for StartMiner and StopMiner in the manager, increasing test coverage for the pkg/mining package.

Refactored the findMinerBinary function to fall back to the system PATH, making the application more robust and easier to test.
2025-11-13 19:17:07 +00:00
2885a152f3
Enhance README with usage examples and details
Added example command and updated HTML script tag.
2025-11-10 02:26:09 +00:00
Snider
27834c332c integrates Highcharts for live hashrate visualization and updates dashboard layout 2025-11-10 02:22:56 +00:00
0d2dc1ddd8
Enhance README with usage example and description update
Updated project description and added usage example.
2025-11-10 01:59:39 +00:00
01fb04ef02
Merge pull request #4 from Snider/feature-increase-test-coverage
feat: Increase test coverage for pkg/mining
2025-11-10 00:59:13 +00:00
google-labs-jules[bot]
baf732b999 feat: Increase test coverage for pkg/mining
This commit introduces a number of new tests for the `pkg/mining` package,
increasing the overall test coverage from 8.2% to 41.4%.

The following changes were made:

- Added tests for the `XMRigMiner` struct, including its methods for
  installation, starting, stopping, and getting stats.
- Added tests for the `Service` layer, including the API endpoints for
  listing, starting, stopping, and getting stats for miners.
- Added tests for the `Manager`, including starting and stopping multiple
  miners, collecting stats, and getting hashrate history.
- Introduced a `ManagerInterface` to decouple the `Service` layer from the
  concrete `Manager` implementation, facilitating testing with mocks.
- Fixed a failing test on Windows by creating a Windows-compatible
  dummy executable.
- Improved encapsulation in tests by adding and using getter methods for
  private fields.
2025-11-10 00:55:35 +00:00