0x-mesh icon indicating copy to clipboard operation
0x-mesh copied to clipboard

DevUtils Revert Error

Open jalextowle opened this issue 5 years ago • 3 comments

Context

DevUtils has been returning invalid fillableTakerAmount values in recent releases, so we redeployed the contract and updated the address in mesh. Now we are seeing failed calls to DevUtils in production.

Expected Behavior

DevUtils should not revert, but should return a fillableTakerAmount of zero in the event of a failure.

Current Behavior

DevUtils is reverting.

Failure Information (for bugs)

Please help provide information about the failure if this is a bug. If it is not a bug, please remove the rest of this template.

This is a recent failure log:

{
  "attempt_number": 0,
  "error_string": "abi: improperly formatted output: 3�=�\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\n\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000n�(T���`\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000y��� - Bytes: [[51 159 61 226 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 110 154 40 84 244 243 219 96 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 121 155 190 214]]",
  "level": "info",
  "msg": "GetOrderRelevantStates request failed",
  "myPeerID": "16Uiu2HAkwxWKhsmWtxQ1ycgLdANXF5emYohAfFrhKyhf4bAnBTNx",
  "numOrders_number": 7,
  "time": "2020-01-23T13:30:13-08:00"
}

jalextowle avatar Jan 23 '20 21:01 jalextowle

@jalextowle wouldn't simply return a fillableTakerAmount of 0 in case of failure just hide the fact that a bug exists? We need to fix the underlying edge-case that is causing the DevUtils contract to revert, not hide the fact that it happened. A revert in DevUtils does not mean the order is unfillable, right?

fabioberger avatar Jan 25 '20 10:01 fabioberger

@jalextowle can this issue be closed?

fabioberger avatar Jan 29 '20 11:01 fabioberger

I don't think we should close this issue until we either have a DevUtils.getOrderRelevantStateNoThrow function or we have written logic that will handle the unlikely revert cases. We solved one revert in DevUtils that was particularly bad, but not the integer under and overflows.

jalextowle avatar Jan 29 '20 17:01 jalextowle