84 Commits

Author SHA1 Message Date
Daniel Pyrathon
efe598c8fd Merge branch 'development' of github.com:0xProject/0x-monorepo into refactor_rfq_comparison_price_integration 2020-10-08 15:27:14 -07:00
F. Eugene Aumson
6e954385ce
Include requestParams in maker-blacklisted log
Addresses review comment https://github.com/0xProject/0x-monorepo/pull/2726#discussion_r501332160
2020-10-08 09:15:58 -04:00
Daniel Pyrathon
f8df89b506 fixed broken package 2020-10-07 23:49:04 -07:00
Daniel Pyrathon
199808dc44 Merge branch 'development' of github.com:0xProject/0x-monorepo into refactor_rfq_comparison_price_integration
# Conflicts:
#	packages/asset-swapper/src/utils/market_operation_utils/index.ts
2020-10-07 14:28:35 -07:00
F. Eugene Aumson
5d8e35fb68
asset-swapp: isBlacklisted in rfqtMakerInteraction 2020-10-07 16:32:22 -04:00
F. Eugene Aumson
32923ec7e1
Blacklist for timeout === max, not just > 2020-10-02 14:18:31 -04:00
Daniel Pyrathon
9e42dce5c4 added initial implementation 2020-10-01 14:28:36 -07:00
F. Eugene Aumson
fbe99b41f8
asset-swapper: log RFQ maker (un)blacklistings 2020-09-28 14:14:52 -04:00
F. Eugene Aumson
32d11d1ba5
Merge pull request #2706 from 0xProject/feat/asset-swapper/punish-latent-rfqt-makers
asset-swapper: Punish latent RFQT makers
2020-09-18 18:06:12 -04:00
F. Eugene Aumson
1ce8a33937
asset-swapper: Punish latent RFQT makers 2020-09-14 19:07:48 -04:00
Steve Klebanoff
ee456ea6e7
remove unused import 2020-09-04 11:01:24 -05:00
Steve Klebanoff
d34d46b7fd
change look up from order hash to order signature 2020-09-04 09:54:47 -05:00
F. Eugene Aumson
a8f3a47240
asset-swapper: Update comments 2020-08-31 16:36:00 -04:00
F. Eugene Aumson
e738743c89
asset-swapper: ensure takerAddress for indiciative
Ensure the presence of a taker address query parameter in the request to
market maker endpoints for indicative RFQ-T quotes.

Addresses review comment https://github.com/0xProject/0x-monorepo/pull/2684#pullrequestreview-477242367
2020-08-28 16:30:01 -04:00
F. Eugene Aumson
f471e1a8a3
Merge branch 'development' into feat/asset-swapper/rfqt-indicative-without-takerAddress 2020-08-27 13:49:46 -04:00
mzhu25
bab34c2d21
Feature/bunny hop (#2647)
* `@0x/contracts-erc20-bridge-sampler`: Add TwoHopSampler + refactor

* `@0x/asset-swapper`: Refactor + add two-hop skeleton

* Round out two-hop support in asset-swapper

* Add BalancerSampler, use it for two-hop quotes

* Fix bugs discovered from simbot

* rebases are hard

* Add intermediate token to MultiHop source breakdown

* Fix market buy bugs

* Use hybrid on-chain/off-chain sampling for Balancer

* Another day, another rebase

* Update changelogs

* Address PR feedback, CI fixes

* Address more PR feedback
2020-08-27 08:20:09 +10:00
F. Eugene Aumson
e9b0ac8820
asset-swapper: Stop req'ing takerAddr for RFQT ind
Stop requiring takerAddress for indicative RFQ-T quotes.
2020-08-25 17:42:02 -04:00
Daniel Pyrathon
47d91bb4e0 adds more logging keys 2020-08-24 15:54:09 -07:00
Daniel Pyrathon
39e157499d removed toJSON check 2020-08-14 16:29:52 -07:00
Daniel Pyrathon
d22c0641fb are you included or not 2020-08-14 15:45:06 -07:00
Daniel Pyrathon
82806b6fcb avoid returning objects with circular buffers 2020-08-14 14:54:53 -07:00
Daniel Pyrathon
fe293d91ee added smaller log 2020-08-14 13:41:49 -07:00
Daniel Pyrathon
f30dfcc572 adds a long TTL to quote requestor client 2020-08-12 07:38:57 -07:00
Daniel Pyrathon
3df39d8cfe added httpAgent and httpsAgent timeouts 2020-08-11 19:12:53 -07:00
Daniel Pyrathon
7cd30610f9 fixed tests 2020-08-10 16:33:42 -07:00
Daniel Pyrathon
ceb90989d0 Merge branch 'development' of github.com:0xProject/0x-monorepo into feature/keepAlive
# Conflicts:
#	packages/asset-swapper/src/utils/quote_requestor.ts
2020-08-10 16:13:53 -07:00
Daniel Pyrathon
bb39d63d37 fixed class instantiation issue 2020-08-10 15:12:16 -07:00
Daniel Pyrathon
213709d020 added keepAlive 2020-08-10 14:47:15 -07:00
Steve Klebanoff
120714ecfc
linting and remove unused function 2020-07-08 15:49:42 -07:00
Steve Klebanoff
e79db7de89
new quotereporter type 2020-07-06 22:07:33 -07:00
Steve Klebanoff
e58c25aa18
hold onto maker uris when fetching responses 2020-07-06 21:27:20 -07:00
Steve Klebanoff
8ec44b63b1
WIP: add quoteReport response 2020-07-06 21:06:43 -07:00
Steve Klebanoff
fb1c149eb9
another comment 2020-06-19 13:43:27 -07:00
Steve Klebanoff
d4662f428a
change BNs to strings 2020-06-19 13:29:19 -07:00
F. Eugene Aumson
ad868af96e
asset-swapper: use RFQT-specific response types
@0x/quote-server was recently updated to offer RFQT- and RFQM-specific
types, in addition to abstracted types.  Since everything here is RFQT
specific, usage has been changed to use those specific types.

Addresses review comments
https://github.com/0xProject/0x-monorepo/pull/2582#discussion_r437623138
and
https://github.com/0xProject/0x-monorepo/pull/2582#discussion_r437625305
2020-06-11 15:57:49 -04:00
F. Eugene Aumson
f7cd7110ea
asset-s: Remove erroneous addition of API key
It was added due to the introduction of the use of the TakerRequest type
from @0x/quote-server, as it's included in that structure.  However,
that structure is primarily used within the quote server as the output
of parameter parsing, and that parsing routine transforms the API key
HEADER from the request into the TakerRequest type.  In short, the API
key is input as a header, not a parameter.

Addresses review comment
https://github.com/0xProject/0x-monorepo/pull/2582#discussion_r437624647
2020-06-11 14:17:45 -04:00
F. Eugene Aumson
d5d07dd34e
Merge branch 'development' into feat/asset-swapper/use-quote-server 2020-06-08 19:15:07 -04:00
F. Eugene Aumson
d62d81af17
Update quote_requestor.ts 2020-05-27 14:19:24 -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
8fb2d8da88
asset-s/QuoteRequestor: fix statusCode logging 2020-05-21 16:37:37 -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
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
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