Add Electra fork boilerplate (#5122)

* Add Electra fork boilerplate

* Remove electra from spec tests

* Fix tests

* Remove sneaky log file

* Fix more tests

* Fix even more tests and add suggestions

* Remove unrelated lcli addition

* Update more tests

* Merge branch 'unstable' into electra

* Add comment for test-suite lcli override

* Merge branch 'unstable' into electra

* Cleanup

* Merge branch 'unstable' into electra

* Apply suggestions

* Merge branch 'unstable' into electra

* Merge sigp/unstable into electra

* Merge branch 'unstable' into electra
This commit is contained in:
Mac L
2024-04-02 23:35:02 +11:00
committed by GitHub
parent 3058b96f25
commit f8fdb71f50
105 changed files with 2079 additions and 405 deletions

View File

@@ -306,6 +306,14 @@ impl<E: EthSpec> CandidateBeaconNode<E> {
"endpoint_deneb_fork_epoch" => ?beacon_node_spec.deneb_fork_epoch,
"hint" => UPDATE_REQUIRED_LOG_HINT,
);
} else if beacon_node_spec.electra_fork_epoch != spec.electra_fork_epoch {
warn!(
log,
"Beacon node has mismatched Electra fork epoch";
"endpoint" => %self.beacon_node,
"endpoint_electra_fork_epoch" => ?beacon_node_spec.electra_fork_epoch,
"hint" => UPDATE_REQUIRED_LOG_HINT,
);
}
Ok(())

View File

@@ -250,9 +250,9 @@ impl ApiTester {
pub async fn test_get_lighthouse_spec(self) -> Self {
let result = self
.client
.get_lighthouse_spec::<ConfigAndPresetCapella>()
.get_lighthouse_spec::<ConfigAndPresetElectra>()
.await
.map(|res| ConfigAndPreset::Capella(res.data))
.map(|res| ConfigAndPreset::Electra(res.data))
.unwrap();
let expected = ConfigAndPreset::from_chain_spec::<E>(&E::default_spec(), None);

View File

@@ -210,9 +210,9 @@ impl ApiTester {
pub async fn test_get_lighthouse_spec(self) -> Self {
let result = self
.client
.get_lighthouse_spec::<ConfigAndPresetDeneb>()
.get_lighthouse_spec::<ConfigAndPresetElectra>()
.await
.map(|res| ConfigAndPreset::Deneb(res.data))
.map(|res| ConfigAndPreset::Electra(res.data))
.unwrap();
let expected = ConfigAndPreset::from_chain_spec::<E>(&E::default_spec(), None);

View File

@@ -28,6 +28,7 @@ pub enum ForkName {
Bellatrix,
Capella,
Deneb,
Electra,
}
#[derive(Debug, PartialEq, Serialize)]
@@ -101,6 +102,11 @@ impl<'a, T: EthSpec, Payload: AbstractExecPayload<T>> Web3SignerObject<'a, T, Pa
block: None,
block_header: Some(block.block_header()),
}),
BeaconBlock::Electra(_) => Ok(Web3SignerObject::BeaconBlock {
version: ForkName::Electra,
block: None,
block_header: Some(block.block_header()),
}),
}
}

View File

@@ -369,7 +369,7 @@ impl<T: SlotClock + 'static, E: EthSpec> ValidatorStore<T, E> {
}
}
// EIP-7044
ForkName::Deneb => SigningContext {
ForkName::Deneb | ForkName::Electra => SigningContext {
domain,
epoch: signing_epoch,
fork: Fork {