Skip to content
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

Support for the arbitrator v2 #256

Closed
Tracked by #253 ...
jaybuidl opened this issue Sep 21, 2022 · 3 comments · May be fixed by #258
Closed
Tracked by #253 ...

Support for the arbitrator v2 #256

jaybuidl opened this issue Sep 21, 2022 · 3 comments · May be fixed by #258

Comments

@jaybuidl
Copy link
Member

Dependencies:

It's going to live in a separate v2 branch in the foreseeable future.

@greenlucid
Copy link
Contributor

So, in the branch, I assume I don't need to support both kleros v1 and v2. What is necessary to support the new arbitrator?
Is this right?

  1. Stop checking for appeals, remove the appeal logic altogether
  2. disputeStatus calls (if exist), refactor out

@jaybuidl
Copy link
Member Author

jaybuidl commented Sep 23, 2022

I don't need to support both kleros v1 and v2.

Yup, v2 only in this branch.

Stop checking for appeals, remove the appeal logic altogether.

We don't demo the appeals right now. But appeals can be requested on the DisputeKit. Which one? We can ask KlerosCore: which disputeKit for this disputeID and this round.

fundAppeal = async (disputeID, choice) => {
   const round = await KlerosCore.getNumberOfRounds(disputeID)
   (,,,,, disputeKitID) = await KlerosCore.getRoundInfo(disputeID, round)
   const disputeKit = await KlerosCore.disputeKitNodes(disputeKitID)
   disputeKit.fundAppeal(disputeID, choice)
}

(not tested)

disputeStatus

Not sure how it is used in Curate. If needed for display purposes or some logic, you could do

const dispute = await KlerosCore.disputes(arbitratorDisputeID)
switch(dispute.period) { 
   case KlerosCore.Period.appeal: { 
      // do DisputeStatus.Appealable stuffs here
      break; 
   } 
   case KlerosCore.Period.execution: { 
      // do DisputeStatus.Solved stuffs here
      break; 
   } 
   default: { 
      // do DisputeStatus.Waiting stuffs here
      break; 
   } 
}

@greenlucid
Copy link
Contributor

#258

Will test if it works as intended later when an arbitrator frontend works to try it out.

@jaybuidl jaybuidl linked a pull request Sep 26, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants