From 601ca89bfe5700c9f1089f45cdcf26e81a4c2940 Mon Sep 17 00:00:00 2001 From: AvivYossef-starkware <141143145+AvivYossef-starkware@users.noreply.github.com> Date: Thu, 8 Aug 2024 13:41:03 +0300 Subject: [PATCH 01/10] refactor: use serde workspace (#311) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This change is [Reviewable](https://reviewable.io/reviews/starkware-libs/sequencer/311) --- Cargo.toml | 2 +- crates/committer/Cargo.toml | 2 +- crates/committer_cli/Cargo.toml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 8cf8577ed7..42bef1f27e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -157,7 +157,7 @@ reqwest = { version = "0.11", features = ["blocking", "json"] } rstest = "0.17.0" rustc-hex = "2.1.0" schemars = "0.8.12" -serde = "1.0.193" +serde = "1.0.197" serde_json = "1.0.81" serde_repr = "0.1" serde_yaml = "0.9.16" diff --git a/crates/committer/Cargo.toml b/crates/committer/Cargo.toml index bf7a63a4f3..d1aa8295ba 100644 --- a/crates/committer/Cargo.toml +++ b/crates/committer/Cargo.toml @@ -23,7 +23,7 @@ derive_more.workspace = true ethnum.workspace = true hex.workspace = true rand.workspace = true -serde = { version = "1.0.197", features = ["derive"] } +serde = { workspace = true, features = ["derive"] } serde_json = "1.0.116" starknet-types-core.workspace = true strum.workspace = true diff --git a/crates/committer_cli/Cargo.toml b/crates/committer_cli/Cargo.toml index e2a6e0a1a2..f6a563a735 100644 --- a/crates/committer_cli/Cargo.toml +++ b/crates/committer_cli/Cargo.toml @@ -23,7 +23,7 @@ ethnum.workspace = true indexmap.workspace = true rand.workspace = true rand_distr.workspace = true -serde = { version = "1.0.197", features = ["derive"] } +serde = { workspace = true, features = ["derive"] } serde_json = "1.0.116" serde_repr = "0.1.19" starknet-types-core.workspace = true From f1a5df75f35c06842d2538d3d379947b2b20b8d4 Mon Sep 17 00:00:00 2001 From: AvivYossef-starkware <141143145+AvivYossef-starkware@users.noreply.github.com> Date: Thu, 8 Aug 2024 14:01:29 +0300 Subject: [PATCH 02/10] refactor: use serde json workspace in the committer (#313) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This change is [Reviewable](https://reviewable.io/reviews/starkware-libs/sequencer/313) --- Cargo.toml | 2 +- crates/committer/Cargo.toml | 2 +- crates/committer_cli/Cargo.toml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 42bef1f27e..ca428721e6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -158,7 +158,7 @@ rstest = "0.17.0" rustc-hex = "2.1.0" schemars = "0.8.12" serde = "1.0.197" -serde_json = "1.0.81" +serde_json = "1.0.116" serde_repr = "0.1" serde_yaml = "0.9.16" sha2 = "0.10.8" diff --git a/crates/committer/Cargo.toml b/crates/committer/Cargo.toml index d1aa8295ba..8058f09f5b 100644 --- a/crates/committer/Cargo.toml +++ b/crates/committer/Cargo.toml @@ -24,7 +24,7 @@ ethnum.workspace = true hex.workspace = true rand.workspace = true serde = { workspace = true, features = ["derive"] } -serde_json = "1.0.116" +serde_json.workspace = true starknet-types-core.workspace = true strum.workspace = true strum_macros.workspace = true diff --git a/crates/committer_cli/Cargo.toml b/crates/committer_cli/Cargo.toml index f6a563a735..45699fc08d 100644 --- a/crates/committer_cli/Cargo.toml +++ b/crates/committer_cli/Cargo.toml @@ -24,7 +24,7 @@ indexmap.workspace = true rand.workspace = true rand_distr.workspace = true serde = { workspace = true, features = ["derive"] } -serde_json = "1.0.116" +serde_json.workspace = true serde_repr = "0.1.19" starknet-types-core.workspace = true starknet_api.workspace = true From 8d500dbc73fa124073b6c9c0174516dd4b3cc532 Mon Sep 17 00:00:00 2001 From: AvivYossef-starkware <141143145+AvivYossef-starkware@users.noreply.github.com> Date: Thu, 8 Aug 2024 14:21:39 +0300 Subject: [PATCH 03/10] refactor: use clap workspace in committer cli (#315) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This change is [Reviewable](https://reviewable.io/reviews/starkware-libs/sequencer/315) --- Cargo.toml | 2 +- crates/committer_cli/Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index ca428721e6..72d59ba36b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -77,7 +77,7 @@ cairo-lang-utils = "2.7.0" cairo-vm = "=1.0.0-rc6" camelpaste = "0.1.0" chrono = "0.4.26" -clap = "4.3.10" +clap = "4.5.4" colored = "2.1.0" committer = { path = "crates/committer", version = "0.1.0-rc.0" } const_format = "0.2.30" diff --git a/crates/committer_cli/Cargo.toml b/crates/committer_cli/Cargo.toml index 45699fc08d..d92de96edb 100644 --- a/crates/committer_cli/Cargo.toml +++ b/crates/committer_cli/Cargo.toml @@ -16,7 +16,7 @@ pretty_assertions.workspace = true tempfile.workspace = true [dependencies] -clap = { version = "4.5.4", features = ["cargo", "derive"] } +clap = { workspace = true, features = ["cargo", "derive"] } committer = { workspace = true, features = ["testing"] } derive_more.workspace = true ethnum.workspace = true From 0fed3b1e0c0f3ccb6f526832ab72e6234420eba7 Mon Sep 17 00:00:00 2001 From: AvivYossef-starkware <141143145+AvivYossef-starkware@users.noreply.github.com> Date: Thu, 8 Aug 2024 14:42:29 +0300 Subject: [PATCH 04/10] refactor: use serde repr workspace in committer cli (#316) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This change is [Reviewable](https://reviewable.io/reviews/starkware-libs/sequencer/316) --- Cargo.toml | 2 +- crates/committer_cli/Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 72d59ba36b..71c700e749 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -159,7 +159,7 @@ rustc-hex = "2.1.0" schemars = "0.8.12" serde = "1.0.197" serde_json = "1.0.116" -serde_repr = "0.1" +serde_repr = "0.1.19" serde_yaml = "0.9.16" sha2 = "0.10.8" sha3 = "0.10.8" diff --git a/crates/committer_cli/Cargo.toml b/crates/committer_cli/Cargo.toml index d92de96edb..1d09d2f15d 100644 --- a/crates/committer_cli/Cargo.toml +++ b/crates/committer_cli/Cargo.toml @@ -25,7 +25,7 @@ rand.workspace = true rand_distr.workspace = true serde = { workspace = true, features = ["derive"] } serde_json.workspace = true -serde_repr = "0.1.19" +serde_repr.workspace = true starknet-types-core.workspace = true starknet_api.workspace = true starknet_committer = { path = "../starknet_committer" } From 15a768bafd19c9a589fdfcf12588918e4ff54c57 Mon Sep 17 00:00:00 2001 From: AvivYossef-starkware <141143145+AvivYossef-starkware@users.noreply.github.com> Date: Thu, 8 Aug 2024 15:01:36 +0300 Subject: [PATCH 05/10] refactor: use criterion workspace in committer (#317) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This change is [Reviewable](https://reviewable.io/reviews/starkware-libs/sequencer/317) --- Cargo.lock | 151 ++++---------------------------- Cargo.toml | 2 +- crates/committer_cli/Cargo.toml | 2 +- 3 files changed, 18 insertions(+), 137 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 93b1fdeba3..1272dd9e5f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -689,17 +689,6 @@ dependencies = [ "url", ] -[[package]] -name = "atty" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi 0.1.19", - "libc", - "winapi", -] - [[package]] name = "auto_impl" version = "1.2.0" @@ -993,7 +982,7 @@ dependencies = [ "cairo-lang-starknet-classes", "cairo-lang-utils", "cairo-vm", - "criterion 0.3.6", + "criterion", "derive_more", "glob", "indexmap 2.2.6", @@ -1813,7 +1802,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57663b653d948a338bfb3eeba9bb2fd5fcfaecb9e199e87e1eda4d9e8b240fd9" dependencies = [ "ciborium-io", - "half 2.4.1", + "half", ] [[package]] @@ -1838,17 +1827,6 @@ dependencies = [ "libloading", ] -[[package]] -name = "clap" -version = "2.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" -dependencies = [ - "bitflags 1.3.2", - "textwrap", - "unicode-width", -] - [[package]] name = "clap" version = "4.5.4" @@ -1991,9 +1969,9 @@ dependencies = [ name = "committer_cli" version = "0.1.0-rc.0" dependencies = [ - "clap 4.5.4", + "clap", "committer", - "criterion 0.5.1", + "criterion", "derive_more", "ethnum", "futures", @@ -2174,32 +2152,6 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "criterion" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b01d6de93b2b6c65e17c634a26653a29d107b3c98c607c765bf38d041531cd8f" -dependencies = [ - "atty", - "cast", - "clap 2.34.0", - "criterion-plot 0.4.5", - "csv", - "itertools 0.10.5", - "lazy_static", - "num-traits 0.2.19", - "oorandom", - "plotters", - "rayon", - "regex", - "serde", - "serde_cbor", - "serde_derive", - "serde_json", - "tinytemplate", - "walkdir", -] - [[package]] name = "criterion" version = "0.5.1" @@ -2209,8 +2161,8 @@ dependencies = [ "anes", "cast", "ciborium", - "clap 4.5.4", - "criterion-plot 0.5.0", + "clap", + "criterion-plot", "is-terminal", "itertools 0.10.5", "num-traits 0.2.19", @@ -2226,16 +2178,6 @@ dependencies = [ "walkdir", ] -[[package]] -name = "criterion-plot" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2673cc8207403546f45f5fd319a974b1e6983ad1a3ee7e6041650013be041876" -dependencies = [ - "cast", - "itertools 0.10.5", -] - [[package]] name = "criterion-plot" version = "0.5.0" @@ -2309,27 +2251,6 @@ dependencies = [ "typenum", ] -[[package]] -name = "csv" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac574ff4d437a7b5ad237ef331c17ccca63c46479e5b5453eb8e10bb99a759fe" -dependencies = [ - "csv-core", - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "csv-core" -version = "0.1.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5efa2b3d7902f4b634a20cae3c9c4e6209dc4779feb6863329607560143efa70" -dependencies = [ - "memchr", -] - [[package]] name = "ctr" version = "0.9.2" @@ -3791,12 +3712,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "half" -version = "1.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b43ede17f21864e81be2fa654110bf1e793774238d86ef8555c37e6519c0403" - [[package]] name = "half" version = "2.4.1" @@ -3873,15 +3788,6 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" -[[package]] -name = "hermit-abi" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -dependencies = [ - "libc", -] - [[package]] name = "hermit-abi" version = "0.3.9" @@ -4351,7 +4257,7 @@ version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" dependencies = [ - "hermit-abi 0.3.9", + "hermit-abi", "libc", "windows-sys 0.48.0", ] @@ -4380,7 +4286,7 @@ version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" dependencies = [ - "hermit-abi 0.3.9", + "hermit-abi", "libc", "windows-sys 0.52.0", ] @@ -4622,7 +4528,7 @@ dependencies = [ "anyhow", "base64 0.21.7", "bytecount", - "clap 4.5.4", + "clap", "fancy-regex", "fraction", "getrandom", @@ -6037,7 +5943,7 @@ version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.3.9", + "hermit-abi", "libc", ] @@ -6269,7 +6175,7 @@ name = "papyrus_config" version = "0.4.0-rc.0" dependencies = [ "assert_matches", - "clap 4.5.4", + "clap", "itertools 0.10.5", "lazy_static", "papyrus_test_utils", @@ -6382,7 +6288,7 @@ dependencies = [ "assert_matches", "async-stream", "bytes", - "clap 4.5.4", + "clap", "deadqueue", "defaultmap", "derive_more", @@ -6412,7 +6318,7 @@ version = "0.4.0-rc.0" dependencies = [ "anyhow", "assert-json-diff", - "clap 4.5.4", + "clap", "colored", "const_format", "futures", @@ -6573,7 +6479,7 @@ dependencies = [ "cairo-lang-starknet-classes", "cairo-lang-utils", "camelpaste", - "clap 4.5.4", + "clap", "human_bytes", "indexmap 2.2.6", "insta", @@ -7026,7 +6932,7 @@ checksum = "645493cf344456ef24219d02a768cf1fb92ddf8c92161679ae3d91b91a637be3" dependencies = [ "cfg-if", "concurrent-queue", - "hermit-abi 0.3.9", + "hermit-abi", "pin-project-lite", "rustix 0.38.34", "tracing", @@ -8358,16 +8264,6 @@ dependencies = [ "serde_derive", ] -[[package]] -name = "serde_cbor" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bef2ebfde456fb76bbcf9f59315333decc4fda0b2b44b420243c11e0f5ec1f5" -dependencies = [ - "half 1.8.3", - "serde", -] - [[package]] name = "serde_derive" version = "1.0.201" @@ -9053,7 +8949,7 @@ dependencies = [ "anyhow", "assert-json-diff", "assert_matches", - "clap 4.5.4", + "clap", "colored", "const_format", "futures", @@ -9426,15 +9322,6 @@ dependencies = [ "which", ] -[[package]] -name = "textwrap" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" -dependencies = [ - "unicode-width", -] - [[package]] name = "thiserror" version = "1.0.60" @@ -9933,12 +9820,6 @@ version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" -[[package]] -name = "unicode-width" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68f5e5f3158ecfd4b8ff6fe086db7c8467a2dfdac97fe420f2b7c4aa97af66d6" - [[package]] name = "unicode-xid" version = "0.2.4" diff --git a/Cargo.toml b/Cargo.toml index 71c700e749..467a06da27 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -81,7 +81,7 @@ clap = "4.5.4" colored = "2.1.0" committer = { path = "crates/committer", version = "0.1.0-rc.0" } const_format = "0.2.30" -criterion = "0.3" +criterion = "0.5.1" deadqueue = "0.2.4" defaultmap = "0.5.0" derive_more = "0.99.17" diff --git a/crates/committer_cli/Cargo.toml b/crates/committer_cli/Cargo.toml index 1d09d2f15d..0a6b8e8292 100644 --- a/crates/committer_cli/Cargo.toml +++ b/crates/committer_cli/Cargo.toml @@ -10,7 +10,7 @@ description = "Cli for the committer package." workspace = true [dev-dependencies] -criterion = { version = "0.5.1", features = ["html_reports"] } +criterion = { workspace = true, features = ["html_reports"] } futures.workspace = true pretty_assertions.workspace = true tempfile.workspace = true From abf106eb1eca71f975cf7dee0ed81822f7cc30be Mon Sep 17 00:00:00 2001 From: nimrod-starkware <143319383+nimrod-starkware@users.noreply.github.com> Date: Sun, 11 Aug 2024 10:10:36 +0300 Subject: [PATCH 06/10] feat(ci): make rust version in ci configurable (#294) --- .github/actions/install_rust/action.yml | 25 +++++++++++++++++++ .github/workflows/blockifier_ci.yml | 4 +-- .../workflows/blockifier_compiled_cairo.yml | 5 ++-- .github/workflows/blockifier_coverage.yml | 2 +- .github/workflows/blockifier_post-merge.yml | 2 +- .github/workflows/committer_ci.yml | 4 +-- .github/workflows/main.yml | 12 ++++----- .github/workflows/papyrus_ci.yml | 12 ++++----- .../workflows/papyrus_nightly-tests-call.yml | 2 +- .github/workflows/papyrus_nightly-tests.yml | 10 ++++---- .github/workflows/verify-deps.yml | 2 +- 11 files changed, 52 insertions(+), 28 deletions(-) create mode 100644 .github/actions/install_rust/action.yml diff --git a/.github/actions/install_rust/action.yml b/.github/actions/install_rust/action.yml new file mode 100644 index 0000000000..7c44a32ec3 --- /dev/null +++ b/.github/actions/install_rust/action.yml @@ -0,0 +1,25 @@ +# Installs rust toolchain. In order to set/fix the version, edit DEFAULT_TOOLCHAIN env variable. +inputs: + components: + description: "An optional parameter that will be sent to dtolnay/rust-toolchain." + required: false + type: string + +runs: + using: "composite" + steps: + - name: Define toolchain + run: echo "DEFAULT_TOOLCHAIN=stable" >> $GITHUB_ENV + shell: bash + - name: install rust toolchain with given components + if: "${{ inputs.components != '' }}" + uses: dtolnay/rust-toolchain@master + with: + toolchain: ${{ env.DEFAULT_TOOLCHAIN }} + components: ${{ inputs.components }} + + - name: install rust toolchain without given components + if: "${{ inputs.components == '' }}" + uses: dtolnay/rust-toolchain@master + with: + toolchain: ${{ env.DEFAULT_TOOLCHAIN }} diff --git a/.github/workflows/blockifier_ci.yml b/.github/workflows/blockifier_ci.yml index 3cf49f006f..46197b8e02 100644 --- a/.github/workflows/blockifier_ci.yml +++ b/.github/workflows/blockifier_ci.yml @@ -30,7 +30,7 @@ jobs: runs-on: starkware-ubuntu-20-04-medium steps: - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@stable + - uses: ./.github/actions/install_rust - uses: Swatinem/rust-cache@v2 with: prefix-key: "v0-rust-ubuntu-20.04" @@ -41,7 +41,7 @@ jobs: runs-on: starkware-ubuntu-20-04-medium steps: - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@stable + - uses: ./.github/actions/install_rust - uses: Swatinem/rust-cache@v2 with: diff --git a/.github/workflows/blockifier_compiled_cairo.yml b/.github/workflows/blockifier_compiled_cairo.yml index e2eed9636f..878623b641 100644 --- a/.github/workflows/blockifier_compiled_cairo.yml +++ b/.github/workflows/blockifier_compiled_cairo.yml @@ -23,8 +23,7 @@ jobs: runs-on: starkware-ubuntu-20-04-medium steps: - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@stable - - uses: Noelware/setup-protoc@1.1.0 + - uses: ./.github/actions/install_rust - uses: Swatinem/rust-cache@v2 with: prefix-key: "v0-rust-ubuntu-20.04" @@ -41,4 +40,4 @@ jobs: - run: pip install -r crates/blockifier/tests/requirements.txt; - cargo test verify_feature_contracts -- --include-ignored + cargo test -p blockifier --test feature_contracts_compatibility_test --features testing -- --include-ignored diff --git a/.github/workflows/blockifier_coverage.yml b/.github/workflows/blockifier_coverage.yml index 1da1cdbbf2..23cfb58bed 100644 --- a/.github/workflows/blockifier_coverage.yml +++ b/.github/workflows/blockifier_coverage.yml @@ -17,7 +17,7 @@ jobs: CARGO_TERM_COLOR: always steps: - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@stable + - uses: ./.github/actions/install_rust - uses: Swatinem/rust-cache@v2 with: prefix-key: "v0-rust-ubuntu-20.04" diff --git a/.github/workflows/blockifier_post-merge.yml b/.github/workflows/blockifier_post-merge.yml index 404ed09680..4015aab921 100644 --- a/.github/workflows/blockifier_post-merge.yml +++ b/.github/workflows/blockifier_post-merge.yml @@ -13,7 +13,7 @@ jobs: runs-on: starkware-ubuntu-20-04-medium steps: - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@stable + - uses: ./.github/actions/install_rust - uses: Noelware/setup-protoc@1.1.0 - uses: Swatinem/rust-cache@v2 with: diff --git a/.github/workflows/committer_ci.yml b/.github/workflows/committer_ci.yml index ef816bc5d8..80c57e2250 100644 --- a/.github/workflows/committer_ci.yml +++ b/.github/workflows/committer_ci.yml @@ -35,7 +35,7 @@ jobs: runs-on: starkware-ubuntu-latest-small steps: - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@stable + - uses: ./.github/actions/install_rust - uses: Swatinem/rust-cache@v2 - id: auth @@ -117,7 +117,7 @@ jobs: runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@stable + - uses: ./.github/actions/install_rust - uses: Swatinem/rust-cache@v2 # Commit hash on pull request event would be the head commit of the branch. diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ec8673ed03..9dda3304a1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -44,7 +44,7 @@ jobs: runs-on: starkware-ubuntu-20-04-medium steps: - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@master + - uses: dtolnay/rust-toolchain@master # TODO(Nimrod, 15/8/2024): Use stable toolchain. with: components: rustfmt toolchain: nightly-2024-04-29 @@ -58,7 +58,7 @@ jobs: steps: - uses: actions/checkout@v4 - uses: Noelware/setup-protoc@1.1.0 - - uses: dtolnay/rust-toolchain@stable + - uses: ./.github/actions/install_rust with: components: clippy - uses: Swatinem/rust-cache@v2 @@ -83,7 +83,7 @@ jobs: # RUSTDOCFLAGS: "-D warnings" steps: - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@stable + - uses: ./.github/actions/install_rust - uses: Swatinem/rust-cache@v2 - uses: Noelware/setup-protoc@1.1.0 with: @@ -97,7 +97,7 @@ jobs: with: # Fetch the entire history. fetch-depth: 0 - - uses: dtolnay/rust-toolchain@stable + - uses: ./.github/actions/install_rust - uses: Noelware/setup-protoc@1.1.0 - uses: Swatinem/rust-cache@v2 with: @@ -137,7 +137,7 @@ jobs: runs-on: starkware-ubuntu-latest-small steps: - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@stable + - uses: ./.github/actions/install_rust - uses: Swatinem/rust-cache@v2 - uses: baptiste0928/cargo-install@v3 with: @@ -159,7 +159,7 @@ jobs: RUSTDOCFLAGS: "-D warnings" steps: - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@stable + - uses: ./.github/actions/install_rust - uses: Swatinem/rust-cache@v2 - uses: Noelware/setup-protoc@1.1.0 with: diff --git a/.github/workflows/papyrus_ci.yml b/.github/workflows/papyrus_ci.yml index 3fb238c381..3ec82a072a 100644 --- a/.github/workflows/papyrus_ci.yml +++ b/.github/workflows/papyrus_ci.yml @@ -41,7 +41,7 @@ jobs: runs-on: starkware-ubuntu-latest-medium steps: - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@stable + - uses: ./.github/actions/install_rust - uses: Swatinem/rust-cache@v2 - uses: Noelware/setup-protoc@1.1.0 with: @@ -60,7 +60,7 @@ jobs: runs-on: starkware-ubuntu-latest-medium steps: - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@stable + - uses: ./.github/actions/install_rust - uses: Swatinem/rust-cache@v2 - uses: Noelware/setup-protoc@1.1.0 with: @@ -79,7 +79,7 @@ jobs: runs-on: starkware-ubuntu-latest-medium steps: - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@stable + - uses: ./.github/actions/install_rust - uses: Swatinem/rust-cache@v2 - uses: Noelware/setup-protoc@1.1.0 with: @@ -96,7 +96,7 @@ jobs: runs-on: starkware-ubuntu-latest-medium steps: - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@stable + - uses: ./.github/actions/install_rust - uses: Swatinem/rust-cache@v2 - uses: Noelware/setup-protoc@1.1.0 @@ -109,7 +109,7 @@ jobs: runs-on: starkware-ubuntu-latest-medium steps: - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@stable + - uses: ./.github/actions/install_rust - name: Set-Up run: | sudo apt-get update @@ -173,7 +173,7 @@ jobs: filters: | target_directory: - 'crates/papyrus_storage/src/db/**' - - uses: dtolnay/rust-toolchain@stable + - uses: ./.github/actions/install_rust - uses: Swatinem/rust-cache@v2 # repeat this job 32 times. this is a random test for part of the code that may cause a corrupted database. - run: for run in {1..32}; do cargo test -r -p papyrus_storage -- --include-ignored common_prefix_compare_with_simple_table_random; done diff --git a/.github/workflows/papyrus_nightly-tests-call.yml b/.github/workflows/papyrus_nightly-tests-call.yml index afdc528be0..64980b6ab5 100644 --- a/.github/workflows/papyrus_nightly-tests-call.yml +++ b/.github/workflows/papyrus_nightly-tests-call.yml @@ -21,7 +21,7 @@ jobs: runs-on: ${{ inputs.os }} steps: - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@stable + - uses: ./.github/actions/install_rust - uses: Swatinem/rust-cache@v2 - run: sudo apt update; sudo apt -y install libclang-dev # Install libclang-dev that is not a part of the ubuntu vm in github actions. diff --git a/.github/workflows/papyrus_nightly-tests.yml b/.github/workflows/papyrus_nightly-tests.yml index 9c0a9bb09f..a7a91d5687 100644 --- a/.github/workflows/papyrus_nightly-tests.yml +++ b/.github/workflows/papyrus_nightly-tests.yml @@ -37,7 +37,7 @@ jobs: if: github.event.schedule == '30 0 * * *' steps: - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@stable + - uses: ./.github/actions/install_rust - uses: Swatinem/rust-cache@v2 - run: mkdir data @@ -57,7 +57,7 @@ jobs: if: github.event.schedule == '30 0 * * *' steps: - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@stable + - uses: ./.github/actions/install_rust - uses: Swatinem/rust-cache@v2 - run: npm install -g ganache@7.4.3 @@ -73,7 +73,7 @@ jobs: if: github.event.schedule == '30 0 * * *' steps: - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@stable + - uses: ./.github/actions/install_rust - uses: Swatinem/rust-cache@v2 - run: cargo build -r -p papyrus_load_test @@ -82,7 +82,7 @@ jobs: if: github.event.schedule == '30 0 * * *' steps: - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@stable + - uses: ./.github/actions/install_rust - uses: Swatinem/rust-cache@v2 - run: > cargo test -r @@ -98,6 +98,6 @@ jobs: runs-on: starkware-ubuntu-latest-small steps: - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@stable + - uses: ./.github/actions/install_rust - uses: Swatinem/rust-cache@v2 - run: for run in {1..100}; do cargo test -r -p papyrus_storage -- --include-ignored common_prefix_compare_with_simple_table_random; done diff --git a/.github/workflows/verify-deps.yml b/.github/workflows/verify-deps.yml index 3b410ef14c..e23ac29496 100644 --- a/.github/workflows/verify-deps.yml +++ b/.github/workflows/verify-deps.yml @@ -11,7 +11,7 @@ jobs: continue-on-error: true steps: - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@stable + - uses: ./.github/actions/install_rust - name: Update Dependencies run: cargo update --verbose - name: Build From 94aa2b3d9a08b39882a160b5d01b75d763eb5939 Mon Sep 17 00:00:00 2001 From: alon-dotan-starkware Date: Mon, 12 Aug 2024 11:15:27 +0300 Subject: [PATCH 07/10] chore(ci): fix merge gatekeeper config (#400) --- .github/workflows/main.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9dda3304a1..38e4655265 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -174,16 +174,16 @@ jobs: checks: read statuses: read steps: - - name: Run Merge Gatekeeper - if: github.event_name != 'merge_group' + - name: Run Merge Gatekeeper on pull request + if: github.event_name == 'pull_request' uses: upsidr/merge-gatekeeper@v1 with: token: ${{ secrets.GITHUB_TOKEN }} timeout: 1200 ignored: "code-review/reviewable" - - name: Run Merge Gatekeeper in Merge Queue - if: github.event_name == 'merge_group' + - name: Run Merge Gatekeeper on Merge Queue || push + if: github.event_name == 'merge_group' || github.event_name == 'push' uses: upsidr/merge-gatekeeper@v1 with: token: ${{ secrets.GITHUB_TOKEN }} From 86ef5b0136a28688ded6fd3b60af104b5da7b47b Mon Sep 17 00:00:00 2001 From: dorimedini-starkware Date: Mon, 12 Aug 2024 11:49:26 +0300 Subject: [PATCH 08/10] chore: improve blockifier CI trigger and scope (#76) Signed-off-by: Dori Medini --- .github/workflows/blockifier_ci.yml | 11 +++++++++-- .github/workflows/blockifier_compiled_cairo.yml | 5 ++++- .github/workflows/blockifier_coverage.yml | 5 +---- .github/workflows/blockifier_post-merge.yml | 4 +++- 4 files changed, 17 insertions(+), 8 deletions(-) diff --git a/.github/workflows/blockifier_ci.yml b/.github/workflows/blockifier_ci.yml index 46197b8e02..8612e4134f 100644 --- a/.github/workflows/blockifier_ci.yml +++ b/.github/workflows/blockifier_ci.yml @@ -9,6 +9,8 @@ on: - main-v[0-9].** tags: - v[0-9].** + # TODO(Dori, 1/9/2024): Decide when exactly native-blockifier artifacts will be built. Until + # then, keep the 'paths' key empty and build on every push to a release branch / tag. pull_request: types: @@ -18,12 +20,17 @@ on: - auto_merge_enabled - edited paths: + # Other than code-related changes, all changes related to the native-blockifier build-and-push + # process should trigger the build (e.g., changes to the Dockerfile, build scripts, etc.). - '.github/workflows/blockifier_ci.yml' + - 'Cargo.toml' + - 'Cargo.lock' + - 'build_native_blockifier_in_docker.sh' - 'crates/blockifier/**' - 'crates/native_blockifier/**' - - 'build_native_blockifier_in_docker.sh' - - 'scripts/build_native_blockifier.sh' - 'scripts/blockifier.Dockerfile' + - 'scripts/build_native_blockifier.sh' + - 'scripts/install_build_tools.sh' jobs: featureless-build: diff --git a/.github/workflows/blockifier_compiled_cairo.yml b/.github/workflows/blockifier_compiled_cairo.yml index 878623b641..83e57f82d0 100644 --- a/.github/workflows/blockifier_compiled_cairo.yml +++ b/.github/workflows/blockifier_compiled_cairo.yml @@ -4,11 +4,13 @@ on: push: branches: - main + - main-v[0-9].** tags: - v[0-9].** paths: - - 'crates/blockifier/feature_contracts/cairo0/**' - '.github/workflows/blockifier_compiled_cairo.yml' + - 'crates/blockifier/feature_contracts/cairo0/**' + - 'crates/blockifier/tests/requirements.txt' pull_request: types: - opened @@ -17,6 +19,7 @@ on: paths: - '.github/workflows/blockifier_compiled_cairo.yml' - 'crates/blockifier/feature_contracts/cairo0/**' + - 'crates/blockifier/tests/requirements.txt' jobs: verify_cairo_file_dependencies: diff --git a/.github/workflows/blockifier_coverage.yml b/.github/workflows/blockifier_coverage.yml index 23cfb58bed..b22c50aefc 100644 --- a/.github/workflows/blockifier_coverage.yml +++ b/.github/workflows/blockifier_coverage.yml @@ -5,10 +5,7 @@ on: paths: - '.github/workflows/blockifier_coverage.yml' - 'crates/blockifier/**' - push: - paths: - - '.github/workflows/blockifier_coverage.yml' - - 'crates/blockifier/**' + - 'crates/native_blockifier/**' jobs: coverage: diff --git a/.github/workflows/blockifier_post-merge.yml b/.github/workflows/blockifier_post-merge.yml index 4015aab921..194fb23475 100644 --- a/.github/workflows/blockifier_post-merge.yml +++ b/.github/workflows/blockifier_post-merge.yml @@ -7,6 +7,8 @@ on: paths: - '.github/workflows/blockifier_post-merge.yml' - 'crates/blockifier/**' + - 'crates/native_blockifier/**' + jobs: if_merged: if: github.event.pull_request.merged == true @@ -31,4 +33,4 @@ jobs: - run: | pip install -r crates/blockifier/tests/requirements.txt - cargo test -- --include-ignored + cargo test -p blockifier -p native_blockifier -- --include-ignored From ce118c172792c33fd92a9260b60ca4b2b56a741e Mon Sep 17 00:00:00 2001 From: dorimedini-starkware Date: Mon, 12 Aug 2024 17:39:59 +0300 Subject: [PATCH 09/10] chore(committer): renamed committer to starknet_patricia (#405) Signed-off-by: Dori Medini --- .github/workflows/committer_ci.yml | 4 +- Cargo.lock | 46 +++++++++---------- Cargo.toml | 5 +- commitlint.config.js | 1 + crates/committer_cli/Cargo.toml | 5 +- .../committer_cli/benches/committer_bench.rs | 6 +-- .../src/filled_tree_output/filled_forest.rs | 2 +- crates/committer_cli/src/parse_input/cast.rs | 8 ++-- crates/committer_cli/src/parse_input/read.rs | 2 +- .../src/parse_input/read_test.rs | 8 ++-- .../committer_cli/src/tests/python_tests.rs | 32 ++++++------- .../src/tests/regression_tests.rs | 2 +- .../src/tests/utils/parse_from_python.rs | 12 ++--- .../src/tests/utils/random_structs.rs | 28 +++++------ crates/starknet_committer/Cargo.toml | 2 +- .../src/block_committer/commit.rs | 4 +- .../src/block_committer/input.rs | 10 ++-- .../src/forest/filled_forest.rs | 12 ++--- .../src/forest/forest_errors.rs | 4 +- .../src/forest/original_skeleton_forest.rs | 10 ++-- .../src/forest/skeleton_forest_test.rs | 20 ++++---- .../src/forest/updated_skeleton_forest.rs | 8 ++-- .../src/hash_function/hash.rs | 8 ++-- .../src/hash_function/hash_test.rs | 12 ++--- .../patricia_merkle_tree/leaf/leaf_impl.rs | 10 ++-- .../patricia_merkle_tree/leaf/leaf_serde.rs | 12 ++--- .../leaf/leaf_serde_test.rs | 6 +-- .../src/patricia_merkle_tree/tree.rs | 10 ++-- .../src/patricia_merkle_tree/types.rs | 10 ++-- .../src/patricia_merkle_tree/types_test.rs | 4 +- .../Cargo.toml | 2 +- .../src/felt.rs | 0 .../src/hash.rs | 0 .../src/hash/hash_trait.rs | 0 .../src/lib.rs | 0 .../src/patricia_merkle_tree.rs | 0 .../src/patricia_merkle_tree/errors.rs | 0 .../external_test_utils.rs | 0 .../src/patricia_merkle_tree/filled_tree.rs | 0 .../filled_tree/errors.rs | 0 .../patricia_merkle_tree/filled_tree/node.rs | 0 .../filled_tree/node_serde.rs | 0 .../patricia_merkle_tree/filled_tree/tree.rs | 0 .../filled_tree/tree_test.rs | 0 .../internal_test_utils.rs | 0 .../src/patricia_merkle_tree/node_data.rs | 0 .../patricia_merkle_tree/node_data/errors.rs | 0 .../node_data/inner_node.rs | 0 .../node_data/inner_node_tests.rs | 0 .../patricia_merkle_tree/node_data/leaf.rs | 0 .../original_skeleton_tree.rs | 0 .../original_skeleton_tree/config.rs | 0 .../original_skeleton_tree/create_tree.rs | 0 .../create_tree_test.rs | 0 .../original_skeleton_tree/errors.rs | 0 .../original_skeleton_tree/node.rs | 0 .../original_skeleton_tree/tree.rs | 0 .../original_skeleton_tree/utils.rs | 0 .../original_skeleton_tree/utils_test.rs | 0 .../src/patricia_merkle_tree/types.rs | 0 .../src/patricia_merkle_tree/types_test.rs | 0 .../updated_skeleton_tree.rs | 0 .../create_tree_helper.rs | 0 .../create_tree_helper_test.rs | 0 .../updated_skeleton_tree/errors.rs | 0 .../updated_skeleton_tree/hash_function.rs | 0 .../updated_skeleton_tree/node.rs | 0 .../updated_skeleton_tree/tree.rs | 0 .../updated_skeleton_tree/tree_test.rs | 0 .../src/storage.rs | 0 .../src/storage/db_object.rs | 0 .../src/storage/errors.rs | 0 .../src/storage/map_storage.rs | 0 .../src/storage/storage_trait.rs | 0 74 files changed, 154 insertions(+), 151 deletions(-) rename crates/{committer => starknet_patricia}/Cargo.toml (97%) rename crates/{committer => starknet_patricia}/src/felt.rs (100%) rename crates/{committer => starknet_patricia}/src/hash.rs (100%) rename crates/{committer => starknet_patricia}/src/hash/hash_trait.rs (100%) rename crates/{committer => starknet_patricia}/src/lib.rs (100%) rename crates/{committer => starknet_patricia}/src/patricia_merkle_tree.rs (100%) rename crates/{committer => starknet_patricia}/src/patricia_merkle_tree/errors.rs (100%) rename crates/{committer => starknet_patricia}/src/patricia_merkle_tree/external_test_utils.rs (100%) rename crates/{committer => starknet_patricia}/src/patricia_merkle_tree/filled_tree.rs (100%) rename crates/{committer => starknet_patricia}/src/patricia_merkle_tree/filled_tree/errors.rs (100%) rename crates/{committer => starknet_patricia}/src/patricia_merkle_tree/filled_tree/node.rs (100%) rename crates/{committer => starknet_patricia}/src/patricia_merkle_tree/filled_tree/node_serde.rs (100%) rename crates/{committer => starknet_patricia}/src/patricia_merkle_tree/filled_tree/tree.rs (100%) rename crates/{committer => starknet_patricia}/src/patricia_merkle_tree/filled_tree/tree_test.rs (100%) rename crates/{committer => starknet_patricia}/src/patricia_merkle_tree/internal_test_utils.rs (100%) rename crates/{committer => starknet_patricia}/src/patricia_merkle_tree/node_data.rs (100%) rename crates/{committer => starknet_patricia}/src/patricia_merkle_tree/node_data/errors.rs (100%) rename crates/{committer => starknet_patricia}/src/patricia_merkle_tree/node_data/inner_node.rs (100%) rename crates/{committer => starknet_patricia}/src/patricia_merkle_tree/node_data/inner_node_tests.rs (100%) rename crates/{committer => starknet_patricia}/src/patricia_merkle_tree/node_data/leaf.rs (100%) rename crates/{committer => starknet_patricia}/src/patricia_merkle_tree/original_skeleton_tree.rs (100%) rename crates/{committer => starknet_patricia}/src/patricia_merkle_tree/original_skeleton_tree/config.rs (100%) rename crates/{committer => starknet_patricia}/src/patricia_merkle_tree/original_skeleton_tree/create_tree.rs (100%) rename crates/{committer => starknet_patricia}/src/patricia_merkle_tree/original_skeleton_tree/create_tree_test.rs (100%) rename crates/{committer => starknet_patricia}/src/patricia_merkle_tree/original_skeleton_tree/errors.rs (100%) rename crates/{committer => starknet_patricia}/src/patricia_merkle_tree/original_skeleton_tree/node.rs (100%) rename crates/{committer => starknet_patricia}/src/patricia_merkle_tree/original_skeleton_tree/tree.rs (100%) rename crates/{committer => starknet_patricia}/src/patricia_merkle_tree/original_skeleton_tree/utils.rs (100%) rename crates/{committer => starknet_patricia}/src/patricia_merkle_tree/original_skeleton_tree/utils_test.rs (100%) rename crates/{committer => starknet_patricia}/src/patricia_merkle_tree/types.rs (100%) rename crates/{committer => starknet_patricia}/src/patricia_merkle_tree/types_test.rs (100%) rename crates/{committer => starknet_patricia}/src/patricia_merkle_tree/updated_skeleton_tree.rs (100%) rename crates/{committer => starknet_patricia}/src/patricia_merkle_tree/updated_skeleton_tree/create_tree_helper.rs (100%) rename crates/{committer => starknet_patricia}/src/patricia_merkle_tree/updated_skeleton_tree/create_tree_helper_test.rs (100%) rename crates/{committer => starknet_patricia}/src/patricia_merkle_tree/updated_skeleton_tree/errors.rs (100%) rename crates/{committer => starknet_patricia}/src/patricia_merkle_tree/updated_skeleton_tree/hash_function.rs (100%) rename crates/{committer => starknet_patricia}/src/patricia_merkle_tree/updated_skeleton_tree/node.rs (100%) rename crates/{committer => starknet_patricia}/src/patricia_merkle_tree/updated_skeleton_tree/tree.rs (100%) rename crates/{committer => starknet_patricia}/src/patricia_merkle_tree/updated_skeleton_tree/tree_test.rs (100%) rename crates/{committer => starknet_patricia}/src/storage.rs (100%) rename crates/{committer => starknet_patricia}/src/storage/db_object.rs (100%) rename crates/{committer => starknet_patricia}/src/storage/errors.rs (100%) rename crates/{committer => starknet_patricia}/src/storage/map_storage.rs (100%) rename crates/{committer => starknet_patricia}/src/storage/storage_trait.rs (100%) diff --git a/.github/workflows/committer_ci.yml b/.github/workflows/committer_ci.yml index 80c57e2250..be0f13ef3f 100644 --- a/.github/workflows/committer_ci.yml +++ b/.github/workflows/committer_ci.yml @@ -11,9 +11,9 @@ on: - '.github/workflows/committer_ci.yml' - 'Cargo.toml' - 'Cargo.lock' - - 'crates/committer/**' - 'crates/committer_cli/**' - 'crates/starknet_committer/**' + - 'crates/starknet_patricia/**' pull_request: types: @@ -26,9 +26,9 @@ on: - '.github/workflows/committer_ci.yml' - 'Cargo.toml' - 'Cargo.lock' - - 'crates/committer/**' - 'crates/committer_cli/**' - 'crates/starknet_committer/**' + - 'crates/starknet_patricia/**' jobs: run-regression-tests: diff --git a/Cargo.lock b/Cargo.lock index 1272dd9e5f..8612a80f4f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1944,33 +1944,11 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "committer" -version = "0.1.0-rc.0" -dependencies = [ - "async-recursion", - "derive_more", - "ethnum", - "hex", - "pretty_assertions", - "rand 0.8.5", - "rstest", - "serde", - "serde_json", - "starknet-types-core", - "strum 0.25.0", - "strum_macros 0.25.3", - "thiserror", - "tokio", - "tracing", -] - [[package]] name = "committer_cli" version = "0.1.0-rc.0" dependencies = [ "clap", - "committer", "criterion", "derive_more", "ethnum", @@ -1985,6 +1963,7 @@ dependencies = [ "starknet-types-core", "starknet_api", "starknet_committer", + "starknet_patricia", "strum 0.25.0", "strum_macros 0.25.3", "tempfile", @@ -8832,12 +8811,12 @@ dependencies = [ name = "starknet_committer" version = "0.1.0-rc.0" dependencies = [ - "committer", "hex", "pretty_assertions", "rstest", "serde_json", "starknet-types-core", + "starknet_patricia", "thiserror", "tokio", "tracing", @@ -8978,6 +8957,27 @@ dependencies = [ "thiserror", ] +[[package]] +name = "starknet_patricia" +version = "0.1.0-rc.0" +dependencies = [ + "async-recursion", + "derive_more", + "ethnum", + "hex", + "pretty_assertions", + "rand 0.8.5", + "rstest", + "serde", + "serde_json", + "starknet-types-core", + "strum 0.25.0", + "strum_macros 0.25.3", + "thiserror", + "tokio", + "tracing", +] + [[package]] name = "starknet_sierra_compile" version = "0.0.0" diff --git a/Cargo.toml b/Cargo.toml index 467a06da27..c8952aca71 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,7 +5,6 @@ resolver = "2" members = [ "crates/blockifier", - "crates/committer", "crates/committer_cli", "crates/gateway", "crates/mempool", @@ -34,6 +33,7 @@ members = [ "crates/starknet_api", "crates/starknet_client", "crates/starknet_committer", + "crates/starknet_patricia", "crates/starknet_sierra_compile", "crates/task_executor", "crates/tests-integration", @@ -79,7 +79,6 @@ camelpaste = "0.1.0" chrono = "0.4.26" clap = "4.5.4" colored = "2.1.0" -committer = { path = "crates/committer", version = "0.1.0-rc.0" } const_format = "0.2.30" criterion = "0.5.1" deadqueue = "0.2.4" @@ -169,11 +168,13 @@ 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.0" } 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" } static_assertions = "1.1.0" diff --git a/commitlint.config.js b/commitlint.config.js index 859901f361..befddee293 100644 --- a/commitlint.config.js +++ b/commitlint.config.js @@ -24,6 +24,7 @@ const Configuration = { 'block_hash', 'blockifier', 'ci', + 'committer', 'common', 'concurrency', 'config', diff --git a/crates/committer_cli/Cargo.toml b/crates/committer_cli/Cargo.toml index 0a6b8e8292..721ecbd738 100644 --- a/crates/committer_cli/Cargo.toml +++ b/crates/committer_cli/Cargo.toml @@ -1,4 +1,5 @@ [package] +# TODO(Dori, 15/8/2024): Rename to starknet_committer_cli. name = "committer_cli" version = "0.1.0-rc.0" edition.workspace = true @@ -17,7 +18,6 @@ tempfile.workspace = true [dependencies] clap = { workspace = true, features = ["cargo", "derive"] } -committer = { workspace = true, features = ["testing"] } derive_more.workspace = true ethnum.workspace = true indexmap.workspace = true @@ -28,7 +28,8 @@ serde_json.workspace = true serde_repr.workspace = true starknet-types-core.workspace = true starknet_api.workspace = true -starknet_committer = { path = "../starknet_committer" } +starknet_committer.workspace = true +starknet_patricia = { workspace = true, features = ["testing"] } strum.workspace = true strum_macros.workspace = true thiserror.workspace = true diff --git a/crates/committer_cli/benches/committer_bench.rs b/crates/committer_cli/benches/committer_bench.rs index 07bb7096b2..c5ab5fc68c 100644 --- a/crates/committer_cli/benches/committer_bench.rs +++ b/crates/committer_cli/benches/committer_bench.rs @@ -10,9 +10,6 @@ use std::collections::HashMap; use std::sync::Arc; -use committer::patricia_merkle_tree::external_test_utils::tree_computation_flow; -use committer::patricia_merkle_tree::node_data::leaf::LeafModifications; -use committer::patricia_merkle_tree::types::NodeIndex; use committer_cli::commands::commit; use committer_cli::parse_input::read::parse_input; use committer_cli::tests::utils::parse_from_python::TreeFlowInput; @@ -20,6 +17,9 @@ use criterion::{criterion_group, criterion_main, Criterion}; use starknet_committer::block_committer::input::StarknetStorageValue; use starknet_committer::hash_function::hash::TreeHashFunctionImpl; use starknet_committer::patricia_merkle_tree::tree::OriginalSkeletonStorageTrieConfig; +use starknet_patricia::patricia_merkle_tree::external_test_utils::tree_computation_flow; +use starknet_patricia::patricia_merkle_tree::node_data::leaf::LeafModifications; +use starknet_patricia::patricia_merkle_tree::types::NodeIndex; const CONCURRENCY_MODE: bool = true; const SINGLE_TREE_FLOW_INPUT: &str = include_str!("../test_inputs/tree_flow_inputs.json"); diff --git a/crates/committer_cli/src/filled_tree_output/filled_forest.rs b/crates/committer_cli/src/filled_tree_output/filled_forest.rs index e61107f817..710f5202fc 100644 --- a/crates/committer_cli/src/filled_tree_output/filled_forest.rs +++ b/crates/committer_cli/src/filled_tree_output/filled_forest.rs @@ -1,6 +1,6 @@ -use committer::storage::map_storage::MapStorage; use serde::Serialize; use starknet_committer::forest::filled_forest::FilledForest; +use starknet_patricia::storage::map_storage::MapStorage; pub struct SerializedForest(pub FilledForest); diff --git a/crates/committer_cli/src/parse_input/cast.rs b/crates/committer_cli/src/parse_input/cast.rs index c9c1cc3319..155cd9db3c 100644 --- a/crates/committer_cli/src/parse_input/cast.rs +++ b/crates/committer_cli/src/parse_input/cast.rs @@ -1,9 +1,5 @@ use std::collections::HashMap; -use committer::felt::Felt; -use committer::hash::hash_trait::HashOutput; -use committer::storage::errors::DeserializationError; -use committer::storage::storage_trait::{StorageKey, StorageValue}; use starknet_committer::block_committer::input::{ ConfigImpl, ContractAddress, @@ -13,6 +9,10 @@ use starknet_committer::block_committer::input::{ StateDiff, }; use starknet_committer::patricia_merkle_tree::types::{ClassHash, CompiledClassHash, Nonce}; +use starknet_patricia::felt::Felt; +use starknet_patricia::hash::hash_trait::HashOutput; +use starknet_patricia::storage::errors::DeserializationError; +use starknet_patricia::storage::storage_trait::{StorageKey, StorageValue}; use crate::parse_input::raw_input::RawInput; diff --git a/crates/committer_cli/src/parse_input/read.rs b/crates/committer_cli/src/parse_input/read.rs index 4f7ddf1f67..dba859ba24 100644 --- a/crates/committer_cli/src/parse_input/read.rs +++ b/crates/committer_cli/src/parse_input/read.rs @@ -1,8 +1,8 @@ use std::fs::File; use std::io::{self, BufWriter}; -use committer::storage::errors::DeserializationError; use serde::{Deserialize, Serialize}; +use starknet_patricia::storage::errors::DeserializationError; use crate::parse_input::cast::InputImpl; use crate::parse_input::raw_input::RawInput; diff --git a/crates/committer_cli/src/parse_input/read_test.rs b/crates/committer_cli/src/parse_input/read_test.rs index 0d9876d7e6..781d17d43f 100644 --- a/crates/committer_cli/src/parse_input/read_test.rs +++ b/crates/committer_cli/src/parse_input/read_test.rs @@ -1,9 +1,5 @@ use std::collections::HashMap; -use committer::felt::Felt; -use committer::hash::hash_trait::HashOutput; -use committer::storage::errors::DeserializationError; -use committer::storage::storage_trait::{StorageKey, StorageValue}; use pretty_assertions::assert_eq; use starknet_committer::block_committer::input::{ ConfigImpl, @@ -14,6 +10,10 @@ use starknet_committer::block_committer::input::{ StateDiff, }; use starknet_committer::patricia_merkle_tree::types::{ClassHash, CompiledClassHash, Nonce}; +use starknet_patricia::felt::Felt; +use starknet_patricia::hash::hash_trait::HashOutput; +use starknet_patricia::storage::errors::DeserializationError; +use starknet_patricia::storage::storage_trait::{StorageKey, StorageValue}; use tracing::level_filters::LevelFilter; use super::parse_input; diff --git a/crates/committer_cli/src/tests/python_tests.rs b/crates/committer_cli/src/tests/python_tests.rs index dfe8363a5e..c43768a845 100644 --- a/crates/committer_cli/src/tests/python_tests.rs +++ b/crates/committer_cli/src/tests/python_tests.rs @@ -2,22 +2,6 @@ use std::collections::HashMap; use std::fmt::Debug; use std::io; -use committer::felt::Felt; -use committer::hash::hash_trait::HashOutput; -use committer::patricia_merkle_tree::external_test_utils::single_tree_flow_test; -use committer::patricia_merkle_tree::filled_tree::node::FilledNode; -use committer::patricia_merkle_tree::node_data::inner_node::{ - BinaryData, - EdgeData, - EdgePathLength, - NodeData, - PathToBottom, -}; -use committer::patricia_merkle_tree::types::SubTreeHeight; -use committer::storage::db_object::DBObject; -use committer::storage::errors::{DeserializationError, SerializationError}; -use committer::storage::map_storage::MapStorage; -use committer::storage::storage_trait::{Storage, StorageKey, StorageValue}; use ethnum::U256; use serde_json::json; use starknet_api::block_hash::block_hash_calculator::{ @@ -37,6 +21,22 @@ use starknet_committer::hash_function::hash::TreeHashFunctionImpl; use starknet_committer::patricia_merkle_tree::leaf::leaf_impl::ContractState; use starknet_committer::patricia_merkle_tree::tree::OriginalSkeletonStorageTrieConfig; use starknet_committer::patricia_merkle_tree::types::{ClassHash, CompiledClassHash, Nonce}; +use starknet_patricia::felt::Felt; +use starknet_patricia::hash::hash_trait::HashOutput; +use starknet_patricia::patricia_merkle_tree::external_test_utils::single_tree_flow_test; +use starknet_patricia::patricia_merkle_tree::filled_tree::node::FilledNode; +use starknet_patricia::patricia_merkle_tree::node_data::inner_node::{ + BinaryData, + EdgeData, + EdgePathLength, + NodeData, + PathToBottom, +}; +use starknet_patricia::patricia_merkle_tree::types::SubTreeHeight; +use starknet_patricia::storage::db_object::DBObject; +use starknet_patricia::storage::errors::{DeserializationError, SerializationError}; +use starknet_patricia::storage::map_storage::MapStorage; +use starknet_patricia::storage::storage_trait::{Storage, StorageKey, StorageValue}; use starknet_types_core::hash::{Pedersen, StarkHash}; use thiserror; use tracing::{debug, error, info, warn}; diff --git a/crates/committer_cli/src/tests/regression_tests.rs b/crates/committer_cli/src/tests/regression_tests.rs index f737ee7bfb..4b750554f1 100644 --- a/crates/committer_cli/src/tests/regression_tests.rs +++ b/crates/committer_cli/src/tests/regression_tests.rs @@ -2,12 +2,12 @@ use std::collections::HashMap; use std::fs; use clap::Error; -use committer::patricia_merkle_tree::external_test_utils::single_tree_flow_test; use serde::{Deserialize, Deserializer}; use serde_json::{Map, Value}; use starknet_committer::block_committer::input::{ConfigImpl, Input, StarknetStorageValue}; use starknet_committer::hash_function::hash::TreeHashFunctionImpl; use starknet_committer::patricia_merkle_tree::tree::OriginalSkeletonStorageTrieConfig; +use starknet_patricia::patricia_merkle_tree::external_test_utils::single_tree_flow_test; use tempfile::NamedTempFile; use super::utils::parse_from_python::parse_input_single_storage_tree_flow_test; diff --git a/crates/committer_cli/src/tests/utils/parse_from_python.rs b/crates/committer_cli/src/tests/utils/parse_from_python.rs index 43678ddbdd..833f732ed1 100644 --- a/crates/committer_cli/src/tests/utils/parse_from_python.rs +++ b/crates/committer_cli/src/tests/utils/parse_from_python.rs @@ -1,14 +1,14 @@ use std::collections::HashMap; -use committer::felt::Felt; -use committer::hash::hash_trait::HashOutput; -use committer::patricia_merkle_tree::node_data::leaf::LeafModifications; -use committer::patricia_merkle_tree::types::NodeIndex; -use committer::storage::map_storage::MapStorage; -use committer::storage::storage_trait::{StorageKey, StorageValue}; use ethnum::U256; use serde::{Deserialize, Deserializer}; use starknet_committer::block_committer::input::StarknetStorageValue; +use starknet_patricia::felt::Felt; +use starknet_patricia::hash::hash_trait::HashOutput; +use starknet_patricia::patricia_merkle_tree::node_data::leaf::LeafModifications; +use starknet_patricia::patricia_merkle_tree::types::NodeIndex; +use starknet_patricia::storage::map_storage::MapStorage; +use starknet_patricia::storage::storage_trait::{StorageKey, StorageValue}; use crate::parse_input::cast::add_unique; use crate::parse_input::raw_input::RawStorageEntry; diff --git a/crates/committer_cli/src/tests/utils/random_structs.rs b/crates/committer_cli/src/tests/utils/random_structs.rs index fe04930277..5f175acb93 100644 --- a/crates/committer_cli/src/tests/utils/random_structs.rs +++ b/crates/committer_cli/src/tests/utils/random_structs.rs @@ -1,20 +1,6 @@ use std::cmp::min; use std::collections::HashMap; -use committer::felt::Felt; -use committer::hash::hash_trait::HashOutput; -use committer::patricia_merkle_tree::external_test_utils::get_random_u256; -use committer::patricia_merkle_tree::filled_tree::node::FilledNode; -use committer::patricia_merkle_tree::node_data::inner_node::{ - BinaryData, - EdgeData, - EdgePath, - EdgePathLength, - NodeData, - NodeDataDiscriminants as NodeDataVariants, - PathToBottom, -}; -use committer::patricia_merkle_tree::types::NodeIndex; use ethnum::U256; use rand::prelude::IteratorRandom; use rand::Rng; @@ -32,6 +18,20 @@ use starknet_committer::patricia_merkle_tree::types::{ StorageTrie, StorageTrieMap, }; +use starknet_patricia::felt::Felt; +use starknet_patricia::hash::hash_trait::HashOutput; +use starknet_patricia::patricia_merkle_tree::external_test_utils::get_random_u256; +use starknet_patricia::patricia_merkle_tree::filled_tree::node::FilledNode; +use starknet_patricia::patricia_merkle_tree::node_data::inner_node::{ + BinaryData, + EdgeData, + EdgePath, + EdgePathLength, + NodeData, + NodeDataDiscriminants as NodeDataVariants, + PathToBottom, +}; +use starknet_patricia::patricia_merkle_tree::types::NodeIndex; use strum::IntoEnumIterator; pub trait RandomValue { diff --git a/crates/starknet_committer/Cargo.toml b/crates/starknet_committer/Cargo.toml index 5b0bca0fb8..8040a796c6 100644 --- a/crates/starknet_committer/Cargo.toml +++ b/crates/starknet_committer/Cargo.toml @@ -9,12 +9,12 @@ description = "Computes and manages Starknet state." [dependencies] -committer = { path = "../committer", features = ["testing"] } hex.workspace = true pretty_assertions.workspace = true rstest.workspace = true serde_json.workspace = true starknet-types-core.workspace = true +starknet_patricia = { workspace = true, features = ["testing"] } thiserror.workspace = true tokio.workspace = true tracing.workspace = true diff --git a/crates/starknet_committer/src/block_committer/commit.rs b/crates/starknet_committer/src/block_committer/commit.rs index 36ba909cd1..911dd93288 100644 --- a/crates/starknet_committer/src/block_committer/commit.rs +++ b/crates/starknet_committer/src/block_committer/commit.rs @@ -1,7 +1,7 @@ use std::collections::HashMap; -use committer::patricia_merkle_tree::types::{NodeIndex, SortedLeafIndices}; -use committer::storage::map_storage::MapStorage; +use starknet_patricia::patricia_merkle_tree::types::{NodeIndex, SortedLeafIndices}; +use starknet_patricia::storage::map_storage::MapStorage; use tracing::{info, warn}; use crate::block_committer::errors::BlockCommitmentError; diff --git a/crates/starknet_committer/src/block_committer/input.rs b/crates/starknet_committer/src/block_committer/input.rs index 61c1bbc99d..74830e7806 100644 --- a/crates/starknet_committer/src/block_committer/input.rs +++ b/crates/starknet_committer/src/block_committer/input.rs @@ -1,11 +1,11 @@ use std::collections::{HashMap, HashSet}; use std::fmt::Debug; -use committer::felt::Felt; -use committer::hash::hash_trait::HashOutput; -use committer::patricia_merkle_tree::node_data::leaf::{LeafModifications, SkeletonLeaf}; -use committer::patricia_merkle_tree::types::NodeIndex; -use committer::storage::storage_trait::{StorageKey, StorageValue}; +use starknet_patricia::felt::Felt; +use starknet_patricia::hash::hash_trait::HashOutput; +use starknet_patricia::patricia_merkle_tree::node_data::leaf::{LeafModifications, SkeletonLeaf}; +use starknet_patricia::patricia_merkle_tree::types::NodeIndex; +use starknet_patricia::storage::storage_trait::{StorageKey, StorageValue}; use tracing::level_filters::LevelFilter; use crate::patricia_merkle_tree::types::{ClassHash, CompiledClassHash, Nonce}; diff --git a/crates/starknet_committer/src/forest/filled_forest.rs b/crates/starknet_committer/src/forest/filled_forest.rs index 2f472560b2..2d369b9523 100644 --- a/crates/starknet_committer/src/forest/filled_forest.rs +++ b/crates/starknet_committer/src/forest/filled_forest.rs @@ -1,12 +1,12 @@ use std::collections::HashMap; use std::sync::Arc; -use committer::hash::hash_trait::HashOutput; -use committer::patricia_merkle_tree::filled_tree::tree::FilledTree; -use committer::patricia_merkle_tree::node_data::leaf::LeafModifications; -use committer::patricia_merkle_tree::types::NodeIndex; -use committer::patricia_merkle_tree::updated_skeleton_tree::tree::UpdatedSkeletonTreeImpl; -use committer::storage::storage_trait::Storage; +use starknet_patricia::hash::hash_trait::HashOutput; +use starknet_patricia::patricia_merkle_tree::filled_tree::tree::FilledTree; +use starknet_patricia::patricia_merkle_tree::node_data::leaf::LeafModifications; +use starknet_patricia::patricia_merkle_tree::types::NodeIndex; +use starknet_patricia::patricia_merkle_tree::updated_skeleton_tree::tree::UpdatedSkeletonTreeImpl; +use starknet_patricia::storage::storage_trait::Storage; use tokio::task::JoinSet; use crate::block_committer::input::{ContractAddress, StarknetStorageValue}; diff --git a/crates/starknet_committer/src/forest/forest_errors.rs b/crates/starknet_committer/src/forest/forest_errors.rs index a34b12511b..c3bda42de2 100644 --- a/crates/starknet_committer/src/forest/forest_errors.rs +++ b/crates/starknet_committer/src/forest/forest_errors.rs @@ -1,5 +1,5 @@ -use committer::patricia_merkle_tree::original_skeleton_tree::errors::OriginalSkeletonTreeError; -use committer::patricia_merkle_tree::updated_skeleton_tree::errors::UpdatedSkeletonTreeError; +use starknet_patricia::patricia_merkle_tree::original_skeleton_tree::errors::OriginalSkeletonTreeError; +use starknet_patricia::patricia_merkle_tree::updated_skeleton_tree::errors::UpdatedSkeletonTreeError; use thiserror::Error; use tokio::task::JoinError; diff --git a/crates/starknet_committer/src/forest/original_skeleton_forest.rs b/crates/starknet_committer/src/forest/original_skeleton_forest.rs index 6ae89fdefd..76e124e4a7 100644 --- a/crates/starknet_committer/src/forest/original_skeleton_forest.rs +++ b/crates/starknet_committer/src/forest/original_skeleton_forest.rs @@ -1,13 +1,13 @@ use std::collections::HashMap; -use committer::hash::hash_trait::HashOutput; -use committer::patricia_merkle_tree::node_data::leaf::LeafModifications; -use committer::patricia_merkle_tree::original_skeleton_tree::tree::{ +use starknet_patricia::hash::hash_trait::HashOutput; +use starknet_patricia::patricia_merkle_tree::node_data::leaf::LeafModifications; +use starknet_patricia::patricia_merkle_tree::original_skeleton_tree::tree::{ OriginalSkeletonTree, OriginalSkeletonTreeImpl, }; -use committer::patricia_merkle_tree::types::{NodeIndex, SortedLeafIndices}; -use committer::storage::storage_trait::Storage; +use starknet_patricia::patricia_merkle_tree::types::{NodeIndex, SortedLeafIndices}; +use starknet_patricia::storage::storage_trait::Storage; use crate::block_committer::input::{Config, ContractAddress, StarknetStorageValue}; use crate::forest::forest_errors::{ForestError, ForestResult}; diff --git a/crates/starknet_committer/src/forest/skeleton_forest_test.rs b/crates/starknet_committer/src/forest/skeleton_forest_test.rs index cda9d04d1f..f6c2fefa7b 100644 --- a/crates/starknet_committer/src/forest/skeleton_forest_test.rs +++ b/crates/starknet_committer/src/forest/skeleton_forest_test.rs @@ -1,8 +1,10 @@ use std::collections::HashMap; -use committer::felt::Felt; -use committer::hash::hash_trait::HashOutput; -use committer::patricia_merkle_tree::external_test_utils::{ +use pretty_assertions::assert_eq; +use rstest::rstest; +use starknet_patricia::felt::Felt; +use starknet_patricia::hash::hash_trait::HashOutput; +use starknet_patricia::patricia_merkle_tree::external_test_utils::{ create_32_bytes_entry, create_binary_entry, create_binary_skeleton_node, @@ -12,13 +14,11 @@ use committer::patricia_merkle_tree::external_test_utils::{ create_root_edge_entry, create_unmodified_subtree_skeleton_node, }; -use committer::patricia_merkle_tree::original_skeleton_tree::tree::OriginalSkeletonTreeImpl; -use committer::patricia_merkle_tree::types::{NodeIndex, SortedLeafIndices, SubTreeHeight}; -use committer::storage::db_object::DBObject; -use committer::storage::map_storage::MapStorage; -use committer::storage::storage_trait::{StorageKey, StorageValue}; -use pretty_assertions::assert_eq; -use rstest::rstest; +use starknet_patricia::patricia_merkle_tree::original_skeleton_tree::tree::OriginalSkeletonTreeImpl; +use starknet_patricia::patricia_merkle_tree::types::{NodeIndex, SortedLeafIndices, SubTreeHeight}; +use starknet_patricia::storage::db_object::DBObject; +use starknet_patricia::storage::map_storage::MapStorage; +use starknet_patricia::storage::storage_trait::{StorageKey, StorageValue}; use tracing::level_filters::LevelFilter; use crate::block_committer::commit::get_all_modified_indices; diff --git a/crates/starknet_committer/src/forest/updated_skeleton_forest.rs b/crates/starknet_committer/src/forest/updated_skeleton_forest.rs index c41e44f3c7..44bff0a86d 100644 --- a/crates/starknet_committer/src/forest/updated_skeleton_forest.rs +++ b/crates/starknet_committer/src/forest/updated_skeleton_forest.rs @@ -1,9 +1,9 @@ use std::collections::HashMap; -use committer::felt::Felt; -use committer::patricia_merkle_tree::node_data::leaf::{LeafModifications, SkeletonLeaf}; -use committer::patricia_merkle_tree::types::NodeIndex; -use committer::patricia_merkle_tree::updated_skeleton_tree::tree::{ +use starknet_patricia::felt::Felt; +use starknet_patricia::patricia_merkle_tree::node_data::leaf::{LeafModifications, SkeletonLeaf}; +use starknet_patricia::patricia_merkle_tree::types::NodeIndex; +use starknet_patricia::patricia_merkle_tree::updated_skeleton_tree::tree::{ UpdatedSkeletonTree, UpdatedSkeletonTreeImpl, }; diff --git a/crates/starknet_committer/src/hash_function/hash.rs b/crates/starknet_committer/src/hash_function/hash.rs index 953c5e4579..19223f7ce1 100644 --- a/crates/starknet_committer/src/hash_function/hash.rs +++ b/crates/starknet_committer/src/hash_function/hash.rs @@ -1,7 +1,7 @@ -use committer::felt::Felt; -use committer::hash::hash_trait::HashOutput; -use committer::patricia_merkle_tree::node_data::inner_node::NodeData; -use committer::patricia_merkle_tree::updated_skeleton_tree::hash_function::{ +use starknet_patricia::felt::Felt; +use starknet_patricia::hash::hash_trait::HashOutput; +use starknet_patricia::patricia_merkle_tree::node_data::inner_node::NodeData; +use starknet_patricia::patricia_merkle_tree::updated_skeleton_tree::hash_function::{ HashFunction, TreeHashFunction, }; diff --git a/crates/starknet_committer/src/hash_function/hash_test.rs b/crates/starknet_committer/src/hash_function/hash_test.rs index 5fdb2ef741..8e3c7c5b0a 100644 --- a/crates/starknet_committer/src/hash_function/hash_test.rs +++ b/crates/starknet_committer/src/hash_function/hash_test.rs @@ -1,15 +1,15 @@ -use committer::felt::Felt; -use committer::hash::hash_trait::HashOutput; -use committer::patricia_merkle_tree::node_data::inner_node::{ +use hex; +use rstest::rstest; +use starknet_patricia::felt::Felt; +use starknet_patricia::hash::hash_trait::HashOutput; +use starknet_patricia::patricia_merkle_tree::node_data::inner_node::{ BinaryData, EdgeData, EdgePathLength, NodeData, PathToBottom, }; -use committer::patricia_merkle_tree::updated_skeleton_tree::hash_function::TreeHashFunction; -use hex; -use rstest::rstest; +use starknet_patricia::patricia_merkle_tree::updated_skeleton_tree::hash_function::TreeHashFunction; use starknet_types_core::hash::Pedersen; use crate::block_committer::input::StarknetStorageValue; diff --git a/crates/starknet_committer/src/patricia_merkle_tree/leaf/leaf_impl.rs b/crates/starknet_committer/src/patricia_merkle_tree/leaf/leaf_impl.rs index f428d20544..ee69c5fdcb 100644 --- a/crates/starknet_committer/src/patricia_merkle_tree/leaf/leaf_impl.rs +++ b/crates/starknet_committer/src/patricia_merkle_tree/leaf/leaf_impl.rs @@ -1,10 +1,10 @@ use std::sync::Arc; -use committer::felt::Felt; -use committer::hash::hash_trait::HashOutput; -use committer::patricia_merkle_tree::node_data::errors::LeafResult; -use committer::patricia_merkle_tree::node_data::leaf::{Leaf, LeafModifications}; -use committer::patricia_merkle_tree::types::NodeIndex; +use starknet_patricia::felt::Felt; +use starknet_patricia::hash::hash_trait::HashOutput; +use starknet_patricia::patricia_merkle_tree::node_data::errors::LeafResult; +use starknet_patricia::patricia_merkle_tree::node_data::leaf::{Leaf, LeafModifications}; +use starknet_patricia::patricia_merkle_tree::types::NodeIndex; use crate::block_committer::input::StarknetStorageValue; use crate::patricia_merkle_tree::types::{ClassHash, CompiledClassHash, Nonce}; diff --git a/crates/starknet_committer/src/patricia_merkle_tree/leaf/leaf_serde.rs b/crates/starknet_committer/src/patricia_merkle_tree/leaf/leaf_serde.rs index 9f7a711872..f366ce54df 100644 --- a/crates/starknet_committer/src/patricia_merkle_tree/leaf/leaf_serde.rs +++ b/crates/starknet_committer/src/patricia_merkle_tree/leaf/leaf_serde.rs @@ -1,12 +1,12 @@ use std::collections::HashMap; -use committer::felt::Felt; -use committer::hash::hash_trait::HashOutput; -use committer::patricia_merkle_tree::types::SubTreeHeight; -use committer::storage::db_object::{DBObject, Deserializable}; -use committer::storage::errors::DeserializationError; -use committer::storage::storage_trait::{StarknetPrefix, StorageValue}; use serde_json::Value; +use starknet_patricia::felt::Felt; +use starknet_patricia::hash::hash_trait::HashOutput; +use starknet_patricia::patricia_merkle_tree::types::SubTreeHeight; +use starknet_patricia::storage::db_object::{DBObject, Deserializable}; +use starknet_patricia::storage::errors::DeserializationError; +use starknet_patricia::storage::storage_trait::{StarknetPrefix, StorageValue}; use crate::block_committer::input::StarknetStorageValue; use crate::patricia_merkle_tree::leaf::leaf_impl::ContractState; diff --git a/crates/starknet_committer/src/patricia_merkle_tree/leaf/leaf_serde_test.rs b/crates/starknet_committer/src/patricia_merkle_tree/leaf/leaf_serde_test.rs index 491c691dbc..b388e7b600 100644 --- a/crates/starknet_committer/src/patricia_merkle_tree/leaf/leaf_serde_test.rs +++ b/crates/starknet_committer/src/patricia_merkle_tree/leaf/leaf_serde_test.rs @@ -1,9 +1,9 @@ use std::fmt::Debug; -use committer::felt::Felt; -use committer::hash::hash_trait::HashOutput; -use committer::patricia_merkle_tree::node_data::leaf::Leaf; use rstest::rstest; +use starknet_patricia::felt::Felt; +use starknet_patricia::hash::hash_trait::HashOutput; +use starknet_patricia::patricia_merkle_tree::node_data::leaf::Leaf; use crate::block_committer::input::StarknetStorageValue; use crate::patricia_merkle_tree::leaf::leaf_impl::ContractState; diff --git a/crates/starknet_committer/src/patricia_merkle_tree/tree.rs b/crates/starknet_committer/src/patricia_merkle_tree/tree.rs index ce45569f53..93d589684c 100644 --- a/crates/starknet_committer/src/patricia_merkle_tree/tree.rs +++ b/crates/starknet_committer/src/patricia_merkle_tree/tree.rs @@ -1,8 +1,8 @@ -use committer::generate_trie_config; -use committer::patricia_merkle_tree::original_skeleton_tree::config::OriginalSkeletonTreeConfig; -use committer::patricia_merkle_tree::original_skeleton_tree::errors::OriginalSkeletonTreeError; -use committer::patricia_merkle_tree::original_skeleton_tree::tree::OriginalSkeletonTreeResult; -use committer::patricia_merkle_tree::types::NodeIndex; +use starknet_patricia::generate_trie_config; +use starknet_patricia::patricia_merkle_tree::original_skeleton_tree::config::OriginalSkeletonTreeConfig; +use starknet_patricia::patricia_merkle_tree::original_skeleton_tree::errors::OriginalSkeletonTreeError; +use starknet_patricia::patricia_merkle_tree::original_skeleton_tree::tree::OriginalSkeletonTreeResult; +use starknet_patricia::patricia_merkle_tree::types::NodeIndex; use crate::block_committer::input::StarknetStorageValue; use crate::patricia_merkle_tree::leaf::leaf_impl::ContractState; diff --git a/crates/starknet_committer/src/patricia_merkle_tree/types.rs b/crates/starknet_committer/src/patricia_merkle_tree/types.rs index 0b0a1c0c7f..da42107d4f 100644 --- a/crates/starknet_committer/src/patricia_merkle_tree/types.rs +++ b/crates/starknet_committer/src/patricia_merkle_tree/types.rs @@ -1,10 +1,10 @@ use std::collections::HashMap; -use committer::felt::Felt; -use committer::impl_from_hex_for_felt_wrapper; -use committer::patricia_merkle_tree::filled_tree::errors::FilledTreeError; -use committer::patricia_merkle_tree::filled_tree::tree::FilledTreeImpl; -use committer::patricia_merkle_tree::types::NodeIndex; +use starknet_patricia::felt::Felt; +use starknet_patricia::impl_from_hex_for_felt_wrapper; +use starknet_patricia::patricia_merkle_tree::filled_tree::errors::FilledTreeError; +use starknet_patricia::patricia_merkle_tree::filled_tree::tree::FilledTreeImpl; +use starknet_patricia::patricia_merkle_tree::types::NodeIndex; use starknet_types_core::felt::FromStrError; use crate::block_committer::input::{ContractAddress, StarknetStorageValue}; diff --git a/crates/starknet_committer/src/patricia_merkle_tree/types_test.rs b/crates/starknet_committer/src/patricia_merkle_tree/types_test.rs index 1d6a2a0fb6..ff8db54a47 100644 --- a/crates/starknet_committer/src/patricia_merkle_tree/types_test.rs +++ b/crates/starknet_committer/src/patricia_merkle_tree/types_test.rs @@ -1,6 +1,6 @@ -use committer::felt::Felt; -use committer::patricia_merkle_tree::types::NodeIndex; use rstest::rstest; +use starknet_patricia::felt::Felt; +use starknet_patricia::patricia_merkle_tree::types::NodeIndex; use crate::block_committer::input::{ContractAddress, StarknetStorageKey}; diff --git a/crates/committer/Cargo.toml b/crates/starknet_patricia/Cargo.toml similarity index 97% rename from crates/committer/Cargo.toml rename to crates/starknet_patricia/Cargo.toml index 8058f09f5b..d35c118cf1 100644 --- a/crates/committer/Cargo.toml +++ b/crates/starknet_patricia/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "committer" +name = "starknet_patricia" version = "0.1.0-rc.0" edition.workspace = true repository.workspace = true diff --git a/crates/committer/src/felt.rs b/crates/starknet_patricia/src/felt.rs similarity index 100% rename from crates/committer/src/felt.rs rename to crates/starknet_patricia/src/felt.rs diff --git a/crates/committer/src/hash.rs b/crates/starknet_patricia/src/hash.rs similarity index 100% rename from crates/committer/src/hash.rs rename to crates/starknet_patricia/src/hash.rs diff --git a/crates/committer/src/hash/hash_trait.rs b/crates/starknet_patricia/src/hash/hash_trait.rs similarity index 100% rename from crates/committer/src/hash/hash_trait.rs rename to crates/starknet_patricia/src/hash/hash_trait.rs diff --git a/crates/committer/src/lib.rs b/crates/starknet_patricia/src/lib.rs similarity index 100% rename from crates/committer/src/lib.rs rename to crates/starknet_patricia/src/lib.rs diff --git a/crates/committer/src/patricia_merkle_tree.rs b/crates/starknet_patricia/src/patricia_merkle_tree.rs similarity index 100% rename from crates/committer/src/patricia_merkle_tree.rs rename to crates/starknet_patricia/src/patricia_merkle_tree.rs diff --git a/crates/committer/src/patricia_merkle_tree/errors.rs b/crates/starknet_patricia/src/patricia_merkle_tree/errors.rs similarity index 100% rename from crates/committer/src/patricia_merkle_tree/errors.rs rename to crates/starknet_patricia/src/patricia_merkle_tree/errors.rs diff --git a/crates/committer/src/patricia_merkle_tree/external_test_utils.rs b/crates/starknet_patricia/src/patricia_merkle_tree/external_test_utils.rs similarity index 100% rename from crates/committer/src/patricia_merkle_tree/external_test_utils.rs rename to crates/starknet_patricia/src/patricia_merkle_tree/external_test_utils.rs diff --git a/crates/committer/src/patricia_merkle_tree/filled_tree.rs b/crates/starknet_patricia/src/patricia_merkle_tree/filled_tree.rs similarity index 100% rename from crates/committer/src/patricia_merkle_tree/filled_tree.rs rename to crates/starknet_patricia/src/patricia_merkle_tree/filled_tree.rs diff --git a/crates/committer/src/patricia_merkle_tree/filled_tree/errors.rs b/crates/starknet_patricia/src/patricia_merkle_tree/filled_tree/errors.rs similarity index 100% rename from crates/committer/src/patricia_merkle_tree/filled_tree/errors.rs rename to crates/starknet_patricia/src/patricia_merkle_tree/filled_tree/errors.rs diff --git a/crates/committer/src/patricia_merkle_tree/filled_tree/node.rs b/crates/starknet_patricia/src/patricia_merkle_tree/filled_tree/node.rs similarity index 100% rename from crates/committer/src/patricia_merkle_tree/filled_tree/node.rs rename to crates/starknet_patricia/src/patricia_merkle_tree/filled_tree/node.rs diff --git a/crates/committer/src/patricia_merkle_tree/filled_tree/node_serde.rs b/crates/starknet_patricia/src/patricia_merkle_tree/filled_tree/node_serde.rs similarity index 100% rename from crates/committer/src/patricia_merkle_tree/filled_tree/node_serde.rs rename to crates/starknet_patricia/src/patricia_merkle_tree/filled_tree/node_serde.rs diff --git a/crates/committer/src/patricia_merkle_tree/filled_tree/tree.rs b/crates/starknet_patricia/src/patricia_merkle_tree/filled_tree/tree.rs similarity index 100% rename from crates/committer/src/patricia_merkle_tree/filled_tree/tree.rs rename to crates/starknet_patricia/src/patricia_merkle_tree/filled_tree/tree.rs diff --git a/crates/committer/src/patricia_merkle_tree/filled_tree/tree_test.rs b/crates/starknet_patricia/src/patricia_merkle_tree/filled_tree/tree_test.rs similarity index 100% rename from crates/committer/src/patricia_merkle_tree/filled_tree/tree_test.rs rename to crates/starknet_patricia/src/patricia_merkle_tree/filled_tree/tree_test.rs diff --git a/crates/committer/src/patricia_merkle_tree/internal_test_utils.rs b/crates/starknet_patricia/src/patricia_merkle_tree/internal_test_utils.rs similarity index 100% rename from crates/committer/src/patricia_merkle_tree/internal_test_utils.rs rename to crates/starknet_patricia/src/patricia_merkle_tree/internal_test_utils.rs diff --git a/crates/committer/src/patricia_merkle_tree/node_data.rs b/crates/starknet_patricia/src/patricia_merkle_tree/node_data.rs similarity index 100% rename from crates/committer/src/patricia_merkle_tree/node_data.rs rename to crates/starknet_patricia/src/patricia_merkle_tree/node_data.rs diff --git a/crates/committer/src/patricia_merkle_tree/node_data/errors.rs b/crates/starknet_patricia/src/patricia_merkle_tree/node_data/errors.rs similarity index 100% rename from crates/committer/src/patricia_merkle_tree/node_data/errors.rs rename to crates/starknet_patricia/src/patricia_merkle_tree/node_data/errors.rs diff --git a/crates/committer/src/patricia_merkle_tree/node_data/inner_node.rs b/crates/starknet_patricia/src/patricia_merkle_tree/node_data/inner_node.rs similarity index 100% rename from crates/committer/src/patricia_merkle_tree/node_data/inner_node.rs rename to crates/starknet_patricia/src/patricia_merkle_tree/node_data/inner_node.rs diff --git a/crates/committer/src/patricia_merkle_tree/node_data/inner_node_tests.rs b/crates/starknet_patricia/src/patricia_merkle_tree/node_data/inner_node_tests.rs similarity index 100% rename from crates/committer/src/patricia_merkle_tree/node_data/inner_node_tests.rs rename to crates/starknet_patricia/src/patricia_merkle_tree/node_data/inner_node_tests.rs diff --git a/crates/committer/src/patricia_merkle_tree/node_data/leaf.rs b/crates/starknet_patricia/src/patricia_merkle_tree/node_data/leaf.rs similarity index 100% rename from crates/committer/src/patricia_merkle_tree/node_data/leaf.rs rename to crates/starknet_patricia/src/patricia_merkle_tree/node_data/leaf.rs diff --git a/crates/committer/src/patricia_merkle_tree/original_skeleton_tree.rs b/crates/starknet_patricia/src/patricia_merkle_tree/original_skeleton_tree.rs similarity index 100% rename from crates/committer/src/patricia_merkle_tree/original_skeleton_tree.rs rename to crates/starknet_patricia/src/patricia_merkle_tree/original_skeleton_tree.rs diff --git a/crates/committer/src/patricia_merkle_tree/original_skeleton_tree/config.rs b/crates/starknet_patricia/src/patricia_merkle_tree/original_skeleton_tree/config.rs similarity index 100% rename from crates/committer/src/patricia_merkle_tree/original_skeleton_tree/config.rs rename to crates/starknet_patricia/src/patricia_merkle_tree/original_skeleton_tree/config.rs diff --git a/crates/committer/src/patricia_merkle_tree/original_skeleton_tree/create_tree.rs b/crates/starknet_patricia/src/patricia_merkle_tree/original_skeleton_tree/create_tree.rs similarity index 100% rename from crates/committer/src/patricia_merkle_tree/original_skeleton_tree/create_tree.rs rename to crates/starknet_patricia/src/patricia_merkle_tree/original_skeleton_tree/create_tree.rs diff --git a/crates/committer/src/patricia_merkle_tree/original_skeleton_tree/create_tree_test.rs b/crates/starknet_patricia/src/patricia_merkle_tree/original_skeleton_tree/create_tree_test.rs similarity index 100% rename from crates/committer/src/patricia_merkle_tree/original_skeleton_tree/create_tree_test.rs rename to crates/starknet_patricia/src/patricia_merkle_tree/original_skeleton_tree/create_tree_test.rs diff --git a/crates/committer/src/patricia_merkle_tree/original_skeleton_tree/errors.rs b/crates/starknet_patricia/src/patricia_merkle_tree/original_skeleton_tree/errors.rs similarity index 100% rename from crates/committer/src/patricia_merkle_tree/original_skeleton_tree/errors.rs rename to crates/starknet_patricia/src/patricia_merkle_tree/original_skeleton_tree/errors.rs diff --git a/crates/committer/src/patricia_merkle_tree/original_skeleton_tree/node.rs b/crates/starknet_patricia/src/patricia_merkle_tree/original_skeleton_tree/node.rs similarity index 100% rename from crates/committer/src/patricia_merkle_tree/original_skeleton_tree/node.rs rename to crates/starknet_patricia/src/patricia_merkle_tree/original_skeleton_tree/node.rs diff --git a/crates/committer/src/patricia_merkle_tree/original_skeleton_tree/tree.rs b/crates/starknet_patricia/src/patricia_merkle_tree/original_skeleton_tree/tree.rs similarity index 100% rename from crates/committer/src/patricia_merkle_tree/original_skeleton_tree/tree.rs rename to crates/starknet_patricia/src/patricia_merkle_tree/original_skeleton_tree/tree.rs diff --git a/crates/committer/src/patricia_merkle_tree/original_skeleton_tree/utils.rs b/crates/starknet_patricia/src/patricia_merkle_tree/original_skeleton_tree/utils.rs similarity index 100% rename from crates/committer/src/patricia_merkle_tree/original_skeleton_tree/utils.rs rename to crates/starknet_patricia/src/patricia_merkle_tree/original_skeleton_tree/utils.rs diff --git a/crates/committer/src/patricia_merkle_tree/original_skeleton_tree/utils_test.rs b/crates/starknet_patricia/src/patricia_merkle_tree/original_skeleton_tree/utils_test.rs similarity index 100% rename from crates/committer/src/patricia_merkle_tree/original_skeleton_tree/utils_test.rs rename to crates/starknet_patricia/src/patricia_merkle_tree/original_skeleton_tree/utils_test.rs diff --git a/crates/committer/src/patricia_merkle_tree/types.rs b/crates/starknet_patricia/src/patricia_merkle_tree/types.rs similarity index 100% rename from crates/committer/src/patricia_merkle_tree/types.rs rename to crates/starknet_patricia/src/patricia_merkle_tree/types.rs diff --git a/crates/committer/src/patricia_merkle_tree/types_test.rs b/crates/starknet_patricia/src/patricia_merkle_tree/types_test.rs similarity index 100% rename from crates/committer/src/patricia_merkle_tree/types_test.rs rename to crates/starknet_patricia/src/patricia_merkle_tree/types_test.rs diff --git a/crates/committer/src/patricia_merkle_tree/updated_skeleton_tree.rs b/crates/starknet_patricia/src/patricia_merkle_tree/updated_skeleton_tree.rs similarity index 100% rename from crates/committer/src/patricia_merkle_tree/updated_skeleton_tree.rs rename to crates/starknet_patricia/src/patricia_merkle_tree/updated_skeleton_tree.rs diff --git a/crates/committer/src/patricia_merkle_tree/updated_skeleton_tree/create_tree_helper.rs b/crates/starknet_patricia/src/patricia_merkle_tree/updated_skeleton_tree/create_tree_helper.rs similarity index 100% rename from crates/committer/src/patricia_merkle_tree/updated_skeleton_tree/create_tree_helper.rs rename to crates/starknet_patricia/src/patricia_merkle_tree/updated_skeleton_tree/create_tree_helper.rs diff --git a/crates/committer/src/patricia_merkle_tree/updated_skeleton_tree/create_tree_helper_test.rs b/crates/starknet_patricia/src/patricia_merkle_tree/updated_skeleton_tree/create_tree_helper_test.rs similarity index 100% rename from crates/committer/src/patricia_merkle_tree/updated_skeleton_tree/create_tree_helper_test.rs rename to crates/starknet_patricia/src/patricia_merkle_tree/updated_skeleton_tree/create_tree_helper_test.rs diff --git a/crates/committer/src/patricia_merkle_tree/updated_skeleton_tree/errors.rs b/crates/starknet_patricia/src/patricia_merkle_tree/updated_skeleton_tree/errors.rs similarity index 100% rename from crates/committer/src/patricia_merkle_tree/updated_skeleton_tree/errors.rs rename to crates/starknet_patricia/src/patricia_merkle_tree/updated_skeleton_tree/errors.rs diff --git a/crates/committer/src/patricia_merkle_tree/updated_skeleton_tree/hash_function.rs b/crates/starknet_patricia/src/patricia_merkle_tree/updated_skeleton_tree/hash_function.rs similarity index 100% rename from crates/committer/src/patricia_merkle_tree/updated_skeleton_tree/hash_function.rs rename to crates/starknet_patricia/src/patricia_merkle_tree/updated_skeleton_tree/hash_function.rs diff --git a/crates/committer/src/patricia_merkle_tree/updated_skeleton_tree/node.rs b/crates/starknet_patricia/src/patricia_merkle_tree/updated_skeleton_tree/node.rs similarity index 100% rename from crates/committer/src/patricia_merkle_tree/updated_skeleton_tree/node.rs rename to crates/starknet_patricia/src/patricia_merkle_tree/updated_skeleton_tree/node.rs diff --git a/crates/committer/src/patricia_merkle_tree/updated_skeleton_tree/tree.rs b/crates/starknet_patricia/src/patricia_merkle_tree/updated_skeleton_tree/tree.rs similarity index 100% rename from crates/committer/src/patricia_merkle_tree/updated_skeleton_tree/tree.rs rename to crates/starknet_patricia/src/patricia_merkle_tree/updated_skeleton_tree/tree.rs diff --git a/crates/committer/src/patricia_merkle_tree/updated_skeleton_tree/tree_test.rs b/crates/starknet_patricia/src/patricia_merkle_tree/updated_skeleton_tree/tree_test.rs similarity index 100% rename from crates/committer/src/patricia_merkle_tree/updated_skeleton_tree/tree_test.rs rename to crates/starknet_patricia/src/patricia_merkle_tree/updated_skeleton_tree/tree_test.rs diff --git a/crates/committer/src/storage.rs b/crates/starknet_patricia/src/storage.rs similarity index 100% rename from crates/committer/src/storage.rs rename to crates/starknet_patricia/src/storage.rs diff --git a/crates/committer/src/storage/db_object.rs b/crates/starknet_patricia/src/storage/db_object.rs similarity index 100% rename from crates/committer/src/storage/db_object.rs rename to crates/starknet_patricia/src/storage/db_object.rs diff --git a/crates/committer/src/storage/errors.rs b/crates/starknet_patricia/src/storage/errors.rs similarity index 100% rename from crates/committer/src/storage/errors.rs rename to crates/starknet_patricia/src/storage/errors.rs diff --git a/crates/committer/src/storage/map_storage.rs b/crates/starknet_patricia/src/storage/map_storage.rs similarity index 100% rename from crates/committer/src/storage/map_storage.rs rename to crates/starknet_patricia/src/storage/map_storage.rs diff --git a/crates/committer/src/storage/storage_trait.rs b/crates/starknet_patricia/src/storage/storage_trait.rs similarity index 100% rename from crates/committer/src/storage/storage_trait.rs rename to crates/starknet_patricia/src/storage/storage_trait.rs From a0a04ce781ed712c1a66a24087b58e3795dff134 Mon Sep 17 00:00:00 2001 From: Dori Medini Date: Mon, 12 Aug 2024 17:43:39 +0300 Subject: [PATCH 10/10] fix: conflict resolution Signed-off-by: Dori Medini --- .../workflows/blockifier_compiled_cairo.yml | 23 ------------------- Cargo.lock | 5 ---- Cargo.toml | 6 +---- 3 files changed, 1 insertion(+), 33 deletions(-) diff --git a/.github/workflows/blockifier_compiled_cairo.yml b/.github/workflows/blockifier_compiled_cairo.yml index 164542b635..1bcda6cc25 100644 --- a/.github/workflows/blockifier_compiled_cairo.yml +++ b/.github/workflows/blockifier_compiled_cairo.yml @@ -9,16 +9,10 @@ on: - v[0-9].** paths: - '.github/workflows/blockifier_compiled_cairo.yml' -<<<<<<< HEAD - 'crates/blockifier/feature_contracts/**' - 'crates/blockifier/src/test_utils/cairo_compile.rs' - 'crates/blockifier/tests/feature_contracts_compatibility_test.rs' - 'crates/blockifier/tests/requirements.txt' -||||||| 8134c27b -======= - - 'crates/blockifier/feature_contracts/cairo0/**' - - 'crates/blockifier/tests/requirements.txt' ->>>>>>> origin/main-v0.13.2 pull_request: types: - opened @@ -26,17 +20,10 @@ on: - synchronize paths: - '.github/workflows/blockifier_compiled_cairo.yml' -<<<<<<< HEAD - 'crates/blockifier/feature_contracts/**' - 'crates/blockifier/src/test_utils/cairo_compile.rs' - 'crates/blockifier/tests/feature_contracts_compatibility_test.rs' - 'crates/blockifier/tests/requirements.txt' -||||||| 8134c27b - - 'crates/blockifier/feature_contracts/cairo0/**' -======= - - 'crates/blockifier/feature_contracts/cairo0/**' - - 'crates/blockifier/tests/requirements.txt' ->>>>>>> origin/main-v0.13.2 jobs: verify_cairo_file_dependencies: @@ -58,7 +45,6 @@ jobs: LD_LIBRARY_PATH: ${{ env.Python3_ROOT_DIR }}/bin run: echo "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}" >> $GITHUB_ENV -<<<<<<< HEAD # Checkout sequencer into a dedicated directory - technical requirement in order to be able to checkout `cairo` in a sibling directory. - name: checkout sequencer into `sequencer` directory. uses: actions/checkout@v4 @@ -84,12 +70,3 @@ jobs: cd sequencer && pip install -r crates/blockifier/tests/requirements.txt && cargo test -p blockifier --test feature_contracts_compatibility_test --features testing -- --include-ignored -||||||| 8134c27b - - run: - pip install -r crates/blockifier/tests/requirements.txt; - cargo test verify_feature_contracts -- --include-ignored -======= - - run: - pip install -r crates/blockifier/tests/requirements.txt; - cargo test -p blockifier --test feature_contracts_compatibility_test --features testing -- --include-ignored ->>>>>>> origin/main-v0.13.2 diff --git a/Cargo.lock b/Cargo.lock index 0305289227..ee1f640280 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6282,12 +6282,7 @@ dependencies = [ "assert_matches", "async-stream", "bytes", -<<<<<<< HEAD -||||||| 8134c27b - "clap 4.5.4", -======= "clap", ->>>>>>> origin/main-v0.13.2 "deadqueue", "defaultmap", "derive_more", diff --git a/Cargo.toml b/Cargo.toml index d51b9f51ee..22f31d0d3d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -175,13 +175,9 @@ starknet-types-core = { version = "0.1.5", features = ["hash", "prime-bigint", " starknet_api = { path = "crates/starknet_api", version = "0.13.0-rc.0" } starknet_batcher_types = { path = "crates/batcher_types", version = "0.0" } starknet_client = { path = "crates/starknet_client", version = "0.4.0-rc.0" } -<<<<<<< HEAD +starknet_committer = { path = "crates/starknet_committer", version = "0.1.0-rc.0" } starknet_consensus_manager = { path = "crates/consensus_manager", version = "0.0" } starknet_consensus_manager_types = { path = "crates/consensus_manager_types", version = "0.0" } -||||||| 8134c27b -======= -starknet_committer = { path = "crates/starknet_committer", version = "0.1.0-rc.0" } ->>>>>>> origin/main-v0.13.2 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" }