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
3 changes: 2 additions & 1 deletion bitcoin-core-sv2/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ async-channel = "1.5.1"
# fetching from github enables synchronizing development workflows across sv2-apps and stratum repos
# it MUST be changed before bitcoin-core-sv2 is published to crates.io
# with the proper version of stratum-core being fetched from crates.io as well
stratum-core = { git = "https://github.com/stratum-mining/stratum", branch = "main" }
stratum-core = { git = "https://github.com/stratum-mining/stratum", branch = "fix/issue-2092-share-accounting" }

bitcoin-capnp-types = "0.1.0"

17 changes: 0 additions & 17 deletions integration-tests/Cargo.lock

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

1 change: 1 addition & 0 deletions integration-tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,4 @@ hex = "0.4.3"

[lib]
path = "lib/mod.rs"

17 changes: 0 additions & 17 deletions miner-apps/Cargo.lock

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

7 changes: 1 addition & 6 deletions miner-apps/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
[workspace]
resolver="2"

members = [
"jd-client",
"translator",
]

exclude = [
"mining-device"
]

[profile.dev]
# Required by super_safe_lock
opt-level = 1

[profile.test]
# Required by super_safe_lock
opt-level = 1
opt-level = 1
Original file line number Diff line number Diff line change
Expand Up @@ -989,7 +989,7 @@ impl HandleMiningMessagesFromClientAsync for ChannelManager {
channel_id,
last_sequence_number: share_accounting.get_last_share_sequence_number(),
new_submits_accepted_count: share_accounting.get_last_batch_accepted(),
new_shares_sum: share_accounting.get_last_batch_work_sum() as u64,
new_shares_sum: share_accounting.get_last_batch_work_sum(),
};
info!("SubmitSharesStandard on downstream channel: {} ✅", success);
messages.push((downstream.downstream_id, Mining::SubmitSharesSuccess(success)).into());
Expand Down Expand Up @@ -1023,7 +1023,7 @@ impl HandleMiningMessagesFromClientAsync for ChannelManager {
channel_id,
last_sequence_number: share_accounting.get_last_share_sequence_number(),
new_submits_accepted_count: share_accounting.get_last_batch_accepted(),
new_shares_sum: share_accounting.get_last_batch_work_sum() as u64,
new_shares_sum: share_accounting.get_last_batch_work_sum(),
};
messages.push((
downstream.downstream_id,
Expand Down Expand Up @@ -1240,7 +1240,7 @@ impl HandleMiningMessagesFromClientAsync for ChannelManager {
channel_id,
last_sequence_number: share_accounting.get_last_share_sequence_number(),
new_submits_accepted_count: share_accounting.get_last_batch_accepted(),
new_shares_sum: share_accounting.get_last_batch_work_sum() as u64,
new_shares_sum: share_accounting.get_last_batch_work_sum(),
};
info!("SubmitSharesExtended on downstream channel: {} ✅", success);
messages.push((downstream.downstream_id, Mining::SubmitSharesSuccess(success)).into());
Expand Down Expand Up @@ -1272,7 +1272,7 @@ impl HandleMiningMessagesFromClientAsync for ChannelManager {
channel_id,
last_sequence_number: share_accounting.get_last_share_sequence_number(),
new_submits_accepted_count: share_accounting.get_last_batch_accepted(),
new_shares_sum: share_accounting.get_last_batch_work_sum() as u64,
new_shares_sum: share_accounting.get_last_batch_work_sum(),
};
is_downstream_share_valid = true;
messages.push((
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -498,10 +498,8 @@ impl HandleMiningMessagesFromServerAsync for ChannelManager {

self.channel_manager_data.super_safe_lock(|data| {
if let Some(upstream_channel) = data.upstream_channel.as_mut() {
upstream_channel.on_share_acknowledgement(
msg.new_submits_accepted_count,
msg.new_shares_sum as f64,
);
upstream_channel
.on_share_acknowledgement(msg.new_submits_accepted_count, msg.new_shares_sum);
}
});

Expand Down
9 changes: 0 additions & 9 deletions miner-apps/mining-device/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,10 @@ homepage = "https://stratumprotocol.org"
repository = "https://github.com/stratum-mining/stratum"
license = "MIT OR Apache-2.0"
keywords = ["stratum", "mining", "bitcoin", "protocol"]


# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[lib]
name = "mining_device"
path = "src/lib/mod.rs"


[dependencies]
stratum-common = { git = "https://github.com/stratum-mining/stratum", rev = "v1.5.0", features = ["with_network_helpers"] }
async-channel = "1.5.1"
Expand All @@ -31,21 +26,17 @@ sha2 = { version = "0.10.6", features = ["compress", "asm"] }
tokio = "1.44.1"
primitive-types = "0.13.1"
num-format = "0.4"

[dev-dependencies]
# Criterion 0.5 without default features; combined with a dev pin of `half = 2.3.1` to stay Rust 1.75-compatible.
criterion = { version = "0.5", default-features = false, features = ["stable"] }
half = "=2.3.1"
num_cpus = "1"

[[bench]]
name = "hasher_bench"
harness = false

[[bench]]
name = "microbatch_bench"
harness = false

[[bench]]
name = "scaling_bench"
harness = false
Loading