15833 Commits

Author SHA1 Message Date
F. Eugene Aumson
a8cfcfb371
Fix test-publish CI failure 2020-05-26 15:24:43 -04:00
F. Eugene Aumson
f7a414bc29
asset-s/RFQ: adapt to renamed TakerRequest fields 2020-05-26 15:24:42 -04:00
F. Eugene Aumson
e05cd1d66b
asset-s/QuoteRequestor: use TakerRequest type 2020-05-26 15:24:38 -04:00
F. Eugene Aumson
b9984b6df4
asset-swapper: fix bug: bad maker response throws
Formerly, a maker sending back a non-JSON was causing an exception to be
thrown.
2020-05-15 01:20:30 -04:00
F. Eugene Aumson
9c11835fee
asset-s: use @0x/quote-server, not local typedefs 2020-05-15 01:20:29 -04:00
F. Eugene Aumson
d9e13d6b99
Merge pull request #2581 from 0xProject/fix/asset-swapper/rfqt-logging
asset-swapper: Improve logging for 0x API consumption
2020-05-11 19:13:07 -04:00
F. Eugene Aumson
dede076835
asset-s/QuoteRequestor: clarify axios error type
Addresses review comment https://github.com/0xProject/0x-monorepo/pull/2581#discussion_r423337773
2020-05-11 18:34:32 -04:00
F. Eugene Aumson
c929782e0d
asset-swapper/RFQT: Log params sent to maker
* Include in RFQ-T info log entry the query parameters that were sent to
the maker.

* Re-organize log entry
    * Rename top-level field from rfqtMakerResponse to
    rfqtMakerInteraction.
    * Create separate `request` and `response` sub-objects.

* Rename field `latency` to `latencyMs`.
2020-05-11 18:01:06 -04:00
F. Eugene Aumson
a43c7e36f8
asset-swapper/RFQT: log maker response metadata 2020-05-11 17:40:19 -04:00
F. Eugene Aumson
b95cec9c32
asset-swapper: fix bug: RFQ-T info log was broken 2020-05-11 17:39:30 -04:00
F. Eugene Aumson
9a7d9abe3c
asset-swapper: consolidate RFQ-T usage of Axios 2020-05-11 13:52:42 -04:00
F. Eugene Aumson
c77b620453
asset-swapper: Improve RFQ-T logging for 0x API
* Change QuoteRequestor logger parameters to conform to pino logging
library, duplicating (one of) their LogFunction prototype interfaces for
our purposes here.  With this, every log emission now includes BOTH a
human-readable message AND a JSON object.  Also, this pattern has been
applied to both the error logger and the info logger.

* Do better handling of Axios errors when logging them.  Before we were
(a) logging errors in a separate log entry than the message that
explains it, and (b) dumping the whole error object to the log entry,
which was resulting in an object so massive that pino/Kibana was
splitting it into 3 separate entries.  Now, we (a) follow the pattern
described in the previous bullet, which puts the error object and the
human readable message into the same log entry, and (b) we check to see
if an error object is Axios-specific, and if so then we use the
AxiosError.toJSON() method to strip out the irrelevant properties.

