-
Notifications
You must be signed in to change notification settings - Fork 208
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
auction scheduler robustness #9759
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #9759 +/- ##
==========================================
- Coverage 56.37% 55.83% -0.55%
==========================================
Files 667 656 -11
Lines 207560 208436 +876
Branches 343 360 +17
==========================================
- Hits 117022 116374 -648
- Misses 90420 91942 +1522
- Partials 118 120 +2
|
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.
nice job untangling the easily-unit-tested compute from the I/O
a few thoughts to consider...
@@ -158,17 +158,26 @@ const divideHelper = (amount, ratio, divideOp) => { | |||
); | |||
}; | |||
|
|||
/** @type {ScaleAmount} */ | |||
/** | |||
* Divide the amount by the ratio, truncating the remainder. |
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.
an @example
would be nice. I wonder how to do them concisely...
const a = withAmountUtils(makeIssuerKit('A'));
const double = makeRatio(2n, a.brand, 1n);
t.deepEqual(floorDivideBy(a.make(5n), double), a.make(2n));
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.
Nicely done. Thanks for investigating and making this PR. What worries me still is that a similar math bug nearby will cause the same problem in a different way. I want to look for a repair that makes the auction not die when this happens. |
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.
Drive-by suggestions.
Deploying agoric-sdk with Cloudflare Pages
|
d4d7f42
to
e9e637c
Compare
incidental
Description
Refactors the auction amount math out of the auction book and adds unit tests. I noticed an inconsistency so this adds an assertion to prevent that and a fix. Also a bunch of refactorings and docs to try to make this area of the code more clear.
Reviewers, review by commit is recommended.
Security Considerations
The auction book now calls out to another module to do the math. Module from its own package though.
Scaling Considerations
no change
Documentation Considerations
not user facing
Testing Considerations
regression test
Upgrade Considerations
This won't go out until VaultFactory gets a new auctioneer. See,
@Chris-Hibbert is working on the CoreEval and its test to deploy this