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 the sim tests. #2015

Merged
merged 34 commits into from
Jun 6, 2024
Merged

Fix the sim tests. #2015

merged 34 commits into from
Jun 6, 2024

Conversation

SpicyLemon
Copy link
Contributor

@SpicyLemon SpicyLemon commented May 29, 2024

Description

This PR fixes all the sim tests.

Related to:


Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Targeted PR against correct branch (see CONTRIBUTING.md)
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Wrote unit and integration tests
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/)
  • Added relevant godoc comments.
  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer
  • Review Codecov Report in the comment section below once CI passes

Summary by CodeRabbit

  • New Features

    • Added support for new message services across various modules, enhancing service configuration capabilities.
  • Refactor

    • Simplified and optimized the initialization and configuration processes for various modules and tests.
    • Updated application setup and testing functions to use a more streamlined approach.
  • Tests

    • Added new test functions to validate proto annotations and module states.
    • Refactored existing tests for better error handling and configuration management.

Copy link
Contributor

coderabbitai bot commented May 29, 2024

Walkthrough

The recent changes involve significant updates to the Provenance Blockchain's codebase, focusing on dependency management, code refactoring, and enhanced testing. Key updates include reorganizing dependencies in .golangci.yml, modifying application initialization parameters, updating test setups, and adding new proto service options. These changes aim to streamline the code, improve maintainability, and enhance testing capabilities.

Changes

Files/Groups Change Summary
.golangci.yml Reorganized and updated dependencies, adding and removing various packages.
CHANGELOG.md Updated app.New parameter retrieval and simplified module lists.
app/app.go Added new imports, modified New function parameters, and updated initialization logic.
app/app_test.go, app/sim_bench_test.go Added new imports, adjusted test setups, and introduced new test functions.
app/sim_test.go Added new imports, modified module state handling, and introduced new functions.
app/test_helpers.go Updated SetupOptions struct and refactored setup function.
cmd/provenanced/cmd/root.go, cmd/testnet_test.go Simplified app initialization and configuration using appOpts.
proto/.../tx.proto Added (cosmos.msg.v1.service) = true; option to Msg service definitions.
testutil/network.go Updated app creation using simtestutil.NewAppOptionsWithFlagHome.
x/ibchooks/..._test.go, x/ibcratelimit/..._test.go Refactored test setup functions and initialization logic.
x/trigger/types/msgs.go Replaced protoadapt and signing with codec for codec operations.

Sequence Diagram(s) (Beta)

sequenceDiagram
    participant User
    participant App
    participant Module
    participant API

    User ->> App: Start Application
    App ->> Module: Initialize Modules
    Module ->> API: Register Services
    API -->> User: Provide API Endpoints
    User ->> API: Make Requests
    API ->> Module: Process Requests
    Module ->> App: Update States
    App -->> User: Return Responses
Loading

Poem

In the heart of code, where changes bloom,
Dependencies dance, making room.
With tests refined and modules bright,
The Provenance shines in the coder's light.
Proto services sing their tune,
As blockchain dreams reach the moon. 🚀


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.
    • @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 as 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.

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.

@Taztingo Taztingo mentioned this pull request May 29, 2024
8 tasks
SpicyLemon added 23 commits May 29, 2024 15:28
…es rather than stopping at the first problematic one. Also make it output more info when stuff is in one store but not the other.
…. The upgrade keeper uses it during InitGenesis to write the version map to state. We also write the version map to state during InitChainer. But we don't call InitChainer during the import-export sim test, so the second app was missing all of those entries.
# Conflicts:
#	x/exchange/tx.pb.go
… less likely that the test gets deleted once async-icq is fixed.
@SpicyLemon SpicyLemon changed the title Fix the sim tests Fix the sim tests. Jun 3, 2024
@SpicyLemon SpicyLemon marked this pull request as ready for review June 5, 2024 19:53
@SpicyLemon SpicyLemon requested a review from a team as a code owner June 5, 2024 19:53
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: 7

Outside diff range and nitpick comments (4)
CHANGELOG.md (4)

Line range hint 839-839: Remove multiple consecutive blank lines to adhere to markdown best practices.

- 

Also applies to: 1240-1240, 1257-1257, 1309-1309, 1413-1413


Line range hint 250-250: Ensure URLs are properly formatted or enclosed in appropriate markdown elements to prevent them from appearing as bare URLs.

