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: add cosmwasm_1_3 feature, use capabilities from wasm keeper #8764

Merged
merged 4 commits into from
Oct 17, 2024

Conversation

mattverse
Copy link
Member

Closes: #XXX

What is the purpose of the change

Uses cpappabilities from wasm keeper instead of hard coded versions

Testing and Verifying

This change is a trivial rework / code cleanup without any test coverage.

Documentation and Release Note

  • Does this pull request introduce a new feature or user-facing behavior changes?
  • Changelog entry added to Unreleased section of CHANGELOG.md?

Where is the change documented?

  • Specification (x/{module}/README.md)
  • Osmosis documentation site
  • Code comments?
  • N/A

@mattverse mattverse added the V:state/breaking State machine breaking PR label Oct 9, 2024
@github-actions github-actions bot added the C:app-wiring Changes to the app folder label Oct 9, 2024
@mattverse mattverse mentioned this pull request Oct 9, 2024
6 tasks
Copy link
Contributor

coderabbitai bot commented Oct 9, 2024

Walkthrough

The changes in the pull request primarily involve updates to the CHANGELOG.md file, which now includes new entries under the "Unreleased" section detailing recent changes, bug fixes, and version updates. Additionally, substantial modifications have been made to the keepers package, particularly the AppKeepers struct, which now utilizes dynamic retrieval for Wasm capabilities and integrates new components for improved middleware functionality.

Changes

File Change Summary
CHANGELOG.md - Added entries for cosmwasm 1_3 feature, cosmwasm vm update, and cosmwasm-optimizer bump.
- Documented fixes for temporary directories, unsupported sign-mode, and testnet logs.
- Added entry for delegation iteration fix.
- Organized changelog to reflect latest version first.
app/keepers/keepers.go - Updated InitNormalKeepers to initialize SmartAccountKeeper.
- Modified WireICS20PreWasmKeeper to include RateLimitingICS4Wrapper and HooksICS4Wrapper.
- Refined InitSpecialKeepers for improved ParamsKeeper initialization and CapabilityKeeper setup.

Suggested labels

C:x/tokenfactory, C:x/concentrated-liquidity

Suggested reviewers

  • PaddyMc
  • czarcas7ic
  • nicolaslara

Possibly related PRs


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: 0

🧹 Outside diff range and nitpick comments (1)
app/keepers/keepers.go (1)

577-578: LGTM: Addition of Osmosis-specific Wasm capabilities.

The changes to add Osmosis-specific capabilities to the WasmKeeper are appropriate and align with the PR objectives. This allows for custom functionality within the Wasm module for Osmosis.

A minor suggestion for improvement:

Consider extracting the "osmosis" capability string to a constant for better maintainability. For example:

const OsmosisWasmCapability = "osmosis"

// Then use it like this:
wasmCapabilities = append(wasmCapabilities, OsmosisWasmCapability)

This makes it easier to update or reference the capability name in the future if needed.

Also applies to: 599-601

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between b25bca5 and 5c9259b.

📒 Files selected for processing (2)
  • CHANGELOG.md (1 hunks)
  • app/keepers/keepers.go (2 hunks)
🧰 Additional context used
🔇 Additional comments (5)
CHANGELOG.md (5)

Line range hint 49-73: Significant unreleased changes detected

The "Unreleased" section contains important changes, including state breaking modifications and new features. Notable changes include:

  1. State breaking changes like adding the cosmwasm_1_3 feature and updating the cosmwasm vm.
  2. Configuration changes such as enabling 1559 mempool by default.
  3. State compatible changes like adding additional queries in x/gauges.

These changes may have a significant impact on the system. It's crucial for developers and node operators to review and understand these modifications before the next release.


Line range hint 75-79: State machine breaking change in v26.0.1

This minor release includes a single state machine breaking change:

  • The iterate delegations function now continues instead of erroring when encountering an issue.

This change could affect the behavior of delegation-related operations. Developers and node operators should be aware of this modification and test their systems accordingly to ensure compatibility.


Line range hint 81-116: Major changes in v26.0.0 release

This release includes numerous significant changes:

  1. State breaking changes:

    • SDK v50 and Comet v0.38 upgrade
    • Changes to various modules including lockup, superfluid, and concentrated liquidity
    • Updates to cosmwasm-related components
  2. New features and improvements:

    • Additional events in multiple modules
    • Changes to pool creation fees and whitelist
    • Updates to CLI commands and queries
  3. Bug fixes:

    • Fixes for protorev, smart account signing, and other issues
  4. SDK upgrades:

    • Upgrade to v0.50.6-v26-osmo-1 with various improvements

This release represents a substantial update to the system. Developers and node operators should carefully review all changes and test thoroughly before upgrading.


Line range hint 118-126: Performance improvements and bug fixes in v25.2.1

This minor release focuses on enhancing system performance and fixing bugs:

  1. Reduced CPU time for epoch computations, which should improve overall system efficiency.
  2. De-duplicated fetching of intermediate accounts in the epoch module.
  3. Improved TWAP pruning logic for better performance.
  4. Added logging to track incentive accumulator truncation, enhancing observability.

