-
Notifications
You must be signed in to change notification settings - Fork 0
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
Various bug fixes in rust sdk #5
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
slundqui
requested review from
jalextowle,
jrhea,
mcclurejt,
dpaiton,
sentilesdal and
ryangoree
as code owners
April 26, 2024 17:30
slundqui
commented
Apr 26, 2024
6 tasks
slundqui
force-pushed
the
slundquist/rust-bug-fixes
branch
2 times, most recently
from
April 29, 2024 21:43
ab77595
to
49f6ed3
Compare
…ve_share_reserves and return 0 in calc_max_long if this is the case
…or spot price after min long
slundqui
force-pushed
the
slundquist/rust-bug-fixes
branch
from
April 30, 2024 17:27
49f6ed3
to
0a5615a
Compare
dpaiton
approved these changes
Apr 30, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR originally from delvtech/hyperdrive#1005
Resolved Issues
This solves various rust crashes resulting from python fuzz testing.
#41
Description
Fixes the following issues:
calc_open_long
throws a minimum transaction amount error. We clamp the guess to be minimum transaction amount. and do a final check at the end to ensure the max amount is greater than the minimum transaction amount.absolute_max_long
where thetarget_share_reserves < effective_share_reserves
. In this case, we throw a better descriptive panic.calc_max_long
and return 0 if the spot price after a minimum long exceeds the max spot price.Review Checklists
Please check each item before approving the pull request. While going
through the checklist, it is recommended to leave comments on items that are
referenced in the checklist to make sure that they are reviewed. If there are
multiple reviewers, copy the checklists into sections titled
## [Reviewer Name]
.If the PR doesn't touch Solidity and/or Rust, the corresponding checklist can
be removed.
[[Reviewer Name]]
Rust
covering the full input space?
ensure that Rust matches Solidity?