Skip to content

Conversation

troian
Copy link
Member

@troian troian commented Jul 31, 2025

@troian troian requested a review from a team as a code owner July 31, 2025 15:33
Copy link

coderabbitai bot commented Jul 31, 2025

Walkthrough

Repository-wide migration updating module paths, dependencies, and CI; major Akash app refactor to Cosmos SDK / CometBFT APIs (app core, keepers, genesis/export, CLI), removal of the SDL and events subsystems, addition of centralized CI action and many e2e integration tests and tooling updates.

Changes

Cohort / File(s) Change Summary
Env & direnv
\.env, \.envrc
Added AKASH_RUN_BIN=${AKASH_RUN}/bin; reorganized .envrc (bash detection, dotenv order), added GOARCH/GOWORK handling and exports, added pv/lz4 checks, removed git-cliff requirement.
Repo marker
.github/.repo
Added repository pointer file with repository URL.
CI: composite action & workflows
.github/actions/setup-ubuntu/action.yaml, .github/workflows/concommits.yaml, .github/workflows/release.yaml, .github/workflows/tests.yaml
New composite setup-ubuntu action to install deps and detect Go; workflows refactored to use it, action version bumps, runner changes, narrowed artifact paths, added TEST_CONFIG, standardized env provisioning.
Make & release tooling
Makefile, make/*.mk, make/codegen.mk, .goreleaser*.yaml
Fixed GOMOD usage, changed lint timeout flag, added mocks target, updated tool versions and mockery/golangci paths, added lint-go/lint-shell, parameterized goreleaser mounts/GOWORK, added STATE_CONFIG/prepare-state and other make tweaks.
Go modules & deps
go.mod
Module path → pkg.akt.dev/node; Go/toolchain bumps; large dependency/replace overhaul to cosmossdk.io, cometbft, ibc-go v10, Akash forks and many transitive updates.
Linters & codegen configs
.golangci.yaml, .mockery.yaml, CHANGELOG.md, README.md, meta.json
Rewrote golangci config (explicit linters/exclusions), replaced mockery config, updated changelog PR URL, README Tendermint → CometBFT link, added upgrade entry in meta.json.
Scripts & tooling
script/tools.sh, script/upgrades.sh, install.sh
Added import-path replace tooling, GHA deps installer, dynamic chain metadata/genesis/snapshot handling, prepare_state/prepare-state command; minor install.sh log-prefix change.
App core & architecture
app/*.go, app/types/*, app/modules.go, app/option.go, app/params/*, app/sim/*
Major SDK/CometBFT migration: baseapp replacement, new encoding/tx config exposed, staged keeper init (InitSpecialKeepers/InitNormalKeepers), runtime store-key API, new app methods (TxConfig, ChainID, NewProposalContext), genesis/export/setup refactor, simulation helpers, appModules/appSimModules, ordering helpers. Many functions/types signatures changed.
Ante / decorators
app/ante.go, app/decorators/*
Removed Akash-specific ante decorators (MinCommissionDecorator, GovPreventSpamDecorator) and their wiring; simplified HandlerOptions and ante chain (DeductFeeDecorator updated).
CLI / commands
cmd/akash/cmd/*
Root/CLI refactor to sdkutil encoding and server patterns; added appCreator with methods (newApp, appExport, newTestnetApp); new prepare-genesis and testnet commands; modernized testnetify; imports moved to pkg.akt.dev/...; some CLI tests deleted/migrated.
Testnet / test harness
app/testnet.go, cmd/akash/cmd/testnet.go, cmd/akash/cmd/testnetify/*
Testnet init refactor: types changed, improved error handling, context/store loading updated for CometBFT, DB opener and trace handling revised; operator address and keeper calls updated with explicit error checks.
Events & common CLI utilities
events/*, cmd/common/*
Removed event streaming/publishing service and CLI plus common CLI helpers (deposit flags, signal handling, JSON print) and associated tests.
SDL subsystem
sdl/*, sdl/_testdata/*
Removed entire SDL parsing/validation/manifest implementation, related utilities, tests and testdata.
E2E & integration tests
tests/e2e/*, tests/upgrade/*, tests/README.md
Added many e2e suites (deployment, market, provider, certs) gated by e2e.integration; expanded upgrade test configs and migrations, added test-config-gha.json, added LocalOsmosis README.
Misc imports & small tests
pubsub/bus_test.go, docgen/main.go, assorted
Numerous import path updates to pkg.akt.dev/... and cometbft; selective test adjustments and deletions to align with new architecture.

Sequence Diagram(s)

sequenceDiagram
    autonumber
    participant Dev as Developer
    participant Repo as GitHub
    participant CI as GitHub Actions
    participant Setup as setup-ubuntu Action
    participant Make as Make/Scripts
    participant App as AkashApp
    participant SDK as Cosmos SDK / Keepers
    participant Node as CometBFT

    Note over Dev,Repo: PR introduces repo-wide migration and CI centralization
    Dev->>Repo: push PR
    Repo->>CI: workflows triggered
    CI->>Setup: run setup-ubuntu (install deps, fetch tags, detect Go)
    Setup-->>CI: environment vars set (GOVERSION, tools)
    CI->>Make: run build/test targets
    Make->>App: build & start via appCreator.newApp
    App->>SDK: InitSpecialKeepers() → InitNormalKeepers()
    App->>Node: register node/gRPC services, lifecycle hooks
    CI->>App: run unit & e2e tests (gRPC/CLI)
    App-->>CI: test results & artifacts
    CI->>Repo: workflow outcome (pass/fail)
Loading

Estimated code review effort

🎯 5 (Critical) | ⏱️ ~120+ minutes

Possibly related PRs

Poem

"🐇
I hopped through modules, changed paths with care,
Rewrote the App to breathe the Comet air.
CI learned one action, tests gained wings to fly,
Old SDL and events waved soft goodbye.
A rabbit cheers: clean trees, bright new sky!"

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Description Check ❓ Inconclusive The PR description "refs akash-network/support#212" is only an external issue reference and does not summarize the extensive, multi-file SDK migration, public API changes, CI/workflow updates, or test additions/removals present in the diff, so it is too vague to verify coverage or intent. Please expand the PR description with a concise summary of the primary goals and high-impact changes (e.g., SDK/CometBFT migration, breaking API/signature changes in app and keepers, removed ante decorators, CI/workflow/tooling updates, and notable test additions/removals), list the most important files/modules affected, and note any manual upgrade steps or backward-incompatible changes reviewers should pay attention to.
✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed The title "feat: sdk-50" is concise and clearly signals an SDK-related feature/upgrade, which matches the large SDK/CometBFT migration and API surface changes present in the changeset (imports, app/keeper refactors, workflow/tooling updates). It is short and on-topic but relies on an internal ticket identifier rather than an explicit description of the primary change, so while it is related to the main change it could be more informative for future readers.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch sdk50

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 65d0a37 and 294acc2.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (1)
  • go.mod (1 hunks)
🧰 Additional context used
🪛 OSV Scanner (2.1.0)
go.mod

[HIGH] 177-177: github.com/hashicorp/go-getter 1.7.8: HashiCorp go-getter Vulnerable to Symlink Attacks in github.com/hashicorp/go-getter

(GO-2025-3892)


[HIGH] 177-177: github.com/hashicorp/go-getter 1.7.8: HashiCorp go-getter Vulnerable to Symlink Attacks

(GHSA-wjrx-6529-hcj3)

🔇 Additional comments (3)
go.mod (3)

24-24: IBC-Go v10.3.0 compatibility verified.

The upgrade from IBC-Go v8.7.0 to v10.3.0 correctly aligns with Cosmos SDK v0.53.3. This addresses the compatibility matrix requirements.


8-18: Major dependency updates look consistent.

The comprehensive updates to cosmossdk.io modules, Cosmos ecosystem packages, and related dependencies appear well-coordinated for the SDK 0.53.x migration. Version selections align with the ecosystem compatibility matrix.

Also applies to: 20-27, 29-29, 32-32, 34-34, 37-47, 49-52


59-64: Akash fork replacements properly configured.

The replace directives for CometBFT, Cosmos SDK, and gogoproto correctly point to Akash-maintained forks with appropriate version tags. The comment updates reflect the v0.53.x migration context.


Comment @coderabbitai help to get the list of available commands and usage tips.

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

🔭 Outside diff range comments (3)
.goreleaser-docker.yaml (1)

78-81: archives.formats is not a valid GoReleaser key

GoReleaser expects a singular format field, not formats. The current YAML will be ignored and the build will fall back to the default tar.gz, breaking the “single binary” expectation.

 archives:
-  - formats:
-      - binary
+  - format: binary
cmd/akash/cmd/bech32.go (1)

33-36: Avoid panic in CLI command path

A malformed address should surface as a regular error rather than crash the CLI.

-            bech32Addr, err := bech32.ConvertAndEncode(bech32prefix, bz)
-            if err != nil {
-                panic(err)
-            }
+            bech32Addr, err := bech32.ConvertAndEncode(bech32prefix, bz)
+            if err != nil {
+                return err
+            }
cmd/akash/cmd/auth.go (1)

103-103: Fix incorrect flag usage

Line 103 uses FlagJWTAccess instead of FlagJWTScope when retrieving the scope string, which appears to be a copy-paste error.

-				scopeString, err := cmd.Flags().GetString(FlagJWTAccess)
+				scopeString, err := cmd.Flags().GetString(FlagJWTScope)
♻️ Duplicate comments (4)
make/test-simulation.mk (3)

12-13: Same concern as above for determinism test target

See previous comment.
If all good you can ignore.


17-18: Import/export simulation now also compiles without mainnet tag?

Re-verify for this target as well.


22-23: Simulation-after-import target: tag removal

Same verification applies.

tests/e2e/certs_cli_test.go (1)

92-146: Comprehensive client certificate tests

Good validation of argument rejection and complete lifecycle testing. Note: Same ValidateTx return value issue as mentioned above applies here.

🧹 Nitpick comments (51)
README.md (1)

31-32: Link text still says “tendermint” after switching to CometBFT

To avoid confusion, update the visible link label to CometBFT while keeping the new URL.

-The Suite is composed of one binary, `akash`, which contains a ([tendermint](https://github.com/cometbft/cometbft)-powered) blockchain node that
+The Suite is composed of one binary, `akash`, which contains a ([CometBFT](https://github.com/cometbft/cometbft)-powered) blockchain node that
tests/upgrade/types/types.go (1)

1-1: Explain disabled revive linter

Adding //nolint: revive silences all future lint findings for this file. Consider narrowing the directive (e.g. //nolint:revive,stylecheck) or adding a short comment explaining why it’s required.

docgen/main.go (1)

17-18: Bubble up the error from root.NewRootCmd() instead of ignoring it.

doc.GenMarkdownTree will panic on a nil *cobra.Command; losing early context makes the failure harder to diagnose.

-	cmd, _ := root.NewRootCmd()
+	cmd, err := root.NewRootCmd()
+	if err != nil {
+		fmt.Fprintf(os.Stderr, "failed to build root command: %v\n", err)
+		os.Exit(1)
+	}
.env (1)

14-15: Add the new path to $PATH where required tooling expects it.

AKASH_RUN_BIN is exported but not yet appended to PATH. CI scripts that invoke binaries placed here will fail unless they reference the full path.

CHANGELOG.md (1)

41-41: Convert bare URL to markdown link to satisfy MD034 and keep style consistent

markdownlint rightfully flags the raw URL. We’ve been linking other references, so let’s wrap this one too.

-* (ibc-go) Use ibc v4.4.0 https://pkg.akt.dev/node/pull/1825
+* (ibc-go) Use ibc v4.4.0 ([#1825](https://pkg.akt.dev/node/pull/1825))
make/codegen.mk (1)

8-9: Declare the new target as phony and prevent accidental file collision

Add it beside the others to avoid GNU make treating a real mocks directory/file
as up-to-date.

 .PHONY: generate
 generate: $(MOCKERY)
 	$(GO) generate ./...

 .PHONY: codegen
 codegen: generate
+
+.PHONY: mocks
 mocks: $(MOCKERY)
 	$(MOCKERY)
make/test-integration.mk (1)

11-11: Timeout increase is appropriate for integration tests.

The timeout increase from 300s to 600s is reasonable for comprehensive test suites, though you may want to consider making this configurable via an environment variable for flexibility in different CI environments.

Consider making the timeout configurable:

-	$(GO_TEST) -v -timeout 600s $(TEST_MODULES)
+	$(GO_TEST) -v -timeout $(TEST_TIMEOUT) $(TEST_MODULES)

Then add TEST_TIMEOUT ?= 600s at the top of the file.

tests/e2e/cli_test.go (1)

14-14: Consider making the default deposit configurable.

The hardcoded deposit value may need adjustment for different test environments or network conditions. Consider making it configurable via environment variables or test configuration.

-var DefaultDeposit = sdk.NewCoin("uakt", sdk.NewInt(5000000))
+var DefaultDeposit = getDefaultDeposit()
+
+func getDefaultDeposit() sdk.Coin {
+	if envDeposit := os.Getenv("TEST_DEFAULT_DEPOSIT"); envDeposit != "" {
+		if amount, err := sdk.ParseCoinNormalized(envDeposit); err == nil {
+			return amount
+		}
+	}
+	return sdk.NewCoin("uakt", sdk.NewInt(5000000))
+}
tests/e2e/grpc_test.go (1)

13-30: Consider parallel test execution for better performance.

The test suites are currently executed sequentially, which may increase overall test runtime. If the test suites are independent and don't share state, consider running them in parallel.

 func TestIntegrationGRPC(t *testing.T) {
-	dg := &deploymentGRPCRestTestSuite{}
-	dg.NetworkTestSuite = testutil.NewNetworkTestSuite(nil, dg)
-
-	cg := &certsGRPCRestTestSuite{}
-	cg.NetworkTestSuite = testutil.NewNetworkTestSuite(nil, cg)
-
-	mg := &marketGRPCRestTestSuite{}
-	mg.NetworkTestSuite = testutil.NewNetworkTestSuite(nil, mg)
-
-	pg := &providerGRPCRestTestSuite{}
-	pg.NetworkTestSuite = testutil.NewNetworkTestSuite(nil, pg)
-
-	suite.Run(t, dg)
-	suite.Run(t, cg)
-	suite.Run(t, mg)
-	suite.Run(t, pg)
+	testSuites := []suite.TestingSuite{
+		func() suite.TestingSuite {
+			dg := &deploymentGRPCRestTestSuite{}
+			dg.NetworkTestSuite = testutil.NewNetworkTestSuite(nil, dg)
+			return dg
+		}(),
+		func() suite.TestingSuite {
+			cg := &certsGRPCRestTestSuite{}
+			cg.NetworkTestSuite = testutil.NewNetworkTestSuite(nil, cg)
+			return cg
+		}(),
+		func() suite.TestingSuite {
+			mg := &marketGRPCRestTestSuite{}
+			mg.NetworkTestSuite = testutil.NewNetworkTestSuite(nil, mg)
+			return mg
+		}(),
+		func() suite.TestingSuite {
+			pg := &providerGRPCRestTestSuite{}
+			pg.NetworkTestSuite = testutil.NewNetworkTestSuite(nil, pg)
+			return pg
+		}(),
+	}
+
+	for _, ts := range testSuites {
+		ts := ts // capture loop variable
+		t.Run("", func(t *testing.T) {
+			t.Parallel()
+			suite.Run(t, ts)
+		})
+	}
 }
_docs/adr/adr-001-network-upgrades.md (1)

43-48: Import path updates are correct for the CometBFT migration.

The updates from Tendermint to CometBFT imports and the new cosmossdk.io module paths align with the broader codebase modernization.

However, address the formatting issue by replacing hard tabs with spaces:

 import (
-	"github.com/cometbft/cometbft/libs/log"
+    "github.com/cometbft/cometbft/libs/log"
 
-	storetypes "cosmossdk.io/store"
-	sdk "github.com/cosmos/cosmos-sdk/types"
-	"github.com/cosmos/cosmos-sdk/types/module"
-	upgradetypes "cosmossdk.io/x/upgrade/types"
+    storetypes "cosmossdk.io/store"
+    sdk "github.com/cosmos/cosmos-sdk/types"
+    "github.com/cosmos/cosmos-sdk/types/module"
+    upgradetypes "cosmossdk.io/x/upgrade/types"
cmd/akash/cmd/testnetify/config.go (2)

11-16: Import aliases are fine—confirm unused imports after rebase

Cosmos SDK 0.50+ split sdkmath out of types. Good catch.
Just ensure go vet ./... passes after the switch; stray sdkmath vs sdk.Int mismatches are easy to miss.


61-66: Unexported upgrade field is silent in JSON

upgrade akash.TestnetUpgrade lacks a JSON tag and is private, so it will never marshal/unmarshal.
Add an explicit ignore tag for clarity.

-upgrade    akash.TestnetUpgrade
+upgrade    akash.TestnetUpgrade `json:"-"`
tests/upgrade/test-cases.json (1)

21-26: Whitespace artefact hurts diff readability

"}, { is valid JSON but makes reviews painful.
Run jq -S . tests/upgrade/test-cases.json > tmp && mv tmp … to pretty-print and keep future diffs clean.

.github/workflows/release.yaml (1)

60-66: Hard-coded test config path assumes CWD

TEST_CONFIG: test-config-gha.json relies on tests/upgrade being the working directory later.
Safer:

env:
  TEST_CONFIG: tests/upgrade/test-config-gha.json
.github/actions/setup-ubuntu/action.yaml (2)

1-4: Missing description field breaks Marketplace visibility

GitHub composite actions should include a short description.

 name: setup-ubuntu
+description: "Common environment bootstrap for Akash CI jobs"

10-13: sudo apt install without apt-update can fail on new runners

Prepend sudo apt-get update -y to avoid “package not found” errors.

app/ante.go (2)

39-43: Remove "akash" references from error messages.

Since the code is being refactored to remove Akash-specific logic, the error messages should be generic.

Apply this diff to make error messages consistent:

-		return nil, sdkerrors.ErrLogic.Wrap("akash governance keeper is required for ante builder")
+		return nil, sdkerrors.ErrLogic.Wrap("governance keeper is required for ante builder")
 	}
 
 	if options.FeegrantKeeper == nil {
-		return nil, sdkerrors.ErrLogic.Wrap("akash feegrant keeper is required for ante builder")
+		return nil, sdkerrors.ErrLogic.Wrap("feegrant keeper is required for ante builder")

52-52: Consider documenting the nil TxFeeChecker parameter.

The nil parameter represents the TxFeeChecker, which defaults to the standard fee checker when nil. Consider adding a comment to clarify this for future maintainers.

-		ante.NewDeductFeeDecorator(options.AccountKeeper, options.BankKeeper, options.FeegrantKeeper, nil),
+		ante.NewDeductFeeDecorator(options.AccountKeeper, options.BankKeeper, options.FeegrantKeeper, nil), // nil uses default TxFeeChecker
tests/e2e/certs_grpc_test.go (1)

75-114: Remove or implement the commented REST API test.

Large blocks of commented code should be avoided. If this REST API test is planned, track it as a TODO or issue. Otherwise, remove it.

Would you like me to help implement this REST API test or create an issue to track this work?

app/upgrades.go (1)

23-27: Empty pre-upgrade handler implementation.

The customPreUpgradeHandler is called but has no implementation. If this is intentional placeholder code, consider adding a TODO comment. Otherwise, remove the call until needed.

Would you like me to help implement the pre-upgrade handler logic or should we remove this placeholder code?

Also applies to: 56-57

.envrc (1)

62-62: Fix typo in error message.

There's an extra space in the error message.

-	echo "git-cliff  is not installed"
+	echo "git-cliff is not installed"
tests/e2e/provider_cli_test.go (1)

33-33: Fix incorrect comment.

The comment is misleading as this creates a provider, not a deployment.

-	// create deployment
+	// create provider
app/sim/sim_utils.go (1)

53-74: Consider improving error handling in SimulationOperations.

The function uses panic for file reading and JSON unmarshaling errors, which could be harsh for simulation testing scenarios. Consider returning errors instead to allow for more graceful error handling by the caller.

func SimulationOperations(app *akash.AkashApp, cdc codec.JSONCodec, config simtypes.Config) ([]simtypes.WeightedOperation, error) {
	simState := module.SimulationState{
		AppParams: make(simtypes.AppParams),
		Cdc:       cdc,
	}

	if config.ParamsFile != "" {
		bz, err := os.ReadFile(config.ParamsFile)
		if err != nil {
-			panic(err)
+			return nil, fmt.Errorf("failed to read params file: %w", err)
		}

		err = json.Unmarshal(bz, &simState.AppParams)
		if err != nil {
-			panic(err)
+			return nil, fmt.Errorf("failed to unmarshal params: %w", err)
		}
	}

	simState.LegacyProposalContents = app.SimulationManager().GetProposalContents(simState) //nolint:staticcheck
	simState.ProposalMsgs = app.SimulationManager().GetProposalMsgs(simState)
-	return app.SimulationManager().WeightedOperations(simState)
+	return app.SimulationManager().WeightedOperations(simState), nil
}
app/option.go (1)

41-51: Add missing function documentation.

For consistency and clarity, consider adding documentation comments to these functions.

+// WithGenesis sets the genesis setup function for app
 func WithGenesis(val SetupGenesisFn) SetupAppOption {
 	return func(t *setupAppOptions) {
 		t.genesisFn = val
 	}
 }

+// WithEncConfig sets the encoding configuration for app
 func WithEncConfig(val sdkutil.EncodingConfig) SetupAppOption {
 	return func(t *setupAppOptions) {
 		t.encCfg = val
 	}
 }
tests/README.md (4)

3-10: Improve sentence variety to enhance readability.

Consider rephrasing to avoid three consecutive sentences starting with "LocalOsmosis".

-LocalOsmosis is a complete Osmosis testnet containerized with Docker and orchestrated with a simple docker-compose file. LocalOsmosis comes preconfigured with opinionated, sensible defaults for a standard testing environment.
-
-LocalOsmosis comes in two flavors:
+LocalOsmosis is a complete Osmosis testnet containerized with Docker and orchestrated with a simple docker-compose file. It comes preconfigured with opinionated, sensible defaults for a standard testing environment.
+
+The testnet is available in two flavors:

124-129: Add language identifier to code block.

The fenced code block should specify a language for proper syntax highlighting.

-```
+```text
 {"level": "info", "module": "server", "module": "consensus", "err": "cannot find validator 122 in valSet of size 1: invalid valid ator index", "time": "2024-10-21T21:34:30Z" ,"message": "failed attempting to add vote"} {"level": "error" , "module": "server", "module":" consensus" ,"height" :22731539, "round" :0, "peer": "27e14df66c9e4cd6b176b@dcabadfa 96750f911", "msg_type": "*consensus. VoteMessage", "err": "error adding vote", "time": "2024-10-21T21:34:307","message":"failed to process message"} {"level": "info" ,"module": "server"
 ', "module": "consensus", "err": "cannot find validator 107 in valSet of size 1: invalid valid
 ator index", "time": "2024-10-21T21:34:30Z", "message": "failed attempting to add vote"}
-```
+```

134-134: Format bare URLs as proper markdown links.

Convert bare URLs to markdown link format for better readability.

-The settings for in place testnet are done in https://github.com/osmosis-labs/osmosis/blob/bb7a94e2561cc63b60ee76ec71a3e04e9688b22c/app/app.go#L773. Modify the parameters in `InitOsmosisAppForTestnet` to modify in place testnet parameters. For example, if you were to modify epoch hours, you would be modifying https://github.com/osmosis-labs/osmosis/blob/bb7a94e2561cc63b60ee76ec71a3e04e9688b22c/app/app.go#L942-L967 .
+The settings for in place testnet are done in [app/app.go#L773](https://github.com/osmosis-labs/osmosis/blob/bb7a94e2561cc63b60ee76ec71a3e04e9688b22c/app/app.go#L773). Modify the parameters in `InitOsmosisAppForTestnet` to modify in place testnet parameters. For example, if you were to modify epoch hours, you would be modifying [app/app.go#L942-L967](https://github.com/osmosis-labs/osmosis/blob/bb7a94e2561cc63b60ee76ec71a3e04e9688b22c/app/app.go#L942-L967).

139-140: Maintain consistent terminology throughout the document.

Use consistent spelling for "preconfigured" as used earlier in the document.

-LocalOsmosis is pre-configured with one validator and 9 accounts with ION and OSMO balances.
+LocalOsmosis is preconfigured with one validator and 9 accounts with ION and OSMO balances.
app/sim/sim_config.go (3)

23-23: Address or track the TODO comment.

The TODO indicates that FlagOnOperationValue should be removed in favor of binary search for invariant violation.

Would you like me to open an issue to track this TODO for future implementation of binary search for invariant violations?


35-54: Consider using conventional lowercase flag names.

The current flag names are capitalized (e.g., "Genesis", "Params"), which is unconventional for CLI flags. Consider using lowercase with hyphens for better CLI usability.

Example changes:

-	flag.StringVar(&FlagGenesisFileValue, "Genesis", "", "custom simulation genesis file; cannot be used with params file")
-	flag.StringVar(&FlagParamsFileValue, "Params", "", "custom simulation params file which overrides any random params; cannot be used with genesis")
+	flag.StringVar(&FlagGenesisFileValue, "genesis", "", "custom simulation genesis file; cannot be used with params file")
+	flag.StringVar(&FlagParamsFileValue, "params", "", "custom simulation params file which overrides any random params; cannot be used with genesis")

74-74: Consider making DBBackend configurable.

The database backend is hardcoded to "goleveldb". Consider adding a flag to make this configurable for different simulation scenarios.

Add a new flag variable and flag registration:

// In the flag variables section
var FlagDBBackendValue string

// In GetSimulatorFlags()
flag.StringVar(&FlagDBBackendValue, "DBBackend", "goleveldb", "database backend to use for simulation")

// In NewConfigFromFlags()
DBBackend: FlagDBBackendValue,
app/genesis.go (1)

105-109: Consider migrating from legacy math functions.

The code uses deprecated sdkmath.LegacyOneDec() and sdkmath.LegacyZeroDec(). While these work, consider using the newer math functions for future compatibility.

Replace legacy functions with their modern equivalents:

-			DelegatorShares:   sdkmath.LegacyOneDec(),
+			DelegatorShares:   sdkmath.NewDec(1),
-			Commission:        stakingtypes.NewCommission(sdkmath.LegacyZeroDec(), sdkmath.LegacyZeroDec(), sdkmath.LegacyZeroDec()),
+			Commission:        stakingtypes.NewCommission(sdkmath.NewDec(0), sdkmath.NewDec(0), sdkmath.NewDec(0)),
app/app_configure.go (1)

55-55: Consider removing the unused parameter or documenting why it's ignored.

The function accepts a []string parameter but doesn't use it. If this parameter is required by an interface, consider adding a comment explaining why it's ignored. Otherwise, remove it to avoid confusion.

If the parameter is not required by an interface:

-func OrderInitGenesis(_ []string) []string {
+func OrderInitGenesis() []string {

If it's required by an interface, add documentation:

+// OrderInitGenesis returns module names in order for init genesis calls.
+// The parameter is ignored as the order is predetermined for the Akash application.
 func OrderInitGenesis(_ []string) []string {
tests/e2e/provider_grpc_test.go (1)

28-29: Consider making the test data path more robust.

Using a relative path with filepath.Abs can be fragile if tests are run from different directories. Consider using a more robust approach to locate test data files.

-providerPath, err := filepath.Abs("../../x/provider/testdata/provider.yaml")
+// Use a helper function or environment variable to locate test data
+providerPath := filepath.Join(testutil.GetTestDataDir(), "provider", "testdata", "provider.yaml")
tests/e2e/market_grpc_test.go (1)

72-76: Consider making test data paths more robust.

Similar to the provider test, using relative paths with filepath.Abs can be fragile. Consider using a consistent approach across all e2e tests.

-deploymentPath, err := filepath.Abs("../../x/deployment/testdata/deployment.yaml")
-s.Require().NoError(err)
-
-providerPath, err := filepath.Abs("../../x/provider/testdata/provider.yaml")
-s.Require().NoError(err)
+deploymentPath := filepath.Join(testutil.GetTestDataDir(), "deployment", "testdata", "deployment.yaml")
+providerPath := filepath.Join(testutil.GetTestDataDir(), "provider", "testdata", "provider.yaml")
cmd/akash/cmd/app_creator.go (1)

50-77: Consider propagating errors instead of panicking where feasible.

While panicking during app initialization is common in Cosmos SDK applications, consider whether some of these errors could be propagated to allow for better error handling at higher levels.

For example, the method signature could be updated to return an error:

-func (a appCreator) newApp(
+func (a appCreator) newApp(
 	logger log.Logger,
 	db dbm.DB,
 	traceStore io.Writer,
 	appOpts servertypes.AppOptions,
-) servertypes.Application {
+) (servertypes.Application, error) {
app/modules.go (3)

90-90: Address the TODO comment

The TODO comment references issue akash-network/support#4. Please ensure this is tracked and addressed.

Would you like me to open a new issue to track this TODO if the referenced issue is closed?


144-146: Consider documenting the nolint directive

The //nolint: staticcheck directive suggests the params module might be deprecated. Consider adding a comment explaining why it's still needed.

+		// params module is deprecated but still required for migration compatibility
 		params.NewAppModule( //nolint: staticcheck
 			app.Keepers.Cosmos.Params,
 		),

290-329: Inconsistent spacing between Akash modules

The empty lines between Akash simulation modules (lines 295, 305, 316, 324) are inconsistent with the formatting in the appModules function where modules are listed without extra spacing.

 		// akash sim modules
 		take.NewAppModule(
 			app.cdc,
 			app.Keepers.Akash.Take,
 		),
-
 		deployment.NewAppModule(
 			app.cdc,
 			app.Keepers.Akash.Deployment,
 			app.Keepers.Akash.Market,
 			app.Keepers.Akash.Escrow,
 			app.Keepers.Cosmos.Acct,
 			app.Keepers.Cosmos.Bank,
 			app.Keepers.Cosmos.Authz,
 		),
-
 		market.NewAppModule(
 			app.cdc,
 			app.Keepers.Akash.Market,
 			app.Keepers.Akash.Escrow,
 			app.Keepers.Akash.Audit,
 			app.Keepers.Akash.Deployment,
 			app.Keepers.Akash.Provider,
 			app.Keepers.Cosmos.Acct,
 			app.Keepers.Cosmos.Bank,
 		),
-
 		provider.NewAppModule(
 			app.cdc,
 			app.Keepers.Akash.Provider,
 			app.Keepers.Cosmos.Acct,
 			app.Keepers.Cosmos.Bank,
 			app.Keepers.Akash.Market,
 		),
-
 		cert.NewAppModule(
 			app.cdc,
 			app.Keepers.Akash.Cert,
 		),
tests/e2e/deployment_grpc_test.go (1)

34-35: Consider making deployment path more flexible

The hardcoded relative path might break if tests are moved or run from different directories.

Consider using testdata embedded in the test package or making the path configurable through environment variables.

tests/upgrade/upgrade_test.go (1)

401-403: Track the temporary gas workaround

The fixed gas value is a workaround for an RPC error. This should be tracked and fixed when the underlying issue is resolved.

Would you like me to create an issue to track fixing the "auto" gas calculation RPC error?

app/sim_test.go (1)

294-299: Consider documenting why IBC host store key is commented out.

The IBC host store key comparison is commented out. If this is intentional (e.g., due to non-deterministic state), please add a comment explaining why.

-		// {
-		//	ibchost.StoreKey,
-		//	appA,
-		//	appB,
-		//	[][]byte{},
-		// },
+		// IBC host store key comparison is skipped because [reason]
+		// {
+		//	ibchost.StoreKey,
+		//	appA,
+		//	appB,
+		//	[][]byte{},
+		// },
cmd/akash/cmd/genesis.go (1)

140-141: Address TODO comments for community pool initialization.

There are TODO comments for setting initial community pool in both distribution and crisis modules. These should be addressed or tracked in an issue.

Would you like me to create an issue to track the community pool initialization or help implement it?

Also applies to: 162-163

tests/e2e/market_cli_test.go (1)

482-502: Consider adding a comment explaining the expected state.

The test correctly verifies no open orders remain, but it would be clearer with a comment explaining that orders are automatically closed when leases are created.

 // Naming as Test{number} just to run all tests sequentially
 func (s *marketIntegrationTestSuite) Test4CloseOrder() {
+	// Orders should be closed automatically when leases are created in previous tests
 	ctx := context.Background()
tests/e2e/deployment_cli_test.go (1)

314-315: Add safety check for group existence

Consider adding a check to ensure the deployment has groups before accessing them to prevent potential panics.

+s.Require().Greater(len(createdDep.Groups), 0, "Deployment should have at least one group")
 s.Require().NotEqual(0, len(createdDep.Groups))
cmd/akash/cmd/testnetify/testnetify.go (1)

54-76: Document the required argument in command help

The command now requires exactly one argument, but this isn't mentioned in the help text.

Update the example to show the required argument:

-		Example: "testnetify",
+		Example: "testnetify <chain-id>",
app/testnet.go (2)

56-60: Function signature properly updated for new architecture.

The addition of the db parameter aligns with the new store management approach. Consider passing TestnetConfig by pointer for consistency with Go conventions for struct parameters.


88-88: Consider handling iterator.Close() errors.

The pattern _ = iterator.Close() ignores potential errors. While errors from Close() are rare, it's better to handle them consistently.

-	_ = iterator.Close()
+	if err := iterator.Close(); err != nil {
+		return nil
+	}
app/types/app.go (1)

483-510: Params keeper initialization handles all required subspaces.

Note that this uses the deprecated params module (as indicated by nolint comments). Consider planning migration to the new parameter handling approach in future updates.

app/app.go (2)

390-401: Consider error handling instead of panic in lifecycle methods.

While panicking ensures the chain halts on critical errors, consider if graceful error handling might be more appropriate for some cases.


510-514: Reflection usage for chainID is a temporary workaround.

As noted in the comment, this reflection-based approach should be replaced once SDK 0.50.x provides proper access methods. Consider adding error handling for the reflection operation.

 func (app *AkashApp) ChainID() string {
 	field := reflect.ValueOf(app.BaseApp).Elem().FieldByName("chainID")
+	if !field.IsValid() {
+		return ""
+	}
 	return field.String()
 }

Comment on lines +41 to 42
runs-on: gh-runner-test
needs:
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Unknown runner label gh-runner-test

actionlint flags this label as not belonging to any GitHub-hosted runner set.
If it refers to a self-hosted runner, add it to an actionlint.yaml allow-list; otherwise switch to ubuntu-latest.

🧰 Tools
🪛 actionlint (1.7.7)

41-41: label "gh-runner-test" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2025", "windows-2022", "windows-2019", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-24.04-arm", "ubuntu-22.04", "ubuntu-22.04-arm", "ubuntu-20.04", "macos-latest", "macos-latest-xl", "macos-latest-xlarge", "macos-latest-large", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file

(runner-label)

🤖 Prompt for AI Agents
In .github/workflows/release.yaml at lines 41 to 42, the runner label
'gh-runner-test' is not recognized as a valid GitHub-hosted runner. If this is a
self-hosted runner, add 'gh-runner-test' to the allow-list in the
actionlint.yaml configuration file to prevent linting errors. Otherwise, replace
'gh-runner-test' with a valid GitHub-hosted runner label such as 'ubuntu-latest'
to ensure compatibility.

)
require.NoError(s.T(), err)
require.NoError(s.T(), s.Network().WaitForNextBlock())
_ = s.ValidateTx(result.Bytes())
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Check ValidateTx return values

The return values from ValidateTx are ignored. Consider checking them to ensure transaction validation succeeded.

-	_ = s.ValidateTx(result.Bytes())
+	txResp := s.ValidateTx(result.Bytes())
+	require.NotNil(s.T(), txResp)
+	require.Equal(s.T(), uint32(0), txResp.Code, "transaction validation failed")

Also applies to: 60-60

🤖 Prompt for AI Agents
In tests/e2e/certs_cli_test.go at lines 46 and 60, the return values from the
ValidateTx call are ignored. Update the code to capture the returned values,
typically an error or a boolean indicating success, and add appropriate checks
such as error handling or assertions to confirm that the transaction validation
succeeded. This ensures that any validation failure is detected and handled
properly in the test.

Signed-off-by: Artur Troian <[email protected]>
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: 1

♻️ Duplicate comments (3)
go.mod (3)

1-1: Module path migrated to pkg.akt.dev/node — verify no stale imports remain

Module declaration looks correct. Please ensure all imports, docs, and scripts no longer reference github.com/akash-network/node.

Run this quick scan to catch any lingering references:

#!/usr/bin/env bash
set -euo pipefail
rg -n -C2 --hidden --glob '!.git' $'github.com/akash-network/node'

3-5: Go toolchain set to 1.24.x — align CI, Docker, and dev environments

Keep GitHub Actions, Dockerfiles, and devcontainer pinned to Go 1.24.x or workflows using setup-go with 1.24.x to avoid toolchain errors.


55-77: Add replaces to switch Zondax HID/Ledger to intended forks

The module still pulls zondax/hid and zondax/ledger-go indirectly (Lines 244–246). If the intent is to use troian/hid and akash-network/ledger-go (per PR context), add replaces to enforce the forks.

Apply this diff inside the existing replace block:

@@
 	github.com/cosmos/gogoproto => github.com/akash-network/gogoproto v1.7.0-akash.2
+	// use akash fork of ledger-go
+	github.com/zondax/ledger-go => github.com/akash-network/ledger-go v0.14.3
+	// use maintained HID (darwin/arm64 fixes)
+	github.com/zondax/hid => github.com/troian/hid v0.13.2

Afterwards, run go mod tidy to drop the indirect zondax entries.

Also applies to: 244-246

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between c81cab8 and 734b5b3.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (1)
  • go.mod (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (17)
  • GitHub Check: lint-go
  • GitHub Check: network-upgrade-names
  • GitHub Check: lint-shell
  • GitHub Check: sims
  • GitHub Check: build-bins
  • GitHub Check: build-macos
  • GitHub Check: coverage
  • GitHub Check: tests
  • GitHub Check: network-upgrade-names
  • GitHub Check: release-dry-run
  • GitHub Check: sims
  • GitHub Check: lint-shell
  • GitHub Check: lint-go
  • GitHub Check: coverage
  • GitHub Check: build-macos
  • GitHub Check: build-bins
  • GitHub Check: tests
🔇 Additional comments (3)
go.mod (3)

22-25: SDK v0.53.3 + IBC-Go v10.3.0 pairing looks correct

This pairing matches the compatibility matrix for SDK v0.53.x. Good upgrade.


59-66: Replace rules to Akash forks (cometbft, cosmos-sdk, gogoproto) look consistent

The replace directives correctly point to Akash forks and versions. No action needed here.


70-72: goleveldb double-version signal — ensure the replace is the only effective one

You pin goleveldb via replace (Line 71), but also have an indirect require at a different pseudo-version (Line 234). This is usually harmless (replace wins), but it’s a smell that go.mod may be out of sync.

Please run:

  • go mod tidy
  • Verify that only the replaced version remains effective and the indirect line is not fighting the replace. If the indirect entry persists, confirm no submodule/path mismatch is at play.

Also applies to: 234-234

troian added 2 commits August 15, 2025 07:28
Signed-off-by: Artur Troian <[email protected]>
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 (5)
cmd/akash/cmd/root.go (5)

40-41: Align default home dir across CLI surfaces (cli.DefaultHome vs app.DefaultHome)

You’re mixing cli.DefaultHome here and app.DefaultHome elsewhere (e.g., PrepareBaseCmd, genesis/testnet). If these ever diverge, users can end up with split configs/keyrings. Suggest standardizing on app.DefaultHome.

Apply this diff:

-        PersistentPreRunE: cli.GetPersistentPreRunE(encodingConfig, []string{"AKASH"}, cli.DefaultHome),
+        PersistentPreRunE: cli.GetPersistentPreRunE(encodingConfig, []string{"AKASH"}, app.DefaultHome),

57-80: Graceful shutdown: wire OS signal cancellation into ExecuteWithCtx

Support Ctrl+C/SIGTERM to gracefully unwind server/CLI context. This avoids abrupt termination and aligns with typical SDK/CometBFT CLIs.

Apply this diff within ExecuteWithCtx:

 func ExecuteWithCtx(ctx context.Context, rootCmd *cobra.Command, envPrefix string) error {
+	// React to OS signals for graceful shutdown
+	ctx, stop := signal.NotifyContext(ctx, os.Interrupt, syscall.SIGTERM)
+	defer stop()
 	// Create and set a client.Context on the command's Context. During the pre-run

Add these imports:

// add to imports
"os"
"os/signal"
"syscall"

62-67: Comment typos: “AccountRetriver” and “Tendermint”

Small nits in the doc comment.

Apply this diff:

-// seed child command execution with values such as AccountRetriver, Keyring,
+// seed child command execution with values such as AccountRetriever, Keyring,
-// and a Tendermint RPC. This requires the use of a pointer reference when
+// and a CometBFT RPC. This requires the use of a pointer reference when

73-77: Define persistent logging flags during command construction, not at execution

Adding flags inside ExecuteWithCtx makes them late-bound; they may not show up in help/completions unless Execute* is invoked. Prefer defining them in NewRootCmd/initRootCmd right after rootCmd is constructed.

Apply this diff to remove late registration:

-	rootCmd.PersistentFlags().String(cflags.FlagLogLevel, zerolog.InfoLevel.String(), "The logging level (trace|debug|info|warn|error|fatal|panic)")
-	rootCmd.PersistentFlags().String(cflags.FlagLogFormat, cmtcfg.LogFormatPlain, "The logging format (json|plain)")
-	rootCmd.PersistentFlags().Bool(cflags.FlagLogColor, false, "Pretty logging output. Applied only when log_format=plain")
-	rootCmd.PersistentFlags().String(cflags.FlagLogTimestamp, "", "Add timestamp prefix to the logs (rfc3339|rfc3339nano|kitchen)")

Then, add this snippet in NewRootCmd after rootCmd is created (before returning):

rootCmd.PersistentFlags().String(cflags.FlagLogLevel, zerolog.InfoLevel.String(), "The logging level (trace|debug|info|warn|error|fatal|panic)")
rootCmd.PersistentFlags().String(cflags.FlagLogFormat, cmtcfg.LogFormatPlain, "The logging format (json|plain)")
rootCmd.PersistentFlags().Bool(cflags.FlagLogColor, false, "Pretty logging output. Applied only when log_format=plain")
rootCmd.PersistentFlags().String(cflags.FlagLogTimestamp, "", "Add timestamp prefix to the logs (rfc3339|rfc3339nano|kitchen)")

85-86: Consistently use the local ‘home’ var

Minor readability/consistency nit: you define home := app.DefaultHome; use it everywhere you pass a home path.

Apply this diff:

-		PrepareGenesisCmd(app.DefaultHome, app.ModuleBasics()),
+		PrepareGenesisCmd(home, app.ModuleBasics()),

Also applies to: 104-105

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 734b5b3 and 359e5e1.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (2)
  • cmd/akash/cmd/root.go (3 hunks)
  • go.mod (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • go.mod
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: release-dry-run
  • GitHub Check: build-bins
  • GitHub Check: build-bins
  • GitHub Check: release-dry-run
🔇 Additional comments (4)
cmd/akash/cmd/root.go (4)

31-34: Solid move to sdkutil encoding config and explicit interface registration

Returning the EncodingConfig and registering interfaces on the InterfaceRegistry here is clean and sets a consistent codec surface for downstream commands. LGTM.


82-109: Command graph modernization looks good

Good integration of sdkserver status/start/export, pruning/snapshot, testnet, and migration to new CLI surfaces (events/query/tx/keys). Rosetta wiring with the new codec is correct.


115-116: Confirm continued need for crisis.AddModuleInitFlags

In SDK v0.50, some module init flags are deprecated/no-ops. If this only silences staticcheck but isn’t functionally needed, consider removing it to reduce noise. If still required by your node ops/docs, keep as-is.


118-131: Check for duplicate “add-genesis-account” inside the genesis command

If cli.GetGenesisCmd already injects AddGenesisAccount, adding it again here will register the subcommand twice (runtime error). Please verify what cli.GetGenesisCmd includes.

If duplication is present, remove the explicit addition:

-	cmd.AddCommand(AddGenesisAccountCmd(home))

Signed-off-by: Artur Troian <[email protected]>
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

♻️ Duplicate comments (4)
go.mod (4)

1-5: Align CI/Docker/dev env to Go 1.24.x

You’re using the toolchain directive. Ensure workflows, Dockerfiles, and devcontainers pin Go 1.24.x to avoid toolchain errors on older runners.

Run to spot mismatches:

#!/usr/bin/env bash
set -euo pipefail

echo "GitHub Actions setup-go versions:"
fd -t f .github/workflows | xargs -r rg -n "actions/setup-go|go-version|go-version-file" -A2 || true

echo
echo "Dockerfiles referencing golang base image:"
fd -t f Dockerfile . | xargs -r rg -n "FROM golang" || true

echo
echo "Devcontainer and Make/Task GO_VERSION hints:"
fd -t f 'devcontainer.json|Makefile|Taskfile*' . | xargs -r rg -n "golang|GO_VERSION|toolchain|1\.24" || true

1-1: Update lingering imports to new module path

Ensure all Go imports, docs, and scripts have moved from github.com/akash-network/node to pkg.akt.dev/node to avoid build/test breakage.

Run:

#!/usr/bin/env bash
set -euo pipefail
rg -n --hidden --glob '!.git' 'github.com/akash-network/node' -C2 || echo "No old module path references found"

244-246: Switch Zondax HID/Ledger to intended forks via replace

go.mod still pulls github.com/zondax/hid and github.com/zondax/ledger-go indirectly. If the intent is to use troian/hid and akash-network/ledger-go, add replaces so the graph resolves to the forks.

Apply this diff within the existing replace block:

@@
 	github.com/cosmos/gogoproto => github.com/akash-network/gogoproto v1.7.0-akash.2
+	// use akash fork of ledger-go
+	github.com/zondax/ledger-go => github.com/akash-network/ledger-go v0.14.3
+	// use maintained HID (darwin/arm64 fixes)
+	github.com/zondax/hid       => github.com/troian/hid             v0.13.2
@@

Then:

  • go mod tidy (old indirect Zondax lines should disappear)

73-76: Stale replace pins for x/exp and rapid conflict with indirect graph — remove them

These replaces lock old versions (2023 x/exp; rapid v0.5.5) while the graph requires newer ones (x/exp 2025; rapid v1.2.0). This can cause API/ABI mismatches under SDK 0.53.x.

Apply this diff:

@@
-	// stick with compatible version or x/exp in v0.47.x line
-	golang.org/x/exp => golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb
-	// stick with compatible version of rapid in v0.47.x line
-	pgregory.net/rapid => pgregory.net/rapid v0.5.5

Afterward:

  • run go mod tidy
  • verify resolved versions:
    • go mod graph | rg -nP 'golang\.org/x/exp|pgregory\.net/rapid'
🧹 Nitpick comments (4)
go.mod (1)

32-32: Tool-only dependency: consider scoping cgosymbolizer to tools

If github.com/ianlancetaylor/cgosymbolizer is used only for developer tooling, consider moving it under a tools.go with //go:build tools to keep the main module lean.

client/client.go (3)

25-31: Tighten type assertion and error message (avoid misleading expected type output)

When the type assertion fails, reflect.TypeOf(cl) is nil (cl is the zero-value of an interface), so the error prints an unhelpful “%!s()” for the expected type. Use a temporary variable for the assertion and report the expected type explicitly.

Apply this diff within this block:

-    var valid bool
- 
-    if cl, valid = i.(v1beta3.QueryClient); !valid {
-      return fmt.Errorf("%w: expected %s, actual %s", ErrInvalidClient, reflect.TypeOf(cl), reflect.TypeOf(i))
-    }
+    q, ok := i.(v1beta3.QueryClient)
+    if !ok {
+      return fmt.Errorf("%w: expected v1beta3.QueryClient, actual %T", ErrInvalidClient, i)
+    }
+    cl = q

Additionally, if you adopt this change, remove the now-unused reflect import:

 import (
   "context"
   "errors"
   "fmt"
-  "reflect"

45-51: Mirror the improved type assertion/error message for Client discovery

Same issue/pattern as in DiscoverQueryClient. Using a temporary variable improves clarity and avoids the nil expected type formatting.

-  var valid bool
-
-  if cl, valid = i.(v1beta3.Client); !valid {
-    return fmt.Errorf("%w: expected %s, actual %s", ErrInvalidClient, reflect.TypeOf(cl), reflect.TypeOf(i))
-  }
+  c, ok := i.(v1beta3.Client)
+  if !ok {
+    return fmt.Errorf("%w: expected v1beta3.Client, actual %T", ErrInvalidClient, i)
+  }
+  cl = c

Note: With both refactors, the reflect import becomes unused and should be removed (see the import tweak in the previous comment).


65-67: Hardcoded ApiVersion string: consider a local constant to avoid drift

Using a literal "v1beta3" works, but a file-level constant (e.g., const defaultAPIVersion = "v1beta3") reduces the chance of future drift and eases upgrades. The pointer-to-value change for ClientInfo matches the broader migration and looks good.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between be9e091 and 2aa9091.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (2)
  • client/client.go (3 hunks)
  • go.mod (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (16)
  • GitHub Check: lint-go
  • GitHub Check: release-dry-run
  • GitHub Check: network-upgrade-names
  • GitHub Check: sims
  • GitHub Check: lint-shell
  • GitHub Check: tests
  • GitHub Check: coverage
  • GitHub Check: build-macos
  • GitHub Check: build-bins
  • GitHub Check: lint-go
  • GitHub Check: tests
  • GitHub Check: network-upgrade-names
  • GitHub Check: coverage
  • GitHub Check: release-dry-run
  • GitHub Check: sims
  • GitHub Check: build-bins
🔇 Additional comments (5)
go.mod (4)

1-5: Module path and Go toolchain look correct

module pkg.akt.dev/node, go 1.24.3, and toolchain go1.24.4 are consistent with the PR’s migration goals.


22-25: IBC-Go v10 matches Cosmos SDK v0.53.x

github.com/cosmos/ibc-go/v10 v10.3.0 is the correct line for SDK v0.53.x. Good alignment.


59-65: Akash forks pinned correctly via replace

CometBFT, Cosmos SDK, and gogoproto replaces point to Akash-maintained forks with expected versions. This is the right approach for the migration.


50-52: Remove unused pkg.akt.dev/go/sdl from go.mod

No imports (direct or aliased) of pkg.akt.dev/go/sdl were found in the codebase. To clean up unused dependencies, please drop the following line from your go.mod:

-	pkg.akt.dev/go/sdl v0.0.2-rc5

Also, run go mod tidy afterward to ensure your module files are up to date. [optional_refactors_recommended]

client/client.go (1)

11-16: CometBFT and pkg.akt.dev import migration looks correct

The import path updates align with the SDK v0.50/CometBFT migration and the new pkg.akt.dev module layout. No issues spotted here.

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

♻️ Duplicate comments (4)
go.mod (3)

1-1: Module path migrated — sweep remaining references to old path.

The module is now pkg.akt.dev/node. Please ensure docs, scripts, CI templates, Dockerfiles, and all Go imports no longer reference github.com/akash-network/node.

Run to locate stragglers:

#!/usr/bin/env bash
rg -n --hidden --glob '!.git' -C2 $'github.com/akash-network/node|module github.com/akash-network/node'

3-5: Go/toolchain 1.24.x — align CI, Docker, and dev tooling.

With go 1.24.3 and toolchain go1.24.4, older builders will fail. Pin Actions, Docker bases, and devcontainer to 1.24.x.

#!/usr/bin/env bash
fd -t f .github/workflows | xargs -r rg -n "actions/setup-go|go-version|go-version-file" -A1
fd -t f Dockerfile . | xargs -r rg -n "FROM golang"
fd -t f 'devcontainer.json|Makefile|Taskfile*' . | xargs -r rg -n "golang|GO_VERSION|toolchain"

244-246: Replace Zondax HID/Ledger with intended forks to match platform support.

Zondax modules are still pulled indirectly. If the PR intends to use troian/hid (darwin/arm64 fixes) and akash-network/ledger-go, add replaces. This prevents accidental reintroduction of the Zondax implementations.

Apply in the existing replace block:

@@
     github.com/cosmos/gogoproto => github.com/akash-network/gogoproto v1.7.0-akash.2
+    // use akash fork of ledger-go
+    github.com/zondax/ledger-go => github.com/akash-network/ledger-go v0.14.3
+    // use maintained HID (darwin/arm64 fixes)
+    github.com/zondax/hid       => github.com/troian/hid             v0.13.2

Then:

go mod tidy
rg -n "zondax/(hid|ledger-go)" go.mod || true
app/sim_test.go (1)

37-39: Fix IBC host import: use core/24-host for StoreKey/ModuleName

The IBC host constants (e.g., StoreKey) are defined under core/24-host, not core/exported. This will fail to compile as-is.

Apply:

-	ibchost "github.com/cosmos/ibc-go/v10/modules/core/exported"
+	ibchost "github.com/cosmos/ibc-go/v10/modules/core/24-host"
🧹 Nitpick comments (7)
go.mod (1)

70-71: Goleveldb pinned via replace but a different version is listed indirectly — normalize.

You replace goleveldb to v1.0.1-0.20210819… but an indirect require lists v1.0.1-0.20220721… The replace will win, but the mismatch is confusing. Either:

  • drop the indirect require so the replace governs, or
  • update the replace to the newer pseudo-version if that’s the intended pin.

Suggested cleanup:

# prefer: keep the replace, let tidy remove the indirect require
go mod tidy
rg -n "github.com/syndtr/goleveldb" go.mod

Also applies to: 234-234

app/sim_test.go (6)

126-126: Use the AppName constant for consistency

Prefer the constant over a string literal.

-	require.Equal(t, "akash", app1.Name())
+	require.Equal(t, akash.AppName, app1.Name())

129-131: Prefer test logger over fmt.Printf for test output

Switch to t.Logf to keep output scoped to the test and respect -v.

-	fmt.Printf("config--------\n%v", config)
+	t.Logf("config--------\n%v", config)

203-205: Create deliver (non-checkTx) contexts for store comparisons

NewContext(true) creates a checkTx context. It’s harmless for reads but typically we use NewContext(false) for deliver/committed state inspection during import/export checks.

-	ctxA := appA.NewContext(true)
-	ctxB := appB.NewContext(true)
+	ctxA := appA.NewContext(false)
+	ctxB := appB.NewContext(false)

371-380: Tighten assertion and simplify failure path

Use require.Empty so the test stops at the first mismatch and surfaces the simulation log. The explicit FailNow and per-KV logging become unnecessary.

-		if !assert.Equal(t, 0, len(failedKVAs), simtestutil.GetSimulationLog(skp.Key, appA.SimulationManager().StoreDecoders, failedKVAs, failedKVBs)) {
-			for _, v := range failedKVAs {
-				t.Logf("store mismatch: %q\n", v)
-			}
-			t.FailNow()
-		}
+		require.Empty(t, failedKVAs, simtestutil.GetSimulationLog(skp.Key, appA.SimulationManager().StoreDecoders, failedKVAs, failedKVBs))

214-362: De-risk store list drift by centralizing store coverage

The explicit StoreKeysPrefixes slice is comprehensive but brittle. Any future module key changes or additions can silently reduce coverage.

Suggestions:

  • Generate this list from app.ModuleManager().Modules() + known store keys, skipping well-known prefixes where needed.
  • Or centralize the slice in a shared helper (e.g., testutil/sims) so other tests reuse it.

I can draft a helper that introspects keepers and returns the slice to keep this in sync—want me to push one?


100-118: Factor repeated app/encoding/appOpts setup into a small helper

The encodingConfig + ModuleBasics().RegisterInterfaces + viper appOpts (home + genesis time) block is duplicated across tests.

Sketch:

// in this file (test-only)
func makeEncodingAndOpts(seed int64) (sdkutil.EncodingConfig, servertypes.AppOptions) {
	enc := sdkutil.MakeEncodingConfig()
	akash.ModuleBasics().RegisterInterfaces(enc.InterfaceRegistry)

	opts := viper.New()
	opts.Set("home", akash.DefaultHome)
	r := rand.New(rand.NewSource(seed)) //nolint:gosec
	opts.Set("GenesisTime", sdksim.RandTimestamp(r))
	return enc, opts
}

Then call makeEncodingAndOpts(config.Seed) where needed.

Also applies to: 154-167, 397-410, 487-495

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 2aa9091 and 291ff5d.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (3)
  • app/modules.go (1 hunks)
  • app/sim_test.go (5 hunks)
  • go.mod (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • app/modules.go
🧰 Additional context used
🧬 Code graph analysis (1)
app/sim_test.go (3)
app/app.go (4)
  • AkashApp (92-102)
  • DefaultHome (82-82)
  • NewApp (105-262)
  • AppName (78-78)
app/genesis.go (2)
  • NewDefaultGenesisState (61-64)
  • GenesisState (30-30)
testutil/sims/simulation_helpers.go (6)
  • BuildSimulationOperations (62-85)
  • SetupSimulation (28-51)
  • CheckExportSimulation (89-114)
  • PrintStats (117-121)
  • DiffKVStores (145-179)
  • GetSimulationLog (125-141)
🪛 OSV Scanner (2.1.0)
go.mod

[HIGH] 177-177: github.com/hashicorp/go-getter 1.7.8: HashiCorp go-getter Vulnerable to Symlink Attacks

(GHSA-wjrx-6529-hcj3)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (14)
  • GitHub Check: lint-shell
  • GitHub Check: coverage
  • GitHub Check: tests
  • GitHub Check: build-macos
  • GitHub Check: build-bins
  • GitHub Check: network-upgrade-names
  • GitHub Check: release-dry-run
  • GitHub Check: lint-go
  • GitHub Check: sims
  • GitHub Check: lint-shell
  • GitHub Check: tests
  • GitHub Check: build-bins
  • GitHub Check: coverage
  • GitHub Check: build-macos
🔇 Additional comments (5)
go.mod (2)

20-26: Consensus/SDK/IBC versions look consistent.

  • Require cometbft v0.38.17 with replace to akash v0.38.17-akash.2.
  • Require cosmos-sdk v0.53.3 with replace to akash v0.53.4-akash.0.
  • ibc-go v10.3.0 aligns with SDK v0.53.x.

Also applies to: 60-65


24-24: ibc-go v10.3.0 with SDK v0.53.x — looks correct.

Compatibility matrix matches the v10 line with SDK v0.53.x. No action needed.

app/sim_test.go (3)

69-72: Good: simulator flags are wired in init()

Ensures CLI flags are registered before tests run.


85-97: Good: simulation wiring matches SDK v0.50 style

AppStateFn, RandomAccounts, operations builder, and ModuleAccountAddrs are correctly passed to SimulateFromSeed.


447-452: InitChain usage looks correct

Passing exported.AppState and the chain ID via RequestInitChain is aligned with the rest of the test setup.

Comment on lines +155 to +165

akash.ModuleBasics().RegisterInterfaces(encodingConfig.InterfaceRegistry)

appOpts := viper.New()
appOpts.Set("home", akash.DefaultHome)

r := rand.New(rand.NewSource(config.Seed)) // nolint: gosec
genTime := sdksim.RandTimestamp(r)

appOpts.Set("GenesisTime", genTime)

Copy link

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Confirm that "GenesisTime" is actually consumed

The tests set appOpts["GenesisTime"], which is great for determinism—assuming NewApp reads it. Let’s verify.


🏁 Script executed:

#!/bin/bash
# Verify the application reads GenesisTime from app options.
rg -n -C2 -P '\bGenesis(Time|Timestamp)\b|\b("|\`)GenesisTime("|\`)\b' app app/** testutil/** pkg/** -g '!**/vendor/**'

Length of output: 5908


🏁 Script executed:

#!/bin/bash
# Search for getGenesisTime usage across the repository
rg -n "getGenesisTime" -C3 .

Length of output: 384


Critical: “GenesisTime” option isn’t actually applied in NewApp

After inspecting the code, the helper getGenesisTime(appOpts, homePath) is defined but never called—so any value set via appOpts.Set("GenesisTime", …) is ignored and the app always falls back to genDoc.GenesisTime. To fix this, you need to integrate getGenesisTime into NewApp (in app/app.go) so that it uses the supplied option rather than the default.

Files requiring updates:

  • app/app.go
  • Tests in app/sim_test.go (where GenesisTime is set)

Suggested change in app/app.go (inside NewApp, replacing the hardcoded genDoc.GenesisTime):

   // after loading or building the genesis document:
-  return genDoc.GenesisTime
+  // respect custom GenesisTime if provided via appOpts
+  return getGenesisTime(appOpts, homePath)

Please apply this change so that the “GenesisTime” test option is actually consumed.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
akash.ModuleBasics().RegisterInterfaces(encodingConfig.InterfaceRegistry)
appOpts := viper.New()
appOpts.Set("home", akash.DefaultHome)
r := rand.New(rand.NewSource(config.Seed)) // nolint: gosec
genTime := sdksim.RandTimestamp(r)
appOpts.Set("GenesisTime", genTime)
// after loading or building the genesis document:
// respect custom GenesisTime if provided via appOpts
return getGenesisTime(appOpts, homePath)

Comment on lines +300 to +304
appA,
appB,
[][]byte{},
},
{
ibctransfertypes.StoreKey,
Copy link

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Heads-up: after fixing ibchost import, store key references resolve

Once ibchost points to core/24-host, ibchost.StoreKey here will compile and your store comparison will include IBC core state as intended.


🏁 Script executed:

#!/bin/bash
# Sanity: ensure no remaining imports use core/exported for ibchost.
rg -n 'ibc-go/.*/core/exported' -C1

