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

fix: simulations for cosmos modules #7

Closed

Commits on Jun 29, 2023

  1. apply re-delegation slashing penalty coverage

    penalty from src validator happened during re-delegation period must be covered by unpairing insurance.
    zsystm committed Jun 29, 2023
    Configuration menu
    Copy the full SHA
    bdb13ec View commit details
    Browse the repository at this point in the history
  2. add missing files

    zsystm committed Jun 29, 2023
    Configuration menu
    Copy the full SHA
    c495eb3 View commit details
    Browse the repository at this point in the history
  3. adding testing option

    this option can make epoch periods as very fast
    zsystm committed Jun 29, 2023
    Configuration menu
    Copy the full SHA
    5a4923b View commit details
    Browse the repository at this point in the history
  4. chore: minor fix

    zsystm committed Jun 29, 2023
    Configuration menu
    Copy the full SHA
    880d5f0 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    0278297 View commit details
    Browse the repository at this point in the history
  6. wip: add simulated operations

    zsystm committed Jun 29, 2023
    Configuration menu
    Copy the full SHA
    5e166b8 View commit details
    Browse the repository at this point in the history

Commits on Jun 30, 2023

  1. refactor core logics make it more secure

    * 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
    zsystm committed Jun 30, 2023
    Configuration menu
    Copy the full SHA
    090dd4c View commit details
    Browse the repository at this point in the history
  2. wip: add simulation operations

    zsystm committed Jun 30, 2023
    Configuration menu
    Copy the full SHA
    48db323 View commit details
    Browse the repository at this point in the history

Commits on Jul 2, 2023

  1. Configuration menu
    Copy the full SHA
    9dcae46 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7c1ec6a View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3a69535 View commit details
    Browse the repository at this point in the history

Commits on Jul 3, 2023

  1. wip: add params and proposals

    zsystm committed Jul 3, 2023
    Configuration menu
    Copy the full SHA
    f64c25d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3feabbf View commit details
    Browse the repository at this point in the history

Commits on Jul 4, 2023

  1. add and update some comments

    zsystm committed Jul 4, 2023
    Configuration menu
    Copy the full SHA
    a92bdf4 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    27a468a View commit details
    Browse the repository at this point in the history
  3. wip: add simulations

    zsystm committed Jul 4, 2023
    Configuration menu
    Copy the full SHA
    0b247e2 View commit details
    Browse the repository at this point in the history

Commits on Jul 5, 2023

  1. Configuration menu
    Copy the full SHA
    a57ebf7 View commit details
    Browse the repository at this point in the history

Commits on Jul 6, 2023

  1. define panic and error case for abci

    includes minor refactoring
    zsystm committed Jul 6, 2023
    Configuration menu
    Copy the full SHA
    ba566b4 View commit details
    Browse the repository at this point in the history
  2. refactor codes more readable

    zsystm committed Jul 6, 2023
    Configuration menu
    Copy the full SHA
    87eab38 View commit details
    Browse the repository at this point in the history
  3. refactor and add tcs

    zsystm committed Jul 6, 2023
    Configuration menu
    Copy the full SHA
    41efc93 View commit details
    Browse the repository at this point in the history

Commits on Jul 7, 2023

  1. fix syntax

    it does not return error
    zsystm committed Jul 7, 2023
    Configuration menu
    Copy the full SHA
    2136584 View commit details
    Browse the repository at this point in the history
  2. panic instead of error

    zsystm committed Jul 7, 2023
    Configuration menu
    Copy the full SHA
    25f026f View commit details
    Browse the repository at this point in the history
  3. panic instead of error

    zsystm committed Jul 7, 2023
    Configuration menu
    Copy the full SHA
    cb51c6c View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    acf4a98 View commit details
    Browse the repository at this point in the history

Commits on Jul 9, 2023

  1. refactor: use iteration

    zsystm committed Jul 9, 2023
    Configuration menu
    Copy the full SHA
    6cce4d4 View commit details
    Browse the repository at this point in the history

