-
Notifications
You must be signed in to change notification settings - Fork 38
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
ir/config: Fix unenforced morph.consensus.p2p.peers.min
config default
#2856
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2856 +/- ##
==========================================
+ Coverage 23.63% 23.65% +0.01%
==========================================
Files 770 770
Lines 44506 44510 +4
==========================================
+ Hits 10519 10527 +8
+ Misses 33132 33129 -3
+ Partials 855 854 -1 ☔ View full report in Codecov by Sentry. |
As declared in NeoFS IR configuration, min required number of peer connections must default to ⌈2/3N-1⌉. Previously, IR app did not set default value when `p2p` and/or `p2p.peers` sections were omitted, only when `p2p.peers` is presented and `min` value is missing. This was incorrect and also unresponsive to the admin: a forgotten value setting had the effect of no consensus and no new blocks. This fixes the behavior: now value is recalculated in any setting without a field. Note that while explicitly specifying zero is problematic in general, it does not default to preserve admin intent. Signed-off-by: Leonard Lyubich <[email protected]>
438171f
to
3930c67
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.
Checked that PR does what it says but do not know if some default values should be enforced in general.
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.
Yes, we need a safe default here. It was intended, but just failed to be correctly implemented.
Originally posted by @evgeniiz321
following P2P config
led to no consensus for 4x setup although it should have. Making it
fixed the problem. Thus, the declared default was not fulfilled
neofs-node/config/example/ir.yaml
Lines 76 to 78 in 9a9a5d5