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: Added metric for concurrent keysigns #1954

Merged
merged 6 commits into from
Mar 28, 2024
Merged

feat: Added metric for concurrent keysigns #1954

merged 6 commits into from
Mar 28, 2024

Conversation

kevinssgh
Copy link
Contributor

@kevinssgh kevinssgh commented Mar 27, 2024

Description

  1. Keysign manager was added to keep track of outbound signature attempts
  2. A new metric was integrated to export the number of active signatures.

Closes: #1604

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Include instructions and any relevant details so others can reproduce.

  • Tested CCTX in localnet
  • Tested in development environment
  • Go unit tests
  • Go integration tests
  • Tested via GitHub Actions
/usr/local/bin # curl localhost:8886/metrics | grep zetaclient_num_active_message_signs
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 18048    0 18048    0     0  7861k      0 --:--:-- --:--:-- --:--:-- 8812k
# HELP zetaclient_num_active_message_signs Number of concurrent key signs
# TYPE zetaclient_num_active_message_signs gauge
zetaclient_num_active_message_signs 4

Checklist:

  • I have added unit tests that prove my fix feature works

Copy link

!!!WARNING!!!
nosec detected in the following files: zetaclient/tss/tss_signer.go

Be very careful about using #nosec in code. It can be a quick way to suppress security warnings and move forward with development, it should be employed with caution. Suppressing warnings with #nosec can hide potentially serious vulnerabilities. Only use #nosec when you're absolutely certain that the security issue is either a false positive or has been mitigated in another way.

Only suppress a single rule (or a specific set of rules) within a section of code, while continuing to scan for other problems. To do this, you can list the rule(s) to be suppressed within the #nosec annotation, e.g: /* #nosec G401 */ or //#nosec G201 G202 G203
Broad #nosec annotations should be avoided, as they can hide other vulnerabilities. The CI will block you from merging this PR until you remove #nosec annotations that do not target specific rules.

Pay extra attention to the way #nosec is being used in the files listed above.

@github-actions github-actions bot added the nosec label Mar 27, 2024
Copy link

codecov bot commented Mar 27, 2024

Codecov Report

Attention: Patch coverage is 60.60606% with 13 lines in your changes are missing coverage. Please review.

Project coverage is 52.01%. Comparing base (0759af2) to head (ca62d41).

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #1954      +/-   ##
===========================================
+ Coverage    51.96%   52.01%   +0.04%     
===========================================
  Files          234      235       +1     
  Lines        13355    13382      +27     
===========================================
+ Hits          6940     6960      +20     
- Misses        5980     5987       +7     
  Partials       435      435              
Files Coverage Δ
zetaclient/metrics/metrics.go 77.77% <ø> (ø)
zetaclient/tss/tss_keysign_manager.go 100.00% <100.00%> (ø)
zetaclient/tss/tss_signer.go 10.22% <0.00%> (-0.21%) ⬇️

Copy link
Contributor

@kingpinXD kingpinXD left a comment

Choose a reason for hiding this comment

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

lgtm , left a minor comment

zetaclient/tss/tss_keysign_manager.go Outdated Show resolved Hide resolved
zetaclient/tss/tss_signer.go Outdated Show resolved Hide resolved
@lumtis
Copy link
Member

lumtis commented Mar 28, 2024

@kevinssgh can we target the branch to v16.0.0? to include it in the next release

Copy link
Contributor

@skosito skosito left a comment

Choose a reason for hiding this comment

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

just couple small comments and questions

zetaclient/tss/tss_keysign_manager.go Show resolved Hide resolved
zetaclient/tss/tss_signer.go Outdated Show resolved Hide resolved
zetaclient/tss/tss_keysign_manager.go Outdated Show resolved Hide resolved
@kevinssgh
Copy link
Contributor Author

@kevinssgh can we target the branch to v16.0.0? to include it in the next release

#1960

@lumtis lumtis merged commit 1e0d859 into develop Mar 28, 2024
21 checks passed
@lumtis lumtis deleted the keysign-metric branch March 28, 2024 21:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Track concurrent keysigns as a metric
4 participants