Commits on Jul 10, 2023

  1. refactor and add security checks for CollectRewardAndFee

    * 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)
    zsystm committed Jul 10, 2023
    Configuration menu
    Copy the full SHA
    381e512 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    59b5b7e View commit details
    Browse the repository at this point in the history
  3. refactor: add safety check and use SendCoins

    * 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.
    zsystm committed Jul 10, 2023
    Configuration menu
    Copy the full SHA
    35110c8 View commit details
    Browse the repository at this point in the history
  4. add sanity checks before sending coins

    * snedAmt must be positive
    * refundCoins must be valid
    * lsTokensToBurn must be valid to burn it
    * sendCoins must be valid to send it to undelegator
    zsystm committed Jul 10, 2023
    Configuration menu
    Copy the full SHA
    b15f776 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    6692128 View commit details
    Browse the repository at this point in the history
  6. add sanity check for making out insurances

    even if insurance is paired, if it have invalid validator it must be out.
    
    when creating candidates, we don't have to panic. just don't including it will be enough.
    zsystm committed Jul 10, 2023
    Configuration menu
    Copy the full SHA
    76930c0 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    1f4aebc View commit details
    Browse the repository at this point in the history

Commits on Jul 11, 2023

  1. update param change doc

    zsystm committed Jul 11, 2023
    Configuration menu
    Copy the full SHA
    083e95e View commit details
    Browse the repository at this point in the history
  2. wip: refactor error and panic

    zsystm committed Jul 11, 2023
    Configuration menu
    Copy the full SHA
    784cba7 View commit details
    Browse the repository at this point in the history
  3. wip: specify panic or error

    zsystm committed Jul 11, 2023
    Configuration menu
    Copy the full SHA
    b1a9017 View commit details
    Browse the repository at this point in the history
  4. remove redundant check

    zsystm committed Jul 11, 2023
    Configuration menu
    Copy the full SHA
    94d790f View commit details
    Browse the repository at this point in the history
  5. make consistent logic

    zsystm committed Jul 11, 2023
    Configuration menu
    Copy the full SHA
    d4b1067 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    181b6bb View commit details
    Browse the repository at this point in the history
  7. update completeLiquidUnstake

    if insurance can cover penalty, unstaker will get penalty amt of tokens .
    if not, reward module account get penalty amt of tokens. in this case, unstaker will get refunded ls tokens instead.
    zsystm committed Jul 11, 2023
    Configuration menu
    Copy the full SHA
    d0e72be View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    6ac3db1 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    d758010 View commit details
    Browse the repository at this point in the history

Commits on Jul 12, 2023

  1. remove encoding and update chain id

    remove wrong encoding and use valid one
    chain id must be foramtted as to pass validation of ethermint.
    zsystm committed Jul 12, 2023
    Configuration menu
    Copy the full SHA
    a456658 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f0b93a5 View commit details
    Browse the repository at this point in the history
  3. add cli tests

    zsystm committed Jul 12, 2023
    Configuration menu
    Copy the full SHA
    e78ceb7 View commit details
    Browse the repository at this point in the history
  4. update integration testing

    zsystm committed Jul 12, 2023
    Configuration menu
    Copy the full SHA
    aaa9078 View commit details
    Browse the repository at this point in the history
  5. remove hooks and add to-dos

    zsystm committed Jul 12, 2023
    Configuration menu
    Copy the full SHA
    f875f48 View commit details
    Browse the repository at this point in the history

