From 3853b10654c431aae561726e292c569a3c7992f0 Mon Sep 17 00:00:00 2001 From: Francesco Leacche Date: Mon, 11 Aug 2025 15:57:27 +0100 Subject: [PATCH 01/13] remove all unused features --- Cargo.lock | 141 ------------------ Cargo.toml | 45 ++++-- clarity-serialization/Cargo.toml | 6 +- clarity/Cargo.toml | 31 ++-- clarity/fuzz/Cargo.toml | 12 +- .../tools/config-docs-generator/Cargo.toml | 10 +- libsigner/Cargo.toml | 22 +-- libstackerdb/Cargo.toml | 10 +- pox-locking/Cargo.toml | 4 +- stacks-common/Cargo.toml | 22 +-- stacks-node/Cargo.toml | 54 +++---- stacks-signer/Cargo.toml | 41 +++-- stackslib/Cargo.toml | 71 ++++----- stackslib/src/net/mod.rs | 12 +- stx-genesis/Cargo.toml | 6 +- 15 files changed, 165 insertions(+), 322 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f7c0905f54..8da367864f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -324,24 +324,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "62565bb4402e926b29953c785397c6dc0391b7b446e45008b0049eb43cec6f5d" dependencies = [ "async-attributes", - "async-channel 1.9.0", - "async-global-executor", - "async-io 1.13.0", - "async-lock 2.8.0", - "crossbeam-utils", - "futures-channel", - "futures-core", - "futures-io", - "futures-lite 1.13.0", - "gloo-timers", - "kv-log-macro", - "log", - "memchr", - "once_cell", - "pin-project-lite", - "pin-utils", - "slab", - "wasm-bindgen-futures", ] [[package]] @@ -507,12 +489,6 @@ version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" -[[package]] -name = "byteorder" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" - [[package]] name = "bytes" version = "1.5.0" @@ -665,16 +641,6 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" -[[package]] -name = "colored" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbf2150cce219b664a8a70df7a1f933836724b503f8a413af9365b4dcc4d90b8" -dependencies = [ - "lazy_static", - "windows-sys 0.48.0", -] - [[package]] name = "concurrent-queue" version = "2.4.0" @@ -804,12 +770,6 @@ dependencies = [ "syn 2.0.58", ] -[[package]] -name = "data-encoding" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5" - [[package]] name = "der" version = "0.7.8" @@ -1231,18 +1191,6 @@ version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" -[[package]] -name = "gloo-timers" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b995a66bb87bebce9a0f4a95aed01daca4872c050bfcb21653361c03bc35e5c" -dependencies = [ - "futures-channel", - "futures-core", - "js-sys", - "wasm-bindgen", -] - [[package]] name = "h2" version = "0.3.26" @@ -1665,15 +1613,6 @@ dependencies = [ "winapi-build", ] -[[package]] -name = "kv-log-macro" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0de8b303297635ad57c9f5059fd9cee7a47f8e8daa09df0fcd07dd39fb22977f" -dependencies = [ - "log", -] - [[package]] name = "lazy_static" version = "1.4.0" @@ -1779,7 +1718,6 @@ dependencies = [ "rand_core 0.6.4", "serde", "serde_json", - "sha2 0.10.8", "slog", "stacks-common 0.0.1", "stackslib 0.0.1", @@ -1823,7 +1761,6 @@ name = "libstackerdb" version = "0.0.1" dependencies = [ "clarity 0.0.1", - "secp256k1", "serde", "sha2 0.10.8", "stacks-common 0.0.1", @@ -1868,9 +1805,6 @@ name = "log" version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" -dependencies = [ - "value-bag", -] [[package]] name = "madhouse" @@ -1979,7 +1913,6 @@ checksum = "09b34bd91b9e5c5b06338d392463e1318d683cf82ec3d3af4014609be6e2108d" dependencies = [ "assert-json-diff 2.0.2", "bytes", - "colored", "futures-util", "http 1.1.0", "http-body 1.0.1", @@ -1995,24 +1928,6 @@ dependencies = [ "tokio", ] -[[package]] -name = "multer" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01acbdc23469fd8fe07ab135923371d5f5a422fbf9c522158677c8eb15bc51c2" -dependencies = [ - "bytes", - "encoding_rs", - "futures-util", - "http 0.2.11", - "httparse", - "log", - "memchr", - "mime", - "spin 0.9.8", - "version_check", -] - [[package]] name = "mutants" version = "0.0.3" @@ -2364,7 +2279,6 @@ dependencies = [ "cfg-if 0.1.10", "fnv", "lazy_static", - "protobuf", "spin 0.5.2", "thiserror", ] @@ -2389,12 +2303,6 @@ dependencies = [ "unarray", ] -[[package]] -name = "protobuf" -version = "2.28.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "106dd99e98437432fed6519dedecfade6a06a73bb7b2a1e019fdd2bee5778d94" - [[package]] name = "psm" version = "0.1.21" @@ -2957,8 +2865,6 @@ version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b258109f244e1d6891bf1053a55d63a5cd4f8f4c30cf9a1280989f80e7a1fa9" dependencies = [ - "futures", - "log", "once_cell", "parking_lot", "scc", @@ -3301,7 +3207,6 @@ dependencies = [ "rand_core 0.6.4", "reqwest", "rusqlite", - "secp256k1", "serde", "serde_json", "slog", @@ -3375,7 +3280,6 @@ dependencies = [ "rstest", "rstest_reuse", "rusqlite", - "secp256k1", "serde", "serde_derive", "serde_json", @@ -3778,18 +3682,6 @@ dependencies = [ "tokio", ] -[[package]] -name = "tokio-tungstenite" -version = "0.20.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "212d5dcb2a1ce06d81107c3d0ffa3121fe974b73f068c8282cb1c32328113b6c" -dependencies = [ - "futures-util", - "log", - "tokio", - "tungstenite", -] - [[package]] name = "tokio-util" version = "0.7.10" @@ -3887,25 +3779,6 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" -[[package]] -name = "tungstenite" -version = "0.20.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e3dac10fd62eaf6617d3a904ae222845979aec67c615d1c842b4002c7666fb9" -dependencies = [ - "byteorder", - "bytes", - "data-encoding", - "http 0.2.11", - "httparse", - "log", - "rand 0.8.5", - "sha1 0.10.6", - "thiserror", - "url", - "utf-8", -] - [[package]] name = "typenum" version = "1.17.0" @@ -3966,12 +3839,6 @@ dependencies = [ "serde", ] -[[package]] -name = "utf-8" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" - [[package]] name = "utf8parse" version = "0.2.1" @@ -3984,12 +3851,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" -[[package]] -name = "value-bag" -version = "1.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "126e423afe2dd9ac52142e7e9d5ce4135d7e13776c529d27fd6bc49f19e3280b" - [[package]] name = "vcpkg" version = "0.2.15" @@ -4041,7 +3902,6 @@ dependencies = [ "log", "mime", "mime_guess", - "multer", "percent-encoding", "pin-project", "rustls-pemfile", @@ -4051,7 +3911,6 @@ dependencies = [ "serde_urlencoded", "tokio", "tokio-stream", - "tokio-tungstenite", "tokio-util", "tower-service", "tracing", diff --git a/Cargo.toml b/Cargo.toml index 72b167a3d4..c8e669fa84 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,20 +15,41 @@ members = [ # Dependencies we want to keep the same between workspace members [workspace.dependencies] +assert-json-diff = { version = "1.0.0", default-features = false } +chrono = { version = "0.4.41", default-features = false } ed25519-dalek = { version = "2.1.1", default-features = false } hashbrown = { version = "0.15.2", features = ["serde"] } -lazy_static = "1.4.0" -rand_core = "0.6.4" -rand = "0.8" -rand_chacha = "0.3.1" -serde = "1" -serde_derive = "1" -serde_json = { version = "1.0", features = ["arbitrary_precision", "unbounded_depth"] } -slog = { version = "2.5.2", features = [ "max_level_trace" ] } -rusqlite = { version = "0.31.0", features = ["blob", "serde_json", "i128_blob", "bundled", "trace"] } -tikv-jemallocator = "0.5.4" -thiserror = "1.0.65" -toml = "0.5.6" +lazy_static = { version = "1.4.0", default-features = false } +libc = { version = "0.2.151", default-features = false } +mutants = { version = "0.0.3", default-features = false } +nix = { version = "0.23", default-features = false } +rand_core = { version = "0.6.4", default-features = false } +rand = { version = "0.8", default-features = false } +prometheus = { version = "0.9", default-features = false } +proptest = { version = "1.6.*", default-features = false } +regex = { version = "1", default-features = false } +reqwest = { version = "0.11.22", default-features = false, features = ["blocking", "json", "rustls-tls"] } +ripemd = { version = "0.1.1", default-features = false } +serde = { version = "1", default-features = false } +serde_derive = { version = "1", default-features = false } +serde_json = { version = "1.0", default-features = false } +sha2 = { version = "0.10", default-features = false, features = ["std"] } +slog = { version = "2.5.2", default-features = false, features = [ "max_level_trace" ] } +slog-json = { version = "2.3.0", default-features = false } +slog-term = { version = "2.6.0", default-features = false } +stdext = { version = "0.3.1", default-features = false } +rstest = { version = "0.17.0", default-features = false } +rstest_reuse = { version = "0.5.0", default-features = false } +rusqlite = { version = "0.31.0", default-features = false, features = ["blob", "serde_json", "i128_blob", "bundled", "trace"] } +tempfile = { version = "3.3", default-features = false } +tikv-jemallocator = { version = "0.5.4", default-features = false } +thiserror = { version = "1.0.65", default-features = false } +tracing = { version = "0.1.37", default-features = false } +tracing-subscriber = { version = "0.3.17", default-features = false } +tiny_http = { version = "0.12.0", default-features = false } +toml = { version = "0.5.6", default-features = false } +url = { version = "2.1.0", default-features = false } +winapi = { version = "0.3", default-features = false } # Use a bit more than default optimization for # dev builds to speed up test execution diff --git a/clarity-serialization/Cargo.toml b/clarity-serialization/Cargo.toml index 341d8c0c29..ca9a5a343f 100644 --- a/clarity-serialization/Cargo.toml +++ b/clarity-serialization/Cargo.toml @@ -11,7 +11,7 @@ readme = "README.md" [dependencies] lazy_static = { workspace = true } -regex = { version = "1", default-features = false } +regex = { workspace = true } serde = { workspace = true } serde_derive = { workspace = true } slog = { workspace = true } @@ -19,8 +19,8 @@ stacks_common = { package = "stacks-common", path = "../stacks-common", default- thiserror = { workspace = true } [dev-dependencies] -mutants = "0.0.3" -rstest = "0.17.0" +mutants = { workspace = true } +rstest = { workspace = true } [features] default = [] diff --git a/clarity/Cargo.toml b/clarity/Cargo.toml index bd03934a1f..44efeaffda 100644 --- a/clarity/Cargo.toml +++ b/clarity/Cargo.toml @@ -18,33 +18,30 @@ name = "clarity" path = "./src/libclarity.rs" [dependencies] -serde = "1" -serde_derive = "1" -regex = "1" -lazy_static = "1.4.0" -integer-sqrt = "0.1.3" -slog = { version = "2.5.2", features = [ "max_level_trace" ] } +serde = { workspace = true } +serde_derive = { workspace = true } +regex = { workspace = true } +lazy_static = { workspace = true } +integer-sqrt = { version = "0.1.3", default-features = false } +slog = { workspace = true } stacks_common = { package = "stacks-common", path = "../stacks-common", default-features = false } -rstest = { version = "0.17.0", optional = true } -rstest_reuse = { version = "0.5.0", optional = true } +rstest = { workspace = true, optional = true } +rstest_reuse = { workspace = true, optional = true } hashbrown = { workspace = true } rusqlite = { workspace = true, optional = true } - -[dependencies.serde_json] -version = "1.0" -features = ["arbitrary_precision", "unbounded_depth"] +serde_json = { workspace = true, features = ["arbitrary_precision", "unbounded_depth"] } [dev-dependencies] -assert-json-diff = "1.0.0" -mutants = "0.0.3" -rstest = { version = "0.17.0" } -rstest_reuse = { version = "0.5.0" } +assert-json-diff = { workspace = true } +mutants = { workspace = true } +rstest = { workspace = true } +rstest_reuse = { workspace = true } # a nightly rustc regression (35dbef235 2021-03-02) prevents criterion from compiling # but it isn't necessary for tests: only benchmarks. therefore, commenting out for now. # criterion = "0.3" [target.'cfg(not(target_family = "wasm"))'.dependencies] -serde_stacker = "0.1" +serde_stacker = { version = "0.1", default-features = false } [features] default = ["rusqlite"] diff --git a/clarity/fuzz/Cargo.toml b/clarity/fuzz/Cargo.toml index 5dcdded047..53030fc5d9 100644 --- a/clarity/fuzz/Cargo.toml +++ b/clarity/fuzz/Cargo.toml @@ -8,16 +8,10 @@ edition = "2021" cargo-fuzz = true [dependencies] -libfuzzer-sys = "0.4" +libfuzzer-sys = { version = "0.4", default-features = false } # clarity_2_1 = { git = "https://github.com/stacks-network/stacks-blockchain.git", tag = "2.1.0.0.0", package="clarity"} - -[dependencies.clarity] -path = ".." -features = ["testing"] - -[dependencies.stacks-common] -path = "../../stacks-common" -features = ["testing"] +clarity = { path = "..", features = ["testing"] } +stacks-common = { path = "../../stacks-common", features = ["testing"] } # Prevent this from interfering with workspaces [workspace] diff --git a/contrib/tools/config-docs-generator/Cargo.toml b/contrib/tools/config-docs-generator/Cargo.toml index ccf1cdbb80..6ae6b9ef1d 100644 --- a/contrib/tools/config-docs-generator/Cargo.toml +++ b/contrib/tools/config-docs-generator/Cargo.toml @@ -17,14 +17,14 @@ name = "integration" path = "tests/integration.rs" [dependencies] -serde = { version = "1.0", features = ["derive"] } -serde_json = "1.0" +serde = { workspace = true, features = ["derive"] } +serde_json = { workspace = true } clap = { version = "4.0", features = ["derive"] } -regex = "1.0" +regex = { workspace = true } anyhow = "1.0" once_cell = "1.18" # Add test dependencies [dev-dependencies] -tempfile = "3.0" -assert_cmd = "2.0" +tempfile = { workspace = true } +assert_cmd = { version = "2.0", default-features = false } diff --git a/libsigner/Cargo.toml b/libsigner/Cargo.toml index 404e443b31..8aaeb31d74 100644 --- a/libsigner/Cargo.toml +++ b/libsigner/Cargo.toml @@ -18,29 +18,21 @@ path = "./src/libsigner.rs" [dependencies] clarity = { path = "../clarity" } hashbrown = { workspace = true } -lazy_static = "1.4.0" -libc = "0.2" +lazy_static = { workspace = true } +libc = { workspace = true } libstackerdb = { path = "../libstackerdb" } -serde = "1" -slog = { version = "2.5.2", features = [ "max_level_trace" ] } +serde = { workspace = true } +serde_json = { workspace = true, features = ["arbitrary_precision", "unbounded_depth"] } +slog = { workspace = true } stacks-common = { path = "../stacks-common" } stackslib = { path = "../stackslib"} thiserror = { workspace = true } -tiny_http = "0.12" +tiny_http = { workspace = true } [dev-dependencies] -mutants = "0.0.3" +mutants = { workspace = true } rand_core = { workspace = true } rand = { workspace = true } stacks-common = { path = "../stacks-common", features = ["testing"] } -[dependencies.serde_json] -version = "1.0" -features = ["arbitrary_precision", "unbounded_depth"] - -[target.'cfg(all(any(target_arch = "x86_64", target_arch = "x86", target_arch = "aarch64"), not(any(target_os="windows"))))'.dependencies] -sha2 = { version = "0.10", features = ["asm"] } - -[target.'cfg(any(not(any(target_arch = "x86_64", target_arch = "x86", target_arch = "aarch64")), any(target_os = "windows")))'.dependencies] -sha2 = { version = "0.10" } diff --git a/libstackerdb/Cargo.toml b/libstackerdb/Cargo.toml index c4910a7d25..54913ec36b 100644 --- a/libstackerdb/Cargo.toml +++ b/libstackerdb/Cargo.toml @@ -16,16 +16,12 @@ name = "libstackerdb" path = "./src/libstackerdb.rs" [dependencies] -serde = "1" +serde = { workspace = true } stacks-common = { path = "../stacks-common" } clarity = { path = "../clarity" } -[dependencies.secp256k1] -version = "0.24.3" -features = ["serde", "recovery"] - [target.'cfg(all(any(target_arch = "x86_64", target_arch = "x86", target_arch = "aarch64"), not(any(target_os="windows"))))'.dependencies] -sha2 = { version = "0.10", features = ["asm"] } +sha2 = { workspace = true, features = ["asm"] } [target.'cfg(any(not(any(target_arch = "x86_64", target_arch = "x86", target_arch = "aarch64")), any(target_os = "windows")))'.dependencies] -sha2 = { version = "0.10" } +sha2 = { workspace = true } diff --git a/pox-locking/Cargo.toml b/pox-locking/Cargo.toml index 9863c2b5c4..4e1af02f54 100644 --- a/pox-locking/Cargo.toml +++ b/pox-locking/Cargo.toml @@ -21,10 +21,10 @@ path = "src/lib.rs" [dependencies] clarity = { package = "clarity", path = "../clarity", default-features = false} stacks_common = { package = "stacks-common", path = "../stacks-common", default-features = false} -slog = { version = "2.5.2", features = [ "max_level_trace" ] } +slog = { workspace = true } [dev-dependencies] -mutants = "0.0.3" +mutants = { workspace = true } [features] slog_json = ["stacks_common/slog_json", "clarity/slog_json"] diff --git a/stacks-common/Cargo.toml b/stacks-common/Cargo.toml index 4b2c96d3bb..794ab9127b 100644 --- a/stacks-common/Cargo.toml +++ b/stacks-common/Cargo.toml @@ -30,29 +30,29 @@ name = "stacks_common" path = "./src/libcommon.rs" [dependencies] -chrono = { version = "0.4.41", default-features = false, features = ["clock"] } +chrono = { workspace = true , features = ["clock"] } curve25519-dalek = { version = "4.1.3", default-features = false, features = ["serde"] } ed25519-dalek = { workspace = true } hashbrown = { workspace = true } lazy_static = { workspace = true } -ripemd = { version = "0.1.1", default-features = false } +ripemd = { workspace = true } serde = { workspace = true , features = ["derive"] } serde_derive = { workspace = true } -serde_json = { workspace = true } +serde_json = { workspace = true, features = ["arbitrary_precision", "unbounded_depth"] } sha3 = { version = "0.10.1", default-features = false } slog = { workspace = true } -slog-term = { version = "2.6.0", default-features = false } +slog-term = { workspace = true } # Optional dependencies getrandom = { version = "0.2", default-features = false, optional = true } rand = { workspace = true, optional = true } -slog-json = { version = "2.3.0", default-features = false, optional = true } +slog-json = { workspace = true, optional = true } [target.'cfg(unix)'.dependencies] -nix = {version = "0.23", default-features = false, optional = true} +nix = { workspace = true, optional = true } [target.'cfg(windows)'.dependencies] -winapi = { version = "0.3", features = [ +winapi = { workspace = true, features = [ "consoleapi", "handleapi", "synchapi", @@ -67,16 +67,16 @@ rusqlite = { workspace = true, optional = true } libsecp256k1 = { version = "0.7.0", default-features = false, features = ["hmac"] } [target.'cfg(all(any(target_arch = "x86_64", target_arch = "x86", target_arch = "aarch64"), not(any(target_os="windows"))))'.dependencies] -sha2 = { version = "0.10", features = ["asm"] } +sha2 = { workspace = true, features = ["asm"] } [target.'cfg(any(not(any(target_arch = "x86_64", target_arch = "x86", target_arch = "aarch64")), any(target_os="windows")))'.dependencies] -sha2 = { version = "0.10" } +sha2 = { workspace = true } [dev-dependencies] -proptest = "1.6.0" +proptest = { workspace = true } [target.'cfg(windows)'.dev-dependencies] -winapi = { version = "0.3", features = ["fileapi", "processenv", "winnt"] } +winapi = { workspace = true, features = ["fileapi", "processenv", "winnt"] } [build-dependencies] toml = { workspace = true } diff --git a/stacks-node/Cargo.toml b/stacks-node/Cargo.toml index d2b8e916b9..0d00bb6d2c 100644 --- a/stacks-node/Cargo.toml +++ b/stacks-node/Cargo.toml @@ -7,28 +7,28 @@ resolver = "2" rust-version = "1.61" [dependencies] -lazy_static = "1.4.0" -pico-args = "0.5.0" -serde = "1" -serde_derive = "1" -serde_json = { version = "1.0", features = ["arbitrary_precision", "raw_value"] } +lazy_static = { workspace = true } +pico-args = {version = "0.5.0", default-features = false } +serde = { workspace = true } +serde_derive = { workspace = true } +serde_json = { workspace = true, features = ["arbitrary_precision", "raw_value"] } stacks = { package = "stackslib", path = "../stackslib" } stx-genesis = { path = "../stx-genesis"} -base64 = "0.12.0" -backtrace = "0.3.50" -libc = "0.2.151" -slog = { version = "2.5.2", features = [ "max_level_trace" ] } +base64 = { version = "0.12.0", default-features = false, features = ["std"] } +backtrace = { version = "0.3.50", default-features = false , features = ["std"] } +libc = { workspace = true } +slog = { workspace = true } clarity = { path = "../clarity" } stacks-common = { path = "../stacks-common" } -chrono = "0.4.19" -regex = "1" +chrono = { workspace = true } +regex = { workspace = true } libsigner = { path = "../libsigner" } -url = "2.1.0" +url = { workspace = true } rand = { workspace = true } hashbrown = { workspace = true } rusqlite = { workspace = true } -async-h1 = { version = "2.3.2", optional = true } -async-std = { version = "1.6", optional = true, features = ["attributes"] } +async-h1 = { version = "2.3.2", default-features = false, optional = true } +async-std = { version = "1.6", default-features = false, optional = true, features = ["attributes"] } http-types = { version = "2.12", default-features = false, optional = true } thiserror = { workspace = true } @@ -38,28 +38,28 @@ libsigner_v3_1_0_0_13 = { package = "libsigner", git = "https://github.com/stack stacks_v3_1_00_13 = { package = "stackslib", git = "https://github.com/stacks-network/stacks-core.git", rev="8a79aaa7df0f13dfc5ab0d0d0bcb8201c90bcba2", optional = true, features = ["testing", "default"]} stacks_common_v3_1_00_13 = { package = "stacks-common", git = "https://github.com/stacks-network/stacks-core.git", rev="8a79aaa7df0f13dfc5ab0d0d0bcb8201c90bcba2", optional = true, features = ["testing", "default"]} [target.'cfg(not(any(target_os = "macos", target_os="windows", target_arch = "arm")))'.dependencies] -tikv-jemallocator = {workspace = true} +tikv-jemallocator = { workspace = true } [dev-dependencies] -warp = "0.3.5" -tokio = "1.15" -reqwest = { version = "0.11", default-features = false, features = ["blocking", "json", "rustls", "rustls-tls"] } +warp = { version = "0.3.5", default-features = false } +tokio = { version = "1.15", default-features = false } +reqwest = { workspace = true, features = ["rustls"] } clarity = { path = "../clarity", features = ["default", "testing"]} stacks-common = { path = "../stacks-common", features = ["default", "testing"] } stacks = { package = "stackslib", path = "../stackslib", features = ["default", "testing"] } stacks-signer = { path = "../stacks-signer", features = ["testing"] } -tracing = "0.1.37" -tracing-subscriber = { version = "0.3.17", features = ["env-filter"] } -mutants = "0.0.3" -tiny_http = "0.12.0" +tracing = { workspace = true } +tracing-subscriber = { workspace = true } +mutants = { workspace = true } +tiny_http = { workspace = true } http-types = { version = "2.12", default-features = false } -tempfile = "3.3" -mockito = "1.5" -serial_test = "3.2.0" +tempfile = { workspace = true } +mockito = { version = "1.5", default-features = false } +serial_test = { version = "3.2.0", default-features = false } pinny = { git = "https://github.com/BitcoinL2-Labs/pinny-rs.git", rev = "54ba9d533a7b84525a5e65a3eae1a3ae76b9ea49" } #v0.0.2 madhouse = { git = "https://github.com/stacks-network/madhouse-rs.git", tag = "0.2.0" } -proptest = "1.6.*" -stdext = "0.3.1" +proptest = { workspace = true } +stdext = { workspace = true } [[bin]] name = "stacks-node" diff --git a/stacks-signer/Cargo.toml b/stacks-signer/Cargo.toml index 347be5731f..eb487180f8 100644 --- a/stacks-signer/Cargo.toml +++ b/stacks-signer/Cargo.toml @@ -20,44 +20,37 @@ name = "stacks-signer" path = "src/main.rs" [dependencies] -backoff = "0.4" +backoff = { version = "0.4", default-features = false } clarity = { path = "../clarity" } -clap = { version = "4.1.1", features = ["derive", "env"] } +clap = { version = "4.1.1", default-features = false, features = ["std", "derive", "env"] } hashbrown = { workspace = true } -lazy_static = "1.4.0" +lazy_static = { workspace = true } libsigner = { path = "../libsigner" } libstackerdb = { path = "../libstackerdb" } -prometheus = { version = "0.9", optional = true } -rand_core = "0.6" -reqwest = { version = "0.11.22", default-features = false, features = ["blocking", "json", "rustls-tls"] } -serde = "1" -slog = { version = "2.5.2", features = [ "max_level_trace" ] } -slog-json = { version = "2.3.0", optional = true } -slog-term = "2.6.0" +prometheus = { workspace = true, optional = true } +rand_core = { workspace = true } +reqwest = { workspace = true } +serde = { workspace = true } +serde_json = { workspace = true, features = ["arbitrary_precision", "unbounded_depth"] } +slog = { workspace = true } +slog-json = { workspace = true, optional = true } +slog-term = { workspace = true } stacks-common = { path = "../stacks-common" } stackslib = { path = "../stackslib" } thiserror = { workspace = true } -tiny_http = { version = "0.12", optional = true } +tiny_http = { workspace = true, optional = true } toml = { workspace = true } -tracing = "0.1.37" -tracing-subscriber = { version = "0.3.17", features = ["env-filter"] } +tracing = { workspace = true } +tracing-subscriber = { workspace = true, features = ["registry", "fmt", "std", "env-filter"] } rand = { workspace = true } -url = "2.1.0" +url = { workspace = true } rusqlite = { workspace = true, features = ["functions"] } [dev-dependencies] clarity = { path = "../clarity", features = ["testing"] } stacks-common = { path = "../stacks-common", features = ["testing"] } -num-traits = "0.2.18" -stdext = "0.3.1" - -[dependencies.serde_json] -version = "1.0" -features = ["arbitrary_precision", "unbounded_depth"] - -[dependencies.secp256k1] -version = "0.24.3" -features = ["serde", "recovery"] +num-traits = { version = "0.2.18", default-features = false } +stdext = { workspace = true } [features] default = [] diff --git a/stackslib/Cargo.toml b/stackslib/Cargo.toml index 4ae68eb746..df6a7f550f 100644 --- a/stackslib/Cargo.toml +++ b/stackslib/Cargo.toml @@ -31,66 +31,57 @@ name = "blockstack-cli" path = "src/blockstack_cli.rs" [dependencies] +ed25519-dalek = { workspace = true } rand = { workspace = true } rand_core = { workspace = true } -rand_chacha = { workspace = true } -serde = "1" -serde_derive = "1" -ripemd = "0.1.1" -regex = "1" -mio = "0.6" -lazy_static = "1.4.0" -url = "2.1.0" -percent-encoding = "2.1.0" -prometheus = { version = "0.9", optional = true } -slog = { version = "2.5.2", features = [ "max_level_trace" ] } -chrono = { version = "0.4.19", optional = true } +rand_chacha = { version = "0.3.1", default-features = false } +serde = { workspace = true } +serde_derive = { workspace = true } +serde_json = { workspace = true, features = ["arbitrary_precision", "unbounded_depth"] } +ripemd = { workspace = true } +regex = { workspace = true } +mio = { version = "0.6", default-features = false } +lazy_static = { workspace = true } +url = { workspace = true } +percent-encoding = { version = "2.1.0", default-features = false } +prometheus = { workspace = true, optional = true } +slog = { workspace = true } +chrono = { workspace = true, optional = true } clarity = { path = "../clarity" } stacks-common = { path = "../stacks-common" } pox-locking = { path = "../pox-locking" } libstackerdb = { path = "../libstackerdb" } -siphasher = "0.3.7" +siphasher = { version = "0.3.7", default-features = false } hashbrown = { workspace = true } rusqlite = { workspace = true } -time = "0.3.41" +time = { version = "0.3.41", default-features = false } toml = { workspace = true } [target.'cfg(not(any(target_os = "macos",target_os="windows", target_arch = "arm" )))'.dependencies] -tikv-jemallocator = {workspace = true} +tikv-jemallocator = { workspace = true } [target.'cfg(unix)'.dependencies] -nix = "0.23" +nix = { workspace = true } [target.'cfg(windows)'.dependencies] -winapi = { version = "0.3", features = ["consoleapi", "handleapi", "synchapi", "winbase"] } +winapi = { workspace = true, features = ["consoleapi", "handleapi", "synchapi", "winbase"] } [target.'cfg(windows)'.dev-dependencies] -winapi = { version = "0.3", features = ["fileapi", "processenv", "winnt"] } - -[dependencies.serde_json] -version = "1.0" -features = ["arbitrary_precision", "unbounded_depth"] - -[dependencies.secp256k1] -version = "0.24.3" -features = ["serde", "recovery"] - -[dependencies.ed25519-dalek] -workspace = true +winapi = { workspace = true, features = ["fileapi", "processenv", "winnt"] } [dev-dependencies] -assert-json-diff = "1.0.0" -stdext = "0.3.1" +assert-json-diff = { workspace = true } +stdext = { workspace = true } stx-genesis = { path = "../stx-genesis"} clarity = { features = ["default", "testing"], path = "../clarity" } stacks-common = { features = ["default", "testing"], path = "../stacks-common" } -rstest = "0.17.0" -rstest_reuse = "0.5.0" -mutants = "0.0.3" -rlimit = "0.10.2" -chrono = "0.4.19" -tempfile = "3.3" -proptest = { version = "1.6.0", default-features = false, features = ["std"] } +rstest = { workspace = true } +rstest_reuse = { workspace = true } +mutants = { workspace = true } +rlimit = { version = "0.10.2", default-features = false } +chrono = { workspace = true } +tempfile = { workspace = true } +proptest = { workspace = true, features = ["std"] } [features] default = [] @@ -102,7 +93,7 @@ slog_json = ["stacks-common/slog_json", "clarity/slog_json", "pox-locking/slog_j testing = ["chrono", "stacks-common/testing", "clarity/testing"] [target.'cfg(all(any(target_arch = "x86_64", target_arch = "x86", target_arch = "aarch64"), not(any(target_os="windows"))))'.dependencies] -sha2 = { version = "0.10", features = ["asm"] } +sha2 = { workspace = true, features = ["asm"] } [target.'cfg(any(not(any(target_arch = "x86_64", target_arch = "x86", target_arch = "aarch64")), any(target_os="windows")))'.dependencies] -sha2 = { version = "0.10" } +sha2 = { workspace = true } diff --git a/stackslib/src/net/mod.rs b/stackslib/src/net/mod.rs index dff1812593..8a7bfdd8b1 100644 --- a/stackslib/src/net/mod.rs +++ b/stackslib/src/net/mod.rs @@ -2432,9 +2432,9 @@ pub mod test { /// make a TCP server and a pair of TCP client sockets pub fn make_tcp_sockets() -> ( - mio::tcp::TcpListener, - mio::tcp::TcpStream, - mio::tcp::TcpStream, + mio::net::TcpListener, + mio::net::TcpStream, + mio::net::TcpStream, ) { let mut rng = rand::thread_rng(); let (std_listener, port) = { @@ -2465,14 +2465,14 @@ pub mod test { .unwrap(), ) .unwrap(); - let sock_1 = mio::tcp::TcpStream::from_stream(std_sock_1).unwrap(); + let sock_1 = mio::net::TcpStream::from_stream(std_sock_1).unwrap(); let (std_sock_2, _) = std_listener.accept().unwrap(); - let sock_2 = mio::tcp::TcpStream::from_stream(std_sock_2).unwrap(); + let sock_2 = mio::net::TcpStream::from_stream(std_sock_2).unwrap(); sock_1.set_nodelay(true).unwrap(); sock_2.set_nodelay(true).unwrap(); - let listener = mio::tcp::TcpListener::from_std(std_listener).unwrap(); + let listener = mio::net::TcpListener::from_std(std_listener).unwrap(); (listener, sock_1, sock_2) } diff --git a/stx-genesis/Cargo.toml b/stx-genesis/Cargo.toml index 39e97465ce..6728005a07 100644 --- a/stx-genesis/Cargo.toml +++ b/stx-genesis/Cargo.toml @@ -6,12 +6,12 @@ edition = "2018" resolver = "2" [dependencies] -libflate = "1.0.3" +libflate = { version = "1.0.3", default-features = false } [lib] name = "stx_genesis" path = "src/lib.rs" [build-dependencies] -libflate = "1.0.3" -sha2 = { version = "0.10" } +libflate = { version = "1.0.3", default-features = false } +sha2 = { workspace = true } From 8e5085ab85f225c3e90a0f02cc41e34f1a7e509d Mon Sep 17 00:00:00 2001 From: Francesco Leacche Date: Mon, 11 Aug 2025 16:34:55 +0100 Subject: [PATCH 02/13] add serde_json/std to wasm-web --- stacks-common/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stacks-common/Cargo.toml b/stacks-common/Cargo.toml index 794ab9127b..ec67b50d0a 100644 --- a/stacks-common/Cargo.toml +++ b/stacks-common/Cargo.toml @@ -98,5 +98,5 @@ bech32_std = [] bech32_strict = [] # Wasm-specific features for easier configuration -wasm-web = ["rand", "getrandom/js", "libsecp256k1/static-context"] +wasm-web = ["rand", "getrandom/js", "libsecp256k1/static-context", "serde_json/std"] wasm-deterministic = ["getrandom/custom"] From 4aa3c14d9e0eea08fa5cf4693b1f792e765a59cd Mon Sep 17 00:00:00 2001 From: Francesco Leacche Date: Mon, 11 Aug 2025 17:10:05 +0100 Subject: [PATCH 03/13] fix cargo hack check --- Cargo.lock | 48 +++++++++++++++++++ Cargo.toml | 4 +- clarity/Cargo.toml | 2 +- .../tools/config-docs-generator/Cargo.toml | 8 ++-- stacks-common/Cargo.toml | 4 +- stacks-node/Cargo.toml | 2 +- 6 files changed, 58 insertions(+), 10 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8da367864f..522b8985fb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -324,6 +324,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "62565bb4402e926b29953c785397c6dc0391b7b446e45008b0049eb43cec6f5d" dependencies = [ "async-attributes", + "async-channel 1.9.0", + "async-global-executor", + "async-io 1.13.0", + "async-lock 2.8.0", + "crossbeam-utils", + "futures-channel", + "futures-core", + "futures-io", + "futures-lite 1.13.0", + "gloo-timers", + "kv-log-macro", + "log", + "memchr", + "once_cell", + "pin-project-lite", + "pin-utils", + "slab", + "wasm-bindgen-futures", ] [[package]] @@ -1191,6 +1209,18 @@ version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" +[[package]] +name = "gloo-timers" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b995a66bb87bebce9a0f4a95aed01daca4872c050bfcb21653361c03bc35e5c" +dependencies = [ + "futures-channel", + "futures-core", + "js-sys", + "wasm-bindgen", +] + [[package]] name = "h2" version = "0.3.26" @@ -1613,6 +1643,15 @@ dependencies = [ "winapi-build", ] +[[package]] +name = "kv-log-macro" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0de8b303297635ad57c9f5059fd9cee7a47f8e8daa09df0fcd07dd39fb22977f" +dependencies = [ + "log", +] + [[package]] name = "lazy_static" version = "1.4.0" @@ -1805,6 +1844,9 @@ name = "log" version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" +dependencies = [ + "value-bag", +] [[package]] name = "madhouse" @@ -3851,6 +3893,12 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" +[[package]] +name = "value-bag" +version = "1.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "943ce29a8a743eb10d6082545d861b24f9d1b160b7d741e0f2cdf726bec909c5" + [[package]] name = "vcpkg" version = "0.2.15" diff --git a/Cargo.toml b/Cargo.toml index c8e669fa84..8e67cf4813 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -34,7 +34,7 @@ serde = { version = "1", default-features = false } serde_derive = { version = "1", default-features = false } serde_json = { version = "1.0", default-features = false } sha2 = { version = "0.10", default-features = false, features = ["std"] } -slog = { version = "2.5.2", default-features = false, features = [ "max_level_trace" ] } +slog = { version = "2.5.2", default-features = false, features = [ "max_level_trace" ] } slog-json = { version = "2.3.0", default-features = false } slog-term = { version = "2.6.0", default-features = false } stdext = { version = "0.3.1", default-features = false } @@ -45,7 +45,7 @@ tempfile = { version = "3.3", default-features = false } tikv-jemallocator = { version = "0.5.4", default-features = false } thiserror = { version = "1.0.65", default-features = false } tracing = { version = "0.1.37", default-features = false } -tracing-subscriber = { version = "0.3.17", default-features = false } +tracing-subscriber = { version = "0.3.17", default-features = false, features = ["env-filter"] } tiny_http = { version = "0.12.0", default-features = false } toml = { version = "0.5.6", default-features = false } url = { version = "2.1.0", default-features = false } diff --git a/clarity/Cargo.toml b/clarity/Cargo.toml index 44efeaffda..4b1b9064b6 100644 --- a/clarity/Cargo.toml +++ b/clarity/Cargo.toml @@ -29,7 +29,7 @@ rstest = { workspace = true, optional = true } rstest_reuse = { workspace = true, optional = true } hashbrown = { workspace = true } rusqlite = { workspace = true, optional = true } -serde_json = { workspace = true, features = ["arbitrary_precision", "unbounded_depth"] } +serde_json = { workspace = true, features = ["std", "arbitrary_precision", "unbounded_depth"] } [dev-dependencies] assert-json-diff = { workspace = true } diff --git a/contrib/tools/config-docs-generator/Cargo.toml b/contrib/tools/config-docs-generator/Cargo.toml index 6ae6b9ef1d..96ffd7e4c6 100644 --- a/contrib/tools/config-docs-generator/Cargo.toml +++ b/contrib/tools/config-docs-generator/Cargo.toml @@ -18,11 +18,11 @@ path = "tests/integration.rs" [dependencies] serde = { workspace = true, features = ["derive"] } -serde_json = { workspace = true } -clap = { version = "4.0", features = ["derive"] } +serde_json = { workspace = true, features = ["std"] } +clap = { version = "4.0", default-features = false, features = ["std", "derive"] } regex = { workspace = true } -anyhow = "1.0" -once_cell = "1.18" +anyhow = { version = "1.0", default-features = false, features = ["std"] } +once_cell = { version = "1.18", default-features = false, features = ["std"] } # Add test dependencies [dev-dependencies] diff --git a/stacks-common/Cargo.toml b/stacks-common/Cargo.toml index ec67b50d0a..fe78b71edd 100644 --- a/stacks-common/Cargo.toml +++ b/stacks-common/Cargo.toml @@ -38,14 +38,14 @@ lazy_static = { workspace = true } ripemd = { workspace = true } serde = { workspace = true , features = ["derive"] } serde_derive = { workspace = true } -serde_json = { workspace = true, features = ["arbitrary_precision", "unbounded_depth"] } +serde_json = { workspace = true, features = ["std", "arbitrary_precision", "unbounded_depth"] } sha3 = { version = "0.10.1", default-features = false } slog = { workspace = true } slog-term = { workspace = true } # Optional dependencies getrandom = { version = "0.2", default-features = false, optional = true } -rand = { workspace = true, optional = true } +rand = { workspace = true, optional = true, features = ["std", "std_rng"] } slog-json = { workspace = true, optional = true } [target.'cfg(unix)'.dependencies] diff --git a/stacks-node/Cargo.toml b/stacks-node/Cargo.toml index 0d00bb6d2c..e02ffcddfa 100644 --- a/stacks-node/Cargo.toml +++ b/stacks-node/Cargo.toml @@ -28,7 +28,7 @@ rand = { workspace = true } hashbrown = { workspace = true } rusqlite = { workspace = true } async-h1 = { version = "2.3.2", default-features = false, optional = true } -async-std = { version = "1.6", default-features = false, optional = true, features = ["attributes"] } +async-std = { version = "1.6", optional = true, features = ["attributes"] } http-types = { version = "2.12", default-features = false, optional = true } thiserror = { workspace = true } From 8e975017534a49c5a27cf9acb229bebd10ace3ff Mon Sep 17 00:00:00 2001 From: Francesco Leacche Date: Mon, 11 Aug 2025 17:16:40 +0100 Subject: [PATCH 04/13] fix cargo clippy-stacks --- Cargo.toml | 2 +- stackslib/Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 8e67cf4813..0e4a0d4f32 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,7 +26,7 @@ nix = { version = "0.23", default-features = false } rand_core = { version = "0.6.4", default-features = false } rand = { version = "0.8", default-features = false } prometheus = { version = "0.9", default-features = false } -proptest = { version = "1.6.*", default-features = false } +proptest = { version = "1.6.*", default-features = false, features = ["std"] } regex = { version = "1", default-features = false } reqwest = { version = "0.11.22", default-features = false, features = ["blocking", "json", "rustls-tls"] } ripemd = { version = "0.1.1", default-features = false } diff --git a/stackslib/Cargo.toml b/stackslib/Cargo.toml index df6a7f550f..8dbb7bc875 100644 --- a/stackslib/Cargo.toml +++ b/stackslib/Cargo.toml @@ -81,7 +81,7 @@ mutants = { workspace = true } rlimit = { version = "0.10.2", default-features = false } chrono = { workspace = true } tempfile = { workspace = true } -proptest = { workspace = true, features = ["std"] } +proptest = { workspace = true } [features] default = [] From d64adccb25d89cb5f3f823789d9c3d4a7e166e22 Mon Sep 17 00:00:00 2001 From: Francesco Leacche Date: Mon, 11 Aug 2025 18:39:21 +0100 Subject: [PATCH 05/13] remove unused crates --- Cargo.lock | 5 ----- clarity/Cargo.toml | 2 +- contrib/tools/config-docs-generator/Cargo.toml | 2 +- libsigner/Cargo.toml | 1 - stacks-common/Cargo.toml | 2 +- stacks-node/Cargo.toml | 2 +- stacks-signer/Cargo.toml | 3 +-- stackslib/Cargo.toml | 9 --------- 8 files changed, 5 insertions(+), 21 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 522b8985fb..81b74aa1b1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1754,7 +1754,6 @@ dependencies = [ "libstackerdb 0.0.1", "mutants", "rand 0.8.5", - "rand_core 0.6.4", "serde", "serde_json", "slog", @@ -3192,7 +3191,6 @@ dependencies = [ "base64 0.12.3", "chrono", "clarity 0.0.1", - "hashbrown 0.15.2", "http-types", "lazy_static", "libc", @@ -3243,7 +3241,6 @@ dependencies = [ "lazy_static", "libsigner 0.0.1", "libstackerdb 0.0.1", - "num-traits", "prometheus", "rand 0.8.5", "rand_core 0.6.4", @@ -3308,7 +3305,6 @@ dependencies = [ "libstackerdb 0.0.1", "mio 0.6.23", "mutants", - "nix", "percent-encoding", "pox-locking 2.4.0", "prometheus", @@ -3336,7 +3332,6 @@ dependencies = [ "time 0.3.41", "toml", "url", - "winapi 0.3.9", ] [[package]] diff --git a/clarity/Cargo.toml b/clarity/Cargo.toml index 4b1b9064b6..96305521be 100644 --- a/clarity/Cargo.toml +++ b/clarity/Cargo.toml @@ -20,6 +20,7 @@ path = "./src/libclarity.rs" [dependencies] serde = { workspace = true } serde_derive = { workspace = true } +serde_json = { workspace = true, features = ["std", "arbitrary_precision", "unbounded_depth"] } regex = { workspace = true } lazy_static = { workspace = true } integer-sqrt = { version = "0.1.3", default-features = false } @@ -29,7 +30,6 @@ rstest = { workspace = true, optional = true } rstest_reuse = { workspace = true, optional = true } hashbrown = { workspace = true } rusqlite = { workspace = true, optional = true } -serde_json = { workspace = true, features = ["std", "arbitrary_precision", "unbounded_depth"] } [dev-dependencies] assert-json-diff = { workspace = true } diff --git a/contrib/tools/config-docs-generator/Cargo.toml b/contrib/tools/config-docs-generator/Cargo.toml index 96ffd7e4c6..5abba6c153 100644 --- a/contrib/tools/config-docs-generator/Cargo.toml +++ b/contrib/tools/config-docs-generator/Cargo.toml @@ -19,7 +19,7 @@ path = "tests/integration.rs" [dependencies] serde = { workspace = true, features = ["derive"] } serde_json = { workspace = true, features = ["std"] } -clap = { version = "4.0", default-features = false, features = ["std", "derive"] } +clap = { version = "4.0", features = ["derive"] } regex = { workspace = true } anyhow = { version = "1.0", default-features = false, features = ["std"] } once_cell = { version = "1.18", default-features = false, features = ["std"] } diff --git a/libsigner/Cargo.toml b/libsigner/Cargo.toml index 8aaeb31d74..af017ea0c8 100644 --- a/libsigner/Cargo.toml +++ b/libsigner/Cargo.toml @@ -31,7 +31,6 @@ tiny_http = { workspace = true } [dev-dependencies] mutants = { workspace = true } -rand_core = { workspace = true } rand = { workspace = true } stacks-common = { path = "../stacks-common", features = ["testing"] } diff --git a/stacks-common/Cargo.toml b/stacks-common/Cargo.toml index fe78b71edd..18b540bd80 100644 --- a/stacks-common/Cargo.toml +++ b/stacks-common/Cargo.toml @@ -87,7 +87,7 @@ developer-mode = [] # Enables graceful shutdown handling for Ctrl+C (SIGINT) signals. # This pulls in the `nix` or `winapi` dependency. ctrlc-handler = ["dep:nix", "dep:winapi"] -slog_json = ["slog-json"] +slog_json = ["dep:slog-json"] rusqlite = ["dep:rusqlite", "rand"] # Enables the rand module. This flag must be off on deterministic # platforms such as CosmWasm diff --git a/stacks-node/Cargo.toml b/stacks-node/Cargo.toml index e02ffcddfa..0c602e7e7d 100644 --- a/stacks-node/Cargo.toml +++ b/stacks-node/Cargo.toml @@ -25,7 +25,6 @@ regex = { workspace = true } libsigner = { path = "../libsigner" } url = { workspace = true } rand = { workspace = true } -hashbrown = { workspace = true } rusqlite = { workspace = true } async-h1 = { version = "2.3.2", default-features = false, optional = true } async-std = { version = "1.6", optional = true, features = ["attributes"] } @@ -37,6 +36,7 @@ signer_v3_1_0_0_13 = { package = "stacks-signer", git = "https://github.com/stac libsigner_v3_1_0_0_13 = { package = "libsigner", git = "https://github.com/stacks-network/stacks-core.git", rev="8a79aaa7df0f13dfc5ab0d0d0bcb8201c90bcba2", optional = true} stacks_v3_1_00_13 = { package = "stackslib", git = "https://github.com/stacks-network/stacks-core.git", rev="8a79aaa7df0f13dfc5ab0d0d0bcb8201c90bcba2", optional = true, features = ["testing", "default"]} stacks_common_v3_1_00_13 = { package = "stacks-common", git = "https://github.com/stacks-network/stacks-core.git", rev="8a79aaa7df0f13dfc5ab0d0d0bcb8201c90bcba2", optional = true, features = ["testing", "default"]} + [target.'cfg(not(any(target_os = "macos", target_os="windows", target_arch = "arm")))'.dependencies] tikv-jemallocator = { workspace = true } diff --git a/stacks-signer/Cargo.toml b/stacks-signer/Cargo.toml index eb487180f8..46400d5e5f 100644 --- a/stacks-signer/Cargo.toml +++ b/stacks-signer/Cargo.toml @@ -22,7 +22,7 @@ path = "src/main.rs" [dependencies] backoff = { version = "0.4", default-features = false } clarity = { path = "../clarity" } -clap = { version = "4.1.1", default-features = false, features = ["std", "derive", "env"] } +clap = { version = "4.1.1", features = ["derive", "env"] } hashbrown = { workspace = true } lazy_static = { workspace = true } libsigner = { path = "../libsigner" } @@ -49,7 +49,6 @@ rusqlite = { workspace = true, features = ["functions"] } [dev-dependencies] clarity = { path = "../clarity", features = ["testing"] } stacks-common = { path = "../stacks-common", features = ["testing"] } -num-traits = { version = "0.2.18", default-features = false } stdext = { workspace = true } [features] diff --git a/stackslib/Cargo.toml b/stackslib/Cargo.toml index 8dbb7bc875..88755eb987 100644 --- a/stackslib/Cargo.toml +++ b/stackslib/Cargo.toml @@ -60,15 +60,6 @@ toml = { workspace = true } [target.'cfg(not(any(target_os = "macos",target_os="windows", target_arch = "arm" )))'.dependencies] tikv-jemallocator = { workspace = true } -[target.'cfg(unix)'.dependencies] -nix = { workspace = true } - -[target.'cfg(windows)'.dependencies] -winapi = { workspace = true, features = ["consoleapi", "handleapi", "synchapi", "winbase"] } - -[target.'cfg(windows)'.dev-dependencies] -winapi = { workspace = true, features = ["fileapi", "processenv", "winnt"] } - [dev-dependencies] assert-json-diff = { workspace = true } stdext = { workspace = true } From f4e095fe67093e8a9d024648783ab04084dd6bf5 Mon Sep 17 00:00:00 2001 From: Francesco Leacche Date: Tue, 12 Aug 2025 10:39:33 +0100 Subject: [PATCH 06/13] split test crates. move dep-only deps --- Cargo.lock | 1 - Cargo.toml | 17 ++++++++++------- stacks-signer/Cargo.toml | 2 +- stackslib/Cargo.toml | 1 - 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 81b74aa1b1..255765bc4d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3311,7 +3311,6 @@ dependencies = [ "proptest", "rand 0.8.5", "rand_chacha 0.3.1", - "rand_core 0.6.4", "regex", "ripemd", "rlimit", diff --git a/Cargo.toml b/Cargo.toml index 0e4a0d4f32..cc8c9973cf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,18 +15,16 @@ members = [ # Dependencies we want to keep the same between workspace members [workspace.dependencies] -assert-json-diff = { version = "1.0.0", default-features = false } + +# Crates.io chrono = { version = "0.4.41", default-features = false } ed25519-dalek = { version = "2.1.1", default-features = false } hashbrown = { version = "0.15.2", features = ["serde"] } lazy_static = { version = "1.4.0", default-features = false } libc = { version = "0.2.151", default-features = false } -mutants = { version = "0.0.3", default-features = false } nix = { version = "0.23", default-features = false } -rand_core = { version = "0.6.4", default-features = false } rand = { version = "0.8", default-features = false } prometheus = { version = "0.9", default-features = false } -proptest = { version = "1.6.*", default-features = false, features = ["std"] } regex = { version = "1", default-features = false } reqwest = { version = "0.11.22", default-features = false, features = ["blocking", "json", "rustls-tls"] } ripemd = { version = "0.1.1", default-features = false } @@ -38,10 +36,7 @@ slog = { version = "2.5.2", default-features = false, features = [ "max_level_tr slog-json = { version = "2.3.0", default-features = false } slog-term = { version = "2.6.0", default-features = false } stdext = { version = "0.3.1", default-features = false } -rstest = { version = "0.17.0", default-features = false } -rstest_reuse = { version = "0.5.0", default-features = false } rusqlite = { version = "0.31.0", default-features = false, features = ["blob", "serde_json", "i128_blob", "bundled", "trace"] } -tempfile = { version = "3.3", default-features = false } tikv-jemallocator = { version = "0.5.4", default-features = false } thiserror = { version = "1.0.65", default-features = false } tracing = { version = "0.1.37", default-features = false } @@ -51,6 +46,14 @@ toml = { version = "0.5.6", default-features = false } url = { version = "2.1.0", default-features = false } winapi = { version = "0.3", default-features = false } +# Tests-only +assert-json-diff = { version = "1.0.0", default-features = false } +mutants = { version = "0.0.3", default-features = false } +proptest = { version = "1.6.*", default-features = false, features = ["std"] } +rstest = { version = "0.17.0", default-features = false } +rstest_reuse = { version = "0.5.0", default-features = false } +tempfile = { version = "3.3", default-features = false } + # Use a bit more than default optimization for # dev builds to speed up test execution [profile.dev] diff --git a/stacks-signer/Cargo.toml b/stacks-signer/Cargo.toml index 46400d5e5f..1efcd6d57e 100644 --- a/stacks-signer/Cargo.toml +++ b/stacks-signer/Cargo.toml @@ -28,7 +28,6 @@ lazy_static = { workspace = true } libsigner = { path = "../libsigner" } libstackerdb = { path = "../libstackerdb" } prometheus = { workspace = true, optional = true } -rand_core = { workspace = true } reqwest = { workspace = true } serde = { workspace = true } serde_json = { workspace = true, features = ["arbitrary_precision", "unbounded_depth"] } @@ -48,6 +47,7 @@ rusqlite = { workspace = true, features = ["functions"] } [dev-dependencies] clarity = { path = "../clarity", features = ["testing"] } +rand_core = { version = "0.6.4", default-features = false } stacks-common = { path = "../stacks-common", features = ["testing"] } stdext = { workspace = true } diff --git a/stackslib/Cargo.toml b/stackslib/Cargo.toml index 88755eb987..f5c8f3dcb5 100644 --- a/stackslib/Cargo.toml +++ b/stackslib/Cargo.toml @@ -33,7 +33,6 @@ path = "src/blockstack_cli.rs" [dependencies] ed25519-dalek = { workspace = true } rand = { workspace = true } -rand_core = { workspace = true } rand_chacha = { version = "0.3.1", default-features = false } serde = { workspace = true } serde_derive = { workspace = true } From 915fcf544b14d0d8f377b0f3ac1b6140cde78bc3 Mon Sep 17 00:00:00 2001 From: Francesco Leacche Date: Tue, 12 Aug 2025 10:50:22 +0100 Subject: [PATCH 07/13] remove config-docs-generator from workspace --- Cargo.lock | 86 --- Cargo.toml | 4 +- .../tools/config-docs-generator/Cargo.lock | 558 ++++++++++++++++++ .../tools/config-docs-generator/Cargo.toml | 10 +- 4 files changed, 566 insertions(+), 92 deletions(-) create mode 100644 contrib/tools/config-docs-generator/Cargo.lock diff --git a/Cargo.lock b/Cargo.lock index 255765bc4d..f3b19abb1f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -152,22 +152,6 @@ dependencies = [ "serde_json", ] -[[package]] -name = "assert_cmd" -version = "2.0.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bd389a4b2970a01282ee455294913c0a43724daedcd1a24c3eb0ec1c1320b66" -dependencies = [ - "anstyle", - "bstr", - "doc-comment", - "libc", - "predicates", - "predicates-core", - "predicates-tree", - "wait-timeout", -] - [[package]] name = "async-attributes" version = "1.1.2" @@ -490,17 +474,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "bstr" -version = "1.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "234113d19d0d7d613b40e86fb654acf958910802bcceab913a4f9e7cda03b1a4" -dependencies = [ - "memchr", - "regex-automata 0.4.5", - "serde", -] - [[package]] name = "bumpalo" version = "3.14.0" @@ -668,20 +641,6 @@ dependencies = [ "crossbeam-utils", ] -[[package]] -name = "config-docs-generator" -version = "0.1.0" -dependencies = [ - "anyhow", - "assert_cmd", - "clap", - "once_cell", - "regex", - "serde", - "serde_json", - "tempfile", -] - [[package]] name = "const-oid" version = "0.9.6" @@ -807,12 +766,6 @@ dependencies = [ "powerfmt", ] -[[package]] -name = "difflib" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6184e33543162437515c2e2b48714794e37845ec9851711914eec9d308f6ebe8" - [[package]] name = "digest" version = "0.9.0" @@ -859,12 +812,6 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "212d0f5754cb6769937f4501cc0e67f4f4483c8d2c3e1e922ee9edbe4ab4c7c0" -[[package]] -name = "doc-comment" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" - [[package]] name = "ed25519" version = "2.2.3" @@ -2245,33 +2192,6 @@ version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" -[[package]] -name = "predicates" -version = "3.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5d19ee57562043d37e82899fade9a22ebab7be9cef5026b07fda9cdd4293573" -dependencies = [ - "anstyle", - "difflib", - "predicates-core", -] - -[[package]] -name = "predicates-core" -version = "1.0.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "727e462b119fe9c93fd0eb1429a5f7647394014cf3c04ab2c0350eeb09095ffa" - -[[package]] -name = "predicates-tree" -version = "1.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72dd2d6d381dfb73a193c7fca536518d7caee39fc8503f74e7dc0be0531b425c" -dependencies = [ - "predicates-core", - "termtree", -] - [[package]] name = "proc-macro-error" version = "1.0.4" @@ -3526,12 +3446,6 @@ dependencies = [ "winapi 0.3.9", ] -[[package]] -name = "termtree" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f50febec83f5ee1df3015341d8bd429f2d1cc62bcba7ea2076759d315084683" - [[package]] name = "thiserror" version = "1.0.65" diff --git a/Cargo.toml b/Cargo.toml index cc8c9973cf..3d0c3c213c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,9 @@ members = [ "libsigner", "stacks-signer", "stacks-node", - "contrib/tools/config-docs-generator"] +] + +exclude = ["contrib/tools/config-docs-generator"] # Dependencies we want to keep the same between workspace members [workspace.dependencies] diff --git a/contrib/tools/config-docs-generator/Cargo.lock b/contrib/tools/config-docs-generator/Cargo.lock new file mode 100644 index 0000000000..fb511e43a1 --- /dev/null +++ b/contrib/tools/config-docs-generator/Cargo.lock @@ -0,0 +1,558 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "anstream" +version = "0.6.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ae563653d1938f79b1ab1b5e668c87c76a9930414574a6583a7b7e11a8e6192" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "862ed96ca487e809f1c8e5a8447f6ee2cf102f846893800b20cebdf541fc6bbd" + +[[package]] +name = "anstyle-parse" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e231f6134f61b71076a3eab506c379d4f36122f2af15a9ff04415ea4c3339e2" +dependencies = [ + "windows-sys 0.60.2", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e0633414522a32ffaac8ac6cc8f748e090c5717661fddeea04219e2344f5f2a" +dependencies = [ + "anstyle", + "once_cell_polyfill", + "windows-sys 0.60.2", +] + +[[package]] +name = "anyhow" +version = "1.0.99" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0674a1ddeecb70197781e945de4b3b8ffb61fa939a5597bcf48503737663100" + +[[package]] +name = "assert_cmd" +version = "2.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bd389a4b2970a01282ee455294913c0a43724daedcd1a24c3eb0ec1c1320b66" +dependencies = [ + "anstyle", + "bstr", + "doc-comment", + "libc", + "predicates", + "predicates-core", + "predicates-tree", + "wait-timeout", +] + +[[package]] +name = "bitflags" +version = "2.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b8e56985ec62d17e9c1001dc89c88ecd7dc08e47eba5ec7c29c7b5eeecde967" + +[[package]] +name = "bstr" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "234113d19d0d7d613b40e86fb654acf958910802bcceab913a4f9e7cda03b1a4" +dependencies = [ + "memchr", + "regex-automata", + "serde", +] + +[[package]] +name = "clap" +version = "4.5.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c1f056bae57e3e54c3375c41ff79619ddd13460a17d7438712bd0d83fda4ff8" +dependencies = [ + "clap_builder", + "clap_derive", +] + +[[package]] +name = "clap_builder" +version = "4.5.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3e7f4214277f3c7aa526a59dd3fbe306a370daee1f8b7b8c987069cd8e888a8" +dependencies = [ + "anstream", + "anstyle", + "clap_lex", + "strsim", +] + +[[package]] +name = "clap_derive" +version = "4.5.41" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef4f52386a59ca4c860f7393bcf8abd8dfd91ecccc0f774635ff68e92eeef491" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "clap_lex" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b94f61472cee1439c0b966b47e3aca9ae07e45d070759512cd390ea2bebc6675" + +[[package]] +name = "colorchoice" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" + +[[package]] +name = "config-docs-generator" +version = "0.1.0" +dependencies = [ + "anyhow", + "assert_cmd", + "clap", + "once_cell", + "regex", + "serde", + "serde_json", + "tempfile", +] + +[[package]] +name = "difflib" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6184e33543162437515c2e2b48714794e37845ec9851711914eec9d308f6ebe8" + +[[package]] +name = "doc-comment" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" + +[[package]] +name = "errno" +version = "0.3.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "778e2ac28f6c47af28e4907f13ffd1e1ddbd400980a9abd7c8df189bf578a5ad" +dependencies = [ + "libc", + "windows-sys 0.60.2", +] + +[[package]] +name = "fastrand" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "is_terminal_polyfill" +version = "1.70.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" + +[[package]] +name = "itoa" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" + +[[package]] +name = "libc" +version = "0.2.175" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a82ae493e598baaea5209805c49bbf2ea7de956d50d7da0da1164f9c6d28543" + +[[package]] +name = "linux-raw-sys" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd945864f07fe9f5371a27ad7b52a172b4b499999f1d97574c9fa68373937e12" + +[[package]] +name = "memchr" +version = "2.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0" + +[[package]] +name = "once_cell" +version = "1.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" + +[[package]] +name = "once_cell_polyfill" +version = "1.70.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4895175b425cb1f87721b59f0f286c2092bd4af812243672510e1ac53e2e0ad" + +[[package]] +name = "predicates" +version = "3.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5d19ee57562043d37e82899fade9a22ebab7be9cef5026b07fda9cdd4293573" +dependencies = [ + "anstyle", + "difflib", + "predicates-core", +] + +[[package]] +name = "predicates-core" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "727e462b119fe9c93fd0eb1429a5f7647394014cf3c04ab2c0350eeb09095ffa" + +[[package]] +name = "predicates-tree" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72dd2d6d381dfb73a193c7fca536518d7caee39fc8503f74e7dc0be0531b425c" +dependencies = [ + "predicates-core", + "termtree", +] + +[[package]] +name = "proc-macro2" +version = "1.0.97" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d61789d7719defeb74ea5fe81f2fdfdbd28a803847077cecce2ff14e1472f6f1" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "regex" +version = "1.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" +dependencies = [ + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" +dependencies = [ + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" + +[[package]] +name = "rustix" +version = "1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11181fbabf243db407ef8df94a6ce0b2f9a733bd8be4ad02b4eda9602296cac8" +dependencies = [ + "bitflags", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.60.2", +] + +[[package]] +name = "ryu" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" + +[[package]] +name = "serde" +version = "1.0.219" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.219" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_json" +version = "1.0.142" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "030fedb782600dcbd6f02d479bf0d817ac3bb40d644745b769d6a96bc3afc5a7" +dependencies = [ + "itoa", + "memchr", + "ryu", + "serde", +] + +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + +[[package]] +name = "syn" +version = "2.0.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17b6f705963418cdb9927482fa304bc562ece2fdd4f616084c50b7023b435a40" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "tempfile" +version = "3.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8a64e3985349f2441a1a9ef0b853f869006c3855f2cda6862a94d26ebb9d6a1" +dependencies = [ + "fastrand", + "once_cell", + "rustix", + "windows-sys 0.59.0", +] + +[[package]] +name = "termtree" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f50febec83f5ee1df3015341d8bd429f2d1cc62bcba7ea2076759d315084683" + +[[package]] +name = "unicode-ident" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" + +[[package]] +name = "utf8parse" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" + +[[package]] +name = "wait-timeout" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ac3b126d3914f9849036f826e054cbabdc8519970b8998ddaf3b5bd3c65f11" +dependencies = [ + "libc", +] + +[[package]] +name = "windows-link" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" +dependencies = [ + "windows-targets 0.53.3", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm 0.52.6", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", +] + +[[package]] +name = "windows-targets" +version = "0.53.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5fe6031c4041849d7c496a8ded650796e7b6ecc19df1a431c1a363342e5dc91" +dependencies = [ + "windows-link", + "windows_aarch64_gnullvm 0.53.0", + "windows_aarch64_msvc 0.53.0", + "windows_i686_gnu 0.53.0", + "windows_i686_gnullvm 0.53.0", + "windows_i686_msvc 0.53.0", + "windows_x86_64_gnu 0.53.0", + "windows_x86_64_gnullvm 0.53.0", + "windows_x86_64_msvc 0.53.0", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnu" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_i686_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" diff --git a/contrib/tools/config-docs-generator/Cargo.toml b/contrib/tools/config-docs-generator/Cargo.toml index 5abba6c153..89823eb4e7 100644 --- a/contrib/tools/config-docs-generator/Cargo.toml +++ b/contrib/tools/config-docs-generator/Cargo.toml @@ -17,14 +17,14 @@ name = "integration" path = "tests/integration.rs" [dependencies] -serde = { workspace = true, features = ["derive"] } -serde_json = { workspace = true, features = ["std"] } -clap = { version = "4.0", features = ["derive"] } -regex = { workspace = true } +serde = { version = "1", default-features=false, features = ["derive"] } +serde_json = { version = "1.0", default-features = false, features = ["std"] } +clap = { version = "4.1.1", features = ["derive"] } +regex = { version = "1", default-features = false } anyhow = { version = "1.0", default-features = false, features = ["std"] } once_cell = { version = "1.18", default-features = false, features = ["std"] } # Add test dependencies [dev-dependencies] -tempfile = { workspace = true } +tempfile = { version = "3.3", default-features = false } assert_cmd = { version = "2.0", default-features = false } From 4037c6f9cca703a5da1c5c7edda0c783c18d1403 Mon Sep 17 00:00:00 2001 From: Francesco Leacche Date: Tue, 12 Aug 2025 12:01:48 +0100 Subject: [PATCH 08/13] Revert "remove config-docs-generator from workspace" This reverts commit 915fcf544b14d0d8f377b0f3ac1b6140cde78bc3. --- Cargo.lock | 86 +++ Cargo.toml | 4 +- .../tools/config-docs-generator/Cargo.lock | 558 ------------------ .../tools/config-docs-generator/Cargo.toml | 10 +- 4 files changed, 92 insertions(+), 566 deletions(-) delete mode 100644 contrib/tools/config-docs-generator/Cargo.lock diff --git a/Cargo.lock b/Cargo.lock index f3b19abb1f..255765bc4d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -152,6 +152,22 @@ dependencies = [ "serde_json", ] +[[package]] +name = "assert_cmd" +version = "2.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bd389a4b2970a01282ee455294913c0a43724daedcd1a24c3eb0ec1c1320b66" +dependencies = [ + "anstyle", + "bstr", + "doc-comment", + "libc", + "predicates", + "predicates-core", + "predicates-tree", + "wait-timeout", +] + [[package]] name = "async-attributes" version = "1.1.2" @@ -474,6 +490,17 @@ dependencies = [ "tracing", ] +[[package]] +name = "bstr" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "234113d19d0d7d613b40e86fb654acf958910802bcceab913a4f9e7cda03b1a4" +dependencies = [ + "memchr", + "regex-automata 0.4.5", + "serde", +] + [[package]] name = "bumpalo" version = "3.14.0" @@ -641,6 +668,20 @@ dependencies = [ "crossbeam-utils", ] +[[package]] +name = "config-docs-generator" +version = "0.1.0" +dependencies = [ + "anyhow", + "assert_cmd", + "clap", + "once_cell", + "regex", + "serde", + "serde_json", + "tempfile", +] + [[package]] name = "const-oid" version = "0.9.6" @@ -766,6 +807,12 @@ dependencies = [ "powerfmt", ] +[[package]] +name = "difflib" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6184e33543162437515c2e2b48714794e37845ec9851711914eec9d308f6ebe8" + [[package]] name = "digest" version = "0.9.0" @@ -812,6 +859,12 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "212d0f5754cb6769937f4501cc0e67f4f4483c8d2c3e1e922ee9edbe4ab4c7c0" +[[package]] +name = "doc-comment" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" + [[package]] name = "ed25519" version = "2.2.3" @@ -2192,6 +2245,33 @@ version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +[[package]] +name = "predicates" +version = "3.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5d19ee57562043d37e82899fade9a22ebab7be9cef5026b07fda9cdd4293573" +dependencies = [ + "anstyle", + "difflib", + "predicates-core", +] + +[[package]] +name = "predicates-core" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "727e462b119fe9c93fd0eb1429a5f7647394014cf3c04ab2c0350eeb09095ffa" + +[[package]] +name = "predicates-tree" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72dd2d6d381dfb73a193c7fca536518d7caee39fc8503f74e7dc0be0531b425c" +dependencies = [ + "predicates-core", + "termtree", +] + [[package]] name = "proc-macro-error" version = "1.0.4" @@ -3446,6 +3526,12 @@ dependencies = [ "winapi 0.3.9", ] +[[package]] +name = "termtree" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f50febec83f5ee1df3015341d8bd429f2d1cc62bcba7ea2076759d315084683" + [[package]] name = "thiserror" version = "1.0.65" diff --git a/Cargo.toml b/Cargo.toml index 3d0c3c213c..cc8c9973cf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,9 +11,7 @@ members = [ "libsigner", "stacks-signer", "stacks-node", -] - -exclude = ["contrib/tools/config-docs-generator"] + "contrib/tools/config-docs-generator"] # Dependencies we want to keep the same between workspace members [workspace.dependencies] diff --git a/contrib/tools/config-docs-generator/Cargo.lock b/contrib/tools/config-docs-generator/Cargo.lock deleted file mode 100644 index fb511e43a1..0000000000 --- a/contrib/tools/config-docs-generator/Cargo.lock +++ /dev/null @@ -1,558 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 4 - -[[package]] -name = "anstream" -version = "0.6.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ae563653d1938f79b1ab1b5e668c87c76a9930414574a6583a7b7e11a8e6192" -dependencies = [ - "anstyle", - "anstyle-parse", - "anstyle-query", - "anstyle-wincon", - "colorchoice", - "is_terminal_polyfill", - "utf8parse", -] - -[[package]] -name = "anstyle" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "862ed96ca487e809f1c8e5a8447f6ee2cf102f846893800b20cebdf541fc6bbd" - -[[package]] -name = "anstyle-parse" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2" -dependencies = [ - "utf8parse", -] - -[[package]] -name = "anstyle-query" -version = "1.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e231f6134f61b71076a3eab506c379d4f36122f2af15a9ff04415ea4c3339e2" -dependencies = [ - "windows-sys 0.60.2", -] - -[[package]] -name = "anstyle-wincon" -version = "3.0.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e0633414522a32ffaac8ac6cc8f748e090c5717661fddeea04219e2344f5f2a" -dependencies = [ - "anstyle", - "once_cell_polyfill", - "windows-sys 0.60.2", -] - -[[package]] -name = "anyhow" -version = "1.0.99" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0674a1ddeecb70197781e945de4b3b8ffb61fa939a5597bcf48503737663100" - -[[package]] -name = "assert_cmd" -version = "2.0.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bd389a4b2970a01282ee455294913c0a43724daedcd1a24c3eb0ec1c1320b66" -dependencies = [ - "anstyle", - "bstr", - "doc-comment", - "libc", - "predicates", - "predicates-core", - "predicates-tree", - "wait-timeout", -] - -[[package]] -name = "bitflags" -version = "2.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b8e56985ec62d17e9c1001dc89c88ecd7dc08e47eba5ec7c29c7b5eeecde967" - -[[package]] -name = "bstr" -version = "1.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "234113d19d0d7d613b40e86fb654acf958910802bcceab913a4f9e7cda03b1a4" -dependencies = [ - "memchr", - "regex-automata", - "serde", -] - -[[package]] -name = "clap" -version = "4.5.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c1f056bae57e3e54c3375c41ff79619ddd13460a17d7438712bd0d83fda4ff8" -dependencies = [ - "clap_builder", - "clap_derive", -] - -[[package]] -name = "clap_builder" -version = "4.5.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3e7f4214277f3c7aa526a59dd3fbe306a370daee1f8b7b8c987069cd8e888a8" -dependencies = [ - "anstream", - "anstyle", - "clap_lex", - "strsim", -] - -[[package]] -name = "clap_derive" -version = "4.5.41" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef4f52386a59ca4c860f7393bcf8abd8dfd91ecccc0f774635ff68e92eeef491" -dependencies = [ - "heck", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "clap_lex" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b94f61472cee1439c0b966b47e3aca9ae07e45d070759512cd390ea2bebc6675" - -[[package]] -name = "colorchoice" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" - -[[package]] -name = "config-docs-generator" -version = "0.1.0" -dependencies = [ - "anyhow", - "assert_cmd", - "clap", - "once_cell", - "regex", - "serde", - "serde_json", - "tempfile", -] - -[[package]] -name = "difflib" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6184e33543162437515c2e2b48714794e37845ec9851711914eec9d308f6ebe8" - -[[package]] -name = "doc-comment" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" - -[[package]] -name = "errno" -version = "0.3.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "778e2ac28f6c47af28e4907f13ffd1e1ddbd400980a9abd7c8df189bf578a5ad" -dependencies = [ - "libc", - "windows-sys 0.60.2", -] - -[[package]] -name = "fastrand" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" - -[[package]] -name = "heck" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" - -[[package]] -name = "is_terminal_polyfill" -version = "1.70.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" - -[[package]] -name = "itoa" -version = "1.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" - -[[package]] -name = "libc" -version = "0.2.175" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a82ae493e598baaea5209805c49bbf2ea7de956d50d7da0da1164f9c6d28543" - -[[package]] -name = "linux-raw-sys" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd945864f07fe9f5371a27ad7b52a172b4b499999f1d97574c9fa68373937e12" - -[[package]] -name = "memchr" -version = "2.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0" - -[[package]] -name = "once_cell" -version = "1.21.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" - -[[package]] -name = "once_cell_polyfill" -version = "1.70.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4895175b425cb1f87721b59f0f286c2092bd4af812243672510e1ac53e2e0ad" - -[[package]] -name = "predicates" -version = "3.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5d19ee57562043d37e82899fade9a22ebab7be9cef5026b07fda9cdd4293573" -dependencies = [ - "anstyle", - "difflib", - "predicates-core", -] - -[[package]] -name = "predicates-core" -version = "1.0.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "727e462b119fe9c93fd0eb1429a5f7647394014cf3c04ab2c0350eeb09095ffa" - -[[package]] -name = "predicates-tree" -version = "1.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72dd2d6d381dfb73a193c7fca536518d7caee39fc8503f74e7dc0be0531b425c" -dependencies = [ - "predicates-core", - "termtree", -] - -[[package]] -name = "proc-macro2" -version = "1.0.97" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d61789d7719defeb74ea5fe81f2fdfdbd28a803847077cecce2ff14e1472f6f1" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "quote" -version = "1.0.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "regex" -version = "1.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" -dependencies = [ - "regex-automata", - "regex-syntax", -] - -[[package]] -name = "regex-automata" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" -dependencies = [ - "regex-syntax", -] - -[[package]] -name = "regex-syntax" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" - -[[package]] -name = "rustix" -version = "1.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11181fbabf243db407ef8df94a6ce0b2f9a733bd8be4ad02b4eda9602296cac8" -dependencies = [ - "bitflags", - "errno", - "libc", - "linux-raw-sys", - "windows-sys 0.60.2", -] - -[[package]] -name = "ryu" -version = "1.0.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" - -[[package]] -name = "serde" -version = "1.0.219" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_derive" -version = "1.0.219" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "serde_json" -version = "1.0.142" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "030fedb782600dcbd6f02d479bf0d817ac3bb40d644745b769d6a96bc3afc5a7" -dependencies = [ - "itoa", - "memchr", - "ryu", - "serde", -] - -[[package]] -name = "strsim" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" - -[[package]] -name = "syn" -version = "2.0.104" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17b6f705963418cdb9927482fa304bc562ece2fdd4f616084c50b7023b435a40" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "tempfile" -version = "3.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8a64e3985349f2441a1a9ef0b853f869006c3855f2cda6862a94d26ebb9d6a1" -dependencies = [ - "fastrand", - "once_cell", - "rustix", - "windows-sys 0.59.0", -] - -[[package]] -name = "termtree" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f50febec83f5ee1df3015341d8bd429f2d1cc62bcba7ea2076759d315084683" - -[[package]] -name = "unicode-ident" -version = "1.0.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" - -[[package]] -name = "utf8parse" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" - -[[package]] -name = "wait-timeout" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09ac3b126d3914f9849036f826e054cbabdc8519970b8998ddaf3b5bd3c65f11" -dependencies = [ - "libc", -] - -[[package]] -name = "windows-link" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" - -[[package]] -name = "windows-sys" -version = "0.59.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" -dependencies = [ - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-sys" -version = "0.60.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" -dependencies = [ - "windows-targets 0.53.3", -] - -[[package]] -name = "windows-targets" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" -dependencies = [ - "windows_aarch64_gnullvm 0.52.6", - "windows_aarch64_msvc 0.52.6", - "windows_i686_gnu 0.52.6", - "windows_i686_gnullvm 0.52.6", - "windows_i686_msvc 0.52.6", - "windows_x86_64_gnu 0.52.6", - "windows_x86_64_gnullvm 0.52.6", - "windows_x86_64_msvc 0.52.6", -] - -[[package]] -name = "windows-targets" -version = "0.53.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5fe6031c4041849d7c496a8ded650796e7b6ecc19df1a431c1a363342e5dc91" -dependencies = [ - "windows-link", - "windows_aarch64_gnullvm 0.53.0", - "windows_aarch64_msvc 0.53.0", - "windows_i686_gnu 0.53.0", - "windows_i686_gnullvm 0.53.0", - "windows_i686_msvc 0.53.0", - "windows_x86_64_gnu 0.53.0", - "windows_x86_64_gnullvm 0.53.0", - "windows_x86_64_msvc 0.53.0", -] - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c" - -[[package]] -name = "windows_i686_gnu" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" - -[[package]] -name = "windows_i686_gnu" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3" - -[[package]] -name = "windows_i686_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" - -[[package]] -name = "windows_i686_gnullvm" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11" - -[[package]] -name = "windows_i686_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" - -[[package]] -name = "windows_i686_msvc" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" diff --git a/contrib/tools/config-docs-generator/Cargo.toml b/contrib/tools/config-docs-generator/Cargo.toml index 89823eb4e7..5abba6c153 100644 --- a/contrib/tools/config-docs-generator/Cargo.toml +++ b/contrib/tools/config-docs-generator/Cargo.toml @@ -17,14 +17,14 @@ name = "integration" path = "tests/integration.rs" [dependencies] -serde = { version = "1", default-features=false, features = ["derive"] } -serde_json = { version = "1.0", default-features = false, features = ["std"] } -clap = { version = "4.1.1", features = ["derive"] } -regex = { version = "1", default-features = false } +serde = { workspace = true, features = ["derive"] } +serde_json = { workspace = true, features = ["std"] } +clap = { version = "4.0", features = ["derive"] } +regex = { workspace = true } anyhow = { version = "1.0", default-features = false, features = ["std"] } once_cell = { version = "1.18", default-features = false, features = ["std"] } # Add test dependencies [dev-dependencies] -tempfile = { version = "3.3", default-features = false } +tempfile = { workspace = true } assert_cmd = { version = "2.0", default-features = false } From 69802531ef6c39eaa8cb179d83e7e88e3a67e12e Mon Sep 17 00:00:00 2001 From: Francesco Leacche Date: Tue, 12 Aug 2025 16:15:48 +0100 Subject: [PATCH 09/13] move all deps to workspace. format cargo files --- Cargo.toml | 74 ++++++++--- clarity-serialization/Cargo.toml | 37 ++++-- clarity/Cargo.toml | 73 ++++++----- .../tools/config-docs-generator/Cargo.toml | 20 +-- libsigner/Cargo.toml | 45 ++++--- libstackerdb/Cargo.toml | 28 ++-- pox-locking/Cargo.toml | 37 ++++-- stacks-common/Cargo.toml | 106 +++++++-------- stacks-node/Cargo.toml | 123 ++++++++++-------- stacks-signer/Cargo.toml | 71 +++++----- stackslib/Cargo.toml | 111 +++++++++------- stx-genesis/Cargo.toml | 13 +- 12 files changed, 427 insertions(+), 311 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index cc8c9973cf..45fd6871da 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,58 +1,100 @@ [workspace] -resolver = "2" +resolver = "3" members = [ - "stackslib", - "stacks-common", - "pox-locking", - "clarity-serialization", "clarity", - "stx-genesis", - "libstackerdb", + "clarity-serialization", + "contrib/tools/config-docs-generator", "libsigner", - "stacks-signer", + "libstackerdb", + "pox-locking", + "stacks-common", "stacks-node", - "contrib/tools/config-docs-generator"] + "stacks-signer", + "stackslib", + "stx-genesis", +] -# Dependencies we want to keep the same between workspace members [workspace.dependencies] +# Local Crates +clarity = { path = "./clarity", default-features = false } +clarity-serialization = { path = "./clarity-serialization", default-features = false } +libsigner = { path = "./libsigner", default-features = false } +libstackerdb = { path = "./libstackerdb", default-features = false } +pox-locking = { path = "./pox-locking", default-features = false } +stacks = { package = "stackslib", path = "./stackslib", default-features = false } # Alias for stackslib +stacks-common = { path = "./stacks-common", default-features = false } +stacks-signer = { path = "./stacks-signer", default-features = false } +stackslib = { path = "./stackslib", default-features = false } +stx-genesis = { path = "./stx-genesis", default-features = false } + +# Stacks' dependencies +madhouse = { git = "https://github.com/stacks-network/madhouse-rs.git", default-features = false, tag = "0.2.0" } +pinny = { git = "https://github.com/BitcoinL2-Labs/pinny-rs.git", default-features = false, rev = "54ba9d533a7b84525a5e65a3eae1a3ae76b9ea49" } #v0.0.2 # Crates.io +async-h1 = { version = "2.3.2", default-features = false } +async-std = { version = "1.6", features = ["attributes"] } # requires default features +backoff = { version = "0.4", default-features = false } +backtrace = { version = "0.3.50", default-features = false, features = ["std"] } +base64 = { version = "0.12.0", default-features = false, features = ["std"] } chrono = { version = "0.4.41", default-features = false } +clap = { version = "4.1.1", features = ["derive", "env"] } +curve25519-dalek = { version = "4.1.3", default-features = false, features = ["serde"] } ed25519-dalek = { version = "2.1.1", default-features = false } +getrandom = { version = "0.2", default-features = false } hashbrown = { version = "0.15.2", features = ["serde"] } +http-types = { version = "2.12", default-features = false } +integer-sqrt = { version = "0.1.3", default-features = false } lazy_static = { version = "1.4.0", default-features = false } libc = { version = "0.2.151", default-features = false } +libflate = { version = "1.0.3", default-features = false } +libsecp256k1 = { version = "0.7.0", default-features = false, features = ["hmac"] } +mio = { version = "0.6", default-features = false } nix = { version = "0.23", default-features = false } -rand = { version = "0.8", default-features = false } +percent-encoding = { version = "2.1.0", default-features = false } +pico-args = { version = "0.5.0", default-features = false } prometheus = { version = "0.9", default-features = false } +rand = { version = "0.8", default-features = false } +rand_chacha = { version = "0.3.1", default-features = false } regex = { version = "1", default-features = false } reqwest = { version = "0.11.22", default-features = false, features = ["blocking", "json", "rustls-tls"] } ripemd = { version = "0.1.1", default-features = false } +rusqlite = { version = "0.31.0", default-features = false, features = ["blob", "serde_json", "i128_blob", "bundled", "trace"] } +secp256k1 = { version = "0.24.3", default-features = false, features = ["std","serde", "recovery"] } serde = { version = "1", default-features = false } serde_derive = { version = "1", default-features = false } serde_json = { version = "1.0", default-features = false } +serde_stacker = { version = "0.1", default-features = false } sha2 = { version = "0.10", default-features = false, features = ["std"] } +sha3 = { version = "0.10.1", default-features = false } +siphasher = { version = "0.3.7", default-features = false } slog = { version = "2.5.2", default-features = false, features = [ "max_level_trace" ] } slog-json = { version = "2.3.0", default-features = false } slog-term = { version = "2.6.0", default-features = false } -stdext = { version = "0.3.1", default-features = false } -rusqlite = { version = "0.31.0", default-features = false, features = ["blob", "serde_json", "i128_blob", "bundled", "trace"] } -tikv-jemallocator = { version = "0.5.4", default-features = false } thiserror = { version = "1.0.65", default-features = false } -tracing = { version = "0.1.37", default-features = false } -tracing-subscriber = { version = "0.3.17", default-features = false, features = ["env-filter"] } +tikv-jemallocator = { version = "0.5.4", default-features = false } +time = { version = "0.3.41", default-features = false } tiny_http = { version = "0.12.0", default-features = false } toml = { version = "0.5.6", default-features = false } +tracing = { version = "0.1.37", default-features = false } +tracing-subscriber = { version = "0.3.17", default-features = false, features = ["env-filter"] } url = { version = "2.1.0", default-features = false } winapi = { version = "0.3", default-features = false } # Tests-only assert-json-diff = { version = "1.0.0", default-features = false } +mockito = { version = "1.5", default-features = false } mutants = { version = "0.0.3", default-features = false } proptest = { version = "1.6.*", default-features = false, features = ["std"] } +rand_core = { version = "0.6.4", default-features = false } +rlimit = { version = "0.10.2", default-features = false } rstest = { version = "0.17.0", default-features = false } rstest_reuse = { version = "0.5.0", default-features = false } +serial_test = { version = "3.2.0", default-features = false } +stdext = { version = "0.3.1", default-features = false } tempfile = { version = "3.3", default-features = false } +tokio = { version = "1.15", default-features = false } +warp = { version = "0.3.5", default-features = false } # Use a bit more than default optimization for # dev builds to speed up test execution diff --git a/clarity-serialization/Cargo.toml b/clarity-serialization/Cargo.toml index ca9a5a343f..1eea68afa3 100644 --- a/clarity-serialization/Cargo.toml +++ b/clarity-serialization/Cargo.toml @@ -6,22 +6,18 @@ description = "Serialization and deserialization for Stacks Clarity smart contra license = "GPLv3" homepage = "https://github.com/stacks-network/stacks-core" repository = "https://github.com/stacks-network/stacks-core" -keywords = [ "stacks", "stx", "bitcoin", "crypto", "blockstack", "decentralized", "dapps", "blockchain" ] +keywords = [ + "stacks", + "stx", + "bitcoin", + "crypto", + "blockstack", + "decentralized", + "dapps", + "blockchain", +] readme = "README.md" -[dependencies] -lazy_static = { workspace = true } -regex = { workspace = true } -serde = { workspace = true } -serde_derive = { workspace = true } -slog = { workspace = true } -stacks_common = { package = "stacks-common", path = "../stacks-common", default-features = false } -thiserror = { workspace = true } - -[dev-dependencies] -mutants = { workspace = true } -rstest = { workspace = true } - [features] default = [] testing = [] @@ -30,3 +26,16 @@ slog_json = ["stacks_common/slog_json"] # Wasm-specific features for easier configuration wasm-web = ["stacks_common/wasm-web"] wasm-deterministic = ["stacks_common/wasm-deterministic"] + +[dependencies] +lazy_static.workspace = true +regex.workspace = true +serde.workspace = true +serde_derive.workspace = true +slog.workspace = true +stacks_common = { package = "stacks-common", path = "../stacks-common", default-features = false } +thiserror.workspace = true + +[dev-dependencies] +mutants.workspace = true +rstest.workspace = true diff --git a/clarity/Cargo.toml b/clarity/Cargo.toml index 96305521be..35e656c49f 100644 --- a/clarity/Cargo.toml +++ b/clarity/Cargo.toml @@ -1,48 +1,33 @@ [package] name = "clarity" version = "0.0.1" -authors = [ "Jude Nelson ", - "Aaron Blankstein ", - "Ludo Galabru " ] +authors = [ + "Jude Nelson ", + "Aaron Blankstein ", + "Ludo Galabru ", +] license = "GPLv3" homepage = "https://github.com/blockstack/stacks-blockchain" repository = "https://github.com/blockstack/stacks-blockchain" description = "Reference implementation of the Stacks 2.0 Blockchain" -keywords = [ "stacks", "stx", "bitcoin", "crypto", "blockstack", "decentralized", "dapps", "blockchain" ] +keywords = [ + "stacks", + "stx", + "bitcoin", + "crypto", + "blockstack", + "decentralized", + "dapps", + "blockchain", +] readme = "README.md" edition = "2021" -resolver = "2" +resolver = "3" [lib] name = "clarity" path = "./src/libclarity.rs" -[dependencies] -serde = { workspace = true } -serde_derive = { workspace = true } -serde_json = { workspace = true, features = ["std", "arbitrary_precision", "unbounded_depth"] } -regex = { workspace = true } -lazy_static = { workspace = true } -integer-sqrt = { version = "0.1.3", default-features = false } -slog = { workspace = true } -stacks_common = { package = "stacks-common", path = "../stacks-common", default-features = false } -rstest = { workspace = true, optional = true } -rstest_reuse = { workspace = true, optional = true } -hashbrown = { workspace = true } -rusqlite = { workspace = true, optional = true } - -[dev-dependencies] -assert-json-diff = { workspace = true } -mutants = { workspace = true } -rstest = { workspace = true } -rstest_reuse = { workspace = true } -# a nightly rustc regression (35dbef235 2021-03-02) prevents criterion from compiling -# but it isn't necessary for tests: only benchmarks. therefore, commenting out for now. -# criterion = "0.3" - -[target.'cfg(not(target_family = "wasm"))'.dependencies] -serde_stacker = { version = "0.1", default-features = false } - [features] default = ["rusqlite"] developer-mode = ["stacks_common/developer-mode"] @@ -53,3 +38,29 @@ devtools = [] rollback_value_check = [] disable-costs = [] wasm-web = ["stacks_common/wasm-web"] + +[dependencies] +hashbrown.workspace = true +integer-sqrt.workspace = true +lazy_static.workspace = true +regex.workspace = true +rstest = { workspace = true, optional = true } +rstest_reuse = { workspace = true, optional = true } +rusqlite = { workspace = true, optional = true } +serde.workspace = true +serde_derive.workspace = true +serde_json = { workspace = true, features = ["std", "arbitrary_precision", "unbounded_depth"] } +slog.workspace = true +stacks_common = { package = "stacks-common", path = "../stacks-common", default-features = false } +# a nightly rustc regression (35dbef235 2021-03-02) prevents criterion from compiling +# but it isn't necessary for tests: only benchmarks. therefore, commenting out for now. +# criterion = "0.3" + +[target.'cfg(not(target_family = "wasm"))'.dependencies] +serde_stacker.workspace = true + +[dev-dependencies] +assert-json-diff.workspace = true +mutants.workspace = true +rstest.workspace = true +rstest_reuse.workspace = true diff --git a/contrib/tools/config-docs-generator/Cargo.toml b/contrib/tools/config-docs-generator/Cargo.toml index 5abba6c153..a05989ffe7 100644 --- a/contrib/tools/config-docs-generator/Cargo.toml +++ b/contrib/tools/config-docs-generator/Cargo.toml @@ -11,20 +11,20 @@ path = "src/extract_docs.rs" name = "generate-markdown" path = "src/generate_markdown.rs" -# Add integration test configuration -[[test]] -name = "integration" -path = "tests/integration.rs" - [dependencies] -serde = { workspace = true, features = ["derive"] } -serde_json = { workspace = true, features = ["std"] } -clap = { version = "4.0", features = ["derive"] } -regex = { workspace = true } anyhow = { version = "1.0", default-features = false, features = ["std"] } +clap = { version = "4.0", features = ["derive"] } once_cell = { version = "1.18", default-features = false, features = ["std"] } +regex = { workspace = true } +serde = { workspace = true, features = ["derive"] } +serde_json = { workspace = true, features = ["std"] } # Add test dependencies [dev-dependencies] -tempfile = { workspace = true } assert_cmd = { version = "2.0", default-features = false } +tempfile = { workspace = true } + +# Add integration test configuration +[[test]] +name = "integration" +path = "tests/integration.rs" diff --git a/libsigner/Cargo.toml b/libsigner/Cargo.toml index af017ea0c8..ef5443e735 100644 --- a/libsigner/Cargo.toml +++ b/libsigner/Cargo.toml @@ -1,37 +1,44 @@ [package] name = "libsigner" version = "0.0.1" -authors = [ "Jude Nelson " ] +authors = ["Jude Nelson "] license = "GPLv3" homepage = "https://github.com/blockstack/stacks-blockchain" repository = "https://github.com/blockstack/stacks-blockchain" description = "Library for Stacks signer daemons" -keywords = [ "stacks", "stx", "bitcoin", "crypto", "blockstack", "decentralized", "dapps", "blockchain" ] +keywords = [ + "stacks", + "stx", + "bitcoin", + "crypto", + "blockstack", + "decentralized", + "dapps", + "blockchain", +] readme = "README.md" -resolver = "2" edition = "2021" +resolver = "3" [lib] name = "libsigner" path = "./src/libsigner.rs" [dependencies] -clarity = { path = "../clarity" } -hashbrown = { workspace = true } -lazy_static = { workspace = true } -libc = { workspace = true } -libstackerdb = { path = "../libstackerdb" } -serde = { workspace = true } +clarity.workspace = true +hashbrown.workspace = true +lazy_static.workspace = true +libc.workspace = true +libstackerdb.workspace = true +serde.workspace = true serde_json = { workspace = true, features = ["arbitrary_precision", "unbounded_depth"] } -slog = { workspace = true } -stacks-common = { path = "../stacks-common" } -stackslib = { path = "../stackslib"} -thiserror = { workspace = true } -tiny_http = { workspace = true } +slog.workspace = true +stacks-common = { workspace = true, features = ["ctrlc-handler"] } +stackslib.workspace = true +thiserror.workspace = true +tiny_http.workspace = true [dev-dependencies] -mutants = { workspace = true } -rand = { workspace = true } -stacks-common = { path = "../stacks-common", features = ["testing"] } - - +mutants.workspace = true +rand.workspace = true +stacks-common = { workspace = true, features = ["testing"] } diff --git a/libstackerdb/Cargo.toml b/libstackerdb/Cargo.toml index 54913ec36b..2e759aed88 100644 --- a/libstackerdb/Cargo.toml +++ b/libstackerdb/Cargo.toml @@ -1,27 +1,35 @@ [package] name = "libstackerdb" version = "0.0.1" -authors = [ "Jude Nelson " ] +edition = "2024" +authors = ["Jude Nelson "] license = "GPLv3" homepage = "https://github.com/blockstack/stacks-blockchain" repository = "https://github.com/blockstack/stacks-blockchain" description = "Client library for the StackerDB subsystem" -keywords = [ "stacks", "stx", "bitcoin", "crypto", "blockstack", "decentralized", "dapps", "blockchain" ] +keywords = [ + "stacks", + "stx", + "bitcoin", + "crypto", + "blockstack", + "decentralized", + "dapps", + "blockchain", +] readme = "README.md" -resolver = "2" -edition = "2021" [lib] name = "libstackerdb" path = "./src/libstackerdb.rs" -[dependencies] -serde = { workspace = true } -stacks-common = { path = "../stacks-common" } -clarity = { path = "../clarity" } - [target.'cfg(all(any(target_arch = "x86_64", target_arch = "x86", target_arch = "aarch64"), not(any(target_os="windows"))))'.dependencies] sha2 = { workspace = true, features = ["asm"] } +[dependencies] +clarity.workspace = true +serde.workspace = true +stacks-common.workspace = true + [target.'cfg(any(not(any(target_arch = "x86_64", target_arch = "x86", target_arch = "aarch64")), any(target_os = "windows")))'.dependencies] -sha2 = { workspace = true } +sha2.workspace = true diff --git a/pox-locking/Cargo.toml b/pox-locking/Cargo.toml index 4e1af02f54..8126085aa7 100644 --- a/pox-locking/Cargo.toml +++ b/pox-locking/Cargo.toml @@ -1,16 +1,27 @@ [package] name = "pox-locking" version = "2.4.0" -authors = [ "Jude Nelson ", - "Aaron Blankstein ", - "Ludo Galabru " ] +authors = [ + "Jude Nelson ", + "Aaron Blankstein ", + "Ludo Galabru ", +] license = "GPLv3" homepage = "https://github.com/blockstack/stacks-blockchain" repository = "https://github.com/blockstack/stacks-blockchain" description = "Contract call result handler for applying PoX lock operations" -keywords = [ "stacks", "stx", "bitcoin", "crypto", "blockstack", "decentralized", "dapps", "blockchain" ] +keywords = [ + "stacks", + "stx", + "bitcoin", + "crypto", + "blockstack", + "decentralized", + "dapps", + "blockchain", +] readme = "README.md" -resolver = "2" +resolver = "3" edition = "2021" rust-version = "1.61" @@ -18,14 +29,14 @@ rust-version = "1.61" name = "pox_locking" path = "src/lib.rs" -[dependencies] -clarity = { package = "clarity", path = "../clarity", default-features = false} -stacks_common = { package = "stacks-common", path = "../stacks-common", default-features = false} -slog = { workspace = true } - -[dev-dependencies] -mutants = { workspace = true } - [features] slog_json = ["stacks_common/slog_json", "clarity/slog_json"] testing = [] + +[dependencies] +clarity.workspace = true +slog.workspace = true +stacks_common = { package = "stacks-common", path = "../stacks-common", default-features = false } + +[dev-dependencies] +mutants.workspace = true diff --git a/stacks-common/Cargo.toml b/stacks-common/Cargo.toml index 18b540bd80..4d28bd034c 100644 --- a/stacks-common/Cargo.toml +++ b/stacks-common/Cargo.toml @@ -21,7 +21,7 @@ keywords = [ "blockchain", ] readme = "README.md" -resolver = "2" +resolver = "3" edition = "2021" build = "build.rs" @@ -29,58 +29,6 @@ build = "build.rs" name = "stacks_common" path = "./src/libcommon.rs" -[dependencies] -chrono = { workspace = true , features = ["clock"] } -curve25519-dalek = { version = "4.1.3", default-features = false, features = ["serde"] } -ed25519-dalek = { workspace = true } -hashbrown = { workspace = true } -lazy_static = { workspace = true } -ripemd = { workspace = true } -serde = { workspace = true , features = ["derive"] } -serde_derive = { workspace = true } -serde_json = { workspace = true, features = ["std", "arbitrary_precision", "unbounded_depth"] } -sha3 = { version = "0.10.1", default-features = false } -slog = { workspace = true } -slog-term = { workspace = true } - -# Optional dependencies -getrandom = { version = "0.2", default-features = false, optional = true } -rand = { workspace = true, optional = true, features = ["std", "std_rng"] } -slog-json = { workspace = true, optional = true } - -[target.'cfg(unix)'.dependencies] -nix = { workspace = true, optional = true } - -[target.'cfg(windows)'.dependencies] -winapi = { workspace = true, features = [ - "consoleapi", - "handleapi", - "synchapi", - "winbase", -], optional = true } - -[target.'cfg(not(target_family = "wasm"))'.dependencies] -secp256k1 = { version = "0.24.3", default-features = false, features = ["std","serde", "recovery"] } -rusqlite = { workspace = true, optional = true } - -[target.'cfg(target_family = "wasm")'.dependencies] -libsecp256k1 = { version = "0.7.0", default-features = false, features = ["hmac"] } - -[target.'cfg(all(any(target_arch = "x86_64", target_arch = "x86", target_arch = "aarch64"), not(any(target_os="windows"))))'.dependencies] -sha2 = { workspace = true, features = ["asm"] } - -[target.'cfg(any(not(any(target_arch = "x86_64", target_arch = "x86", target_arch = "aarch64")), any(target_os="windows")))'.dependencies] -sha2 = { workspace = true } - -[dev-dependencies] -proptest = { workspace = true } - -[target.'cfg(windows)'.dev-dependencies] -winapi = { workspace = true, features = ["fileapi", "processenv", "winnt"] } - -[build-dependencies] -toml = { workspace = true } - [features] default = ["developer-mode", "ctrlc-handler", "rand"] developer-mode = [] @@ -100,3 +48,55 @@ bech32_strict = [] # Wasm-specific features for easier configuration wasm-web = ["rand", "getrandom/js", "libsecp256k1/static-context", "serde_json/std"] wasm-deterministic = ["getrandom/custom"] + +[target.'cfg(all(any(target_arch = "x86_64", target_arch = "x86", target_arch = "aarch64"), not(any(target_os="windows"))))'.dependencies] +sha2 = { workspace = true, features = ["asm"] } + +[target.'cfg(not(target_family = "wasm"))'.dependencies] +rusqlite = { workspace = true, optional = true } +secp256k1.workspace = true + +[target.'cfg(target_family = "wasm")'.dependencies] +libsecp256k1.workspace = true + +[target.'cfg(unix)'.dependencies] +nix = { workspace = true, optional = true } + +[target.'cfg(any(not(any(target_arch = "x86_64", target_arch = "x86", target_arch = "aarch64")), any(target_os="windows")))'.dependencies] +sha2.workspace = true + +[target.'cfg(windows)'.dependencies] +winapi = { workspace = true, features = [ + "consoleapi", + "handleapi", + "synchapi", + "winbase", +], optional = true } + +[dependencies] +chrono = { workspace = true, features = ["clock"] } +curve25519-dalek.workspace = true +ed25519-dalek.workspace = true +hashbrown.workspace = true +lazy_static.workspace = true +ripemd.workspace = true +serde = { workspace = true, features = ["derive"] } +serde_derive.workspace = true +serde_json = { workspace = true, features = ["std", "arbitrary_precision", "unbounded_depth"] } +sha3.workspace = true +slog.workspace = true +slog-term.workspace = true + +# Optional dependencies +getrandom = { workspace = true, optional = true } +rand = { workspace = true, optional = true, features = ["std", "std_rng"] } +slog-json = { workspace = true, optional = true } + +[build-dependencies] +toml.workspace = true + +[target.'cfg(windows)'.dev-dependencies] +winapi = { workspace = true, features = ["fileapi", "processenv", "winnt"] } + +[dev-dependencies] +proptest.workspace = true diff --git a/stacks-node/Cargo.toml b/stacks-node/Cargo.toml index 0c602e7e7d..0725450aa4 100644 --- a/stacks-node/Cargo.toml +++ b/stacks-node/Cargo.toml @@ -1,65 +1,20 @@ [package] name = "stacks-node" version = "0.1.0" -authors = ["Jude Nelson ", "Aaron Blankstein ", "Ludo Galabru "] +authors = [ + "Jude Nelson ", + "Aaron Blankstein ", + "Ludo Galabru ", +] edition = "2021" -resolver = "2" +resolver = "3" rust-version = "1.61" -[dependencies] -lazy_static = { workspace = true } -pico-args = {version = "0.5.0", default-features = false } -serde = { workspace = true } -serde_derive = { workspace = true } -serde_json = { workspace = true, features = ["arbitrary_precision", "raw_value"] } -stacks = { package = "stackslib", path = "../stackslib" } -stx-genesis = { path = "../stx-genesis"} -base64 = { version = "0.12.0", default-features = false, features = ["std"] } -backtrace = { version = "0.3.50", default-features = false , features = ["std"] } -libc = { workspace = true } -slog = { workspace = true } -clarity = { path = "../clarity" } -stacks-common = { path = "../stacks-common" } -chrono = { workspace = true } -regex = { workspace = true } -libsigner = { path = "../libsigner" } -url = { workspace = true } -rand = { workspace = true } -rusqlite = { workspace = true } -async-h1 = { version = "2.3.2", default-features = false, optional = true } -async-std = { version = "1.6", optional = true, features = ["attributes"] } -http-types = { version = "2.12", default-features = false, optional = true } -thiserror = { workspace = true } - -# This dependency is used for the multiversion integration tests which live behind the build-v3-1-0-0-13 feature flag -signer_v3_1_0_0_13 = { package = "stacks-signer", git = "https://github.com/stacks-network/stacks-core.git", rev="8a79aaa7df0f13dfc5ab0d0d0bcb8201c90bcba2", optional = true, features = ["testing", "default"]} -libsigner_v3_1_0_0_13 = { package = "libsigner", git = "https://github.com/stacks-network/stacks-core.git", rev="8a79aaa7df0f13dfc5ab0d0d0bcb8201c90bcba2", optional = true} -stacks_v3_1_00_13 = { package = "stackslib", git = "https://github.com/stacks-network/stacks-core.git", rev="8a79aaa7df0f13dfc5ab0d0d0bcb8201c90bcba2", optional = true, features = ["testing", "default"]} -stacks_common_v3_1_00_13 = { package = "stacks-common", git = "https://github.com/stacks-network/stacks-core.git", rev="8a79aaa7df0f13dfc5ab0d0d0bcb8201c90bcba2", optional = true, features = ["testing", "default"]} +[package.metadata.pinny] +allowed = ["bitcoind", "flaky", "slow"] [target.'cfg(not(any(target_os = "macos", target_os="windows", target_arch = "arm")))'.dependencies] -tikv-jemallocator = { workspace = true } - -[dev-dependencies] -warp = { version = "0.3.5", default-features = false } -tokio = { version = "1.15", default-features = false } -reqwest = { workspace = true, features = ["rustls"] } -clarity = { path = "../clarity", features = ["default", "testing"]} -stacks-common = { path = "../stacks-common", features = ["default", "testing"] } -stacks = { package = "stackslib", path = "../stackslib", features = ["default", "testing"] } -stacks-signer = { path = "../stacks-signer", features = ["testing"] } -tracing = { workspace = true } -tracing-subscriber = { workspace = true } -mutants = { workspace = true } -tiny_http = { workspace = true } -http-types = { version = "2.12", default-features = false } -tempfile = { workspace = true } -mockito = { version = "1.5", default-features = false } -serial_test = { version = "3.2.0", default-features = false } -pinny = { git = "https://github.com/BitcoinL2-Labs/pinny-rs.git", rev = "54ba9d533a7b84525a5e65a3eae1a3ae76b9ea49" } #v0.0.2 -madhouse = { git = "https://github.com/stacks-network/madhouse-rs.git", tag = "0.2.0" } -proptest = { workspace = true } -stdext = { workspace = true } +tikv-jemallocator.workspace = true [[bin]] name = "stacks-node" @@ -75,7 +30,61 @@ slog_json = ["stacks/slog_json", "stacks-common/slog_json", "clarity/slog_json"] prod-genesis-chainstate = [] default = [] testing = ["stacks-common/testing", "stacks/testing", "clarity/testing"] -build-signer-v3-1-0-0-13 = ["signer_v3_1_0_0_13", "libsigner_v3_1_0_0_13", "stacks_v3_1_00_13", "stacks_common_v3_1_00_13"] +build-signer-v3-1-0-0-13 = [ + "signer_v3_1_0_0_13", + "libsigner_v3_1_0_0_13", + "stacks_v3_1_00_13", + "stacks_common_v3_1_00_13", +] -[package.metadata.pinny] -allowed = ["bitcoind", "flaky", "slow"] +[dependencies] +async-h1 = { workspace = true, optional = true } +async-std = { workspace = true, optional = true } +backtrace.workspace = true +base64.workspace = true +chrono.workspace = true +clarity.workspace = true +http-types = { workspace = true, optional = true } +lazy_static.workspace = true +libc.workspace = true +libsigner.workspace = true +pico-args.workspace = true +rand.workspace = true +regex.workspace = true +rusqlite.workspace = true +serde.workspace = true +serde_derive.workspace = true +serde_json = { workspace = true, features = ["arbitrary_precision", "raw_value"] } +slog.workspace = true +stacks.workspace = true +stacks-common.workspace = true +stx-genesis.workspace = true +thiserror.workspace = true +url.workspace = true + +# This dependency is used for the multiversion integration tests which live behind the build-v3-1-0-0-13 feature flag +libsigner_v3_1_0_0_13 = { package = "libsigner", git = "https://github.com/stacks-network/stacks-core.git", rev = "8a79aaa7df0f13dfc5ab0d0d0bcb8201c90bcba2", optional = true } +signer_v3_1_0_0_13 = { package = "stacks-signer", git = "https://github.com/stacks-network/stacks-core.git", rev = "8a79aaa7df0f13dfc5ab0d0d0bcb8201c90bcba2", optional = true, features = ["testing", "default"] } +stacks_common_v3_1_00_13 = { package = "stacks-common", git = "https://github.com/stacks-network/stacks-core.git", rev = "8a79aaa7df0f13dfc5ab0d0d0bcb8201c90bcba2", optional = true, features = ["testing", "default"] } +stacks_v3_1_00_13 = { package = "stackslib", git = "https://github.com/stacks-network/stacks-core.git", rev = "8a79aaa7df0f13dfc5ab0d0d0bcb8201c90bcba2", optional = true, features = ["testing", "default"] } + +[dev-dependencies] +clarity = { workspace = true, features = ["rusqlite", "testing"] } +http-types.workspace = true +madhouse.workspace = true +mockito.workspace = true +mutants.workspace = true +pinny.workspace = true +proptest.workspace = true +reqwest = { workspace = true, features = ["rustls"] } +serial_test.workspace = true +stacks = { workspace = true, features = ["default", "testing"] } +stacks-common = { workspace = true, features = ["testing"] } +stacks-signer = { workspace = true, features = ["testing"] } +stdext.workspace = true +tempfile.workspace = true +tiny_http.workspace = true +tokio.workspace = true +tracing.workspace = true +tracing-subscriber.workspace = true +warp.workspace = true diff --git a/stacks-signer/Cargo.toml b/stacks-signer/Cargo.toml index 1efcd6d57e..d79d821943 100644 --- a/stacks-signer/Cargo.toml +++ b/stacks-signer/Cargo.toml @@ -1,14 +1,23 @@ [package] name = "stacks-signer" version = "0.0.1" -authors = [ "Jude Nelson " ] +authors = ["Jude Nelson "] license = "GPLv3" homepage = "https://github.com/blockstack/stacks-blockchain" repository = "https://github.com/blockstack/stacks-blockchain" description = "Stacker signer binary" -keywords = [ "stacks", "stx", "bitcoin", "crypto", "blockstack", "decentralized", "dapps", "blockchain" ] +keywords = [ + "stacks", + "stx", + "bitcoin", + "crypto", + "blockstack", + "decentralized", + "dapps", + "blockchain", +] readme = "README.md" -resolver = "2" +resolver = "3" edition = "2021" [lib] @@ -19,39 +28,39 @@ path = "src/lib.rs" name = "stacks-signer" path = "src/main.rs" +[features] +default = [] +monitoring_prom = ["prometheus", "tiny_http"] +testing = ["stacks-common/testing"] + [dependencies] -backoff = { version = "0.4", default-features = false } -clarity = { path = "../clarity" } -clap = { version = "4.1.1", features = ["derive", "env"] } -hashbrown = { workspace = true } -lazy_static = { workspace = true } -libsigner = { path = "../libsigner" } -libstackerdb = { path = "../libstackerdb" } +backoff.workspace = true +clap.workspace = true +clarity.workspace = true +hashbrown.workspace = true +lazy_static.workspace = true +libsigner.workspace = true +libstackerdb.workspace = true prometheus = { workspace = true, optional = true } -reqwest = { workspace = true } -serde = { workspace = true } +rand.workspace = true +reqwest.workspace = true +rusqlite = { workspace = true, features = ["functions"] } +serde.workspace = true serde_json = { workspace = true, features = ["arbitrary_precision", "unbounded_depth"] } -slog = { workspace = true } +slog.workspace = true slog-json = { workspace = true, optional = true } -slog-term = { workspace = true } -stacks-common = { path = "../stacks-common" } -stackslib = { path = "../stackslib" } -thiserror = { workspace = true } +slog-term.workspace = true +stacks-common.workspace = true +stackslib.workspace = true +thiserror.workspace = true tiny_http = { workspace = true, optional = true } -toml = { workspace = true } -tracing = { workspace = true } +toml.workspace = true +tracing.workspace = true tracing-subscriber = { workspace = true, features = ["registry", "fmt", "std", "env-filter"] } -rand = { workspace = true } -url = { workspace = true } -rusqlite = { workspace = true, features = ["functions"] } +url.workspace = true [dev-dependencies] -clarity = { path = "../clarity", features = ["testing"] } -rand_core = { version = "0.6.4", default-features = false } -stacks-common = { path = "../stacks-common", features = ["testing"] } -stdext = { workspace = true } - -[features] -default = [] -monitoring_prom = ["prometheus", "tiny_http"] -testing = ["stacks-common/testing"] +clarity = { workspace = true, features = ["rusqlite", "testing"] } +rand_core.workspace = true +stacks-common = { workspace = true, features = ["testing"] } +stdext.workspace = true diff --git a/stackslib/Cargo.toml b/stackslib/Cargo.toml index f5c8f3dcb5..e9753f6f3b 100644 --- a/stackslib/Cargo.toml +++ b/stackslib/Cargo.toml @@ -1,17 +1,28 @@ [package] name = "stackslib" version = "0.0.1" -authors = [ "Jude Nelson ", - "Aaron Blankstein ", - "Ludo Galabru " ] +edition = "2021" +resolver = "3" +authors = [ + "Jude Nelson ", + "Aaron Blankstein ", + "Ludo Galabru ", +] license = "GPLv3" homepage = "https://github.com/blockstack/stacks-blockchain" repository = "https://github.com/blockstack/stacks-blockchain" description = "Reference implementation of the Stacks 2.0 Blockchain" -keywords = [ "stacks", "stx", "bitcoin", "crypto", "blockstack", "decentralized", "dapps", "blockchain" ] +keywords = [ + "stacks", + "stx", + "bitcoin", + "crypto", + "blockstack", + "decentralized", + "dapps", + "blockchain", +] readme = "README.md" -resolver = "2" -edition = "2021" rust-version = "1.80" [lib] @@ -30,49 +41,6 @@ path = "src/clarity_cli_main.rs" name = "blockstack-cli" path = "src/blockstack_cli.rs" -[dependencies] -ed25519-dalek = { workspace = true } -rand = { workspace = true } -rand_chacha = { version = "0.3.1", default-features = false } -serde = { workspace = true } -serde_derive = { workspace = true } -serde_json = { workspace = true, features = ["arbitrary_precision", "unbounded_depth"] } -ripemd = { workspace = true } -regex = { workspace = true } -mio = { version = "0.6", default-features = false } -lazy_static = { workspace = true } -url = { workspace = true } -percent-encoding = { version = "2.1.0", default-features = false } -prometheus = { workspace = true, optional = true } -slog = { workspace = true } -chrono = { workspace = true, optional = true } -clarity = { path = "../clarity" } -stacks-common = { path = "../stacks-common" } -pox-locking = { path = "../pox-locking" } -libstackerdb = { path = "../libstackerdb" } -siphasher = { version = "0.3.7", default-features = false } -hashbrown = { workspace = true } -rusqlite = { workspace = true } -time = { version = "0.3.41", default-features = false } -toml = { workspace = true } - -[target.'cfg(not(any(target_os = "macos",target_os="windows", target_arch = "arm" )))'.dependencies] -tikv-jemallocator = { workspace = true } - -[dev-dependencies] -assert-json-diff = { workspace = true } -stdext = { workspace = true } -stx-genesis = { path = "../stx-genesis"} -clarity = { features = ["default", "testing"], path = "../clarity" } -stacks-common = { features = ["default", "testing"], path = "../stacks-common" } -rstest = { workspace = true } -rstest_reuse = { workspace = true } -mutants = { workspace = true } -rlimit = { version = "0.10.2", default-features = false } -chrono = { workspace = true } -tempfile = { workspace = true } -proptest = { workspace = true } - [features] default = [] profile-sqlite = [] @@ -85,5 +53,48 @@ testing = ["chrono", "stacks-common/testing", "clarity/testing"] [target.'cfg(all(any(target_arch = "x86_64", target_arch = "x86", target_arch = "aarch64"), not(any(target_os="windows"))))'.dependencies] sha2 = { workspace = true, features = ["asm"] } +[target.'cfg(not(any(target_os = "macos",target_os="windows", target_arch = "arm" )))'.dependencies] +tikv-jemallocator.workspace = true + +[dependencies] +chrono = { workspace = true, optional = true } +clarity = { workspace = true, features = ["rusqlite"] } +ed25519-dalek.workspace = true +hashbrown.workspace = true +lazy_static.workspace = true +libstackerdb.workspace = true +mio.workspace = true +percent-encoding.workspace = true +pox-locking.workspace = true +prometheus = { workspace = true, optional = true } +rand.workspace = true +rand_chacha.workspace = true +regex.workspace = true +ripemd.workspace = true +rusqlite.workspace = true +serde.workspace = true +serde_derive.workspace = true +serde_json = { workspace = true, features = ["arbitrary_precision", "unbounded_depth"] } +siphasher.workspace = true +slog.workspace = true +stacks-common.workspace = true +time.workspace = true +toml.workspace = true +url.workspace = true + [target.'cfg(any(not(any(target_arch = "x86_64", target_arch = "x86", target_arch = "aarch64")), any(target_os="windows")))'.dependencies] -sha2 = { workspace = true } +sha2.workspace = true + +[dev-dependencies] +assert-json-diff.workspace = true +chrono.workspace = true +clarity = { workspace = true, features = ["rusqlite", "testing"] } +mutants.workspace = true +proptest.workspace = true +rlimit.workspace = true +rstest.workspace = true +rstest_reuse.workspace = true +stacks-common = { workspace = true, features = ["testing"] } +stdext.workspace = true +stx-genesis.workspace = true +tempfile.workspace = true diff --git a/stx-genesis/Cargo.toml b/stx-genesis/Cargo.toml index 6728005a07..13a21d88e0 100644 --- a/stx-genesis/Cargo.toml +++ b/stx-genesis/Cargo.toml @@ -2,16 +2,15 @@ name = "stx-genesis" version = "0.1.0" authors = ["Matthew Little "] -edition = "2018" -resolver = "2" - -[dependencies] -libflate = { version = "1.0.3", default-features = false } +edition = "2024" [lib] name = "stx_genesis" path = "src/lib.rs" +[dependencies] +libflate.workspace = true + [build-dependencies] -libflate = { version = "1.0.3", default-features = false } -sha2 = { workspace = true } +libflate.workspace = true +sha2.workspace = true From 49f02667e882e7269465cb079b884bdaffb77703 Mon Sep 17 00:00:00 2001 From: Francesco Leacche Date: Tue, 12 Aug 2025 16:31:51 +0100 Subject: [PATCH 10/13] remove unused crates with cargo machete --- Cargo.lock | 2 -- clarity-serialization/Cargo.toml | 3 +++ pox-locking/Cargo.toml | 3 +++ stacks-common/Cargo.toml | 3 +++ stacks-node/Cargo.toml | 3 +++ stacks-signer/Cargo.toml | 5 +++-- stackslib/Cargo.toml | 3 +++ stx-genesis/Cargo.toml | 5 ++++- 8 files changed, 22 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 255765bc4d..79d906aa92 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3250,14 +3250,12 @@ dependencies = [ "serde_json", "slog", "slog-json", - "slog-term", "stacks-common 0.0.1", "stackslib 0.0.1", "stdext", "thiserror", "tiny_http", "toml", - "tracing", "tracing-subscriber", "url", ] diff --git a/clarity-serialization/Cargo.toml b/clarity-serialization/Cargo.toml index 1eea68afa3..d20a6e788c 100644 --- a/clarity-serialization/Cargo.toml +++ b/clarity-serialization/Cargo.toml @@ -18,6 +18,9 @@ keywords = [ ] readme = "README.md" +[package.metadata.cargo-machete] +ignored = ["slog"] + [features] default = [] testing = [] diff --git a/pox-locking/Cargo.toml b/pox-locking/Cargo.toml index 8126085aa7..4169485a74 100644 --- a/pox-locking/Cargo.toml +++ b/pox-locking/Cargo.toml @@ -25,6 +25,9 @@ resolver = "3" edition = "2021" rust-version = "1.61" +[package.metadata.cargo-machete] +ignored = ["slog"] + [lib] name = "pox_locking" path = "src/lib.rs" diff --git a/stacks-common/Cargo.toml b/stacks-common/Cargo.toml index 4d28bd034c..2383bb9aef 100644 --- a/stacks-common/Cargo.toml +++ b/stacks-common/Cargo.toml @@ -25,6 +25,9 @@ resolver = "3" edition = "2021" build = "build.rs" +[package.metadata.cargo-machete] +ignored = ["getrandom", "toml"] + [lib] name = "stacks_common" path = "./src/libcommon.rs" diff --git a/stacks-node/Cargo.toml b/stacks-node/Cargo.toml index 0725450aa4..1fa62ec62d 100644 --- a/stacks-node/Cargo.toml +++ b/stacks-node/Cargo.toml @@ -10,6 +10,9 @@ edition = "2021" resolver = "3" rust-version = "1.61" +[package.metadata.cargo-machete] +ignored = ["stdext"] + [package.metadata.pinny] allowed = ["bitcoind", "flaky", "slow"] diff --git a/stacks-signer/Cargo.toml b/stacks-signer/Cargo.toml index d79d821943..e020179c1e 100644 --- a/stacks-signer/Cargo.toml +++ b/stacks-signer/Cargo.toml @@ -20,6 +20,9 @@ readme = "README.md" resolver = "3" edition = "2021" +[package.metadata.cargo-machete] +ignored = ["stdext"] + [lib] name = "stacks_signer" path = "src/lib.rs" @@ -49,13 +52,11 @@ serde.workspace = true serde_json = { workspace = true, features = ["arbitrary_precision", "unbounded_depth"] } slog.workspace = true slog-json = { workspace = true, optional = true } -slog-term.workspace = true stacks-common.workspace = true stackslib.workspace = true thiserror.workspace = true tiny_http = { workspace = true, optional = true } toml.workspace = true -tracing.workspace = true tracing-subscriber = { workspace = true, features = ["registry", "fmt", "std", "env-filter"] } url.workspace = true diff --git a/stackslib/Cargo.toml b/stackslib/Cargo.toml index e9753f6f3b..f1123bd0b3 100644 --- a/stackslib/Cargo.toml +++ b/stackslib/Cargo.toml @@ -25,6 +25,9 @@ keywords = [ readme = "README.md" rust-version = "1.80" +[package.metadata.cargo-machete] +ignored = ["stdext"] + [lib] name = "blockstack_lib" path = "src/lib.rs" diff --git a/stx-genesis/Cargo.toml b/stx-genesis/Cargo.toml index 13a21d88e0..5d59bc90f6 100644 --- a/stx-genesis/Cargo.toml +++ b/stx-genesis/Cargo.toml @@ -1,8 +1,11 @@ [package] name = "stx-genesis" version = "0.1.0" -authors = ["Matthew Little "] edition = "2024" +authors = ["Matthew Little "] + +[package.metadata.cargo-machete] +ignored = ["sha2"] [lib] name = "stx_genesis" From 43bda47e25613225e4cd9fa0faaf6a2f45243172 Mon Sep 17 00:00:00 2001 From: Francesco Leacche Date: Tue, 12 Aug 2025 16:36:42 +0100 Subject: [PATCH 11/13] cargo fmt --- libstackerdb/src/libstackerdb.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libstackerdb/src/libstackerdb.rs b/libstackerdb/src/libstackerdb.rs index 44d51b6d7f..3ba518803a 100644 --- a/libstackerdb/src/libstackerdb.rs +++ b/libstackerdb/src/libstackerdb.rs @@ -26,11 +26,11 @@ use clarity::vm::types::QualifiedContractIdentifier; use serde::{Deserialize, Serialize}; use sha2::{Digest, Sha512_256}; use stacks_common::codec::{ - read_next, read_next_at_most, write_next, Error as CodecError, StacksMessageCodec, + Error as CodecError, StacksMessageCodec, read_next, read_next_at_most, write_next, }; -use stacks_common::types::chainstate::{StacksAddress, StacksPrivateKey, StacksPublicKey}; use stacks_common::types::PrivateKey; -use stacks_common::util::hash::{hex_bytes, to_hex, Hash160, Sha512Trunc256Sum}; +use stacks_common::types::chainstate::{StacksAddress, StacksPrivateKey, StacksPublicKey}; +use stacks_common::util::hash::{Hash160, Sha512Trunc256Sum, hex_bytes, to_hex}; use stacks_common::util::secp256k1::MessageSignature; /// maximum chunk size (16 MB; same as MAX_PAYLOAD_SIZE) From ab327d58c1e1cbfb1e9e28974e96b8d4e8cbe8f4 Mon Sep 17 00:00:00 2001 From: Francesco Leacche Date: Tue, 12 Aug 2025 16:45:15 +0100 Subject: [PATCH 12/13] revert config-docs-generator/Cargo.toml --- contrib/tools/config-docs-generator/Cargo.toml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/contrib/tools/config-docs-generator/Cargo.toml b/contrib/tools/config-docs-generator/Cargo.toml index a05989ffe7..2b6e0a39dd 100644 --- a/contrib/tools/config-docs-generator/Cargo.toml +++ b/contrib/tools/config-docs-generator/Cargo.toml @@ -12,17 +12,17 @@ name = "generate-markdown" path = "src/generate_markdown.rs" [dependencies] -anyhow = { version = "1.0", default-features = false, features = ["std"] } +anyhow = "1.0" clap = { version = "4.0", features = ["derive"] } -once_cell = { version = "1.18", default-features = false, features = ["std"] } -regex = { workspace = true } -serde = { workspace = true, features = ["derive"] } -serde_json = { workspace = true, features = ["std"] } +once_cell = "1.18" +regex = "1.0" +serde = { version = "1.0", features = ["derive"] } +serde_json = "1.0" # Add test dependencies [dev-dependencies] -assert_cmd = { version = "2.0", default-features = false } -tempfile = { workspace = true } +assert_cmd = "2.0" +tempfile = "3.0" # Add integration test configuration [[test]] From 983b756cc3a0021d4a914b466737ca42dc80acec Mon Sep 17 00:00:00 2001 From: Francesco Leacche Date: Tue, 12 Aug 2025 16:45:50 +0100 Subject: [PATCH 13/13] cargo sort -g -w --- stacks-common/Cargo.toml | 6 +++--- stackslib/Cargo.toml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/stacks-common/Cargo.toml b/stacks-common/Cargo.toml index 2383bb9aef..65b65d2518 100644 --- a/stacks-common/Cargo.toml +++ b/stacks-common/Cargo.toml @@ -62,12 +62,12 @@ secp256k1.workspace = true [target.'cfg(target_family = "wasm")'.dependencies] libsecp256k1.workspace = true -[target.'cfg(unix)'.dependencies] -nix = { workspace = true, optional = true } - [target.'cfg(any(not(any(target_arch = "x86_64", target_arch = "x86", target_arch = "aarch64")), any(target_os="windows")))'.dependencies] sha2.workspace = true +[target.'cfg(unix)'.dependencies] +nix = { workspace = true, optional = true } + [target.'cfg(windows)'.dependencies] winapi = { workspace = true, features = [ "consoleapi", diff --git a/stackslib/Cargo.toml b/stackslib/Cargo.toml index f1123bd0b3..6c54464e8c 100644 --- a/stackslib/Cargo.toml +++ b/stackslib/Cargo.toml @@ -59,6 +59,9 @@ sha2 = { workspace = true, features = ["asm"] } [target.'cfg(not(any(target_os = "macos",target_os="windows", target_arch = "arm" )))'.dependencies] tikv-jemallocator.workspace = true +[target.'cfg(any(not(any(target_arch = "x86_64", target_arch = "x86", target_arch = "aarch64")), any(target_os="windows")))'.dependencies] +sha2.workspace = true + [dependencies] chrono = { workspace = true, optional = true } clarity = { workspace = true, features = ["rusqlite"] } @@ -85,9 +88,6 @@ time.workspace = true toml.workspace = true url.workspace = true -[target.'cfg(any(not(any(target_arch = "x86_64", target_arch = "x86", target_arch = "aarch64")), any(target_os="windows")))'.dependencies] -sha2.workspace = true - [dev-dependencies] assert-json-diff.workspace = true chrono.workspace = true