chore: rm reth-interfaces from engine api (#8468)

This commit is contained in:
Matthias Seitz
2024-05-29 15:27:49 +02:00
committed by GitHub
parent 69c65302bf
commit 269e3a9c42
4 changed files with 13 additions and 11 deletions

4
Cargo.lock generated
View File

@ -7875,7 +7875,7 @@ dependencies = [
"reth-beacon-consensus", "reth-beacon-consensus",
"reth-engine-primitives", "reth-engine-primitives",
"reth-ethereum-engine-primitives", "reth-ethereum-engine-primitives",
"reth-interfaces", "reth-evm",
"reth-metrics", "reth-metrics",
"reth-payload-builder", "reth-payload-builder",
"reth-primitives", "reth-primitives",
@ -7883,7 +7883,9 @@ dependencies = [
"reth-rpc-api", "reth-rpc-api",
"reth-rpc-types", "reth-rpc-types",
"reth-rpc-types-compat", "reth-rpc-types-compat",
"reth-storage-api",
"reth-tasks", "reth-tasks",
"reth-testing-utils",
"reth-tokio-util", "reth-tokio-util",
"serde", "serde",
"thiserror", "thiserror",

View File

@ -14,14 +14,15 @@ workspace = true
[dependencies] [dependencies]
# reth # reth
reth-primitives.workspace = true reth-primitives.workspace = true
reth-provider.workspace = true
reth-rpc-types.workspace = true
reth-rpc-api.workspace = true reth-rpc-api.workspace = true
reth-rpc-types.workspace = true
reth-storage-api.workspace = true
reth-beacon-consensus.workspace = true reth-beacon-consensus.workspace = true
reth-payload-builder.workspace = true reth-payload-builder.workspace = true
reth-tasks.workspace = true reth-tasks.workspace = true
reth-rpc-types-compat.workspace = true reth-rpc-types-compat.workspace = true
reth-engine-primitives.workspace = true reth-engine-primitives.workspace = true
reth-evm.workspace = true
# async # async
tokio = { workspace = true, features = ["sync"] } tokio = { workspace = true, features = ["sync"] }
@ -40,10 +41,10 @@ serde.workspace = true
[dev-dependencies] [dev-dependencies]
reth-ethereum-engine-primitives.workspace = true reth-ethereum-engine-primitives.workspace = true
reth-interfaces = { workspace = true, features = ["test-utils"] }
reth-provider = { workspace = true, features = ["test-utils"] } reth-provider = { workspace = true, features = ["test-utils"] }
reth-payload-builder = { workspace = true, features = ["test-utils"] } reth-payload-builder = { workspace = true, features = ["test-utils"] }
reth-tokio-util.workspace = true reth-tokio-util.workspace = true
reth-testing-utils.workspace = true
alloy-rlp.workspace = true alloy-rlp.workspace = true

View File

@ -6,9 +6,9 @@ use reth_engine_primitives::{
validate_payload_timestamp, EngineApiMessageVersion, EngineTypes, PayloadAttributes, validate_payload_timestamp, EngineApiMessageVersion, EngineTypes, PayloadAttributes,
PayloadBuilderAttributes, PayloadOrAttributes, PayloadBuilderAttributes, PayloadOrAttributes,
}; };
use reth_evm::provider::EvmEnvProvider;
use reth_payload_builder::PayloadStore; use reth_payload_builder::PayloadStore;
use reth_primitives::{BlockHash, BlockHashOrNumber, BlockNumber, ChainSpec, Hardfork, B256, U64}; use reth_primitives::{BlockHash, BlockHashOrNumber, BlockNumber, ChainSpec, Hardfork, B256, U64};
use reth_provider::{BlockReader, EvmEnvProvider, HeaderProvider, StateProviderFactory};
use reth_rpc_api::EngineApiServer; use reth_rpc_api::EngineApiServer;
use reth_rpc_types::engine::{ use reth_rpc_types::engine::{
CancunPayloadFields, ClientVersionV1, ExecutionPayload, ExecutionPayloadBodiesV1, CancunPayloadFields, ClientVersionV1, ExecutionPayload, ExecutionPayloadBodiesV1,
@ -19,6 +19,7 @@ use reth_rpc_types::engine::{
use reth_rpc_types_compat::engine::payload::{ use reth_rpc_types_compat::engine::payload::{
convert_payload_input_v2_to_payload, convert_to_payload_body_v1, convert_payload_input_v2_to_payload, convert_to_payload_body_v1,
}; };
use reth_storage_api::{BlockReader, HeaderProvider, StateProviderFactory};
use reth_tasks::TaskSpawner; use reth_tasks::TaskSpawner;
use std::{sync::Arc, time::Instant}; use std::{sync::Arc, time::Instant};
use tokio::sync::oneshot; use tokio::sync::oneshot;
@ -831,7 +832,7 @@ mod tests {
use assert_matches::assert_matches; use assert_matches::assert_matches;
use reth_beacon_consensus::{BeaconConsensusEngineEvent, BeaconEngineMessage}; use reth_beacon_consensus::{BeaconConsensusEngineEvent, BeaconEngineMessage};
use reth_ethereum_engine_primitives::EthEngineTypes; use reth_ethereum_engine_primitives::EthEngineTypes;
use reth_interfaces::test_utils::generators::random_block; use reth_testing_utils::generators::random_block;
use reth_payload_builder::test_utils::spawn_test_payload_service; use reth_payload_builder::test_utils::spawn_test_payload_service;
use reth_primitives::{SealedBlock, B256, MAINNET}; use reth_primitives::{SealedBlock, B256, MAINNET};
@ -903,7 +904,7 @@ mod tests {
// tests covering `engine_getPayloadBodiesByRange` and `engine_getPayloadBodiesByHash` // tests covering `engine_getPayloadBodiesByRange` and `engine_getPayloadBodiesByHash`
mod get_payload_bodies { mod get_payload_bodies {
use super::*; use super::*;
use reth_interfaces::test_utils::{generators, generators::random_block_range}; use reth_testing_utils::{generators, generators::random_block_range};
#[tokio::test] #[tokio::test]
async fn invalid_params() { async fn invalid_params() {
@ -1017,8 +1018,8 @@ mod tests {
// https://github.com/ethereum/execution-apis/blob/main/src/engine/paris.md#specification-3 // https://github.com/ethereum/execution-apis/blob/main/src/engine/paris.md#specification-3
mod exchange_transition_configuration { mod exchange_transition_configuration {
use super::*; use super::*;
use reth_interfaces::test_utils::generators;
use reth_primitives::U256; use reth_primitives::U256;
use reth_testing_utils::generators;
#[tokio::test] #[tokio::test]
async fn terminal_td_mismatch() { async fn terminal_td_mismatch() {

View File

@ -2,9 +2,6 @@
use alloy_rlp::{Decodable, Error as RlpError}; use alloy_rlp::{Decodable, Error as RlpError};
use assert_matches::assert_matches; use assert_matches::assert_matches;
use reth_interfaces::test_utils::generators::{
self, random_block, random_block_range, random_header, Rng,
};
use reth_primitives::{ use reth_primitives::{
bytes::{Bytes, BytesMut}, bytes::{Bytes, BytesMut},
proofs, Block, SealedBlock, TransactionSigned, Withdrawals, B256, U256, proofs, Block, SealedBlock, TransactionSigned, Withdrawals, B256, U256,
@ -16,6 +13,7 @@ use reth_rpc_types_compat::engine::payload::{
block_to_payload, block_to_payload_v1, convert_to_payload_body_v1, try_into_sealed_block, block_to_payload, block_to_payload_v1, convert_to_payload_body_v1, try_into_sealed_block,
try_payload_v1_to_block, try_payload_v1_to_block,
}; };
use reth_testing_utils::generators::{self, random_block, random_block_range, random_header, Rng};
fn transform_block<F: FnOnce(Block) -> Block>(src: SealedBlock, f: F) -> ExecutionPayload { fn transform_block<F: FnOnce(Block) -> Block>(src: SealedBlock, f: F) -> ExecutionPayload {
let unsealed = src.unseal(); let unsealed = src.unseal();