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
Governor: Sequential Proposal Ids #5290
base: master
Are you sure you want to change the base?
Governor: Sequential Proposal Ids #5290
Changes from all commits
a25d139
a4ee283
e34a8b9
3cf1b80
9063080
8755aa6
c52f001
d9f3477
b063a61
19dfdf8
185b6a3
cb91e76
5ff56da
f0e9fb5
becc77a
8ffad72
3e49fb9
41d49c4
f8cfe02
76d57a2
74bdb35
3206080
c174090
9786e76
df711fe
a04b47f
2de3660
da959cd
e037708
fdea2cc
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.
We're missing NatSpec 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.
I'd rename it "uninitialized" since it better indicates what's wrong. Also, it goes well with the change I'm proposing to rename {_setProposalCount} to {_initializeProposalCount}. I think that instead of explaining the error literally, we should give a hint to solve it.
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 understand this sentence.
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.
Could you suggest a change?
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 forgot to come back and finish the suggestion. Now that I read it, it makes more sense.
I'd only suggest pointing to the definition of
proposalCount
. My confusion came because I thought the proposal count was an internal implementation detail. This should improve with some docs IMO.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 assume the purpose of including this function is to allow DAOs that are upgrading to set an initial proposal count in their initializers. If this is the case, I think this should be documented somewhere
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 would be in favor of changing this function's name to indicate better what to do with it. In this case, it suggests developers that it should be used within an initializer.
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.
As of now the function is only usable when the proposal count is 0 (one time use), but if there are legitimate use-cases for using it beyond that we would open it up to allow any increase in proposal count. Keeping this phrasing enables that to be a non-breaking change.
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. Given it's a one-time use, I think "initialize" is a good name.
The use case I was thinking of is the following:
_initializeProposalCount(12)
within their reinitializer function if their voters want to start voting ids starting from 12I don't see any other legitimate use case to open up the function either. In this case, I think it makes sense to make it more explicit.