chore(github): use codespell to inspect and correct spelling issues (#7775)

Signed-off-by: jsvisa <delweng@gmail.com>
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
Delweng
2024-04-24 05:32:59 +08:00
committed by GitHub
parent 665e67ec7c
commit 7a593882e1
28 changed files with 55 additions and 34 deletions

View File

@ -8,11 +8,13 @@ use thiserror::Error;
/// both execution payloads and forkchoice update attributes with respect to a method version.
#[derive(Error, Debug)]
pub enum EngineObjectValidationError {
/// Thrown when the underlying validation error occured while validating an `ExecutionPayload`.
/// Thrown when the underlying validation error occurred while validating an
/// `ExecutionPayload`.
#[error("Payload validation error: {0}")]
Payload(VersionSpecificValidationError),
/// Thrown when the underlying validation error occured while validating a `PayloadAttributes`.
/// Thrown when the underlying validation error occurred while validating a
/// `PayloadAttributes`.
#[error("Payload attributes validation error: {0}")]
PayloadAttributes(VersionSpecificValidationError),

View File

@ -1,4 +1,4 @@
//! Ethereum specifc
//! Ethereum specific
#![doc(
html_logo_url = "https://raw.githubusercontent.com/paradigmxyz/reth/main/assets/reth-docs.png",

View File

@ -81,8 +81,8 @@ pub enum ECIESErrorImpl {
/// a message from the (partially filled) buffer.
#[error("stream closed due to not being readable")]
UnreadableStream,
// Error when data is not recieved from peer for a prolonged period.
#[error("never recieved data from remote peer")]
// Error when data is not received from peer for a prolonged period.
#[error("never received data from remote peer")]
StreamTimeout,
}

View File

@ -21,7 +21,7 @@ pub const SIGNATURE_DECODED_SIZE_BYTES: usize = mem::size_of::<Signature>();
pub trait ValidateTx68 {
/// Validates a [`NewPooledTransactionHashes68`](reth_eth_wire::NewPooledTransactionHashes68)
/// entry. Returns [`ValidationOutcome`] which signals to the caller whether to fetch the
/// transaction or wether to drop it, and whether the sender of the announcement should be
/// transaction or to drop it, and whether the sender of the announcement should be
/// penalized.
fn should_fetch(
&self,

View File

@ -164,7 +164,7 @@ impl Default for ComponentsBuilder<(), (), (), ()> {
/// A type that configures all the customizable components of the node and knows how to build them.
///
/// Implementors of this trait are responsible for building all the components of the node: See
/// Implementers of this trait are responsible for building all the components of the node: See
/// [NodeComponents].
///
/// The [ComponentsBuilder] is a generic implementation of this trait that can be used to customize

View File

@ -363,7 +363,7 @@ impl RpcServerArgs {
impl RethRpcConfig for RpcServerArgs {
fn is_ipc_enabled(&self) -> bool {
// By default IPC is enabled therefor it is enabled if the `ipcdisable` is false.
// By default IPC is enabled therefore it is enabled if the `ipcdisable` is false.
!self.ipcdisable
}

View File

@ -131,7 +131,7 @@ pub trait EngineApi<Engine: EngineTypes> {
/// layer p2p specification, meaning the input should be treated as untrusted or potentially
/// adversarial.
///
/// Implementors should take care when acting on the input to this method, specifically
/// Implementers should take care when acting on the input to this method, specifically
/// ensuring that the range is limited properly, and that the range boundaries are computed
/// correctly and without panics.
#[method(name = "getPayloadBodiesByRangeV1")]

View File

@ -34,7 +34,7 @@ pub trait GanacheApi {
/// is the snapshot id to revert to. This deletes the given snapshot, as well as any snapshots
/// taken after (e.g.: reverting to id 0x1 will delete snapshots with ids 0x1, 0x2, etc.).
///
/// Reutnrs `true` if a snapshot was reverted, otherwise `false`.
/// Returns `true` if a snapshot was reverted, otherwise `false`.
#[method(name = "revert")]
async fn evm_revert(&self, snapshot_id: U256) -> RpcResult<bool>;

View File

@ -717,7 +717,7 @@ impl RpcModuleSelection {
/// Creates a new [RpcModule] based on the configured reth modules.
///
/// Note: This will always create new instance of the module handlers and is therefor only
/// Note: This will always create new instance of the module handlers and is therefore only
/// recommended for launching standalone transports. If multiple transports need to be
/// configured it's recommended to use the [RpcModuleBuilder].
#[allow(clippy::too_many_arguments)]

View File

@ -292,7 +292,7 @@ where
/// layer p2p specification, meaning the input should be treated as untrusted or potentially
/// adversarial.
///
/// Implementors should take care when acting on the input to this method, specifically
/// Implementers should take care when acting on the input to this method, specifically
/// ensuring that the range is limited properly, and that the range boundaries are computed
/// correctly and without panics.
pub async fn get_payload_bodies_by_range(
@ -661,7 +661,7 @@ where
/// layer p2p specification, meaning the input should be treated as untrusted or potentially
/// adversarial.
///
/// Implementors should take care when acting on the input to this method, specifically
/// Implementers should take care when acting on the input to this method, specifically
/// ensuring that the range is limited properly, and that the range boundaries are computed
/// correctly and without panics.
///

View File

@ -53,7 +53,7 @@ impl DevSigner {
/// Generates a random dev signer which satisfies [EthSigner] trait
pub(crate) fn random() -> Box<dyn EthSigner> {
let mut signers = Self::random_signers(1);
signers.pop().expect("expect to generate at leas one signer")
signers.pop().expect("expect to generate at least one signer")
}
/// Generates provided number of random dev signers

View File

@ -12,7 +12,7 @@
//!
//! To avoid this, all blocking or CPU intensive handlers must be spawned to a separate task. See
//! the [EthApi] handler implementations for examples. The rpc-api traits make no use of the
//! available jsonrpsee `blocking` attribute to give implementors more freedom because the
//! available jsonrpsee `blocking` attribute to give implementers more freedom because the
//! `blocking` attribute and async handlers are mutually exclusive. However, as mentioned above, a
//! lot of handlers make use of async functions, caching for example, but are also using blocking
//! disk-io, hence these calls are spawned as futures to a blocking task manually.

View File

@ -106,7 +106,7 @@ In descending order of abstraction hierarchy:
[`StaticFileProducer`](../../crates/static-file/src/static_file_producer.rs#L25): A `reth` [hook](../../crates/consensus/beacon/src/engine/hooks/static_file.rs) service that when triggered, **copies** finalized data from the database to the latest static file. Upon completion, it updates the internal index at `StaticFileProvider` with the new highest block and transaction on each specific segment.
[`StaticFileProvider`](../../crates/storage/provider/src/providers/static_file/manager.rs#L44) A provider similar to `DatabaseProvider`, **managing all existing static_file files** and selecting the optimal one (by range and segment type) to fulfill a request. **A single instance is shared across all components and should be instantiated only once within `ProviderFactory`**. An immutable reference is given everytime `ProviderFactory` creates a new `DatabaseProvider`.
[`StaticFileProvider`](../../crates/storage/provider/src/providers/static_file/manager.rs#L44) A provider similar to `DatabaseProvider`, **managing all existing static_file files** and selecting the optimal one (by range and segment type) to fulfill a request. **A single instance is shared across all components and should be instantiated only once within `ProviderFactory`**. An immutable reference is given every time `ProviderFactory` creates a new `DatabaseProvider`.
[`StaticFileJarProvider`](../../crates/storage/provider/src/providers/static_file/jar.rs#L42) A provider similar to `DatabaseProvider` that provides access to a **single static file segment data** one a specific block range.

View File

@ -136,7 +136,7 @@ where
T::Key: std::hash::Hash + Arbitrary,
T::Value: Arbitrary,
{
let strat = proptest::collection::vec(
let strategy = proptest::collection::vec(
any_with::<TableRow<T>>((
<T::Key as Arbitrary>::Parameters::default(),
<T::Value as Arbitrary>::Parameters::default(),
@ -147,8 +147,8 @@ where
.boxed();
let mut runner = TestRunner::new(ProptestConfig::default());
let mut preload = strat.new_tree(&mut runner).unwrap().current();
let mut input = strat.new_tree(&mut runner).unwrap().current();
let mut preload = strategy.new_tree(&mut runner).unwrap().current();
let mut input = strategy.new_tree(&mut runner).unwrap().current();
let mut unique_keys = HashSet::new();
preload.retain(|(k, _)| unique_keys.insert(k.clone()));

View File

@ -23,7 +23,7 @@ mod sealed {
use crate::{database::Database, mock::DatabaseMock, DatabaseEnv};
use std::sync::Arc;
/// Sealed trait to limit the implementors of the Database trait.
/// Sealed trait to limit the implementers of the Database trait.
pub trait Sealed: Sized {}
impl<DB: Database> Sealed for &DB {}

View File

@ -501,7 +501,7 @@ impl<R> Default for Geometry<R> {
///
/// # Arguments
///
/// * `process_id` A proceess id of the reader process.
/// * `process_id` A process id of the reader process.
/// * `thread_id` A thread id of the reader thread.
/// * `read_txn_id` An oldest read transaction number on which stalled.
/// * `gap` A lag from the last committed txn.

View File

@ -1071,7 +1071,7 @@ mod tests {
let num_rows = 2;
// (missing_offsets, expected number of rows)
// If a row wasnt fully pruned, then it should clear it up as well
// If a row wasn't fully pruned, then it should clear it up as well
let missing_offsets_scenarios = [(1, 1), (2, 1), (3, 0)];
for (missing_offsets, expected_rows) in missing_offsets_scenarios {

View File

@ -127,7 +127,7 @@ impl<'b, TX: DbTx> HistoricalStateProviderRef<'b, TX> {
tracing::warn!(
target: "provider::historical_sp",
target = self.block_number,
"Attempt to calculate state root for an old block might result in OOM, tread carefully"
"Attempt to calculate state root for an old block might result in OOM, treat carefully"
);
}

View File

@ -15,7 +15,7 @@ pub trait TransactionsProvider: BlockNumReader + Send + Sync {
/// Returns None if the transaction is not found.
fn transaction_id(&self, tx_hash: TxHash) -> ProviderResult<Option<TxNumber>>;
/// Get transaction by id, computes hash everytime so more expensive.
/// Get transaction by id, computes hash every time so more expensive.
fn transaction_by_id(&self, id: TxNumber) -> ProviderResult<Option<TransactionSigned>>;
/// Get transaction by id without computing the hash.

View File

@ -399,7 +399,7 @@ impl<T: TransactionOrdering> PendingPool<T> {
unique_senders = self.highest_nonces.len();
non_local_senders -= unique_removed;
// we can re-use the temp array
// we can reuse the temp array
removed.clear();
// loop through the highest nonces set, removing transactions until we reach the limit

View File

@ -1766,8 +1766,8 @@ pub(crate) struct PoolInternalTransaction<T: PoolTransaction> {
pub(crate) transaction: Arc<ValidPoolTransaction<T>>,
/// The `SubPool` that currently contains this transaction.
pub(crate) subpool: SubPool,
/// Keeps track of the current state of the transaction and therefor in which subpool it should
/// reside
/// Keeps track of the current state of the transaction and therefore in which subpool it
/// should reside
pub(crate) state: TxState,
/// The total cost all transactions before this transaction.
///