-
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: Use genesis role designations for autodeploy #2652
Conversation
dcaad94
to
b41ee58
Compare
tested changes against nspcc-dev/neofs-dev-env#282 and got interested result
and with:
and with
so, everything seems to be OK.. but initial transfer breaks with neofs-node/pkg/morph/deploy/funds.go Line 59 in 8d9a2bc
i compared transfer transactions with (when notary request with tx is accepted) and without (hang case) the option. Without:
and with:
i checked tx scripts: in both cases they are same. The only observable diff from logs is that no-option case writes two messages overall, for now i have no idea why process stucks. Need more deep research with fresh head. Help is appreciated |
this is probably related to Notary service non-start, figuring this out with @AnnaShaleva and @roman-khimov ... |
b41ee58
to
1f709c6
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2652 +/- ##
==========================================
+ Coverage 30.22% 30.23% +0.01%
==========================================
Files 406 406
Lines 30025 30033 +8
==========================================
+ Hits 9075 9081 +6
- Misses 20170 20171 +1
- Partials 780 781 +1 ☔ View full report in Codecov by Sentry. |
1f709c6
to
0c5928b
Compare
config/example/ir.yaml
Outdated
0: 7 # Maps chain height to number of consensus nodes. Values must be positive up to 'committee' size. | ||
1: 5 |
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.
It can't be 7 and then 5. Please, read the documentation to validators history and committee history option.
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.
fixed
return fmt.Errorf("value %d is out of allowable range", num) | ||
} else if num > uint32(c.Committee.Len()) { |
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.
I don;t quite like these repeating checks. We have https://github.com/nspcc-dev/neo-go/blob/6c0c2a6a98b0799f1e19dfeac8956169f1aa4a7a/pkg/config/protocol_config.go#L80, and if some check is missing there, then create an issue and we'll add more checks.
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.
not this issue's point but interesting, moved to #2666
@@ -77,6 +77,9 @@ morph: | |||
ping: # Optional settings of pinging mechanism | |||
interval: 30s # Optional time period between pings. Defaults to 30s. Must not be negative | |||
timeout: 90s # Optional time period to wait for pong. Defaults to 1m. Must not be negative | |||
set_roles_in_genesis: true # Optional flag for designating P2PNotary and NeoFSAlphabet roles to all |
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.
AFAIU, genesis-based roles are planned to be a standard for the network. How about reverting the meaning of this setting so that it can be skipped in default config? E.g. s/set_roles_in_genesis
/skip_genesis_roles
.
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.
propose this in #2643 pls. To me, we aint ready yet to use genesis roles everywhere by default
if cfg.ValidatorsHistory != nil { | ||
cfgBaseProto.ValidatorsHistory = make(map[uint32]uint32, len(cfg.ValidatorsHistory)) | ||
for height, num := range cfg.ValidatorsHistory { | ||
cfgBaseProto.ValidatorsHistory[height] = num | ||
} | ||
|
||
// value checked above in function | ||
genesisValidatorsCount = cfg.ValidatorsHistory[0] |
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.
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.
used
5bb5eb2
to
37a3098
Compare
Conflicts though. |
37a3098
to
65513e8
Compare
Add requirement for heights to be multiples of the committee size. Require value for the zero (genesis) height to be set. Clarify that values must not exceed the committee. Signed-off-by: Leonard Lyubich <[email protected]>
The roles are required to be set for the validators in almost all NeoFS environments. Previously, this required dedicated transaction signed by the committee majority. Starting from release v0.103.0, Neo Go support protocol extension that allows to designate various roles to the various accounts on blockchain genesis (zero height). With this feature, Inner Ring running in local consensus may be at the configuration level. Add `set_roles_in_genesis` value to `morph.consensus` section providing option to Inner Ring to start blockchain with P2PNotary and NeoFSAlphabet roles designated to the genesis block's validators. Closes #2643. Signed-off-by: Leonard Lyubich <[email protected]>
65513e8
to
482e1f7
Compare
No description provided.