From e341f47a163562223cd02f3561df9e29950ef911 Mon Sep 17 00:00:00 2001 From: DaniPopes <57450786+DaniPopes@users.noreply.github.com> Date: Thu, 28 Dec 2023 16:52:20 +0100 Subject: [PATCH] fmt: add a space between inner doc-comments and following items (#5880) --- bin/reth/src/args/dev_args.rs | 1 + bin/reth/src/cli/mod.rs | 1 + bin/reth/src/config.rs | 3 ++- bin/reth/src/db/mod.rs | 1 + bin/reth/src/debug_cmd/build_block.rs | 1 + bin/reth/src/debug_cmd/execution.rs | 1 + bin/reth/src/debug_cmd/in_memory_merkle.rs | 1 + bin/reth/src/debug_cmd/merkle.rs | 1 + bin/reth/src/debug_cmd/mod.rs | 1 + bin/reth/src/dirs.rs | 1 + bin/reth/src/init.rs | 1 + bin/reth/src/node/mod.rs | 1 + bin/reth/src/p2p/mod.rs | 1 + bin/reth/src/prometheus_exporter.rs | 1 + bin/reth/src/recover/mod.rs | 1 + bin/reth/src/stage/drop.rs | 1 + bin/reth/src/stage/dump/mod.rs | 1 + bin/reth/src/stage/mod.rs | 1 + bin/reth/src/stage/run.rs | 1 + bin/reth/src/test_vectors/mod.rs | 1 + crates/blockchain-tree/src/blockchain_tree.rs | 1 + crates/blockchain-tree/src/chain.rs | 1 + crates/blockchain-tree/src/shareable.rs | 1 + crates/config/src/config.rs | 1 + crates/consensus/auto-seal/src/client.rs | 1 + crates/consensus/auto-seal/tests/it/auto_mine.rs | 1 + crates/consensus/beacon/src/beacon_consensus.rs | 1 + crates/consensus/common/src/validation.rs | 1 + crates/interfaces/src/sync.rs | 1 + crates/net/common/src/ban_list.rs | 1 + crates/net/downloaders/src/test_utils/file_codec.rs | 1 + crates/net/ecies/src/stream.rs | 1 + crates/net/eth-wire/src/errors/eth.rs | 1 + crates/net/eth-wire/src/types/blocks.rs | 1 + crates/net/eth-wire/src/types/broadcast.rs | 1 + crates/net/eth-wire/src/types/receipts.rs | 1 + crates/net/eth-wire/src/types/state.rs | 1 + crates/net/eth-wire/src/types/transactions.rs | 1 + crates/net/eth-wire/tests/fuzz_roundtrip.rs | 1 + crates/net/eth-wire/tests/new_block.rs | 1 + crates/net/eth-wire/tests/new_pooled_transactions.rs | 1 + crates/net/eth-wire/tests/pooled_transactions.rs | 1 + crates/net/network/src/session/handle.rs | 1 + crates/net/network/src/session/mod.rs | 1 + crates/net/network/tests/it/clique/geth.rs | 1 + crates/primitives/src/fs.rs | 1 + crates/primitives/src/transaction/pooled.rs | 1 + crates/primitives/src/transaction/variant.rs | 1 + crates/rpc/ipc/src/server/ipc.rs | 1 + crates/rpc/rpc-api/src/bundle.rs | 1 + crates/rpc/rpc-builder/tests/it/http.rs | 1 + crates/rpc/rpc-builder/tests/it/serde.rs | 1 + crates/rpc/rpc-builder/tests/it/startup.rs | 1 + crates/rpc/rpc-testing-util/src/trace.rs | 1 + crates/rpc/rpc-types-compat/src/engine/payload.rs | 1 + crates/rpc/rpc-types/src/eth/block.rs | 1 + crates/rpc/rpc-types/src/eth/engine/cancun.rs | 1 + crates/rpc/rpc-types/src/eth/trace/filter.rs | 1 + crates/rpc/rpc-types/src/eth/transaction/signature.rs | 1 + crates/rpc/rpc-types/src/serde_helpers/json_u256.rs | 1 + crates/rpc/rpc/src/eth/api/sign.rs | 1 + crates/rpc/rpc/src/eth/api/transactions.rs | 1 + crates/rpc/rpc/src/eth/gas_oracle.rs | 1 + crates/rpc/rpc/src/eth/pubsub.rs | 1 + crates/stages/src/sets.rs | 1 + crates/storage/db/src/abstraction/mock.rs | 1 + crates/storage/db/src/tables/models/mod.rs | 1 + crates/storage/db/src/tables/utils.rs | 1 + crates/storage/provider/src/traits/chain.rs | 1 + crates/tasks/src/metrics.rs | 1 + crates/transaction-pool/src/pool/txpool.rs | 1 + crates/transaction-pool/src/pool/update.rs | 1 + examples/additional-rpc-namespace-in-cli/src/main.rs | 1 + examples/beacon-api-sse/src/main.rs | 1 + examples/cli-extension-event-hooks/src/main.rs | 1 + examples/rpc-db/src/main.rs | 1 + examples/trace-transaction-cli/src/main.rs | 1 + 77 files changed, 78 insertions(+), 1 deletion(-) diff --git a/bin/reth/src/args/dev_args.rs b/bin/reth/src/args/dev_args.rs index 1f2df6132..929b3fd10 100644 --- a/bin/reth/src/args/dev_args.rs +++ b/bin/reth/src/args/dev_args.rs @@ -1,4 +1,5 @@ //! clap [Args](clap::Args) for Dev testnet configuration + use std::time::Duration; use clap::Args; diff --git a/bin/reth/src/cli/mod.rs b/bin/reth/src/cli/mod.rs index 14f25a279..73fc2a46c 100644 --- a/bin/reth/src/cli/mod.rs +++ b/bin/reth/src/cli/mod.rs @@ -1,4 +1,5 @@ //! CLI definition and entrypoint to executable + use crate::{ args::utils::{chain_help, genesis_value_parser, SUPPORTED_CHAINS}, chain, diff --git a/bin/reth/src/config.rs b/bin/reth/src/config.rs index f46860559..890a00611 100644 --- a/bin/reth/src/config.rs +++ b/bin/reth/src/config.rs @@ -1,4 +1,5 @@ -//! CLI command to show configs +//! CLI command to show configs. + use std::path::PathBuf; use clap::Parser; diff --git a/bin/reth/src/db/mod.rs b/bin/reth/src/db/mod.rs index 6aa06e6c9..d15b73f74 100644 --- a/bin/reth/src/db/mod.rs +++ b/bin/reth/src/db/mod.rs @@ -1,4 +1,5 @@ //! Database debugging tool + use crate::{ args::{ utils::{chain_help, genesis_value_parser, SUPPORTED_CHAINS}, diff --git a/bin/reth/src/debug_cmd/build_block.rs b/bin/reth/src/debug_cmd/build_block.rs index f4044940e..29728692b 100644 --- a/bin/reth/src/debug_cmd/build_block.rs +++ b/bin/reth/src/debug_cmd/build_block.rs @@ -1,4 +1,5 @@ //! Command for debugging block building. + use crate::{ args::{ utils::{chain_help, genesis_value_parser, SUPPORTED_CHAINS}, diff --git a/bin/reth/src/debug_cmd/execution.rs b/bin/reth/src/debug_cmd/execution.rs index e876b4fce..4a9ae9698 100644 --- a/bin/reth/src/debug_cmd/execution.rs +++ b/bin/reth/src/debug_cmd/execution.rs @@ -1,4 +1,5 @@ //! Command for debugging execution. + use crate::{ args::{ get_secret_key, diff --git a/bin/reth/src/debug_cmd/in_memory_merkle.rs b/bin/reth/src/debug_cmd/in_memory_merkle.rs index 72d3ef97b..b15b71b1a 100644 --- a/bin/reth/src/debug_cmd/in_memory_merkle.rs +++ b/bin/reth/src/debug_cmd/in_memory_merkle.rs @@ -1,4 +1,5 @@ //! Command for debugging in-memory merkle trie calculation. + use crate::{ args::{ get_secret_key, diff --git a/bin/reth/src/debug_cmd/merkle.rs b/bin/reth/src/debug_cmd/merkle.rs index b590382af..ac2f6c771 100644 --- a/bin/reth/src/debug_cmd/merkle.rs +++ b/bin/reth/src/debug_cmd/merkle.rs @@ -1,4 +1,5 @@ //! Command for debugging merkle trie calculation. + use crate::{ args::{ get_secret_key, diff --git a/bin/reth/src/debug_cmd/mod.rs b/bin/reth/src/debug_cmd/mod.rs index 75cc196ed..ae7fe1bec 100644 --- a/bin/reth/src/debug_cmd/mod.rs +++ b/bin/reth/src/debug_cmd/mod.rs @@ -1,4 +1,5 @@ //! `reth debug` command. Collection of various debugging routines. + use clap::{Parser, Subcommand}; use crate::runner::CliContext; diff --git a/bin/reth/src/dirs.rs b/bin/reth/src/dirs.rs index 064b18e7f..e68012e08 100644 --- a/bin/reth/src/dirs.rs +++ b/bin/reth/src/dirs.rs @@ -1,4 +1,5 @@ //! reth data directories. + use crate::utils::parse_path; use reth_primitives::Chain; use std::{ diff --git a/bin/reth/src/init.rs b/bin/reth/src/init.rs index 04b290362..a4e834036 100644 --- a/bin/reth/src/init.rs +++ b/bin/reth/src/init.rs @@ -1,4 +1,5 @@ //! Reth genesis initialization utility functions. + use reth_db::{ cursor::DbCursorRO, database::Database, diff --git a/bin/reth/src/node/mod.rs b/bin/reth/src/node/mod.rs index 7cecca9f2..e8a8eecea 100644 --- a/bin/reth/src/node/mod.rs +++ b/bin/reth/src/node/mod.rs @@ -1,6 +1,7 @@ //! Main node command //! //! Starts the client + use crate::{ args::{ get_secret_key, diff --git a/bin/reth/src/p2p/mod.rs b/bin/reth/src/p2p/mod.rs index 6c59b5853..b0a167457 100644 --- a/bin/reth/src/p2p/mod.rs +++ b/bin/reth/src/p2p/mod.rs @@ -1,4 +1,5 @@ //! P2P Debugging tool + use crate::{ args::{ get_secret_key, diff --git a/bin/reth/src/prometheus_exporter.rs b/bin/reth/src/prometheus_exporter.rs index e681933ea..be1dc645b 100644 --- a/bin/reth/src/prometheus_exporter.rs +++ b/bin/reth/src/prometheus_exporter.rs @@ -1,4 +1,5 @@ //! Prometheus exporter + use eyre::WrapErr; use hyper::{ service::{make_service_fn, service_fn}, diff --git a/bin/reth/src/recover/mod.rs b/bin/reth/src/recover/mod.rs index dd649abac..ded54fa6d 100644 --- a/bin/reth/src/recover/mod.rs +++ b/bin/reth/src/recover/mod.rs @@ -1,4 +1,5 @@ //! `reth recover` command. + use clap::{Parser, Subcommand}; use crate::runner::CliContext; diff --git a/bin/reth/src/stage/drop.rs b/bin/reth/src/stage/drop.rs index dc8dac8a0..2bca4ec47 100644 --- a/bin/reth/src/stage/drop.rs +++ b/bin/reth/src/stage/drop.rs @@ -1,4 +1,5 @@ //! Database debugging tool + use crate::{ args::{ utils::{chain_help, genesis_value_parser, SUPPORTED_CHAINS}, diff --git a/bin/reth/src/stage/dump/mod.rs b/bin/reth/src/stage/dump/mod.rs index d424b523f..f06a45767 100644 --- a/bin/reth/src/stage/dump/mod.rs +++ b/bin/reth/src/stage/dump/mod.rs @@ -1,4 +1,5 @@ //! Database debugging tool + use crate::{ dirs::{DataDirPath, MaybePlatformPath}, utils::DbTool, diff --git a/bin/reth/src/stage/mod.rs b/bin/reth/src/stage/mod.rs index 8c17b7336..a3e2fa19e 100644 --- a/bin/reth/src/stage/mod.rs +++ b/bin/reth/src/stage/mod.rs @@ -1,4 +1,5 @@ //! `reth stage` command + use clap::{Parser, Subcommand}; pub mod drop; diff --git a/bin/reth/src/stage/run.rs b/bin/reth/src/stage/run.rs index 22343d4a2..9a13b273e 100644 --- a/bin/reth/src/stage/run.rs +++ b/bin/reth/src/stage/run.rs @@ -1,6 +1,7 @@ //! Main `stage` command //! //! Stage debugging tool + use crate::{ args::{ get_secret_key, diff --git a/bin/reth/src/test_vectors/mod.rs b/bin/reth/src/test_vectors/mod.rs index 4f81d400d..7315b6006 100644 --- a/bin/reth/src/test_vectors/mod.rs +++ b/bin/reth/src/test_vectors/mod.rs @@ -1,4 +1,5 @@ //! Command for generating test vectors. + use clap::{Parser, Subcommand}; mod tables; diff --git a/crates/blockchain-tree/src/blockchain_tree.rs b/crates/blockchain-tree/src/blockchain_tree.rs index c75c012a6..d10e79e54 100644 --- a/crates/blockchain-tree/src/blockchain_tree.rs +++ b/crates/blockchain-tree/src/blockchain_tree.rs @@ -1,4 +1,5 @@ //! Implementation of [`BlockchainTree`] + use crate::{ canonical_chain::CanonicalChain, chain::BlockKind, diff --git a/crates/blockchain-tree/src/chain.rs b/crates/blockchain-tree/src/chain.rs index d0204a8cd..6d9128213 100644 --- a/crates/blockchain-tree/src/chain.rs +++ b/crates/blockchain-tree/src/chain.rs @@ -2,6 +2,7 @@ //! //! A [`Chain`] contains the state of accounts for the chain after execution of its constituent //! blocks, as well as a list of the blocks the chain is composed of. + use super::externals::TreeExternals; use crate::BundleStateDataRef; use reth_db::database::Database; diff --git a/crates/blockchain-tree/src/shareable.rs b/crates/blockchain-tree/src/shareable.rs index d4776a67c..5be33fc71 100644 --- a/crates/blockchain-tree/src/shareable.rs +++ b/crates/blockchain-tree/src/shareable.rs @@ -1,4 +1,5 @@ //! Wrapper around BlockchainTree that allows for it to be shared. + use super::BlockchainTree; use parking_lot::RwLock; use reth_db::database::Database; diff --git a/crates/config/src/config.rs b/crates/config/src/config.rs index 03d347e2a..73755baac 100644 --- a/crates/config/src/config.rs +++ b/crates/config/src/config.rs @@ -1,4 +1,5 @@ //! Configuration files. + use reth_discv4::Discv4Config; use reth_network::{NetworkConfigBuilder, PeersConfig, SessionsConfig}; use reth_primitives::PruneModes; diff --git a/crates/consensus/auto-seal/src/client.rs b/crates/consensus/auto-seal/src/client.rs index 7fa13a860..7ed69c289 100644 --- a/crates/consensus/auto-seal/src/client.rs +++ b/crates/consensus/auto-seal/src/client.rs @@ -1,4 +1,5 @@ //! This includes download client implementations for auto sealing miners. + use crate::Storage; use reth_interfaces::p2p::{ bodies::client::{BodiesClient, BodiesFut}, diff --git a/crates/consensus/auto-seal/tests/it/auto_mine.rs b/crates/consensus/auto-seal/tests/it/auto_mine.rs index 8fe3809eb..ae3159bb3 100644 --- a/crates/consensus/auto-seal/tests/it/auto_mine.rs +++ b/crates/consensus/auto-seal/tests/it/auto_mine.rs @@ -1,4 +1,5 @@ //! auto-mine consensus integration test + use clap::Parser; use jsonrpsee::{core::client::ClientT, http_client::HttpClientBuilder, rpc_params}; use reth::{ diff --git a/crates/consensus/beacon/src/beacon_consensus.rs b/crates/consensus/beacon/src/beacon_consensus.rs index e54fec714..d0e8dcf00 100644 --- a/crates/consensus/beacon/src/beacon_consensus.rs +++ b/crates/consensus/beacon/src/beacon_consensus.rs @@ -1,4 +1,5 @@ //! Consensus for ethereum network + use reth_consensus_common::validation; use reth_interfaces::consensus::{Consensus, ConsensusError}; use reth_primitives::{ diff --git a/crates/consensus/common/src/validation.rs b/crates/consensus/common/src/validation.rs index 85cc5adee..6ee52bad4 100644 --- a/crates/consensus/common/src/validation.rs +++ b/crates/consensus/common/src/validation.rs @@ -1,4 +1,5 @@ //! Collection of methods for block validation. + use reth_interfaces::{consensus::ConsensusError, RethResult}; use reth_primitives::{ constants::{ diff --git a/crates/interfaces/src/sync.rs b/crates/interfaces/src/sync.rs index 79702cc3d..729271b57 100644 --- a/crates/interfaces/src/sync.rs +++ b/crates/interfaces/src/sync.rs @@ -1,4 +1,5 @@ //! Traits used when interacting with the sync status of the network. + use reth_primitives::Head; /// A type that provides information about whether the node is currently syncing and the network is diff --git a/crates/net/common/src/ban_list.rs b/crates/net/common/src/ban_list.rs index fdd9aabe8..b89e04f5d 100644 --- a/crates/net/common/src/ban_list.rs +++ b/crates/net/common/src/ban_list.rs @@ -1,4 +1,5 @@ //! Support for banning peers. + use reth_primitives::PeerId; use std::{collections::HashMap, net::IpAddr, time::Instant}; diff --git a/crates/net/downloaders/src/test_utils/file_codec.rs b/crates/net/downloaders/src/test_utils/file_codec.rs index 443877026..b0cc90448 100644 --- a/crates/net/downloaders/src/test_utils/file_codec.rs +++ b/crates/net/downloaders/src/test_utils/file_codec.rs @@ -1,4 +1,5 @@ //! Codec for reading raw block bodies from a file. + use super::FileClientError; use alloy_rlp::{Decodable, Encodable}; use reth_primitives::{ diff --git a/crates/net/ecies/src/stream.rs b/crates/net/ecies/src/stream.rs index f3330c4a2..363224859 100644 --- a/crates/net/ecies/src/stream.rs +++ b/crates/net/ecies/src/stream.rs @@ -1,4 +1,5 @@ //! The ECIES Stream implementation which wraps over [`AsyncRead`] and [`AsyncWrite`]. + use crate::{ codec::ECIESCodec, error::ECIESErrorImpl, ECIESError, EgressECIESValue, IngressECIESValue, }; diff --git a/crates/net/eth-wire/src/errors/eth.rs b/crates/net/eth-wire/src/errors/eth.rs index e05fa4e52..ede591c85 100644 --- a/crates/net/eth-wire/src/errors/eth.rs +++ b/crates/net/eth-wire/src/errors/eth.rs @@ -1,4 +1,5 @@ //! Error handling for (`EthStream`)[crate::EthStream] + use crate::{ errors::{MuxDemuxError, P2PStreamError}, version::ParseVersionError, diff --git a/crates/net/eth-wire/src/types/blocks.rs b/crates/net/eth-wire/src/types/blocks.rs index 088b4de4d..066e73afb 100644 --- a/crates/net/eth-wire/src/types/blocks.rs +++ b/crates/net/eth-wire/src/types/blocks.rs @@ -1,5 +1,6 @@ //! Implements the `GetBlockHeaders`, `GetBlockBodies`, `BlockHeaders`, and `BlockBodies` message //! types. + use alloy_rlp::{RlpDecodable, RlpDecodableWrapper, RlpEncodable, RlpEncodableWrapper}; use reth_codecs::derive_arbitrary; use reth_primitives::{BlockBody, BlockHashOrNumber, Header, HeadersDirection, B256}; diff --git a/crates/net/eth-wire/src/types/broadcast.rs b/crates/net/eth-wire/src/types/broadcast.rs index 983dcc110..4354917be 100644 --- a/crates/net/eth-wire/src/types/broadcast.rs +++ b/crates/net/eth-wire/src/types/broadcast.rs @@ -1,4 +1,5 @@ //! Types for broadcasting new data. + use crate::{EthMessage, EthVersion}; use alloy_rlp::{ Decodable, Encodable, RlpDecodable, RlpDecodableWrapper, RlpEncodable, RlpEncodableWrapper, diff --git a/crates/net/eth-wire/src/types/receipts.rs b/crates/net/eth-wire/src/types/receipts.rs index 88a0a6e12..f4de8f03d 100644 --- a/crates/net/eth-wire/src/types/receipts.rs +++ b/crates/net/eth-wire/src/types/receipts.rs @@ -1,4 +1,5 @@ //! Implements the `GetReceipts` and `Receipts` message types. + use alloy_rlp::{RlpDecodableWrapper, RlpEncodableWrapper}; use reth_codecs::derive_arbitrary; use reth_primitives::{ReceiptWithBloom, B256}; diff --git a/crates/net/eth-wire/src/types/state.rs b/crates/net/eth-wire/src/types/state.rs index bad88680f..55503f45d 100644 --- a/crates/net/eth-wire/src/types/state.rs +++ b/crates/net/eth-wire/src/types/state.rs @@ -1,4 +1,5 @@ //! Implements the `GetNodeData` and `NodeData` message types. + use alloy_rlp::{RlpDecodableWrapper, RlpEncodableWrapper}; use reth_codecs::derive_arbitrary; use reth_primitives::{Bytes, B256}; diff --git a/crates/net/eth-wire/src/types/transactions.rs b/crates/net/eth-wire/src/types/transactions.rs index 18054a5ef..ebe6ae285 100644 --- a/crates/net/eth-wire/src/types/transactions.rs +++ b/crates/net/eth-wire/src/types/transactions.rs @@ -1,4 +1,5 @@ //! Implements the `GetPooledTransactions` and `PooledTransactions` message types. + use alloy_rlp::{RlpDecodableWrapper, RlpEncodableWrapper}; use reth_codecs::derive_arbitrary; use reth_primitives::{PooledTransactionsElement, TransactionSigned, B256}; diff --git a/crates/net/eth-wire/tests/fuzz_roundtrip.rs b/crates/net/eth-wire/tests/fuzz_roundtrip.rs index ed9467d29..05369d50e 100644 --- a/crates/net/eth-wire/tests/fuzz_roundtrip.rs +++ b/crates/net/eth-wire/tests/fuzz_roundtrip.rs @@ -1,4 +1,5 @@ //! Round-trip encoding fuzzing for the `eth-wire` crate. + use alloy_rlp::{Decodable, Encodable}; use serde::Serialize; use std::fmt::Debug; diff --git a/crates/net/eth-wire/tests/new_block.rs b/crates/net/eth-wire/tests/new_block.rs index cc22a4697..a1a6e043e 100644 --- a/crates/net/eth-wire/tests/new_block.rs +++ b/crates/net/eth-wire/tests/new_block.rs @@ -1,4 +1,5 @@ //! Decoding tests for [`NewBlock`] + use alloy_rlp::Decodable; use reth_eth_wire::NewBlock; use reth_primitives::hex; diff --git a/crates/net/eth-wire/tests/new_pooled_transactions.rs b/crates/net/eth-wire/tests/new_pooled_transactions.rs index 0ed63d602..48022185c 100644 --- a/crates/net/eth-wire/tests/new_pooled_transactions.rs +++ b/crates/net/eth-wire/tests/new_pooled_transactions.rs @@ -1,4 +1,5 @@ //! Decoding tests for [`NewPooledTransactions`] + use alloy_rlp::Decodable; use reth_eth_wire::NewPooledTransactionHashes66; use reth_primitives::hex; diff --git a/crates/net/eth-wire/tests/pooled_transactions.rs b/crates/net/eth-wire/tests/pooled_transactions.rs index e1f6c1696..4ed254f1f 100644 --- a/crates/net/eth-wire/tests/pooled_transactions.rs +++ b/crates/net/eth-wire/tests/pooled_transactions.rs @@ -1,4 +1,5 @@ //! Decoding tests for [`PooledTransactions`] + use alloy_rlp::{Decodable, Encodable}; use reth_eth_wire::{EthVersion, PooledTransactions, ProtocolMessage}; use reth_primitives::{hex, Bytes, PooledTransactionsElement}; diff --git a/crates/net/network/src/session/handle.rs b/crates/net/network/src/session/handle.rs index 9e8f4ec2a..3b73c9e1f 100644 --- a/crates/net/network/src/session/handle.rs +++ b/crates/net/network/src/session/handle.rs @@ -1,4 +1,5 @@ //! Session handles. + use crate::{ message::PeerMessage, session::{conn::EthRlpxConnection, Direction, SessionId}, diff --git a/crates/net/network/src/session/mod.rs b/crates/net/network/src/session/mod.rs index 12827c6a7..9762a1d6a 100644 --- a/crates/net/network/src/session/mod.rs +++ b/crates/net/network/src/session/mod.rs @@ -1,4 +1,5 @@ //! Support for handling peer sessions. + use crate::{ message::PeerMessage, metrics::SessionManagerMetrics, diff --git a/crates/net/network/tests/it/clique/geth.rs b/crates/net/network/tests/it/clique/geth.rs index f44770153..b512efd2e 100644 --- a/crates/net/network/tests/it/clique/geth.rs +++ b/crates/net/network/tests/it/clique/geth.rs @@ -1,4 +1,5 @@ //! Helper struct for working with a clique geth instance. + use enr::k256::ecdsa::SigningKey; use ethers_core::utils::{Geth, GethInstance}; use ethers_middleware::SignerMiddleware; diff --git a/crates/primitives/src/fs.rs b/crates/primitives/src/fs.rs index 60f46e4da..23b7ee320 100644 --- a/crates/primitives/src/fs.rs +++ b/crates/primitives/src/fs.rs @@ -1,4 +1,5 @@ //! Wrapper for `std::fs` methods + use std::{ fs::{self, ReadDir}, io, diff --git a/crates/primitives/src/transaction/pooled.rs b/crates/primitives/src/transaction/pooled.rs index 19ec80105..bff710968 100644 --- a/crates/primitives/src/transaction/pooled.rs +++ b/crates/primitives/src/transaction/pooled.rs @@ -1,5 +1,6 @@ //! Defines the types for blob transactions, legacy, and other EIP-2718 transactions included in a //! response to `GetPooledTransactions`. + #![cfg(feature = "c-kzg")] #![cfg_attr(docsrs, doc(cfg(feature = "c-kzg")))] diff --git a/crates/primitives/src/transaction/variant.rs b/crates/primitives/src/transaction/variant.rs index b89aa6aa1..c2818b754 100644 --- a/crates/primitives/src/transaction/variant.rs +++ b/crates/primitives/src/transaction/variant.rs @@ -1,5 +1,6 @@ //! Helper enum functions for `Transaction`, `TransactionSigned` and //! `TransactionSignedEcRecovered` + use crate::{ Address, Transaction, TransactionSigned, TransactionSignedEcRecovered, TransactionSignedNoHash, B256, diff --git a/crates/rpc/ipc/src/server/ipc.rs b/crates/rpc/ipc/src/server/ipc.rs index ff04d2c5e..2de653414 100644 --- a/crates/rpc/ipc/src/server/ipc.rs +++ b/crates/rpc/ipc/src/server/ipc.rs @@ -1,4 +1,5 @@ //! IPC request handling adapted from [`jsonrpsee`] http request handling + use futures::{stream::FuturesOrdered, StreamExt}; use jsonrpsee::{ core::{ diff --git a/crates/rpc/rpc-api/src/bundle.rs b/crates/rpc/rpc-api/src/bundle.rs index 6493edeaf..bb0734902 100644 --- a/crates/rpc/rpc-api/src/bundle.rs +++ b/crates/rpc/rpc-api/src/bundle.rs @@ -1,6 +1,7 @@ //! Additional `eth_` functions for bundles //! //! See also + use jsonrpsee::proc_macros::rpc; use reth_primitives::{Bytes, B256}; use reth_rpc_types::{ diff --git a/crates/rpc/rpc-builder/tests/it/http.rs b/crates/rpc/rpc-builder/tests/it/http.rs index 1dcfd4bea..1caf47ba8 100644 --- a/crates/rpc/rpc-builder/tests/it/http.rs +++ b/crates/rpc/rpc-builder/tests/it/http.rs @@ -1,4 +1,5 @@ //! Standalone http tests + use crate::utils::{launch_http, launch_http_ws, launch_ws}; use jsonrpsee::{ core::{ diff --git a/crates/rpc/rpc-builder/tests/it/serde.rs b/crates/rpc/rpc-builder/tests/it/serde.rs index 95babda1b..1559dd27a 100644 --- a/crates/rpc/rpc-builder/tests/it/serde.rs +++ b/crates/rpc/rpc-builder/tests/it/serde.rs @@ -1,4 +1,5 @@ //! various serde test + use crate::utils::launch_http; use jsonrpsee::{ core::{client::ClientT, traits::ToRpcParams, Error}, diff --git a/crates/rpc/rpc-builder/tests/it/startup.rs b/crates/rpc/rpc-builder/tests/it/startup.rs index b11bd96ab..9aa4f70d9 100644 --- a/crates/rpc/rpc-builder/tests/it/startup.rs +++ b/crates/rpc/rpc-builder/tests/it/startup.rs @@ -1,4 +1,5 @@ //! Startup tests + use crate::utils::{ launch_http, launch_http_ws_same_port, launch_ws, test_address, test_rpc_builder, }; diff --git a/crates/rpc/rpc-testing-util/src/trace.rs b/crates/rpc/rpc-testing-util/src/trace.rs index c0e594bb2..8d90cd825 100644 --- a/crates/rpc/rpc-testing-util/src/trace.rs +++ b/crates/rpc/rpc-testing-util/src/trace.rs @@ -1,4 +1,5 @@ //! Helpers for testing trace calls. + use futures::{Stream, StreamExt}; use jsonrpsee::core::Error as RpcError; use reth_primitives::{BlockId, Bytes, TxHash, B256}; diff --git a/crates/rpc/rpc-types-compat/src/engine/payload.rs b/crates/rpc/rpc-types-compat/src/engine/payload.rs index d5c21d2a3..7bcd49524 100644 --- a/crates/rpc/rpc-types-compat/src/engine/payload.rs +++ b/crates/rpc/rpc-types-compat/src/engine/payload.rs @@ -1,5 +1,6 @@ //! Standalone Conversion Functions for Handling Different Versions of Execution Payloads in //! Ethereum's Engine + use reth_primitives::{ constants::{EMPTY_OMMER_ROOT_HASH, MAXIMUM_EXTRA_DATA_SIZE, MIN_PROTOCOL_BASE_FEE_U256}, proofs::{self}, diff --git a/crates/rpc/rpc-types/src/eth/block.rs b/crates/rpc/rpc-types/src/eth/block.rs index 74e69eccc..124a2a322 100644 --- a/crates/rpc/rpc-types/src/eth/block.rs +++ b/crates/rpc/rpc-types/src/eth/block.rs @@ -1,4 +1,5 @@ //! Contains types that represent ethereum types when used in RPC + use crate::{Transaction, Withdrawal}; use alloy_primitives::{Address, BlockHash, BlockNumber, Bloom, Bytes, B256, B64, U256, U64}; use alloy_rlp::{bytes, Decodable, Encodable, Error as RlpError}; diff --git a/crates/rpc/rpc-types/src/eth/engine/cancun.rs b/crates/rpc/rpc-types/src/eth/engine/cancun.rs index 3ddfb52f1..27b0d00d0 100644 --- a/crates/rpc/rpc-types/src/eth/engine/cancun.rs +++ b/crates/rpc/rpc-types/src/eth/engine/cancun.rs @@ -1,5 +1,6 @@ //! Contains types related to the Cancun hardfork that will be used by RPC to communicate with the //! beacon consensus engine. + use alloy_primitives::B256; /// Fields introduced in `engine_newPayloadV3` that are not present in the `ExecutionPayload` RPC diff --git a/crates/rpc/rpc-types/src/eth/trace/filter.rs b/crates/rpc/rpc-types/src/eth/trace/filter.rs index 55cc0fe9c..a19da2254 100644 --- a/crates/rpc/rpc-types/src/eth/trace/filter.rs +++ b/crates/rpc/rpc-types/src/eth/trace/filter.rs @@ -1,4 +1,5 @@ //! `trace_filter` types and support + use crate::serde_helpers::num::u64_hex_or_decimal_opt; use alloy_primitives::Address; use serde::{Deserialize, Serialize}; diff --git a/crates/rpc/rpc-types/src/eth/transaction/signature.rs b/crates/rpc/rpc-types/src/eth/transaction/signature.rs index d447e3427..7ffe64a4d 100644 --- a/crates/rpc/rpc-types/src/eth/transaction/signature.rs +++ b/crates/rpc/rpc-types/src/eth/transaction/signature.rs @@ -1,4 +1,5 @@ //! Signature related RPC values + use alloy_primitives::U256; use serde::{Deserialize, Serialize}; diff --git a/crates/rpc/rpc-types/src/serde_helpers/json_u256.rs b/crates/rpc/rpc-types/src/serde_helpers/json_u256.rs index a22280e8a..e595970e7 100644 --- a/crates/rpc/rpc-types/src/serde_helpers/json_u256.rs +++ b/crates/rpc/rpc-types/src/serde_helpers/json_u256.rs @@ -1,4 +1,5 @@ //! Json U256 serde helpers. + use alloy_primitives::U256; use serde::{ de::{Error, Visitor}, diff --git a/crates/rpc/rpc/src/eth/api/sign.rs b/crates/rpc/rpc/src/eth/api/sign.rs index 3d8570efd..4d1e9bda0 100644 --- a/crates/rpc/rpc/src/eth/api/sign.rs +++ b/crates/rpc/rpc/src/eth/api/sign.rs @@ -1,4 +1,5 @@ //! Contains RPC handler implementations specific to sign endpoints + use crate::{ eth::{ error::{EthResult, SignError}, diff --git a/crates/rpc/rpc/src/eth/api/transactions.rs b/crates/rpc/rpc/src/eth/api/transactions.rs index 2617e3532..560272c22 100644 --- a/crates/rpc/rpc/src/eth/api/transactions.rs +++ b/crates/rpc/rpc/src/eth/api/transactions.rs @@ -1,4 +1,5 @@ //! Contains RPC handler implementations specific to transactions + use crate::{ eth::{ api::pending_block::PendingBlockEnv, diff --git a/crates/rpc/rpc/src/eth/gas_oracle.rs b/crates/rpc/rpc/src/eth/gas_oracle.rs index 8812b19c9..76fb054fd 100644 --- a/crates/rpc/rpc/src/eth/gas_oracle.rs +++ b/crates/rpc/rpc/src/eth/gas_oracle.rs @@ -1,5 +1,6 @@ //! An implementation of the eth gas price oracle, used for providing gas price estimates based on //! previous blocks. + use crate::eth::{ cache::EthStateCache, error::{EthApiError, EthResult, RpcInvalidTransactionError}, diff --git a/crates/rpc/rpc/src/eth/pubsub.rs b/crates/rpc/rpc/src/eth/pubsub.rs index ded49d2a1..bf114688b 100644 --- a/crates/rpc/rpc/src/eth/pubsub.rs +++ b/crates/rpc/rpc/src/eth/pubsub.rs @@ -1,4 +1,5 @@ //! `eth_` PubSub RPC handler implementation + use crate::{eth::logs_utils, result::invalid_params_rpc_err}; use futures::StreamExt; use jsonrpsee::{server::SubscriptionMessage, PendingSubscriptionSink, SubscriptionSink}; diff --git a/crates/stages/src/sets.rs b/crates/stages/src/sets.rs index ac97fd5c7..1f3d49e39 100644 --- a/crates/stages/src/sets.rs +++ b/crates/stages/src/sets.rs @@ -35,6 +35,7 @@ //! ) //! .build(); //! ``` + use crate::{ stages::{ AccountHashingStage, BodyStage, ExecutionStage, FinishStage, HeaderStage, diff --git a/crates/storage/db/src/abstraction/mock.rs b/crates/storage/db/src/abstraction/mock.rs index 54d766d11..c2801e345 100644 --- a/crates/storage/db/src/abstraction/mock.rs +++ b/crates/storage/db/src/abstraction/mock.rs @@ -1,4 +1,5 @@ //! Mock database + use crate::{ common::{IterPairResult, PairResult, ValueOnlyResult}, cursor::{ diff --git a/crates/storage/db/src/tables/models/mod.rs b/crates/storage/db/src/tables/models/mod.rs index 5b65c03f3..5c671ac6b 100644 --- a/crates/storage/db/src/tables/models/mod.rs +++ b/crates/storage/db/src/tables/models/mod.rs @@ -1,4 +1,5 @@ //! Implements data structures specific to the database + use crate::{ table::{Decode, Encode}, DatabaseError, diff --git a/crates/storage/db/src/tables/utils.rs b/crates/storage/db/src/tables/utils.rs index 5e82eab62..d76808f8a 100644 --- a/crates/storage/db/src/tables/utils.rs +++ b/crates/storage/db/src/tables/utils.rs @@ -1,4 +1,5 @@ //! Small database table utilities and helper functions. + use crate::{ table::{Decode, Decompress, Table, TableRow}, DatabaseError, diff --git a/crates/storage/provider/src/traits/chain.rs b/crates/storage/provider/src/traits/chain.rs index c87f17573..833982d1a 100644 --- a/crates/storage/provider/src/traits/chain.rs +++ b/crates/storage/provider/src/traits/chain.rs @@ -1,4 +1,5 @@ //! Canonical chain state notification trait and types. + use crate::{chain::BlockReceipts, Chain}; use auto_impl::auto_impl; use reth_primitives::SealedBlockWithSenders; diff --git a/crates/tasks/src/metrics.rs b/crates/tasks/src/metrics.rs index 65163b4b0..e619db275 100644 --- a/crates/tasks/src/metrics.rs +++ b/crates/tasks/src/metrics.rs @@ -1,4 +1,5 @@ //! Task Executor Metrics + use core::fmt; use reth_metrics::{metrics::Counter, Metrics}; diff --git a/crates/transaction-pool/src/pool/txpool.rs b/crates/transaction-pool/src/pool/txpool.rs index 1c488fd8c..90174dbf6 100644 --- a/crates/transaction-pool/src/pool/txpool.rs +++ b/crates/transaction-pool/src/pool/txpool.rs @@ -1,4 +1,5 @@ //! The internal transaction pool implementation. + use crate::{ config::{LocalTransactionConfig, TXPOOL_MAX_ACCOUNT_SLOTS_PER_SENDER}, error::{Eip4844PoolTransactionError, InvalidPoolTransactionError, PoolError, PoolErrorKind}, diff --git a/crates/transaction-pool/src/pool/update.rs b/crates/transaction-pool/src/pool/update.rs index 6541e0a19..12221b728 100644 --- a/crates/transaction-pool/src/pool/update.rs +++ b/crates/transaction-pool/src/pool/update.rs @@ -1,4 +1,5 @@ //! Support types for updating the pool. + use crate::{identifier::TransactionId, pool::state::SubPool}; use reth_primitives::TxHash; diff --git a/examples/additional-rpc-namespace-in-cli/src/main.rs b/examples/additional-rpc-namespace-in-cli/src/main.rs index ce03aa5c8..232701f83 100644 --- a/examples/additional-rpc-namespace-in-cli/src/main.rs +++ b/examples/additional-rpc-namespace-in-cli/src/main.rs @@ -11,6 +11,7 @@ //! ```sh //! cast rpc txpoolExt_transactionCount //! ``` + use clap::Parser; use jsonrpsee::{core::RpcResult, proc_macros::rpc}; use reth::cli::{ diff --git a/examples/beacon-api-sse/src/main.rs b/examples/beacon-api-sse/src/main.rs index ccf3d1e5c..87423f332 100644 --- a/examples/beacon-api-sse/src/main.rs +++ b/examples/beacon-api-sse/src/main.rs @@ -14,6 +14,7 @@ //! configured to emit payload attributes events. //! //! See lighthouse beacon Node API: + use clap::Parser; use futures_util::stream::StreamExt; use mev_share_sse::{client::EventStream, EventClient}; diff --git a/examples/cli-extension-event-hooks/src/main.rs b/examples/cli-extension-event-hooks/src/main.rs index 24d7b5c84..0d60fa857 100644 --- a/examples/cli-extension-event-hooks/src/main.rs +++ b/examples/cli-extension-event-hooks/src/main.rs @@ -14,6 +14,7 @@ //! //! > "Node started" //! once the node has been started. + use clap::Parser; use reth::cli::{ components::RethNodeComponents, diff --git a/examples/rpc-db/src/main.rs b/examples/rpc-db/src/main.rs index aa97f82b6..a5abfe94d 100644 --- a/examples/rpc-db/src/main.rs +++ b/examples/rpc-db/src/main.rs @@ -11,6 +11,7 @@ //! ```sh //! cast rpc myrpcExt_customMethod //! ``` + use reth::{ primitives::ChainSpecBuilder, providers::{providers::BlockchainProvider, ProviderFactory}, diff --git a/examples/trace-transaction-cli/src/main.rs b/examples/trace-transaction-cli/src/main.rs index 74637aa83..7d6323582 100644 --- a/examples/trace-transaction-cli/src/main.rs +++ b/examples/trace-transaction-cli/src/main.rs @@ -7,6 +7,7 @@ //! ``` //! //! If no recipients are specified, all transactions will be traced. + use clap::Parser; use futures_util::StreamExt; use reth::{