-
Notifications
You must be signed in to change notification settings - Fork 188
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
feat: add insturmentation to attestation and epoch quote mem pools #9055
base: master
Are you sure you want to change the base?
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
*/ | ||
public recordAddedTxs(status: string, count = 1) { | ||
public recordAddedObjectsWithStatus(status: string, count = 1) { |
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.
Bit of a nit, but I don't love needing 4 functions to add/remove with/without status. Can we just expose the raw this.objects.add
function?
@@ -84,6 +84,11 @@ export class EpochProofQuotePayload { | |||
}; | |||
} | |||
|
|||
getSize(): number { | |||
// 32 bytes for epochToProve, 32 bytes for validUntilSlot, 32 bytes for bondAmount, 20 bytes for prover, 4 bytes for basisPointFee | |||
return 32 + 32 + 32 + EthAddress.SIZE_IN_BYTES + 4; |
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.
This kind of stuff scares me for when things get out of sync. It doesn't feel like this should be called often- can we just call toBuffer
and get length?
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.
Could cache the result if performance was a concern.
Overview
Makes the txpool instrumentation generic over the txpool object, then enables metrics on pool contents for our other mempools