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

Strengthen Validation Of Gossip Scoring Parameters #410

Merged
merged 5 commits into from
Mar 31, 2021

Conversation

nisdas
Copy link
Contributor

@nisdas nisdas commented Mar 31, 2021

During further testing of our parameters for peer scoring, we came across some unusual scores for a significant amount of our peers, with a large amount giving their score as NaN. On further investigation it came about that when initializing the scoring parameter there had been an arithmetic error when determining the parameter. This lead to the parameter being initialized with a negative infinite value. The parameter validation was unable to capture this, which is the main reason this PR has been opened up.

  • Add in validation for both NaN and Infinite floating point values and throw an error if any of the topic parameters are initialized as such.
  • Add regression test for it.

@vyzo
Copy link
Collaborator

vyzo commented Mar 31, 2021

@nisdas do you mind rebasing on master? I just merged #406 which disables the flaky test that keeps failing on travis.

@vyzo vyzo merged commit eda6974 into libp2p:master Mar 31, 2021
@vyzo
Copy link
Collaborator

vyzo commented Mar 31, 2021

thank you!

@nisdas nisdas deleted the strengthenValidation branch April 1, 2021 04:52
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.

2 participants