Merge remote-tracking branch 'origin/release-v7.0.0' into unstable

This commit is contained in:
Michael Sproul
2025-03-29 13:01:58 +11:00
21 changed files with 364 additions and 48 deletions

View File

@@ -7,7 +7,10 @@ pub mod sync_state;
use crate::{
lighthouse::sync_state::SyncState,
types::{DepositTreeSnapshot, Epoch, FinalizedExecutionBlock, GenericResponse, ValidatorId},
types::{
AdminPeer, DepositTreeSnapshot, Epoch, FinalizedExecutionBlock, GenericResponse,
ValidatorId,
},
BeaconNodeHttpClient, DepositData, Error, Eth1Data, Hash256, Slot,
};
use proto_array::core::ProtoArray;
@@ -365,6 +368,30 @@ impl BeaconNodeHttpClient {
self.post_with_response(path, &()).await
}
/// `POST lighthouse/add_peer`
pub async fn post_lighthouse_add_peer(&self, req: AdminPeer) -> Result<(), Error> {
let mut path = self.server.full.clone();
path.path_segments_mut()
.map_err(|()| Error::InvalidUrl(self.server.clone()))?
.push("lighthouse")
.push("add_peer");
self.post_with_response(path, &req).await
}
/// `POST lighthouse/remove_peer`
pub async fn post_lighthouse_remove_peer(&self, req: AdminPeer) -> Result<(), Error> {
let mut path = self.server.full.clone();
path.path_segments_mut()
.map_err(|()| Error::InvalidUrl(self.server.clone()))?
.push("lighthouse")
.push("remove_peer");
self.post_with_response(path, &req).await
}
/*
Analysis endpoints.
*/

View File

@@ -1411,6 +1411,11 @@ pub struct ManualFinalizationRequestData {
pub block_root: Hash256,
}
#[derive(Debug, Serialize, Deserialize, Clone)]
pub struct AdminPeer {
pub enr: String,
}
#[derive(Debug, Serialize, Deserialize)]
pub struct LivenessRequestData {
pub epoch: Epoch,

View File

@@ -17,8 +17,8 @@ pub const VERSION: &str = git_version!(
// NOTE: using --match instead of --exclude for compatibility with old Git
"--match=thiswillnevermatchlol"
],
prefix = "Lighthouse/v7.0.0-beta.4-",
fallback = "Lighthouse/v7.0.0-beta.4"
prefix = "Lighthouse/v7.0.0-beta.5-",
fallback = "Lighthouse/v7.0.0-beta.5"
);
/// Returns the first eight characters of the latest commit hash for this build.
@@ -54,7 +54,7 @@ pub fn version_with_platform() -> String {
///
/// `1.5.1`
pub fn version() -> &'static str {
"7.0.0-beta.4"
"7.0.0-beta.5"
}
/// Returns the name of the current client running.