From 31cb66902e17aa3faea3cf01245f5dc93c1f55ba Mon Sep 17 00:00:00 2001 From: Dimitris Apostolou Date: Mon, 9 Jan 2023 02:43:51 +0200 Subject: [PATCH] fix: Fix typos (#773) --- bin/reth/src/test_eth_chain/models.rs | 6 ++--- crates/consensus/src/verification.rs | 6 ++--- crates/executor/src/executor.rs | 10 ++++---- crates/interfaces/src/consensus.rs | 2 +- crates/interfaces/src/db.rs | 2 +- crates/interfaces/src/test_utils/headers.rs | 2 +- crates/metrics/metrics-derive/src/lib.rs | 4 ++-- .../metrics/metrics-derive/tests/metrics.rs | 4 ++-- crates/net/common/Cargo.toml | 2 +- crates/net/ecies/src/error.rs | 2 +- crates/net/eth-wire/Cargo.toml | 2 +- crates/net/network/src/fetch/mod.rs | 2 +- crates/net/network/src/network.rs | 4 ++-- crates/net/network/src/session/config.rs | 2 +- .../net/rpc-types/src/eth/transaction/mod.rs | 2 +- crates/stages/src/stages/execution.rs | 2 +- crates/stages/src/stages/headers.rs | 6 ++--- crates/stages/src/test_utils/runner.rs | 4 ++-- crates/storage/db/src/abstraction/mod.rs | 2 +- .../libmdbx-rs/mdbx-sys/libmdbx/GNUmakefile | 2 +- .../libmdbx-rs/mdbx-sys/libmdbx/mdbx.c | 24 +++++++++---------- .../libmdbx-rs/mdbx-sys/libmdbx/mdbx.c++ | 8 +++---- .../libmdbx-rs/mdbx-sys/libmdbx/mdbx.h | 24 +++++++++---------- .../libmdbx-rs/mdbx-sys/libmdbx/mdbx.h++ | 2 +- .../libmdbx-rs/mdbx-sys/libmdbx/mdbx_chk.c | 8 +++---- .../libmdbx-rs/mdbx-sys/libmdbx/mdbx_copy.c | 8 +++---- .../libmdbx-rs/mdbx-sys/libmdbx/mdbx_drop.c | 8 +++---- .../libmdbx-rs/mdbx-sys/libmdbx/mdbx_dump.c | 8 +++---- .../libmdbx-rs/mdbx-sys/libmdbx/mdbx_load.c | 8 +++---- .../libmdbx-rs/mdbx-sys/libmdbx/mdbx_stat.c | 8 +++---- crates/tasks/Cargo.toml | 2 +- crates/transaction-pool/src/pool/txpool.rs | 4 ++-- deny.toml | 2 +- 33 files changed, 91 insertions(+), 91 deletions(-) diff --git a/bin/reth/src/test_eth_chain/models.rs b/bin/reth/src/test_eth_chain/models.rs index a3c5227c7..16011d348 100644 --- a/bin/reth/src/test_eth_chain/models.rs +++ b/bin/reth/src/test_eth_chain/models.rs @@ -187,7 +187,7 @@ pub enum ForkSpec { Constantinople, // SKIPPED /// Constantinople fix ConstantinopleFix, - /// Instanbul + /// Istanbul Istanbul, /// Berlin Berlin, @@ -236,7 +236,7 @@ impl From for reth_executor::SpecUpgrades { panic!("Not supported") } ForkSpec::ByzantiumToConstantinopleAt5 | ForkSpec::Constantinople => { - panic!("Overriden with PETERSBURG") + panic!("Overridden with PETERSBURG") } } } @@ -473,6 +473,6 @@ mod test { ]"#; let res = serde_json::from_str::>(test); - assert!(res.is_ok(), "Failed to deserialize transactin with error: {res:?}"); + assert!(res.is_ok(), "Failed to deserialize transaction with error: {res:?}"); } } diff --git a/crates/consensus/src/verification.rs b/crates/consensus/src/verification.rs index 551463859..ee46f4f88 100644 --- a/crates/consensus/src/verification.rs +++ b/crates/consensus/src/verification.rs @@ -31,7 +31,7 @@ pub fn validate_header_standalone( return Err(Error::TimestampIsInFuture { timestamp: header.timestamp, present_timestamp }) } - // From yellow papper: extraData: An arbitrary byte array containing data + // From yellow paper: extraData: An arbitrary byte array containing data // relevant to this block. This must be 32 bytes or fewer; formally Hx. if header.extra_data.len() > 32 { return Err(Error::ExtraDataExceedsMax { len: header.extra_data.len() }) @@ -124,7 +124,7 @@ pub fn validate_transaction_regarding_header( Ok(()) } -/// Iterate over all transactions, verify them agains each other and against the block. +/// Iterate over all transactions, verify them against each other and against the block. /// There is no gas check done as [REVM](https://github.com/bluealloy/revm/blob/fd0108381799662098b7ab2c429ea719d6dfbf28/crates/revm/src/evm_impl.rs#L113-L131) already checks that. pub fn validate_all_transaction_regarding_block_and_nonces< 'a, @@ -155,7 +155,7 @@ pub fn validate_all_transaction_regarding_block_and_nonces< } Entry::Vacant(entry) => { let account = provider.basic_account(transaction.signer())?.unwrap_or_default(); - // Signer account shoudn't have bytecode. Presence of bytecode means this is a + // Signer account shouldn't have bytecode. Presence of bytecode means this is a // smartcontract. if account.has_bytecode() { return Err(Error::SignerAccountHasBytecode.into()) diff --git a/crates/executor/src/executor.rs b/crates/executor/src/executor.rs index c1d722000..733b700e2 100644 --- a/crates/executor/src/executor.rs +++ b/crates/executor/src/executor.rs @@ -89,7 +89,7 @@ impl AccountInfoChangeSet { } } -/// Diff change set that is neede for creating history index and updating current world state. +/// Diff change set that is needed for creating history index and updating current world state. #[derive(Debug, Clone)] pub struct AccountChangeSet { /// Old and New account account change. @@ -107,7 +107,7 @@ pub struct AccountChangeSet { /// and block reward if present #[derive(Debug)] pub struct ExecutionResult { - /// Transaction changeest contraining [Receipt], changed [Accounts][Account] and Storages. + /// Transaction changeset containing [Receipt], changed [Accounts][Account] and Storages. pub changesets: Vec, /// Block reward if present. It represent changeset for block reward slot in /// [tables::AccountChangeSet] . @@ -135,7 +135,7 @@ pub fn commit_changes( let db_account = match db.accounts.entry(address) { Entry::Occupied(entry) => entry.into_mut(), Entry::Vacant(_entry) => { - panic!("Left panic to critically jumpout if happens, as every account shound be hot loaded."); + panic!("Left panic to critically jumpout if happens, as every account should be hot loaded."); } }; // Insert into `change` a old account and None for new account @@ -185,7 +185,7 @@ pub fn commit_changes( Entry::Occupied(entry) => { let entry = entry.into_mut(); - // account is present inside cache but is markes as NotExisting. + // account is present inside cache but is marked as NotExisting. let account_changeset = if matches!(entry.account_state, AccountState::NotExisting) { AccountInfoChangeSet::Created { new: to_reth_acc(&account.info) } @@ -616,7 +616,7 @@ mod tests { assert_eq!( changesets.changeset.get(&account2).unwrap().account, AccountInfoChangeSet::Created { new: account2_info }, - "New acccount" + "New account" ); assert_eq!( changesets.changeset.get(&account3).unwrap().account, diff --git a/crates/interfaces/src/consensus.rs b/crates/interfaces/src/consensus.rs index afb75766b..e2c324a27 100644 --- a/crates/interfaces/src/consensus.rs +++ b/crates/interfaces/src/consensus.rs @@ -70,7 +70,7 @@ pub enum Error { TransactionPriorityFeeMoreThenMaxFee, #[error("Transaction chain_id does not match.")] TransactionChainId, - #[error("Transation max fee is less them block base fee.")] + #[error("Transaction max fee is less them block base fee.")] TransactionMaxFeeLessThenBaseFee, #[error("Transaction signer does not have account.")] SignerAccountNotExisting, diff --git a/crates/interfaces/src/db.rs b/crates/interfaces/src/db.rs index 9d07343ff..157425e67 100644 --- a/crates/interfaces/src/db.rs +++ b/crates/interfaces/src/db.rs @@ -13,7 +13,7 @@ pub enum Error { /// Failed to get a value into a table. #[error("Database read error code: {0:?}")] Read(u32), - /// Failed to delete a `(key, vakue)` pair into a table. + /// Failed to delete a `(key, value)` pair into a table. #[error("Database delete error code: {0:?}")] Delete(u32), /// Failed to commit transaction changes into the database. diff --git a/crates/interfaces/src/test_utils/headers.rs b/crates/interfaces/src/test_utils/headers.rs index e07658e8a..d22d30098 100644 --- a/crates/interfaces/src/test_utils/headers.rs +++ b/crates/interfaces/src/test_utils/headers.rs @@ -162,7 +162,7 @@ impl TestHeadersClient { lock.extend(headers); } - /// Set repsonse error + /// Set response error pub async fn set_error(&self, err: RequestError) { let mut lock = self.error.lock().await; lock.replace(err); diff --git a/crates/metrics/metrics-derive/src/lib.rs b/crates/metrics/metrics-derive/src/lib.rs index c124e0892..c609c5f87 100644 --- a/crates/metrics/metrics-derive/src/lib.rs +++ b/crates/metrics/metrics-derive/src/lib.rs @@ -37,7 +37,7 @@ mod with_attrs; /// #[metric(rename = "second_gauge", describe = "A gauge with metric attribute description.")] /// gauge2: Gauge, /// /// Some doc comment -/// #[metric(describe = "Metric attribute description will be preffered over doc comment.")] +/// #[metric(describe = "Metric attribute description will be preferred over doc comment.")] /// counter: Counter, /// /// A renamed histogram. /// #[metric(rename = "histogram")] @@ -79,7 +79,7 @@ mod with_attrs; /// pub fn describe() { /// metrics::describe_gauge!("metrics_custom_gauge", "A gauge with doc comment description."); /// metrics::describe_gauge!("metrics_custom_second_gauge", "A gauge with metric attribute description."); -/// metrics::describe_counter!("metrics_custom_counter", "Metric attribute description will be preffered over doc comment."); +/// metrics::describe_counter!("metrics_custom_counter", "Metric attribute description will be preferred over doc comment."); /// metrics::describe_histogram!("metrics_custom_histogram", "A renamed histogram."); /// } /// } diff --git a/crates/metrics/metrics-derive/tests/metrics.rs b/crates/metrics/metrics-derive/tests/metrics.rs index 68b789d84..b03ee2883 100644 --- a/crates/metrics/metrics-derive/tests/metrics.rs +++ b/crates/metrics/metrics-derive/tests/metrics.rs @@ -15,7 +15,7 @@ struct CustomMetrics { #[metric(rename = "second_gauge", describe = "A gauge with metric attribute description.")] gauge2: Gauge, /// Some doc comment - #[metric(describe = "Metric attribute description will be preffered over doc comment.")] + #[metric(describe = "Metric attribute description will be preferred over doc comment.")] counter: Counter, /// A renamed histogram. #[metric(rename = "histogram")] @@ -60,7 +60,7 @@ fn describe_metrics() { TestMetric { ty: TestMetricTy::Counter, description: Some( - "Metric attribute description will be preffered over doc comment.".to_owned() + "Metric attribute description will be preferred over doc comment.".to_owned() ) } ); diff --git a/crates/net/common/Cargo.toml b/crates/net/common/Cargo.toml index 3a734890b..394e581df 100644 --- a/crates/net/common/Cargo.toml +++ b/crates/net/common/Cargo.toml @@ -5,7 +5,7 @@ edition = "2021" license = "Apache-2.0" repository = "https://github.com/paradigmxyz/reth" description = """ -Types shared accross network code +Types shared across network code """ [dependencies] diff --git a/crates/net/ecies/src/error.rs b/crates/net/ecies/src/error.rs index 77b42bc2a..f4281ffad 100644 --- a/crates/net/ecies/src/error.rs +++ b/crates/net/ecies/src/error.rs @@ -64,7 +64,7 @@ pub enum ECIESErrorImpl { /// Error when decoding RLP data #[error(transparent)] RLPDecoding(reth_rlp::DecodeError), - /// Error when convering to integer + /// Error when converting to integer #[error(transparent)] FromInt(std::num::TryFromIntError), /// Error when trying to split an array beyond its length diff --git a/crates/net/eth-wire/Cargo.toml b/crates/net/eth-wire/Cargo.toml index ea1224303..111e1eb7c 100644 --- a/crates/net/eth-wire/Cargo.toml +++ b/crates/net/eth-wire/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "reth-eth-wire" -description = "Impements the eth/64 and eth/65 P2P protocols" +description = "Implements the eth/64 and eth/65 P2P protocols" version = "0.1.0" edition = "2021" license = "MIT OR Apache-2.0" diff --git a/crates/net/network/src/fetch/mod.rs b/crates/net/network/src/fetch/mod.rs index 0eaf860b5..6e2d64433 100644 --- a/crates/net/network/src/fetch/mod.rs +++ b/crates/net/network/src/fetch/mod.rs @@ -71,7 +71,7 @@ impl StateFetcher { /// /// Invoked when an active session was closed. /// - /// This cancels als inflight request and sends an error to the receiver. + /// This cancels also inflight request and sends an error to the receiver. pub(crate) fn on_session_closed(&mut self, peer: &PeerId) { self.peers.remove(peer); if let Some(req) = self.inflight_headers_requests.remove(peer) { diff --git a/crates/net/network/src/network.rs b/crates/net/network/src/network.rs index 30e91514a..50cb9aad6 100644 --- a/crates/net/network/src/network.rs +++ b/crates/net/network/src/network.rs @@ -255,7 +255,7 @@ struct NetworkInner { pub(crate) enum NetworkHandleMessage { /// Adds an address for a peer. AddPeerAddress(PeerId, PeerKind, SocketAddr), - /// Removes a peer from the peerset correponding to the given kind. + /// Removes a peer from the peerset corresponding to the given kind. RemovePeer(PeerId, PeerKind), /// Disconnect a connection to a peer if it exists. DisconnectPeer(PeerId, Option), @@ -280,7 +280,7 @@ pub(crate) enum NetworkHandleMessage { FetchClient(oneshot::Sender), /// Apply a status update. StatusUpdate { height: u64, hash: H256, total_difficulty: U256 }, - /// Get PeerInfo fro all the peers + /// Get PeerInfo from all the peers GetPeerInfo(oneshot::Sender>), /// Get PeerInfo for a specific peer GetPeerInfoById(PeerId, oneshot::Sender>), diff --git a/crates/net/network/src/session/config.rs b/crates/net/network/src/session/config.rs index a99b11c2f..99aa20907 100644 --- a/crates/net/network/src/session/config.rs +++ b/crates/net/network/src/session/config.rs @@ -29,7 +29,7 @@ impl Default for SessionsConfig { // since the manager is the sender. session_command_buffer: 32, // This should be greater since the manager is the receiver. The total size will be - // `buffer + num sessions`. Each session can therefor fit at least 1 message in the + // `buffer + num sessions`. Each session can therefore fit at least 1 message in the // channel. The buffer size is additional capacity. The channel is always drained on // `poll`. session_event_buffer: 64, diff --git a/crates/net/rpc-types/src/eth/transaction/mod.rs b/crates/net/rpc-types/src/eth/transaction/mod.rs index 50981b3b3..1d5af3ca8 100644 --- a/crates/net/rpc-types/src/eth/transaction/mod.rs +++ b/crates/net/rpc-types/src/eth/transaction/mod.rs @@ -29,7 +29,7 @@ pub struct Transaction { pub from: Address, /// Recipient pub to: Option
, - /// Transfered value + /// Transferred value pub value: U256, /// Gas Price #[serde(skip_serializing_if = "Option::is_none")] diff --git a/crates/stages/src/stages/execution.rs b/crates/stages/src/stages/execution.rs index 7b7c3c9ba..dc126c72c 100644 --- a/crates/stages/src/stages/execution.rs +++ b/crates/stages/src/stages/execution.rs @@ -474,7 +474,7 @@ mod tests { "Post changed of a account" ); // assert storage - // Get on dupsort would return only first value. This is good enought for this test. + // Get on dupsort would return only first value. This is good enough for this test. assert_eq!( tx.get::(account1), Ok(Some(StorageEntry { key: H256::from_low_u64_be(1), value: U256::from(2) })), diff --git a/crates/stages/src/stages/headers.rs b/crates/stages/src/stages/headers.rs index 3cd5e8def..dd5bf6084 100644 --- a/crates/stages/src/stages/headers.rs +++ b/crates/stages/src/stages/headers.rs @@ -408,7 +408,7 @@ mod tests { // Checkpoint and no gap tx.put::(head.number, head.hash()) - .expect("falied to write canonical"); + .expect("failed to write canonical"); tx.put::(head.num_hash().into(), head.clone().unseal()) .expect("failed to write header"); assert_matches!( @@ -418,7 +418,7 @@ mod tests { // Checkpoint and gap tx.put::(gap_tip.number, gap_tip.hash()) - .expect("falied to write canonical"); + .expect("failed to write canonical"); tx.put::(gap_tip.num_hash().into(), gap_tip.clone().unseal()) .expect("failed to write header"); assert_matches!( @@ -428,7 +428,7 @@ mod tests { // Checkpoint and gap closed tx.put::(gap_fill.number, gap_fill.hash()) - .expect("falied to write canonical"); + .expect("failed to write canonical"); tx.put::(gap_fill.num_hash().into(), gap_fill.clone().unseal()) .expect("failed to write header"); assert_matches!( diff --git a/crates/stages/src/test_utils/runner.rs b/crates/stages/src/test_utils/runner.rs index 5b7a5f62a..ff574e669 100644 --- a/crates/stages/src/test_utils/runner.rs +++ b/crates/stages/src/test_utils/runner.rs @@ -7,9 +7,9 @@ use crate::{db::Transaction, ExecInput, ExecOutput, Stage, StageError, UnwindInp #[derive(thiserror::Error, Debug)] pub(crate) enum TestRunnerError { - #[error("Database error occured.")] + #[error("Database error occurred.")] Database(#[from] reth_interfaces::db::Error), - #[error("Internal runner error occured.")] + #[error("Internal runner error occurred.")] Internal(#[from] Box), } diff --git a/crates/storage/db/src/abstraction/mod.rs b/crates/storage/db/src/abstraction/mod.rs index 9acdba41f..0ff477de5 100644 --- a/crates/storage/db/src/abstraction/mod.rs +++ b/crates/storage/db/src/abstraction/mod.rs @@ -1,4 +1,4 @@ -/// Commont return types +/// Common return types pub mod common; /// Cursor database traits. pub mod cursor; diff --git a/crates/storage/libmdbx-rs/mdbx-sys/libmdbx/GNUmakefile b/crates/storage/libmdbx-rs/mdbx-sys/libmdbx/GNUmakefile index e619d78bf..f9c8ae29f 100644 --- a/crates/storage/libmdbx-rs/mdbx-sys/libmdbx/GNUmakefile +++ b/crates/storage/libmdbx-rs/mdbx-sys/libmdbx/GNUmakefile @@ -6,7 +6,7 @@ # ################################################################################ # -# Basic internal definitios. For a customizable variables and options see below. +# Basic internal definitions. For a customizable variables and options see below. # $(info // The GNU Make $(MAKE_VERSION)) SHELL := $(shell env bash -c 'echo $$BASH') diff --git a/crates/storage/libmdbx-rs/mdbx-sys/libmdbx/mdbx.c b/crates/storage/libmdbx-rs/mdbx-sys/libmdbx/mdbx.c index 6e72e0d3a..1b73e82d5 100644 --- a/crates/storage/libmdbx-rs/mdbx-sys/libmdbx/mdbx.c +++ b/crates/storage/libmdbx-rs/mdbx-sys/libmdbx/mdbx.c @@ -36,7 +36,7 @@ /** Disables using GNU/Linux libc extensions. * \ingroup build_option - * \note This option couldn't be moved to the options.h since dependant + * \note This option couldn't be moved to the options.h since dependent * control macros/defined should be prepared before include the options.h */ #ifndef MDBX_DISABLE_GNU_SOURCE #define MDBX_DISABLE_GNU_SOURCE 0 @@ -1654,7 +1654,7 @@ MDBX_INTERNAL_FUNC int osal_lck_destroy(MDBX_env *env, MDBX_INTERNAL_FUNC int osal_lck_seize(MDBX_env *env); /// \brief Downgrades the level of initially acquired lock to -/// operational level specified by argument. The reson for such downgrade: +/// operational level specified by argument. The reason for such downgrade: /// - unblocking of other processes that are waiting for access, i.e. /// if (env->me_flags & MDBX_EXCLUSIVE) != 0, then other processes /// should be made aware that access is unavailable rather than @@ -2037,7 +2037,7 @@ extern LIBMDBX_API const char *const mdbx_sourcery_anchor; /** Controls sort order of internal page number lists. * This mostly experimental/advanced option with not for regular MDBX users. - * \warning The database format depend on this option and libmdbx builded with + * \warning The database format depend on this option and libmdbx built with * different option value are incompatible. */ #ifndef MDBX_PNL_ASCENDING #define MDBX_PNL_ASCENDING 0 @@ -2907,7 +2907,7 @@ typedef struct MDBX_lockinfo { /* Paired counter of processes that have mlock()ed part of mmapped DB. * The (mti_mlcnt[0] - mti_mlcnt[1]) > 0 means at least one process - * lock at leat one page, so therefore madvise() could return EINVAL. */ + * lock at least one page, so therefore madvise() could return EINVAL. */ MDBX_atomic_uint32_t mti_mlcnt[2]; MDBX_ALIGNAS(MDBX_CACHELINE_SIZE) /* cacheline ----------------------------*/ @@ -4285,7 +4285,7 @@ node_largedata_pgno(const MDBX_node *const __restrict node) { * * BRANCH_NODE_MAX * Branch-page must contain at least two nodes, within each a key and a child - * page number. But page can't be splitted if it contains less that 4 keys, + * page number. But page can't be split if it contains less that 4 keys, * i.e. a page should not overflow before adding the fourth key. Therefore, * at least 3 branch-node should fit in the single branch-page. Further, the * first node of a branch-page doesn't contain a key, i.e. the first node @@ -4299,8 +4299,8 @@ node_largedata_pgno(const MDBX_node *const __restrict node) { * Leaf-node must fit into single leaf-page, where a value could be placed on * a large/overflow page. However, may require to insert a nearly page-sized * node between two large nodes are already fill-up a page. In this case the - * page must be splitted to two if some pair of nodes fits on one page, or - * otherwise the page should be splitted to the THREE with a single node + * page must be split to two if some pair of nodes fits on one page, or + * otherwise the page should be split to the THREE with a single node * per each of ones. Such 1-into-3 page splitting is costly and complex since * requires TWO insertion into the parent page, that could lead to split it * and so on up to the root. Therefore double-splitting is avoided here and @@ -4922,7 +4922,7 @@ static __always_inline bool safe64_reset_compare(MDBX_atomic_uint64_t *p, * the asynchronously cancellation of read transaction. Therefore, * there may be a collision between the cleanup performed here and * asynchronous termination and restarting of the read transaction - * in another proces/thread. In general we MUST NOT reset the `mr_txnid` + * in another process/thread. In general we MUST NOT reset the `mr_txnid` * if a new transaction was started (i.e. if `mr_txnid` was changed). */ #if MDBX_64BIT_CAS bool rc = atomic_cas64(p, compare, UINT64_MAX); @@ -18489,12 +18489,12 @@ __hot static __always_inline int page_get_checker_lite(const uint16_t ILL, assert((ILL & (P_BRANCH | P_LEAF | P_LEAF2)) == 0); assert(page->mp_flags & (P_BRANCH | P_LEAF | P_LEAF2)); return bad_page(page, "unexpected %s instead of %s (%u)\n", - "large/overlow", "branch/leaf/leaf2", page->mp_flags); + "large/overflow", "branch/leaf/leaf2", page->mp_flags); } else if (ILL & (P_BRANCH | P_LEAF | P_LEAF2)) { assert((ILL & P_BRANCH) && (ILL & P_LEAF) && (ILL & P_LEAF2)); assert(page->mp_flags & (P_BRANCH | P_LEAF | P_LEAF2)); return bad_page(page, "unexpected %s instead of %s (%u)\n", - "branch/leaf/leaf2", "large/overlow", page->mp_flags); + "branch/leaf/leaf2", "large/overflow", page->mp_flags); } else { assert(false); } @@ -24323,7 +24323,7 @@ __cold static void compacting_fixup_meta(MDBX_env *env, MDBX_meta *meta) { unaligned_poke_u64(4, meta->mm_sign, meta_sign(meta)); } -/* Make resizeable */ +/* Make resizable */ __cold static void meta_make_sizeable(MDBX_meta *meta) { meta->mm_geo.lower = MIN_PAGENO; if (meta->mm_geo.grow_pv == 0) { @@ -24571,7 +24571,7 @@ __cold static int env_copy_asis(MDBX_env *env, MDBX_txn *read_txn, break; rc = errno; if (rc == EXDEV || rc == /* workaround for ecryptfs bug(s), - maybe usefull for others fs */ + maybe useful for others fs */ EINVAL) not_the_same_filesystem = true; else if (ignore_enosys(rc) == MDBX_RESULT_TRUE) diff --git a/crates/storage/libmdbx-rs/mdbx-sys/libmdbx/mdbx.c++ b/crates/storage/libmdbx-rs/mdbx-sys/libmdbx/mdbx.c++ index 05db774d7..14848abf5 100644 --- a/crates/storage/libmdbx-rs/mdbx-sys/libmdbx/mdbx.c++ +++ b/crates/storage/libmdbx-rs/mdbx-sys/libmdbx/mdbx.c++ @@ -36,7 +36,7 @@ /** Disables using GNU/Linux libc extensions. * \ingroup build_option - * \note This option couldn't be moved to the options.h since dependant + * \note This option couldn't be moved to the options.h since dependent * control macros/defined should be prepared before include the options.h */ #ifndef MDBX_DISABLE_GNU_SOURCE #define MDBX_DISABLE_GNU_SOURCE 0 @@ -1654,7 +1654,7 @@ MDBX_INTERNAL_FUNC int osal_lck_destroy(MDBX_env *env, MDBX_INTERNAL_FUNC int osal_lck_seize(MDBX_env *env); /// \brief Downgrades the level of initially acquired lock to -/// operational level specified by argument. The reson for such downgrade: +/// operational level specified by argument. The reason for such downgrade: /// - unblocking of other processes that are waiting for access, i.e. /// if (env->me_flags & MDBX_EXCLUSIVE) != 0, then other processes /// should be made aware that access is unavailable rather than @@ -2037,7 +2037,7 @@ extern LIBMDBX_API const char *const mdbx_sourcery_anchor; /** Controls sort order of internal page number lists. * This mostly experimental/advanced option with not for regular MDBX users. - * \warning The database format depend on this option and libmdbx builded with + * \warning The database format depend on this option and libmdbx built with * different option value are incompatible. */ #ifndef MDBX_PNL_ASCENDING #define MDBX_PNL_ASCENDING 0 @@ -2907,7 +2907,7 @@ typedef struct MDBX_lockinfo { /* Paired counter of processes that have mlock()ed part of mmapped DB. * The (mti_mlcnt[0] - mti_mlcnt[1]) > 0 means at least one process - * lock at leat one page, so therefore madvise() could return EINVAL. */ + * lock at least one page, so therefore madvise() could return EINVAL. */ MDBX_atomic_uint32_t mti_mlcnt[2]; MDBX_ALIGNAS(MDBX_CACHELINE_SIZE) /* cacheline ----------------------------*/ diff --git a/crates/storage/libmdbx-rs/mdbx-sys/libmdbx/mdbx.h b/crates/storage/libmdbx-rs/mdbx-sys/libmdbx/mdbx.h index 98e8b4940..4ed503661 100644 --- a/crates/storage/libmdbx-rs/mdbx-sys/libmdbx/mdbx.h +++ b/crates/storage/libmdbx-rs/mdbx-sys/libmdbx/mdbx.h @@ -695,11 +695,11 @@ extern LIBMDBX_VERINFO_API const struct MDBX_build_info { * automatically (de)initialization, releasing reader lock table slots * and so on. * - * If MDBX builded as a DLL this is done out-of-the-box by DllEntry() function, - * which called automatically by Windows core with passing corresponding reason - * argument. + * If MDBX is built as a DLL this is done out-of-the-box by DllEntry(), + * function which called automatically by Windows core with passing corresponding + * reason argument. * - * Otherwise, if MDBX was builded not as a DLL, some black magic + * Otherwise, if MDBX was built not as a DLL, some black magic * may be required depending of Windows version: * * - Modern Windows versions, including Windows Vista and later, provides @@ -881,7 +881,7 @@ enum MDBX_constants { /* DEBUG & LOGGING ************************************************************/ /** \addtogroup c_debug - * \note Most of debug feature enabled only when libmdbx builded with + * \note Most of debug feature enabled only when libmdbx is built with * \ref MDBX_DEBUG build option. @{ */ /** Log level @@ -946,7 +946,7 @@ typedef enum MDBX_log_level_t MDBX_log_level_t; * * \details `MDBX_DBG_DUMP` and `MDBX_DBG_LEGACY_MULTIOPEN` always have an * effect, but `MDBX_DBG_ASSERT`, `MDBX_DBG_AUDIT` and `MDBX_DBG_JITTER` only if - * libmdbx builded with \ref MDBX_DEBUG. */ + * libmdbx is built with \ref MDBX_DEBUG. */ enum MDBX_debug_flags_t { MDBX_DBG_NONE = 0, @@ -1682,7 +1682,7 @@ enum MDBX_copy_flags_t { * pages sequentially */ MDBX_CP_COMPACT = 1u, - /** Force to make resizeable copy, i.e. dynamic size instead of fixed */ + /** Force to make resizable copy, i.e. dynamic size instead of fixed */ MDBX_CP_FORCE_DYNAMIC_SIZE = 2u }; #ifndef __cplusplus @@ -2407,7 +2407,7 @@ LIBMDBX_API int mdbx_env_deleteW(const wchar_t *pathnameW, * account skipping free pages. * * - \ref MDBX_CP_FORCE_DYNAMIC_SIZE - * Force to make resizeable copy, i.e. dynamic size instead of fixed. + * Force to make resizable copy, i.e. dynamic size instead of fixed. * * \returns A non-zero error value on failure and 0 on success. */ LIBMDBX_API int mdbx_env_copy(MDBX_env *env, const char *dest, @@ -2863,7 +2863,7 @@ enum MDBX_warmup_flags_t { MDBX_warmup_lock = 4, /** Alters corresponding current resource limits to be enough for lock pages - * by \ref MDBX_warmup_lock. However, this option should be used in simpliest + * by \ref MDBX_warmup_lock. However, this option should be used in simpler * applications since takes into account only current size of this environment * disregarding all other factors. For real-world database application you * will need full-fledged management of resources and their limits with @@ -2899,7 +2899,7 @@ DEFINE_ENUM_FLAG_OPERATORS(MDBX_warmup_flags_t) * \param [in] timeout_seconds_16dot16 Optional timeout which checking only * during explicitly peeking database pages * for loading ones if the \ref MDBX_warmup_force - * option was spefified. + * option was specified. * * \returns A non-zero error value on failure and 0 on success. * Some possible errors are: @@ -3027,7 +3027,7 @@ LIBMDBX_API int mdbx_env_get_fd(const MDBX_env *env, mdbx_filehandle_t *fd); * was called after \ref mdbx_env_open() but OUTSIDE a write transaction, * then MDBX will execute internal pseudo-transaction to apply new parameters * (but only if anything has been changed), and changes be visible to any - * others processes immediately after succesful completion of function. + * others processes immediately after successful completion of function. * * Essentially a concept of "automatic size management" is simple and useful: * - There are the lower and upper bounds of the database file size; @@ -5222,7 +5222,7 @@ mdbx_get_datacmp(MDBX_db_flags_t flags); * \param [in] thread The reader thread ID. * \param [in] bytes_used The number of last used page * in the MVCC-snapshot which being read, - * i.e. database file can't shrinked beyond this. + * i.e. database file can't be shrunk beyond this. * \param [in] bytes_retained The total size of the database pages that were * retired by committed write transactions after * the reader's MVCC-snapshot, diff --git a/crates/storage/libmdbx-rs/mdbx-sys/libmdbx/mdbx.h++ b/crates/storage/libmdbx-rs/mdbx-sys/libmdbx/mdbx.h++ index bc3e18024..c4563927e 100644 --- a/crates/storage/libmdbx-rs/mdbx-sys/libmdbx/mdbx.h++ +++ b/crates/storage/libmdbx-rs/mdbx-sys/libmdbx/mdbx.h++ @@ -3450,7 +3450,7 @@ public: /// transactions since the current read /// transaction started. size_t bytes_used; ///< The number of last used page in the MVCC-snapshot - ///< which being read, i.e. database file can't shrinked + ///< which being read, i.e. database file can't be shrunk ///< beyond this. size_t bytes_retained; ///< The total size of the database pages that ///< were retired by committed write transactions diff --git a/crates/storage/libmdbx-rs/mdbx-sys/libmdbx/mdbx_chk.c b/crates/storage/libmdbx-rs/mdbx-sys/libmdbx/mdbx_chk.c index 5812dc680..ae2066463 100644 --- a/crates/storage/libmdbx-rs/mdbx-sys/libmdbx/mdbx_chk.c +++ b/crates/storage/libmdbx-rs/mdbx-sys/libmdbx/mdbx_chk.c @@ -58,7 +58,7 @@ /** Disables using GNU/Linux libc extensions. * \ingroup build_option - * \note This option couldn't be moved to the options.h since dependant + * \note This option couldn't be moved to the options.h since dependent * control macros/defined should be prepared before include the options.h */ #ifndef MDBX_DISABLE_GNU_SOURCE #define MDBX_DISABLE_GNU_SOURCE 0 @@ -1676,7 +1676,7 @@ MDBX_INTERNAL_FUNC int osal_lck_destroy(MDBX_env *env, MDBX_INTERNAL_FUNC int osal_lck_seize(MDBX_env *env); /// \brief Downgrades the level of initially acquired lock to -/// operational level specified by argument. The reson for such downgrade: +/// operational level specified by argument. The reason for such downgrade: /// - unblocking of other processes that are waiting for access, i.e. /// if (env->me_flags & MDBX_EXCLUSIVE) != 0, then other processes /// should be made aware that access is unavailable rather than @@ -2059,7 +2059,7 @@ extern LIBMDBX_API const char *const mdbx_sourcery_anchor; /** Controls sort order of internal page number lists. * This mostly experimental/advanced option with not for regular MDBX users. - * \warning The database format depend on this option and libmdbx builded with + * \warning The database format depend on this option and libmdbx built with * different option value are incompatible. */ #ifndef MDBX_PNL_ASCENDING #define MDBX_PNL_ASCENDING 0 @@ -2929,7 +2929,7 @@ typedef struct MDBX_lockinfo { /* Paired counter of processes that have mlock()ed part of mmapped DB. * The (mti_mlcnt[0] - mti_mlcnt[1]) > 0 means at least one process - * lock at leat one page, so therefore madvise() could return EINVAL. */ + * lock at least one page, so therefore madvise() could return EINVAL. */ MDBX_atomic_uint32_t mti_mlcnt[2]; MDBX_ALIGNAS(MDBX_CACHELINE_SIZE) /* cacheline ----------------------------*/ diff --git a/crates/storage/libmdbx-rs/mdbx-sys/libmdbx/mdbx_copy.c b/crates/storage/libmdbx-rs/mdbx-sys/libmdbx/mdbx_copy.c index c7d033b4c..37a804b79 100644 --- a/crates/storage/libmdbx-rs/mdbx-sys/libmdbx/mdbx_copy.c +++ b/crates/storage/libmdbx-rs/mdbx-sys/libmdbx/mdbx_copy.c @@ -58,7 +58,7 @@ /** Disables using GNU/Linux libc extensions. * \ingroup build_option - * \note This option couldn't be moved to the options.h since dependant + * \note This option couldn't be moved to the options.h since dependent * control macros/defined should be prepared before include the options.h */ #ifndef MDBX_DISABLE_GNU_SOURCE #define MDBX_DISABLE_GNU_SOURCE 0 @@ -1676,7 +1676,7 @@ MDBX_INTERNAL_FUNC int osal_lck_destroy(MDBX_env *env, MDBX_INTERNAL_FUNC int osal_lck_seize(MDBX_env *env); /// \brief Downgrades the level of initially acquired lock to -/// operational level specified by argument. The reson for such downgrade: +/// operational level specified by argument. The reason for such downgrade: /// - unblocking of other processes that are waiting for access, i.e. /// if (env->me_flags & MDBX_EXCLUSIVE) != 0, then other processes /// should be made aware that access is unavailable rather than @@ -2059,7 +2059,7 @@ extern LIBMDBX_API const char *const mdbx_sourcery_anchor; /** Controls sort order of internal page number lists. * This mostly experimental/advanced option with not for regular MDBX users. - * \warning The database format depend on this option and libmdbx builded with + * \warning The database format depend on this option and libmdbx built with * different option value are incompatible. */ #ifndef MDBX_PNL_ASCENDING #define MDBX_PNL_ASCENDING 0 @@ -2929,7 +2929,7 @@ typedef struct MDBX_lockinfo { /* Paired counter of processes that have mlock()ed part of mmapped DB. * The (mti_mlcnt[0] - mti_mlcnt[1]) > 0 means at least one process - * lock at leat one page, so therefore madvise() could return EINVAL. */ + * lock at least one page, so therefore madvise() could return EINVAL. */ MDBX_atomic_uint32_t mti_mlcnt[2]; MDBX_ALIGNAS(MDBX_CACHELINE_SIZE) /* cacheline ----------------------------*/ diff --git a/crates/storage/libmdbx-rs/mdbx-sys/libmdbx/mdbx_drop.c b/crates/storage/libmdbx-rs/mdbx-sys/libmdbx/mdbx_drop.c index c1cec3587..491e5cb4a 100644 --- a/crates/storage/libmdbx-rs/mdbx-sys/libmdbx/mdbx_drop.c +++ b/crates/storage/libmdbx-rs/mdbx-sys/libmdbx/mdbx_drop.c @@ -60,7 +60,7 @@ /** Disables using GNU/Linux libc extensions. * \ingroup build_option - * \note This option couldn't be moved to the options.h since dependant + * \note This option couldn't be moved to the options.h since dependent * control macros/defined should be prepared before include the options.h */ #ifndef MDBX_DISABLE_GNU_SOURCE #define MDBX_DISABLE_GNU_SOURCE 0 @@ -1678,7 +1678,7 @@ MDBX_INTERNAL_FUNC int osal_lck_destroy(MDBX_env *env, MDBX_INTERNAL_FUNC int osal_lck_seize(MDBX_env *env); /// \brief Downgrades the level of initially acquired lock to -/// operational level specified by argument. The reson for such downgrade: +/// operational level specified by argument. The reason for such downgrade: /// - unblocking of other processes that are waiting for access, i.e. /// if (env->me_flags & MDBX_EXCLUSIVE) != 0, then other processes /// should be made aware that access is unavailable rather than @@ -2061,7 +2061,7 @@ extern LIBMDBX_API const char *const mdbx_sourcery_anchor; /** Controls sort order of internal page number lists. * This mostly experimental/advanced option with not for regular MDBX users. - * \warning The database format depend on this option and libmdbx builded with + * \warning The database format depend on this option and libmdbx built with * different option value are incompatible. */ #ifndef MDBX_PNL_ASCENDING #define MDBX_PNL_ASCENDING 0 @@ -2931,7 +2931,7 @@ typedef struct MDBX_lockinfo { /* Paired counter of processes that have mlock()ed part of mmapped DB. * The (mti_mlcnt[0] - mti_mlcnt[1]) > 0 means at least one process - * lock at leat one page, so therefore madvise() could return EINVAL. */ + * lock at least one page, so therefore madvise() could return EINVAL. */ MDBX_atomic_uint32_t mti_mlcnt[2]; MDBX_ALIGNAS(MDBX_CACHELINE_SIZE) /* cacheline ----------------------------*/ diff --git a/crates/storage/libmdbx-rs/mdbx-sys/libmdbx/mdbx_dump.c b/crates/storage/libmdbx-rs/mdbx-sys/libmdbx/mdbx_dump.c index 76f293d9a..7c03b3f9c 100644 --- a/crates/storage/libmdbx-rs/mdbx-sys/libmdbx/mdbx_dump.c +++ b/crates/storage/libmdbx-rs/mdbx-sys/libmdbx/mdbx_dump.c @@ -58,7 +58,7 @@ /** Disables using GNU/Linux libc extensions. * \ingroup build_option - * \note This option couldn't be moved to the options.h since dependant + * \note This option couldn't be moved to the options.h since dependent * control macros/defined should be prepared before include the options.h */ #ifndef MDBX_DISABLE_GNU_SOURCE #define MDBX_DISABLE_GNU_SOURCE 0 @@ -1676,7 +1676,7 @@ MDBX_INTERNAL_FUNC int osal_lck_destroy(MDBX_env *env, MDBX_INTERNAL_FUNC int osal_lck_seize(MDBX_env *env); /// \brief Downgrades the level of initially acquired lock to -/// operational level specified by argument. The reson for such downgrade: +/// operational level specified by argument. The reason for such downgrade: /// - unblocking of other processes that are waiting for access, i.e. /// if (env->me_flags & MDBX_EXCLUSIVE) != 0, then other processes /// should be made aware that access is unavailable rather than @@ -2059,7 +2059,7 @@ extern LIBMDBX_API const char *const mdbx_sourcery_anchor; /** Controls sort order of internal page number lists. * This mostly experimental/advanced option with not for regular MDBX users. - * \warning The database format depend on this option and libmdbx builded with + * \warning The database format depend on this option and libmdbx built with * different option value are incompatible. */ #ifndef MDBX_PNL_ASCENDING #define MDBX_PNL_ASCENDING 0 @@ -2929,7 +2929,7 @@ typedef struct MDBX_lockinfo { /* Paired counter of processes that have mlock()ed part of mmapped DB. * The (mti_mlcnt[0] - mti_mlcnt[1]) > 0 means at least one process - * lock at leat one page, so therefore madvise() could return EINVAL. */ + * lock at least one page, so therefore madvise() could return EINVAL. */ MDBX_atomic_uint32_t mti_mlcnt[2]; MDBX_ALIGNAS(MDBX_CACHELINE_SIZE) /* cacheline ----------------------------*/ diff --git a/crates/storage/libmdbx-rs/mdbx-sys/libmdbx/mdbx_load.c b/crates/storage/libmdbx-rs/mdbx-sys/libmdbx/mdbx_load.c index 5739037f4..18809c420 100644 --- a/crates/storage/libmdbx-rs/mdbx-sys/libmdbx/mdbx_load.c +++ b/crates/storage/libmdbx-rs/mdbx-sys/libmdbx/mdbx_load.c @@ -58,7 +58,7 @@ /** Disables using GNU/Linux libc extensions. * \ingroup build_option - * \note This option couldn't be moved to the options.h since dependant + * \note This option couldn't be moved to the options.h since dependent * control macros/defined should be prepared before include the options.h */ #ifndef MDBX_DISABLE_GNU_SOURCE #define MDBX_DISABLE_GNU_SOURCE 0 @@ -1676,7 +1676,7 @@ MDBX_INTERNAL_FUNC int osal_lck_destroy(MDBX_env *env, MDBX_INTERNAL_FUNC int osal_lck_seize(MDBX_env *env); /// \brief Downgrades the level of initially acquired lock to -/// operational level specified by argument. The reson for such downgrade: +/// operational level specified by argument. The reason for such downgrade: /// - unblocking of other processes that are waiting for access, i.e. /// if (env->me_flags & MDBX_EXCLUSIVE) != 0, then other processes /// should be made aware that access is unavailable rather than @@ -2059,7 +2059,7 @@ extern LIBMDBX_API const char *const mdbx_sourcery_anchor; /** Controls sort order of internal page number lists. * This mostly experimental/advanced option with not for regular MDBX users. - * \warning The database format depend on this option and libmdbx builded with + * \warning The database format depend on this option and libmdbx built with * different option value are incompatible. */ #ifndef MDBX_PNL_ASCENDING #define MDBX_PNL_ASCENDING 0 @@ -2929,7 +2929,7 @@ typedef struct MDBX_lockinfo { /* Paired counter of processes that have mlock()ed part of mmapped DB. * The (mti_mlcnt[0] - mti_mlcnt[1]) > 0 means at least one process - * lock at leat one page, so therefore madvise() could return EINVAL. */ + * lock at least one page, so therefore madvise() could return EINVAL. */ MDBX_atomic_uint32_t mti_mlcnt[2]; MDBX_ALIGNAS(MDBX_CACHELINE_SIZE) /* cacheline ----------------------------*/ diff --git a/crates/storage/libmdbx-rs/mdbx-sys/libmdbx/mdbx_stat.c b/crates/storage/libmdbx-rs/mdbx-sys/libmdbx/mdbx_stat.c index bce46ef63..ddf455e3e 100644 --- a/crates/storage/libmdbx-rs/mdbx-sys/libmdbx/mdbx_stat.c +++ b/crates/storage/libmdbx-rs/mdbx-sys/libmdbx/mdbx_stat.c @@ -58,7 +58,7 @@ /** Disables using GNU/Linux libc extensions. * \ingroup build_option - * \note This option couldn't be moved to the options.h since dependant + * \note This option couldn't be moved to the options.h since dependent * control macros/defined should be prepared before include the options.h */ #ifndef MDBX_DISABLE_GNU_SOURCE #define MDBX_DISABLE_GNU_SOURCE 0 @@ -1676,7 +1676,7 @@ MDBX_INTERNAL_FUNC int osal_lck_destroy(MDBX_env *env, MDBX_INTERNAL_FUNC int osal_lck_seize(MDBX_env *env); /// \brief Downgrades the level of initially acquired lock to -/// operational level specified by argument. The reson for such downgrade: +/// operational level specified by argument. The reason for such downgrade: /// - unblocking of other processes that are waiting for access, i.e. /// if (env->me_flags & MDBX_EXCLUSIVE) != 0, then other processes /// should be made aware that access is unavailable rather than @@ -2059,7 +2059,7 @@ extern LIBMDBX_API const char *const mdbx_sourcery_anchor; /** Controls sort order of internal page number lists. * This mostly experimental/advanced option with not for regular MDBX users. - * \warning The database format depend on this option and libmdbx builded with + * \warning The database format depend on this option and libmdbx built with * different option value are incompatible. */ #ifndef MDBX_PNL_ASCENDING #define MDBX_PNL_ASCENDING 0 @@ -2929,7 +2929,7 @@ typedef struct MDBX_lockinfo { /* Paired counter of processes that have mlock()ed part of mmapped DB. * The (mti_mlcnt[0] - mti_mlcnt[1]) > 0 means at least one process - * lock at leat one page, so therefore madvise() could return EINVAL. */ + * lock at least one page, so therefore madvise() could return EINVAL. */ MDBX_atomic_uint32_t mti_mlcnt[2]; MDBX_ALIGNAS(MDBX_CACHELINE_SIZE) /* cacheline ----------------------------*/ diff --git a/crates/tasks/Cargo.toml b/crates/tasks/Cargo.toml index 891561b03..6019d7a21 100644 --- a/crates/tasks/Cargo.toml +++ b/crates/tasks/Cargo.toml @@ -5,7 +5,7 @@ edition = "2021" license = "MIT OR Apache-2.0" repository = "https://github.com/paradigmxyz/reth" readme = "README.md" -description = "Task managment" +description = "Task management" [dependencies] tokio = { version = "1", features = ["sync", "rt"] } diff --git a/crates/transaction-pool/src/pool/txpool.rs b/crates/transaction-pool/src/pool/txpool.rs index 0c5956280..1c0190093 100644 --- a/crates/transaction-pool/src/pool/txpool.rs +++ b/crates/transaction-pool/src/pool/txpool.rs @@ -150,7 +150,7 @@ impl TxPool { self.all_transactions.by_hash.get(tx_hash).cloned() } - /// Returns all transaction for the hashes, if it exis. + /// Returns all transaction for the hashes, if it exists. pub(crate) fn get_all<'a>( &'a self, txs: impl IntoIterator + 'a, @@ -477,7 +477,7 @@ impl fmt::Debug for TxPool { pub(crate) struct AllTransactions { /// Expected base fee for the pending block. pending_basefee: U256, - /// Minimum base fee required by the protol. + /// Minimum base fee required by the protocol. /// /// Transactions with a lower base fee will never be included by the chain minimal_protocol_basefee: U256, diff --git a/deny.toml b/deny.toml index ec621f7ea..7c1d703f3 100644 --- a/deny.toml +++ b/deny.toml @@ -32,7 +32,7 @@ skip-tree = [] [licenses] unlicensed = "deny" -# List of explictly allowed licenses +# List of explicitly allowed licenses # See https://spdx.org/licenses/ for list of possible licenses # [possible values: any SPDX 3.7 short identifier (+ optional exception)]. allow = [