Check features powerset in reth-codecs (#10134)

This commit is contained in:
Nikolai Golub
2024-08-06 15:51:54 +02:00
committed by GitHub
parent 199f72804d
commit f4e6a09bf6
7 changed files with 20 additions and 2 deletions

View File

@ -393,7 +393,7 @@ revm-primitives = { version = "7.1.0", features = [
# eth
alloy-chains = "0.1.18"
alloy-dyn-abi = "0.7.2"
alloy-primitives = "0.7.2"
alloy-primitives = { version = "0.7.2", default-features = false }
alloy-rlp = "0.3.4"
alloy-sol-types = "0.7.2"
alloy-trie = { version = "0.4", default-features = false }

View File

@ -467,3 +467,8 @@ pr:
make lint && \
make update-book-cli && \
make test
check-features:
cargo hack check \
--package reth-codecs \
--feature-powerset

View File

@ -42,11 +42,12 @@ proptest-arbitrary-interop.workspace = true
[features]
default = ["std", "alloy"]
std = ["alloy-primitives/std", "bytes/std", "serde/std"]
std = ["alloy-primitives/std", "bytes/std", "serde?/std"]
alloy = [
"dep:alloy-consensus",
"dep:alloy-eips",
"dep:alloy-genesis",
"dep:modular-bitfield",
"dep:alloy-trie",
"dep:serde"
]

View File

@ -2,6 +2,9 @@ use crate::Compact;
use alloy_eips::eip2930::{AccessList, AccessListItem};
use alloy_primitives::Address;
#[cfg(not(feature = "std"))]
use alloc::vec::Vec;
/// Implement `Compact` for `AccessListItem` and `AccessList`.
impl Compact for AccessListItem {
fn to_compact<B>(&self, buf: &mut B) -> usize

View File

@ -4,6 +4,9 @@ use alloy_primitives::{Bytes, B256, U256};
use reth_codecs_derive::reth_codec;
use serde::{Deserialize, Serialize};
#[cfg(not(feature = "std"))]
use alloc::vec::Vec;
/// GenesisAccount acts as bridge which simplifies Compact implementation for AlloyGenesisAccount.
///
/// Notice: Make sure this struct is 1:1 with `alloy_genesis::GenesisAccount`

View File

@ -4,6 +4,9 @@ use crate::Compact;
use alloy_primitives::{Address, Bytes, Log, LogData};
use bytes::BufMut;
#[cfg(not(feature = "std"))]
use alloc::vec::Vec;
/// Implement `Compact` for `LogData` and `Log`.
impl Compact for LogData {
fn to_compact<B>(&self, buf: &mut B) -> usize

View File

@ -5,6 +5,9 @@ use alloy_primitives::B256;
use alloy_trie::{hash_builder::HashBuilderValue, BranchNodeCompact, TrieMask};
use bytes::{Buf, BufMut};
#[cfg(not(feature = "std"))]
use alloc::vec::Vec;
impl Compact for HashBuilderValue {
fn to_compact<B>(&self, buf: &mut B) -> usize
where