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

chore: bump sdk and cometbft #8743

Merged
merged 3 commits into from
Oct 2, 2024

Conversation

PaddyMc
Copy link
Collaborator

@PaddyMc PaddyMc commented Sep 30, 2024

What is the purpose of the change

Bumping cometbft and cosmos sdk to the lastest versions:

comet => https://github.com/osmosis-labs/cometbft/releases/tag/v0.38.12-v26-osmo-2
cosmossdk => https://github.com/osmosis-labs/cosmos-sdk/releases/tag/v0.50.10-v26-osmo-2

@PaddyMc PaddyMc added V:state/compatible/backport State machine compatible PR, should be backported A:backport/v26.x backport patches to v26.x branch labels Sep 30, 2024
Copy link
Contributor

Important Notice

This PR modifies an in-repo Go module. It is one of:

  • osmomath
  • osmoutils
  • x/ibc-hooks
  • x/epochs

The dependent Go modules, especially the root one, will have to be
updated to reflect the changes. Failing to do so might cause e2e to fail.

Please follow the instructions below:

  1. Open https://github.com/osmosis-labs/osmosis/actions/workflows/go-mod-auto-bump.yml
  2. Provide the current branch name
  3. On success, confirm if an automated commit corretly updated the go.mod and go.sum files

Please let us know if you need any help.

Copy link
Contributor

coderabbitai bot commented Sep 30, 2024

Walkthrough

The pull request introduces multiple updates to the Osmosis project, including new features, bug fixes, and breaking changes. Notable enhancements involve additional queries in the x/gauges module, improved command execution handling, and ledger signing capabilities in the smart account module. The updates also include significant state-breaking changes due to SDK and CometBFT version upgrades, along with various fixes related to delegation iterations and error handling.

Changes

File Path Change Summary
CHANGELOG.md Updated to reflect multiple enhancements, bug fixes, and breaking changes across various modules.
x/gauges Method added: Additional queries introduced.
command-execution Method signature updated to handle multiple temp directories on command executions.
delegation Method signature updated to continue iteration on delegations instead of throwing an error.

Possibly related PRs

Suggested labels

V:state/breaking

Suggested reviewers

  • nicolaslara
  • p0mvn
  • ValarDragon

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>, please review it.
    • 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 gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @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.
    • @coderabbitai help me debug CodeRabbit configuration file.

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 using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration 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: 2

🧹 Outside diff range and nitpick comments (9)
CHANGELOG.md (9)

Line range hint 62-63: State Breaking: Change LiquidityNetInDirection return type to sdk math

This change in return type could affect existing code that relies on the previous return type.

Ensure that all dependent code is updated to handle the new return type. Consider providing migration examples or guidelines for developers.


Line range hint 66-67: State Breaking: Taker fee share

The introduction of a taker fee share could have significant implications for the economics of the system.

Please provide more details on how this taker fee share works and its potential impact on users and liquidity providers. Consider adding documentation or links to more comprehensive explanations.


Line range hint 72-73: State Breaking: Increase unauthenticated gas to fix fee token issue

This change could affect the economics of transactions on the network.

Please provide more context on the fee token issue and how this increase in unauthenticated gas addresses it. Consider explaining the potential impact on users and validators.


Line range hint 74-75: State Breaking: Param changes for block and cost per byte

Changes to these parameters can have significant performance and economic implications.

It would be helpful to provide more details on the specific changes made and their expected impact on the network's performance and transaction costs.


Line range hint 76-77: State Breaking: Exempt UnrestrictedPoolCreatorWhitelist addresses from pool creation fee

This change introduces a new privilege for certain addresses.

Please clarify how addresses get added to this whitelist and the governance process (if any) for managing it. Consider the potential centralization implications of this feature.


Line range hint 78-81: State Breaking: Upgrade SDK, CometBFT, and Wasmd versions

These are significant dependency upgrades that could introduce new features, bug fixes, and potential breaking changes.

It's crucial to review the changelogs of these upgraded dependencies and highlight any significant changes that might affect Osmosis users or developers. Consider adding links to the relevant changelogs or upgrade guides.


Line range hint 86-87: State Breaking: Bump cosmwasm-optimizer

Upgrading the cosmwasm-optimizer could affect contract compilation and deployment.

Please specify the version bump and any notable changes or improvements that come with this upgrade. Consider mentioning if any action is required from contract developers.


Line range hint 89-91: Config: Disable SQS by default in app.toml