- https://github.com/provenance-io/provenance/pull/2015
+ [PR 2015](https://github.com/provenance-io/provenance/pull/2015)

Also applies to: 281-281, 380-380, 430-430, 442-442, 458-458, 529-529, 540-540, 548-548, 584-584, 609-609, 621-621, 667-671, 718-718, 759-759, 812-812, 925-925


Line range hint 967-967: Remove spaces inside emphasis markers to correct the markdown formatting.

- * ` _MsgAddMarkerRequest_ `
+ * `_MsgAddMarkerRequest_`

Line range hint 363-363: Remove spaces inside code span elements to correct the markdown formatting.

- ` v0.50.2 `
+ `v0.50.2`
Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between cb8fcac and 1c7727f.

Files ignored due to path filters (13)
  • go.mod is excluded by !**/*.mod
  • x/attribute/types/tx.pb.go is excluded by !**/*.pb.go
  • x/exchange/tx.pb.go is excluded by !**/*.pb.go
  • x/ibchooks/types/tx.pb.go is excluded by !**/*.pb.go
  • x/ibcratelimit/tx.pb.go is excluded by !**/*.pb.go
  • x/marker/types/tx.pb.go is excluded by !**/*.pb.go
  • x/metadata/types/tx.pb.go is excluded by !**/*.pb.go
  • x/msgfees/types/tx.pb.go is excluded by !**/*.pb.go
  • x/name/types/tx.pb.go is excluded by !**/*.pb.go
  • x/oracle/types/tx.pb.go is excluded by !**/*.pb.go
  • x/quarantine/tx.pb.go is excluded by !**/*.pb.go
  • x/sanction/tx.pb.go is excluded by !**/*.pb.go
  • x/trigger/types/tx.pb.go is excluded by !**/*.pb.go
Files selected for processing (26)
  • .golangci.yml (1 hunks)
  • CHANGELOG.md (2 hunks)
  • app/app.go (26 hunks)
  • app/app_test.go (4 hunks)
  • app/sim_bench_test.go (3 hunks)
  • app/sim_test.go (16 hunks)
  • app/test_helpers.go (5 hunks)
  • cmd/provenanced/cmd/root.go (5 hunks)
  • cmd/provenanced/cmd/testnet_test.go (1 hunks)
  • proto/cosmos/quarantine/v1beta1/tx.proto (1 hunks)
  • proto/cosmos/sanction/v1beta1/tx.proto (1 hunks)
  • proto/provenance/attribute/v1/tx.proto (1 hunks)
  • proto/provenance/exchange/v1/tx.proto (1 hunks)
  • proto/provenance/ibchooks/v1/tx.proto (1 hunks)
  • proto/provenance/ibcratelimit/v1/tx.proto (1 hunks)
  • proto/provenance/marker/v1/tx.proto (1 hunks)
  • proto/provenance/metadata/v1/tx.proto (1 hunks)
  • proto/provenance/msgfees/v1/tx.proto (1 hunks)
  • proto/provenance/name/v1/tx.proto (1 hunks)
  • proto/provenance/oracle/v1/tx.proto (1 hunks)
  • proto/provenance/trigger/v1/tx.proto (1 hunks)
  • testutil/network.go (2 hunks)
  • x/ibchooks/ibc_middleware_test.go (2 hunks)
  • x/ibchooks/marker_hooks_test.go (1 hunks)
  • x/ibcratelimit/module/ibc_middleware_test.go (2 hunks)
  • x/trigger/types/msgs.go (3 hunks)
Additional context used
Markdownlint
CHANGELOG.md

127-127: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


128-128: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


129-129: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


130-130: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


131-131: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


132-132: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


133-133: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


134-134: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


135-135: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


136-136: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


137-137: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


138-138: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


139-139: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


140-140: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


141-141: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


142-142: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


143-143: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


144-144: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


145-145: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


215-215: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


216-216: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


217-217: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


218-218: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


219-219: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


220-220: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


221-221: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


222-222: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


223-223: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


224-224: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


225-225: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


226-226: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


227-227: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


228-228: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


229-229: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


230-230: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


231-231: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


232-232: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


233-233: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


234-234: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


235-235: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


236-236: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


237-237: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


238-238: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


239-239: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


240-240: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


241-241: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


242-242: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


243-243: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


244-244: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


245-245: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


246-246: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


275-275: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


276-276: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


277-277: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


354-354: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


355-355: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


356-356: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


357-357: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


358-358: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


359-359: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


360-360: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


361-361: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


362-362: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


363-363: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


364-364: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


365-365: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


366-366: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


367-367: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


368-368: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


369-369: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


370-370: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


371-371: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


372-372: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


373-373: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


374-374: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


375-375: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


376-376: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


732-732: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


740-740: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


785-785: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


793-793: Expected: asterisk; Actual: dash (MD004, ul-style)
Unordered list style


839-839: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines


1240-1240: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines


1257-1257: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines


1309-1309: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines


1413-1413: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines


250-250: null (MD034, no-bare-urls)
Bare URL used


281-281: null (MD034, no-bare-urls)
Bare URL used


380-380: null (MD034, no-bare-urls)
Bare URL used


430-430: null (MD034, no-bare-urls)
Bare URL used


442-442: null (MD034, no-bare-urls)
Bare URL used


458-458: null (MD034, no-bare-urls)
Bare URL used


529-529: null (MD034, no-bare-urls)
Bare URL used


540-540: null (MD034, no-bare-urls)
Bare URL used


548-548: null (MD034, no-bare-urls)
Bare URL used


584-584: null (MD034, no-bare-urls)
Bare URL used


609-609: null (MD034, no-bare-urls)
Bare URL used


621-621: null (MD034, no-bare-urls)
Bare URL used


667-667: null (MD034, no-bare-urls)
Bare URL used


668-668: null (MD034, no-bare-urls)
Bare URL used


669-669: null (MD034, no-bare-urls)
Bare URL used


670-670: null (MD034, no-bare-urls)
Bare URL used


671-671: null (MD034, no-bare-urls)
Bare URL used


718-718: null (MD034, no-bare-urls)
Bare URL used


759-759: null (MD034, no-bare-urls)
Bare URL used


812-812: null (MD034, no-bare-urls)
Bare URL used


925-925: null (MD034, no-bare-urls)
Bare URL used


967-967: null (MD037, no-space-in-emphasis)
Spaces inside emphasis markers


967-967: null (MD037, no-space-in-emphasis)
Spaces inside emphasis markers


363-363: null (MD038, no-space-in-code)
Spaces inside code span elements

Additional comments not posted (60)
proto/provenance/ibchooks/v1/tx.proto (1)

16-16: The addition of option (cosmos.msg.v1.service) = true; correctly marks the Msg service as a valid Cosmos SDK message service.

proto/provenance/oracle/v1/tx.proto (1)

14-14: The addition of option (cosmos.msg.v1.service) = true; correctly marks the Msg service as a valid Cosmos SDK message service.

proto/provenance/trigger/v1/tx.proto (1)

15-15: The addition of option (cosmos.msg.v1.service) = true; correctly marks the Msg service as a valid Cosmos SDK message service.

proto/provenance/ibcratelimit/v1/tx.proto (2)

16-16: The addition of option (cosmos.msg.v1.service) = true; correctly marks the Msg service as a valid Cosmos SDK message service.


17-17: The deprecation of GovUpdateParams in favor of UpdateParams is a good practice for API lifecycle management, ensuring clarity and reducing redundancy.

proto/cosmos/sanction/v1beta1/tx.proto (1)

12-12: The addition of option (cosmos.msg.v1.service) = true; correctly marks the Msg service as a valid Cosmos SDK message service.

cmd/provenanced/cmd/testnet_test.go (1)

41-41: The modification to use simtestutil.NewAppOptionsWithFlagHome(home) for initializing tempApp simplifies the setup process and enhances code maintainability.

app/sim_bench_test.go (2)

10-10: Ensure new imports are utilized effectively in the benchmark tests.

Also applies to: 14-14


37-42: Initialization of appOpts and baseAppOpts should be verified to ensure they are correctly configured for simulation.

Also applies to: 82-87

Verification successful

The verification process has revealed the following details:

  1. The newSimAppOpts function initializes an AppOptionsMap with specific flags, such as flags.FlagHome and server.FlagInvCheckPeriod.
  2. The baseAppOpts array includes functions like interBlockCacheOpt, fauxMerkleModeOpt, and baseapp.SetChainID.

These configurations appear to be correctly set up for simulation purposes. The functions used in baseAppOpts are consistent across multiple test files, indicating a standardized approach.

  • newSimAppOpts is defined in app/sim_test.go and sets appropriate flags for simulation.
  • baseAppOpts includes functions that configure the base application correctly for simulation.

No issues were found with the initialization of appOpts and baseAppOpts.

Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the initialization of appOpts and baseAppOpts in simulation tests.

# Test: Search for the initialization usage. Expect: Correct configuration and usage.
rg --type go $'appOpts := newSimAppOpts\\(b\\)'
rg --type go $'baseAppOpts := \\[\\]func\\(\\*baseapp.BaseApp\\)'

Length of output: 628



Script:

#!/bin/bash
# Description: Locate and analyze the newSimAppOpts function and the functions used in baseAppOpts.

# Locate the definition of newSimAppOpts function
ast-grep --lang go --pattern 'func newSimAppOpts($_) $_' 

# Locate the functions used in baseAppOpts
rg --type go --pcre2 'baseAppOpts := \[\]func\(\*baseapp.BaseApp\)\{([^}]*)\}'

Length of output: 467



Script:

#!/bin/bash
# Description: Extract the flags set by newSimAppOpts and identify the functions used in baseAppOpts.

# Extract the flags set by newSimAppOpts
rg --type go --context 5 'func newSimAppOpts(t testing.TB) simtestutil.AppOptionsMap' 

# Identify the functions used in baseAppOpts
rg --type go --pcre2 'baseAppOpts := \[\]func\(\*baseapp.BaseApp\)\{([^}]*)\}' -A 5

Length of output: 173



Script:

#!/bin/bash
# Description: Extract the flags set by newSimAppOpts and identify the functions used in baseAppOpts with refined patterns.

# Extract the flags set by newSimAppOpts with a more precise pattern
rg --type go --context 10 'func newSimAppOpts(t testing.TB) simtestutil.AppOptionsMap' 

# Identify the functions used in baseAppOpts with a more precise pattern
rg --type go --context 10 'baseAppOpts := \[\]func\(\*baseapp.BaseApp\)\{'

Length of output: 6785

proto/provenance/name/v1/tx.proto (1)

16-16: Ensure the new service option (cosmos.msg.v1.service) = true; is correctly implemented across all service calls.

Verification successful

The verification process confirms that the new service option (cosmos.msg.v1.service) = true; has been correctly implemented in the service Msg definitions across the relevant .proto files.

  • The following files were checked and found to include the new service option:
    • proto/cosmos/quarantine/v1beta1/tx.proto
    • proto/cosmos/sanction/v1beta1/tx.proto
    • proto/provenance/attribute/v1/tx.proto
    • proto/provenance/exchange/v1/tx.proto
    • proto/provenance/ibchooks/v1/tx.proto
    • proto/provenance/ibcratelimit/v1/tx.proto
    • proto/provenance/marker/v1/tx.proto
    • proto/provenance/metadata/v1/tx.proto
    • proto/provenance/msgfees/v1/tx.proto
    • proto/provenance/name/v1/tx.proto
    • proto/provenance/oracle/v1/tx.proto
    • proto/provenance/trigger/v1/tx.proto
    • third_party/proto/cosmos/auth/v1beta1/tx.proto
    • third_party/proto/cosmos/authz/v1beta1/tx.proto
    • third_party/proto/cosmos/bank/v1beta1/tx.proto
    • third_party/proto/cosmos/circuit/v1/tx.proto
    • third_party/proto/cosmos/consensus/v1/tx.proto
    • third_party/proto/cosmos/crisis/v1beta1/tx.proto
    • third_party/proto/cosmos/distribution/v1beta1/tx.proto
    • third_party/proto/cosmos/evidence/v1beta1/tx.proto
    • third_party/proto/cosmos/feegrant/v1beta1/tx.proto
    • third_party/proto/cosmos/gov/v1/tx.proto
    • third_party/proto/cosmos/gov/v1beta1/tx.proto
    • third_party/proto/cosmos/group/v1/tx.proto
    • third_party/proto/cosmos/mint/v1beta1/tx.proto
    • third_party/proto/cosmos/nft/v1beta1/tx.proto
    • third_party/proto/cosmos/staking/v1beta1/tx.proto
    • third_party/proto/cosmos/upgrade/v1beta1/tx.proto
    • third_party/proto/cosmos/vesting/v1beta1/tx.proto
    • third_party/proto/ibc/applications/fee/v1/tx.proto
    • third_party/proto/ibc/applications/interchain_accounts/controller/v1/tx.proto
    • third_party/proto/ibc/applications/interchain_accounts/host/v1/tx.proto
    • third_party/proto/ibc/applications/transfer/v1/tx.proto
    • third_party/proto/ibc/core/channel/v1/tx.proto
    • third_party/proto/ibc/core/client/v1/tx.proto
    • third_party/proto/ibc/core/connection/v1/tx.proto
    • third_party/proto/ibc/lightclients/wasm/v1/tx.proto
Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the correct implementation of the new service option in service calls.

# Test: Search for service definitions. Expect: Correct implementation of the new option.
rg --type proto $'service Msg'

Length of output: 61



Script:

#!/bin/bash
# Description: Verify the correct implementation of the new service option in service calls.

# Step 1: Find all .proto files
proto_files=$(fd --extension proto)

# Step 2: Search for service definitions within these files
for file in $proto_files; do
  echo "Checking file: $file"
  rg 'service Msg' "$file"
done

Length of output: 84537



Script:

#!/bin/bash
# Description: Verify the correct implementation of the new service option in service calls.

# Step 1: Find all .proto files
proto_files=$(fd --extension proto)

# Step 2: Search for service definitions and the new service option within these files
for file in $proto_files; do
  echo "Checking file: $file"
  rg 'service Msg' "$file" && rg '\(cosmos.msg.v1.service\) = true;' "$file"
done

Length of output: 89640

x/trigger/types/msgs.go (2)

6-6: Ensure the new import github.com/cosmos/cosmos-sdk/codec is utilized effectively in the file.


79-84: Verify the new codec parameter in the hasSigners function is correctly used for decoding messages.

Also applies to: 93-94

Verification successful

The hasSigners function correctly uses the codec parameter for decoding messages by calling codec.GetMsgV1Signers(action). This ensures that the codec is utilized for its intended purpose.

  • x/trigger/types/msgs.go:94: signers, _, err := codec.GetMsgV1Signers(action)
Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the correct usage of the codec parameter in the `hasSigners` function.

# Test: Search for usage of `hasSigners`. Expect: Correct decoding of messages using the codec.
rg --type go $'hasSigners\\('

Length of output: 225



Script:

#!/bin/bash
# Extract the implementation of the `hasSigners` function from `x/trigger/types/msgs.go`
ast-grep --lang go --pattern $'func hasSigners(codec codec.Codec, available map[string]bool, action sdk.Msg) error {
  $$$
}' x/trigger/types/msgs.go

Length of output: 917

.golangci.yml (1)

86-104: Ensure the updated linter configuration in .golangci.yml correctly reflects the project's dependency management and coding standards.

proto/cosmos/quarantine/v1beta1/tx.proto (1)

16-16: Ensure the new service option (cosmos.msg.v1.service) = true; is correctly implemented across all service calls.

Verification successful

The search results indicate that the service Msg definition is present in the proto/cosmos/quarantine/v1beta1/tx.proto file. However, to ensure the new service option (cosmos.msg.v1.service) = true; is correctly implemented across all service calls, we need to verify its presence within the service Msg definition in this file.


The previous script failed due to an unrecognized file type for proto in rg. To address this, we need to ensure the correct file type is specified and re-run the search for the new service option within the service definition.


The new service option (cosmos.msg.v1.service) = true; is correctly implemented within the service Msg definition in the proto/cosmos/quarantine/v1beta1/tx.proto file.

  • The option is present and correctly placed within the service definition.
Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the correct implementation of the new service option in service calls.

# Test: Search for service definitions. Expect: Correct implementation of the new option.
rg --type proto $'service Msg'

Length of output: 61



Script:

#!/bin/bash
# Description: Verify the correct implementation of the new service option in service calls.

# Test: Search for service definitions. Expect: Correct implementation of the new option.
rg --type-add 'proto:*.proto' --type proto $'service Msg'

Length of output: 2482



Script:

#!/bin/bash
# Description: Verify the presence of the new service option in the service definition.

# Test: Search for the new service option within the service definition in the specified file.
rg --type proto --pcre2 --context 5 'option \(cosmos\.msg\.v1\.service\) = true;' proto/cosmos/quarantine/v1beta1/tx.proto

Length of output: 154



Script:

#!/bin/bash
# Description: Verify the presence of the new service option in the service definition.

# Test: Search for the new service option within the service definition in the specified file.
rg --type-add 'proto:*.proto' --type proto --pcre2 --context 5 'option \(cosmos\.msg\.v1\.service\) = true;' proto/cosmos/quarantine/v1beta1/tx.proto

Length of output: 534

proto/provenance/attribute/v1/tx.proto (1)

17-17: Ensure the new service option (cosmos.msg.v1.service) = true; is correctly implemented across all service calls.

Verification successful

The script successfully identified several .proto files containing the service Msg definition. However, it did not verify the presence of the new service option (cosmos.msg.v1.service) = true; within these service definitions.

To ensure the new service option is correctly implemented, we need to search for this specific option within the identified .proto files.


The verification script confirmed that the new service option (cosmos.msg.v1.service) = true; is correctly implemented in all identified .proto files containing the service Msg definition.

  • The following files were checked and confirmed to include the new service option:
    • proto/cosmos/quarantine/v1beta1/tx.proto
    • proto/cosmos/sanction/v1beta1/tx.proto
    • proto/provenance/attribute/v1/tx.proto
    • proto/provenance/exchange/v1/tx.proto
    • proto/provenance/ibchooks/v1/tx.proto
    • proto/provenance/ibcratelimit/v1/tx.proto
    • proto/provenance/marker/v1/tx.proto
    • proto/provenance/metadata/v1/tx.proto
    • proto/provenance/msgfees/v1/tx.proto
    • proto/provenance/name/v1/tx.proto
    • proto/provenance/oracle/v1/tx.proto
    • proto/provenance/trigger/v1/tx.proto
    • third_party/proto/cosmos/auth/v1beta1/tx.proto
    • third_party/proto/cosmos/authz/v1beta1/tx.proto
    • third_party/proto/cosmos/bank/v1beta1/tx.proto
    • third_party/proto/cosmos/circuit/v1/tx.proto
    • third_party/proto/cosmos/consensus/v1/tx.proto
    • third_party/proto/cosmos/crisis/v1beta1/tx.proto
    • third_party/proto/cosmos/distribution/v1beta1/tx.proto
    • third_party/proto/cosmos/evidence/v1beta1/tx.proto
    • third_party/proto/cosmos/feegrant/v1beta1/tx.proto
    • third_party/proto/cosmos/gov/v1/tx.proto
    • third_party/proto/cosmos/gov/v1beta1/tx.proto
    • third_party/proto/cosmos/group/v1/tx.proto
    • third_party/proto/cosmos/mint/v1beta1/tx.proto
    • third_party/proto/cosmos/nft/v1beta1/tx.proto
    • third_party/proto/cosmos/slashing/v1beta1/tx.proto
    • third_party/proto/cosmos/staking/v1beta1/tx.proto
    • third_party/proto/cosmos/tx/v1beta1/service.proto
    • third_party/proto/cosmos/tx/v1beta1/tx.proto
    • third_party/proto/cosmos/upgrade/v1beta1/tx.proto
    • third_party/proto/cosmos/vesting/v1beta1/tx.proto
    • third_party/proto/cosmwasm/wasm/v1/tx.proto
    • third_party/proto/cosmwasm/wasm/v1beta1/tx.proto
    • third_party/proto/ibc/applications/fee/v1/tx.proto
    • third_party/proto/ibc/applications/interchain_accounts/controller/v1/tx.proto
    • third_party/proto/ibc/applications/interchain_accounts/host/v1/tx.proto
    • third_party/proto/ibc/applications/transfer/v1/tx.proto
    • third_party/proto/ibc/core/channel/v1/tx.proto
    • third_party/proto/ibc/core/client/v1/tx.proto
    • third_party/proto/ibc/core/connection/v1/tx.proto
    • third_party/proto/ibc/lightclients/wasm/v1/tx.proto
Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the correct implementation of the new service option in service calls.

# Test: Search for service definitions. Expect: Correct implementation of the new option.
rg --type proto $'service Msg'

Length of output: 61



Script:

#!/bin/bash
# Description: Find all .proto files and search for service definitions to verify the implementation of the new service option.

# Step 1: Find all .proto files
proto_files=$(fd --extension proto)

# Step 2: Search for service definitions within these files
for file in $proto_files; do
  echo "Searching in $file"
  rg 'service Msg' "$file"
done

Length of output: 83361



Script:

#!/bin/bash
# Description: Verify the implementation of the new service option in identified .proto files.

# List of .proto files containing 'service Msg' definition
proto_files=(
  "proto/cosmos/quarantine/v1beta1/tx.proto"
  "proto/cosmos/sanction/v1beta1/tx.proto"
  "proto/provenance/attribute/v1/tx.proto"
  "proto/provenance/exchange/v1/tx.proto"
  "proto/provenance/ibchooks/v1/tx.proto"
  "proto/provenance/ibcratelimit/v1/tx.proto"
  "proto/provenance/marker/v1/tx.proto"
  "proto/provenance/metadata/v1/tx.proto"
  "proto/provenance/msgfees/v1/tx.proto"
  "proto/provenance/name/v1/tx.proto"
  "proto/provenance/oracle/v1/tx.proto"
  "proto/provenance/trigger/v1/tx.proto"
  "third_party/proto/cosmos/auth/v1beta1/tx.proto"
  "third_party/proto/cosmos/authz/v1beta1/tx.proto"
  "third_party/proto/cosmos/bank/v1beta1/tx.proto"
  "third_party/proto/cosmos/circuit/v1/tx.proto"
  "third_party/proto/cosmos/consensus/v1/tx.proto"
  "third_party/proto/cosmos/crisis/v1beta1/tx.proto"
  "third_party/proto/cosmos/distribution/v1beta1/tx.proto"
  "third_party/proto/cosmos/evidence/v1beta1/tx.proto"
  "third_party/proto/cosmos/feegrant/v1beta1/tx.proto"
  "third_party/proto/cosmos/gov/v1/tx.proto"
  "third_party/proto/cosmos/gov/v1beta1/tx.proto"
  "third_party/proto/cosmos/group/v1/tx.proto"
  "third_party/proto/cosmos/mint/v1beta1/tx.proto"
  "third_party/proto/cosmos/nft/v1beta1/tx.proto"
  "third_party/proto/cosmos/slashing/v1beta1/tx.proto"
  "third_party/proto/cosmos/staking/v1beta1/tx.proto"
  "third_party/proto/cosmos/tx/v1beta1/service.proto"
  "third_party/proto/cosmos/tx/v1beta1/tx.proto"
  "third_party/proto/cosmos/upgrade/v1beta1/tx.proto"
  "third_party/proto/cosmos/vesting/v1beta1/tx.proto"
  "third_party/proto/cosmwasm/wasm/v1/tx.proto"
  "third_party/proto/cosmwasm/wasm/v1beta1/tx.proto"
  "third_party/proto/ibc/applications/fee/v1/tx.proto"
  "third_party/proto/ibc/applications/interchain_accounts/controller/v1/tx.proto"
  "third_party/proto/ibc/applications/interchain_accounts/host/v1/tx.proto"
  "third_party/proto/ibc/applications/transfer/v1/tx.proto"
  "third_party/proto/ibc/core/channel/v1/tx.proto"
  "third_party/proto/ibc/core/client/v1/tx.proto"
  "third_party/proto/ibc/core/connection/v1/tx.proto"
  "third_party/proto/ibc/lightclients/wasm/v1/tx.proto"
)

# Search for the new service option in the identified .proto files
for file in "${proto_files[@]}"; do
  echo "Checking $file for the new service option"
  rg 'option \(cosmos.msg.v1.service\) = true;' "$file"
done

Length of output: 16380

proto/provenance/msgfees/v1/tx.proto (1)

17-17: The addition of (cosmos.msg.v1.service) = true; correctly exposes the Msg service as a gRPC service, aligning with Cosmos SDK standards.

Verification successful

The verification process has shown that the addition of the option (cosmos.msg.v1.service) = true; line is consistent across multiple proto files within the repository. This confirms that the change aligns with the existing pattern for defining gRPC services in the Cosmos SDK.

  • The option (cosmos.msg.v1.service) = true; line is present in several other proto files, indicating a standard practice.
Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify that similar changes have been made in other proto files.

# Test: Search for similar changes in other proto files. Expect: Similar lines in other service definitions.
rg --type proto $'option (cosmos.msg.v1.service) = true;'

Length of output: 88



Script:

#!/bin/bash
# Description: Verify that similar changes have been made in other proto files.

# Test: Search for similar changes in other proto files. Expect: Similar lines in other service definitions.
rg --type-add 'proto:*.proto' --type proto $'option (cosmos.msg.v1.service) = true;'

Length of output: 85



Script:

#!/bin/bash
# Description: List all proto files and inspect their service definitions.

# List all proto files
proto_files=$(fd --type f --extension proto)

# Inspect service definitions in each proto file
for file in $proto_files; do
  echo "File: $file"
  rg --pcre2 --multiline 'service\s+\w+\s+\{[^}]*\}' "$file"
done

Length of output: 148521

testutil/network.go (1)

37-37: Refactoring to use simtestutil.NewAppOptionsWithFlagHome in NewAppConstructor and DefaultTestNetworkConfig functions simplifies the setup process and reduces potential errors. Ensure this new method is used consistently across the project.

Also applies to: 53-53

Verification successful

The refactoring to use simtestutil.NewAppOptionsWithFlagHome is consistent and appropriate across the project. The method is used in similar contexts for setting up application options in test and temporary application setups.

  • testutil/network.go
  • app/app_test.go
  • app/test_helpers.go
  • cmd/provenanced/cmd/testnet_test.go
Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify that `simtestutil.NewAppOptionsWithFlagHome` is used consistently in similar contexts.

# Test: Search for usage of `simtestutil.NewAppOptionsWithFlagHome`. Expect: Consistent usage across similar functions.
rg --type go $'simtestutil.NewAppOptionsWithFlagHome'

Length of output: 898

cmd/provenanced/cmd/root.go (1)

78-78: Using simtestutil.NewAppOptionsWithFlagHome in the NewRootCmd function standardizes and simplifies the initialization process. Verify that this method is consistently used in other command initializations.

Verification successful

The method simtestutil.NewAppOptionsWithFlagHome is used consistently across various files for initializing application options, indicating a standardized approach.

  • testutil/network.go
  • cmd/provenanced/cmd/root.go
  • cmd/provenanced/cmd/testnet_test.go
  • app/test_helpers.go
  • app/app_test.go
Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify that `simtestutil.NewAppOptionsWithFlagHome` is used consistently in command initializations.

# Test: Search for usage of `simtestutil.NewAppOptionsWithFlagHome` in command initializations. Expect: Consistent usage across the application.
rg --type go $'simtestutil.NewAppOptionsWithFlagHome'

Length of output: 898

x/ibchooks/marker_hooks_test.go (6)

44-44: The test setup using SetupSimAppFn appears correct. Ensure that this function properly initializes the test environment as expected.


44-44: The test TestProcessMarkerMemo is well-implemented, covering various scenarios effectively.


44-44: The test TestResetMarkerAccessGrants is correctly implemented, ensuring that access grants are reset as expected under various conditions.


44-44: The test TestSanitizeMemo effectively covers various scenarios for memo sanitization, ensuring robust handling of different memo formats.


44-44: The test TestPreSendPacketDataProcessingFn is well-implemented, covering various scenarios effectively.


44-44: Ensure SetupSimAppFn is correctly defined and used.

Verification successful

The SetupSimAppFn function is correctly defined and used in the x/ibchooks/marker_hooks_test.go file.

  • The function SetupSimAppFn is defined in x/ibchooks/ibc_middleware_test.go and matches the usage in x/ibchooks/marker_hooks_test.go.
Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the definition and usage of `SetupSimAppFn`.

# Test: Search for the function definition and usage. Expect: Proper definition and usage.
rg --type go $'SetupSimAppFn'

Length of output: 603

app/app_test.go (1)

426-445: The test TestMsgServerProtoAnnotations is well-implemented, ensuring that the MsgServer proto annotations are correctly set and validated.

app/test_helpers.go (4)

28-34: Ensure the new imports are utilized properly in the file.

The addition of github.com/cosmos/cosmos-sdk/client/flags and github.com/cosmos/cosmos-sdk/server seems aligned with the changes in the setup functions where these packages' functionalities are used.


70-73: Refactor SetupOptions to align with the new application setup requirements.

The modifications in the SetupOptions struct, removing fields like InvCheckPeriod, HomePath, and SkipUpgradeHeights, and replacing them with AppOpts, reflect the changes in the application initialization pattern. This is consistent with the broader refactoring effort to simplify configuration management.


163-163: Check the initialization parameters in NewAppWithCustomOptions.

This script ensures that the initialization parameters in the NewAppWithCustomOptions function are correctly set and used throughout the application.

Verification successful

The initialization parameters in NewAppWithCustomOptions are correctly set and used throughout the application.

  • The function NewAppWithCustomOptions is defined in app/test_helpers.go and initializes a new SimApp with custom options.
  • The function is called in app/app_test.go with appropriate parameters.

No issues were found with the initialization parameters.

Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify that the initialization parameters in `NewAppWithCustomOptions` are correctly set.

# Test: Search for the usage of `NewAppWithCustomOptions`. Expect: Correct parameters passed in all instances.
rg --type go $'NewAppWithCustomOptions'

Length of output: 367



Script:

#!/bin/bash
# Extract the definition of `NewAppWithCustomOptions` from `app/test_helpers.go`
ast-grep --lang go --pattern $'func NewAppWithCustomOptions($_, $_, $_) $_' app/test_helpers.go

# Extract the lines where `NewAppWithCustomOptions` is called in `app/app_test.go`
rg --type go --context 5 'NewAppWithCustomOptions' app/app_test.go

Length of output: 3311


83-86: Verify the correct usage of AppOptionsMap and flags.

This script checks for the usage of AppOptionsMap and the specific flags to ensure they are used consistently and correctly throughout the application.

Verification successful

The search results indicate that AppOptionsMap, flags.FlagHome, and server.FlagInvCheckPeriod are used in multiple files across the application. Here are the relevant locations:

  • x/ibcratelimit/module/ibc_middleware_test.go
  • x/ibchooks/ibc_middleware_test.go
  • cmd/provenanced/config/manager.go
  • app/test_helpers.go
  • app/sim_test.go
  • app/app.go
  • cmd/provenanced/cmd/root.go
  • cmd/provenanced/cmd/genesis_test.go
  • cmd/provenanced/cmd/genesis.go

To ensure the correct usage of AppOptionsMap and flags, we need to review the context in which they are used in these files. This will help us verify if they are being used consistently and correctly.


The context extracted from the identified files shows that AppOptionsMap, flags.FlagHome, and server.FlagInvCheckPeriod are used consistently and correctly across the application. The usage patterns align with the expected behavior, ensuring that the flags are set and retrieved appropriately.

Here are the key observations:

  • AppOptionsMap is used to create application options with flags.FlagHome and server.FlagInvCheckPeriod in test files and application setup.
  • flags.FlagHome is consistently used to set or retrieve the home directory path.
  • server.FlagInvCheckPeriod is used to set or retrieve the invariant check period.

The usage in the following files confirms the correct implementation:

  • x/ibcratelimit/module/ibc_middleware_test.go
  • x/ibchooks/ibc_middleware_test.go
  • cmd/provenanced/config/manager.go
  • app/test_helpers.go
  • app/sim_test.go
  • app/app.go
  • cmd/provenanced/cmd/root.go
  • cmd/provenanced/cmd/genesis_test.go
  • cmd/provenanced/cmd/genesis.go

No inconsistencies or incorrect usages were found.

Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify that the `AppOptionsMap` and flags are used correctly across the application.

# Test: Search for the usage of `AppOptionsMap` and flags. Expect: Consistent usage across the application.
rg --type go $'AppOptionsMap|flags.FlagHome|server.FlagInvCheckPeriod'

Length of output: 2287



Script:

#!/bin/bash
# Description: Extract the context of `AppOptionsMap`, `flags.FlagHome`, and `server.FlagInvCheckPeriod` usage in the identified files.

# Extract 5 lines before and after the match to understand the context.
rg --type go --context 5 'AppOptionsMap|flags.FlagHome|server.FlagInvCheckPeriod' x/ibcratelimit/module/ibc_middleware_test.go x/ibchooks/ibc_middleware_test.go cmd/provenanced/config/manager.go app/test_helpers.go app/sim_test.go app/app.go cmd/provenanced/cmd/root.go cmd/provenanced/cmd/genesis_test.go cmd/provenanced/cmd/genesis.go

Length of output: 13106

x/ibchooks/ibc_middleware_test.go (2)

16-17: Added imports for flags and server modules.

These imports are necessary for the new configuration options used in the SetupSimAppFn function.


97-97: Modified the default app initialization for testing.

This change ensures that each test setup uses the newly refactored SetupSimAppFn, aligning all tests with the updated configuration strategy.

proto/provenance/marker/v1/tx.proto (1)

22-22: Added service option to enable message service routing.

This change is crucial for enabling the service to be recognized and routed correctly in a gRPC environment, aligning with modern microservices architecture.

app/sim_test.go (11)

17-18: Added imports for wasmtypes and assert libraries.

These additions are consistent with the changes described in the AI-generated summary and are necessary for the updated simulation tests.


27-27: Added import for cosmossdk.io/x/feegrant.

This import is necessary for the updated fee grant handling in the simulation tests.


31-33: Added imports for flags, codec, and server from the Cosmos SDK.

These imports are necessary for the updated simulation setup and configuration handling.


35-35: Added imports for kv and simulation from the Cosmos SDK.

These imports are necessary for the updated simulation tests, particularly for handling key-value store operations.


43-43: Added import for proto from github.com/cosmos/gogoproto.

This import is necessary for handling protobuf messages in the simulation tests.


70-76: Added functions appStateWithICA and appStateWithICQ to ensure the app state includes default genesis states for ICA and ICQ modules.

These functions are crucial for ensuring the simulation environment is correctly initialized with necessary module states.


144-144: Updated setupSimulation to use pioconfig.SimAppChainID for setting the chain ID.

This update ensures that the simulation uses the correct chain ID, aligning with the configuration settings.


149-159: Introduced fauxMerkleModeOpt and interBlockCacheOpt functions for simulation optimizations.

These functions provide options to optimize the simulation by altering how the Merkle tree is handled and setting up an inter-block cache. This is beneficial for performance.


Line range hint 211-253: Updated TestFullAppSimulation to utilize new simulation setup and app state functions.

The updates to this test function are consistent with the changes in simulation setup and handling, ensuring that the full app simulation is performed correctly.


Line range hint 299-511: Updated TestAppImportExport to handle new simulation setup and app state functions.

This test function has been updated to handle the new simulation setup and ensure that app state import/export is tested correctly.


Line range hint 546-597: Updated TestAppStateDeterminism to handle new simulation setup and app state functions.

This test function has been updated to ensure that app state determinism is tested across different seeds and configurations.

x/ibcratelimit/module/ibc_middleware_test.go (4)

73-73: Setup logic in SetupTest is correctly implemented and initializes necessary components for testing.


57-57: The test TestNonICS20 correctly simulates and validates the behavior of rate limits with non-ICS20 messages.


57-57: The test TestSendTransferNoContract correctly ensures that IBC messages are sent successfully when no rate limiting middleware is configured.


57-57: The test TestRecvTransferWithRateLimitingNative effectively simulates and validates rate limiting on receive operations for native tokens.

proto/provenance/metadata/v1/tx.proto (1)

19-19: Service configuration updated to integrate with Cosmos SDK message routing.

Verification successful

The Msg service is indeed defined in the proto/provenance/metadata/v1/tx.proto file, along with several other files. This confirms that the service configuration update to integrate with Cosmos SDK message routing is consistent with the rest of the codebase.

  • proto/provenance/metadata/v1/tx.proto:service Msg {
Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the integration of the service configuration with Cosmos SDK message routing.

# Test: Search for usage of `Msg` service in the codebase. Expect: Proper integration with message handlers.
rg --type proto $'service Msg'

Length of output: 61



Script:

#!/bin/bash
# Description: Verify the integration of the service configuration with Cosmos SDK message routing.

# Test: Search for usage of `Msg` service in the codebase. Expect: Proper integration with message handlers.
rg 'service Msg' --glob '*.proto'

Length of output: 2459

proto/provenance/exchange/v1/tx.proto (1)

22-22: Added option (cosmos.msg.v1.service) = true; to the Msg service definition.

This change indicates that the service is now recognized as a standard Cosmos SDK service, which could enhance integration with other Cosmos SDK tools and services.

app/app.go (11)

22-23: Added new imports for autocliv1 and reflectionv1.

These imports are part of the enhancements to application initialization and configuration, aligning with the PR's objectives to enhance functionality.


43-43: Added imports for flags, server, and posthandler.

These imports support the updated application initialization logic and the handling of new server and post-processing functionalities.

Also applies to: 51-51, 64-64


328-328: Modified the New function to remove invCheckPeriod and add skipUpgradeHeights and homePath.

This change simplifies the initialization parameters and supports dynamic configuration through AppOptions, which is crucial for flexible deployment and testing scenarios.


423-427: Scoped capability keepers are correctly set up for various modules.

Proper scoping ensures that capabilities are isolated per module, enhancing security and modularity.


476-476: Introduced dynamic retrieval of invCheckPeriod and skipUpgradeHeights from AppOptions.

This dynamic configuration allows for more flexible deployment and testing, aligning with modern best practices for blockchain application development.

Also applies to: 482-490


514-514: Correctly configured the IBC keeper with necessary dependencies.

This setup is crucial for the correct operation of IBC functionalities within the app, ensuring compliance with the Cosmos SDK's IBC module requirements.


553-553: Properly scoped the transfer keeper within the IBC middleware setup.

This ensures that the transfer keeper has the correct capabilities and is securely integrated within the IBC middleware stack.


745-745: Added a new configuration option for skipping genesis invariants.

This option provides flexibility during network upgrades or development, allowing nodes to bypass potentially expensive invariant checks during genesis.


793-795: Set the upgrade keeper's version map during app initialization.

This is a critical step for ensuring that the app's state is correctly migrated during upgrades, aligning with the upgrade module's requirements.


950-953: Registered upgrade handlers and set the store loader.

This registration is essential for handling blockchain upgrades smoothly, ensuring that new functionalities are correctly integrated and old states are migrated without issues.


955-961: Registered new gRPC query services for auto CLI and reflection.

These services enhance the app's capabilities by providing automatic CLI generation and reflection services, which are useful for developers and maintainers.

x/ibchooks/ibc_middleware_test.go Show resolved Hide resolved
app/app.go Show resolved Hide resolved
x/ibcratelimit/module/ibc_middleware_test.go Show resolved Hide resolved
app/sim_test.go Show resolved Hide resolved
app/sim_test.go Show resolved Hide resolved
app/sim_test.go Outdated Show resolved Hide resolved
app/sim_bench_test.go 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: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 1c7727f and 190acff.

Files selected for processing (1)
  • app/sim_test.go (16 hunks)
Files skipped from review as they are similar to previous changes (1)
  • app/sim_test.go

@SpicyLemon SpicyLemon enabled auto-merge (squash) June 5, 2024 22:18
@SpicyLemon SpicyLemon merged commit 7f6bb26 into main Jun 6, 2024
32 checks passed
@SpicyLemon SpicyLemon deleted the dwedul/1760-make-sims-pass branch June 6, 2024 13:15
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.

3 participants