-
Notifications
You must be signed in to change notification settings - Fork 11
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
voting-contract: Redesign how we store/update proposal status #63
Comments
I personally think that we should try to go with 3, and if it is not easy to do think if 2 is maybe good enough. And obviously - maybe someone would figure out best idea. What is critical to understand is that there are cases when state changed, but it causes execution to fail (one tries to vote on proposal which timeline exceed) - we just cannot update it because we would return error from contract, so whole state change would be rolled back (so both 1 and 2 would not work - and this is because I opt for 3). The open question is - do we need notion of non-transactional updates in our contracts (meaning: state is updated no matter if contract failed). I am trying to figure out if there is a way to overuse this. However it could be helpful in some cases (like figuring out that state is invalid and store info in BC so later it would be decided way earlier). |
Side note: what's the point of having the |
@uint proposal is |
Do you mean the |
🤦♂️ Yeah, I mixed those, sorry for confusion. I think close is needed as well. Isn't that the only function, that actually sets status |
It is, but it doesn't seem like internal status being set to
|
In my opinion, having internal status matching actuall status is good for
|
The whole thing with using
current_status
andupdate_status
helpers has proven to be confusing and encourage bugs. We should probably sit down, think about all the things we want this to do and redesign it in a way that's easy to understand and difficult to make mistakes with.Very loose ideas:
The text was updated successfully, but these errors were encountered: