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

feat: unblock ww pools #7716

Merged
merged 2 commits into from
Mar 12, 2024
Merged

feat: unblock ww pools #7716

merged 2 commits into from
Mar 12, 2024

Conversation

p0mvn
Copy link
Member

@p0mvn p0mvn commented Mar 12, 2024

Closes: #XXX

What is the purpose of the change

White whale pools are not picked up by the router due to being blackisted because of a recent breakage.

Now that the pools are migrated, we bring them back.

The pool balances are also not picked up due to reading bank balances as opposed to liquidity from the pool itself. This PR fixes it.

Summary by CodeRabbit

  • Refactor
    • Updated pool ingestion logic to support CosmWasm pool types, enhancing compatibility and data processing efficiency.

@p0mvn p0mvn added V:state/compatible/backport State machine compatible PR, should be backported A:no-changelog A:backport/v23.x backport patches to v23.x branch labels Mar 12, 2024
Copy link
Contributor

coderabbitai bot commented Mar 12, 2024

Walkthrough

The recent changes focus on refining the handling of pool data, particularly for CosmWasm pools. This includes introducing a new import for better management of CosmWasm pool types, removing references to model.Pool, and enhancing the logic in key functions to process and convert pool states more effectively. These adjustments streamline the integration and manipulation of CosmWasm pools, aligning with updated requirements or optimizations.

Changes

File Path Change Summary
.../ingester/pool_ingester.go Added cosmwasmpooltypes import, removed model.Pool references, updated processPoolState and convertPool functions for CosmWasm pools

🐇✨
In the code's vast meadow, under the bright moon's glow,
Changes hop along, swift and low.
No more old pools to sow,
For CosmWasm's streams, now smoothly flow.
With every line, our understanding grows,
As the digital garden, we thoughtfully hoe.
🌟🐾

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-tests 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 tests 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 tests.
    • @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.
  • The JSON schema for the configuration file is available here.
  • 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/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

@p0mvn p0mvn marked this pull request as ready for review March 12, 2024 01:09
Copy link
Member

@czarcas7ic czarcas7ic left a comment

Choose a reason for hiding this comment

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

ACK

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.

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 9269f6f and 9570073.
Files selected for processing (1)
  • ingest/sqs/pools/ingester/pool_ingester.go (3 hunks)
Additional comments: 2
ingest/sqs/pools/ingester/pool_ingester.go (2)
  • 16-16: The addition of the cosmwasmpooltypes import aligns with the PR's objective to better handle CosmWasm pools, specifically the White Whale pools. This import is crucial for the integration and accurate balance assessment of these pools. Ensure that this new dependency is properly managed and versioned to avoid potential compatibility issues.
  • 323-330: The logic to handle CosmWasm pools by casting them to cosmwasmpooltypes.CosmWasmExtension and obtaining their total liquidity directly is a significant improvement. This change directly addresses the issue of inaccurately assessing pool balances by relying on bank balances rather than the actual liquidity in the pools. However, ensure that the GetTotalPoolLiquidity method is robust and handles potential edge cases or errors gracefully.

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.

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 9570073 and 85a0907.
Files selected for processing (1)
  • ingest/sqs/pools/ingester/pool_ingester.go (4 hunks)
Files skipped from review as they are similar to previous changes (1)
  • ingest/sqs/pools/ingester/pool_ingester.go

@p0mvn p0mvn merged commit 6a97c26 into main Mar 12, 2024
1 check passed
@p0mvn p0mvn deleted the roman/unblock-ww-main branch March 12, 2024 01:22
mergify bot pushed a commit that referenced this pull request Mar 12, 2024
(cherry picked from commit 6a97c26)
mergify bot pushed a commit that referenced this pull request Mar 12, 2024
(cherry picked from commit 6a97c26)
p0mvn pushed a commit that referenced this pull request Mar 12, 2024
p0mvn pushed a commit that referenced this pull request Mar 12, 2024
@github-actions github-actions bot mentioned this pull request May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A:backport/v23.x backport patches to v23.x branch A:no-changelog 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