Skip to content

Commit 527237a

Browse files
authored
Merge pull request stratum-mining#310 from GitGab19/adapt-apps-to-new-extranonce-manager
Adapt apps to new extranonce APIs
2 parents 73a9f5d + 2aa4b4e commit 527237a

32 files changed

Lines changed: 817 additions & 524 deletions

integration-tests/Cargo.lock

Lines changed: 20 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

integration-tests/lib/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,7 @@ pub fn start_jdc(
261261
required_extensions,
262262
monitoring_address,
263263
monitoring_cache_refresh_secs,
264+
None,
264265
);
265266
let ret = jd_client_sv2::JobDeclaratorClient::new(jd_client_proxy);
266267
let ret_clone = ret.clone();

integration-tests/tests/jdc_cached_shares.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ async fn jdc_cached_shares_relayed_on_set_custom_job_success() {
7171
// to guarantee the miner can easily generate valid shares.
7272
// This helps ensure the first received share is valid.
7373
target: [0xff_u8; 32].to_vec().try_into().unwrap(),
74-
extranonce_size: 8,
74+
extranonce_size: open_channel_msg.min_extranonce_size,
7575
extranonce_prefix: vec![0x00, 0x00, 0x00, 0x00].try_into().unwrap(),
7676
group_channel_id: 1,
7777
},

integration-tests/tests/translator_integration.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1178,7 +1178,7 @@ async fn non_aggregated_translator_correctly_deals_with_close_channel_message()
11781178
.try_into()
11791179
.unwrap(),
11801180
// full extranonce has a total of 8 bytes
1181-
extranonce_size: 4,
1181+
extranonce_size: open_extended_mining_channel.min_extranonce_size,
11821182
extranonce_prefix: vec![0x00, 0x01, 0x00, i as u8].try_into().unwrap(),
11831183
group_channel_id: GROUP_CHANNEL_ID,
11841184
},

miner-apps/Cargo.lock

Lines changed: 20 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

miner-apps/jd-client/config-examples/mainnet/jdc-config-bitcoin-core-ipc-hosted-infra-example.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ shares_per_minute = 6.0
2020
# How many shares do we want to acknowledge in a batch
2121
share_batch_size = 10
2222

23+
# Number of rollable extranonce bytes reserved for extended downstreams (default 8)
24+
# reserved_downstream_rollable_extranonce_size = 8
25+
2326
# JDC supports two modes:
2427
# "FULLTEMPLATE" - full template mining
2528
# "COINBASEONLY" - coinbase-only mining

miner-apps/jd-client/config-examples/mainnet/jdc-config-bitcoin-core-ipc-local-infra-example.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ shares_per_minute = 6.0
2020
# How many shares do we want to acknowledge in a batch
2121
share_batch_size = 10
2222

23+
# Number of rollable extranonce bytes reserved for extended downstreams (default 8)
24+
# reserved_downstream_rollable_extranonce_size = 8
25+
2326
# JDC supports two modes:
2427
# "FULLTEMPLATE" - full template mining
2528
# "COINBASEONLY" - coinbase-only mining

miner-apps/jd-client/config-examples/mainnet/jdc-config-hosted-infra-example.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ shares_per_minute = 6.0
2020
# How many shares do we want to acknowledge in a batch
2121
share_batch_size = 10
2222

23+
# Number of rollable extranonce bytes reserved for extended downstreams (default 8)
24+
# reserved_downstream_rollable_extranonce_size = 8
25+
2326
# JDC supports two modes:
2427
# "FULLTEMPLATE" - full template mining
2528
# "COINBASEONLY" - coinbase-only mining

miner-apps/jd-client/config-examples/mainnet/jdc-config-local-infra-example.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ shares_per_minute = 6.0
2020
# How many shares do we want to acknowledge in a batch
2121
share_batch_size = 10
2222

23+
# Number of rollable extranonce bytes reserved for extended downstreams (default 8)
24+
# reserved_downstream_rollable_extranonce_size = 8
25+
2326
# JDC supports two modes:
2427
# "FULLTEMPLATE" - full template mining
2528
# "COINBASEONLY" - coinbase-only mining

miner-apps/jd-client/config-examples/mainnet/jdc-config-solo-mining-example.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ shares_per_minute = 6.0
2424
# How many shares do we want to acknowledge in a batch
2525
share_batch_size = 10
2626

27+
# Number of rollable extranonce bytes reserved for extended downstreams (default 8)
28+
# reserved_downstream_rollable_extranonce_size = 8
29+
2730
# JDC mode: FULLTEMPLATE, COINBASEONLY, or SOLOMINING
2831
mode = "SOLOMINING"
2932

0 commit comments

Comments
 (0)