chore: split db abstraction into new crate (#8594)

This commit is contained in:
Oliver
2024-06-04 23:45:57 +02:00
committed by GitHub
parent a8095740fc
commit 51a28f22da
183 changed files with 825 additions and 755 deletions

View File

@ -15,6 +15,7 @@ workspace = true
# reth
reth-primitives.workspace = true
reth-db.workspace = true
reth-db-api.workspace = true
reth-provider.workspace = true
reth-storage-errors.workspace = true
reth-nippy-jar.workspace = true

View File

@ -1,8 +1,6 @@
use crate::segments::{dataset_for_compression, prepare_jar, Segment, SegmentHeader};
use reth_db::{
cursor::DbCursorRO, database::Database, static_file::create_static_file_T1_T2_T3, tables,
transaction::DbTx, RawKey, RawTable,
};
use reth_db::{static_file::create_static_file_T1_T2_T3, tables, RawKey, RawTable};
use reth_db_api::{cursor::DbCursorRO, database::Database, transaction::DbTx};
use reth_primitives::{static_file::SegmentConfig, BlockNumber, StaticFileSegment};
use reth_provider::{
providers::{StaticFileProvider, StaticFileWriter},

View File

@ -9,9 +9,8 @@ pub use headers::Headers;
mod receipts;
pub use receipts::Receipts;
use reth_db::{
cursor::DbCursorRO, database::Database, table::Table, transaction::DbTx, RawKey, RawTable,
};
use reth_db::{RawKey, RawTable};
use reth_db_api::{cursor::DbCursorRO, database::Database, table::Table, transaction::DbTx};
use reth_nippy_jar::NippyJar;
use reth_primitives::{
static_file::{

View File

@ -1,8 +1,6 @@
use crate::segments::{dataset_for_compression, prepare_jar, Segment};
use reth_db::{
cursor::DbCursorRO, database::Database, static_file::create_static_file_T1, tables,
transaction::DbTx,
};
use reth_db::{static_file::create_static_file_T1, tables};
use reth_db_api::{cursor::DbCursorRO, database::Database, transaction::DbTx};
use reth_primitives::{
static_file::{SegmentConfig, SegmentHeader},
BlockNumber, StaticFileSegment, TxNumber,

View File

@ -1,8 +1,6 @@
use crate::segments::{dataset_for_compression, prepare_jar, Segment};
use reth_db::{
cursor::DbCursorRO, database::Database, static_file::create_static_file_T1, tables,
transaction::DbTx,
};
use reth_db::{static_file::create_static_file_T1, tables};
use reth_db_api::{cursor::DbCursorRO, database::Database, transaction::DbTx};
use reth_primitives::{
static_file::{SegmentConfig, SegmentHeader},
BlockNumber, StaticFileSegment, TxNumber,

View File

@ -3,7 +3,7 @@
use crate::{segments, segments::Segment, StaticFileProducerEvent};
use parking_lot::Mutex;
use rayon::prelude::*;
use reth_db::database::Database;
use reth_db_api::database::Database;
use reth_primitives::{static_file::HighestStaticFiles, BlockNumber, PruneModes};
use reth_provider::{providers::StaticFileWriter, ProviderFactory, StaticFileProviderFactory};
use reth_storage_errors::provider::ProviderResult;
@ -228,7 +228,8 @@ mod tests {
StaticFileProducer, StaticFileProducerInner, StaticFileTargets,
};
use assert_matches::assert_matches;
use reth_db::{database::Database, test_utils::TempDatabase, transaction::DbTx, DatabaseEnv};
use reth_db::{test_utils::TempDatabase, DatabaseEnv};
use reth_db_api::{database::Database, transaction::DbTx};
use reth_primitives::{
static_file::HighestStaticFiles, PruneModes, StaticFileSegment, B256, U256,
};