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 ac38eb40a6..c0e06095ce 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,19 +20,24 @@ 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: 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 +48,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 40b36dde69..1bcda6cc25 100644 --- a/.github/workflows/blockifier_compiled_cairo.yml +++ b/.github/workflows/blockifier_compiled_cairo.yml @@ -30,8 +30,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" diff --git a/.github/workflows/blockifier_coverage.yml b/.github/workflows/blockifier_coverage.yml index 1da1cdbbf2..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: @@ -17,7 +14,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..194fb23475 100644 --- a/.github/workflows/blockifier_post-merge.yml +++ b/.github/workflows/blockifier_post-merge.yml @@ -7,13 +7,15 @@ on: paths: - '.github/workflows/blockifier_post-merge.yml' - 'crates/blockifier/**' + - 'crates/native_blockifier/**' + jobs: if_merged: if: github.event.pull_request.merged == true 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: @@ -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 diff --git a/.github/workflows/committer_ci.yml b/.github/workflows/committer_ci.yml index ef816bc5d8..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,16 +26,16 @@ 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: 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 562663e610..32be92fa5a 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: @@ -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 }} diff --git a/.github/workflows/papyrus_ci.yml b/.github/workflows/papyrus_ci.yml index 349ac4140b..e46bc0b898 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 diff --git a/Cargo.lock b/Cargo.lock index 8786a56a6b..ee1f640280 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", @@ -1816,7 +1805,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57663b653d948a338bfb3eeba9bb2fd5fcfaecb9e199e87e1eda4d9e8b240fd9" dependencies = [ "ciborium-io", - "half 2.4.1", + "half", ] [[package]] @@ -1841,17 +1830,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" @@ -1969,34 +1947,12 @@ 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 4.5.4", - "committer", - "criterion 0.5.1", + "clap", + "criterion", "derive_more", "ethnum", "futures", @@ -2010,6 +1966,7 @@ dependencies = [ "starknet-types-core", "starknet_api", "starknet_committer", + "starknet_patricia", "strum 0.25.0", "strum_macros 0.25.3", "tempfile", @@ -2177,32 +2134,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" @@ -2212,8 +2143,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", @@ -2229,16 +2160,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" @@ -2312,27 +2233,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" @@ -3805,12 +3705,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" @@ -3887,15 +3781,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" @@ -4365,7 +4250,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", ] @@ -4394,7 +4279,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", ] @@ -4636,7 +4521,7 @@ dependencies = [ "anyhow", "base64 0.21.7", "bytecount", - "clap 4.5.4", + "clap", "fancy-regex", "fraction", "getrandom", @@ -6050,7 +5935,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", ] @@ -6282,7 +6167,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", @@ -6397,6 +6282,7 @@ dependencies = [ "assert_matches", "async-stream", "bytes", + "clap", "deadqueue", "defaultmap", "derive_more", @@ -6428,7 +6314,7 @@ version = "0.4.0-rc.0" dependencies = [ "anyhow", "assert-json-diff", - "clap 4.5.4", + "clap", "colored", "const_format", "futures", @@ -6590,7 +6476,7 @@ dependencies = [ "cairo-lang-starknet-classes", "cairo-lang-utils", "camelpaste", - "clap 4.5.4", + "clap", "human_bytes", "indexmap 2.2.6", "insta", @@ -7043,7 +6929,7 @@ checksum = "645493cf344456ef24219d02a768cf1fb92ddf8c92161679ae3d91b91a637be3" dependencies = [ "cfg-if", "concurrent-queue", - "hermit-abi 0.3.9", + "hermit-abi", "pin-project-lite", "rustix 0.38.34", "tracing", @@ -8375,16 +8261,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" @@ -8975,12 +8851,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", @@ -9117,7 +8993,7 @@ dependencies = [ "anyhow", "assert-json-diff", "assert_matches", - "clap 4.5.4", + "clap", "colored", "const_format", "futures", @@ -9149,6 +9025,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" @@ -9496,15 +9393,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" @@ -10024,12 +9912,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 b15e90a491..22f31d0d3d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,7 +7,6 @@ members = [ "crates/batcher", "crates/batcher_types", "crates/blockifier", - "crates/committer", "crates/committer_cli", "crates/consensus_manager", "crates/consensus_manager_types", @@ -38,6 +37,7 @@ members = [ "crates/starknet_api", "crates/starknet_client", "crates/starknet_committer", + "crates/starknet_patricia", "crates/starknet_sierra_compile", "crates/task_executor", "crates/tests-integration", @@ -82,11 +82,10 @@ 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" -criterion = "0.3" +criterion = "0.5.1" deadqueue = "0.2.4" defaultmap = "0.5.0" derive_more = "0.99.17" @@ -163,9 +162,9 @@ 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_json = "1.0.81" -serde_repr = "0.1" +serde = "1.0.197" +serde_json = "1.0.116" +serde_repr = "0.1.19" serde_yaml = "0.9.16" sha2 = "0.10.8" sha3 = "0.10.8" @@ -176,6 +175,7 @@ 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" } +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" } starknet_gateway = { path = "crates/gateway", version = "0.0" } @@ -183,6 +183,7 @@ 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 7b604de97b..1ad7253124 100644 --- a/commitlint.config.js +++ b/commitlint.config.js @@ -25,6 +25,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 e2a6e0a1a2..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 @@ -10,25 +11,25 @@ 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 [dependencies] -clap = { version = "4.5.4", features = ["cargo", "derive"] } -committer = { workspace = true, features = ["testing"] } +clap = { workspace = true, features = ["cargo", "derive"] } derive_more.workspace = true ethnum.workspace = true indexmap.workspace = true rand.workspace = true rand_distr.workspace = true -serde = { version = "1.0.197", features = ["derive"] } -serde_json = "1.0.116" -serde_repr = "0.1.19" +serde = { workspace = true, features = ["derive"] } +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 88% rename from crates/committer/Cargo.toml rename to crates/starknet_patricia/Cargo.toml index bf7a63a4f3..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 @@ -23,8 +23,8 @@ derive_more.workspace = true ethnum.workspace = true hex.workspace = true rand.workspace = true -serde = { version = "1.0.197", features = ["derive"] } -serde_json = "1.0.116" +serde = { workspace = true, features = ["derive"] } +serde_json.workspace = true starknet-types-core.workspace = true strum.workspace = true strum_macros.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