-
Notifications
You must be signed in to change notification settings - Fork 607
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
Speedup quo round up, start CL speedup integration #8014
Conversation
WalkthroughThe update enhances mathematical operations in Changes
Possibly related issues
Recent Review DetailsConfiguration used: CodeRabbit UI Files selected for processing (2)
Files skipped from review as they are similar to previous changes (2)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
Important Notice This PR modifies an in-repo Go module. It is one of:
The dependent Go modules, especially the root one, will have to be Please follow the instructions below:
Please let us know if you need any help. |
…sis into dev/speedup_quoroundup
…d dependencies locally
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.
Actionable comments posted: 3
…sis into dev/speedup_quoroundup
…d dependencies locally
…d dependencies locally
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.
Actionable comments posted: 5
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.
Actionable comments posted: 1
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
Great speed-ups!
I will backport this and run a node for testing state compat
* Speedup quo round up * Code reuse * Missed a code re-use point * Add future notes * Comment cleanup * Auto: update go.mod after push to dev/speedup_quoroundup that modified dependencies locally * Add new fn: NewBigDecFromDecMulDec * Auto: update go.mod after push to dev/speedup_quoroundup that modified dependencies locally * Remove some extra ops from CL * Further perf notes * Make faster QuoRoundUpNextIntMut * Auto: update go.mod after push to dev/speedup_quoroundup that modified dependencies locally * Remove another 2 BigDec ops * Add another dec op * Auto: update go.mod after push to dev/speedup_quoroundup that modified dependencies locally * Start moving some liquidity calls to Dec not BigDec * One more BigDec x Dec op * Auto: update go.mod after push to dev/speedup_quoroundup that modified dependencies locally * Another liq BigDec -> Dec * Missed one step * Move another Liquidity BigDec -> Dec * Minor spread reward update * Make CalcAmount1Dec use Dec for Liquidity * Make one more op mutative * One more speedup * Fix test * Speedup SpotPrice impl --------- Co-authored-by: github-actions <[email protected]> (cherry picked from commit 7b599d5) # Conflicts: # CHANGELOG.md # go.mod # go.sum # osmomath/decimal.go # osmomath/go.mod # osmomath/go.sum # osmoutils/go.mod # osmoutils/go.sum # x/concentrated-liquidity/math/math.go # x/concentrated-liquidity/swapstrategy/one_for_zero.go # x/epochs/go.mod # x/epochs/go.sum # x/ibc-hooks/go.mod # x/ibc-hooks/go.sum
* Speedup quo round up * Code reuse * Missed a code re-use point * Add future notes * Comment cleanup * Auto: update go.mod after push to dev/speedup_quoroundup that modified dependencies locally * Add new fn: NewBigDecFromDecMulDec * Auto: update go.mod after push to dev/speedup_quoroundup that modified dependencies locally * Remove some extra ops from CL * Further perf notes * Make faster QuoRoundUpNextIntMut * Auto: update go.mod after push to dev/speedup_quoroundup that modified dependencies locally * Remove another 2 BigDec ops * Add another dec op * Auto: update go.mod after push to dev/speedup_quoroundup that modified dependencies locally * Start moving some liquidity calls to Dec not BigDec * One more BigDec x Dec op * Auto: update go.mod after push to dev/speedup_quoroundup that modified dependencies locally * Another liq BigDec -> Dec * Missed one step * Move another Liquidity BigDec -> Dec * Minor spread reward update * Make CalcAmount1Dec use Dec for Liquidity * Make one more op mutative * One more speedup * Fix test * Speedup SpotPrice impl --------- Co-authored-by: github-actions <[email protected]> (cherry picked from commit 7b599d5) # Conflicts: # CHANGELOG.md # go.mod # go.sum # osmomath/decimal.go # osmomath/go.mod # osmomath/go.sum # osmoutils/go.mod # osmoutils/go.sum # x/concentrated-liquidity/math/math.go # x/concentrated-liquidity/swapstrategy/one_for_zero.go # x/epochs/go.mod # x/epochs/go.sum # x/ibc-hooks/go.mod # x/ibc-hooks/go.sum
* Speedup quo round up * Code reuse * Missed a code re-use point * Add future notes * Comment cleanup * Auto: update go.mod after push to dev/speedup_quoroundup that modified dependencies locally * Add new fn: NewBigDecFromDecMulDec * Auto: update go.mod after push to dev/speedup_quoroundup that modified dependencies locally * Remove some extra ops from CL * Further perf notes * Make faster QuoRoundUpNextIntMut * Auto: update go.mod after push to dev/speedup_quoroundup that modified dependencies locally * Remove another 2 BigDec ops * Add another dec op * Auto: update go.mod after push to dev/speedup_quoroundup that modified dependencies locally * Start moving some liquidity calls to Dec not BigDec * One more BigDec x Dec op * Auto: update go.mod after push to dev/speedup_quoroundup that modified dependencies locally * Another liq BigDec -> Dec * Missed one step * Move another Liquidity BigDec -> Dec * Minor spread reward update * Make CalcAmount1Dec use Dec for Liquidity * Make one more op mutative * One more speedup * Fix test * Speedup SpotPrice impl --------- Co-authored-by: github-actions <[email protected]> (cherry picked from commit 7b599d5) # Conflicts: # CHANGELOG.md # go.mod # go.sum # osmomath/decimal.go # osmomath/go.mod # osmomath/go.sum # osmoutils/go.mod # osmoutils/go.sum # x/concentrated-liquidity/math/math.go # x/concentrated-liquidity/swapstrategy/one_for_zero.go # x/epochs/go.mod # x/epochs/go.sum # x/ibc-hooks/go.mod # x/ibc-hooks/go.sum
* Speedup quo round up * Code reuse * Missed a code re-use point * Add future notes * Comment cleanup * Auto: update go.mod after push to dev/speedup_quoroundup that modified dependencies locally * Add new fn: NewBigDecFromDecMulDec * Auto: update go.mod after push to dev/speedup_quoroundup that modified dependencies locally * Remove some extra ops from CL * Further perf notes * Make faster QuoRoundUpNextIntMut * Auto: update go.mod after push to dev/speedup_quoroundup that modified dependencies locally * Remove another 2 BigDec ops * Add another dec op * Auto: update go.mod after push to dev/speedup_quoroundup that modified dependencies locally * Start moving some liquidity calls to Dec not BigDec * One more BigDec x Dec op * Auto: update go.mod after push to dev/speedup_quoroundup that modified dependencies locally * Another liq BigDec -> Dec * Missed one step * Move another Liquidity BigDec -> Dec * Minor spread reward update * Make CalcAmount1Dec use Dec for Liquidity * Make one more op mutative * One more speedup * Fix test * Speedup SpotPrice impl --------- Co-authored-by: github-actions <[email protected]>
* BigDec operation speedups (backport #8006) * Speedup quo round up, start CL speedup integration (#8014) * Speedup quo round up * Code reuse * Missed a code re-use point * Add future notes * Comment cleanup * Auto: update go.mod after push to dev/speedup_quoroundup that modified dependencies locally * Add new fn: NewBigDecFromDecMulDec * Auto: update go.mod after push to dev/speedup_quoroundup that modified dependencies locally * Remove some extra ops from CL * Further perf notes * Make faster QuoRoundUpNextIntMut * Auto: update go.mod after push to dev/speedup_quoroundup that modified dependencies locally * Remove another 2 BigDec ops * Add another dec op * Auto: update go.mod after push to dev/speedup_quoroundup that modified dependencies locally * Start moving some liquidity calls to Dec not BigDec * One more BigDec x Dec op * Auto: update go.mod after push to dev/speedup_quoroundup that modified dependencies locally * Another liq BigDec -> Dec * Missed one step * Move another Liquidity BigDec -> Dec * Minor spread reward update * Make CalcAmount1Dec use Dec for Liquidity * Make one more op mutative * One more speedup * Fix test * Speedup SpotPrice impl --------- Co-authored-by: github-actions <[email protected]> * updates * updates --------- Co-authored-by: Dev Ojha <[email protected]> Co-authored-by: github-actions <[email protected]>
Significantly speedup quo round up by removing a second quo call, and lowering the big int size throughout by 2 words.
Also uses code reuse for panic checks as requested by @czarcas7ic
Summary by CodeRabbit
New Features
Bug Fixes