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

Protorev: Use hooks instead of message parsing to trigger backruns #5045

Merged
merged 76 commits into from
Jun 6, 2023

Commits on Apr 18, 2023

  1. Add input and output

    - Follows gamm module patterns such as 1) naming convention and 2) providing tokens (sdk.Coins) even though it's currently expected to be a single token in or out (sdk.Coin).
    NotJeremyLiu committed Apr 18, 2023
    Configuration menu
    Copy the full SHA
    02ddd55 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    75ea9cc View commit details
    Browse the repository at this point in the history

Commits on Apr 26, 2023

  1. Configuration menu
    Copy the full SHA
    d556709 View commit details
    Browse the repository at this point in the history
  2. Create new kvstore and methods for swpsToBackrun

    - With new hook based logic, need to persist the swaps to the posthandler. Doing so via storing in kvstored
    NotJeremyLiu committed Apr 26, 2023
    Configuration menu
    Copy the full SHA
    772af1b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    089d091 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    1a6ed93 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    dcc5549 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    616f5dc View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    ef2d317 View commit details
    Browse the repository at this point in the history

Commits on Apr 27, 2023

  1. Configuration menu
    Copy the full SHA
    9e71597 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    99d8e9b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3212d18 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    9a73b34 View commit details
    Browse the repository at this point in the history

Commits on May 2, 2023

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

Commits on May 18, 2023

  1. Configuration menu
    Copy the full SHA
    80a3db1 View commit details
    Browse the repository at this point in the history
  2. no-op unused hooks

    NotJeremyLiu committed May 18, 2023
    Configuration menu
    Copy the full SHA
    26c46a1 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    43b62ef View commit details
    Browse the repository at this point in the history
  4. Add swap tests for hooks

    - Also creates a position in the cl pool defined in setupPools
    NotJeremyLiu committed May 18, 2023
    Configuration menu
    Copy the full SHA
    6c8ab71 View commit details
    Browse the repository at this point in the history

Commits on May 19, 2023

  1. Add join/exit pool hook tests

    - Limit len(coins) = 1 due to an exit pool message giving all denoms as exitdenoms (and potentially future behavior of other modules)
    NotJeremyLiu committed May 19, 2023
    Configuration menu
    Copy the full SHA
    fa03d8e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    cc5f288 View commit details
    Browse the repository at this point in the history

Commits on May 22, 2023

  1. Configuration menu
    Copy the full SHA
    8938ba5 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    164615f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    d291e69 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    087cc7c View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    3e259bf View commit details
    Browse the repository at this point in the history
  6. Update expected liquidity value for CL pool

    - CL pool now is created with pre-defined default values, so I remove sending coins to the pool in keeper_test.go
    - Updates the expected value in epoch_hook_test to match the output of the default PrepareConcentratedPoolWithCoinsAndFullRangePosition coins output
    NotJeremyLiu committed May 22, 2023
    Configuration menu
    Copy the full SHA
    9d28bff View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    23c1396 View commit details
    Browse the repository at this point in the history
  8. Add changelog entry

    NotJeremyLiu committed May 22, 2023
    Configuration menu
    Copy the full SHA
    840416e View commit details
    Browse the repository at this point in the history
  9. Remove unused messages in TestAnteHandle

    Since we now have hook-based logic, can remove msgs from inputs into TestAnteHandle()
    NotJeremyLiu committed May 22, 2023
    Configuration menu
    Copy the full SHA
    6c1944f View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    225f1b9 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    cb4c85b View commit details
    Browse the repository at this point in the history
  12. lint

    NotJeremyLiu committed May 22, 2023
    Configuration menu
    Copy the full SHA
    12b5c7d View commit details
    Browse the repository at this point in the history

Commits on May 23, 2023

  1. Move all mul logic into same fn in hook logic afterpoolCreated, add p…

    …anic catching to function
    NotJeremyLiu committed May 23, 2023
    Configuration menu
    Copy the full SHA
    65356d9 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    523c711 View commit details
    Browse the repository at this point in the history
  3. fix lint

    NotJeremyLiu committed May 23, 2023
    Configuration menu
    Copy the full SHA
    031a52b View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    e2729f4 View commit details
    Browse the repository at this point in the history

Commits on May 26, 2023

  1. Configuration menu
    Copy the full SHA
    65f5684 View commit details
    Browse the repository at this point in the history
  2. remove unused import

    NotJeremyLiu committed May 26, 2023
    Configuration menu
    Copy the full SHA
    92933f1 View commit details
    Browse the repository at this point in the history
  3. Remove unnecessary code

    NotJeremyLiu committed May 26, 2023
    Configuration menu
    Copy the full SHA
    f88995c View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    b1f8068 View commit details
    Browse the repository at this point in the history

