Skip to content
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

fix: Changes latency to be capped at 600ms, added some extra typing #275

Merged
merged 2 commits into from
Jul 6, 2020

Conversation

PirosB3
Copy link
Contributor

@PirosB3 PirosB3 commented Jul 3, 2020

Description

We noticed that RFQT latency on api.0x.org can be too high at times and may cause downstream latency to our customers, so we are going to cap HTTP RFQT timeouts to 600ms. This PR sets the makerEndpointMaxResponseTimeMs parameter that can be optionally specified in RfqtRequestOpts, and that defaults to 1 second. We are intentionally enforcing this parameter to be 600.

⚠️ We noticed that 0x API passes to Asset Swapper some parameters that do not exist anymore. More precisely:

  • skipBuyRequests is an old relic of when our RFQT bot only supported sell requests. skipBuyRequests is not used at all by AssetSwapper, since it’s not present in RfqtRequestOpts.
  • slippagePercentage was removed here and passing this parameter to SwapQuoter will have no effect at all.

Can I get a sign off from @dekz and/or @dorothy-zbornak that the removal of these 2 parameters does not cause any issue downstream? and that these parameters are simply technical debt?

Testing Instructions

Once I have a first approval that my PR does not introduce new issues, I will try it in staging

Checklist

  • Get a sign-off from @dekz and/or @dorothy-zbornak re. removal of the 2 parameters
  • Test in staging
  • Merge and deploy to Prod

@PirosB3 PirosB3 changed the title [WIP] fix: Changes latency to be capped at 600ms, added some extra typing fix: Changes latency to be capped at 600ms, added some extra typing Jul 3, 2020
@dekz
Copy link
Member

dekz commented Jul 6, 2020

yeah the removal of those params is fine.

@PirosB3
Copy link
Contributor Author

PirosB3 commented Jul 6, 2020

deploy staging

@PirosB3 PirosB3 merged commit cd545c8 into master Jul 6, 2020
@PirosB3 PirosB3 deleted the update-latency-600ms branch July 6, 2020 19:54
@PirosB3
Copy link
Contributor Author

PirosB3 commented Jul 6, 2020

deploy prod

github-actions bot pushed a commit that referenced this pull request Jul 13, 2020
## [1.10.2](v1.10.1...v1.10.2) (2020-07-13)

### Bug Fixes

* Changes latency to be capped at 600ms, added some extra typing ([#275](#275)) ([cd545c8](cd545c8))
@github-actions
Copy link

🎉 This PR is included in version 1.10.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants