-
Notifications
You must be signed in to change notification settings - Fork 2
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
test(medusa): disputer properties #58
test(medusa): disputer properties #58
Conversation
assertEq(_ghost_disputes[_requestId].length, 0, 'property 6: new dispute duplicate'); | ||
|
||
// add to ghost disputes | ||
_ghost_disputes[_responseId].push(_disputeId); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is _ghost_disputes
key the request ID or the response ID? 😵💫
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm, it's request id everywhere (should be here) but I'm wondering if it shouldn't be the response actually (ie all disputes for a response, and it should always be 1 as subsequent are going to the resolution/arbitrator, right?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Each response may have only one dispute at maximum—I'd stick to request ID being the key, as Oracle::disputeOf
already tracks the response to which each dispute is tied to.
and it should always be 1 as subsequent are going to the resolution/arbitrator, right?
That reasoning was correct though, if you meant to track bond-escalated disputes and resolution-escalated disputes separately.
try bondEscalationModule.pledgeForDispute(_requestData, _disputeData) { | ||
assertTrue(_ghost_escalatedDisputes[_disputeId], 'property 8a: pledging for a dispute not escalated'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Beware there are two types of escalation processes: the bond escalation – only initiated for the first dispute of a request, by default – and the resolution escalation – started by default for subsequent disputes of the request, and available for the first one.
Pledging can only be performed for or against the first dispute of a request during the bond escalation process.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm, I think there is indeed an issue with the ghost tracking "escalated" disputes, which doesn't really make a difference (ie some escalated aren't accounted as escalated).
Double checking, this is correct?
graph TD
request[request]
responseA[responseA]
responseB[responseB]
dispute3A[dispute3A]
dispute2A[dispute2A]
dispute1A[dispute1A]
dispute3B[dispute3B]
dispute2B[dispute2B]
dispute1B[dispute1B]
bondEscalation[bondEscalation]
arbitrator[arbitrator]
request --> responseA
request --> responseB
responseA --> dispute2A
responseA --> dispute3A
responseA --> dispute1A
responseB --> dispute1B
responseB --> dispute2B
responseB --> dispute3B
dispute1A & dispute1B --> bondEscalation
bondEscalation --> arbitrator
dispute2A & dispute2B --> arbitrator
dispute3A & dispute3B --> arbitrator
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The diagram is not correct in the following:
dispute1B
cannot go through bond escalation, as only the first dispute of the request – not of each response – can (previous comment of mine edited to further clarify this).dispute2A
,dispute3A
,dispute2B
anddispute3B
cannot be created, as each response may have a maximum of one dispute.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, got it, misunderstood the "Technically, every subsequent disputer escalates their own dispute upon creation, automatically.", this is for other responses
graph TD
request[request]
responseA[responseA]
responseB[responseB]
disputeA[disputeA]
disputeB[disputeB]
bondEscalation[bondEscalation]
arbitrator[arbitrator]
request --> responseA
request --> responseB
responseA --> disputeA
responseB --> disputeB
disputeA --> bondEscalation
bondEscalation --> arbitrator
disputeB --> arbitrator
/// @custom:property-id 7 | ||
/// @custom:property A disputer can only escalate the first disputed response | ||
function prop_disputerEscalateFirstDisputedResponse( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Technically, every subsequent disputer escalates their own dispute upon creation, automatically. 🤔
# 🤖 Linear Closes GRT-XXX --------- Co-authored-by: drgorillamd <83670532+drgorillamd@users.noreply.github.com>
3730d59
into
test/property-ebo-request-creator
🤖 Linear
Closes GRT-XXX