Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Group module spec #5236
Group module spec #5236
Changes from 1 commit
9df4207
baa8337
02748b2
f7461b2
0e1d676
72de7af
8fb79a8
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Please define behavior if NewAdmin is unset (I assume don't change Admin).
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.
We can either make it a no-op like you're proposing or this would seal the group and make it impossible to change? Is that desirable? I think that would probably be unexpected behavior so for now I will define it as a no-op. If there is a use case for that, this could be a separate "seal group" message.
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 agree
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.
Same here.. I assume this is optional to change it? Maybe use
*string
to be clear there - otherwise there is no way to unset it.It seems like this operation is supposed to be a patch, and to do so properly, we need to allow all values (including zero-value if legal) as well as "unset". In my experience with go-json, this is typically done by using pointer fields and checking for
nil
(which can be missing from json or explicitly set asnull
, either way, ignored)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.
An alternative to a single update message is to have a separate update message for each field, so
MsgUpdateGroupDescription
,MsgUpdateGroupAdmin
, etc. Would that be preferable? For now I am changing the spec to your approach.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 think separate messages is bad.
Either define
POST
behavior - overwrite current content with msg.Or
PUT
- only include some fields, only update those that are include.I assume
PUT
is desired, but this should be made explicit and consistent.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.
Why return the
group sdk.AccAddress
? Which means you have to then query the group itself? Seems easier to passgroup Group
into the callback.Also, I note you never defined the
Group
struct that is stored in the kvstore above.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.
This part was intentional. I didn't define a group struct because I don't want to return all members at once. See how it is in the changed spec and we can discuss if maybe there should be a
GroupMetadata
struct like this: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.
Ahh... Okay, then can you mark this in the spec as "not yet defined", but make sure some comment is there, not just an oversight.
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.
This name is a bit unwieldy. I don't have a great alternative, but should be refined. Group makes clear sense and is what it says. GroupAccount is not clear.
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, GroupAccount is a bit unwieldy but I also was unable to come up with a better name. I am open to proposals.
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 will give one when I have one.... wish I was good at naming
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.
s/group./group account./
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.
Same question as above about omitted fields and zero-values - do we set to zero value, do we leave them unchanged? Both have issues, maybe consider pointers, even if a bit funny looking here, they render to the same json.
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 want to suggest two functionality to
MsgUpdateGroupAccount
.GroupAccount
withoutAdmin
GroupAccount
can vote forMsgUpdateGroupAccount
This way, we can create a
GroupAccount
which ownership is fully decentralized but modifiable.Another question.
Why
MsgUpdateGroupAccount
does not have a fieldMembers
to be updated?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.
questions resolved. thank you @aaronc
This file was deleted.