Length of output: 934


Update all ibchost imports to use the new core/24-host path

I still see that several files import ibchost (and ibcexported) from the old modules/core/exported package. Those must be updated to the new modules/core/24-host path so that ibchost.StoreKey (and other host-specific APIs) resolve correctly:

app/sim_test.go:38
app/app.go:59
app/types/app.go:56 (alias ibcexported)
app/app_configure.go:22

For each occurrence, replace:

-import ibchost "github.com/cosmos/ibc-go/v10/modules/core/exported"
+import ibchost "github.com/cosmos/ibc-go/v10/modules/core/24-host"

(or for ibcexported, update the alias name if needed). Once all imports point to core/24-host, ibchost.StoreKey will compile and your store comparison will include the IBC core state as intended.

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In app/sim_test.go around lines 299-304, update the ibchost import to use the
new modules/core/24-host path so ibchost.StoreKey resolves; likewise update all
other occurrences listed in the review (app/sim_test.go:38, app/app.go:59,
app/types/app.go:56 where ibcexported is aliased, and app/app_configure.go:22)
to import from modules/core/24-host (and adjust the ibcexported alias import to
point to the new core/24-host exported package if needed), rebuild to ensure
ibchost.StoreKey and related host APIs compile and the store comparison includes
IBC core state.

