mirror of
https://github.com/sigp/lighthouse.git
synced 2026-06-01 13:47:16 +00:00
Remove /lighthouse/analysis/block_rewards APIs (#8935)
Mark pointed out that these APIs will require updates for Gloas, so I figured we may as well get rid of them. As far as I know, blockprint was the only use case and it is now defunct. The consensus block value is included in getBlock API responses, so there's no reason for VCs to use the `POST` API, and there is now a standard API for the rewards of canonical blocks. The SSE event was non-standard, and likely only used by blockprint as well. Co-Authored-By: Michael Sproul <michael@sigmaprime.io>
This commit is contained in:
@@ -2,12 +2,11 @@
|
||||
|
||||
mod attestation_performance;
|
||||
mod block_packing_efficiency;
|
||||
mod block_rewards;
|
||||
mod custody;
|
||||
pub mod sync_state;
|
||||
|
||||
use crate::{
|
||||
BeaconNodeHttpClient, DepositData, Error, Hash256, Slot,
|
||||
BeaconNodeHttpClient, DepositData, Error, Hash256,
|
||||
lighthouse::sync_state::SyncState,
|
||||
types::{AdminPeer, Epoch, GenericResponse, ValidatorId},
|
||||
};
|
||||
@@ -22,7 +21,6 @@ pub use attestation_performance::{
|
||||
pub use block_packing_efficiency::{
|
||||
BlockPackingEfficiency, BlockPackingEfficiencyQuery, ProposerInfo, UniqueAttestation,
|
||||
};
|
||||
pub use block_rewards::{AttestationRewards, BlockReward, BlockRewardMeta, BlockRewardsQuery};
|
||||
pub use custody::CustodyInfo;
|
||||
|
||||
// Define "legacy" implementations of `Option<T>` which use four bytes for encoding the union
|
||||
@@ -317,27 +315,6 @@ impl BeaconNodeHttpClient {
|
||||
Analysis endpoints.
|
||||
*/
|
||||
|
||||
/// `GET` lighthouse/analysis/block_rewards?start_slot,end_slot
|
||||
pub async fn get_lighthouse_analysis_block_rewards(
|
||||
&self,
|
||||
start_slot: Slot,
|
||||
end_slot: Slot,
|
||||
) -> Result<Vec<BlockReward>, Error> {
|
||||
let mut path = self.server.expose_full().clone();
|
||||
|
||||
path.path_segments_mut()
|
||||
.map_err(|()| Error::InvalidUrl(self.server.clone()))?
|
||||
.push("lighthouse")
|
||||
.push("analysis")
|
||||
.push("block_rewards");
|
||||
|
||||
path.query_pairs_mut()
|
||||
.append_pair("start_slot", &start_slot.to_string())
|
||||
.append_pair("end_slot", &end_slot.to_string());
|
||||
|
||||
self.get(path).await
|
||||
}
|
||||
|
||||
/// `GET` lighthouse/analysis/block_packing?start_epoch,end_epoch
|
||||
pub async fn get_lighthouse_analysis_block_packing(
|
||||
&self,
|
||||
|
||||
Reference in New Issue
Block a user