-
Notifications
You must be signed in to change notification settings - Fork 44
Record signatures origin in the signature processor #2489
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
Record signatures origin in the signature processor #2489
Conversation
21857b1
to
3a42c30
Compare
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.
Pull Request Overview
This PR adds tracking of signature origins by injecting a MetricsService
into the signature processor and labeling metrics with the consumer’s origin.
- Inject
MetricsService
intoSequentialSignatureProcessor
and increment a labeled counter per processed signature - Extend
SignatureConsumer
withget_origin_network
, update noop/fake implementations - Update metrics definitions to use specific origin label constants and adjust HTTP routes/tests to use a fixed
"HTTP"
origin
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
src/services/signature_processor.rs | Inject and store metrics_service , record origin‐labeled metrics |
src/services/signature_consumer/interface.rs | Add get_origin_network() to trait |
src/services/signature_consumer/noop.rs | Implement get_origin_network() returning "NOOP" |
src/services/signature_consumer/fake.rs | Implement get_origin_network() returning "FAKE" |
src/metrics/service.rs | Define distinct origin label constants and update metric builders |
src/http_server/routes/signatures_routes.rs | Remove dynamic origin header, hard-code "HTTP" for metrics |
src/dependency_injection/builder/enablers/misc.rs | Pass metrics_service into SequentialSignatureProcessor::new |
3a42c30
to
c79725b
Compare
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.
LGTM 👍
mithril-aggregator/src/services/signature_consumer/interface.rs
Outdated
Show resolved
Hide resolved
c79725b
to
03d9d83
Compare
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.
LGTM 👍
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.
LGTM
03d9d83
to
db33b96
Compare
* mithril-aggregator from `0.7.52` to `0.7.53`
Content
We want to record the number of incoming signatures coming from the DMQ network. Once the DMQ is delivering enough signatures to reach the quorum, we will be able to sunset signature publication to the aggregator REST API.
SignatureConsumer
trait to expose the origin metric of the consumerget_signature_registration_total_received_since_startup
metric with the origin for every signature processedsignature_registration_total_received_since_startup
incremented in HTTP server when calling register-signatures withHTTP
value instead oforigin_tag
origin_tag
header in register-signatures endpointPre-submit checklist
Closes #2478