Comment on lines +480 to 481
logger = log.NewTestLogger(&testing.T{})
} else {
logger = log.NewNopLogger()
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Pass the current test’s T to NewTestLogger (don’t construct a fresh testing.T)

Using &testing.T{} is incorrect and may cause odd logging behavior or panics when verbose mode is enabled. Pass the function’s t instead.

-			if sim.FlagVerboseValue {
-				logger = log.NewTestLogger(&testing.T{})
-			} else {
+			if sim.FlagVerboseValue {
+				logger = log.NewTestLogger(t)
+			} else {
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
if sim.FlagVerboseValue {
logger = log.NewTestLogger(&testing.T{})
} else {
if sim.FlagVerboseValue {
logger = log.NewTestLogger(t)
} else {
🤖 Prompt for AI Agents
In app/sim_test.go around lines 479 to 481, the code constructs a new testing.T
with &testing.T{} when creating the test logger which is incorrect; change it to
pass the current test variable (t) into log.NewTestLogger instead of
constructing a fresh testing.T. Replace the NewTestLogger call to use the
existing t parameter so verbose logging uses the real test context.

Comment on lines +73 to +76
// stick with compatible version or x/exp in v0.47.x line
golang.org/x/exp => golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb
// stick with compatible version of rapid in v0.47.x line
pgregory.net/rapid => pgregory.net/rapid v0.5.5
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Conflicting replace pins vs indirect graph (x/exp, rapid) — drop stale replaces.

You pin very old versions:

  • golang.org/x/exp → 2023-07 commit
  • pgregory.net/rapid → v0.5.5

But the graph also requires newer: x/exp 2025-03… and rapid v1.2.0. These replaces can cause API mismatches under SDK 0.53.x. Remove the pins so the solver selects the correct versions.

Apply this diff to the replace block:

@@
-    // stick with compatible version or x/exp in v0.47.x line
-    golang.org/x/exp => golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb
-    // stick with compatible version of rapid in v0.47.x line
-    pgregory.net/rapid => pgregory.net/rapid v0.5.5

Then run:

go mod tidy
go mod graph | rg -nP 'golang\.org/x/exp|pgregory\.net/rapid'

Also applies to: 261-261, 279-279

🤖 Prompt for AI Agents
In go.mod around lines 73-76 (and also check lines 261 and 279), there are stale
replace directives pinning golang.org/x/exp and pgregory.net/rapid to old
versions; remove those replace lines so the module solver can pick compatible
newer versions, then run "go mod tidy" and verify with "go mod graph | rg -nP
'golang\.org/x/exp|pgregory\.net/rapid'". Ensure you delete only the explicit
replace entries for these two modules and not other required replaces, commit
the updated go.mod and go.sum after tidy.

google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 // indirect
google.golang.org/protobuf v1.35.1 // indirect
go.yaml.in/yaml/v2 v2.4.2 // indirect
golang.org/x/arch v0.15.0 // indirect
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Invalid module path: go.yaml.in/yaml/v2 — should be gopkg.in/yaml.v2; duplication present.

Line 258 declares go.yaml.in/yaml/v2, which is not a valid module path, and you already have gopkg.in/yaml.v2 at Line 273. This will break go mod tidy.

Apply this diff to remove the bad entry:

-    go.yaml.in/yaml/v2 v2.4.2 // indirect

After removal:

go mod tidy

Also applies to: 273-273

🤖 Prompt for AI Agents
In go.mod around line 258 (and duplicate at 273), the module path
"go.yaml.in/yaml/v2" is invalid and duplicates the correct "gopkg.in/yaml.v2";
remove the erroneous line at 258 (and ensure no duplicate incorrect entry at
273), keep the correct gopkg.in/yaml.v2 entry, then run `go mod tidy` to clean
up and regenerate the module graph.

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

♻️ Duplicate comments (6)
go.mod (6)

1-1: Module path migrated to pkg.akt.dev/node — verify no stale imports remain

Good change. Please sweep the repo for lingering github.com/akash-network/node references in code, docs, build scripts, and CI templates to avoid build/test breakages.

Run:

#!/usr/bin/env bash
# Find any stale imports/URLs to the old module path
rg -n --hidden --glob '!.git' $'github.com/akash-network/node'

3-5: Go 1.24.x directive + toolchain — align CI, Docker, and devcontainer

go 1.24.3 with toolchain go1.24.4 requires builders using Go 1.24.x. Pin your workflows and base images accordingly to avoid toolchain errors.

Suggested pins:

  • GitHub Actions: actions/setup-go with go-version: '1.24.x'
  • Docker: FROM golang:1.24-alpine (or appropriate variant)

Quick check:

#!/usr/bin/env bash
fd -t f .github/workflows | xargs -r rg -n "actions/setup-go|go-version|go-version-file" -A2
fd -t f Dockerfile . | xargs -r rg -n "FROM golang"
fd -t f 'devcontainer.json|Makefile|Taskfile*' . | xargs -r rg -n "golang|GO_VERSION|toolchain|1\.24"

73-76: Stale replace pins conflict with newer indirects (x/exp, rapid) — remove to avoid API/version mismatches

You pin:

  • golang.org/x/exp to a 2023 commit via replace, while the graph pulls a 2025 commit.
  • pgregory.net/rapid to v0.5.5 via replace, while the graph pulls v1.2.0.

This can force older APIs into transitive deps and break builds.

Remove these replaces:

-	// stick with compatible version or x/exp in v0.47.x line
-	golang.org/x/exp => golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb
-	// stick with compatible version of rapid in v0.47.x line
-	pgregory.net/rapid => pgregory.net/rapid v0.5.5

Then:

go mod tidy
go mod graph | rg -nP 'golang\.org/x/exp|pgregory\.net/rapid'

Also applies to: 261-261, 279-279


258-258: Invalid module path: go.yaml.in/yaml/v2 (duplicate of gopkg.in/yaml.v2) — remove

go.yaml.in/yaml/v2 is not a valid module path and duplicates gopkg.in/yaml.v2. This will break go mod tidy.

-	go.yaml.in/yaml/v2 v2.4.2 // indirect

After removal:

go mod tidy

Also applies to: 273-273


244-246: Intended HID/Ledger forks not enforced; add replace directives to stop pulling Zondax originals

You still pull github.com/zondax/hid and github.com/zondax/ledger-go indirectly. If you intend to use troian/hid and akash-network/ledger-go, wire them via replace so all transitive imports resolve to the forks (important for darwin/arm64 HID and Ledger fixes).

Add to the existing replace block:

@@
 	github.com/cosmos/gogoproto => github.com/akash-network/gogoproto v1.7.0-akash.2
+	// use akash fork of ledger-go
+	github.com/zondax/ledger-go => github.com/akash-network/ledger-go v0.14.3
+	// use maintained HID (darwin/arm64 fixes)
+	github.com/zondax/hid       => github.com/troian/hid             v0.13.2

Then:

go mod tidy
rg -n 'zondax/(hid|ledger-go)' go.mod || echo "Zondax forks no longer referenced"

Note: github.com/cosmos/ledger-cosmos-go v0.14.0 typically imports zondax/ledger-go; the replace ensures that path resolves to the akash fork consistently.

Also applies to: 59-76


177-177: Vulnerability: github.com/hashicorp/go-getter v1.7.8 (GHSA-wjrx-6529-hcj3) — bump to v1.7.9

Known symlink attack vuln in 1.7.8; fixed in 1.7.9. Please upgrade.

-	github.com/hashicorp/go-getter v1.7.8 // indirect
+	github.com/hashicorp/go-getter v1.7.9 // indirect

Then:

go get github.com/hashicorp/[email protected]
go mod tidy
🧹 Nitpick comments (1)
go.mod (1)

22-22: Nit: align required Cosmos SDK version with the replace target for clarity

You require github.com/cosmos/cosmos-sdk v0.53.3 but replace to akash-network/cosmos-sdk v0.53.4-akash.0. Functionally fine (replace wins), but aligning the require version reduces confusion for tools and humans.

-	github.com/cosmos/cosmos-sdk v0.53.3
+	github.com/cosmos/cosmos-sdk v0.53.4

Also applies to: 62-62

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 291ff5d and 595df1b.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (1)
  • go.mod (1 hunks)
🧰 Additional context used
🪛 OSV Scanner (2.1.0)
go.mod

[HIGH] 177-177: github.com/hashicorp/go-getter 1.7.8: HashiCorp go-getter Vulnerable to Symlink Attacks

(GHSA-wjrx-6529-hcj3)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (10)
  • GitHub Check: lint-shell
  • GitHub Check: coverage
  • GitHub Check: build-macos
  • GitHub Check: lint-shell
  • GitHub Check: build-macos
  • GitHub Check: tests
  • GitHub Check: sims
  • GitHub Check: build-bins
  • GitHub Check: coverage
  • GitHub Check: lint-go
🔇 Additional comments (3)
go.mod (3)

24-24: IBC-Go v10.x with SDK v0.53.x — correct compatibility pairing

github.com/cosmos/ibc-go/v10 v10.3.0 is the right major line for Cosmos SDK v0.53.x. Nice.


59-65: Akash forks (cometbft/cosmos-sdk/gogoproto) wired correctly

Replace directives for CometBFT, Cosmos SDK, and gogoproto are consistent and documented.


20-21: CometBFT upstream require + Akash replace — consistent versions

cometbft v0.38.17 replaced by akash-network/cometbft v0.38.17-akash.2 looks consistent.

Also applies to: 60-60

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

♻️ Duplicate comments (6)
go.mod (6)

3-5: Pin CI, Docker and dev tooling to Go 1.24.x to satisfy go/toolchain.

Your module requires go 1.24.3 and toolchain go1.24.4. Ensure all builders use 1.24.x or toolchain will error.

Run to audit configs:

#!/usr/bin/env bash
fd -t f .github/workflows | xargs -r rg -n "actions/setup-go|go-version|go-version-file" -A2
fd -t f 'Dockerfile*|devcontainer.json|Makefile|Taskfile*' | xargs -r rg -n "FROM golang|GO_VERSION|toolchain|1\.24"

1-1: Module path migrated to pkg.akt.dev/node — scrub old imports and URLs repo-wide.

Ensure no lingering github.com/akash-network/node imports/links remain in code, docs, CI, or Dockerfiles.

#!/usr/bin/env bash
rg -n --hidden --glob '!.git' $'github.com/akash-network/node|module github.com/akash-network/node'

Also applies to: 50-52


73-76: Drop stale replace pins for x/exp and rapid; they conflict with the graph (build risk).

You pin golang.org/x/exp to a 2023 commit and rapid to v0.5.5 while the graph pulls newer versions (x/exp 2025-03…, rapid v1.2.0). These replaces can force API mismatches under SDK 0.53.x.

Apply:

@@
-	// stick with compatible version or x/exp in v0.47.x line
-	golang.org/x/exp => golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb
-	// stick with compatible version of rapid in v0.47.x line
-	pgregory.net/rapid => pgregory.net/rapid v0.5.5

Then:

go mod tidy

Also applies to: 261-261, 279-279


244-246: Replace Zondax HID/Ledger with intended forks to avoid darwin/arm64 and transport issues.

github.com/zondax/hid v0.9.2 and github.com/zondax/ledger-go v0.14.3 still resolve indirectly. If the plan is to use troian/hid and akash-network/ledger-go, add replaces so the graph stops pulling Zondax.

@@
 replace (
@@
 	github.com/cosmos/gogoproto => github.com/akash-network/gogoproto v1.7.0-akash.2
+	// use akash fork of ledger-go
+	github.com/zondax/ledger-go => github.com/akash-network/ledger-go v0.14.3
+	// use maintained HID (darwin/arm64 fixes)
+	github.com/zondax/hid => github.com/troian/hid v0.13.2
@@
 )

Then:

go mod tidy

Also applies to: 59-66


177-177: Vulnerability: hashicorp/go-getter v1.7.8 — bump to v1.7.9 (symlink attack fix).

Known GHSA-wjrx-6529-hcj3 affects 1.7.8; fixed in 1.7.9.

-	github.com/hashicorp/go-getter v1.7.8 // indirect
+	github.com/hashicorp/go-getter v1.7.9 // indirect

Follow with:

go get github.com/hashicorp/[email protected]
go mod tidy

258-258: Invalid module path: go.yaml.in/yaml/v2 — remove (duplicates gopkg.in/yaml.v2).

go.yaml.in/yaml/v2 is not a valid module path and will break go mod tidy. You already have gopkg.in/yaml.v2 v2.4.0.

-	go.yaml.in/yaml/v2 v2.4.2 // indirect

Then:

go mod tidy

Also applies to: 273-273

🧹 Nitpick comments (5)
cmd/akash/cmd/root.go (5)

62-67: Typos and updated terminology in comment.

Fix minor typos and update Tendermint → CometBFT for consistency with imports.

Apply this diff:

- // seed child command execution with values such as AccountRetriver, Keyring,
- // and a Tendermint RPC. This requires the use of a pointer reference when
+ // seed child command execution with values such as AccountRetriever, Keyring,
+ // and a CometBFT RPC. This requires the use of a pointer reference when

73-77: Avoid flag redefinition risk: don’t add flags inside Execute path.

Defining persistent flags inside ExecuteWithCtx can cause “flag redefined” errors if the function is called more than once with the same rootCmd (tests, embedding, or multiple runs). Define these flags during command construction (initRootCmd) instead.

Apply this diff to remove here:

-    rootCmd.PersistentFlags().String(cflags.FlagLogLevel, zerolog.InfoLevel.String(), "The logging level (trace|debug|info|warn|error|fatal|panic)")
-    rootCmd.PersistentFlags().String(cflags.FlagLogFormat, cmtcfg.LogFormatPlain, "The logging format (json|plain)")
-    rootCmd.PersistentFlags().Bool(cflags.FlagLogColor, false, "Pretty logging output. Applied only when log_format=plain")
-    rootCmd.PersistentFlags().String(cflags.FlagLogTimestamp, "", "Add timestamp prefix to the logs (rfc3339|rfc3339nano|kitchen)")

Then add them in initRootCmd (see next comment).


82-109: Define logging flags at construction time (initRootCmd).

Move the logging flags here to avoid late mutations and duplicate registration risk. This keeps all flag wiring in one place.

Apply this diff:

 func initRootCmd(rootCmd *cobra.Command, encodingConfig sdkutil.EncodingConfig) {
     ac := appCreator{encodingConfig}

     home := app.DefaultHome

+    // Logging flags (define during construction to avoid redefinition on repeated executes)
+    pf := rootCmd.PersistentFlags()
+    if pf.Lookup(cflags.FlagLogLevel) == nil {
+        pf.String(cflags.FlagLogLevel, zerolog.InfoLevel.String(), "The logging level (trace|debug|info|warn|error|fatal|panic)")
+    }
+    if pf.Lookup(cflags.FlagLogFormat) == nil {
+        pf.String(cflags.FlagLogFormat, cmtcfg.LogFormatPlain, "The logging format (json|plain)")
+    }
+    if pf.Lookup(cflags.FlagLogColor) == nil {
+        pf.Bool(cflags.FlagLogColor, false, "Pretty logging output. Applied only when log_format=plain")
+    }
+    if pf.Lookup(cflags.FlagLogTimestamp) == nil {
+        pf.String(cflags.FlagLogTimestamp, "", "Add timestamp prefix to the logs (rfc3339|rfc3339nano|kitchen)")
+    }
+
     debugCmd := debug.Cmd()

100-106: Use the local ‘home’ var consistently.

You define home := app.DefaultHome above; use it here to avoid drift if DefaultHome ever changes.

Apply this diff:

-        PrepareGenesisCmd(app.DefaultHome, app.ModuleBasics()),
+        PrepareGenesisCmd(home, app.ModuleBasics()),

118-131: Minor consistency: reuse local ‘home’ in genesisCommand.

You compute home := app.DefaultHome and still pass app.DefaultHome directly. Use the local variable consistently.

Apply this diff:

-    cmd := cli.GetGenesisCmd(app.ModuleBasics(), encodingConfig.TxConfig, app.DefaultHome, encodingConfig.SigningOptions.ValidatorAddressCodec)
+    cmd := cli.GetGenesisCmd(app.ModuleBasics(), encodingConfig.TxConfig, home, encodingConfig.SigningOptions.ValidatorAddressCodec)
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 595df1b and 90e8fdc.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (2)
  • cmd/akash/cmd/root.go (3 hunks)
  • go.mod (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
cmd/akash/cmd/root.go (5)
app/config.go (1)
  • ModuleBasics (70-72)
app/app.go (1)
  • DefaultHome (82-82)
cmd/akash/cmd/bech32.go (1)
  • ConvertBech32Cmd (12-47)
cmd/akash/cmd/genesis.go (1)
  • PrepareGenesisCmd (36-106)
cmd/akash/cmd/testnetify/testnetify.go (1)
  • GetCmd (48-263)
🪛 OSV Scanner (2.1.0)
go.mod

[HIGH] 177-177: github.com/hashicorp/go-getter 1.7.8: HashiCorp go-getter Vulnerable to Symlink Attacks

(GHSA-wjrx-6529-hcj3)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (15)
  • GitHub Check: network-upgrade
  • GitHub Check: sims
  • GitHub Check: release-dry-run
  • GitHub Check: lint-go
  • GitHub Check: coverage
  • GitHub Check: tests
  • GitHub Check: build-macos
  • GitHub Check: release-dry-run
  • GitHub Check: tests
  • GitHub Check: sims
  • GitHub Check: lint-shell
  • GitHub Check: lint-go
  • GitHub Check: coverage
  • GitHub Check: build-bins
  • GitHub Check: build-macos
🔇 Additional comments (4)
go.mod (1)

22-25: IBC-Go v10 with SDK v0.53.x: pairing looks correct.

github.com/cosmos/ibc-go/v10 v10.3.0 with cosmos-sdk v0.53.x is the right compatibility set. Good catch upgrading from v8.7.x.

cmd/akash/cmd/root.go (3)

31-46: Root wiring LGTM for SDK v0.50 (encoding + interfaces).

Using sdkutil.MakeEncodingConfig and registering interfaces via ModuleBasics is correct and future-proof for CometBFT/SDK v0.50+.


90-106: Command set looks solid.

Good modernization: sdkserver.StatusCommand plus pkg.akt.dev/go/cli Query/Tx/Keys, pruning/snapshot wiring, and Rosetta with the new codec/registry.


40-41: Unify DefaultHome usage in cmd/akash

I’ve confirmed that the only place cli.DefaultHome is used in cmd/akash is in the PersistentPreRunE call (line 40), while every other reference in this package uses app.DefaultHome. The environment prefix "AKASH" is also consistently passed to both cli.GetPersistentPreRunE and cmd.Execute. Switching this one line will ensure a single source of truth for the home directory across all code paths.

Apply this patch in cmd/akash/cmd/root.go:

-       PersistentPreRunE: cli.GetPersistentPreRunE(encodingConfig, []string{"AKASH"}, cli.DefaultHome),
+       PersistentPreRunE: cli.GetPersistentPreRunE(encodingConfig, []string{"AKASH"}, app.DefaultHome),

– No other occurrences of cli.DefaultHome remain in cmd/akash
– The Execute(rootCmd, "AKASH") call in cmd/akash/main.go already matches the same "AKASH" prefix

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

🧹 Nitpick comments (4)
cmd/akash/cmd/app_creator.go (4)

3-26: Add missing imports to support filesystem checks.

Follow-up diffs below introduce os.Stat and os.MkdirAll; please add the stdlib os import.

 import (
-	"errors"
+	"errors"
 	"io"
 	"path/filepath"
+	"os"

78-96: Optionally avoid wiring snapshot store when interval is zero.

If FlagStateSyncSnapshotInterval resolves to 0 (disabled), you can skip SetSnapshot to save some overhead. Not a blocker—BaseApp tolerates it—but it keeps runtime intent explicit.

Example sketch (no need to merge as-is):

  • Read interval into a variable.
  • Only build snapshot store and include baseapp.SetSnapshot(...) when interval > 0.

58-60: Prefer a named constant for "genesis_file" app option (if available).

Using a raw string key risks drift; if there is a cflags constant for this key, prefer it for consistency.


118-129: Streamline export home flag handling & confirm viper mutation scope

  • The homePath check in appExport (lines 118–120) never actually influences the export logic. The CLI’s root Viper already reads FlagHome and applies it to the Tendermint config via config.SetRoot(homeDir) before this point (see util/server/server.go:69–71). Either remove the redundant precondition here or, if you intended to override the export path, explicitly apply homePath to the export logic (for example, re-setting the Tendermint config root).
  • The in-place mutation of the viper.Viper instance (Set(cflags.FlagInvCheckPeriod, 1)) is confined to the local appOpts passed into appExport. We found no evidence that this same Viper object is shared concurrently elsewhere in the process, so this mutation poses no race or side-effect risk.
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 90e8fdc and 353da27.

📒 Files selected for processing (1)
  • cmd/akash/cmd/app_creator.go (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
cmd/akash/cmd/app_creator.go (4)
util/server/server.go (1)
  • GetAppDBBackend (221-231)
app/app.go (2)
  • NewApp (105-262)
  • AkashApp (92-102)
app/testnet.go (2)
  • TestnetConfig (46-51)
  • InitAkashAppForTestnet (56-283)
cmd/akash/cmd/testnetify/config.go (1)
  • TestnetConfig (60-66)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (16)
  • GitHub Check: network-upgrade
  • GitHub Check: lint-shell
  • GitHub Check: sims
  • GitHub Check: release-dry-run
  • GitHub Check: lint-go
  • GitHub Check: tests
  • GitHub Check: coverage
  • GitHub Check: build-bins
  • GitHub Check: build-macos
  • GitHub Check: network-upgrade-names
  • GitHub Check: sims
  • GitHub Check: release-dry-run
  • GitHub Check: lint-go
  • GitHub Check: coverage
  • GitHub Check: tests
  • GitHub Check: build-bins
🔇 Additional comments (5)
cmd/akash/cmd/app_creator.go (5)

40-42: Inter-block cache wiring LGTM.


44-47: Skip-upgrade heights mapping LGTM.

Minor nit: consider documenting expected units and source of heights for future maintainers.


98-104: App construction aligns with app.NewApp signature and options.

Good use of EncodingConfig and BaseApp options fan-out.


130-141: Height-gated export logic LGTM.

Creating the app with loadLatest=false and calling LoadHeight(height) is the correct pattern.


147-151: *Type assertion to AkashApp is appropriate here.

Given newApp constructs akash.NewApp, this assertion is a safe contract for testnet wiring.

Comment on lines +54 to +66
homeDir := cast.ToString(appOpts.Get(cflags.FlagHome))
chainID := cast.ToString(appOpts.Get(cflags.FlagChainID))
if chainID == "" {
// fallback to genesis chain-id
genDocFile := filepath.Join(homeDir, cast.ToString(appOpts.Get("genesis_file")))
appGenesis, err := genutiltypes.AppGenesisFromFile(genDocFile)
if err != nil {
panic(err)
}

chainID = appGenesis.ChainID
}

Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

ChainID fallback may panic on default setups when genesis_file is unset; add robust resolution and existence check.

Today, if --chain-id is not provided and appOpts lacks "genesis_file", filepath.Join(homeDir, "") results in homeDir being passed to AppGenesisFromFile, which will fail and panic. Resolve the genesis path robustly (absolute vs. relative) and default to /config/genesis.json when unspecified. Also check that the file exists before parsing to provide a clearer error.

   homeDir := cast.ToString(appOpts.Get(cflags.FlagHome))
   chainID := cast.ToString(appOpts.Get(cflags.FlagChainID))
   if chainID == "" {
-		// fallback to genesis chain-id
-		genDocFile := filepath.Join(homeDir, cast.ToString(appOpts.Get("genesis_file")))
-		appGenesis, err := genutiltypes.AppGenesisFromFile(genDocFile)
-		if err != nil {
-			panic(err)
-		}
-
-		chainID = appGenesis.ChainID
+		// fallback to genesis chain-id
+		gf := cast.ToString(appOpts.Get("genesis_file"))
+		var genDocFile string
+		switch {
+		case gf == "":
+			genDocFile = filepath.Join(homeDir, "config", "genesis.json")
+		case filepath.IsAbs(gf):
+			genDocFile = gf
+		default:
+			genDocFile = filepath.Join(homeDir, gf)
+		}
+		if _, statErr := os.Stat(genDocFile); statErr != nil {
+			panic(errors.New("cannot resolve chain-id: genesis file not found at: " + genDocFile))
+		}
+		appGenesis, err := genutiltypes.AppGenesisFromFile(genDocFile)
+		if err != nil {
+			panic(err)
+		}
+		chainID = appGenesis.ChainID
   }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
homeDir := cast.ToString(appOpts.Get(cflags.FlagHome))
chainID := cast.ToString(appOpts.Get(cflags.FlagChainID))
if chainID == "" {
// fallback to genesis chain-id
genDocFile := filepath.Join(homeDir, cast.ToString(appOpts.Get("genesis_file")))
appGenesis, err := genutiltypes.AppGenesisFromFile(genDocFile)
if err != nil {
panic(err)
}
chainID = appGenesis.ChainID
}
homeDir := cast.ToString(appOpts.Get(cflags.FlagHome))
chainID := cast.ToString(appOpts.Get(cflags.FlagChainID))
if chainID == "" {
// fallback to genesis chain-id
gf := cast.ToString(appOpts.Get("genesis_file"))
var genDocFile string
switch {
case gf == "":
genDocFile = filepath.Join(homeDir, "config", "genesis.json")
case filepath.IsAbs(gf):
genDocFile = gf
default:
genDocFile = filepath.Join(homeDir, gf)
}
if _, statErr := os.Stat(genDocFile); statErr != nil {
panic(errors.New("cannot resolve chain-id: genesis file not found at: " + genDocFile))
}
appGenesis, err := genutiltypes.AppGenesisFromFile(genDocFile)
if err != nil {
panic(err)
}
chainID = appGenesis.ChainID
}
🤖 Prompt for AI Agents
In cmd/akash/cmd/app_creator.go around lines 54-66, the current ChainID fallback
blindly joins homeDir with the possibly-empty "genesis_file" and calls
AppGenesisFromFile which can panic; change this to: if the appOpts
"genesis_file" is empty, set genDocFile to filepath.Join(homeDir, "config",
"genesis.json"), otherwise resolve the provided path to an absolute path (use
filepath.Abs or filepath.Join if relative), then check os.Stat/genDocFile for
existence and return/handle a clear error if missing or unreadable instead of
panicking, and only then call genutiltypes.AppGenesisFromFile and propagate any
parsing error with context so the process fails gracefully with a helpful
message.

Comment on lines +67 to +77
snapshotDir := filepath.Join(homeDir, "data", "snapshots")
snapshotDB, err := dbm.NewDB("metadata", sdkserver.GetAppDBBackend(appOpts), snapshotDir)
if err != nil {
panic(err)
}

snapshotStore, err := snapshots.NewStore(snapshotDB, snapshotDir)
if err != nil {
panic(err)
}

Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Ensure snapshot directory exists before opening the metadata DB.

On a fresh home, dbm.NewDB(...) with snapshotDir may fail if the directory tree is missing. Create it explicitly to avoid first-run errors.

   snapshotDir := filepath.Join(homeDir, "data", "snapshots")
+  if err := os.MkdirAll(snapshotDir, 0o755); err != nil {
+    panic(err)
+  }
   snapshotDB, err := dbm.NewDB("metadata", sdkserver.GetAppDBBackend(appOpts), snapshotDir)
   if err != nil {
     panic(err)
   }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
snapshotDir := filepath.Join(homeDir, "data", "snapshots")
snapshotDB, err := dbm.NewDB("metadata", sdkserver.GetAppDBBackend(appOpts), snapshotDir)
if err != nil {
panic(err)
}
snapshotStore, err := snapshots.NewStore(snapshotDB, snapshotDir)
if err != nil {
panic(err)
}
snapshotDir := filepath.Join(homeDir, "data", "snapshots")
if err := os.MkdirAll(snapshotDir, 0o755); err != nil {
panic(err)
}
snapshotDB, err := dbm.NewDB("metadata", sdkserver.GetAppDBBackend(appOpts), snapshotDir)
if err != nil {
panic(err)
}
snapshotStore, err := snapshots.NewStore(snapshotDB, snapshotDir)
if err != nil {
panic(err)
}
🤖 Prompt for AI Agents
In cmd/akash/cmd/app_creator.go around lines 67 to 77, the code opens the
metadata DB using snapshotDir without ensuring the directory exists; on first
run NewDB can fail if the directory tree is missing. Before calling dbm.NewDB,
create the snapshotDir (and parents) using os.MkdirAll with appropriate
permissions (e.g. 0o700 or 0700) and handle any returned error, then proceed to
open the DB and store.

Comment on lines +153 to 160
tcfg, valid := appOpts.Get(cflags.KeyTestnetConfig).(akash.TestnetConfig)
if !valid {
panic("cflags.KeyTestnetConfig is not of type akash.TestnetConfig")
}

// Make modifications to the normal AkashApp required to run the network locally
return akash.InitAkashAppForTestnet(akashApp, tcfg)
return akash.InitAkashAppForTestnet(akashApp, db, tcfg)
}
Copy link

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Verify that cflags.KeyTestnetConfig is programmatically injected as akash.TestnetConfig.

Viper typically stores primitives/JSON; you’re asserting a concrete struct. Ensure the command path sets this value as a typed object before invoking newTestnetApp, otherwise this will panic at runtime.


🏁 Script executed:

#!/bin/bash
# Confirm that KeyTestnetConfig is set as akash.TestnetConfig (typed) somewhere before app start.
rg -nC3 -S 'KeyTestnetConfig|TestnetConfig' --type=go

# Also check if testnetify config unmarshalling populates akash.TestnetConfig and is then injected into viper.
rg -nC3 -S 'Set\(\s*cflags\.KeyTestnetConfig' --type=go

Length of output: 5872


This will confirm how appOpts.Get is implemented and whether the concrete struct or a pointer is retrieved.


🏁 Script executed:

#!/bin/bash
# Locate app_creator.go and show file path and context around the testnet config usage
file=$(find . -type f -path "*/cmd/akash/cmd/app_creator.go")
echo "Found file: $file"
# Show lines around the Get and type assertion for TestnetConfig
sed -n '140,180p' "$file"

Length of output: 1167


🏁 Script executed:

#!/bin/bash
# Show context around setting Viper.Set and invoking testnetAppCreator
sed -n '330,420p' cmd/akash/cmd/testnetify/testnetify.go

Length of output: 3389


Fix pointer/value mismatch in TestnetConfig assertion

The current implementation will always panic because in cmd/akash/cmd/app_creator.go you do:

tcfg, valid := appOpts.Get(cflags.KeyTestnetConfig).(akash.TestnetConfig)
if !valid {
    panic("cflags.KeyTestnetConfig is not of type akash.TestnetConfig")
}

However, in cmd/akash/cmd/testnetify/testnetify.go you call:

appConfig := &akash.TestnetConfig{ … }
sctx.Viper.Set(cflags.KeyTestnetConfig, appConfig)

so Viper stores a *akash.TestnetConfig, not the value type. The type assertion therefore always fails at runtime.

Please update one of the following:

  • Change the assertion to accept a pointer, then dereference:

    - tcfg, valid := appOpts.Get(cflags.KeyTestnetConfig).(akash.TestnetConfig)
    + tcfgPtr, valid := appOpts.Get(cflags.KeyTestnetConfig).(*akash.TestnetConfig)
    + if !valid || tcfgPtr == nil {
    +     panic("cflags.KeyTestnetConfig is not a *akash.TestnetConfig")
    + }
    + tcfg := *tcfgPtr
  • Or store the value instead of the pointer when setting the config:

    - sctx.Viper.Set(cflags.KeyTestnetConfig, appConfig)
    + sctx.Viper.Set(cflags.KeyTestnetConfig, *appConfig)

Either approach will ensure the type assertion in newTestnetApp succeeds and prevent a panic.

🤖 Prompt for AI Agents
In cmd/akash/cmd/app_creator.go around lines 153 to 160, the type assertion
expects akash.TestnetConfig (value) but Viper stores *akash.TestnetConfig
(pointer), causing the assertion to fail and panic; change the logic to assert a
*akash.TestnetConfig, check for validity, dereference it into a value (or handle
both pointer and value via a type switch) and then pass the dereferenced value
into InitAkashAppForTestnet so the call succeeds without panicking.

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
app/app.go (2)

422-426: BlockedAddrs double-hashes module names; use address strings as-is.

ModuleAccountAddrs already returns address strings; calling NewModuleAddress again yields wrong keys.

-	for acc := range perms {
-		blockedAddrs[authtypes.NewModuleAddress(acc).String()] = !allowedReceivingModAcc[acc]
-	}
+	for addr := range perms {
+		blockedAddrs[addr] = !allowedReceivingModAcc[addr]
+	}

322-339: Remove or integrate unused getGenesisTime
The function getGenesisTime in app/app.go (lines 322–339) is never called; either wire it into NewApp/InitChainer so tests’ GenesisTime setting takes effect or delete it to eliminate dead code.

♻️ Duplicate comments (9)
go.mod (5)

3-5: Pin CI/tooling to Go 1.24.x to satisfy go/toolchain directives.

Workflows/devcontainers/Dockerfiles must use 1.24.x or builds will fail on the toolchain directive.


73-76: Drop stale replaces for x/exp and rapid; they conflict with newer indirects.

These pins force 2023-era x/exp and rapid v0.5.5 while the graph already pulls newer versions (see lines 261 and 279). Remove the replaces.

-	// stick with compatible version or x/exp in v0.47.x line
-	golang.org/x/exp => golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb
-	// stick with compatible version of rapid in v0.47.x line
-	pgregory.net/rapid => pgregory.net/rapid v0.5.5

After removal: run go mod tidy.


59-66: Add replaces to switch Zondax HID/Ledger to intended forks.

go.mod still resolves zondax/hid and zondax/ledger-go indirectly. If the intent is troian/hid and akash-network/ledger-go, add replaces.

 replace (
@@
 	github.com/cosmos/gogoproto => github.com/akash-network/gogoproto v1.7.0-akash.2
+	// use akash fork of ledger-go
+	github.com/zondax/ledger-go => github.com/akash-network/ledger-go v0.14.3
+	// use maintained HID (darwin/arm64 fixes)
+	github.com/zondax/hid       => github.com/troian/hid             v0.13.2
@@
 )

Then go mod tidy to drop the indirect zondax entries.

Also applies to: 244-245


258-258: Invalid module path “go.yaml.in/yaml/v2” — remove duplicate; keep gopkg.in/yaml.v2.

This path is invalid and duplicates the correct entry at Line 273; it will break go mod tidy.

-	go.yaml.in/yaml/v2 v2.4.2 // indirect

177-177: High severity: hashicorp/go-getter v1.7.8 vulnerable (GHSA-wjrx-6529-hcj3). Upgrade to v1.7.9.

Patch is available in 1.7.9. Bump and tidy.

-	github.com/hashicorp/go-getter v1.7.8 // indirect
+	github.com/hashicorp/go-getter v1.7.9 // indirect
app/sim_test.go (3)

116-124: “GenesisTime” set in tests isn’t applied by the app.

getGenesisTime exists but isn’t used in NewApp; tests will not get deterministic genesis time.

Would you like a patch to plumb GenesisTime into NewApp or InitChainer?


37-39: Fix IBC host import: use core/24-host (not core/exported).

This will otherwise fail to compile for StoreKey/ModuleName.

Apply:

-	ibchost "github.com/cosmos/ibc-go/v10/modules/core/exported"
+	ibchost "github.com/cosmos/ibc-go/v10/modules/core/24-host"

477-481: Pass the current test’s T to NewTestLogger.

Avoid constructing &testing.T{}.

-			if sim.FlagVerboseValue {
-				logger = log.NewTestLogger(&testing.T{})
-			} else {
+			if sim.FlagVerboseValue {
+				logger = log.NewTestLogger(t)
+			} else {
app/app.go (1)

162-168: Initialization order bug with gov routes vs hooks (tracked).

Please resolve by setting hooks before any gov proposal handler can call into hooked keepers.

Would you like me to propose a concrete reordering patch inside InitNormalKeepers?

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

505-511: Reflect-based ChainID getter is a stopgap.

Acceptable short-term; ensure removal once SDK exposes ChainID in 0.50.x.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 353da27 and 3b48240.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (6)
  • app/app.go (7 hunks)
  • app/mac.go (2 hunks)
  • app/modules.go (1 hunks)
  • app/sim_test.go (5 hunks)
  • app/types/app.go (3 hunks)
  • go.mod (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • app/modules.go
🧰 Additional context used
🧬 Code graph analysis (4)
app/mac.go (1)
x/escrow/alias.go (1)
  • ModuleName (11-11)
app/types/app.go (4)
x/market/hooks/hooks.go (2)
  • New (23-28)
  • Hooks (13-16)
x/escrow/keeper/keeper.go (2)
  • Keeper (28-48)
  • NewKeeper (50-66)
x/market/keeper/keeper.go (2)
  • Keeper (47-54)
  • NewKeeper (57-64)
testutil/state/suite.go (1)
  • Keepers (49-58)
app/sim_test.go (6)
app/app.go (3)
  • AkashApp (92-102)
  • NewApp (105-262)
  • AppName (78-78)
app/genesis.go (2)
  • NewDefaultGenesisState (61-64)
  • GenesisState (30-30)
testutil/sims/simulation_helpers.go (5)
  • BuildSimulationOperations (62-85)
  • SetupSimulation (28-51)
  • CheckExportSimulation (89-114)
  • PrintStats (117-121)
  • DiffKVStores (145-179)
app/mac.go (1)
  • ModuleAccountAddrs (26-33)
app/sim/sim_utils.go (3)
  • SetupSimulation (23-49)
  • CheckExportSimulation (78-103)
  • PrintStats (106-110)
app/config.go (1)
  • ModuleBasics (70-72)
app/app.go (6)
app/types/app.go (1)
  • App (123-134)
app/mac.go (2)
  • ModuleAccountPerms (13-24)
  • ModuleAccountAddrs (26-33)
app/app_configure.go (1)
  • OrderInitGenesis (54-82)
app/ante.go (1)
  • NewAnteHandler (21-61)
app/genesis.go (1)
  • GenesisState (30-30)
upgrades/types/types.go (1)
  • GetHeightPatchesList (99-101)
🪛 OSV Scanner (2.1.0)
go.mod

[HIGH] 177-177: github.com/hashicorp/go-getter 1.7.8: HashiCorp go-getter Vulnerable to Symlink Attacks

(GHSA-wjrx-6529-hcj3)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (14)
  • GitHub Check: sims
  • GitHub Check: lint-go
  • GitHub Check: tests
  • GitHub Check: build-bins
  • GitHub Check: coverage
  • GitHub Check: build-macos
  • GitHub Check: sims
  • GitHub Check: tests
  • GitHub Check: lint-shell
  • GitHub Check: build-macos
  • GitHub Check: build-bins
  • GitHub Check: lint-go
  • GitHub Check: release-dry-run
  • GitHub Check: coverage
🔇 Additional comments (5)
go.mod (2)

22-25: IBC-Go v10 with Cosmos SDK v0.53.x — compatible pair.

Good alignment: ibc-go v10.3.0 matches SDK v0.53.3. No action needed here.


20-20: CometBFT require + replace to Akash fork — alignment looks correct.

The require (v0.38.17) and replace (v0.38.17-akash.2) are consistent.

Also applies to: 59-66

app/mac.go (3)

9-11: Imports look correct for v10 and escrow module alias.

Good move to ibc-go v10 transfer types and to emodule alias.


26-33: LGTM: address derivation wired to ModuleAccountPerms.

This keeps addrs in sync with perms.


13-23: ModuleAccountPerms covers all module accounts — verified against every authtypes.NewModuleAddress(…) usage in app/; no Akash-specific module accounts are missing or require extra Burner/Minter permissions.

Comment on lines +59 to +62
transfertypes "github.com/cosmos/ibc-go/v10/modules/apps/transfer/types"
ibchost "github.com/cosmos/ibc-go/v10/modules/core/exported"
"github.com/cosmos/ibc-go/v10/testing/simapp"

Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Fix IBC host import: use core/24-host.

Required for ModuleName/StoreKey references elsewhere.

-	ibchost "github.com/cosmos/ibc-go/v10/modules/core/exported"
+	ibchost "github.com/cosmos/ibc-go/v10/modules/core/24-host"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
transfertypes "github.com/cosmos/ibc-go/v10/modules/apps/transfer/types"
ibchost "github.com/cosmos/ibc-go/v10/modules/core/exported"
"github.com/cosmos/ibc-go/v10/testing/simapp"
transfertypes "github.com/cosmos/ibc-go/v10/modules/apps/transfer/types"
ibchost "github.com/cosmos/ibc-go/v10/modules/core/24-host"
"github.com/cosmos/ibc-go/v10/testing/simapp"
🤖 Prompt for AI Agents
In app/app.go around lines 59 to 62, the IBC host import is wrong: replace the
import of ibchost from "github.com/cosmos/ibc-go/v10/modules/core/exported" with
the correct host package path
"github.com/cosmos/ibc-go/v10/modules/core/24-host" so ModuleName and StoreKey
references resolve correctly; update the import line and keep the ibchost alias
(or adjust references) accordingly.

Comment on lines +299 to +309
ibchost.StoreKey,
appA,
appB,
[][]byte{},
},
{
ibctransfertypes.StoreKey,
appA,
appB,
[][]byte{},
},
Copy link

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Store comparison depends on ibchost import fix.

Once ibchost points to core/24-host, ibchost.StoreKey will resolve.

Run to ensure no remaining “core/exported” imports:


🏁 Script executed:

#!/bin/bash
rg -n 'ibc-go/.*/core/exported' -C2

Length of output: 1512


Replace all remaining core/exported imports with core/24-host
In the following files, update
github.com/cosmos/ibc-go/v10/modules/core/exportedgithub.com/cosmos/ibc-go/v10/modules/core/24-host
so that ibchost.StoreKey resolves correctly:

  • app/app_configure.go
  • app/app.go
  • app/sim_test.go
  • app/types/app.go
🤖 Prompt for AI Agents
In app/sim_test.go around lines 299 to 309 (and also update
app/app_configure.go, app/app.go, and app/types/app.go), replace any import of
"github.com/cosmos/ibc-go/v10/modules/core/exported" with
"github.com/cosmos/ibc-go/v10/modules/core/24-host" so that ibchost.StoreKey
resolves correctly; update the import blocks in those files, remove the old
import, add the new one, adjust any symbol references if needed, and run
goimports/gofmt to tidy imports.

Comment on lines +56 to +59
ibcexported "github.com/cosmos/ibc-go/v10/modules/core/exported"
ibckeeper "github.com/cosmos/ibc-go/v10/modules/core/keeper"
ibctm "github.com/cosmos/ibc-go/v10/modules/light-clients/07-tendermint"
emodule "pkg.akt.dev/go/node/escrow/module"
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Use ibc host constants from core/24-host; replace ibcexported.

StoreKey/ModuleName live under core/24-host in ibc-go v10.

-	ibcexported "github.com/cosmos/ibc-go/v10/modules/core/exported"
+	ibchost "github.com/cosmos/ibc-go/v10/modules/core/24-host"

And replace usages in this file accordingly:

- runtime.NewKVStoreService(app.keys[ibcexported.StoreKey]),
- app.GetSubspace(ibcexported.ModuleName),
+ runtime.NewKVStoreService(app.keys[ibchost.StoreKey]),
+ app.GetSubspace(ibchost.ModuleName),
- paramsKeeper.Subspace(ibcexported.ModuleName).WithKeyTable(ibctable)
+ paramsKeeper.Subspace(ibchost.ModuleName).WithKeyTable(ibctable)
- ibcexported.StoreKey,
+ ibchost.StoreKey,

Also applies to: 72-80

🤖 Prompt for AI Agents
In app/types/app.go around lines 56-59 (and similarly 72-80), the code imports
ibcexported from ibc-go v10 but StoreKey/ModuleName constants now live in
core/24-host; replace the ibcexported import with an import alias for the
24-host package (e.g., ibchost
"github.com/cosmos/ibc-go/v10/modules/core/24-host") and update all usages that
referenced ibcexported.StoreKey, ibcexported.ModuleName, etc., to use the
ibchost alias (e.g., ibchost.StoreKey, ibchost.ModuleName) throughout the file.

Comment on lines +227 to +235
app.Keepers.Cosmos.Crisis = crisiskeeper.NewKeeper( //nolint: staticcheck
cdc, runtime.NewKVStoreService(app.keys[crisistypes.StoreKey]),
invCheckPeriod,
app.Keepers.Cosmos.Bank,
authtypes.FeeCollectorName,
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
addresscodec.NewBech32Codec(sdk.GetConfig().GetBech32AccountAddrPrefix()),
)

Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Crisis keeper constructed before Bank keeper — likely invalid dependency.

Crisis requires a valid BankKeeper; here it receives a zero-value keeper.

Move Crisis keeper creation into InitNormalKeepers after Bank is initialized:

-	app.Keepers.Cosmos.Crisis = crisiskeeper.NewKeeper( //nolint: staticcheck
-		cdc, runtime.NewKVStoreService(app.keys[crisistypes.StoreKey]),
-		invCheckPeriod,
-		app.Keepers.Cosmos.Bank,
-		authtypes.FeeCollectorName,
-		authtypes.NewModuleAddress(govtypes.ModuleName).String(),
-		addresscodec.NewBech32Codec(sdk.GetConfig().GetBech32AccountAddrPrefix()),
-	)

Insert in InitNormalKeepers immediately after Bank:

+	app.Keepers.Cosmos.Crisis = crisiskeeper.NewKeeper( //nolint: staticcheck
+		cdc, runtime.NewKVStoreService(app.keys[crisistypes.StoreKey]),
+		invCheckPeriod,
+		app.Keepers.Cosmos.Bank,
+		authtypes.FeeCollectorName,
+		authtypes.NewModuleAddress(govtypes.ModuleName).String(),
+		addresscodec.NewBech32Codec(sdk.GetConfig().GetBech32AccountAddrPrefix()),
+	)
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
app.Keepers.Cosmos.Crisis = crisiskeeper.NewKeeper( //nolint: staticcheck
cdc, runtime.NewKVStoreService(app.keys[crisistypes.StoreKey]),
invCheckPeriod,
app.Keepers.Cosmos.Bank,
authtypes.FeeCollectorName,
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
addresscodec.NewBech32Codec(sdk.GetConfig().GetBech32AccountAddrPrefix()),
)
🤖 Prompt for AI Agents
In app/types/app.go around lines 227 to 235 the Crisis keeper is being
constructed before the Bank keeper is initialized, so it receives a zero-value
BankKeeper; remove the crisiskeeper.NewKeeper call from this location and
instead instantiate app.Keepers.Cosmos.Crisis inside InitNormalKeepers
immediately after the Bank keeper is created and assigned (pass the
now-initialized app.Keepers.Cosmos.Bank along with the same decoder,
KVStoreService, invCheckPeriod, fee collector and governance module address
arguments), ensuring the original parameters are preserved and no other code
depends on the old location.

Comment on lines +375 to +387
// register Transfer Keepers
app.Keepers.Cosmos.Transfer = ibctransferkeeper.NewKeeper(
cdc,
runtime.NewKVStoreService(app.keys[ibctransfertypes.StoreKey]),
app.GetSubspace(ibctransfertypes.ModuleName),
app.Keepers.Cosmos.IBC.ChannelKeeper,
app.Keepers.Cosmos.IBC.ChannelKeeper,
bApp.MsgServiceRouter(),
app.Keepers.Cosmos.Acct,
app.Keepers.Cosmos.Bank,
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
)

Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Transfer keeper: pass PortKeeper, not ChannelKeeper twice.

Signature is (ChannelKeeper, PortKeeper, ...).

-		app.Keepers.Cosmos.IBC.ChannelKeeper,
-		app.Keepers.Cosmos.IBC.ChannelKeeper,
+		app.Keepers.Cosmos.IBC.ChannelKeeper,
+		app.Keepers.Cosmos.IBC.PortKeeper,
🤖 Prompt for AI Agents
In app/types/app.go around lines 375 to 387, the Transfer keeper is being
constructed with ChannelKeeper passed twice; the NewKeeper signature expects
(ChannelKeeper, PortKeeper, ...). Replace the second
app.Keepers.Cosmos.IBC.ChannelKeeper argument with the PortKeeper (e.g.
app.Keepers.Cosmos.IBC.PortKeeper) so the call becomes NewKeeper(cdc,
runtime.NewKVStoreService(...), app.GetSubspace(...),
app.Keepers.Cosmos.IBC.ChannelKeeper, app.Keepers.Cosmos.IBC.PortKeeper,
bApp.MsgServiceRouter(), ...).

Comment on lines +472 to +500
// initParamsKeeper init params keeper and its subspaces
func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino, key, tkey storetypes.StoreKey) paramskeeper.Keeper { // nolint: staticcheck
paramsKeeper := paramskeeper.NewKeeper(appCodec, legacyAmino, key, tkey) // nolint: staticcheck

ibctable := ibcclienttypes.ParamKeyTable()
ibctable.RegisterParamSet(&ibcconnectiontypes.Params{})

paramsKeeper.Subspace(authtypes.ModuleName).WithKeyTable(authtypes.ParamKeyTable()) // nolint: staticcheck
paramsKeeper.Subspace(banktypes.ModuleName).WithKeyTable(banktypes.ParamKeyTable()) // nolint: staticcheck // SA1019
paramsKeeper.Subspace(stakingtypes.ModuleName).WithKeyTable(stakingtypes.ParamKeyTable()) // nolint: staticcheck // SA1019
paramsKeeper.Subspace(minttypes.ModuleName).WithKeyTable(minttypes.ParamKeyTable()) // nolint: staticcheck // SA1019
paramsKeeper.Subspace(distrtypes.ModuleName).WithKeyTable(distrtypes.ParamKeyTable()) // nolint: staticcheck // SA1019
paramsKeeper.Subspace(slashingtypes.ModuleName).WithKeyTable(slashingtypes.ParamKeyTable()) // nolint: staticcheck // SA1019
paramsKeeper.Subspace(govtypes.ModuleName).WithKeyTable(govv1.ParamKeyTable()) // nolint: staticcheck // SA1019
paramsKeeper.Subspace(crisistypes.ModuleName).WithKeyTable(crisistypes.ParamKeyTable()) // nolint: staticcheck // SA1019
paramsKeeper.Subspace(ibctransfertypes.ModuleName).WithKeyTable(ibctransfertypes.ParamKeyTable())
paramsKeeper.Subspace(ibcexported.ModuleName).WithKeyTable(ibctable)
paramsKeeper.Subspace(icacontrollertypes.SubModuleName)
paramsKeeper.Subspace(icahosttypes.SubModuleName)

// akash params subspaces
paramsKeeper.Subspace(dtypes.ModuleName).WithKeyTable(dv1beta.ParamKeyTable())
paramsKeeper.Subspace(mtypes.ModuleName).WithKeyTable(mtypes.ParamKeyTable())
paramsKeeper.Subspace(astakingtypes.ModuleName).WithKeyTable(astakingtypes.ParamKeyTable()) // nolint: staticcheck // SA1019
paramsKeeper.Subspace(agovtypes.ModuleName).WithKeyTable(agovtypes.ParamKeyTable()) // nolint: staticcheck // SA1019
paramsKeeper.Subspace(ttypes.ModuleName).WithKeyTable(ttypes.ParamKeyTable()) // nolint: staticcheck // SA1019

return paramsKeeper
}
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Update params subspaces to use ibchost.ModuleName (not ibcexported).

Matches the import fix above.

-	paramsKeeper.Subspace(ibcexported.ModuleName).WithKeyTable(ibctable)
+	paramsKeeper.Subspace(ibchost.ModuleName).WithKeyTable(ibctable)
🤖 Prompt for AI Agents
In app/types/app.go around lines 472 to 500, the params subspace is registered
using ibcexported.ModuleName but should use ibchost.ModuleName to match the
import change; update the call
paramsKeeper.Subspace(ibcexported.ModuleName).WithKeyTable(ibctable) to
paramsKeeper.Subspace(ibchost.ModuleName).WithKeyTable(ibctable) (and ensure the
ibchost package is imported) so the IBC client param key table is registered
under the correct module name.

Comment on lines +502 to +520
func kvStoreKeys() []string {
keys := []string{
consensusparamtypes.StoreKey,
authtypes.StoreKey,
feegrant.StoreKey,
authzkeeper.StoreKey,
banktypes.StoreKey,
stakingtypes.StoreKey,
minttypes.StoreKey,
distrtypes.StoreKey,
slashingtypes.StoreKey,
govtypes.StoreKey,
paramstypes.StoreKey,
ibcexported.StoreKey,
upgradetypes.StoreKey,
evidencetypes.StoreKey,
ibctransfertypes.StoreKey,
}

Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

kvStoreKeys should reference ibchost.StoreKey.

Keep key list consistent with ibc-go v10.

-		ibcexported.StoreKey,
+		ibchost.StoreKey,
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
func kvStoreKeys() []string {
keys := []string{
consensusparamtypes.StoreKey,
authtypes.StoreKey,
feegrant.StoreKey,
authzkeeper.StoreKey,
banktypes.StoreKey,
stakingtypes.StoreKey,
minttypes.StoreKey,
distrtypes.StoreKey,
slashingtypes.StoreKey,
govtypes.StoreKey,
paramstypes.StoreKey,
ibcexported.StoreKey,
upgradetypes.StoreKey,
evidencetypes.StoreKey,
ibctransfertypes.StoreKey,
}
func kvStoreKeys() []string {
keys := []string{
consensusparamtypes.StoreKey,
authtypes.StoreKey,
feegrant.StoreKey,
authzkeeper.StoreKey,
banktypes.StoreKey,
stakingtypes.StoreKey,
minttypes.StoreKey,
distrtypes.StoreKey,
slashingtypes.StoreKey,
govtypes.StoreKey,
paramstypes.StoreKey,
ibchost.StoreKey,
upgradetypes.StoreKey,
evidencetypes.StoreKey,
ibctransfertypes.StoreKey,
}
// ...
}
🤖 Prompt for AI Agents
In app/types/app.go around lines 502 to 520, the kvStoreKeys list references
ibcexported.StoreKey but should use ibchost.StoreKey to match ibc-go v10; update
the slice to replace ibcexported.StoreKey with ibchost.StoreKey and add the
proper ibchost import from the ibc-go v10 module (adjust import alias if
necessary) so the code compiles and stays consistent with ibc-go v10.

Signed-off-by: Artur Troian <[email protected]>
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

♻️ Duplicate comments (9)
go.mod (6)

1-1: Module path looks correct; verify all imports/URLs migrated to pkg.akt.dev/node

Scan and update any lingering github.com/akash-network/node references in imports, docs, scripts, and CI.


3-5: Align CI/Docker/dev with Go 1.24.x to satisfy go/toolchain directives

Pin Go 1.24.x in workflows (actions/setup-go), Dockerfiles (golang:1.24-*), and devcontainer/Makefiles to avoid toolchain errors.


258-258: Remove invalid module path go.yaml.in/yaml/v2 (duplicate of gopkg.in/yaml.v2)

This breaks tidy; keep only gopkg.in/yaml.v2 (line 273).

Apply:

-	go.yaml.in/yaml/v2 v2.4.2 // indirect

Then: go mod tidy


73-76: Remove stale replace pins for x/exp and rapid (conflict with indirect graph)

These force 2023-era versions while the graph needs newer (see lines 261, 279). Drop them.

Apply:

@@
-	// stick with compatible version or x/exp in v0.47.x line
-	golang.org/x/exp => golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb
-	// stick with compatible version of rapid in v0.47.x line
-	pgregory.net/rapid => pgregory.net/rapid v0.5.5

Then run: go mod tidy


176-178: Upgrade hashicorp/go-getter to patch known symlink vulnerability

v1.7.8 is flagged (GHSA-wjrx-6529-hcj3). Bump to 1.7.9.

Apply:

-	github.com/hashicorp/go-getter v1.7.8 // indirect
+	github.com/hashicorp/go-getter v1.7.9 // indirect

Then: go get github.com/hashicorp/[email protected] && go mod tidy


59-65: Add replaces for HID/Ledger forks to remove indirect zondax pulls

You still pull zondax/hid and zondax/ledger-go indirectly (lines 244–245). Add replaces to intended forks.

Apply:

@@
 	github.com/cosmos/cosmos-sdk => github.com/akash-network/cosmos-sdk v0.53.4-akash.1
@@
 	github.com/cosmos/gogoproto => github.com/akash-network/gogoproto v1.7.0-akash.2
+	// use akash fork of ledger-go
+	github.com/zondax/ledger-go => github.com/akash-network/ledger-go v0.14.3
+	// use maintained HID (darwin/arm64 fixes)
+	github.com/zondax/hid => github.com/troian/hid v0.13.2

Then: go mod tidy

app/sim_test.go (3)

116-123: “GenesisTime” is set here, but may be ignored by NewApp—verify integration.

If NewApp doesn’t read GenesisTime from appOpts, these settings have no effect. Confirm that getGenesisTime (or equivalent) is used inside NewApp.

#!/bin/bash
# Verify NewApp consumes GenesisTime from appOpts.
rg -n -C2 -P '\bgetGenesisTime\b|\bGenesisTime\b' app | sed -n '1,200p'

Also applies to: 158-166, 400-408, 487-494


37-39: Fix IBC host import: use core/24-host (current path won’t compile for StoreKey).

Update the import to the host package that defines StoreKey/ModuleName.

-	ibchost "github.com/cosmos/ibc-go/v10/modules/core/exported"
+	ibchost "github.com/cosmos/ibc-go/v10/modules/core/24-host"

479-481: Pass the current test’s t to NewTestLogger (avoid &testing.T{}).

Constructing a fresh testing.T is incorrect and can cause odd behavior.

-			if sim.FlagVerboseValue {
-				logger = log.NewTestLogger(&testing.T{})
-			} else {
+			if sim.FlagVerboseValue {
+				logger = log.NewTestLogger(t)
+			} else {
🧹 Nitpick comments (3)
app/sim_test.go (3)

206-211: Use appB’s codec for InitGenesis.

Passing appA.AppCodec() couples the test to appA; use appB.AppCodec() for correctness and clarity.

-	_, err = appB.MM.InitGenesis(ctxB, appA.AppCodec(), genesisState)
+	_, err = appB.MM.InitGenesis(ctxB, appB.AppCodec(), genesisState)

128-129: Prefer t.Logf over fmt.Printf in tests.

Keeps test output scoped to the test and hidden unless it fails or -v is used.

-	fmt.Printf("config--------\n%v", config)
+	t.Logf("config: %+v", config)

436-438: Also honor “skip” from the second SetupSimulation call.

If the simulator is disabled, skip this phase too for consistency.

-	_, newDB, newDir, _, val, err := sim.SetupSimulation("leveldb-app-sim-2", "Simulation-2")
+	_, newDB, newDir, _, val, err := sim.SetupSimulation("leveldb-app-sim-2", "Simulation-2")
 	require.NoError(t, err, "simulation setup failed", val)
+	if val {
+		t.Skip("skipping secondary simulation setup")
+	}
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 3b48240 and ac05cb5.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (2)
  • app/sim_test.go (5 hunks)
  • go.mod (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
app/sim_test.go (4)
app/app.go (4)
  • AkashApp (92-102)
  • DefaultHome (82-82)
  • NewApp (105-262)
  • AppName (78-78)
app/genesis.go (2)
  • NewDefaultGenesisState (61-64)
  • GenesisState (30-30)
testutil/sims/simulation_helpers.go (6)
  • BuildSimulationOperations (62-85)
  • SetupSimulation (28-51)
  • CheckExportSimulation (89-114)
  • PrintStats (117-121)
  • DiffKVStores (145-179)
  • GetSimulationLog (125-141)
app/sim/sim_utils.go (3)
  • SetupSimulation (23-49)
  • CheckExportSimulation (78-103)
  • PrintStats (106-110)
🪛 OSV Scanner (2.1.0)
go.mod

[HIGH] 177-177: github.com/hashicorp/go-getter 1.7.8: HashiCorp go-getter Vulnerable to Symlink Attacks in github.com/hashicorp/go-getter

(GO-2025-3892)


[HIGH] 177-177: github.com/hashicorp/go-getter 1.7.8: HashiCorp go-getter Vulnerable to Symlink Attacks

(GHSA-wjrx-6529-hcj3)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (17)
  • GitHub Check: network-upgrade
  • GitHub Check: release-dry-run
  • GitHub Check: sims
  • GitHub Check: coverage
  • GitHub Check: build-bins
  • GitHub Check: lint-shell
  • GitHub Check: lint-go
  • GitHub Check: build-macos
  • GitHub Check: tests
  • GitHub Check: lint-shell
  • GitHub Check: release-dry-run
  • GitHub Check: build-bins
  • GitHub Check: sims
  • GitHub Check: lint-go
  • GitHub Check: coverage
  • GitHub Check: build-macos
  • GitHub Check: tests
🔇 Additional comments (5)
go.mod (3)

24-24: LGTM: ibc-go v10.x matches Cosmos SDK v0.53.x

Compatibility is correct for the 0.53 line.


70-72: Confirm single goleveldb version after tidy

You pin goleveldb via replace, but an indirect entry (line 234) references a different version. After tidy, ensure only the pinned one remains.


244-246: Follow-up: expect zondax/ to disappear after adding replaces*

After adding the HID/Ledger replaces, these indirect zondax lines should drop from go.mod/go.sum.

app/sim_test.go (2)

10-11: Use x/authz/types.StoreKey (not keeper).

StoreKey is defined in x/authz/types. Switch the import and usage to avoid a compile-time error and unused import.

-	authzkeeper "github.com/cosmos/cosmos-sdk/x/authz/keeper"
+	authztypes "github.com/cosmos/cosmos-sdk/x/authz/types"
-			authzkeeper.StoreKey,
+			authztypes.StoreKey,

Also applies to: 236-244


203-205: Use deliverTx contexts for genesis application (NewContext(false)).

Reading/initializing genesis with a checkTx context is atypical; prefer false for clarity.

-	ctxA := appA.NewContext(true)
-	ctxB := appB.NewContext(true)
+	ctxA := appA.NewContext(false)
+	ctxB := appB.NewContext(false)

troian added 4 commits August 30, 2025 13:40
during deposit authorization use only funds that remaining unset
after deducting from owner balance

Signed-off-by: Artur Troian <[email protected]>
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: 1

♻️ Duplicate comments (4)
go.mod (4)

3-5: Align CI/Docker to Go 1.24.x toolchain

go 1.24.3 / toolchain 1.24.4 require builders pinned to 1.24.x. Ensure workflows, devcontainers, and Dockerfiles use 1.24.x to avoid toolchain errors.

Run to verify:

#!/usr/bin/env bash
fd -t f .github/workflows | xargs -r rg -n "actions/setup-go|go-version" -A1
fd -t f Dockerfile | xargs -r rg -n "^FROM golang"
fd -t f 'devcontainer.json|Makefile|Taskfile*' | xargs -r rg -n "GO_VERSION|toolchain|1\.24"

73-76: Remove stale replace pins for x/exp and rapid (conflict with graph)

You pin very old versions while the graph already requires newer ones (x/exp at 2025-03…, rapid v1.2.0). This can cause API mismatches.

Apply:

-	// stick with compatible version or x/exp in v0.47.x line
-	golang.org/x/exp => golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb
-	// stick with compatible version of rapid in v0.47.x line
-	pgregory.net/rapid => pgregory.net/rapid v0.5.5

Then:

go mod tidy

Also applies to: 261-261, 279-279


244-246: Add replaces to use troian/hid and akash-network/ledger-go forks

go.mod still pulls zondax/hid and zondax/ledger-go indirectly. If the intent is to use the maintained forks, add replaces to avoid mixing implementations.

Apply inside the existing replace block:

 	github.com/cosmos/gogoproto => github.com/akash-network/gogoproto v1.7.0-akash.2
+	// use akash fork of ledger-go
+	github.com/zondax/ledger-go => github.com/akash-network/ledger-go v0.14.3
+	// use maintained HID (darwin/arm64 fixes)
+	github.com/zondax/hid       => github.com/troian/hid             v0.13.2

Then:

go mod tidy
rg -n "zondax/(hid|ledger-go)" go.mod

Also applies to: 59-76


258-258: Invalid module path “go.yaml.in/yaml/v2” — remove duplicate/bad entry

This path is invalid and duplicates gopkg.in/yaml.v2. It will break tidy.

Apply:

-	go.yaml.in/yaml/v2 v2.4.2 // indirect

Then:

go mod tidy

Also applies to: 273-273

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between ac05cb5 and 65d0a37.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (1)
  • go.mod (1 hunks)
🧰 Additional context used
🪛 OSV Scanner (2.1.0)
go.mod

[HIGH] 177-177: github.com/hashicorp/go-getter 1.7.8: HashiCorp go-getter Vulnerable to Symlink Attacks in github.com/hashicorp/go-getter

(GO-2025-3892)


[HIGH] 177-177: github.com/hashicorp/go-getter 1.7.8: HashiCorp go-getter Vulnerable to Symlink Attacks

(GHSA-wjrx-6529-hcj3)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (16)
  • GitHub Check: sims
  • GitHub Check: network-upgrade-names
  • GitHub Check: release-dry-run
  • GitHub Check: lint-shell
  • GitHub Check: coverage
  • GitHub Check: lint-go
  • GitHub Check: tests
  • GitHub Check: build-bins
  • GitHub Check: build-macos
  • GitHub Check: coverage
  • GitHub Check: tests
  • GitHub Check: build-macos
  • GitHub Check: sims
  • GitHub Check: build-bins
  • GitHub Check: lint-go
  • GitHub Check: release-dry-run
🔇 Additional comments (2)
go.mod (2)

21-26: SDK 0.53.3 + IBC-Go v10.x combo looks correct

The pairing (Cosmos SDK v0.53.x, IBC-Go v10.x) is the supported matrix. Good upgrade.


59-65: Akash forks for CometBFT/SDK/gogoproto and goleveldb pin look good

Replaces to akash forks and the required goleveldb pin for 0.53.x are appropriate.

Also applies to: 70-72

github.com/gtank/merlin v0.1.1 // indirect
github.com/gtank/ristretto255 v0.1.2 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-getter v1.7.8 // indirect
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Vulnerability: hashicorp/go-getter v1.7.8 (symlink attack) — bump to v1.7.9

OSV/GHSA flags 1.7.8; fixed in 1.7.9. Upgrade now.

Apply:

-	github.com/hashicorp/go-getter v1.7.8 // indirect
+	github.com/hashicorp/go-getter v1.7.9 // indirect

Then:

go get github.com/hashicorp/[email protected] && go mod tidy
🧰 Tools
🪛 OSV Scanner (2.1.0)

[HIGH] 177-177: github.com/hashicorp/go-getter 1.7.8: HashiCorp go-getter Vulnerable to Symlink Attacks in github.com/hashicorp/go-getter

(GO-2025-3892)


[HIGH] 177-177: github.com/hashicorp/go-getter 1.7.8: HashiCorp go-getter Vulnerable to Symlink Attacks

(GHSA-wjrx-6529-hcj3)

🤖 Prompt for AI Agents
In go.mod around line 177, the dependency github.com/hashicorp/go-getter is
pinned at v1.7.8 which has a known symlink attack vulnerability; update it to
v1.7.9 by changing the module version to v1.7.9 and then run the module update
commands to fetch the patched release and clean up dependencies (use the Go
toolchain to run the equivalent of "go get
github.com/hashicorp/[email protected]" followed by "go mod tidy" to update
go.sum and ensure the module graph is consistent).

Copy link

Marked as stale; will be closed in five days.
Cut bait or go fishing!

@github-actions github-actions bot added the stale label Sep 15, 2025
@troian troian removed the stale label Sep 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

1 participant