zeitgeist
zeitgeist copied to clipboard
[Court] Disputes should be one at a time, and historical dispute data should be kept around until resolution
The current implementation of the Court pallet needs to be improved in two respects:
- A market can only have one "court case" occurring at once. Currently the pallet allows for disputes to take place without any waiting time, overwriting the previous data immediately. A new court case can only be called after the conclusion of the prior court case.
- We need to keep historical data of court cases for a market, at least until that market resolves. This is so that we can properly reward / slash good and bad actors during the entire proceedings of cases. Once a market resolves, and the rewards and slashes have been divvied out, the items can be deleted from storage.
A few other notes from my side:
- Votes can be changed, even after the end block has passed
- Jurors that have failed to vote still have the 'ok' status, I was expecting them to become 'tardy' Edit: looks like juror status is tardy now, not sure what happened
- Disputes can be created when there are no jurors
- When someone joins the court they are not added to existing cases despite being needed (not sure if this is by design)
I propose the following solution: The dispute
method of DisputeApi
may error with DisputeInProgress
if a dispute has already been registered, but hasn't been handled by the dispute mechanism. For example:
-
Authorized::dispute
errors withDisputeInProgress
if the market has been disputed but the authorized account hasn't responed yet -
Court::dispute
errors withDisputeInProgress
if the market has been disputed but the court case is not yet closed
This solution won't work with SimpleDisputes
, but since that's getting removed anyways, we're fine.
Another problem uncovered in recent meetings: When using authorized
, people can call dispute
even after the authority has submitted a report.
I think the correct solution is to make appeals (i.e. second, third, etc. disputes) part of the DisputeApi
and only have a single dispute in prediction-markets
, which, if called, passes control for the decision of the market over to the dispute mechanism. This gives us more freedom in how we implement the DisputeApi
. Then authorized
be designed to now allow any appeals, but court
can be.
I added multiple issues to address ZIP-0 and ZIP-2 here.
Fixed by https://github.com/zeitgeistpm/zeitgeist/pull/976