From 353468ad41a9c8e91cbf76e00cb7c5ef7c4cf55e Mon Sep 17 00:00:00 2001 From: 0x0 Date: Wed, 28 Feb 2024 21:02:00 -0800 Subject: [PATCH 01/22] add cfg --- crates/blockchain-tree/src/lib.rs | 2 ++ crates/config/src/lib.rs | 2 ++ crates/consensus/auto-seal/src/lib.rs | 2 ++ crates/consensus/beacon-core/src/lib.rs | 2 ++ crates/consensus/beacon/src/lib.rs | 2 ++ crates/consensus/common/src/lib.rs | 2 ++ crates/ethereum-forks/src/lib.rs | 2 ++ crates/etl/src/lib.rs | 2 ++ crates/interfaces/src/lib.rs | 2 ++ crates/metrics/metrics-derive/src/lib.rs | 2 ++ crates/metrics/src/lib.rs | 2 ++ crates/net/common/src/lib.rs | 2 ++ crates/net/discv4/src/lib.rs | 2 ++ crates/net/dns/src/lib.rs | 2 ++ crates/net/downloaders/src/lib.rs | 2 ++ crates/net/ecies/src/lib.rs | 2 ++ crates/net/eth-wire/src/lib.rs | 2 ++ crates/net/nat/src/lib.rs | 2 ++ crates/net/network-api/src/lib.rs | 2 ++ crates/net/network/src/lib.rs | 2 ++ crates/node-api/src/lib.rs | 2 ++ crates/node-builder/src/lib.rs | 2 ++ crates/node-core/src/lib.rs | 2 ++ crates/node-ethereum/src/lib.rs | 2 ++ crates/node-optimism/src/lib.rs | 2 ++ crates/payload/basic/src/lib.rs | 2 ++ crates/payload/builder/src/lib.rs | 2 ++ crates/payload/ethereum/src/lib.rs | 2 ++ crates/payload/optimism/src/lib.rs | 2 ++ crates/payload/validator/src/lib.rs | 2 ++ crates/primitives/src/lib.rs | 2 ++ crates/prune/src/lib.rs | 2 ++ crates/revm/src/lib.rs | 2 ++ crates/rpc/ipc/src/lib.rs | 2 ++ crates/rpc/rpc-api/src/lib.rs | 2 ++ crates/rpc/rpc-builder/src/lib.rs | 2 ++ crates/rpc/rpc-engine-api/src/lib.rs | 2 ++ crates/rpc/rpc-testing-util/src/lib.rs | 2 ++ crates/rpc/rpc-types-compat/src/lib.rs | 2 ++ crates/rpc/rpc-types/src/lib.rs | 2 ++ crates/rpc/rpc/src/lib.rs | 2 ++ crates/stages/src/lib.rs | 2 ++ crates/static-file/src/lib.rs | 2 ++ crates/storage/codecs/derive/src/lib.rs | 2 ++ crates/storage/codecs/src/lib.rs | 2 ++ crates/storage/db/src/lib.rs | 2 ++ crates/storage/libmdbx-rs/mdbx-sys/src/lib.rs | 2 ++ crates/storage/libmdbx-rs/src/lib.rs | 2 ++ crates/storage/nippy-jar/src/lib.rs | 2 ++ crates/storage/provider/src/lib.rs | 2 ++ crates/tasks/src/lib.rs | 2 ++ crates/tokio-util/src/lib.rs | 2 ++ crates/tracing/src/lib.rs | 2 ++ crates/transaction-pool/src/lib.rs | 2 ++ crates/trie/src/lib.rs | 2 ++ 55 files changed, 110 insertions(+) diff --git a/crates/blockchain-tree/src/lib.rs b/crates/blockchain-tree/src/lib.rs index 6bb3d5412b01..70d974752f41 100644 --- a/crates/blockchain-tree/src/lib.rs +++ b/crates/blockchain-tree/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg_attr(not(test), warn(unused_crate_dependencies))] + //! Implementation of a tree-like structure for blockchains. //! //! The [BlockchainTree] can validate, execute, and revert blocks in multiple competing sidechains. diff --git a/crates/config/src/lib.rs b/crates/config/src/lib.rs index 362e814632e3..f2fbca8999bf 100644 --- a/crates/config/src/lib.rs +++ b/crates/config/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg_attr(not(test), warn(unused_crate_dependencies))] + //! Standalone crate for Reth configuration types. #![doc( diff --git a/crates/consensus/auto-seal/src/lib.rs b/crates/consensus/auto-seal/src/lib.rs index bb24e7f50ec3..5861815db016 100644 --- a/crates/consensus/auto-seal/src/lib.rs +++ b/crates/consensus/auto-seal/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg_attr(not(test), warn(unused_crate_dependencies))] + //! A [Consensus] implementation for local testing purposes //! that automatically seals blocks. //! diff --git a/crates/consensus/beacon-core/src/lib.rs b/crates/consensus/beacon-core/src/lib.rs index 3837872ab2ed..c13d2dcd3c20 100644 --- a/crates/consensus/beacon-core/src/lib.rs +++ b/crates/consensus/beacon-core/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg_attr(not(test), warn(unused_crate_dependencies))] + //! Beacon consensus implementation. #![doc( diff --git a/crates/consensus/beacon/src/lib.rs b/crates/consensus/beacon/src/lib.rs index f5486915299b..6d0db8d4bd3b 100644 --- a/crates/consensus/beacon/src/lib.rs +++ b/crates/consensus/beacon/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg_attr(not(test), warn(unused_crate_dependencies))] + //! Beacon consensus implementation. #![doc( diff --git a/crates/consensus/common/src/lib.rs b/crates/consensus/common/src/lib.rs index fce6d957a78e..364ef166c8ad 100644 --- a/crates/consensus/common/src/lib.rs +++ b/crates/consensus/common/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg_attr(not(test), warn(unused_crate_dependencies))] + //! Commonly used consensus methods. #![doc( diff --git a/crates/ethereum-forks/src/lib.rs b/crates/ethereum-forks/src/lib.rs index 87a1759e59c6..9978229e1c8d 100644 --- a/crates/ethereum-forks/src/lib.rs +++ b/crates/ethereum-forks/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg_attr(not(test), warn(unused_crate_dependencies))] + //! Ethereum fork types used in reth. //! //! This crate contains Ethereum fork types and helper functions. diff --git a/crates/etl/src/lib.rs b/crates/etl/src/lib.rs index 0fc865b98d23..239a13b6b1df 100644 --- a/crates/etl/src/lib.rs +++ b/crates/etl/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg_attr(not(test), warn(unused_crate_dependencies))] + //! ETL data collector. //! //! This crate is useful for dumping unsorted data into temporary files and iterating on their diff --git a/crates/interfaces/src/lib.rs b/crates/interfaces/src/lib.rs index 3e92ea592967..ba79537f6512 100644 --- a/crates/interfaces/src/lib.rs +++ b/crates/interfaces/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg_attr(not(test), warn(unused_crate_dependencies))] + //! A collection of shared traits and error types used in Reth. //! //! ## Feature Flags diff --git a/crates/metrics/metrics-derive/src/lib.rs b/crates/metrics/metrics-derive/src/lib.rs index 8b6c3dc7e54f..f320ca759c16 100644 --- a/crates/metrics/metrics-derive/src/lib.rs +++ b/crates/metrics/metrics-derive/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg_attr(not(test), warn(unused_crate_dependencies))] + //! This crate provides [Metrics] derive macro #![doc( diff --git a/crates/metrics/src/lib.rs b/crates/metrics/src/lib.rs index 285e4dc314a2..de5074006146 100644 --- a/crates/metrics/src/lib.rs +++ b/crates/metrics/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg_attr(not(test), warn(unused_crate_dependencies))] + //! Collection of metrics utilities. //! //! ## Feature Flags diff --git a/crates/net/common/src/lib.rs b/crates/net/common/src/lib.rs index d5ad6c704648..6bfafb40065d 100644 --- a/crates/net/common/src/lib.rs +++ b/crates/net/common/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg_attr(not(test), warn(unused_crate_dependencies))] + //! Shared types across `reth-net`. #![doc( diff --git a/crates/net/discv4/src/lib.rs b/crates/net/discv4/src/lib.rs index bdb0119876d0..75d9b7397bfc 100644 --- a/crates/net/discv4/src/lib.rs +++ b/crates/net/discv4/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg_attr(not(test), warn(unused_crate_dependencies))] + //! Discovery v4 implementation: //! //! Discv4 employs a kademlia-like routing table to store and manage discovered peers and topics. diff --git a/crates/net/dns/src/lib.rs b/crates/net/dns/src/lib.rs index d328b7305ff5..d0f3c730d3ff 100644 --- a/crates/net/dns/src/lib.rs +++ b/crates/net/dns/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg_attr(not(test), warn(unused_crate_dependencies))] + //! Implementation of [EIP-1459](https://eips.ethereum.org/EIPS/eip-1459) Node Discovery via DNS. //! //! ## Feature Flags diff --git a/crates/net/downloaders/src/lib.rs b/crates/net/downloaders/src/lib.rs index 9e34173c5a30..734d1d782821 100644 --- a/crates/net/downloaders/src/lib.rs +++ b/crates/net/downloaders/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg_attr(not(test), warn(unused_crate_dependencies))] + //! Implements the downloader algorithms. //! //! ## Feature Flags diff --git a/crates/net/ecies/src/lib.rs b/crates/net/ecies/src/lib.rs index 54cdffb7eb10..1e1177470c8e 100644 --- a/crates/net/ecies/src/lib.rs +++ b/crates/net/ecies/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg_attr(not(test), warn(unused_crate_dependencies))] + //! RLPx ECIES framed transport protocol. #![doc( diff --git a/crates/net/eth-wire/src/lib.rs b/crates/net/eth-wire/src/lib.rs index c4ac8972aff3..062ba0b18cd2 100644 --- a/crates/net/eth-wire/src/lib.rs +++ b/crates/net/eth-wire/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg_attr(not(test), warn(unused_crate_dependencies))] + //! Implementation of the `eth` wire protocol. //! //! ## Feature Flags diff --git a/crates/net/nat/src/lib.rs b/crates/net/nat/src/lib.rs index c7ddcf642aff..e2d3943ca144 100644 --- a/crates/net/nat/src/lib.rs +++ b/crates/net/nat/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg_attr(not(test), warn(unused_crate_dependencies))] + //! Helpers for resolving the external IP. //! //! ## Feature Flags diff --git a/crates/net/network-api/src/lib.rs b/crates/net/network-api/src/lib.rs index c27be7ed6f5a..339882cae7d9 100644 --- a/crates/net/network-api/src/lib.rs +++ b/crates/net/network-api/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg_attr(not(test), warn(unused_crate_dependencies))] + //! Reth network interface definitions. //! //! Provides abstractions for the reth-network crate. diff --git a/crates/net/network/src/lib.rs b/crates/net/network/src/lib.rs index fd1411e90844..c2537fb196d0 100644 --- a/crates/net/network/src/lib.rs +++ b/crates/net/network/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg_attr(not(test), warn(unused_crate_dependencies))] + //! reth P2P networking. //! //! Ethereum's networking protocol is specified in [devp2p](https://github.com/ethereum/devp2p). diff --git a/crates/node-api/src/lib.rs b/crates/node-api/src/lib.rs index b9ef1c60b79e..6903d5ca95fb 100644 --- a/crates/node-api/src/lib.rs +++ b/crates/node-api/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg_attr(not(test), warn(unused_crate_dependencies))] + //! Standalone crate for Reth configuration traits and builder types. #![doc( diff --git a/crates/node-builder/src/lib.rs b/crates/node-builder/src/lib.rs index 39268f491297..b3bd00f96ab7 100644 --- a/crates/node-builder/src/lib.rs +++ b/crates/node-builder/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg_attr(not(test), warn(unused_crate_dependencies))] + //! Standalone crate for Reth configuration and builder types. #![doc( diff --git a/crates/node-core/src/lib.rs b/crates/node-core/src/lib.rs index 8295cc3d67a3..d262bef0b7d1 100644 --- a/crates/node-core/src/lib.rs +++ b/crates/node-core/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg_attr(not(test), warn(unused_crate_dependencies))] + //! The core of the Ethereum node. Collection of utilities and libraries that are used by the node. #![doc( diff --git a/crates/node-ethereum/src/lib.rs b/crates/node-ethereum/src/lib.rs index 641ed37fb5f8..da5762f93a2d 100644 --- a/crates/node-ethereum/src/lib.rs +++ b/crates/node-ethereum/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg_attr(not(test), warn(unused_crate_dependencies))] + //! Standalone crate for ethereum-specific Reth configuration and builder types. #![doc( diff --git a/crates/node-optimism/src/lib.rs b/crates/node-optimism/src/lib.rs index 9525f757b142..74a6532f902a 100644 --- a/crates/node-optimism/src/lib.rs +++ b/crates/node-optimism/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg_attr(not(test), warn(unused_crate_dependencies))] + //! Standalone crate for Optimism-specific Reth configuration and builder types. #![doc( diff --git a/crates/payload/basic/src/lib.rs b/crates/payload/basic/src/lib.rs index 817df8469986..fb70126db016 100644 --- a/crates/payload/basic/src/lib.rs +++ b/crates/payload/basic/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg_attr(not(test), warn(unused_crate_dependencies))] + //! A basic payload generator for reth. #![doc( diff --git a/crates/payload/builder/src/lib.rs b/crates/payload/builder/src/lib.rs index 3a682a40eab1..aca73ef33cff 100644 --- a/crates/payload/builder/src/lib.rs +++ b/crates/payload/builder/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg_attr(not(test), warn(unused_crate_dependencies))] + //! This crate defines abstractions to create and update payloads (blocks): //! - [`PayloadJobGenerator`]: a type that knows how to create new jobs for creating payloads based //! on [`PayloadAttributes`](reth_rpc_types::engine::PayloadAttributes). diff --git a/crates/payload/ethereum/src/lib.rs b/crates/payload/ethereum/src/lib.rs index 37db8246fe71..ebb343cf3b87 100644 --- a/crates/payload/ethereum/src/lib.rs +++ b/crates/payload/ethereum/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg_attr(not(test), warn(unused_crate_dependencies))] + //! A basic Ethereum payload builder implementation. #![doc( diff --git a/crates/payload/optimism/src/lib.rs b/crates/payload/optimism/src/lib.rs index 699e2de27f88..e14e0fa81518 100644 --- a/crates/payload/optimism/src/lib.rs +++ b/crates/payload/optimism/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg_attr(not(test), warn(unused_crate_dependencies))] + //! Optimism's payload builder implementation. #![doc( diff --git a/crates/payload/validator/src/lib.rs b/crates/payload/validator/src/lib.rs index 7f617b09cf42..1513d260490d 100644 --- a/crates/payload/validator/src/lib.rs +++ b/crates/payload/validator/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg_attr(not(test), warn(unused_crate_dependencies))] + //! Payload Validation support. #![doc( diff --git a/crates/primitives/src/lib.rs b/crates/primitives/src/lib.rs index 72ebcdfc9b0e..bccf019e8b12 100644 --- a/crates/primitives/src/lib.rs +++ b/crates/primitives/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg_attr(not(test), warn(unused_crate_dependencies))] + //! Commonly used types in reth. //! //! This crate contains Ethereum primitive types and helper functions. diff --git a/crates/prune/src/lib.rs b/crates/prune/src/lib.rs index b712f9e5b68f..304c2a9ba915 100644 --- a/crates/prune/src/lib.rs +++ b/crates/prune/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg_attr(not(test), warn(unused_crate_dependencies))] + //! Pruning implementation. #![doc( diff --git a/crates/revm/src/lib.rs b/crates/revm/src/lib.rs index 6aace89efd41..3cd61a296794 100644 --- a/crates/revm/src/lib.rs +++ b/crates/revm/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg_attr(not(test), warn(unused_crate_dependencies))] + //! Revm utils and implementations specific to reth. #![doc( diff --git a/crates/rpc/ipc/src/lib.rs b/crates/rpc/ipc/src/lib.rs index 66dacf9be94e..a2e76edc4396 100644 --- a/crates/rpc/ipc/src/lib.rs +++ b/crates/rpc/ipc/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg_attr(not(test), warn(unused_crate_dependencies))] + //! Reth IPC transport implementation //! //! ## Feature Flags diff --git a/crates/rpc/rpc-api/src/lib.rs b/crates/rpc/rpc-api/src/lib.rs index e5a4b1981b67..9dde29c9bf35 100644 --- a/crates/rpc/rpc-api/src/lib.rs +++ b/crates/rpc/rpc-api/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg_attr(not(test), warn(unused_crate_dependencies))] + //! Reth RPC interface definitions //! //! Provides all RPC interfaces. diff --git a/crates/rpc/rpc-builder/src/lib.rs b/crates/rpc/rpc-builder/src/lib.rs index 10262b54ddb9..667f5ead58b5 100644 --- a/crates/rpc/rpc-builder/src/lib.rs +++ b/crates/rpc/rpc-builder/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg_attr(not(test), warn(unused_crate_dependencies))] + //! Configure reth RPC. //! //! This crate contains several builder and config types that allow to configure the selection of diff --git a/crates/rpc/rpc-engine-api/src/lib.rs b/crates/rpc/rpc-engine-api/src/lib.rs index e6e5507e0346..84b8f91036a9 100644 --- a/crates/rpc/rpc-engine-api/src/lib.rs +++ b/crates/rpc/rpc-engine-api/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg_attr(not(test), warn(unused_crate_dependencies))] + //! The implementation of Engine API. //! [Read more](https://github.com/ethereum/execution-apis/tree/main/src/engine). diff --git a/crates/rpc/rpc-testing-util/src/lib.rs b/crates/rpc/rpc-testing-util/src/lib.rs index 047236dc6ecd..8d8661fd6fe3 100644 --- a/crates/rpc/rpc-testing-util/src/lib.rs +++ b/crates/rpc/rpc-testing-util/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg_attr(not(test), warn(unused_crate_dependencies))] + //! Reth RPC testing utilities. #![doc( diff --git a/crates/rpc/rpc-types-compat/src/lib.rs b/crates/rpc/rpc-types-compat/src/lib.rs index 115231670c02..595347462d8d 100644 --- a/crates/rpc/rpc-types-compat/src/lib.rs +++ b/crates/rpc/rpc-types-compat/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg_attr(not(test), warn(unused_crate_dependencies))] + //! Reth compatibility and utils for RPC types //! //! This crate various helper functions to convert between reth primitive types and rpc types. diff --git a/crates/rpc/rpc-types/src/lib.rs b/crates/rpc/rpc-types/src/lib.rs index 414d0b85b037..10563b1d4ac5 100644 --- a/crates/rpc/rpc-types/src/lib.rs +++ b/crates/rpc/rpc-types/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg_attr(not(test), warn(unused_crate_dependencies))] + //! Reth RPC type definitions. //! //! Provides all relevant types for the various RPC endpoints, grouped by namespace. diff --git a/crates/rpc/rpc/src/lib.rs b/crates/rpc/rpc/src/lib.rs index cb068ad78715..9c6d7035dd63 100644 --- a/crates/rpc/rpc/src/lib.rs +++ b/crates/rpc/rpc/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg_attr(not(test), warn(unused_crate_dependencies))] + //! Reth RPC implementation //! //! Provides the implementation of all RPC interfaces. diff --git a/crates/stages/src/lib.rs b/crates/stages/src/lib.rs index c2bceceee2bb..da2934320040 100644 --- a/crates/stages/src/lib.rs +++ b/crates/stages/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg_attr(not(test), warn(unused_crate_dependencies))] + //! Staged syncing primitives for reth. //! //! This crate contains the syncing primitives [`Pipeline`] and [`Stage`], as well as all stages diff --git a/crates/static-file/src/lib.rs b/crates/static-file/src/lib.rs index 2c6c11dfd4ff..825e612ade5d 100644 --- a/crates/static-file/src/lib.rs +++ b/crates/static-file/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg_attr(not(test), warn(unused_crate_dependencies))] + //! Static file producer implementation. #![doc( diff --git a/crates/storage/codecs/derive/src/lib.rs b/crates/storage/codecs/derive/src/lib.rs index eef973c33041..8b9590cda899 100644 --- a/crates/storage/codecs/derive/src/lib.rs +++ b/crates/storage/codecs/derive/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg_attr(not(test), warn(unused_crate_dependencies))] + //! Derive macros for the Compact codec traits. #![doc( diff --git a/crates/storage/codecs/src/lib.rs b/crates/storage/codecs/src/lib.rs index fe72d188f6ba..6a0401f619c5 100644 --- a/crates/storage/codecs/src/lib.rs +++ b/crates/storage/codecs/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg_attr(not(test), warn(unused_crate_dependencies))] + //! Compact codec. #![doc( diff --git a/crates/storage/db/src/lib.rs b/crates/storage/db/src/lib.rs index ea260eaebf89..d1e1d7b8b806 100644 --- a/crates/storage/db/src/lib.rs +++ b/crates/storage/db/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg_attr(not(test), warn(unused_crate_dependencies))] + //! reth's database abstraction layer with concrete implementations. //! //! The database abstraction assumes that the underlying store is a KV store subdivided into tables. diff --git a/crates/storage/libmdbx-rs/mdbx-sys/src/lib.rs b/crates/storage/libmdbx-rs/mdbx-sys/src/lib.rs index 6d42d3f20e71..d641849f3874 100644 --- a/crates/storage/libmdbx-rs/mdbx-sys/src/lib.rs +++ b/crates/storage/libmdbx-rs/mdbx-sys/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg_attr(not(test), warn(unused_crate_dependencies))] + //! [`libmdbx`](https://github.com/erthink/libmdbx) bindings. #![doc( diff --git a/crates/storage/libmdbx-rs/src/lib.rs b/crates/storage/libmdbx-rs/src/lib.rs index 2e02db94f126..a20b2de70641 100644 --- a/crates/storage/libmdbx-rs/src/lib.rs +++ b/crates/storage/libmdbx-rs/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg_attr(not(test), warn(unused_crate_dependencies))] + #![doc = include_str!("../README.md")] #![doc( html_logo_url = "https://raw.githubusercontent.com/paradigmxyz/reth/main/assets/reth-docs.png", diff --git a/crates/storage/nippy-jar/src/lib.rs b/crates/storage/nippy-jar/src/lib.rs index f7b0c7b31a7d..9e32252cc5d2 100644 --- a/crates/storage/nippy-jar/src/lib.rs +++ b/crates/storage/nippy-jar/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg_attr(not(test), warn(unused_crate_dependencies))] + //! Immutable data store format. #![doc( diff --git a/crates/storage/provider/src/lib.rs b/crates/storage/provider/src/lib.rs index a1aa09747569..5ff44801ec8a 100644 --- a/crates/storage/provider/src/lib.rs +++ b/crates/storage/provider/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg_attr(not(test), warn(unused_crate_dependencies))] + //! Collection of traits and trait implementations for common database operations. //! //! ## Feature Flags diff --git a/crates/tasks/src/lib.rs b/crates/tasks/src/lib.rs index 1901c891acae..a45e87f91ae2 100644 --- a/crates/tasks/src/lib.rs +++ b/crates/tasks/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg_attr(not(test), warn(unused_crate_dependencies))] + //! Reth task management. #![doc( diff --git a/crates/tokio-util/src/lib.rs b/crates/tokio-util/src/lib.rs index 072d55ef06af..bf2552164f42 100644 --- a/crates/tokio-util/src/lib.rs +++ b/crates/tokio-util/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg_attr(not(test), warn(unused_crate_dependencies))] + //! Event listeners #![doc( diff --git a/crates/tracing/src/lib.rs b/crates/tracing/src/lib.rs index b469e0ba8667..1a305de254fd 100644 --- a/crates/tracing/src/lib.rs +++ b/crates/tracing/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg_attr(not(test), warn(unused_crate_dependencies))] + //! The `tracing` module provides functionalities for setting up and configuring logging. //! //! It includes structures and functions to create and manage various logging layers: stdout, diff --git a/crates/transaction-pool/src/lib.rs b/crates/transaction-pool/src/lib.rs index 81380423207d..e19300dc3bed 100644 --- a/crates/transaction-pool/src/lib.rs +++ b/crates/transaction-pool/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg_attr(not(test), warn(unused_crate_dependencies))] + //! Reth's transaction pool implementation. //! //! This crate provides a generic transaction pool implementation. diff --git a/crates/trie/src/lib.rs b/crates/trie/src/lib.rs index 5950c3a38f31..abe56500d718 100644 --- a/crates/trie/src/lib.rs +++ b/crates/trie/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg_attr(not(test), warn(unused_crate_dependencies))] + //! The implementation of Merkle Patricia Trie, a cryptographically //! authenticated radix trie that is used to store key-value bindings. //! From c3b10d26648d37c55904074b23f5e32d902d9489 Mon Sep 17 00:00:00 2001 From: 0x0 Date: Wed, 28 Feb 2024 21:58:42 -0800 Subject: [PATCH 02/22] rm bunch of unused dep manually.. --- Cargo.lock | 15 -- crates/blockchain-tree/Cargo.toml | 122 +++++++--- crates/config/Cargo.toml | 63 +++-- crates/net/dns/Cargo.toml | 1 - crates/net/network/Cargo.toml | 300 ++++++++++++++++-------- crates/node-core/Cargo.toml | 3 - crates/node-ethereum/Cargo.toml | 89 ++++--- crates/rpc/rpc-types-compat/Cargo.toml | 45 ++-- crates/rpc/rpc-types/Cargo.toml | 1 - crates/rpc/rpc/Cargo.toml | 255 +++++++++++++------- crates/stages/Cargo.toml | 211 +++++++++++------ crates/storage/codecs/derive/Cargo.toml | 53 +++-- 12 files changed, 769 insertions(+), 389 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 20a05ceab9b2..6bc0a465017c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1408,7 +1408,6 @@ dependencies = [ "parity-scale-codec", "proc-macro2", "quote", - "serde", "similar-asserts", "syn 2.0.50", ] @@ -5901,7 +5900,6 @@ dependencies = [ name = "reth-blockchain-tree" version = "0.1.0-alpha.21" dependencies = [ - "aquamarine", "assert_matches", "linked_hash_set", "lru", @@ -5948,7 +5946,6 @@ dependencies = [ "reth-primitives", "secp256k1 0.27.0", "serde", - "tempfile", "toml", ] @@ -6027,7 +6024,6 @@ dependencies = [ name = "reth-dns-discovery" version = "0.1.0-alpha.21" dependencies = [ - "alloy-chains", "alloy-rlp", "data-encoding", "enr", @@ -6303,8 +6299,6 @@ name = "reth-network" version = "0.1.0-alpha.21" dependencies = [ "alloy-node-bindings", - "alloy-rlp", - "aquamarine", "auto_impl", "criterion", "derive_more", @@ -6436,7 +6430,6 @@ dependencies = [ name = "reth-node-core" version = "0.1.0-alpha.21" dependencies = [ - "alloy-chains", "alloy-rlp", "assert_matches", "clap", @@ -6459,7 +6452,6 @@ dependencies = [ "proptest", "rand 0.8.5", "reth-auto-seal-consensus", - "reth-basic-payload-builder", "reth-beacon-consensus", "reth-blockchain-tree", "reth-config", @@ -6467,7 +6459,6 @@ dependencies = [ "reth-db", "reth-discv4", "reth-downloaders", - "reth-eth-wire", "reth-interfaces", "reth-metrics", "reth-net-nat", @@ -6507,7 +6498,6 @@ dependencies = [ name = "reth-node-ethereum" version = "0.1.0-alpha.21" dependencies = [ - "async-trait", "eyre", "reth-basic-payload-builder", "reth-db", @@ -6521,7 +6511,6 @@ dependencies = [ "reth-rpc-types", "reth-tracing", "reth-transaction-pool", - "revm", "serde", ] @@ -6726,7 +6715,6 @@ dependencies = [ "alloy-sol-types", "assert_matches", "async-trait", - "bytes", "derive_more", "futures", "http", @@ -6871,7 +6859,6 @@ dependencies = [ "alloy-rpc-trace-types", "alloy-rpc-types", "arbitrary", - "bytes", "ethereum_ssz", "ethereum_ssz_derive", "jsonrpsee-types", @@ -6895,7 +6882,6 @@ dependencies = [ "alloy-rpc-types", "reth-primitives", "reth-rpc-types", - "serde_json", ] [[package]] @@ -6903,7 +6889,6 @@ name = "reth-stages" version = "0.1.0-alpha.21" dependencies = [ "alloy-rlp", - "aquamarine", "assert_matches", "auto_impl", "criterion", diff --git a/crates/blockchain-tree/Cargo.toml b/crates/blockchain-tree/Cargo.toml index 2060160d828c..e1949014af35 100644 --- a/crates/blockchain-tree/Cargo.toml +++ b/crates/blockchain-tree/Cargo.toml @@ -1,49 +1,97 @@ [package] name = "reth-blockchain-tree" -version.workspace = true -edition.workspace = true -rust-version.workspace = true -license.workspace = true -homepage.workspace = true -repository.workspace = true [lints] workspace = true [dependencies] -# reth -reth-primitives.workspace = true -reth-interfaces.workspace = true -reth-db.workspace = true -reth-provider.workspace = true -reth-stages.workspace = true -reth-trie.workspace = true - -# common -parking_lot.workspace = true lru = "0.12" -tracing.workspace = true -tokio = { workspace = true, features = ["macros", "sync"] } - -# metrics -reth-metrics = { workspace = true, features = ["common"] } -metrics.workspace = true - -# misc -aquamarine.workspace = true linked_hash_set = "0.1.4" -[dev-dependencies] -reth-db = { workspace = true, features = ["test-utils"] } -reth-interfaces = { workspace = true, features = ["test-utils"] } -reth-primitives = { workspace = true , features = ["test-utils"] } -reth-provider = { workspace = true, features = ["test-utils"] } -reth-revm.workspace = true -reth-node-ethereum.workspace = true -reth-node-optimism.workspace = true -parking_lot.workspace = true -assert_matches.workspace = true - [features] test-utils = [] -optimism = ["reth-primitives/optimism", "reth-interfaces/optimism", "reth-provider/optimism", "reth-revm/optimism"] +optimism = [ "reth-primitives/optimism", "reth-interfaces/optimism", "reth-provider/optimism", "reth-revm/optimism",] + +[package.version] +workspace = true + +[package.edition] +workspace = true + +[package.rust-version] +workspace = true + +[package.license] +workspace = true + +[package.homepage] +workspace = true + +[package.repository] +workspace = true + +[dependencies.reth-primitives] +workspace = true + +[dependencies.reth-interfaces] +workspace = true + +[dependencies.reth-db] +workspace = true + +[dependencies.reth-provider] +workspace = true + +[dependencies.reth-stages] +workspace = true + +[dependencies.reth-trie] +workspace = true + +[dependencies.parking_lot] +workspace = true + +[dependencies.tracing] +workspace = true + +[dependencies.tokio] +workspace = true +features = [ "macros", "sync",] + +[dependencies.reth-metrics] +workspace = true +features = [ "common",] + +[dependencies.metrics] +workspace = true + +[dev-dependencies.reth-db] +workspace = true +features = [ "test-utils",] + +[dev-dependencies.reth-interfaces] +workspace = true +features = [ "test-utils",] + +[dev-dependencies.reth-primitives] +workspace = true +features = [ "test-utils",] + +[dev-dependencies.reth-provider] +workspace = true +features = [ "test-utils",] + +[dev-dependencies.reth-revm] +workspace = true + +[dev-dependencies.reth-node-ethereum] +workspace = true + +[dev-dependencies.reth-node-optimism] +workspace = true + +[dev-dependencies.parking_lot] +workspace = true + +[dev-dependencies.assert_matches] +workspace = true diff --git a/crates/config/Cargo.toml b/crates/config/Cargo.toml index bfb78c339c61..cb5ba20867c1 100644 --- a/crates/config/Cargo.toml +++ b/crates/config/Cargo.toml @@ -1,32 +1,51 @@ [package] name = "reth-config" -version.workspace = true -edition.workspace = true -rust-version.workspace = true -license.workspace = true -homepage.workspace = true -repository.workspace = true [lints] workspace = true -[dependencies] -# reth -reth-network.workspace = true -reth-net-nat.workspace = true -reth-discv4.workspace = true -reth-primitives.workspace = true +[package.version] +workspace = true -# serde -serde.workspace = true -humantime-serde.workspace = true +[package.edition] +workspace = true -# crypto -secp256k1 = { workspace = true, features = ["global-context", "rand-std", "recovery"] } +[package.rust-version] +workspace = true -# misc -tempfile.workspace = true +[package.license] +workspace = true -[dev-dependencies] -confy.workspace = true -toml.workspace = true +[package.homepage] +workspace = true + +[package.repository] +workspace = true + +[dependencies.reth-network] +workspace = true + +[dependencies.reth-net-nat] +workspace = true + +[dependencies.reth-discv4] +workspace = true + +[dependencies.reth-primitives] +workspace = true + +[dependencies.serde] +workspace = true + +[dependencies.humantime-serde] +workspace = true + +[dependencies.secp256k1] +workspace = true +features = [ "global-context", "rand-std", "recovery",] + +[dev-dependencies.confy] +workspace = true + +[dev-dependencies.toml] +workspace = true diff --git a/crates/net/dns/Cargo.toml b/crates/net/dns/Cargo.toml index e706dfc86543..003a6cad7444 100644 --- a/crates/net/dns/Cargo.toml +++ b/crates/net/dns/Cargo.toml @@ -18,7 +18,6 @@ reth-net-common.workspace = true # ethereum alloy-rlp.workspace = true -alloy-chains.workspace = true secp256k1 = { workspace = true, features = ["global-context", "rand-std", "recovery", "serde"] } enr = { workspace = true, default-features = false, features = ["rust-secp256k1"] } diff --git a/crates/net/network/Cargo.toml b/crates/net/network/Cargo.toml index 23b203e206fa..43cfaa74ffde 100644 --- a/crates/net/network/Cargo.toml +++ b/crates/net/network/Cargo.toml @@ -1,112 +1,218 @@ +[[bench]] +name = "bench" +required-features = [ "test-utils",] +harness = false + [package] name = "reth-network" -version.workspace = true -edition.workspace = true -rust-version.workspace = true -license.workspace = true -homepage.workspace = true -repository.workspace = true description = "Ethereum network support" [lints] workspace = true [dependencies] -# reth -reth-interfaces.workspace = true -reth-primitives.workspace = true -reth-net-common.workspace = true -reth-network-api.workspace = true -reth-discv4.workspace = true -reth-dns-discovery.workspace = true -reth-eth-wire.workspace = true -reth-ecies.workspace = true -reth-tasks.workspace = true -reth-transaction-pool.workspace = true -reth-provider.workspace = true -reth-rpc-types.workspace = true -reth-tokio-util.workspace = true - -# ethereum -enr = { workspace = true, features = ["rust-secp256k1"], optional = true } -alloy-rlp.workspace = true - -# async/futures -futures.workspace = true -pin-project.workspace = true -tokio = { workspace = true, features = ["io-util", "net", "macros", "rt-multi-thread", "time"] } -tokio-stream.workspace = true -tokio-util = { workspace = true, features = ["codec"] } - -# io -serde = { workspace = true, optional = true } -humantime-serde = { workspace = true, optional = true } -serde_json = { workspace = true, optional = true } - -# metrics -reth-metrics = { workspace = true, features = ["common"] } -metrics.workspace = true - -# misc auto_impl = "1" -aquamarine.workspace = true -tracing.workspace = true fnv = "1.0" -thiserror.workspace = true -parking_lot.workspace = true linked_hash_set = "0.1" -rand.workspace = true -secp256k1 = { workspace = true, features = ["global-context", "rand-std", "recovery"] } -derive_more.workspace = true -schnellru.workspace = true -itertools.workspace = true -tempfile = { workspace = true, optional = true } -smallvec.workspace = true - -[dev-dependencies] -# reth -reth-discv4 = { workspace = true, features = ["test-utils"] } -reth-interfaces = { workspace = true, features = ["test-utils"] } -reth-primitives = { workspace = true, features = ["test-utils"] } - -# we need to enable the test-utils feature in our own crate to use utils in -# integration tests -reth-network = { workspace = true, features = ["test-utils"] } - -reth-provider = { workspace = true, features = ["test-utils"] } -reth-tracing.workspace = true -reth-transaction-pool = { workspace = true, features = ["test-utils"] } - -alloy-node-bindings.workspace = true -ethers-core = { workspace = true, default-features = false } -ethers-providers = { workspace = true, default-features = false, features = ["ws"] } -ethers-signers = { workspace = true, default-features = false } -ethers-middleware = { workspace = true, default-features = false } - -enr = { workspace = true, features = ["serde", "rust-secp256k1"] } - -# misc -serial_test.workspace = true -tempfile.workspace = true - -## Benchmarks -pprof = { workspace = true, features = ["criterion", "flamegraph"] } -criterion = { workspace = true, features = ["async_tokio", "html_reports"] } [features] -default = ["serde"] -serde = ["dep:serde", "dep:humantime-serde", "secp256k1/serde", "enr?/serde", "dep:serde_json"] -test-utils = ["reth-provider/test-utils", "dep:enr", "dep:tempfile", "reth-transaction-pool/test-utils"] +default = [ "serde",] +serde = [ "dep:serde", "dep:humantime-serde", "secp256k1/serde", "enr?/serde", "dep:serde_json",] +test-utils = [ "reth-provider/test-utils", "dep:enr", "dep:tempfile", "reth-transaction-pool/test-utils",] geth-tests = [] -optimism = [ - "reth-primitives/optimism", - "reth-transaction-pool/optimism", - "reth-provider/optimism", - "reth-network-api/optimism", - "reth-rpc-types/optimism", -] +optimism = [ "reth-primitives/optimism", "reth-transaction-pool/optimism", "reth-provider/optimism", "reth-network-api/optimism", "reth-rpc-types/optimism",] -[[bench]] -name = "bench" -required-features = ["test-utils"] -harness = false +[package.version] +workspace = true + +[package.edition] +workspace = true + +[package.rust-version] +workspace = true + +[package.license] +workspace = true + +[package.homepage] +workspace = true + +[package.repository] +workspace = true + +[dependencies.reth-interfaces] +workspace = true + +[dependencies.reth-primitives] +workspace = true + +[dependencies.reth-net-common] +workspace = true + +[dependencies.reth-network-api] +workspace = true + +[dependencies.reth-discv4] +workspace = true + +[dependencies.reth-dns-discovery] +workspace = true + +[dependencies.reth-eth-wire] +workspace = true + +[dependencies.reth-ecies] +workspace = true + +[dependencies.reth-tasks] +workspace = true + +[dependencies.reth-transaction-pool] +workspace = true + +[dependencies.reth-provider] +workspace = true + +[dependencies.reth-rpc-types] +workspace = true + +[dependencies.reth-tokio-util] +workspace = true + +[dependencies.enr] +workspace = true +features = [ "rust-secp256k1",] +optional = true + +[dependencies.futures] +workspace = true + +[dependencies.pin-project] +workspace = true + +[dependencies.tokio] +workspace = true +features = [ "io-util", "net", "macros", "rt-multi-thread", "time",] + +[dependencies.tokio-stream] +workspace = true + +[dependencies.tokio-util] +workspace = true +features = [ "codec",] + +[dependencies.serde] +workspace = true +optional = true + +[dependencies.humantime-serde] +workspace = true +optional = true + +[dependencies.serde_json] +workspace = true +optional = true + +[dependencies.reth-metrics] +workspace = true +features = [ "common",] + +[dependencies.metrics] +workspace = true + +[dependencies.tracing] +workspace = true + +[dependencies.thiserror] +workspace = true + +[dependencies.parking_lot] +workspace = true + +[dependencies.rand] +workspace = true + +[dependencies.secp256k1] +workspace = true +features = [ "global-context", "rand-std", "recovery",] + +[dependencies.derive_more] +workspace = true + +[dependencies.schnellru] +workspace = true + +[dependencies.itertools] +workspace = true + +[dependencies.tempfile] +workspace = true +optional = true + +[dependencies.smallvec] +workspace = true + +[dev-dependencies.reth-discv4] +workspace = true +features = [ "test-utils",] + +[dev-dependencies.reth-interfaces] +workspace = true +features = [ "test-utils",] + +[dev-dependencies.reth-primitives] +workspace = true +features = [ "test-utils",] + +[dev-dependencies.reth-network] +workspace = true +features = [ "test-utils",] + +[dev-dependencies.reth-provider] +workspace = true +features = [ "test-utils",] + +[dev-dependencies.reth-tracing] +workspace = true + +[dev-dependencies.reth-transaction-pool] +workspace = true +features = [ "test-utils",] + +[dev-dependencies.alloy-node-bindings] +workspace = true + +[dev-dependencies.ethers-core] +workspace = true +default-features = false + +[dev-dependencies.ethers-providers] +workspace = true +default-features = false +features = [ "ws",] + +[dev-dependencies.ethers-signers] +workspace = true +default-features = false + +[dev-dependencies.ethers-middleware] +workspace = true +default-features = false + +[dev-dependencies.enr] +workspace = true +features = [ "serde", "rust-secp256k1",] + +[dev-dependencies.serial_test] +workspace = true + +[dev-dependencies.tempfile] +workspace = true + +[dev-dependencies.pprof] +workspace = true +features = [ "criterion", "flamegraph",] + +[dev-dependencies.criterion] +workspace = true +features = [ "async_tokio", "html_reports",] diff --git a/crates/node-core/Cargo.toml b/crates/node-core/Cargo.toml index 308ae00b15bc..281c4cf3eccf 100644 --- a/crates/node-core/Cargo.toml +++ b/crates/node-core/Cargo.toml @@ -34,7 +34,6 @@ reth-network-api.workspace = true reth-node-api.workspace = true reth-tasks.workspace = true reth-payload-builder.workspace = true -reth-basic-payload-builder.workspace = true reth-consensus-common.workspace = true reth-auto-seal-consensus.workspace = true reth-beacon-consensus.workspace = true @@ -45,7 +44,6 @@ reth-prune.workspace = true reth-blockchain-tree.workspace = true revm-inspectors.workspace = true reth-static-file.workspace = true -reth-eth-wire.workspace = true # `optimism` feature reth-optimism-payload-builder = { workspace = true, optional = true } @@ -85,7 +83,6 @@ tracing.workspace = true # crypto alloy-rlp.workspace = true -alloy-chains.workspace = true secp256k1 = { workspace = true, features = [ "global-context", "rand-std", diff --git a/crates/node-ethereum/Cargo.toml b/crates/node-ethereum/Cargo.toml index 6a8e7246b4af..41ee76b37b94 100644 --- a/crates/node-ethereum/Cargo.toml +++ b/crates/node-ethereum/Cargo.toml @@ -1,36 +1,65 @@ [package] name = "reth-node-ethereum" -version.workspace = true -edition.workspace = true -rust-version.workspace = true -license.workspace = true -homepage.workspace = true -repository.workspace = true [lints] workspace = true -[dependencies] -# reth -reth-primitives.workspace = true -reth-payload-builder.workspace = true -reth-basic-payload-builder.workspace = true -reth-ethereum-payload-builder.workspace = true -reth-rpc-types.workspace = true -reth-node-api.workspace = true -reth-node-builder.workspace = true -reth-tracing.workspace = true -reth-provider.workspace = true -reth-transaction-pool.workspace = true -reth-network.workspace = true -revm.workspace = true - -# async -async-trait.workspace = true - -# misc -eyre.workspace = true -serde.workspace = true - -[dev-dependencies] -reth-db.workspace = true \ No newline at end of file +[package.version] +workspace = true + +[package.edition] +workspace = true + +[package.rust-version] +workspace = true + +[package.license] +workspace = true + +[package.homepage] +workspace = true + +[package.repository] +workspace = true + +[dependencies.reth-primitives] +workspace = true + +[dependencies.reth-payload-builder] +workspace = true + +[dependencies.reth-basic-payload-builder] +workspace = true + +[dependencies.reth-ethereum-payload-builder] +workspace = true + +[dependencies.reth-rpc-types] +workspace = true + +[dependencies.reth-node-api] +workspace = true + +[dependencies.reth-node-builder] +workspace = true + +[dependencies.reth-tracing] +workspace = true + +[dependencies.reth-provider] +workspace = true + +[dependencies.reth-transaction-pool] +workspace = true + +[dependencies.reth-network] +workspace = true + +[dependencies.eyre] +workspace = true + +[dependencies.serde] +workspace = true + +[dev-dependencies.reth-db] +workspace = true diff --git a/crates/rpc/rpc-types-compat/Cargo.toml b/crates/rpc/rpc-types-compat/Cargo.toml index 6dc225ffad9d..833112d22b37 100644 --- a/crates/rpc/rpc-types-compat/Cargo.toml +++ b/crates/rpc/rpc-types-compat/Cargo.toml @@ -1,22 +1,39 @@ [package] name = "reth-rpc-types-compat" -version.workspace = true -edition.workspace = true -rust-version.workspace = true -license.workspace = true -homepage.workspace = true -repository.workspace = true description = "Compatibility layer for reth-primitives and ethereum RPC types" [lints] workspace = true -[dependencies] -reth-primitives.workspace = true -reth-rpc-types.workspace = true -alloy-rlp.workspace = true -alloy-rpc-types.workspace = true -serde_json.workspace = true - [features] -optimism = ["reth-primitives/optimism", "reth-rpc-types/optimism"] +optimism = [ "reth-primitives/optimism", "reth-rpc-types/optimism",] + +[package.version] +workspace = true + +[package.edition] +workspace = true + +[package.rust-version] +workspace = true + +[package.license] +workspace = true + +[package.homepage] +workspace = true + +[package.repository] +workspace = true + +[dependencies.reth-primitives] +workspace = true + +[dependencies.reth-rpc-types] +workspace = true + +[dependencies.alloy-rlp] +workspace = true + +[dependencies.alloy-rpc-types] +workspace = true diff --git a/crates/rpc/rpc-types/Cargo.toml b/crates/rpc/rpc-types/Cargo.toml index 454af97e9301..830924297e58 100644 --- a/crates/rpc/rpc-types/Cargo.toml +++ b/crates/rpc/rpc-types/Cargo.toml @@ -31,7 +31,6 @@ url = "2.3" # necessary so we don't hit a "undeclared 'std'": # https://github.com/paradigmxyz/reth/pull/177#discussion_r1021172198 secp256k1.workspace = true -bytes.workspace = true # arbitrary arbitrary = { workspace = true, features = ["derive"], optional = true } diff --git a/crates/rpc/rpc/Cargo.toml b/crates/rpc/rpc/Cargo.toml index 42f0f4087d88..fa29034022ac 100644 --- a/crates/rpc/rpc/Cargo.toml +++ b/crates/rpc/rpc/Cargo.toml @@ -1,102 +1,185 @@ [package] name = "reth-rpc" -version.workspace = true -edition.workspace = true -rust-version.workspace = true -license.workspace = true -homepage.workspace = true -repository.workspace = true description = "Reth RPC implementation" [lints] workspace = true [dependencies] -# reth -reth-interfaces.workspace = true -reth-primitives.workspace = true -reth-rpc-api.workspace = true -reth-rpc-types.workspace = true -reth-provider = { workspace = true, features = ["test-utils"] } -reth-transaction-pool = { workspace = true, features = ["test-utils"] } -reth-network-api.workspace = true -reth-network.workspace = true -reth-rpc-engine-api.workspace = true -reth-revm = { workspace = true, features = ["js-tracer"] } -reth-tasks.workspace = true -reth-consensus-common.workspace = true -reth-rpc-types-compat.workspace = true -revm-inspectors.workspace = true -reth-node-api.workspace = true - -# eth -alloy-rlp.workspace = true -alloy-dyn-abi = { workspace = true, features = ["eip712"] } -alloy-primitives.workspace = true -alloy-sol-types.workspace = true -revm = { workspace = true, features = [ - "optional_block_gas_limit", - "optional_eip3607", - "optional_no_base_fee", -] } -revm-primitives = { workspace = true, features = ["serde"] } - -# rpc -jsonrpsee.workspace = true http = "0.2.8" http-body = "0.4.5" hyper = "0.14.24" jsonwebtoken = "8" - -## required for optimism sequencer delegation -reqwest = { version = "0.11", default-features = false, features = [ - "rustls-tls", -], optional = true } - -# async -async-trait.workspace = true -tokio = { workspace = true, features = ["sync"] } tower = "0.4" -tokio-stream = { workspace = true, features = ["sync"] } -pin-project.workspace = true -rayon.workspace = true - -# metrics -reth-metrics.workspace = true -metrics.workspace = true - -# misc -bytes.workspace = true -secp256k1 = { workspace = true, features = [ - "global-context", - "rand-std", - "recovery", -] } -serde = { workspace = true, features = ["derive"] } -serde_json.workspace = true -thiserror.workspace = true -rand.workspace = true -tracing.workspace = true tracing-futures = "0.2" -schnellru.workspace = true -futures.workspace = true -derive_more.workspace = true - -[dev-dependencies] -jsonrpsee = { workspace = true, features = ["client"] } -assert_matches.workspace = true -tempfile.workspace = true -reth-interfaces = { workspace = true, features = ["test-utils"] } -reth-node-ethereum.workspace = true -reth-node-optimism.workspace = true [features] -optimism = [ - "dep:reqwest", - "reth-primitives/optimism", - "reth-rpc-types-compat/optimism", - "reth-network-api/optimism", - "reth-network/optimism", - "reth-provider/optimism", - "reth-transaction-pool/optimism", -] +optimism = [ "dep:reqwest", "reth-primitives/optimism", "reth-rpc-types-compat/optimism", "reth-network-api/optimism", "reth-network/optimism", "reth-provider/optimism", "reth-transaction-pool/optimism",] + +[package.version] +workspace = true + +[package.edition] +workspace = true + +[package.rust-version] +workspace = true + +[package.license] +workspace = true + +[package.homepage] +workspace = true + +[package.repository] +workspace = true + +[dependencies.reth-interfaces] +workspace = true + +[dependencies.reth-primitives] +workspace = true + +[dependencies.reth-rpc-api] +workspace = true + +[dependencies.reth-rpc-types] +workspace = true + +[dependencies.reth-provider] +workspace = true +features = [ "test-utils",] + +[dependencies.reth-transaction-pool] +workspace = true +features = [ "test-utils",] + +[dependencies.reth-network-api] +workspace = true + +[dependencies.reth-network] +workspace = true + +[dependencies.reth-rpc-engine-api] +workspace = true + +[dependencies.reth-revm] +workspace = true +features = [ "js-tracer",] + +[dependencies.reth-tasks] +workspace = true + +[dependencies.reth-consensus-common] +workspace = true + +[dependencies.reth-rpc-types-compat] +workspace = true + +[dependencies.revm-inspectors] +workspace = true + +[dependencies.reth-node-api] +workspace = true + +[dependencies.alloy-rlp] +workspace = true + +[dependencies.alloy-dyn-abi] +workspace = true +features = [ "eip712",] + +[dependencies.alloy-primitives] +workspace = true + +[dependencies.alloy-sol-types] +workspace = true + +[dependencies.revm] +workspace = true +features = [ "optional_block_gas_limit", "optional_eip3607", "optional_no_base_fee",] + +[dependencies.revm-primitives] +workspace = true +features = [ "serde",] + +[dependencies.jsonrpsee] +workspace = true + +[dependencies.reqwest] +version = "0.11" +default-features = false +features = [ "rustls-tls",] +optional = true + +[dependencies.async-trait] +workspace = true + +[dependencies.tokio] +workspace = true +features = [ "sync",] + +[dependencies.tokio-stream] +workspace = true +features = [ "sync",] + +[dependencies.pin-project] +workspace = true + +[dependencies.rayon] +workspace = true + +[dependencies.reth-metrics] +workspace = true + +[dependencies.metrics] +workspace = true + +[dependencies.secp256k1] +workspace = true +features = [ "global-context", "rand-std", "recovery",] + +[dependencies.serde] +workspace = true +features = [ "derive",] + +[dependencies.serde_json] +workspace = true + +[dependencies.thiserror] +workspace = true + +[dependencies.rand] +workspace = true + +[dependencies.tracing] +workspace = true + +[dependencies.schnellru] +workspace = true + +[dependencies.futures] +workspace = true + +[dependencies.derive_more] +workspace = true + +[dev-dependencies.jsonrpsee] +workspace = true +features = [ "client",] + +[dev-dependencies.assert_matches] +workspace = true + +[dev-dependencies.tempfile] +workspace = true + +[dev-dependencies.reth-interfaces] +workspace = true +features = [ "test-utils",] + +[dev-dependencies.reth-node-ethereum] +workspace = true + +[dev-dependencies.reth-node-optimism] +workspace = true diff --git a/crates/stages/Cargo.toml b/crates/stages/Cargo.toml index 0cd3e6dd3025..8e87929ac29c 100644 --- a/crates/stages/Cargo.toml +++ b/crates/stages/Cargo.toml @@ -1,83 +1,162 @@ +[[bench]] +name = "criterion" +harness = false +required-features = [ "test-utils",] + [package] name = "reth-stages" -version.workspace = true -edition.workspace = true -rust-version.workspace = true -license.workspace = true -homepage.workspace = true -repository.workspace = true description = "Staged syncing primitives used in reth." [lints] workspace = true [dependencies] -# reth -reth-primitives.workspace = true -reth-interfaces.workspace = true -reth-db.workspace = true -reth-codecs.workspace = true -reth-provider.workspace = true -reth-trie.workspace = true -reth-tokio-util.workspace = true -reth-etl.workspace = true -reth-static-file.workspace = true - -# async -tokio = { workspace = true, features = ["sync"] } -tokio-stream.workspace = true -futures-util.workspace = true - -# observability -tracing.workspace = true - -# io -tempfile.workspace = true - -# metrics -reth-metrics.workspace = true -metrics.workspace = true - -# misc -thiserror.workspace = true -aquamarine.workspace = true -itertools.workspace = true -rayon.workspace = true num-traits = "0.2.15" auto_impl = "1" [dev-dependencies] -# reth -reth-primitives = { workspace = true, features = ["test-utils", "arbitrary"] } -reth-db = { workspace = true, features = ["test-utils", "mdbx"] } -reth-interfaces = { workspace = true, features = ["test-utils"] } -reth-downloaders.workspace = true -reth-eth-wire.workspace = true # TODO(onbjerg): We only need this for [BlockBody] -reth-node-ethereum.workspace = true -reth-node-optimism.workspace = true -reth-blockchain-tree.workspace = true -reth-revm.workspace = true -reth-trie = { workspace = true, features = ["test-utils"] } -reth-provider = { workspace = true, features = ["test-utils"] } - -alloy-rlp.workspace = true -itertools.workspace = true -tokio = { workspace = true, features = ["rt", "sync", "macros"] } -assert_matches.workspace = true -rand.workspace = true paste = "1.0" -# Stage benchmarks -pprof = { workspace = true, features = ["flamegraph", "frame-pointer", "criterion"] } -criterion = { workspace = true, features = ["async_futures"] } +[features] +test-utils = [ "reth-interfaces/test-utils", "reth-db/test-utils", "reth-provider/test-utils",] -# io -serde_json.workspace = true +[package.version] +workspace = true -[features] -test-utils = ["reth-interfaces/test-utils", "reth-db/test-utils", "reth-provider/test-utils"] +[package.edition] +workspace = true -[[bench]] -name = "criterion" -harness = false -required-features = ["test-utils"] +[package.rust-version] +workspace = true + +[package.license] +workspace = true + +[package.homepage] +workspace = true + +[package.repository] +workspace = true + +[dependencies.reth-primitives] +workspace = true + +[dependencies.reth-interfaces] +workspace = true + +[dependencies.reth-db] +workspace = true + +[dependencies.reth-codecs] +workspace = true + +[dependencies.reth-provider] +workspace = true + +[dependencies.reth-trie] +workspace = true + +[dependencies.reth-tokio-util] +workspace = true + +[dependencies.reth-etl] +workspace = true + +[dependencies.reth-static-file] +workspace = true + +[dependencies.tokio] +workspace = true +features = [ "sync",] + +[dependencies.tokio-stream] +workspace = true + +[dependencies.futures-util] +workspace = true + +[dependencies.tracing] +workspace = true + +[dependencies.tempfile] +workspace = true + +[dependencies.reth-metrics] +workspace = true + +[dependencies.metrics] +workspace = true + +[dependencies.thiserror] +workspace = true + +[dependencies.itertools] +workspace = true + +[dependencies.rayon] +workspace = true + +[dev-dependencies.reth-primitives] +workspace = true +features = [ "test-utils", "arbitrary",] + +[dev-dependencies.reth-db] +workspace = true +features = [ "test-utils", "mdbx",] + +[dev-dependencies.reth-interfaces] +workspace = true +features = [ "test-utils",] + +[dev-dependencies.reth-downloaders] +workspace = true + +[dev-dependencies.reth-eth-wire] +workspace = true + +[dev-dependencies.reth-node-ethereum] +workspace = true + +[dev-dependencies.reth-node-optimism] +workspace = true + +[dev-dependencies.reth-blockchain-tree] +workspace = true + +[dev-dependencies.reth-revm] +workspace = true + +[dev-dependencies.reth-trie] +workspace = true +features = [ "test-utils",] + +[dev-dependencies.reth-provider] +workspace = true +features = [ "test-utils",] + +[dev-dependencies.alloy-rlp] +workspace = true + +[dev-dependencies.itertools] +workspace = true + +[dev-dependencies.tokio] +workspace = true +features = [ "rt", "sync", "macros",] + +[dev-dependencies.assert_matches] +workspace = true + +[dev-dependencies.rand] +workspace = true + +[dev-dependencies.pprof] +workspace = true +features = [ "flamegraph", "frame-pointer", "criterion",] + +[dev-dependencies.criterion] +workspace = true +features = [ "async_futures",] + +[dev-dependencies.serde_json] +workspace = true diff --git a/crates/storage/codecs/derive/Cargo.toml b/crates/storage/codecs/derive/Cargo.toml index 825d0ce64459..436c586598b8 100644 --- a/crates/storage/codecs/derive/Cargo.toml +++ b/crates/storage/codecs/derive/Cargo.toml @@ -1,11 +1,5 @@ [package] name = "codecs-derive" -version.workspace = true -edition.workspace = true -rust-version.workspace = true -license.workspace = true -homepage.workspace = true -repository.workspace = true readme = "../README.md" [lints] @@ -15,22 +9,47 @@ workspace = true proc-macro = true [dependencies] -proc-macro2.workspace = true -quote.workspace = true -syn = { workspace = true, features = ["full", "extra-traits"] } convert_case = "0.6.0" -# codecs -serde = { workspace = true, default-features = false } -parity-scale-codec = { version = "3.2.1", features = ["derive", "bytes"] } - -[dev-dependencies] -similar-asserts.workspace = true - [features] -default = ["compact"] +default = [ "compact",] compact = [] scale = [] postcard = [] no_codec = [] optimism = [] + +[package.version] +workspace = true + +[package.edition] +workspace = true + +[package.rust-version] +workspace = true + +[package.license] +workspace = true + +[package.homepage] +workspace = true + +[package.repository] +workspace = true + +[dependencies.proc-macro2] +workspace = true + +[dependencies.quote] +workspace = true + +[dependencies.syn] +workspace = true +features = [ "full", "extra-traits",] + +[dependencies.parity-scale-codec] +version = "3.2.1" +features = [ "derive", "bytes",] + +[dev-dependencies.similar-asserts] +workspace = true From 67b2a042601bbd3a4da240005f0245c4945c478d Mon Sep 17 00:00:00 2001 From: 0x0 Date: Thu, 29 Feb 2024 04:11:40 -0800 Subject: [PATCH 03/22] re-read everything and manually clean up --- Cargo.lock | 3 - crates/blockchain-tree/Cargo.toml | 121 +++------- crates/config/Cargo.toml | 62 ++--- crates/net/network-api/src/lib.rs | 2 - crates/net/network/Cargo.toml | 298 ++++++++---------------- crates/node-core/src/lib.rs | 2 - crates/node-ethereum/Cargo.toml | 85 +++---- crates/rpc/rpc-types-compat/Cargo.toml | 44 ++-- crates/rpc/rpc-types/src/lib.rs | 2 - crates/rpc/rpc/Cargo.toml | 254 +++++++------------- crates/rpc/rpc/src/lib.rs | 2 - crates/static-file/src/lib.rs | 2 - crates/storage/codecs/derive/Cargo.toml | 4 - crates/storage/codecs/src/lib.rs | 2 - crates/transaction-pool/src/lib.rs | 2 - crates/trie/Cargo.toml | 2 - 16 files changed, 275 insertions(+), 612 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6bc0a465017c..9e05c9d5fb10 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1405,7 +1405,6 @@ name = "codecs-derive" version = "0.1.0-alpha.21" dependencies = [ "convert_case 0.6.0", - "parity-scale-codec", "proc-macro2", "quote", "similar-asserts", @@ -7021,7 +7020,6 @@ dependencies = [ name = "reth-trie" version = "0.1.0-alpha.21" dependencies = [ - "alloy-chains", "alloy-rlp", "auto_impl", "criterion", @@ -7029,7 +7027,6 @@ dependencies = [ "once_cell", "proptest", "reth-db", - "reth-interfaces", "reth-primitives", "reth-provider", "revm", diff --git a/crates/blockchain-tree/Cargo.toml b/crates/blockchain-tree/Cargo.toml index e1949014af35..a426b48d10bb 100644 --- a/crates/blockchain-tree/Cargo.toml +++ b/crates/blockchain-tree/Cargo.toml @@ -1,97 +1,48 @@ [package] name = "reth-blockchain-tree" +version.workspace = true +edition.workspace = true +rust-version.workspace = true +license.workspace = true +homepage.workspace = true +repository.workspace = true [lints] workspace = true [dependencies] +# reth +reth-primitives.workspace = true +reth-interfaces.workspace = true +reth-db.workspace = true +reth-provider.workspace = true +reth-stages.workspace = true +reth-trie.workspace = true + +# common +parking_lot.workspace = true lru = "0.12" -linked_hash_set = "0.1.4" - -[features] -test-utils = [] -optimism = [ "reth-primitives/optimism", "reth-interfaces/optimism", "reth-provider/optimism", "reth-revm/optimism",] - -[package.version] -workspace = true - -[package.edition] -workspace = true - -[package.rust-version] -workspace = true - -[package.license] -workspace = true - -[package.homepage] -workspace = true +tracing.workspace = true +tokio = { workspace = true, features = ["macros", "sync"] } -[package.repository] -workspace = true - -[dependencies.reth-primitives] -workspace = true - -[dependencies.reth-interfaces] -workspace = true - -[dependencies.reth-db] -workspace = true +# metrics +reth-metrics = { workspace = true, features = ["common"] } +metrics.workspace = true -[dependencies.reth-provider] -workspace = true - -[dependencies.reth-stages] -workspace = true - -[dependencies.reth-trie] -workspace = true - -[dependencies.parking_lot] -workspace = true - -[dependencies.tracing] -workspace = true - -[dependencies.tokio] -workspace = true -features = [ "macros", "sync",] - -[dependencies.reth-metrics] -workspace = true -features = [ "common",] - -[dependencies.metrics] -workspace = true - -[dev-dependencies.reth-db] -workspace = true -features = [ "test-utils",] - -[dev-dependencies.reth-interfaces] -workspace = true -features = [ "test-utils",] - -[dev-dependencies.reth-primitives] -workspace = true -features = [ "test-utils",] - -[dev-dependencies.reth-provider] -workspace = true -features = [ "test-utils",] - -[dev-dependencies.reth-revm] -workspace = true - -[dev-dependencies.reth-node-ethereum] -workspace = true - -[dev-dependencies.reth-node-optimism] -workspace = true +# misc +linked_hash_set = "0.1.4" -[dev-dependencies.parking_lot] -workspace = true +[dev-dependencies] +reth-db = { workspace = true, features = ["test-utils"] } +reth-interfaces = { workspace = true, features = ["test-utils"] } +reth-primitives = { workspace = true , features = ["test-utils"] } +reth-provider = { workspace = true, features = ["test-utils"] } +reth-revm.workspace = true +reth-node-ethereum.workspace = true +reth-node-optimism.workspace = true +parking_lot.workspace = true +assert_matches.workspace = true -[dev-dependencies.assert_matches] -workspace = true +[features] +test-utils = [] +optimism = ["reth-primitives/optimism", "reth-interfaces/optimism", "reth-provider/optimism", "reth-revm/optimism"] diff --git a/crates/config/Cargo.toml b/crates/config/Cargo.toml index cb5ba20867c1..aee777f69369 100644 --- a/crates/config/Cargo.toml +++ b/crates/config/Cargo.toml @@ -1,51 +1,29 @@ [package] name = "reth-config" +version.workspace = true +edition.workspace = true +rust-version.workspace = true +license.workspace = true +homepage.workspace = true +repository.workspace = true [lints] workspace = true -[package.version] -workspace = true - -[package.edition] -workspace = true - -[package.rust-version] -workspace = true - -[package.license] -workspace = true - -[package.homepage] -workspace = true - -[package.repository] -workspace = true - -[dependencies.reth-network] -workspace = true +[dependencies] +# reth +reth-network.workspace = true +reth-net-nat.workspace = true +reth-discv4.workspace = true +reth-primitives.workspace = true -[dependencies.reth-net-nat] -workspace = true - -[dependencies.reth-discv4] -workspace = true +# serde +serde.workspace = true +humantime-serde.workspace = true -[dependencies.reth-primitives] -workspace = true +# crypto +secp256k1 = { workspace = true, features = ["global-context", "rand-std", "recovery"] } -[dependencies.serde] -workspace = true - -[dependencies.humantime-serde] -workspace = true - -[dependencies.secp256k1] -workspace = true -features = [ "global-context", "rand-std", "recovery",] - -[dev-dependencies.confy] -workspace = true - -[dev-dependencies.toml] -workspace = true +[dev-dependencies] +confy.workspace = true +toml.workspace = true diff --git a/crates/net/network-api/src/lib.rs b/crates/net/network-api/src/lib.rs index 339882cae7d9..c27be7ed6f5a 100644 --- a/crates/net/network-api/src/lib.rs +++ b/crates/net/network-api/src/lib.rs @@ -1,5 +1,3 @@ -#![cfg_attr(not(test), warn(unused_crate_dependencies))] - //! Reth network interface definitions. //! //! Provides abstractions for the reth-network crate. diff --git a/crates/net/network/Cargo.toml b/crates/net/network/Cargo.toml index 43cfaa74ffde..734ad735377d 100644 --- a/crates/net/network/Cargo.toml +++ b/crates/net/network/Cargo.toml @@ -1,218 +1,110 @@ -[[bench]] -name = "bench" -required-features = [ "test-utils",] -harness = false - [package] name = "reth-network" +version.workspace = true +edition.workspace = true +rust-version.workspace = true +license.workspace = true +homepage.workspace = true +repository.workspace = true description = "Ethereum network support" [lints] workspace = true [dependencies] +# reth +reth-interfaces.workspace = true +reth-primitives.workspace = true +reth-net-common.workspace = true +reth-network-api.workspace = true +reth-discv4.workspace = true +reth-dns-discovery.workspace = true +reth-eth-wire.workspace = true +reth-ecies.workspace = true +reth-tasks.workspace = true +reth-transaction-pool.workspace = true +reth-provider.workspace = true +reth-rpc-types.workspace = true +reth-tokio-util.workspace = true + +# ethereum +enr = { workspace = true, features = ["rust-secp256k1"], optional = true } + +# async/futures +futures.workspace = true +pin-project.workspace = true +tokio = { workspace = true, features = ["io-util", "net", "macros", "rt-multi-thread", "time"] } +tokio-stream.workspace = true +tokio-util = { workspace = true, features = ["codec"] } + +# io +serde = { workspace = true, optional = true } +humantime-serde = { workspace = true, optional = true } +serde_json = { workspace = true, optional = true } + +# metrics +reth-metrics = { workspace = true, features = ["common"] } +metrics.workspace = true + +# misc auto_impl = "1" +tracing.workspace = true fnv = "1.0" +thiserror.workspace = true +parking_lot.workspace = true linked_hash_set = "0.1" +rand.workspace = true +secp256k1 = { workspace = true, features = ["global-context", "rand-std", "recovery"] } +derive_more.workspace = true +schnellru.workspace = true +itertools.workspace = true +tempfile = { workspace = true, optional = true } +smallvec.workspace = true + +[dev-dependencies] +# reth +reth-discv4 = { workspace = true, features = ["test-utils"] } +reth-interfaces = { workspace = true, features = ["test-utils"] } +reth-primitives = { workspace = true, features = ["test-utils"] } + +# we need to enable the test-utils feature in our own crate to use utils in +# integration tests +reth-network = { workspace = true, features = ["test-utils"] } + +reth-provider = { workspace = true, features = ["test-utils"] } +reth-tracing.workspace = true +reth-transaction-pool = { workspace = true, features = ["test-utils"] } + +alloy-node-bindings.workspace = true +ethers-core = { workspace = true, default-features = false } +ethers-providers = { workspace = true, default-features = false, features = ["ws"] } +ethers-signers = { workspace = true, default-features = false } +ethers-middleware = { workspace = true, default-features = false } + +enr = { workspace = true, features = ["serde", "rust-secp256k1"] } + +# misc +serial_test.workspace = true +tempfile.workspace = true + +## Benchmarks +pprof = { workspace = true, features = ["criterion", "flamegraph"] } +criterion = { workspace = true, features = ["async_tokio", "html_reports"] } [features] -default = [ "serde",] -serde = [ "dep:serde", "dep:humantime-serde", "secp256k1/serde", "enr?/serde", "dep:serde_json",] -test-utils = [ "reth-provider/test-utils", "dep:enr", "dep:tempfile", "reth-transaction-pool/test-utils",] +default = ["serde"] +serde = ["dep:serde", "dep:humantime-serde", "secp256k1/serde", "enr?/serde", "dep:serde_json"] +test-utils = ["reth-provider/test-utils", "dep:enr", "dep:tempfile", "reth-transaction-pool/test-utils"] geth-tests = [] -optimism = [ "reth-primitives/optimism", "reth-transaction-pool/optimism", "reth-provider/optimism", "reth-network-api/optimism", "reth-rpc-types/optimism",] - -[package.version] -workspace = true - -[package.edition] -workspace = true - -[package.rust-version] -workspace = true - -[package.license] -workspace = true - -[package.homepage] -workspace = true - -[package.repository] -workspace = true - -[dependencies.reth-interfaces] -workspace = true - -[dependencies.reth-primitives] -workspace = true - -[dependencies.reth-net-common] -workspace = true - -[dependencies.reth-network-api] -workspace = true - -[dependencies.reth-discv4] -workspace = true - -[dependencies.reth-dns-discovery] -workspace = true - -[dependencies.reth-eth-wire] -workspace = true - -[dependencies.reth-ecies] -workspace = true - -[dependencies.reth-tasks] -workspace = true - -[dependencies.reth-transaction-pool] -workspace = true - -[dependencies.reth-provider] -workspace = true - -[dependencies.reth-rpc-types] -workspace = true - -[dependencies.reth-tokio-util] -workspace = true - -[dependencies.enr] -workspace = true -features = [ "rust-secp256k1",] -optional = true - -[dependencies.futures] -workspace = true - -[dependencies.pin-project] -workspace = true - -[dependencies.tokio] -workspace = true -features = [ "io-util", "net", "macros", "rt-multi-thread", "time",] - -[dependencies.tokio-stream] -workspace = true - -[dependencies.tokio-util] -workspace = true -features = [ "codec",] - -[dependencies.serde] -workspace = true -optional = true - -[dependencies.humantime-serde] -workspace = true -optional = true - -[dependencies.serde_json] -workspace = true -optional = true +optimism = [ + "reth-primitives/optimism", + "reth-transaction-pool/optimism", + "reth-provider/optimism", + "reth-network-api/optimism", + "reth-rpc-types/optimism", +] -[dependencies.reth-metrics] -workspace = true -features = [ "common",] - -[dependencies.metrics] -workspace = true - -[dependencies.tracing] -workspace = true - -[dependencies.thiserror] -workspace = true - -[dependencies.parking_lot] -workspace = true - -[dependencies.rand] -workspace = true - -[dependencies.secp256k1] -workspace = true -features = [ "global-context", "rand-std", "recovery",] - -[dependencies.derive_more] -workspace = true - -[dependencies.schnellru] -workspace = true - -[dependencies.itertools] -workspace = true - -[dependencies.tempfile] -workspace = true -optional = true - -[dependencies.smallvec] -workspace = true - -[dev-dependencies.reth-discv4] -workspace = true -features = [ "test-utils",] - -[dev-dependencies.reth-interfaces] -workspace = true -features = [ "test-utils",] - -[dev-dependencies.reth-primitives] -workspace = true -features = [ "test-utils",] - -[dev-dependencies.reth-network] -workspace = true -features = [ "test-utils",] - -[dev-dependencies.reth-provider] -workspace = true -features = [ "test-utils",] - -[dev-dependencies.reth-tracing] -workspace = true - -[dev-dependencies.reth-transaction-pool] -workspace = true -features = [ "test-utils",] - -[dev-dependencies.alloy-node-bindings] -workspace = true - -[dev-dependencies.ethers-core] -workspace = true -default-features = false - -[dev-dependencies.ethers-providers] -workspace = true -default-features = false -features = [ "ws",] - -[dev-dependencies.ethers-signers] -workspace = true -default-features = false - -[dev-dependencies.ethers-middleware] -workspace = true -default-features = false - -[dev-dependencies.enr] -workspace = true -features = [ "serde", "rust-secp256k1",] - -[dev-dependencies.serial_test] -workspace = true - -[dev-dependencies.tempfile] -workspace = true - -[dev-dependencies.pprof] -workspace = true -features = [ "criterion", "flamegraph",] - -[dev-dependencies.criterion] -workspace = true -features = [ "async_tokio", "html_reports",] +[[bench]] +name = "bench" +required-features = ["test-utils"] +harness = false diff --git a/crates/node-core/src/lib.rs b/crates/node-core/src/lib.rs index d262bef0b7d1..8295cc3d67a3 100644 --- a/crates/node-core/src/lib.rs +++ b/crates/node-core/src/lib.rs @@ -1,5 +1,3 @@ -#![cfg_attr(not(test), warn(unused_crate_dependencies))] - //! The core of the Ethereum node. Collection of utilities and libraries that are used by the node. #![doc( diff --git a/crates/node-ethereum/Cargo.toml b/crates/node-ethereum/Cargo.toml index 41ee76b37b94..91a59cd72893 100644 --- a/crates/node-ethereum/Cargo.toml +++ b/crates/node-ethereum/Cargo.toml @@ -1,65 +1,32 @@ [package] name = "reth-node-ethereum" +version.workspace = true +edition.workspace = true +rust-version.workspace = true +license.workspace = true +homepage.workspace = true +repository.workspace = true [lints] workspace = true -[package.version] -workspace = true - -[package.edition] -workspace = true - -[package.rust-version] -workspace = true - -[package.license] -workspace = true - -[package.homepage] -workspace = true - -[package.repository] -workspace = true - -[dependencies.reth-primitives] -workspace = true - -[dependencies.reth-payload-builder] -workspace = true - -[dependencies.reth-basic-payload-builder] -workspace = true - -[dependencies.reth-ethereum-payload-builder] -workspace = true - -[dependencies.reth-rpc-types] -workspace = true - -[dependencies.reth-node-api] -workspace = true - -[dependencies.reth-node-builder] -workspace = true - -[dependencies.reth-tracing] -workspace = true - -[dependencies.reth-provider] -workspace = true - -[dependencies.reth-transaction-pool] -workspace = true - -[dependencies.reth-network] -workspace = true - -[dependencies.eyre] -workspace = true - -[dependencies.serde] -workspace = true - -[dev-dependencies.reth-db] -workspace = true +[dependencies] +# reth +reth-primitives.workspace = true +reth-payload-builder.workspace = true +reth-basic-payload-builder.workspace = true +reth-ethereum-payload-builder.workspace = true +reth-rpc-types.workspace = true +reth-node-api.workspace = true +reth-node-builder.workspace = true +reth-tracing.workspace = true +reth-provider.workspace = true +reth-transaction-pool.workspace = true +reth-network.workspace = true + +# misc +eyre.workspace = true +serde.workspace = true + +[dev-dependencies] +reth-db.workspace = true \ No newline at end of file diff --git a/crates/rpc/rpc-types-compat/Cargo.toml b/crates/rpc/rpc-types-compat/Cargo.toml index 833112d22b37..75324fd38dee 100644 --- a/crates/rpc/rpc-types-compat/Cargo.toml +++ b/crates/rpc/rpc-types-compat/Cargo.toml @@ -1,39 +1,21 @@ [package] name = "reth-rpc-types-compat" +version.workspace = true +edition.workspace = true +rust-version.workspace = true +license.workspace = true +homepage.workspace = true +repository.workspace = true description = "Compatibility layer for reth-primitives and ethereum RPC types" [lints] workspace = true -[features] -optimism = [ "reth-primitives/optimism", "reth-rpc-types/optimism",] - -[package.version] -workspace = true - -[package.edition] -workspace = true - -[package.rust-version] -workspace = true - -[package.license] -workspace = true - -[package.homepage] -workspace = true +[dependencies] +reth-primitives.workspace = true +reth-rpc-types.workspace = true +alloy-rlp.workspace = true +alloy-rpc-types.workspace = true -[package.repository] -workspace = true - -[dependencies.reth-primitives] -workspace = true - -[dependencies.reth-rpc-types] -workspace = true - -[dependencies.alloy-rlp] -workspace = true - -[dependencies.alloy-rpc-types] -workspace = true +[features] +optimism = ["reth-primitives/optimism", "reth-rpc-types/optimism"] diff --git a/crates/rpc/rpc-types/src/lib.rs b/crates/rpc/rpc-types/src/lib.rs index 10563b1d4ac5..414d0b85b037 100644 --- a/crates/rpc/rpc-types/src/lib.rs +++ b/crates/rpc/rpc-types/src/lib.rs @@ -1,5 +1,3 @@ -#![cfg_attr(not(test), warn(unused_crate_dependencies))] - //! Reth RPC type definitions. //! //! Provides all relevant types for the various RPC endpoints, grouped by namespace. diff --git a/crates/rpc/rpc/Cargo.toml b/crates/rpc/rpc/Cargo.toml index fa29034022ac..170dbee000eb 100644 --- a/crates/rpc/rpc/Cargo.toml +++ b/crates/rpc/rpc/Cargo.toml @@ -1,185 +1,101 @@ [package] name = "reth-rpc" +version.workspace = true +edition.workspace = true +rust-version.workspace = true +license.workspace = true +homepage.workspace = true +repository.workspace = true description = "Reth RPC implementation" [lints] workspace = true [dependencies] +# reth +reth-interfaces.workspace = true +reth-primitives.workspace = true +reth-rpc-api.workspace = true +reth-rpc-types.workspace = true +reth-provider = { workspace = true, features = ["test-utils"] } +reth-transaction-pool = { workspace = true, features = ["test-utils"] } +reth-network-api.workspace = true +reth-network.workspace = true +reth-rpc-engine-api.workspace = true +reth-revm = { workspace = true, features = ["js-tracer"] } +reth-tasks.workspace = true +reth-consensus-common.workspace = true +reth-rpc-types-compat.workspace = true +revm-inspectors.workspace = true +reth-node-api.workspace = true + +# eth +alloy-rlp.workspace = true +alloy-dyn-abi = { workspace = true, features = ["eip712"] } +alloy-primitives.workspace = true +alloy-sol-types.workspace = true +revm = { workspace = true, features = [ + "optional_block_gas_limit", + "optional_eip3607", + "optional_no_base_fee", +] } +revm-primitives = { workspace = true, features = ["serde"] } + +# rpc +jsonrpsee.workspace = true http = "0.2.8" http-body = "0.4.5" hyper = "0.14.24" jsonwebtoken = "8" + +## required for optimism sequencer delegation +reqwest = { version = "0.11", default-features = false, features = [ + "rustls-tls", +], optional = true } + +# async +async-trait.workspace = true +tokio = { workspace = true, features = ["sync"] } tower = "0.4" +tokio-stream = { workspace = true, features = ["sync"] } +pin-project.workspace = true +rayon.workspace = true + +# metrics +reth-metrics.workspace = true +metrics.workspace = true + +# misc +secp256k1 = { workspace = true, features = [ + "global-context", + "rand-std", + "recovery", +] } +serde = { workspace = true, features = ["derive"] } +serde_json.workspace = true +thiserror.workspace = true +rand.workspace = true +tracing.workspace = true tracing-futures = "0.2" +schnellru.workspace = true +futures.workspace = true +derive_more.workspace = true + +[dev-dependencies] +jsonrpsee = { workspace = true, features = ["client"] } +assert_matches.workspace = true +tempfile.workspace = true +reth-interfaces = { workspace = true, features = ["test-utils"] } +reth-node-ethereum.workspace = true +reth-node-optimism.workspace = true [features] -optimism = [ "dep:reqwest", "reth-primitives/optimism", "reth-rpc-types-compat/optimism", "reth-network-api/optimism", "reth-network/optimism", "reth-provider/optimism", "reth-transaction-pool/optimism",] - -[package.version] -workspace = true - -[package.edition] -workspace = true - -[package.rust-version] -workspace = true - -[package.license] -workspace = true - -[package.homepage] -workspace = true - -[package.repository] -workspace = true - -[dependencies.reth-interfaces] -workspace = true - -[dependencies.reth-primitives] -workspace = true - -[dependencies.reth-rpc-api] -workspace = true - -[dependencies.reth-rpc-types] -workspace = true - -[dependencies.reth-provider] -workspace = true -features = [ "test-utils",] - -[dependencies.reth-transaction-pool] -workspace = true -features = [ "test-utils",] - -[dependencies.reth-network-api] -workspace = true - -[dependencies.reth-network] -workspace = true - -[dependencies.reth-rpc-engine-api] -workspace = true - -[dependencies.reth-revm] -workspace = true -features = [ "js-tracer",] - -[dependencies.reth-tasks] -workspace = true - -[dependencies.reth-consensus-common] -workspace = true - -[dependencies.reth-rpc-types-compat] -workspace = true - -[dependencies.revm-inspectors] -workspace = true - -[dependencies.reth-node-api] -workspace = true - -[dependencies.alloy-rlp] -workspace = true - -[dependencies.alloy-dyn-abi] -workspace = true -features = [ "eip712",] - -[dependencies.alloy-primitives] -workspace = true - -[dependencies.alloy-sol-types] -workspace = true - -[dependencies.revm] -workspace = true -features = [ "optional_block_gas_limit", "optional_eip3607", "optional_no_base_fee",] - -[dependencies.revm-primitives] -workspace = true -features = [ "serde",] - -[dependencies.jsonrpsee] -workspace = true - -[dependencies.reqwest] -version = "0.11" -default-features = false -features = [ "rustls-tls",] -optional = true - -[dependencies.async-trait] -workspace = true - -[dependencies.tokio] -workspace = true -features = [ "sync",] - -[dependencies.tokio-stream] -workspace = true -features = [ "sync",] - -[dependencies.pin-project] -workspace = true - -[dependencies.rayon] -workspace = true - -[dependencies.reth-metrics] -workspace = true - -[dependencies.metrics] -workspace = true - -[dependencies.secp256k1] -workspace = true -features = [ "global-context", "rand-std", "recovery",] - -[dependencies.serde] -workspace = true -features = [ "derive",] - -[dependencies.serde_json] -workspace = true - -[dependencies.thiserror] -workspace = true - -[dependencies.rand] -workspace = true - -[dependencies.tracing] -workspace = true - -[dependencies.schnellru] -workspace = true - -[dependencies.futures] -workspace = true - -[dependencies.derive_more] -workspace = true - -[dev-dependencies.jsonrpsee] -workspace = true -features = [ "client",] - -[dev-dependencies.assert_matches] -workspace = true - -[dev-dependencies.tempfile] -workspace = true - -[dev-dependencies.reth-interfaces] -workspace = true -features = [ "test-utils",] - -[dev-dependencies.reth-node-ethereum] -workspace = true - -[dev-dependencies.reth-node-optimism] -workspace = true +optimism = [ + "dep:reqwest", + "reth-primitives/optimism", + "reth-rpc-types-compat/optimism", + "reth-network-api/optimism", + "reth-network/optimism", + "reth-provider/optimism", + "reth-transaction-pool/optimism", +] diff --git a/crates/rpc/rpc/src/lib.rs b/crates/rpc/rpc/src/lib.rs index 9c6d7035dd63..cb068ad78715 100644 --- a/crates/rpc/rpc/src/lib.rs +++ b/crates/rpc/rpc/src/lib.rs @@ -1,5 +1,3 @@ -#![cfg_attr(not(test), warn(unused_crate_dependencies))] - //! Reth RPC implementation //! //! Provides the implementation of all RPC interfaces. diff --git a/crates/static-file/src/lib.rs b/crates/static-file/src/lib.rs index 825e612ade5d..2c6c11dfd4ff 100644 --- a/crates/static-file/src/lib.rs +++ b/crates/static-file/src/lib.rs @@ -1,5 +1,3 @@ -#![cfg_attr(not(test), warn(unused_crate_dependencies))] - //! Static file producer implementation. #![doc( diff --git a/crates/storage/codecs/derive/Cargo.toml b/crates/storage/codecs/derive/Cargo.toml index 436c586598b8..86574e9d2e88 100644 --- a/crates/storage/codecs/derive/Cargo.toml +++ b/crates/storage/codecs/derive/Cargo.toml @@ -47,9 +47,5 @@ workspace = true workspace = true features = [ "full", "extra-traits",] -[dependencies.parity-scale-codec] -version = "3.2.1" -features = [ "derive", "bytes",] - [dev-dependencies.similar-asserts] workspace = true diff --git a/crates/storage/codecs/src/lib.rs b/crates/storage/codecs/src/lib.rs index 6a0401f619c5..fe72d188f6ba 100644 --- a/crates/storage/codecs/src/lib.rs +++ b/crates/storage/codecs/src/lib.rs @@ -1,5 +1,3 @@ -#![cfg_attr(not(test), warn(unused_crate_dependencies))] - //! Compact codec. #![doc( diff --git a/crates/transaction-pool/src/lib.rs b/crates/transaction-pool/src/lib.rs index e19300dc3bed..81380423207d 100644 --- a/crates/transaction-pool/src/lib.rs +++ b/crates/transaction-pool/src/lib.rs @@ -1,5 +1,3 @@ -#![cfg_attr(not(test), warn(unused_crate_dependencies))] - //! Reth's transaction pool implementation. //! //! This crate provides a generic transaction pool implementation. diff --git a/crates/trie/Cargo.toml b/crates/trie/Cargo.toml index a6bb0bbc3224..d63a72744e79 100644 --- a/crates/trie/Cargo.toml +++ b/crates/trie/Cargo.toml @@ -14,13 +14,11 @@ workspace = true [dependencies] # reth reth-primitives.workspace = true -reth-interfaces.workspace = true reth-db.workspace = true revm.workspace = true # alloy alloy-rlp.workspace = true -alloy-chains.workspace = true # tracing tracing.workspace = true From 8c5fe15d7d975dee9f9a64cd1ff0e7367ec6edc2 Mon Sep 17 00:00:00 2001 From: 0x0 Date: Thu, 29 Feb 2024 04:12:27 -0800 Subject: [PATCH 04/22] nit --- crates/storage/libmdbx-rs/src/lib.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/crates/storage/libmdbx-rs/src/lib.rs b/crates/storage/libmdbx-rs/src/lib.rs index a20b2de70641..cfa46ab6d76b 100644 --- a/crates/storage/libmdbx-rs/src/lib.rs +++ b/crates/storage/libmdbx-rs/src/lib.rs @@ -1,5 +1,4 @@ #![cfg_attr(not(test), warn(unused_crate_dependencies))] - #![doc = include_str!("../README.md")] #![doc( html_logo_url = "https://raw.githubusercontent.com/paradigmxyz/reth/main/assets/reth-docs.png", From 45f91e1baf6b33f8a44746598594d0e2bf42de97 Mon Sep 17 00:00:00 2001 From: 0x0 Date: Thu, 29 Feb 2024 04:25:52 -0800 Subject: [PATCH 05/22] add false positive dep back --- Cargo.lock | 4 ++++ crates/net/network/Cargo.toml | 1 + crates/net/network/src/lib.rs | 2 -- crates/rpc/rpc/Cargo.toml | 1 + crates/trie/Cargo.toml | 2 ++ crates/trie/src/lib.rs | 2 -- 6 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9e05c9d5fb10..b77cc659c6ef 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6298,6 +6298,7 @@ name = "reth-network" version = "0.1.0-alpha.21" dependencies = [ "alloy-node-bindings", + "aquamarine", "auto_impl", "criterion", "derive_more", @@ -6714,6 +6715,7 @@ dependencies = [ "alloy-sol-types", "assert_matches", "async-trait", + "bytes", "derive_more", "futures", "http", @@ -7020,6 +7022,7 @@ dependencies = [ name = "reth-trie" version = "0.1.0-alpha.21" dependencies = [ + "alloy-chains", "alloy-rlp", "auto_impl", "criterion", @@ -7027,6 +7030,7 @@ dependencies = [ "once_cell", "proptest", "reth-db", + "reth-interfaces", "reth-primitives", "reth-provider", "revm", diff --git a/crates/net/network/Cargo.toml b/crates/net/network/Cargo.toml index 734ad735377d..13bd14632294 100644 --- a/crates/net/network/Cargo.toml +++ b/crates/net/network/Cargo.toml @@ -48,6 +48,7 @@ metrics.workspace = true # misc auto_impl = "1" +aquamarine.workspace = true tracing.workspace = true fnv = "1.0" thiserror.workspace = true diff --git a/crates/net/network/src/lib.rs b/crates/net/network/src/lib.rs index c2537fb196d0..fd1411e90844 100644 --- a/crates/net/network/src/lib.rs +++ b/crates/net/network/src/lib.rs @@ -1,5 +1,3 @@ -#![cfg_attr(not(test), warn(unused_crate_dependencies))] - //! reth P2P networking. //! //! Ethereum's networking protocol is specified in [devp2p](https://github.com/ethereum/devp2p). diff --git a/crates/rpc/rpc/Cargo.toml b/crates/rpc/rpc/Cargo.toml index 170dbee000eb..42f0f4087d88 100644 --- a/crates/rpc/rpc/Cargo.toml +++ b/crates/rpc/rpc/Cargo.toml @@ -66,6 +66,7 @@ reth-metrics.workspace = true metrics.workspace = true # misc +bytes.workspace = true secp256k1 = { workspace = true, features = [ "global-context", "rand-std", diff --git a/crates/trie/Cargo.toml b/crates/trie/Cargo.toml index d63a72744e79..a6bb0bbc3224 100644 --- a/crates/trie/Cargo.toml +++ b/crates/trie/Cargo.toml @@ -14,11 +14,13 @@ workspace = true [dependencies] # reth reth-primitives.workspace = true +reth-interfaces.workspace = true reth-db.workspace = true revm.workspace = true # alloy alloy-rlp.workspace = true +alloy-chains.workspace = true # tracing tracing.workspace = true diff --git a/crates/trie/src/lib.rs b/crates/trie/src/lib.rs index abe56500d718..5950c3a38f31 100644 --- a/crates/trie/src/lib.rs +++ b/crates/trie/src/lib.rs @@ -1,5 +1,3 @@ -#![cfg_attr(not(test), warn(unused_crate_dependencies))] - //! The implementation of Merkle Patricia Trie, a cryptographically //! authenticated radix trie that is used to store key-value bindings. //! From 9227beca8aaf227c118f784eaf0d75b8ee509a0b Mon Sep 17 00:00:00 2001 From: 0x0 Date: Thu, 29 Feb 2024 04:29:58 -0800 Subject: [PATCH 06/22] . --- Cargo.lock | 1 + crates/stages/Cargo.toml | 211 ++++++++++++--------------------------- crates/stages/src/lib.rs | 2 - 3 files changed, 67 insertions(+), 147 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b77cc659c6ef..bcd431704023 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6890,6 +6890,7 @@ name = "reth-stages" version = "0.1.0-alpha.21" dependencies = [ "alloy-rlp", + "aquamarine", "assert_matches", "auto_impl", "criterion", diff --git a/crates/stages/Cargo.toml b/crates/stages/Cargo.toml index 8e87929ac29c..0cd3e6dd3025 100644 --- a/crates/stages/Cargo.toml +++ b/crates/stages/Cargo.toml @@ -1,162 +1,83 @@ -[[bench]] -name = "criterion" -harness = false -required-features = [ "test-utils",] - [package] name = "reth-stages" +version.workspace = true +edition.workspace = true +rust-version.workspace = true +license.workspace = true +homepage.workspace = true +repository.workspace = true description = "Staged syncing primitives used in reth." [lints] workspace = true [dependencies] +# reth +reth-primitives.workspace = true +reth-interfaces.workspace = true +reth-db.workspace = true +reth-codecs.workspace = true +reth-provider.workspace = true +reth-trie.workspace = true +reth-tokio-util.workspace = true +reth-etl.workspace = true +reth-static-file.workspace = true + +# async +tokio = { workspace = true, features = ["sync"] } +tokio-stream.workspace = true +futures-util.workspace = true + +# observability +tracing.workspace = true + +# io +tempfile.workspace = true + +# metrics +reth-metrics.workspace = true +metrics.workspace = true + +# misc +thiserror.workspace = true +aquamarine.workspace = true +itertools.workspace = true +rayon.workspace = true num-traits = "0.2.15" auto_impl = "1" [dev-dependencies] +# reth +reth-primitives = { workspace = true, features = ["test-utils", "arbitrary"] } +reth-db = { workspace = true, features = ["test-utils", "mdbx"] } +reth-interfaces = { workspace = true, features = ["test-utils"] } +reth-downloaders.workspace = true +reth-eth-wire.workspace = true # TODO(onbjerg): We only need this for [BlockBody] +reth-node-ethereum.workspace = true +reth-node-optimism.workspace = true +reth-blockchain-tree.workspace = true +reth-revm.workspace = true +reth-trie = { workspace = true, features = ["test-utils"] } +reth-provider = { workspace = true, features = ["test-utils"] } + +alloy-rlp.workspace = true +itertools.workspace = true +tokio = { workspace = true, features = ["rt", "sync", "macros"] } +assert_matches.workspace = true +rand.workspace = true paste = "1.0" -[features] -test-utils = [ "reth-interfaces/test-utils", "reth-db/test-utils", "reth-provider/test-utils",] - -[package.version] -workspace = true - -[package.edition] -workspace = true - -[package.rust-version] -workspace = true - -[package.license] -workspace = true - -[package.homepage] -workspace = true - -[package.repository] -workspace = true - -[dependencies.reth-primitives] -workspace = true - -[dependencies.reth-interfaces] -workspace = true - -[dependencies.reth-db] -workspace = true - -[dependencies.reth-codecs] -workspace = true - -[dependencies.reth-provider] -workspace = true - -[dependencies.reth-trie] -workspace = true - -[dependencies.reth-tokio-util] -workspace = true - -[dependencies.reth-etl] -workspace = true - -[dependencies.reth-static-file] -workspace = true - -[dependencies.tokio] -workspace = true -features = [ "sync",] - -[dependencies.tokio-stream] -workspace = true - -[dependencies.futures-util] -workspace = true - -[dependencies.tracing] -workspace = true - -[dependencies.tempfile] -workspace = true - -[dependencies.reth-metrics] -workspace = true - -[dependencies.metrics] -workspace = true - -[dependencies.thiserror] -workspace = true - -[dependencies.itertools] -workspace = true - -[dependencies.rayon] -workspace = true - -[dev-dependencies.reth-primitives] -workspace = true -features = [ "test-utils", "arbitrary",] - -[dev-dependencies.reth-db] -workspace = true -features = [ "test-utils", "mdbx",] - -[dev-dependencies.reth-interfaces] -workspace = true -features = [ "test-utils",] - -[dev-dependencies.reth-downloaders] -workspace = true - -[dev-dependencies.reth-eth-wire] -workspace = true - -[dev-dependencies.reth-node-ethereum] -workspace = true - -[dev-dependencies.reth-node-optimism] -workspace = true +# Stage benchmarks +pprof = { workspace = true, features = ["flamegraph", "frame-pointer", "criterion"] } +criterion = { workspace = true, features = ["async_futures"] } -[dev-dependencies.reth-blockchain-tree] -workspace = true +# io +serde_json.workspace = true -[dev-dependencies.reth-revm] -workspace = true - -[dev-dependencies.reth-trie] -workspace = true -features = [ "test-utils",] - -[dev-dependencies.reth-provider] -workspace = true -features = [ "test-utils",] - -[dev-dependencies.alloy-rlp] -workspace = true - -[dev-dependencies.itertools] -workspace = true - -[dev-dependencies.tokio] -workspace = true -features = [ "rt", "sync", "macros",] - -[dev-dependencies.assert_matches] -workspace = true - -[dev-dependencies.rand] -workspace = true - -[dev-dependencies.pprof] -workspace = true -features = [ "flamegraph", "frame-pointer", "criterion",] - -[dev-dependencies.criterion] -workspace = true -features = [ "async_futures",] +[features] +test-utils = ["reth-interfaces/test-utils", "reth-db/test-utils", "reth-provider/test-utils"] -[dev-dependencies.serde_json] -workspace = true +[[bench]] +name = "criterion" +harness = false +required-features = ["test-utils"] diff --git a/crates/stages/src/lib.rs b/crates/stages/src/lib.rs index da2934320040..c2bceceee2bb 100644 --- a/crates/stages/src/lib.rs +++ b/crates/stages/src/lib.rs @@ -1,5 +1,3 @@ -#![cfg_attr(not(test), warn(unused_crate_dependencies))] - //! Staged syncing primitives for reth. //! //! This crate contains the syncing primitives [`Pipeline`] and [`Stage`], as well as all stages From 0af29e4d63219b4da3c5fe5d243d0b45abc466e3 Mon Sep 17 00:00:00 2001 From: 0x0 Date: Thu, 29 Feb 2024 04:34:04 -0800 Subject: [PATCH 07/22] . --- crates/node-core/Cargo.toml | 3 +++ crates/node-optimism/Cargo.toml | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/node-core/Cargo.toml b/crates/node-core/Cargo.toml index 281c4cf3eccf..308ae00b15bc 100644 --- a/crates/node-core/Cargo.toml +++ b/crates/node-core/Cargo.toml @@ -34,6 +34,7 @@ reth-network-api.workspace = true reth-node-api.workspace = true reth-tasks.workspace = true reth-payload-builder.workspace = true +reth-basic-payload-builder.workspace = true reth-consensus-common.workspace = true reth-auto-seal-consensus.workspace = true reth-beacon-consensus.workspace = true @@ -44,6 +45,7 @@ reth-prune.workspace = true reth-blockchain-tree.workspace = true revm-inspectors.workspace = true reth-static-file.workspace = true +reth-eth-wire.workspace = true # `optimism` feature reth-optimism-payload-builder = { workspace = true, optional = true } @@ -83,6 +85,7 @@ tracing.workspace = true # crypto alloy-rlp.workspace = true +alloy-chains.workspace = true secp256k1 = { workspace = true, features = [ "global-context", "rand-std", diff --git a/crates/node-optimism/Cargo.toml b/crates/node-optimism/Cargo.toml index b5fd7a088fd0..ad1654615d1c 100644 --- a/crates/node-optimism/Cargo.toml +++ b/crates/node-optimism/Cargo.toml @@ -18,7 +18,6 @@ reth-basic-payload-builder.workspace = true reth-optimism-payload-builder.workspace = true reth-rpc-types.workspace = true reth-rpc.workspace = true -reth-rpc-types-compat.workspace = true reth-node-api.workspace = true reth-node-builder.workspace = true reth-tracing.workspace = true From 29a1e862170172ad8c4a96580d7971c53ee14bbe Mon Sep 17 00:00:00 2001 From: 0x0 Date: Thu, 29 Feb 2024 04:36:20 -0800 Subject: [PATCH 08/22] . --- Cargo.lock | 3 +++ crates/node-optimism/Cargo.toml | 1 + crates/node-optimism/src/lib.rs | 2 -- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index bcd431704023..8005d928b6b5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6430,6 +6430,7 @@ dependencies = [ name = "reth-node-core" version = "0.1.0-alpha.21" dependencies = [ + "alloy-chains", "alloy-rlp", "assert_matches", "clap", @@ -6452,6 +6453,7 @@ dependencies = [ "proptest", "rand 0.8.5", "reth-auto-seal-consensus", + "reth-basic-payload-builder", "reth-beacon-consensus", "reth-blockchain-tree", "reth-config", @@ -6459,6 +6461,7 @@ dependencies = [ "reth-db", "reth-discv4", "reth-downloaders", + "reth-eth-wire", "reth-interfaces", "reth-metrics", "reth-net-nat", diff --git a/crates/node-optimism/Cargo.toml b/crates/node-optimism/Cargo.toml index ad1654615d1c..b5fd7a088fd0 100644 --- a/crates/node-optimism/Cargo.toml +++ b/crates/node-optimism/Cargo.toml @@ -18,6 +18,7 @@ reth-basic-payload-builder.workspace = true reth-optimism-payload-builder.workspace = true reth-rpc-types.workspace = true reth-rpc.workspace = true +reth-rpc-types-compat.workspace = true reth-node-api.workspace = true reth-node-builder.workspace = true reth-tracing.workspace = true diff --git a/crates/node-optimism/src/lib.rs b/crates/node-optimism/src/lib.rs index 74a6532f902a..9525f757b142 100644 --- a/crates/node-optimism/src/lib.rs +++ b/crates/node-optimism/src/lib.rs @@ -1,5 +1,3 @@ -#![cfg_attr(not(test), warn(unused_crate_dependencies))] - //! Standalone crate for Optimism-specific Reth configuration and builder types. #![doc( From 6ea9c3e9f1a085a2c66a864c5aab4fd7ee8b5f1e Mon Sep 17 00:00:00 2001 From: 0x0 Date: Thu, 29 Feb 2024 04:42:20 -0800 Subject: [PATCH 09/22] :-( --- Cargo.lock | 2 +- crates/net/network/Cargo.toml | 302 +++++++++++++++++++++++----------- 2 files changed, 207 insertions(+), 97 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8005d928b6b5..dac789f45322 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6298,7 +6298,7 @@ name = "reth-network" version = "0.1.0-alpha.21" dependencies = [ "alloy-node-bindings", - "aquamarine", + "alloy-rlp", "auto_impl", "criterion", "derive_more", diff --git a/crates/net/network/Cargo.toml b/crates/net/network/Cargo.toml index 13bd14632294..6f511acc50e9 100644 --- a/crates/net/network/Cargo.toml +++ b/crates/net/network/Cargo.toml @@ -1,111 +1,221 @@ +[[bench]] +name = "bench" +required-features = [ "test-utils",] +harness = false + [package] name = "reth-network" -version.workspace = true -edition.workspace = true -rust-version.workspace = true -license.workspace = true -homepage.workspace = true -repository.workspace = true description = "Ethereum network support" [lints] workspace = true [dependencies] -# reth -reth-interfaces.workspace = true -reth-primitives.workspace = true -reth-net-common.workspace = true -reth-network-api.workspace = true -reth-discv4.workspace = true -reth-dns-discovery.workspace = true -reth-eth-wire.workspace = true -reth-ecies.workspace = true -reth-tasks.workspace = true -reth-transaction-pool.workspace = true -reth-provider.workspace = true -reth-rpc-types.workspace = true -reth-tokio-util.workspace = true - -# ethereum -enr = { workspace = true, features = ["rust-secp256k1"], optional = true } - -# async/futures -futures.workspace = true -pin-project.workspace = true -tokio = { workspace = true, features = ["io-util", "net", "macros", "rt-multi-thread", "time"] } -tokio-stream.workspace = true -tokio-util = { workspace = true, features = ["codec"] } - -# io -serde = { workspace = true, optional = true } -humantime-serde = { workspace = true, optional = true } -serde_json = { workspace = true, optional = true } - -# metrics -reth-metrics = { workspace = true, features = ["common"] } -metrics.workspace = true - -# misc auto_impl = "1" -aquamarine.workspace = true -tracing.workspace = true fnv = "1.0" -thiserror.workspace = true -parking_lot.workspace = true linked_hash_set = "0.1" -rand.workspace = true -secp256k1 = { workspace = true, features = ["global-context", "rand-std", "recovery"] } -derive_more.workspace = true -schnellru.workspace = true -itertools.workspace = true -tempfile = { workspace = true, optional = true } -smallvec.workspace = true - -[dev-dependencies] -# reth -reth-discv4 = { workspace = true, features = ["test-utils"] } -reth-interfaces = { workspace = true, features = ["test-utils"] } -reth-primitives = { workspace = true, features = ["test-utils"] } - -# we need to enable the test-utils feature in our own crate to use utils in -# integration tests -reth-network = { workspace = true, features = ["test-utils"] } - -reth-provider = { workspace = true, features = ["test-utils"] } -reth-tracing.workspace = true -reth-transaction-pool = { workspace = true, features = ["test-utils"] } - -alloy-node-bindings.workspace = true -ethers-core = { workspace = true, default-features = false } -ethers-providers = { workspace = true, default-features = false, features = ["ws"] } -ethers-signers = { workspace = true, default-features = false } -ethers-middleware = { workspace = true, default-features = false } - -enr = { workspace = true, features = ["serde", "rust-secp256k1"] } - -# misc -serial_test.workspace = true -tempfile.workspace = true - -## Benchmarks -pprof = { workspace = true, features = ["criterion", "flamegraph"] } -criterion = { workspace = true, features = ["async_tokio", "html_reports"] } [features] -default = ["serde"] -serde = ["dep:serde", "dep:humantime-serde", "secp256k1/serde", "enr?/serde", "dep:serde_json"] -test-utils = ["reth-provider/test-utils", "dep:enr", "dep:tempfile", "reth-transaction-pool/test-utils"] +default = [ "serde",] +serde = [ "dep:serde", "dep:humantime-serde", "secp256k1/serde", "enr?/serde", "dep:serde_json",] +test-utils = [ "reth-provider/test-utils", "dep:enr", "dep:tempfile", "reth-transaction-pool/test-utils",] geth-tests = [] -optimism = [ - "reth-primitives/optimism", - "reth-transaction-pool/optimism", - "reth-provider/optimism", - "reth-network-api/optimism", - "reth-rpc-types/optimism", -] +optimism = [ "reth-primitives/optimism", "reth-transaction-pool/optimism", "reth-provider/optimism", "reth-network-api/optimism", "reth-rpc-types/optimism",] -[[bench]] -name = "bench" -required-features = ["test-utils"] -harness = false +[package.version] +workspace = true + +[package.edition] +workspace = true + +[package.rust-version] +workspace = true + +[package.license] +workspace = true + +[package.homepage] +workspace = true + +[package.repository] +workspace = true + +[dependencies.reth-interfaces] +workspace = true + +[dependencies.reth-primitives] +workspace = true + +[dependencies.reth-net-common] +workspace = true + +[dependencies.reth-network-api] +workspace = true + +[dependencies.reth-discv4] +workspace = true + +[dependencies.reth-dns-discovery] +workspace = true + +[dependencies.reth-eth-wire] +workspace = true + +[dependencies.reth-ecies] +workspace = true + +[dependencies.reth-tasks] +workspace = true + +[dependencies.reth-transaction-pool] +workspace = true + +[dependencies.reth-provider] +workspace = true + +[dependencies.reth-rpc-types] +workspace = true + +[dependencies.reth-tokio-util] +workspace = true + +[dependencies.enr] +workspace = true +features = [ "rust-secp256k1",] +optional = true + +[dependencies.alloy-rlp] +workspace = true + +[dependencies.futures] +workspace = true + +[dependencies.pin-project] +workspace = true + +[dependencies.tokio] +workspace = true +features = [ "io-util", "net", "macros", "rt-multi-thread", "time",] + +[dependencies.tokio-stream] +workspace = true + +[dependencies.tokio-util] +workspace = true +features = [ "codec",] + +[dependencies.serde] +workspace = true +optional = true + +[dependencies.humantime-serde] +workspace = true +optional = true + +[dependencies.serde_json] +workspace = true +optional = true + +[dependencies.reth-metrics] +workspace = true +features = [ "common",] + +[dependencies.metrics] +workspace = true + +[dependencies.tracing] +workspace = true + +[dependencies.thiserror] +workspace = true + +[dependencies.parking_lot] +workspace = true + +[dependencies.rand] +workspace = true + +[dependencies.secp256k1] +workspace = true +features = [ "global-context", "rand-std", "recovery",] + +[dependencies.derive_more] +workspace = true + +[dependencies.schnellru] +workspace = true + +[dependencies.itertools] +workspace = true + +[dependencies.tempfile] +workspace = true +optional = true + +[dependencies.smallvec] +workspace = true + +[dev-dependencies.reth-discv4] +workspace = true +features = [ "test-utils",] + +[dev-dependencies.reth-interfaces] +workspace = true +features = [ "test-utils",] + +[dev-dependencies.reth-primitives] +workspace = true +features = [ "test-utils",] + +[dev-dependencies.reth-network] +workspace = true +features = [ "test-utils",] + +[dev-dependencies.reth-provider] +workspace = true +features = [ "test-utils",] + +[dev-dependencies.reth-tracing] +workspace = true + +[dev-dependencies.reth-transaction-pool] +workspace = true +features = [ "test-utils",] + +[dev-dependencies.alloy-node-bindings] +workspace = true + +[dev-dependencies.ethers-core] +workspace = true +default-features = false + +[dev-dependencies.ethers-providers] +workspace = true +default-features = false +features = [ "ws",] + +[dev-dependencies.ethers-signers] +workspace = true +default-features = false + +[dev-dependencies.ethers-middleware] +workspace = true +default-features = false + +[dev-dependencies.enr] +workspace = true +features = [ "serde", "rust-secp256k1",] + +[dev-dependencies.serial_test] +workspace = true + +[dev-dependencies.tempfile] +workspace = true + +[dev-dependencies.pprof] +workspace = true +features = [ "criterion", "flamegraph",] + +[dev-dependencies.criterion] +workspace = true +features = [ "async_tokio", "html_reports",] From 7f07bdcd8f9cff7ce7b5aefb3b0c4eb32d69d057 Mon Sep 17 00:00:00 2001 From: 0x0 Date: Thu, 29 Feb 2024 04:45:38 -0800 Subject: [PATCH 10/22] :-( :=-)== --- crates/net/network/Cargo.toml | 303 +++++++++++----------------------- 1 file changed, 97 insertions(+), 206 deletions(-) diff --git a/crates/net/network/Cargo.toml b/crates/net/network/Cargo.toml index 6f511acc50e9..23b203e206fa 100644 --- a/crates/net/network/Cargo.toml +++ b/crates/net/network/Cargo.toml @@ -1,221 +1,112 @@ -[[bench]] -name = "bench" -required-features = [ "test-utils",] -harness = false - [package] name = "reth-network" +version.workspace = true +edition.workspace = true +rust-version.workspace = true +license.workspace = true +homepage.workspace = true +repository.workspace = true description = "Ethereum network support" [lints] workspace = true [dependencies] +# reth +reth-interfaces.workspace = true +reth-primitives.workspace = true +reth-net-common.workspace = true +reth-network-api.workspace = true +reth-discv4.workspace = true +reth-dns-discovery.workspace = true +reth-eth-wire.workspace = true +reth-ecies.workspace = true +reth-tasks.workspace = true +reth-transaction-pool.workspace = true +reth-provider.workspace = true +reth-rpc-types.workspace = true +reth-tokio-util.workspace = true + +# ethereum +enr = { workspace = true, features = ["rust-secp256k1"], optional = true } +alloy-rlp.workspace = true + +# async/futures +futures.workspace = true +pin-project.workspace = true +tokio = { workspace = true, features = ["io-util", "net", "macros", "rt-multi-thread", "time"] } +tokio-stream.workspace = true +tokio-util = { workspace = true, features = ["codec"] } + +# io +serde = { workspace = true, optional = true } +humantime-serde = { workspace = true, optional = true } +serde_json = { workspace = true, optional = true } + +# metrics +reth-metrics = { workspace = true, features = ["common"] } +metrics.workspace = true + +# misc auto_impl = "1" +aquamarine.workspace = true +tracing.workspace = true fnv = "1.0" +thiserror.workspace = true +parking_lot.workspace = true linked_hash_set = "0.1" +rand.workspace = true +secp256k1 = { workspace = true, features = ["global-context", "rand-std", "recovery"] } +derive_more.workspace = true +schnellru.workspace = true +itertools.workspace = true +tempfile = { workspace = true, optional = true } +smallvec.workspace = true + +[dev-dependencies] +# reth +reth-discv4 = { workspace = true, features = ["test-utils"] } +reth-interfaces = { workspace = true, features = ["test-utils"] } +reth-primitives = { workspace = true, features = ["test-utils"] } + +# we need to enable the test-utils feature in our own crate to use utils in +# integration tests +reth-network = { workspace = true, features = ["test-utils"] } + +reth-provider = { workspace = true, features = ["test-utils"] } +reth-tracing.workspace = true +reth-transaction-pool = { workspace = true, features = ["test-utils"] } + +alloy-node-bindings.workspace = true +ethers-core = { workspace = true, default-features = false } +ethers-providers = { workspace = true, default-features = false, features = ["ws"] } +ethers-signers = { workspace = true, default-features = false } +ethers-middleware = { workspace = true, default-features = false } + +enr = { workspace = true, features = ["serde", "rust-secp256k1"] } + +# misc +serial_test.workspace = true +tempfile.workspace = true + +## Benchmarks +pprof = { workspace = true, features = ["criterion", "flamegraph"] } +criterion = { workspace = true, features = ["async_tokio", "html_reports"] } [features] -default = [ "serde",] -serde = [ "dep:serde", "dep:humantime-serde", "secp256k1/serde", "enr?/serde", "dep:serde_json",] -test-utils = [ "reth-provider/test-utils", "dep:enr", "dep:tempfile", "reth-transaction-pool/test-utils",] +default = ["serde"] +serde = ["dep:serde", "dep:humantime-serde", "secp256k1/serde", "enr?/serde", "dep:serde_json"] +test-utils = ["reth-provider/test-utils", "dep:enr", "dep:tempfile", "reth-transaction-pool/test-utils"] geth-tests = [] -optimism = [ "reth-primitives/optimism", "reth-transaction-pool/optimism", "reth-provider/optimism", "reth-network-api/optimism", "reth-rpc-types/optimism",] - -[package.version] -workspace = true - -[package.edition] -workspace = true - -[package.rust-version] -workspace = true - -[package.license] -workspace = true - -[package.homepage] -workspace = true - -[package.repository] -workspace = true - -[dependencies.reth-interfaces] -workspace = true - -[dependencies.reth-primitives] -workspace = true - -[dependencies.reth-net-common] -workspace = true - -[dependencies.reth-network-api] -workspace = true - -[dependencies.reth-discv4] -workspace = true - -[dependencies.reth-dns-discovery] -workspace = true - -[dependencies.reth-eth-wire] -workspace = true - -[dependencies.reth-ecies] -workspace = true - -[dependencies.reth-tasks] -workspace = true - -[dependencies.reth-transaction-pool] -workspace = true - -[dependencies.reth-provider] -workspace = true - -[dependencies.reth-rpc-types] -workspace = true - -[dependencies.reth-tokio-util] -workspace = true - -[dependencies.enr] -workspace = true -features = [ "rust-secp256k1",] -optional = true - -[dependencies.alloy-rlp] -workspace = true - -[dependencies.futures] -workspace = true - -[dependencies.pin-project] -workspace = true - -[dependencies.tokio] -workspace = true -features = [ "io-util", "net", "macros", "rt-multi-thread", "time",] - -[dependencies.tokio-stream] -workspace = true - -[dependencies.tokio-util] -workspace = true -features = [ "codec",] - -[dependencies.serde] -workspace = true -optional = true - -[dependencies.humantime-serde] -workspace = true -optional = true - -[dependencies.serde_json] -workspace = true -optional = true - -[dependencies.reth-metrics] -workspace = true -features = [ "common",] - -[dependencies.metrics] -workspace = true - -[dependencies.tracing] -workspace = true - -[dependencies.thiserror] -workspace = true - -[dependencies.parking_lot] -workspace = true - -[dependencies.rand] -workspace = true - -[dependencies.secp256k1] -workspace = true -features = [ "global-context", "rand-std", "recovery",] - -[dependencies.derive_more] -workspace = true - -[dependencies.schnellru] -workspace = true - -[dependencies.itertools] -workspace = true - -[dependencies.tempfile] -workspace = true -optional = true - -[dependencies.smallvec] -workspace = true - -[dev-dependencies.reth-discv4] -workspace = true -features = [ "test-utils",] - -[dev-dependencies.reth-interfaces] -workspace = true -features = [ "test-utils",] - -[dev-dependencies.reth-primitives] -workspace = true -features = [ "test-utils",] +optimism = [ + "reth-primitives/optimism", + "reth-transaction-pool/optimism", + "reth-provider/optimism", + "reth-network-api/optimism", + "reth-rpc-types/optimism", +] -[dev-dependencies.reth-network] -workspace = true -features = [ "test-utils",] - -[dev-dependencies.reth-provider] -workspace = true -features = [ "test-utils",] - -[dev-dependencies.reth-tracing] -workspace = true - -[dev-dependencies.reth-transaction-pool] -workspace = true -features = [ "test-utils",] - -[dev-dependencies.alloy-node-bindings] -workspace = true - -[dev-dependencies.ethers-core] -workspace = true -default-features = false - -[dev-dependencies.ethers-providers] -workspace = true -default-features = false -features = [ "ws",] - -[dev-dependencies.ethers-signers] -workspace = true -default-features = false - -[dev-dependencies.ethers-middleware] -workspace = true -default-features = false - -[dev-dependencies.enr] -workspace = true -features = [ "serde", "rust-secp256k1",] - -[dev-dependencies.serial_test] -workspace = true - -[dev-dependencies.tempfile] -workspace = true - -[dev-dependencies.pprof] -workspace = true -features = [ "criterion", "flamegraph",] - -[dev-dependencies.criterion] -workspace = true -features = [ "async_tokio", "html_reports",] +[[bench]] +name = "bench" +required-features = ["test-utils"] +harness = false From 9326e9b2f3e8dd397bb3585be02150fc03fd3310 Mon Sep 17 00:00:00 2001 From: 0x0 Date: Thu, 29 Feb 2024 04:51:18 -0800 Subject: [PATCH 11/22] ? --- Cargo.lock | 2 ++ crates/blockchain-tree/Cargo.toml | 1 + crates/blockchain-tree/src/lib.rs | 2 -- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index dac789f45322..6f408abfbc23 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5899,6 +5899,7 @@ dependencies = [ name = "reth-blockchain-tree" version = "0.1.0-alpha.21" dependencies = [ + "aquamarine", "assert_matches", "linked_hash_set", "lru", @@ -6299,6 +6300,7 @@ version = "0.1.0-alpha.21" dependencies = [ "alloy-node-bindings", "alloy-rlp", + "aquamarine", "auto_impl", "criterion", "derive_more", diff --git a/crates/blockchain-tree/Cargo.toml b/crates/blockchain-tree/Cargo.toml index a426b48d10bb..2060160d828c 100644 --- a/crates/blockchain-tree/Cargo.toml +++ b/crates/blockchain-tree/Cargo.toml @@ -30,6 +30,7 @@ reth-metrics = { workspace = true, features = ["common"] } metrics.workspace = true # misc +aquamarine.workspace = true linked_hash_set = "0.1.4" [dev-dependencies] diff --git a/crates/blockchain-tree/src/lib.rs b/crates/blockchain-tree/src/lib.rs index 70d974752f41..6bb3d5412b01 100644 --- a/crates/blockchain-tree/src/lib.rs +++ b/crates/blockchain-tree/src/lib.rs @@ -1,5 +1,3 @@ -#![cfg_attr(not(test), warn(unused_crate_dependencies))] - //! Implementation of a tree-like structure for blockchains. //! //! The [BlockchainTree] can validate, execute, and revert blocks in multiple competing sidechains. From 3ccd81478e5a5fda757f57408b9848bb99ef3815 Mon Sep 17 00:00:00 2001 From: 0x0 Date: Thu, 29 Feb 2024 04:53:09 -0800 Subject: [PATCH 12/22] >>>> --- Cargo.lock | 1 + crates/config/Cargo.toml | 3 +++ crates/config/src/lib.rs | 2 -- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6f408abfbc23..7e238b56bcfc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5946,6 +5946,7 @@ dependencies = [ "reth-primitives", "secp256k1 0.27.0", "serde", + "tempfile", "toml", ] diff --git a/crates/config/Cargo.toml b/crates/config/Cargo.toml index aee777f69369..bfb78c339c61 100644 --- a/crates/config/Cargo.toml +++ b/crates/config/Cargo.toml @@ -24,6 +24,9 @@ humantime-serde.workspace = true # crypto secp256k1 = { workspace = true, features = ["global-context", "rand-std", "recovery"] } +# misc +tempfile.workspace = true + [dev-dependencies] confy.workspace = true toml.workspace = true diff --git a/crates/config/src/lib.rs b/crates/config/src/lib.rs index f2fbca8999bf..362e814632e3 100644 --- a/crates/config/src/lib.rs +++ b/crates/config/src/lib.rs @@ -1,5 +1,3 @@ -#![cfg_attr(not(test), warn(unused_crate_dependencies))] - //! Standalone crate for Reth configuration types. #![doc( From bd5704b7a70a48c1346cc4a2d85ae3ea38533561 Mon Sep 17 00:00:00 2001 From: 0x0 Date: Thu, 29 Feb 2024 04:56:02 -0800 Subject: [PATCH 13/22] ......... --- Cargo.lock | 1 + crates/rpc/rpc-types/Cargo.toml | 1 + 2 files changed, 2 insertions(+) diff --git a/Cargo.lock b/Cargo.lock index 7e238b56bcfc..f2757b06d17c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6866,6 +6866,7 @@ dependencies = [ "alloy-rpc-trace-types", "alloy-rpc-types", "arbitrary", + "bytes", "ethereum_ssz", "ethereum_ssz_derive", "jsonrpsee-types", diff --git a/crates/rpc/rpc-types/Cargo.toml b/crates/rpc/rpc-types/Cargo.toml index 830924297e58..454af97e9301 100644 --- a/crates/rpc/rpc-types/Cargo.toml +++ b/crates/rpc/rpc-types/Cargo.toml @@ -31,6 +31,7 @@ url = "2.3" # necessary so we don't hit a "undeclared 'std'": # https://github.com/paradigmxyz/reth/pull/177#discussion_r1021172198 secp256k1.workspace = true +bytes.workspace = true # arbitrary arbitrary = { workspace = true, features = ["derive"], optional = true } From 140f11860f9e3ec63f84439a792ee6886a4c804e Mon Sep 17 00:00:00 2001 From: 0x0 Date: Thu, 29 Feb 2024 05:08:32 -0800 Subject: [PATCH 14/22] :-| --- Cargo.lock | 2 ++ crates/net/dns/Cargo.toml | 1 + crates/rpc/rpc-types-compat/Cargo.toml | 3 +++ 3 files changed, 6 insertions(+) diff --git a/Cargo.lock b/Cargo.lock index f2757b06d17c..8abde9c62374 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6025,6 +6025,7 @@ dependencies = [ name = "reth-dns-discovery" version = "0.1.0-alpha.21" dependencies = [ + "alloy-chains", "alloy-rlp", "data-encoding", "enr", @@ -6890,6 +6891,7 @@ dependencies = [ "alloy-rpc-types", "reth-primitives", "reth-rpc-types", + "serde_json", ] [[package]] diff --git a/crates/net/dns/Cargo.toml b/crates/net/dns/Cargo.toml index 003a6cad7444..0a9af063c467 100644 --- a/crates/net/dns/Cargo.toml +++ b/crates/net/dns/Cargo.toml @@ -41,6 +41,7 @@ serde_with = { version = "3.3.0", optional = true } [dev-dependencies] tokio = { workspace = true, features = ["sync", "rt", "rt-multi-thread"] } reth-tracing.workspace = true +alloy-chains.workspace = true [features] default = ["serde"] diff --git a/crates/rpc/rpc-types-compat/Cargo.toml b/crates/rpc/rpc-types-compat/Cargo.toml index 75324fd38dee..78fdbac24c81 100644 --- a/crates/rpc/rpc-types-compat/Cargo.toml +++ b/crates/rpc/rpc-types-compat/Cargo.toml @@ -17,5 +17,8 @@ reth-rpc-types.workspace = true alloy-rlp.workspace = true alloy-rpc-types.workspace = true +[dev-dependencies] +serde_json.workspace = true + [features] optimism = ["reth-primitives/optimism", "reth-rpc-types/optimism"] From cfb94da4635a48289a90fb89d64b9ef9121544d5 Mon Sep 17 00:00:00 2001 From: 0x0 Date: Thu, 29 Feb 2024 05:17:49 -0800 Subject: [PATCH 15/22] :-| --- crates/config/Cargo.toml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/crates/config/Cargo.toml b/crates/config/Cargo.toml index bfb78c339c61..969e982f3d9b 100644 --- a/crates/config/Cargo.toml +++ b/crates/config/Cargo.toml @@ -24,9 +24,8 @@ humantime-serde.workspace = true # crypto secp256k1 = { workspace = true, features = ["global-context", "rand-std", "recovery"] } -# misc -tempfile.workspace = true - [dev-dependencies] confy.workspace = true toml.workspace = true +# misc +tempfile.workspace = true From fecd89720c00785ca4c7f589b8787f34179193b0 Mon Sep 17 00:00:00 2001 From: 0x0 Date: Thu, 29 Feb 2024 05:19:48 -0800 Subject: [PATCH 16/22] :-| --- crates/rpc/rpc-types/Cargo.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/rpc/rpc-types/Cargo.toml b/crates/rpc/rpc-types/Cargo.toml index 454af97e9301..dae2acd0eaf0 100644 --- a/crates/rpc/rpc-types/Cargo.toml +++ b/crates/rpc/rpc-types/Cargo.toml @@ -31,7 +31,6 @@ url = "2.3" # necessary so we don't hit a "undeclared 'std'": # https://github.com/paradigmxyz/reth/pull/177#discussion_r1021172198 secp256k1.workspace = true -bytes.workspace = true # arbitrary arbitrary = { workspace = true, features = ["derive"], optional = true } @@ -53,3 +52,5 @@ proptest.workspace = true proptest-derive.workspace = true rand.workspace = true similar-asserts.workspace = true +bytes.workspace = true + From b628399347787cc044b4f376f9527ef51f544a64 Mon Sep 17 00:00:00 2001 From: DaniPopes <57450786+DaniPopes@users.noreply.github.com> Date: Fri, 1 Mar 2024 11:34:38 +0100 Subject: [PATCH 17/22] chore: order --- crates/consensus/auto-seal/src/lib.rs | 4 +--- crates/consensus/beacon-core/src/lib.rs | 5 +---- crates/consensus/beacon/src/lib.rs | 3 +-- crates/consensus/common/src/lib.rs | 3 +-- crates/ethereum-forks/src/lib.rs | 3 +-- crates/etl/src/lib.rs | 3 +-- crates/interfaces/src/lib.rs | 4 +--- crates/metrics/metrics-derive/src/lib.rs | 3 +-- crates/metrics/src/lib.rs | 3 +-- crates/net/common/src/lib.rs | 3 +-- crates/net/discv4/src/lib.rs | 3 +-- crates/net/dns/src/lib.rs | 3 +-- crates/net/downloaders/src/lib.rs | 3 +-- crates/net/ecies/src/lib.rs | 3 +-- crates/net/eth-wire/src/lib.rs | 3 +-- crates/net/nat/src/lib.rs | 3 +-- crates/node-api/src/lib.rs | 3 +-- crates/node-builder/src/lib.rs | 3 +-- crates/node-ethereum/src/lib.rs | 3 +-- crates/payload/basic/src/lib.rs | 3 +-- crates/payload/builder/src/lib.rs | 3 +-- crates/payload/ethereum/src/lib.rs | 3 +-- crates/payload/optimism/src/error.rs | 2 +- crates/payload/optimism/src/lib.rs | 3 +-- crates/payload/validator/src/lib.rs | 4 +--- crates/primitives/src/lib.rs | 3 +-- crates/prune/src/lib.rs | 3 +-- crates/revm/src/lib.rs | 3 +-- crates/rpc/ipc/src/lib.rs | 3 +-- crates/rpc/rpc-api/src/lib.rs | 3 +-- crates/rpc/rpc-builder/src/lib.rs | 3 +-- crates/rpc/rpc-engine-api/src/lib.rs | 3 +-- crates/rpc/rpc-testing-util/src/lib.rs | 3 +-- crates/rpc/rpc-types-compat/src/lib.rs | 3 +-- crates/storage/codecs/derive/src/lib.rs | 3 +-- crates/storage/db/src/lib.rs | 3 +-- crates/storage/libmdbx-rs/mdbx-sys/src/lib.rs | 3 +-- crates/storage/libmdbx-rs/src/lib.rs | 2 +- crates/storage/nippy-jar/src/lib.rs | 3 +-- crates/storage/provider/src/lib.rs | 3 +-- crates/tasks/src/lib.rs | 3 +-- crates/tokio-util/src/lib.rs | 3 +-- crates/tracing/src/lib.rs | 3 +-- 43 files changed, 43 insertions(+), 89 deletions(-) diff --git a/crates/consensus/auto-seal/src/lib.rs b/crates/consensus/auto-seal/src/lib.rs index 5861815db016..67261af4ad15 100644 --- a/crates/consensus/auto-seal/src/lib.rs +++ b/crates/consensus/auto-seal/src/lib.rs @@ -1,5 +1,3 @@ -#![cfg_attr(not(test), warn(unused_crate_dependencies))] - //! A [Consensus] implementation for local testing purposes //! that automatically seals blocks. //! @@ -14,8 +12,8 @@ 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))] -#![warn(unused_crate_dependencies)] use reth_beacon_consensus::BeaconEngineMessage; use reth_interfaces::{ diff --git a/crates/consensus/beacon-core/src/lib.rs b/crates/consensus/beacon-core/src/lib.rs index c13d2dcd3c20..230278c88532 100644 --- a/crates/consensus/beacon-core/src/lib.rs +++ b/crates/consensus/beacon-core/src/lib.rs @@ -1,5 +1,3 @@ -#![cfg_attr(not(test), warn(unused_crate_dependencies))] - //! Beacon consensus implementation. #![doc( @@ -7,10 +5,9 @@ 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))] -//! Consensus for ethereum network - use reth_consensus_common::validation; use reth_interfaces::consensus::{Consensus, ConsensusError}; use reth_primitives::{ diff --git a/crates/consensus/beacon/src/lib.rs b/crates/consensus/beacon/src/lib.rs index 6d0db8d4bd3b..5a9e1da4ab9c 100644 --- a/crates/consensus/beacon/src/lib.rs +++ b/crates/consensus/beacon/src/lib.rs @@ -1,5 +1,3 @@ -#![cfg_attr(not(test), warn(unused_crate_dependencies))] - //! Beacon consensus implementation. #![doc( @@ -7,6 +5,7 @@ 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))] pub use reth_beacon_consensus_core::BeaconConsensus; diff --git a/crates/consensus/common/src/lib.rs b/crates/consensus/common/src/lib.rs index 364ef166c8ad..e3503656bb34 100644 --- a/crates/consensus/common/src/lib.rs +++ b/crates/consensus/common/src/lib.rs @@ -1,5 +1,3 @@ -#![cfg_attr(not(test), warn(unused_crate_dependencies))] - //! Commonly used consensus methods. #![doc( @@ -7,6 +5,7 @@ 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))] /// Collection of consensus validation methods. diff --git a/crates/ethereum-forks/src/lib.rs b/crates/ethereum-forks/src/lib.rs index 9978229e1c8d..e781fe3a5694 100644 --- a/crates/ethereum-forks/src/lib.rs +++ b/crates/ethereum-forks/src/lib.rs @@ -1,5 +1,3 @@ -#![cfg_attr(not(test), warn(unused_crate_dependencies))] - //! Ethereum fork types used in reth. //! //! This crate contains Ethereum fork types and helper functions. @@ -13,6 +11,7 @@ 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))] // TODO: remove when https://github.com/proptest-rs/proptest/pull/427 is merged #![allow(unknown_lints, non_local_definitions)] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] diff --git a/crates/etl/src/lib.rs b/crates/etl/src/lib.rs index 239a13b6b1df..776b6e5ebba7 100644 --- a/crates/etl/src/lib.rs +++ b/crates/etl/src/lib.rs @@ -1,5 +1,3 @@ -#![cfg_attr(not(test), warn(unused_crate_dependencies))] - //! ETL data collector. //! //! This crate is useful for dumping unsorted data into temporary files and iterating on their @@ -13,6 +11,7 @@ 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))] #![warn(missing_debug_implementations, missing_docs, unreachable_pub, rustdoc::all)] #![deny(unused_must_use, rust_2018_idioms)] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] diff --git a/crates/interfaces/src/lib.rs b/crates/interfaces/src/lib.rs index ba79537f6512..437dc79e19ed 100644 --- a/crates/interfaces/src/lib.rs +++ b/crates/interfaces/src/lib.rs @@ -1,5 +1,3 @@ -#![cfg_attr(not(test), warn(unused_crate_dependencies))] - //! A collection of shared traits and error types used in Reth. //! //! ## Feature Flags @@ -11,7 +9,7 @@ html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256", issue_tracker_base_url = "https://github.com/paradigmxyz/reth/issues/" )] -#![warn(unused_crate_dependencies)] +#![cfg_attr(not(test), warn(unused_crate_dependencies))] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] /// Consensus traits. diff --git a/crates/metrics/metrics-derive/src/lib.rs b/crates/metrics/metrics-derive/src/lib.rs index f320ca759c16..c55adf1c4b50 100644 --- a/crates/metrics/metrics-derive/src/lib.rs +++ b/crates/metrics/metrics-derive/src/lib.rs @@ -1,5 +1,3 @@ -#![cfg_attr(not(test), warn(unused_crate_dependencies))] - //! This crate provides [Metrics] derive macro #![doc( @@ -7,6 +5,7 @@ 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))] use proc_macro::TokenStream; diff --git a/crates/metrics/src/lib.rs b/crates/metrics/src/lib.rs index de5074006146..968112c5d9ee 100644 --- a/crates/metrics/src/lib.rs +++ b/crates/metrics/src/lib.rs @@ -1,5 +1,3 @@ -#![cfg_attr(not(test), warn(unused_crate_dependencies))] - //! Collection of metrics utilities. //! //! ## Feature Flags @@ -12,6 +10,7 @@ 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))] /// Metrics derive macro. diff --git a/crates/net/common/src/lib.rs b/crates/net/common/src/lib.rs index 6bfafb40065d..f9eed8344519 100644 --- a/crates/net/common/src/lib.rs +++ b/crates/net/common/src/lib.rs @@ -1,5 +1,3 @@ -#![cfg_attr(not(test), warn(unused_crate_dependencies))] - //! Shared types across `reth-net`. #![doc( @@ -7,6 +5,7 @@ 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))] pub mod ban_list; diff --git a/crates/net/discv4/src/lib.rs b/crates/net/discv4/src/lib.rs index 75d9b7397bfc..59c45f131aa6 100644 --- a/crates/net/discv4/src/lib.rs +++ b/crates/net/discv4/src/lib.rs @@ -1,5 +1,3 @@ -#![cfg_attr(not(test), warn(unused_crate_dependencies))] - //! Discovery v4 implementation: //! //! Discv4 employs a kademlia-like routing table to store and manage discovered peers and topics. @@ -23,6 +21,7 @@ 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))] use crate::{ diff --git a/crates/net/dns/src/lib.rs b/crates/net/dns/src/lib.rs index d0f3c730d3ff..c344a63b9b80 100644 --- a/crates/net/dns/src/lib.rs +++ b/crates/net/dns/src/lib.rs @@ -1,5 +1,3 @@ -#![cfg_attr(not(test), warn(unused_crate_dependencies))] - //! Implementation of [EIP-1459](https://eips.ethereum.org/EIPS/eip-1459) Node Discovery via DNS. //! //! ## Feature Flags @@ -12,6 +10,7 @@ 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))] pub use crate::resolver::{DnsResolver, MapResolver, Resolver}; diff --git a/crates/net/downloaders/src/lib.rs b/crates/net/downloaders/src/lib.rs index 734d1d782821..37c4a95e3fd1 100644 --- a/crates/net/downloaders/src/lib.rs +++ b/crates/net/downloaders/src/lib.rs @@ -1,5 +1,3 @@ -#![cfg_attr(not(test), warn(unused_crate_dependencies))] - //! Implements the downloader algorithms. //! //! ## Feature Flags @@ -11,6 +9,7 @@ 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))] /// The collection of algorithms for downloading block bodies. diff --git a/crates/net/ecies/src/lib.rs b/crates/net/ecies/src/lib.rs index 1e1177470c8e..5fd165eb991c 100644 --- a/crates/net/ecies/src/lib.rs +++ b/crates/net/ecies/src/lib.rs @@ -1,5 +1,3 @@ -#![cfg_attr(not(test), warn(unused_crate_dependencies))] - //! RLPx ECIES framed transport protocol. #![doc( @@ -7,6 +5,7 @@ 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))] pub mod algorithm; diff --git a/crates/net/eth-wire/src/lib.rs b/crates/net/eth-wire/src/lib.rs index 062ba0b18cd2..ed347439f763 100644 --- a/crates/net/eth-wire/src/lib.rs +++ b/crates/net/eth-wire/src/lib.rs @@ -1,5 +1,3 @@ -#![cfg_attr(not(test), warn(unused_crate_dependencies))] - //! Implementation of the `eth` wire protocol. //! //! ## Feature Flags @@ -12,6 +10,7 @@ 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))] // TODO: remove when https://github.com/proptest-rs/proptest/pull/427 is merged #![allow(unknown_lints, non_local_definitions)] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] diff --git a/crates/net/nat/src/lib.rs b/crates/net/nat/src/lib.rs index e2d3943ca144..0930411a0872 100644 --- a/crates/net/nat/src/lib.rs +++ b/crates/net/nat/src/lib.rs @@ -1,5 +1,3 @@ -#![cfg_attr(not(test), warn(unused_crate_dependencies))] - //! Helpers for resolving the external IP. //! //! ## Feature Flags @@ -11,6 +9,7 @@ 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))] use igd_next::aio::tokio::search_gateway; diff --git a/crates/node-api/src/lib.rs b/crates/node-api/src/lib.rs index 6903d5ca95fb..ed4275899957 100644 --- a/crates/node-api/src/lib.rs +++ b/crates/node-api/src/lib.rs @@ -1,5 +1,3 @@ -#![cfg_attr(not(test), warn(unused_crate_dependencies))] - //! Standalone crate for Reth configuration traits and builder types. #![doc( @@ -7,6 +5,7 @@ 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))] /// Traits, validation methods, and helper types used to abstract over engine types. diff --git a/crates/node-builder/src/lib.rs b/crates/node-builder/src/lib.rs index b3bd00f96ab7..b8a5ef507ef5 100644 --- a/crates/node-builder/src/lib.rs +++ b/crates/node-builder/src/lib.rs @@ -1,5 +1,3 @@ -#![cfg_attr(not(test), warn(unused_crate_dependencies))] - //! Standalone crate for Reth configuration and builder types. #![doc( @@ -7,6 +5,7 @@ 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))] #![warn(unused_crate_dependencies)] diff --git a/crates/node-ethereum/src/lib.rs b/crates/node-ethereum/src/lib.rs index da5762f93a2d..e2b36800484e 100644 --- a/crates/node-ethereum/src/lib.rs +++ b/crates/node-ethereum/src/lib.rs @@ -1,5 +1,3 @@ -#![cfg_attr(not(test), warn(unused_crate_dependencies))] - //! Standalone crate for ethereum-specific Reth configuration and builder types. #![doc( @@ -7,6 +5,7 @@ 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))] /// Exports commonly used concrete instances of the [EngineTypes](reth_node_api::EngineTypes) diff --git a/crates/payload/basic/src/lib.rs b/crates/payload/basic/src/lib.rs index fb70126db016..fb7d9d42e838 100644 --- a/crates/payload/basic/src/lib.rs +++ b/crates/payload/basic/src/lib.rs @@ -1,5 +1,3 @@ -#![cfg_attr(not(test), warn(unused_crate_dependencies))] - //! A basic payload generator for reth. #![doc( @@ -7,6 +5,7 @@ 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))] use crate::metrics::PayloadBuilderMetrics; diff --git a/crates/payload/builder/src/lib.rs b/crates/payload/builder/src/lib.rs index aca73ef33cff..a14b9308ff2f 100644 --- a/crates/payload/builder/src/lib.rs +++ b/crates/payload/builder/src/lib.rs @@ -1,5 +1,3 @@ -#![cfg_attr(not(test), warn(unused_crate_dependencies))] - //! This crate defines abstractions to create and update payloads (blocks): //! - [`PayloadJobGenerator`]: a type that knows how to create new jobs for creating payloads based //! on [`PayloadAttributes`](reth_rpc_types::engine::PayloadAttributes). @@ -100,6 +98,7 @@ 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))] pub mod database; diff --git a/crates/payload/ethereum/src/lib.rs b/crates/payload/ethereum/src/lib.rs index ebb343cf3b87..43e2ccfb4ae4 100644 --- a/crates/payload/ethereum/src/lib.rs +++ b/crates/payload/ethereum/src/lib.rs @@ -1,5 +1,3 @@ -#![cfg_attr(not(test), warn(unused_crate_dependencies))] - //! A basic Ethereum payload builder implementation. #![doc( @@ -7,6 +5,7 @@ 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))] use reth_basic_payload_builder::{ diff --git a/crates/payload/optimism/src/error.rs b/crates/payload/optimism/src/error.rs index 6df19d26761c..ca258a93d877 100644 --- a/crates/payload/optimism/src/error.rs +++ b/crates/payload/optimism/src/error.rs @@ -12,7 +12,7 @@ pub enum OptimismPayloadBuilderError { #[error("failed to parse L1 block info from L1 info tx calldata")] L1BlockInfoParseFailed, /// Thrown when a database account could not be loaded. - #[error("failed to load account {0:?}")] + #[error("failed to load account {0}")] AccountLoadFailed(reth_primitives::Address), /// Thrown when force deploy of create2deployer code fails. #[error("failed to force create2deployer account code")] diff --git a/crates/payload/optimism/src/lib.rs b/crates/payload/optimism/src/lib.rs index e14e0fa81518..ac431d11fc4b 100644 --- a/crates/payload/optimism/src/lib.rs +++ b/crates/payload/optimism/src/lib.rs @@ -1,5 +1,3 @@ -#![cfg_attr(not(test), warn(unused_crate_dependencies))] - //! Optimism's payload builder implementation. #![doc( @@ -7,6 +5,7 @@ html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256", issue_tracker_base_url = "https://github.com/paradigmxyz/reth/issues/" )] +#![cfg_attr(all(not(test), feature = "optimism"), warn(unused_crate_dependencies))] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] #[cfg(feature = "optimism")] diff --git a/crates/payload/validator/src/lib.rs b/crates/payload/validator/src/lib.rs index 1513d260490d..4f9f5150730e 100644 --- a/crates/payload/validator/src/lib.rs +++ b/crates/payload/validator/src/lib.rs @@ -1,5 +1,3 @@ -#![cfg_attr(not(test), warn(unused_crate_dependencies))] - //! Payload Validation support. #![doc( @@ -7,7 +5,7 @@ html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256", issue_tracker_base_url = "https://github.com/paradigmxyz/reth/issues/" )] -#![warn(unused_crate_dependencies)] +#![cfg_attr(not(test), warn(unused_crate_dependencies))] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] use reth_primitives::{ChainSpec, SealedBlock}; diff --git a/crates/primitives/src/lib.rs b/crates/primitives/src/lib.rs index bccf019e8b12..9fdc21961c50 100644 --- a/crates/primitives/src/lib.rs +++ b/crates/primitives/src/lib.rs @@ -1,5 +1,3 @@ -#![cfg_attr(not(test), warn(unused_crate_dependencies))] - //! Commonly used types in reth. //! //! This crate contains Ethereum primitive types and helper functions. @@ -14,6 +12,7 @@ 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))] // TODO: remove when https://github.com/proptest-rs/proptest/pull/427 is merged #![allow(unknown_lints, non_local_definitions)] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] diff --git a/crates/prune/src/lib.rs b/crates/prune/src/lib.rs index 304c2a9ba915..3cd3730e3939 100644 --- a/crates/prune/src/lib.rs +++ b/crates/prune/src/lib.rs @@ -1,5 +1,3 @@ -#![cfg_attr(not(test), warn(unused_crate_dependencies))] - //! Pruning implementation. #![doc( @@ -7,6 +5,7 @@ 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))] #![allow(missing_docs)] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] diff --git a/crates/revm/src/lib.rs b/crates/revm/src/lib.rs index 3cd61a296794..a9891b50e9bd 100644 --- a/crates/revm/src/lib.rs +++ b/crates/revm/src/lib.rs @@ -1,5 +1,3 @@ -#![cfg_attr(not(test), warn(unused_crate_dependencies))] - //! Revm utils and implementations specific to reth. #![doc( @@ -7,6 +5,7 @@ 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))] /// Contains glue code for integrating reth database into revm's [Database]. diff --git a/crates/rpc/ipc/src/lib.rs b/crates/rpc/ipc/src/lib.rs index a2e76edc4396..2d0193ed65f7 100644 --- a/crates/rpc/ipc/src/lib.rs +++ b/crates/rpc/ipc/src/lib.rs @@ -1,5 +1,3 @@ -#![cfg_attr(not(test), warn(unused_crate_dependencies))] - //! Reth IPC transport implementation //! //! ## Feature Flags @@ -11,6 +9,7 @@ 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))] #[cfg(unix)] diff --git a/crates/rpc/rpc-api/src/lib.rs b/crates/rpc/rpc-api/src/lib.rs index 9dde29c9bf35..ec8757d83696 100644 --- a/crates/rpc/rpc-api/src/lib.rs +++ b/crates/rpc/rpc-api/src/lib.rs @@ -1,5 +1,3 @@ -#![cfg_attr(not(test), warn(unused_crate_dependencies))] - //! Reth RPC interface definitions //! //! Provides all RPC interfaces. @@ -13,6 +11,7 @@ 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 admin; diff --git a/crates/rpc/rpc-builder/src/lib.rs b/crates/rpc/rpc-builder/src/lib.rs index 667f5ead58b5..95d75256c59b 100644 --- a/crates/rpc/rpc-builder/src/lib.rs +++ b/crates/rpc/rpc-builder/src/lib.rs @@ -1,5 +1,3 @@ -#![cfg_attr(not(test), warn(unused_crate_dependencies))] - //! Configure reth RPC. //! //! This crate contains several builder and config types that allow to configure the selection of @@ -153,6 +151,7 @@ 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))] use std::{ diff --git a/crates/rpc/rpc-engine-api/src/lib.rs b/crates/rpc/rpc-engine-api/src/lib.rs index 84b8f91036a9..0f9323c0074b 100644 --- a/crates/rpc/rpc-engine-api/src/lib.rs +++ b/crates/rpc/rpc-engine-api/src/lib.rs @@ -1,5 +1,3 @@ -#![cfg_attr(not(test), warn(unused_crate_dependencies))] - //! The implementation of Engine API. //! [Read more](https://github.com/ethereum/execution-apis/tree/main/src/engine). @@ -8,6 +6,7 @@ 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))] /// The Engine API implementation. diff --git a/crates/rpc/rpc-testing-util/src/lib.rs b/crates/rpc/rpc-testing-util/src/lib.rs index 8d8661fd6fe3..ebf5090b715d 100644 --- a/crates/rpc/rpc-testing-util/src/lib.rs +++ b/crates/rpc/rpc-testing-util/src/lib.rs @@ -1,5 +1,3 @@ -#![cfg_attr(not(test), warn(unused_crate_dependencies))] - //! Reth RPC testing utilities. #![doc( @@ -7,6 +5,7 @@ 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))] pub mod debug; diff --git a/crates/rpc/rpc-types-compat/src/lib.rs b/crates/rpc/rpc-types-compat/src/lib.rs index 595347462d8d..7aabf43234d9 100644 --- a/crates/rpc/rpc-types-compat/src/lib.rs +++ b/crates/rpc/rpc-types-compat/src/lib.rs @@ -1,5 +1,3 @@ -#![cfg_attr(not(test), warn(unused_crate_dependencies))] - //! Reth compatibility and utils for RPC types //! //! This crate various helper functions to convert between reth primitive types and rpc types. @@ -9,6 +7,7 @@ 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))] pub mod block; diff --git a/crates/storage/codecs/derive/src/lib.rs b/crates/storage/codecs/derive/src/lib.rs index 8b9590cda899..9af83148be68 100644 --- a/crates/storage/codecs/derive/src/lib.rs +++ b/crates/storage/codecs/derive/src/lib.rs @@ -1,5 +1,3 @@ -#![cfg_attr(not(test), warn(unused_crate_dependencies))] - //! Derive macros for the Compact codec traits. #![doc( @@ -7,6 +5,7 @@ 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))] #![allow(unreachable_pub, missing_docs)] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] diff --git a/crates/storage/db/src/lib.rs b/crates/storage/db/src/lib.rs index d1e1d7b8b806..1a30c4cf97b8 100644 --- a/crates/storage/db/src/lib.rs +++ b/crates/storage/db/src/lib.rs @@ -1,5 +1,3 @@ -#![cfg_attr(not(test), warn(unused_crate_dependencies))] - //! reth's database abstraction layer with concrete implementations. //! //! The database abstraction assumes that the underlying store is a KV store subdivided into tables. @@ -62,6 +60,7 @@ 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))] /// Traits defining the database abstractions, such as cursors and transactions. diff --git a/crates/storage/libmdbx-rs/mdbx-sys/src/lib.rs b/crates/storage/libmdbx-rs/mdbx-sys/src/lib.rs index d641849f3874..6f86951ca5e2 100644 --- a/crates/storage/libmdbx-rs/mdbx-sys/src/lib.rs +++ b/crates/storage/libmdbx-rs/mdbx-sys/src/lib.rs @@ -1,5 +1,3 @@ -#![cfg_attr(not(test), warn(unused_crate_dependencies))] - //! [`libmdbx`](https://github.com/erthink/libmdbx) bindings. #![doc( @@ -7,6 +5,7 @@ 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))] #![allow(non_upper_case_globals, non_camel_case_types, non_snake_case, clippy::all)] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] diff --git a/crates/storage/libmdbx-rs/src/lib.rs b/crates/storage/libmdbx-rs/src/lib.rs index cfa46ab6d76b..f8c2512082a6 100644 --- a/crates/storage/libmdbx-rs/src/lib.rs +++ b/crates/storage/libmdbx-rs/src/lib.rs @@ -1,10 +1,10 @@ -#![cfg_attr(not(test), warn(unused_crate_dependencies))] #![doc = include_str!("../README.md")] #![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))] #![allow(missing_docs)] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] diff --git a/crates/storage/nippy-jar/src/lib.rs b/crates/storage/nippy-jar/src/lib.rs index 9e32252cc5d2..16960404c964 100644 --- a/crates/storage/nippy-jar/src/lib.rs +++ b/crates/storage/nippy-jar/src/lib.rs @@ -1,5 +1,3 @@ -#![cfg_attr(not(test), warn(unused_crate_dependencies))] - //! Immutable data store format. #![doc( @@ -7,6 +5,7 @@ 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))] #![allow(missing_docs)] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] diff --git a/crates/storage/provider/src/lib.rs b/crates/storage/provider/src/lib.rs index 5ff44801ec8a..838edd620c78 100644 --- a/crates/storage/provider/src/lib.rs +++ b/crates/storage/provider/src/lib.rs @@ -1,5 +1,3 @@ -#![cfg_attr(not(test), warn(unused_crate_dependencies))] - //! Collection of traits and trait implementations for common database operations. //! //! ## Feature Flags @@ -11,6 +9,7 @@ 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))] /// Various provider traits. diff --git a/crates/tasks/src/lib.rs b/crates/tasks/src/lib.rs index a45e87f91ae2..c651196f81c2 100644 --- a/crates/tasks/src/lib.rs +++ b/crates/tasks/src/lib.rs @@ -1,5 +1,3 @@ -#![cfg_attr(not(test), warn(unused_crate_dependencies))] - //! Reth task management. #![doc( @@ -7,6 +5,7 @@ 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))] use crate::{ diff --git a/crates/tokio-util/src/lib.rs b/crates/tokio-util/src/lib.rs index bf2552164f42..7db8dcfba16a 100644 --- a/crates/tokio-util/src/lib.rs +++ b/crates/tokio-util/src/lib.rs @@ -1,5 +1,3 @@ -#![cfg_attr(not(test), warn(unused_crate_dependencies))] - //! Event listeners #![doc( @@ -7,6 +5,7 @@ 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 event_listeners; diff --git a/crates/tracing/src/lib.rs b/crates/tracing/src/lib.rs index 1a305de254fd..45a088a08494 100644 --- a/crates/tracing/src/lib.rs +++ b/crates/tracing/src/lib.rs @@ -1,5 +1,3 @@ -#![cfg_attr(not(test), warn(unused_crate_dependencies))] - //! The `tracing` module provides functionalities for setting up and configuring logging. //! //! It includes structures and functions to create and manage various logging layers: stdout, @@ -42,6 +40,7 @@ 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))] // Re-export tracing crates From 0f205d11743b97f519ae5b9294c9d8a32c5db164 Mon Sep 17 00:00:00 2001 From: DaniPopes <57450786+DaniPopes@users.noreply.github.com> Date: Fri, 1 Mar 2024 12:05:47 +0100 Subject: [PATCH 18/22] fix: reth-codecs-derive --- Cargo.lock | 24 ++++++------- crates/config/Cargo.toml | 3 +- crates/static-file/Cargo.toml | 4 +-- crates/storage/codecs/Cargo.toml | 17 ++++----- crates/storage/codecs/README.md | 8 ++--- crates/storage/codecs/derive/Cargo.toml | 48 ++++++++----------------- crates/storage/codecs/src/lib.rs | 2 +- 7 files changed, 41 insertions(+), 65 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8abde9c62374..98168681f5b1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1400,17 +1400,6 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "67ba02a97a2bd10f4b59b25c7973101c79642302776489e030cd13cdab09ed15" -[[package]] -name = "codecs-derive" -version = "0.1.0-alpha.21" -dependencies = [ - "convert_case 0.6.0", - "proc-macro2", - "quote", - "similar-asserts", - "syn 2.0.50", -] - [[package]] name = "coins-bip32" version = "0.8.7" @@ -5926,14 +5915,25 @@ dependencies = [ "alloy-primitives", "arbitrary", "bytes", - "codecs-derive", "modular-bitfield", "proptest", "proptest-derive", + "reth-codecs-derive", "serde", "test-fuzz", ] +[[package]] +name = "reth-codecs-derive" +version = "0.1.0-alpha.21" +dependencies = [ + "convert_case 0.6.0", + "proc-macro2", + "quote", + "similar-asserts", + "syn 2.0.50", +] + [[package]] name = "reth-config" version = "0.1.0-alpha.21" diff --git a/crates/config/Cargo.toml b/crates/config/Cargo.toml index 969e982f3d9b..ece3fa0bb8cc 100644 --- a/crates/config/Cargo.toml +++ b/crates/config/Cargo.toml @@ -26,6 +26,5 @@ secp256k1 = { workspace = true, features = ["global-context", "rand-std", "recov [dev-dependencies] confy.workspace = true -toml.workspace = true -# misc tempfile.workspace = true +toml.workspace = true diff --git a/crates/static-file/Cargo.toml b/crates/static-file/Cargo.toml index 8ef23d8af47b..0f7d867b3ab1 100644 --- a/crates/static-file/Cargo.toml +++ b/crates/static-file/Cargo.toml @@ -29,13 +29,11 @@ clap = { workspace = true, features = ["derive"], optional = true } rayon.workspace = true [dev-dependencies] -# reth reth-db = { workspace = true, features = ["test-utils"] } reth-stages = { workspace = true, features = ["test-utils"] } -# misc -tempfile.workspace = true assert_matches.workspace = true +tempfile.workspace = true [features] clap = ["dep:clap"] diff --git a/crates/storage/codecs/Cargo.toml b/crates/storage/codecs/Cargo.toml index c53c06daba13..49f2e885e015 100644 --- a/crates/storage/codecs/Cargo.toml +++ b/crates/storage/codecs/Cargo.toml @@ -11,7 +11,7 @@ repository.workspace = true workspace = true [dependencies] -codecs-derive = { path = "./derive", default-features = false } +reth-codecs-derive = { path = "./derive", default-features = false } alloy-primitives.workspace = true bytes.workspace = true @@ -28,12 +28,9 @@ proptest-derive.workspace = true [features] default = ["compact", "std"] -std = [ - "alloy-primitives/std", - "bytes/std", -] -compact = ["codecs-derive/compact"] -scale = ["codecs-derive/scale"] -postcard = ["codecs-derive/postcard"] -no_codec = ["codecs-derive/no_codec"] -optimism = ["codecs-derive/optimism"] +std = ["alloy-primitives/std", "bytes/std"] +compact = ["reth-codecs-derive/compact"] +scale = ["reth-codecs-derive/scale"] +postcard = ["reth-codecs-derive/postcard"] +no_codec = ["reth-codecs-derive/no_codec"] +optimism = ["reth-codecs-derive/optimism"] diff --git a/crates/storage/codecs/README.md b/crates/storage/codecs/README.md index 8b7e979e34a6..bb542160d8c7 100644 --- a/crates/storage/codecs/README.md +++ b/crates/storage/codecs/README.md @@ -13,7 +13,7 @@ Feature defines what is the main codec used by `#[main_codec]`. However it is st ```rust default = ["scale"] -scale = ["codecs-derive/scale"] -postcard = ["codecs-derive/postcard"] -no_codec = ["codecs-derive/no_codec"] -``` \ No newline at end of file +scale = ["reth-codecs-derive/scale"] +postcard = ["reth-codecs-derive/postcard"] +no_codec = ["reth-codecs-derive/no_codec"] +``` diff --git a/crates/storage/codecs/derive/Cargo.toml b/crates/storage/codecs/derive/Cargo.toml index 86574e9d2e88..7be08c175654 100644 --- a/crates/storage/codecs/derive/Cargo.toml +++ b/crates/storage/codecs/derive/Cargo.toml @@ -1,5 +1,11 @@ [package] -name = "codecs-derive" +name = "reth-codecs-derive" +version.workspace = true +edition.workspace = true +rust-version.workspace = true +license.workspace = true +homepage.workspace = true +repository.workspace = true readme = "../README.md" [lints] @@ -10,42 +16,18 @@ proc-macro = true [dependencies] convert_case = "0.6.0" +proc-macro2.workspace = true +quote.workspace = true +syn.workspace = true + +[dev-dependencies] +similar-asserts.workspace = true +syn = { workspace = true, features = ["full", "extra-traits"] } [features] -default = [ "compact",] +default = ["compact"] compact = [] scale = [] postcard = [] no_codec = [] optimism = [] - -[package.version] -workspace = true - -[package.edition] -workspace = true - -[package.rust-version] -workspace = true - -[package.license] -workspace = true - -[package.homepage] -workspace = true - -[package.repository] -workspace = true - -[dependencies.proc-macro2] -workspace = true - -[dependencies.quote] -workspace = true - -[dependencies.syn] -workspace = true -features = [ "full", "extra-traits",] - -[dev-dependencies.similar-asserts] -workspace = true diff --git a/crates/storage/codecs/src/lib.rs b/crates/storage/codecs/src/lib.rs index fe72d188f6ba..37f3bcce4975 100644 --- a/crates/storage/codecs/src/lib.rs +++ b/crates/storage/codecs/src/lib.rs @@ -11,7 +11,7 @@ #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] #![cfg_attr(not(feature = "std"), no_std)] -pub use codecs_derive::*; +pub use reth_codecs_derive::*; use alloy_primitives::{Address, Bloom, Bytes, B256, B512, U256}; use bytes::Buf; From 12d35f244bb9f11651f4b78757f80372ccbb2aea Mon Sep 17 00:00:00 2001 From: DaniPopes <57450786+DaniPopes@users.noreply.github.com> Date: Fri, 1 Mar 2024 12:12:06 +0100 Subject: [PATCH 19/22] chore: remove unused dev-dependencies too --- Cargo.lock | 46 ++++--------------- crates/consensus/auto-seal/src/lib.rs | 2 +- crates/consensus/beacon-core/src/lib.rs | 2 +- crates/consensus/beacon/Cargo.toml | 14 +++--- crates/consensus/beacon/src/lib.rs | 2 +- crates/consensus/common/Cargo.toml | 3 +- crates/consensus/common/src/lib.rs | 2 +- crates/ethereum-forks/Cargo.toml | 1 - crates/ethereum-forks/src/lib.rs | 2 +- crates/etl/src/lib.rs | 4 +- crates/interfaces/src/lib.rs | 2 +- crates/metrics/src/lib.rs | 2 +- crates/net/common/src/lib.rs | 2 +- crates/net/discv4/src/lib.rs | 2 +- crates/net/dns/src/lib.rs | 2 +- crates/net/downloaders/src/lib.rs | 2 +- crates/net/ecies/src/lib.rs | 2 +- crates/net/nat/src/lib.rs | 2 +- crates/node-api/src/lib.rs | 2 +- crates/node-builder/src/lib.rs | 2 +- crates/payload/basic/src/lib.rs | 2 +- crates/payload/builder/Cargo.toml | 13 ++---- crates/payload/builder/src/lib.rs | 2 +- crates/payload/ethereum/src/lib.rs | 2 +- crates/payload/validator/src/lib.rs | 2 +- crates/prune/src/lib.rs | 2 +- crates/revm/src/lib.rs | 2 +- crates/rpc/ipc/src/lib.rs | 2 +- crates/rpc/rpc-api/src/lib.rs | 2 +- crates/rpc/rpc-testing-util/src/lib.rs | 2 +- crates/rpc/rpc-types-compat/src/lib.rs | 2 +- crates/storage/codecs/derive/src/lib.rs | 2 +- crates/storage/libmdbx-rs/mdbx-sys/src/lib.rs | 2 +- crates/storage/nippy-jar/src/lib.rs | 2 +- crates/storage/provider/src/lib.rs | 2 +- crates/tasks/src/lib.rs | 2 +- crates/tokio-util/src/lib.rs | 2 +- crates/tracing/src/lib.rs | 2 +- 38 files changed, 53 insertions(+), 92 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 98168681f5b1..f844c6891ca2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2117,12 +2117,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "difflib" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6184e33543162437515c2e2b48714794e37845ec9851711914eec9d308f6ebe8" - [[package]] name = "digest" version = "0.9.0" @@ -2875,15 +2869,6 @@ dependencies = [ "miniz_oxide", ] -[[package]] -name = "float-cmp" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98de4bbd547a563b716d8dfa9aad1cb19bfab00f4fa09a6a4ed21dbcf44ce9c4" -dependencies = [ - "num-traits", -] - [[package]] name = "fnv" version = "1.0.7" @@ -4455,9 +4440,9 @@ dependencies = [ [[package]] name = "mockall" -version = "0.11.4" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c84490118f2ee2d74570d114f3d0493cbf02790df303d2707606c3e14e07c96" +checksum = "43766c2b5203b10de348ffe19f7e54564b64f3d6018ff7648d1e2d6d3a0f0a48" dependencies = [ "cfg-if", "downcast", @@ -4470,14 +4455,14 @@ dependencies = [ [[package]] name = "mockall_derive" -version = "0.11.4" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22ce75669015c4f47b289fd4d4f56e894e4c96003ffdf3ac51313126f94c6cbb" +checksum = "af7cbce79ec385a1d4f54baa90a76401eb15d9cab93685f62e7e9f942aa00ae2" dependencies = [ "cfg-if", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.50", ] [[package]] @@ -4537,12 +4522,6 @@ dependencies = [ "minimal-lexical", ] -[[package]] -name = "normalize-line-endings" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be" - [[package]] name = "nu-ansi-term" version = "0.46.0" @@ -5208,16 +5187,12 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "predicates" -version = "2.1.5" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59230a63c37f3e18569bdb90e4a89cbf5bf8b06fea0b84e65ea10cc4df47addd" +checksum = "68b87bfd4605926cdfefc1c3b5f8fe560e3feca9d5552cf68c466d3d8236c7e8" dependencies = [ - "difflib", - "float-cmp", - "itertools 0.10.5", - "normalize-line-endings", + "anstyle", "predicates-core", - "regex", ] [[package]] @@ -5853,7 +5828,6 @@ dependencies = [ "reth-metrics", "reth-node-api", "reth-node-ethereum", - "reth-node-optimism", "reth-payload-builder", "reth-payload-validator", "reth-primitives", @@ -5868,7 +5842,6 @@ dependencies = [ "reth-tokio-util", "reth-tracing", "schnellru", - "tempfile", "thiserror", "tokio", "tokio-stream", @@ -5954,7 +5927,6 @@ dependencies = [ name = "reth-consensus-common" version = "0.1.0-alpha.21" dependencies = [ - "assert_matches", "mockall", "reth-interfaces", "reth-primitives", @@ -6149,7 +6121,6 @@ dependencies = [ "crc", "proptest", "proptest-derive", - "rand 0.8.5", "serde", "thiserror", ] @@ -6575,7 +6546,6 @@ dependencies = [ "reth-rpc-types", "reth-rpc-types-compat", "reth-transaction-pool", - "revm", "revm-primitives", "sha2", "thiserror", diff --git a/crates/consensus/auto-seal/src/lib.rs b/crates/consensus/auto-seal/src/lib.rs index 67261af4ad15..388c5de2a989 100644 --- a/crates/consensus/auto-seal/src/lib.rs +++ b/crates/consensus/auto-seal/src/lib.rs @@ -12,7 +12,7 @@ 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))] +#![warn(unused_crate_dependencies)] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] use reth_beacon_consensus::BeaconEngineMessage; diff --git a/crates/consensus/beacon-core/src/lib.rs b/crates/consensus/beacon-core/src/lib.rs index 230278c88532..aa8f7878873c 100644 --- a/crates/consensus/beacon-core/src/lib.rs +++ b/crates/consensus/beacon-core/src/lib.rs @@ -5,7 +5,7 @@ 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))] +#![warn(unused_crate_dependencies)] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] use reth_consensus_common::validation; diff --git a/crates/consensus/beacon/Cargo.toml b/crates/consensus/beacon/Cargo.toml index 2ce211f8bb87..0e25da10388a 100644 --- a/crates/consensus/beacon/Cargo.toml +++ b/crates/consensus/beacon/Cargo.toml @@ -55,17 +55,15 @@ reth-tracing.workspace = true reth-revm.workspace = true reth-downloaders.workspace = true reth-node-ethereum.workspace = true -reth-node-optimism.workspace = true assert_matches.workspace = true -tempfile.workspace = true [features] optimism = [ - "reth-primitives/optimism", - "reth-interfaces/optimism", - "reth-provider/optimism", - "reth-rpc-types/optimism", - "reth-payload-builder/optimism", - "reth-blockchain-tree/optimism", + "reth-primitives/optimism", + "reth-interfaces/optimism", + "reth-provider/optimism", + "reth-rpc-types/optimism", + "reth-payload-builder/optimism", + "reth-blockchain-tree/optimism", ] diff --git a/crates/consensus/beacon/src/lib.rs b/crates/consensus/beacon/src/lib.rs index 5a9e1da4ab9c..7e5616ad62d3 100644 --- a/crates/consensus/beacon/src/lib.rs +++ b/crates/consensus/beacon/src/lib.rs @@ -5,7 +5,7 @@ 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))] +#![warn(unused_crate_dependencies)] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] pub use reth_beacon_consensus_core::BeaconConsensus; diff --git a/crates/consensus/common/Cargo.toml b/crates/consensus/common/Cargo.toml index ece6a029b101..4659dd3e1d69 100644 --- a/crates/consensus/common/Cargo.toml +++ b/crates/consensus/common/Cargo.toml @@ -19,8 +19,7 @@ reth-provider.workspace = true [dev-dependencies] reth-interfaces = { workspace = true, features = ["test-utils"] } reth-provider = { workspace = true, features = ["test-utils"] } -assert_matches.workspace = true -mockall = "0.11.3" +mockall = "0.12" [features] optimism = ["reth-primitives/optimism"] diff --git a/crates/consensus/common/src/lib.rs b/crates/consensus/common/src/lib.rs index e3503656bb34..7cbd55548429 100644 --- a/crates/consensus/common/src/lib.rs +++ b/crates/consensus/common/src/lib.rs @@ -5,7 +5,7 @@ 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))] +#![warn(unused_crate_dependencies)] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] /// Collection of consensus validation methods. diff --git a/crates/ethereum-forks/Cargo.toml b/crates/ethereum-forks/Cargo.toml index 145d4b1883eb..fb2ad5820b4d 100644 --- a/crates/ethereum-forks/Cargo.toml +++ b/crates/ethereum-forks/Cargo.toml @@ -30,7 +30,6 @@ proptest = { workspace = true, optional = true } proptest-derive = { workspace = true, optional = true } [dev-dependencies] -rand.workspace = true arbitrary = { workspace = true, features = ["derive"] } proptest.workspace = true proptest-derive.workspace = true diff --git a/crates/ethereum-forks/src/lib.rs b/crates/ethereum-forks/src/lib.rs index e781fe3a5694..e4060acf40c3 100644 --- a/crates/ethereum-forks/src/lib.rs +++ b/crates/ethereum-forks/src/lib.rs @@ -11,7 +11,7 @@ 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))] +#![warn(unused_crate_dependencies)] // TODO: remove when https://github.com/proptest-rs/proptest/pull/427 is merged #![allow(unknown_lints, non_local_definitions)] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] diff --git a/crates/etl/src/lib.rs b/crates/etl/src/lib.rs index 776b6e5ebba7..1f8c0c9393f4 100644 --- a/crates/etl/src/lib.rs +++ b/crates/etl/src/lib.rs @@ -11,9 +11,7 @@ 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))] -#![warn(missing_debug_implementations, missing_docs, unreachable_pub, rustdoc::all)] -#![deny(unused_must_use, rust_2018_idioms)] +#![warn(unused_crate_dependencies)] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] use std::{ diff --git a/crates/interfaces/src/lib.rs b/crates/interfaces/src/lib.rs index 437dc79e19ed..3e92ea592967 100644 --- a/crates/interfaces/src/lib.rs +++ b/crates/interfaces/src/lib.rs @@ -9,7 +9,7 @@ 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))] +#![warn(unused_crate_dependencies)] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] /// Consensus traits. diff --git a/crates/metrics/src/lib.rs b/crates/metrics/src/lib.rs index 968112c5d9ee..55175dacdb4f 100644 --- a/crates/metrics/src/lib.rs +++ b/crates/metrics/src/lib.rs @@ -10,7 +10,7 @@ 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))] +#![warn(unused_crate_dependencies)] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] /// Metrics derive macro. diff --git a/crates/net/common/src/lib.rs b/crates/net/common/src/lib.rs index f9eed8344519..13d5821c0fce 100644 --- a/crates/net/common/src/lib.rs +++ b/crates/net/common/src/lib.rs @@ -5,7 +5,7 @@ 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))] +#![warn(unused_crate_dependencies)] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] pub mod ban_list; diff --git a/crates/net/discv4/src/lib.rs b/crates/net/discv4/src/lib.rs index 59c45f131aa6..60e3bd9893dc 100644 --- a/crates/net/discv4/src/lib.rs +++ b/crates/net/discv4/src/lib.rs @@ -21,7 +21,7 @@ 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))] +#![warn(unused_crate_dependencies)] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] use crate::{ diff --git a/crates/net/dns/src/lib.rs b/crates/net/dns/src/lib.rs index c344a63b9b80..ed08fb420b62 100644 --- a/crates/net/dns/src/lib.rs +++ b/crates/net/dns/src/lib.rs @@ -10,7 +10,7 @@ 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))] +#![warn(unused_crate_dependencies)] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] pub use crate::resolver::{DnsResolver, MapResolver, Resolver}; diff --git a/crates/net/downloaders/src/lib.rs b/crates/net/downloaders/src/lib.rs index 37c4a95e3fd1..3a707516c477 100644 --- a/crates/net/downloaders/src/lib.rs +++ b/crates/net/downloaders/src/lib.rs @@ -9,7 +9,7 @@ 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))] +#![warn(unused_crate_dependencies)] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] /// The collection of algorithms for downloading block bodies. diff --git a/crates/net/ecies/src/lib.rs b/crates/net/ecies/src/lib.rs index 5fd165eb991c..3a53d51d6c4b 100644 --- a/crates/net/ecies/src/lib.rs +++ b/crates/net/ecies/src/lib.rs @@ -5,7 +5,7 @@ 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))] +#![warn(unused_crate_dependencies)] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] pub mod algorithm; diff --git a/crates/net/nat/src/lib.rs b/crates/net/nat/src/lib.rs index 0930411a0872..49410943a83c 100644 --- a/crates/net/nat/src/lib.rs +++ b/crates/net/nat/src/lib.rs @@ -9,7 +9,7 @@ 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))] +#![warn(unused_crate_dependencies)] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] use igd_next::aio::tokio::search_gateway; diff --git a/crates/node-api/src/lib.rs b/crates/node-api/src/lib.rs index ed4275899957..08be14489020 100644 --- a/crates/node-api/src/lib.rs +++ b/crates/node-api/src/lib.rs @@ -5,7 +5,7 @@ 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))] +#![warn(unused_crate_dependencies)] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] /// Traits, validation methods, and helper types used to abstract over engine types. diff --git a/crates/node-builder/src/lib.rs b/crates/node-builder/src/lib.rs index b8a5ef507ef5..25d2027ec670 100644 --- a/crates/node-builder/src/lib.rs +++ b/crates/node-builder/src/lib.rs @@ -5,7 +5,7 @@ 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))] +#![warn(unused_crate_dependencies)] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] #![warn(unused_crate_dependencies)] diff --git a/crates/payload/basic/src/lib.rs b/crates/payload/basic/src/lib.rs index fb7d9d42e838..9540ef659228 100644 --- a/crates/payload/basic/src/lib.rs +++ b/crates/payload/basic/src/lib.rs @@ -5,7 +5,7 @@ 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))] +#![warn(unused_crate_dependencies)] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] use crate::metrics::PayloadBuilderMetrics; diff --git a/crates/payload/builder/Cargo.toml b/crates/payload/builder/Cargo.toml index 17a61a76112a..296b5f8a3743 100644 --- a/crates/payload/builder/Cargo.toml +++ b/crates/payload/builder/Cargo.toml @@ -39,15 +39,12 @@ thiserror.workspace = true sha2 = { version = "0.10", default-features = false } tracing.workspace = true -[dev-dependencies] -revm.workspace = true - [features] test-utils = [] optimism = [ - "reth-primitives/optimism", - "reth-rpc-types/optimism", - "reth-rpc-types-compat/optimism", - "reth-interfaces/optimism", - "reth-transaction-pool/optimism", + "reth-primitives/optimism", + "reth-rpc-types/optimism", + "reth-rpc-types-compat/optimism", + "reth-interfaces/optimism", + "reth-transaction-pool/optimism", ] diff --git a/crates/payload/builder/src/lib.rs b/crates/payload/builder/src/lib.rs index a14b9308ff2f..d2bac277ee49 100644 --- a/crates/payload/builder/src/lib.rs +++ b/crates/payload/builder/src/lib.rs @@ -98,7 +98,7 @@ 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))] +#![warn(unused_crate_dependencies)] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] pub mod database; diff --git a/crates/payload/ethereum/src/lib.rs b/crates/payload/ethereum/src/lib.rs index 43e2ccfb4ae4..01690f7c75a8 100644 --- a/crates/payload/ethereum/src/lib.rs +++ b/crates/payload/ethereum/src/lib.rs @@ -5,7 +5,7 @@ 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))] +#![warn(unused_crate_dependencies)] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] use reth_basic_payload_builder::{ diff --git a/crates/payload/validator/src/lib.rs b/crates/payload/validator/src/lib.rs index 4f9f5150730e..7f617b09cf42 100644 --- a/crates/payload/validator/src/lib.rs +++ b/crates/payload/validator/src/lib.rs @@ -5,7 +5,7 @@ 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))] +#![warn(unused_crate_dependencies)] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] use reth_primitives::{ChainSpec, SealedBlock}; diff --git a/crates/prune/src/lib.rs b/crates/prune/src/lib.rs index 3cd3730e3939..155c2c226fca 100644 --- a/crates/prune/src/lib.rs +++ b/crates/prune/src/lib.rs @@ -5,7 +5,7 @@ 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))] +#![warn(unused_crate_dependencies)] #![allow(missing_docs)] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] diff --git a/crates/revm/src/lib.rs b/crates/revm/src/lib.rs index a9891b50e9bd..3de0f2920791 100644 --- a/crates/revm/src/lib.rs +++ b/crates/revm/src/lib.rs @@ -5,7 +5,7 @@ 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))] +#![warn(unused_crate_dependencies)] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] /// Contains glue code for integrating reth database into revm's [Database]. diff --git a/crates/rpc/ipc/src/lib.rs b/crates/rpc/ipc/src/lib.rs index 2d0193ed65f7..cf961a28fcbf 100644 --- a/crates/rpc/ipc/src/lib.rs +++ b/crates/rpc/ipc/src/lib.rs @@ -9,7 +9,7 @@ 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))] +#![warn(unused_crate_dependencies)] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] #[cfg(unix)] diff --git a/crates/rpc/rpc-api/src/lib.rs b/crates/rpc/rpc-api/src/lib.rs index ec8757d83696..4ec581226961 100644 --- a/crates/rpc/rpc-api/src/lib.rs +++ b/crates/rpc/rpc-api/src/lib.rs @@ -11,7 +11,7 @@ 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))] +#![warn(unused_crate_dependencies)] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] mod admin; diff --git a/crates/rpc/rpc-testing-util/src/lib.rs b/crates/rpc/rpc-testing-util/src/lib.rs index ebf5090b715d..1560aad367fc 100644 --- a/crates/rpc/rpc-testing-util/src/lib.rs +++ b/crates/rpc/rpc-testing-util/src/lib.rs @@ -5,7 +5,7 @@ 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))] +#![warn(unused_crate_dependencies)] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] pub mod debug; diff --git a/crates/rpc/rpc-types-compat/src/lib.rs b/crates/rpc/rpc-types-compat/src/lib.rs index 7aabf43234d9..699db6c5ebe4 100644 --- a/crates/rpc/rpc-types-compat/src/lib.rs +++ b/crates/rpc/rpc-types-compat/src/lib.rs @@ -7,7 +7,7 @@ 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))] +#![warn(unused_crate_dependencies)] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] pub mod block; diff --git a/crates/storage/codecs/derive/src/lib.rs b/crates/storage/codecs/derive/src/lib.rs index 9af83148be68..2b893eb2279d 100644 --- a/crates/storage/codecs/derive/src/lib.rs +++ b/crates/storage/codecs/derive/src/lib.rs @@ -5,7 +5,7 @@ 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))] +#![warn(unused_crate_dependencies)] #![allow(unreachable_pub, missing_docs)] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] diff --git a/crates/storage/libmdbx-rs/mdbx-sys/src/lib.rs b/crates/storage/libmdbx-rs/mdbx-sys/src/lib.rs index 6f86951ca5e2..367421f455e4 100644 --- a/crates/storage/libmdbx-rs/mdbx-sys/src/lib.rs +++ b/crates/storage/libmdbx-rs/mdbx-sys/src/lib.rs @@ -5,7 +5,7 @@ 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))] +#![warn(unused_crate_dependencies)] #![allow(non_upper_case_globals, non_camel_case_types, non_snake_case, clippy::all)] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] diff --git a/crates/storage/nippy-jar/src/lib.rs b/crates/storage/nippy-jar/src/lib.rs index 16960404c964..1bf5c09826d0 100644 --- a/crates/storage/nippy-jar/src/lib.rs +++ b/crates/storage/nippy-jar/src/lib.rs @@ -5,7 +5,7 @@ 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))] +#![warn(unused_crate_dependencies)] #![allow(missing_docs)] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] diff --git a/crates/storage/provider/src/lib.rs b/crates/storage/provider/src/lib.rs index 838edd620c78..970b39b51cda 100644 --- a/crates/storage/provider/src/lib.rs +++ b/crates/storage/provider/src/lib.rs @@ -9,7 +9,7 @@ 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))] +#![warn(unused_crate_dependencies)] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] /// Various provider traits. diff --git a/crates/tasks/src/lib.rs b/crates/tasks/src/lib.rs index c651196f81c2..e03be11116d7 100644 --- a/crates/tasks/src/lib.rs +++ b/crates/tasks/src/lib.rs @@ -5,7 +5,7 @@ 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))] +#![warn(unused_crate_dependencies)] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] use crate::{ diff --git a/crates/tokio-util/src/lib.rs b/crates/tokio-util/src/lib.rs index 7db8dcfba16a..d28fafc587c8 100644 --- a/crates/tokio-util/src/lib.rs +++ b/crates/tokio-util/src/lib.rs @@ -5,7 +5,7 @@ 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))] +#![warn(unused_crate_dependencies)] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] mod event_listeners; diff --git a/crates/tracing/src/lib.rs b/crates/tracing/src/lib.rs index 45a088a08494..fd591e025708 100644 --- a/crates/tracing/src/lib.rs +++ b/crates/tracing/src/lib.rs @@ -40,7 +40,7 @@ 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))] +#![warn(unused_crate_dependencies)] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] // Re-export tracing crates From 501ed608cac292305f54941f1c75614947c937db Mon Sep 17 00:00:00 2001 From: DaniPopes <57450786+DaniPopes@users.noreply.github.com> Date: Fri, 1 Mar 2024 12:20:00 +0100 Subject: [PATCH 20/22] fix: doctests --- Cargo.lock | 1 + crates/consensus/auto-seal/src/lib.rs | 2 +- crates/consensus/beacon-core/src/lib.rs | 2 +- crates/consensus/beacon/src/lib.rs | 2 +- crates/consensus/common/src/lib.rs | 2 +- crates/ethereum-forks/src/lib.rs | 2 +- crates/etl/src/lib.rs | 2 +- crates/interfaces/src/lib.rs | 2 +- crates/metrics/src/lib.rs | 2 +- crates/net/common/src/lib.rs | 2 +- crates/net/discv4/src/lib.rs | 2 +- crates/net/dns/src/lib.rs | 2 +- crates/net/downloaders/src/lib.rs | 2 +- crates/net/ecies/src/lib.rs | 2 +- crates/net/nat/src/lib.rs | 2 +- crates/node-api/src/lib.rs | 2 +- crates/node-builder/src/lib.rs | 4 ++-- crates/payload/basic/src/lib.rs | 2 +- crates/payload/builder/Cargo.toml | 3 +++ crates/payload/builder/src/lib.rs | 2 +- crates/payload/ethereum/src/lib.rs | 2 +- crates/payload/validator/src/lib.rs | 2 +- crates/prune/src/lib.rs | 2 +- crates/revm/src/lib.rs | 2 +- crates/rpc/ipc/src/lib.rs | 2 +- crates/rpc/rpc-api/src/lib.rs | 2 +- crates/rpc/rpc-testing-util/src/lib.rs | 2 +- crates/rpc/rpc-types-compat/src/lib.rs | 2 +- crates/storage/codecs/derive/src/lib.rs | 2 +- crates/storage/codecs/src/lib.rs | 2 +- crates/storage/libmdbx-rs/mdbx-sys/src/lib.rs | 2 +- crates/storage/nippy-jar/src/lib.rs | 2 +- crates/storage/provider/src/lib.rs | 2 +- crates/tasks/src/lib.rs | 2 +- crates/tokio-util/src/lib.rs | 2 +- crates/tracing/src/lib.rs | 2 +- examples/beacon-api-sse/src/main.rs | 2 +- examples/custom-dev-node/src/main.rs | 2 +- examples/custom-evm/src/main.rs | 2 +- examples/custom-inspector/src/main.rs | 2 +- examples/custom-node-components/src/main.rs | 2 +- examples/custom-node/src/main.rs | 2 +- examples/custom-payload-builder/src/main.rs | 2 +- examples/trace-transaction-cli/src/main.rs | 2 +- 44 files changed, 47 insertions(+), 43 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f844c6891ca2..57ec3579c5c1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6546,6 +6546,7 @@ dependencies = [ "reth-rpc-types", "reth-rpc-types-compat", "reth-transaction-pool", + "revm", "revm-primitives", "sha2", "thiserror", diff --git a/crates/consensus/auto-seal/src/lib.rs b/crates/consensus/auto-seal/src/lib.rs index 388c5de2a989..67261af4ad15 100644 --- a/crates/consensus/auto-seal/src/lib.rs +++ b/crates/consensus/auto-seal/src/lib.rs @@ -12,7 +12,7 @@ html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256", issue_tracker_base_url = "https://github.com/paradigmxyz/reth/issues/" )] -#![warn(unused_crate_dependencies)] +#![cfg_attr(not(test), warn(unused_crate_dependencies))] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] use reth_beacon_consensus::BeaconEngineMessage; diff --git a/crates/consensus/beacon-core/src/lib.rs b/crates/consensus/beacon-core/src/lib.rs index aa8f7878873c..230278c88532 100644 --- a/crates/consensus/beacon-core/src/lib.rs +++ b/crates/consensus/beacon-core/src/lib.rs @@ -5,7 +5,7 @@ html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256", issue_tracker_base_url = "https://github.com/paradigmxyz/reth/issues/" )] -#![warn(unused_crate_dependencies)] +#![cfg_attr(not(test), warn(unused_crate_dependencies))] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] use reth_consensus_common::validation; diff --git a/crates/consensus/beacon/src/lib.rs b/crates/consensus/beacon/src/lib.rs index 7e5616ad62d3..5a9e1da4ab9c 100644 --- a/crates/consensus/beacon/src/lib.rs +++ b/crates/consensus/beacon/src/lib.rs @@ -5,7 +5,7 @@ html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256", issue_tracker_base_url = "https://github.com/paradigmxyz/reth/issues/" )] -#![warn(unused_crate_dependencies)] +#![cfg_attr(not(test), warn(unused_crate_dependencies))] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] pub use reth_beacon_consensus_core::BeaconConsensus; diff --git a/crates/consensus/common/src/lib.rs b/crates/consensus/common/src/lib.rs index 7cbd55548429..e3503656bb34 100644 --- a/crates/consensus/common/src/lib.rs +++ b/crates/consensus/common/src/lib.rs @@ -5,7 +5,7 @@ html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256", issue_tracker_base_url = "https://github.com/paradigmxyz/reth/issues/" )] -#![warn(unused_crate_dependencies)] +#![cfg_attr(not(test), warn(unused_crate_dependencies))] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] /// Collection of consensus validation methods. diff --git a/crates/ethereum-forks/src/lib.rs b/crates/ethereum-forks/src/lib.rs index e4060acf40c3..e781fe3a5694 100644 --- a/crates/ethereum-forks/src/lib.rs +++ b/crates/ethereum-forks/src/lib.rs @@ -11,7 +11,7 @@ html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256", issue_tracker_base_url = "https://github.com/paradigmxyz/reth/issues/" )] -#![warn(unused_crate_dependencies)] +#![cfg_attr(not(test), warn(unused_crate_dependencies))] // TODO: remove when https://github.com/proptest-rs/proptest/pull/427 is merged #![allow(unknown_lints, non_local_definitions)] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] diff --git a/crates/etl/src/lib.rs b/crates/etl/src/lib.rs index 1f8c0c9393f4..0676267e0daf 100644 --- a/crates/etl/src/lib.rs +++ b/crates/etl/src/lib.rs @@ -11,7 +11,7 @@ html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256", issue_tracker_base_url = "https://github.com/paradigmxyz/reth/issues/" )] -#![warn(unused_crate_dependencies)] +#![cfg_attr(not(test), warn(unused_crate_dependencies))] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] use std::{ diff --git a/crates/interfaces/src/lib.rs b/crates/interfaces/src/lib.rs index 3e92ea592967..437dc79e19ed 100644 --- a/crates/interfaces/src/lib.rs +++ b/crates/interfaces/src/lib.rs @@ -9,7 +9,7 @@ html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256", issue_tracker_base_url = "https://github.com/paradigmxyz/reth/issues/" )] -#![warn(unused_crate_dependencies)] +#![cfg_attr(not(test), warn(unused_crate_dependencies))] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] /// Consensus traits. diff --git a/crates/metrics/src/lib.rs b/crates/metrics/src/lib.rs index 55175dacdb4f..968112c5d9ee 100644 --- a/crates/metrics/src/lib.rs +++ b/crates/metrics/src/lib.rs @@ -10,7 +10,7 @@ html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256", issue_tracker_base_url = "https://github.com/paradigmxyz/reth/issues/" )] -#![warn(unused_crate_dependencies)] +#![cfg_attr(not(test), warn(unused_crate_dependencies))] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] /// Metrics derive macro. diff --git a/crates/net/common/src/lib.rs b/crates/net/common/src/lib.rs index 13d5821c0fce..f9eed8344519 100644 --- a/crates/net/common/src/lib.rs +++ b/crates/net/common/src/lib.rs @@ -5,7 +5,7 @@ html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256", issue_tracker_base_url = "https://github.com/paradigmxyz/reth/issues/" )] -#![warn(unused_crate_dependencies)] +#![cfg_attr(not(test), warn(unused_crate_dependencies))] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] pub mod ban_list; diff --git a/crates/net/discv4/src/lib.rs b/crates/net/discv4/src/lib.rs index 60e3bd9893dc..59c45f131aa6 100644 --- a/crates/net/discv4/src/lib.rs +++ b/crates/net/discv4/src/lib.rs @@ -21,7 +21,7 @@ html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256", issue_tracker_base_url = "https://github.com/paradigmxyz/reth/issues/" )] -#![warn(unused_crate_dependencies)] +#![cfg_attr(not(test), warn(unused_crate_dependencies))] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] use crate::{ diff --git a/crates/net/dns/src/lib.rs b/crates/net/dns/src/lib.rs index ed08fb420b62..c344a63b9b80 100644 --- a/crates/net/dns/src/lib.rs +++ b/crates/net/dns/src/lib.rs @@ -10,7 +10,7 @@ html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256", issue_tracker_base_url = "https://github.com/paradigmxyz/reth/issues/" )] -#![warn(unused_crate_dependencies)] +#![cfg_attr(not(test), warn(unused_crate_dependencies))] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] pub use crate::resolver::{DnsResolver, MapResolver, Resolver}; diff --git a/crates/net/downloaders/src/lib.rs b/crates/net/downloaders/src/lib.rs index 3a707516c477..37c4a95e3fd1 100644 --- a/crates/net/downloaders/src/lib.rs +++ b/crates/net/downloaders/src/lib.rs @@ -9,7 +9,7 @@ html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256", issue_tracker_base_url = "https://github.com/paradigmxyz/reth/issues/" )] -#![warn(unused_crate_dependencies)] +#![cfg_attr(not(test), warn(unused_crate_dependencies))] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] /// The collection of algorithms for downloading block bodies. diff --git a/crates/net/ecies/src/lib.rs b/crates/net/ecies/src/lib.rs index 3a53d51d6c4b..5fd165eb991c 100644 --- a/crates/net/ecies/src/lib.rs +++ b/crates/net/ecies/src/lib.rs @@ -5,7 +5,7 @@ html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256", issue_tracker_base_url = "https://github.com/paradigmxyz/reth/issues/" )] -#![warn(unused_crate_dependencies)] +#![cfg_attr(not(test), warn(unused_crate_dependencies))] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] pub mod algorithm; diff --git a/crates/net/nat/src/lib.rs b/crates/net/nat/src/lib.rs index 49410943a83c..0930411a0872 100644 --- a/crates/net/nat/src/lib.rs +++ b/crates/net/nat/src/lib.rs @@ -9,7 +9,7 @@ html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256", issue_tracker_base_url = "https://github.com/paradigmxyz/reth/issues/" )] -#![warn(unused_crate_dependencies)] +#![cfg_attr(not(test), warn(unused_crate_dependencies))] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] use igd_next::aio::tokio::search_gateway; diff --git a/crates/node-api/src/lib.rs b/crates/node-api/src/lib.rs index 08be14489020..ed4275899957 100644 --- a/crates/node-api/src/lib.rs +++ b/crates/node-api/src/lib.rs @@ -5,7 +5,7 @@ html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256", issue_tracker_base_url = "https://github.com/paradigmxyz/reth/issues/" )] -#![warn(unused_crate_dependencies)] +#![cfg_attr(not(test), warn(unused_crate_dependencies))] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] /// Traits, validation methods, and helper types used to abstract over engine types. diff --git a/crates/node-builder/src/lib.rs b/crates/node-builder/src/lib.rs index 25d2027ec670..f3cb502d4fb5 100644 --- a/crates/node-builder/src/lib.rs +++ b/crates/node-builder/src/lib.rs @@ -5,9 +5,9 @@ html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256", issue_tracker_base_url = "https://github.com/paradigmxyz/reth/issues/" )] -#![warn(unused_crate_dependencies)] +#![cfg_attr(not(test), warn(unused_crate_dependencies))] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] -#![warn(unused_crate_dependencies)] +#![cfg_attr(not(test), warn(unused_crate_dependencies))] /// Node event hooks. pub mod hooks; diff --git a/crates/payload/basic/src/lib.rs b/crates/payload/basic/src/lib.rs index 9540ef659228..fb7d9d42e838 100644 --- a/crates/payload/basic/src/lib.rs +++ b/crates/payload/basic/src/lib.rs @@ -5,7 +5,7 @@ html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256", issue_tracker_base_url = "https://github.com/paradigmxyz/reth/issues/" )] -#![warn(unused_crate_dependencies)] +#![cfg_attr(not(test), warn(unused_crate_dependencies))] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] use crate::metrics::PayloadBuilderMetrics; diff --git a/crates/payload/builder/Cargo.toml b/crates/payload/builder/Cargo.toml index 296b5f8a3743..5b636d55e517 100644 --- a/crates/payload/builder/Cargo.toml +++ b/crates/payload/builder/Cargo.toml @@ -39,6 +39,9 @@ thiserror.workspace = true sha2 = { version = "0.10", default-features = false } tracing.workspace = true +[dev-dependencies] +revm.workspace = true + [features] test-utils = [] optimism = [ diff --git a/crates/payload/builder/src/lib.rs b/crates/payload/builder/src/lib.rs index d2bac277ee49..a14b9308ff2f 100644 --- a/crates/payload/builder/src/lib.rs +++ b/crates/payload/builder/src/lib.rs @@ -98,7 +98,7 @@ html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256", issue_tracker_base_url = "https://github.com/paradigmxyz/reth/issues/" )] -#![warn(unused_crate_dependencies)] +#![cfg_attr(not(test), warn(unused_crate_dependencies))] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] pub mod database; diff --git a/crates/payload/ethereum/src/lib.rs b/crates/payload/ethereum/src/lib.rs index 01690f7c75a8..43e2ccfb4ae4 100644 --- a/crates/payload/ethereum/src/lib.rs +++ b/crates/payload/ethereum/src/lib.rs @@ -5,7 +5,7 @@ html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256", issue_tracker_base_url = "https://github.com/paradigmxyz/reth/issues/" )] -#![warn(unused_crate_dependencies)] +#![cfg_attr(not(test), warn(unused_crate_dependencies))] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] use reth_basic_payload_builder::{ diff --git a/crates/payload/validator/src/lib.rs b/crates/payload/validator/src/lib.rs index 7f617b09cf42..4f9f5150730e 100644 --- a/crates/payload/validator/src/lib.rs +++ b/crates/payload/validator/src/lib.rs @@ -5,7 +5,7 @@ html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256", issue_tracker_base_url = "https://github.com/paradigmxyz/reth/issues/" )] -#![warn(unused_crate_dependencies)] +#![cfg_attr(not(test), warn(unused_crate_dependencies))] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] use reth_primitives::{ChainSpec, SealedBlock}; diff --git a/crates/prune/src/lib.rs b/crates/prune/src/lib.rs index 155c2c226fca..3cd3730e3939 100644 --- a/crates/prune/src/lib.rs +++ b/crates/prune/src/lib.rs @@ -5,7 +5,7 @@ html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256", issue_tracker_base_url = "https://github.com/paradigmxyz/reth/issues/" )] -#![warn(unused_crate_dependencies)] +#![cfg_attr(not(test), warn(unused_crate_dependencies))] #![allow(missing_docs)] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] diff --git a/crates/revm/src/lib.rs b/crates/revm/src/lib.rs index 3de0f2920791..a9891b50e9bd 100644 --- a/crates/revm/src/lib.rs +++ b/crates/revm/src/lib.rs @@ -5,7 +5,7 @@ html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256", issue_tracker_base_url = "https://github.com/paradigmxyz/reth/issues/" )] -#![warn(unused_crate_dependencies)] +#![cfg_attr(not(test), warn(unused_crate_dependencies))] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] /// Contains glue code for integrating reth database into revm's [Database]. diff --git a/crates/rpc/ipc/src/lib.rs b/crates/rpc/ipc/src/lib.rs index cf961a28fcbf..2d0193ed65f7 100644 --- a/crates/rpc/ipc/src/lib.rs +++ b/crates/rpc/ipc/src/lib.rs @@ -9,7 +9,7 @@ html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256", issue_tracker_base_url = "https://github.com/paradigmxyz/reth/issues/" )] -#![warn(unused_crate_dependencies)] +#![cfg_attr(not(test), warn(unused_crate_dependencies))] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] #[cfg(unix)] diff --git a/crates/rpc/rpc-api/src/lib.rs b/crates/rpc/rpc-api/src/lib.rs index 4ec581226961..ec8757d83696 100644 --- a/crates/rpc/rpc-api/src/lib.rs +++ b/crates/rpc/rpc-api/src/lib.rs @@ -11,7 +11,7 @@ html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256", issue_tracker_base_url = "https://github.com/paradigmxyz/reth/issues/" )] -#![warn(unused_crate_dependencies)] +#![cfg_attr(not(test), warn(unused_crate_dependencies))] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] mod admin; diff --git a/crates/rpc/rpc-testing-util/src/lib.rs b/crates/rpc/rpc-testing-util/src/lib.rs index 1560aad367fc..ebf5090b715d 100644 --- a/crates/rpc/rpc-testing-util/src/lib.rs +++ b/crates/rpc/rpc-testing-util/src/lib.rs @@ -5,7 +5,7 @@ html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256", issue_tracker_base_url = "https://github.com/paradigmxyz/reth/issues/" )] -#![warn(unused_crate_dependencies)] +#![cfg_attr(not(test), warn(unused_crate_dependencies))] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] pub mod debug; diff --git a/crates/rpc/rpc-types-compat/src/lib.rs b/crates/rpc/rpc-types-compat/src/lib.rs index 699db6c5ebe4..7aabf43234d9 100644 --- a/crates/rpc/rpc-types-compat/src/lib.rs +++ b/crates/rpc/rpc-types-compat/src/lib.rs @@ -7,7 +7,7 @@ html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256", issue_tracker_base_url = "https://github.com/paradigmxyz/reth/issues/" )] -#![warn(unused_crate_dependencies)] +#![cfg_attr(not(test), warn(unused_crate_dependencies))] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] pub mod block; diff --git a/crates/storage/codecs/derive/src/lib.rs b/crates/storage/codecs/derive/src/lib.rs index 2b893eb2279d..9af83148be68 100644 --- a/crates/storage/codecs/derive/src/lib.rs +++ b/crates/storage/codecs/derive/src/lib.rs @@ -5,7 +5,7 @@ html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256", issue_tracker_base_url = "https://github.com/paradigmxyz/reth/issues/" )] -#![warn(unused_crate_dependencies)] +#![cfg_attr(not(test), warn(unused_crate_dependencies))] #![allow(unreachable_pub, missing_docs)] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] diff --git a/crates/storage/codecs/src/lib.rs b/crates/storage/codecs/src/lib.rs index 37f3bcce4975..d55e2b655663 100644 --- a/crates/storage/codecs/src/lib.rs +++ b/crates/storage/codecs/src/lib.rs @@ -5,7 +5,7 @@ html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256", issue_tracker_base_url = "https://github.com/paradigmxyz/reth/issues/" )] -#![warn(unused_crate_dependencies)] +#![cfg_attr(not(test), warn(unused_crate_dependencies))] // TODO: remove when https://github.com/proptest-rs/proptest/pull/427 is merged #![allow(unknown_lints, non_local_definitions)] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] diff --git a/crates/storage/libmdbx-rs/mdbx-sys/src/lib.rs b/crates/storage/libmdbx-rs/mdbx-sys/src/lib.rs index 367421f455e4..6f86951ca5e2 100644 --- a/crates/storage/libmdbx-rs/mdbx-sys/src/lib.rs +++ b/crates/storage/libmdbx-rs/mdbx-sys/src/lib.rs @@ -5,7 +5,7 @@ html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256", issue_tracker_base_url = "https://github.com/paradigmxyz/reth/issues/" )] -#![warn(unused_crate_dependencies)] +#![cfg_attr(not(test), warn(unused_crate_dependencies))] #![allow(non_upper_case_globals, non_camel_case_types, non_snake_case, clippy::all)] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] diff --git a/crates/storage/nippy-jar/src/lib.rs b/crates/storage/nippy-jar/src/lib.rs index 1bf5c09826d0..16960404c964 100644 --- a/crates/storage/nippy-jar/src/lib.rs +++ b/crates/storage/nippy-jar/src/lib.rs @@ -5,7 +5,7 @@ html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256", issue_tracker_base_url = "https://github.com/paradigmxyz/reth/issues/" )] -#![warn(unused_crate_dependencies)] +#![cfg_attr(not(test), warn(unused_crate_dependencies))] #![allow(missing_docs)] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] diff --git a/crates/storage/provider/src/lib.rs b/crates/storage/provider/src/lib.rs index 970b39b51cda..838edd620c78 100644 --- a/crates/storage/provider/src/lib.rs +++ b/crates/storage/provider/src/lib.rs @@ -9,7 +9,7 @@ html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256", issue_tracker_base_url = "https://github.com/paradigmxyz/reth/issues/" )] -#![warn(unused_crate_dependencies)] +#![cfg_attr(not(test), warn(unused_crate_dependencies))] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] /// Various provider traits. diff --git a/crates/tasks/src/lib.rs b/crates/tasks/src/lib.rs index e03be11116d7..c651196f81c2 100644 --- a/crates/tasks/src/lib.rs +++ b/crates/tasks/src/lib.rs @@ -5,7 +5,7 @@ html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256", issue_tracker_base_url = "https://github.com/paradigmxyz/reth/issues/" )] -#![warn(unused_crate_dependencies)] +#![cfg_attr(not(test), warn(unused_crate_dependencies))] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] use crate::{ diff --git a/crates/tokio-util/src/lib.rs b/crates/tokio-util/src/lib.rs index d28fafc587c8..7db8dcfba16a 100644 --- a/crates/tokio-util/src/lib.rs +++ b/crates/tokio-util/src/lib.rs @@ -5,7 +5,7 @@ html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256", issue_tracker_base_url = "https://github.com/paradigmxyz/reth/issues/" )] -#![warn(unused_crate_dependencies)] +#![cfg_attr(not(test), warn(unused_crate_dependencies))] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] mod event_listeners; diff --git a/crates/tracing/src/lib.rs b/crates/tracing/src/lib.rs index fd591e025708..45a088a08494 100644 --- a/crates/tracing/src/lib.rs +++ b/crates/tracing/src/lib.rs @@ -40,7 +40,7 @@ html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256", issue_tracker_base_url = "https://github.com/paradigmxyz/reth/issues/" )] -#![warn(unused_crate_dependencies)] +#![cfg_attr(not(test), warn(unused_crate_dependencies))] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] // Re-export tracing crates diff --git a/examples/beacon-api-sse/src/main.rs b/examples/beacon-api-sse/src/main.rs index 9df64ce43a3c..38dada132e43 100644 --- a/examples/beacon-api-sse/src/main.rs +++ b/examples/beacon-api-sse/src/main.rs @@ -15,7 +15,7 @@ //! //! See lighthouse beacon Node API: -#![warn(unused_crate_dependencies)] +#![cfg_attr(not(test), warn(unused_crate_dependencies))] use clap::Parser; use futures_util::stream::StreamExt; diff --git a/examples/custom-dev-node/src/main.rs b/examples/custom-dev-node/src/main.rs index b8a2c0bfb771..a1e3656d3dbf 100644 --- a/examples/custom-dev-node/src/main.rs +++ b/examples/custom-dev-node/src/main.rs @@ -1,7 +1,7 @@ //! This example shows how to run a custom dev node programmatically and submit a transaction //! through rpc. -#![warn(unused_crate_dependencies)] +#![cfg_attr(not(test), warn(unused_crate_dependencies))] use futures_util::StreamExt; use reth::{ diff --git a/examples/custom-evm/src/main.rs b/examples/custom-evm/src/main.rs index ac9324e0ba13..63fd6a016fd7 100644 --- a/examples/custom-evm/src/main.rs +++ b/examples/custom-evm/src/main.rs @@ -1,6 +1,6 @@ //! This example shows how to implement a node with a custom EVM -#![warn(unused_crate_dependencies)] +#![cfg_attr(not(test), warn(unused_crate_dependencies))] use alloy_chains::Chain; use reth::{ diff --git a/examples/custom-inspector/src/main.rs b/examples/custom-inspector/src/main.rs index 246073df9051..4e7606306444 100644 --- a/examples/custom-inspector/src/main.rs +++ b/examples/custom-inspector/src/main.rs @@ -8,7 +8,7 @@ //! //! If no recipients are specified, all transactions will be inspected. -#![warn(unused_crate_dependencies)] +#![cfg_attr(not(test), warn(unused_crate_dependencies))] use clap::Parser; use futures_util::StreamExt; diff --git a/examples/custom-node-components/src/main.rs b/examples/custom-node-components/src/main.rs index 4459cb71cf11..96672807dc75 100644 --- a/examples/custom-node-components/src/main.rs +++ b/examples/custom-node-components/src/main.rs @@ -1,6 +1,6 @@ //! This example shows how to configure custom components for a reth node. -#![warn(unused_crate_dependencies)] +#![cfg_attr(not(test), warn(unused_crate_dependencies))] use reth::{ builder::{components::PoolBuilder, BuilderContext, FullNodeTypes}, diff --git a/examples/custom-node/src/main.rs b/examples/custom-node/src/main.rs index ab707802fdd0..076b864e5a25 100644 --- a/examples/custom-node/src/main.rs +++ b/examples/custom-node/src/main.rs @@ -15,7 +15,7 @@ //! Once traits are implemented and custom types are defined, the [EngineTypes] trait can be //! implemented: -#![warn(unused_crate_dependencies)] +#![cfg_attr(not(test), warn(unused_crate_dependencies))] use alloy_chains::Chain; use reth::{ diff --git a/examples/custom-payload-builder/src/main.rs b/examples/custom-payload-builder/src/main.rs index 67a0bc223d0d..2fadb9c364be 100644 --- a/examples/custom-payload-builder/src/main.rs +++ b/examples/custom-payload-builder/src/main.rs @@ -9,7 +9,7 @@ //! //! This launch the regular reth node overriding the engine api payload builder with our custom. -#![warn(unused_crate_dependencies)] +#![cfg_attr(not(test), warn(unused_crate_dependencies))] use generator::EmptyBlockPayloadJobGenerator; use reth::{ diff --git a/examples/trace-transaction-cli/src/main.rs b/examples/trace-transaction-cli/src/main.rs index 8f06ac8a3970..7a4fde6af5ac 100644 --- a/examples/trace-transaction-cli/src/main.rs +++ b/examples/trace-transaction-cli/src/main.rs @@ -8,7 +8,7 @@ //! //! If no recipients are specified, all transactions will be traced. -#![warn(unused_crate_dependencies)] +#![cfg_attr(not(test), warn(unused_crate_dependencies))] use clap::Parser; use futures_util::StreamExt; From 708c3da6fcc6d3e4caa4a58aa671a7c215cb51bf Mon Sep 17 00:00:00 2001 From: DaniPopes <57450786+DaniPopes@users.noreply.github.com> Date: Fri, 1 Mar 2024 12:21:42 +0100 Subject: [PATCH 21/22] fmt: toml --- crates/revm/Cargo.toml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/revm/Cargo.toml b/crates/revm/Cargo.toml index c38ab6d8c1d6..04039a02d385 100644 --- a/crates/revm/Cargo.toml +++ b/crates/revm/Cargo.toml @@ -32,9 +32,9 @@ reth-node-ethereum.workspace = true [features] optimism = [ - "revm/optimism", - "reth-primitives/optimism", - "reth-consensus-common/optimism", - "reth-interfaces/optimism", + "revm/optimism", + "reth-primitives/optimism", + "reth-consensus-common/optimism", + "reth-interfaces/optimism", ] js-tracer = ["revm-inspectors/js-tracer"] From 68b9170a00de059ef4e98b32aaf2599c91ac6552 Mon Sep 17 00:00:00 2001 From: DaniPopes <57450786+DaniPopes@users.noreply.github.com> Date: Fri, 1 Mar 2024 12:22:27 +0100 Subject: [PATCH 22/22] chore: rm duplicate --- crates/node-builder/src/lib.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/crates/node-builder/src/lib.rs b/crates/node-builder/src/lib.rs index f3cb502d4fb5..b394288109ba 100644 --- a/crates/node-builder/src/lib.rs +++ b/crates/node-builder/src/lib.rs @@ -7,7 +7,6 @@ )] #![cfg_attr(not(test), warn(unused_crate_dependencies))] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] -#![cfg_attr(not(test), warn(unused_crate_dependencies))] /// Node event hooks. pub mod hooks;