Skip to content

Commit

Permalink
comments
Browse files Browse the repository at this point in the history
  • Loading branch information
CeciliaZ030 committed Oct 4, 2024
1 parent b3f7718 commit 88d055d
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 24 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM lukemathwalker/cargo-chef AS chef
FROM lukemathwalker/cargo-chef:latest-rust-1 AS chef
WORKDIR /app

LABEL org.opencontainers.image.source=https://github.com/paradigmxyz/reth
Expand Down
7 changes: 0 additions & 7 deletions bin/reth/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,4 @@ mod tests {
#[command(flatten)]
args: T,
}

// #[test]
// fn test_parse_engine_args() {
// let default_args = EngineArgs::default();
// let args = CommandParser::<EngineArgs>::parse_from(["reth"]).args;
// assert_eq!(args, default_args);
// }
}
2 changes: 1 addition & 1 deletion crates/cli/commands/src/stage/dump/execution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use reth_db_api::{
use reth_db_common::DbTool;
use reth_evm::{execute::BlockExecutorProvider, noop::NoopBlockExecutorProvider};
use reth_node_core::dirs::{ChainPath, DataDirPath};
use reth_provider::{providers::StaticFileProvider, ProviderFactory, StateProofProvider};
use reth_provider::{providers::StaticFileProvider, ProviderFactory};
use reth_stages::{stages::ExecutionStage, Stage, StageCheckpoint, UnwindInput};
use tracing::info;

Expand Down
2 changes: 1 addition & 1 deletion crates/ethereum/payload/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ where
// which also removes all dependent transaction from the iterator before we can
// continue
best_txs.mark_invalid(&pool_tx);
continue;
continue
}

// check if the job was cancelled, if so we can exit early
Expand Down
3 changes: 0 additions & 3 deletions examples/custom-engine-types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,3 @@ eyre.workspace = true
tokio.workspace = true
thiserror.workspace = true
serde.workspace = true

[features]
gwyneth = []
1 change: 0 additions & 1 deletion examples/custom-engine-types/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,6 @@ impl PayloadTypes for CustomEngineTypes {
type BuiltPayload = EthBuiltPayload;
type PayloadAttributes = CustomPayloadAttributes;
type PayloadBuilderAttributes = CustomPayloadBuilderAttributes;
// #[cfg(feature = "gwyneth")]
type SyncProvider = ();
}

Expand Down
10 changes: 5 additions & 5 deletions examples/custom-evm/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use reth::{
handler::register::EvmHandler,
inspector_handle_register,
precompile::{Precompile, PrecompileOutput, PrecompileSpecId},
ContextPrecompiles, Evm, EvmBuilder, GetInspector, SyncDatabase,
ContextPrecompiles, Evm, EvmBuilder, GetInspector, SyncDatabase as Database,
},
tasks::TaskManager,
};
Expand Down Expand Up @@ -47,7 +47,7 @@ impl MyEvmConfig {
/// This will use the default mainnet precompiles and add additional precompiles.
pub fn set_precompiles<EXT, DB>(handler: &mut EvmHandler<EXT, DB>)
where
DB: SyncDatabase,
DB: Database,
{
// first we need the evm spec id, which determines the precompiles
let spec_id = handler.cfg.spec_id;
Expand Down Expand Up @@ -112,7 +112,7 @@ impl ConfigureEvmEnv for MyEvmConfig {
impl ConfigureEvm for MyEvmConfig {
type DefaultExternalContext<'a> = ();

fn evm<DB: SyncDatabase>(&self, db: DB) -> Evm<'_, Self::DefaultExternalContext<'_>, DB> {
fn evm<DB: Database>(&self, db: DB) -> Evm<'_, Self::DefaultExternalContext<'_>, DB> {
EvmBuilder::default()
.with_db(db)
// add additional precompiles
Expand All @@ -122,7 +122,7 @@ impl ConfigureEvm for MyEvmConfig {

fn evm_with_inspector<DB, I>(&self, db: DB, inspector: I) -> Evm<'_, I, DB>
where
DB: SyncDatabase,
DB: Database,
I: GetInspector<DB>,
{
EvmBuilder::default()
Expand Down Expand Up @@ -197,4 +197,4 @@ async fn main() -> eyre::Result<()> {
println!("Node started");

handle.node_exit_future.await
}
}
10 changes: 5 additions & 5 deletions examples/stateful-precompile/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use reth::{
handler::register::EvmHandler,
inspector_handle_register,
precompile::{Precompile, PrecompileSpecId},
ContextPrecompile, ContextPrecompiles, Evm, EvmBuilder, GetInspector, SyncDatabase,
ContextPrecompile, ContextPrecompiles, Evm, EvmBuilder, GetInspector, SyncDatabase as Database,
},
tasks::TaskManager,
};
Expand Down Expand Up @@ -67,7 +67,7 @@ impl MyEvmConfig {
handler: &mut EvmHandler<EXT, DB>,
cache: Arc<RwLock<PrecompileCache>>,
) where
DB: SyncDatabase,
DB: Database,
{
// first we need the evm spec id, which determines the precompiles
let spec_id = handler.cfg.spec_id;
Expand Down Expand Up @@ -96,7 +96,7 @@ impl MyEvmConfig {
cache: Arc<RwLock<LruMap<(Bytes, u64), PrecompileResult>>>,
) -> ContextPrecompile<DB>
where
DB: SyncDatabase,
DB: Database,
{
let ContextPrecompile::Ordinary(precompile) = precompile else {
// context stateful precompiles are not supported, due to lifetime issues or skill
Expand Down Expand Up @@ -166,7 +166,7 @@ impl ConfigureEvmEnv for MyEvmConfig {
impl ConfigureEvm for MyEvmConfig {
type DefaultExternalContext<'a> = ();

fn evm<DB: SyncDatabase>(&self, db: DB) -> Evm<'_, Self::DefaultExternalContext<'_>, DB> {
fn evm<DB: Database>(&self, db: DB) -> Evm<'_, Self::DefaultExternalContext<'_>, DB> {
let new_cache = self.precompile_cache.clone();
EvmBuilder::default()
.with_db(db)
Expand All @@ -179,7 +179,7 @@ impl ConfigureEvm for MyEvmConfig {

fn evm_with_inspector<DB, I>(&self, db: DB, inspector: I) -> Evm<'_, I, DB>
where
DB: SyncDatabase,
DB: Database,
I: GetInspector<DB>,
{
let new_cache = self.precompile_cache.clone();
Expand Down

0 comments on commit 88d055d

Please sign in to comment.