Commits on May 30, 2023

  1. clarify comment

    Co-authored-by: Sishir Giri <sis1001@berkeley.edu>
    NotJeremyLiu and stackman27 authored May 30, 2023
    Configuration menu
    Copy the full SHA
    4c97712 View commit details
    Browse the repository at this point in the history
  2. use NewCoins instead of Coins

    Co-authored-by: Sishir Giri <sis1001@berkeley.edu>
    NotJeremyLiu and stackman27 authored May 30, 2023
    Configuration menu
    Copy the full SHA
    6c744ac View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    fe5f855 View commit details
    Browse the repository at this point in the history
  4. Revert "use NewCoins instead of Coins"

    This reverts commit 6c744ac.
    NotJeremyLiu committed May 30, 2023
    Configuration menu
    Copy the full SHA
    6faeab3 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    6d7d411 View commit details
    Browse the repository at this point in the history

Commits on Jun 1, 2023

  1. Configuration menu
    Copy the full SHA
    66c1e8c View commit details
    Browse the repository at this point in the history
  2. Restructure protorev hook updating to only process pools with coins

    - Previously, protorev was triggered by AfterConcentratedPoolCreated, but this had an issue where the pool is created without any liquidity, returning empty coins object when getting total liquidity
    - Instead, this commit makes  AfterConcentratedPoolCreated a no-op and moves the core logic into AfterInitialPoolPositionCreated, so that we know we have coins
    - This allows us to not handle this case in any custom manner and can expect there to be coins
    - Added more test cases to ensure this works as expected
    NotJeremyLiu committed Jun 1, 2023
    Configuration menu
    Copy the full SHA
    5363319 View commit details
    Browse the repository at this point in the history
  3. Use denoms first, then coins in pool updating

    - Does all logic it can just using denoms first, and only gets coins object if necessary
    NotJeremyLiu committed Jun 1, 2023
    Configuration menu
    Copy the full SHA
    e3a9998 View commit details
    Browse the repository at this point in the history
  4. remove comment

    NotJeremyLiu committed Jun 1, 2023
    Configuration menu
    Copy the full SHA
    319f0fc View commit details
    Browse the repository at this point in the history

Commits on Jun 2, 2023

  1. use poolmanager to get liquidity to avoid issues with CL

    - Previously used gamm to get liquidity which would have error'd, so uses poolmanager instead
    - Separate specific logic into own function for re-use and testing
    NotJeremyLiu committed Jun 2, 2023
    Configuration menu
    Copy the full SHA
    91f16f0 View commit details
    Browse the repository at this point in the history

Commits on Jun 5, 2023

  1. Configuration menu
    Copy the full SHA
    c24c3b9 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    169006a View commit details
    Browse the repository at this point in the history
  3. v16 version bump

    NotJeremyLiu committed Jun 5, 2023
    Configuration menu
    Copy the full SHA
    93e1edd View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    817fb28 View commit details
    Browse the repository at this point in the history
  5. fix typo

    NotJeremyLiu committed Jun 5, 2023
    Configuration menu
    Copy the full SHA
    5bda10f View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    7a69efa View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    2873238 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    5393e78 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    3aa26ea View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    7fc81f8 View commit details
    Browse the repository at this point in the history
  11. Remove old function

    NotJeremyLiu committed Jun 5, 2023
    Configuration menu
    Copy the full SHA
    da7c839 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    924a749 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    7fcdb55 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    a0d2a3b View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    e5d17c6 View commit details
    Browse the repository at this point in the history

Commits on Jun 6, 2023

  1. Move panic catching into GetComparablePoolLiquidity

    - Panic catching was previously in CompareAndStorePool because that function did the multiplication.
    - Since then, the multiplication logic that this panic catches overflows on has been separated into it's own function GetComparablePoolLiquidity
    - This commit moves the panic catching logic to GetComparablePoolLiquidity
    NotJeremyLiu committed Jun 6, 2023
    Configuration menu
    Copy the full SHA
    22d528e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ed66bce View commit details
    Browse the repository at this point in the history
  3. Revert "Add int overflow panic catching test"

    This reverts commit ed66bce.
    NotJeremyLiu committed Jun 6, 2023
    Configuration menu
    Copy the full SHA
    61e7076 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    995b115 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    026fe77 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    c18ec19 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    c2db6d7 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    460da4a View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    61d3474 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    8966b6a View commit details
    Browse the repository at this point in the history