These changes, while minor, should contribute to better system performance and easier debugging. Node operators should consider upgrading to benefit from these improvements.


Line range hint 128-1037: Comprehensive changelog structure and content

The CHANGELOG.md file provides a detailed history of changes across multiple versions of the system. Key observations:

  1. Consistent structure: Each version is clearly demarcated with features, bug fixes, and improvements.
  2. Detailed descriptions: Changes are explained with sufficient detail, often including PR numbers for reference.
  3. Breaking changes: State-breaking changes are clearly highlighted in each relevant version.
  4. Version history: The changelog goes back to v1.0.0, providing a complete history of the system's evolution.

This comprehensive changelog is an excellent resource for developers, node operators, and users to understand the system's development over time. It aids in planning upgrades and understanding the introduction of new features or breaking changes.

Suggestion: Consider adding a table of contents at the beginning of the file to make navigation easier, especially as the changelog grows with future releases.

Copy link
Contributor

@crnbarr93 crnbarr93 left a comment

Choose a reason for hiding this comment

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

LGTM!

@PaddyMc PaddyMc closed this Oct 17, 2024
@PaddyMc PaddyMc reopened this Oct 17, 2024
@mattverse mattverse closed this Oct 17, 2024
@mattverse mattverse reopened this Oct 17, 2024
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

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

Line range hint 55-69: Significant new features and enhancements

This release introduces several important features:

  1. SuperCharged Liquidity and CosmWasm Pool modules for enhanced capital efficiency and custom liquidity pools
  2. ProtoRev changes for improved backrunning and payment schedules
  3. TokenFactory before-send hooks for more flexible token transfers
  4. New governance features including expedited proposals
  5. Additional CLI commands and query improvements

These features provide new capabilities and optimizations that can benefit users and developers. However, they may also require updates to existing integrations and workflows.

Would you like me to provide more detailed explanations or examples for any of these new features?

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 5c9259b and e89f6d5.

📒 Files selected for processing (1)
  • CHANGELOG.md (1 hunks)
🧰 Additional context used
🔇 Additional comments (5)
CHANGELOG.md (5)

Line range hint 1-49: Major release v19.0.0 introduces significant changes and new features

This release includes several important updates:

  1. Introduction of new modules: SuperCharged Liquidity and CosmWasm Pool Module
  2. Updates to existing APIs and dependencies
  3. ProtoRev changes affecting payment schedules and trade triggers
  4. TokenFactory improvements with before-send hooks
  5. Various state-breaking changes and bug fixes

These changes may require updates to integrations and could affect existing workflows. Users and developers should carefully review the changelog and test their applications against this new version.


Line range hint 71-86: Multiple API breaks and changes

This release includes several API changes that may affect existing integrations:

  1. New queries and CLI commands added for various modules
  2. Changes to existing query responses and parameters
  3. Deprecation of some x/gamm queries
  4. Renaming of "swap fee" to "spread factor"

Developers should carefully review these changes and update their applications accordingly. Special attention should be given to deprecated queries and renamed parameters to ensure compatibility with the new version.

#!/bin/bash
# Check for any remaining references to deprecated gamm queries
grep -R "EstimateSwapExactAmountIn" ./x/gamm
grep -R "EstimateSwapExactAmountOut" ./x/gamm

Line range hint 88-101: Critical state-breaking changes

This release includes several state-breaking changes that will affect the network:

  1. Updates to ICA authorized messages
  2. TWAP record upgrade handler modifications
  3. Changes to synthetic lock handling
  4. New gas consumption mechanics for denom creation
  5. Modifications to gauge-related gas costs
  6. Changes to epoch handling and pool manager queries

These changes will require careful coordination during the upgrade process to ensure network consistency. Node operators and developers should pay close attention to these changes and follow the upgrade instructions carefully.

#!/bin/bash
# Check for the presence of upgrade handlers
grep -R "UpgradeHandler" ./app

Line range hint 103-107: Important dependency updates

This release includes updates to key dependencies:

  1. wasmd upgraded to v0.31.0
  2. Cosmos SDK updated to v0.45.0x-osmo-v9.2

These updates may introduce new features and bug fixes from the upstream projects. Developers should review the changelogs of these dependencies to understand any potential impacts on their applications.

#!/bin/bash
# Verify the versions of wasmd and cosmos-sdk in go.mod
grep "github.com/CosmWasm/wasmd" go.mod
grep "github.com/cosmos/cosmos-sdk" go.mod

Line range hint 51-53: Critical security update: wasmvm upgraded to 1.2.3

This security upgrade addresses the vulnerability described in CWA-2023-002. It's crucial that all users upgrade to this version to ensure the security of their systems.

@mattverse mattverse merged commit b44289b into main Oct 17, 2024
1 check passed
@mattverse mattverse deleted the mattverse/wasm-capa branch October 17, 2024 23:34
@coderabbitai coderabbitai bot mentioned this pull request Nov 6, 2024
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C:app-wiring Changes to the app folder V:state/breaking State machine breaking PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants