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: check denom routes at time of gauge creation #8136

Merged
merged 13 commits into from
Apr 26, 2024

Conversation

czarcas7ic
Copy link
Member

@czarcas7ic czarcas7ic commented Apr 24, 2024

Closes: #XXX

What is the purpose of the change

Angelo from BitSong pointed out that their gauge rewards were not paying out. This was because there was no protorev hot route assigned for the reward denom. If we are unable to determine if the value of the token being distributed is greater than the min epoch distribution threshold, then we don't distribute it. As they pointed out, we should just prevent the ability to create a gauge with rewards that are unable to be distributed.

Summary by CodeRabbit

  • New Features

    • Enabled ProtoRev distribution on epoch transitions.
    • Added a deactivated smart account module with adjusted fee deduction timing.
    • Introduced validation for reward denominations through ProtoRev before gauge creation or addition.
  • Bug Fixes

    • Reset validator signing info missed blocks counter.
    • Removed legacy behaviors related to unbonding lockups.
  • Documentation

    • Updated CHANGELOG with recent changes and module impacts.
  • Error Handling

    • Added a new error type for missing routes in denomination rewards setup.

@czarcas7ic czarcas7ic added the V:state/breaking State machine breaking PR label Apr 24, 2024
@@ -16,6 +16,7 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"

"github.com/osmosis-labs/osmosis/osmomath"
appparams "github.com/osmosis-labs/osmosis/v24/app/params"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes in this file are the only actual changes. All other changes are just fixing tests to register routes so they don't fail at this step (which is good / expected behavior).

@czarcas7ic czarcas7ic changed the title WIP: check denoms at time of gauge creation fix: check denom routes at time of gauge creation Apr 25, 2024
@czarcas7ic czarcas7ic marked this pull request as ready for review April 25, 2024 04:21
Copy link
Contributor

coderabbitai bot commented Apr 25, 2024

Walkthrough

The recent updates aim to refine the blockchain's incentive mechanisms by strengthening rules for reward distributions through ProtoRev, a new system element. Changes include verifying reward routes and denominations, adjusting fee timings for smart accounts, and eliminating outdated unbonding behaviors. These updates enhance operational efficiency and system resilience.

Changes

File Path Change Summary
x/incentives/keeper/... Added checks for reward denominations and routes in ProtoRev. Adjusted tests for proper route setup.
x/pool-incentives/keeper/... Updated tests to establish pools for denom pairs and ensure ProtoRev routes are set.
x/superfluid/keeper/... Ensured ProtoRev routes are configured in tests involving superfluid staking and rewards distribution.
CHANGELOG.md Documented significant updates such as ProtoRev distribution enablement, smart account adjustments, and legacy feature removals.
x/incentives/types/errors.go Introduced a new error type for missing ProtoRev routes.

🐇✨
In the fields of code where logic plays,
A rabbit hopped through the ProtoRev maze.
With each hop and skip, the paths were set,
Ensuring rewards, no rabbit would forget.
Celebrate the changes, for they pave a brighter day!
🎉🥕


Recent Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between 1d33bbe and b312539.
Files selected for processing (1)
  • CHANGELOG.md (1 hunks)

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Out of diff range and nitpick comments (9)
CHANGELOG.md (9)

Line range hint 992-992: Adjust heading level for consistency.

- ### v6.4.0
+ ## v6.4.0

Line range hint 1004-1004: Adjust heading level for consistency.

- ### v6.3.1
+ ## v6.3.1

Line range hint 1013-1013: Adjust heading level for consistency.

- ### v6.3.0
+ ## v6.3.0

Line range hint 1018-1018: Adjust heading level for consistency.

- ### v6.2.0
+ ## v6.2.0

Line range hint 1070-1070: Adjust heading level for consistency.

- ### v6.0.0
+ ## v6.0.0

Line range hint 331-331: Remove trailing punctuation from heading for consistency.

- ## v24.0.0
+ ## v24.0.0

Line range hint 594-594: Convert bare URL to a markdown link for better readability.

- https://github.com/osmosis-labs/osmosis/releases/tag/v6.4.0
+ [v6.4.0](https://github.com/osmosis-labs/osmosis/releases/tag/v6.4.0)

Line range hint 652-652: Convert bare URL to a markdown link for better readability.

- https://github.com/osmosis-labs/osmosis/releases/tag/v6.3.1
+ [v6.3.1](https://github.com/osmosis-labs/osmosis/releases/tag/v6.3.1)

Line range hint 1233-1233: Ensure there are no empty links in the document.

Please provide a valid URL or remove the empty link.

* use uosmo var

* fix lint

* tidy
@czarcas7ic czarcas7ic requested a review from nicolaslara as a code owner April 25, 2024 10:37
@github-actions github-actions bot added C:x/lockup C:CLI C:x/gamm Changes, features and bugs related to the gamm module. C:x/mint C:x/txfees C:app-wiring Changes to the app folder C:x/tokenfactory C:simulator Edits simulator or simulations labels Apr 25, 2024
Copy link
Contributor

Important Notice

This PR includes modifications to the tests/e2e/initialization module.
Please follow the instructions below:

  1. Backport these changes to the previous Osmosis version's branch.
  2. Run the script inside a Docker container to update genesis and configs for pre-upgrade Osmosis.
  3. Merge the backported changes.
  4. The image will be built and uploaded to Docker Hub here.
  5. Grab the latest image and update it in the PR to the main branch replacing the previousVersionInitTag in the osmosis/tests/e2e/containers/config.go

Please let us know if you need any help.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Out of diff range and nitpick comments (3)
CHANGELOG.md (3)

Line range hint 762-762: Duplicate entry for PR #7622 under version "v24.0.0". Ensure it does not represent the same change listed twice.


Line range hint 603-603: The URL for PR #558 is bare and should be formatted as a markdown link for consistency with other entries.

- * [#558](https://github.com/osmosis-labs/cosmos-sdk/pull/558) Gracefully log when there is a pruning error instead of panic
+ * [#558](https://github.com/osmosis-labs/cosmos-sdk/pull/558) Gracefully log when there is a pruning error instead of panic

Line range hint 340-340: Remove the period at the end of the heading for consistency with other headings.

- ### Fee Market Parameter Updates.
+ ### Fee Market Parameter Updates

CHANGELOG.md Outdated Show resolved Hide resolved
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Out of diff range and nitpick comments (3)
CHANGELOG.md (3)

Line range hint 339-339: Inconsistent heading level for "State Breaking" under version "v24.0.0".

Adjust the heading level to maintain consistency with other sections.


Line range hint 602-602: Bare URL used in the changelog entry for PR #7250.

Consider using a markdown link format to improve readability and accessibility.


Line range hint 660-660: Bare URL used in the changelog entry for PR #7258.

Consider using a markdown link format to improve readability and accessibility.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

CHANGELOG.md Show resolved Hide resolved
@czarcas7ic czarcas7ic merged commit 9b4fc5b into main Apr 26, 2024
1 check passed
@czarcas7ic czarcas7ic deleted the adam/no-gauge-creation-for-denom-no-route branch April 26, 2024 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants