Skip to content

Commit

Permalink
chore: disable reth-codec default feature (#9556)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsse authored Jul 18, 2024
1 parent 43ffb83 commit 7b4bf59
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ reth-optimism-rpc = { path = "crates/optimism/rpc" }
reth-payload-builder = { path = "crates/payload/builder" }
reth-payload-primitives = { path = "crates/payload/primitives" }
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-provider = { path = "crates/storage/provider" }
reth-prune = { path = "crates/prune/prune" }
Expand Down
2 changes: 2 additions & 0 deletions crates/primitives/src/transaction/eip4844.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ use crate::{
};
use alloy_rlp::{length_of_length, Decodable, Encodable, Header};
use core::mem;

#[cfg(any(test, feature = "reth-codec"))]
use reth_codecs::Compact;

/// To be used with `Option<CompactPlaceholder>` to place or replace one bit on the bitflag struct.
Expand Down
3 changes: 2 additions & 1 deletion crates/primitives/src/transaction/tx_type.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use crate::{U64, U8};
use alloy_rlp::{Decodable, Encodable};
use bytes::Buf;
use serde::{Deserialize, Serialize};

#[cfg(test)]
Expand All @@ -9,6 +8,7 @@ use reth_codecs::Compact;
/// 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
/// single byte.
#[cfg(any(test, feature = "reth-codec"))]
const COMPACT_EXTENDED_IDENTIFIER_FLAG: usize = 3;

/// Identifier for legacy transaction, however [`TxLegacy`](crate::TxLegacy) this is technically not
Expand Down Expand Up @@ -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
// single byte.
fn from_compact(mut buf: &[u8], identifier: usize) -> (Self, &[u8]) {
use bytes::Buf;
(
match identifier {
0 => Self::Legacy,
Expand Down
2 changes: 1 addition & 1 deletion crates/storage/db-api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ workspace = true
[dependencies]
# reth
reth-codecs.workspace = true
reth-primitives.workspace = true
reth-primitives = { workspace = true, features = ["reth-codec"] }
reth-primitives-traits.workspace = true
reth-prune-types.workspace = true
reth-storage-errors.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion crates/storage/db/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ workspace = true
[dependencies]
# reth
reth-db-api.workspace = true
reth-primitives.workspace = true
reth-primitives = { workspace = true, features = ["reth-codec"] }
reth-primitives-traits.workspace = true
reth-fs-util.workspace = true
reth-storage-errors.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion crates/storage/provider/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ workspace = true
reth-chainspec.workspace = true
reth-blockchain-tree-api.workspace = true
reth-execution-types.workspace = true
reth-primitives.workspace = true
reth-primitives = { workspace = true, features = ["reth-codec"] }
reth-fs-util.workspace = true
reth-errors.workspace = true
reth-storage-errors.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion crates/transaction-pool/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ workspace = true
# reth
reth-chainspec.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-fs-util.workspace = true
reth-provider.workspace = true
Expand Down

0 comments on commit 7b4bf59

Please sign in to comment.