Remove remaining facade module re-exports from consensus/types (#8672)

Removes the remaining facade re-exports from `consensus/types`.
I have left `graffiti` as I think it has some utility so am leaning towards keeping it in the final API design.


Co-Authored-By: Mac L <mjladson@pm.me>
This commit is contained in:
Mac L
2026-01-16 23:51:29 +04:00
committed by GitHub
parent d099ad56fb
commit 58b153cac5
39 changed files with 59 additions and 116 deletions

View File

@@ -6,7 +6,7 @@ use tree_hash::Hash256;
use typenum::Unsigned;
use types::{
BeaconBlockBody, BeaconBlockBodyCapella, BeaconBlockBodyDeneb, BeaconBlockBodyElectra,
BeaconBlockBodyFulu, BeaconBlockBodyGloas, BeaconState, FullPayload, light_client_update,
BeaconBlockBodyFulu, BeaconBlockBodyGloas, BeaconState, FullPayload, light_client,
};
#[derive(Debug, Clone, Deserialize)]
@@ -97,16 +97,16 @@ impl<E: EthSpec> Case for BeaconStateMerkleProofValidity<E> {
state.update_tree_hash_cache().unwrap();
let proof = match self.merkle_proof.leaf_index {
light_client_update::CURRENT_SYNC_COMMITTEE_INDEX_ELECTRA
| light_client_update::CURRENT_SYNC_COMMITTEE_INDEX => {
light_client::consts::CURRENT_SYNC_COMMITTEE_INDEX_ELECTRA
| light_client::consts::CURRENT_SYNC_COMMITTEE_INDEX => {
state.compute_current_sync_committee_proof()
}
light_client_update::NEXT_SYNC_COMMITTEE_INDEX_ELECTRA
| light_client_update::NEXT_SYNC_COMMITTEE_INDEX => {
light_client::consts::NEXT_SYNC_COMMITTEE_INDEX_ELECTRA
| light_client::consts::NEXT_SYNC_COMMITTEE_INDEX => {
state.compute_next_sync_committee_proof()
}
light_client_update::FINALIZED_ROOT_INDEX_ELECTRA
| light_client_update::FINALIZED_ROOT_INDEX => state.compute_finalized_root_proof(),
light_client::consts::FINALIZED_ROOT_INDEX_ELECTRA
| light_client::consts::FINALIZED_ROOT_INDEX => state.compute_finalized_root_proof(),
_ => {
return Err(Error::FailedToParseTest(
"Could not retrieve merkle proof, invalid index".to_string(),

View File

@@ -1,5 +1,5 @@
//! Mapping from types to canonical string identifiers used in testing.
use types::historical_summary::HistoricalSummary;
use types::state::HistoricalSummary;
use types::*;
pub trait TypeName {

View File

@@ -239,7 +239,7 @@ macro_rules! ssz_static_test_no_run {
#[cfg(feature = "fake_crypto")]
mod ssz_static {
use ef_tests::{Handler, SszStaticHandler, SszStaticTHCHandler, SszStaticWithSpecHandler};
use types::historical_summary::HistoricalSummary;
use types::state::HistoricalSummary;
use types::{
AttesterSlashingBase, AttesterSlashingElectra, ConsolidationRequest, DepositRequest,
LightClientBootstrapAltair, PendingDeposit, PendingPartialWithdrawal, WithdrawalRequest, *,