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/multikey metrics #5362

Merged
merged 29 commits into from Jul 11, 2023
Merged

Feat/multikey metrics #5362

merged 29 commits into from Jul 11, 2023

Conversation

sstanculeanu
Copy link
Contributor

@sstanculeanu sstanculeanu commented Jun 20, 2023

Reasoning behind the pull request

  • no info about the managed keys at API level

Proposed changes

  • added multiple new endpoints:
    • node/managed-keys/count for the total number of managed keys
    • node/managed-keys for all keys managed by the node
    • node/managed-keys/eligible for the eligible keys managed, in the current epoch, from the same shard as the node
    • node/managed-keys/waiting for the waiting keys managed, in a the current epoch, from the same shard as the node
  • also updated leader metrics to keep track of managed keys leaders

Testing procedure

  • standard system test
  • to be checked the new metrics both on multikey and regular(should see empty/0 on regular mode)
  • to be checked that the following metrics are updated when a managed key is leader: erd_count_consensus, erd_consensus_state, erd_count_consensus_accepted_blocks, erd_count_leader, erd_consensus_round_state,

Pre-requisites

Based on the Contributing Guidelines the PR author and the reviewers must check the following requirements are met:

  • was the PR targeted to the correct branch?
  • if this is a larger feature that probably needs more than one PR, is there a feat branch created?
  • if this is a feat branch merging, do all satellite projects have a proper tag inside go.mod?

@codecov
Copy link

codecov bot commented Jun 20, 2023

Codecov Report

Patch coverage: 89.76% and project coverage change: +0.03 🎉

Comparison is base (5a746ef) 79.97% compared to head (6a4fbb8) 80.00%.

❗ Current head 6a4fbb8 differs from pull request most recent head b09daf1. Consider uploading reports for the commit b09daf1 to get more accurate results

Additional details and impacted files
@@              Coverage Diff              @@
##           rc/v1.6.0    #5362      +/-   ##
=============================================
+ Coverage      79.97%   80.00%   +0.03%     
=============================================
  Files            703      704       +1     
  Lines          92672    92828     +156     
=============================================
+ Hits           74113    74270     +157     
- Misses         13241    13242       +1     
+ Partials        5318     5316       -2     
Impacted Files Coverage Δ
facade/initial/initialNodeFacade.go 93.82% <0.00%> (-4.88%) ⬇️
facade/nodeFacade.go 94.92% <0.00%> (-2.33%) ⬇️
outport/process/outportDataProvider.go 51.04% <ø> (ø)
factory/status/statusComponentsHandler.go 75.51% <75.00%> (-0.02%) ⬇️
factory/status/statusComponents.go 95.30% <88.23%> (-1.05%) ⬇️
node/external/nodeApiResolver.go 69.09% <91.30%> (+3.59%) ⬆️
api/groups/nodeGroup.go 100.00% <100.00%> (ø)
consensus/spos/bls/subroundStartRound.go 75.63% <100.00%> (+7.26%) ⬆️
factory/api/apiResolverFactory.go 93.83% <100.00%> (+0.01%) ⬆️
factory/processing/blockProcessorCreator.go 82.23% <100.00%> (+0.04%) ⬆️
... and 6 more

... and 4 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

sstanculeanu and others added 3 commits June 21, 2023 14:37
…into merge_rc160_into_feat_multikey_metrics_2023.06.22
…ey_metrics_2023.06.22

Merge rc160 into feat multikey metrics 2023.06.22
@sstanculeanu sstanculeanu marked this pull request as ready for review June 22, 2023 08:40
@@ -1043,6 +1043,7 @@ func (sp *shardProcessor) CommitBlock(
highestFinalBlockNonce,
lastCrossNotarizedHeader,
header,
sp.managedPeersHolder,
Copy link
Contributor

Choose a reason for hiding this comment

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

you forgot to set the managedPeersHolder value and is always nil. Failed at system testnet.
Please add this line on L121:

managedPeersHolder: arguments.ManagedPeersHolder

something similar to what we have on metablock.go L137

Copy link
Contributor Author

Choose a reason for hiding this comment

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

🤦‍♂️ fixed in #5371

iulianpascalau
iulianpascalau previously approved these changes Jun 22, 2023
sstanculeanu and others added 2 commits June 26, 2023 15:49
…into merge_rc160_into_feat_multikey_metrics_2023.06.26
…ey_metrics_2023.06.26

Merge rc160 into feat multikey metrics 2023.06.26
iulianpascalau
iulianpascalau previously approved these changes Jun 28, 2023
sstanculeanu and others added 2 commits July 7, 2023 17:40
…into merge_rc160_into_feat_multikey_metrics_2023.07.07

# Conflicts:
#	errors/errors.go
…ey_metrics_2023.07.07

Merge rc160 into feat multikey metrics 2023.07.07
sstanculeanu and others added 3 commits July 10, 2023 09:52
…into merge_rc160_into_feat_multikey_metrics_2023.07.10
…ey_metrics_2023.07.10

Merge rc160 into feat multikey metrics 2023.07.10
…into merge_rc160_into_feat_multikey_metrics_2023.05.11
Copy link
Collaborator

@gabi-vuls gabi-vuls left a comment

Choose a reason for hiding this comment

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

System test passed.
@@ Log scanner @@

multikey_metrics

================================================================================

  • Known Warnings 12
  • New Warnings 4
  • Known Errors 1
  • New Errors 1
  • Panics 0
    ================================================================================
  • block hash does not match 9345
  • wrong nonce in block 4028
  • miniblocks does not match 0
  • num miniblocks does not match 0
  • miniblock hash does not match 0
  • block bodies does not match 0
  • receipts hash missmatch 0
    ================================================================================
  • No jailed nodes on the testnet
    ================================================================================

…ey_metrics_2023.05.11

Merge rc160 into feat multikey metrics 2023.05.11
@sstanculeanu sstanculeanu merged commit 21b5a03 into rc/v1.6.0 Jul 11, 2023
6 checks passed
@sstanculeanu sstanculeanu deleted the feat/multikey_metrics branch July 11, 2023 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants