diff --git a/.githooks/pre-commit b/.githooks/pre-commit index 8b6b4fc..a2afcb9 100644 --- a/.githooks/pre-commit +++ b/.githooks/pre-commit @@ -1,6 +1,16 @@ #!/bin/bash set -e +######## +# Cargo dependencies +####### + +# if cargo machete does not return 0 +cargo machete || { + echo "❌ You have unused dependencies in your Cargo.toml. Check the above." + exit 1 +} + ########## # CLAP CLI ########## diff --git a/Cargo.lock b/Cargo.lock index 595d0cf..c88d879 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -13436,7 +13436,6 @@ version = "0.0.1" dependencies = [ "anyhow", "kestrel", - "mtma-migrator-pre-l1-merge-core", "mtma-migrator-test-accounts-equal-criterion", "mtma-migrator-test-types", "mtma-migrator-types", @@ -14871,11 +14870,9 @@ dependencies = [ "dotenv", "jemallocator", "movement-core", - "mtma-core", "orfile", "serde", "tokio", - "tracing", "tracing-subscriber 0.3.19", ] @@ -14994,12 +14991,10 @@ version = "0.0.1" dependencies = [ "anyhow", "aptos-cached-packages 0.1.0 (git+https://github.com/movementlabsxyz/aptos-core.git?rev=cb3b7b02f68c7d6982257e4c59955d0e63b513db)", - "aptos-config 0.1.0 (git+https://github.com/movementlabsxyz/aptos-core.git?rev=cb3b7b02f68c7d6982257e4c59955d0e63b513db)", "aptos-node 0.0.0-main (git+https://github.com/movementlabsxyz/aptos-core.git?rev=cb3b7b02f68c7d6982257e4c59955d0e63b513db)", "cargo_metadata 0.19.2", "chrono", "clap 4.5.36", - "hex", "jsonlvar", "kestrel", "mtma-types", @@ -15010,7 +15005,6 @@ dependencies = [ "serde", "serde_json", "serde_yaml 0.8.26", - "syncador", "thiserror 1.0.69", "tokio", "tracing", @@ -15120,13 +15114,11 @@ dependencies = [ "anyhow", "cargo_metadata 0.19.2", "clap 4.5.36", - "hex", "include-vendor", "jsonlvar", "kestrel", "movement-core-util", "movement-signer-loader", - "movement-types", "mtma-types", "orfile", "ready-docker", @@ -15135,13 +15127,10 @@ dependencies = [ "serde", "serde_json", "strip-ansi-escapes", - "syncador", - "tempdir", "thiserror 1.0.69", "tokio", "tracing", "tracing-test", - "uuid", ] [[package]] @@ -15362,9 +15351,7 @@ name = "movement-syncing" version = "0.0.1" dependencies = [ "anyhow", - "hex", "movement-types", - "serde", "syncador", "tempdir", "uuid", @@ -15440,54 +15427,41 @@ name = "mtma" version = "0.0.1" dependencies = [ "anyhow", - "chrono", "clap 4.5.36", "clap-markdown-ext", "dotenv", - "futures", "jemallocator", - "maptos-execution-util", - "movement-syncing", "mtma-core", - "mtma-node-null-core", - "mtma-node-preludes", - "mtma-node-test-global-storage-includes-criterion", - "mtma-node-test-global-storage-injective-criterion", - "mtma-node-test-global-storage-not-empty-criterion", - "mtma-node-test-types", "orfile", - "rand 0.7.3", "serde", - "sysinfo 0.34.2", "tokio", "tracing", "tracing-subscriber 0.3.19", ] +[[package]] +name = "mtma-box-environment" +version = "0.0.1" +dependencies = [ + "anyhow", + "clap 4.5.36", + "mtma-environment-types", + "mtma-migrator-types", + "serde", + "thiserror 1.0.69", +] + [[package]] name = "mtma-check" version = "0.0.1" dependencies = [ "anyhow", - "chrono", "clap 4.5.36", "clap-markdown-ext", "dotenv", - "futures", "jemallocator", - "maptos-execution-util", - "movement-syncing", - "mtma-core", - "mtma-node-null-core", - "mtma-node-preludes", - "mtma-node-test-global-storage-includes-criterion", - "mtma-node-test-global-storage-injective-criterion", - "mtma-node-test-global-storage-not-empty-criterion", - "mtma-node-test-types", "orfile", - "rand 0.7.3", "serde", - "sysinfo 0.34.2", "tokio", "tracing", "tracing-subscriber 0.3.19", @@ -15498,25 +15472,12 @@ name = "mtma-check-dev" version = "0.0.1" dependencies = [ "anyhow", - "chrono", "clap 4.5.36", "clap-markdown-ext", "dotenv", - "futures", "jemallocator", - "maptos-execution-util", - "movement-syncing", - "mtma-core", - "mtma-node-null-core", - "mtma-node-preludes", - "mtma-node-test-global-storage-includes-criterion", - "mtma-node-test-global-storage-injective-criterion", - "mtma-node-test-global-storage-not-empty-criterion", - "mtma-node-test-types", "orfile", - "rand 0.7.3", "serde", - "sysinfo 0.34.2", "tokio", "tracing", "tracing-subscriber 0.3.19", @@ -15526,14 +15487,9 @@ dependencies = [ name = "mtma-core" version = "0.0.1" dependencies = [ - "anyhow", "clap 4.5.36", - "clap-markdown-ext", - "dotenv", - "orfile", "serde", "thiserror 1.0.69", - "tokio", ] [[package]] @@ -15541,60 +15497,41 @@ name = "mtma-dev" version = "0.0.1" dependencies = [ "anyhow", - "chrono", "clap 4.5.36", "clap-markdown-ext", "dotenv", - "futures", "jemallocator", - "maptos-execution-util", - "movement-syncing", "mtma-check", "mtma-check-dev", - "mtma-core", "mtma-migrate", "mtma-migrate-dev", - "mtma-node-null-core", - "mtma-node-preludes", - "mtma-node-test-global-storage-includes-criterion", - "mtma-node-test-global-storage-injective-criterion", - "mtma-node-test-global-storage-not-empty-criterion", - "mtma-node-test-types", "mtma-track", "mtma-track-dev", - "orfile", - "rand 0.7.3", - "serde", - "sysinfo 0.34.2", "tokio", "tracing", "tracing-subscriber 0.3.19", ] +[[package]] +name = "mtma-environment-types" +version = "0.0.1" +dependencies = [ + "mtma-migrator-types", + "thiserror 1.0.69", +] + [[package]] name = "mtma-migrate" version = "0.0.1" dependencies = [ "anyhow", - "chrono", "clap 4.5.36", "clap-markdown-ext", "dotenv", - "futures", "jemallocator", - "maptos-execution-util", - "movement-syncing", "mtma-core", - "mtma-node-null-core", - "mtma-node-preludes", - "mtma-node-test-global-storage-includes-criterion", - "mtma-node-test-global-storage-injective-criterion", - "mtma-node-test-global-storage-not-empty-criterion", - "mtma-node-test-types", "orfile", - "rand 0.7.3", "serde", - "sysinfo 0.34.2", "tokio", "tracing", "tracing-subscriber 0.3.19", @@ -15605,25 +15542,13 @@ name = "mtma-migrate-chain" version = "0.0.1" dependencies = [ "anyhow", - "chrono", "clap 4.5.36", "clap-markdown-ext", "dotenv", - "futures", "jemallocator", - "maptos-execution-util", - "movement-syncing", "mtma-core", - "mtma-node-null-core", - "mtma-node-preludes", - "mtma-node-test-global-storage-includes-criterion", - "mtma-node-test-global-storage-injective-criterion", - "mtma-node-test-global-storage-not-empty-criterion", - "mtma-node-test-types", "orfile", - "rand 0.7.3", "serde", - "sysinfo 0.34.2", "tokio", "tracing", "tracing-subscriber 0.3.19", @@ -15635,13 +15560,8 @@ version = "0.0.1" dependencies = [ "anyhow", "clap 4.5.36", - "clap-markdown-ext", - "dotenv", - "mtma-core", - "orfile", "serde", "thiserror 1.0.69", - "tokio", ] [[package]] @@ -15649,26 +15569,13 @@ name = "mtma-migrate-chain-dev" version = "0.0.1" dependencies = [ "anyhow", - "chrono", "clap 4.5.36", "clap-markdown-ext", "dotenv", - "futures", "jemallocator", - "maptos-execution-util", - "movement-syncing", - "mtma-core", "mtma-migrate-chain-core", - "mtma-node-null-core", - "mtma-node-preludes", - "mtma-node-test-global-storage-includes-criterion", - "mtma-node-test-global-storage-injective-criterion", - "mtma-node-test-global-storage-not-empty-criterion", - "mtma-node-test-types", "orfile", - "rand 0.7.3", "serde", - "sysinfo 0.34.2", "tokio", "tracing", "tracing-subscriber 0.3.19", @@ -15679,25 +15586,13 @@ name = "mtma-migrate-dev" version = "0.0.1" dependencies = [ "anyhow", - "chrono", "clap 4.5.36", "clap-markdown-ext", "dotenv", - "futures", "jemallocator", - "maptos-execution-util", - "movement-syncing", "mtma-core", - "mtma-node-null-core", - "mtma-node-preludes", - "mtma-node-test-global-storage-includes-criterion", - "mtma-node-test-global-storage-injective-criterion", - "mtma-node-test-global-storage-not-empty-criterion", - "mtma-node-test-types", "orfile", - "rand 0.7.3", "serde", - "sysinfo 0.34.2", "tokio", "tracing", "tracing-subscriber 0.3.19", @@ -15708,26 +15603,20 @@ name = "mtma-migrate-node" version = "0.0.1" dependencies = [ "anyhow", - "chrono", "clap 4.5.36", "clap-markdown-ext", "dotenv", - "futures", "jemallocator", - "maptos-execution-util", - "movement-syncing", + "mtma-box-environment", "mtma-core", + "mtma-environment-types", + "mtma-migrator-types", "mtma-node-null-core", - "mtma-node-preludes", - "mtma-node-test-global-storage-includes-criterion", - "mtma-node-test-global-storage-injective-criterion", - "mtma-node-test-global-storage-not-empty-criterion", - "mtma-node-test-types", + "mtma-provisioner-environment", + "mtma-testing-environment", "orfile", - "rand 0.7.3", "serde", "slect", - "sysinfo 0.34.2", "tokio", "tracing", "tracing-subscriber 0.3.19", @@ -15738,7 +15627,6 @@ name = "mtma-migrate-node-dev" version = "0.0.1" dependencies = [ "anyhow", - "chrono", "clap 4.5.36", "clap-markdown-ext", "dotenv", @@ -15746,17 +15634,11 @@ dependencies = [ "jemallocator", "maptos-execution-util", "movement-syncing", - "mtma-core", "mtma-node-null-core", - "mtma-node-preludes", "mtma-node-test-global-storage-includes-criterion", - "mtma-node-test-global-storage-injective-criterion", - "mtma-node-test-global-storage-not-empty-criterion", "mtma-node-test-types", "orfile", - "rand 0.7.3", "serde", - "sysinfo 0.34.2", "tokio", "tracing", "tracing-subscriber 0.3.19", @@ -15783,22 +15665,14 @@ name = "mtma-migrator-checks-pre-l1-merge" version = "0.0.1" dependencies = [ "anyhow", - "chrono", "kestrel", "movement-core", "mtma-migrator-pre-l1-merge-core", "mtma-migrator-test-accounts-equal-criterion", "mtma-migrator-test-types", "mtma-migrator-types", - "mtma-node-null-core", - "mtma-node-preludes", - "mtma-node-replay-core", - "mtma-node-test-global-storage-includes-criterion", - "mtma-node-test-global-storage-injective-criterion", - "mtma-node-test-global-storage-not-empty-criterion", "mtma-node-test-types", "mtma-types", - "rand 0.7.3", "tempfile", "tokio", "tracing", @@ -15826,21 +15700,12 @@ name = "mtma-migrator-null-core" version = "0.0.1" dependencies = [ "anyhow", - "aptos-config 0.1.0 (git+https://github.com/movementlabsxyz/aptos-core.git?rev=cb3b7b02f68c7d6982257e4c59955d0e63b513db)", - "aptos-db 0.1.0 (git+https://github.com/movementlabsxyz/aptos-core.git?rev=cb3b7b02f68c7d6982257e4c59955d0e63b513db)", - "aptos-executor 0.1.0 (git+https://github.com/movementlabsxyz/aptos-core.git?rev=cb3b7b02f68c7d6982257e4c59955d0e63b513db)", - "aptos-storage-interface 0.1.0 (git+https://github.com/movementlabsxyz/aptos-core.git?rev=cb3b7b02f68c7d6982257e4c59955d0e63b513db)", - "aptos-vm 0.1.0 (git+https://github.com/movementlabsxyz/aptos-core.git?rev=cb3b7b02f68c7d6982257e4c59955d0e63b513db)", "chrono", "clap 4.5.36", - "clap-markdown-ext", - "dotenv", "mtma-node-types", "mtma-types", - "orfile", "serde", "thiserror 1.0.69", - "tokio", "tracing", "uuid", "walkdir", @@ -15851,31 +15716,16 @@ name = "mtma-migrator-pre-l1-merge-core" version = "0.0.1" dependencies = [ "anyhow", - "aptos-config 0.1.0 (git+https://github.com/movementlabsxyz/aptos-core.git?rev=cb3b7b02f68c7d6982257e4c59955d0e63b513db)", - "aptos-db 0.1.0 (git+https://github.com/movementlabsxyz/aptos-core.git?rev=cb3b7b02f68c7d6982257e4c59955d0e63b513db)", - "aptos-executor 0.1.0 (git+https://github.com/movementlabsxyz/aptos-core.git?rev=cb3b7b02f68c7d6982257e4c59955d0e63b513db)", "aptos-framework-pre-l1-merge-release", - "aptos-storage-interface 0.1.0 (git+https://github.com/movementlabsxyz/aptos-core.git?rev=cb3b7b02f68c7d6982257e4c59955d0e63b513db)", - "aptos-vm 0.1.0 (git+https://github.com/movementlabsxyz/aptos-core.git?rev=cb3b7b02f68c7d6982257e4c59955d0e63b513db)", - "chrono", "clap 4.5.36", - "clap-markdown-ext", - "dotenv", "hex", "movement-core", - "movement-signer", - "movement-signer-loader", "mtma-migrator-types", "mtma-node-null-core", - "mtma-node-types", "mtma-types", - "orfile", "serde", "thiserror 1.0.69", "tokio", - "tracing", - "uuid", - "walkdir", ] [[package]] @@ -15883,7 +15733,6 @@ name = "mtma-migrator-test-accounts-equal-criterion" version = "0.0.1" dependencies = [ "anyhow", - "bcs 0.1.4", "bcs-ext", "mtma-migrator-test-types", "tokio", @@ -15895,7 +15744,6 @@ name = "mtma-migrator-test-balances-equal-criterion" version = "0.0.1" dependencies = [ "anyhow", - "bcs 0.1.4", "bcs-ext", "mtma-migrator-test-types", "tokio", @@ -15925,7 +15773,6 @@ name = "mtma-migrator-test-transacting-criterion" version = "0.0.1" dependencies = [ "anyhow", - "aptos-rest-client 0.0.0 (git+https://github.com/movementlabsxyz/aptos-core.git?rev=cb3b7b02f68c7d6982257e4c59955d0e63b513db)", "aptos-sdk 0.0.3 (git+https://github.com/movementlabsxyz/aptos-core.git?rev=cb3b7b02f68c7d6982257e4c59955d0e63b513db)", "bcs 0.1.4", "mtma-migrator-test-types", @@ -15938,16 +15785,9 @@ name = "mtma-migrator-test-types" version = "0.0.1" dependencies = [ "anyhow", - "aptos-rest-client 0.0.0 (git+https://github.com/movementlabsxyz/aptos-core.git?rev=cb3b7b02f68c7d6982257e4c59955d0e63b513db)", - "aptos-sdk 0.0.3 (git+https://github.com/movementlabsxyz/aptos-core.git?rev=cb3b7b02f68c7d6982257e4c59955d0e63b513db)", - "bcs 0.1.4", - "hex", "kestrel", - "movement-client", "mtma-migrator-types", "mtma-node-test-types", - "mtma-types", - "serde", "thiserror 1.0.69", "tokio", "tracing", @@ -15976,24 +15816,12 @@ name = "mtma-migrator-types" version = "0.0.1" dependencies = [ "anyhow", - "aptos-config 0.1.0 (git+https://github.com/movementlabsxyz/aptos-core.git?rev=cb3b7b02f68c7d6982257e4c59955d0e63b513db)", - "aptos-executor 0.1.0 (git+https://github.com/movementlabsxyz/aptos-core.git?rev=cb3b7b02f68c7d6982257e4c59955d0e63b513db)", - "aptos-rest-client 0.0.0 (git+https://github.com/movementlabsxyz/aptos-core.git?rev=cb3b7b02f68c7d6982257e4c59955d0e63b513db)", - "aptos-storage-interface 0.1.0 (git+https://github.com/movementlabsxyz/aptos-core.git?rev=cb3b7b02f68c7d6982257e4c59955d0e63b513db)", - "aptos-types 0.0.3 (git+https://github.com/movementlabsxyz/aptos-core.git?rev=cb3b7b02f68c7d6982257e4c59955d0e63b513db)", - "aptos-vm 0.1.0 (git+https://github.com/movementlabsxyz/aptos-core.git?rev=cb3b7b02f68c7d6982257e4c59955d0e63b513db)", - "either", - "hex", "kestrel", - "maptos-opt-executor", "movement-aptos-core", - "movement-client", "movement-core", "mtma-node-types", "mtma-types", - "serde", "thiserror 1.0.69", - "tracing", ] [[package]] @@ -16001,17 +15829,12 @@ name = "mtma-node-checks-mainnet" version = "0.0.1" dependencies = [ "anyhow", - "chrono", "futures", "maptos-execution-util", "movement-syncing", "mtma-node-null-core", - "mtma-node-preludes", "mtma-node-test-global-storage-includes-criterion", - "mtma-node-test-global-storage-injective-criterion", - "mtma-node-test-global-storage-not-empty-criterion", "mtma-node-test-types", - "rand 0.7.3", "sysinfo 0.34.2", "tokio", "tracing", @@ -16023,7 +15846,6 @@ name = "mtma-node-checks-sketchpad" version = "0.0.1" dependencies = [ "anyhow", - "chrono", "mtma-node-null-core", "mtma-node-preludes", "mtma-node-replay-core", @@ -16031,7 +15853,6 @@ dependencies = [ "mtma-node-test-global-storage-injective-criterion", "mtma-node-test-global-storage-not-empty-criterion", "mtma-node-test-types", - "rand 0.7.3", "tokio", "tracing", "tracing-test", @@ -16042,21 +15863,12 @@ name = "mtma-node-null-core" version = "0.0.1" dependencies = [ "anyhow", - "aptos-config 0.1.0 (git+https://github.com/movementlabsxyz/aptos-core.git?rev=cb3b7b02f68c7d6982257e4c59955d0e63b513db)", - "aptos-db 0.1.0 (git+https://github.com/movementlabsxyz/aptos-core.git?rev=cb3b7b02f68c7d6982257e4c59955d0e63b513db)", - "aptos-executor 0.1.0 (git+https://github.com/movementlabsxyz/aptos-core.git?rev=cb3b7b02f68c7d6982257e4c59955d0e63b513db)", - "aptos-storage-interface 0.1.0 (git+https://github.com/movementlabsxyz/aptos-core.git?rev=cb3b7b02f68c7d6982257e4c59955d0e63b513db)", - "aptos-vm 0.1.0 (git+https://github.com/movementlabsxyz/aptos-core.git?rev=cb3b7b02f68c7d6982257e4c59955d0e63b513db)", "chrono", "clap 4.5.36", - "clap-markdown-ext", - "dotenv", "mtma-node-types", "mtma-types", - "orfile", "serde", "thiserror 1.0.69", - "tokio", "tracing", "uuid", "walkdir", @@ -16066,20 +15878,10 @@ dependencies = [ name = "mtma-node-preludes" version = "0.0.1" dependencies = [ - "anyhow", - "aptos-executor 0.1.0 (git+https://github.com/movementlabsxyz/aptos-core.git?rev=cb3b7b02f68c7d6982257e4c59955d0e63b513db)", - "aptos-storage-interface 0.1.0 (git+https://github.com/movementlabsxyz/aptos-core.git?rev=cb3b7b02f68c7d6982257e4c59955d0e63b513db)", "aptos-types 0.0.3 (git+https://github.com/movementlabsxyz/aptos-core.git?rev=cb3b7b02f68c7d6982257e4c59955d0e63b513db)", - "aptos-vm 0.1.0 (git+https://github.com/movementlabsxyz/aptos-core.git?rev=cb3b7b02f68c7d6982257e4c59955d0e63b513db)", "chrono", - "either", - "hex", - "maptos-opt-executor", "mtma-node-test-types", - "mtma-node-types", "rand 0.7.3", - "serde", - "thiserror 1.0.69", ] [[package]] @@ -16094,22 +15896,16 @@ dependencies = [ "aptos-executor-types 0.1.0 (git+https://github.com/movementlabsxyz/aptos-core.git?rev=cb3b7b02f68c7d6982257e4c59955d0e63b513db)", "aptos-storage-interface 0.1.0 (git+https://github.com/movementlabsxyz/aptos-core.git?rev=cb3b7b02f68c7d6982257e4c59955d0e63b513db)", "aptos-types 0.0.3 (git+https://github.com/movementlabsxyz/aptos-core.git?rev=cb3b7b02f68c7d6982257e4c59955d0e63b513db)", - "aptos-vm 0.1.0 (git+https://github.com/movementlabsxyz/aptos-core.git?rev=cb3b7b02f68c7d6982257e4c59955d0e63b513db)", "aptos-vm-genesis 0.1.0 (git+https://github.com/movementlabsxyz/aptos-core.git?rev=cb3b7b02f68c7d6982257e4c59955d0e63b513db)", "bcs 0.1.4", "bcs-ext", "chrono", "clap 4.5.36", - "clap-markdown-ext", - "dotenv", "mtma-node-types", - "orfile", "serde", "thiserror 1.0.69", - "tokio", "tracing", "uuid", - "walkdir", ] [[package]] @@ -16123,7 +15919,6 @@ dependencies = [ name = "mtma-node-test-global-storage-includes-criterion" version = "0.0.1" dependencies = [ - "anyhow", "mtma-node-test-types", "mtma-types", "tracing", @@ -16133,7 +15928,6 @@ dependencies = [ name = "mtma-node-test-global-storage-injective-criterion" version = "0.0.1" dependencies = [ - "anyhow", "mtma-node-test-types", "mtma-types", "tracing", @@ -16143,7 +15937,6 @@ dependencies = [ name = "mtma-node-test-global-storage-not-empty-criterion" version = "0.0.1" dependencies = [ - "anyhow", "mtma-node-test-types", ] @@ -16151,18 +15944,9 @@ dependencies = [ name = "mtma-node-test-types" version = "0.0.1" dependencies = [ - "anyhow", - "aptos-executor 0.1.0 (git+https://github.com/movementlabsxyz/aptos-core.git?rev=cb3b7b02f68c7d6982257e4c59955d0e63b513db)", - "aptos-storage-interface 0.1.0 (git+https://github.com/movementlabsxyz/aptos-core.git?rev=cb3b7b02f68c7d6982257e4c59955d0e63b513db)", - "aptos-types 0.0.3 (git+https://github.com/movementlabsxyz/aptos-core.git?rev=cb3b7b02f68c7d6982257e4c59955d0e63b513db)", - "aptos-vm 0.1.0 (git+https://github.com/movementlabsxyz/aptos-core.git?rev=cb3b7b02f68c7d6982257e4c59955d0e63b513db)", "chrono", - "either", - "hex", - "maptos-opt-executor", "mtma-node-types", "mtma-types", - "serde", "thiserror 1.0.69", ] @@ -16171,51 +15955,58 @@ name = "mtma-node-types" version = "0.0.1" dependencies = [ "anyhow", - "aptos-executor 0.1.0 (git+https://github.com/movementlabsxyz/aptos-core.git?rev=cb3b7b02f68c7d6982257e4c59955d0e63b513db)", - "aptos-storage-interface 0.1.0 (git+https://github.com/movementlabsxyz/aptos-core.git?rev=cb3b7b02f68c7d6982257e4c59955d0e63b513db)", - "aptos-types 0.0.3 (git+https://github.com/movementlabsxyz/aptos-core.git?rev=cb3b7b02f68c7d6982257e4c59955d0e63b513db)", - "aptos-vm 0.1.0 (git+https://github.com/movementlabsxyz/aptos-core.git?rev=cb3b7b02f68c7d6982257e4c59955d0e63b513db)", "either", "futures-channel", - "hex", "maptos-opt-executor", "movement-aptos-core", "movement-util", "mtma-types", - "serde", "tempfile", "thiserror 1.0.69", - "tokio", "tracing", "tracing-test", "uuid", "walkdir", ] +[[package]] +name = "mtma-provisioner-environment" +version = "0.0.1" +dependencies = [ + "anyhow", + "clap 4.5.36", + "mtma-environment-types", + "mtma-migrator-types", + "serde", + "thiserror 1.0.69", +] + +[[package]] +name = "mtma-testing-environment" +version = "0.0.1" +dependencies = [ + "anyhow", + "clap 4.5.36", + "kestrel", + "movement-core", + "mtma-environment-types", + "mtma-migrator-types", + "serde", + "thiserror 1.0.69", + "tokio", +] + [[package]] name = "mtma-track" version = "0.0.1" dependencies = [ "anyhow", - "chrono", "clap 4.5.36", "clap-markdown-ext", "dotenv", - "futures", "jemallocator", - "maptos-execution-util", - "movement-syncing", - "mtma-core", - "mtma-node-null-core", - "mtma-node-preludes", - "mtma-node-test-global-storage-includes-criterion", - "mtma-node-test-global-storage-injective-criterion", - "mtma-node-test-global-storage-not-empty-criterion", - "mtma-node-test-types", "orfile", - "rand 0.7.3", "serde", - "sysinfo 0.34.2", "tokio", "tracing", "tracing-subscriber 0.3.19", @@ -16226,25 +16017,12 @@ name = "mtma-track-dev" version = "0.0.1" dependencies = [ "anyhow", - "chrono", "clap 4.5.36", "clap-markdown-ext", "dotenv", - "futures", "jemallocator", - "maptos-execution-util", - "movement-syncing", - "mtma-core", - "mtma-node-null-core", - "mtma-node-preludes", - "mtma-node-test-global-storage-includes-criterion", - "mtma-node-test-global-storage-injective-criterion", - "mtma-node-test-global-storage-not-empty-criterion", - "mtma-node-test-types", "orfile", - "rand 0.7.3", "serde", - "sysinfo 0.34.2", "tokio", "tracing", "tracing-subscriber 0.3.19", diff --git a/Cargo.toml b/Cargo.toml index b30e246..31c22fe 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,15 +10,22 @@ members = [ "migration/core/node/*", "migration/core/migrator/*", "migration/util/*", - # executor + + # environments + "environments/core/*", + "environments/util/*", + + # checks + ## node "checks/node/util/*", "checks/node/citeria/*", "checks/node/checks/*", "checks/node/preludes", - # e2e + ## migrator "checks/migrator/util/*", "checks/migrator/citeria/*", "checks/migrator/checks/*", + # util "util/bcs-ext", "util/movement/*", @@ -209,6 +216,14 @@ movement-aptos-core = { path = "util/movement-aptos/core" } movement-aptos-core-util = { path = "util/movement-aptos/core-util" } mtma-types = { path = "util/types" } +## Environments +### util +mtma-environment-types = { path = "environments/util/types" } +### core +mtma-testing-environment = { path = "environments/core/testing" } +mtma-provisioner-environment = { path = "environments/core/provisioner" } +mtma-box-environment = { path = "environments/core/box" } + [workspace.lints.clippy] debug_assert_with_mut_call = "deny" inefficient_to_string = "deny" diff --git a/checks/migrator/checks/pre-l1-merge/Cargo.toml b/checks/migrator/checks/pre-l1-merge/Cargo.toml index 8b4f2dd..4cba583 100644 --- a/checks/migrator/checks/pre-l1-merge/Cargo.toml +++ b/checks/migrator/checks/pre-l1-merge/Cargo.toml @@ -13,16 +13,8 @@ mtma-types = { workspace = true } mtma-migrator-types = { workspace = true } mtma-migrator-test-types = { workspace = true } anyhow = { workspace = true } -mtma-node-replay-core = { workspace = true } -mtma-node-test-global-storage-injective-criterion = { workspace = true } -mtma-node-test-global-storage-includes-criterion = { workspace = true } -mtma-node-test-global-storage-not-empty-criterion = { workspace = true } mtma-migrator-test-accounts-equal-criterion = { workspace = true } -mtma-node-preludes = { workspace = true } -mtma-node-null-core = { workspace = true } tokio = { workspace = true } -chrono = { workspace = true } -rand = { workspace = true } kestrel = { workspace = true } mtma-node-test-types = { workspace = true } mtma-migrator-pre-l1-merge-core = { workspace = true } diff --git a/checks/migrator/checks/sketchpad/Cargo.toml b/checks/migrator/checks/sketchpad/Cargo.toml index bca0c40..111a2ec 100644 --- a/checks/migrator/checks/sketchpad/Cargo.toml +++ b/checks/migrator/checks/sketchpad/Cargo.toml @@ -17,7 +17,6 @@ mtma-node-null-core = { workspace = true } tokio = { workspace = true } kestrel = { workspace = true } mtma-node-test-types = { workspace = true } -mtma-migrator-pre-l1-merge-core = { workspace = true } [dev-dependencies] tracing-test = { workspace = true } diff --git a/checks/migrator/citeria/accounts-equal/Cargo.toml b/checks/migrator/citeria/accounts-equal/Cargo.toml index 79c5b74..c67c171 100644 --- a/checks/migrator/citeria/accounts-equal/Cargo.toml +++ b/checks/migrator/citeria/accounts-equal/Cargo.toml @@ -10,7 +10,6 @@ rust-version = { workspace = true } [dependencies] mtma-migrator-test-types = { workspace = true } -bcs = { workspace = true } bcs-ext = { workspace = true } tokio = { workspace = true } anyhow = { workspace = true } diff --git a/checks/migrator/citeria/balances-equal/Cargo.toml b/checks/migrator/citeria/balances-equal/Cargo.toml index ed9d1cd..ac394a0 100644 --- a/checks/migrator/citeria/balances-equal/Cargo.toml +++ b/checks/migrator/citeria/balances-equal/Cargo.toml @@ -10,7 +10,6 @@ rust-version = { workspace = true } [dependencies] mtma-migrator-test-types = { workspace = true } -bcs = { workspace = true } bcs-ext = { workspace = true } tokio = { workspace = true } anyhow = { workspace = true } diff --git a/checks/migrator/citeria/transacting/Cargo.toml b/checks/migrator/citeria/transacting/Cargo.toml index 34e4686..354ba7b 100644 --- a/checks/migrator/citeria/transacting/Cargo.toml +++ b/checks/migrator/citeria/transacting/Cargo.toml @@ -11,7 +11,6 @@ rust-version = { workspace = true } [dependencies] mtma-migrator-test-types = { workspace = true } anyhow = { workspace = true } -aptos-rest-client = { workspace = true } aptos-sdk = { workspace = true } bcs = { workspace = true } rand = { workspace = true } diff --git a/checks/migrator/util/types/Cargo.toml b/checks/migrator/util/types/Cargo.toml index f3ffd06..bcf49e8 100644 --- a/checks/migrator/util/types/Cargo.toml +++ b/checks/migrator/util/types/Cargo.toml @@ -11,16 +11,9 @@ rust-version = { workspace = true } [dependencies] mtma-node-test-types = { workspace = true } mtma-migrator-types = { workspace = true } -serde = { workspace = true } anyhow = { workspace = true } -hex = { workspace = true } -movement-client = { workspace = true } -aptos-rest-client = { workspace = true } -aptos-sdk = { workspace = true } thiserror = { workspace = true } tokio = { workspace = true } -bcs = { workspace = true } -mtma-types = { workspace = true } kestrel = { workspace = true } tracing = { workspace = true } diff --git a/checks/node/checks/movement-mainnet/Cargo.toml b/checks/node/checks/movement-mainnet/Cargo.toml index 6fa6c77..866afb9 100644 --- a/checks/node/checks/movement-mainnet/Cargo.toml +++ b/checks/node/checks/movement-mainnet/Cargo.toml @@ -12,15 +12,10 @@ rust-version = { workspace = true } mtma-node-test-types = { workspace = true } anyhow = { workspace = true } mtma-node-null-core = { workspace = true } -mtma-node-test-global-storage-injective-criterion = { workspace = true } mtma-node-test-global-storage-includes-criterion = { workspace = true } -mtma-node-test-global-storage-not-empty-criterion = { workspace = true } -mtma-node-preludes = { workspace = true } movement-syncing = { workspace = true } maptos-execution-util = { workspace = true } tokio = { workspace = true } -chrono = { workspace = true } -rand = { workspace = true } futures = { workspace = true } sysinfo = { workspace = true } tracing = { workspace = true } diff --git a/checks/node/checks/sketchpad/Cargo.toml b/checks/node/checks/sketchpad/Cargo.toml index e1203dc..92d1f97 100644 --- a/checks/node/checks/sketchpad/Cargo.toml +++ b/checks/node/checks/sketchpad/Cargo.toml @@ -18,8 +18,6 @@ mtma-node-test-global-storage-includes-criterion = { workspace = true } mtma-node-test-global-storage-not-empty-criterion = { workspace = true } mtma-node-preludes = { workspace = true } tokio = { workspace = true } -chrono = { workspace = true } -rand = { workspace = true } [dev-dependencies] tracing-test = { workspace = true } diff --git a/checks/node/citeria/global-storage-includes/Cargo.toml b/checks/node/citeria/global-storage-includes/Cargo.toml index a2f56d5..7286a3f 100644 --- a/checks/node/citeria/global-storage-includes/Cargo.toml +++ b/checks/node/citeria/global-storage-includes/Cargo.toml @@ -11,7 +11,6 @@ rust-version = { workspace = true } [dependencies] mtma-node-test-types = { workspace = true } mtma-types = { workspace = true } -anyhow = { workspace = true } tracing = { workspace = true } diff --git a/checks/node/citeria/global-storage-injective/Cargo.toml b/checks/node/citeria/global-storage-injective/Cargo.toml index 37cce63..53d062d 100644 --- a/checks/node/citeria/global-storage-injective/Cargo.toml +++ b/checks/node/citeria/global-storage-injective/Cargo.toml @@ -11,7 +11,6 @@ rust-version = { workspace = true } [dependencies] mtma-node-test-types = { workspace = true } mtma-types = { workspace = true } -anyhow = { workspace = true } tracing = { workspace = true } [lints] diff --git a/checks/node/citeria/global-storage-not-empty/Cargo.toml b/checks/node/citeria/global-storage-not-empty/Cargo.toml index 8ab941a..c288257 100644 --- a/checks/node/citeria/global-storage-not-empty/Cargo.toml +++ b/checks/node/citeria/global-storage-not-empty/Cargo.toml @@ -10,8 +10,6 @@ rust-version = { workspace = true } [dependencies] mtma-node-test-types = { workspace = true } -anyhow = { workspace = true } - [lints] workspace = true diff --git a/checks/node/preludes/Cargo.toml b/checks/node/preludes/Cargo.toml index 05e74ad..b184f5b 100644 --- a/checks/node/preludes/Cargo.toml +++ b/checks/node/preludes/Cargo.toml @@ -9,17 +9,7 @@ publish = { workspace = true } rust-version = { workspace = true } [dependencies] -serde = { workspace = true } -anyhow = { workspace = true } -hex = { workspace = true } -maptos-opt-executor = { workspace = true } -aptos-executor = { workspace = true } -aptos-vm = { workspace = true } aptos-types = { workspace = true } -thiserror = { workspace = true } -aptos-storage-interface = { workspace = true } -either = { workspace = true } -mtma-node-types = { workspace = true } chrono = { workspace = true } mtma-node-test-types = { workspace = true } rand = { workspace = true } diff --git a/checks/node/util/types/Cargo.toml b/checks/node/util/types/Cargo.toml index 0f7d1ac..1282bb8 100644 --- a/checks/node/util/types/Cargo.toml +++ b/checks/node/util/types/Cargo.toml @@ -9,16 +9,7 @@ publish = { workspace = true } rust-version = { workspace = true } [dependencies] -serde = { workspace = true } -anyhow = { workspace = true } -hex = { workspace = true } -maptos-opt-executor = { workspace = true } -aptos-executor = { workspace = true } -aptos-vm = { workspace = true } -aptos-types = { workspace = true } thiserror = { workspace = true } -aptos-storage-interface = { workspace = true } -either = { workspace = true } mtma-node-types = { workspace = true } chrono = { workspace = true } mtma-types = { workspace = true } diff --git a/environments/core/box/Cargo.toml b/environments/core/box/Cargo.toml new file mode 100644 index 0000000..535f332 --- /dev/null +++ b/environments/core/box/Cargo.toml @@ -0,0 +1,20 @@ +[package] +name = "mtma-box-environment" +version = { workspace = true } +edition = { workspace = true } +license = { workspace = true } +authors = { workspace = true } +homepage = { workspace = true } +publish = { workspace = true } +rust-version = { workspace = true } + +[dependencies] +serde = { workspace = true, features = ["derive"] } +anyhow = { workspace = true } +clap = { workspace = true } +thiserror = { workspace = true } +mtma-migrator-types = { workspace = true } +mtma-environment-types = { workspace = true } + +[lints] +workspace = true diff --git a/environments/core/box/README.md b/environments/core/box/README.md new file mode 100644 index 0000000..134aab7 --- /dev/null +++ b/environments/core/box/README.md @@ -0,0 +1,2 @@ +# `mtma-box-environment` +The environment which provides a [Migrator](/README.md#migrator) constructed via access to state on the current node. \ No newline at end of file diff --git a/environments/core/box/src/environment.rs b/environments/core/box/src/environment.rs new file mode 100644 index 0000000..689e33f --- /dev/null +++ b/environments/core/box/src/environment.rs @@ -0,0 +1,7 @@ +/// Contains the configuration structs and logic for the migration. +pub mod config; +/// Contains the logic for the migration. +pub mod environment; + +pub use config::*; +pub use environment::*; diff --git a/environments/core/box/src/environment/config.rs b/environments/core/box/src/environment/config.rs new file mode 100644 index 0000000..e383436 --- /dev/null +++ b/environments/core/box/src/environment/config.rs @@ -0,0 +1,28 @@ +use crate::BoxEnvironment; +use clap::Parser; +use serde::{Deserialize, Serialize}; +use std::fmt::Debug; + +/// Errors thrown when working with the [Config]. +#[derive(Debug, thiserror::Error)] +pub enum EnvironmentConfigError { + #[error("failed to build from config: {0}")] + Build(#[source] Box), +} + +/// The config for the [BoxEnvironment]. +/// +/// All fields should be easily statically encodable to a CLI argument. +/// This is the frontend for the core API. +#[derive(Parser, Debug, Serialize, Deserialize, Clone, Default)] +#[clap(help_expected = true)] +pub struct Config {} + +impl Config { + /// Builds the [BoxEnvironment] struct from the config. + /// + /// Note: preserving faillibility here because we may add debug path configuration to the [BoxEnvironment] soon. + pub fn build(&self) -> Result { + Ok(BoxEnvironment::new()) + } +} diff --git a/environments/core/box/src/environment/environment.rs b/environments/core/box/src/environment/environment.rs new file mode 100644 index 0000000..9462687 --- /dev/null +++ b/environments/core/box/src/environment/environment.rs @@ -0,0 +1,30 @@ +use mtma_environment_types::{EnvironmentError, Environmentish}; +use mtma_migrator_types::migrator::MovementMigrator; +use std::fmt::Debug; + +/// Errors thrown when using the [BoxEnvironment]. +#[derive(Debug, thiserror::Error)] +pub enum BoxEnvironmentError { + #[error("Testing Environment: failed with an internal error: {0}")] + Internal(#[source] Box), +} + +impl From for EnvironmentError { + fn from(e: BoxEnvironmentError) -> Self { + EnvironmentError::Internal(e.into()) + } +} + +pub struct BoxEnvironment {} + +impl BoxEnvironment { + pub fn new() -> Self { + Self {} + } +} + +impl Environmentish for BoxEnvironment { + async fn build_movement_migrator(&self) -> Result { + Err(BoxEnvironmentError::Internal(anyhow::anyhow!("not implemented").into()).into()) + } +} diff --git a/environments/core/box/src/lib.rs b/environments/core/box/src/lib.rs new file mode 100644 index 0000000..729b68c --- /dev/null +++ b/environments/core/box/src/lib.rs @@ -0,0 +1,2 @@ +pub mod environment; +pub use environment::*; diff --git a/environments/core/provisioner/Cargo.toml b/environments/core/provisioner/Cargo.toml new file mode 100644 index 0000000..c8d7a64 --- /dev/null +++ b/environments/core/provisioner/Cargo.toml @@ -0,0 +1,20 @@ +[package] +name = "mtma-provisioner-environment" +version = { workspace = true } +edition = { workspace = true } +license = { workspace = true } +authors = { workspace = true } +homepage = { workspace = true } +publish = { workspace = true } +rust-version = { workspace = true } + +[dependencies] +serde = { workspace = true, features = ["derive"] } +anyhow = { workspace = true } +clap = { workspace = true } +thiserror = { workspace = true } +mtma-migrator-types = { workspace = true } +mtma-environment-types = { workspace = true } + +[lints] +workspace = true diff --git a/environments/core/provisioner/README.md b/environments/core/provisioner/README.md new file mode 100644 index 0000000..6d1689a --- /dev/null +++ b/environments/core/provisioner/README.md @@ -0,0 +1,2 @@ +# `mtma-provisioner-environment` +The environment which provides a [Migrator](/README.md#migrator) constructed via a provisioner node. \ No newline at end of file diff --git a/environments/core/provisioner/src/environment.rs b/environments/core/provisioner/src/environment.rs new file mode 100644 index 0000000..689e33f --- /dev/null +++ b/environments/core/provisioner/src/environment.rs @@ -0,0 +1,7 @@ +/// Contains the configuration structs and logic for the migration. +pub mod config; +/// Contains the logic for the migration. +pub mod environment; + +pub use config::*; +pub use environment::*; diff --git a/environments/core/provisioner/src/environment/config.rs b/environments/core/provisioner/src/environment/config.rs new file mode 100644 index 0000000..307f970 --- /dev/null +++ b/environments/core/provisioner/src/environment/config.rs @@ -0,0 +1,28 @@ +use crate::ProvisionerEnvironment; +use clap::Parser; +use serde::{Deserialize, Serialize}; +use std::fmt::Debug; + +/// Errors thrown when working with the [Config]. +#[derive(Debug, thiserror::Error)] +pub enum EnvironmentConfigError { + #[error("failed to build from config: {0}")] + Build(#[source] Box), +} + +/// The config for the [ProvisionerEnvironment]. +/// +/// All fields should be easily statically encodable to a CLI argument. +/// This is the frontend for the core API. +#[derive(Parser, Debug, Serialize, Deserialize, Clone, Default)] +#[clap(help_expected = true)] +pub struct Config {} + +impl Config { + /// Builds the [ProvisionerEnvironment] struct from the config. + /// + /// Note: preserving faillibility here because we may add debug path configuration to the [ProvisionerEnvironment] soon. + pub fn build(&self) -> Result { + Ok(ProvisionerEnvironment::new()) + } +} diff --git a/environments/core/provisioner/src/environment/environment.rs b/environments/core/provisioner/src/environment/environment.rs new file mode 100644 index 0000000..531a17c --- /dev/null +++ b/environments/core/provisioner/src/environment/environment.rs @@ -0,0 +1,30 @@ +use mtma_environment_types::{EnvironmentError, Environmentish}; +use mtma_migrator_types::migrator::MovementMigrator; +use std::fmt::Debug; + +/// Errors thrown when using the [ProvisionerEnvironment]. +#[derive(Debug, thiserror::Error)] +pub enum ProvisionerEnvironmentError { + #[error("Testing Environment: failed with an internal error: {0}")] + Internal(#[source] Box), +} + +impl From for EnvironmentError { + fn from(e: ProvisionerEnvironmentError) -> Self { + EnvironmentError::Internal(e.into()) + } +} + +pub struct ProvisionerEnvironment {} + +impl ProvisionerEnvironment { + pub fn new() -> Self { + Self {} + } +} + +impl Environmentish for ProvisionerEnvironment { + async fn build_movement_migrator(&self) -> Result { + Err(ProvisionerEnvironmentError::Internal(anyhow::anyhow!("not implemented").into()).into()) + } +} diff --git a/environments/core/provisioner/src/lib.rs b/environments/core/provisioner/src/lib.rs new file mode 100644 index 0000000..729b68c --- /dev/null +++ b/environments/core/provisioner/src/lib.rs @@ -0,0 +1,2 @@ +pub mod environment; +pub use environment::*; diff --git a/environments/core/testing/Cargo.toml b/environments/core/testing/Cargo.toml new file mode 100644 index 0000000..c56dc3e --- /dev/null +++ b/environments/core/testing/Cargo.toml @@ -0,0 +1,23 @@ +[package] +name = "mtma-testing-environment" +version = { workspace = true } +edition = { workspace = true } +license = { workspace = true } +authors = { workspace = true } +homepage = { workspace = true } +publish = { workspace = true } +rust-version = { workspace = true } + +[dependencies] +serde = { workspace = true, features = ["derive"] } +anyhow = { workspace = true } +clap = { workspace = true } +thiserror = { workspace = true } +tokio = { workspace = true } +mtma-migrator-types = { workspace = true } +mtma-environment-types = { workspace = true } +movement-core = { workspace = true } +kestrel = { workspace = true } + +[lints] +workspace = true diff --git a/environments/core/testing/README.md b/environments/core/testing/README.md new file mode 100644 index 0000000..0f78f19 --- /dev/null +++ b/environments/core/testing/README.md @@ -0,0 +1,2 @@ +# `mtma-testing-environment` +The environment which provides a [Migrator](/README.md#migrator) representing a local, single-instance testing environment. \ No newline at end of file diff --git a/environments/core/testing/src/environment.rs b/environments/core/testing/src/environment.rs new file mode 100644 index 0000000..689e33f --- /dev/null +++ b/environments/core/testing/src/environment.rs @@ -0,0 +1,7 @@ +/// Contains the configuration structs and logic for the migration. +pub mod config; +/// Contains the logic for the migration. +pub mod environment; + +pub use config::*; +pub use environment::*; diff --git a/environments/core/testing/src/environment/config.rs b/environments/core/testing/src/environment/config.rs new file mode 100644 index 0000000..bd7bc63 --- /dev/null +++ b/environments/core/testing/src/environment/config.rs @@ -0,0 +1,28 @@ +use crate::TestingEnvironment; +use clap::Parser; +use serde::{Deserialize, Serialize}; +use std::fmt::Debug; + +/// Errors thrown when working with the [Config]. +#[derive(Debug, thiserror::Error)] +pub enum EnvironmentConfigError { + #[error("failed to build from config: {0}")] + Build(#[source] Box), +} + +/// The config for the [TestingEnvironment]. +/// +/// All fields should be easily statically encodable to a CLI argument. +/// This is the frontend for the core API. +#[derive(Parser, Debug, Serialize, Deserialize, Clone, Default)] +#[clap(help_expected = true)] +pub struct Config {} + +impl Config { + /// Builds the [TestingEnvironment] struct from the config. + /// + /// Note: preserving faillibility here because we may add debug path configuration to the [TestingEnvironment] soon. + pub fn build(&self) -> Result { + Ok(TestingEnvironment::new()) + } +} diff --git a/environments/core/testing/src/environment/environment.rs b/environments/core/testing/src/environment/environment.rs new file mode 100644 index 0000000..86d97bc --- /dev/null +++ b/environments/core/testing/src/environment/environment.rs @@ -0,0 +1,59 @@ +use anyhow::Context; +use movement_core::Overlays; +use mtma_environment_types::{EnvironmentError, Environmentish}; +use mtma_migrator_types::migrator::MovementMigrator; +use std::fmt::Debug; +use tokio; + +/// Errors thrown when using the [TestingEnvironment]. +#[derive(Debug, thiserror::Error)] +pub enum TestingEnvironmentError { + #[error("Testing Environment: failed with an internal error: {0}")] + Internal(#[source] Box), +} + +impl From for EnvironmentError { + fn from(e: TestingEnvironmentError) -> Self { + EnvironmentError::Internal(e.into()) + } +} + +pub struct TestingEnvironment {} + +impl TestingEnvironment { + pub fn new() -> Self { + Self {} + } +} + +impl Environmentish for TestingEnvironment { + async fn build_movement_migrator(&self) -> Result { + // Form the migrator. + let mut movement_migrator = MovementMigrator::try_temp() + .map_err(|e| TestingEnvironmentError::Internal(e.into()))?; + movement_migrator.set_overlays(Overlays::default()); + + // Start the migrator so that it's running in the background. + // In the future, some migrators may be for already running nodes. + let movement_migrator_for_task = movement_migrator.clone(); + let movement_migrator_task = kestrel::task(async move { + movement_migrator_for_task.run().await?; + Ok::<_, anyhow::Error>(()) + }); + + // wait for the rest client to be ready + // once we have this, there should also be a config, so we can then kill off the migrator and proceed + movement_migrator + .wait_for_rest_client_ready(tokio::time::Duration::from_secs(600)) // we wait for up to ten minutes because the nix flake in .vendors/movementcan be a bit slow the first time + .await + .context( + "failed to wait for movement migrator rest client while running accounts equal manual prelude", + ).map_err(|e| TestingEnvironmentError::Internal(e.into()))?; + + kestrel::end!(movement_migrator_task) + .context("failed to end movement migrator task") + .map_err(|e| TestingEnvironmentError::Internal(e.into()))?; + + Ok(movement_migrator) + } +} diff --git a/environments/core/testing/src/lib.rs b/environments/core/testing/src/lib.rs new file mode 100644 index 0000000..729b68c --- /dev/null +++ b/environments/core/testing/src/lib.rs @@ -0,0 +1,2 @@ +pub mod environment; +pub use environment::*; diff --git a/environments/util/types/Cargo.toml b/environments/util/types/Cargo.toml new file mode 100644 index 0000000..227e8d4 --- /dev/null +++ b/environments/util/types/Cargo.toml @@ -0,0 +1,16 @@ +[package] +name = "mtma-environment-types" +version = { workspace = true } +edition = { workspace = true } +license = { workspace = true } +authors = { workspace = true } +homepage = { workspace = true } +publish = { workspace = true } +rust-version = { workspace = true } + +[dependencies] +mtma-migrator-types = { workspace = true } +thiserror = { workspace = true } + +[lints] +workspace = true diff --git a/environments/util/types/README.md b/environments/util/types/README.md new file mode 100644 index 0000000..7ef34d7 --- /dev/null +++ b/environments/util/types/README.md @@ -0,0 +1,2 @@ +# `mtma-environment-types` +Types defining and for working with differennt `mtma` [Environments](/README.md#environments). \ No newline at end of file diff --git a/environments/util/types/src/environment.rs b/environments/util/types/src/environment.rs new file mode 100644 index 0000000..cc58431 --- /dev/null +++ b/environments/util/types/src/environment.rs @@ -0,0 +1,18 @@ +use mtma_migrator_types::migrator::MovementMigrator; +use std::future::Future; + +/// Errors thrown when working with the [Config]. +#[derive(Debug, thiserror::Error)] +pub enum EnvironmentError { + #[error("failed to build from config: {0}")] + Unsatisfied(#[source] Box), + #[error("internal error: {0}")] + Internal(#[source] Box), +} + +pub trait Environmentish { + /// Whether the criterion is satisfied by the given movement and movement_aptos executors. + fn build_movement_migrator( + &self, + ) -> impl Future>; +} diff --git a/environments/util/types/src/lib.rs b/environments/util/types/src/lib.rs new file mode 100644 index 0000000..729b68c --- /dev/null +++ b/environments/util/types/src/lib.rs @@ -0,0 +1,2 @@ +pub mod environment; +pub use environment::*; diff --git a/flake.nix b/flake.nix index 5b70864..03691ee 100644 --- a/flake.nix +++ b/flake.nix @@ -57,6 +57,7 @@ qemu_kvm qemu-utils libvirt + cargo-machete ] ++ lib.optionals stdenv.isDarwin [ fixDarwinDylibNames ] ++ lib.optionals stdenv.isLinux [ diff --git a/migration/cli/check-dev/Cargo.toml b/migration/cli/check-dev/Cargo.toml index b9bc8c3..e695843 100644 --- a/migration/cli/check-dev/Cargo.toml +++ b/migration/cli/check-dev/Cargo.toml @@ -16,22 +16,12 @@ dotenv = { workspace = true } anyhow = { workspace = true } clap-markdown-ext = { workspace = true } orfile = { workspace = true } -mtma-core = { workspace = true } jemallocator = { workspace = true } -mtma-node-null-core = { workspace = true } -mtma-node-test-global-storage-injective-criterion = { workspace = true } -mtma-node-test-global-storage-includes-criterion = { workspace = true } -mtma-node-test-global-storage-not-empty-criterion = { workspace = true } -mtma-node-preludes = { workspace = true } -mtma-node-test-types = { workspace = true } -movement-syncing = { workspace = true } -maptos-execution-util = { workspace = true } -chrono = { workspace = true } -rand = { workspace = true } -futures = { workspace = true } -sysinfo = { workspace = true } tracing = { workspace = true } tracing-subscriber = { workspace = true } +[package.metadata.cargo-machete] +ignored = ["tracing"] + [lints] workspace = true diff --git a/migration/cli/check/Cargo.toml b/migration/cli/check/Cargo.toml index 33f5454..ed78c55 100644 --- a/migration/cli/check/Cargo.toml +++ b/migration/cli/check/Cargo.toml @@ -16,22 +16,12 @@ dotenv = { workspace = true } anyhow = { workspace = true } clap-markdown-ext = { workspace = true } orfile = { workspace = true } -mtma-core = { workspace = true } jemallocator = { workspace = true } -mtma-node-null-core = { workspace = true } -mtma-node-test-global-storage-injective-criterion = { workspace = true } -mtma-node-test-global-storage-includes-criterion = { workspace = true } -mtma-node-test-global-storage-not-empty-criterion = { workspace = true } -mtma-node-preludes = { workspace = true } -mtma-node-test-types = { workspace = true } -movement-syncing = { workspace = true } -maptos-execution-util = { workspace = true } -chrono = { workspace = true } -rand = { workspace = true } -futures = { workspace = true } -sysinfo = { workspace = true } tracing = { workspace = true } tracing-subscriber = { workspace = true } +[package.metadata.cargo-machete] +ignored = ["tracing"] + [lints] workspace = true diff --git a/migration/cli/migrate-chain-dev/Cargo.toml b/migration/cli/migrate-chain-dev/Cargo.toml index 8686182..0e2f18b 100644 --- a/migration/cli/migrate-chain-dev/Cargo.toml +++ b/migration/cli/migrate-chain-dev/Cargo.toml @@ -16,23 +16,13 @@ dotenv = { workspace = true } anyhow = { workspace = true } clap-markdown-ext = { workspace = true } orfile = { workspace = true } -mtma-core = { workspace = true } mtma-migrate-chain-core = { workspace = true } jemallocator = { workspace = true } -mtma-node-null-core = { workspace = true } -mtma-node-test-global-storage-injective-criterion = { workspace = true } -mtma-node-test-global-storage-includes-criterion = { workspace = true } -mtma-node-test-global-storage-not-empty-criterion = { workspace = true } -mtma-node-preludes = { workspace = true } -mtma-node-test-types = { workspace = true } -movement-syncing = { workspace = true } -maptos-execution-util = { workspace = true } -chrono = { workspace = true } -rand = { workspace = true } -futures = { workspace = true } -sysinfo = { workspace = true } tracing = { workspace = true } tracing-subscriber = { workspace = true } +[package.metadata.cargo-machete] +ignored = ["tracing"] + [lints] workspace = true diff --git a/migration/cli/migrate-chain/Cargo.toml b/migration/cli/migrate-chain/Cargo.toml index fd1ca7c..6429a47 100644 --- a/migration/cli/migrate-chain/Cargo.toml +++ b/migration/cli/migrate-chain/Cargo.toml @@ -18,20 +18,11 @@ clap-markdown-ext = { workspace = true } orfile = { workspace = true } mtma-core = { workspace = true } jemallocator = { workspace = true } -mtma-node-null-core = { workspace = true } -mtma-node-test-global-storage-injective-criterion = { workspace = true } -mtma-node-test-global-storage-includes-criterion = { workspace = true } -mtma-node-test-global-storage-not-empty-criterion = { workspace = true } -mtma-node-preludes = { workspace = true } -mtma-node-test-types = { workspace = true } -movement-syncing = { workspace = true } -maptos-execution-util = { workspace = true } -chrono = { workspace = true } -rand = { workspace = true } -futures = { workspace = true } -sysinfo = { workspace = true } tracing = { workspace = true } tracing-subscriber = { workspace = true } +[package.metadata.cargo-machete] +ignored = ["tracing"] + [lints] workspace = true diff --git a/migration/cli/migrate-dev/Cargo.toml b/migration/cli/migrate-dev/Cargo.toml index 378bd61..7e343fa 100644 --- a/migration/cli/migrate-dev/Cargo.toml +++ b/migration/cli/migrate-dev/Cargo.toml @@ -18,20 +18,11 @@ clap-markdown-ext = { workspace = true } orfile = { workspace = true } mtma-core = { workspace = true } jemallocator = { workspace = true } -mtma-node-null-core = { workspace = true } -mtma-node-test-global-storage-injective-criterion = { workspace = true } -mtma-node-test-global-storage-includes-criterion = { workspace = true } -mtma-node-test-global-storage-not-empty-criterion = { workspace = true } -mtma-node-preludes = { workspace = true } -mtma-node-test-types = { workspace = true } -movement-syncing = { workspace = true } -maptos-execution-util = { workspace = true } -chrono = { workspace = true } -rand = { workspace = true } -futures = { workspace = true } -sysinfo = { workspace = true } tracing = { workspace = true } tracing-subscriber = { workspace = true } +[package.metadata.cargo-machete] +ignored = ["tracing"] + [lints] workspace = true diff --git a/migration/cli/migrate-node-dev/Cargo.toml b/migration/cli/migrate-node-dev/Cargo.toml index 518631e..d0da6c8 100644 --- a/migration/cli/migrate-node-dev/Cargo.toml +++ b/migration/cli/migrate-node-dev/Cargo.toml @@ -16,20 +16,13 @@ dotenv = { workspace = true } anyhow = { workspace = true } clap-markdown-ext = { workspace = true } orfile = { workspace = true } -mtma-core = { workspace = true } jemallocator = { workspace = true } mtma-node-null-core = { workspace = true } -mtma-node-test-global-storage-injective-criterion = { workspace = true } mtma-node-test-global-storage-includes-criterion = { workspace = true } -mtma-node-test-global-storage-not-empty-criterion = { workspace = true } -mtma-node-preludes = { workspace = true } mtma-node-test-types = { workspace = true } movement-syncing = { workspace = true } maptos-execution-util = { workspace = true } -chrono = { workspace = true } -rand = { workspace = true } futures = { workspace = true } -sysinfo = { workspace = true } tracing = { workspace = true } tracing-subscriber = { workspace = true } diff --git a/migration/cli/migrate-node/Cargo.toml b/migration/cli/migrate-node/Cargo.toml index 394f605..8b28793 100644 --- a/migration/cli/migrate-node/Cargo.toml +++ b/migration/cli/migrate-node/Cargo.toml @@ -19,20 +19,17 @@ orfile = { workspace = true } mtma-core = { workspace = true } jemallocator = { workspace = true } mtma-node-null-core = { workspace = true } -mtma-node-test-global-storage-injective-criterion = { workspace = true } -mtma-node-test-global-storage-includes-criterion = { workspace = true } -mtma-node-test-global-storage-not-empty-criterion = { workspace = true } -mtma-node-preludes = { workspace = true } -mtma-node-test-types = { workspace = true } -movement-syncing = { workspace = true } -maptos-execution-util = { workspace = true } -chrono = { workspace = true } -rand = { workspace = true } -futures = { workspace = true } -sysinfo = { workspace = true } tracing = { workspace = true } tracing-subscriber = { workspace = true } slect = { workspace = true } +mtma-testing-environment = { workspace = true } +mtma-box-environment = { workspace = true } +mtma-provisioner-environment = { workspace = true } +mtma-environment-types = { workspace = true } +mtma-migrator-types = { workspace = true } + +[package.metadata.cargo-machete] +ignored = ["tracing"] [lints] workspace = true diff --git a/migration/cli/migrate-node/docs/cli/README.md b/migration/cli/migrate-node/docs/cli/README.md index cc5447f..95ea71a 100644 --- a/migration/cli/migrate-node/docs/cli/README.md +++ b/migration/cli/migrate-node/docs/cli/README.md @@ -124,10 +124,37 @@ Select migration over the node ###### **Options:** +* `--environment-testing` — Enable the environment-testing selection +* `--environment-box` — Enable the environment-box selection +* `--environment-provisioner` — Enable the environment-provisioner selection * `--null` — Enable the null selection -**Selection (1/1):** `null` -The config for the migration +**Selection (1/4):** `environment-testing` +The config for the [TestingEnvironment] + +Usage: --environment-testing.* + +Options: + -h, --help Print help (see more with '--help') + +**Selection (2/4):** `environment-box` +The config for the [BoxEnvironment] + +Usage: --environment-box.* + +Options: + -h, --help Print help (see more with '--help') + +**Selection (3/4):** `environment-provisioner` +The config for the [ProvisionerEnvironment] + +Usage: --environment-provisioner.* + +Options: + -h, --help Print help (see more with '--help') + +**Selection (4/4):** `null` +The config for the null migration Usage: --null.* diff --git a/migration/cli/migrate-node/src/cli/migrate/select.rs b/migration/cli/migrate-node/src/cli/migrate/select.rs index bafab57..404fc5e 100644 --- a/migration/cli/migrate-node/src/cli/migrate/select.rs +++ b/migration/cli/migrate-node/src/cli/migrate/select.rs @@ -1,5 +1,11 @@ +use anyhow::Context; use clap::Parser; +use mtma_box_environment::Config as BoxEnvironmentConfig; +use mtma_environment_types::Environmentish; +use mtma_migrator_types::migration::Migrationish; use mtma_node_null_core::Config as NullConfig; +use mtma_provisioner_environment::Config as ProvisionerEnvironmentConfig; +use mtma_testing_environment::Config as TestingEnvironmentConfig; use serde::{Deserialize, Serialize}; use slect::Slect; @@ -8,19 +14,40 @@ use slect::Slect; #[clap(help_expected = true)] pub struct Select { /// Extra args to pass to slect API - #[slect(null = NullConfig)] + #[slect(environment_testing = TestingEnvironmentConfig, environment_box = BoxEnvironmentConfig, environment_provisioner = ProvisionerEnvironmentConfig, null = NullConfig)] extra_args: Vec, } impl select::Select { pub async fn execute(&self) -> Result<(), anyhow::Error> { - let maybe_null = self.select().map_err(|e| anyhow::anyhow!("{}", e))?; + let ( + maybe_environment_testing, + maybe_environment_box, + maybe_environment_provisioner, + maybe_null, + ) = self.select().map_err(|e| anyhow::anyhow!("{}", e))?; + + // if more than one environment is provided, we need to error + let environment_count = maybe_environment_testing.is_some() as u8 + + maybe_environment_box.is_some() as u8 + + maybe_environment_provisioner.is_some() as u8; + if environment_count > 1 { + return Err(anyhow::anyhow!( + "only one environment should be provided, but got {}", + environment_count + )); + } + + let environment_config = maybe_environment_testing.context( + "--environment-testing is the only supported environment; it must be provided", + )?; + + let movement_migrator = environment_config.build()?.build_movement_migrator().await?; if let Some(null) = maybe_null { - let _build = null.build()?; + let null_migration = null.build()?; - // needs an environment for the node to run. - // How we load this environment is in process of being abstraced. + null_migration.migrate(&movement_migrator).await?; } Ok(()) diff --git a/migration/cli/migrate/Cargo.toml b/migration/cli/migrate/Cargo.toml index 447dbb0..5821c82 100644 --- a/migration/cli/migrate/Cargo.toml +++ b/migration/cli/migrate/Cargo.toml @@ -18,20 +18,11 @@ clap-markdown-ext = { workspace = true } orfile = { workspace = true } mtma-core = { workspace = true } jemallocator = { workspace = true } -mtma-node-null-core = { workspace = true } -mtma-node-test-global-storage-injective-criterion = { workspace = true } -mtma-node-test-global-storage-includes-criterion = { workspace = true } -mtma-node-test-global-storage-not-empty-criterion = { workspace = true } -mtma-node-preludes = { workspace = true } -mtma-node-test-types = { workspace = true } -movement-syncing = { workspace = true } -maptos-execution-util = { workspace = true } -chrono = { workspace = true } -rand = { workspace = true } -futures = { workspace = true } -sysinfo = { workspace = true } tracing = { workspace = true } tracing-subscriber = { workspace = true } +[package.metadata.cargo-machete] +ignored = ["tracing"] + [lints] workspace = true diff --git a/migration/cli/mtma-dev/Cargo.toml b/migration/cli/mtma-dev/Cargo.toml index d1bdfda..58fb03f 100644 --- a/migration/cli/mtma-dev/Cargo.toml +++ b/migration/cli/mtma-dev/Cargo.toml @@ -10,26 +10,11 @@ rust-version = { workspace = true } [dependencies] tokio = { workspace = true } -serde = { workspace = true, features = ["derive"] } clap = { workspace = true, features = ["derive"] } dotenv = { workspace = true } anyhow = { workspace = true } clap-markdown-ext = { workspace = true } -orfile = { workspace = true } -mtma-core = { workspace = true } jemallocator = { workspace = true } -mtma-node-null-core = { workspace = true } -mtma-node-test-global-storage-injective-criterion = { workspace = true } -mtma-node-test-global-storage-includes-criterion = { workspace = true } -mtma-node-test-global-storage-not-empty-criterion = { workspace = true } -mtma-node-preludes = { workspace = true } -mtma-node-test-types = { workspace = true } -movement-syncing = { workspace = true } -maptos-execution-util = { workspace = true } -chrono = { workspace = true } -rand = { workspace = true } -futures = { workspace = true } -sysinfo = { workspace = true } tracing = { workspace = true } tracing-subscriber = { workspace = true } @@ -41,5 +26,8 @@ mtma-check-dev = { workspace = true } mtma-migrate-dev = { workspace = true } mtma-track-dev = { workspace = true } +[package.metadata.cargo-machete] +ignored = ["tracing"] + [lints] workspace = true diff --git a/migration/cli/mtma/Cargo.toml b/migration/cli/mtma/Cargo.toml index 4724ee0..411d6f5 100644 --- a/migration/cli/mtma/Cargo.toml +++ b/migration/cli/mtma/Cargo.toml @@ -18,20 +18,11 @@ clap-markdown-ext = { workspace = true } orfile = { workspace = true } mtma-core = { workspace = true } jemallocator = { workspace = true } -mtma-node-null-core = { workspace = true } -mtma-node-test-global-storage-injective-criterion = { workspace = true } -mtma-node-test-global-storage-includes-criterion = { workspace = true } -mtma-node-test-global-storage-not-empty-criterion = { workspace = true } -mtma-node-preludes = { workspace = true } -mtma-node-test-types = { workspace = true } -movement-syncing = { workspace = true } -maptos-execution-util = { workspace = true } -chrono = { workspace = true } -rand = { workspace = true } -futures = { workspace = true } -sysinfo = { workspace = true } tracing = { workspace = true } tracing-subscriber = { workspace = true } +[package.metadata.cargo-machete] +ignored = ["tracing"] + [lints] workspace = true diff --git a/migration/cli/track-dev/Cargo.toml b/migration/cli/track-dev/Cargo.toml index 746825d..3a347be 100644 --- a/migration/cli/track-dev/Cargo.toml +++ b/migration/cli/track-dev/Cargo.toml @@ -16,22 +16,12 @@ dotenv = { workspace = true } anyhow = { workspace = true } clap-markdown-ext = { workspace = true } orfile = { workspace = true } -mtma-core = { workspace = true } jemallocator = { workspace = true } -mtma-node-null-core = { workspace = true } -mtma-node-test-global-storage-injective-criterion = { workspace = true } -mtma-node-test-global-storage-includes-criterion = { workspace = true } -mtma-node-test-global-storage-not-empty-criterion = { workspace = true } -mtma-node-preludes = { workspace = true } -mtma-node-test-types = { workspace = true } -movement-syncing = { workspace = true } -maptos-execution-util = { workspace = true } -chrono = { workspace = true } -rand = { workspace = true } -futures = { workspace = true } -sysinfo = { workspace = true } tracing = { workspace = true } tracing-subscriber = { workspace = true } +[package.metadata.cargo-machete] +ignored = ["tracing"] + [lints] workspace = true diff --git a/migration/cli/track/Cargo.toml b/migration/cli/track/Cargo.toml index c2e22b6..7fe8739 100644 --- a/migration/cli/track/Cargo.toml +++ b/migration/cli/track/Cargo.toml @@ -16,22 +16,12 @@ dotenv = { workspace = true } anyhow = { workspace = true } clap-markdown-ext = { workspace = true } orfile = { workspace = true } -mtma-core = { workspace = true } jemallocator = { workspace = true } -mtma-node-null-core = { workspace = true } -mtma-node-test-global-storage-injective-criterion = { workspace = true } -mtma-node-test-global-storage-includes-criterion = { workspace = true } -mtma-node-test-global-storage-not-empty-criterion = { workspace = true } -mtma-node-preludes = { workspace = true } -mtma-node-test-types = { workspace = true } -movement-syncing = { workspace = true } -maptos-execution-util = { workspace = true } -chrono = { workspace = true } -rand = { workspace = true } -futures = { workspace = true } -sysinfo = { workspace = true } tracing = { workspace = true } tracing-subscriber = { workspace = true } +[package.metadata.cargo-machete] +ignored = ["tracing"] + [lints] workspace = true diff --git a/migration/core/migrator/mtma-null/Cargo.toml b/migration/core/migrator/mtma-null/Cargo.toml index 931b718..e455b9f 100644 --- a/migration/core/migrator/mtma-null/Cargo.toml +++ b/migration/core/migrator/mtma-null/Cargo.toml @@ -9,20 +9,11 @@ publish = { workspace = true } rust-version = { workspace = true } [dependencies] -tokio = { workspace = true } serde = { workspace = true, features = ["derive"] } clap = { workspace = true, features = ["derive"] } -dotenv = { workspace = true } anyhow = { workspace = true } -clap-markdown-ext = { workspace = true } thiserror = { workspace = true } -orfile = { workspace = true } mtma-node-types = { workspace = true } -aptos-db = { workspace = true } -aptos-storage-interface = { workspace = true } -aptos-config = { workspace = true } -aptos-executor = { workspace = true } -aptos-vm = { workspace = true } chrono = { workspace = true } walkdir = { workspace = true } uuid = { workspace = true } diff --git a/migration/core/migrator/pre-l1-merge/Cargo.toml b/migration/core/migrator/pre-l1-merge/Cargo.toml index 7c71736..d8d1f88 100644 --- a/migration/core/migrator/pre-l1-merge/Cargo.toml +++ b/migration/core/migrator/pre-l1-merge/Cargo.toml @@ -12,26 +12,11 @@ rust-version = { workspace = true } tokio = { workspace = true } serde = { workspace = true, features = ["derive"] } clap = { workspace = true, features = ["derive"] } -dotenv = { workspace = true } anyhow = { workspace = true } -clap-markdown-ext = { workspace = true } thiserror = { workspace = true } -orfile = { workspace = true } -mtma-node-types = { workspace = true } mtma-migrator-types = { workspace = true } mtma-node-null-core = { workspace = true } -aptos-db = { workspace = true } -aptos-storage-interface = { workspace = true } -aptos-config = { workspace = true } -aptos-executor = { workspace = true } -aptos-vm = { workspace = true } -chrono = { workspace = true } -walkdir = { workspace = true } -uuid = { workspace = true } -tracing = { workspace = true } aptos-framework-pre-l1-merge-release = { workspace = true } -movement-signer = { workspace = true } -movement-signer-loader = { workspace = true } hex = { workspace = true } mtma-types = { workspace = true } movement-core = { workspace = true } diff --git a/migration/core/mtma-migrate-chain/Cargo.toml b/migration/core/mtma-migrate-chain/Cargo.toml index b77ca9a..6b324b2 100644 --- a/migration/core/mtma-migrate-chain/Cargo.toml +++ b/migration/core/mtma-migrate-chain/Cargo.toml @@ -9,15 +9,10 @@ publish = { workspace = true } rust-version = { workspace = true } [dependencies] -tokio = { workspace = true } serde = { workspace = true, features = ["derive"] } clap = { workspace = true, features = ["derive"] } -dotenv = { workspace = true } anyhow = { workspace = true } -clap-markdown-ext = { workspace = true } thiserror = { workspace = true } -orfile = { workspace = true } -mtma-core = { workspace = true } [lints] workspace = true \ No newline at end of file diff --git a/migration/core/mtma/Cargo.toml b/migration/core/mtma/Cargo.toml index c124720..9867c8f 100644 --- a/migration/core/mtma/Cargo.toml +++ b/migration/core/mtma/Cargo.toml @@ -9,14 +9,9 @@ publish = { workspace = true } rust-version = { workspace = true } [dependencies] -tokio = { workspace = true } serde = { workspace = true, features = ["derive"] } clap = { workspace = true, features = ["derive"] } -dotenv = { workspace = true } -anyhow = { workspace = true } -clap-markdown-ext = { workspace = true } thiserror = { workspace = true } -orfile = { workspace = true } [lints] workspace = true diff --git a/migration/core/node/mtma-null/Cargo.toml b/migration/core/node/mtma-null/Cargo.toml index 779760c..4949400 100644 --- a/migration/core/node/mtma-null/Cargo.toml +++ b/migration/core/node/mtma-null/Cargo.toml @@ -9,24 +9,16 @@ publish = { workspace = true } rust-version = { workspace = true } [dependencies] -tokio = { workspace = true } serde = { workspace = true, features = ["derive"] } clap = { workspace = true, features = ["derive"] } -dotenv = { workspace = true } anyhow = { workspace = true } -clap-markdown-ext = { workspace = true } thiserror = { workspace = true } -orfile = { workspace = true } mtma-node-types = { workspace = true } -aptos-db = { workspace = true } -aptos-storage-interface = { workspace = true } -aptos-config = { workspace = true } -aptos-executor = { workspace = true } -aptos-vm = { workspace = true } chrono = { workspace = true } walkdir = { workspace = true } uuid = { workspace = true } tracing = { workspace = true } mtma-types = { workspace = true } + [lints] workspace = true diff --git a/migration/core/node/mtma-null/src/migrate/config.rs b/migration/core/node/mtma-null/src/migrate/config.rs index 33cf7f4..0991a08 100644 --- a/migration/core/node/mtma-null/src/migrate/config.rs +++ b/migration/core/node/mtma-null/src/migrate/config.rs @@ -9,7 +9,7 @@ pub enum MigrateConfigError { Build(#[source] Box), } -/// The config for the migration. +/// The config for the null migration. /// /// All fields should be easily statically encodable to a CLI argument. /// This is the frontend for the core API. diff --git a/migration/core/node/mtma-replay/Cargo.toml b/migration/core/node/mtma-replay/Cargo.toml index bfd5e66..a3990d5 100644 --- a/migration/core/node/mtma-replay/Cargo.toml +++ b/migration/core/node/mtma-replay/Cargo.toml @@ -9,23 +9,17 @@ publish = { workspace = true } rust-version = { workspace = true } [dependencies] -tokio = { workspace = true } serde = { workspace = true, features = ["derive"] } clap = { workspace = true, features = ["derive"] } -dotenv = { workspace = true } anyhow = { workspace = true } -clap-markdown-ext = { workspace = true } thiserror = { workspace = true } -orfile = { workspace = true } mtma-node-types = { workspace = true } aptos-db = { workspace = true } aptos-storage-interface = { workspace = true } aptos-config = { workspace = true } aptos-executor = { workspace = true } -aptos-vm = { workspace = true } aptos-vm-genesis = { workspace = true } chrono = { workspace = true } -walkdir = { workspace = true } uuid = { workspace = true } tracing = { workspace = true } aptos-executor-types = { workspace = true } diff --git a/migration/util/migrator-types/Cargo.toml b/migration/util/migrator-types/Cargo.toml index b262d46..3428e6d 100644 --- a/migration/util/migrator-types/Cargo.toml +++ b/migration/util/migrator-types/Cargo.toml @@ -10,23 +10,11 @@ rust-version = { workspace = true } [dependencies] mtma-node-types = { workspace = true } -serde = { workspace = true } anyhow = { workspace = true } -hex = { workspace = true } -maptos-opt-executor = { workspace = true } -aptos-executor = { workspace = true } -aptos-vm = { workspace = true } -aptos-types = { workspace = true } thiserror = { workspace = true } -aptos-storage-interface = { workspace = true } -either = { workspace = true } -tracing = { workspace = true } movement-core = { workspace = true } movement-aptos-core = { workspace = true } kestrel = { workspace = true } -movement-client = { workspace = true } -aptos-rest-client = { workspace = true } -aptos-config = { workspace = true } mtma-types = { workspace = true } [lints] diff --git a/migration/util/node-types/Cargo.toml b/migration/util/node-types/Cargo.toml index f04bb45..b19ba56 100644 --- a/migration/util/node-types/Cargo.toml +++ b/migration/util/node-types/Cargo.toml @@ -9,20 +9,13 @@ publish = { workspace = true } rust-version = { workspace = true } [dependencies] -serde = { workspace = true } anyhow = { workspace = true } -hex = { workspace = true } maptos-opt-executor = { workspace = true } -aptos-executor = { workspace = true } -aptos-vm = { workspace = true } -aptos-types = { workspace = true } thiserror = { workspace = true } -aptos-storage-interface = { workspace = true } either = { workspace = true } tracing = { workspace = true } movement-aptos-core = { workspace = true } futures-channel = { workspace = true } -tokio = { workspace = true } movement-util = { workspace = true } uuid = { workspace = true } walkdir = { workspace = true } diff --git a/util/movement-aptos/core/Cargo.toml b/util/movement-aptos/core/Cargo.toml index eb2a1d0..976d736 100644 --- a/util/movement-aptos/core/Cargo.toml +++ b/util/movement-aptos/core/Cargo.toml @@ -12,11 +12,8 @@ rust-version = { workspace = true } thiserror = { workspace = true } serde = { workspace = true } anyhow = { workspace = true } -hex = { workspace = true } -syncador = { workspace = true } tokio = { workspace = true } aptos-node = { workspace = true } -aptos-config = { workspace = true } serde_json = { workspace = true } clap = { workspace = true } jsonlvar = { workspace = true } diff --git a/util/movement-aptos/movement-aptos/Cargo.toml b/util/movement-aptos/movement-aptos/Cargo.toml index 674bc91..44f216a 100644 --- a/util/movement-aptos/movement-aptos/Cargo.toml +++ b/util/movement-aptos/movement-aptos/Cargo.toml @@ -21,5 +21,8 @@ movement-aptos-core = { workspace = true } tracing = { workspace = true } tracing-subscriber = { workspace = true } +[package.metadata.cargo-machete] +ignored = ["tracing"] + [lints] workspace = true diff --git a/util/movement/core/Cargo.toml b/util/movement/core/Cargo.toml index 1bdc2a0..c859664 100644 --- a/util/movement/core/Cargo.toml +++ b/util/movement/core/Cargo.toml @@ -12,11 +12,6 @@ rust-version = { workspace = true } thiserror = { workspace = true } serde = { workspace = true } anyhow = { workspace = true } -hex = { workspace = true } -syncador = { workspace = true } -movement-types = { workspace = true } -tempdir = { workspace = true } -uuid = { workspace = true } include-vendor = { workspace = true } tokio = { workspace = true } jsonlvar = { workspace = true } diff --git a/util/movement/movement/Cargo.toml b/util/movement/movement/Cargo.toml index 9e0e405..f551580 100644 --- a/util/movement/movement/Cargo.toml +++ b/util/movement/movement/Cargo.toml @@ -16,10 +16,8 @@ dotenv = { workspace = true } anyhow = { workspace = true } clap-markdown-ext = { workspace = true } orfile = { workspace = true } -mtma-core = { workspace = true } jemallocator = { workspace = true } movement-core = { workspace = true } -tracing = { workspace = true } tracing-subscriber = { workspace = true } [lints] diff --git a/util/movement/syncing/Cargo.toml b/util/movement/syncing/Cargo.toml index 12ff3ef..4827fc8 100644 --- a/util/movement/syncing/Cargo.toml +++ b/util/movement/syncing/Cargo.toml @@ -9,9 +9,7 @@ publish = { workspace = true } rust-version = { workspace = true } [dependencies] -serde = { workspace = true } anyhow = { workspace = true } -hex = { workspace = true } syncador = { workspace = true } movement-types = { workspace = true } tempdir = { workspace = true }