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

feat: remove bmpt #125

Merged
merged 6 commits into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
chore: ungate examples
Signed-off-by: Gregory Edison <gregory.edison1993@gmail.com>
  • Loading branch information
greged93 committed Jan 8, 2025
commit 62219eaeaebce2fb6a1dad47562368d14c9446af
3 changes: 0 additions & 3 deletions examples/beacon-api-sidecar-fetcher/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,3 @@ reqwest.workspace = true
serde_json.workspace = true
serde.workspace = true
thiserror.workspace = true

[features]
scroll = []
3 changes: 0 additions & 3 deletions examples/beacon-api-sidecar-fetcher/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@
//! See beacon Node API: <https://ethereum.github.io/beacon-APIs/>

#![cfg_attr(not(test), warn(unused_crate_dependencies))]
// Don't use the crate if `scroll` feature is used.
#![cfg_attr(feature = "scroll", allow(unused_crate_dependencies))]
#![cfg(not(feature = "scroll"))]

use std::{
collections::VecDeque,
Expand Down
3 changes: 0 additions & 3 deletions examples/beacon-api-sse/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,3 @@ futures-util.workspace = true
mev-share-sse = { version = "0.4.0", default-features = false }
tokio = { workspace = true, features = ["time"] }
tracing.workspace = true

[features]
scroll = []
3 changes: 0 additions & 3 deletions examples/beacon-api-sse/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
//! See lighthouse beacon Node API: <https://lighthouse-book.sigmaprime.io/api-bn.html#beacon-node-api>

#![cfg_attr(not(test), warn(unused_crate_dependencies))]
// Don't use the crate if `scroll` feature is used.
#![cfg_attr(feature = "scroll", allow(unused_crate_dependencies))]
#![cfg(not(feature = "scroll"))]

use alloy_rpc_types_beacon::events::PayloadAttributesEvent;
use clap::Parser;
Expand Down
3 changes: 0 additions & 3 deletions examples/custom-beacon-withdrawals/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ reth-chainspec.workspace = true
reth-evm.workspace = true
reth-primitives.workspace = true

# scroll
reth-scroll-execution.workspace = true

# ethereum
revm.workspace = true

Expand Down
15 changes: 1 addition & 14 deletions examples/custom-beacon-withdrawals/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ use reth::{
revm::{
interpreter::Host,
primitives::{address, Address, Bytes, Env, EnvWithHandlerCfg, TransactTo, TxEnv, U256},
shared::BundleState,
Database, DatabaseCommit, Evm, State,
},
};
Expand All @@ -34,8 +33,6 @@ use reth_evm::{
use reth_evm_ethereum::EthEvmConfig;
use reth_node_ethereum::{node::EthereumAddOns, BasicBlockExecutorProvider, EthereumNode};
use reth_primitives::{BlockWithSenders, EthPrimitives, Receipt};
use reth_scroll_execution::FinalizeExecution;
use revm::db::states::bundle_state::BundleRetention;
use std::{fmt::Display, sync::Arc};

pub const SYSTEM_ADDRESS: Address = address!("fffffffffffffffffffffffffffffffffffffffe");
Expand Down Expand Up @@ -98,15 +95,11 @@ pub struct CustomExecutorStrategyFactory {

impl BlockExecutionStrategyFactory for CustomExecutorStrategyFactory {
type Primitives = EthPrimitives;
type Strategy<DB: Database<Error: Into<ProviderError> + Display>>
= CustomExecutorStrategy<DB>
where
State<DB>: FinalizeExecution<Output = BundleState>;
type Strategy<DB: Database<Error: Into<ProviderError> + Display>> = CustomExecutorStrategy<DB>;

fn create_strategy<DB>(&self, db: DB) -> Self::Strategy<DB>
where
DB: Database<Error: Into<ProviderError> + Display>,
State<DB>: FinalizeExecution<Output = BundleState>,
{
let state =
State::builder().with_database(db).with_bundle_update().without_state_clear().build();
Expand Down Expand Up @@ -149,7 +142,6 @@ where
impl<DB> BlockExecutionStrategy for CustomExecutorStrategy<DB>
where
DB: Database<Error: Into<ProviderError> + Display>,
State<DB>: FinalizeExecution<Output = BundleState>,
{
type DB = DB;
type Primitives = EthPrimitives;
Expand Down Expand Up @@ -193,11 +185,6 @@ where
fn state_mut(&mut self) -> &mut State<DB> {
&mut self.state
}

fn finish(&mut self) -> BundleState {
self.state_mut().merge_transitions(BundleRetention::Reverts);
self.state_mut().finalize()
}
}

sol!(
Expand Down
3 changes: 0 additions & 3 deletions examples/custom-dev-node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,3 @@ serde_json.workspace = true

alloy-genesis.workspace = true
alloy-primitives.workspace = true

[features]
scroll = []
3 changes: 0 additions & 3 deletions examples/custom-dev-node/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
//! through rpc.

#![cfg_attr(not(test), warn(unused_crate_dependencies))]
// Don't use the crate if `scroll` feature is used.
#![cfg_attr(feature = "scroll", allow(unused_crate_dependencies))]
#![cfg(not(feature = "scroll"))]

use std::sync::Arc;

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 @@ -25,6 +25,3 @@ eyre.workspace = true
tokio.workspace = true
thiserror.workspace = true
serde.workspace = true

[features]
scroll = []
3 changes: 0 additions & 3 deletions examples/custom-engine-types/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
//! implemented:

#![cfg_attr(not(test), warn(unused_crate_dependencies))]
// Don't use the crate if `scroll` feature is used.
#![cfg_attr(feature = "scroll", allow(unused_crate_dependencies))]
#![cfg(not(feature = "scroll"))]

use alloy_eips::eip4895::Withdrawals;
use alloy_genesis::Genesis;
Expand Down
3 changes: 0 additions & 3 deletions examples/custom-evm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,3 @@ alloy-consensus.workspace = true

eyre.workspace = true
tokio.workspace = true

[features]
scroll = []
3 changes: 0 additions & 3 deletions examples/custom-evm/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
//! This example shows how to implement a node with a custom EVM

#![cfg_attr(not(test), warn(unused_crate_dependencies))]
// Don't use the crate if `scroll` feature is used.
#![cfg_attr(feature = "scroll", allow(unused_crate_dependencies))]
#![cfg(not(feature = "scroll"))]

use alloy_consensus::Header;
use alloy_genesis::Genesis;
Expand Down
3 changes: 0 additions & 3 deletions examples/custom-inspector/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,3 @@ futures-util.workspace = true
alloy-primitives.workspace = true

alloy-eips.workspace = true

[features]
scroll = []
3 changes: 0 additions & 3 deletions examples/custom-inspector/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
//! If no recipients are specified, all transactions will be inspected.

#![cfg_attr(not(test), warn(unused_crate_dependencies))]
// Don't use the crate if `scroll` feature is used.
#![cfg_attr(feature = "scroll", allow(unused_crate_dependencies))]
#![cfg(not(feature = "scroll"))]

use alloy_eips::BlockNumberOrTag;
use alloy_primitives::Address;
Expand Down
3 changes: 0 additions & 3 deletions examples/custom-node-components/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,3 @@ reth-transaction-pool.workspace = true
reth-tracing.workspace = true

eyre.workspace = true

[features]
scroll = []
3 changes: 0 additions & 3 deletions examples/custom-node-components/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
//! This example shows how to configure custom components for a reth node.

#![cfg_attr(not(test), warn(unused_crate_dependencies))]
// Don't use the crate if `scroll` feature is used.
#![cfg_attr(feature = "scroll", allow(unused_crate_dependencies))]
#![cfg(not(feature = "scroll"))]

use reth::{
api::NodeTypes,
Expand Down
3 changes: 0 additions & 3 deletions examples/custom-payload-builder/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,3 @@ alloy-eips.workspace = true
tracing.workspace = true
futures-util.workspace = true
eyre.workspace = true

[features]
scroll = []
3 changes: 0 additions & 3 deletions examples/custom-payload-builder/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@
//! This launch the regular reth node overriding the engine api payload builder with our custom.

#![cfg_attr(not(test), warn(unused_crate_dependencies))]
// Don't use the crate if `scroll` feature is used.
#![cfg_attr(feature = "scroll", allow(unused_crate_dependencies))]
#![cfg(not(feature = "scroll"))]

use generator::EmptyBlockPayloadJobGenerator;
use reth::{
Expand Down
3 changes: 0 additions & 3 deletions examples/custom-rlpx-subprotocol/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,3 @@ eyre.workspace = true
rand.workspace = true
tracing.workspace = true
alloy-primitives.workspace = true

[features]
scroll = []
4 changes: 0 additions & 4 deletions examples/custom-rlpx-subprotocol/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@
//!
//! This launch a regular reth node with a custom rlpx subprotocol.

// Don't use the crate if `scroll` feature is used.
#![cfg_attr(feature = "scroll", allow(unused_crate_dependencies))]
#![cfg(not(feature = "scroll"))]

mod subprotocol;

use std::net::{Ipv4Addr, SocketAddr, SocketAddrV4};
Expand Down
3 changes: 0 additions & 3 deletions examples/db-access/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,3 @@ alloy-primitives.workspace = true


eyre.workspace = true

[features]
scroll = []
4 changes: 0 additions & 4 deletions examples/db-access/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
// Don't use the crate if `scroll` feature is used.
#![cfg_attr(feature = "scroll", allow(unused_crate_dependencies))]
#![cfg(not(feature = "scroll"))]

use alloy_consensus::BlockHeader;
use alloy_primitives::{Address, B256};
use alloy_rpc_types_eth::{Filter, FilteredParams};
Expand Down
3 changes: 0 additions & 3 deletions examples/node-custom-rpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,3 @@ jsonrpsee = { workspace = true, features = ["server", "macros"] }

[dev-dependencies]
tokio.workspace = true

[features]
scroll = []
4 changes: 0 additions & 4 deletions examples/node-custom-rpc/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@
//! cast rpc txpoolExt_transactionCount
//! ```

// Don't use the crate if `scroll` feature is used.
#![cfg_attr(feature = "scroll", allow(unused_crate_dependencies))]
#![cfg(not(feature = "scroll"))]

use clap::Parser;
use jsonrpsee::{core::RpcResult, proc_macros::rpc};
use reth::{chainspec::EthereumChainSpecParser, cli::Cli};
Expand Down
3 changes: 0 additions & 3 deletions examples/node-event-hooks/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,3 @@ license.workspace = true
[dependencies]
reth.workspace = true
reth-node-ethereum.workspace = true

[features]
scroll = []
4 changes: 0 additions & 4 deletions examples/node-event-hooks/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@
//! > "All components initialized" – once all components have been initialized
//! > "Node started" – once the node has been started.

// Don't use the crate if `scroll` feature is used.
#![cfg_attr(feature = "scroll", allow(unused_crate_dependencies))]
#![cfg(not(feature = "scroll"))]

use reth::cli::Cli;
use reth_node_ethereum::EthereumNode;

Expand Down
3 changes: 0 additions & 3 deletions examples/rpc-db/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,3 @@ reth-node-ethereum.workspace = true
reth-provider = { workspace = true, features = ["test-utils"] }
tokio = { workspace = true, features = ["full"] }
eyre.workspace = true

[features]
scroll = []
4 changes: 0 additions & 4 deletions examples/rpc-db/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@
//! cast rpc myrpcExt_customMethod
//! ```

// Don't use the crate if `scroll` feature is used.
#![cfg_attr(feature = "scroll", allow(unused_crate_dependencies))]
#![cfg(not(feature = "scroll"))]

use std::{path::Path, sync::Arc};

use reth::{
Expand Down
3 changes: 0 additions & 3 deletions examples/stateful-precompile/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,3 @@ eyre.workspace = true
parking_lot.workspace = true
schnellru.workspace = true
tokio.workspace = true

[features]
scroll = []
3 changes: 0 additions & 3 deletions examples/stateful-precompile/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
//! This example shows how to implement a node with a custom EVM that uses a stateful precompile

#![cfg_attr(not(test), warn(unused_crate_dependencies))]
// Don't use the crate if `scroll` feature is used.
#![cfg_attr(feature = "scroll", allow(unused_crate_dependencies))]
#![cfg(not(feature = "scroll"))]

use alloy_consensus::Header;
use alloy_genesis::Genesis;
Expand Down
3 changes: 0 additions & 3 deletions examples/txpool-tracing/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,3 @@ alloy-rpc-types-trace.workspace = true
clap = { workspace = true, features = ["derive"] }
futures-util.workspace = true
alloy-primitives.workspace = true

[features]
scroll = []
3 changes: 0 additions & 3 deletions examples/txpool-tracing/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
//! If no recipients are specified, all transactions will be traced.

#![cfg_attr(not(test), warn(unused_crate_dependencies))]
// Don't use the crate if `scroll` feature is used.
#![cfg_attr(feature = "scroll", allow(unused_crate_dependencies))]
#![cfg(not(feature = "scroll"))]

use alloy_primitives::Address;
use alloy_rpc_types_trace::{parity::TraceType, tracerequest::TraceCallRequest};
Expand Down