-
Notifications
You must be signed in to change notification settings - Fork 312
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
Break down approx hint search into multiple smaller calls #94
Conversation
Still need to update tests and write new tests that exercise the new middleware code (somehow). |
06cb564
to
8ca8be7
Compare
When the number of troves is huge, we might need more trials than possible on a provider like Infura (~4900 max trials) to get a good quality approx hint. Modify getApproxHint to make the search resumable, and do it in multiple rounds. Fixes #2.
Use chai-spies to substitute the real contracts, since it takes too long to create a million Troves for testing.
e960cb3
to
c5b38ef
Compare
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.
Looks good!
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.
LGTM!
@@ -5,6 +5,8 @@ const th = testHelpers.TestHelper | |||
const dec = th.dec | |||
const moneyVals = testHelpers.MoneyValues | |||
|
|||
let latestRandomSeed = 31337 |
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.
😂
🎉 This PR is included in version @liquity/lib-ethers-v1.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
When the number of troves is huge, we might need more trials than
possible on a provider like Infura (~4900 max trials) to get a
good quality approx hint.
Modify getApproxHint to make the search resumable, and do it in
multiple rounds.
Fixes #2.