chore: rm reth-primitives from engine api crate (#14324)

This commit is contained in:
Matthias Seitz
2025-02-08 08:17:56 +01:00
committed by GitHub
parent 7603b74890
commit dbf4e23e63
4 changed files with 9 additions and 13 deletions

3
Cargo.lock generated
View File

@ -9013,18 +9013,17 @@ dependencies = [
"reth-chainspec", "reth-chainspec",
"reth-engine-primitives", "reth-engine-primitives",
"reth-ethereum-engine-primitives", "reth-ethereum-engine-primitives",
"reth-ethereum-primitives",
"reth-metrics", "reth-metrics",
"reth-payload-builder", "reth-payload-builder",
"reth-payload-builder-primitives", "reth-payload-builder-primitives",
"reth-payload-primitives", "reth-payload-primitives",
"reth-primitives",
"reth-primitives-traits", "reth-primitives-traits",
"reth-provider", "reth-provider",
"reth-rpc-api", "reth-rpc-api",
"reth-storage-api", "reth-storage-api",
"reth-tasks", "reth-tasks",
"reth-testing-utils", "reth-testing-utils",
"reth-tokio-util",
"reth-transaction-pool", "reth-transaction-pool",
"serde", "serde",
"thiserror 2.0.11", "thiserror 2.0.11",

View File

@ -48,10 +48,9 @@ parking_lot.workspace = true
[dev-dependencies] [dev-dependencies]
reth-ethereum-engine-primitives.workspace = true reth-ethereum-engine-primitives.workspace = true
reth-provider = { workspace = true, features = ["test-utils"] } reth-provider = { workspace = true, features = ["test-utils"] }
reth-primitives.workspace = true reth-ethereum-primitives.workspace = true
reth-primitives-traits.workspace = true reth-primitives-traits.workspace = true
reth-payload-builder = { workspace = true, features = ["test-utils"] } reth-payload-builder = { workspace = true, features = ["test-utils"] }
reth-tokio-util.workspace = true
reth-testing-utils.workspace = true reth-testing-utils.workspace = true
alloy-rlp.workspace = true alloy-rlp.workspace = true

View File

@ -1049,8 +1049,8 @@ mod tests {
use reth_chainspec::{ChainSpec, EthereumHardfork, MAINNET}; use reth_chainspec::{ChainSpec, EthereumHardfork, MAINNET};
use reth_engine_primitives::BeaconEngineMessage; use reth_engine_primitives::BeaconEngineMessage;
use reth_ethereum_engine_primitives::{EthEngineTypes, EthereumEngineValidator}; use reth_ethereum_engine_primitives::{EthEngineTypes, EthereumEngineValidator};
use reth_ethereum_primitives::Block;
use reth_payload_builder::test_utils::spawn_test_payload_service; use reth_payload_builder::test_utils::spawn_test_payload_service;
use reth_primitives::{Block, TransactionSigned};
use reth_provider::test_utils::MockEthProvider; use reth_provider::test_utils::MockEthProvider;
use reth_tasks::TokioTaskExecutor; use reth_tasks::TokioTaskExecutor;
use reth_testing_utils::generators::random_block; use reth_testing_utils::generators::random_block;
@ -1118,11 +1118,9 @@ mod tests {
let (mut handle, api) = setup_engine_api(); let (mut handle, api) = setup_engine_api();
tokio::spawn(async move { tokio::spawn(async move {
api.new_payload_v1(ExecutionPayloadV1::from_block_slow( api.new_payload_v1(ExecutionPayloadV1::from_block_slow(&Block::default()))
&Block::<TransactionSigned>::default(), .await
)) .unwrap();
.await
.unwrap();
}); });
assert_matches!(handle.from_api.recv().await, Some(BeaconEngineMessage::NewPayload { .. })); assert_matches!(handle.from_api.recv().await, Some(BeaconEngineMessage::NewPayload { .. }));
} }

View File

@ -8,13 +8,13 @@ use alloy_rpc_types_engine::{
PayloadError, PayloadError,
}; };
use assert_matches::assert_matches; use assert_matches::assert_matches;
use reth_primitives::{Block, SealedBlock, TransactionSigned}; use reth_ethereum_primitives::{Block, TransactionSigned};
use reth_primitives_traits::proofs; use reth_primitives_traits::{proofs, SealedBlock};
use reth_testing_utils::generators::{ use reth_testing_utils::generators::{
self, random_block, random_block_range, BlockParams, BlockRangeParams, Rng, self, random_block, random_block_range, BlockParams, BlockRangeParams, Rng,
}; };
fn transform_block<F: FnOnce(Block) -> Block>(src: SealedBlock, f: F) -> ExecutionPayload { fn transform_block<F: FnOnce(Block) -> Block>(src: SealedBlock<Block>, f: F) -> ExecutionPayload {
let unsealed = src.into_block(); let unsealed = src.into_block();
let mut transformed: Block = f(unsealed); let mut transformed: Block = f(unsealed);
// Recalculate roots // Recalculate roots