diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4b670e912..a82d95250 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,7 @@
## Next release
+- refactor: replace starknet-rs BlockId with types-rs BlockId and remove redundant mp_block::BlockId
- feat(fgw): added `add_transaction` for gateway client
- fix(fgw): include `l1_to_l2_consumed_message` in L1 handler receipt
- build: up starknet-rs, starknet-types, blockifier(v0.8.0), cairo
diff --git a/Cargo.lock b/Cargo.lock
index b6e69d68b..19fefba59 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -5607,6 +5607,7 @@ dependencies = [
"starknet",
"starknet-core",
"starknet-providers",
+ "starknet-types-core",
"tempfile",
"tokio",
"tracing",
@@ -6133,6 +6134,7 @@ dependencies = [
"serde_yaml",
"starknet-core",
"starknet-crypto 0.7.2",
+ "starknet-types-core",
"tokio",
"tracing",
"tracing-core",
diff --git a/crates/client/block_import/src/lib.rs b/crates/client/block_import/src/lib.rs
index 303299c3c..fe2e5d617 100644
--- a/crates/client/block_import/src/lib.rs
+++ b/crates/client/block_import/src/lib.rs
@@ -42,7 +42,7 @@ use anyhow::Context;
use mc_db::{MadaraBackend, MadaraStorageError};
use metrics::BlockMetrics;
use mp_class::{class_hash::ComputeClassHashError, compile::ClassCompilationError};
-use starknet_core::types::Felt;
+use starknet_types_core::felt::Felt;
use std::{borrow::Cow, sync::Arc};
mod metrics;
diff --git a/crates/client/block_import/src/pre_validate.rs b/crates/client/block_import/src/pre_validate.rs
index ef6657476..cbbd4f756 100644
--- a/crates/client/block_import/src/pre_validate.rs
+++ b/crates/client/block_import/src/pre_validate.rs
@@ -11,7 +11,7 @@ use mp_transactions::Transaction;
use rayon::iter::{IntoParallelIterator, IntoParallelRefIterator};
use rayon::prelude::*;
use starknet_api::core::ChainId;
-use starknet_core::types::Felt;
+use starknet_types_core::felt::Felt;
use starknet_types_core::hash::{Pedersen, Poseidon, StarkHash};
use std::mem;
use std::sync::Arc;
diff --git a/crates/client/block_import/src/tests/block_import_utils.rs b/crates/client/block_import/src/tests/block_import_utils.rs
index d1e2a1794..07d28dbd3 100644
--- a/crates/client/block_import/src/tests/block_import_utils.rs
+++ b/crates/client/block_import/src/tests/block_import_utils.rs
@@ -2,7 +2,7 @@ use mp_block::header::{GasPrices, L1DataAvailabilityMode};
use mp_block::Header;
use mp_chain_config::StarknetVersion;
use mp_state_update::StateDiff;
-use starknet_core::types::Felt;
+use starknet_types_core::felt::Felt;
use crate::{
BlockValidationContext, PreValidatedBlock, PreValidatedPendingBlock, UnverifiedCommitments, UnverifiedFullBlock,
diff --git a/crates/client/block_import/src/types.rs b/crates/client/block_import/src/types.rs
index 30ca85750..3e0419a57 100644
--- a/crates/client/block_import/src/types.rs
+++ b/crates/client/block_import/src/types.rs
@@ -15,7 +15,7 @@ use mp_state_update::StateDiff;
use mp_transactions::Transaction;
use serde::{Deserialize, Serialize};
use starknet_api::core::ChainId;
-use starknet_core::types::Felt;
+use starknet_types_core::felt::Felt;
#[derive(Clone, Debug, Eq, PartialEq, Default, Serialize, Deserialize)]
pub struct UnverifiedHeader {
diff --git a/crates/client/block_import/src/verify_apply.rs b/crates/client/block_import/src/verify_apply.rs
index abad5fc4c..9113b88ac 100644
--- a/crates/client/block_import/src/verify_apply.rs
+++ b/crates/client/block_import/src/verify_apply.rs
@@ -4,13 +4,14 @@ use crate::{
};
use itertools::Itertools;
use mc_db::{MadaraBackend, MadaraStorageError};
+use mp_block::BlockTag;
use mp_block::{
- header::PendingHeader, BlockId, BlockTag, Header, MadaraBlockInfo, MadaraBlockInner, MadaraMaybePendingBlock,
+ header::PendingHeader, BlockId, Header, MadaraBlockInfo, MadaraBlockInner, MadaraMaybePendingBlock,
MadaraMaybePendingBlockInfo, MadaraPendingBlockInfo,
};
use mp_convert::{FeltHexDisplay, ToFelt};
use starknet_api::core::ChainId;
-use starknet_core::types::Felt;
+use starknet_types_core::felt::Felt;
use starknet_types_core::hash::{Poseidon, StarkHash};
use std::{borrow::Cow, sync::Arc};
diff --git a/crates/client/db/src/contract_db.rs b/crates/client/db/src/contract_db.rs
index 200d817b1..70666b463 100644
--- a/crates/client/db/src/contract_db.rs
+++ b/crates/client/db/src/contract_db.rs
@@ -5,7 +5,7 @@ use std::sync::Arc;
use rayon::{iter::ParallelIterator, slice::ParallelSlice};
use rocksdb::{BoundColumnFamily, IteratorMode, ReadOptions, WriteOptions};
use serde::Serialize;
-use starknet_core::types::Felt;
+use starknet_types_core::felt::Felt;
use crate::{
db_block_id::{DbBlockId, DbBlockIdResolvable},
diff --git a/crates/client/db/src/db_block_id.rs b/crates/client/db/src/db_block_id.rs
index 75471719b..548422c56 100644
--- a/crates/client/db/src/db_block_id.rs
+++ b/crates/client/db/src/db_block_id.rs
@@ -26,12 +26,6 @@ impl DbBlockIdResolvable for BlockId {
}
}
-impl DbBlockIdResolvable for starknet_core::types::BlockId {
- fn resolve_db_block_id(&self, backend: &MadaraBackend) -> Result