From e1aae3564c98a1e47e0ceb69ad65a7c82358ebaa Mon Sep 17 00:00:00 2001 From: plebhash Date: Sat, 18 May 2024 16:23:22 -0300 Subject: [PATCH] taplo fmt --- benches/Cargo.toml | 27 +++++++++------ common/Cargo.toml | 8 +++-- examples/ping-pong-with-noise/Cargo.toml | 22 ++++++++++--- examples/ping-pong-without-noise/Cargo.toml | 7 ++-- examples/sv1-client-and-server/Cargo.toml | 13 +++++--- examples/sv2-proxy/proxy-config.toml | 4 ++- examples/template-provider-test/Cargo.toml | 10 ++++-- protocols/Cargo.toml | 32 +++++++++--------- protocols/fuzz-tests/Cargo.toml | 8 +++-- protocols/tarpaulin.toml | 2 +- protocols/v1/Cargo.toml | 13 +++++--- protocols/v2/binary-sv2/binary-sv2/Cargo.toml | 13 +++++--- .../binary-sv2/no-serde-sv2/codec/Cargo.toml | 4 +-- .../no-serde-sv2/derive_codec/Cargo.toml | 2 +- protocols/v2/binary-sv2/serde-sv2/Cargo.toml | 7 ++-- protocols/v2/codec-sv2/Cargo.toml | 16 +++++---- protocols/v2/const-sv2/Cargo.toml | 7 +++- protocols/v2/framing-sv2/Cargo.toml | 4 +-- protocols/v2/noise-sv2/Cargo.toml | 14 ++++++-- protocols/v2/roles-logic-sv2/Cargo.toml | 33 +++++++++++-------- .../subprotocols/common-messages/Cargo.toml | 12 +++---- .../subprotocols/job-declaration/Cargo.toml | 6 ++-- protocols/v2/subprotocols/mining/Cargo.toml | 6 ++-- .../template-distribution/Cargo.toml | 8 ++--- protocols/v2/sv2-ffi/Cargo.toml | 7 ++-- roles/Cargo.toml | 16 ++++----- roles/jd-client/Cargo.toml | 15 +++++++-- .../jdc-config-hosted-example.toml | 14 ++++---- .../jdc-config-local-example.toml | 14 ++++---- roles/jd-server/Cargo.toml | 23 ++++++++++--- .../jds-config-hosted-example.toml | 18 +++++----- .../jds-config-local-example.toml | 18 +++++----- roles/mining-proxy/Cargo.toml | 19 ++++++++--- .../config-examples/proxy-config-example.toml | 2 +- roles/pool/Cargo.toml | 14 ++++++-- .../pool-config-hosted-tp-example.toml | 16 ++++----- .../pool-config-local-tp-example.toml | 14 ++++---- roles/roles-utils/network-helpers/Cargo.toml | 10 ++++-- roles/roles-utils/rpc/Cargo.toml | 14 ++++++-- roles/tarpaulin.toml | 2 +- roles/test-utils/mining-device/Cargo.toml | 12 ++++--- roles/test-utils/sv1-mining-device/Cargo.toml | 11 +++++-- roles/translator/Cargo.toml | 22 +++++++++---- .../tproxy-config-hosted-pool-example.toml | 2 +- .../tproxy-config-local-jdc-example.toml | 2 +- .../tproxy-config-local-pool-example.toml | 2 +- rust-toolchain.toml | 2 +- .../jdc-config.toml | 3 +- .../jds-config.toml | 10 +++--- .../proxy-config.toml | 2 +- .../interop-jd-translator/jdc-config.toml | 14 ++++---- .../interop-jd-translator/jds-config.toml | 10 +++--- .../interop-jd-translator/pool-config.toml | 14 ++++---- .../interop-jd-translator/proxy-config.toml | 6 ++-- .../jds-config.toml | 10 +++--- .../jds-config.toml | 10 +++--- .../config/jds-stack-overflow/jdc-config.toml | 2 +- .../mining-proxy-config.toml | 2 +- .../jds-stack-overflow/pool-config.toml | 4 +-- .../pool-config-sri-tp-different-port.toml | 4 +-- test/config/pool-config-sri-tp.toml | 6 ++-- test/config/pool-mock-tp-bad-coinbase.toml | 4 +-- test/config/pool-mock-tp-bad-config.toml | 14 ++++---- .../pool-mock-tp-standard-coverage.toml | 6 ++-- test/config/pool-mock-tp.toml | 4 +-- ...nfig-test-multiple-upstreams-extended.toml | 6 ++-- .../proxy-config-test-multiple-upstreams.toml | 6 ++-- .../tproxy-config-no-jd-sv1-cpu-md.toml | 8 ++--- test/scale/Cargo.toml | 15 +++++---- utils/Cargo.toml | 13 ++------ utils/bip32-key-derivation/Cargo.toml | 4 ++- utils/buffer/Cargo.toml | 7 ++-- utils/buffer/fuzz/Cargo.toml | 2 +- utils/buffer/fuzz/rust-toolchain.toml | 4 +-- utils/key-utils/Cargo.toml | 13 ++++++-- utils/message-generator/Cargo.toml | 28 ++++++++++++---- utils/tarpaulin.toml | 2 +- 77 files changed, 474 insertions(+), 306 deletions(-) diff --git a/benches/Cargo.toml b/benches/Cargo.toml index f9adf44d6c..bbd1036673 100644 --- a/benches/Cargo.toml +++ b/benches/Cargo.toml @@ -4,32 +4,39 @@ version = "1.0.0" edition = "2021" [dependencies] -async-std={version = "1.10.0", features = ["attributes"]} +async-std = { version = "1.10.0", features = ["attributes"] } criterion = "0.5.1" async-channel = "1.4.0" -v1 = { path="../protocols/v1", package="sv1_api", version = "^1.0.0" } -serde_json = { version = "1.0.64", default-features = false, features = ["alloc"] } -iai="0.1" +v1 = { path = "../protocols/v1", package = "sv1_api", version = "^1.0.0" } +serde_json = { version = "1.0.64", default-features = false, features = [ + "alloc", +] } +iai = "0.1" mining_sv2 = { path = "../protocols/v2/subprotocols/mining", version = "^1.0.0" } roles_logic_sv2 = { path = "../protocols/v2/roles-logic-sv2", version = "^1.0.0" } framing_sv2 = { version = "1.0.0", path = "../protocols/v2/framing-sv2" } -serde = { version = "1.0.89", default-features = false, features = ["derive", "alloc"] } +serde = { version = "1.0.89", default-features = false, features = [ + "derive", + "alloc", +] } num-bigint = "0.4.3" num-traits = "0.2.15" -bitcoin="0.28.1" -codec_sv2 = { path = "../protocols/v2/codec-sv2", features=["noise_sv2"] } +bitcoin = "0.28.1" +codec_sv2 = { path = "../protocols/v2/codec-sv2", features = ["noise_sv2"] } binary_sv2 = { path = "../protocols/v2/binary-sv2/binary-sv2" } -network_helpers_sv2 = { path = "../roles/roles-utils/network-helpers", features=["async_std"] } +network_helpers_sv2 = { path = "../roles/roles-utils/network-helpers", features = [ + "async_std", +] } rand = "0.8.4" [[bench]] name = "criterion_sv1_benchmark" -path="benches/src/sv1/criterion_sv1_benchmark.rs" +path = "benches/src/sv1/criterion_sv1_benchmark.rs" harness = false [[bench]] name = "iai_sv1_benchmark" -path="benches/src/sv1/iai_sv1_benchmark.rs" +path = "benches/src/sv1/iai_sv1_benchmark.rs" harness = false [[bench]] diff --git a/common/Cargo.toml b/common/Cargo.toml index 3b9d7cc2cd..8fdaa2db49 100644 --- a/common/Cargo.toml +++ b/common/Cargo.toml @@ -7,5 +7,9 @@ license = "MIT OR Apache-2.0" repository = "https://github.com/stratum-mining/stratum" [dependencies] -bitcoin = {version="0.29.1",optional=true} -secp256k1 = { version = "0.28.2", default-features = false, features =["alloc","rand","rand-std"] } +bitcoin = { version = "0.29.1", optional = true } +secp256k1 = { version = "0.28.2", default-features = false, features = [ + "alloc", + "rand", + "rand-std", +] } diff --git a/examples/ping-pong-with-noise/Cargo.toml b/examples/ping-pong-with-noise/Cargo.toml index b1220bce7d..4bd5de0f5b 100644 --- a/examples/ping-pong-with-noise/Cargo.toml +++ b/examples/ping-pong-with-noise/Cargo.toml @@ -9,14 +9,26 @@ publish = false [dependencies] rand = "0.8.3" -serde = { version = "1.0.89", features = ["derive", "alloc"], default-features = false, optional = true} +serde = { version = "1.0.89", features = [ + "derive", + "alloc", +], default-features = false, optional = true } async-channel = "1.5.1" -async-std="1.8.0" +async-std = "1.8.0" bytes = "1.0.1" binary_sv2 = { version = "^1.0.0", path = "../../protocols/v2/binary-sv2/binary-sv2" } -codec_sv2 = { version = "^1.0.0", path = "../../protocols/v2/codec-sv2", features=["noise_sv2"] } -network_helpers_sv2 = { version = "^2.0.0", path = "../../roles/roles-utils/network-helpers", features=["async_std"] } +codec_sv2 = { version = "^1.0.0", path = "../../protocols/v2/codec-sv2", features = [ + "noise_sv2", +] } +network_helpers_sv2 = { version = "^2.0.0", path = "../../roles/roles-utils/network-helpers", features = [ + "async_std", +] } key-utils = { version = "^1.0.0", path = "../../utils/key-utils" } [features] -with_serde = ["binary_sv2/with_serde", "serde", "codec_sv2/with_serde", "network_helpers_sv2/with_serde"] +with_serde = [ + "binary_sv2/with_serde", + "serde", + "codec_sv2/with_serde", + "network_helpers_sv2/with_serde", +] diff --git a/examples/ping-pong-without-noise/Cargo.toml b/examples/ping-pong-without-noise/Cargo.toml index 5619bfa4bb..327aabd3c1 100644 --- a/examples/ping-pong-without-noise/Cargo.toml +++ b/examples/ping-pong-without-noise/Cargo.toml @@ -9,9 +9,12 @@ publish = false [dependencies] rand = "0.8.3" -serde = { version = "1.0.89", features = ["derive", "alloc"], default-features = false, optional = true} +serde = { version = "1.0.89", features = [ + "derive", + "alloc", +], default-features = false, optional = true } async-channel = "1.5.1" -async-std="1.8.0" +async-std = "1.8.0" bytes = "1.0.1" binary_sv2 = { path = "../../protocols/v2/binary-sv2/binary-sv2" } codec_sv2 = { path = "../../protocols/v2/codec-sv2" } diff --git a/examples/sv1-client-and-server/Cargo.toml b/examples/sv1-client-and-server/Cargo.toml index 31e241acd9..acbe9ae68e 100644 --- a/examples/sv1-client-and-server/Cargo.toml +++ b/examples/sv1-client-and-server/Cargo.toml @@ -8,8 +8,13 @@ publish = false # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -v1={path="../../protocols/v1", package="sv1_api"} -async-std="1.8.0" -serde = { version = "1.0.89", default-features = false, features = ["derive", "alloc"] } -serde_json = { version = "1.0.64", default-features = false, features = ["alloc"] } +v1 = { path = "../../protocols/v1", package = "sv1_api" } +async-std = "1.8.0" +serde = { version = "1.0.89", default-features = false, features = [ + "derive", + "alloc", +] } +serde_json = { version = "1.0.64", default-features = false, features = [ + "alloc", +] } async-channel = "1.5.1" diff --git a/examples/sv2-proxy/proxy-config.toml b/examples/sv2-proxy/proxy-config.toml index 296b891f53..0834d9f669 100644 --- a/examples/sv2-proxy/proxy-config.toml +++ b/examples/sv2-proxy/proxy-config.toml @@ -1,4 +1,6 @@ -upstreams = [{ address = "127.0.0.1", port = 34254, pub_key = "2di19GHYQnAZJmEpoUeP7C3Eg9TCcksHr23rZCC83dvUiZgiDL"}] +upstreams = [ + { address = "127.0.0.1", port = 34254, pub_key = "2di19GHYQnAZJmEpoUeP7C3Eg9TCcksHr23rZCC83dvUiZgiDL" }, +] listen_address = "127.0.0.1" listen_mining_port = 34255 max_supported_version = 2 diff --git a/examples/template-provider-test/Cargo.toml b/examples/template-provider-test/Cargo.toml index b6397a29ec..cd4a8a16d2 100644 --- a/examples/template-provider-test/Cargo.toml +++ b/examples/template-provider-test/Cargo.toml @@ -7,8 +7,12 @@ publish = false # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -codec_sv2 = { version = "1.0", path = "../../protocols/v2/codec-sv2", features=["noise_sv2"] } +codec_sv2 = { version = "1.0", path = "../../protocols/v2/codec-sv2", features = [ + "noise_sv2", +] } roles_logic_sv2 = { version = "^0.1.0", path = "../../protocols/v2/roles-logic-sv2" } -network_helpers_sv2 = { version = "^0.1.0", path = "../../roles/roles-utils/network-helpers", features=["async_std"] } +network_helpers_sv2 = { version = "^0.1.0", path = "../../roles/roles-utils/network-helpers", features = [ + "async_std", +] } async-channel = "1.5.1" -async-std={version = "1.8.0", features = ["attributes"]} +async-std = { version = "1.8.0", features = ["attributes"] } diff --git a/protocols/Cargo.toml b/protocols/Cargo.toml index 90d917fdd2..65f1df5a9d 100644 --- a/protocols/Cargo.toml +++ b/protocols/Cargo.toml @@ -14,24 +14,24 @@ keywords = ["stratum", "mining", "bitcoin", "protocol"] [workspace] -resolver="2" +resolver = "2" members = [ - "v1", - "v2/binary-sv2/serde-sv2", - "v2/binary-sv2/no-serde-sv2/codec", - "v2/binary-sv2/no-serde-sv2/derive_codec", - "v2/binary-sv2/binary-sv2", - "v2/noise-sv2", - "v2/framing-sv2", - "v2/codec-sv2", - "v2/const-sv2", - "v2/subprotocols/common-messages", - "v2/subprotocols/template-distribution", - "v2/subprotocols/mining", - "v2/subprotocols/job-declaration", - "v2/sv2-ffi", - "v2/roles-logic-sv2", + "v1", + "v2/binary-sv2/serde-sv2", + "v2/binary-sv2/no-serde-sv2/codec", + "v2/binary-sv2/no-serde-sv2/derive_codec", + "v2/binary-sv2/binary-sv2", + "v2/noise-sv2", + "v2/framing-sv2", + "v2/codec-sv2", + "v2/const-sv2", + "v2/subprotocols/common-messages", + "v2/subprotocols/template-distribution", + "v2/subprotocols/mining", + "v2/subprotocols/job-declaration", + "v2/sv2-ffi", + "v2/roles-logic-sv2", ] [profile.dev] diff --git a/protocols/fuzz-tests/Cargo.toml b/protocols/fuzz-tests/Cargo.toml index d29d588ce9..ec35b4a1ad 100644 --- a/protocols/fuzz-tests/Cargo.toml +++ b/protocols/fuzz-tests/Cargo.toml @@ -12,9 +12,11 @@ cargo-fuzz = true libfuzzer-sys = { version = "0.4.0", features = ["arbitrary-derive"] } arbitrary = { version = "1", features = ["derive"] } rand = "0.8.3" -binary_codec_sv2 = { version = "1.0.0", path = "../v2/binary-sv2/no-serde-sv2/codec"} -codec_sv2 = { version = "1.0.0", path = "../v2/codec-sv2", features = ["noise_sv2"]} -roles_logic_sv2 = { version = "1.0.0", path = "../v2/roles-logic-sv2"} +binary_codec_sv2 = { version = "1.0.0", path = "../v2/binary-sv2/no-serde-sv2/codec" } +codec_sv2 = { version = "1.0.0", path = "../v2/codec-sv2", features = [ + "noise_sv2", +] } +roles_logic_sv2 = { version = "1.0.0", path = "../v2/roles-logic-sv2" } affinity = "0.1.1" threadpool = "1.8.1" lazy_static = "1.4.0" diff --git a/protocols/tarpaulin.toml b/protocols/tarpaulin.toml index d611e2d34d..7dd0c10c3a 100644 --- a/protocols/tarpaulin.toml +++ b/protocols/tarpaulin.toml @@ -1,6 +1,6 @@ [default] features = "disable_nopanic prop_test noise_sv2 with_buffer_pool derive_codec_sv2 binary_codec_sv2 default core" -run-types = [ "Lib" ] +run-types = ["Lib"] timeout = "120s" fail-under = 20 diff --git a/protocols/v1/Cargo.toml b/protocols/v1/Cargo.toml index 1a665b3c1a..b88d96d449 100644 --- a/protocols/v1/Cargo.toml +++ b/protocols/v1/Cargo.toml @@ -15,10 +15,15 @@ byteorder = "1.2.7" pretty_env_logger = "0.4.0" log = "0.4.0" hex = "0.4.3" -serde = { version = "1.0.89", default-features = false, features = ["derive", "alloc"] } -serde_json = { version = "1.0.64", default-features = false, features = ["alloc"] } -tracing = {version = "0.1"} -binary_sv2 = { version = "^1.0.0", path = "../v2/binary-sv2/binary-sv2"} +serde = { version = "1.0.89", default-features = false, features = [ + "derive", + "alloc", +] } +serde_json = { version = "1.0.64", default-features = false, features = [ + "alloc", +] } +tracing = { version = "0.1" } +binary_sv2 = { version = "^1.0.0", path = "../v2/binary-sv2/binary-sv2" } [dev-dependencies] quickcheck = "1" diff --git a/protocols/v2/binary-sv2/binary-sv2/Cargo.toml b/protocols/v2/binary-sv2/binary-sv2/Cargo.toml index ae7849aa90..1beb8ca911 100644 --- a/protocols/v2/binary-sv2/binary-sv2/Cargo.toml +++ b/protocols/v2/binary-sv2/binary-sv2/Cargo.toml @@ -10,11 +10,14 @@ repository = "https://github.com/stratum-mining/stratum" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -serde_sv2 = {version = "^1.0.0", path = "../serde-sv2", optional = true} -serde = { version = "1.0.89", features = ["derive", "alloc"], default-features = false, optional = true } -binary_codec_sv2 = {version = "^1.0.0", path = "../no-serde-sv2/codec", optional = true} -derive_codec_sv2 = {version = "^1.0.0", path = "../no-serde-sv2/derive_codec", optional = true} -tracing = {version = "0.1"} +serde_sv2 = { version = "^1.0.0", path = "../serde-sv2", optional = true } +serde = { version = "1.0.89", features = [ + "derive", + "alloc", +], default-features = false, optional = true } +binary_codec_sv2 = { version = "^1.0.0", path = "../no-serde-sv2/codec", optional = true } +derive_codec_sv2 = { version = "^1.0.0", path = "../no-serde-sv2/derive_codec", optional = true } +tracing = { version = "0.1" } [features] default = ["core"] 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 5f1f83e129..f673717bb3 100644 --- a/protocols/v2/binary-sv2/no-serde-sv2/codec/Cargo.toml +++ b/protocols/v2/binary-sv2/no-serde-sv2/codec/Cargo.toml @@ -10,8 +10,8 @@ repository = "https://github.com/stratum-mining/stratum" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -quickcheck = {version = "1.0.0", optional = true} -buffer_sv2 = { version = "^1.0.0", path = "../../../../../utils/buffer", optional=true} +quickcheck = { version = "1.0.0", optional = true } +buffer_sv2 = { version = "^1.0.0", path = "../../../../../utils/buffer", optional = true } [features] no_std = [] 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 62e62bd9c8..f68356cc9a 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 @@ -10,7 +10,7 @@ repository = "https://github.com/stratum-mining/stratum" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -binary_codec_sv2 = {version = "^1.0.0", path="../codec"} +binary_codec_sv2 = { version = "^1.0.0", path = "../codec" } [lib] proc-macro = true diff --git a/protocols/v2/binary-sv2/serde-sv2/Cargo.toml b/protocols/v2/binary-sv2/serde-sv2/Cargo.toml index 5e01eb2d3c..d6ffe85ef8 100644 --- a/protocols/v2/binary-sv2/serde-sv2/Cargo.toml +++ b/protocols/v2/binary-sv2/serde-sv2/Cargo.toml @@ -11,5 +11,8 @@ repository = "https://github.com/stratum-mining/stratum" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -serde = { version = "1.0.89", features = ["derive", "alloc"], default-features = false } -buffer_sv2 = {version = "^1.0.0", path = "../../../../utils/buffer"} +serde = { version = "1.0.89", features = [ + "derive", + "alloc", +], default-features = false } +buffer_sv2 = { version = "^1.0.0", path = "../../../../utils/buffer" } diff --git a/protocols/v2/codec-sv2/Cargo.toml b/protocols/v2/codec-sv2/Cargo.toml index e7be2e3eb2..bef3560dc0 100644 --- a/protocols/v2/codec-sv2/Cargo.toml +++ b/protocols/v2/codec-sv2/Cargo.toml @@ -10,14 +10,18 @@ repository = "https://github.com/stratum-mining/stratum" [dependencies] serde = { version = "1.0.89", default-features = false, optional = true } framing_sv2 = { version = "1.0.0", path = "../../../protocols/v2/framing-sv2" } -noise_sv2 = { version = "1.0", path = "../../../protocols/v2/noise-sv2", optional=true} +noise_sv2 = { version = "1.0", path = "../../../protocols/v2/noise-sv2", optional = true } binary_sv2 = { version = "1.0.0", path = "../../../protocols/v2/binary-sv2/binary-sv2" } -const_sv2 = { version = "1.0.0", path = "../../../protocols/v2/const-sv2"} -buffer_sv2 = { version = "1.0.0", path = "../../../utils/buffer"} -tracing = { version = "0.1"} - +const_sv2 = { version = "1.0.0", path = "../../../protocols/v2/const-sv2" } +buffer_sv2 = { version = "1.0.0", path = "../../../utils/buffer" } +tracing = { version = "0.1" } [features] -with_serde = ["binary_sv2/with_serde", "serde", "framing_sv2/with_serde", "buffer_sv2/with_serde"] +with_serde = [ + "binary_sv2/with_serde", + "serde", + "framing_sv2/with_serde", + "buffer_sv2/with_serde", +] with_buffer_pool = ["framing_sv2/with_buffer_pool"] diff --git a/protocols/v2/const-sv2/Cargo.toml b/protocols/v2/const-sv2/Cargo.toml index af30671932..26f7470b17 100644 --- a/protocols/v2/const-sv2/Cargo.toml +++ b/protocols/v2/const-sv2/Cargo.toml @@ -10,7 +10,12 @@ repository = "https://github.com/stratum-mining/stratum" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -secp256k1 = { version = "0.28.2", default-features = false, features =["hashes", "alloc","rand","rand-std"] } +secp256k1 = { version = "0.28.2", default-features = false, features = [ + "hashes", + "alloc", + "rand", + "rand-std", +] } #[dev-dependencies] #cbindgen = "0.16.0" diff --git a/protocols/v2/framing-sv2/Cargo.toml b/protocols/v2/framing-sv2/Cargo.toml index 551eb4645e..2a18fba05c 100644 --- a/protocols/v2/framing-sv2/Cargo.toml +++ b/protocols/v2/framing-sv2/Cargo.toml @@ -12,9 +12,9 @@ repository = "https://github.com/stratum-mining/stratum" [dependencies] serde = { version = "1.0.89", default-features = false, optional = true } -const_sv2 = { version = "^1.0.0", path = "../../../protocols/v2/const-sv2"} +const_sv2 = { version = "^1.0.0", path = "../../../protocols/v2/const-sv2" } binary_sv2 = { version = "^1.0.0", path = "../../../protocols/v2/binary-sv2/binary-sv2" } -buffer_sv2 = { version = "^1.0.0", path = "../../../utils/buffer", optional=true } +buffer_sv2 = { version = "^1.0.0", path = "../../../utils/buffer", optional = true } [features] with_serde = ["binary_sv2/with_serde", "serde", "buffer_sv2/with_serde"] diff --git a/protocols/v2/noise-sv2/Cargo.toml b/protocols/v2/noise-sv2/Cargo.toml index 7316fddb8f..891cefc458 100644 --- a/protocols/v2/noise-sv2/Cargo.toml +++ b/protocols/v2/noise-sv2/Cargo.toml @@ -8,12 +8,20 @@ license = "MIT" repository = "https://github.com/stratum-mining/stratum" [dependencies] -secp256k1 = { version = "0.28.2", default-features = false, features =["hashes", "alloc","rand","rand-std"] } -rand = {version = "0.8.5", default-features = false, features = ["std","std_rng"] } +secp256k1 = { version = "0.28.2", default-features = false, features = [ + "hashes", + "alloc", + "rand", + "rand-std", +] } +rand = { version = "0.8.5", default-features = false, features = [ + "std", + "std_rng", +] } aes-gcm = "0.10.2" chacha20poly1305 = "0.10.1" rand_chacha = "0.3.1" -const_sv2 = { version = "^1.0.0", path = "../../../protocols/v2/const-sv2"} +const_sv2 = { version = "^1.0.0", path = "../../../protocols/v2/const-sv2" } [dev-dependencies] quickcheck = "1.0.3" diff --git a/protocols/v2/roles-logic-sv2/Cargo.toml b/protocols/v2/roles-logic-sv2/Cargo.toml index 526a13ed51..f9e7cecdb4 100644 --- a/protocols/v2/roles-logic-sv2/Cargo.toml +++ b/protocols/v2/roles-logic-sv2/Cargo.toml @@ -9,17 +9,22 @@ repository = "https://github.com/stratum-mining/stratum" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -stratum-common = { version="1.0.0", path = "../../../common", features=["bitcoin"]} -serde = { version = "1.0.89", features = ["derive", "alloc"], default-features = false, optional = true} -binary_sv2 = {version = "^1.0.0", path = "../../../protocols/v2/binary-sv2/binary-sv2", default-features = true } +stratum-common = { version = "1.0.0", path = "../../../common", features = [ + "bitcoin", +] } +serde = { version = "1.0.89", features = [ + "derive", + "alloc", +], default-features = false, optional = true } +binary_sv2 = { version = "^1.0.0", path = "../../../protocols/v2/binary-sv2/binary-sv2", default-features = true } common_messages_sv2 = { path = "../../../protocols/v2/subprotocols/common-messages", version = "^1.0.0" } mining_sv2 = { path = "../../../protocols/v2/subprotocols/mining", version = "^1.0.0" } template_distribution_sv2 = { path = "../../../protocols/v2/subprotocols/template-distribution", version = "^1.0.0" } job_declaration_sv2 = { path = "../../../protocols/v2/subprotocols/job-declaration", version = "^1.0.0" } -const_sv2 = { version = "^1.0.0", path = "../../../protocols/v2/const-sv2"} +const_sv2 = { version = "^1.0.0", path = "../../../protocols/v2/const-sv2" } framing_sv2 = { version = "^1.0.0", path = "../../../protocols/v2/framing-sv2" } -tracing = { version = "0.1"} -chacha20poly1305 = { version = "0.10.1"} +tracing = { version = "0.1" } +chacha20poly1305 = { version = "0.10.1" } nohash-hasher = "0.2.0" siphasher = "1" @@ -27,15 +32,17 @@ siphasher = "1" quickcheck = "1.0.3" quickcheck_macros = "1" rand = "0.8.5" -toml = {git = "https://github.com/diondokter/toml-rs", default-features = false, rev="c4161aa"} +toml = { git = "https://github.com/diondokter/toml-rs", default-features = false, rev = "c4161aa" } [features] -with_serde = [ "serde", -"binary_sv2/with_serde", -"common_messages_sv2/with_serde", -"template_distribution_sv2/with_serde", -"job_declaration_sv2/with_serde", -"mining_sv2/with_serde"] +with_serde = [ + "serde", + "binary_sv2/with_serde", + "common_messages_sv2/with_serde", + "template_distribution_sv2/with_serde", + "job_declaration_sv2/with_serde", + "mining_sv2/with_serde", +] prop_test = ["template_distribution_sv2/prop_test"] # Code coverage tools may conflict with the nopanic logic, so we can disable it when needed disable_nopanic = [] diff --git a/protocols/v2/subprotocols/common-messages/Cargo.toml b/protocols/v2/subprotocols/common-messages/Cargo.toml index 2f803c25e7..44466ce9eb 100644 --- a/protocols/v2/subprotocols/common-messages/Cargo.toml +++ b/protocols/v2/subprotocols/common-messages/Cargo.toml @@ -10,12 +10,12 @@ repository = "https://github.com/stratum-mining/stratum" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -serde = { version = "1.0.89", default-features = false, optional= true } -binary_sv2 = {version = "^1.0.0", path = "../../../../protocols/v2/binary-sv2/binary-sv2" } -const_sv2 = {version = "^1.0.0", path = "../../../../protocols/v2/const-sv2"} -quickcheck = { version = "1.0.3", optional=true } -quickcheck_macros = { version = "1", optional=true } -serde_repr = {version= "0.1.10", optional=true} +serde = { version = "1.0.89", default-features = false, optional = true } +binary_sv2 = { version = "^1.0.0", path = "../../../../protocols/v2/binary-sv2/binary-sv2" } +const_sv2 = { version = "^1.0.0", path = "../../../../protocols/v2/const-sv2" } +quickcheck = { version = "1.0.3", optional = true } +quickcheck_macros = { version = "1", optional = true } +serde_repr = { version = "0.1.10", optional = true } [features] with_serde = ["binary_sv2/with_serde", "serde", "serde_repr"] diff --git a/protocols/v2/subprotocols/job-declaration/Cargo.toml b/protocols/v2/subprotocols/job-declaration/Cargo.toml index 9db52a7922..8d236b9519 100644 --- a/protocols/v2/subprotocols/job-declaration/Cargo.toml +++ b/protocols/v2/subprotocols/job-declaration/Cargo.toml @@ -9,9 +9,9 @@ repository = "https://github.com/stratum-mining/stratum" [dependencies] -serde = { version = "1.0.89", default-features = false, optional= true } -binary_sv2 = {version = "^1.0.0", path = "../../../../protocols/v2/binary-sv2/binary-sv2" } -const_sv2 = {version = "^1.0.0", path = "../../../../protocols/v2/const-sv2"} +serde = { version = "1.0.89", default-features = false, optional = true } +binary_sv2 = { version = "^1.0.0", path = "../../../../protocols/v2/binary-sv2/binary-sv2" } +const_sv2 = { version = "^1.0.0", path = "../../../../protocols/v2/const-sv2" } [features] with_serde = ["binary_sv2/with_serde", "serde"] diff --git a/protocols/v2/subprotocols/mining/Cargo.toml b/protocols/v2/subprotocols/mining/Cargo.toml index 493b77d637..7fa98b13f9 100644 --- a/protocols/v2/subprotocols/mining/Cargo.toml +++ b/protocols/v2/subprotocols/mining/Cargo.toml @@ -11,9 +11,9 @@ repository = "https://github.com/stratum-mining/stratum" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -serde = { version = "1.0.89", default-features = false, optional= true } -binary_sv2 = {version = "^1.0.0", path = "../../../../protocols/v2/binary-sv2/binary-sv2" } -const_sv2 = {version = "^1.0.0", path = "../../../../protocols/v2/const-sv2"} +serde = { version = "1.0.89", default-features = false, optional = true } +binary_sv2 = { version = "^1.0.0", path = "../../../../protocols/v2/binary-sv2/binary-sv2" } +const_sv2 = { version = "^1.0.0", path = "../../../../protocols/v2/const-sv2" } [dev-dependencies] quickcheck = "1.0.3" diff --git a/protocols/v2/subprotocols/template-distribution/Cargo.toml b/protocols/v2/subprotocols/template-distribution/Cargo.toml index 38cd6f56f5..1152225e1f 100644 --- a/protocols/v2/subprotocols/template-distribution/Cargo.toml +++ b/protocols/v2/subprotocols/template-distribution/Cargo.toml @@ -10,11 +10,11 @@ repository = "https://github.com/stratum-mining/stratum" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -serde = { version = "1.0.89", default-features = false, optional= true } +serde = { version = "1.0.89", default-features = false, optional = true } binary_sv2 = { version = "^1.0.0", path = "../../../../protocols/v2/binary-sv2/binary-sv2" } -const_sv2 = { version = "^1.0.0", path = "../../../../protocols/v2/const-sv2"} -quickcheck = { version = "1.0.3", optional=true } -quickcheck_macros = { version = "1", optional=true } +const_sv2 = { version = "^1.0.0", path = "../../../../protocols/v2/const-sv2" } +quickcheck = { version = "1.0.3", optional = true } +quickcheck_macros = { version = "1", optional = true } [features] with_serde = ["binary_sv2/with_serde", "serde"] diff --git a/protocols/v2/sv2-ffi/Cargo.toml b/protocols/v2/sv2-ffi/Cargo.toml index 7930f58051..1fc304416b 100644 --- a/protocols/v2/sv2-ffi/Cargo.toml +++ b/protocols/v2/sv2-ffi/Cargo.toml @@ -23,5 +23,8 @@ quickcheck_macros = "1" [features] with_serde = [] -prop_test = ["binary_sv2/prop_test", "common_messages_sv2/prop_test", "template_distribution_sv2/prop_test"] - +prop_test = [ + "binary_sv2/prop_test", + "common_messages_sv2/prop_test", + "template_distribution_sv2/prop_test", +] diff --git a/roles/Cargo.toml b/roles/Cargo.toml index 2155409ba2..eafa320f23 100644 --- a/roles/Cargo.toml +++ b/roles/Cargo.toml @@ -14,16 +14,16 @@ keywords = ["stratum", "mining", "bitcoin", "protocol"] [workspace] -resolver="2" +resolver = "2" members = [ - "mining-proxy", - "pool", - "test-utils/mining-device", - "test-utils/sv1-mining-device", - "translator", - "jd-client", - "jd-server", + "mining-proxy", + "pool", + "test-utils/mining-device", + "test-utils/sv1-mining-device", + "translator", + "jd-client", + "jd-server", ] [profile.dev] diff --git a/roles/jd-client/Cargo.toml b/roles/jd-client/Cargo.toml index d0693fdb23..3c0d7dc965 100644 --- a/roles/jd-client/Cargo.toml +++ b/roles/jd-client/Cargo.toml @@ -16,11 +16,20 @@ async-channel = "1.5.1" async-recursion = "0.3.2" binary_sv2 = { version = "^1.0.0", path = "../../protocols/v2/binary-sv2/binary-sv2" } buffer_sv2 = { version = "^1.0.0", path = "../../utils/buffer" } -codec_sv2 = { version = "^1.0.1", path = "../../protocols/v2/codec-sv2", features = ["noise_sv2", "with_buffer_pool"] } +codec_sv2 = { version = "^1.0.1", path = "../../protocols/v2/codec-sv2", features = [ + "noise_sv2", + "with_buffer_pool", +] } framing_sv2 = { version = "^1.0.0", path = "../../protocols/v2/framing-sv2" } -network_helpers_sv2 = { version = "2.0.0", path = "../roles-utils/network-helpers", features=["with_tokio", "with_buffer_pool"] } +network_helpers_sv2 = { version = "2.0.0", path = "../roles-utils/network-helpers", features = [ + "with_tokio", + "with_buffer_pool", +] } roles_logic_sv2 = { version = "^1.0.0", path = "../../protocols/v2/roles-logic-sv2" } -serde = { version = "1.0.89", default-features = false, features = ["derive", "alloc"] } +serde = { version = "1.0.89", default-features = false, features = [ + "derive", + "alloc", +] } futures = "0.3.25" tokio = { version = "1", features = ["full"] } toml = { version = "0.5.6", git = "https://github.com/diondokter/toml-rs", default-features = false, rev = "c4161aa" } diff --git a/roles/jd-client/config-examples/jdc-config-hosted-example.toml b/roles/jd-client/config-examples/jdc-config-hosted-example.toml index d74fdf9f38..cdc75e2d12 100644 --- a/roles/jd-client/config-examples/jdc-config-hosted-example.toml +++ b/roles/jd-client/config-examples/jdc-config-hosted-example.toml @@ -36,12 +36,12 @@ tp_authority_public_key = "9azQdassggC7L3YMVcZyRJmK7qrFDj5MZNHb4LkaUrJRUhct92W" # ! Right now only one output is supported, so comment all the ones you don't need ! # For P2PK, P2PKH, P2WPKH, P2TR a public key is needed. For P2SH and P2WSH, a redeem script is needed. coinbase_outputs = [ - #{ output_script_type = "P2PK", output_script_value = "0372c47307e5b75ce365daf835f226d246c5a7a92fe24395018d5552123354f086" }, - #{ output_script_type = "P2PKH", output_script_value = "0372c47307e5b75ce365daf835f226d246c5a7a92fe24395018d5552123354f086" }, - #{ output_script_type = "P2SH", output_script_value = "00142ef89234bc95136eb9e6fee9d32722ebd8c1f0ab" }, - #{ output_script_type = "P2WSH", output_script_value = "00142ef89234bc95136eb9e6fee9d32722ebd8c1f0ab" }, - { output_script_type = "P2WPKH", output_script_value = "036adc3bdf21e6f9a0f0fb0066bf517e5b7909ed1563d6958a10993849a7554075" }, - #{ output_script_type = "P2TR", output_script_value = "036adc3bdf21e6f9a0f0fb0066bf517e5b7909ed1563d6958a10993849a7554075" }, + #{ output_script_type = "P2PK", output_script_value = "0372c47307e5b75ce365daf835f226d246c5a7a92fe24395018d5552123354f086" }, + #{ output_script_type = "P2PKH", output_script_value = "0372c47307e5b75ce365daf835f226d246c5a7a92fe24395018d5552123354f086" }, + #{ output_script_type = "P2SH", output_script_value = "00142ef89234bc95136eb9e6fee9d32722ebd8c1f0ab" }, + #{ output_script_type = "P2WSH", output_script_value = "00142ef89234bc95136eb9e6fee9d32722ebd8c1f0ab" }, + { output_script_type = "P2WPKH", output_script_value = "036adc3bdf21e6f9a0f0fb0066bf517e5b7909ed1563d6958a10993849a7554075" }, + #{ output_script_type = "P2TR", output_script_value = "036adc3bdf21e6f9a0f0fb0066bf517e5b7909ed1563d6958a10993849a7554075" }, ] [timeout] @@ -56,7 +56,7 @@ pool_address = "75.119.150.111:34254" jd_address = "75.119.150.111:34264" # Pool signature (string to be included in coinbase tx) pool_signature = "Stratum v2 SRI Pool" - + # [[upstreams]] # authority_pubkey = "2di19GHYQnAZJmEpoUeP7C3Eg9TCcksHr23rZCC83dvUiZgiDL" # pool_address = "127.0.0.1:34254" diff --git a/roles/jd-client/config-examples/jdc-config-local-example.toml b/roles/jd-client/config-examples/jdc-config-local-example.toml index 66f19bcb04..d3b5fe6758 100644 --- a/roles/jd-client/config-examples/jdc-config-local-example.toml +++ b/roles/jd-client/config-examples/jdc-config-local-example.toml @@ -35,12 +35,12 @@ tp_address = "127.0.0.1:8442" # ! Right now only one output is supported, so comment all the ones you don't need ! # For P2PK, P2PKH, P2WPKH, P2TR a public key is needed. For P2SH and P2WSH, a redeem script is needed. coinbase_outputs = [ - #{ output_script_type = "P2PK", output_script_value = "0372c47307e5b75ce365daf835f226d246c5a7a92fe24395018d5552123354f086" }, - #{ output_script_type = "P2PKH", output_script_value = "0372c47307e5b75ce365daf835f226d246c5a7a92fe24395018d5552123354f086" }, - #{ output_script_type = "P2SH", output_script_value = "00142ef89234bc95136eb9e6fee9d32722ebd8c1f0ab" }, - #{ output_script_type = "P2WSH", output_script_value = "00142ef89234bc95136eb9e6fee9d32722ebd8c1f0ab" }, - { output_script_type = "P2WPKH", output_script_value = "036adc3bdf21e6f9a0f0fb0066bf517e5b7909ed1563d6958a10993849a7554075" }, - #{ output_script_type = "P2TR", output_script_value = "036adc3bdf21e6f9a0f0fb0066bf517e5b7909ed1563d6958a10993849a7554075" }, + #{ output_script_type = "P2PK", output_script_value = "0372c47307e5b75ce365daf835f226d246c5a7a92fe24395018d5552123354f086" }, + #{ output_script_type = "P2PKH", output_script_value = "0372c47307e5b75ce365daf835f226d246c5a7a92fe24395018d5552123354f086" }, + #{ output_script_type = "P2SH", output_script_value = "00142ef89234bc95136eb9e6fee9d32722ebd8c1f0ab" }, + #{ output_script_type = "P2WSH", output_script_value = "00142ef89234bc95136eb9e6fee9d32722ebd8c1f0ab" }, + { output_script_type = "P2WPKH", output_script_value = "036adc3bdf21e6f9a0f0fb0066bf517e5b7909ed1563d6958a10993849a7554075" }, + #{ output_script_type = "P2TR", output_script_value = "036adc3bdf21e6f9a0f0fb0066bf517e5b7909ed1563d6958a10993849a7554075" }, ] [timeout] @@ -55,7 +55,7 @@ pool_address = "127.0.0.1:34254" jd_address = "127.0.0.1:34264" # Pool signature (string to be included in coinbase tx) pool_signature = "Stratum v2 SRI Pool" - + # [[upstreams]] # authority_pubkey = "2di19GHYQnAZJmEpoUeP7C3Eg9TCcksHr23rZCC83dvUiZgiDL" # pool_address = "127.0.0.1:34254" diff --git a/roles/jd-server/Cargo.toml b/roles/jd-server/Cargo.toml index 6f55ece068..307bf762a3 100644 --- a/roles/jd-server/Cargo.toml +++ b/roles/jd-server/Cargo.toml @@ -14,9 +14,13 @@ stratum-common = { version = "1.0.0", path = "../../common" } async-channel = "1.5.1" binary_sv2 = { version = "^1.0.0", path = "../../protocols/v2/binary-sv2/binary-sv2" } buffer_sv2 = { version = "^1.0.0", path = "../../utils/buffer" } -codec_sv2 = { version = "^1.0.1", path = "../../protocols/v2/codec-sv2", features = ["noise_sv2"] } +codec_sv2 = { version = "^1.0.1", path = "../../protocols/v2/codec-sv2", features = [ + "noise_sv2", +] } const_sv2 = { version = "^1.0.0", path = "../../protocols/v2/const-sv2" } -network_helpers_sv2 = { version = "2.0.0", path = "../roles-utils/network-helpers", features = ["with_tokio"] } +network_helpers_sv2 = { version = "2.0.0", path = "../roles-utils/network-helpers", features = [ + "with_tokio", +] } noise_sv2 = { version = "1.1.0", path = "../../protocols/v2/noise-sv2" } rand = "0.8.4" roles_logic_sv2 = { version = "^1.0.0", path = "../../protocols/v2/roles-logic-sv2" } @@ -26,9 +30,18 @@ tracing = { version = "0.1" } tracing-subscriber = "0.3" error_handling = { version = "1.0.0", path = "../../utils/error-handling" } nohash-hasher = "0.2.0" -serde_json = { version = "1.0", default-features = false, features = ["alloc","raw_value"] } -serde = { version = "1.0.89", features = ["derive", "alloc"], default-features = false } -hashbrown = { version = "0.11", default-features = false, features = ["ahash", "serde"] } +serde_json = { version = "1.0", default-features = false, features = [ + "alloc", + "raw_value", +] } +serde = { version = "1.0.89", features = [ + "derive", + "alloc", +], default-features = false } +hashbrown = { version = "0.11", default-features = false, features = [ + "ahash", + "serde", +] } key-utils = { version = "^1.0.0", path = "../../utils/key-utils" } rpc_sv2 = { version = "1.0.0", path = "../roles-utils/rpc" } hex = "0.4.3" diff --git a/roles/jd-server/config-examples/jds-config-hosted-example.toml b/roles/jd-server/config-examples/jds-config-hosted-example.toml index c8a75ef0f3..16401e4db8 100644 --- a/roles/jd-server/config-examples/jds-config-hosted-example.toml +++ b/roles/jd-server/config-examples/jds-config-hosted-example.toml @@ -7,21 +7,21 @@ cert_validity_sec = 3600 # ! Right now only one output is supported, so comment all the ones you don't need ! # For P2PK, P2PKH, P2WPKH, P2TR a public key is needed. For P2SH and P2WSH, a redeem script is needed. coinbase_outputs = [ - #{ output_script_type = "P2PK", output_script_value = "0372c47307e5b75ce365daf835f226d246c5a7a92fe24395018d5552123354f086" }, - #{ output_script_type = "P2PKH", output_script_value = "0372c47307e5b75ce365daf835f226d246c5a7a92fe24395018d5552123354f086" }, - #{ output_script_type = "P2SH", output_script_value = "00142ef89234bc95136eb9e6fee9d32722ebd8c1f0ab" }, - #{ output_script_type = "P2WSH", output_script_value = "00142ef89234bc95136eb9e6fee9d32722ebd8c1f0ab" }, - { output_script_type = "P2WPKH", output_script_value = "036adc3bdf21e6f9a0f0fb0066bf517e5b7909ed1563d6958a10993849a7554075" }, - #{ output_script_type = "P2TR", output_script_value = "036adc3bdf21e6f9a0f0fb0066bf517e5b7909ed1563d6958a10993849a7554075" }, + #{ output_script_type = "P2PK", output_script_value = "0372c47307e5b75ce365daf835f226d246c5a7a92fe24395018d5552123354f086" }, + #{ output_script_type = "P2PKH", output_script_value = "0372c47307e5b75ce365daf835f226d246c5a7a92fe24395018d5552123354f086" }, + #{ output_script_type = "P2SH", output_script_value = "00142ef89234bc95136eb9e6fee9d32722ebd8c1f0ab" }, + #{ output_script_type = "P2WSH", output_script_value = "00142ef89234bc95136eb9e6fee9d32722ebd8c1f0ab" }, + { output_script_type = "P2WPKH", output_script_value = "036adc3bdf21e6f9a0f0fb0066bf517e5b7909ed1563d6958a10993849a7554075" }, + #{ output_script_type = "P2TR", output_script_value = "036adc3bdf21e6f9a0f0fb0066bf517e5b7909ed1563d6958a10993849a7554075" }, ] # SRI Pool JD config listen_jd_address = "0.0.0.0:34264" # RPC config for mempool (it can be also the same TP if correctly configured) -core_rpc_url = "http://127.0.0.1" +core_rpc_url = "http://127.0.0.1" core_rpc_port = 18332 -core_rpc_user = "username" -core_rpc_pass = "password" +core_rpc_user = "username" +core_rpc_pass = "password" # Time interval used for JDS mempool update [mempool_update_interval] unit = "secs" diff --git a/roles/jd-server/config-examples/jds-config-local-example.toml b/roles/jd-server/config-examples/jds-config-local-example.toml index 07aabd514f..c34f33c440 100644 --- a/roles/jd-server/config-examples/jds-config-local-example.toml +++ b/roles/jd-server/config-examples/jds-config-local-example.toml @@ -7,21 +7,21 @@ cert_validity_sec = 3600 # ! Right now only one output is supported, so comment all the ones you don't need ! # For P2PK, P2PKH, P2WPKH, P2TR a public key is needed. For P2SH and P2WSH, a redeem script is needed. coinbase_outputs = [ - #{ output_script_type = "P2PK", output_script_value = "0372c47307e5b75ce365daf835f226d246c5a7a92fe24395018d5552123354f086" }, - #{ output_script_type = "P2PKH", output_script_value = "0372c47307e5b75ce365daf835f226d246c5a7a92fe24395018d5552123354f086" }, - #{ output_script_type = "P2SH", output_script_value = "00142ef89234bc95136eb9e6fee9d32722ebd8c1f0ab" }, - #{ output_script_type = "P2WSH", output_script_value = "00142ef89234bc95136eb9e6fee9d32722ebd8c1f0ab" }, - { output_script_type = "P2WPKH", output_script_value = "036adc3bdf21e6f9a0f0fb0066bf517e5b7909ed1563d6958a10993849a7554075" }, - #{ output_script_type = "P2TR", output_script_value = "036adc3bdf21e6f9a0f0fb0066bf517e5b7909ed1563d6958a10993849a7554075" }, + #{ output_script_type = "P2PK", output_script_value = "0372c47307e5b75ce365daf835f226d246c5a7a92fe24395018d5552123354f086" }, + #{ output_script_type = "P2PKH", output_script_value = "0372c47307e5b75ce365daf835f226d246c5a7a92fe24395018d5552123354f086" }, + #{ output_script_type = "P2SH", output_script_value = "00142ef89234bc95136eb9e6fee9d32722ebd8c1f0ab" }, + #{ output_script_type = "P2WSH", output_script_value = "00142ef89234bc95136eb9e6fee9d32722ebd8c1f0ab" }, + { output_script_type = "P2WPKH", output_script_value = "036adc3bdf21e6f9a0f0fb0066bf517e5b7909ed1563d6958a10993849a7554075" }, + #{ output_script_type = "P2TR", output_script_value = "036adc3bdf21e6f9a0f0fb0066bf517e5b7909ed1563d6958a10993849a7554075" }, ] # SRI Pool JD config listen_jd_address = "127.0.0.1:34264" # RPC config for mempool (it can be also the same TP if correctly configured) -core_rpc_url = "http://127.0.0.1" +core_rpc_url = "http://127.0.0.1" core_rpc_port = 18332 -core_rpc_user = "username" -core_rpc_pass = "password" +core_rpc_user = "username" +core_rpc_pass = "password" # Time interval used for JDS mempool update [mempool_update_interval] unit = "secs" diff --git a/roles/mining-proxy/Cargo.toml b/roles/mining-proxy/Cargo.toml index 951645fde3..723896ff57 100644 --- a/roles/mining-proxy/Cargo.toml +++ b/roles/mining-proxy/Cargo.toml @@ -17,16 +17,25 @@ async-channel = "1.8.0" async-recursion = "0.3.2" binary_sv2 = { version = "^1.0.0", path = "../../protocols/v2/binary-sv2/binary-sv2" } buffer_sv2 = { version = "^1.0.0", path = "../../utils/buffer" } -codec_sv2 = { version = "^1.0.1", path = "../../protocols/v2/codec-sv2", features = ["noise_sv2", "with_buffer_pool"] } +codec_sv2 = { version = "^1.0.1", path = "../../protocols/v2/codec-sv2", features = [ + "noise_sv2", + "with_buffer_pool", +] } const_sv2 = { version = "^1.0.0", path = "../../protocols/v2/const-sv2" } futures = "0.3.19" -network_helpers_sv2 = {version = "2.0.0", path = "../roles-utils/network-helpers", features = ["with_tokio","with_buffer_pool"] } +network_helpers_sv2 = { version = "2.0.0", path = "../roles-utils/network-helpers", features = [ + "with_tokio", + "with_buffer_pool", +] } once_cell = "1.12.0" roles_logic_sv2 = { version = "^1.0.0", path = "../../protocols/v2/roles-logic-sv2" } -serde = { version = "1.0.89", features = ["derive", "alloc"], default-features = false } +serde = { version = "1.0.89", features = [ + "derive", + "alloc", +], default-features = false } tokio = { version = "1", features = ["full"] } toml = { version = "0.5.6", git = "https://github.com/diondokter/toml-rs", default-features = false, rev = "c4161aa" } -tracing = {version = "0.1"} -tracing-subscriber = {version = "0.3"} +tracing = { version = "0.1" } +tracing-subscriber = { version = "0.3" } nohash-hasher = "0.2.0" key-utils = { version = "^1.0.0", path = "../../utils/key-utils" } diff --git a/roles/mining-proxy/config-examples/proxy-config-example.toml b/roles/mining-proxy/config-examples/proxy-config-example.toml index 6766f82d6c..e156a07d16 100644 --- a/roles/mining-proxy/config-examples/proxy-config-example.toml +++ b/roles/mining-proxy/config-examples/proxy-config-example.toml @@ -1,5 +1,5 @@ upstreams = [ - { channel_kind = "Extended", address = "0.0.0.0", port = 34265, pub_key = "9auqWEzQDVyd2oe1JVGFLMLHZtCo2FFqZwtKA5gd9xbuEu7PH72"} + { channel_kind = "Extended", address = "0.0.0.0", port = 34265, pub_key = "9auqWEzQDVyd2oe1JVGFLMLHZtCo2FFqZwtKA5gd9xbuEu7PH72" }, ] listen_address = "127.0.0.1" listen_mining_port = 34255 diff --git a/roles/pool/Cargo.toml b/roles/pool/Cargo.toml index 3b62c74e1e..0fe302ee67 100644 --- a/roles/pool/Cargo.toml +++ b/roles/pool/Cargo.toml @@ -15,13 +15,21 @@ stratum-common = { version = "1.0.0", path = "../../common" } async-channel = "1.5.1" binary_sv2 = { version = "^1.0.0", path = "../../protocols/v2/binary-sv2/binary-sv2" } buffer_sv2 = { version = "^1.0.0", path = "../../utils/buffer" } -codec_sv2 = { version = "^1.0.1", path = "../../protocols/v2/codec-sv2", features = ["noise_sv2"] } +codec_sv2 = { version = "^1.0.1", path = "../../protocols/v2/codec-sv2", features = [ + "noise_sv2", +] } const_sv2 = { version = "^1.0.0", path = "../../protocols/v2/const-sv2" } -network_helpers_sv2 = { version = "2.0.0", path = "../roles-utils/network-helpers", features =["with_tokio","with_buffer_pool"] } +network_helpers_sv2 = { version = "2.0.0", path = "../roles-utils/network-helpers", features = [ + "with_tokio", + "with_buffer_pool", +] } noise_sv2 = { version = "1.1.0", path = "../../protocols/v2/noise-sv2" } rand = "0.8.4" roles_logic_sv2 = { version = "^1.0.0", path = "../../protocols/v2/roles-logic-sv2" } -serde = { version = "1.0.89", features = ["derive", "alloc"], default-features = false } +serde = { version = "1.0.89", features = [ + "derive", + "alloc", +], default-features = false } tokio = { version = "1", features = ["full"] } toml = { version = "0.5.6", git = "https://github.com/diondokter/toml-rs", default-features = false, rev = "c4161aa" } tracing = { version = "0.1" } diff --git a/roles/pool/config-examples/pool-config-hosted-tp-example.toml b/roles/pool/config-examples/pool-config-hosted-tp-example.toml index 95d07e5315..39e4a46e83 100644 --- a/roles/pool/config-examples/pool-config-hosted-tp-example.toml +++ b/roles/pool/config-examples/pool-config-hosted-tp-example.toml @@ -2,19 +2,19 @@ authority_public_key = "9auqWEzQDVyd2oe1JVGFLMLHZtCo2FFqZwtKA5gd9xbuEu7PH72" authority_secret_key = "mkDLTBBRxdBv998612qipDYoTK3YUrqLe8uWw7gu3iXbSrn2n" cert_validity_sec = 3600 -test_only_listen_adress_plain = "0.0.0.0:34250" +test_only_listen_adress_plain = "0.0.0.0:34250" listen_address = "0.0.0.0:34254" # List of coinbase outputs used to build the coinbase tx # ! Right now only one output is supported, so comment all the ones you don't need ! # For P2PK, P2PKH, P2WPKH, P2TR a public key is needed. For P2SH and P2WSH, a redeem script is needed. coinbase_outputs = [ - #{ output_script_type = "P2PK", output_script_value = "0372c47307e5b75ce365daf835f226d246c5a7a92fe24395018d5552123354f086" }, - #{ output_script_type = "P2PKH", output_script_value = "0372c47307e5b75ce365daf835f226d246c5a7a92fe24395018d5552123354f086" }, - #{ output_script_type = "P2SH", output_script_value = "00142ef89234bc95136eb9e6fee9d32722ebd8c1f0ab" }, - #{ output_script_type = "P2WSH", output_script_value = "00142ef89234bc95136eb9e6fee9d32722ebd8c1f0ab" }, - { output_script_type = "P2WPKH", output_script_value = "036adc3bdf21e6f9a0f0fb0066bf517e5b7909ed1563d6958a10993849a7554075" }, - #{ output_script_type = "P2TR", output_script_value = "036adc3bdf21e6f9a0f0fb0066bf517e5b7909ed1563d6958a10993849a7554075" }, + #{ output_script_type = "P2PK", output_script_value = "0372c47307e5b75ce365daf835f226d246c5a7a92fe24395018d5552123354f086" }, + #{ output_script_type = "P2PKH", output_script_value = "0372c47307e5b75ce365daf835f226d246c5a7a92fe24395018d5552123354f086" }, + #{ output_script_type = "P2SH", output_script_value = "00142ef89234bc95136eb9e6fee9d32722ebd8c1f0ab" }, + #{ output_script_type = "P2WSH", output_script_value = "00142ef89234bc95136eb9e6fee9d32722ebd8c1f0ab" }, + { output_script_type = "P2WPKH", output_script_value = "036adc3bdf21e6f9a0f0fb0066bf517e5b7909ed1563d6958a10993849a7554075" }, + #{ output_script_type = "P2TR", output_script_value = "036adc3bdf21e6f9a0f0fb0066bf517e5b7909ed1563d6958a10993849a7554075" }, ] # Pool signature (string to be included in coinbase tx) @@ -25,4 +25,4 @@ pool_signature = "Stratum v2 SRI Pool" #tp_address = "127.0.0.1:8442" # Hosted testnet TP tp_address = "75.119.150.111:8442" -tp_authority_public_key = "9azQdassggC7L3YMVcZyRJmK7qrFDj5MZNHb4LkaUrJRUhct92W" \ No newline at end of file +tp_authority_public_key = "9azQdassggC7L3YMVcZyRJmK7qrFDj5MZNHb4LkaUrJRUhct92W" diff --git a/roles/pool/config-examples/pool-config-local-tp-example.toml b/roles/pool/config-examples/pool-config-local-tp-example.toml index edc69b3c18..046306250a 100644 --- a/roles/pool/config-examples/pool-config-local-tp-example.toml +++ b/roles/pool/config-examples/pool-config-local-tp-example.toml @@ -2,19 +2,19 @@ authority_public_key = "9auqWEzQDVyd2oe1JVGFLMLHZtCo2FFqZwtKA5gd9xbuEu7PH72" authority_secret_key = "mkDLTBBRxdBv998612qipDYoTK3YUrqLe8uWw7gu3iXbSrn2n" cert_validity_sec = 3600 -test_only_listen_adress_plain = "0.0.0.0:34250" +test_only_listen_adress_plain = "0.0.0.0:34250" listen_address = "0.0.0.0:34254" # List of coinbase outputs used to build the coinbase tx # ! Right now only one output is supported, so comment all the ones you don't need ! # For P2PK, P2PKH, P2WPKH, P2TR a public key is needed. For P2SH and P2WSH, a redeem script is needed. coinbase_outputs = [ - #{ output_script_type = "P2PK", output_script_value = "0372c47307e5b75ce365daf835f226d246c5a7a92fe24395018d5552123354f086" }, - #{ output_script_type = "P2PKH", output_script_value = "0372c47307e5b75ce365daf835f226d246c5a7a92fe24395018d5552123354f086" }, - #{ output_script_type = "P2SH", output_script_value = "00142ef89234bc95136eb9e6fee9d32722ebd8c1f0ab" }, - #{ output_script_type = "P2WSH", output_script_value = "00142ef89234bc95136eb9e6fee9d32722ebd8c1f0ab" }, - { output_script_type = "P2WPKH", output_script_value = "036adc3bdf21e6f9a0f0fb0066bf517e5b7909ed1563d6958a10993849a7554075" }, - #{ output_script_type = "P2TR", output_script_value = "036adc3bdf21e6f9a0f0fb0066bf517e5b7909ed1563d6958a10993849a7554075" }, + #{ output_script_type = "P2PK", output_script_value = "0372c47307e5b75ce365daf835f226d246c5a7a92fe24395018d5552123354f086" }, + #{ output_script_type = "P2PKH", output_script_value = "0372c47307e5b75ce365daf835f226d246c5a7a92fe24395018d5552123354f086" }, + #{ output_script_type = "P2SH", output_script_value = "00142ef89234bc95136eb9e6fee9d32722ebd8c1f0ab" }, + #{ output_script_type = "P2WSH", output_script_value = "00142ef89234bc95136eb9e6fee9d32722ebd8c1f0ab" }, + { output_script_type = "P2WPKH", output_script_value = "036adc3bdf21e6f9a0f0fb0066bf517e5b7909ed1563d6958a10993849a7554075" }, + #{ output_script_type = "P2TR", output_script_value = "036adc3bdf21e6f9a0f0fb0066bf517e5b7909ed1563d6958a10993849a7554075" }, ] # Pool signature (string to be included in coinbase tx) diff --git a/roles/roles-utils/network-helpers/Cargo.toml b/roles/roles-utils/network-helpers/Cargo.toml index e2c69806a3..becfa05f72 100644 --- a/roles/roles-utils/network-helpers/Cargo.toml +++ b/roles/roles-utils/network-helpers/Cargo.toml @@ -14,9 +14,13 @@ async-std = { version = "1.8.0", optional = true } async-channel = { version = "1.8.0", optional = true } tokio = { version = "1", features = ["full"], optional = true } binary_sv2 = { version = "^1.0.0", path = "../../../protocols/v2/binary-sv2/binary-sv2", optional = true } -codec_sv2 = { version = "1.0.1", path = "../../../protocols/v2/codec-sv2", features=["noise_sv2"], optional = true } -const_sv2 = {version = "1.0.0", path = "../../../protocols/v2/const-sv2"} -serde = { version = "1.0.89", features = ["derive"], default-features = false, optional = true } +codec_sv2 = { version = "1.0.1", path = "../../../protocols/v2/codec-sv2", features = [ + "noise_sv2", +], optional = true } +const_sv2 = { version = "1.0.0", path = "../../../protocols/v2/const-sv2" } +serde = { version = "1.0.89", features = [ + "derive", +], default-features = false, optional = true } tracing = { version = "0.1" } futures = "0.3.28" diff --git a/roles/roles-utils/rpc/Cargo.toml b/roles/roles-utils/rpc/Cargo.toml index 6ae6e05527..462a1da8ce 100644 --- a/roles/roles-utils/rpc/Cargo.toml +++ b/roles/roles-utils/rpc/Cargo.toml @@ -8,9 +8,17 @@ license = "MIT OR Apache-2.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -stratum-common = { version = "1.0.0", path = "../../../common", features=["bitcoin"] } -serde = { version = "1.0.89", features = ["derive", "alloc"], default-features = false } -serde_json = { version = "1.0", default-features = false, features = ["alloc","raw_value"] } +stratum-common = { version = "1.0.0", path = "../../../common", features = [ + "bitcoin", +] } +serde = { version = "1.0.89", features = [ + "derive", + "alloc", +], default-features = false } +serde_json = { version = "1.0", default-features = false, features = [ + "alloc", + "raw_value", +] } hex = "0.4.3" base64 = "0.21.5" hyper = { version = "1.1.0", features = ["full"] } diff --git a/roles/tarpaulin.toml b/roles/tarpaulin.toml index 2714d685da..b709ff48e2 100644 --- a/roles/tarpaulin.toml +++ b/roles/tarpaulin.toml @@ -1,6 +1,6 @@ [default] features = "with_buffer_pool async_std tokio with_tokio default" -run-types = [ "Lib" ] +run-types = ["Lib"] timeout = "120s" fail-under = 20 diff --git a/roles/test-utils/mining-device/Cargo.toml b/roles/test-utils/mining-device/Cargo.toml index 4ce6c5037a..50dcf4551a 100644 --- a/roles/test-utils/mining-device/Cargo.toml +++ b/roles/test-utils/mining-device/Cargo.toml @@ -8,14 +8,18 @@ publish = false [dependencies] stratum-common = { version = "1.0.0", path = "../../../common" } -codec_sv2 = { version = "^1.0.1", path = "../../../protocols/v2/codec-sv2", features=["noise_sv2"] } +codec_sv2 = { version = "^1.0.1", path = "../../../protocols/v2/codec-sv2", features = [ + "noise_sv2", +] } roles_logic_sv2 = { version = "1.0.0", path = "../../../protocols/v2/roles-logic-sv2" } const_sv2 = { version = "1.0.0", path = "../../../protocols/v2/const-sv2" } async-channel = "1.5.1" -async-std={version = "1.8.0", features = ["attributes"]} +async-std = { version = "1.8.0", features = ["attributes"] } binary_sv2 = { version = "1.0.0", path = "../../../protocols/v2/binary-sv2/binary-sv2" } -network_helpers_sv2 = { version = "2.0.0", path = "../../roles-utils/network-helpers", features=["async_std"] } -buffer_sv2 = { version = "1.0.0", path = "../../../utils/buffer"} +network_helpers_sv2 = { version = "2.0.0", path = "../../roles-utils/network-helpers", features = [ + "async_std", +] } +buffer_sv2 = { version = "1.0.0", path = "../../../utils/buffer" } async-recursion = "0.3.2" rand = "0.8.4" futures = "0.3.5" diff --git a/roles/test-utils/sv1-mining-device/Cargo.toml b/roles/test-utils/sv1-mining-device/Cargo.toml index 55b990c633..82a7b3158c 100644 --- a/roles/test-utils/sv1-mining-device/Cargo.toml +++ b/roles/test-utils/sv1-mining-device/Cargo.toml @@ -11,8 +11,13 @@ stratum-common = { path = "../../../common" } async-channel = "1.5.1" async-std = { version = "1.8.0", features = ["attributes"] } roles_logic_sv2 = { path = "../../../protocols/v2/roles-logic-sv2" } -serde = { version = "1.0.89", default-features = false, features = ["derive", "alloc"] } -serde_json = { version = "1.0.64", default-features = false, features = ["alloc"] } -v1 = { path="../../../protocols/v1", package="sv1_api" } +serde = { version = "1.0.89", default-features = false, features = [ + "derive", + "alloc", +] } +serde_json = { version = "1.0.64", default-features = false, features = [ + "alloc", +] } +v1 = { path = "../../../protocols/v1", package = "sv1_api" } num-bigint = "0.4.3" num-traits = "0.2.15" diff --git a/roles/translator/Cargo.toml b/roles/translator/Cargo.toml index bdba3cf117..086fe1b7d7 100644 --- a/roles/translator/Cargo.toml +++ b/roles/translator/Cargo.toml @@ -17,26 +17,36 @@ async-recursion = "0.3.2" async-std = { version = "1.12.0", features = ["attributes"] } binary_sv2 = { version = "^1.0.0", path = "../../protocols/v2/binary-sv2/binary-sv2" } buffer_sv2 = { version = "^1.0.0", path = "../../utils/buffer" } -codec_sv2 = { version = "^1.0.1", path = "../../protocols/v2/codec-sv2", features = ["noise_sv2", "with_buffer_pool"] } +codec_sv2 = { version = "^1.0.1", path = "../../protocols/v2/codec-sv2", features = [ + "noise_sv2", + "with_buffer_pool", +] } framing_sv2 = { version = "^1.0.0", path = "../../protocols/v2/framing-sv2" } -network_helpers_sv2 = { version = "2.0.0", path = "../roles-utils/network-helpers", features=["async_std", "with_buffer_pool"] } +network_helpers_sv2 = { version = "2.0.0", path = "../roles-utils/network-helpers", features = [ + "async_std", + "with_buffer_pool", +] } once_cell = "1.12.0" roles_logic_sv2 = { version = "^1.0.0", path = "../../protocols/v2/roles-logic-sv2" } -serde = { version = "1.0.89", default-features = false, features = ["derive", "alloc"] } -serde_json = { version = "1.0.64", default-features = false, features = ["alloc"] } +serde = { version = "1.0.89", default-features = false, features = [ + "derive", + "alloc", +] } +serde_json = { version = "1.0.64", default-features = false, features = [ + "alloc", +] } futures = "0.3.25" tokio = { version = "1", features = ["full"] } toml = { version = "0.5.6", git = "https://github.com/diondokter/toml-rs", default-features = false, rev = "c4161aa" } tracing = { version = "0.1" } tracing-subscriber = { version = "0.3" } -v1 = { version = "^1.0.0", path = "../../protocols/v1", package="sv1_api" } +v1 = { version = "^1.0.0", path = "../../protocols/v1", package = "sv1_api" } error_handling = { version = "1.0.0", path = "../../utils/error-handling" } key-utils = { version = "^1.0.0", path = "../../utils/key-utils" } tokio-util = { version = "0.7.10", features = ["codec"] } async-compat = "0.2.1" - [dev-dependencies] rand = "0.8.4" sha2 = "0.10.6" diff --git a/roles/translator/config-examples/tproxy-config-hosted-pool-example.toml b/roles/translator/config-examples/tproxy-config-hosted-pool-example.toml index 47d4ea8758..0cfa1b1e14 100644 --- a/roles/translator/config-examples/tproxy-config-hosted-pool-example.toml +++ b/roles/translator/config-examples/tproxy-config-hosted-pool-example.toml @@ -25,7 +25,7 @@ min_extranonce2_size = 8 # Difficulty params [downstream_difficulty_config] # hashes/s of the weakest miner that will be connecting (e.g.: 10 Th/s = 10_000_000_000_000.0) -min_individual_miner_hashrate=10_000_000_000_000.0 +min_individual_miner_hashrate = 10_000_000_000_000.0 # target number of shares per minute the miner should be sending shares_per_minute = 6.0 diff --git a/roles/translator/config-examples/tproxy-config-local-jdc-example.toml b/roles/translator/config-examples/tproxy-config-local-jdc-example.toml index 5fe4a8eebd..a65d305fc9 100644 --- a/roles/translator/config-examples/tproxy-config-local-jdc-example.toml +++ b/roles/translator/config-examples/tproxy-config-local-jdc-example.toml @@ -25,7 +25,7 @@ min_extranonce2_size = 8 # Difficulty params [downstream_difficulty_config] # hashes/s of the weakest miner that will be connecting (e.g.: 10 Th/s = 10_000_000_000_000.0) -min_individual_miner_hashrate=10_000_000_000_000.0 +min_individual_miner_hashrate = 10_000_000_000_000.0 # target number of shares per minute the miner should be sending shares_per_minute = 6.0 diff --git a/roles/translator/config-examples/tproxy-config-local-pool-example.toml b/roles/translator/config-examples/tproxy-config-local-pool-example.toml index b4359d5ab4..7a8b2d3037 100644 --- a/roles/translator/config-examples/tproxy-config-local-pool-example.toml +++ b/roles/translator/config-examples/tproxy-config-local-pool-example.toml @@ -25,7 +25,7 @@ min_extranonce2_size = 8 # Difficulty params [downstream_difficulty_config] # hashes/s of the weakest miner that will be connecting (e.g.: 10 Th/s = 10_000_000_000_000.0) -min_individual_miner_hashrate=10_000_000_000_000.0 +min_individual_miner_hashrate = 10_000_000_000_000.0 # target number of shares per minute the miner should be sending shares_per_minute = 6.0 diff --git a/rust-toolchain.toml b/rust-toolchain.toml index ecc22580bd..3ae87dd641 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,4 +1,4 @@ [toolchain] channel = "1.75.0" -components = [ "rustfmt", "clippy" ] +components = ["rustfmt", "clippy"] profile = "minimal" diff --git a/test/config/interop-jd-change-upstream/jdc-config.toml b/test/config/interop-jd-change-upstream/jdc-config.toml index c03b36e5f5..28eda7eb61 100644 --- a/test/config/interop-jd-change-upstream/jdc-config.toml +++ b/test/config/interop-jd-change-upstream/jdc-config.toml @@ -27,9 +27,8 @@ tp_address = "75.119.150.111:8442" tp_authority_pub_key = "9auqWEzQDVyd2oe1JVGFLMLHZtCo2FFqZwtKA5gd9xbuEu7PH72" - coinbase_outputs = [ - { output_script_type = "P2WPKH", output_script_value = "036adc3bdf21e6f9a0f0fb0066bf517e5b7909ed1563d6958a10993849a7554075" }, + { output_script_type = "P2WPKH", output_script_value = "036adc3bdf21e6f9a0f0fb0066bf517e5b7909ed1563d6958a10993849a7554075" }, ] [timeout] diff --git a/test/config/interop-jd-change-upstream/jds-config.toml b/test/config/interop-jd-change-upstream/jds-config.toml index acda73227c..355d2165e2 100644 --- a/test/config/interop-jd-change-upstream/jds-config.toml +++ b/test/config/interop-jd-change-upstream/jds-config.toml @@ -5,16 +5,16 @@ cert_validity_sec = 3600 # list of compressed or uncompressed pubkeys for coinbase payout (only supports 1 item in the array at this point) coinbase_outputs = [ - { output_script_type = "P2WPKH", output_script_value = "036adc3bdf21e6f9a0f0fb0066bf517e5b7909ed1563d6958a10993849a7554075" }, + { output_script_type = "P2WPKH", output_script_value = "036adc3bdf21e6f9a0f0fb0066bf517e5b7909ed1563d6958a10993849a7554075" }, ] listen_jd_address = "127.0.0.1:34264" -core_rpc_url = "" +core_rpc_url = "" core_rpc_port = 18332 -core_rpc_user = "" -core_rpc_pass = "" +core_rpc_user = "" +core_rpc_pass = "" # Time interval used for JDS mempool update [mempool_update_interval] unit = "secs" -value = 1 \ No newline at end of file +value = 1 diff --git a/test/config/interop-jd-change-upstream/proxy-config.toml b/test/config/interop-jd-change-upstream/proxy-config.toml index 3ed024c137..1486ef5adb 100644 --- a/test/config/interop-jd-change-upstream/proxy-config.toml +++ b/test/config/interop-jd-change-upstream/proxy-config.toml @@ -1,5 +1,5 @@ upstreams = [ - { channel_kind = "Extended", address = "127.0.0.1", port = 34265, pub_key = "9auqWEzQDVyd2oe1JVGFLMLHZtCo2FFqZwtKA5gd9xbuEu7PH72"}, + { channel_kind = "Extended", address = "127.0.0.1", port = 34265, pub_key = "9auqWEzQDVyd2oe1JVGFLMLHZtCo2FFqZwtKA5gd9xbuEu7PH72" }, ] listen_address = "127.0.0.1" listen_mining_port = 34255 diff --git a/test/config/interop-jd-translator/jdc-config.toml b/test/config/interop-jd-translator/jdc-config.toml index b718f482bf..40b35f3667 100644 --- a/test/config/interop-jd-translator/jdc-config.toml +++ b/test/config/interop-jd-translator/jdc-config.toml @@ -36,12 +36,12 @@ tp_authority_pub_key = "9auqWEzQDVyd2oe1JVGFLMLHZtCo2FFqZwtKA5gd9xbuEu7PH72" # ! Right now only one output is supported, so comment all the ones you don't need ! # For P2PK, P2PKH, P2WPKH, P2TR a BIP32 extended public key is needed coinbase_outputs = [ - #{ output_script_type = "P2PK", output_script_value = "vpub5XzEwP9YWe4cKKZAmbiBUxC7eL5HaZhbquBYzP3vDSDJJegb7CSCRphAPmwpGHzAyH1as9MRnXFWDcZozXA1K3sQqyKdTagooPfCVDhiwnr" }, - #{ output_script_type = "P2PKH", output_script_value = "vpub5XzEwP9YWe4cKKZAmbiBUxC7eL5HaZhbquBYzP3vDSDJJegb7CSCRphAPmwpGHzAyH1as9MRnXFWDcZozXA1K3sQqyKdTagooPfCVDhiwnr" }, - #{ output_script_type = "P2SH", output_script_value = "..." }, - #{ output_script_type = "P2WSH", output_script_value = "..." }, - { output_script_type = "P2WPKH", output_script_value = "036adc3bdf21e6f9a0f0fb0066bf517e5b7909ed1563d6958a10993849a7554075" }, - #{ output_script_type = "P2TR", output_script_value = "vpub5XzEwP9YWe4cKKZAmbiBUxC7eL5HaZhbquBYzP3vDSDJJegb7CSCRphAPmwpGHzAyH1as9MRnXFWDcZozXA1K3sQqyKdTagooPfCVDhiwnr" }, + #{ output_script_type = "P2PK", output_script_value = "vpub5XzEwP9YWe4cKKZAmbiBUxC7eL5HaZhbquBYzP3vDSDJJegb7CSCRphAPmwpGHzAyH1as9MRnXFWDcZozXA1K3sQqyKdTagooPfCVDhiwnr" }, + #{ output_script_type = "P2PKH", output_script_value = "vpub5XzEwP9YWe4cKKZAmbiBUxC7eL5HaZhbquBYzP3vDSDJJegb7CSCRphAPmwpGHzAyH1as9MRnXFWDcZozXA1K3sQqyKdTagooPfCVDhiwnr" }, + #{ output_script_type = "P2SH", output_script_value = "..." }, + #{ output_script_type = "P2WSH", output_script_value = "..." }, + { output_script_type = "P2WPKH", output_script_value = "036adc3bdf21e6f9a0f0fb0066bf517e5b7909ed1563d6958a10993849a7554075" }, + #{ output_script_type = "P2TR", output_script_value = "vpub5XzEwP9YWe4cKKZAmbiBUxC7eL5HaZhbquBYzP3vDSDJJegb7CSCRphAPmwpGHzAyH1as9MRnXFWDcZozXA1K3sQqyKdTagooPfCVDhiwnr" }, ] [timeout] @@ -56,7 +56,7 @@ pool_address = "127.0.0.1:34254" jd_address = "127.0.0.1:34264" # Pool signature (string to be included in coinbase tx) pool_signature = "Stratum v2 SRI Pool" - + # [[upstreams]] # authority_pubkey = "2di19GHYQnAZJmEpoUeP7C3Eg9TCcksHr23rZCC83dvUiZgiDL" # pool_address = "127.0.0.1:34254" diff --git a/test/config/interop-jd-translator/jds-config.toml b/test/config/interop-jd-translator/jds-config.toml index acda73227c..355d2165e2 100644 --- a/test/config/interop-jd-translator/jds-config.toml +++ b/test/config/interop-jd-translator/jds-config.toml @@ -5,16 +5,16 @@ cert_validity_sec = 3600 # list of compressed or uncompressed pubkeys for coinbase payout (only supports 1 item in the array at this point) coinbase_outputs = [ - { output_script_type = "P2WPKH", output_script_value = "036adc3bdf21e6f9a0f0fb0066bf517e5b7909ed1563d6958a10993849a7554075" }, + { output_script_type = "P2WPKH", output_script_value = "036adc3bdf21e6f9a0f0fb0066bf517e5b7909ed1563d6958a10993849a7554075" }, ] listen_jd_address = "127.0.0.1:34264" -core_rpc_url = "" +core_rpc_url = "" core_rpc_port = 18332 -core_rpc_user = "" -core_rpc_pass = "" +core_rpc_user = "" +core_rpc_pass = "" # Time interval used for JDS mempool update [mempool_update_interval] unit = "secs" -value = 1 \ No newline at end of file +value = 1 diff --git a/test/config/interop-jd-translator/pool-config.toml b/test/config/interop-jd-translator/pool-config.toml index 9de7b11b12..e118005a91 100644 --- a/test/config/interop-jd-translator/pool-config.toml +++ b/test/config/interop-jd-translator/pool-config.toml @@ -2,17 +2,17 @@ authority_public_key = "9auqWEzQDVyd2oe1JVGFLMLHZtCo2FFqZwtKA5gd9xbuEu7PH72" authority_secret_key = "mkDLTBBRxdBv998612qipDYoTK3YUrqLe8uWw7gu3iXbSrn2n" cert_validity_sec = 3600 -test_only_listen_adress_plain = "0.0.0.0:34250" +test_only_listen_adress_plain = "0.0.0.0:34250" listen_address = "0.0.0.0:34254" # list of coinbase outputs used to build the coinbase tx # ! right now only one output is supported, so comment all the ones you don't need ! coinbase_outputs = [ - #{ output_script_type = "P2PK", output_script_value = "02e13cef1348924c49dd1f708bf38eb79ae4648c16f0301085f37547d1d25e33e0" }, - { output_script_type = "P2WPKH", output_script_value = "036adc3bdf21e6f9a0f0fb0066bf517e5b7909ed1563d6958a10993849a7554075" }, - #{ output_script_type = "P2SH", output_script_value = "..." }, - #{ output_script_type = "P2WSH", output_script_value = "..." }, - #{ output_script_type = "P2WPKH", output_script_value = "02e13cef1348924c49dd1f708bf38eb79ae4648c16f0301085f37547d1d25e33e0" }, - #{ output_script_type = "P2TR", output_script_value = "02e13cef1348924c49dd1f708bf38eb79ae4648c16f0301085f37547d1d25e33e0" }, + #{ output_script_type = "P2PK", output_script_value = "02e13cef1348924c49dd1f708bf38eb79ae4648c16f0301085f37547d1d25e33e0" }, + { output_script_type = "P2WPKH", output_script_value = "036adc3bdf21e6f9a0f0fb0066bf517e5b7909ed1563d6958a10993849a7554075" }, + #{ output_script_type = "P2SH", output_script_value = "..." }, + #{ output_script_type = "P2WSH", output_script_value = "..." }, + #{ output_script_type = "P2WPKH", output_script_value = "02e13cef1348924c49dd1f708bf38eb79ae4648c16f0301085f37547d1d25e33e0" }, + #{ output_script_type = "P2TR", output_script_value = "02e13cef1348924c49dd1f708bf38eb79ae4648c16f0301085f37547d1d25e33e0" }, ] # Pool signature (string to be included in coinbase tx) # e.g. "Foundry USA", "Antpool", "/ViaBTC/Mined by gitgab19", etc diff --git a/test/config/interop-jd-translator/proxy-config.toml b/test/config/interop-jd-translator/proxy-config.toml index c0e13e0dea..88f07d128b 100644 --- a/test/config/interop-jd-translator/proxy-config.toml +++ b/test/config/interop-jd-translator/proxy-config.toml @@ -21,9 +21,9 @@ coinbase_reward_sat = 5_000_000_000 # Difficulty params [downstream_difficulty_config] # hashes/s of the weakest miner that will be connecting -min_individual_miner_hashrate=500_000.0 +min_individual_miner_hashrate = 500_000.0 # minimum number of shares needed before a mining.set_difficulty is sent for updating targets -miner_num_submits_before_update=5 +miner_num_submits_before_update = 5 # target number of shares per minute the miner should be sending shares_per_minute = 60.0 @@ -31,4 +31,4 @@ shares_per_minute = 60.0 # interval in seconds to elapse before updating channel hashrate with the pool channel_diff_update_interval = 6 # estimated accumulated hashrate of all downstream miners -channel_nominal_hashrate = 500_000.0 \ No newline at end of file +channel_nominal_hashrate = 500_000.0 diff --git a/test/config/jds-do-not-fail-on-wrong-txdatasucc/jds-config.toml b/test/config/jds-do-not-fail-on-wrong-txdatasucc/jds-config.toml index acda73227c..355d2165e2 100644 --- a/test/config/jds-do-not-fail-on-wrong-txdatasucc/jds-config.toml +++ b/test/config/jds-do-not-fail-on-wrong-txdatasucc/jds-config.toml @@ -5,16 +5,16 @@ cert_validity_sec = 3600 # list of compressed or uncompressed pubkeys for coinbase payout (only supports 1 item in the array at this point) coinbase_outputs = [ - { output_script_type = "P2WPKH", output_script_value = "036adc3bdf21e6f9a0f0fb0066bf517e5b7909ed1563d6958a10993849a7554075" }, + { output_script_type = "P2WPKH", output_script_value = "036adc3bdf21e6f9a0f0fb0066bf517e5b7909ed1563d6958a10993849a7554075" }, ] listen_jd_address = "127.0.0.1:34264" -core_rpc_url = "" +core_rpc_url = "" core_rpc_port = 18332 -core_rpc_user = "" -core_rpc_pass = "" +core_rpc_user = "" +core_rpc_pass = "" # Time interval used for JDS mempool update [mempool_update_interval] unit = "secs" -value = 1 \ No newline at end of file +value = 1 diff --git a/test/config/jds-do-not-panic-if-jdc-close-connection/jds-config.toml b/test/config/jds-do-not-panic-if-jdc-close-connection/jds-config.toml index acda73227c..355d2165e2 100644 --- a/test/config/jds-do-not-panic-if-jdc-close-connection/jds-config.toml +++ b/test/config/jds-do-not-panic-if-jdc-close-connection/jds-config.toml @@ -5,16 +5,16 @@ cert_validity_sec = 3600 # list of compressed or uncompressed pubkeys for coinbase payout (only supports 1 item in the array at this point) coinbase_outputs = [ - { output_script_type = "P2WPKH", output_script_value = "036adc3bdf21e6f9a0f0fb0066bf517e5b7909ed1563d6958a10993849a7554075" }, + { output_script_type = "P2WPKH", output_script_value = "036adc3bdf21e6f9a0f0fb0066bf517e5b7909ed1563d6958a10993849a7554075" }, ] listen_jd_address = "127.0.0.1:34264" -core_rpc_url = "" +core_rpc_url = "" core_rpc_port = 18332 -core_rpc_user = "" -core_rpc_pass = "" +core_rpc_user = "" +core_rpc_pass = "" # Time interval used for JDS mempool update [mempool_update_interval] unit = "secs" -value = 1 \ No newline at end of file +value = 1 diff --git a/test/config/jds-stack-overflow/jdc-config.toml b/test/config/jds-stack-overflow/jdc-config.toml index dc637b6e38..ef424d266b 100644 --- a/test/config/jds-stack-overflow/jdc-config.toml +++ b/test/config/jds-stack-overflow/jdc-config.toml @@ -18,7 +18,7 @@ tp_address = "75.119.150.111:8442" tp_authority_pub_key = "9auqWEzQDVyd2oe1JVGFLMLHZtCo2FFqZwtKA5gd9xbuEu7PH72" coinbase_outputs = [ - { output_script_type = "P2WPKH", output_script_value = "036adc3bdf21e6f9a0f0fb0066bf517e5b7909ed1563d6958a10993849a7554075" }, + { output_script_type = "P2WPKH", output_script_value = "036adc3bdf21e6f9a0f0fb0066bf517e5b7909ed1563d6958a10993849a7554075" }, ] [timeout] diff --git a/test/config/jds-stack-overflow/mining-proxy-config.toml b/test/config/jds-stack-overflow/mining-proxy-config.toml index e69c0a57e9..9ceed9ba91 100644 --- a/test/config/jds-stack-overflow/mining-proxy-config.toml +++ b/test/config/jds-stack-overflow/mining-proxy-config.toml @@ -1,5 +1,5 @@ upstreams = [ - { channel_kind = "Extended", address = "127.0.0.1", port = 34265, pub_key = "9auqWEzQDVyd2oe1JVGFLMLHZtCo2FFqZwtKA5gd9xbuEu7PH72"}, + { channel_kind = "Extended", address = "127.0.0.1", port = 34265, pub_key = "9auqWEzQDVyd2oe1JVGFLMLHZtCo2FFqZwtKA5gd9xbuEu7PH72" }, ] listen_address = "127.0.0.1" listen_mining_port = 34255 diff --git a/test/config/jds-stack-overflow/pool-config.toml b/test/config/jds-stack-overflow/pool-config.toml index 474fa7068c..d29c21c4ac 100644 --- a/test/config/jds-stack-overflow/pool-config.toml +++ b/test/config/jds-stack-overflow/pool-config.toml @@ -3,11 +3,11 @@ tp_address = "75.119.150.111:8442" authority_public_key = "9auqWEzQDVyd2oe1JVGFLMLHZtCo2FFqZwtKA5gd9xbuEu7PH72" authority_secret_key = "mkDLTBBRxdBv998612qipDYoTK3YUrqLe8uWw7gu3iXbSrn2n" cert_validity_sec = 3600 -test_only_listen_adress_plain = "0.0.0.0:34250" +test_only_listen_adress_plain = "0.0.0.0:34250" # list of coinbase outputs used to build the coinbase tx # ! right now only one output is supported, so comment all the ones you don't need ! coinbase_outputs = [ - { output_script_type = "P2WPKH", output_script_value = "036adc3bdf21e6f9a0f0fb0066bf517e5b7909ed1563d6958a10993849a7554075" }, + { output_script_type = "P2WPKH", output_script_value = "036adc3bdf21e6f9a0f0fb0066bf517e5b7909ed1563d6958a10993849a7554075" }, ] # Pool signature (string to be included in coinbase tx) pool_signature = "Stratum v2 SRI Pool" diff --git a/test/config/pool-config-sri-tp-different-port.toml b/test/config/pool-config-sri-tp-different-port.toml index 73647c81ab..9d432e2121 100644 --- a/test/config/pool-config-sri-tp-different-port.toml +++ b/test/config/pool-config-sri-tp-different-port.toml @@ -4,11 +4,11 @@ listen_jd_address = "127.0.0.1:44264" authority_public_key = "9auqWEzQDVyd2oe1JVGFLMLHZtCo2FFqZwtKA5gd9xbuEu7PH72" authority_secret_key = "mkDLTBBRxdBv998612qipDYoTK3YUrqLe8uWw7gu3iXbSrn2n" cert_validity_sec = 3600 -test_only_listen_adress_plain = "0.0.0.0:34250" +test_only_listen_adress_plain = "0.0.0.0:34250" # list of coinbase outputs used to build the coinbase tx # ! right now only one output is supported, so comment all the ones you don't need ! coinbase_outputs = [ - { output_script_type = "P2WPKH", output_script_value = "036adc3bdf21e6f9a0f0fb0066bf517e5b7909ed1563d6958a10993849a7554075" }, + { output_script_type = "P2WPKH", output_script_value = "036adc3bdf21e6f9a0f0fb0066bf517e5b7909ed1563d6958a10993849a7554075" }, ] # Pool signature (string to be included in coinbase tx) pool_signature = "Stratum v2 SRI Pool" diff --git a/test/config/pool-config-sri-tp.toml b/test/config/pool-config-sri-tp.toml index 3d7c18baf7..1230ed4d75 100644 --- a/test/config/pool-config-sri-tp.toml +++ b/test/config/pool-config-sri-tp.toml @@ -4,11 +4,11 @@ listen_jd_address = "127.0.0.1:34264" authority_public_key = "9auqWEzQDVyd2oe1JVGFLMLHZtCo2FFqZwtKA5gd9xbuEu7PH72" authority_secret_key = "mkDLTBBRxdBv998612qipDYoTK3YUrqLe8uWw7gu3iXbSrn2n" cert_validity_sec = 3600 -test_only_listen_adress_plain = "0.0.0.0:34250" +test_only_listen_adress_plain = "0.0.0.0:34250" # list of coinbase outputs used to build the coinbase tx # ! right now only one output is supported, so comment all the ones you don't need ! coinbase_outputs = [ - { output_script_type = "P2WPKH", output_script_value = "036adc3bdf21e6f9a0f0fb0066bf517e5b7909ed1563d6958a10993849a7554075" }, + { output_script_type = "P2WPKH", output_script_value = "036adc3bdf21e6f9a0f0fb0066bf517e5b7909ed1563d6958a10993849a7554075" }, ] # Pool signature (string to be included in coinbase tx) -pool_signature = "Stratum v2 SRI Pool" \ No newline at end of file +pool_signature = "Stratum v2 SRI Pool" diff --git a/test/config/pool-mock-tp-bad-coinbase.toml b/test/config/pool-mock-tp-bad-coinbase.toml index 36c6b466b1..c735c7f327 100644 --- a/test/config/pool-mock-tp-bad-coinbase.toml +++ b/test/config/pool-mock-tp-bad-coinbase.toml @@ -5,11 +5,11 @@ listen_jd_address = "127.0.0.1:34264" authority_public_key = "9auqWEzQDVyd2oe1JVGFLMLHZtCo2FFqZwtKA5gd9xbuEu7PH72" authority_secret_key = "mkDLTBBRxdBv998612qipDYoTK3YUrqLe8uWw7gu3iXbSrn2n" cert_validity_sec = 3600 -test_only_listen_adress_plain = "0.0.0.0:34250" +test_only_listen_adress_plain = "0.0.0.0:34250" # list of coinbase outputs used to build the coinbase tx # ! right now only one output is supported, so comment all the ones you don't need ! coinbase_outputs = [ - { output_script_type = "P2PK", output_script_value = "04466d7fcae563e5cb09a0d1870bb580344804617879a14949cf22285f1bae3f276728176c3c6431f8eeda4538dc37c865e2784f3a9e77d044f33e407797e1278" }, + { output_script_type = "P2PK", output_script_value = "04466d7fcae563e5cb09a0d1870bb580344804617879a14949cf22285f1bae3f276728176c3c6431f8eeda4538dc37c865e2784f3a9e77d044f33e407797e1278" }, ] # Pool signature (string to be included in coinbase tx) pool_signature = "Stratum v2 SRI Pool" diff --git a/test/config/pool-mock-tp-bad-config.toml b/test/config/pool-mock-tp-bad-config.toml index d0dd8694ab..178664f17d 100644 --- a/test/config/pool-mock-tp-bad-config.toml +++ b/test/config/pool-mock-tp-bad-config.toml @@ -9,16 +9,16 @@ listen_jd_address = "127.0.0.1:34264" authority_public_key = "9auqWEzQDVyd2oe1JVGFLMLHZtCo2FFqZwtKA5gd9xbuEu7PH72" authority_secret_key = "mkDLTBBRxdBv998612qipDYoTK3YUrqLe8uWw7gu3iXbSrn2n" cert_validity_sec = 3600 -test_only_listen_adress_plain = "0.0.0.0:34250" +test_only_listen_adress_plain = "0.0.0.0:34250" # list of coinbase outputs used to build the coinbase tx # ! right now only one output is supported, so comment all the ones you don't need ! coinbase_outputs = [ - #{ output_script_type = "P2PK", output_script_value = "02e13cef1348924c49dd1f708bf38eb79ae4648c16f0301085f37547d1d25e33e0" }, - { output_script_type = "P2WPKH", output_script_value = "036adc3bdf21e6f9a0f0fb0066bf517e5b7909ed1563d6958a10993849a7554075" }, - #{ output_script_type = "P2SH", output_script_value = "..." }, - #{ output_script_type = "P2WSH", output_script_value = "..." }, - #{ output_script_type = "P2WPKH", output_script_value = "02e13cef1348924c49dd1f708bf38eb79ae4648c16f0301085f37547d1d25e33e0" }, - #{ output_script_type = "P2TR", output_script_value = "02e13cef1348924c49dd1f708bf38eb79ae4648c16f0301085f37547d1d25e33e0" }, + #{ output_script_type = "P2PK", output_script_value = "02e13cef1348924c49dd1f708bf38eb79ae4648c16f0301085f37547d1d25e33e0" }, + { output_script_type = "P2WPKH", output_script_value = "036adc3bdf21e6f9a0f0fb0066bf517e5b7909ed1563d6958a10993849a7554075" }, + #{ output_script_type = "P2SH", output_script_value = "..." }, + #{ output_script_type = "P2WSH", output_script_value = "..." }, + #{ output_script_type = "P2WPKH", output_script_value = "02e13cef1348924c49dd1f708bf38eb79ae4648c16f0301085f37547d1d25e33e0" }, + #{ output_script_type = "P2TR", output_script_value = "02e13cef1348924c49dd1f708bf38eb79ae4648c16f0301085f37547d1d25e33e0" }, ] # Pool signature (string to be included in coinbase tx) pool_signature = "Stratum v2 SRI Pool" diff --git a/test/config/pool-mock-tp-standard-coverage.toml b/test/config/pool-mock-tp-standard-coverage.toml index 181981c3ff..d1f75a2b5f 100644 --- a/test/config/pool-mock-tp-standard-coverage.toml +++ b/test/config/pool-mock-tp-standard-coverage.toml @@ -5,11 +5,11 @@ listen_jd_address = "127.0.0.1:34264" authority_public_key = "9auqWEzQDVyd2oe1JVGFLMLHZtCo2FFqZwtKA5gd9xbuEu7PH72" authority_secret_key = "mkDLTBBRxdBv998612qipDYoTK3YUrqLe8uWw7gu3iXbSrn2n" cert_validity_sec = 3600 -test_only_listen_adress_plain = "0.0.0.0:34250" +test_only_listen_adress_plain = "0.0.0.0:34250" # list of coinbase outputs used to build the coinbase tx # ! right now only one output is supported, so comment all the ones you don't need ! coinbase_outputs = [ - { output_script_type = "P2WPKH", output_script_value = "036adc3bdf21e6f9a0f0fb0066bf517e5b7909ed1563d6958a10993849a7554075" }, + { output_script_type = "P2WPKH", output_script_value = "036adc3bdf21e6f9a0f0fb0066bf517e5b7909ed1563d6958a10993849a7554075" }, ] # Pool signature (string to be included in coinbase tx) -pool_signature = "Stratum v2 SRI Pool" \ No newline at end of file +pool_signature = "Stratum v2 SRI Pool" diff --git a/test/config/pool-mock-tp.toml b/test/config/pool-mock-tp.toml index 252d0637a6..d1f75a2b5f 100644 --- a/test/config/pool-mock-tp.toml +++ b/test/config/pool-mock-tp.toml @@ -5,11 +5,11 @@ listen_jd_address = "127.0.0.1:34264" authority_public_key = "9auqWEzQDVyd2oe1JVGFLMLHZtCo2FFqZwtKA5gd9xbuEu7PH72" authority_secret_key = "mkDLTBBRxdBv998612qipDYoTK3YUrqLe8uWw7gu3iXbSrn2n" cert_validity_sec = 3600 -test_only_listen_adress_plain = "0.0.0.0:34250" +test_only_listen_adress_plain = "0.0.0.0:34250" # list of coinbase outputs used to build the coinbase tx # ! right now only one output is supported, so comment all the ones you don't need ! coinbase_outputs = [ - { output_script_type = "P2WPKH", output_script_value = "036adc3bdf21e6f9a0f0fb0066bf517e5b7909ed1563d6958a10993849a7554075" }, + { output_script_type = "P2WPKH", output_script_value = "036adc3bdf21e6f9a0f0fb0066bf517e5b7909ed1563d6958a10993849a7554075" }, ] # Pool signature (string to be included in coinbase tx) pool_signature = "Stratum v2 SRI Pool" diff --git a/test/config/proxy-config-test-multiple-upstreams-extended.toml b/test/config/proxy-config-test-multiple-upstreams-extended.toml index 4a12a4bfb4..cf960d10dc 100644 --- a/test/config/proxy-config-test-multiple-upstreams-extended.toml +++ b/test/config/proxy-config-test-multiple-upstreams-extended.toml @@ -1,8 +1,8 @@ upstreams = [ - { channel_kind = "Extended", address = "127.0.0.1", port = 34254, pub_key = "9auqWEzQDVyd2oe1JVGFLMLHZtCo2FFqZwtKA5gd9xbuEu7PH72"}, - { channel_kind = "Extended", address = "127.0.0.1", port = 44254, pub_key = "9auqWEzQDVyd2oe1JVGFLMLHZtCo2FFqZwtKA5gd9xbuEu7PH72"}, - { channel_kind = "Extended", address = "127.0.0.1", port = 54254, pub_key = "9auqWEzQDVyd2oe1JVGFLMLHZtCo2FFqZwtKA5gd9xbuEu7PH72"} + { channel_kind = "Extended", address = "127.0.0.1", port = 34254, pub_key = "9auqWEzQDVyd2oe1JVGFLMLHZtCo2FFqZwtKA5gd9xbuEu7PH72" }, + { channel_kind = "Extended", address = "127.0.0.1", port = 44254, pub_key = "9auqWEzQDVyd2oe1JVGFLMLHZtCo2FFqZwtKA5gd9xbuEu7PH72" }, + { channel_kind = "Extended", address = "127.0.0.1", port = 54254, pub_key = "9auqWEzQDVyd2oe1JVGFLMLHZtCo2FFqZwtKA5gd9xbuEu7PH72" }, ] listen_address = "127.0.0.1" listen_mining_port = 34255 diff --git a/test/config/proxy-config-test-multiple-upstreams.toml b/test/config/proxy-config-test-multiple-upstreams.toml index 996322c995..c890fb2de8 100644 --- a/test/config/proxy-config-test-multiple-upstreams.toml +++ b/test/config/proxy-config-test-multiple-upstreams.toml @@ -1,8 +1,8 @@ upstreams = [ - { channel_kind = "Group", address = "127.0.0.1", port = 34254, pub_key = "9auqWEzQDVyd2oe1JVGFLMLHZtCo2FFqZwtKA5gd9xbuEu7PH72"}, - { channel_kind = "Group", address = "127.0.0.1", port = 44254, pub_key = "9auqWEzQDVyd2oe1JVGFLMLHZtCo2FFqZwtKA5gd9xbuEu7PH72"}, - { channel_kind = "Group", address = "127.0.0.1", port = 54254, pub_key = "9auqWEzQDVyd2oe1JVGFLMLHZtCo2FFqZwtKA5gd9xbuEu7PH72"} + { channel_kind = "Group", address = "127.0.0.1", port = 34254, pub_key = "9auqWEzQDVyd2oe1JVGFLMLHZtCo2FFqZwtKA5gd9xbuEu7PH72" }, + { channel_kind = "Group", address = "127.0.0.1", port = 44254, pub_key = "9auqWEzQDVyd2oe1JVGFLMLHZtCo2FFqZwtKA5gd9xbuEu7PH72" }, + { channel_kind = "Group", address = "127.0.0.1", port = 54254, pub_key = "9auqWEzQDVyd2oe1JVGFLMLHZtCo2FFqZwtKA5gd9xbuEu7PH72" }, ] listen_address = "127.0.0.1" listen_mining_port = 34255 diff --git a/test/config/tproxy-config-no-jd-sv1-cpu-md.toml b/test/config/tproxy-config-no-jd-sv1-cpu-md.toml index fdca703991..b1f3ee8d3b 100644 --- a/test/config/tproxy-config-no-jd-sv1-cpu-md.toml +++ b/test/config/tproxy-config-no-jd-sv1-cpu-md.toml @@ -14,7 +14,7 @@ downstream_port = 34255 # When testing we need to make sure that the tproxy is able to send valid solution to the TP, so we # force the tproxy to not set the solution to the pool so that only the tproxy can send it to the TP -test_only_share_withhold=true +test_only_share_withhold = true # Version support max_supported_version = 2 @@ -35,9 +35,9 @@ coinbase_reward_sat = 5_000_000_000 # Difficulty params [downstream_difficulty_config] # hashes/s of the weakest miner that will be connecting -min_individual_miner_hashrate=100_000.0 +min_individual_miner_hashrate = 100_000.0 # minimum number of shares needed before a mining.set_difficulty is sent for updating targets -miner_num_submits_before_update=5 +miner_num_submits_before_update = 5 # target number of shares per minute the miner should be sending shares_per_minute = 100.0 @@ -45,4 +45,4 @@ shares_per_minute = 100.0 # interval in seconds to elapse before updating channel hashrate with the pool channel_diff_update_interval = 60 # estimated accumulated hashrate of all downstream miners -channel_nominal_hashrate = 500.0 \ No newline at end of file +channel_nominal_hashrate = 500.0 diff --git a/test/scale/Cargo.toml b/test/scale/Cargo.toml index 7b0ec21d94..0c4ce5db7f 100644 --- a/test/scale/Cargo.toml +++ b/test/scale/Cargo.toml @@ -10,15 +10,18 @@ lto = true [dependencies] clap = "2.33.3" -serde = { version = "1.0.89", features = ["derive", "alloc"], default-features = false, optional = true} +serde = { version = "1.0.89", features = [ + "derive", + "alloc", +], default-features = false, optional = true } async-channel = "1.5.1" -async-std="1.8.0" +async-std = "1.8.0" bytes = "1.0.1" binary_sv2 = { path = "../../protocols/v2/binary-sv2/binary-sv2" } -codec_sv2 = { path = "../../protocols/v2/codec-sv2", features=["noise_sv2"] } -network_helpers_sv2 = { version = "0.1", path = "../../roles/roles-utils/network-helpers", features = ["with_tokio"] } +codec_sv2 = { path = "../../protocols/v2/codec-sv2", features = ["noise_sv2"] } +network_helpers_sv2 = { version = "0.1", path = "../../roles/roles-utils/network-helpers", features = [ + "with_tokio", +] } roles_logic_sv2 = { path = "../../protocols/v2/roles-logic-sv2" } tokio = { version = "1", features = ["full"] } key-utils = { version = "^1.0.0", path = "../../utils/key-utils" } - - diff --git a/utils/Cargo.toml b/utils/Cargo.toml index 194360857f..3961c8baef 100644 --- a/utils/Cargo.toml +++ b/utils/Cargo.toml @@ -13,15 +13,8 @@ license-file = "LICENSE.md" keywords = ["stratum", "mining", "bitcoin", "protocol"] [workspace] -resolver="2" +resolver = "2" -members = [ - "buffer", - "error-handling", - "key-utils", - "bip32-key-derivation", -] +members = ["buffer", "error-handling", "key-utils", "bip32-key-derivation"] -exclude = [ - "message-generator", -] +exclude = ["message-generator"] diff --git a/utils/bip32-key-derivation/Cargo.toml b/utils/bip32-key-derivation/Cargo.toml index a2d0681e4c..fbb7a730dc 100644 --- a/utils/bip32-key-derivation/Cargo.toml +++ b/utils/bip32-key-derivation/Cargo.toml @@ -15,7 +15,9 @@ name = "bip32_derivation-bin" path = "src/main.rs" [dependencies] -stratum-common = { version="1.0.0", path = "../../common", features=["bitcoin"]} +stratum-common = { version = "1.0.0", path = "../../common", features = [ + "bitcoin", +] } slip132 = "0.10" [dev-dependencies] diff --git a/utils/buffer/Cargo.toml b/utils/buffer/Cargo.toml index 798ba3c631..0019794521 100644 --- a/utils/buffer/Cargo.toml +++ b/utils/buffer/Cargo.toml @@ -8,8 +8,11 @@ license = "MIT" repository = "https://github.com/stratum-mining/stratum" [dependencies] -criterion = {version = "0.3", optional = true} -serde = { version = "1.0.89", features = ["derive", "alloc"], default-features = false, optional = true } +criterion = { version = "0.3", optional = true } +serde = { version = "1.0.89", features = [ + "derive", + "alloc", +], default-features = false, optional = true } aes-gcm = "0.10.2" [dev-dependencies] diff --git a/utils/buffer/fuzz/Cargo.toml b/utils/buffer/fuzz/Cargo.toml index e47b9bf419..5d388f54ec 100644 --- a/utils/buffer/fuzz/Cargo.toml +++ b/utils/buffer/fuzz/Cargo.toml @@ -12,7 +12,7 @@ cargo-fuzz = true libfuzzer-sys = { version = "0.4.0", features = ["arbitrary-derive"] } arbitrary = { version = "1", features = ["derive"] } rand = "0.8.3" -buffer_sv2 = {version = "1.0.0", path = "..", features = ["fuzz"]} +buffer_sv2 = { version = "1.0.0", path = "..", features = ["fuzz"] } affinity = "0.1.1" threadpool = "1.8.1" lazy_static = "1.4.0" diff --git a/utils/buffer/fuzz/rust-toolchain.toml b/utils/buffer/fuzz/rust-toolchain.toml index c09c2eee72..4f0869d2d3 100644 --- a/utils/buffer/fuzz/rust-toolchain.toml +++ b/utils/buffer/fuzz/rust-toolchain.toml @@ -1,5 +1,5 @@ [toolchain] channel = "nightly-2020-04-06" -components = [ "rustfmt", "rustc-dev" ] -targets = [ "x86_64-unknown-linux-gnu"] +components = ["rustfmt", "rustc-dev"] +targets = ["x86_64-unknown-linux-gnu"] profile = "minimal" diff --git a/utils/key-utils/Cargo.toml b/utils/key-utils/Cargo.toml index 42fa67d8a1..594b5a48b6 100644 --- a/utils/key-utils/Cargo.toml +++ b/utils/key-utils/Cargo.toml @@ -18,9 +18,16 @@ name = "key-utils-bin" path = "src/main.rs" [dependencies] -bs58 = { version ="0.4.0", features = ["check"] } -secp256k1 = { version = "0.28.2", default-features = false, features =["alloc","rand","rand-std"] } -serde = { version = "1.0.89", features = ["derive","alloc"], default-features = false } +bs58 = { version = "0.4.0", features = ["check"] } +secp256k1 = { version = "0.28.2", default-features = false, features = [ + "alloc", + "rand", + "rand-std", +] } +serde = { version = "1.0.89", features = [ + "derive", + "alloc", +], default-features = false } [dev-dependencies] toml = { version = "0.5.6", git = "https://github.com/diondokter/toml-rs", default-features = false, rev = "c4161aa" } diff --git a/utils/message-generator/Cargo.toml b/utils/message-generator/Cargo.toml index b1a8a119d7..ae1faeac4c 100644 --- a/utils/message-generator/Cargo.toml +++ b/utils/message-generator/Cargo.toml @@ -7,14 +7,28 @@ edition = "2021" [dependencies] async-channel = "1.8.0" -binary_sv2 = { version = "1.0.0", path = "../../protocols/v2/binary-sv2/binary-sv2", features = ["with_serde"] } -codec_sv2 = { version = "1.0.0", path = "../../protocols/v2/codec-sv2", features = ["noise_sv2","with_buffer_pool","with_serde"] } +binary_sv2 = { version = "1.0.0", path = "../../protocols/v2/binary-sv2/binary-sv2", features = [ + "with_serde", +] } +codec_sv2 = { version = "1.0.0", path = "../../protocols/v2/codec-sv2", features = [ + "noise_sv2", + "with_buffer_pool", + "with_serde", +] } const_sv2 = { version = "1.0.0", path = "../../protocols/v2/const-sv2" } load_file = "1.0.1" -network_helpers_sv2 = { version = "2.0.0", path = "../../roles/roles-utils/network-helpers", features = ["with_tokio","with_serde"] } -roles_logic_sv2 = { version = "1.0.0", path = "../../protocols/v2/roles-logic-sv2", features = ["with_serde"] } -v1 = { version = "^1.0.0", path = "../../protocols/v1", package="sv1_api" } -serde = { version = "*", features = ["derive", "alloc"], default-features = false } +network_helpers_sv2 = { version = "2.0.0", path = "../../roles/roles-utils/network-helpers", features = [ + "with_tokio", + "with_serde", +] } +roles_logic_sv2 = { version = "1.0.0", path = "../../protocols/v2/roles-logic-sv2", features = [ + "with_serde", +] } +v1 = { version = "^1.0.0", path = "../../protocols/v1", package = "sv1_api" } +serde = { version = "*", features = [ + "derive", + "alloc", +], default-features = false } serde_json = { version = "1.0", default-features = false, features = ["alloc"] } tokio = { version = "1", features = ["full"] } arbitrary = { version = "1", features = ["derive"] } @@ -22,5 +36,5 @@ rand = "0.8.5" secp256k1 = "0.28.2" key-utils = { path = "../key-utils" } tracing = { version = "0.1" } -tracing-subscriber = {version = "0.3", features = ["env-filter"]} +tracing-subscriber = { version = "0.3", features = ["env-filter"] } tracing-core = "*" diff --git a/utils/tarpaulin.toml b/utils/tarpaulin.toml index c704c0f94d..1bccb86ac9 100644 --- a/utils/tarpaulin.toml +++ b/utils/tarpaulin.toml @@ -1,5 +1,5 @@ [default] -run-types = [ "Lib" ] +run-types = ["Lib"] timeout = "120s" fail-under = 7