diff --git a/bin/reth/src/test_eth_chain/runner.rs b/bin/reth/src/test_eth_chain/runner.rs index 277c22d74..31c6729fe 100644 --- a/bin/reth/src/test_eth_chain/runner.rs +++ b/bin/reth/src/test_eth_chain/runner.rs @@ -68,7 +68,7 @@ pub fn should_skip(path: &Path) -> bool { return true } - // Skip test where basefee/accesslist/diffuculty is present but it shouldn't be supported in + // Skip test where basefee/accesslist/difficulty is present but it shouldn't be supported in // London/Berlin/TheMerge. https://github.com/ethereum/tests/blob/5b7e1ab3ffaf026d99d20b17bb30f533a2c80c8b/GeneralStateTests/stExample/eip1559.json#L130 // It is expected to not execute these tests. if path.file_name() == Some(OsStr::new("accessListExample.json")) || diff --git a/crates/consensus/common/src/validation.rs b/crates/consensus/common/src/validation.rs index 8a0d8f733..2d59d0048 100644 --- a/crates/consensus/common/src/validation.rs +++ b/crates/consensus/common/src/validation.rs @@ -346,7 +346,7 @@ pub fn validate_header_regarding_parent( /// Checks: /// If we already know the block. /// If parent is known -/// If withdarwals are valid +/// If withdrawals are valid /// /// Returns parent block header pub fn validate_block_regarding_chain( diff --git a/crates/interfaces/src/test_utils/generators.rs b/crates/interfaces/src/test_utils/generators.rs index 8d8e3bd48..f11bb1c5b 100644 --- a/crates/interfaces/src/test_utils/generators.rs +++ b/crates/interfaces/src/test_utils/generators.rs @@ -260,7 +260,7 @@ pub fn random_storage_entry(key_range: std::ops::Range) -> StorageEntry { StorageEntry { key, value } } -/// Generate random Externaly Owned Account (EOA account without contract). +/// Generate random Externally Owned Account (EOA account without contract). pub fn random_eoa_account() -> (Address, Account) { let nonce: u64 = rand::random(); let balance = U256::from(rand::random::()); @@ -269,7 +269,7 @@ pub fn random_eoa_account() -> (Address, Account) { (addr, Account { nonce, balance, bytecode_hash: None }) } -/// Generate random Externaly Owned Accounts +/// Generate random Externally Owned Accounts pub fn random_eoa_account_range(acc_range: std::ops::Range) -> Vec<(Address, Account)> { let mut accounts = Vec::with_capacity(acc_range.end.saturating_sub(acc_range.start) as usize); for _ in acc_range { diff --git a/crates/net/discv4/src/proto.rs b/crates/net/discv4/src/proto.rs index ad52267ca..bf989ffcc 100644 --- a/crates/net/discv4/src/proto.rs +++ b/crates/net/discv4/src/proto.rs @@ -652,7 +652,7 @@ mod tests { let (secret_key, _) = SECP256K1.generate_keypair(&mut rng); let (encoded, _) = msg.encode(&secret_key); - // Assret that 16 nodes never fit into one packet + // Assert that 16 nodes never fit into one packet assert!(encoded.len() > MAX_PACKET_SIZE, "{} {msg:?}", encoded.len()); } diff --git a/crates/net/downloaders/src/bodies/request.rs b/crates/net/downloaders/src/bodies/request.rs index caf4a557a..f6bec7dfc 100644 --- a/crates/net/downloaders/src/bodies/request.rs +++ b/crates/net/downloaders/src/bodies/request.rs @@ -18,7 +18,7 @@ use std::{ /// Body request implemented as a [Future]. /// -/// The future will poll the underlying request until fullfilled. +/// The future will poll the underlying request until fulfilled. /// If the response arrived with insufficient number of bodies, the future /// will issue another request until all bodies are collected. /// @@ -40,7 +40,7 @@ pub(crate) struct BodiesRequestFuture { consensus: Arc, metrics: DownloaderMetrics, priority: Priority, - // Headers to download. The collection is shrinked as responses are buffered. + // Headers to download. The collection is shrunk as responses are buffered. headers: VecDeque, buffer: Vec, fut: Option, @@ -264,7 +264,7 @@ mod tests { /// Check that the request future #[tokio::test] - async fn request_submits_until_fullfilled() { + async fn request_submits_until_fulfilled() { // Generate some random blocks let (headers, mut bodies) = generate_bodies(0..20); diff --git a/crates/net/ecies/src/stream.rs b/crates/net/ecies/src/stream.rs index 69b3fe9e9..d1032e514 100644 --- a/crates/net/ecies/src/stream.rs +++ b/crates/net/ecies/src/stream.rs @@ -161,7 +161,7 @@ mod tests { let (incoming, _) = listener.accept().await.unwrap(); let mut stream = ECIESStream::incoming(incoming, server_key).await.unwrap(); - // use the stream to get the next messagse + // use the stream to get the next message let message = stream.next().await.unwrap().unwrap(); assert_eq!(message, Bytes::from("hello")); }); diff --git a/crates/net/eth-wire/src/types/message.rs b/crates/net/eth-wire/src/types/message.rs index 82bc974ca..d37f5033b 100644 --- a/crates/net/eth-wire/src/types/message.rs +++ b/crates/net/eth-wire/src/types/message.rs @@ -145,7 +145,7 @@ impl From for ProtocolBroadcastMessage { /// Represents a message in the eth wire protocol, versions 66, 67 and 68. /// -/// The ethereum wire protocol is a set of messages that are broadcasted to the network in two +/// The ethereum wire protocol is a set of messages that are broadcast to the network in two /// styles: /// * A request message sent by a peer (such as [`GetPooledTransactions`]), and an associated /// response message (such as [`PooledTransactions`]). diff --git a/crates/net/nat/src/lib.rs b/crates/net/nat/src/lib.rs index 3cb65d060..3c3f29846 100644 --- a/crates/net/nat/src/lib.rs +++ b/crates/net/nat/src/lib.rs @@ -69,7 +69,7 @@ pub enum ParseNatResolverError { AddrParseError(#[from] AddrParseError), /// Failed to parse due to unknown variant #[error("Unknown Nat Resolver variant: {0}")] - UnknonwVariant(String), + UnknownVariant(String), } impl FromStr for NatResolver { @@ -82,7 +82,7 @@ impl FromStr for NatResolver { "none" => NatResolver::None, "publicip" | "public-ip" => NatResolver::PublicIp, s => { - let Some(ip) = s.strip_prefix("extip:") else { return Err(ParseNatResolverError::UnknonwVariant(format!( + let Some(ip) = s.strip_prefix("extip:") else { return Err(ParseNatResolverError::UnknownVariant(format!( "Unknown Nat Resolver: {s}" ))) }; NatResolver::ExternalIp(ip.parse::()?) diff --git a/crates/net/network/src/eth_requests.rs b/crates/net/network/src/eth_requests.rs index 4d156498b..40395fb64 100644 --- a/crates/net/network/src/eth_requests.rs +++ b/crates/net/network/src/eth_requests.rs @@ -73,7 +73,7 @@ impl EthRequestHandler where C: BlockProvider + HeaderProvider, { - /// Returns the list of requested heders + /// Returns the list of requested headers fn get_headers_response(&self, request: GetBlockHeaders) -> Vec
{ let GetBlockHeaders { start_block, limit, skip, direction } = request; diff --git a/crates/net/network/src/flattened_response.rs b/crates/net/network/src/flattened_response.rs index bb07f5387..df2a9db78 100644 --- a/crates/net/network/src/flattened_response.rs +++ b/crates/net/network/src/flattened_response.rs @@ -6,7 +6,7 @@ use std::{ }; use tokio::sync::oneshot::{error::RecvError, Receiver}; -/// Flattern a [Receiver] message in order to get rid of the [RecvError] result +/// Flatten a [Receiver] message in order to get rid of the [RecvError] result #[derive(Debug)] #[pin_project] pub struct FlattenedResponse { diff --git a/crates/net/network/src/metrics.rs b/crates/net/network/src/metrics.rs index 523ef6254..a97b6d809 100644 --- a/crates/net/network/src/metrics.rs +++ b/crates/net/network/src/metrics.rs @@ -50,7 +50,7 @@ pub struct TransactionsManagerMetrics { #[derive(Metrics)] #[metrics(scope = "network")] pub struct DisconnectMetrics { - /// Number of peer disconnects due to DisconnectRequestd (0x00) + /// Number of peer disconnects due to DisconnectRequested (0x00) pub(crate) disconnect_requested: Counter, /// Number of peer disconnects due to TcpSubsystemError (0x01) diff --git a/crates/net/network/src/network.rs b/crates/net/network/src/network.rs index 915f795a9..a03f7324b 100644 --- a/crates/net/network/src/network.rs +++ b/crates/net/network/src/network.rs @@ -307,7 +307,7 @@ pub(crate) enum NetworkHandleMessage { FetchClient(oneshot::Sender), /// Apply a status update. StatusUpdate { head: Head }, - /// Get the currenet status + /// Get the current status GetStatus(oneshot::Sender), /// Get PeerInfo from all the peers GetPeerInfo(oneshot::Sender>), diff --git a/crates/net/network/src/peers/manager.rs b/crates/net/network/src/peers/manager.rs index 6fba9291c..c75551e08 100644 --- a/crates/net/network/src/peers/manager.rs +++ b/crates/net/network/src/peers/manager.rs @@ -345,7 +345,7 @@ impl PeersManager { self.queued_actions.push_back(PeerAction::PeerRemoved(peer_id)); } else { // reset the peer's state - // we reset the backoff counter since we're able to establish a succesful + // we reset the backoff counter since we're able to establish a successful // session to that peer entry.get_mut().backoff_counter = 0; entry.get_mut().state = PeerConnectionState::Idle; diff --git a/crates/primitives/src/receipt.rs b/crates/primitives/src/receipt.rs index 0a5d26402..d8c1504e7 100644 --- a/crates/primitives/src/receipt.rs +++ b/crates/primitives/src/receipt.rs @@ -21,7 +21,7 @@ pub struct Receipt { } impl Receipt { - /// Cacluates [`Log`]'s bloom filter. this is slow operatio and [ReceiptWithBloom] can + /// Calculates [`Log`]'s bloom filter. this is slow operation and [ReceiptWithBloom] can /// be used to cache this value. pub fn bloom_slow(&self) -> Bloom { logs_bloom(self.logs.iter()) diff --git a/crates/revm/revm-inspectors/src/lib.rs b/crates/revm/revm-inspectors/src/lib.rs index a447c7095..04cffd048 100644 --- a/crates/revm/revm-inspectors/src/lib.rs +++ b/crates/revm/revm-inspectors/src/lib.rs @@ -11,7 +11,7 @@ pub mod access_list; /// An inspector stack abstracting the implementation details of -/// each inspector and allowing to hook on block/transaciton execution, +/// each inspector and allowing to hook on block/transaction execution, /// used in the main RETH executor. pub mod stack; diff --git a/crates/rpc/rpc-types/src/eth/pubsub.rs b/crates/rpc/rpc-types/src/eth/pubsub.rs index 5166e6436..c57b1dc49 100644 --- a/crates/rpc/rpc-types/src/eth/pubsub.rs +++ b/crates/rpc/rpc-types/src/eth/pubsub.rs @@ -78,7 +78,7 @@ pub enum SubscriptionKind { /// /// Returns the hash for all transactions that are added to the pending state and are signed /// with a key that is available in the node. When a transaction that was previously part of - /// the canonical chain isn't part of the new canonical chain after a reogranization its again + /// the canonical chain isn't part of the new canonical chain after a reorganization its again /// emitted. NewPendingTransactions, /// Node syncing status subscription. diff --git a/crates/rpc/rpc-types/src/eth/transaction/mod.rs b/crates/rpc/rpc-types/src/eth/transaction/mod.rs index 8aa3e7be1..199525e76 100644 --- a/crates/rpc/rpc-types/src/eth/transaction/mod.rs +++ b/crates/rpc/rpc-types/src/eth/transaction/mod.rs @@ -72,7 +72,7 @@ pub struct Transaction { impl Transaction { /// Create a new rpc transaction result for a mined transaction, using the given block hash, - /// number, and tx index fields to populate the corresponing fields in the rpc result. + /// number, and tx index fields to populate the corresponding fields in the rpc result. /// /// The block hash, number, and tx index fields should be from the original block where the /// transaction was mined. diff --git a/crates/rpc/rpc/src/eth/revm_utils.rs b/crates/rpc/rpc/src/eth/revm_utils.rs index ed919a1e5..af7b9e457 100644 --- a/crates/rpc/rpc/src/eth/revm_utils.rs +++ b/crates/rpc/rpc/src/eth/revm_utils.rs @@ -82,7 +82,7 @@ where cfg.disable_block_gas_limit = true; // Disabled because eth_call is sometimes used with eoa senders - // See + // See cfg.disable_eip3607 = true; let request_gas = request.gas; diff --git a/crates/rpc/rpc/src/layers/jwt_secret.rs b/crates/rpc/rpc/src/layers/jwt_secret.rs index bf757292c..2ceca80a3 100644 --- a/crates/rpc/rpc/src/layers/jwt_secret.rs +++ b/crates/rpc/rpc/src/layers/jwt_secret.rs @@ -22,7 +22,7 @@ pub enum JwtError { InvalidSignature, #[error("The iat (issued-at) claim is not within +-60 seconds from the current time")] InvalidIssuanceTimestamp, - #[error("Autorization header is missing or invalid")] + #[error("Authorization header is missing or invalid")] MissingOrInvalidAuthorizationHeader, #[error("JWT decoding error {0}")] JwtDecodingError(String), diff --git a/crates/rpc/rpc/src/layers/jwt_validator.rs b/crates/rpc/rpc/src/layers/jwt_validator.rs index 0626b37d9..27d6321da 100644 --- a/crates/rpc/rpc/src/layers/jwt_validator.rs +++ b/crates/rpc/rpc/src/layers/jwt_validator.rs @@ -14,7 +14,7 @@ pub struct JwtAuthValidator { impl JwtAuthValidator { /// Creates a new instance of [`JwtAuthValidator`]. - /// Validation logics are implemnted by the `secret` + /// Validation logics are implemented by the `secret` /// argument (see [`JwtSecret`]). pub fn new(secret: JwtSecret) -> Self { Self { secret } diff --git a/crates/stages/benches/README.md b/crates/stages/benches/README.md index cd3febde4..7c482c59c 100644 --- a/crates/stages/benches/README.md +++ b/crates/stages/benches/README.md @@ -1,6 +1,6 @@ # Stage Benchmarks -Test vectors are automatically generated if they cannot be found. Futhermore, for certain stages you can link an external database to run the benchmarks. +Test vectors are automatically generated if they cannot be found. Furthermore, for certain stages you can link an external database to run the benchmarks. ## Usage diff --git a/crates/stages/src/pipeline/set.rs b/crates/stages/src/pipeline/set.rs index 776ddd47d..edeac9c3b 100644 --- a/crates/stages/src/pipeline/set.rs +++ b/crates/stages/src/pipeline/set.rs @@ -10,7 +10,7 @@ use std::{ /// A [`StageSet`] is a logical chunk of stages that depend on each other. It is up to the /// individual stage sets to determine what kind of configuration they expose. /// -/// Individual stages in the set can be added, removed and overriden using [`StageSetBuilder`]. +/// Individual stages in the set can be added, removed and overridden using [`StageSetBuilder`]. pub trait StageSet: Sized { /// Configures the stages in the set. fn builder(self) -> StageSetBuilder; @@ -44,7 +44,7 @@ impl Debug for StageEntry { /// The builder provides ordering helpers to ensure that stages that depend on each other are added /// to the final sync pipeline before/after their dependencies. /// -/// Stages inside the set can be disabled, enabled, overriden and reordered. +/// Stages inside the set can be disabled, enabled, overridden and reordered. pub struct StageSetBuilder { stages: HashMap>, order: Vec, diff --git a/crates/stages/src/sets.rs b/crates/stages/src/sets.rs index 248c34dd5..c1153d5d9 100644 --- a/crates/stages/src/sets.rs +++ b/crates/stages/src/sets.rs @@ -213,7 +213,7 @@ pub struct OfflineStages { } impl OfflineStages { - /// Create a new set of ofline stages with default values. + /// Create a new set of offline stages with default values. pub fn new(executor_factory: EF) -> Self { Self { executor_factory } } diff --git a/crates/stages/src/stages/merkle.rs b/crates/stages/src/stages/merkle.rs index d2b8df05b..85722bee8 100644 --- a/crates/stages/src/stages/merkle.rs +++ b/crates/stages/src/stages/merkle.rs @@ -160,7 +160,7 @@ impl Stage for MerkleStage { let target_root = tx.get_header(input.unwind_to)?.state_root; - // If the merkle stage fails to execute, the trie changes weren't commited + // If the merkle stage fails to execute, the trie changes weren't committed // and the root stayed the same if tx.get::(target_root)?.is_some() { info!(target: "sync::stages::merkle::unwind", "Stage skipped"); diff --git a/crates/storage/db/src/abstraction/mock.rs b/crates/storage/db/src/abstraction/mock.rs index 3160a5c54..599178fcb 100644 --- a/crates/storage/db/src/abstraction/mock.rs +++ b/crates/storage/db/src/abstraction/mock.rs @@ -102,7 +102,7 @@ impl<'a> DbTxMut<'a> for TxMock { impl<'a> TableImporter<'a> for TxMock {} -/// CUrsor that iterates over table +/// Cursor that iterates over table pub struct CursorMock { _cursor: u32, } diff --git a/crates/storage/db/src/tables/codecs/fuzz/mod.rs b/crates/storage/db/src/tables/codecs/fuzz/mod.rs index 4fa443e0b..e46345742 100644 --- a/crates/storage/db/src/tables/codecs/fuzz/mod.rs +++ b/crates/storage/db/src/tables/codecs/fuzz/mod.rs @@ -5,7 +5,7 @@ mod inputs; /// Fuzzer generates a random instance of the object and proceeds to encode and decode it. It then /// makes sure that it matches the original object. /// -/// Some types like [`IntegerList`] might have some restrictons on how they're fuzzed. For example, +/// Some types like [`IntegerList`] might have some restrictions on how they're fuzzed. For example, /// the list is assumed to be sorted before creating the object. macro_rules! impl_fuzzer_with_input { ($(($name:tt, $input_type:tt, $encode:tt, $encode_method:tt, $decode:tt, $decode_method:tt)),+) => { diff --git a/crates/storage/provider/src/providers/state/latest.rs b/crates/storage/provider/src/providers/state/latest.rs index 56d592508..8303a48b0 100644 --- a/crates/storage/provider/src/providers/state/latest.rs +++ b/crates/storage/provider/src/providers/state/latest.rs @@ -89,7 +89,7 @@ impl<'a, 'b, TX: DbTx<'a>> StateProvider for LatestStateProviderRef<'a, 'b, TX> .state_root; let (account_proof, storage_root) = loader - .generate_acount_proof(root, hashed_address) + .generate_account_proof(root, hashed_address) .map_err(|_| ProviderError::StateTrie)?; let account_proof = account_proof.into_iter().map(Bytes::from).collect(); diff --git a/crates/storage/provider/src/transaction.rs b/crates/storage/provider/src/transaction.rs index b244f4da6..bf66414a4 100644 --- a/crates/storage/provider/src/transaction.rs +++ b/crates/storage/provider/src/transaction.rs @@ -1485,7 +1485,7 @@ fn unwind_account_history_shards( /// Unwind all history shards. For boundary shard, remove it from database and /// return last part of shard with still valid items. If all full shard were removed, return list /// would be empty but this does not mean that there is none shard left but that there is no -/// splitted shards. +/// split shards. fn unwind_storage_history_shards( cursor: &mut <>::TXMut as DbTxMutGAT<'_>>::CursorMut< tables::StorageHistory, diff --git a/crates/storage/provider/src/trie/mod.rs b/crates/storage/provider/src/trie/mod.rs index e0128245b..bb5e6bc7e 100644 --- a/crates/storage/provider/src/trie/mod.rs +++ b/crates/storage/provider/src/trie/mod.rs @@ -815,7 +815,7 @@ where TX: DbTx<'db> + Send + Sync, { /// Returns a Merkle proof of the given account, plus its storage root hash. - pub fn generate_acount_proof( + pub fn generate_account_proof( &self, root: H256, address: H256, @@ -1165,8 +1165,9 @@ mod tests { let address = Address::from(hex!("000d836201318ec6899a67540690382780743280")); let trie = create_test_loader(&tx); - let (proof, storage_root) = - trie.generate_acount_proof(root, keccak256(address)).expect("failed to generate proof"); + let (proof, storage_root) = trie + .generate_account_proof(root, keccak256(address)) + .expect("failed to generate proof"); // values extracted from geth via rpc: // { @@ -1228,7 +1229,7 @@ mod tests { let trie = create_test_loader(&tx); let (account_proof, storage_root) = - trie.generate_acount_proof(root, hashed_address).expect("failed to generate proof"); + trie.generate_account_proof(root, hashed_address).expect("failed to generate proof"); // values extracted from geth via rpc: let expected_account = hex!("f86fa1205126413e7857595763591580306b3f228f999498c4c5dfa74f633364936e7651b84bf849819b8418b0d164a029ff6f4d518044318d75b118cf439d8d3d7249c8afcba06ba9ecdf8959410571a02ce1a85814ad94a94ed2a1abaf7c57e9b64326622c1b8c21b4ba4d0e7df61392").as_slice(); diff --git a/crates/tracing/src/lib.rs b/crates/tracing/src/lib.rs index b5264ed59..142497ab2 100644 --- a/crates/tracing/src/lib.rs +++ b/crates/tracing/src/lib.rs @@ -33,7 +33,7 @@ pub fn init(layers: Vec>) { /// Builds a new tracing layer that writes to stdout. /// -/// The events are filtered by `default_directive`, unless overriden by `RUST_LOG`. +/// The events are filtered by `default_directive`, unless overridden by `RUST_LOG`. /// /// Colors can be disabled with `RUST_LOG_STYLE=never`, and event targets can be displayed with /// `RUST_LOG_TARGET=1`. diff --git a/crates/transaction-pool/src/pool/listener.rs b/crates/transaction-pool/src/pool/listener.rs index 7d495a5c5..7ee45ef83 100644 --- a/crates/transaction-pool/src/pool/listener.rs +++ b/crates/transaction-pool/src/pool/listener.rs @@ -9,7 +9,7 @@ type EventBroadcast = UnboundedSender; /// A type that broadcasts [`TransactionEvent`] to installed listeners. /// -/// This is essentially a multi-producer, multi-consumer channel where each event is broadcasted to +/// This is essentially a multi-producer, multi-consumer channel where each event is broadcast to /// all active receivers. #[derive(Debug, Default)] pub(crate) struct PoolEventBroadcast {