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

Fixed managedPeersHolder for badly configured node #5597

Merged
merged 3 commits into from Sep 26, 2023

Conversation

iulianpascalau
Copy link
Contributor

@iulianpascalau iulianpascalau commented Sep 21, 2023

Reasoning behind the pull request

  • fixed managed peers holder to avoid panics in case of a badly configured node where the identities are set but the actual .pem file containing the keys is not provided

Proposed changes

  • separated the curated & valid data map from the provided identities

Testing procedure

  • standard system test with multikey
  • start a metachain node providing a named identity like
[[NamedIdentity]]
   # Identity represents the keybase/GitHub identity for the current NamedIdentity
   Identity = "test"
   # NodeName represents the name that will be given to the names of the current identity
   NodeName = "test"
   # BLSKeys represents the BLS keys assigned to the current NamedIdentity
   BLSKeys = [
      "<BLS1>",
      "<BLS2>",
...
      "<BLSn>"
   ]

where <BLS1>, <BLS2> ... <BLSn> are all BLS keys from the testnet in hex format
The node should sync and not panic.

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 Sep 21, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (361cc40) 80.09% compared to head (b0e4030) 80.09%.
Report is 1 commits behind head on rc/v1.6.0.

❗ Current head b0e4030 differs from pull request most recent head 97fa3d6. Consider uploading reports for the commit 97fa3d6 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           rc/v1.6.0    #5597   +/-   ##
==========================================
  Coverage      80.09%   80.09%           
==========================================
  Files            706      706           
  Lines          93722    93724    +2     
==========================================
+ Hits           75064    75068    +4     
+ Misses         13322    13321    -1     
+ Partials        5336     5335    -1     
Files Coverage Δ
keysManagement/managedPeersHolder.go 98.93% <100.00%> (+0.01%) ⬆️

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

Normal allin test: v1.5.13-dev-config-8c685c8e00 -> fix-managed-peers-holder-cf9cdabc67

--- Specific errors ---

block hash does not match 12420
wrong nonce in block 4273
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

/------/

--- Statistics ---

Nr. of all ERRORS: 0
Nr. of all WARNS: 134
Nr. of new ERRORS: 0
Nr. of new WARNS: 0
Nr. of PANICS: 0

/------/

--- ERRORS ---

/------/

--- WARNINGS ---

/------/

@iulianpascalau iulianpascalau merged commit 629e57b into rc/v1.6.0 Sep 26, 2023
6 checks passed
@iulianpascalau iulianpascalau deleted the fix-managed-peers-holder branch September 26, 2023 12:49
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