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:
@@ -128,6 +128,7 @@ pub struct Timeouts {
|
||||
pub proposer_duties: Duration,
|
||||
pub sync_committee_contribution: Duration,
|
||||
pub sync_duties: Duration,
|
||||
pub inclusion_list: Duration,
|
||||
pub inclusion_list_duties: Duration,
|
||||
pub get_beacon_blocks_ssz: Duration,
|
||||
pub get_debug_beacon_states: Duration,
|
||||
@@ -146,6 +147,7 @@ impl Timeouts {
|
||||
proposer_duties: timeout,
|
||||
sync_committee_contribution: timeout,
|
||||
sync_duties: timeout,
|
||||
inclusion_list: timeout,
|
||||
inclusion_list_duties: timeout,
|
||||
get_beacon_blocks_ssz: timeout,
|
||||
get_debug_beacon_states: timeout,
|
||||
@@ -1564,6 +1566,25 @@ impl BeaconNodeHttpClient {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// `POST beacon/pool/inclusion_lists`
|
||||
pub async fn post_beacon_pool_inclusion_lists<E: EthSpec>(
|
||||
&self,
|
||||
inclusion_lists: &[SignedInclusionList<E>],
|
||||
) -> Result<(), Error> {
|
||||
let mut path = self.eth_path(V1)?;
|
||||
|
||||
path.path_segments_mut()
|
||||
.map_err(|()| Error::InvalidUrl(self.server.clone()))?
|
||||
.push("beacon")
|
||||
.push("pool")
|
||||
.push("inclusion_lists");
|
||||
|
||||
self.post_with_timeout(path, &inclusion_lists, self.timeouts.inclusion_list)
|
||||
.await?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// `GET beacon/deposit_snapshot`
|
||||
pub async fn get_deposit_snapshot(&self) -> Result<Option<types::DepositTreeSnapshot>, Error> {
|
||||
let mut path = self.eth_path(V1)?;
|
||||
@@ -2427,6 +2448,25 @@ impl BeaconNodeHttpClient {
|
||||
self.get_opt(path).await
|
||||
}
|
||||
|
||||
/// `GET validator/inclusion_list?slot`
|
||||
pub async fn get_validator_inclusion_list<E: EthSpec>(
|
||||
&self,
|
||||
slot: Slot,
|
||||
) -> Result<Option<GenericResponse<InclusionList<E>>>, Error> {
|
||||
let mut path = self.eth_path(V1)?;
|
||||
|
||||
path.path_segments_mut()
|
||||
.map_err(|()| Error::InvalidUrl(self.server.clone()))?
|
||||
.push("validator")
|
||||
.push("inclusion_list");
|
||||
|
||||
path.query_pairs_mut()
|
||||
.append_pair("slot", &slot.to_string());
|
||||
|
||||
self.get_opt_with_timeout(path, self.timeouts.inclusion_list)
|
||||
.await
|
||||
}
|
||||
|
||||
/// `POST lighthouse/liveness`
|
||||
pub async fn post_lighthouse_liveness(
|
||||
&self,
|
||||
|
||||
@@ -793,6 +793,11 @@ pub struct ValidatorAggregateAttestationQuery {
|
||||
pub committee_index: Option<CommitteeIndex>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Serialize, Deserialize)]
|
||||
pub struct ValidatorInclusionListQuery {
|
||||
pub slot: Slot,
|
||||
}
|
||||
|
||||
#[derive(Clone, Deserialize)]
|
||||
pub struct LightClientUpdatesQuery {
|
||||
pub start_period: u64,
|
||||
|
||||
Reference in New Issue
Block a user