mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-30 12:47:05 +00:00
add initial IL gossip verification
This commit is contained in:
@@ -27,6 +27,7 @@ pub enum Domain {
|
||||
ContributionAndProof,
|
||||
SyncCommitteeSelectionProof,
|
||||
ApplicationMask(ApplicationDomain),
|
||||
InclusionListCommittee,
|
||||
}
|
||||
|
||||
/// Lighthouse's internal configuration struct.
|
||||
@@ -187,6 +188,11 @@ pub struct ChainSpec {
|
||||
pub min_per_epoch_churn_limit_electra: u64,
|
||||
pub max_per_epoch_activation_exit_churn_limit: u64,
|
||||
|
||||
/*
|
||||
* FOCIL params
|
||||
*/
|
||||
pub domain_inclusion_list_committee: u32,
|
||||
|
||||
/*
|
||||
* DAS params
|
||||
*/
|
||||
@@ -475,6 +481,7 @@ impl ChainSpec {
|
||||
Domain::SyncCommitteeSelectionProof => self.domain_sync_committee_selection_proof,
|
||||
Domain::ApplicationMask(application_domain) => application_domain.get_domain_constant(),
|
||||
Domain::BlsToExecutionChange => self.domain_bls_to_execution_change,
|
||||
Domain::InclusionListCommittee => self.domain_inclusion_list_committee,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -797,6 +804,11 @@ impl ChainSpec {
|
||||
})
|
||||
.expect("calculation does not overflow"),
|
||||
|
||||
/*
|
||||
* FOCIL params
|
||||
*/
|
||||
domain_inclusion_list_committee: 13,
|
||||
|
||||
/*
|
||||
* DAS params
|
||||
*/
|
||||
@@ -1115,6 +1127,11 @@ impl ChainSpec {
|
||||
})
|
||||
.expect("calculation does not overflow"),
|
||||
|
||||
/*
|
||||
* FOCIL params
|
||||
*/
|
||||
domain_inclusion_list_committee: 13,
|
||||
|
||||
/*
|
||||
* DAS params
|
||||
*/
|
||||
@@ -1951,6 +1968,12 @@ mod tests {
|
||||
spec.domain_bls_to_execution_change,
|
||||
&spec,
|
||||
);
|
||||
|
||||
test_domain(
|
||||
Domain::InclusionListCommittee,
|
||||
spec.domain_inclusion_list_committee,
|
||||
&spec,
|
||||
);
|
||||
}
|
||||
|
||||
fn apply_bit_mask(domain_bytes: [u8; 4], spec: &ChainSpec) -> u32 {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use crate::test_utils::TestRandom;
|
||||
use crate::{EthSpec, Hash256, Signature, Slot, Transaction};
|
||||
use crate::{EthSpec, Hash256, Signature, SignedRoot, Slot, Transaction};
|
||||
|
||||
use derivative::Derivative;
|
||||
use serde::{Deserialize, Serialize};
|
||||
@@ -33,6 +33,8 @@ pub struct InclusionList<E: EthSpec> {
|
||||
VariableList<Transaction<E::MaxBytesPerTransaction>, E::MaxTransactionsPerInclusionList>,
|
||||
}
|
||||
|
||||
impl<E: EthSpec> SignedRoot for InclusionList<E> {}
|
||||
|
||||
#[derive(
|
||||
Debug, Clone, Serialize, Deserialize, Encode, Decode, TreeHash, Derivative, arbitrary::Arbitrary,
|
||||
)]
|
||||
|
||||
Reference in New Issue
Block a user