Crates.io | mining_proxy_sv2 |
lib.rs | mining_proxy_sv2 |
version | 0.1.1 |
source | src |
created_at | 2024-03-29 15:41:11.813995 |
updated_at | 2024-05-07 14:40:57.353493 |
description | SV2 mining proxy role |
homepage | |
repository | https://github.com/stratum-mining/stratum |
max_upload_size | |
id | 1190309 |
size | 2,153,523 |
When spawned the proxy will look in the current working directory (linux) for a
proxy-config.config
if the file is not available the proxy will panic. We can specify a different
path for the config file with the -c
option.
The config need to be a valid toml file with the below values:
Group
, Extended
, ExtendedWithDeclarator
.
* Group: Proxy do not open an extended channel with upstream but just relay request to
open standard channel from downstream to upstream, being the proxy non HOM the channels are
grouped.
* Extended: Proxy open an extended channel with upstream. When downstream ask to open
standard channels it just use the open extended channel with upstream to itself open
standard channels downstream.
* ExtendedWithDeclarator: Like Extended
but do not relay on the pool to create new job. It
just connect to a TP and communicate to the pool which is the job that it want to work with.channel_kind
is ExtendedWithDeclarator
is
composed by:
upstream
in upstreams
has the kind
ExtendedWithDeclarator
. Is the address in the form [ip:port]
of the TP.mining-proxy
will accept downstream connection.mining-proxy
will accept downstream connection.mining-proxy
will not connect to upstream the are using an Sv2
version higher that the one specified here (default to 2)mining-proxy
will not connect to upstream the are using an Sv2
version smaller that the one specified here (default to 2)mining-proxy
will use this value and the expected downstream hash rate (communicate vie
penStandardMiningChannel
to calculate the right downstream target.Terminal 1:
% cd examples/sv2-proxy
% cargo run --bin pool
Terminal 2: Run mining proxy:
% # For help run `cargo run -- --help`
% cd roles/v2/mining-proxy
% cargo run
Terminal 3:
% cd examples/sv2-proxy
% cargo run --bin mining-device