2 releases
0.1.1 | May 7, 2024 |
---|---|
0.1.0 | Mar 29, 2024 |
#11 in #sv2
95 downloads per month
1MB
16K
SLoC
SV1 to SV2 Translator Proxy
This proxy is designed to sit in between a SV1 Downstream role (most typically Mining Device(s) running SV1 firmware) and a SV2 Upstream role (most typically a SV2 Pool Server with Extended Channel support).
The most typical high level configuration is:
<--- Most Downstream ----------------------------------------- Most Upstream --->
+---------------------------------------------------+ +------------------------+
| Mining Farm | | Remote Pool |
| | | |
| +-------------------+ +------------------+ | | +-----------------+ |
| | SV1 Mining Device | <-> | Translator Proxy | <------> | SV2 Pool Server | |
| +-------------------+ +------------------+ | | +-----------------+ |
| | | |
+---------------------------------------------------+ +------------------------+
Setup
Configuration File
tproxy-config-local-jdc-example.toml
and tproxy-config-local-pool-example.toml
are examples of configuration files for the Translator Proxy.
The configuration file contains the following information:
- The SV2 Upstream connection information which includes the SV2 Pool authority public key
(
upstream_authority_pubkey
) and the SV2 Pool connection address (upstream_address
) and port (upstream_port
). - The SV1 Downstream socket information which includes the listening IP address
(
downstream_address
) and port (downstream_port
). - The maximum and minimum SRI versions (
max_supported_version
andmin_supported_version
) that the Translator Proxy implementer wants to support. Currently the only available version is2
. - The desired minimum
extranonce2
size that the Translator Proxy implementer wants to use (min_extranonce2_size
). Theextranonce2
size is ultimately decided by the SV2 Upstream role, but if the specified size meets the SV2 Upstream role's requirements, the size specified in this configuration file should be favored. - The downstream difficulty params such as:
- the hashrate (hashes/s) of the weakest Mining Device that will be connecting to the Translator Proxy (
min_individual_miner_hashrate
) - the number of shares per minute that Mining Devices should be sending to the Translator Proxy (
shares_per_minute
).
- The upstream difficulty params such as:
- the interval in seconds to elapse before updating channel hashrate with the pool (
channel_diff_update_interval
) - the estimated aggregate hashrate of all SV1 Downstream roles (
channel_nominal_hashrate
)
Run
There are two files in roles/translator/config-examples
:
tproxy-config-local-jdc-example.toml
which assumes the Job Declaration protocol is used and a JD Client is deployed locallytproxy-config-local-pool-example.toml
which assumes Job Declaration protocol is NOT used, and a Pool is deployed locally
cd roles/translator/config-examples/
cargo run -- -c tproxy-config-local-jdc-example.toml
Dependencies
~21–34MB
~489K SLoC