stratum-mining / stratum

stratum
https://stratumprotocol.org
Other
224 stars 132 forks source link

Refactor: `subprotocols` crates #1202

Open GitGab19 opened 1 month ago

GitGab19 commented 1 month ago

This task is an outcome of the protocols Rust docs issues tracked in #845.

While documenting protocols::v2::subprotocols in #1201, areas of potential code debt were identified. This issue servers as a place to list out these items to then be addressed in an organized manner. The initial Rust documentation effort was an immediate action, while a refactoring (which implies breaking API changes) is not so urgent priority, so for now we should leave this in the backlog for an appropriate moment in the future.

Identified Potential Code Debt

TODO

Shourya742 commented 1 day ago

common_message_sv2: https://github.com/stratum-mining/stratum/pull/1242#issuecomment-2490729166

Shourya742 commented 1 day ago

common_message_sv2: https://github.com/stratum-mining/stratum/pull/1242#discussion_r1851827737

Shourya742 commented 1 day ago

common_message_sv2: https://github.com/stratum-mining/stratum/pull/1242#discussion_r1851851553

Shourya742 commented 1 day ago

template-distribution: https://github.com/stratum-mining/stratum/pull/1257#discussion_r1852013899

Shourya742 commented 1 day ago

template-distribution: https://github.com/stratum-mining/stratum/pull/1257#discussion_r1852014658

Shourya742 commented 1 day ago

template-distribution: https://github.com/stratum-mining/stratum/pull/1257#discussion_r1852331612

Shourya742 commented 1 day ago

template-distribution: https://github.com/stratum-mining/stratum/pull/1257#discussion_r1852416791

jbesraa commented 16 hours ago

One of the key things I think we are missing in the subprotocols is how to actually use them.

For example, there is no explanation how to connect to a pool and open SV2 compatible channel. Or simpler, how do I connect to a template provider.

For us this stuff is intuitive and we have roles crates as reference but I actually think the main reference should be in the subprotocols crates.