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

refactor/PRO-1159/remove-order-caches #4557

Draft
wants to merge 42 commits into
base: main
Choose a base branch
from

Conversation

Janislav
Copy link
Contributor

@Janislav Janislav commented Feb 22, 2024

Pull Request

Closes: PRO-1159

Checklist

Please conduct a thorough self-review before opening the PR.

  • I am confident that the code works.
  • I have updated documentation where appropriate.

Summary

  • Refactored the AMM in away that we can access orders by LP by given LP
  • Removed all order caches as well as the usage of them and replaced with an equivalent
  • Added necessary migrations to transform the state of the old AMM
  • Tested the migrations against a local net build from the current main and 1.3 branch
  • Added/Removed tests were needed

This change requires LPs to restart the LP-API upon runtime upgrade

Non-Breaking changes

If this PR includes non-breaking changes, select the non-breaking label. On merge, CI will automatically cherry-pick the commit to a PR against the release branch.

Copy link

codecov bot commented Feb 22, 2024

Codecov Report

Attention: Patch coverage is 66.77686% with 201 lines in your changes are missing coverage. Please review.

Project coverage is 72%. Comparing base (5b503b9) to head (b6bebc9).

Files Patch % Lines
...s/cf-pools/src/migrations/lp_pools_state_change.rs 0% 75 Missing ⚠️
state-chain/amm/src/limit_orders.rs 61% 57 Missing and 1 partial ⚠️
state-chain/amm/src/range_orders.rs 59% 39 Missing ⚠️
state-chain/amm/src/lib.rs 70% 17 Missing ⚠️
state-chain/pallets/cf-pools/src/lib.rs 92% 2 Missing and 7 partials ⚠️
state-chain/amm/src/common.rs 0% 3 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff           @@
##            main   #4557    +/-   ##
======================================
- Coverage     72%     72%    -0%     
======================================
  Files        412     413     +1     
  Lines      70705   70776    +71     
  Branches   70705   70776    +71     
======================================
- Hits       51140   50962   -178     
- Misses     17071   17319   +248     
- Partials    2494    2495     +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Janislav Janislav marked this pull request as ready for review March 25, 2024 10:59
@Janislav Janislav marked this pull request as draft June 18, 2024 09:22
@Janislav
Copy link
Contributor Author

As discussed, converting this to draft until we have time to back to it.

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

Successfully merging this pull request may close these issues.

1 participant