* Log a uniform maker response metric, with maker endpoint URL, status
code, and latency, for both successful cases and erroneous ones.
(Before, we were only doing this for successful cases.)
2020-05-11 13:38:37 -04:00
Lawrence Forman
b348084e2a
@0x/zero-ex: Always offset storage bucket ID by 1. (#2579)
Co-authored-by: Lawrence Forman <me@merklejerk.com>
2020-05-08 20:13:45 -04:00
F. Eugene Aumson
ff1811ef90
Merge pull request #2574 from 0xProject/rfqt-follow-ups
asset-swapper: RFQ-T follow ups
2020-05-07 17:44:02 -04:00
F. Eugene Aumson
39cf4a7576
Ran prettier...on development code! wtf?
Maybe something weird happened in the merge conflict resolution? Though
I didn't see anything in particular.
2020-05-07 01:39:22 -04:00
F. Eugene Aumson
21b67625a6
Merge branch 'development' into rfqt-follow-ups 2020-05-07 01:07:41 -04:00
Jacob Evans
fb0311e675
feat: ERC20BridgeSampler Unlock Kyber collisions (#2575)
* feat: ERC20BridgeSampler Unlock Kyber collisions

* Updated fallback strategy

* Address comments

* Eth2Dai hop sampler

* Update packages/asset-swapper/src/utils/market_operation_utils/index.ts

Co-authored-by: Lawrence Forman <lawrence@0xproject.com>

* Set DFB expiry to 2hr

Co-authored-by: Lawrence Forman <lawrence@0xproject.com>
2020-05-07 07:56:03 +10:00
F. Eugene Aumson
8a14b4afff
asset-swapper: clarify comment
This comment recently got moved from one context to another.  In the old
context, the whole comment made sense, but in the new context it needed
paring down.
2020-05-06 13:24:20 -04:00
F. Eugene Aumson
e42701599a
asset-s/RFQT: log each maker resp. time, not agg.
Log each maker's individual response times, rather than logging them in
aggregate.

Addresses review comment https://github.com/0xProject/0x-monorepo/pull/2574#discussion_r419769846
2020-05-06 13:23:35 -04:00
F. Eugene Aumson
352b1b43f2
asset-s: restore type safety to rfqt.skipBuyReq's
Addresses review comment https://github.com/0xProject/0x-monorepo/pull/2574#discussion_r420465928
2020-05-06 13:16:23 -04:00
F. Eugene Aumson
2922ebd095
asset-s/test: stop unnecessarily priming mock
Addresses review comment 93bdaba8ee (r419774170)
2020-05-05 17:17:47 -04:00
F. Eugene Aumson
a9e72085dd
asset-s: fix bug handling RFQ-T skipBuyRequest
Addresses review comment https://github.com/0xProject/0x-monorepo/pull/2574#discussion_r419772045
2020-05-05 17:17:47 -04:00
F. Eugene Aumson
ed3d194c90
asset-s: ignore case verifying RFQT taker address
Do case INsensitive comparison when verifying that RFQ-T firm quote
contains the requested taker address.

This commit also introduces some changes around the RfqtRequestOpts
parameter.  Without these changes, there were errors (tsc or tslint?
can't remember) about takerAddress being possibly undefined.

Rather than asserting it yet again (which we're already doing via
assertTakerAddressOrThrow()), I decided to change the RfqtRequestOpts
param to be required, not optional.  Coincidentally, this brings the
requestRfqtFirmQuotesAsync() interface into alignment with the
requestRfqtIndicativeQuotesAsync() one, which already requires the
options parameter.

Addresses review comment https://github.com/0xProject/0x-monorepo/pull/2574#discussion_r419770087
2020-05-05 17:17:46 -04:00
F. Eugene Aumson
125c53827b
asset-s: check RFQ expiry more canonically
For firm quotes, re-use orderCalculationUtils.willOrderExpire(), just
like utils.order_prune_utils.

For indicative quotes, duplicate the logic used in that
willOrderExpire() function, since it can't be re-used for an indicative
quote (it's not a full Order object), and since the logic is very
minimal.

Addresses review comment https://github.com/0xProject/0x-monorepo/pull/2574#discussion_r419768395
2020-05-05 17:16:48 -04:00
F. Eugene Aumson
38781807cd
asset-s: simplify test util usage 2020-05-05 12:53:31 -04:00
F. Eugene Aumson
c046943269
asset-s: fix bug: expiry is BigNumber, not string 2020-05-05 12:43:41 -04:00
Lawrence Forman
fe36cd86bb
Merge pull request #2573 from 0xProject/fix/contracts-zero-ex/initial-migration-self-destruct
ZeroEx: InitialMigration Race Condition/Self-destruct
2020-04-30 15:02:16 -04:00
F. Eugene Aumson
401410089c
asset-s/QuoteRequestor: info log Objects, not strs
In the QuoteRequestor class, when _infoLogger() is used, log objects
directly, rather than stringifying them first.  This changes the 0x API
log rendering from

{"level":"info","time":1588209135290,"pid":13022,"hostname":"precision5510","msg":"{\"aggregatedRfqtLatencyMs\":4}","v":1}

to

{"level":"info","time":1588224481908,"pid":3637,"hostname":"precision5510","aggregatedRfqtLatencyMs":2,"v":1}

This facilitates parsing of these logs by Kibana.
2020-04-30 01:32:06 -04:00
F. Eugene Aumson
fa23337519
asset-swapper: Ran prettier 2020-04-29 17:50:16 -04:00
F. Eugene Aumson
ae5421f76e
asset-s: Use expiryBufferMs to filter RFQ-T quotes 2020-04-29 17:24:51 -04:00
F. Eugene Aumson
a2e2b429d5
asset-s: exclude RFQ-T orders w/ bad takerAddress 2020-04-29 17:24:42 -04:00
F. Eugene Aumson
ac852b23b3
asset-s: allow disabling of buy req's for RFQ-T 2020-04-29 17:23:16 -04:00
F. Eugene Aumson
e12389a002
asset-s: don't ignore default SwapQuoter RFQT opts 2020-04-29 17:23:16 -04:00
F. Eugene Aumson
da18e42d2a
asset-s: Fix prettier command to match monorepo's 2020-04-29 17:23:15 -04:00
F. Eugene Aumson
93bdaba8ee
asset-s: skip RFQT makers not supporting reqd pair
Skip querying an RFQ-T maker for a quote when the requested asset pair
isn't supported by that maker.
2020-04-29 17:23:10 -04:00
F. Eugene Aumson
4cb08a61d5
asset-s: RFQT info logger; log maker response time 2020-04-29 17:22:59 -04:00
Lawrence Forman
133692ca92 @0x/contract-wrappers-test: Increase test timeout for CI 2020-04-29 17:11:00 -04:00
F. Eugene Aumson
4bcc4b3cf8
asset-s: relay expiration time in indicative quote 2020-04-29 15:45:35 -04:00
F. Eugene Aumson
4eb20ca4b6
asset-s/QuoteRequestor: use constructor assignment 2020-04-29 15:45:35 -04:00
Lawrence Forman
69f7343be5 @0x/contracts-zero-ex: Lock the caller of InitialMigration.deploy() and actually self-destruct. 2020-04-29 14:26:55 -04:00
F. Eugene Aumson
19b28a58d6
Merge pull request #2544 from 0xProject/fix/pyfail-dupe-docstrings
Python: unpin Sphinx dependency, clean up warnings
2020-04-29 13:53:18 -04:00
Lawrence Forman
3c33a93b9c
Merge pull request #2572 from 0xProject/feat/contracts-zero-ex/syntactic-sugar-1
ZeroEx: Switch rich revert style.
2020-04-29 13:52:39 -04:00
Lawrence Forman
f2e16dfb21 @0x/contracts-zero-ex: Switch rich revert style.
`@0x/contracts-zero-ex`: Merge `FixinOwnable` -> `FixinCommon`.
2020-04-29 13:01:19 -04:00
F. Eugene Aumson
0f689e8051
Merge pull request #2571 from 0xProject/fix/pylint-upgrade
Python: adapt to latest version of pylint
2020-04-29 12:15:31 -04:00
F. Eugene Aumson
5b44e6ef64
Python: adapt to latest version of pylint 2020-04-29 10:10:18 -04:00
Lawrence Forman
49e4ade66f
Merge pull request #2570 from 0xProject/fix/redeploy-sampler-on-kovan
`@0x/contract-addresses`: Redeploy sampler on kovan
2020-04-28 17:33:02 -04:00
Lawrence Forman
3bae27d039 @0x/contract-addresses: Redeploy sampler on kovan 2020-04-28 15:05:51 -04:00
Lawrence Forman
a77f0c606d
Merge pull request #2569 from 0xProject/feat/contracts-zero-ex/iownable-compat
ZeroEx: IOwnable(V06) compatibility
2020-04-28 14:29:33 -04:00
Lawrence Forman
f1de64dcaf @0x/contracts-zero-ex: Make Ownable feature conform to IOwnable. 2020-04-28 12:16:30 -04:00
Lawrence Forman
feb672c3cd @0x/contracts-utils: Make IOwnableV06 conform to IOwnable. 2020-04-28 12:16:11 -04:00