chore: cleanup codecs deps (#5650)

This commit is contained in:
Matthias Seitz
2023-12-01 14:39:21 +01:00
committed by GitHub
parent a3f77d275b
commit cb52a4ca39
5 changed files with 27 additions and 26 deletions

2
Cargo.lock generated
View File

@ -5700,13 +5700,13 @@ dependencies = [
name = "reth-codecs"
version = "0.1.0-alpha.12"
dependencies = [
"alloy-primitives",
"arbitrary",
"bytes",
"codecs-derive",
"modular-bitfield",
"proptest",
"proptest-derive",
"revm-primitives",
"serde",
"test-fuzz",
]

View File

@ -14,7 +14,7 @@ reth-codecs.workspace = true
reth-ethereum-forks.workspace = true
reth-rpc-types.workspace = true
revm.workspace = true
revm-primitives.workspace = true
revm-primitives = { workspace = true, features = ["serde"] }
# ethereum
alloy-primitives = { workspace = true, features = ["rand", "rlp"] }

View File

@ -7,31 +7,26 @@ license.workspace = true
homepage.workspace = true
repository.workspace = true
[features]
default = ["compact"]
compact = ["codecs-derive/compact"]
scale = ["codecs-derive/scale"]
postcard = ["codecs-derive/postcard"]
no_codec = ["codecs-derive/no_codec"]
arbitrary = ["revm-primitives/arbitrary", "dep:arbitrary", "dep:proptest", "dep:proptest-derive"]
optimism = ["codecs-derive/optimism"]
[dependencies]
bytes.workspace = true
codecs-derive = { path = "./derive", default-features = false }
revm-primitives = { workspace = true, features = ["serde"] }
# arbitrary utils
arbitrary = { workspace = true, features = ["derive"], optional = true }
proptest = { workspace = true, optional = true }
proptest-derive = { workspace = true, optional = true }
alloy-primitives.workspace = true
bytes.workspace = true
[dev-dependencies]
revm-primitives = { workspace = true, features = ["serde", "arbitrary"] }
serde = "1.0"
alloy-primitives = { workspace = true, features = ["arbitrary", "serde"] }
serde.workspace = true
modular-bitfield = "0.11.2"
test-fuzz = "4"
arbitrary = { workspace = true, features = ["derive"] }
proptest.workspace = true
proptest-derive.workspace = true
[features]
default = ["compact"]
compact = ["codecs-derive/compact"]
scale = ["codecs-derive/scale"]
postcard = ["codecs-derive/postcard"]
no_codec = ["codecs-derive/no_codec"]
optimism = ["codecs-derive/optimism"]

View File

@ -5,14 +5,21 @@
html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256",
issue_tracker_base_url = "https://github.com/paradigmxyz/reth/issues/"
)]
#![warn(
missing_debug_implementations,
missing_docs,
unused_crate_dependencies,
unreachable_pub,
rustdoc::all
)]
#![deny(unused_must_use, rust_2018_idioms)]
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
#![allow(clippy::non_canonical_clone_impl)]
pub use codecs_derive::*;
use alloy_primitives::{Address, Bloom, Bytes, B256, B512, U256};
use bytes::Buf;
use revm_primitives::{
alloy_primitives::{Bloom, B512},
Address, Bytes, B256, U256,
};
/// Trait that implements the `Compact` codec.
///
@ -338,7 +345,7 @@ fn decode_varuint(mut buf: &[u8]) -> (usize, &[u8]) {
#[cfg(test)]
mod tests {
use super::*;
use revm_primitives::{Address, Bytes};
use alloy_primitives::{Address, Bytes};
#[test]
fn compact_bytes() {

View File

@ -56,7 +56,7 @@ proptest-derive = { workspace = true, optional = true }
[dev-dependencies]
# reth libs with arbitrary
reth-primitives = { workspace = true, features = ["arbitrary"] }
reth-codecs = { workspace = true, features = ["arbitrary"] }
reth-codecs.workspace = true
reth-interfaces.workspace = true
tempfile.workspace = true
@ -93,7 +93,6 @@ mdbx = ["reth-libmdbx"]
bench = []
arbitrary = [
"reth-primitives/arbitrary",
"reth-codecs/arbitrary",
"dep:arbitrary",
"dep:proptest",
"dep:proptest-derive",