Skip to content
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

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

Maddiaa0
Copy link
Member

@Maddiaa0 Maddiaa0 commented Oct 7, 2024

Overview

Makes the txpool instrumentation generic over the txpool object, then enables metrics on pool contents for our other mempools

Copy link
Member Author

Maddiaa0 commented Oct 7, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @Maddiaa0 and the rest of your teammates on Graphite Graphite

@Maddiaa0 Maddiaa0 changed the title feat: add insturmentation to other mem pools feat: add insturmentation to attestation and epoch quote mem pools Oct 7, 2024
@Maddiaa0 Maddiaa0 marked this pull request as ready for review October 8, 2024 18:02
@Maddiaa0 Maddiaa0 enabled auto-merge (squash) October 8, 2024 23:33
*/
public recordAddedTxs(status: string, count = 1) {
public recordAddedObjectsWithStatus(status: string, count = 1) {
Copy link
Contributor

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;
Copy link
Contributor

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?

Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants