Skip to content

Commit 02299f7

Browse files
committed
Apply suggestions
1 parent 1089cb5 commit 02299f7

6 files changed

Lines changed: 20 additions & 15 deletions

File tree

beacon_node/beacon_chain/src/electra_readiness.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
8888
}
8989
}
9090
Ok(capabilities) => {
91+
// TODO(electra): Update in the event we get V4s.
9192
let mut missing_methods = String::from("Required Methods Unsupported:");
9293
let mut all_good = true;
9394
if !capabilities.get_payload_v3 {

common/eth2_network_config/built_in_network_configs/chiado/config.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ CAPELLA_FORK_EPOCH: 244224 # Wed May 24 2023 13:12:00 GMT+0000
4646
# Deneb
4747
DENEB_FORK_VERSION: 0x0400006f
4848
DENEB_FORK_EPOCH: 516608 # Wed Jan 31 2024 18:15:40 GMT+0000
49-
49+
# Electra
50+
ELECTRA_FORK_VERSION: 0x0500006f
51+
ELECTRA_FORK_EPOCH: 18446744073709551615
5052

5153
# Time parameters
5254
# ---------------------------------------------------------------

common/eth2_network_config/built_in_network_configs/gnosis/config.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,6 @@ DENEB_FORK_EPOCH: 889856 # 2024-03-11T18:30:20.000Z
4545
# Electra
4646
ELECTRA_FORK_VERSION: 0x05000064
4747
ELECTRA_FORK_EPOCH: 18446744073709551615
48-
# Sharding
49-
SHARDING_FORK_VERSION: 0x03000064
50-
SHARDING_FORK_EPOCH: 18446744073709551615
51-
52-
# TBD, 2**32 is a placeholder. Merge transition approach is in active R&D.
53-
TRANSITION_TOTAL_DIFFICULTY: 4294967296
5448

5549

5650
# Time parameters

common/eth2_network_config/built_in_network_configs/holesky/config.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,15 @@ BELLATRIX_FORK_EPOCH: 0
2828
TERMINAL_TOTAL_DIFFICULTY: 0
2929
TERMINAL_BLOCK_HASH: 0x0000000000000000000000000000000000000000000000000000000000000000
3030
TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH: 18446744073709551615
31-
3231
# Capella
3332
CAPELLA_FORK_VERSION: 0x04017000
3433
CAPELLA_FORK_EPOCH: 256
35-
3634
# Deneb
3735
DENEB_FORK_VERSION: 0x05017000
3836
DENEB_FORK_EPOCH: 29696
37+
# Electra
38+
ELECTRA_FORK_VERSION: 0x06017000
39+
ELECTRA_FORK_EPOCH: 18446744073709551615
3940

4041
# Time parameters
4142
# ---------------------------------------------------------------

scripts/local_testnet/vars.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ ALTAIR_FORK_EPOCH=0
4646
BELLATRIX_FORK_EPOCH=0
4747
CAPELLA_FORK_EPOCH=0
4848
DENEB_FORK_EPOCH=1
49-
ELECTRA_FORK_EPOCH=18446744073709551615
49+
ELECTRA_FORK_EPOCH=9999999
5050

5151
TTD=0
5252

testing/ef_tests/src/cases/merkle_proof_validity.rs

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@ use crate::decode::{ssz_decode_file, ssz_decode_state, yaml_decode_file};
33
use serde::Deserialize;
44
use std::path::Path;
55
use tree_hash::Hash256;
6-
use types::{BeaconBlockBody, BeaconBlockBodyDeneb, BeaconState, EthSpec, ForkName};
6+
use types::{
7+
BeaconBlockBody, BeaconBlockBodyDeneb, BeaconBlockBodyElectra, BeaconState, EthSpec, ForkName,
8+
FullPayload,
9+
};
710

811
#[derive(Debug, Clone, Deserialize)]
912
pub struct Metadata {
@@ -93,15 +96,19 @@ pub struct KzgInclusionMerkleProofValidity<E: EthSpec> {
9396

9497
impl<E: EthSpec> LoadCase for KzgInclusionMerkleProofValidity<E> {
9598
fn load_from_dir(path: &Path, fork_name: ForkName) -> Result<Self, Error> {
96-
let block = match fork_name {
99+
let block: BeaconBlockBody<E, FullPayload<E>> = match fork_name {
97100
ForkName::Base | ForkName::Altair | ForkName::Merge | ForkName::Capella => {
98101
return Err(Error::InternalError(format!(
99102
"KZG inclusion merkle proof validity test skipped for {:?}",
100103
fork_name
101104
)))
102105
}
103-
ForkName::Deneb | ForkName::Electra => {
104-
ssz_decode_file::<BeaconBlockBodyDeneb<E>>(&path.join("object.ssz_snappy"))?
106+
ForkName::Deneb => {
107+
ssz_decode_file::<BeaconBlockBodyDeneb<E>>(&path.join("object.ssz_snappy"))?.into()
108+
}
109+
ForkName::Electra => {
110+
ssz_decode_file::<BeaconBlockBodyElectra<E>>(&path.join("object.ssz_snappy"))?
111+
.into()
105112
}
106113
};
107114
let merkle_proof = yaml_decode_file(&path.join("proof.yaml"))?;
@@ -115,7 +122,7 @@ impl<E: EthSpec> LoadCase for KzgInclusionMerkleProofValidity<E> {
115122

116123
Ok(Self {
117124
metadata,
118-
block: block.into(),
125+
block,
119126
merkle_proof,
120127
})
121128
}

0 commit comments

Comments
 (0)