mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-16 20:39:10 +00:00
resolve merge conflicts
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
# To download/extract nightly tests, run:
|
||||
# CONSENSUS_SPECS_TEST_VERSION=nightly make
|
||||
<<<<<<< HEAD
|
||||
CONSENSUS_SPECS_TEST_VERSION ?= nightly-21573464110
|
||||
=======
|
||||
CONSENSUS_SPECS_TEST_VERSION ?= v1.7.0-alpha.2
|
||||
>>>>>>> 1dd0f7bcbb9e476028ec9146a149e121ad28ff9e
|
||||
REPO_NAME := consensus-spec-tests
|
||||
OUTPUT_DIR := ./$(REPO_NAME)
|
||||
|
||||
|
||||
@@ -59,6 +59,8 @@ excluded_paths = [
|
||||
# Ignore full epoch tests for now (just test the sub-transitions).
|
||||
"tests/.*/.*/epoch_processing/.*/pre_epoch.ssz_snappy",
|
||||
"tests/.*/.*/epoch_processing/.*/post_epoch.ssz_snappy",
|
||||
# Ignore inactivity_scores tests for now (should implement soon).
|
||||
"tests/.*/.*/rewards/inactivity_scores/.*",
|
||||
# Ignore gloas tests for now
|
||||
"tests/.*/gloas/.*",
|
||||
# Ignore KZG tests that target internal kzg library functions
|
||||
|
||||
@@ -45,7 +45,7 @@ struct ExecutionMetadata {
|
||||
/// Newtype for testing withdrawals.
|
||||
#[derive(Debug, Clone, Deserialize)]
|
||||
pub struct WithdrawalsPayload<E: EthSpec> {
|
||||
payload: ExecutionPayload<E>,
|
||||
payload: Option<ExecutionPayload<E>>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
@@ -405,10 +405,17 @@ impl<E: EthSpec> Operation<E> for WithdrawalsPayload<E> {
|
||||
}
|
||||
|
||||
fn decode(path: &Path, fork_name: ForkName, _spec: &ChainSpec) -> Result<Self, Error> {
|
||||
ssz_decode_file_with(path, |bytes| {
|
||||
ExecutionPayload::from_ssz_bytes_by_fork(bytes, fork_name)
|
||||
})
|
||||
.map(|payload| WithdrawalsPayload { payload })
|
||||
if fork_name.gloas_enabled() {
|
||||
// No payload present or required for Gloas tests.
|
||||
Ok(WithdrawalsPayload { payload: None })
|
||||
} else {
|
||||
ssz_decode_file_with(path, |bytes| {
|
||||
ExecutionPayload::from_ssz_bytes_by_fork(bytes, fork_name)
|
||||
})
|
||||
.map(|payload| WithdrawalsPayload {
|
||||
payload: Some(payload),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
fn apply_to(
|
||||
@@ -420,7 +427,7 @@ impl<E: EthSpec> Operation<E> for WithdrawalsPayload<E> {
|
||||
if state.fork_name_unchecked().gloas_enabled() {
|
||||
withdrawals::gloas::process_withdrawals(state, spec)
|
||||
} else {
|
||||
let full_payload = FullPayload::from(self.payload.clone());
|
||||
let full_payload = FullPayload::from(self.payload.clone().unwrap());
|
||||
withdrawals::capella_electra::process_withdrawals::<_, FullPayload<_>>(
|
||||
state,
|
||||
full_payload.to_ref(),
|
||||
|
||||
@@ -333,6 +333,10 @@ impl<T, E> SszStaticHandler<T, E> {
|
||||
Self::for_forks(ForkName::list_all()[6..].to_vec())
|
||||
}
|
||||
|
||||
pub fn gloas_and_later() -> Self {
|
||||
Self::for_forks(ForkName::list_all()[7..].to_vec())
|
||||
}
|
||||
|
||||
pub fn pre_electra() -> Self {
|
||||
Self::for_forks(ForkName::list_all()[0..5].to_vec())
|
||||
}
|
||||
@@ -397,10 +401,7 @@ where
|
||||
}
|
||||
|
||||
fn is_enabled_for_fork(&self, fork_name: ForkName) -> bool {
|
||||
// TODO(gloas): DataColumnSidecar tests are disabled until we update the DataColumnSidecar
|
||||
// type.
|
||||
self.supported_forks.contains(&fork_name)
|
||||
&& !(fork_name == ForkName::Gloas && T::name() == "DataColumnSidecar")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -87,6 +87,8 @@ type_name_generic!(ExecutionPayloadHeaderCapella, "ExecutionPayloadHeader");
|
||||
type_name_generic!(ExecutionPayloadHeaderDeneb, "ExecutionPayloadHeader");
|
||||
type_name_generic!(ExecutionPayloadHeaderElectra, "ExecutionPayloadHeader");
|
||||
type_name_generic!(ExecutionPayloadHeaderFulu, "ExecutionPayloadHeader");
|
||||
type_name_generic!(ExecutionPayloadBid);
|
||||
type_name_generic!(SignedExecutionPayloadBid);
|
||||
type_name_generic!(ExecutionRequests);
|
||||
type_name_generic!(BlindedPayload, "ExecutionPayloadHeader");
|
||||
type_name!(Fork);
|
||||
|
||||
@@ -600,6 +600,10 @@ mod ssz_static {
|
||||
.run();
|
||||
SszStaticHandler::<ExecutionPayloadFulu<MinimalEthSpec>, MinimalEthSpec>::fulu_only().run();
|
||||
SszStaticHandler::<ExecutionPayloadFulu<MainnetEthSpec>, MainnetEthSpec>::fulu_only().run();
|
||||
SszStaticHandler::<ExecutionPayloadGloas<MainnetEthSpec>, MainnetEthSpec>::gloas_only()
|
||||
.run();
|
||||
SszStaticHandler::<ExecutionPayloadGloas<MainnetEthSpec>, MainnetEthSpec>::gloas_only()
|
||||
.run();
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -626,6 +630,20 @@ mod ssz_static {
|
||||
.run();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn execution_payload_bid() {
|
||||
SszStaticHandler::<ExecutionPayloadBid<MinimalEthSpec>, MinimalEthSpec>::gloas_and_later()
|
||||
.run();
|
||||
SszStaticHandler::<ExecutionPayloadBid<MainnetEthSpec>, MainnetEthSpec>::gloas_and_later()
|
||||
.run();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn signed_execution_payload_bid() {
|
||||
SszStaticHandler::<SignedExecutionPayloadBid<MinimalEthSpec>, MinimalEthSpec>::gloas_and_later().run();
|
||||
SszStaticHandler::<SignedExecutionPayloadBid<MainnetEthSpec>, MainnetEthSpec>::gloas_and_later().run();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn withdrawal() {
|
||||
SszStaticHandler::<Withdrawal, MinimalEthSpec>::capella_and_later().run();
|
||||
|
||||
Reference in New Issue
Block a user