forked from Canto-Network/Canto
-
Notifications
You must be signed in to change notification settings - Fork 4
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
fix: simulations for cosmos modules #7
Closed
poorphd
wants to merge
74
commits into
liquidstaking-module
from
liquidstaking-module-add-simulation
Closed
fix: simulations for cosmos modules #7
poorphd
wants to merge
74
commits into
liquidstaking-module
from
liquidstaking-module-add-simulation
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
penalty from src validator happened during re-delegation period must be covered by unpairing insurance.
this option can make epoch periods as very fast
* remove possibility of out of index error by using map and re-create slices * not allow re-delegation if src validator is in unbonding period * not track re-delegation info if src validator is unbonded because it completes re-delegation immediately * refactored tombstone related code - remove redundancy * fix some minor logics in testing codes
includes minor refactoring
it does not return error
* coins must not contain any empty elements. so append it dynamically, not using fixed length of slice. * only add positive amt * check every coins are valid before sending it * finally check inputs and outputs (should not trigger any error)
* add validity check before sending coins * the destination(=output) is just a reward pool so we don't need to use InputOutputCoins. SendCoins will be ok.
* snedAmt must be positive * refundCoins must be valid * lsTokensToBurn must be valid to burn it * sendCoins must be valid to send it to undelegator
maybe delegation share's token value is higher than chunk size. In that case, just follow zero penalty flow.
we just return chunk un-delegated chunk balance to un-delegator
covered edge case where re-delegation penalty is bigger than un-pairing insurance's balance
* simplified variable names * diet code lines * make a function for common logic
and fix endblocker sequences in app.go which operates during EnableAdvanaceEpoch is on
if valid insurance is finished its duty, then it can be Pairing insurance again.
updated invariance too. hard to guarantee unstkaing amt always be gte than chunk size tokens
…ulation # Conflicts: # app/app.go # app/sim_test.go # app/state.go # x/liquidstaking/keeper/liquidstaking.go # x/liquidstaking/keeper/liquidstaking_test.go
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.
Description
broken simulations for cosmos modules are fixed
short versions of simulations are added for CI/CD
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...