Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix typos #7049

Merged
merged 2 commits into from
Mar 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ FULL_DB_TOOLS_DIR := $(shell pwd)/$(DB_TOOLS_DIR)/

BUILD_PATH = "target"

# List of features to use when building. Can be overriden via the environment.
# List of features to use when building. Can be overridden via the environment.
# No jemalloc on Windows
ifeq ($(OS),Windows_NT)
FEATURES ?=
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ While we are aware of parties running Reth staking nodes in production, we do *n

More historical context below:
* We are releasing 1.0 "production-ready" stable Reth once our Reth & Revm audits are done. ETA ~April 2024.
* Reth is currently undergoing an audit with [Sigma Prime](https://sigmaprime.io/), the developers of [Lighthouse](https://github.com/sigp/lighthouse), the Rust Consensus Layer implemementation.
* Reth is currently undergoing an audit with [Sigma Prime](https://sigmaprime.io/), the developers of [Lighthouse](https://github.com/sigp/lighthouse), the Rust Consensus Layer implementation.
* Revm (the EVM used in Reth) is undergoing an audit with [Guido Vranken](https://twitter.com/guidovranken) (#1 [Ethereum Bug Bounty](https://ethereum.org/en/bug-bounty)).
* We are releasing [beta](https://github.com/paradigmxyz/reth/releases/tag/v0.2.0-beta.1) on Monday March 4th 2024, our first breaking change to the database model, providing faster query speed, smaller database footprint, and allowing "history" to be mounted on separate drives.
* We shipped iterative improvements until the last alpha release on February 28th 2024, [0.1.0-alpha.21](https://github.com/paradigmxyz/reth/releases/tag/v0.1.0-alpha.21).
Expand Down
12 changes: 6 additions & 6 deletions bin/reth/src/commands/db/stats.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@ impl Command {
}

let max_widths = table.column_max_content_widths();
let mut seperator = Row::new();
let mut separator = Row::new();
for width in max_widths {
seperator.add_cell(Cell::new("-".repeat(width as usize)));
separator.add_cell(Cell::new("-".repeat(width as usize)));
}
table.add_row(seperator);
table.add_row(separator);

let mut row = Row::new();
row.add_cell(Cell::new("Tables"))
Expand Down Expand Up @@ -259,11 +259,11 @@ impl Command {
}

let max_widths = table.column_max_content_widths();
let mut seperator = Row::new();
let mut separator = Row::new();
for width in max_widths {
seperator.add_cell(Cell::new("-".repeat(width as usize)));
separator.add_cell(Cell::new("-".repeat(width as usize)));
}
table.add_row(seperator);
table.add_row(separator);

let mut row = Row::new();
row.add_cell(Cell::new("Total"))
Expand Down
2 changes: 1 addition & 1 deletion bin/reth/src/commands/debug_cmd/in_memory_merkle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ impl Command {
"Mismatched trie updates"
);

// Drop without comitting.
// Drop without committing.
drop(provider_rw);

Ok(())
Expand Down
2 changes: 1 addition & 1 deletion book/jsonrpc/trace.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ The transaction trace filtering APIs are:

Executes the given call and returns a number of possible traces for it.

The first parameter is a transaction object where the `from` field is optional and the `nonce` field is ommitted.
The first parameter is a transaction object where the `from` field is optional and the `nonce` field is omitted.

The second parameter is an array of one or more trace types (`vmTrace`, `trace`, `stateDiff`).

Expand Down
4 changes: 2 additions & 2 deletions book/run/optimism.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ This will build the `rethdb-reader` dylib and instruct the `op-node` build to st

The `optimism` feature flag in `op-reth` adds several new CLI flags to the `reth` binary:
1. `--rollup.sequencer-http <uri>` - The sequencer endpoint to connect to. Transactions sent to the `op-reth` EL are also forwarded to this sequencer endpoint for inclusion, as the sequencer is the entity that builds blocks on OP Stack chains.
1. `--rollup.disable-tx-pool-gossip` - Disables gossiping of transactions in the mempool to peers. This can be ommitted for personal nodes, though providers should always opt to enable this flag.
1. `--rollup.enable-genesis-walkback` - Disables setting the forkchoice status to tip on startup, making the `op-node` walk back to genesis and verify the integrity of the chain before starting to sync. This can be ommitted unless a corruption of local chainstate is suspected.
1. `--rollup.disable-tx-pool-gossip` - Disables gossiping of transactions in the mempool to peers. This can be omitted for personal nodes, though providers should always opt to enable this flag.
1. `--rollup.enable-genesis-walkback` - Disables setting the forkchoice status to tip on startup, making the `op-node` walk back to genesis and verify the integrity of the chain before starting to sync. This can be omitted unless a corruption of local chainstate is suspected.

First, ensure that your L1 archival node is running and synced to tip. Then, start `op-reth` with the `--rollup.sequencer-http` flag set to the `Base Mainnet` sequencer endpoint:
```sh
Expand Down
4 changes: 2 additions & 2 deletions crates/blockchain-tree/src/block_indices.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ impl BlockIndices {
}

/// Update all block hashes. iterate over present and new list of canonical hashes and compare
/// them. Remove all missmatches, disconnect them and return all chains that needs to be
/// them. Remove all mismatches, disconnect them and return all chains that needs to be
/// removed.
pub(crate) fn update_block_hashes(
&mut self,
Expand Down Expand Up @@ -211,7 +211,7 @@ impl BlockIndices {
}
}

// remove childs of removed blocks
// remove children of removed blocks
(
removed.into_iter().fold(BTreeSet::new(), |mut fold, (number, hash)| {
fold.extend(self.remove_block(number, hash));
Expand Down
2 changes: 1 addition & 1 deletion crates/blockchain-tree/src/blockchain_tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1164,7 +1164,7 @@ impl<DB: Database, EVM: ExecutorFactory> BlockchainTree<DB, EVM> {
if self.block_indices().canonical_tip().number <= unwind_to {
return Ok(())
}
// revert `N` blocks from current canonical chain and put them inside BlockchanTree
// revert `N` blocks from current canonical chain and put them inside BlockchainTree
let old_canon_chain = self.revert_canonical_from_database(unwind_to)?;

// check if there is block in chain
Expand Down
2 changes: 1 addition & 1 deletion crates/consensus/beacon/src/engine/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -788,7 +788,7 @@ where
/// Record latency metrics for one call to make a block canonical
/// Takes start time of the call and result of the make canonical call
///
/// Handles cases for error, already canonical and commmitted blocks
/// Handles cases for error, already canonical and committed blocks
fn record_make_canonical_latency(
&self,
start: Instant,
Expand Down
2 changes: 1 addition & 1 deletion crates/consensus/common/src/calc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ pub fn block_reward(base_block_reward: u128, ommers: usize) -> u128 {
///
/// From the yellow paper (page 15):
///
/// > If there are collissions of the beneficiary addresses between ommers and the block (i.e. two
/// > If there are collisions of the beneficiary addresses between ommers and the block (i.e. two
/// > ommers with the same beneficiary address or an ommer with the same beneficiary address as the
/// > present block), additions are applied cumulatively.
///
Expand Down
4 changes: 2 additions & 2 deletions crates/net/discv4/src/proto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -790,10 +790,10 @@ mod tests {
EnrWrapper::new(builder.build(&key).unwrap())
};

let enr_respone = EnrResponse { request_hash: rng.gen(), enr };
let enr_response = EnrResponse { request_hash: rng.gen(), enr };

let mut buf = Vec::new();
enr_respone.encode(&mut buf);
enr_response.encode(&mut buf);

let decoded = EnrResponse::decode(&mut &buf[..]).unwrap();

Expand Down
4 changes: 2 additions & 2 deletions crates/net/downloaders/src/bodies/request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ where
}

/// Attempt to buffer body responses. Returns an error if body response fails validation.
/// Every body preceeding the failed one will be buffered.
/// Every body preceding the failed one will be buffered.
///
/// This method removes headers from the internal collection.
/// If the response fails validation, then the header will be put back.
Expand Down Expand Up @@ -254,7 +254,7 @@ mod tests {
};
use reth_interfaces::test_utils::{generators, generators::random_header_range, TestConsensus};

/// Check if future returns empty bodies without dispathing any requests.
/// Check if future returns empty bodies without dispatching any requests.
#[tokio::test]
async fn request_returns_empty_bodies() {
let mut rng = generators::rng();
Expand Down
2 changes: 1 addition & 1 deletion crates/net/downloaders/src/headers/reverse_headers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1201,7 +1201,7 @@ impl ReverseHeadersDownloaderBuilder {

/// Configures and returns the next [HeadersRequest] based on the given parameters
///
/// The request wil start at the given `next_request_block_number` block.
/// The request will start at the given `next_request_block_number` block.
/// The `limit` of the request will either be the targeted `request_limit` or the difference of
/// `next_request_block_number` and the `local_head` in case this is smaller than the targeted
/// `request_limit`.
Expand Down
2 changes: 1 addition & 1 deletion crates/net/eth-wire/src/hello.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ impl HelloMessageWithProtocols {
/// Raw rlpx protocol message used in the `p2p` handshake, containing information about the
/// supported RLPx protocol version and capabilities.
///
/// See als <https://github.com/ethereum/devp2p/blob/master/rlpx.md#hello-0x00>
/// See also <https://github.com/ethereum/devp2p/blob/master/rlpx.md#hello-0x00>
#[derive_arbitrary(rlp)]
#[derive(Clone, Debug, PartialEq, Eq, RlpEncodable, RlpDecodable)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
Expand Down
2 changes: 1 addition & 1 deletion crates/net/nat/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ impl ResolveNatInterval {
}

/// Creates a new [ResolveNatInterval] that attempts to resolve the public IP with interval of
/// period with the first attempt starting at `sart`. See also [tokio::time::interval_at]
/// period with the first attempt starting at `start`. See also [tokio::time::interval_at]
#[track_caller]
pub fn interval_at(
resolver: NatResolver,
Expand Down
4 changes: 2 additions & 2 deletions crates/net/network/benches/bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use std::sync::Arc;
use tokio::{runtime::Runtime as TokioRuntime, sync::mpsc::unbounded_channel};

criterion_group!(
name = brodcast_benches;
name = broadcast_benches;
config = Criterion::default().with_profiler(PProfProfiler::new(100, Output::Flamegraph(None)));
targets = broadcast_ingress_bench
);
Expand Down Expand Up @@ -87,4 +87,4 @@ pub fn broadcast_ingress_bench(c: &mut Criterion) {
});
}

criterion_main!(brodcast_benches);
criterion_main!(broadcast_benches);
2 changes: 1 addition & 1 deletion crates/net/network/src/session/active.rs
Original file line number Diff line number Diff line change
Expand Up @@ -705,7 +705,7 @@ impl InflightRequest {
enum OnIncomingMessageOutcome {
/// Message successfully handled.
Ok,
/// Message is considered to be in violation fo the protocol
/// Message is considered to be in violation of the protocol
BadMessage { error: EthStreamError, message: EthMessage },
/// Currently no capacity to handle the message
NoCapacity(ActiveSessionMessage),
Expand Down
2 changes: 1 addition & 1 deletion crates/net/network/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ where
///
/// See also <https://github.com/ethereum/devp2p/blob/master/caps/eth.md>
pub(crate) fn announce_new_block(&mut self, msg: NewBlockMessage) {
// send a `NewBlock` message to a fraction fo the connected peers (square root of the total
// send a `NewBlock` message to a fraction of the connected peers (square root of the total
// number of peers)
let num_propagate = (self.active_peers.len() as f64).sqrt() as u64 + 1;

Expand Down
4 changes: 2 additions & 2 deletions crates/net/network/src/transactions/validation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ pub const SIGNATURE_DECODED_SIZE_BYTES: usize = mem::size_of::<Signature>();
/// [`NewPooledTransactionHashes68`](reth_eth_wire::NewPooledTransactionHashes68)..
pub trait ValidateTx68 {
/// Validates a [`NewPooledTransactionHashes68`](reth_eth_wire::NewPooledTransactionHashes68)
/// entry. Returns [`ValidationOutcome`] which signals to the caller wether to fetch the
/// transaction or wether to drop it, and wether the sender of the announcement should be
/// 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
/// penalized.
fn should_fetch(
&self,
Expand Down
4 changes: 2 additions & 2 deletions crates/net/network/tests/it/big_pooled_txs_req.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use reth_transaction_pool::{
};

use tokio::sync::oneshot;
// peer0: `GetPooledTransactions` requestor
// peer0: `GetPooledTransactions` requester
// peer1: `GetPooledTransactions` responder
#[tokio::test(flavor = "multi_thread")]
async fn test_large_tx_req() {
Expand Down Expand Up @@ -50,7 +50,7 @@ async fn test_large_tx_req() {
net.peers_mut()[0].install_transactions_manager(testing_pool());
net.peers_mut()[1].install_transactions_manager(pool1);

// connect peers together and check for connection existance
// connect peers together and check for connection existence
let handle0 = net.peers()[0].handle();
let handle1 = net.peers()[1].handle();
let mut events0 = NetworkEventStream::new(handle0.event_listener());
Expand Down
2 changes: 1 addition & 1 deletion crates/node-api/src/engine/traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ pub trait PayloadBuilderAttributes: Send + Sync + std::fmt::Debug {
/// Returns the parent block hash for the running payload job.
fn parent(&self) -> B256;

/// Returns the timestmap for the running payload job.
/// Returns the timestamp for the running payload job.
fn timestamp(&self) -> u64;

/// Returns the parent beacon block root for the running payload job, if it exists.
Expand Down
2 changes: 1 addition & 1 deletion crates/payload/builder/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use tokio::sync::oneshot;
/// Possible error variants during payload building.
#[derive(Debug, thiserror::Error)]
pub enum PayloadBuilderError {
/// Thrown whe the parent block is missing.
/// Thrown when the parent block is missing.
#[error("missing parent block {0}")]
MissingParentBlock(B256),
/// An oneshot channels has been closed.
Expand Down
2 changes: 1 addition & 1 deletion crates/payload/optimism/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ mod builder {
}
};

// to realease the db reference drop evm.
// to release the db reference drop evm.
drop(evm);
// commit changes
db.commit(state);
Expand Down
10 changes: 5 additions & 5 deletions crates/primitives/src/chain/spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -742,7 +742,7 @@ impl ChainSpec {
ForkFilter::new(head, self.genesis_hash(), self.genesis_timestamp(), forks)
}

/// Compute the [`ForkId`] for the given [`Head`] folowing eip-6122 spec
/// Compute the [`ForkId`] for the given [`Head`] following eip-6122 spec
pub fn fork_id(&self, head: &Head) -> ForkId {
let mut forkhash = ForkHash::from(self.genesis_hash());
let mut current_applied = 0;
Expand Down Expand Up @@ -817,8 +817,8 @@ impl ChainSpec {
let mut hardforks_iter = self.forks_iter().peekable();
while let Some((_, curr_cond)) = hardforks_iter.next() {
if let Some((_, next_cond)) = hardforks_iter.peek() {
// peek and find the first occurence of ForkCondition::TTD (merge) , or in
// custom ChainSpecs, the first occurence of
// peek and find the first occurrence of ForkCondition::TTD (merge) , or in
// custom ChainSpecs, the first occurrence of
// ForkCondition::Timestamp. If curr_cond is ForkCondition::Block at
// this point, which it should be in most "normal" ChainSpecs,
// return its block_num
Expand Down Expand Up @@ -946,7 +946,7 @@ pub struct ForkTimestamps {
}

impl ForkTimestamps {
/// Creates a new [`ForkTimestamps`] from the given hardforks by extracing the timestamps
/// Creates a new [`ForkTimestamps`] from the given hardforks by extracting the timestamps
fn from_hardforks(forks: &BTreeMap<Hardfork, ForkCondition>) -> Self {
let mut timestamps = ForkTimestamps::default();
if let Some(shanghai) = forks.get(&Hardfork::Shanghai).and_then(|f| f.as_timestamp()) {
Expand Down Expand Up @@ -1771,7 +1771,7 @@ Post-merge hard forks (timestamp based):

// spec w/ only ForkCondition::Block - test the match arm for ForkCondition::Block to ensure
// no regressions, for these ForkConditions(Block/TTD) - a separate chain spec definition is
// technically unecessary - but we include it here for thoroughness
// technically unnecessary - but we include it here for thoroughness
let fork_cond_block_only_case = ChainSpec::builder()
.chain(Chain::mainnet())
.genesis(empty_genesis)
Expand Down
2 changes: 1 addition & 1 deletion crates/primitives/src/constants/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ pub const ETHEREUM_BLOCK_GAS_LIMIT: u64 = 30_000_000;
/// 12.5% of 7 is less than 1.
///
/// Note that min base fee under different 1559 parameterizations may differ, but there's no
/// signifant harm in leaving this setting as is.
/// significant harm in leaving this setting as is.
pub const MIN_PROTOCOL_BASE_FEE: u64 = 7;

/// Same as [MIN_PROTOCOL_BASE_FEE] but as a U256.
Expand Down
2 changes: 1 addition & 1 deletion crates/primitives/src/transaction/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1506,7 +1506,7 @@ impl TransactionSignedEcRecovered {
self.signed_transaction
}

/// Desolve Self to its component
/// Dissolve Self to its component
pub fn to_components(self) -> (TransactionSigned, Address) {
(self.signed_transaction, self.signer)
}
Expand Down
4 changes: 2 additions & 2 deletions crates/primitives/src/transaction/pooled.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ impl PooledTransactionsElement {
let tx_type = *data.first().ok_or(RlpError::InputTooShort)?;

if tx_type == EIP4844_TX_TYPE_ID {
// Recall that the blob transaction response `TranactionPayload` is encoded like
// Recall that the blob transaction response `TransactionPayload` is encoded like
// this: `rlp([tx_payload_body, blobs, commitments, proofs])`
//
// Note that `tx_payload_body` is a list:
Expand Down Expand Up @@ -595,7 +595,7 @@ impl PooledTransactionsElementEcRecovered {
tx.into_ecrecovered_transaction(signer)
}

/// Desolve Self to its component
/// Dissolve Self to its component
pub fn into_components(self) -> (PooledTransactionsElement, Address) {
(self.transaction, self.signer)
}
Expand Down
2 changes: 1 addition & 1 deletion crates/primitives/src/transaction/sidecar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ impl BlobTransaction {
self.sidecar.encode_inner(out);
}

/// Ouputs the length of the RLP encoding of the blob transaction, including the tx type byte,
/// Outputs the length of the RLP encoding of the blob transaction, including the tx type byte,
/// optionally including the length of a wrapping string header. If `with_header` is `false`,
/// the length of the following will be calculated:
/// `tx_type (0x03) || rlp([transaction_payload_body, blobs, commitments, proofs])`
Expand Down
4 changes: 2 additions & 2 deletions crates/primitives/src/trie/subnode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ impl Compact for StoredSubNode {
let nibbles_exists = buf.get_u8() != 0;
let nibble = if nibbles_exists { Some(buf.get_u8()) } else { None };

let node_exsists = buf.get_u8() != 0;
let node = if node_exsists {
let node_exists = buf.get_u8() != 0;
let node = if node_exists {
let (node, rest) = StoredBranchNode::from_compact(buf, 0);
buf = rest;
Some(node.0)
Expand Down
6 changes: 3 additions & 3 deletions crates/rpc/rpc-builder/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ impl<Provider, Pool, Network, Tasks, Events, EvmConfig>

/// Configure a [NoopTransactionPool] instance.
///
/// Caution: This will configure a pool API that does abosultely nothing.
/// Caution: This will configure a pool API that does absolutely nothing.
/// This is only intended for allow easier setup of namespaces that depend on the [EthApi] which
/// requires a [TransactionPool] implementation.
pub fn with_noop_pool(
Expand Down Expand Up @@ -355,7 +355,7 @@ impl<Provider, Pool, Network, Tasks, Events, EvmConfig>

/// Configure a [NoopNetwork] instance.
///
/// Caution: This will configure a network API that does abosultely nothing.
/// Caution: This will configure a network API that does absolutely nothing.
/// This is only intended for allow easier setup of namespaces that depend on the [EthApi] which
/// requires a [NetworkInfo] implementation.
pub fn with_noop_network(
Expand Down Expand Up @@ -1729,7 +1729,7 @@ impl RpcServerConfig {
///
/// This consumes the builder and returns a server.
///
/// Note: The server ist not started and does nothing unless polled, See also [RpcServer::start]
/// Note: The server is not started and does nothing unless polled, See also [RpcServer::start]
pub async fn build(mut self, modules: &TransportRpcModules) -> Result<RpcServer, RpcError> {
let mut server = RpcServer::empty();
server.ws_http = self.build_ws_http(modules).await?;
Expand Down
Loading
Loading