-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
x/stake: Add another function for UpdateValidator if cliff validator doesn't exist #2293
Comments
Agreed this could be improved a bit. ref: #1923 |
good idea! |
Concept ACK. Maybe there are other places in staking we could similarly simplify. |
Possibly superseded issue if we remove cliff validator all-together.... |
Maybe, but I think the cliff validator logic is a substantive performance improvement for the majority of likely real calls of |
@cwgoes let's discuss this more - of course we want the performance - however I think there may be other ways which we could get (nearly) the same performance increase without having all the headache and code complexity of the cliff validator - see thoughts here: #2312 Let's talk about it in today's call however |
Closing in favor of #2312, this becomes kind of irrelevant since we no longer have a reserved "cliff validator" seat, its just the 100th element of the arr, and we're switching to the end-block stuff. |
Summary
I feel like we can significantly improve the code clarity for UpdateValidator if we separate concerns there, and have a different method if the cliff validator already exists, and doesn't already exist. This is evidenced by there being 3 "if cliff val exists" calls in the function.
/cc @rigelrozanski @cwgoes @alexanderbez
The text was updated successfully, but these errors were encountered: