mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-01-30 01:28:21 -05:00
feat: add static-file-types (#8361)
This commit is contained in:
14
Cargo.lock
generated
14
Cargo.lock
generated
@@ -7548,7 +7548,6 @@ dependencies = [
|
||||
"byteorder",
|
||||
"bytes",
|
||||
"c-kzg",
|
||||
"clap",
|
||||
"criterion",
|
||||
"derive_more",
|
||||
"hash-db",
|
||||
@@ -7565,13 +7564,13 @@ dependencies = [
|
||||
"reth-codecs",
|
||||
"reth-ethereum-forks",
|
||||
"reth-network-types",
|
||||
"reth-static-file-types",
|
||||
"revm",
|
||||
"revm-primitives",
|
||||
"roaring",
|
||||
"secp256k1 0.28.2",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"strum",
|
||||
"sucds",
|
||||
"tempfile",
|
||||
"test-fuzz",
|
||||
@@ -7932,6 +7931,17 @@ dependencies = [
|
||||
"tracing",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "reth-static-file-types"
|
||||
version = "0.2.0-beta.7"
|
||||
dependencies = [
|
||||
"alloy-primitives",
|
||||
"clap",
|
||||
"derive_more",
|
||||
"serde",
|
||||
"strum",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "reth-tasks"
|
||||
version = "0.2.0-beta.7"
|
||||
|
||||
@@ -60,6 +60,7 @@ members = [
|
||||
"crates/stages/",
|
||||
"crates/stages-api",
|
||||
"crates/static-file/",
|
||||
"crates/static-file-types/",
|
||||
"crates/storage/codecs/",
|
||||
"crates/storage/codecs/derive/",
|
||||
"crates/storage/db/",
|
||||
@@ -271,6 +272,7 @@ reth-rpc-layer = { path = "crates/rpc/rpc-layer" }
|
||||
reth-stages = { path = "crates/stages" }
|
||||
reth-stages-api = { path = "crates/stages-api" }
|
||||
reth-static-file = { path = "crates/static-file" }
|
||||
reth-static-file-types = { path = "crates/static-file-types" }
|
||||
reth-tasks = { path = "crates/tasks" }
|
||||
reth-tokio-util = { path = "crates/tokio-util" }
|
||||
reth-tracing = { path = "crates/tracing" }
|
||||
|
||||
@@ -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