-
Notifications
You must be signed in to change notification settings - Fork 611
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
[ValSet-Pref] Module Wired up and created MsgSetValidatorSetPreference #2892
Conversation
f18a463
to
5a03823
Compare
11fec5c
to
634f626
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.
Looking good! Left some initial comments, please take a look 🌮
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.
Have a few changes, one in particular that is a must. Please lmk if you have any questions!
As a side note kind of unrelated to this particular PR, this concept of storing account valset preferences on chain is kind of disturbing to me. I could be wrong / misunderstanding, but wouldn't it be extremely simple for someone to spam create accounts and set validator preferences to preference all 150 validators? I don't even think the account would need to have any balance as it stands right? I think we need to rethink the implementation if this is the case
cc: @p0mvn @mattverse
Thank you @czarcas7ic for the feedback! Addressed everything here: I do think we should have an upper limit for the # of validator we can have in a set. Yea the account donot need to have any balance to create a validator set. I can change it based on any design decision we end up making |
I am going to tag @ValarDragon for his opinion on potential attack surface this would provide. I am not concerned about the number of validators an account can set. Even if it was two, if someone could create unlimited accounts with two validator preferences, this would bloat state significantly. |
dae4663
to
dcd44c5
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.
Left second round of reviews, overall looking good, I think we just need test cases for the community pool funding for val set creation fee
My stance is that I'm not pretty much concerned about this, since we have the val set creation fee |
Yes, as long as fee is implemented I am also not concerned |
Thank you @mattverse for the feedback. Resolved all you feedback except replacing I want to see if there is a much easier way of doing this other than sorting and comparing, maybe some built in function or osmo util function that i'm not aware of |
Can you assign me for review once r4r? |
a32cf1e
to
623635a
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.
My question on the validator_set.go is the only important point I had, all others are low pri, nice work :)
e32b5d6
to
c64682a
Compare
Thank you @alexanderbez for your feedback! implemented all of it here |
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.
LGTM! Did we decide to limit the number of validators one can split delegate to? I dont have any preference for or against, I just remember this being talked about and I didn't see anything in ref to this in the code
@alexanderbez are you able to check if your required change was addressed so this can get merged? |
Dev seem to not care much about it so i didn't include it. If this discussion opens up in the future i will add it |
2a48057
to
091c2cc
Compare
091c2cc
to
892ae00
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.
Left a few minor reviews. I think there are probably a few remaining spots that can be cleaned up. So I'll give this a preliminary ACK
Thank you @alexanderbez resolved all your comments here |
Merging, thanks again @stackman27 ! |
osmosis-labs#2892) * Module Wired up and created MsgSetValidatorSetPreference * [ValSet-Pref] Module Wired up and created MsgSetValidatorSetPreference * bez feedback
Part of : #2579
What is the purpose of the change
This PR does the following;
Brief Changelog
n/a
Testing and Verifying
Documentation and Release Note
Unreleased
section inCHANGELOG.md
? (yes / no)x/<module>/spec/
) / Osmosis docs repo / not documented)