Skip to content

Commit

Permalink
remove reth_primitives
Browse files Browse the repository at this point in the history
  • Loading branch information
joshieDo committed Jun 17, 2024
1 parent f967f9e commit 947fa3f
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 20 deletions.
3 changes: 2 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion crates/static-file/static-file/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,16 @@ workspace = true

[dependencies]
# 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
reth-tokio-util.workspace = true
reth-prune-types.workspace = true
reth-static-file-types.workspace = true

alloy-primitives.workspace = true

# misc
tracing.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions crates/static-file/static-file/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,6 @@ pub use static_file_producer::{
StaticFileProducer, StaticFileProducerInner, StaticFileProducerResult,
StaticFileProducerWithResult, StaticFileTargets,
};

// Re-export for convenience.
pub use reth_static_file_types::*;
3 changes: 2 additions & 1 deletion crates/static-file/static-file/src/segments/headers.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
use crate::segments::{dataset_for_compression, prepare_jar, Segment, SegmentHeader};
use alloy_primitives::BlockNumber;
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},
DatabaseProviderRO,
};
use reth_static_file_types::{SegmentConfig, StaticFileSegment};
use reth_storage_errors::provider::ProviderResult;
use std::{ops::RangeInclusive, path::Path};

Expand Down
12 changes: 5 additions & 7 deletions crates/static-file/static-file/src/segments/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,17 @@ pub use headers::Headers;
mod receipts;
pub use receipts::Receipts;

use alloy_primitives::BlockNumber;
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::{
find_fixed_range, Compression, Filters, InclusionFilter, PerfectHashingFunction,
SegmentConfig, SegmentHeader,
},
BlockNumber, StaticFileSegment,
};
use reth_provider::{
providers::StaticFileProvider, DatabaseProviderRO, ProviderError, TransactionsProviderExt,
};
use reth_static_file_types::{
find_fixed_range, Compression, Filters, InclusionFilter, PerfectHashingFunction, SegmentConfig,
SegmentHeader, StaticFileSegment,
};
use reth_storage_errors::provider::ProviderResult;
use std::{ops::RangeInclusive, path::Path};

Expand Down
6 changes: 2 additions & 4 deletions crates/static-file/static-file/src/segments/receipts.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
use crate::segments::{dataset_for_compression, prepare_jar, Segment};
use alloy_primitives::{BlockNumber, TxNumber};
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,
};
use reth_provider::{
providers::{StaticFileProvider, StaticFileWriter},
BlockReader, DatabaseProviderRO, TransactionsProviderExt,
};
use reth_static_file_types::{SegmentConfig, SegmentHeader, StaticFileSegment};
use reth_storage_errors::provider::{ProviderError, ProviderResult};
use std::{ops::RangeInclusive, path::Path};

Expand Down
6 changes: 2 additions & 4 deletions crates/static-file/static-file/src/segments/transactions.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
use crate::segments::{dataset_for_compression, prepare_jar, Segment};
use alloy_primitives::{BlockNumber, TxNumber};
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,
};
use reth_provider::{
providers::{StaticFileProvider, StaticFileWriter},
BlockReader, DatabaseProviderRO, TransactionsProviderExt,
};
use reth_static_file_types::{SegmentConfig, SegmentHeader, StaticFileSegment};
use reth_storage_errors::provider::{ProviderError, ProviderResult};
use std::{ops::RangeInclusive, path::Path};

Expand Down
6 changes: 4 additions & 2 deletions crates/static-file/static-file/src/static_file_producer.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
//! Support for producing static files.
use crate::{segments, segments::Segment, StaticFileProducerEvent};
use alloy_primitives::BlockNumber;
use parking_lot::Mutex;
use rayon::prelude::*;
use reth_db_api::database::Database;
use reth_primitives::{static_file::HighestStaticFiles, BlockNumber};
use reth_provider::{providers::StaticFileWriter, ProviderFactory, StaticFileProviderFactory};
use reth_prune_types::PruneModes;
use reth_static_file_types::HighestStaticFiles;
use reth_storage_errors::provider::ProviderResult;
use reth_tokio_util::{EventSender, EventStream};
use std::{
Expand Down Expand Up @@ -228,15 +229,16 @@ mod tests {
use crate::static_file_producer::{
StaticFileProducer, StaticFileProducerInner, StaticFileTargets,
};
use alloy_primitives::{B256, U256};
use assert_matches::assert_matches;
use reth_db::{test_utils::TempDatabase, DatabaseEnv};
use reth_db_api::{database::Database, transaction::DbTx};
use reth_primitives::{static_file::HighestStaticFiles, StaticFileSegment, B256, U256};
use reth_provider::{
providers::StaticFileWriter, ProviderError, ProviderFactory, StaticFileProviderFactory,
};
use reth_prune_types::PruneModes;
use reth_stages::test_utils::{StorageKind, TestStageDB};
use reth_static_file_types::{HighestStaticFiles, StaticFileSegment};
use reth_testing_utils::{
generators,
generators::{random_block_range, random_receipt},
Expand Down

0 comments on commit 947fa3f

Please sign in to comment.