Skip to content
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
20 changes: 1 addition & 19 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,6 @@ base-flashtypes = { path = "crates/flashtypes" }
base-reth-test-utils = { path = "crates/test-utils" }
base-reth-flashblocks = { path = "crates/flashblocks" }

# base/tips
tips-core = { git = "https://github.com/base/tips", rev = "b1dfde6a5c8f603f19f9309ca6dc015bad260b44" }

# reth
reth = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
reth-ipc = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
Expand Down
4 changes: 1 addition & 3 deletions crates/rpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,9 @@ workspace = true

[dependencies]
# workspace
base-bundles.workspace = true
base-reth-flashblocks.workspace = true

# base/tips
tips-core.workspace = true

# reth
reth.workspace = true
reth-provider.workspace = true
Expand Down
4 changes: 1 addition & 3 deletions crates/rpc/src/base/meter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@ use std::{sync::Arc, time::Instant};

use alloy_consensus::{BlockHeader, Transaction as _, transaction::SignerRecoverable};
use alloy_primitives::{B256, U256};
use base_bundles::{BundleExtensions, BundleTxs, ParsedBundle, TransactionResult};
use eyre::{Result as EyreResult, eyre};
use reth::revm::db::State;
use reth_evm::{ConfigureEvm, execute::BlockBuilder};
use reth_optimism_chainspec::OpChainSpec;
use reth_optimism_evm::{OpEvmConfig, OpNextBlockEnvAttributes};
use reth_primitives_traits::SealedHeader;
use tips_core::types::{BundleExtensions, BundleTxs, ParsedBundle};

use crate::TransactionResult;

const BLOCK_TIME: u64 = 2; // 2 seconds per block

Expand Down
2 changes: 1 addition & 1 deletion crates/rpc/src/base/meter_rpc.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
use alloy_consensus::Header;
use alloy_eips::BlockNumberOrTag;
use alloy_primitives::{B256, U256};
use base_bundles::{Bundle, MeterBundleResponse, ParsedBundle};
use jsonrpsee::core::{RpcResult, async_trait};
use reth::providers::BlockReaderIdExt;
use reth_optimism_chainspec::OpChainSpec;
use reth_optimism_primitives::OpBlock;
use reth_provider::{BlockReader, ChainSpecProvider, HeaderProvider, StateProviderFactory};
use tips_core::types::{Bundle, MeterBundleResponse, ParsedBundle};
use tracing::{error, info};

use super::{
Expand Down
3 changes: 2 additions & 1 deletion crates/rpc/src/base/traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@

use alloy_eips::BlockNumberOrTag;
use alloy_primitives::{B256, TxHash};
use base_bundles::{Bundle, MeterBundleResponse};
use jsonrpsee::{core::RpcResult, proc_macros::rpc};

use crate::{Bundle, MeterBlockResponse, MeterBundleResponse, TransactionStatusResponse};
use crate::{MeterBlockResponse, TransactionStatusResponse};

/// RPC API for transaction metering
#[rpc(server, namespace = "base")]
Expand Down
3 changes: 0 additions & 3 deletions crates/rpc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
#![cfg_attr(not(test), warn(unused_crate_dependencies))]

// Re-export tips core types
pub use tips_core::types::{Bundle, MeterBundleResponse, TransactionResult};

mod base;
pub use base::{
block::meter_block,
Expand Down
2 changes: 1 addition & 1 deletion crates/rpc/tests/meter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ use alloy_consensus::crypto::secp256k1::public_key_to_address;
use alloy_eips::Encodable2718;
use alloy_genesis::GenesisAccount;
use alloy_primitives::{Address, B256, Bytes, U256, keccak256};
use base_bundles::{Bundle, ParsedBundle};
use base_reth_rpc::meter_bundle;
use base_reth_test_utils::create_provider_factory;
use eyre::Context;
Expand All @@ -20,7 +21,6 @@ use reth_primitives_traits::SealedHeader;
use reth_provider::{HeaderProvider, StateProviderFactory, providers::BlockchainProvider};
use reth_testing_utils::generators::generate_keys;
use reth_transaction_pool::test_utils::TransactionBuilder;
use tips_core::types::{Bundle, ParsedBundle};

type NodeTypes = NodeTypesWithDBAdapter<OpNode, Arc<TempDatabase<DatabaseEnv>>>;

Expand Down
4 changes: 2 additions & 2 deletions crates/rpc/tests/meter_rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ use std::{any::Any, net::SocketAddr, sync::Arc};
use alloy_eips::Encodable2718;
use alloy_primitives::{Bytes, U256, address, b256, bytes};
use alloy_rpc_client::RpcClient;
use base_reth_rpc::{MeterBundleResponse, MeteringApiImpl, MeteringApiServer};
use base_bundles::{Bundle, MeterBundleResponse};
use base_reth_rpc::{MeteringApiImpl, MeteringApiServer};
use base_reth_test_utils::{init_silenced_tracing, load_genesis};
use op_alloy_consensus::OpTxEnvelope;
use reth::{
Expand All @@ -20,7 +21,6 @@ use reth_optimism_node::{OpNode, args::RollupArgs};
use reth_optimism_primitives::OpTransactionSigned;
use reth_provider::providers::BlockchainProvider;
use reth_transaction_pool::test_utils::TransactionBuilder;
use tips_core::types::Bundle;

struct NodeContext {
http_api_addr: SocketAddr,
Expand Down