Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
SV1 to SV2 Translator Proxy
A proxy that translates between Stratum V1 (SV1) and Stratum V2 (SV2) mining protocols. This translator enables SV1 mining devices to connect to SV2 pools and infrastructure, bridging the gap between legacy mining hardware and modern mining protocols.
Architecture Overview
The translator sits between SV1 downstream roles (mining devices) and SV2 upstream roles (pool servers or proxies), providing seamless protocol translation and advanced features like channel aggregation and failover.
<--- Most Downstream ----------------------------------------- Most Upstream --->
+---------------------------------------------------+ +------------------------+
| Mining Farm | | Remote Pool |
| | | |
| +-------------------+ +------------------+ | | +-----------------+ |
| | SV1 Mining Device | <-> | Translator Proxy | <------> | SV2 Pool Server | |
| +-------------------+ +------------------+ | | +-----------------+ |
| | | |
+---------------------------------------------------+ +------------------------+
Configuration
Configuration File Structure
The translator uses TOML configuration files with the following structure:
# Downstream SV1 Connection (where miners connect)
= "0.0.0.0"
= 34255
# Protocol Version Support
= 2
= 2
# Extranonce Configuration
= 4 # Min: 2, Max: 16 (CGminer max: 8)
# User Identity (appended with counter for each miner)
= "your_username_here"
# Channel Configuration
= true # true: shared channel, false: individual channels
# Downstream Difficulty Configuration
[]
= 10_000_000_000_000.0 # 10 TH/s
= 6.0
= true # Set to false when using with Job Declarator Client (JDC)
# Upstream SV2 Connections (supports multiple with failover)
[[]]
= "127.0.0.1"
= 34254
= "9auqWEzQDVyd2oe1JVGFLMLHZtCo2FFqZwtKA5gd9xbuEu7PH72"
[[]]
= "backup.pool.com"
= 34254
= "9auqWEzQDVyd2oe1JVGFLMLHZtCo2FFqZwtKA5gd9xbuEu7PH72"
Configuration Parameters
Make sure the machine running the Translator Proxy has its clock synced with an NTP server. Certificate validation is time-sensitive, and even a small drift of a few seconds can trigger an InvalidCertificate error.
Downstream Configuration
downstream_address: IP address for SV1 miners to connect todownstream_port: Port for SV1 miners to connect to
Protocol Configuration
max_supported_version/min_supported_version: SV2 protocol version supportmin_extranonce2_size: Minimum extranonce2 size (affects mining efficiency)
Channel Configuration
aggregate_channels:true: All miners share one upstream extended channel (more efficient)false: Each miner gets its own upstream extended channel (more isolated)
user_identity: Username for pool authentication (auto-suffixed per miner)
Difficulty Configuration
min_individual_miner_hashrate: Expected hashrate of weakest miner (in H/s)shares_per_minute: Target share submission rateenable_vardiff: Enable/disable variable difficulty adjustment (set to false when using with JDC)- When
true: Translator manages difficulty adjustments based on share submission rates - When
false: Upstream manages difficulty, translator forwards SetTarget messages to miners
- When
Upstream Configuration
address/port: SV2 upstream server connection detailsauthority_pubkey: Public key for SV2 connection authentication
Usage
Installation & Build
# Clone the repository
# Build the translator
Running the Translator
With Local Pool
With Job Declaration Client
With Hosted Pool
Command Line Options
# Use specific config file
# Show help
Configuration Examples
Example 1: Local Pool Setup
For connecting to a local SV2 pool server:
= "0.0.0.0"
= 34255
= "miner_farm_1"
= true
[]
= 10_000_000_000_000.0
= 6.0
= true
[[]]
= "127.0.0.1"
= 34254
= "9auqWEzQDVyd2oe1JVGFLMLHZtCo2FFqZwtKA5gd9xbuEu7PH72"
Example 2: High-Availability Setup
For production environments with failover:
= "0.0.0.0"
= 34255
= "production_farm"
= true
[]
= 50_000_000_000_000.0 # 50 TH/s
= 10.0
= true
# Primary upstream
[[]]
= "primary.pool.com"
= 34254
= "primary_pool_pubkey"
# Backup upstream
[[]]
= "backup.pool.com"
= 34254
= "backup_pool_pubkey"
Architecture Details
Component Overview
- SV1 Server: Handles incoming SV1 connections from mining devices
- SV2 Upstream: Manages connections to SV2 pool servers with failover
- Channel Manager: Orchestrates message routing and protocol translation
- Task Manager: Manages async task lifecycle and coordination
- Status System: Provides real-time monitoring and health reporting
Channel Modes
-
Aggregated Mode: All miners share one extended channel
- More efficient for large farms
- Reduced upstream connection overhead
- Shared work distribution
-
Non-Aggregated Mode: Each miner gets individual upstream channel
- Better isolation between miners
- Individual difficulty adjustment by the upstream Pool