Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 23 additions & 20 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,8 @@ default-members = [
"miner-apps/jd-client",
"miner-apps/translator",
]

# Override dependencies with local paths
# Temporary: builds against the companion stratum PR's branch until it lands upstream.
[patch."https://github.com/stratum-mining/stratum"]
stratum-core = { git = "https://github.com/plebhash/stratum", branch = "2026-11-09-noise-preissued-cert" }
17 changes: 13 additions & 4 deletions docker/docker_env.example
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,15 @@ BITCOIN_SOCKET_PATH=/absolute/path/to/your/node.sock
# Pool (pool_sv2)
# -----------------------------------------------------------------------------
POOL__LISTEN_ADDRESS=0.0.0.0:3333
# A throwaway static key and a certificate for it from the development authority, whose secret
# key is public: for trying the stack only. In production replace these three with the output of
# `sv2-certificate issue-certificate --valid-for <seconds> --env <file> --env-prefix POOL`, run where the
# authority secret key is kept (see pool-apps/pool/README.md, "Server keys"). To use a key file
# re-read per handshake instead, drop these two and set POOL__ACTIVE_STATIC_KEY=<file>: while they
# are set, they are used and the file is ignored.
POOL__STATIC_PRIVATE_KEY=2Zdzjqd9c7EB4C9FBuqyDNzErruL4DNrJHoL5jhdE6QVArUTR8
POOL__CERTIFICATE=11HpWbvGUzBwSTTVZMX6Dc1bVAupxFfvzkFqWfcQzXwVWWeCFQ6rQTDtrNbv4ncSx11gBb1trRbuhuCuXNptqbQBHnyx4VJKULV9e4AWew
POOL__AUTHORITY_PUBLIC_KEY=9auqWEzQDVyd2oe1JVGFLMLHZtCo2FFqZwtKA5gd9xbuEu7PH72
POOL__AUTHORITY_SECRET_KEY=mkDLTBBRxdBv998612qipDYoTK3YUrqLe8uWw7gu3iXbSrn2n
POOL__CERT_VALIDITY_SEC=3600
POOL__COINBASE_REWARD_SCRIPT=addr(tb1qa0sm0hxzj0x25rh8gw5xlzwlsfvvyz8u96w3p8)
POOL__SERVER_ID=1
POOL__POOL_SIGNATURE=Stratum V2 SRI Pool
Expand All @@ -52,9 +58,12 @@ POOL__JDS__LISTEN_ADDRESS=0.0.0.0:3334
JDC__LISTENING_ADDRESS=0.0.0.0:34265
JDC__MAX_SUPPORTED_VERSION=2
JDC__MIN_SUPPORTED_VERSION=2
# The same throwaway key and certificate, and the same rules, as for the Pool above; in production use the output of
# `sv2-certificate issue-certificate --valid-for <seconds> --env <file> --env-prefix JDC` instead (see
# miner-apps/jd-client/README.md, "Server keys").
JDC__STATIC_PRIVATE_KEY=2Zdzjqd9c7EB4C9FBuqyDNzErruL4DNrJHoL5jhdE6QVArUTR8
JDC__CERTIFICATE=11HpWbvGUzBwSTTVZMX6Dc1bVAupxFfvzkFqWfcQzXwVWWeCFQ6rQTDtrNbv4ncSx11gBb1trRbuhuCuXNptqbQBHnyx4VJKULV9e4AWew
JDC__AUTHORITY_PUBLIC_KEY=9auqWEzQDVyd2oe1JVGFLMLHZtCo2FFqZwtKA5gd9xbuEu7PH72
JDC__AUTHORITY_SECRET_KEY=mkDLTBBRxdBv998612qipDYoTK3YUrqLe8uWw7gu3iXbSrn2n
JDC__CERT_VALIDITY_SEC=3600
JDC__SHARES_PER_MINUTE=6.0
JDC__SHARE_BATCH_SIZE=10
JDC__MODE=FULLTEMPLATE
Expand Down
1 change: 1 addition & 0 deletions integration-tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ To run it directly through Cargo:
```bash
cargo run -p integration_tests_sv2 --release --bin mining_device -- \
--address-pool 127.0.0.1:3333 \
--pubkey-pool 9auqWEzQDVyd2oe1JVGFLMLHZtCo2FFqZwtKA5gd9xbuEu7PH72 \
--id-device test
```

Expand Down
4 changes: 2 additions & 2 deletions integration-tests/bin/mining_device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ struct Args {
#[arg(
short,
long,
help = "Pool pub key, when left empty the pool certificate is not checked"
help = "Pool authority public key the pool certificate must verify against"
)]
pubkey_pool: Option<Secp256k1PublicKey>,
pubkey_pool: Secp256k1PublicKey,
#[arg(
short,
long,
Expand Down
4 changes: 2 additions & 2 deletions integration-tests/lib/mining_device/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ pub fn total_logical_cpus() -> u32 {

pub async fn connect(
address: String,
pub_key: Option<Secp256k1PublicKey>,
pub_key: Secp256k1PublicKey,
device_id: Option<String>,
user_id: Option<String>,
handicap: u32,
Expand Down Expand Up @@ -134,7 +134,7 @@ pub async fn connect(
};
info!("Pool tcp connection established at {}", address);
let address = socket.peer_addr().unwrap();
let initiator = Initiator::new(pub_key.map(|e| e.0));
let initiator = Initiator::new(pub_key.0);
let (receiver, sender) = Connection::connect(socket, initiator, CancellationToken::new())
.await
.unwrap();
Expand Down
Loading
Loading