diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9f9bd97965..2cdf178897 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -90,6 +90,14 @@ jobs: version: ${{env.PROTOC_VERSION}} - run: cargo doc --workspace -r --document-private-items --no-deps + run-workspace-tests: + runs-on: starkware-ubuntu-latest-small + steps: + - uses: actions/checkout@v4 + - uses: ./.github/actions/install_rust + - uses: Swatinem/rust-cache@v2 + - run: cargo test -p workspace_tests + run-tests: runs-on: starkware-ubuntu-20-04-medium steps: diff --git a/Cargo.lock b/Cargo.lock index 02b0e39d57..dd7325c859 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -968,7 +968,7 @@ dependencies = [ [[package]] name = "blockifier" -version = "0.8.0-rc.2" +version = "0.13.2-rc.0" dependencies = [ "anyhow", "ark-ec", @@ -1946,7 +1946,7 @@ dependencies = [ [[package]] name = "committer_cli" -version = "0.1.0-rc.0" +version = "0.13.2-rc.0" dependencies = [ "clap", "criterion", @@ -5293,7 +5293,7 @@ dependencies = [ [[package]] name = "mempool_test_utils" -version = "0.0.0" +version = "0.13.2-rc.0" dependencies = [ "assert_matches", "blockifier", @@ -5578,7 +5578,7 @@ dependencies = [ [[package]] name = "native_blockifier" -version = "0.8.0-rc.0" +version = "0.13.2-rc.0" dependencies = [ "blockifier", "cached", @@ -6096,7 +6096,7 @@ dependencies = [ [[package]] name = "papyrus_base_layer" -version = "0.4.0-rc.0" +version = "0.13.2-rc.0" dependencies = [ "async-trait", "ethers", @@ -6118,7 +6118,7 @@ dependencies = [ [[package]] name = "papyrus_block_builder" -version = "0.4.0-rc.0" +version = "0.13.2-rc.0" dependencies = [ "papyrus_storage", "papyrus_test_utils", @@ -6130,7 +6130,7 @@ dependencies = [ [[package]] name = "papyrus_common" -version = "0.4.0-rc.0" +version = "0.13.2-rc.0" dependencies = [ "assert_matches", "cairo-lang-starknet-classes", @@ -6151,7 +6151,7 @@ dependencies = [ [[package]] name = "papyrus_config" -version = "0.4.0-rc.0" +version = "0.13.2-rc.0" dependencies = [ "assert_matches", "clap", @@ -6168,7 +6168,7 @@ dependencies = [ [[package]] name = "papyrus_consensus" -version = "0.4.0-rc.0" +version = "0.13.2-rc.0" dependencies = [ "async-trait", "futures", @@ -6191,7 +6191,7 @@ dependencies = [ [[package]] name = "papyrus_execution" -version = "0.4.0-rc.0" +version = "0.13.2-rc.0" dependencies = [ "anyhow", "assert_matches", @@ -6221,7 +6221,7 @@ dependencies = [ [[package]] name = "papyrus_load_test" -version = "0.4.0-rc.0" +version = "0.13.2-rc.0" dependencies = [ "anyhow", "assert_matches", @@ -6238,7 +6238,7 @@ dependencies = [ [[package]] name = "papyrus_monitoring_gateway" -version = "0.4.0-rc.0" +version = "0.13.2-rc.0" dependencies = [ "axum", "http-body", @@ -6262,7 +6262,7 @@ dependencies = [ [[package]] name = "papyrus_network" -version = "0.4.0-rc.0" +version = "0.13.2-rc.0" dependencies = [ "assert_matches", "async-stream", @@ -6293,7 +6293,7 @@ dependencies = [ [[package]] name = "papyrus_node" -version = "0.4.0-rc.0" +version = "0.13.2-rc.0" dependencies = [ "anyhow", "assert-json-diff", @@ -6336,7 +6336,7 @@ dependencies = [ [[package]] name = "papyrus_p2p_sync" -version = "0.4.0-rc.0" +version = "0.13.2-rc.0" dependencies = [ "assert_matches", "async-stream", @@ -6366,7 +6366,7 @@ dependencies = [ [[package]] name = "papyrus_proc_macros" -version = "0.4.0-rc.0" +version = "0.13.2-rc.0" dependencies = [ "metrics 0.21.1", "metrics-exporter-prometheus", @@ -6379,7 +6379,7 @@ dependencies = [ [[package]] name = "papyrus_protobuf" -version = "0.4.0-rc.0" +version = "0.13.2-rc.0" dependencies = [ "indexmap 2.2.6", "lazy_static", @@ -6397,7 +6397,7 @@ dependencies = [ [[package]] name = "papyrus_rpc" -version = "0.4.0-rc.0" +version = "0.13.2-rc.0" dependencies = [ "anyhow", "assert_matches", @@ -6450,7 +6450,7 @@ dependencies = [ [[package]] name = "papyrus_storage" -version = "0.4.0-rc.0" +version = "0.13.2-rc.0" dependencies = [ "assert_matches", "byteorder", @@ -6501,7 +6501,7 @@ dependencies = [ [[package]] name = "papyrus_sync" -version = "0.4.0-rc.0" +version = "0.13.2-rc.0" dependencies = [ "assert_matches", "async-stream", @@ -6536,7 +6536,7 @@ dependencies = [ [[package]] name = "papyrus_test_utils" -version = "0.4.0-rc.0" +version = "0.13.2-rc.0" dependencies = [ "cairo-lang-casm", "cairo-lang-starknet-classes", @@ -8750,7 +8750,7 @@ dependencies = [ [[package]] name = "starknet_api" -version = "0.13.0-rc.1" +version = "0.13.2-rc.0" dependencies = [ "assert_matches", "bitvec", @@ -8774,7 +8774,7 @@ dependencies = [ [[package]] name = "starknet_client" -version = "0.4.0-rc.0" +version = "0.13.2-rc.0" dependencies = [ "assert_matches", "async-trait", @@ -8809,7 +8809,7 @@ dependencies = [ [[package]] name = "starknet_committer" -version = "0.1.0-rc.0" +version = "0.13.2-rc.0" dependencies = [ "hex", "pretty_assertions", @@ -8824,7 +8824,7 @@ dependencies = [ [[package]] name = "starknet_gateway" -version = "0.0.0" +version = "0.13.2-rc.0" dependencies = [ "assert_matches", "async-trait", @@ -8859,7 +8859,7 @@ dependencies = [ [[package]] name = "starknet_mempool" -version = "0.0.0" +version = "0.13.2-rc.0" dependencies = [ "assert_matches", "async-trait", @@ -8876,7 +8876,7 @@ dependencies = [ [[package]] name = "starknet_mempool_infra" -version = "0.0.0" +version = "0.13.2-rc.0" dependencies = [ "assert_matches", "async-trait", @@ -8893,7 +8893,7 @@ dependencies = [ [[package]] name = "starknet_mempool_integration_tests" -version = "0.0.0" +version = "0.13.2-rc.0" dependencies = [ "axum", "blockifier", @@ -8923,7 +8923,7 @@ dependencies = [ [[package]] name = "starknet_mempool_node" -version = "0.0.0" +version = "0.13.2-rc.0" dependencies = [ "anyhow", "assert-json-diff", @@ -8948,7 +8948,7 @@ dependencies = [ [[package]] name = "starknet_mempool_types" -version = "0.0.0" +version = "0.13.2-rc.0" dependencies = [ "async-trait", "mockall", @@ -8959,7 +8959,7 @@ dependencies = [ [[package]] name = "starknet_patricia" -version = "0.1.0-rc.0" +version = "0.13.2-rc.0" dependencies = [ "async-recursion", "derive_more", @@ -8980,7 +8980,7 @@ dependencies = [ [[package]] name = "starknet_sierra_compile" -version = "0.0.0" +version = "0.13.2-rc.0" dependencies = [ "assert_matches", "cairo-lang-sierra", @@ -8996,7 +8996,7 @@ dependencies = [ [[package]] name = "starknet_task_executor" -version = "0.0.0" +version = "0.13.2-rc.0" dependencies = [ "futures", "rstest", @@ -10364,6 +10364,15 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "workspace_tests" +version = "0.13.2-rc.0" +dependencies = [ + "once_cell", + "serde", + "toml", +] + [[package]] name = "ws_stream_wasm" version = "0.7.4" diff --git a/Cargo.toml b/Cargo.toml index 362d815bcf..5334e395bc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -37,10 +37,11 @@ members = [ "crates/starknet_sierra_compile", "crates/task_executor", "crates/tests-integration", + "workspace_tests", ] [workspace.package] -version = "0.0.0" +version = "0.13.2-rc.0" edition = "2021" repository = "https://github.com/starkware-libs/sequencer/" license = "Apache-2.0" @@ -64,7 +65,7 @@ base64 = "0.13.0" bincode = "1.3.3" bisection = "0.1.0" bitvec = "1.0.1" -blockifier = { path = "crates/blockifier", version = "0.8.0-rc.2" } +blockifier = { path = "crates/blockifier", version = "0.13.2-rc.0" } byteorder = "1.4.3" bytes = "1" cached = "0.44.0" @@ -110,7 +111,7 @@ libp2p-swarm-test = "0.3.0" log = "0.4" lru = "0.12.0" memmap2 = "0.8.0" -mempool_test_utils = { path = "crates/mempool_test_utils", version = "0.0" } +mempool_test_utils = { path = "crates/mempool_test_utils", version = "0.13.2-rc.0" } metrics = "0.21.0" metrics-exporter-prometheus = "0.12.1" mockall = "0.12.1" @@ -121,20 +122,20 @@ num-traits = "0.2.15" once_cell = "1.19.0" os_info = "3.6.0" page_size = "0.6.0" -papyrus_base_layer = { path = "crates/papyrus_base_layer", version = "0.4.0-rc.0" } -papyrus_common = { path = "crates/papyrus_common", version = "0.4.0-rc.0" } -papyrus_config = { path = "crates/papyrus_config", version = "0.4.0-rc.0" } -papyrus_consensus = { path = "crates/sequencing/papyrus_consensus", version = "0.4.0-rc.0" } -papyrus_execution = { path = "crates/papyrus_execution", version = "0.4.0-rc.0" } -papyrus_monitoring_gateway = { path = "crates/papyrus_monitoring_gateway", version = "0.4.0-rc.0" } -papyrus_network = { path = "crates/papyrus_network", version = "0.4.0-rc.0" } -papyrus_p2p_sync = { path = "crates/papyrus_p2p_sync", version = "0.4.0-rc.0" } -papyrus_proc_macros = { path = "crates/papyrus_proc_macros", version = "0.4.0-rc.0" } -papyrus_protobuf = { path = "crates/papyrus_protobuf", version = "0.4.0-rc.0" } -papyrus_rpc = { path = "crates/papyrus_rpc", version = "0.4.0-rc.0" } -papyrus_storage = { path = "crates/papyrus_storage", version = "0.4.0-rc.0" } -papyrus_sync = { path = "crates/papyrus_sync", version = "0.4.0-rc.0" } -papyrus_test_utils = { path = "crates/papyrus_test_utils", version = "0.4.0-rc.0" } +papyrus_base_layer = { path = "crates/papyrus_base_layer", version = "0.13.2-rc.0" } +papyrus_common = { path = "crates/papyrus_common", version = "0.13.2-rc.0" } +papyrus_config = { path = "crates/papyrus_config", version = "0.13.2-rc.0" } +papyrus_consensus = { path = "crates/sequencing/papyrus_consensus", version = "0.13.2-rc.0" } +papyrus_execution = { path = "crates/papyrus_execution", version = "0.13.2-rc.0" } +papyrus_monitoring_gateway = { path = "crates/papyrus_monitoring_gateway", version = "0.13.2-rc.0" } +papyrus_network = { path = "crates/papyrus_network", version = "0.13.2-rc.0" } +papyrus_p2p_sync = { path = "crates/papyrus_p2p_sync", version = "0.13.2-rc.0" } +papyrus_proc_macros = { path = "crates/papyrus_proc_macros", version = "0.13.2-rc.0" } +papyrus_protobuf = { path = "crates/papyrus_protobuf", version = "0.13.2-rc.0" } +papyrus_rpc = { path = "crates/papyrus_rpc", version = "0.13.2-rc.0" } +papyrus_storage = { path = "crates/papyrus_storage", version = "0.13.2-rc.0" } +papyrus_sync = { path = "crates/papyrus_sync", version = "0.13.2-rc.0" } +papyrus_test_utils = { path = "crates/papyrus_test_utils", version = "0.13.2-rc.0" } parity-scale-codec = "=3.6.9" parity-scale-codec-derive = "=3.6.9" paste = "1.0.15" @@ -166,17 +167,17 @@ simple_logger = "4.0.0" starknet-core = "0.6.0" starknet-crypto = "0.5.1" starknet-types-core = { version = "0.1.5", features = ["hash", "prime-bigint", "std"] } -starknet_api = { path = "crates/starknet_api", version = "0.13.0-rc.1" } -starknet_client = { path = "crates/starknet_client", version = "0.4.0-rc.0" } -starknet_committer = { path = "crates/starknet_committer", version = "0.1.0-rc.0" } -starknet_gateway = { path = "crates/gateway", version = "0.0" } -starknet_mempool = { path = "crates/mempool", version = "0.0" } -starknet_mempool_infra = { path = "crates/mempool_infra", version = "0.0" } -starknet_mempool_node = { path = "crates/mempool_node", version = "0.0" } -starknet_mempool_types = { path = "crates/mempool_types", version = "0.0" } -starknet_patricia = { path = "crates/starknet_patricia", version = "0.1.0-rc.0" } -starknet_sierra_compile = { path = "crates/starknet_sierra_compile", version = "0.0" } -starknet_task_executor = { path = "crates/task_executor", version = "0.0" } +starknet_api = { path = "crates/starknet_api", version = "0.13.2-rc.0" } +starknet_client = { path = "crates/starknet_client", version = "0.13.2-rc.0" } +starknet_committer = { path = "crates/starknet_committer", version = "0.13.2-rc.0" } +starknet_gateway = { path = "crates/gateway", version = "0.13.2-rc.0" } +starknet_mempool = { path = "crates/mempool", version = "0.13.2-rc.0" } +starknet_mempool_infra = { path = "crates/mempool_infra", version = "0.13.2-rc.0" } +starknet_mempool_node = { path = "crates/mempool_node", version = "0.13.2-rc.0" } +starknet_mempool_types = { path = "crates/mempool_types", version = "0.13.2-rc.0" } +starknet_patricia = { path = "crates/starknet_patricia", version = "0.13.2-rc.0" } +starknet_sierra_compile = { path = "crates/starknet_sierra_compile", version = "0.13.2-rc.0" } +starknet_task_executor = { path = "crates/task_executor", version = "0.13.2-rc.0" } static_assertions = "1.1.0" statistical = "1.0.0" strum = "0.25.0" @@ -190,6 +191,7 @@ tokio = { version = "1.37.0", features = ["full"] } tokio-retry = "0.3" tokio-stream = "0.1.8" tokio-test = "0.4.4" +toml = "0.8" tower = "0.4.13" tracing = "0.1.37" tracing-subscriber = "0.3.16" diff --git a/crates/blockifier/Cargo.toml b/crates/blockifier/Cargo.toml index 723bce1928..8516535f71 100644 --- a/crates/blockifier/Cargo.toml +++ b/crates/blockifier/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "blockifier" -version = "0.8.0-rc.2" +version.workspace = true edition.workspace = true repository.workspace = true license-file.workspace = true diff --git a/crates/committer_cli/Cargo.toml b/crates/committer_cli/Cargo.toml index 721ecbd738..19ae805830 100644 --- a/crates/committer_cli/Cargo.toml +++ b/crates/committer_cli/Cargo.toml @@ -1,7 +1,7 @@ [package] # TODO(Dori, 15/8/2024): Rename to starknet_committer_cli. name = "committer_cli" -version = "0.1.0-rc.0" +version.workspace = true edition.workspace = true repository.workspace = true license-file.workspace = true diff --git a/crates/gateway/Cargo.toml b/crates/gateway/Cargo.toml index 6d275ad32f..665370c23e 100644 --- a/crates/gateway/Cargo.toml +++ b/crates/gateway/Cargo.toml @@ -3,7 +3,7 @@ edition.workspace = true license.workspace = true name = "starknet_gateway" repository.workspace = true -version = "0.0.0" +version.workspace = true [lints] workspace = true diff --git a/crates/mempool/Cargo.toml b/crates/mempool/Cargo.toml index 07a94a8816..ecc4ed8fe2 100644 --- a/crates/mempool/Cargo.toml +++ b/crates/mempool/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "starknet_mempool" -version = "0.0.0" +version.workspace = true edition.workspace = true repository.workspace = true license.workspace = true diff --git a/crates/mempool_infra/Cargo.toml b/crates/mempool_infra/Cargo.toml index e6afcb6cb5..c65396a3cd 100644 --- a/crates/mempool_infra/Cargo.toml +++ b/crates/mempool_infra/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "starknet_mempool_infra" -version = "0.0.0" +version.workspace = true edition.workspace = true repository.workspace = true license.workspace = true diff --git a/crates/mempool_node/Cargo.toml b/crates/mempool_node/Cargo.toml index aa73ca92ff..133cfcf17e 100644 --- a/crates/mempool_node/Cargo.toml +++ b/crates/mempool_node/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "starknet_mempool_node" -version = "0.0.0" +version.workspace = true edition.workspace = true repository.workspace = true license.workspace = true diff --git a/crates/mempool_test_utils/Cargo.toml b/crates/mempool_test_utils/Cargo.toml index 3e2a6e44ea..5213e0529f 100644 --- a/crates/mempool_test_utils/Cargo.toml +++ b/crates/mempool_test_utils/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "mempool_test_utils" -version = "0.0.0" +version.workspace = true edition.workspace = true repository.workspace = true license.workspace = true diff --git a/crates/mempool_types/Cargo.toml b/crates/mempool_types/Cargo.toml index ab2c1e46fc..c2a92ac8e4 100644 --- a/crates/mempool_types/Cargo.toml +++ b/crates/mempool_types/Cargo.toml @@ -3,7 +3,7 @@ name = "starknet_mempool_types" edition.workspace = true license.workspace = true repository.workspace = true -version = "0.0.0" +version.workspace = true [lints] workspace = true diff --git a/crates/native_blockifier/Cargo.toml b/crates/native_blockifier/Cargo.toml index 37d59a8106..488db86192 100644 --- a/crates/native_blockifier/Cargo.toml +++ b/crates/native_blockifier/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "native_blockifier" -version = "0.8.0-rc.0" +version.workspace = true edition.workspace = true repository.workspace = true license-file.workspace = true diff --git a/crates/papyrus_base_layer/Cargo.toml b/crates/papyrus_base_layer/Cargo.toml index 9a9cf8e899..3cd7a533f7 100644 --- a/crates/papyrus_base_layer/Cargo.toml +++ b/crates/papyrus_base_layer/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "papyrus_base_layer" -version = "0.4.0-rc.0" +version.workspace = true edition.workspace = true repository.workspace = true license-file.workspace = true diff --git a/crates/papyrus_common/Cargo.toml b/crates/papyrus_common/Cargo.toml index db3c7015ce..b13070dafe 100644 --- a/crates/papyrus_common/Cargo.toml +++ b/crates/papyrus_common/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "papyrus_common" -version = "0.4.0-rc.0" +version.workspace = true edition.workspace = true repository.workspace = true license-file.workspace = true diff --git a/crates/papyrus_config/Cargo.toml b/crates/papyrus_config/Cargo.toml index 86f82f9ad0..3920f4650e 100644 --- a/crates/papyrus_config/Cargo.toml +++ b/crates/papyrus_config/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "papyrus_config" -version = "0.4.0-rc.0" +version.workspace = true edition.workspace = true repository.workspace = true license-file.workspace = true diff --git a/crates/papyrus_execution/Cargo.toml b/crates/papyrus_execution/Cargo.toml index fbfff50d3c..309fb3bde1 100644 --- a/crates/papyrus_execution/Cargo.toml +++ b/crates/papyrus_execution/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "papyrus_execution" -version = "0.4.0-rc.0" +version.workspace = true edition.workspace = true repository.workspace = true license-file.workspace = true diff --git a/crates/papyrus_load_test/Cargo.toml b/crates/papyrus_load_test/Cargo.toml index 9ac8731e57..60eb9055e0 100644 --- a/crates/papyrus_load_test/Cargo.toml +++ b/crates/papyrus_load_test/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "papyrus_load_test" -version = "0.4.0-rc.0" +version.workspace = true edition.workspace = true repository.workspace = true license-file.workspace = true diff --git a/crates/papyrus_monitoring_gateway/Cargo.toml b/crates/papyrus_monitoring_gateway/Cargo.toml index fd0a325b2b..1ba00102a8 100644 --- a/crates/papyrus_monitoring_gateway/Cargo.toml +++ b/crates/papyrus_monitoring_gateway/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "papyrus_monitoring_gateway" -version = "0.4.0-rc.0" +version.workspace = true edition.workspace = true repository.workspace = true license-file.workspace = true diff --git a/crates/papyrus_network/Cargo.toml b/crates/papyrus_network/Cargo.toml index 9869ed9193..81d6bcb70a 100644 --- a/crates/papyrus_network/Cargo.toml +++ b/crates/papyrus_network/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "papyrus_network" -version = "0.4.0-rc.0" +version.workspace = true edition.workspace = true repository.workspace = true license-file.workspace = true diff --git a/crates/papyrus_node/Cargo.toml b/crates/papyrus_node/Cargo.toml index c37e34bcf9..2204b151ab 100644 --- a/crates/papyrus_node/Cargo.toml +++ b/crates/papyrus_node/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "papyrus_node" -version = "0.4.0-rc.0" +version.workspace = true edition.workspace = true repository.workspace = true license-file.workspace = true diff --git a/crates/papyrus_p2p_sync/Cargo.toml b/crates/papyrus_p2p_sync/Cargo.toml index 12b62e4e74..5b47484fde 100644 --- a/crates/papyrus_p2p_sync/Cargo.toml +++ b/crates/papyrus_p2p_sync/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "papyrus_p2p_sync" -version = "0.4.0-rc.0" +version.workspace = true edition.workspace = true repository.workspace = true license-file.workspace = true diff --git a/crates/papyrus_proc_macros/Cargo.toml b/crates/papyrus_proc_macros/Cargo.toml index da3d40544f..e4a27be0c3 100644 --- a/crates/papyrus_proc_macros/Cargo.toml +++ b/crates/papyrus_proc_macros/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "papyrus_proc_macros" -version = "0.4.0-rc.0" +version.workspace = true edition.workspace = true repository.workspace = true license-file.workspace = true diff --git a/crates/papyrus_protobuf/Cargo.toml b/crates/papyrus_protobuf/Cargo.toml index 7490af9f67..dc25349a9f 100644 --- a/crates/papyrus_protobuf/Cargo.toml +++ b/crates/papyrus_protobuf/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "papyrus_protobuf" -version = "0.4.0-rc.0" +version.workspace = true edition.workspace = true repository.workspace = true license-file.workspace = true diff --git a/crates/papyrus_rpc/Cargo.toml b/crates/papyrus_rpc/Cargo.toml index 4d37f468e9..9ffb34cd22 100644 --- a/crates/papyrus_rpc/Cargo.toml +++ b/crates/papyrus_rpc/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "papyrus_rpc" -version = "0.4.0-rc.0" +version.workspace = true edition.workspace = true repository.workspace = true license-file.workspace = true diff --git a/crates/papyrus_storage/Cargo.toml b/crates/papyrus_storage/Cargo.toml index 099104a924..6bc6c1ece6 100644 --- a/crates/papyrus_storage/Cargo.toml +++ b/crates/papyrus_storage/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "papyrus_storage" -version = "0.4.0-rc.0" +version.workspace = true edition.workspace = true repository.workspace = true license-file.workspace = true diff --git a/crates/papyrus_sync/Cargo.toml b/crates/papyrus_sync/Cargo.toml index 34bf5080ee..6eb44b4a95 100644 --- a/crates/papyrus_sync/Cargo.toml +++ b/crates/papyrus_sync/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "papyrus_sync" -version = "0.4.0-rc.0" +version.workspace = true edition.workspace = true repository.workspace = true license-file.workspace = true diff --git a/crates/papyrus_test_utils/Cargo.toml b/crates/papyrus_test_utils/Cargo.toml index aaeedc579e..f734d04909 100644 --- a/crates/papyrus_test_utils/Cargo.toml +++ b/crates/papyrus_test_utils/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "papyrus_test_utils" -version = "0.4.0-rc.0" +version.workspace = true edition.workspace = true repository.workspace = true license-file.workspace = true diff --git a/crates/sequencing/papyrus_block_builder/Cargo.toml b/crates/sequencing/papyrus_block_builder/Cargo.toml index 163943ec66..07eee6d113 100644 --- a/crates/sequencing/papyrus_block_builder/Cargo.toml +++ b/crates/sequencing/papyrus_block_builder/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "papyrus_block_builder" -version = "0.4.0-rc.0" +version.workspace = true edition.workspace = true repository.workspace = true license-file.workspace = true diff --git a/crates/sequencing/papyrus_consensus/Cargo.toml b/crates/sequencing/papyrus_consensus/Cargo.toml index f9c075467c..a7288507a4 100644 --- a/crates/sequencing/papyrus_consensus/Cargo.toml +++ b/crates/sequencing/papyrus_consensus/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "papyrus_consensus" -version = "0.4.0-rc.0" +version.workspace = true edition.workspace = true repository.workspace = true license-file.workspace = true diff --git a/crates/starknet_api/Cargo.toml b/crates/starknet_api/Cargo.toml index cc04220d6c..48a52a73fe 100644 --- a/crates/starknet_api/Cargo.toml +++ b/crates/starknet_api/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "starknet_api" -version = "0.13.0-rc.1" +version.workspace = true edition.workspace = true repository.workspace = true license-file.workspace = true diff --git a/crates/starknet_client/Cargo.toml b/crates/starknet_client/Cargo.toml index 6b6632f3a5..765f9f4fcc 100644 --- a/crates/starknet_client/Cargo.toml +++ b/crates/starknet_client/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "starknet_client" -version = "0.4.0-rc.0" +version.workspace = true edition.workspace = true repository.workspace = true license-file.workspace = true diff --git a/crates/starknet_committer/Cargo.toml b/crates/starknet_committer/Cargo.toml index 8040a796c6..1546be4c6f 100644 --- a/crates/starknet_committer/Cargo.toml +++ b/crates/starknet_committer/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "starknet_committer" -version = "0.1.0-rc.0" +version.workspace = true edition.workspace = true repository.workspace = true license.workspace = true diff --git a/crates/starknet_patricia/Cargo.toml b/crates/starknet_patricia/Cargo.toml index d35c118cf1..01de51a31d 100644 --- a/crates/starknet_patricia/Cargo.toml +++ b/crates/starknet_patricia/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "starknet_patricia" -version = "0.1.0-rc.0" +version.workspace = true edition.workspace = true repository.workspace = true license-file.workspace = true diff --git a/crates/starknet_sierra_compile/Cargo.toml b/crates/starknet_sierra_compile/Cargo.toml index ce02f26f92..0e09cae73b 100644 --- a/crates/starknet_sierra_compile/Cargo.toml +++ b/crates/starknet_sierra_compile/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "starknet_sierra_compile" -version = "0.0.0" +version.workspace = true edition.workspace = true repository.workspace = true license.workspace = true diff --git a/crates/task_executor/Cargo.toml b/crates/task_executor/Cargo.toml index 3deace0db3..f622c6f95c 100644 --- a/crates/task_executor/Cargo.toml +++ b/crates/task_executor/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "starknet_task_executor" -version = "0.0.0" +version.workspace = true edition.workspace = true repository.workspace = true license.workspace = true diff --git a/crates/tests-integration/Cargo.toml b/crates/tests-integration/Cargo.toml index 186bd4e73f..8ca1c185f9 100644 --- a/crates/tests-integration/Cargo.toml +++ b/crates/tests-integration/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "starknet_mempool_integration_tests" -version = "0.0.0" +version.workspace = true edition.workspace = true repository.workspace = true license.workspace = true diff --git a/workspace_tests/Cargo.toml b/workspace_tests/Cargo.toml new file mode 100644 index 0000000000..d09f3a9d86 --- /dev/null +++ b/workspace_tests/Cargo.toml @@ -0,0 +1,16 @@ +[package] +name = "workspace_tests" +version.workspace = true +edition.workspace = true +repository.workspace = true +license-file.workspace = true +description = "Workspace-level tests." + +[dev-dependencies] +once_cell.workspace = true +serde = { workspace = true, features = ["derive"] } +toml.workspace = true + +[[test]] +name = "version_integrity_test" +path = "version_integrity_test.rs" diff --git a/workspace_tests/version_integrity_test.rs b/workspace_tests/version_integrity_test.rs new file mode 100644 index 0000000000..c20fc799d9 --- /dev/null +++ b/workspace_tests/version_integrity_test.rs @@ -0,0 +1,87 @@ +use std::collections::HashMap; + +use once_cell::sync::Lazy; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Debug, Serialize, Deserialize)] +#[serde(untagged)] +enum DependencyValue { + String(String), + Object { version: String, path: Option }, +} + +#[derive(Clone, Debug, Serialize, Deserialize)] +struct Package { + version: String, +} + +#[derive(Clone, Debug, Serialize, Deserialize)] +struct WorkspaceFields { + package: Package, + members: Vec, + dependencies: HashMap, +} + +#[derive(Clone, Debug, Serialize, Deserialize)] +struct CargoToml { + workspace: WorkspaceFields, +} + +struct LocalCrate { + name: String, + path: String, + version: String, +} + +static ROOT_TOML: Lazy = Lazy::new(|| { + let root_toml: CargoToml = toml::from_str(include_str!("../Cargo.toml")).unwrap(); + root_toml +}); + +impl CargoToml { + fn local_crates(&self) -> Vec { + self.workspace + .dependencies + .iter() + .filter_map(|(name, value)| { + if let DependencyValue::Object { path, version } = value { + if let Some(path) = path { + return Some(LocalCrate { + name: name.to_string(), + path: path.to_string(), + version: version.to_string(), + }); + } + } + None + }) + .collect() + } + + fn workspace_version(&self) -> &str { + &self.workspace.package.version + } +} + +// Tests. + +#[test] +fn test_local_dependencies_are_members() { + for LocalCrate { path, name, .. } in ROOT_TOML.local_crates().iter() { + assert!( + ROOT_TOML.workspace.members.contains(&path), + "Crate '{name}' at path '{path}' is not a member of the workspace." + ); + } +} + +#[test] +fn test_version_alignment() { + let workspace_version = ROOT_TOML.workspace_version(); + for LocalCrate { name, version, .. } in ROOT_TOML.local_crates().iter() { + assert_eq!( + workspace_version, version, + "Crate '{name}' has version '{version}', instead of '{workspace_version}'." + ); + } +}