-
Notifications
You must be signed in to change notification settings - Fork 46
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
More intelligent handling of Executor in Tally #649
Comments
When making the suggestion in #633 (comment) I was not fully aware of how voting works. Now I know that in order to finalize voting, the certain deadline must pass and manual tally creation must be requested. Knowing this, the current implementation makes to me more sense than what I originally proposed. I like the idea of different status codes depending on the combined results although I have no idea how this would work. For me the most important in this functionality is predictability. I think we must focus on what the user (government board) can understand and what makes sense for them. If this functionality is not perfect but useful, I am convinced that all minor shortcomings can be addressed offline. |
In my understanding statuses mentioned in the #613 have nothing to do with ABCI error codes, but rather having a status field similar to |
The
A question would be: Do we |
I would like to only allow one Tally and Execute attempt. I mean, if you voted for something to happen (eg. update the validators), but didn't have permission, this fails. If a month later you are given permission, can anyone then re-Execute this closed but never succeeded proposal and update the Validators? Seems to open up to many cans of worms. I would prefer to have just one attempt to Execute it. The New status code looks good to me. I would both store it upon execution and return it in the Data field of the transaction, so you get an abci error code if you couldn't actually tally (too early), and abci success if the vote was tallied. and can check the return data for |
Is your feature request related to a problem? Please describe.
There are cases in Tally where the Tally succeeds (and can update the proposal state), but the Decoder or Executor will return an error. We don't want to return an error from
Deliver
, or else the state of the Proposal will never update. However, we need to handle this somehow.Describe the solution you'd like
We need to clarify what the desired solution is.
In #647, I made a minimal solution, using a separate cached-db for the executor (with
Write()
on success,Discard()
on error). And add any executor failures (or success) as a Log message to theDeliverResult
. This solves the problem, but the Log message is not a good long-term solution.I propose to follow @alpe 's solution to store an extra status message in the proposal itself (as well as the log).
The actual error message of the executor (with reason) is in the Result.Log (just like if the tally failed). No need to store in the DB. Let's just add one more field to canonically mark which proposals were and were not successfully executed after acceptance
Describe alternatives you've considered
Alternatives listed above
Additional context
None that I know of
The text was updated successfully, but these errors were encountered: