From 285dbf43edd6c7022a87b2f60ea7240c3920b7ad Mon Sep 17 00:00:00 2001 From: Marius van der Wijden Date: Sun, 18 Sep 2022 11:34:46 +0200 Subject: [PATCH] hacky hacks --- beacon_node/network/src/status.rs | 2 +- consensus/types/src/chain_spec.rs | 6 +++--- consensus/types/src/payload.rs | 15 ++------------- 3 files changed, 6 insertions(+), 17 deletions(-) diff --git a/beacon_node/network/src/status.rs b/beacon_node/network/src/status.rs index 865f8ee933..27689a7416 100644 --- a/beacon_node/network/src/status.rs +++ b/beacon_node/network/src/status.rs @@ -18,7 +18,7 @@ impl ToStatusMessage for BeaconChain { /// Build a `StatusMessage` representing the state of the given `beacon_chain`. pub(crate) fn status_message(beacon_chain: &BeaconChain) -> StatusMessage { - let fork_digest = beacon_chain.enr_fork_id().fork_digest; + let fork_digest = [0x9c, 0x67, 0x11, 0x28]; let cached_head = beacon_chain.canonical_head.cached_head(); let mut finalized_checkpoint = cached_head.finalized_checkpoint(); diff --git a/consensus/types/src/chain_spec.rs b/consensus/types/src/chain_spec.rs index b894bef12e..9e3d40c997 100644 --- a/consensus/types/src/chain_spec.rs +++ b/consensus/types/src/chain_spec.rs @@ -560,7 +560,7 @@ impl ChainSpec { domain_sync_committee: 7, domain_sync_committee_selection_proof: 8, domain_contribution_and_proof: 9, - altair_fork_version: [0x01, 0x00, 0x00, 0x00], + altair_fork_version: [0x01, 0x00, 0x0f, 0xfd], altair_fork_epoch: Some(Epoch::new(74240)), /* @@ -571,7 +571,7 @@ impl ChainSpec { min_slashing_penalty_quotient_bellatrix: u64::checked_pow(2, 5) .expect("pow does not overflow"), proportional_slashing_multiplier_bellatrix: 3, - bellatrix_fork_version: [0x02, 0x00, 0x00, 0x00], + bellatrix_fork_version: [0x02, 0x00, 0x0f, 0xfd], bellatrix_fork_epoch: Some(Epoch::new(144896)), terminal_total_difficulty: Uint256::from_dec_str("58750000000000000000000") .expect("terminal_total_difficulty is a valid integer"), @@ -583,7 +583,7 @@ impl ChainSpec { * Eip4844 hard fork params */ eip4844_fork_epoch: None, - eip4844_fork_version: [0x03, 0x00, 0x00, 0x00], + eip4844_fork_version: [0x83, 0x00, 0x0f, 0xfd], /* * Network specific diff --git a/consensus/types/src/payload.rs b/consensus/types/src/payload.rs index 23db2d961f..6f4e3a39e6 100644 --- a/consensus/types/src/payload.rs +++ b/consensus/types/src/payload.rs @@ -227,7 +227,8 @@ impl Encode for BlindedPayload { } } -#[derive(Default, Debug, Clone, Serialize, Deserialize)] +#[derive(Default, Debug, Clone, Serialize, Deserialize, Derivative)] +#[derivative(PartialEq, Hash(bound = "T: EthSpec"))] #[serde(bound = "T: EthSpec")] pub struct FullPayload { pub execution_payload: ExecutionPayload @@ -239,18 +240,6 @@ impl TestRandom for FullPayload { } } -impl PartialEq for FullPayload { - fn eq(&self, other: &FullPayload) -> bool { - todo!() - } -} - -impl Hash for FullPayload { - fn hash(&self, into: &mut H) { - todo!() - } -} - impl From> for FullPayload { fn from(execution_payload: ExecutionPayload) -> Self { Self {