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

Add signature verification/aggregation metrics and panic handlers #551

Merged
merged 4 commits into from
Aug 8, 2024

Conversation

Stebalien
Copy link
Member

I threw in the panic handlers just to be complete, I've seen too many panics in cryptography code.

I threw in the panic handlers just to be complete, I've seen too many
panics in cryptography code.
Comment on lines 31 to 39
verifyAggregate: measurements.Must(meter.Int64Histogram(
"f3_blssig_verify_aggregate",
metric.WithDescription("Aggregate signatures verified."),
)),
aggregate: measurements.Must(meter.Int64Histogram(
"f3_blssig_aggregate",
metric.WithDescription("Signatures aggregated."),
)),
}
Copy link
Member Author

Choose a reason for hiding this comment

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

do we need custom buckets here?

Copy link
Member

Choose a reason for hiding this comment

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

Probably yes, adjusted based on expected network size and quorum? We can refine later if defaults don't make sense.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll leave the defaults for now.

@Stebalien Stebalien requested a review from Kubuxu August 8, 2024 16:27
Copy link

codecov bot commented Aug 8, 2024

Codecov Report

Attention: Patch coverage is 64.15094% with 19 lines in your changes missing coverage. Please review.

Project coverage is 80.31%. Comparing base (afcf8f7) to head (c92bb99).
Report is 2 commits behind head on main.

Files Patch % Lines
blssig/aggregation.go 62.06% 9 Missing and 2 partials ⚠️
blssig/verifier.go 66.66% 7 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #551      +/-   ##
==========================================
- Coverage   80.61%   80.31%   -0.30%     
==========================================
  Files          46       47       +1     
  Lines        4230     4324      +94     
==========================================
+ Hits         3410     3473      +63     
- Misses        495      518      +23     
- Partials      325      333       +8     
Files Coverage Δ
internal/measurements/attributes.go 80.00% <ø> (ø)
blssig/verifier.go 72.54% <66.66%> (-8.10%) ⬇️
blssig/aggregation.go 67.18% <62.06%> (-5.79%) ⬇️

... and 7 files with indirect coverage changes

blssig/metrics.go Outdated Show resolved Hide resolved
blssig/metrics.go Outdated Show resolved Hide resolved
Comment on lines 31 to 39
verifyAggregate: measurements.Must(meter.Int64Histogram(
"f3_blssig_verify_aggregate",
metric.WithDescription("Aggregate signatures verified."),
)),
aggregate: measurements.Must(meter.Int64Histogram(
"f3_blssig_aggregate",
metric.WithDescription("Signatures aggregated."),
)),
}
Copy link
Member

Choose a reason for hiding this comment

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

Probably yes, adjusted based on expected network size and quorum? We can refine later if defaults don't make sense.

Stebalien and others added 2 commits August 8, 2024 17:17
Co-authored-by: Masih H. Derkani <m@derkani.org>
Co-authored-by: Masih H. Derkani <m@derkani.org>
@Stebalien Stebalien enabled auto-merge August 8, 2024 17:23
@Stebalien Stebalien added this pull request to the merge queue Aug 8, 2024
@Kubuxu
Copy link
Contributor

Kubuxu commented Aug 8, 2024

I would prefer if the cache had explicit # cache queries and # cache hits to allow calculating the cache hit ratio.

@Kubuxu
Copy link
Contributor

Kubuxu commented Aug 8, 2024

Ahh, I see, you are doing it though a label, I guess it makes sense.

Merged via the queue into main with commit dadd680 Aug 8, 2024
12 of 13 checks passed
@Stebalien Stebalien deleted the steb/sig-metrics-and-panics branch August 8, 2024 17:32
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