-
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): handlers and setup #51
base: dev
Are you sure you want to change the base?
Conversation
"platformConfig": { | ||
"target": "test/invariants/FuzzTest.t.sol", |
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.
Observation: there's no path branching with regards to fuzz
or symbolic
within test/invariants
.
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.
symbolic exec is a bit too optimistic timing-wise, we can reorg if we do get there':)
// Calculate request ID using same logic as Oracle | ||
bytes32 requestId = keccak256(abi.encode(requestData)); |
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.
A getId()
util would come in handy.
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.
prophet-core/solidity/libraries/ValidatorLib.sol
is at hand.
IOracle.Response memory response = _ghost_responseData[dispute.responseId]; | ||
oracle.updateDisputeStatus(_ghost_requestData[requestId], response, dispute, status); |
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.
Can the call to Oracle::updateDisputeStatus
ever bypass the error Oracle_NotDisputeOrResolutionModule
, as a part of handleUpdateDisputeStatus()
?
if (_ghost_activeResponses[requestId].length == 0) return (bytes32(0)); | ||
bytes32 responseId = _ghost_activeResponses[requestId][0]; |
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.
Shouldn't _getRandomActiveResponse()
be used in these situations (seen in handleDisputeResponseOracle()
and handleFinalize()
) so to fuzz _ghost_activeResponses
?
Need review esp for the bond escalation handlers (nbd if faulty, but maybe annoying to debug in the long run).
Sanity check of the setup passes.
+ Might still add some extra-constraints in some handlers