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

Performance Metrics for Prysm #11377

Merged
merged 19 commits into from
Sep 1, 2022
Merged

Performance Metrics for Prysm #11377

merged 19 commits into from
Sep 1, 2022

Conversation

rauljordan
Copy link
Contributor

@rauljordan rauljordan commented Aug 31, 2022

What does this PR do? Why is it needed?

This PR introduces new metrics to track performance and errors from common operations such as block processing and gossip verification for blocks and attestations. Although we already track gossip verification errors in total via metrics, this PR adds more granular error counters for attestation verification.

Which issues(s) does this PR fix?

Part of #11367

@@ -253,16 +255,17 @@ func (s *Service) validateBeaconBlock(ctx context.Context, blk interfaces.Signed

// validateBellatrixBeaconBlock validates the block for the Bellatrix fork.
// spec code:
// If the execution is enabled for the block -- i.e. is_execution_enabled(state, block.body) then validate the following:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gofmt did this

@rauljordan rauljordan changed the title Performance Metrics for Gossiped Objects Performance Metrics for Prysm Aug 31, 2022
@rauljordan rauljordan marked this pull request as ready for review August 31, 2022 23:44
@rauljordan rauljordan requested a review from a team as a code owner August 31, 2022 23:44
beacon-chain/db/kv/blocks.go Outdated Show resolved Hide resolved
beacon-chain/db/kv/blocks.go Outdated Show resolved Hide resolved
beacon-chain/sync/metrics.go Outdated Show resolved Hide resolved
beacon-chain/sync/metrics.go Outdated Show resolved Hide resolved
beacon-chain/sync/metrics.go Outdated Show resolved Hide resolved
@@ -75,8 +77,11 @@ func (s *Service) validateAggregateAndProof(ctx context.Context, pid peer.ID, ms

// Attestation's slot is within ATTESTATION_PROPAGATION_SLOT_RANGE and early attestation
// processing tolerance.
if err := helpers.ValidateAttestationTime(m.Message.Aggregate.Data.Slot, s.cfg.chain.GenesisTime(),
earlyAttestationProcessingTolerance); err != nil {
if err := helpers.ValidateAttestationTime(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure why github is showing a diff here, did anything change ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah split up the lines

@@ -114,6 +120,8 @@ func (s *Service) validateAggregateAndProof(ctx context.Context, pid peer.ID, ms

msg.ValidatorData = m

aggregateAttestationVerificationGossipSummary.Observe(float64(prysmTime.Since(receivedTime).Milliseconds()))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be quite noisy, we receive a lot of aggregates per slot. Doing a time duration measurement might be pretty noisy

@@ -164,6 +168,8 @@ func (s *Service) validateCommitteeIndexBeaconAttestation(ctx context.Context, p

msg.ValidatorData = att

unaggregatedAttestationVerificationGossipSummary.Observe(float64(prysmTime.Since(receivedTime).Milliseconds()))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here too

nisdas
nisdas previously approved these changes Sep 1, 2022
@prylabs-bulldozer prylabs-bulldozer bot merged commit bcaae1c into develop Sep 1, 2022
@delete-merged-branch delete-merged-branch bot deleted the metrics-performance branch September 1, 2022 01:26
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.

3 participants