docs: multiple small textual defects (#18598)

This commit is contained in:
crStiv
2025-09-21 10:36:24 +02:00
committed by GitHub
parent aeb6eddba0
commit 4ddf3ddb45
15 changed files with 27 additions and 27 deletions

View File

@@ -38,7 +38,7 @@ macro_rules! regex {
}};
}
/// Generate markdown files from help output of commands
/// Generate markdown files from the help output of commands
#[derive(Parser, Debug)]
#[command(about, long_about = None)]
struct Args {

View File

@@ -30,7 +30,7 @@ pub trait Value: Compress + Decompress + Serialize {}
```
The `Table` trait has two generic values, `Key` and `Value`, which need to implement the `Key` and `Value` traits, respectively. The `Encode` trait is responsible for transforming data into bytes so it can be stored in the database, while the `Decode` trait transforms the bytes back into its original form. Similarly, the `Compress` and `Decompress` traits transform the data to and from a compressed format when storing or reading data from the database.
The `Table` trait has two generic values, `Key` and `Value`, which need to implement the `Key` and `Value` traits, respectively. The `Encode` trait is responsible for transforming data into bytes so it can be stored in the database, while the `Decode` trait transforms the bytes back into their original form. Similarly, the `Compress` and `Decompress` traits transform the data to and from a compressed format when storing or reading data from the database.
There are many tables within the node, all used to store different types of data from `Headers` to `Transactions` and more. Below is a list of all of the tables. You can follow [this link](https://github.com/paradigmxyz/reth/blob/bf9cac7571f018fec581fe3647862dab527aeafb/crates/storage/db/src/tables/mod.rs#L274-L414) if you would like to see the table definitions for any of the tables below.
@@ -196,7 +196,7 @@ pub trait DbTxMut: Send + Sync {
+ Send
+ Sync;
/// Put value to database
/// Put value in database
fn put<T: Table>(&self, key: T::Key, value: T::Value) -> Result<(), DatabaseError>;
/// Delete value from database
fn delete<T: Table>(&self, key: T::Key, value: Option<T::Value>)
@@ -267,7 +267,7 @@ let mut headers_cursor = provider.tx_ref().cursor_read::<tables::Headers>()?;
let headers_walker = headers_cursor.walk_range(block_range.clone())?;
```
Let's look at an examples of how cursors are used. The code snippet below contains the `unwind` method from the `BodyStage` defined in the `stages` crate. This function is responsible for unwinding any changes to the database if there is an error when executing the body stage within the Reth pipeline.
Let's look at an example of how cursors are used. The code snippet below contains the `unwind` method from the `BodyStage` defined in the `stages` crate. This function is responsible for unwinding any changes to the database if there is an error when executing the body stage within the Reth pipeline.
[File: crates/stages/stages/src/stages/bodies.rs](https://github.com/paradigmxyz/reth/blob/bf9cac7571f018fec581fe3647862dab527aeafb/crates/stages/stages/src/stages/bodies.rs#L267-L345)
@@ -306,7 +306,7 @@ fn unwind(&mut self, provider: &DatabaseProviderRW<DB>, input: UnwindInput) {
requests_cursor.delete_current()?;
}
// Delete all transaction to block values.
// Delete all transactions to block values.
if !block_meta.is_empty() &&
tx_block_cursor.seek_exact(block_meta.last_tx_num())?.is_some()
{

View File

@@ -45,7 +45,7 @@ To set up a new metric in Reth and its Grafana dashboard (this assumes running R
1. Save and arrange:
- Click `Apply` to save the panel
- Drag the panel to desired position on the dashboard
- Drag the panel to the desired position on the dashboard
1. Export the dashboard:
@@ -61,7 +61,7 @@ Your new metric is now integrated into the Reth Grafana dashboard.
#### Import Grafana dashboards
If you are running Reth and Grafana outside of docker, and wish to import new Grafana dashboards or update a dashboard:
If you are running Reth and Grafana outside of Docker, and wish to import new Grafana dashboards or update a dashboard:
1. Go to `Home` > `Dashboards`
@@ -74,5 +74,5 @@ If you are running Reth and Grafana outside of docker, and wish to import new Gr
1. Delete the old dashboard
If you are running Reth and Grafana using docker, after having pulled the updated dashboards from `main`, restart the
If you are running Reth and Grafana using Docker, after having pulled the updated dashboards from `main`, restart the
Grafana service. This will update all dashboards.

View File

@@ -4,7 +4,7 @@ use reth_ethereum::network::{api::PeerId, protocol::ProtocolHandler};
use std::net::SocketAddr;
use tokio::sync::mpsc;
/// Protocol state is an helper struct to store the protocol events.
/// Protocol state is a helper struct to store the protocol events.
#[derive(Clone, Debug)]
pub(crate) struct ProtocolState {
pub(crate) events: mpsc::UnboundedSender<ProtocolEvent>,

View File

@@ -1,4 +1,4 @@
//! Simple RLPx Ping Pong protocol that also support sending messages,
//! Simple RLPx Ping Pong protocol that also supports sending messages,
//! following [RLPx specs](https://github.com/ethereum/devp2p/blob/master/rlpx.md)
use alloy_primitives::bytes::{Buf, BufMut, BytesMut};

View File

@@ -123,7 +123,7 @@ fn block_provider_example<T: BlockReader<Block = reth_ethereum::Block>>(
let block = provider.block(number.into())?.ok_or(eyre::eyre!("block num not found"))?;
assert_eq!(block.number, number);
// Can query a block with its senders, this is useful when you'd want to execute a block and do
// Can query a block with its senders, this is useful when you want to execute a block and do
// not want to manually recover the senders for each transaction (as each transaction is
// stored on disk with its v,r,s but not its `from` field.).
let _recovered_block = provider
@@ -145,7 +145,7 @@ fn block_provider_example<T: BlockReader<Block = reth_ethereum::Block>>(
.ok_or(eyre::eyre!("block by hash not found"))?;
assert_eq!(block, block_by_hash2);
// Or you can also specify the datasource. For this provider this always return `None`, but
// Or you can also specify the datasource. For this provider this always returns `None`, but
// the blockchain tree is also able to access pending state not available in the db yet.
let block_by_hash3 = provider
.find_block_by_hash(sealed_block.hash(), BlockSource::Any)?

View File

@@ -58,7 +58,7 @@ async fn my_exex<Node: FullNodeComponents>(mut ctx: ExExContext<Node>) -> eyre::
/// This function supports both Opstack Eth API and ethereum Eth API.
///
/// The received handle gives access to the `EthApi` has full access to all eth api functionality
/// [`FullEthApi`]. And also gives access to additional eth related rpc method handlers, such as eth
/// [`FullEthApi`]. And also gives access to additional eth-related rpc method handlers, such as eth
/// filter.
async fn ethapi_exex<Node, EthApi>(
mut ctx: ExExContext<Node>,

View File

@@ -1,6 +1,6 @@
#![allow(dead_code)]
//! An ExEx example that installs a new RPC subscription endpoint that emit storage changes for a
//! An ExEx example that installs a new RPC subscription endpoint that emits storage changes for a
//! requested address.
#[allow(dead_code)]
use alloy_primitives::{Address, U256};

View File

@@ -124,7 +124,7 @@ async fn handshake_eth(
}
// Snoop by greedily capturing all broadcasts that the peer emits
// note: this node cannot handle request so will be disconnected by peer when challenged
// note: this node cannot handle request so it will be disconnected by peer when challenged
async fn snoop(peer: NodeRecord, mut eth_stream: AuthedEthStream) {
while let Some(Ok(update)) = eth_stream.next().await {
match update {

View File

@@ -1,4 +1,4 @@
//! Example for how hook into the node via the CLI extension mechanism without registering
//! Example for how to hook into the node via the CLI extension mechanism without registering
//! additional arguments
//!
//! Run with

View File

@@ -1,8 +1,8 @@
//! Shows how manually access the database
//! Shows how to manually access the database
use reth_op::{chainspec::BASE_MAINNET, node::OpNode, provider::providers::ReadOnlyConfig};
// Providers are zero cost abstractions on top of an opened MDBX Transaction
// Providers are zero-cost abstractions on top of an opened MDBX Transaction
// exposing a familiar API to query the chain's information without requiring knowledge
// of the inner tables.
//

View File

@@ -1,4 +1,4 @@
//! Example for how hook into the polygon p2p network
//! Example for how to hook into the polygon p2p network
//!
//! Run with
//!
@@ -67,13 +67,13 @@ async fn main() {
let net_handle = net_manager.handle();
let mut events = net_handle.event_listener();
// NetworkManager is a long running task, let's spawn it
// NetworkManager is a long-running task, let's spawn it
tokio::spawn(net_manager);
info!("Looking for Polygon peers...");
while let Some(evt) = events.next().await {
// For the sake of the example we only print the session established event
// with the chain specific details
// with the chain-specific details
if let NetworkEvent::ActivePeerSession { info, .. } = evt {
let SessionInfo { status, client_version, .. } = info;
let chain = status.chain;
@@ -81,5 +81,5 @@ async fn main() {
}
// More events here
}
// We will be disconnected from peers since we are not able to answer to network requests
// We will be disconnected from peers since we are not able to respond to network requests
}

View File

@@ -1,4 +1,4 @@
//! Example illustrating how to run the ETH JSON RPC API as standalone over a DB file.
//! Example illustrating how to run the ETH JSON RPC API as a standalone over a DB file.
//!
//! Run with
//!

View File

@@ -68,7 +68,7 @@ fn main() {
/// Our custom cli args extension that adds one flag to reth default CLI.
#[derive(Debug, Clone, Default, clap::Args)]
struct RethCliTxpoolExt {
/// recipients addresses that we want to trace
/// recipients' addresses that we want to trace
#[arg(long, value_delimiter = ',')]
pub recipients: Vec<Address>,
}

View File

@@ -32,7 +32,7 @@ pub async fn submit_transaction<FC>(
max_fee_per_gas: u128,
) -> eyre::Result<TxHash>
where
// This enforces `EthPrimitives` types for this node, this unlocks the proper conversions when
// This enforces `EthPrimitives` types for this node, which unlocks the proper conversions when
FC: FullNodeComponents<Types: NodeTypes<Primitives = EthPrimitives>>,
{
// Create the transaction request