chore: disable reth-codec default feature (#9556)

This commit is contained in:
Matthias Seitz
2024-07-18 11:36:45 +02:00
committed by GitHub
parent 43ffb83575
commit 7b4bf59445
7 changed files with 9 additions and 6 deletions

View File

@ -340,7 +340,7 @@ reth-optimism-rpc = { path = "crates/optimism/rpc" }
reth-payload-builder = { path = "crates/payload/builder" } reth-payload-builder = { path = "crates/payload/builder" }
reth-payload-primitives = { path = "crates/payload/primitives" } reth-payload-primitives = { path = "crates/payload/primitives" }
reth-payload-validator = { path = "crates/payload/validator" } reth-payload-validator = { path = "crates/payload/validator" }
reth-primitives = { path = "crates/primitives" } reth-primitives = { path = "crates/primitives", default-features = false, features = ["std"] }
reth-primitives-traits = { path = "crates/primitives-traits", default-features = false } reth-primitives-traits = { path = "crates/primitives-traits", default-features = false }
reth-provider = { path = "crates/storage/provider" } reth-provider = { path = "crates/storage/provider" }
reth-prune = { path = "crates/prune/prune" } reth-prune = { path = "crates/prune/prune" }

View File

@ -5,6 +5,8 @@ use crate::{
}; };
use alloy_rlp::{length_of_length, Decodable, Encodable, Header}; use alloy_rlp::{length_of_length, Decodable, Encodable, Header};
use core::mem; use core::mem;
#[cfg(any(test, feature = "reth-codec"))]
use reth_codecs::Compact; use reth_codecs::Compact;
/// To be used with `Option<CompactPlaceholder>` to place or replace one bit on the bitflag struct. /// To be used with `Option<CompactPlaceholder>` to place or replace one bit on the bitflag struct.

View File

@ -1,6 +1,5 @@
use crate::{U64, U8}; use crate::{U64, U8};
use alloy_rlp::{Decodable, Encodable}; use alloy_rlp::{Decodable, Encodable};
use bytes::Buf;
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
#[cfg(test)] #[cfg(test)]
@ -9,6 +8,7 @@ use reth_codecs::Compact;
/// For backwards compatibility purposes only 2 bits of the type are encoded in the identifier /// For backwards compatibility purposes only 2 bits of the type are encoded in the identifier
/// parameter. In the case of a 3, the full transaction type is read from the buffer as a /// parameter. In the case of a 3, the full transaction type is read from the buffer as a
/// single byte. /// single byte.
#[cfg(any(test, feature = "reth-codec"))]
const COMPACT_EXTENDED_IDENTIFIER_FLAG: usize = 3; const COMPACT_EXTENDED_IDENTIFIER_FLAG: usize = 3;
/// Identifier for legacy transaction, however [`TxLegacy`](crate::TxLegacy) this is technically not /// Identifier for legacy transaction, however [`TxLegacy`](crate::TxLegacy) this is technically not
@ -166,6 +166,7 @@ impl reth_codecs::Compact for TxType {
// parameter. In the case of a 3, the full transaction type is read from the buffer as a // parameter. In the case of a 3, the full transaction type is read from the buffer as a
// single byte. // single byte.
fn from_compact(mut buf: &[u8], identifier: usize) -> (Self, &[u8]) { fn from_compact(mut buf: &[u8], identifier: usize) -> (Self, &[u8]) {
use bytes::Buf;
( (
match identifier { match identifier {
0 => Self::Legacy, 0 => Self::Legacy,

View File

@ -14,7 +14,7 @@ workspace = true
[dependencies] [dependencies]
# reth # reth
reth-codecs.workspace = true reth-codecs.workspace = true
reth-primitives.workspace = true reth-primitives = { workspace = true, features = ["reth-codec"] }
reth-primitives-traits.workspace = true reth-primitives-traits.workspace = true
reth-prune-types.workspace = true reth-prune-types.workspace = true
reth-storage-errors.workspace = true reth-storage-errors.workspace = true

View File

@ -14,7 +14,7 @@ workspace = true
[dependencies] [dependencies]
# reth # reth
reth-db-api.workspace = true reth-db-api.workspace = true
reth-primitives.workspace = true reth-primitives = { workspace = true, features = ["reth-codec"] }
reth-primitives-traits.workspace = true reth-primitives-traits.workspace = true
reth-fs-util.workspace = true reth-fs-util.workspace = true
reth-storage-errors.workspace = true reth-storage-errors.workspace = true

View File

@ -16,7 +16,7 @@ workspace = true
reth-chainspec.workspace = true reth-chainspec.workspace = true
reth-blockchain-tree-api.workspace = true reth-blockchain-tree-api.workspace = true
reth-execution-types.workspace = true reth-execution-types.workspace = true
reth-primitives.workspace = true reth-primitives = { workspace = true, features = ["reth-codec"] }
reth-fs-util.workspace = true reth-fs-util.workspace = true
reth-errors.workspace = true reth-errors.workspace = true
reth-storage-errors.workspace = true reth-storage-errors.workspace = true

View File

@ -15,7 +15,7 @@ workspace = true
# reth # reth
reth-chainspec.workspace = true reth-chainspec.workspace = true
reth-eth-wire-types.workspace = true reth-eth-wire-types.workspace = true
reth-primitives.workspace = true reth-primitives = { workspace = true, features = ["c-kzg"] }
reth-execution-types.workspace = true reth-execution-types.workspace = true
reth-fs-util.workspace = true reth-fs-util.workspace = true
reth-provider.workspace = true reth-provider.workspace = true