Skip to content

Commit

Permalink
taplo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
plebhash committed May 18, 2024
1 parent 3a64363 commit e1aae35
Show file tree
Hide file tree
Showing 77 changed files with 474 additions and 306 deletions.
27 changes: 17 additions & 10 deletions benches/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]]
Expand Down
8 changes: 6 additions & 2 deletions common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
] }
22 changes: 17 additions & 5 deletions examples/ping-pong-with-noise/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
]
7 changes: 5 additions & 2 deletions examples/ping-pong-without-noise/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Expand Down
13 changes: 9 additions & 4 deletions examples/sv1-client-and-server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
4 changes: 3 additions & 1 deletion examples/sv2-proxy/proxy-config.toml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
10 changes: 7 additions & 3 deletions examples/template-provider-test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
32 changes: 16 additions & 16 deletions protocols/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
8 changes: 5 additions & 3 deletions protocols/fuzz-tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion protocols/tarpaulin.toml
Original file line number Diff line number Diff line change
@@ -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

Expand Down
13 changes: 9 additions & 4 deletions protocols/v1/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
13 changes: 8 additions & 5 deletions protocols/v2/binary-sv2/binary-sv2/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
4 changes: 2 additions & 2 deletions protocols/v2/binary-sv2/no-serde-sv2/codec/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
7 changes: 5 additions & 2 deletions protocols/v2/binary-sv2/serde-sv2/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
16 changes: 10 additions & 6 deletions protocols/v2/codec-sv2/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
7 changes: 6 additions & 1 deletion protocols/v2/const-sv2/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
4 changes: 2 additions & 2 deletions protocols/v2/framing-sv2/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
14 changes: 11 additions & 3 deletions protocols/v2/noise-sv2/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Loading

0 comments on commit e1aae35

Please sign in to comment.