这是indexloc提供的服务,不要输入任何密码
Skip to content

bump: cosmos-sdk & connect #369

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

Merged
merged 4 commits into from
Mar 15, 2025
Merged

bump: cosmos-sdk & connect #369

merged 4 commits into from
Mar 15, 2025

Conversation

beer-1
Copy link
Member

@beer-1 beer-1 commented Mar 14, 2025

Description

Closes: #XXXX


Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • included the correct type prefix in the PR title, you can find examples of the prefixes below:
  • confirmed ! in the type prefix if API or client breaking change
  • targeted the correct branch
  • provided a link to the relevant issue or specification
  • reviewed "Files changed" and left comments if necessary
  • included the necessary unit and integration tests
  • updated the relevant documentation or specification, including comments for documenting Go code
  • confirmed all CI checks have passed

Reviewers Checklist

All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.

I have...

  • confirmed the correct type prefix in the PR title
  • confirmed all author checklist items have been addressed
  • reviewed state machine logic, API design and naming, documentation is accurate, tests and test coverage

@beer-1 beer-1 self-assigned this Mar 14, 2025
@beer-1 beer-1 requested a review from a team as a code owner March 14, 2025 04:26
Copy link

coderabbitai bot commented Mar 14, 2025

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters (2)
  • go.mod is excluded by !**/*.mod
  • go.sum is excluded by !**/*.sum, !**/*.sum

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

📝 Walkthrough

Walkthrough

This pull request removes the admin account handling from the AddMarketData function in GenesisState by deleting the hex decoding and parameter setting logic. Additionally, it replaces the existing market configurations in the GenesisMarkets constant with an entirely new set of currency pair definitions and provider configurations. No changes were made to the exported or public entities.

Changes

File(s) Change Summary
app/genesis.go Removed admin account handling in the AddMarketData function, including hex decoding and setting of MarketAuthorities and Admin parameters.
app/genesis_markets/markets.go Overhauled the GenesisMarkets constant by removing previous currency pairs and adding new entries with updated ticker objects and provider configuration details.

Sequence Diagram(s)

sequenceDiagram
    participant C as Client
    participant GS as GenesisState
    participant MD as MarketData Init
    participant CP as CurrencyPairs Setup

    C->>GS: Call AddMarketData()
    GS->>MD: Initialize market data (admin logic removed)
    GS->>CP: Set up new currency pairs
    CP-->>GS: Configuration complete
    GS-->>C: Return initialized market data
Loading

Suggested reviewers

  • Vritra4

Poem

I'm a rabbit with nimble hops,
Skipping past admin stops.
Market pairs now bloom anew,
With fresh codes and configs in view.
Happy trails in every byte,
Carrots and code—pure delight!
Cheers to changes light as a sprite!


🪧 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

github-actions bot commented Mar 14, 2025

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails
gomod/github.com/cosmos/cosmos-sdk 0.50.13 🟢 6
Details
CheckScoreReason
Security-Policy🟢 10security policy file detected
Code-Review🟢 8Found 24/28 approved changesets -- score normalized to 8
Maintained🟢 1030 commit(s) and 17 issue activity found in the last 90 days -- score normalized to 10
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
License🟢 10license file detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
Signed-Releases⚠️ 0Project has not signed or included provenance with any releases.
Branch-Protection⚠️ -1internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration
Fuzzing🟢 10project is fuzzed
Binary-Artifacts🟢 8binaries present in source code
Packaging🟢 10packaging workflow detected
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
SAST🟢 7SAST tool detected but not run on all commits
Vulnerabilities⚠️ 19 existing vulnerabilities detected

Scanned Files

  • go.mod

Copy link

@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

🧹 Nitpick comments (1)
app/genesis_markets/markets.go (1)

3-1175: Consider storing this extensive JSON data in a dedicated file or structured configuration.

Embedding such a large JSON structure directly in code can reduce maintainability and clarity. A more robust approach might be:
• Define a typed struct to ensure compile-time protection against typos.
• Store this JSON data in a dedicated file and load it at runtime.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8042623 and 2d5e346.

⛔ Files ignored due to path filters (2)
  • go.mod is excluded by !**/*.mod
  • go.sum is excluded by !**/*.sum, !**/*.sum
