Skip to content
Draft
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: 21 additions & 22 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion bitcoin-core-sv2/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ bitcoin_capnp_types_v32 = { package = "bitcoin-capnp-types", version = "0.3.0" }
# 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/bit-aloo/stratum", branch = "2026-11-11-handlers-sv2-fixes" }
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ use stratum_apps::stratum_core::{

use stratum_apps::{
stratum_core::{
binary_sv2::Str0255,
bitcoin::{Target, hashes::sha256d},
channels_sv2::{
Vardiff, VardiffState, client,
Expand All @@ -28,7 +27,7 @@ use stratum_apps::{
extensions_sv2::{
EXTENSION_TYPE_WORKER_HASHRATE_TRACKING, TLV_FIELD_TYPE_USER_IDENTITY, UserIdentity,
},
handlers_sv2::{HandleMiningMessagesFromClientOwnedAsync, SupportedChannelTypes},
handlers_sv2::HandleMiningMessagesFromClientOwnedAsync,
mining_sv2::*,
parsers_sv2::{
AnyMessageOwned, JobDeclarationOwned, MiningOwned, TemplateDistributionOwned, Tlv,
Expand Down Expand Up @@ -174,19 +173,9 @@ impl HandleMiningMessagesFromClientOwnedAsync for ChannelManager {
})
}

fn get_channel_type_for_client(&self, _client_id: Option<usize>) -> SupportedChannelTypes {
SupportedChannelTypes::GroupAndExtended
}
fn is_work_selection_enabled_for_client(&self, _client_id: Option<usize>) -> bool {
false
}
fn is_client_authorized(
&self,
_client_id: Option<usize>,
_user_identity: &Str0255,
) -> Result<bool, Self::Error> {
Ok(true)
}

// Handles a `CloseChannel` message:
// - Look up the downstream associated with the given `channel_id`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ use stratum_apps::{
},
handlers_sv2::{
HandleMiningMessagesFromClientOwnedAsync, HandleMiningMessagesFromServerOwnedAsync,
SupportedChannelTypes,
},
mining_sv2::*,
parsers_sv2::{AnyMessageOwned, MiningOwned, Tlv},
Expand Down Expand Up @@ -48,9 +47,6 @@ impl HandleMiningMessagesFromServerOwnedAsync for ChannelManager {
.map_err(JDCError::shutdown)
}

fn get_channel_type_for_server(&self, _server_id: Option<usize>) -> SupportedChannelTypes {
SupportedChannelTypes::Extended
}
fn is_work_selection_enabled_for_server(&self, _server_id: Option<usize>) -> bool {
true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use stratum_apps::{
ExtranonceAllocator, ExtranoncePrefix, MAX_EXTRANONCE_LEN, bytes_needed,
},
},
handlers_sv2::{HandleMiningMessagesFromServerOwnedAsync, SupportedChannelTypes},
handlers_sv2::HandleMiningMessagesFromServerOwnedAsync,
mining_sv2::{
CloseChannelOwned, MESSAGE_TYPE_OPEN_STANDARD_MINING_CHANNEL_SUCCESS,
MESSAGE_TYPE_SET_CUSTOM_MINING_JOB_ERROR, MESSAGE_TYPE_SET_CUSTOM_MINING_JOB_SUCCESS,
Expand All @@ -36,10 +36,6 @@ use tracing::{error, info, warn};
impl HandleMiningMessagesFromServerOwnedAsync for ChannelManager {
type Error = TproxyError<error::ChannelManager>;

fn get_channel_type_for_server(&self, _server_id: Option<usize>) -> SupportedChannelTypes {
SupportedChannelTypes::GroupAndExtended
}

fn is_work_selection_enabled_for_server(&self, _server_id: Option<usize>) -> bool {
false
}
Expand Down
15 changes: 1 addition & 14 deletions pool-apps/pool/src/lib/channel_manager/mining_message_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ use stratum_apps::stratum_core::{
};

use stratum_apps::stratum_core::{
binary_sv2::Str0255,
bitcoin::Target,
channels_sv2::{
Vardiff, VardiffState,
Expand All @@ -26,7 +25,7 @@ use stratum_apps::stratum_core::{
extensions_sv2::{
EXTENSION_TYPE_WORKER_HASHRATE_TRACKING, TLV_FIELD_TYPE_USER_IDENTITY, UserIdentity,
},
handlers_sv2::{HandleMiningMessagesFromClientOwnedAsync, SupportedChannelTypes},
handlers_sv2::HandleMiningMessagesFromClientOwnedAsync,
mining_sv2::*,
parsers_sv2::{Tlv, TlvField},
template_distribution_sv2::SubmitSolutionOwned,
Expand Down Expand Up @@ -62,22 +61,10 @@ fn extranonce_allocation_error_code(
impl HandleMiningMessagesFromClientOwnedAsync for ChannelManager {
type Error = PoolError<error::ChannelManager>;

fn get_channel_type_for_client(&self, _client_id: Option<usize>) -> SupportedChannelTypes {
SupportedChannelTypes::GroupAndExtended
}

fn is_work_selection_enabled_for_client(&self, _client_id: Option<usize>) -> bool {
true
}

fn is_client_authorized(
&self,
_client_id: Option<usize>,
_user_identity: &Str0255,
) -> Result<bool, Self::Error> {
Ok(true)
}

fn get_negotiated_extensions_with_client(
&self,
client_id: Option<usize>,
Expand Down
2 changes: 1 addition & 1 deletion stratum-apps/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ keywords = ["stratum", "mining", "bitcoin", "protocol", "sv2"]
# fetching from github enables synchronizing development workflows across sv2-apps and stratum repos
# it MUST be changed before stratum-apps 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", optional = true }
stratum-core = { git = "https://github.com/bit-aloo/stratum", branch = "2026-11-11-handlers-sv2-fixes", optional = true }
bitcoin-core-sv2 = { package = "bitcoin_core_sv2", version = "0.7.0", path = "../bitcoin-core-sv2", optional = true }

# External dependencies needed by the modules
Expand Down
Loading