chore(payload): replace reth_primitives with alloy_primitives (#11030)

Signed-off-by: Abhishekkochar <abhishekkochar2@gmail.com>
This commit is contained in:
Abhishek kochar
2024-09-19 19:23:38 +08:00
committed by GitHub
parent 03e89b1af6
commit f9abc8a35c
11 changed files with 25 additions and 13 deletions

3
Cargo.lock generated
View File

@ -6267,6 +6267,7 @@ dependencies = [
name = "reth-basic-payload-builder"
version = "1.0.7"
dependencies = [
"alloy-primitives",
"alloy-rlp",
"futures-core",
"futures-util",
@ -8076,6 +8077,7 @@ dependencies = [
name = "reth-payload-builder"
version = "1.0.7"
dependencies = [
"alloy-primitives",
"futures-util",
"metrics",
"pin-project",
@ -8098,6 +8100,7 @@ dependencies = [
name = "reth-payload-primitives"
version = "1.0.7"
dependencies = [
"alloy-primitives",
"reth-chain-state",
"reth-chainspec",
"reth-errors",

View File

@ -24,6 +24,7 @@ reth-tasks.workspace = true
# ethereum
alloy-rlp.workspace = true
alloy-primitives.workspace = true
revm.workspace = true
# async

View File

@ -9,6 +9,7 @@
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
use crate::metrics::PayloadBuilderMetrics;
use alloy_primitives::{Bytes, B256, U256};
use futures_core::ready;
use futures_util::FutureExt;
use reth_chainspec::{ChainSpec, EthereumHardforks};
@ -19,7 +20,7 @@ use reth_payload_builder::{
use reth_payload_primitives::{BuiltPayload, PayloadBuilderAttributes};
use reth_primitives::{
constants::{EMPTY_WITHDRAWALS, RETH_CLIENT_VERSION, SLOT_DURATION},
proofs, BlockNumberOrTag, Bytes, SealedBlock, Withdrawals, B256, U256,
proofs, BlockNumberOrTag, SealedBlock, Withdrawals,
};
use reth_provider::{
BlockReaderIdExt, BlockSource, CanonStateNotification, ProviderError, StateProviderFactory,

View File

@ -21,6 +21,9 @@ reth-provider.workspace = true
reth-payload-primitives.workspace = true
reth-ethereum-engine-primitives.workspace = true
# alloy
alloy-primitives.workspace = true
# async
tokio = { workspace = true, features = ["sync"] }
tokio-stream.workspace = true

View File

@ -1,11 +1,8 @@
//! Database adapters for payload building.
use reth_primitives::{
revm_primitives::{
db::{Database, DatabaseRef},
AccountInfo, Address, Bytecode, B256,
},
U256,
use alloy_primitives::{Address, B256, U256};
use reth_primitives::revm_primitives::{
db::{Database, DatabaseRef},
AccountInfo, Bytecode,
};
use std::{
cell::RefCell,

View File

@ -1,7 +1,8 @@
//! Error types emitted by types or implementations of this crate.
use alloy_primitives::B256;
use reth_errors::{ProviderError, RethError};
use reth_primitives::{revm_primitives::EVMError, B256};
use reth_primitives::revm_primitives::EVMError;
use reth_transaction_pool::BlobStoreError;
use tokio::sync::oneshot;

View File

@ -5,8 +5,9 @@ use crate::{
EthPayloadBuilderAttributes, PayloadBuilderHandle, PayloadBuilderService, PayloadJob,
PayloadJobGenerator,
};
use alloy_primitives::U256;
use reth_payload_primitives::PayloadTypes;
use reth_primitives::{Block, U256};
use reth_primitives::Block;
use reth_provider::CanonStateNotification;
use std::{
future::Future,

View File

@ -20,6 +20,9 @@ reth-transaction-pool.workspace = true
reth-rpc-types.workspace = true
reth-chain-state.workspace = true
# alloy
alloy-primitives.workspace = true
# async
tokio = { workspace = true, features = ["sync"] }

View File

@ -1,7 +1,8 @@
//! Error types emitted by types or implementations of this crate.
use alloy_primitives::B256;
use reth_errors::{ProviderError, RethError};
use reth_primitives::{revm_primitives::EVMError, B256};
use reth_primitives::revm_primitives::EVMError;
use reth_transaction_pool::BlobStoreError;
use tokio::sync::oneshot;

View File

@ -1,5 +1,5 @@
use crate::{MessageValidationKind, PayloadAttributes};
use reth_primitives::B256;
use alloy_primitives::B256;
use reth_rpc_types::engine::ExecutionPayload;
/// Either an [`ExecutionPayload`] or a types that implements the [`PayloadAttributes`] trait.

View File

@ -1,9 +1,10 @@
use crate::{
validate_version_specific_fields, EngineApiMessageVersion, EngineObjectValidationError,
};
use alloy_primitives::{Address, B256, U256};
use reth_chain_state::ExecutedBlock;
use reth_chainspec::ChainSpec;
use reth_primitives::{Address, SealedBlock, Withdrawals, B256, U256};
use reth_primitives::{SealedBlock, Withdrawals};
use reth_rpc_types::{
engine::{PayloadAttributes as EthPayloadAttributes, PayloadId},
optimism::OptimismPayloadAttributes,