Commits on Jul 13, 2023

  1. test: add poc for simulation

    dongsam authored and zsystm committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    57c521d View commit details
    Browse the repository at this point in the history
  2. safety patch

    zsystm committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    3d03e66 View commit details
    Browse the repository at this point in the history
  3. add missing patch

    zsystm committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    d64ebb5 View commit details
    Browse the repository at this point in the history
  4. remove validateUnbondAmount and add sanity check

    maybe delegation share's token value is higher than chunk size. In that case, just follow zero penalty flow.
    zsystm committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    ec809af View commit details
    Browse the repository at this point in the history
  5. remove un-used variable

    we just return chunk un-delegated chunk balance to un-delegator
    zsystm committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    5ddeab8 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    bbd8a08 View commit details
    Browse the repository at this point in the history
  7. cover edge case for covering re-delegation penalty

    covered edge case where re-delegation penalty is bigger than un-pairing insurance's balance
    zsystm committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    674aab2 View commit details
    Browse the repository at this point in the history

Commits on Jul 16, 2023

  1. Configuration menu
    Copy the full SHA
    5d3968a View commit details
    Browse the repository at this point in the history
  2. refactoring

    * simplified variable names
    * diet code lines
    * make a function for common logic
    zsystm committed Jul 16, 2023
    Configuration menu
    Copy the full SHA
    999d13f View commit details
    Browse the repository at this point in the history
  3. add safe step for withdraw reqs

    and fix endblocker sequences in app.go which operates during EnableAdvanaceEpoch is on
    zsystm committed Jul 16, 2023
    Configuration menu
    Copy the full SHA
    d757d1a View commit details
    Browse the repository at this point in the history
  4. refactor: change function name

    zsystm committed Jul 16, 2023
    Configuration menu
    Copy the full SHA
    687cda7 View commit details
    Browse the repository at this point in the history

Commits on Jul 17, 2023

  1. add missing codec

    zsystm committed Jul 17, 2023
    Configuration menu
    Copy the full SHA
    fc7a5e3 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3e7d55f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    4549891 View commit details
    Browse the repository at this point in the history

Commits on Jul 18, 2023

  1. update complete insurance duty logic

    if valid insurance is finished its duty, then it can be Pairing insurance again.
    zsystm committed Jul 18, 2023
    Configuration menu
    Copy the full SHA
    5aaf387 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    bfdce1e View commit details
    Browse the repository at this point in the history
  3. add missing tests

    zsystm committed Jul 18, 2023
    Configuration menu
    Copy the full SHA
    469c61d View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    389fd43 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    41b466e View commit details
    Browse the repository at this point in the history
  6. update quo / quotruncate

    zsystm committed Jul 18, 2023
    Configuration menu
    Copy the full SHA
    537f217 View commit details
    Browse the repository at this point in the history
  7. add todo

    zsystm committed Jul 18, 2023
    Configuration menu
    Copy the full SHA
    0eb1a71 View commit details
    Browse the repository at this point in the history

Commits on Jul 19, 2023

  1. Configuration menu
    Copy the full SHA
    b02af61 View commit details
    Browse the repository at this point in the history
  2. fix import cycle and add tc for GetAllRePairableChunksAndOutInsurances

    updated invariance too.
    hard to guarantee unstkaing amt always be gte than chunk size tokens
    zsystm committed Jul 19, 2023
    Configuration menu
    Copy the full SHA
    8cd078b View commit details
    Browse the repository at this point in the history
  3. update invriant test also

    zsystm committed Jul 19, 2023
    Configuration menu
    Copy the full SHA
    bd01857 View commit details
    Browse the repository at this point in the history
  4. test: WIP: fix simulation

    dongsam committed Jul 19, 2023
    Configuration menu
    Copy the full SHA
    20ae20e View commit details
    Browse the repository at this point in the history

Commits on Jul 20, 2023

  1. fix: simulation errors

    poorphd committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    6961967 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ed2aea9 View commit details
    Browse the repository at this point in the history
  3. Merge branch 'liquidstaking-module' into liquidstaking-module-add-sim…

    …ulation
    
    # Conflicts:
    #	app/app.go
    #	app/sim_test.go
    #	app/state.go
    #	x/liquidstaking/keeper/liquidstaking.go
    #	x/liquidstaking/keeper/liquidstaking_test.go
    poorphd committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    38f3695 View commit details
    Browse the repository at this point in the history