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

bug: two admins can take the same dispute #264

Closed
Catrya opened this issue Apr 16, 2024 · 9 comments
Closed

bug: two admins can take the same dispute #264

Catrya opened this issue Apr 16, 2024 · 9 comments

Comments

@Catrya
Copy link
Collaborator

Catrya commented Apr 16, 2024

I took a dispute using 2 admin users.
The buyer and seller received 2 messages that their dispute had been accepted.

When an administrator accepts a dispute, Mostro must not allow another administrator to accept it, to avoid contradictions.

that It's not a priority

Mostro sent you this message:

{"order":{"version":1,"id":"ea84da8c-8048-4061-80f0-78907b0b0f11","pubkey":null,"action":"admin-took-dispute","content":{"peer":{"pubkey":"00000018............................................................05"}}}}

Mostro sent you this message:

{"order":{"version":1,"id":"ea84da8c-8048-4061-80f0-78907b0b0f11","pubkey":null,"action":"admin-took-dispute","content":{"peer":{"pubkey":"000000909........................................................10"}}}}

Bye Bye!
@arkanoider
Copy link
Collaborator

Hi @Catrya ,

clear! In your experience if a solver ( not the admin ) takes a dispute an admin could take it too or we should think about only one operator assigned to a single dispute?

In this case I can fix just checking the state of the dispute is different from initiated.

Let me know your opinion!

@Catrya
Copy link
Collaborator Author

Catrya commented Apr 19, 2024

Hi @arkanoider
Well, first I had thought that if a solver took the dispute no one else could do it (not even the admin). But @grunch is right when he says that all the powers must be maintained to the admin.

So now I think it would be better if:

  • if a solver takes a dispute, then no other solver can take it, but the admin can
  • if an admin takes a dispute, no one else can take it

@arkanoider
Copy link
Collaborator

I agree with this solution

@arkanoider
Copy link
Collaborator

Hi @Catrya ,

question for @grunch , I was looking to fix this and I have a doubt:

Dispute open --> A solver takes it and dispute goes inProgress status --> if an admin takes over the solver than the solver won't be able to close it right?

Dispute open --> A solver takes it and dispute goes inProgress status : at this stage is it possible that the admin takes the dispute in another status without closing it? Lookin to code it seems that all next step are conclusive for the dispute, but my doubt is just if there is another state after InProgress that could be, let me say a wait state. Then an admin takes over the solver in this state...what happens to dispute status...now it will be resetted to inProgress, and sounds right to me, but I am just asking if it's correct!

@grunch
Copy link
Member

grunch commented Apr 24, 2024

Dispute open --> A solver takes it and dispute goes inProgress status --> if an admin takes over the solver than the solver won't be able to close it right?

Correct, only the admin can take a dispute with status = in-progress, so no other solver can take a dispute from another solver

Dispute open --> A solver takes it and dispute goes inProgress status : at this stage is it possible that the admin takes the dispute in another status without closing it? Lookin to code it seems that all next step are conclusive for the dispute, but my doubt is just if there is another state after InProgress that could be, let me say a wait state. Then an admin takes over the solver in this state...what happens to dispute status...now it will be resetted to inProgress, and sounds right to me, but I am just asking if it's correct!

I'm not sure if I understand correctly, tell me more about this wait state? I was thinking when an admin take a dispute previously taken by a solver just to keep the in-progress state, do you think is necessary to add a new status to clarify what happened in this case?

@arkanoider
Copy link
Collaborator

I'm not sure if I understand correctly, tell me more about this wait state? I was thinking when an admin take a dispute previously taken by a solver just to keep the in-progress state, do you think is necessary to add a new status to clarify what happened in this case?

I was just thinking if any of the other states apart from in-progress state allow the admin to take the dispute in charge, but probably you yet answered to me @grunch , only if dispute is in-progress admin can take the dispute over the solver.

@grunch
Copy link
Member

grunch commented Apr 25, 2024

I was just thinking if any of the other states apart from in-progress state allow the admin to take the dispute in charge, but probably you yet answered to me @grunch , only if dispute is in-progress admin can take the dispute over the solver.

exactly because the other statuses mean that the solver already solved the dispute

arkanoider added a commit to arkanoider/mostro that referenced this issue May 1, 2024
@arkanoider
Copy link
Collaborator

First idea for closure with #277

grunch pushed a commit that referenced this issue May 2, 2024
@grunch
Copy link
Member

grunch commented May 2, 2024

closing it via #277

@grunch grunch closed this as completed May 2, 2024
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

No branches or pull requests

3 participants