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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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