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

Add improved homa lite redeem match #1626

Merged
merged 25 commits into from
Nov 24, 2021
Merged

Conversation

syan095
Copy link
Contributor

@syan095 syan095 commented Nov 20, 2021

After redeem requests are processed, the "next" item is stored. When the next mint/unbond/adjust_available_staking happens, redeem requests are iterated from the "next" item. This ensures all redeem requests are "processed" before wrapping around.

Closes #1582

Roy Yang added 10 commits November 16, 2021 18:32
…c model more easily for HomaLite

Added basic unit tests using the feeless mock.
…ailable-staking-balances

Added more tests and modified existing tests
…alance, mint/adjust_available_staking_balance will not fail, and will skip the request instead

Added corresponding unit test.
…Starting element is read from storage

Added unit test to test that function
When updating redeem requests, remember the "next" item
Added unit tests to test the new logic
…edeem-match

* origin/master:
  Add more test cases (#1620)
  bump (#1622)
  update protocolId and bootnode
  Fixed a redeem bug and added more Homa lite tests (#1619)
  Add module asset registry (#1598)
  MaxAuctions count to 50 (#1617)
  Cdp Treasury Bench update (#1609)
  Bump @openzeppelin/contracts from 4.3.2 to 4.3.3 in /ts-tests (#1612)

# Conflicts:
#	modules/homa-lite/src/lib.rs
#	modules/homa-lite/src/tests_no_fees.rs
@syan095 syan095 requested a review from xlc November 20, 2021 05:55
modules/homa-lite/src/lib.rs Outdated Show resolved Hide resolved
@syan095 syan095 requested a review from xlc November 21, 2021 04:55
@syan095 syan095 marked this pull request as ready for review November 21, 2021 21:24
@syan095 syan095 requested a review from wangjj9219 November 21, 2021 21:24
modules/homa-lite/src/lib.rs Outdated Show resolved Hide resolved
modules/homa-lite/src/lib.rs Outdated Show resolved Hide resolved
modules/homa-lite/src/lib.rs Outdated Show resolved Hide resolved
Roy Yang added 2 commits November 22, 2021 15:28
…eem request key

Iteration now start from and exclude the key
Update tests.
iterate_from_next_redeem_request now also updates storage
modules/homa-lite/src/lib.rs Outdated Show resolved Hide resolved
modules/homa-lite/src/lib.rs Outdated Show resolved Hide resolved
modules/homa-lite/src/lib.rs Outdated Show resolved Hide resolved
Modification and removal of redeem requests storage now happens within the same function
wangjj9219
wangjj9219 previously approved these changes Nov 23, 2021
Removed the use of closures
Storage mutation and deletion now all happens within the same function and synchronously.
`redeem_from_previous_redeem_request` now iterates and redeem requests depending on input parameter.
xlc
xlc previously approved these changes Nov 24, 2021
modules/homa-lite/src/lib.rs Outdated Show resolved Hide resolved
@xlc xlc merged commit f9c6754 into master Nov 24, 2021
@xlc xlc deleted the feature/homa-lite-redeem-match branch November 24, 2021 20:58
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.

Improve homa-lite request matching
4 participants