From 5659d99b649c64cffc342b0827df7e0efde6f73b Mon Sep 17 00:00:00 2001 From: DaughterOfMars Date: Fri, 16 Aug 2024 08:34:46 -0400 Subject: [PATCH] chore(CI): Add unused dependencies check (#1741) * chore(CI): Add unused dependencies check * comment * use flags matrix * Add a comment to force workflow run * fix duplicate flags and add to external * remove unused dependencies * Remove more unused dependencies * More ignores * do external udeps * lock file * fix doc tests * fix mysten-common * revert doc * a few more unused deps * external * merge methods * review --------- Co-authored-by: Thibault Martinez --- .cargo/config.toml | 2 + .github/workflows/_external_rust_tests.yml | 25 +- .github/workflows/_rust.yml | 6 +- .github/workflows/_rust_tests.yml | 45 +++- Cargo.lock | 112 --------- crates/iota-archival/Cargo.toml | 1 - crates/iota-cluster-test/Cargo.toml | 1 - crates/iota-config/Cargo.toml | 2 - crates/iota-core/Cargo.toml | 10 +- crates/iota-cost/Cargo.toml | 1 - crates/iota-data-ingestion-core/Cargo.toml | 1 - crates/iota-e2e-tests/Cargo.toml | 2 - crates/iota-genesis-builder/Cargo.toml | 33 ++- crates/iota-graphql-rpc/Cargo.toml | 7 +- crates/iota-indexer/Cargo.toml | 10 +- crates/iota-move-build/Cargo.toml | 3 - crates/iota-move/Cargo.toml | 15 +- crates/iota-package-resolver/Cargo.toml | 1 - crates/iota-proc-macros/Cargo.toml | 1 - crates/iota-replay/Cargo.toml | 1 - crates/iota-rpc-loadgen/Cargo.toml | 1 - crates/iota-storage/Cargo.toml | 3 - crates/iota-types/Cargo.toml | 5 +- crates/mysten-common/Cargo.toml | 5 +- crates/mysten-common/src/sync/notify_once.rs | 51 ++-- crates/simulacrum/Cargo.toml | 1 - crates/typed-store-derive/Cargo.toml | 9 + crates/typed-store/Cargo.toml | 3 - external-crates/move/Cargo.lock | 237 ++++++++++++++---- .../crates/bytecode-verifier-tests/Cargo.toml | 3 - .../move/crates/move-binary-format/Cargo.toml | 1 - .../crates/move-bytecode-verifier/Cargo.toml | 1 - .../move/crates/move-proc-macros/Cargo.toml | 1 - .../move/crates/move-vm-profiler/Cargo.toml | 6 +- .../move/crates/move-vm-runtime/Cargo.toml | 4 - .../move/crates/move-vm-types/Cargo.toml | 3 - .../crates/move-bytecode-verifier/Cargo.toml | 1 - .../v0/crates/move-vm-runtime/Cargo.toml | 4 - iota-execution/latest/iota-adapter/Cargo.toml | 3 - iota-execution/v0/iota-adapter/Cargo.toml | 3 - narwhal/crypto/Cargo.toml | 5 +- narwhal/network/Cargo.toml | 1 - narwhal/primary/Cargo.toml | 3 + 43 files changed, 345 insertions(+), 288 deletions(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index 4843555febf..460cd717b67 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -15,6 +15,8 @@ ci-clippy-external = [ "-Dwarnings", ] ci-license = "license-template --template .license_template" +ci-udeps = "udeps --all-targets --backend=depinfo" +ci-udeps-external = "udeps --all-targets --manifest-path external-crates/move/Cargo.toml --backend=depinfo" [build] rustflags = ["-C", "force-frame-pointers=yes", "-C", "force-unwind-tables=yes"] diff --git a/.github/workflows/_external_rust_tests.yml b/.github/workflows/_external_rust_tests.yml index 9171cc3bfdf..d81673f63ef 100644 --- a/.github/workflows/_external_rust_tests.yml +++ b/.github/workflows/_external_rust_tests.yml @@ -1,9 +1,14 @@ name: Rust tests -on: workflow_call +on: + workflow_call: + inputs: + isRust: + type: boolean jobs: changes: + if: inputs.isRust runs-on: [self-hosted] outputs: components: ${{ steps.filter.outputs.changes }} @@ -18,7 +23,7 @@ jobs: test: name: Test ${{ matrix.components }} needs: changes - if: needs.changes.outputs.components != '[]' + if: always() && inputs.isRust && needs.changes.outputs.components != '[]' env: # Tests written with #[sim_test] are often flaky if run as #[tokio::test] - this var # causes #[sim_test] to only run under the deterministic `simtest` job, and not the @@ -42,3 +47,19 @@ jobs: -E '!test(prove) and !test(run_all::simple_build_with_docs/args.txt) and !test(run_test::nested_deps_bad_parent/Move.toml) and rdeps(${{matrix.components}})' -p ${{matrix.components}} --profile ci + + check-unused-deps: + name: Check Unused Dependencies of ${{ matrix.components }} (${{ matrix.flags }}) + if: always() && inputs.isRust && needs.changes.outputs.components != '[]' + strategy: + matrix: + components: ${{ fromJson(needs.changes.outputs.components) }} + flags: ["--all-features", "--no-default-features"] + fail-fast: false + runs-on: [self-hosted] + needs: changes + + steps: + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # Pin v4.1.1 + - name: Run Cargo Udeps + run: cargo +nightly ci-udeps-external -p ${{matrix.components}} ${{ matrix.flags }} diff --git a/.github/workflows/_rust.yml b/.github/workflows/_rust.yml index 19c795a6d40..33f794d5d93 100644 --- a/.github/workflows/_rust.yml +++ b/.github/workflows/_rust.yml @@ -41,18 +41,20 @@ jobs: isRust: ${{ inputs.isRust }} rust-tests: - if: inputs.isRust needs: - rust-lints - external-lints uses: ./.github/workflows/_rust_tests.yml + with: + isRust: ${{ inputs.isRust }} external-tests: - if: inputs.isRust needs: - rust-lints - external-lints uses: ./.github/workflows/_external_rust_tests.yml + with: + isRust: ${{ inputs.isRust }} mysticeti-tests: if: inputs.isRust diff --git a/.github/workflows/_rust_tests.yml b/.github/workflows/_rust_tests.yml index 3d535545ac5..46b593056bc 100644 --- a/.github/workflows/_rust_tests.yml +++ b/.github/workflows/_rust_tests.yml @@ -1,9 +1,14 @@ name: Rust tests -on: workflow_call +on: + workflow_call: + inputs: + isRust: + type: boolean jobs: changes: + if: inputs.isRust runs-on: [self-hosted] outputs: components: ${{ steps.filter.outputs.changes }} @@ -18,7 +23,7 @@ jobs: test: name: Test ${{ matrix.components }} needs: changes - if: needs.changes.outputs.components != '[]' + if: always() && inputs.isRust && needs.changes.outputs.components != '[]' env: # Tests written with #[sim_test] are often flaky if run as #[tokio::test] - this var # causes #[sim_test] to only run under the deterministic `simtest` job, and not the @@ -36,6 +41,7 @@ jobs: run: cargo nextest run --profile ci -E 'rdeps(${{matrix.components}})' -p ${{matrix.components}} iota-sdk-changes: + if: inputs.isRust runs-on: [self-hosted] outputs: changed: ${{ steps.filter.outputs.iota-sdk }} @@ -50,7 +56,7 @@ jobs: test-iota-sdk: name: Test iota-sdk - if: needs.iota-sdk-changes.outputs.changed == 'true' + if: always() && inputs.isRust && needs.iota-sdk-changes.outputs.changed == 'true' env: # Tests written with #[sim_test] are often flaky if run as #[tokio::test] - this var # causes #[sim_test] to only run under the deterministic `simtest` job, and not the @@ -67,6 +73,39 @@ jobs: # (we have the stardust iota-sdk package as a dependency) run: cargo nextest run --profile ci -E 'rdeps(iota-sdk)' -p iota-sdk@0.1.4 + check-unused-deps: + name: Check Unused Dependencies of ${{ matrix.components }} (${{ matrix.flags }}) + if: always() && inputs.isRust && needs.changes.outputs.components != '[]' + strategy: + matrix: + components: ${{ fromJson(needs.changes.outputs.components) }} + flags: ["--all-features", "--no-default-features"] + fail-fast: false + runs-on: [self-hosted] + needs: changes + + steps: + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # Pin v4.1.1 + - name: Run Cargo Udeps + run: cargo +nightly ci-udeps -p ${{matrix.components}} ${{ matrix.flags }} + + check-unused-deps-iota-sdk: + name: Check Unused Dependencies of iota-sdk (${{ matrix.flags }}) + if: always() && inputs.isRust && needs.iota-sdk-changes.outputs.changed == 'true' + runs-on: [self-hosted] + needs: iota-sdk-changes + strategy: + matrix: + flags: ["--all-features", "--no-default-features"] + + steps: + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # Pin v4.1.1 + # iota-sdk version needs to be explicitly defined here due to this bug + # https://github.com/rust-lang/cargo/issues/12891 + # (we have the stardust iota-sdk package as a dependency) + - name: Run Cargo Udeps + run: cargo +nightly ci-udeps -p iota-sdk@0.1.4 ${{ matrix.flags }} + test-extra: env: # Tests written with #[sim_test] are often flaky if run as #[tokio::test] - this var diff --git a/Cargo.lock b/Cargo.lock index 25d491ba6fc..2f3681f3783 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3317,18 +3317,6 @@ dependencies = [ "serde_json", ] -[[package]] -name = "diesel-derive-enum" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81c5131a2895ef64741dad1d483f358c2a229a3a2d1b256778cdc5e146db64d4" -dependencies = [ - "heck 0.4.1", - "proc-macro2 1.0.86", - "quote 1.0.36", - "syn 2.0.72", -] - [[package]] name = "diesel_derives" version = "2.2.2" @@ -5196,7 +5184,6 @@ dependencies = [ "move-bytecode-utils", "move-bytecode-verifier", "move-core-types", - "move-package", "move-vm-config", "move-vm-profiler", "move-vm-runtime", @@ -5230,7 +5217,6 @@ dependencies = [ "move-bytecode-utils", "move-bytecode-verifier-v0", "move-core-types", - "move-package", "move-vm-config", "move-vm-profiler", "move-vm-runtime-v0", @@ -5328,7 +5314,6 @@ dependencies = [ "rand 0.8.5", "serde", "serde_json", - "telemetry-subscribers", "tempfile", "tokio", "tracing", @@ -5436,7 +5421,6 @@ dependencies = [ "derivative", "fastcrypto", "futures", - "iota", "iota-config", "iota-core", "iota-faucet", @@ -5477,7 +5461,6 @@ dependencies = [ "csv", "dirs 5.0.1", "fastcrypto", - "insta", "iota-keys", "iota-protocol-config", "iota-types", @@ -5490,7 +5473,6 @@ dependencies = [ "serde", "serde_with", "serde_yaml", - "tempfile", "tracing", ] @@ -5587,7 +5569,6 @@ dependencies = [ "test-fuzz", "thiserror", "tokio", - "tokio-retry", "tokio-stream", "tracing", "twox-hash", @@ -5609,7 +5590,6 @@ dependencies = [ "iota-swarm-config", "iota-test-transaction-builder", "iota-types", - "move-cli", "move-disassembler", "serde", "strum 0.26.3", @@ -5704,7 +5684,6 @@ dependencies = [ "serde", "serde_json", "tap", - "telemetry-subscribers", "tempfile", "tokio", "tracing", @@ -5716,11 +5695,9 @@ name = "iota-e2e-tests" version = "0.1.0" dependencies = [ "anyhow", - "assert_cmd", "async-trait", "bcs", "clap", - "expect-test", "eyre", "fastcrypto", "fastcrypto-zkp", @@ -5910,7 +5887,6 @@ dependencies = [ "fastcrypto", "flate2", "fs_extra", - "insta", "iota-adapter-v0", "iota-config", "iota-execution", @@ -5934,7 +5910,6 @@ dependencies = [ "prometheus", "rand 0.8.5", "rand_pcg", - "rand_regex", "rand_seeder", "regex", "reqwest 0.12.5", @@ -6070,9 +6045,7 @@ dependencies = [ "cached", "chrono", "clap", - "criterion", "diesel", - "diesel-derive-enum", "diesel_migrations", "fastcrypto", "futures", @@ -6086,8 +6059,6 @@ dependencies = [ "iota-package-resolver", "iota-protocol-config", "iota-rest-api", - "iota-sdk 0.1.4", - "iota-test-transaction-builder", "iota-transaction-builder", "iota-types", "itertools 0.13.0", @@ -6096,9 +6067,7 @@ dependencies = [ "move-bytecode-utils", "move-core-types", "mysten-metrics", - "ntest", "prometheus", - "rayon", "regex", "serde", "serde_json", @@ -6106,7 +6075,6 @@ dependencies = [ "simulacrum", "tap", "telemetry-subscribers", - "test-cluster", "thiserror", "tokio", "tracing", @@ -6345,22 +6313,16 @@ name = "iota-move" version = "0.1.4" dependencies = [ "anyhow", - "assert_cmd", "clap", "colored", "const-str", "futures", "git-version", - "iota-core", "iota-macros", "iota-move-build", "iota-move-natives-latest", - "iota-node", "iota-protocol-config", - "iota-simulator", "iota-types", - "jemalloc-ctl", - "jsonrpsee", "move-binary-format", "move-cli", "move-compiler", @@ -6387,7 +6349,6 @@ name = "iota-move-build" version = "0.1.4" dependencies = [ "anyhow", - "datatest-stable", "fastcrypto", "iota-protocol-config", "iota-types", @@ -6575,7 +6536,6 @@ dependencies = [ "hyper 1.4.1", "insta", "iota-move-build", - "iota-rest-api", "iota-types", "lru 0.10.1", "move-binary-format", @@ -6592,7 +6552,6 @@ dependencies = [ name = "iota-proc-macros" version = "0.7.0" dependencies = [ - "iota-enum-compat-util", "msim-macros", "proc-macro2 1.0.86", "quote 1.0.36", @@ -6636,7 +6595,6 @@ dependencies = [ "iota-core", "iota-execution", "iota-framework", - "iota-json-rpc", "iota-json-rpc-api", "iota-json-rpc-types", "iota-protocol-config", @@ -6737,7 +6695,6 @@ dependencies = [ "dashmap", "dirs 5.0.1", "futures", - "iota-json-rpc", "iota-json-rpc-types", "iota-keys", "iota-sdk 0.1.4", @@ -6995,7 +6952,6 @@ dependencies = [ "bytes", "chrono", "clap", - "criterion", "eyre", "fastcrypto", "futures", @@ -7009,7 +6965,6 @@ dependencies = [ "iota-json-rpc-types", "iota-macros", "iota-protocol-config", - "iota-simulator", "iota-test-transaction-builder", "iota-types", "itertools 0.13.0", @@ -7024,7 +6979,6 @@ dependencies = [ "once_cell", "parking_lot 0.12.3", "percent-encoding", - "pretty_assertions", "prometheus", "reqwest 0.12.5", "rocksdb", @@ -8675,7 +8629,6 @@ dependencies = [ name = "move-proc-macros" version = "0.1.0" dependencies = [ - "enum-compat-util", "quote 1.0.36", "syn 2.0.72", ] @@ -8891,7 +8844,6 @@ dependencies = [ "move-vm-types", "once_cell", "parking_lot 0.12.3", - "sha3 0.9.1", "smallvec", "tracing", ] @@ -8910,7 +8862,6 @@ dependencies = [ "move-vm-types", "once_cell", "parking_lot 0.12.3", - "sha3 0.9.1", "smallvec", "tracing", ] @@ -9182,13 +9133,9 @@ version = "0.1.0" dependencies = [ "bcs", "bincode", - "criterion", "fastcrypto", "hex-literal", - "proptest", - "proptest-derive", "serde", - "serde-reflection", "serde_json", "shared-crypto", ] @@ -9245,7 +9192,6 @@ dependencies = [ "mysten-common", "mysten-metrics", "narwhal-crypto", - "narwhal-test-utils", "narwhal-types", "parking_lot 0.12.3", "prometheus", @@ -9624,39 +9570,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "ntest" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb183f0a1da7a937f672e5ee7b7edb727bf52b8a52d531374ba8ebb9345c0330" -dependencies = [ - "ntest_test_cases", - "ntest_timeout", -] - -[[package]] -name = "ntest_test_cases" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16d0d3f2a488592e5368ebbe996e7f1d44aa13156efad201f5b4d84e150eaa93" -dependencies = [ - "proc-macro2 1.0.86", - "quote 1.0.36", - "syn 1.0.109", -] - -[[package]] -name = "ntest_timeout" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcc7c92f190c97f79b4a332f5e81dcf68c8420af2045c936c9be0bc9de6f63b5" -dependencies = [ - "proc-macro-crate 3.1.0", - "proc-macro2 1.0.86", - "quote 1.0.36", - "syn 1.0.109", -] - [[package]] name = "nu-ansi-term" version = "0.46.0" @@ -11227,16 +11140,6 @@ dependencies = [ "rand_core 0.6.4", ] -[[package]] -name = "rand_regex" -version = "0.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b2a9fe2d7d9eeaf3279d1780452a5bbd26b31b27938787ef1c3e930d1e9cfbd" -dependencies = [ - "rand 0.8.5", - "regex-syntax 0.6.29", -] - [[package]] name = "rand_seeder" version = "0.2.3" @@ -12726,7 +12629,6 @@ dependencies = [ "iota-genesis-builder", "iota-keys", "iota-protocol-config", - "iota-storage", "iota-swarm-config", "iota-transaction-checks", "iota-types", @@ -13659,17 +13561,6 @@ dependencies = [ "syn 2.0.72", ] -[[package]] -name = "tokio-retry" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f57eb36ecbe0fc510036adff84824dd3c24bb781e21bfa67b69d556aa85214f" -dependencies = [ - "pin-project", - "rand 0.8.5", - "tokio", -] - [[package]] name = "tokio-rustls" version = "0.24.1" @@ -14216,14 +14107,11 @@ dependencies = [ "msim", "once_cell", "ouroboros", - "proc-macro2 1.0.86", "prometheus", - "quote 1.0.36", "rand 0.8.5", "rocksdb", "rstest", "serde", - "syn 1.0.109", "tap", "tempfile", "thiserror", diff --git a/crates/iota-archival/Cargo.toml b/crates/iota-archival/Cargo.toml index d2c3df13786..a965c37249f 100644 --- a/crates/iota-archival/Cargo.toml +++ b/crates/iota-archival/Cargo.toml @@ -34,7 +34,6 @@ more-asserts.workspace = true move-binary-format.workspace = true move-core-types.workspace = true move-package.workspace = true -telemetry-subscribers.workspace = true tempfile.workspace = true tokio = { workspace = true, features = ["test-util"] } diff --git a/crates/iota-cluster-test/Cargo.toml b/crates/iota-cluster-test/Cargo.toml index bc9f2cdf87e..c62f8a0fcc8 100644 --- a/crates/iota-cluster-test/Cargo.toml +++ b/crates/iota-cluster-test/Cargo.toml @@ -24,7 +24,6 @@ tokio = { workspace = true, features = ["full"] } tracing.workspace = true uuid.workspace = true -iota.workspace = true iota-config.workspace = true iota-core.workspace = true iota-faucet.workspace = true diff --git a/crates/iota-config/Cargo.toml b/crates/iota-config/Cargo.toml index df4ac93b03a..e6bb5f467f0 100644 --- a/crates/iota-config/Cargo.toml +++ b/crates/iota-config/Cargo.toml @@ -30,6 +30,4 @@ iota-types.workspace = true narwhal-config.workspace = true [dev-dependencies] -insta.workspace = true iota-types = { workspace = true, features = ["test-utils"] } -tempfile.workspace = true diff --git a/crates/iota-core/Cargo.toml b/crates/iota-core/Cargo.toml index 2c3c6be94d1..798ab838410 100644 --- a/crates/iota-core/Cargo.toml +++ b/crates/iota-core/Cargo.toml @@ -44,7 +44,6 @@ tap.workspace = true tempfile.workspace = true thiserror.workspace = true tokio = { workspace = true, features = ["full", "tracing", "test-util"] } -tokio-retry.workspace = true tokio-stream.workspace = true tracing.workspace = true twox-hash.workspace = true @@ -104,7 +103,6 @@ serde-reflection.workspace = true serde_yaml.workspace = true move-symbol-pool.workspace = true -test-cluster.workspace = true iota-test-transaction-builder.workspace = true iota-types = { workspace = true, features = ["test-utils"] } @@ -119,6 +117,10 @@ iota-protocol-config.workspace = true # moka uses `quanta` by default for timing, which is not compatible with the simulator [target.'cfg(msim)'.dependencies] moka = { workspace = true, default-features = false, features = ["sync", "atomic64"] } + +[target.'cfg(msim)'.dev-dependencies] +test-cluster.workspace = true + [target.'cfg(not(msim))'.dependencies] moka = { workspace = true, features = ["sync"] } @@ -134,6 +136,10 @@ harness = false [[bench]] name = "batch_verification_bench" harness = false +required-features = ["test-utils"] [features] test-utils = [] + +[package.metadata.cargo-udeps.ignore] +development = ["pprof", "test-fuzz"] diff --git a/crates/iota-cost/Cargo.toml b/crates/iota-cost/Cargo.toml index 6f25b3afc43..9fb5554b7e7 100644 --- a/crates/iota-cost/Cargo.toml +++ b/crates/iota-cost/Cargo.toml @@ -21,6 +21,5 @@ iota-json-rpc-types.workspace = true iota-move-build.workspace = true iota-swarm-config.workspace = true iota-test-transaction-builder.workspace = true -move-cli.workspace = true move-disassembler.workspace = true test-cluster.workspace = true diff --git a/crates/iota-data-ingestion-core/Cargo.toml b/crates/iota-data-ingestion-core/Cargo.toml index 1228bb734e9..faebd09a3c4 100644 --- a/crates/iota-data-ingestion-core/Cargo.toml +++ b/crates/iota-data-ingestion-core/Cargo.toml @@ -20,7 +20,6 @@ prometheus.workspace = true serde.workspace = true serde_json.workspace = true tap.workspace = true -telemetry-subscribers.workspace = true tempfile.workspace = true tokio = { workspace = true, features = ["full"] } tracing.workspace = true diff --git a/crates/iota-e2e-tests/Cargo.toml b/crates/iota-e2e-tests/Cargo.toml index d55a2fad74a..c40fe6a2c03 100644 --- a/crates/iota-e2e-tests/Cargo.toml +++ b/crates/iota-e2e-tests/Cargo.toml @@ -10,11 +10,9 @@ publish = false [dev-dependencies] anyhow.workspace = true -assert_cmd.workspace = true async-trait.workspace = true bcs.workspace = true clap.workspace = true -expect-test.workspace = true eyre.workspace = true fs_extra.workspace = true futures.workspace = true diff --git a/crates/iota-genesis-builder/Cargo.toml b/crates/iota-genesis-builder/Cargo.toml index a1cf308a2b5..efe5fad1423 100644 --- a/crates/iota-genesis-builder/Cargo.toml +++ b/crates/iota-genesis-builder/Cargo.toml @@ -9,38 +9,32 @@ publish = false [dependencies] anyhow.workspace = true bcs.workspace = true +bigdecimal = "0.4.3" camino.workspace = true clap.workspace = true fastcrypto.workspace = true flate2.workspace = true +fs_extra = "1.3.0" +iota-sdk = { version = "1.1.4", default-features = false, features = ["irc_27", "irc_30", "std"] } itertools.workspace = true -move-binary-format.workspace = true -move-compiler.workspace = true -move-core-types.workspace = true -move-package.workspace = true -move-vm-runtime-v0 = { path = "../../external-crates/move/move-execution/v0/crates/move-vm-runtime" } +packable = { version = "0.8.3", default-features = false, features = ["io"] } +prefix-hex = "0.7.1" prometheus.workspace = true rand = { workspace = true, features = ["std_rng"] } -rand_regex.workspace = true +rand_pcg = "0.3.1" +rand_seeder = "0.2.3" regex.workspace = true reqwest.workspace = true +schemars.workspace = true serde.workspace = true serde_json.workspace = true serde_with.workspace = true serde_yaml.workspace = true +shared-crypto.workspace = true tempfile.workspace = true thiserror.workspace = true tokio.workspace = true tracing.workspace = true - -bigdecimal = "0.4.3" -fs_extra = "1.3.0" -iota-sdk = { version = "1.1.4", default-features = false, features = ["irc_27", "irc_30", "std"] } -packable = { version = "0.8.3", default-features = false, features = ["io"] } -prefix-hex = "0.7.1" - -rand_pcg = "0.3.1" -rand_seeder = "0.2.3" tracing-subscriber = "0.3.11" iota-adapter-v0 = { path = "../../iota-execution/v0/iota-adapter/" } @@ -52,13 +46,16 @@ iota-move-build.workspace = true iota-move-natives-v0 = { path = "../../iota-execution/v0/iota-move-natives" } iota-protocol-config.workspace = true iota-types.workspace = true -schemars.workspace = true -shared-crypto.workspace = true +move-binary-format.workspace = true +move-compiler.workspace = true +move-core-types.workspace = true +move-package.workspace = true +move-vm-runtime-v0 = { path = "../../external-crates/move/move-execution/v0/crates/move-vm-runtime" } + [target.'cfg(msim)'.dependencies] iota-simulator.workspace = true [dev-dependencies] -insta.workspace = true iota-swarm-config.workspace = true iota-types = { workspace = true, features = ["test-utils"] } tempfile.workspace = true diff --git a/crates/iota-graphql-rpc/Cargo.toml b/crates/iota-graphql-rpc/Cargo.toml index d21b8b15610..2b2a9c9b765 100644 --- a/crates/iota-graphql-rpc/Cargo.toml +++ b/crates/iota-graphql-rpc/Cargo.toml @@ -48,7 +48,6 @@ serde.workspace = true serde_json.workspace = true serde_with.workspace = true serde_yaml.workspace = true -serial_test.workspace = true shared-crypto.workspace = true similar.workspace = true tap.workspace = true @@ -76,7 +75,6 @@ iota-protocol-config.workspace = true iota-rest-api.workspace = true iota-swarm-config.workspace = true move-bytecode-utils.workspace = true -simulacrum.workspace = true # todo: cleanup test only deps test-cluster.workspace = true [dev-dependencies] @@ -85,9 +83,14 @@ hyper.workspace = true insta.workspace = true iota-framework.workspace = true serde_json.workspace = true +serial_test.workspace = true +simulacrum.workspace = true tower.workspace = true [features] default = ["pg_backend"] pg_integration = [] pg_backend = [] + +[package.metadata.cargo-udeps.ignore] +development = ["serial_test", "simulacrum"] diff --git a/crates/iota-indexer/Cargo.toml b/crates/iota-indexer/Cargo.toml index 4a1c5e2b45a..327ef6c498a 100644 --- a/crates/iota-indexer/Cargo.toml +++ b/crates/iota-indexer/Cargo.toml @@ -15,12 +15,10 @@ bcs.workspace = true chrono.workspace = true clap.workspace = true diesel.workspace = true -diesel-derive-enum.workspace = true futures.workspace = true itertools.workspace = true jsonrpsee.workspace = true prometheus.workspace = true -rayon.workspace = true regex.workspace = true serde.workspace = true serde_json.workspace = true @@ -40,7 +38,6 @@ iota-open-rpc.workspace = true iota-package-resolver.workspace = true iota-protocol-config.workspace = true iota-rest-api.workspace = true -iota-sdk.workspace = true iota-transaction-builder.workspace = true iota-types.workspace = true mysten-metrics.workspace = true @@ -57,14 +54,13 @@ diesel_migrations.workspace = true pg_integration = [] [dev-dependencies] -criterion.workspace = true iota-keys.workspace = true iota-move-build.workspace = true -iota-test-transaction-builder.workspace = true -ntest.workspace = true simulacrum.workspace = true -test-cluster.workspace = true [[bin]] name = "iota-indexer" path = "src/main.rs" + +[package.metadata.cargo-udeps.ignore] +development = ["simulacrum"] diff --git a/crates/iota-move-build/Cargo.toml b/crates/iota-move-build/Cargo.toml index 83586b4f715..8ff8d64f2f9 100644 --- a/crates/iota-move-build/Cargo.toml +++ b/crates/iota-move-build/Cargo.toml @@ -26,6 +26,3 @@ move-core-types.workspace = true move-ir-types.workspace = true move-package.workspace = true move-symbol-pool.workspace = true - -[dev-dependencies] -datatest-stable.workspace = true diff --git a/crates/iota-move/Cargo.toml b/crates/iota-move/Cargo.toml index c52efdb53a3..a85b68b0a81 100644 --- a/crates/iota-move/Cargo.toml +++ b/crates/iota-move/Cargo.toml @@ -29,40 +29,29 @@ move-unit-test.workspace = true telemetry-subscribers.workspace = true tokio = { workspace = true, features = ["full"] } -iota-move-natives = { path = "../../iota-execution/latest/iota-move-natives", package = "iota-move-natives-latest" } move-vm-runtime = { path = "../../external-crates/move/crates/move-vm-runtime" } iota-move-build.workspace = true +iota-move-natives = { path = "../../iota-execution/latest/iota-move-natives", package = "iota-move-natives-latest", optional = true } iota-protocol-config.workspace = true iota-types.workspace = true -[target.'cfg(not(target_env = "msvc"))'.dependencies] -jemalloc-ctl.workspace = true - [dev-dependencies] -assert_cmd.workspace = true futures.workspace = true -jsonrpsee.workspace = true rand.workspace = true tempfile.workspace = true move-package.workspace = true -iota-core.workspace = true iota-macros.workspace = true -iota-node.workspace = true -iota-simulator.workspace = true mysten-metrics.workspace = true -[package.metadata.cargo-udeps.ignore] -normal = ["jemalloc-ctl"] - [features] default = [] build = [] coverage = [] disassemble = [] prove = [] -unit_test = ["build", "dep:once_cell"] +unit_test = ["build", "dep:once_cell", "iota-move-natives"] calibrate = [] all = ["build", "coverage", "disassemble", "prove", "unit_test", "calibrate"] diff --git a/crates/iota-package-resolver/Cargo.toml b/crates/iota-package-resolver/Cargo.toml index ca98eb917b9..a09b88de3aa 100644 --- a/crates/iota-package-resolver/Cargo.toml +++ b/crates/iota-package-resolver/Cargo.toml @@ -10,7 +10,6 @@ publish = false async-trait.workspace = true bcs.workspace = true eyre.workspace = true -iota-rest-api.workspace = true iota-types.workspace = true lru.workspace = true move-binary-format.workspace = true diff --git a/crates/iota-proc-macros/Cargo.toml b/crates/iota-proc-macros/Cargo.toml index 5fd9dda395e..130c5fea59d 100644 --- a/crates/iota-proc-macros/Cargo.toml +++ b/crates/iota-proc-macros/Cargo.toml @@ -10,7 +10,6 @@ publish = false proc-macro = true [dependencies] -iota-enum-compat-util.workspace = true proc-macro2.workspace = true quote.workspace = true syn = { version = "2", features = ["full", "fold", "extra-traits"] } diff --git a/crates/iota-replay/Cargo.toml b/crates/iota-replay/Cargo.toml index 95987278ead..ffa091184e4 100644 --- a/crates/iota-replay/Cargo.toml +++ b/crates/iota-replay/Cargo.toml @@ -40,7 +40,6 @@ iota-config.workspace = true iota-core.workspace = true iota-execution.workspace = true iota-framework.workspace = true -iota-json-rpc.workspace = true iota-json-rpc-api.workspace = true iota-json-rpc-types.workspace = true iota-protocol-config.workspace = true diff --git a/crates/iota-rpc-loadgen/Cargo.toml b/crates/iota-rpc-loadgen/Cargo.toml index db57b72b5e8..12f2a1404a8 100644 --- a/crates/iota-rpc-loadgen/Cargo.toml +++ b/crates/iota-rpc-loadgen/Cargo.toml @@ -20,7 +20,6 @@ tracing.workspace = true shellexpand.workspace = true -iota-json-rpc.workspace = true iota-json-rpc-types.workspace = true iota-keys.workspace = true iota-sdk.workspace = true diff --git a/crates/iota-storage/Cargo.toml b/crates/iota-storage/Cargo.toml index bc87e83b6c9..48ada98c13b 100644 --- a/crates/iota-storage/Cargo.toml +++ b/crates/iota-storage/Cargo.toml @@ -58,12 +58,9 @@ move-bytecode-utils.workspace = true [dev-dependencies] anyhow.workspace = true -criterion.workspace = true iota-macros = { workspace = true } -iota-simulator = { workspace = true } iota-test-transaction-builder.workspace = true iota-types = { workspace = true, features = ["test-utils"] } num_cpus.workspace = true once_cell.workspace = true -pretty_assertions.workspace = true tempfile.workspace = true diff --git a/crates/iota-types/Cargo.toml b/crates/iota-types/Cargo.toml index 65d185a642b..199cc80cd50 100644 --- a/crates/iota-types/Cargo.toml +++ b/crates/iota-types/Cargo.toml @@ -66,7 +66,7 @@ fastcrypto-zkp.workspace = true derive_more.workspace = true proptest.workspace = true -proptest-derive.workspace = true +proptest-derive = { workspace = true, optional = true } typed-store-error.workspace = true [dev-dependencies] @@ -74,7 +74,6 @@ bincode.workspace = true criterion.workspace = true expect-test.workspace = true proptest.workspace = true -proptest-derive.workspace = true serde_yaml.workspace = true [[bench]] @@ -89,4 +88,4 @@ gas-profiler = [ "move-vm-types/gas-profiler", "move-vm-test-utils/gas-profiler", ] -fuzzing = ["move-core-types/fuzzing"] +fuzzing = ["move-core-types/fuzzing", "proptest-derive"] diff --git a/crates/mysten-common/Cargo.toml b/crates/mysten-common/Cargo.toml index b258eded289..3f60b5b2596 100644 --- a/crates/mysten-common/Cargo.toml +++ b/crates/mysten-common/Cargo.toml @@ -9,4 +9,7 @@ publish = false [dependencies] futures.workspace = true parking_lot.workspace = true -tokio.workspace = true +tokio = { workspace = true, features = ["sync"] } + +[dev-dependencies] +tokio = { workspace = true, features = ["test-util", "macros"] } diff --git a/crates/mysten-common/src/sync/notify_once.rs b/crates/mysten-common/src/sync/notify_once.rs index 802be3050ed..4628cfec234 100644 --- a/crates/mysten-common/src/sync/notify_once.rs +++ b/crates/mysten-common/src/sync/notify_once.rs @@ -82,27 +82,32 @@ impl Default for NotifyOnce { } } -#[tokio::test] -async fn notify_once_test() { - let notify_once = NotifyOnce::new(); - // Before notify() is called .wait() is not ready - assert!( - futures::future::poll_immediate(notify_once.wait()) - .await - .is_none() - ); - let wait = notify_once.wait(); - notify_once.notify().unwrap(); - // Pending wait() call is ready now - assert!(futures::future::poll_immediate(wait).await.is_some()); - // Take wait future and don't resolve it. - // This makes sure lock is dropped properly and wait futures resolve - // independently of each other - let _dangle_wait = notify_once.wait(); - // Any new wait() is immediately ready - assert!( - futures::future::poll_immediate(notify_once.wait()) - .await - .is_some() - ); +#[cfg(test)] +mod test { + use super::*; + + #[tokio::test] + async fn notify_once_test() { + let notify_once = NotifyOnce::new(); + // Before notify() is called .wait() is not ready + assert!( + futures::future::poll_immediate(notify_once.wait()) + .await + .is_none() + ); + let wait = notify_once.wait(); + notify_once.notify().unwrap(); + // Pending wait() call is ready now + assert!(futures::future::poll_immediate(wait).await.is_some()); + // Take wait future and don't resolve it. + // This makes sure lock is dropped properly and wait futures resolve + // independently of each other + let _dangle_wait = notify_once.wait(); + // Any new wait() is immediately ready + assert!( + futures::future::poll_immediate(notify_once.wait()) + .await + .is_some() + ); + } } diff --git a/crates/simulacrum/Cargo.toml b/crates/simulacrum/Cargo.toml index fa0b9ff44f0..aca5e58e19f 100644 --- a/crates/simulacrum/Cargo.toml +++ b/crates/simulacrum/Cargo.toml @@ -26,7 +26,6 @@ iota-framework.workspace = true iota-genesis-builder.workspace = true iota-keys.workspace = true iota-protocol-config.workspace = true -iota-storage.workspace = true iota-swarm-config.workspace = true iota-transaction-checks.workspace = true iota-types.workspace = true diff --git a/crates/typed-store-derive/Cargo.toml b/crates/typed-store-derive/Cargo.toml index 1e4139c0add..7327b795aab 100644 --- a/crates/typed-store-derive/Cargo.toml +++ b/crates/typed-store-derive/Cargo.toml @@ -23,3 +23,12 @@ rocksdb.workspace = true tempfile.workspace = true tokio = { workspace = true, features = ["test-util"] } typed-store.workspace = true + +[package.metadata.cargo-udeps.ignore] +development = [ + "eyre", + "rocksdb", + "tempfile", + "tokio", + "typed-store", +] diff --git a/crates/typed-store/Cargo.toml b/crates/typed-store/Cargo.toml index 1a52f227038..8a1931d5e6b 100644 --- a/crates/typed-store/Cargo.toml +++ b/crates/typed-store/Cargo.toml @@ -32,11 +32,8 @@ typed-store-error.workspace = true [dev-dependencies] once_cell.workspace = true -proc-macro2.workspace = true -quote.workspace = true rand.workspace = true rstest.workspace = true -syn.workspace = true tempfile.workspace = true typed-store-derive.workspace = true uint.workspace = true diff --git a/external-crates/move/Cargo.lock b/external-crates/move/Cargo.lock index 307d3ee0fcb..65f6a0ab413 100644 --- a/external-crates/move/Cargo.lock +++ b/external-crates/move/Cargo.lock @@ -13,6 +13,18 @@ dependencies = [ "version_check", ] +[[package]] +name = "ahash" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" +dependencies = [ + "cfg-if", + "once_cell", + "version_check", + "zerocopy", +] + [[package]] name = "aho-corasick" version = "0.7.20" @@ -28,6 +40,12 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "250f629c0161ad8107cf89319e990051fae62832fd343083bea452d93e2205fd" +[[package]] +name = "allocator-api2" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" + [[package]] name = "android_system_properties" version = "0.1.5" @@ -218,6 +236,12 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +[[package]] +name = "bitflags" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" + [[package]] name = "bitmaps" version = "2.1.0" @@ -317,7 +341,6 @@ dependencies = [ name = "bytecode-verifier-tests" version = "0.1.0" dependencies = [ - "fail", "hex", "invalid-mutations", "move-binary-format", @@ -360,6 +383,15 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" +[[package]] +name = "castaway" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0abae9be0aaf9ea96a3b1b8b1b55c602ca751eba1b1500220cea4ecbafe7c0d5" +dependencies = [ + "rustversion", +] + [[package]] name = "cc" version = "1.0.79" @@ -398,7 +430,7 @@ checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" dependencies = [ "ansi_term 0.12.1", "atty", - "bitflags", + "bitflags 1.3.2", "strsim 0.8.0", "textwrap 0.11.0", "unicode-width", @@ -412,7 +444,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "71655c45cb9845d3270c9d6df84ebe72b4dad3c2ba3f7023ad47c144e4e473a5" dependencies = [ "atty", - "bitflags", + "bitflags 1.3.2", "clap_derive 3.2.18", "clap_lex 0.2.4", "indexmap 1.9.3", @@ -523,6 +555,19 @@ dependencies = [ "winapi", ] +[[package]] +name = "compact_str" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f86b9c4c00838774a6d902ef931eff7470720c51d90c2e32cfe15dc304737b3f" +dependencies = [ + "castaway", + "cfg-if", + "itoa", + "ryu", + "static_assertions", +] + [[package]] name = "constant_time_eq" version = "0.1.5" @@ -663,7 +708,23 @@ version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e64e6c0fbe2c17357405f7c758c1ef960fce08bdfb2c03d88d2a18d7e09c4b67" dependencies = [ - "bitflags", + "bitflags 1.3.2", + "crossterm_winapi", + "libc", + "mio", + "parking_lot", + "signal-hook", + "signal-hook-mio", + "winapi", +] + +[[package]] +name = "crossterm" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f476fe445d41c9e991fd07515a6f463074b782242ccf4a5b7b1d1012e70824df" +dependencies = [ + "bitflags 2.6.0", "crossterm_winapi", "libc", "mio", @@ -675,9 +736,9 @@ dependencies = [ [[package]] name = "crossterm_winapi" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ae1b35a484aa10e07fe0638d02301c5ad24de82d310ccbd2f3693da5f09bf1c" +checksum = "acdd7c62a3665c7f6830a51635d9ac9b23ed385797f70a83bb8bafe9c572ab2b" dependencies = [ "winapi", ] @@ -1072,7 +1133,7 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" dependencies = [ - "ahash", + "ahash 0.7.6", ] [[package]] @@ -1080,6 +1141,10 @@ name = "hashbrown" version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +dependencies = [ + "ahash 0.8.11", + "allocator-api2", +] [[package]] name = "heck" @@ -1096,6 +1161,12 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + [[package]] name = "hermit-abi" version = "0.1.19" @@ -1244,7 +1315,7 @@ version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6ab388864246d58a276e60e7569a833d9cc4cd75c66e5ca77c177dad38e59996" dependencies = [ - "ahash", + "ahash 0.7.6", "dashmap", "hashbrown 0.12.3", "once_cell", @@ -1419,6 +1490,15 @@ dependencies = [ "serde", ] +[[package]] +name = "lru" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37ee39891760e7d94734f6f63fedc29a2e4a152f836120753a72503f09fcf904" +dependencies = [ + "hashbrown 0.14.5", +] + [[package]] name = "lsp-server" version = "0.5.2" @@ -1437,7 +1517,7 @@ version = "0.90.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6f3734ab1d7d157fc0c45110e06b587c31cd82bea2ccfd6b563cbff0aaeeb1d3" dependencies = [ - "bitflags", + "bitflags 1.3.2", "serde", "serde_json", "serde_repr", @@ -1546,7 +1626,6 @@ dependencies = [ "proptest-derive", "ref-cast", "serde", - "serde_json", "variant_count", ] @@ -1586,7 +1665,6 @@ name = "move-bytecode-verifier" version = "0.1.0" dependencies = [ "hex-literal", - "invalid-mutations", "move-abstract-stack", "move-binary-format", "move-borrow-graph", @@ -1600,7 +1678,6 @@ name = "move-bytecode-verifier-v0" version = "0.1.0" dependencies = [ "hex-literal", - "invalid-mutations", "move-abstract-stack", "move-binary-format", "move-borrow-graph", @@ -1615,12 +1692,12 @@ version = "0.1.0" dependencies = [ "anyhow", "clap 4.4.1", - "crossterm", + "crossterm 0.25.0", "move-binary-format", "move-bytecode-source-map", "move-disassembler", + "ratatui", "regex", - "tui", ] [[package]] @@ -1957,7 +2034,6 @@ dependencies = [ name = "move-proc-macros" version = "0.1.0" dependencies = [ - "enum-compat-util", "quote 1.0.36", "syn 2.0.71", ] @@ -2225,16 +2301,12 @@ dependencies = [ "hex", "move-binary-format", "move-bytecode-verifier", - "move-compiler", "move-core-types", - "move-ir-compiler", "move-vm-config", "move-vm-profiler", "move-vm-types", "once_cell", "parking_lot", - "proptest", - "sha3", "smallvec", "tracing", ] @@ -2249,16 +2321,12 @@ dependencies = [ "hex", "move-binary-format", "move-bytecode-verifier-v0", - "move-compiler", "move-core-types", - "move-ir-compiler", "move-vm-config", "move-vm-profiler", "move-vm-types", "once_cell", "parking_lot", - "proptest", - "sha3", "smallvec", "tracing", ] @@ -2410,9 +2478,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.17.1" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "oorandom" @@ -2716,7 +2784,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "29f1b898011ce9595050a68e60f90bad083ff2987a695a42357134c8381fba70" dependencies = [ "bit-set", - "bitflags", + "bitflags 1.3.2", "byteorder", "lazy_static", "num-traits", @@ -2875,6 +2943,27 @@ dependencies = [ "rand_core 0.6.4", ] +[[package]] +name = "ratatui" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d16546c5b5962abf8ce6e2881e722b4e0ae3b6f1a08a26ae3573c55853ca68d3" +dependencies = [ + "bitflags 2.6.0", + "cassowary", + "compact_str", + "crossterm 0.27.0", + "itertools 0.13.0", + "lru", + "paste", + "stability", + "strum", + "strum_macros", + "unicode-segmentation", + "unicode-truncate", + "unicode-width", +] + [[package]] name = "rayon" version = "1.7.0" @@ -2909,7 +2998,7 @@ version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" dependencies = [ - "bitflags", + "bitflags 1.3.2", ] [[package]] @@ -2918,7 +3007,7 @@ version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" dependencies = [ - "bitflags", + "bitflags 1.3.2", ] [[package]] @@ -3013,7 +3102,7 @@ version = "0.37.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2aae838e49b3d63e9274e1c01833cc8139d3fec468c3b84688c628f44b1ae11d" dependencies = [ - "bitflags", + "bitflags 1.3.2", "errno", "io-lifetimes", "libc", @@ -3021,6 +3110,12 @@ dependencies = [ "windows-sys 0.45.0", ] +[[package]] +name = "rustversion" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" + [[package]] name = "rusty-fork" version = "0.3.0" @@ -3205,9 +3300,9 @@ checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde" [[package]] name = "signal-hook" -version = "0.3.15" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "732768f1176d21d09e076c23a93123d40bba92d50c4058da34d45c8de8e682b9" +checksum = "8621587d4798caf8eb44879d42e56b9a93ea5dcd315a6487c357130095b62801" dependencies = [ "libc", "signal-hook-registry", @@ -3288,6 +3383,16 @@ dependencies = [ "winapi", ] +[[package]] +name = "stability" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d904e7009df136af5297832a3ace3370cd14ff1546a232f4f185036c2736fcac" +dependencies = [ + "quote 1.0.36", + "syn 2.0.71", +] + [[package]] name = "stacker" version = "0.1.15" @@ -3341,6 +3446,28 @@ dependencies = [ "syn 0.15.44", ] +[[package]] +name = "strum" +version = "0.26.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" +dependencies = [ + "strum_macros", +] + +[[package]] +name = "strum_macros" +version = "0.26.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" +dependencies = [ + "heck 0.5.0", + "proc-macro2 1.0.86", + "quote 1.0.36", + "rustversion", + "syn 2.0.71", +] + [[package]] name = "subtle" version = "2.5.0" @@ -3677,19 +3804,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7f741b240f1a48843f9b8e0444fb55fb2a4ff67293b50a9179dfd5ea67f8d41" -[[package]] -name = "tui" -version = "0.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccdd26cbd674007e649a272da4475fb666d3aa0ad0531da7136db6fab0e5bad1" -dependencies = [ - "bitflags", - "cassowary", - "crossterm", - "unicode-segmentation", - "unicode-width", -] - [[package]] name = "typenum" version = "1.16.0" @@ -3741,11 +3855,22 @@ version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" +[[package]] +name = "unicode-truncate" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3644627a5af5fa321c95b9b235a72fd24cd29c648c2c379431e6628655627bf" +dependencies = [ + "itertools 0.13.0", + "unicode-segmentation", + "unicode-width", +] + [[package]] name = "unicode-width" -version = "0.1.10" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" +checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" [[package]] name = "unicode-xid" @@ -4127,6 +4252,26 @@ dependencies = [ "tap", ] +[[package]] +name = "zerocopy" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" +dependencies = [ + "proc-macro2 1.0.86", + "quote 1.0.36", + "syn 2.0.71", +] + [[package]] name = "zeroize" version = "1.7.0" diff --git a/external-crates/move/crates/bytecode-verifier-tests/Cargo.toml b/external-crates/move/crates/bytecode-verifier-tests/Cargo.toml index 7b96f52828d..b89a44c2f54 100644 --- a/external-crates/move/crates/bytecode-verifier-tests/Cargo.toml +++ b/external-crates/move/crates/bytecode-verifier-tests/Cargo.toml @@ -10,7 +10,6 @@ repository = "https://github.com/diem/diem" description = "Diem bytecode verifier tests" [dev-dependencies] -fail = { workspace = true, features = ["failpoints"] } hex.workspace = true petgraph.workspace = true proptest.workspace = true @@ -23,5 +22,3 @@ move-vm-config.workspace = true [features] fuzzing = ["move-binary-format/fuzzing"] - -[dependencies] diff --git a/external-crates/move/crates/move-binary-format/Cargo.toml b/external-crates/move/crates/move-binary-format/Cargo.toml index bef186ed23e..3811919ba56 100644 --- a/external-crates/move/crates/move-binary-format/Cargo.toml +++ b/external-crates/move/crates/move-binary-format/Cargo.toml @@ -28,7 +28,6 @@ getrandom = { workspace = true, features = ["js"], optional = true } move-core-types = { workspace = true, features = ["fuzzing"] } proptest.workspace = true proptest-derive.workspace = true -serde_json.workspace = true [features] default = [] diff --git a/external-crates/move/crates/move-bytecode-verifier/Cargo.toml b/external-crates/move/crates/move-bytecode-verifier/Cargo.toml index 5249bffb1d4..5883b757437 100644 --- a/external-crates/move/crates/move-bytecode-verifier/Cargo.toml +++ b/external-crates/move/crates/move-bytecode-verifier/Cargo.toml @@ -20,7 +20,6 @@ move-vm-config.workspace = true [dev-dependencies] hex-literal.workspace = true -invalid-mutations.workspace = true [features] default = [] diff --git a/external-crates/move/crates/move-proc-macros/Cargo.toml b/external-crates/move/crates/move-proc-macros/Cargo.toml index fc855001656..1d0b1d9b1b2 100644 --- a/external-crates/move/crates/move-proc-macros/Cargo.toml +++ b/external-crates/move/crates/move-proc-macros/Cargo.toml @@ -10,6 +10,5 @@ publish = false proc-macro = true [dependencies] -enum-compat-util.workspace = true quote.workspace = true syn = { version = "2", features = ["full", "fold", "extra-traits"] } diff --git a/external-crates/move/crates/move-vm-profiler/Cargo.toml b/external-crates/move/crates/move-vm-profiler/Cargo.toml index 225f19e2508..9e4aa1e55d2 100644 --- a/external-crates/move/crates/move-vm-profiler/Cargo.toml +++ b/external-crates/move/crates/move-vm-profiler/Cargo.toml @@ -9,10 +9,10 @@ publish = false [dependencies] once_cell.workspace = true serde.workspace = true -serde_json.workspace = true -tracing.workspace = true +serde_json = { workspace = true, optional = true } +tracing = { workspace = true, optional = true } move-vm-config.workspace = true [features] -gas-profiler = ["move-vm-config/gas-profiler"] +gas-profiler = ["move-vm-config/gas-profiler", "serde_json", "tracing"] diff --git a/external-crates/move/crates/move-vm-runtime/Cargo.toml b/external-crates/move/crates/move-vm-runtime/Cargo.toml index ce4404b4924..46821691065 100644 --- a/external-crates/move/crates/move-vm-runtime/Cargo.toml +++ b/external-crates/move/crates/move-vm-runtime/Cargo.toml @@ -14,7 +14,6 @@ better_any.workspace = true fail.workspace = true once_cell.workspace = true parking_lot.workspace = true -sha3.workspace = true smallvec.workspace = true tracing.workspace = true @@ -28,9 +27,6 @@ move-vm-types.workspace = true [dev-dependencies] anyhow.workspace = true hex.workspace = true -move-compiler.workspace = true -move-ir-compiler.workspace = true -proptest.workspace = true [features] default = [] diff --git a/external-crates/move/crates/move-vm-types/Cargo.toml b/external-crates/move/crates/move-vm-types/Cargo.toml index 31196ff8650..d416c34c554 100644 --- a/external-crates/move/crates/move-vm-types/Cargo.toml +++ b/external-crates/move/crates/move-vm-types/Cargo.toml @@ -20,9 +20,6 @@ move-binary-format.workspace = true move-core-types.workspace = true move-vm-profiler.workspace = true -[dev-dependencies] -proptest.workspace = true - [features] default = [] fuzzing = ["proptest", "move-binary-format/fuzzing"] diff --git a/external-crates/move/move-execution/v0/crates/move-bytecode-verifier/Cargo.toml b/external-crates/move/move-execution/v0/crates/move-bytecode-verifier/Cargo.toml index 302f2c9017b..f089243666f 100644 --- a/external-crates/move/move-execution/v0/crates/move-bytecode-verifier/Cargo.toml +++ b/external-crates/move/move-execution/v0/crates/move-bytecode-verifier/Cargo.toml @@ -20,7 +20,6 @@ move-vm-config.workspace = true [dev-dependencies] hex-literal.workspace = true -invalid-mutations.workspace = true [features] default = [] diff --git a/external-crates/move/move-execution/v0/crates/move-vm-runtime/Cargo.toml b/external-crates/move/move-execution/v0/crates/move-vm-runtime/Cargo.toml index 292716f487c..95dbde2c81d 100644 --- a/external-crates/move/move-execution/v0/crates/move-vm-runtime/Cargo.toml +++ b/external-crates/move/move-execution/v0/crates/move-vm-runtime/Cargo.toml @@ -14,7 +14,6 @@ better_any.workspace = true fail.workspace = true once_cell.workspace = true parking_lot.workspace = true -sha3.workspace = true smallvec.workspace = true tracing.workspace = true @@ -28,9 +27,6 @@ move-vm-types.workspace = true [dev-dependencies] anyhow.workspace = true hex.workspace = true -move-compiler.workspace = true -move-ir-compiler.workspace = true -proptest.workspace = true [features] default = [] diff --git a/iota-execution/latest/iota-adapter/Cargo.toml b/iota-execution/latest/iota-adapter/Cargo.toml index daec53f1200..6e5b2ce5131 100644 --- a/iota-execution/latest/iota-adapter/Cargo.toml +++ b/iota-execution/latest/iota-adapter/Cargo.toml @@ -31,9 +31,6 @@ iota-protocol-config.workspace = true iota-types.workspace = true parking_lot.workspace = true -[dev-dependencies] -move-package.workspace = true - [features] gas-profiler = [ "iota-types/gas-profiler", diff --git a/iota-execution/v0/iota-adapter/Cargo.toml b/iota-execution/v0/iota-adapter/Cargo.toml index 0841bbd6865..b9ee2e67d45 100644 --- a/iota-execution/v0/iota-adapter/Cargo.toml +++ b/iota-execution/v0/iota-adapter/Cargo.toml @@ -31,9 +31,6 @@ iota-protocol-config.workspace = true iota-types.workspace = true parking_lot.workspace = true -[dev-dependencies] -move-package.workspace = true - [features] gas-profiler = [ "iota-types/gas-profiler", diff --git a/narwhal/crypto/Cargo.toml b/narwhal/crypto/Cargo.toml index 1fe2457f9ed..e5232dcc773 100644 --- a/narwhal/crypto/Cargo.toml +++ b/narwhal/crypto/Cargo.toml @@ -14,11 +14,8 @@ shared-crypto.workspace = true [features] default = [] + [dev-dependencies] bincode.workspace = true -criterion.workspace = true hex-literal.workspace = true -proptest.workspace = true -proptest-derive.workspace = true -serde-reflection.workspace = true serde_json.workspace = true diff --git a/narwhal/network/Cargo.toml b/narwhal/network/Cargo.toml index ad9b49e89a1..fe9d05e8f97 100644 --- a/narwhal/network/Cargo.toml +++ b/narwhal/network/Cargo.toml @@ -33,4 +33,3 @@ tower.workspace = true [dev-dependencies] bincode.workspace = true -test-utils = { path = "../test-utils", package = "narwhal-test-utils" } diff --git a/narwhal/primary/Cargo.toml b/narwhal/primary/Cargo.toml index 2e87fc0300b..d0578ccfc02 100644 --- a/narwhal/primary/Cargo.toml +++ b/narwhal/primary/Cargo.toml @@ -75,3 +75,6 @@ bench = false name = "process_certificates" harness = false required-features = ["benchmark"] + +[package.metadata.cargo-udeps.ignore] +development = ["criterion"]