diff --git a/examples/interop-cpp/Cargo.toml b/examples/interop-cpp/Cargo.toml index 6bd1d959cb..f6f192d79e 100644 --- a/examples/interop-cpp/Cargo.toml +++ b/examples/interop-cpp/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "interop-cpp" version = "0.1.0" -authors = ["fi3 "] +authors = ["The Stratum V2 Developers"] edition = "2018" publish = false diff --git a/examples/ping-pong-with-noise/Cargo.toml b/examples/ping-pong-with-noise/Cargo.toml index b1220bce7d..760f89eced 100644 --- a/examples/ping-pong-with-noise/Cargo.toml +++ b/examples/ping-pong-with-noise/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "ping_pong_with_noise" version = "0.1.0" -authors = ["fi3 "] +authors = ["The Stratum V2 Developers"] edition = "2018" publish = false diff --git a/examples/ping-pong-without-noise/Cargo.toml b/examples/ping-pong-without-noise/Cargo.toml index 5619bfa4bb..9f5c90c584 100644 --- a/examples/ping-pong-without-noise/Cargo.toml +++ b/examples/ping-pong-without-noise/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "ping_pong_without_noise" version = "0.1.0" -authors = ["fi3 "] +authors = ["The Stratum V2 Developers"] edition = "2018" publish = false diff --git a/protocols/Cargo.toml b/protocols/Cargo.toml index d1f21ca36d..2af4c9c982 100644 --- a/protocols/Cargo.toml +++ b/protocols/Cargo.toml @@ -1,16 +1,3 @@ -name = "stratum_v2_protocols" -version = "1.0.0" -authors = ["The Stratum v2 Developers"] -edition = "2021" -description = "The Stratum protocol defines how miners, proxies, and pools communicate to contribute hashrate to the Bitcoin network. Stratum v2 is a robust set of primitives which anyone can use to expand the protocol or implement a role." -documentation = "https://github.com/stratum-mining/stratum" -readme = "README.md" -homepage = "https://stratumprotocol.org" -repository = "https://github.com/stratum-mining/stratum" -license = "MIT + Apache-2.0" -license-file = "LICENSE.md" -keywords = ["stratum", "mining", "bitcoin", "protocol"] - [workspace] resolver="2" diff --git a/protocols/fuzz-tests/Cargo.toml b/protocols/fuzz-tests/Cargo.toml index d29d588ce9..52e34dfef1 100644 --- a/protocols/fuzz-tests/Cargo.toml +++ b/protocols/fuzz-tests/Cargo.toml @@ -4,6 +4,11 @@ version = "1.0.0" edition = "2021" authors = ["Automatically generated"] publish = false +documentation = "https://github.com/stratum-mining/stratum" +license = "MIT + Apache-2.0" +repository = "https://github.com/stratum-mining/stratum" +homepage = "https://stratumprotocol.org" +keywords = ["stratum", "mining", "bitcoin", "protocol"] [package.metadata] cargo-fuzz = true diff --git a/protocols/v1/Cargo.toml b/protocols/v1/Cargo.toml index 0e7bd18267..bdea8d4937 100644 --- a/protocols/v1/Cargo.toml +++ b/protocols/v1/Cargo.toml @@ -1,11 +1,15 @@ [package] name = "sv1_api" version = "1.0.1" -authors = ["user"] +authors = ["The Stratum V2 Developers"] edition = "2018" +readme = "README.md" description = "API for bridging SV1 miners to SV2 pools" -license = "MIT OR Apache-2.0" +documentation = "https://docs.rs/sv1_api" +license = "MIT + Apache-2.0" repository = "https://github.com/stratum-mining/stratum" +homepage = "https://stratumprotocol.org" +keywords = ["stratum", "mining", "bitcoin", "protocol"] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/protocols/v2/binary-sv2/binary-sv2/Cargo.toml b/protocols/v2/binary-sv2/binary-sv2/Cargo.toml index 922d491a21..d3882c01b2 100644 --- a/protocols/v2/binary-sv2/binary-sv2/Cargo.toml +++ b/protocols/v2/binary-sv2/binary-sv2/Cargo.toml @@ -1,11 +1,15 @@ [package] name = "binary_sv2" version = "1.2.0" -authors = ["fi3 "] +authors = ["The Stratum V2 Developers"] edition = "2018" +readme = "README.md" description = "Sv2 data format" -license = "MIT" +documentation = "https://docs.rs/binary_sv2" +license = "MIT + Apache-2.0" repository = "https://github.com/stratum-mining/stratum" +homepage = "https://stratumprotocol.org" +keywords = ["stratum", "mining", "bitcoin", "protocol"] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/protocols/v2/binary-sv2/no-serde-sv2/codec/Cargo.toml b/protocols/v2/binary-sv2/no-serde-sv2/codec/Cargo.toml index 5394f336cc..77894f4e69 100644 --- a/protocols/v2/binary-sv2/no-serde-sv2/codec/Cargo.toml +++ b/protocols/v2/binary-sv2/no-serde-sv2/codec/Cargo.toml @@ -1,11 +1,15 @@ [package] name = "binary_codec_sv2" version = "1.2.0" -authors = ["fi3 "] +authors = ["The Stratum V2 Developers"] edition = "2018" +readme = "README.md" description = "Sv2 data format" -license = "MIT" +documentation = "https://docs.rs/binary_codec_sv2" +license = "MIT + Apache-2.0" repository = "https://github.com/stratum-mining/stratum" +homepage = "https://stratumprotocol.org" +keywords = ["stratum", "mining", "bitcoin", "protocol"] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/protocols/v2/binary-sv2/no-serde-sv2/derive_codec/Cargo.toml b/protocols/v2/binary-sv2/no-serde-sv2/derive_codec/Cargo.toml index 93f202d8bd..0653daf3d8 100644 --- a/protocols/v2/binary-sv2/no-serde-sv2/derive_codec/Cargo.toml +++ b/protocols/v2/binary-sv2/no-serde-sv2/derive_codec/Cargo.toml @@ -1,11 +1,15 @@ [package] name = "derive_codec_sv2" version = "1.1.0" -authors = ["fi3 "] +authors = ["The Stratum V2 Developers"] edition = "2018" +readme = "README.md" description = "Derive macro for Sv2 binary format serializer and deserializer" -license = "MIT" +documentation = "https://docs.rs/derive_codec_sv2" +license = "MIT + Apache-2.0" repository = "https://github.com/stratum-mining/stratum" +homepage = "https://stratumprotocol.org" +keywords = ["stratum", "mining", "bitcoin", "protocol"] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/protocols/v2/binary-sv2/serde-sv2/Cargo.toml b/protocols/v2/binary-sv2/serde-sv2/Cargo.toml index 2dcc744c8e..3f551f8244 100644 --- a/protocols/v2/binary-sv2/serde-sv2/Cargo.toml +++ b/protocols/v2/binary-sv2/serde-sv2/Cargo.toml @@ -1,11 +1,15 @@ [package] name = "serde_sv2" version = "1.0.1" -authors = ["fi3 "] +authors = ["The Stratum V2 Developers"] edition = "2018" +readme = "README.md" description = "Serlializer and Deserializer for Stratum V2 data format" -license = "MIT" +documentation = "https://docs.rs/serde_sv2" +license = "MIT + Apache-2.0" repository = "https://github.com/stratum-mining/stratum" +homepage = "https://stratumprotocol.org" +keywords = ["stratum", "mining", "bitcoin", "protocol"] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/protocols/v2/codec-sv2/Cargo.toml b/protocols/v2/codec-sv2/Cargo.toml index 3e8b1e2eae..f527277e28 100644 --- a/protocols/v2/codec-sv2/Cargo.toml +++ b/protocols/v2/codec-sv2/Cargo.toml @@ -1,11 +1,15 @@ [package] name = "codec_sv2" version = "1.2.1" -authors = ["fi3 "] +authors = ["The Stratum V2 Developers"] edition = "2018" +readme = "README.md" description = "Sv2 data format" -license = "MIT" +documentation = "https://docs.rs/codec_sv2" +license = "MIT + Apache-2.0" repository = "https://github.com/stratum-mining/stratum" +homepage = "https://stratumprotocol.org" +keywords = ["stratum", "mining", "bitcoin", "protocol"] [dependencies] serde = { version = "1.0.89", default-features = false, optional = true } diff --git a/protocols/v2/const-sv2/Cargo.toml b/protocols/v2/const-sv2/Cargo.toml index 1a74cfa0b3..8030a1fcd7 100644 --- a/protocols/v2/const-sv2/Cargo.toml +++ b/protocols/v2/const-sv2/Cargo.toml @@ -1,11 +1,15 @@ [package] name = "const_sv2" version = "2.0.0" -authors = ["fi3 "] +authors = ["The Stratum V2 Developers"] edition = "2018" -description = "Sv2 constatnts" -license = "MIT" +readme = "README.md" +description = "This crate holds all of the shared constants used across the different Stratum V2 protocols and roles crates" +documentation = "https://docs.rs/const_sv2" +license = "MIT + Apache-2.0" repository = "https://github.com/stratum-mining/stratum" +homepage = "https://stratumprotocol.org" +keywords = ["stratum", "mining", "bitcoin", "protocol"] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/protocols/v2/const-sv2/README.md b/protocols/v2/const-sv2/README.md index 1c919b895c..b491997450 100644 --- a/protocols/v2/const-sv2/README.md +++ b/protocols/v2/const-sv2/README.md @@ -2,20 +2,21 @@ [![crates.io](https://img.shields.io/crates/v/const_sv2.svg)](https://crates.io/crates/const_sv2) [![docs.rs](https://docs.rs/const_sv2/badge.svg)](https://docs.rs/const_sv2) +[![rustc+](https://img.shields.io/badge/rustc-1.75.0%2B-lightgrey.svg)](https://blog.rust-lang.org/2023/12/28/Rust-1.75.0.html) +[![license](https://img.shields.io/badge/license-MIT%2FApache--2.0-blue.svg)](https://github.com/stratum-mining/stratum/blob/main/LICENSE.md) -`const_sv2` is a Rust crate that provides essential constants for the SV2 (Stratum V2) protocol. These constants are crucial for message framing, encryption, and protocol-specific identifiers across various SV2 components, including Mining, Job Declaration, and Template Distribution protocols. +`const_sv2` is a Rust crate that provides essential constants for the Sv2 (Stratum V2) protocol. These constants are crucial for message framing, encryption, and protocol-specific identifiers across various Sv2 components, including Mining, Job Declaration, and Template Distribution protocols. -## Main Components +## Key Capabilities -- **Protocol Constants**: Define key protocol discriminants, message types, and sizes for the SV2 binary protocol. -- **Encryption Support**: Includes constants for encryption using ChaChaPoly and ElligatorSwift encoding. +- **Protocol Constants**: Define key protocol discriminants, message types, and sizes for the Sv2 binary protocol. +- **Encryption Support**: Includes constants for encryption using `ChaChaPoly` and `ElligatorSwift` encoding. - **Channel Bits**: Defines whether specific messages are associated with a channel, simplifying protocol handling. - **Modular**: Supports a `no_std` environment, enabling use in embedded systems or environments without a standard library. ## Usage -To use this crate, add it to your `Cargo.toml`: +To include this crate in your project, run: -```toml -[dependencies] -const_sv2 = "2.0.0" +```sh +cargo add const_sv2 diff --git a/protocols/v2/framing-sv2/Cargo.toml b/protocols/v2/framing-sv2/Cargo.toml index 4450a46531..7e39d8ceeb 100644 --- a/protocols/v2/framing-sv2/Cargo.toml +++ b/protocols/v2/framing-sv2/Cargo.toml @@ -1,11 +1,15 @@ [package] name = "framing_sv2" version = "2.0.0" -authors = ["fi3 "] +authors = ["The Stratum V2 Developers"] edition = "2018" +readme = "README.md" description = "Sv2 frames" -license = "MIT" +documentation = "https://docs.rs/framing_sv2" +license = "MIT + Apache-2.0" repository = "https://github.com/stratum-mining/stratum" +homepage = "https://stratumprotocol.org" +keywords = ["stratum", "mining", "bitcoin", "protocol"] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/protocols/v2/noise-sv2/Cargo.toml b/protocols/v2/noise-sv2/Cargo.toml index c627bc1af2..432b894dd7 100644 --- a/protocols/v2/noise-sv2/Cargo.toml +++ b/protocols/v2/noise-sv2/Cargo.toml @@ -1,11 +1,15 @@ [package] name = "noise_sv2" version = "1.1.0" -authors = ["fi3 "] +authors = ["The Stratum V2 Developers"] edition = "2018" +readme = "README.md" description = "Sv2 noise" -license = "MIT" +documentation = "https://docs.rs/noise_sv2" +license = "MIT + Apache-2.0" repository = "https://github.com/stratum-mining/stratum" +homepage = "https://stratumprotocol.org" +keywords = ["stratum", "mining", "bitcoin", "protocol"] [dependencies] secp256k1 = { version = "0.28.2", default-features = false, features =["hashes", "alloc","rand","rand-std"] } diff --git a/protocols/v2/roles-logic-sv2/Cargo.toml b/protocols/v2/roles-logic-sv2/Cargo.toml index 2b7c34610b..077c246fd6 100644 --- a/protocols/v2/roles-logic-sv2/Cargo.toml +++ b/protocols/v2/roles-logic-sv2/Cargo.toml @@ -1,10 +1,15 @@ [package] name = "roles_logic_sv2" version = "1.2.1" +authors = ["The Stratum V2 Developers"] edition = "2018" +readme = "README.md" description = "Common handlers for use within SV2 roles" -license = "MIT OR Apache-2.0" +documentation = "https://docs.rs/roles_logic_sv2" +license = "MIT + Apache-2.0" repository = "https://github.com/stratum-mining/stratum" +homepage = "https://stratumprotocol.org" +keywords = ["stratum", "mining", "bitcoin", "protocol"] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/protocols/v2/subprotocols/common-messages/Cargo.toml b/protocols/v2/subprotocols/common-messages/Cargo.toml index 783c208dfe..5891becfc3 100644 --- a/protocols/v2/subprotocols/common-messages/Cargo.toml +++ b/protocols/v2/subprotocols/common-messages/Cargo.toml @@ -1,11 +1,15 @@ [package] name = "common_messages_sv2" version = "2.0.0" -authors = ["fi3 "] +authors = ["The Stratum V2 Developers"] edition = "2018" +readme = "README.md" description = "Sv2 subprotocol common messages" -license = "MIT" +documentation = "https://docs.rs/common_messages_sv2" +license = "MIT + Apache-2.0" repository = "https://github.com/stratum-mining/stratum" +homepage = "https://stratumprotocol.org" +keywords = ["stratum", "mining", "bitcoin", "protocol"] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/protocols/v2/subprotocols/job-declaration/Cargo.toml b/protocols/v2/subprotocols/job-declaration/Cargo.toml index 2ee4313f4c..79093ce179 100644 --- a/protocols/v2/subprotocols/job-declaration/Cargo.toml +++ b/protocols/v2/subprotocols/job-declaration/Cargo.toml @@ -1,11 +1,15 @@ [package] name = "job_declaration_sv2" version = "1.0.0" -authors = ["fi3 "] +authors = ["The Stratum V2 Developers"] edition = "2018" +readme = "README.md" description = "SV2 job declaration protocol types" -license = "MIT OR Apache-2.0" +documentation = "https://docs.rs/job_declaration_sv2" +license = "MIT + Apache-2.0" repository = "https://github.com/stratum-mining/stratum" +homepage = "https://stratumprotocol.org" +keywords = ["stratum", "mining", "bitcoin", "protocol"] [dependencies] diff --git a/protocols/v2/subprotocols/mining/Cargo.toml b/protocols/v2/subprotocols/mining/Cargo.toml index c98bb7ec99..a5bda914dd 100644 --- a/protocols/v2/subprotocols/mining/Cargo.toml +++ b/protocols/v2/subprotocols/mining/Cargo.toml @@ -1,11 +1,15 @@ [package] name = "mining_sv2" version = "1.0.0" -authors = ["fi3 "] +authors = ["The Stratum V2 Developers"] edition = "2018" +readme = "README.md" description = "SV2 mining protocol types" -license = "MIT OR Apache-2.0" +documentation = "https://docs.rs/mining_sv2" +license = "MIT + Apache-2.0" repository = "https://github.com/stratum-mining/stratum" +homepage = "https://stratumprotocol.org" +keywords = ["stratum", "mining", "bitcoin", "protocol"] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/protocols/v2/subprotocols/template-distribution/Cargo.toml b/protocols/v2/subprotocols/template-distribution/Cargo.toml index b0120836dc..21c30c297f 100644 --- a/protocols/v2/subprotocols/template-distribution/Cargo.toml +++ b/protocols/v2/subprotocols/template-distribution/Cargo.toml @@ -1,11 +1,15 @@ [package] name = "template_distribution_sv2" version = "1.0.2" -authors = ["fi3 "] +authors = ["The Stratum V2 Developers"] edition = "2018" +readme = "README.md" description = "Sv2 template distribution subprotocol" -license = "MIT" +documentation = "https://docs.rs/template_distribution_sv2" +license = "MIT + Apache-2.0" repository = "https://github.com/stratum-mining/stratum" +homepage = "https://stratumprotocol.org" +keywords = ["stratum", "mining", "bitcoin", "protocol"] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/protocols/v2/sv2-ffi/Cargo.toml b/protocols/v2/sv2-ffi/Cargo.toml index 6498b1b5b8..35ca76a65b 100644 --- a/protocols/v2/sv2-ffi/Cargo.toml +++ b/protocols/v2/sv2-ffi/Cargo.toml @@ -1,11 +1,15 @@ [package] name = "sv2_ffi" version = "1.0.0" -authors = ["fi3 "] +authors = ["The Stratum V2 Developers"] edition = "2018" +readme = "README.md" description = "SV2 FFI" -license = "MIT OR Apache-2.0" +documentation = "https://github.com/stratum-mining/stratum" +license = "MIT + Apache-2.0" repository = "https://github.com/stratum-mining/stratum" +homepage = "https://stratumprotocol.org" +keywords = ["stratum", "mining", "bitcoin", "protocol"] [lib] crate-type = ["staticlib"] diff --git a/roles/Cargo.toml b/roles/Cargo.toml index d44909a939..3e9c59fc7a 100644 --- a/roles/Cargo.toml +++ b/roles/Cargo.toml @@ -1,16 +1,3 @@ -name = "stratum_v2_roles" -version = "0.1.0" -authors = ["The Stratum v2 Developers"] -edition = "2021" -description = "The Stratum protocol defines how miners, proxies, and pools communicate to contribute hashrate to the Bitcoin network. Stratum v2 is a robust set of primitives which anyone can use to expand the protocol or implement a role." -documentation = "https://github.com/stratum-mining/stratum" -readme = "README.md" -homepage = "https://stratumprotocol.org" -repository = "https://github.com/stratum-mining/stratum" -license = "MIT + Apache-2.0" -license-file = "LICENSE.md" -keywords = ["stratum", "mining", "bitcoin", "protocol"] - [workspace] resolver="2" diff --git a/roles/jd-client/Cargo.toml b/roles/jd-client/Cargo.toml index dc2d46079d..c160720a37 100644 --- a/roles/jd-client/Cargo.toml +++ b/roles/jd-client/Cargo.toml @@ -1,10 +1,15 @@ [package] name = "jd_client" version = "0.1.1" +authors = ["The Stratum V2 Developers"] edition = "2021" -description = "TODO" -license = "MIT OR Apache-2.0" +description = "Job Declarator Client (JDC) role" +documentation = "https://docs.rs/jd_client" +readme = "README.md" +homepage = "https://stratumprotocol.org" repository = "https://github.com/stratum-mining/stratum" +license = "MIT + Apache-2.0" +keywords = ["stratum", "mining", "bitcoin", "protocol"] [lib] name = "jd_client" diff --git a/roles/jd-client/src/lib/downstream.rs b/roles/jd-client/src/lib/downstream.rs index 92e5a874a7..82a8076022 100644 --- a/roles/jd-client/src/lib/downstream.rs +++ b/roles/jd-client/src/lib/downstream.rs @@ -39,6 +39,7 @@ pub struct DownstreamMiningNode { receiver: Receiver, sender: Sender, pub status: DownstreamMiningNodeStatus, + #[allow(dead_code)] pub prev_job_id: Option, solution_sender: Sender>, withhold: bool, diff --git a/roles/jd-client/src/lib/error.rs b/roles/jd-client/src/lib/error.rs index c3e24bd4d3..f29decb3d6 100644 --- a/roles/jd-client/src/lib/error.rs +++ b/roles/jd-client/src/lib/error.rs @@ -6,6 +6,7 @@ use stratum_common::bitcoin::util::uint::ParseLengthError; pub type ProxyResult<'a, T> = core::result::Result>; +#[allow(dead_code)] #[derive(Debug)] pub enum ChannelSendError<'a> { SubmitSharesExtended( @@ -28,6 +29,7 @@ pub enum ChannelSendError<'a> { #[derive(Debug)] pub enum Error<'a> { + #[allow(dead_code)] VecToSlice32(Vec), /// Errors on bad CLI argument input. BadCliArgs, diff --git a/roles/jd-client/src/lib/proxy_config.rs b/roles/jd-client/src/lib/proxy_config.rs index 89c97a7beb..af03047d8a 100644 --- a/roles/jd-client/src/lib/proxy_config.rs +++ b/roles/jd-client/src/lib/proxy_config.rs @@ -37,6 +37,7 @@ pub struct ProxyConfig { pub cert_validity_sec: u64, pub tp_address: String, pub tp_authority_public_key: Option, + #[allow(dead_code)] pub retry: u32, pub upstreams: Vec, #[serde(deserialize_with = "duration_from_toml")] diff --git a/roles/jd-client/src/lib/upstream_sv2/mod.rs b/roles/jd-client/src/lib/upstream_sv2/mod.rs index 4209e686ae..70adb2dc9d 100644 --- a/roles/jd-client/src/lib/upstream_sv2/mod.rs +++ b/roles/jd-client/src/lib/upstream_sv2/mod.rs @@ -7,11 +7,3 @@ pub use upstream::Upstream; pub type Message = PoolMessages<'static>; pub type StdFrame = StandardSv2Frame; pub type EitherFrame = StandardEitherFrame; - -#[derive(Clone, Copy, Debug)] -pub struct Sv2MiningConnection { - _version: u16, - _setup_connection_flags: u32, - #[allow(dead_code)] - setup_connection_success_flags: u32, -} diff --git a/roles/jd-client/src/lib/upstream_sv2/upstream.rs b/roles/jd-client/src/lib/upstream_sv2/upstream.rs index b04efa3359..7a4b186787 100644 --- a/roles/jd-client/src/lib/upstream_sv2/upstream.rs +++ b/roles/jd-client/src/lib/upstream_sv2/upstream.rs @@ -110,7 +110,9 @@ pub struct Upstream { tx_status: status::Sender, /// Minimum `extranonce2` size. Initially requested in the `jdc-config.toml`, and ultimately /// set by the SV2 Upstream via the SV2 `OpenExtendedMiningChannelSuccess` message. + #[allow(dead_code)] pub min_extranonce_size: u16, + #[allow(dead_code)] pub upstream_extranonce1_size: usize, /// String be included in coinbase tx input scriptsig pub pool_signature: String, @@ -144,7 +146,7 @@ impl Upstream { /// `UpstreamConnection` with a channel to send and receive messages from the SV2 Upstream /// role and uses channels provided in the function arguments to send and receive messages /// from the `Downstream`. - #[cfg_attr(feature = "cargo-clippy", allow(clippy::too_many_arguments))] + #[allow(clippy::too_many_arguments)] pub async fn new( address: SocketAddr, authority_public_key: Secp256k1PublicKey, diff --git a/roles/jd-server/Cargo.toml b/roles/jd-server/Cargo.toml index e8d82438a1..b6086df18e 100644 --- a/roles/jd-server/Cargo.toml +++ b/roles/jd-server/Cargo.toml @@ -1,9 +1,16 @@ [package] name = "jd_server" version = "0.1.1" +authors = ["The Stratum V2 Developers"] edition = "2018" -license = "MIT OR Apache-2.0" +description = "Job Declarator Server (JDS) role" +documentation = "https://github.com/stratum-mining/stratum" +readme = "README.md" +homepage = "https://stratumprotocol.org" repository = "https://github.com/stratum-mining/stratum" +license = "MIT + Apache-2.0" +keywords = ["stratum", "mining", "bitcoin", "protocol"] + [lib] name = "jd_server" diff --git a/roles/mining-proxy/Cargo.toml b/roles/mining-proxy/Cargo.toml index 8ffb5d0953..ba635e49eb 100644 --- a/roles/mining-proxy/Cargo.toml +++ b/roles/mining-proxy/Cargo.toml @@ -1,11 +1,16 @@ [package] name = "mining_proxy_sv2" version = "0.1.1" -authors = ["user"] +authors = ["The Stratum V2 Developers"] edition = "2018" description = "SV2 mining proxy role" -license = "MIT OR Apache-2.0" +documentation = "https://docs.rs/mining_proxy_sv2" +readme = "README.md" +homepage = "https://stratumprotocol.org" repository = "https://github.com/stratum-mining/stratum" +license = "MIT + Apache-2.0" +keywords = ["stratum", "mining", "bitcoin", "protocol"] + [lib] name = "mining_proxy_sv2" diff --git a/roles/mining-proxy/src/lib/error.rs b/roles/mining-proxy/src/lib/error.rs index b5c900bfd9..75ded3a67a 100644 --- a/roles/mining-proxy/src/lib/error.rs +++ b/roles/mining-proxy/src/lib/error.rs @@ -9,6 +9,7 @@ pub type EitherFrame = StandardEitherFrame; #[derive(Debug)] #[allow(clippy::large_enum_variant)] #[allow(clippy::enum_variant_names)] +#[allow(dead_code)] pub enum Error { SendError(SendError), UpstreamNotAvailabe(SocketAddr), diff --git a/roles/pool/Cargo.toml b/roles/pool/Cargo.toml index c253e6b3e9..4668e8ee59 100644 --- a/roles/pool/Cargo.toml +++ b/roles/pool/Cargo.toml @@ -1,10 +1,16 @@ [package] name = "pool_sv2" version = "0.1.1" +authors = ["The Stratum V2 Developers"] edition = "2018" description = "SV2 pool role" -license = "MIT OR Apache-2.0" +documentation = "https://docs.rs/pool_sv2" +readme = "README.md" +homepage = "https://stratumprotocol.org" repository = "https://github.com/stratum-mining/stratum" +license = "MIT + Apache-2.0" +keywords = ["stratum", "mining", "bitcoin", "protocol"] + [lib] name = "pool_sv2" diff --git a/roles/roles-utils/network-helpers/Cargo.toml b/roles/roles-utils/network-helpers/Cargo.toml index b4af8f293e..46d3fc532e 100644 --- a/roles/roles-utils/network-helpers/Cargo.toml +++ b/roles/roles-utils/network-helpers/Cargo.toml @@ -1,11 +1,16 @@ [package] name = "network_helpers_sv2" version = "2.0.0" -authors = ["fi3 "] +authors = ["The Stratum V2 Developers"] edition = "2018" description = "Networking utils for SV2 roles" -license = "MIT OR Apache-2.0" +documentation = "https://docs.rs/network_helpers_sv2" +readme = "README.md" +homepage = "https://stratumprotocol.org" repository = "https://github.com/stratum-mining/stratum" +license = "MIT + Apache-2.0" +keywords = ["stratum", "mining", "bitcoin", "protocol"] + # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/roles/roles-utils/rpc/Cargo.toml b/roles/roles-utils/rpc/Cargo.toml index 6ae6e05527..db5c0f02db 100644 --- a/roles/roles-utils/rpc/Cargo.toml +++ b/roles/roles-utils/rpc/Cargo.toml @@ -1,9 +1,16 @@ [package] name = "rpc_sv2" version = "1.0.0" +authors = ["The Stratum V2 Developers"] edition = "2021" description = "SV2 JD Server RPC" -license = "MIT OR Apache-2.0" +documentation = "https://docs.rs/rpc_sv2" +readme = "README.md" +homepage = "https://stratumprotocol.org" +repository = "https://github.com/stratum-mining/stratum" +license = "MIT + Apache-2.0" +keywords = ["stratum", "mining", "bitcoin", "protocol"] + # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/roles/test-utils/mining-device/Cargo.toml b/roles/test-utils/mining-device/Cargo.toml index 775d38f3b2..dc5c3bba5d 100644 --- a/roles/test-utils/mining-device/Cargo.toml +++ b/roles/test-utils/mining-device/Cargo.toml @@ -1,8 +1,16 @@ [package] name = "mining_device" version = "0.1.1" +authors = ["The Stratum V2 Developers"] edition = "2018" publish = false +documentation = "https://github.com/stratum-mining/stratum" +readme = "README.md" +homepage = "https://stratumprotocol.org" +repository = "https://github.com/stratum-mining/stratum" +license = "MIT + Apache-2.0" +keywords = ["stratum", "mining", "bitcoin", "protocol"] + # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/roles/test-utils/sv1-mining-device/Cargo.toml b/roles/test-utils/sv1-mining-device/Cargo.toml index 55b990c633..5d1dd2d0fa 100644 --- a/roles/test-utils/sv1-mining-device/Cargo.toml +++ b/roles/test-utils/sv1-mining-device/Cargo.toml @@ -1,8 +1,15 @@ [package] name = "sv1-mining-device" version = "0.1.0" +authors = ["The Stratum V2 Developers"] edition = "2021" publish = false +documentation = "https://github.com/stratum-mining/stratum" +readme = "README.md" +homepage = "https://stratumprotocol.org" +repository = "https://github.com/stratum-mining/stratum" +license = "MIT + Apache-2.0" +keywords = ["stratum", "mining", "bitcoin", "protocol"] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/roles/tests-integration/Cargo.toml b/roles/tests-integration/Cargo.toml index 00eab65fa5..3a1f6615da 100644 --- a/roles/tests-integration/Cargo.toml +++ b/roles/tests-integration/Cargo.toml @@ -1,7 +1,14 @@ [package] name = "integration-test" version = "0.1.0" +authors = ["The Stratum V2 Developers"] edition = "2021" +documentation = "https://github.com/stratum-mining/stratum" +readme = "README.md" +homepage = "https://stratumprotocol.org" +repository = "https://github.com/stratum-mining/stratum" +license = "MIT + Apache-2.0" +keywords = ["stratum", "mining", "bitcoin", "protocol"] [dependencies] bitcoind = "0.36.0" diff --git a/roles/translator/Cargo.toml b/roles/translator/Cargo.toml index a7c762a058..8699993447 100644 --- a/roles/translator/Cargo.toml +++ b/roles/translator/Cargo.toml @@ -1,10 +1,15 @@ [package] name = "translator_sv2" version = "0.1.1" +authors = ["The Stratum V2 Developers"] edition = "2021" description = "Server used to bridge SV1 miners to SV2 pools" -license = "MIT OR Apache-2.0" +documentation = "https://docs.rs/translator_sv2" +readme = "README.md" +homepage = "https://stratumprotocol.org" repository = "https://github.com/stratum-mining/stratum" +license = "MIT + Apache-2.0" +keywords = ["stratum", "mining", "bitcoin", "protocol"] [lib] name = "translator_sv2" diff --git a/roles/translator/src/lib/mod.rs b/roles/translator/src/lib/mod.rs index 5a95bcde71..2c5a21c4d0 100644 --- a/roles/translator/src/lib/mod.rs +++ b/roles/translator/src/lib/mod.rs @@ -276,10 +276,6 @@ impl TranslatorSv2 { let _ = task_collector.safe_lock(|t| t.push((task.abort_handle(), "init task".to_string()))); } - - pub fn upstream_address(&self) -> SocketAddr { - self.config.upstream_address.clone().parse().unwrap() - } } fn kill_tasks(task_collector: Arc>>) { diff --git a/roles/translator/src/lib/proxy/bridge.rs b/roles/translator/src/lib/proxy/bridge.rs index 74db21111e..93f4efdeb2 100644 --- a/roles/translator/src/lib/proxy/bridge.rs +++ b/roles/translator/src/lib/proxy/bridge.rs @@ -540,6 +540,7 @@ mod test { pub mod test_utils { use super::*; + #[allow(dead_code)] pub struct BridgeInterface { pub tx_sv1_submit: Sender, pub rx_sv2_submit_shares_ext: Receiver>, diff --git a/roles/translator/src/lib/upstream_sv2/upstream.rs b/roles/translator/src/lib/upstream_sv2/upstream.rs index 6135174328..6e2ddf646c 100644 --- a/roles/translator/src/lib/upstream_sv2/upstream.rs +++ b/roles/translator/src/lib/upstream_sv2/upstream.rs @@ -115,7 +115,7 @@ impl Upstream { /// `UpstreamConnection` with a channel to send and receive messages from the SV2 Upstream /// role and uses channels provided in the function arguments to send and receive messages /// from the `Downstream`. - #[cfg_attr(feature = "cargo-clippy", allow(clippy::too_many_arguments))] + #[allow(clippy::too_many_arguments)] pub async fn new( address: SocketAddr, authority_public_key: Secp256k1PublicKey, diff --git a/utils/Cargo.toml b/utils/Cargo.toml index aa22ee1aef..43e3c95fe8 100644 --- a/utils/Cargo.toml +++ b/utils/Cargo.toml @@ -1,16 +1,3 @@ -name = "stratum_v2_utils" -version = "1.0.0" -authors = ["The Stratum v2 Developers"] -edition = "2021" -description = "The Stratum protocol defines how miners, proxies, and pools communicate to contribute hashrate to the Bitcoin network. Stratum v2 is a robust set of primitives which anyone can use to expand the protocol or implement a role." -documentation = "https://github.com/stratum-mining/stratum" -readme = "README.md" -homepage = "https://stratumprotocol.org" -repository = "https://github.com/stratum-mining/stratum" -license = "MIT + Apache-2.0" -license-file = "LICENSE.md" -keywords = ["stratum", "mining", "bitcoin", "protocol"] - [workspace] resolver="2" diff --git a/utils/bip32-key-derivation/Cargo.toml b/utils/bip32-key-derivation/Cargo.toml index a2d0681e4c..5b5749e608 100644 --- a/utils/bip32-key-derivation/Cargo.toml +++ b/utils/bip32-key-derivation/Cargo.toml @@ -1,10 +1,15 @@ [package] name = "bip32_derivation" version = "1.0.0" +authors = ["The Stratum V2 Developers"] edition = "2021" description = "bip32_derivation" -license = "MIT OR Apache-2.0" +documentation = "https://docs.rs/bip32_derivation" +readme = "README.md" +homepage = "https://stratumprotocol.org" repository = "https://github.com/stratum-mining/stratum" +license = "MIT + Apache-2.0" +keywords = ["stratum", "mining", "bitcoin", "protocol"] [lib] name = "bip32_derivation" diff --git a/utils/buffer/Cargo.toml b/utils/buffer/Cargo.toml index b3a8f543d9..1effc249eb 100644 --- a/utils/buffer/Cargo.toml +++ b/utils/buffer/Cargo.toml @@ -1,11 +1,15 @@ [package] name = "buffer_sv2" version = "1.1.0" -authors = ["fi3 "] +authors = ["The Stratum V2 Developers"] edition = "2018" description = "buffer" -license = "MIT" +documentation = "https://docs.rs/buffer_sv2" +readme = "README.md" +homepage = "https://stratumprotocol.org" repository = "https://github.com/stratum-mining/stratum" +license = "MIT + Apache-2.0" +keywords = ["stratum", "mining", "bitcoin", "protocol"] [dependencies] criterion = {version = "0.3", optional = true} diff --git a/utils/error-handling/Cargo.toml b/utils/error-handling/Cargo.toml index 6d3cb4a157..05a606b984 100644 --- a/utils/error-handling/Cargo.toml +++ b/utils/error-handling/Cargo.toml @@ -1,7 +1,12 @@ [package] name = "error_handling" version = "1.0.0" +authors = ["The Stratum V2 Developers"] edition = "2021" description = "Macro used to clean and centralize error handling within async processes" -license = "MIT OR Apache-2.0" +documentation = "https://docs.rs/error_handling" +readme = "README.md" +homepage = "https://stratumprotocol.org" repository = "https://github.com/stratum-mining/stratum" +license = "MIT + Apache-2.0" +keywords = ["stratum", "mining", "bitcoin", "protocol"] diff --git a/utils/key-utils/Cargo.toml b/utils/key-utils/Cargo.toml index 55c5bba15f..b6c13b86a7 100644 --- a/utils/key-utils/Cargo.toml +++ b/utils/key-utils/Cargo.toml @@ -1,10 +1,15 @@ [package] name = "key-utils" version = "1.1.0" +authors = ["The Stratum V2 Developers"] edition = "2021" description = "Key utils" -license = "MIT OR Apache-2.0" +documentation = "https://docs.rs/key-utils" +readme = "README.md" +homepage = "https://stratumprotocol.org" repository = "https://github.com/stratum-mining/stratum" +license = "MIT + Apache-2.0" +keywords = ["stratum", "mining", "bitcoin", "protocol"] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/utils/message-generator/Cargo.toml b/utils/message-generator/Cargo.toml index f97d74f0d9..3be66a7724 100644 --- a/utils/message-generator/Cargo.toml +++ b/utils/message-generator/Cargo.toml @@ -1,7 +1,15 @@ [package] name = "message_generator_sv2" version = "1.0.1" +authors = ["The Stratum V2 Developers"] edition = "2021" +description = "message generator" +documentation = "https://github.com/stratum-mining/stratum" +readme = "README.md" +homepage = "https://stratumprotocol.org" +repository = "https://github.com/stratum-mining/stratum" +license = "MIT + Apache-2.0" +keywords = ["stratum", "mining", "bitcoin", "protocol"] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html