This change in default configuration could affect existing setups.

Please provide more context on why SQS is being disabled by default and how users who rely on it can re-enable it if needed.


Line range hint 58-108: Overall impression of v26.0.0 release

This is a significant release with many state-breaking changes and improvements. While the changelog provides a good overview of the changes, there are several areas where more detailed information would be beneficial:

  1. For state-breaking changes, consider adding more context on why the change was made and its potential impact.
  2. Provide links to upgrade guides or migration documentation for complex changes.
  3. Explain the implications of economic changes (e.g., taker fee share, gas cost changes) on users and validators.
  4. For dependency upgrades (SDK, CometBFT, Wasmd), highlight key changes or link to their respective changelogs.
  5. Consider grouping related changes together for better readability.
  6. For new features or queries, provide brief examples or use cases to illustrate their benefits.

Overall, this release brings many improvements and new features, but the changelog could be enhanced to better guide users and developers through the upgrade process.

Consider expanding the changelog with more detailed information and links to relevant documentation to ensure a smooth upgrade experience for all stakeholders.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 09ff5a2 and 2d37dfd.

⛔ Files ignored due to path filters (9)
  • go.mod is excluded by !**/*.mod
  • go.sum is excluded by !**/*.sum, !**/*.sum
  • osmomath/go.mod is excluded by !**/*.mod
  • osmomath/go.sum is excluded by !**/*.sum, !**/*.sum
  • osmoutils/go.mod is excluded by !**/*.mod
  • x/epochs/go.mod is excluded by !**/*.mod
  • x/epochs/go.sum is excluded by !**/*.sum, !**/*.sum
  • x/ibc-hooks/go.mod is excluded by !**/*.mod
  • x/ibc-hooks/go.sum is excluded by !**/*.sum, !**/*.sum
📒 Files selected for processing (1)
  • CHANGELOG.md (1 hunks)
🔇 Additional comments (6)
CHANGELOG.md (6)

Line range hint 64-65: State Breaking: Prevent Setting Invalid Before Send Hook

This is a good security measure to prevent potential vulnerabilities.


Line range hint 68-69: State Breaking: Add additional events in x/lockup, x/superfluid, x/concentratedliquidity

Adding new events is generally good for improving observability and integration capabilities.

However, ensure that all event consumers (e.g., indexers, analytics tools) are aware of these new events to prevent any potential issues.


Line range hint 70-71: State Breaking: Add ledger signing to smart account module

This is a significant feature addition that enhances security for users with hardware wallets.

Consider providing user documentation or guides on how to use this new feature with ledger devices.


Line range hint 82-83: State Breaking: Fix protorev throws a nil pointer

Fixing a nil pointer issue is important for stability.

However, it would be helpful to provide more context on where this issue occurred and its potential impact before the fix.


Line range hint 84-85: State Breaking: Update enforce sub-authenticator to be greater than 1 error message

Improving error messages is generally good for developer experience.

Consider providing an example of the new error message for clarity.


Line range hint 93-108: State Compatible Changes

These changes are compatible with the current state but introduce new features or improvements.

The additions of OTEL wiring, performance improvements, and new queries are all positive changes. However, it would be beneficial to provide more details on some of these changes, such as:

  • The impact of the "Minor speedup to CalcExitCFMM shares"
  • The purpose and benefits of the new "EstimateTradeBasedOnPriceImpact" query
  • The implications of changing the commit timeout and timeout propose values

Comment on lines +58 to 59
* [#8743](https://github.com/osmosis-labs/osmosis/pull/8743) chore: bump sdk and cometbft

Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

State Breaking Changes: SDK v50 and Comet v0.38 upgrade

This is a significant upgrade that may require careful consideration during the upgrade process.

Please ensure that all node operators are aware of this major upgrade and have proper upgrade procedures in place. Consider providing detailed upgrade instructions or linking to them in the changelog.

Comment on lines 60 to 61
### State Machine Breaking

Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

State Breaking: Enforce sub-authenticator to be greater than 1

This change could potentially break existing integrations or scripts that rely on the current behavior.

It's important to communicate this change clearly to all developers and users who might be affected. Consider adding a brief explanation of why this change was made and how to adapt to it.

@czarcas7ic
Copy link
Member

Shouldn't we be updating https://github.com/osmosis-labs/cometbft/tree/osmo/v0.38.x instead of creating an entirely new branch?

@czarcas7ic
Copy link
Member

czarcas7ic commented Sep 30, 2024

https://github.com/osmosis-labs/cometbft/blob/osmo/v0.38.12/CHANGELOG.md#osmosis-specific-changes

I am a bit confused on this, everything below 1c07c7c is newly added, there is no way all of these changes are Osmosis specific changes that are not upstreamed right?

For reference, this is what it looked like in osmo/v0.38.x https://github.com/osmosis-labs/cometbft/blob/osmo/v0.38.x/CHANGELOG.md#osmosis-specific-info

@czarcas7ic
Copy link
Member

czarcas7ic commented Sep 30, 2024

It seems we are using an osmo/v0.38.12 branch for our comet fork, but are still using the osmo/v0.50.x branch for the sdk. Can we keep the same standard between these repos?

EDIT: Actually, I take this back, it seems like osmo/v0.50.x is behind in compared to the tag that you made, so I am a bit confused what the base is that we are using now for the sdk.

@czarcas7ic
Copy link
Member

Reading the changelog in the sdk fork that you tagged:

https://github.com/osmosis-labs/cosmos-sdk/blob/v0.50.10-v26-osmo-1/CHANGELOG.md#v050x-v26-osmo-1

This commit is from 5 months ago, so I assume this was not updated to match where we forked off the sdk.

@PaddyMc
Copy link
Collaborator Author

PaddyMc commented Oct 1, 2024

Shouldn't we be updating https://github.com/osmosis-labs/cometbft/tree/osmo/v0.38.x instead of creating an entirely new branch?

This wasn't as easy as expected, I think creating a new branch is actually the best way to do this.

e.g => https://github.com/osmosis-labs/cometbft/blob/osmo/v0.38.12/CHANGELOG.md

This is a branch for cometbft now, I think you're right tho, I'll create a branch for both v26 and v27 with the prefix for each, to make it easier to know which is which.

&&

https://github.com/osmosis-labs/cosmos-sdk/tree/osmo-v27/0.50.10 => this is the commit for the cosmos-sdk

@PaddyMc
Copy link
Collaborator Author

PaddyMc commented Oct 1, 2024

Reading the changelog in the sdk fork that you tagged:

https://github.com/osmosis-labs/cosmos-sdk/blob/v0.50.10-v26-osmo-1/CHANGELOG.md#v050x-v26-osmo-1

This commit is from 5 months ago, so I assume this was not updated to match where we forked off the sdk.

Ah sorry I forgot to update the changelog there will do that now 😓

Commits are recent:
https://github.com/osmosis-labs/cosmos-sdk/commits/v0.50.10-v26-osmo-1/

@PaddyMc PaddyMc closed this Oct 1, 2024
@PaddyMc PaddyMc reopened this Oct 1, 2024
@PaddyMc
Copy link
Collaborator Author

PaddyMc commented Oct 1, 2024

So updated the branches and changelogs of each! Lmk what you think, I think this is the pattern we should follow going forward

e.g
https://github.com/osmosis-labs/cosmos-sdk/tree/osmo-v26/0.50.10

&&

https://github.com/osmosis-labs/cometbft/tree/osmo-v26/0.38.12

@PaddyMc PaddyMc merged commit 6f64b71 into main Oct 2, 2024
1 check passed
@PaddyMc PaddyMc deleted the chore/bump-osmosis-cosmos-sdk-and-comet-to-latest branch October 2, 2024 17:38
mergify bot pushed a commit that referenced this pull request Oct 2, 2024
* chore: bump sdk and cometbft

* chore: add CHANGELOG

* chore: bump sdk and cometbft

(cherry picked from commit 6f64b71)

# Conflicts:
#	go.mod
#	go.sum
#	osmomath/go.mod
#	osmomath/go.sum
#	osmoutils/go.mod
#	x/epochs/go.sum
PaddyMc added a commit that referenced this pull request Oct 2, 2024
* chore: bump sdk and cometbft (#8743)

* chore: bump sdk and cometbft

* chore: add CHANGELOG

* chore: bump sdk and cometbft

(cherry picked from commit 6f64b71)

# Conflicts:
#	go.mod
#	go.sum
#	osmomath/go.mod
#	osmomath/go.sum
#	osmoutils/go.mod
#	x/epochs/go.sum

* chore: fix merge conflicts

---------

Co-authored-by: PaddyMc <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A:backport/v26.x backport patches to v26.x branch C:x/epochs V:state/compatible/backport State machine compatible PR, should be backported
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants