mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-03 00:31:50 +00:00
Merge branch 'gloas-containers' into gloas_envelope_processing_merge_containers
This commit is contained in:
@@ -16,9 +16,8 @@ alloy-primitives = { workspace = true }
|
||||
beacon_chain = { workspace = true }
|
||||
bls = { workspace = true }
|
||||
compare_fields = { workspace = true }
|
||||
compare_fields_derive = { workspace = true }
|
||||
context_deserialize = { workspace = true }
|
||||
derivative = { workspace = true }
|
||||
educe = { workspace = true }
|
||||
eth2_network_config = { workspace = true }
|
||||
ethereum_ssz = { workspace = true }
|
||||
ethereum_ssz_derive = { workspace = true }
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# To download/extract nightly tests, run:
|
||||
# CONSENSUS_SPECS_TEST_VERSION=nightly make
|
||||
CONSENSUS_SPECS_TEST_VERSION ?= v1.6.0-alpha.6
|
||||
CONSENSUS_SPECS_TEST_VERSION ?= v1.6.0-beta.1
|
||||
REPO_NAME := consensus-spec-tests
|
||||
OUTPUT_DIR := ./$(REPO_NAME)
|
||||
|
||||
|
||||
@@ -54,6 +54,8 @@ excluded_paths = [
|
||||
"tests/general/phase0/ssz_generic/basic_progressive_list",
|
||||
"tests/general/phase0/ssz_generic/containers/.*/ProgressiveBitsStruct.*",
|
||||
"tests/general/phase0/ssz_generic/containers/.*/ProgressiveTestStruct.*",
|
||||
"tests/general/phase0/ssz_generic/progressive_containers/.*",
|
||||
"tests/general/phase0/ssz_generic/compatible_unions/.*",
|
||||
# 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",
|
||||
|
||||
@@ -57,7 +57,7 @@ else
|
||||
if [[ ! -e "${test}.tar.gz" ]]; then
|
||||
echo "Downloading: ${version}/${test}.tar.gz"
|
||||
curl --progress-bar --location --remote-name --show-error --retry 3 --retry-all-errors --fail \
|
||||
"https://github.com/ethereum/consensus-spec-tests/releases/download/${version}/${test}.tar.gz" \
|
||||
"https://github.com/ethereum/consensus-specs/releases/download/${version}/${test}.tar.gz" \
|
||||
|| {
|
||||
echo "Curl failed. Aborting"
|
||||
rm -f "${test}.tar.gz"
|
||||
|
||||
@@ -920,7 +920,7 @@ impl<E: EthSpec> Tester<E> {
|
||||
let cached_head = self.harness.chain.canonical_head.cached_head();
|
||||
let next_slot = cached_head.snapshot.beacon_block.slot() + 1;
|
||||
let next_slot_epoch = next_slot.epoch(E::slots_per_epoch());
|
||||
let (proposer_indices, decision_root, _, fork) =
|
||||
let (proposer_indices, decision_root, _, _, fork) =
|
||||
compute_proposer_duties_from_head(next_slot_epoch, &self.harness.chain).unwrap();
|
||||
let proposer_index = proposer_indices[next_slot.as_usize() % E::slots_per_epoch() as usize];
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use super::*;
|
||||
use crate::case_result::compare_result_detailed;
|
||||
use crate::decode::{ssz_decode_file, ssz_decode_state, yaml_decode_file};
|
||||
use compare_fields_derive::CompareFields;
|
||||
use compare_fields::CompareFields;
|
||||
use serde::Deserialize;
|
||||
use ssz::four_byte_option_impl;
|
||||
use ssz_derive::{Decode, Encode};
|
||||
|
||||
@@ -318,14 +318,13 @@ where
|
||||
{
|
||||
let s: String = serde::de::Deserialize::deserialize(deserializer)?;
|
||||
let decoded: Vec<u8> = hex::decode(&s.as_str()[2..]).map_err(D::Error::custom)?;
|
||||
let decoded_len = decoded.len();
|
||||
|
||||
if decoded.len() > N::to_usize() {
|
||||
Err(D::Error::custom(format!(
|
||||
decoded.try_into().map_err(|_| {
|
||||
D::Error::custom(format!(
|
||||
"Too many values for list, got: {}, limit: {}",
|
||||
decoded.len(),
|
||||
decoded_len,
|
||||
N::to_usize()
|
||||
)))
|
||||
} else {
|
||||
Ok(decoded.into())
|
||||
}
|
||||
))
|
||||
})
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ use crate::cases::{self, Case, Cases, EpochTransition, LoadCase, Operation};
|
||||
use crate::type_name::TypeName;
|
||||
use crate::{FeatureName, type_name};
|
||||
use context_deserialize::ContextDeserialize;
|
||||
use derivative::Derivative;
|
||||
use educe::Educe;
|
||||
use std::fs::{self, DirEntry};
|
||||
use std::marker::PhantomData;
|
||||
use std::path::PathBuf;
|
||||
@@ -154,8 +154,8 @@ pub trait Handler {
|
||||
|
||||
macro_rules! bls_eth_handler {
|
||||
($runner_name: ident, $case_name:ident, $handler_name:expr) => {
|
||||
#[derive(Derivative)]
|
||||
#[derivative(Default(bound = ""))]
|
||||
#[derive(Educe)]
|
||||
#[educe(Default)]
|
||||
pub struct $runner_name;
|
||||
|
||||
impl Handler for $runner_name {
|
||||
@@ -174,8 +174,8 @@ macro_rules! bls_eth_handler {
|
||||
|
||||
macro_rules! bls_handler {
|
||||
($runner_name: ident, $case_name:ident, $handler_name:expr) => {
|
||||
#[derive(Derivative)]
|
||||
#[derivative(Default(bound = ""))]
|
||||
#[derive(Educe)]
|
||||
#[educe(Default)]
|
||||
pub struct $runner_name;
|
||||
|
||||
impl Handler for $runner_name {
|
||||
@@ -335,8 +335,8 @@ impl<T, E> SszStaticHandler<T, E> {
|
||||
}
|
||||
|
||||
/// Handler for SSZ types that implement `CachedTreeHash`.
|
||||
#[derive(Derivative)]
|
||||
#[derivative(Default(bound = ""))]
|
||||
#[derive(Educe)]
|
||||
#[educe(Default)]
|
||||
pub struct SszStaticTHCHandler<T, E>(PhantomData<(T, E)>);
|
||||
|
||||
/// Handler for SSZ types that don't implement `ssz::Decode`.
|
||||
@@ -436,8 +436,8 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Derivative)]
|
||||
#[derivative(Default(bound = ""))]
|
||||
#[derive(Educe)]
|
||||
#[educe(Default)]
|
||||
pub struct ShufflingHandler<E>(PhantomData<E>);
|
||||
|
||||
impl<E: EthSpec + TypeName> Handler for ShufflingHandler<E> {
|
||||
@@ -460,8 +460,8 @@ impl<E: EthSpec + TypeName> Handler for ShufflingHandler<E> {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Derivative)]
|
||||
#[derivative(Default(bound = ""))]
|
||||
#[derive(Educe)]
|
||||
#[educe(Default)]
|
||||
pub struct SanityBlocksHandler<E>(PhantomData<E>);
|
||||
|
||||
impl<E: EthSpec + TypeName> Handler for SanityBlocksHandler<E> {
|
||||
@@ -486,8 +486,8 @@ impl<E: EthSpec + TypeName> Handler for SanityBlocksHandler<E> {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Derivative)]
|
||||
#[derivative(Default(bound = ""))]
|
||||
#[derive(Educe)]
|
||||
#[educe(Default)]
|
||||
pub struct SanitySlotsHandler<E>(PhantomData<E>);
|
||||
|
||||
impl<E: EthSpec + TypeName> Handler for SanitySlotsHandler<E> {
|
||||
@@ -511,8 +511,8 @@ impl<E: EthSpec + TypeName> Handler for SanitySlotsHandler<E> {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Derivative)]
|
||||
#[derivative(Default(bound = ""))]
|
||||
#[derive(Educe)]
|
||||
#[educe(Default)]
|
||||
pub struct RandomHandler<E>(PhantomData<E>);
|
||||
|
||||
impl<E: EthSpec + TypeName> Handler for RandomHandler<E> {
|
||||
@@ -531,8 +531,8 @@ impl<E: EthSpec + TypeName> Handler for RandomHandler<E> {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Derivative)]
|
||||
#[derivative(Default(bound = ""))]
|
||||
#[derive(Educe)]
|
||||
#[educe(Default)]
|
||||
pub struct EpochProcessingHandler<E, T>(PhantomData<(E, T)>);
|
||||
|
||||
impl<E: EthSpec + TypeName, T: EpochTransition<E>> Handler for EpochProcessingHandler<E, T> {
|
||||
@@ -581,8 +581,8 @@ impl<E: EthSpec + TypeName> Handler for RewardsHandler<E> {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Derivative)]
|
||||
#[derivative(Default(bound = ""))]
|
||||
#[derive(Educe)]
|
||||
#[educe(Default)]
|
||||
pub struct ForkHandler<E>(PhantomData<E>);
|
||||
|
||||
impl<E: EthSpec + TypeName> Handler for ForkHandler<E> {
|
||||
@@ -601,8 +601,8 @@ impl<E: EthSpec + TypeName> Handler for ForkHandler<E> {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Derivative)]
|
||||
#[derivative(Default(bound = ""))]
|
||||
#[derive(Educe)]
|
||||
#[educe(Default)]
|
||||
pub struct TransitionHandler<E>(PhantomData<E>);
|
||||
|
||||
impl<E: EthSpec + TypeName> Handler for TransitionHandler<E> {
|
||||
@@ -621,8 +621,8 @@ impl<E: EthSpec + TypeName> Handler for TransitionHandler<E> {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Derivative)]
|
||||
#[derivative(Default(bound = ""))]
|
||||
#[derive(Educe)]
|
||||
#[educe(Default)]
|
||||
pub struct FinalityHandler<E>(PhantomData<E>);
|
||||
|
||||
impl<E: EthSpec + TypeName> Handler for FinalityHandler<E> {
|
||||
@@ -705,8 +705,8 @@ impl<E: EthSpec + TypeName> Handler for ForkChoiceHandler<E> {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Derivative)]
|
||||
#[derivative(Default(bound = ""))]
|
||||
#[derive(Educe)]
|
||||
#[educe(Default)]
|
||||
pub struct OptimisticSyncHandler<E>(PhantomData<E>);
|
||||
|
||||
impl<E: EthSpec + TypeName> Handler for OptimisticSyncHandler<E> {
|
||||
@@ -734,8 +734,8 @@ impl<E: EthSpec + TypeName> Handler for OptimisticSyncHandler<E> {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Derivative)]
|
||||
#[derivative(Default(bound = ""))]
|
||||
#[derive(Educe)]
|
||||
#[educe(Default)]
|
||||
pub struct GenesisValidityHandler<E>(PhantomData<E>);
|
||||
|
||||
impl<E: EthSpec + TypeName> Handler for GenesisValidityHandler<E> {
|
||||
@@ -754,8 +754,8 @@ impl<E: EthSpec + TypeName> Handler for GenesisValidityHandler<E> {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Derivative)]
|
||||
#[derivative(Default(bound = ""))]
|
||||
#[derive(Educe)]
|
||||
#[educe(Default)]
|
||||
pub struct GenesisInitializationHandler<E>(PhantomData<E>);
|
||||
|
||||
impl<E: EthSpec + TypeName> Handler for GenesisInitializationHandler<E> {
|
||||
@@ -774,8 +774,8 @@ impl<E: EthSpec + TypeName> Handler for GenesisInitializationHandler<E> {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Derivative)]
|
||||
#[derivative(Default(bound = ""))]
|
||||
#[derive(Educe)]
|
||||
#[educe(Default)]
|
||||
pub struct KZGBlobToKZGCommitmentHandler<E>(PhantomData<E>);
|
||||
|
||||
impl<E: EthSpec> Handler for KZGBlobToKZGCommitmentHandler<E> {
|
||||
@@ -794,8 +794,8 @@ impl<E: EthSpec> Handler for KZGBlobToKZGCommitmentHandler<E> {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Derivative)]
|
||||
#[derivative(Default(bound = ""))]
|
||||
#[derive(Educe)]
|
||||
#[educe(Default)]
|
||||
pub struct KZGComputeBlobKZGProofHandler<E>(PhantomData<E>);
|
||||
|
||||
impl<E: EthSpec> Handler for KZGComputeBlobKZGProofHandler<E> {
|
||||
@@ -814,8 +814,8 @@ impl<E: EthSpec> Handler for KZGComputeBlobKZGProofHandler<E> {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Derivative)]
|
||||
#[derivative(Default(bound = ""))]
|
||||
#[derive(Educe)]
|
||||
#[educe(Default)]
|
||||
pub struct KZGComputeKZGProofHandler<E>(PhantomData<E>);
|
||||
|
||||
impl<E: EthSpec> Handler for KZGComputeKZGProofHandler<E> {
|
||||
@@ -834,8 +834,8 @@ impl<E: EthSpec> Handler for KZGComputeKZGProofHandler<E> {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Derivative)]
|
||||
#[derivative(Default(bound = ""))]
|
||||
#[derive(Educe)]
|
||||
#[educe(Default)]
|
||||
pub struct KZGVerifyBlobKZGProofHandler<E>(PhantomData<E>);
|
||||
|
||||
impl<E: EthSpec> Handler for KZGVerifyBlobKZGProofHandler<E> {
|
||||
@@ -854,8 +854,8 @@ impl<E: EthSpec> Handler for KZGVerifyBlobKZGProofHandler<E> {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Derivative)]
|
||||
#[derivative(Default(bound = ""))]
|
||||
#[derive(Educe)]
|
||||
#[educe(Default)]
|
||||
pub struct KZGVerifyBlobKZGProofBatchHandler<E>(PhantomData<E>);
|
||||
|
||||
impl<E: EthSpec> Handler for KZGVerifyBlobKZGProofBatchHandler<E> {
|
||||
@@ -874,8 +874,8 @@ impl<E: EthSpec> Handler for KZGVerifyBlobKZGProofBatchHandler<E> {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Derivative)]
|
||||
#[derivative(Default(bound = ""))]
|
||||
#[derive(Educe)]
|
||||
#[educe(Default)]
|
||||
pub struct KZGVerifyKZGProofHandler<E>(PhantomData<E>);
|
||||
|
||||
impl<E: EthSpec> Handler for KZGVerifyKZGProofHandler<E> {
|
||||
@@ -894,8 +894,8 @@ impl<E: EthSpec> Handler for KZGVerifyKZGProofHandler<E> {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Derivative)]
|
||||
#[derivative(Default(bound = ""))]
|
||||
#[derive(Educe)]
|
||||
#[educe(Default)]
|
||||
pub struct GetCustodyGroupsHandler<E>(PhantomData<E>);
|
||||
|
||||
impl<E: EthSpec + TypeName> Handler for GetCustodyGroupsHandler<E> {
|
||||
@@ -914,8 +914,8 @@ impl<E: EthSpec + TypeName> Handler for GetCustodyGroupsHandler<E> {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Derivative)]
|
||||
#[derivative(Default(bound = ""))]
|
||||
#[derive(Educe)]
|
||||
#[educe(Default)]
|
||||
pub struct ComputeColumnsForCustodyGroupHandler<E>(PhantomData<E>);
|
||||
|
||||
impl<E: EthSpec + TypeName> Handler for ComputeColumnsForCustodyGroupHandler<E> {
|
||||
@@ -934,8 +934,8 @@ impl<E: EthSpec + TypeName> Handler for ComputeColumnsForCustodyGroupHandler<E>
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Derivative)]
|
||||
#[derivative(Default(bound = ""))]
|
||||
#[derive(Educe)]
|
||||
#[educe(Default)]
|
||||
pub struct KZGComputeCellsHandler<E>(PhantomData<E>);
|
||||
|
||||
impl<E: EthSpec> Handler for KZGComputeCellsHandler<E> {
|
||||
@@ -954,8 +954,8 @@ impl<E: EthSpec> Handler for KZGComputeCellsHandler<E> {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Derivative)]
|
||||
#[derivative(Default(bound = ""))]
|
||||
#[derive(Educe)]
|
||||
#[educe(Default)]
|
||||
pub struct KZGComputeCellsAndKZGProofHandler<E>(PhantomData<E>);
|
||||
|
||||
impl<E: EthSpec> Handler for KZGComputeCellsAndKZGProofHandler<E> {
|
||||
@@ -974,8 +974,8 @@ impl<E: EthSpec> Handler for KZGComputeCellsAndKZGProofHandler<E> {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Derivative)]
|
||||
#[derivative(Default(bound = ""))]
|
||||
#[derive(Educe)]
|
||||
#[educe(Default)]
|
||||
pub struct KZGVerifyCellKZGProofBatchHandler<E>(PhantomData<E>);
|
||||
|
||||
impl<E: EthSpec> Handler for KZGVerifyCellKZGProofBatchHandler<E> {
|
||||
@@ -994,8 +994,8 @@ impl<E: EthSpec> Handler for KZGVerifyCellKZGProofBatchHandler<E> {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Derivative)]
|
||||
#[derivative(Default(bound = ""))]
|
||||
#[derive(Educe)]
|
||||
#[educe(Default)]
|
||||
pub struct KZGRecoverCellsAndKZGProofHandler<E>(PhantomData<E>);
|
||||
|
||||
impl<E: EthSpec> Handler for KZGRecoverCellsAndKZGProofHandler<E> {
|
||||
@@ -1014,8 +1014,8 @@ impl<E: EthSpec> Handler for KZGRecoverCellsAndKZGProofHandler<E> {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Derivative)]
|
||||
#[derivative(Default(bound = ""))]
|
||||
#[derive(Educe)]
|
||||
#[educe(Default)]
|
||||
pub struct KzgInclusionMerkleProofValidityHandler<E>(PhantomData<E>);
|
||||
|
||||
impl<E: EthSpec + TypeName> Handler for KzgInclusionMerkleProofValidityHandler<E> {
|
||||
@@ -1038,8 +1038,8 @@ impl<E: EthSpec + TypeName> Handler for KzgInclusionMerkleProofValidityHandler<E
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Derivative)]
|
||||
#[derivative(Default(bound = ""))]
|
||||
#[derive(Educe)]
|
||||
#[educe(Default)]
|
||||
pub struct MerkleProofValidityHandler<E>(PhantomData<E>);
|
||||
|
||||
impl<E: EthSpec + TypeName> Handler for MerkleProofValidityHandler<E> {
|
||||
@@ -1062,8 +1062,8 @@ impl<E: EthSpec + TypeName> Handler for MerkleProofValidityHandler<E> {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Derivative)]
|
||||
#[derivative(Default(bound = ""))]
|
||||
#[derive(Educe)]
|
||||
#[educe(Default)]
|
||||
pub struct LightClientUpdateHandler<E>(PhantomData<E>);
|
||||
|
||||
impl<E: EthSpec + TypeName> Handler for LightClientUpdateHandler<E> {
|
||||
@@ -1083,13 +1083,12 @@ impl<E: EthSpec + TypeName> Handler for LightClientUpdateHandler<E> {
|
||||
|
||||
fn is_enabled_for_fork(&self, fork_name: ForkName) -> bool {
|
||||
// Enabled in Altair
|
||||
// No test in Fulu yet.
|
||||
fork_name.altair_enabled() && fork_name != ForkName::Fulu
|
||||
fork_name.altair_enabled()
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Derivative)]
|
||||
#[derivative(Default(bound = ""))]
|
||||
#[derive(Educe)]
|
||||
#[educe(Default)]
|
||||
pub struct OperationsHandler<E, O>(PhantomData<(E, O)>);
|
||||
|
||||
impl<E: EthSpec + TypeName, O: Operation<E>> Handler for OperationsHandler<E, O> {
|
||||
@@ -1108,8 +1107,8 @@ impl<E: EthSpec + TypeName, O: Operation<E>> Handler for OperationsHandler<E, O>
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Derivative)]
|
||||
#[derivative(Default(bound = ""))]
|
||||
#[derive(Educe)]
|
||||
#[educe(Default)]
|
||||
pub struct SszGenericHandler<H>(PhantomData<H>);
|
||||
|
||||
impl<H: TypeName> Handler for SszGenericHandler<H> {
|
||||
|
||||
@@ -64,7 +64,7 @@ async fn import_and_unlock(http_url: SensitiveUrl, priv_keys: &[&str], password:
|
||||
|
||||
let client = Client::builder().build().unwrap();
|
||||
let request = client
|
||||
.post(http_url.full.clone())
|
||||
.post(http_url.expose_full().clone())
|
||||
.header(CONTENT_TYPE, "application/json")
|
||||
.json(&body);
|
||||
|
||||
@@ -90,7 +90,7 @@ async fn import_and_unlock(http_url: SensitiveUrl, priv_keys: &[&str], password:
|
||||
);
|
||||
|
||||
let request = client
|
||||
.post(http_url.full.clone())
|
||||
.post(http_url.expose_full().clone())
|
||||
.header(CONTENT_TYPE, "application/json")
|
||||
.json(&body);
|
||||
|
||||
|
||||
@@ -248,14 +248,8 @@ impl<E: EthSpec> LocalExecutionNode<E> {
|
||||
if let Err(e) = std::fs::write(jwt_file_path, config.jwt_key.hex_string()) {
|
||||
panic!("Failed to write jwt file {}", e);
|
||||
}
|
||||
let spec = context.eth2_config.spec.clone();
|
||||
Self {
|
||||
server: MockServer::new_with_config(
|
||||
&context.executor.handle().unwrap(),
|
||||
config,
|
||||
spec,
|
||||
None,
|
||||
),
|
||||
server: MockServer::new_with_config(&context.executor.handle().unwrap(), config, None),
|
||||
datadir,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ logging = { workspace = true }
|
||||
node_test_rig = { path = "../node_test_rig" }
|
||||
parking_lot = { workspace = true }
|
||||
rayon = { workspace = true }
|
||||
sensitive_url = { path = "../../common/sensitive_url" }
|
||||
sensitive_url = { workspace = true }
|
||||
serde_json = { workspace = true }
|
||||
tokio = { workspace = true }
|
||||
tracing = { workspace = true }
|
||||
|
||||
Reference in New Issue
Block a user