📒 Files selected for processing (2)
  • app/genesis.go (0 hunks)
  • app/genesis_markets/markets.go (1 hunks)
💤 Files with no reviewable changes (1)
  • app/genesis.go
⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: golangci-lint
  • GitHub Check: Run test and upload codecov
  • GitHub Check: Analyze (go)
🔇 Additional comments (3)
app/genesis_markets/markets.go (3)

3-4: Inconsistent summary with new exported constant.

The AI-generated summary states that no changes were made to exported or public entities, yet GenesisMarkets is clearly declared/updated here. This discrepancy suggests the summary may be incomplete or inaccurate.

Likely an incorrect or invalid review comment.


105-123:

❓ Verification inconclusive

Confirm normalization for “SUSDE” pairs.

The “Base”: "SUSDE" but “normalize_by_pair” block corresponds to "USDT" → "USD". Verify if this cross-mapping is intended or if a mismatch may introduce confusion or incorrect price conversions.


🏁 Script executed:

#!/bin/bash
# Attempt to detect potential normalization mismatches in the code.

# We'll look for SUSDE with normalization to something other than USDE to see if there's a pattern.
rg -A 3 --json '"Base": "SUSDE"'

Length of output: 1410


Verify Normalization Intent for SUSDE Pairs

The configuration currently specifies the ticker's base as "SUSDE" while the normalization block uses "Base": "USDT". The search confirms that the "SUSDE" designation appears only in the ticker block without any alternate normalization mapping elsewhere. Please verify if converting from "SUSDE" in the ticker to "USDT" for normalization is intended. If this cross-mapping is by design, it would be helpful to add a clarifying comment in the code to avoid future confusion. Otherwise, consider updating either field to ensure consistency.


540-548:

❓ Verification inconclusive

Double-check the “invert” logic and normalization.

For "huobi_ws" (line 542) referencing "off_chain_ticker": "ethusdt" but normalizing to "Base": "ETH", "Quote": "USD", and also "invert": true, confirm this is correct. Inverting might result in unexpected rates if the ticker is already in the base/quote format.


🏁 Script executed:

#!/bin/bash
# Search for references to "huobi_ws" and "ethusdt" to confirm usage of "invert"
rg -A 5 '"name": "huobi_ws"' | rg 'ethusdt'

Length of output: 179


Double-check the invert logic for Huobi_ws market configuration.
The search confirms that the ticker "ethusdt" is used in the configuration, but please verify that the normalization pair—configuring "Base": "ETH" and "Quote": "USD"—along with "invert": true is intentional. If Huobi’s API returns the ticker in a standard base/quote format (typically ETH/USDT), then applying inversion might yield unexpected rates unless there’s an explicit adjustment (for example, handling a conversion from USDT to USD) elsewhere in the codebase.

  • Location: app/genesis_markets/markets.go (lines 540–548)
  • Action: Confirm against the Huobi API documentation and ensure that the inversion (and the resulting normalization) is consistent with the expected pricing format.

Copy link

codecov bot commented Mar 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 39.93%. Comparing base (8042623) to head (0f86d5b).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #369      +/-   ##
==========================================
- Coverage   39.93%   39.93%   -0.01%     
==========================================
  Files         277      277              
  Lines       26872    26862      -10     
==========================================
- Hits        10732    10726       -6     
+ Misses      14480    14478       -2     
+ Partials     1660     1658       -2     
Files with missing lines Coverage Δ
app/genesis.go 97.26% <ø> (+2.38%) ⬆️
🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@beer-1 beer-1 merged commit 4e3e933 into main Mar 15, 2025
7 checks passed
@beer-1 beer-1 deleted the bump/cosmos-sdk branch March 15, 2025 02:19
@beer-1 beer-1 changed the title bump: cosmos-sdk to latest bump: cosmos-sdk & connect Mar 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant