Remove execution dependency from core module in consensus/types (#8666)

#8652


  This moves the `ExecutionBlockHash` from the `execution` module to the `core` module. This allows `core` to not depend on the `execution` module, and the `ExecutionBlockHash` is a pretty core  part of our types so I think it makes sense.


Co-Authored-By: Mac L <mjladson@pm.me>
This commit is contained in:
Mac L
2026-01-16 11:53:13 +04:00
committed by GitHub
parent 3903e1c67f
commit d099ad56fb
7 changed files with 9 additions and 12 deletions

View File

@@ -14,10 +14,9 @@ use tree_hash::TreeHash;
use crate::{
core::{
APPLICATION_DOMAIN_BUILDER, Address, ApplicationDomain, EnrForkId, Epoch, EthSpec,
EthSpecId, Hash256, MainnetEthSpec, Slot, Uint256,
EthSpecId, ExecutionBlockHash, Hash256, MainnetEthSpec, Slot, Uint256,
},
data::{BlobIdentifier, DataColumnSubnetId, DataColumnsByRootIdentifier},
execution::ExecutionBlockHash,
fork::{Fork, ForkData, ForkName},
};

View File

@@ -5,6 +5,7 @@ mod chain_spec;
mod config_and_preset;
mod enr_fork_id;
mod eth_spec;
mod execution_block_hash;
mod graffiti;
mod non_zero_usize;
mod preset;
@@ -25,6 +26,7 @@ pub use config_and_preset::{
};
pub use enr_fork_id::EnrForkId;
pub use eth_spec::{EthSpec, EthSpecId, GNOSIS, GnosisEthSpec, MainnetEthSpec, MinimalEthSpec};
pub use execution_block_hash::ExecutionBlockHash;
pub use graffiti::{GRAFFITI_BYTES_LEN, Graffiti, GraffitiString};
pub use non_zero_usize::new_non_zero_usize;
pub use preset::{

View File

@@ -10,8 +10,7 @@ use test_random_derive::TestRandom;
use tree_hash_derive::TreeHash;
use crate::{
core::{Address, EthSpec, Hash256},
execution::ExecutionBlockHash,
core::{Address, EthSpec, ExecutionBlockHash, Hash256},
fork::{ForkName, ForkVersionDecode},
state::BeaconStateError,
test_utils::TestRandom,

View File

@@ -11,11 +11,10 @@ use tree_hash::TreeHash;
use tree_hash_derive::TreeHash;
use crate::{
core::{Address, EthSpec, Hash256, Uint256},
core::{Address, EthSpec, ExecutionBlockHash, Hash256, Uint256},
execution::{
ExecutionBlockHash, ExecutionPayloadBellatrix, ExecutionPayloadCapella,
ExecutionPayloadDeneb, ExecutionPayloadElectra, ExecutionPayloadFulu, ExecutionPayloadRef,
Transactions,
ExecutionPayloadBellatrix, ExecutionPayloadCapella, ExecutionPayloadDeneb,
ExecutionPayloadElectra, ExecutionPayloadFulu, ExecutionPayloadRef, Transactions,
},
fork::ForkName,
map_execution_payload_ref_into_execution_payload_header,

View File

@@ -1,5 +1,4 @@
mod eth1_data;
mod execution_block_hash;
mod execution_block_header;
#[macro_use]
mod execution_payload;
@@ -16,7 +15,6 @@ mod signed_execution_payload_envelope;
pub use bls_to_execution_change::BlsToExecutionChange;
pub use eth1_data::Eth1Data;
pub use execution_block_hash::ExecutionBlockHash;
pub use execution_block_header::{EncodableExecutionBlockHeader, ExecutionBlockHeader};
pub use execution_payload::{
ExecutionPayload, ExecutionPayloadBellatrix, ExecutionPayloadCapella, ExecutionPayloadDeneb,

View File

@@ -11,9 +11,9 @@ use tree_hash::TreeHash;
use tree_hash_derive::TreeHash;
use crate::{
core::{Address, EthSpec, Hash256},
core::{Address, EthSpec, ExecutionBlockHash, Hash256},
execution::{
ExecutionBlockHash, ExecutionPayload, ExecutionPayloadBellatrix, ExecutionPayloadCapella,
ExecutionPayload, ExecutionPayloadBellatrix, ExecutionPayloadCapella,
ExecutionPayloadDeneb, ExecutionPayloadElectra, ExecutionPayloadFulu,
ExecutionPayloadHeader, ExecutionPayloadHeaderBellatrix, ExecutionPayloadHeaderCapella,
ExecutionPayloadHeaderDeneb, ExecutionPayloadHeaderElectra, ExecutionPayloadHeaderFulu,