zeitgeist icon indicating copy to clipboard operation
zeitgeist copied to clipboard

[Court] Disputes should be one at a time, and historical dispute data should be kept around until resolution

Open lsaether opened this issue 3 years ago • 3 comments

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.

lsaether avatar Nov 19 '21 11:11 lsaether

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)

Robiquet avatar Dec 10 '21 10:12 Robiquet

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 with DisputeInProgress if the market has been disputed but the authorized account hasn't responed yet
  • Court::dispute errors with DisputeInProgress 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.

maltekliemann avatar Jun 19 '22 11:06 maltekliemann

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.

maltekliemann avatar Aug 03 '22 13:08 maltekliemann

I added multiple issues to address ZIP-0 and ZIP-2 here.

Chralt98 avatar Oct 31 '22 07:10 Chralt98

Fixed by https://github.com/zeitgeistpm/zeitgeist/pull/976

Chralt98 avatar Oct 18 '23 10:10 Chralt98