mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-30 12:47:05 +00:00
add IL service to download IL from EL, sign in VC, and publish via BN
add HTTP API to the beacon node to retrieve IL from the EL. add IL service in the validator client to download the IL from the beacon node. add logic to the beacon node to package the IL for the validator client. add HTTP API to the beacon node to gossip signed ILs. the validator client will sign the ILs from the beacon node and resubmit to the beacon node to gossip.
This commit is contained in:
@@ -16,11 +16,11 @@ use task_executor::TaskExecutor;
|
||||
use types::{
|
||||
attestation::Error as AttestationError, graffiti::GraffitiString, AbstractExecPayload, Address,
|
||||
AggregateAndProof, Attestation, BeaconBlock, BlindedPayload, ChainSpec, ContributionAndProof,
|
||||
Domain, Epoch, EthSpec, Fork, Graffiti, Hash256, PublicKeyBytes, SelectionProof, Signature,
|
||||
SignedAggregateAndProof, SignedBeaconBlock, SignedContributionAndProof, SignedRoot,
|
||||
SignedValidatorRegistrationData, SignedVoluntaryExit, Slot, SyncAggregatorSelectionData,
|
||||
SyncCommitteeContribution, SyncCommitteeMessage, SyncSelectionProof, SyncSubnetId,
|
||||
ValidatorRegistrationData, VoluntaryExit,
|
||||
Domain, Epoch, EthSpec, Fork, Graffiti, Hash256, InclusionList, PublicKeyBytes, SelectionProof,
|
||||
Signature, SignedAggregateAndProof, SignedBeaconBlock, SignedContributionAndProof,
|
||||
SignedInclusionList, SignedRoot, SignedValidatorRegistrationData, SignedVoluntaryExit, Slot,
|
||||
SyncAggregatorSelectionData, SyncCommitteeContribution, SyncCommitteeMessage,
|
||||
SyncSelectionProof, SyncSubnetId, ValidatorRegistrationData, VoluntaryExit,
|
||||
};
|
||||
|
||||
#[derive(Debug, PartialEq)]
|
||||
@@ -1009,6 +1009,30 @@ impl<T: SlotClock + 'static, E: EthSpec> ValidatorStore<T, E> {
|
||||
Ok(SignedContributionAndProof { message, signature })
|
||||
}
|
||||
|
||||
pub async fn sign_inclusion_list(
|
||||
&self,
|
||||
pubkey: PublicKeyBytes,
|
||||
inclusion_list: InclusionList<E>,
|
||||
) -> Result<SignedInclusionList<E>, Error> {
|
||||
let signing_epoch = inclusion_list.slot.epoch(E::slots_per_epoch());
|
||||
let signing_context = self.signing_context(Domain::InclusionListCommittee, signing_epoch);
|
||||
let signing_method = self.doppelganger_bypassed_signing_method(pubkey)?;
|
||||
|
||||
let signature = signing_method
|
||||
.get_signature::<E, BlindedPayload<E>>(
|
||||
SignableMessage::InclusionList(&inclusion_list),
|
||||
signing_context,
|
||||
&self.spec,
|
||||
&self.task_executor,
|
||||
)
|
||||
.await?;
|
||||
|
||||
Ok(SignedInclusionList {
|
||||
message: inclusion_list,
|
||||
signature,
|
||||
})
|
||||
}
|
||||
|
||||
pub fn import_slashing_protection(
|
||||
&self,
|
||||
interchange: Interchange,
|
||||
|
||||
Reference in New Issue
Block a user