-
Notifications
You must be signed in to change notification settings - Fork 624
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
Revert "[CL Incentives] Implement CreateIncentive
logic and message"
#4568
Merged
AlpinYukseloglu
merged 1 commit into
alpo-uptime-claim
from
revert-4519-alpo-create-incentive
Mar 10, 2023
Merged
Revert "[CL Incentives] Implement CreateIncentive
logic and message"
#4568
AlpinYukseloglu
merged 1 commit into
alpo-uptime-claim
from
revert-4519-alpo-create-incentive
Mar 10, 2023
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
AlpinYukseloglu
added a commit
that referenced
this pull request
Mar 15, 2023
* initial push * push * untracked files * add untracked files * merge branches * add changes required for fees * lint * fix test errors * clean up * remove print lines * feat: single fee accum (#4116) * single fee accum * lint * no longer need to get all positions for fee * incentive accum initialization * lint * Update x/concentrated-liquidity/store_test.go Co-authored-by: Sishir Giri <[email protected]> * add lower level tests and make uptime accum access private * lint * add gotests for helper fn * Update test to use existing variable Co-authored-by: Roman <[email protected]> * create or update records upon position creation/update * add tests and clean up * sync position-related changes * add support for negative liquidity delta * add and test helper & set up tick initialization logic * implement accumulator updates on tick crossing and clean up proto * clean up comments * minor test cleanup * ensure accum initalization follows conventions and clean up tests * update pool proto and CL pool extension for tracking liq changes * update new field at pool initialization and add tests * comment todos * clean up naming and move empty options to global var * add clarifying comments and lint * implement IncentiveRecord proto * add comments * lint * set up wiring for proto * implement updateUptimeAccumulatorsToNow * implement and test calcAccruedIncentivesForAccum * add tests for new helpers * minor comment updates Co-authored-by: Roman <[email protected]> * accum test updates * lint * clean up diff * lint * update go.mod for e2e * clean up proto and add error message * lint * sketch out testing approach * set up keys * clean up diff * clean up comments * lint * implement set and get for incentive records * comment cleanup * minor comment and test cleanup * clean up tests and comments * [CL Incentives] Implement `setIncentiveRecords` and `getIncentiveRecords` (#4283) * set up keys * implement set and get for incentive records * comment cleanup * minor comment and test cleanup * Revert "[CL Incentives] Implement `setIncentiveRecords` and `getIncentiveRecords` (#4283)" (#4294) This reverts commit de7c146. * set incentive records in new position tests * fix merge conflicts * add check for init position record values * fix and finalize uptime accum position tests * fix go mod for e2e * clean up diff * add err check to accum update * fix rounding error * implement tick init uptime tracker logic * fix test compatibility * implement fix for global accums falling out of sync before tick init * add tests to ensure uptime trackers are initialized properly * add comment for new helper * add core logic * go mod tidy * fix conflicts * fix e2e * update go mod * fix and further test tick init logic * remove redundant values from incentive record state * cleanup from review * comment cleanup * set up cross tick tests * add further tests * test and comment cleanup * implement core logic * update osmoutils go mod and remove curTick as fn param * thorough tests for new functionality * clean up new functions for readability * clean up test comments * fix test names * lint * add godoc and further comments * update go mod for e2e * update liq change logic * update uptime accums before gettings them for tick crossing * abstract uptime init and update logic to helper * add thorough tests for initOrUpdatePositionUptime * update liquidity update logic and tests to use new helper * add todo for frozenuntil issue * lint * lint * clean up logic and add tests for helper * go mod for osmoutils e2e * move position key computation outside loop * clean up imports and go sum * fix imports * [CL Incentives][bugfix]: Replace all uses of frozenUntil with joinTime and freezeDuration * e2e passing * implement message, proto, and core logic * convert freezeduration to uint64 * implement tests for collectIncentives * add msg level tests and clean up logic/tests * add codec, cli, and simulation * claim incentives upon position deletion to clear records * comment cleanup * lint * minor test comment updates Co-authored-by: Roman <[email protected]> * godoc update Co-authored-by: Roman <[email protected]> * expand withdraw tests to better include incentives logic * minor optimizations and cleanup from code review * [CL Incentives] Implement `CreateIncentive` logic and message (#4519) * draft implementation * begin testing * add more test cases * add error catching test cases * implement createIncentive message * cli and codec * add check and related tests * add further tests and lint * add test case for existing incentive records * Revert "[CL Incentives] Implement `CreateIncentive` logic and message (#4519)" (#4568) This reverts commit b07e763. * fix conflicts --------- Co-authored-by: Adam Tucker <[email protected]> Co-authored-by: Adam Tucker <[email protected]> Co-authored-by: Sishir Giri <[email protected]> Co-authored-by: Roman <[email protected]>
AlpinYukseloglu
added a commit
that referenced
this pull request
Mar 15, 2023
* initial push * push * untracked files * add untracked files * merge branches * add changes required for fees * lint * fix test errors * clean up * remove print lines * feat: single fee accum (#4116) * single fee accum * lint * no longer need to get all positions for fee * incentive accum initialization * lint * Update x/concentrated-liquidity/store_test.go Co-authored-by: Sishir Giri <[email protected]> * add lower level tests and make uptime accum access private * lint * add gotests for helper fn * Update test to use existing variable Co-authored-by: Roman <[email protected]> * create or update records upon position creation/update * add tests and clean up * sync position-related changes * add support for negative liquidity delta * add and test helper & set up tick initialization logic * implement accumulator updates on tick crossing and clean up proto * clean up comments * minor test cleanup * ensure accum initalization follows conventions and clean up tests * update pool proto and CL pool extension for tracking liq changes * update new field at pool initialization and add tests * comment todos * clean up naming and move empty options to global var * add clarifying comments and lint * implement IncentiveRecord proto * add comments * lint * set up wiring for proto * implement updateUptimeAccumulatorsToNow * implement and test calcAccruedIncentivesForAccum * add tests for new helpers * minor comment updates Co-authored-by: Roman <[email protected]> * accum test updates * lint * clean up diff * lint * update go.mod for e2e * clean up proto and add error message * lint * sketch out testing approach * set up keys * clean up diff * clean up comments * lint * implement set and get for incentive records * comment cleanup * minor comment and test cleanup * clean up tests and comments * [CL Incentives] Implement `setIncentiveRecords` and `getIncentiveRecords` (#4283) * set up keys * implement set and get for incentive records * comment cleanup * minor comment and test cleanup * Revert "[CL Incentives] Implement `setIncentiveRecords` and `getIncentiveRecords` (#4283)" (#4294) This reverts commit de7c146. * set incentive records in new position tests * fix merge conflicts * add check for init position record values * fix and finalize uptime accum position tests * fix go mod for e2e * clean up diff * add err check to accum update * fix rounding error * implement tick init uptime tracker logic * fix test compatibility * implement fix for global accums falling out of sync before tick init * add tests to ensure uptime trackers are initialized properly * add comment for new helper * add core logic * go mod tidy * fix conflicts * fix e2e * update go mod * fix and further test tick init logic * remove redundant values from incentive record state * cleanup from review * comment cleanup * set up cross tick tests * add further tests * test and comment cleanup * implement core logic * update osmoutils go mod and remove curTick as fn param * thorough tests for new functionality * clean up new functions for readability * clean up test comments * fix test names * lint * add godoc and further comments * update go mod for e2e * update liq change logic * update uptime accums before gettings them for tick crossing * abstract uptime init and update logic to helper * add thorough tests for initOrUpdatePositionUptime * update liquidity update logic and tests to use new helper * add todo for frozenuntil issue * lint * lint * clean up logic and add tests for helper * go mod for osmoutils e2e * move position key computation outside loop * clean up imports and go sum * fix imports * [CL Incentives][bugfix]: Replace all uses of frozenUntil with joinTime and freezeDuration * e2e passing * implement message, proto, and core logic * convert freezeduration to uint64 * implement tests for collectIncentives * add msg level tests and clean up logic/tests * draft implementation * begin testing * add codec, cli, and simulation * claim incentives upon position deletion to clear records * comment cleanup * add more test cases * lint * add error catching test cases * implement createIncentive message * cli and codec * add check and related tests * add further tests and lint * add test case for existing incentive records * minor test comment updates Co-authored-by: Roman <[email protected]> * godoc update Co-authored-by: Roman <[email protected]> * expand withdraw tests to better include incentives logic * minor optimizations and cleanup from code review * [CL Incentives] Implement `CreateIncentive` logic and message (#4519) * draft implementation * begin testing * add more test cases * add error catching test cases * implement createIncentive message * cli and codec * add check and related tests * add further tests and lint * add test case for existing incentive records * Revert "[CL Incentives] Implement `CreateIncentive` logic and message (#4519)" (#4568) This reverts commit b07e763. * fix conflicts --------- Co-authored-by: Adam Tucker <[email protected]> Co-authored-by: Adam Tucker <[email protected]> Co-authored-by: Sishir Giri <[email protected]> Co-authored-by: Roman <[email protected]>
AlpinYukseloglu
added a commit
that referenced
this pull request
Mar 15, 2023
* initial push * push * untracked files * add untracked files * merge branches * add changes required for fees * lint * fix test errors * clean up * remove print lines * feat: single fee accum (#4116) * single fee accum * lint * no longer need to get all positions for fee * incentive accum initialization * lint * Update x/concentrated-liquidity/store_test.go Co-authored-by: Sishir Giri <[email protected]> * add lower level tests and make uptime accum access private * lint * add gotests for helper fn * Update test to use existing variable Co-authored-by: Roman <[email protected]> * create or update records upon position creation/update * add tests and clean up * sync position-related changes * add support for negative liquidity delta * add and test helper & set up tick initialization logic * implement accumulator updates on tick crossing and clean up proto * clean up comments * minor test cleanup * ensure accum initalization follows conventions and clean up tests * update pool proto and CL pool extension for tracking liq changes * update new field at pool initialization and add tests * comment todos * clean up naming and move empty options to global var * add clarifying comments and lint * implement IncentiveRecord proto * add comments * lint * set up wiring for proto * implement updateUptimeAccumulatorsToNow * implement and test calcAccruedIncentivesForAccum * add tests for new helpers * minor comment updates Co-authored-by: Roman <[email protected]> * accum test updates * lint * clean up diff * lint * update go.mod for e2e * clean up proto and add error message * lint * sketch out testing approach * set up keys * clean up diff * clean up comments * lint * implement set and get for incentive records * comment cleanup * minor comment and test cleanup * clean up tests and comments * [CL Incentives] Implement `setIncentiveRecords` and `getIncentiveRecords` (#4283) * set up keys * implement set and get for incentive records * comment cleanup * minor comment and test cleanup * Revert "[CL Incentives] Implement `setIncentiveRecords` and `getIncentiveRecords` (#4283)" (#4294) This reverts commit de7c146. * set incentive records in new position tests * fix merge conflicts * add check for init position record values * fix and finalize uptime accum position tests * fix go mod for e2e * clean up diff * add err check to accum update * fix rounding error * implement tick init uptime tracker logic * fix test compatibility * implement fix for global accums falling out of sync before tick init * add tests to ensure uptime trackers are initialized properly * add comment for new helper * add core logic * go mod tidy * fix conflicts * fix e2e * update go mod * fix and further test tick init logic * remove redundant values from incentive record state * cleanup from review * comment cleanup * set up cross tick tests * add further tests * test and comment cleanup * implement core logic * update osmoutils go mod and remove curTick as fn param * thorough tests for new functionality * clean up new functions for readability * clean up test comments * fix test names * lint * add godoc and further comments * update go mod for e2e * update liq change logic * update uptime accums before gettings them for tick crossing * abstract uptime init and update logic to helper * add thorough tests for initOrUpdatePositionUptime * update liquidity update logic and tests to use new helper * add todo for frozenuntil issue * lint * lint * clean up logic and add tests for helper * go mod for osmoutils e2e * move position key computation outside loop * clean up imports and go sum * fix imports * [CL Incentives][bugfix]: Replace all uses of frozenUntil with joinTime and freezeDuration * e2e passing * implement message, proto, and core logic * convert freezeduration to uint64 * implement tests for collectIncentives * add msg level tests and clean up logic/tests * draft implementation * begin testing * add codec, cli, and simulation * claim incentives upon position deletion to clear records * comment cleanup * add more test cases * lint * add error catching test cases * implement createIncentive message * cli and codec * add check and related tests * add further tests and lint * add test case for existing incentive records * pull relevant changes into new branch * lint * minor test comment updates Co-authored-by: Roman <[email protected]> * godoc update Co-authored-by: Roman <[email protected]> * expand withdraw tests to better include incentives logic * minor optimizations and cleanup from code review * [CL Incentives] Implement `CreateIncentive` logic and message (#4519) * draft implementation * begin testing * add more test cases * add error catching test cases * implement createIncentive message * cli and codec * add check and related tests * add further tests and lint * add test case for existing incentive records * Revert "[CL Incentives] Implement `CreateIncentive` logic and message (#4519)" (#4568) This reverts commit b07e763. * make unit tests more robust * minor comment cleanup * fix conflicts --------- Co-authored-by: Adam Tucker <[email protected]> Co-authored-by: Adam Tucker <[email protected]> Co-authored-by: Sishir Giri <[email protected]> Co-authored-by: Roman <[email protected]>
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.
Reverts #4519