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