mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-09 11:41:51 +00:00
Add Gloas boilerplate (#7728)
Adds the required boilerplate code for the Gloas (Glamsterdam) hard fork. This allows PRs testing Gloas-candidate features to test fork transition. This also includes de-duplication of post-Bellatrix readiness notifiers from #6797 (credit to @dapplion)
This commit is contained in:
@@ -359,6 +359,13 @@ impl CandidateBeaconNode {
|
||||
hint = UPDATE_REQUIRED_LOG_HINT,
|
||||
"Beacon node has mismatched Fulu fork epoch"
|
||||
);
|
||||
} else if beacon_node_spec.gloas_fork_epoch != spec.gloas_fork_epoch {
|
||||
warn!(
|
||||
endpoint = %self.beacon_node,
|
||||
endpoint_gloas_fork_epoch = ?beacon_node_spec.gloas_fork_epoch,
|
||||
hint = UPDATE_REQUIRED_LOG_HINT,
|
||||
"Beacon node has mismatched Gloas fork epoch"
|
||||
);
|
||||
}
|
||||
|
||||
Ok(())
|
||||
|
||||
@@ -256,9 +256,9 @@ impl ApiTester {
|
||||
pub async fn test_get_lighthouse_spec(self) -> Self {
|
||||
let result = self
|
||||
.client
|
||||
.get_lighthouse_spec::<ConfigAndPresetFulu>()
|
||||
.get_lighthouse_spec::<ConfigAndPresetGloas>()
|
||||
.await
|
||||
.map(|res| ConfigAndPreset::Fulu(res.data))
|
||||
.map(|res| ConfigAndPreset::Gloas(res.data))
|
||||
.unwrap();
|
||||
let expected = ConfigAndPreset::from_chain_spec::<E>(&E::default_spec());
|
||||
|
||||
|
||||
@@ -208,7 +208,12 @@ impl ApiTester {
|
||||
}
|
||||
|
||||
pub async fn test_get_lighthouse_spec(self) -> Self {
|
||||
let result = if self.spec.is_fulu_scheduled() {
|
||||
let result = if self.spec.is_gloas_scheduled() {
|
||||
self.client
|
||||
.get_lighthouse_spec::<ConfigAndPresetGloas>()
|
||||
.await
|
||||
.map(|res| ConfigAndPreset::Gloas(res.data))
|
||||
} else if self.spec.is_fulu_scheduled() {
|
||||
self.client
|
||||
.get_lighthouse_spec::<ConfigAndPresetFulu>()
|
||||
.await
|
||||
|
||||
@@ -30,6 +30,7 @@ pub enum ForkName {
|
||||
Deneb,
|
||||
Electra,
|
||||
Fulu,
|
||||
Gloas,
|
||||
}
|
||||
|
||||
#[derive(Debug, PartialEq, Serialize)]
|
||||
@@ -113,6 +114,11 @@ impl<'a, E: EthSpec, Payload: AbstractExecPayload<E>> Web3SignerObject<'a, E, Pa
|
||||
block: None,
|
||||
block_header: Some(block.block_header()),
|
||||
}),
|
||||
BeaconBlock::Gloas(_) => Ok(Web3SignerObject::BeaconBlock {
|
||||
version: ForkName::Gloas,
|
||||
block: None,
|
||||
block_header: Some(block.block_header()),
|
||||
}),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user