Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions beacon_node/http_api/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2999,7 +2999,7 @@ pub fn serve<T: BeaconChainTypes>(

let fork_choice_nodes = proto_array
.nodes
.iter()
.values()
.map(|node| {
let execution_status = if node.execution_status.is_execution_enabled() {
Some(node.execution_status.to_string())
Expand All @@ -3010,10 +3010,7 @@ pub fn serve<T: BeaconChainTypes>(
ForkChoiceNode {
slot: node.slot,
block_root: node.root,
parent_root: node
.parent
.and_then(|index| proto_array.nodes.get(index))
.map(|parent| parent.root),
parent_root: node.parent,
justified_epoch: node.justified_checkpoint.epoch,
finalized_epoch: node.finalized_checkpoint.epoch,
weight: node.weight,
Expand Down
10 changes: 0 additions & 10 deletions consensus/fork_choice/src/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,6 @@ pub static FORK_CHOICE_QUEUED_ATTESTATIONS: LazyLock<Result<IntGauge>> = LazyLoc
pub static FORK_CHOICE_NODES: LazyLock<Result<IntGauge>> = LazyLock::new(|| {
try_create_int_gauge("fork_choice_nodes", "Current count of proto array nodes")
});
pub static FORK_CHOICE_INDICES: LazyLock<Result<IntGauge>> = LazyLock::new(|| {
try_create_int_gauge(
"fork_choice_indices",
"Current count of proto array indices",
)
});
pub static FORK_CHOICE_DEQUEUED_ATTESTATIONS: LazyLock<Result<IntCounter>> = LazyLock::new(|| {
try_create_int_counter(
"fork_choice_dequeued_attestations_total",
Expand Down Expand Up @@ -55,8 +49,4 @@ pub fn scrape_for_metrics<T: ForkChoiceStore<E>, E: EthSpec>(fork_choice: &ForkC
&FORK_CHOICE_NODES,
fork_choice.proto_array().core_proto_array().nodes.len() as i64,
);
set_gauge(
&FORK_CHOICE_INDICES,
fork_choice.proto_array().core_proto_array().indices.len() as i64,
);
}
16 changes: 8 additions & 8 deletions consensus/proto_array/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,20 @@ pub enum Error {
JustifiedNodeUnknown(Hash256),
NodeUnknown(Hash256),
InvalidFinalizedRootChange,
InvalidNodeIndex(usize),
InvalidNodeIndex(Hash256),
InvalidParentIndex(usize),
InvalidBestChildIndex(usize),
InvalidJustifiedIndex(usize),
InvalidBestDescendant(usize),
InvalidParentDelta(usize),
InvalidNodeDelta(usize),
InvalidJustifiedIndex(Hash256),
InvalidBestDescendant(Hash256),
InvalidParentDelta(Hash256),
InvalidNodeDelta(Hash256),
MissingJustifiedCheckpoint,
MissingFinalizedCheckpoint,
DeltaOverflow(usize),
ProposerBoostOverflow(usize),
DeltaOverflow(Hash256),
ProposerBoostOverflow(Hash256),
ReOrgThresholdOverflow,
IndexOverflow(&'static str),
InvalidExecutionDeltaOverflow(usize),
InvalidExecutionDeltaOverflow(Hash256),
InvalidDeltaLen {
deltas: usize,
indices: usize,
Expand Down
Loading
Loading