-
-
Notifications
You must be signed in to change notification settings - Fork 385
feat: add FOCIL beacon metrics #8062
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: focil
Are you sure you want to change the base?
Conversation
Fork-choice metrics are temporary and expected to be moved to beacon after beacon specs #4351 merge and implementation. |
metrics?.eip7805.inclusionListProposed.inc(); | ||
|
||
chain.emitter.emit(routes.events.EventType.inclusionList, { | ||
version: config.getForkName(signedInclusionList.message.slot), | ||
data: signedInclusionList, | ||
}); | ||
|
||
await network.publishInclusionList(signedInclusionList); | ||
metrics?.eip7805.inclusionListBroadcasted.inc(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
inclusionListProposed
and inclusionListBroadcasted
seem to duplicate each other. I would like to hear from FOCIL team and other clients if it makes sense to have both.
inclusionListValid: register.counter<{source: InclusionListSource}>({ | ||
name: "beacon_valid_inclusion_lists_total", | ||
help: "Total number of valid inclusion lists", | ||
labelNames: ["source"], | ||
}), | ||
inclusionListInvalid: register.counter<{source: InclusionListSource; reason: InvalidInclusionListReason}>({ | ||
name: "beacon_invalid_inclusion_lists_total", | ||
help: "Total number of invalid inclusion lists", | ||
labelNames: ["source", "reason"], | ||
}), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need these metrics per slot
*/ | ||
export function getMetrics(register: MetricsRegister) { | ||
return { | ||
inclusionListEquivocating: register.counter<{source: FCInclusionListSource}>({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need this metric per slot
const {slot, validatorIndex, transactions, inclusionListCommitteeRoot} = inclusionList.message; | ||
|
||
// [REJECT] The size of message is within upperbound MAX_BYTES_PER_INCLUSION_LIST | ||
// TODO EIP-7805: spec is outdated, we need to check total size of all transactions | ||
const inclusionListSize = transactions.reduce((total, transaction) => total + transaction.byteLength, 0); | ||
if (inclusionListSize > chain.config.MAX_BYTES_PER_INCLUSION_LIST) { | ||
metrics?.eip7805.inclusionListInvalid.inc({source, reason: InvalidInclusionListReason.maxSizeExceeded}); | ||
metrics?.eip7805.invalidInclusionListByteSize.inc(inclusionListSize); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need source
and reason
for invalidInclusionListByteSize
as well? Question for the FOCIL team.
getInclusionListV1Requests: register.counter({ | ||
name: "beacon_engine_getInclusionListV1_requests_total", | ||
help: "Total number of getInclusionListV1 requests sent", | ||
}), | ||
getInclusionListV1ResponseTime: register.histogram({ | ||
name: "beacon_engine_getInclusionListV1_response_time_seconds", | ||
help: "Response time of getInclusionListV1 requests", | ||
buckets: [0.01, 0.05, 0.1, 0.5, 1, 2.5, 5, 7.5], | ||
}), | ||
updatePayloadWithInclusionListV1Requests: register.counter({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need responses count here? Seems like there shouldn't be any losses for engine api.
Motivation
Add FOCIL metrics from beacon metrics specs to observe FOCIL.
Description
This PR adds the list of FOCIL beacon metrics specs #16.
Steps to test or reproduce
Observe metrics using Kurtosis FOCIL dashboard.