mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat: add static-file-types (#8361)
This commit is contained in:
@ -16,6 +16,7 @@ workspace = true
|
||||
reth-codecs.workspace = true
|
||||
reth-ethereum-forks.workspace = true
|
||||
reth-network-types.workspace = true
|
||||
reth-static-file-types.workspace = true
|
||||
revm.workspace = true
|
||||
revm-primitives = { workspace = true, features = ["serde"] }
|
||||
|
||||
@ -41,7 +42,6 @@ c-kzg = { workspace = true, features = ["serde"], optional = true }
|
||||
# misc
|
||||
bytes.workspace = true
|
||||
byteorder = "1"
|
||||
clap = { workspace = true, features = ["derive"], optional = true }
|
||||
derive_more.workspace = true
|
||||
itertools.workspace = true
|
||||
modular-bitfield.workspace = true
|
||||
@ -62,7 +62,6 @@ plain_hasher = { version = "0.2", optional = true }
|
||||
arbitrary = { workspace = true, features = ["derive"], optional = true }
|
||||
proptest = { workspace = true, optional = true }
|
||||
proptest-derive = { workspace = true, optional = true }
|
||||
strum = { workspace = true, features = ["derive"] }
|
||||
|
||||
[dev-dependencies]
|
||||
# eth
|
||||
@ -116,7 +115,7 @@ c-kzg = [
|
||||
"alloy-eips/kzg",
|
||||
]
|
||||
zstd-codec = ["dep:zstd"]
|
||||
clap = ["dep:clap"]
|
||||
clap = ["reth-static-file-types/clap"]
|
||||
optimism = [
|
||||
"reth-codecs/optimism",
|
||||
"reth-ethereum-forks/optimism",
|
||||
|
||||
@ -42,7 +42,7 @@ mod receipt;
|
||||
/// Helpers for working with revm
|
||||
pub mod revm;
|
||||
pub mod stage;
|
||||
pub mod static_file;
|
||||
pub use reth_static_file_types as static_file;
|
||||
mod storage;
|
||||
/// Helpers for working with transactions
|
||||
pub mod transaction;
|
||||
|
||||
23
crates/static-file-types/Cargo.toml
Normal file
23
crates/static-file-types/Cargo.toml
Normal file
@ -0,0 +1,23 @@
|
||||
[package]
|
||||
name = "reth-static-file-types"
|
||||
version.workspace = true
|
||||
edition.workspace = true
|
||||
homepage.workspace = true
|
||||
license.workspace = true
|
||||
repository.workspace = true
|
||||
rust-version.workspace = true
|
||||
description = "Commonly used types for static file usage in reth."
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
||||
[dependencies]
|
||||
alloy-primitives.workspace = true
|
||||
|
||||
clap = { workspace = true, features = ["derive"], optional = true }
|
||||
derive_more.workspace = true
|
||||
serde = { workspace = true, features = ["derive"] }
|
||||
strum = { workspace = true, features = ["derive"] }
|
||||
|
||||
[features]
|
||||
clap = ["dep:clap"]
|
||||
@ -1,4 +1,12 @@
|
||||
//! StaticFile primitives.
|
||||
//! Commonly used types for static file usage.
|
||||
|
||||
#![doc(
|
||||
html_logo_url = "https://raw.githubusercontent.com/paradigmxyz/reth/main/assets/reth-docs.png",
|
||||
html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256",
|
||||
issue_tracker_base_url = "https://github.com/paradigmxyz/reth/issues/"
|
||||
)]
|
||||
#![cfg_attr(not(test), warn(unused_crate_dependencies))]
|
||||
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
|
||||
|
||||
mod compression;
|
||||
mod filters;
|
||||
@ -1,7 +1,5 @@
|
||||
use crate::{
|
||||
static_file::{Compression, Filters, InclusionFilter},
|
||||
BlockNumber, TxNumber,
|
||||
};
|
||||
use crate::{BlockNumber, Compression, Filters, InclusionFilter};
|
||||
use alloy_primitives::TxNumber;
|
||||
use derive_more::Display;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::{ops::RangeInclusive, str::FromStr};
|
||||
@ -385,7 +383,7 @@ mod tests {
|
||||
Compression::Lz4,
|
||||
Filters::WithFilters(
|
||||
InclusionFilter::Cuckoo,
|
||||
crate::static_file::PerfectHashingFunction::Fmph,
|
||||
crate::PerfectHashingFunction::Fmph,
|
||||
),
|
||||
)),
|
||||
),
|
||||
@ -397,7 +395,7 @@ mod tests {
|
||||
Compression::Zstd,
|
||||
Filters::WithFilters(
|
||||
InclusionFilter::Cuckoo,
|
||||
crate::static_file::PerfectHashingFunction::Fmph,
|
||||
crate::PerfectHashingFunction::Fmph,
|
||||
),
|
||||
)),
|
||||
),
|
||||
@ -409,7 +407,7 @@ mod tests {
|
||||
Compression::ZstdWithDictionary,
|
||||
Filters::WithFilters(
|
||||
InclusionFilter::Cuckoo,
|
||||
crate::static_file::PerfectHashingFunction::Fmph,
|
||||
crate::PerfectHashingFunction::Fmph,
|
||||
),
|
||||
)),
|
||||
),
|
||||
Reference in New Issue
Block a user