-
Notifications
You must be signed in to change notification settings - Fork 244
feat: sdk-50 #1998
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat: sdk-50 #1998
Conversation
WalkthroughRepository-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
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 changes
Dev->>Repo: push PR
Repo->>CI: workflows triggered
CI->>Setup: run setup-ubuntu (install deps, fetch tags, detect Go)
Setup-->>CI: environment (GOVERSION, tools) set
CI->>Make: run build/test targets
Make->>App: build & start app via appCreator.newApp
App->>SDK: InitSpecialKeepers() → InitNormalKeepers()
App->>Node: register node/gRPC services, lifecycle hooks
CI->>App: execute unit & e2e tests (gRPC/CLI)
App-->>CI: test results & artifacts uploaded
CI->>Repo: workflow outcome
Estimated code review effort🎯 5 (Critical) | ⏱️ ~120+ minutes Possibly related PRs
Poem
✨ Finishing Touches🧪 Generate unit tests
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
Status, Documentation and Community
|
Signed-off-by: Artur Troian <[email protected]>
Signed-off-by: Artur Troian <[email protected]>
Signed-off-by: Artur Troian <[email protected]>
Signed-off-by: Artur Troian <[email protected]>
Signed-off-by: Artur Troian <[email protected]>
Signed-off-by: Artur Troian <[email protected]>
Signed-off-by: Artur Troian <[email protected]>
Signed-off-by: Artur Troian <[email protected]>
Signed-off-by: Artur Troian <[email protected]>
There was a problem hiding this 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 keyGoReleaser expects a singular
format
field, notformats
. The current YAML will be ignored and the build will fall back to the defaulttar.gz
, breaking the “single binary” expectation.archives: - - formats: - - binary + - format: binarycmd/akash/cmd/bech32.go (1)
33-36
: Avoidpanic
in CLI command pathA 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 usageLine 103 uses
FlagJWTAccess
instead ofFlagJWTScope
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 targetSee 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 removalSame verification applies.
tests/e2e/certs_cli_test.go (1)
92-146
: Comprehensive client certificate testsGood 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 CometBFTTo 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 thattests/upgrade/types/types.go (1)
1-1
: Explain disabledrevive
linterAdding
//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 fromroot.NewRootCmd()
instead of ignoring it.
doc.GenMarkdownTree
will panic on anil
*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 toPATH
. 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 collisionAdd 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 rebaseCosmos SDK 0.50+ split
sdkmath
out oftypes
. Good catch.
Just ensurego vet ./...
passes after the switch; straysdkmath
vssdk.Int
mismatches are easy to miss.
61-66
: Unexportedupgrade
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.
Runjq -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 ontests/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
: Missingdescription
field breaks Marketplace visibilityGitHub composite actions should include a short description.
name: setup-ubuntu +description: "Common environment bootstrap for Akash CI jobs"
10-13
:sudo apt install
withoutapt-update
can fail on new runnersPrepend
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 TxFeeCheckertests/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 providerapp/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()
andsdkmath.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 commentThe 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 directiveThe
//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 modulesThe 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 flexibleThe 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 workaroundThe 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 existenceConsider 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 helpThe 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 passingTestnetConfig
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() }
runs-on: gh-runner-test | ||
needs: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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()) |
There was a problem hiding this comment.
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]>
Signed-off-by: Artur Troian <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 4
🔭 Outside diff range comments (2)
app/config.go (1)
30-69
: Fix capability import path to IBC v10 in app/config.goThe grep shows you’re still importing the old capability module. Update it to the v10 path to match your other IBC v10 imports.
• File: app/config.go, line 24
• Change import from:- "github.com/cosmos/ibc-go/modules/capability" + "github.com/cosmos/ibc-go/v10/modules/capability"• Afterwards run
go mod tidy
to remove the legacy v1 dependency.app/app_configure.go (1)
54-82
: Add capability module first and correct the IBC host import; re-validate full InitChain– Verified that
OrderInitGenesis
is wired intoapp.MM.SetOrderInitGenesis
(inapp/app.go:197
).
– Inapp/app_configure.go
, update the import block and slice inOrderInitGenesis
:
• Add the capability module as the very first entry:
go import ( capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" // … other imports … ) … func OrderInitGenesis(_ []string) []string { return []string{ capabilitytypes.ModuleName, // ← new authtypes.ModuleName, authz.ModuleName, // … rest of your modules … } }
• Fix the IBC-host import so it points at the host types package (instead of…/core/exported
), for example:
diff - ibchost "github.com/cosmos/ibc-go/v10/modules/core/exported" + ibchost "github.com/cosmos/ibc-go/v10/modules/core/24-host/types"
– After making these changes, run a full InitChain (not justMM.InitGenesis
in tests) to catch any remaining hidden ordering requirements.
♻️ Duplicate comments (7)
go.mod (5)
1-1
: Module path migration is correct; verify all imports/docs updated to pkg.akt.dev/nodeGood move to
module pkg.akt.dev/node
. Ensure there are no lingering references togithub.com/akash-network/node
in source, tests, docs, CI, and scripts.Run to locate leftovers:
#!/usr/bin/env bash rg -n --hidden --glob '!.git' $'github.com/akash-network/node'
3-5
: Go 1.24 toolchain: align CI/build images to 1.24.xThe
go 1.24.3
/toolchain go1.24.4
directives require all CI and Docker builders to use Go 1.24.x or they will fail to resolve the toolchain.Scan workflows and Dockerfiles for pinned Go versions:
#!/usr/bin/env bash fd -H -a -t f -E node_modules -E dist -E build '.ya?ml$' .github/workflows | xargs -r sed -n '1,200p' | rg -n 'setup-go|golang|go-version|toolchain' fd -H -a -t f -E node_modules -E dist -E build 'Dockerfile|devcontainer.json|Taskfile|Makefile' | xargs -r rg -n 'golang:|GO_VERSION|toolchain|1\.24'
24-24
: Remove invalid dependency: github.com/cosmos/ibc-go/modules/capabilityThe capability module is part of Cosmos SDK (
x/capability
), not a standalone ibc-go submodule. This entry will causego mod tidy
resolution issues and is incorrect.Apply:
- github.com/cosmos/ibc-go/modules/capability v1.0.1
Then update any source imports from:
- github.com/cosmos/ibc-go/modules/capability[/types]
to:- github.com/cosmos/cosmos-sdk/x/capability[/types]
71-77
: Drop stale replace pins for x/exp and rapid; they conflict with the graphThese pins force 2023-era versions while the graph requires newer ones (see indirects at Line 261 and Line 279). This can cause API mismatches.
Recommended fix — remove the stale 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.5Alternatively, align them to the actual resolved versions (less preferred):
- golang.org/x/exp => golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb + golang.org/x/exp => golang.org/x/exp v0.0.0-20250305212735-054e65f0b394 - pgregory.net/rapid => pgregory.net/rapid v0.5.5 + pgregory.net/rapid => pgregory.net/rapid v1.2.0Run
go mod tidy
after changes.
244-246
: Ensure HID/Ledger resolve to intended forks (troian/hid, akash-network/ledger-go)Indirects still reference
github.com/zondax/{hid,ledger-go}
. To enforce the forks, add replaces in the block above.Apply:
@@ 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 run
go mod tidy
to drop indirect zondax references.cmd/akash/cmd/root.go (1)
83-110
: Command graph modernization looks goodGood use of sdkserver.StatusCommand, pruning/snapshot commands, rosetta with encoding codec, and centralized server.AddCommands. The AddGenesisAccount duplication highlighted previously is avoided by nesting it under the genesis command only.
app/app.go (1)
145-168
: LGTM: Modular keeper initialization with documented initialization order concern.The initialization follows a clean pattern:
- Special keepers first (critical system components)
- Normal keepers second (application logic)
- Hooks setup last
The TODO comment correctly identifies a real initialization order issue where gov proposal routes are registered before hooks are set up. This could cause nil pointer dereferences in proposal handlers that use hooks.
🧹 Nitpick comments (1)
app/sim_test.go (1)
369-373
: Improve diagnostics: print store names instead of pointer addressesKVStoreKey’s default fmt prints pointer addresses. Use Name() for clearer diffs/logs.
- require.Equal(t, len(failedKVAs), len(failedKVBs), "unequal sets of key-values to compare %s, key stores %s and %s", skp.Key, storeKeyA, storeKeyB) + require.Equal(t, len(failedKVAs), len(failedKVBs), "unequal sets of key-values to compare for store=%s (A=%s, B=%s)", skp.Key, storeKeyA.Name(), storeKeyB.Name()) @@ - t.Logf("compared %d different key/value pairs between %s and %s\n", len(failedKVAs), storeKeyA, storeKeyB) + t.Logf("compared %d different key/value pairs between %s and %s\n", len(failedKVAs), storeKeyA.Name(), storeKeyB.Name())
📜 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 settings in your CodeRabbit configuration.
⛔ Files ignored due to path filters (1)
go.sum
is excluded by!**/*.sum
📒 Files selected for processing (9)
app/app.go
(7 hunks)app/app_configure.go
(3 hunks)app/config.go
(2 hunks)app/mac.go
(2 hunks)app/modules.go
(1 hunks)app/sim_test.go
(5 hunks)app/types/app.go
(3 hunks)cmd/akash/cmd/root.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 (5)
app/sim_test.go (6)
app/app.go (3)
AkashApp
(92-102)DefaultHome
(82-82)NewApp
(105-262)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/mac.go (1)
ModuleAccountAddrs
(27-34)app/sim/sim_utils.go (3)
SetupSimulation
(23-49)CheckExportSimulation
(78-103)PrintStats
(106-110)app/config.go (1)
ModuleBasics
(72-74)
app/app_configure.go (3)
x/market/alias.go (1)
ModuleName
(13-13)x/take/alias.go (1)
ModuleName
(11-11)x/cert/alias.go (1)
ModuleName
(13-13)
app/config.go (2)
x/deployment/module.go (8)
AppModuleBasic
(44-46)AppModuleBasic
(60-62)AppModuleBasic
(65-67)AppModuleBasic
(78-80)AppModuleBasic
(83-90)AppModuleBasic
(93-98)AppModuleBasic
(101-103)AppModuleBasic
(106-108)x/market/module.go (8)
AppModuleBasic
(43-45)AppModuleBasic
(54-56)AppModuleBasic
(59-61)AppModuleBasic
(70-72)AppModuleBasic
(75-82)AppModuleBasic
(85-90)AppModuleBasic
(93-95)AppModuleBasic
(98-100)
cmd/akash/cmd/root.go (8)
app/config.go (1)
ModuleBasics
(72-74)app/app.go (1)
DefaultHome
(82-82)cmd/akash/cmd/bech32.go (1)
ConvertBech32Cmd
(12-47)cmd/akash/cmd/auth.go (1)
AuthCmd
(24-32)util/server/server.go (1)
Commands
(31-58)cmd/akash/cmd/genesis.go (1)
PrepareGenesisCmd
(36-106)cmd/akash/cmd/testnetify/testnetify.go (1)
GetCmd
(48-263)cmd/akash/cmd/genaccounts.go (1)
AddGenesisAccountCmd
(35-195)
app/app.go (7)
app/types/app.go (1)
App
(123-134)app/mac.go (2)
ModuleAccountPerms
(14-25)ModuleAccountAddrs
(27-34)x/cert/alias.go (1)
ModuleName
(13-13)app/app_configure.go (1)
OrderInitGenesis
(54-82)app/genesis.go (1)
GenesisState
(30-30)upgrades/types/types.go (1)
GetHeightPatchesList
(99-101)app/config.go (1)
ModuleBasics
(72-74)
⏰ 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). (12)
- GitHub Check: network-upgrade
- GitHub Check: coverage
- GitHub Check: build-bins
- GitHub Check: lint-go
- GitHub Check: lint-shell
- GitHub Check: lint-go
- GitHub Check: release-dry-run
- GitHub Check: sims
- GitHub Check: build-macos
- GitHub Check: build-bins
- GitHub Check: coverage
- GitHub Check: tests
🔇 Additional comments (47)
go.mod (3)
20-26
: SDK v0.53.3 + IBC-Go v10.3.0 pairing looks correctThe pair
github.com/cosmos/cosmos-sdk v0.53.3
withgithub.com/cosmos/ibc-go/v10 v10.3.0
matches the known compatibility matrix for SDK 0.53.x. No action needed.
60-66
: Replaces for Akash forks (cometbft, cosmos-sdk, gogoproto) look goodThese ensures you resolve to the intended Akash forks. Keep as-is.
33-33
: Sanity-check cgosymbolizer version provenance
github.com/ianlancetaylor/cgosymbolizer
at a 2025 pseudo-version is unusual for a runtime dependency and is typically used as a tooling aid. Confirm it’s required at runtime and sourced from a trustworthy tag/commit; otherwise, move it behind a tools.go with build tag or remove.app/sim_test.go (1)
57-60
: No action needed: AkashApp already implements storeKeyGetter
The*baseapp.BaseApp
embedded inAkashApp
providesfunc (b *BaseApp) GetKey(name string) *storetypes.KVStoreKeywhich is promoted to
*AkashApp
, so it satisfies thestoreKeyGetter
interface.app/mac.go (2)
14-24
: Module account permissions map looks correctPermissions for fee collector, mint, staking pools, gov, transfer, distribution, and escrow look aligned with SDK/IBC expectations. No issues.
27-34
: Address derivation via ModuleAccountPerms is consistentDeriving module account addresses from the perms map avoids duplication and keeps things in sync. LGTM.
app/config.go (1)
71-75
: ModuleBasics accessor remains simple and correctReturning the pre-built BasicManager is fine and consistent with usage elsewhere.
cmd/akash/cmd/root.go (3)
32-35
: NewRootCmd: encoding config wiring is correctConstructing encodingConfig via sdkutil and registering interfaces via app.ModuleBasics is aligned with the new pattern.
61-81
: ExecuteWithCtx: context plumbing and logging flags setup look solidSetting up server/client contexts, adding logging flags, and delegating to CometBFT base executor is correct. No issues found.
119-132
: Genesis command construction is consistentUsing cli.GetGenesisCmd with ModuleBasics/TxConfig and adding AddGenesisAccount under the genesis subcommand is clean and avoids duplicate exposure.
app/app_configure.go (1)
36-46
: akashModuleBasics selection is consistentThe reduced Akash module basics set (take, escrow, deployment, market, provider, audit, cert) matches the broader migration. No issues here.
app/types/app.go (14)
7-7
: LGTM: Adding sync import for new concurrency features.The
sync
import is needed for the newkOnce sync.Once
field that ensures thread-safe initialization of store keys.
9-80
: LGTM: Comprehensive migration to Cosmos SDK v0.50+ and new module structure.The import updates demonstrate a well-structured migration:
- Migration to
cosmossdk.io/*
packages fromgithub.com/cosmos/cosmos-sdk/x/*
- Updated to IBC v10 (
github.com/cosmos/ibc-go/v10
)- Migration from
github.com/akash-network/akash-api
topkg.akt.dev/go/node/*
- Migration from
github.com/akash-network/akash/x/*
topkg.akt.dev/node/x/*
This aligns with the broader SDK modernization effort.
82-84
: LGTM: Account address prefix constant added.The
AccountAddressPrefix
constant provides a centralized location for the Akash network's bech32 address prefix, improving maintainability.
89-121
: LGTM: AppKeepers structure modernized for SDK v0.50+.The changes properly reflect the SDK migration:
Cosmos sub-struct improvements:
- Pointer types for keepers (
*govkeeper.Keeper
,*upgradekeeper.Keeper
, etc.) align with SDK v0.50+ patterns- Addition of
ConsensusParams
keeper for consensus parameter management- Removal of scoped keepers (no longer needed in v0.50+)
New Modules sub-struct:
- Addition of
TMLight
IBC light client module for IBC functionalityAkash sub-struct cleanup:
- Removal of redundant keepers that are now handled by Cosmos keepers
This structure supports the modular initialization pattern introduced in the new SDK version.
123-134
: LGTM: App struct enhanced with store key management and logging.The additions provide:
- Logging capability:
Log log.Logger
enables structured logging throughout the application- Thread-safe store key initialization:
kOnce sync.Once
ensures keys are initialized only once- Store key management: Separate maps for KV, transient, and memory store keys provide organized access to different store types
This supports the new modular initialization pattern and improves observability.
136-148
: LGTM: Thread-safe key generation with proper initialization.The
GenerateKeys()
method provides:
- Thread-safe initialization using
sync.Once
- Proper separation of key types (KV, transient, memory)
- Clear documentation explaining the purpose of each key type
The implementation follows best practices for concurrent initialization.
150-193
: LGTM: Comprehensive store key accessor methods.The accessor methods provide:
- GetSubspace: Safe parameter subspace access with panic on missing subspace
- Store key getters: Clean access to different store key types
- Testing-specific methods:
GetKey
,GetTKey
,GetMemKey
properly documented for test use onlyAll methods follow consistent patterns and provide appropriate error handling.
195-244
: LGTM: Well-structured special keepers initialization.The
InitSpecialKeepers
method properly initializes critical system keepers:
- Params keeper: Correctly initialized with legacy amino support
- Consensus params keeper: Proper setup with runtime services
- Crisis keeper: Complete initialization with all required parameters
- Upgrade keeper: Properly configured with skip heights and home path
The initialization order and parameter passing are correct for SDK v0.50+.
246-446
: LGTM: Comprehensive keeper initialization with proper dependency management.The
InitNormalKeepers
method demonstrates excellent keeper initialization:Core Cosmos keepers:
- Account, Bank, Authz, Staking, Distribution, Slashing, Mint, FeeGrant keepers properly initialized
- Gov keeper configured with custom metadata length (10,200) and proper router setup
- IBC and Evidence keepers correctly wired with appropriate dependencies
Akash-specific keepers:
- All Akash keepers (Take, Escrow, Deployment, Market, Provider, Audit, Cert) properly initialized
- Correct dependency injection between keepers (e.g., Escrow depends on Bank and Take)
Key strengths:
- Proper use of runtime services for store access
- Correct module address generation for governance
- Appropriate codec and encoding configuration
- Light client module properly integrated
The initialization follows SDK v0.50+ patterns and maintains proper separation of concerns.
448-470
: LGTM: Clean hook setup implementation.The
SetupHooks
method properly configures:
- Staking hooks: Multi-hook setup for distribution and slashing
- Gov hooks: Prepared for future governance hook additions
- Market hooks: Proper integration with escrow events
The hook registration pattern is clean and follows SDK conventions.
472-500
: LGTM: Comprehensive parameter keeper initialization.The
initParamsKeeper
function properly sets up parameter subspaces for all modules:
- Cosmos modules: All standard SDK modules properly configured
- IBC modules: Correct parameter table setup for IBC client and connection types
- Akash modules: All custom Akash modules with appropriate parameter tables
The parameter key table registration is complete and follows SDK patterns.
502-547
: LGTM: Well-organized store key management functions.The helper functions provide:
- kvStoreKeys(): Complete list of all KV store keys needed by the application
- akashKVStoreKeys(): Separate organization of Akash-specific keys
- transientStoreKeys() and memStoreKeys(): Proper categorization of different store types
The modular organization makes it easy to understand and maintain the store key configuration.
566-566
: LGTM: Proper error message formatting.The multiline error message formatting improves readability while maintaining the same functionality.
573-573
: LGTM: Consistent error message formatting.The multiline error message formatting matches the pattern used elsewhere in the function.
app/app.go (22)
9-9
: LGTM: Reflection import added for ChainID method.The
reflect
import is needed for the newChainID()
method that uses reflection to access private BaseApp fields.
15-75
: LGTM: Comprehensive migration to Cosmos SDK v0.50+ and CometBFT.The import updates demonstrate a well-executed migration:
- CometBFT migration: Updated from Tendermint to CometBFT packages
- Cosmos SDK v0.50+: Migration to
cosmossdk.io/*
packages with new runtime services- IBC v10: Updated to latest IBC version
- Akash modules: Migration to new
pkg.akt.dev
module structureThe import organization is clean and follows the new SDK patterns.
82-86
: LGTM: Updated default home path and interface compliance.
- Default home path updated to use environment variable expansion
- Runtime interface compliance checks added for SDK v0.50+ compatibility
92-102
: LGTM: AkashApp structure modernized for SDK v0.50+.The struct now properly embeds:
*baseapp.BaseApp
: Direct access to base application functionality*apptypes.App
: Custom Akash application types and functionalityAdditional fields provide clean access to encoding components and configuration.
105-143
: LGTM: NewApp constructor modernized with proper initialization.Key improvements:
- Encoding configuration: Now accepts
sdkutil.EncodingConfig
for better type safety- BaseApp initialization: Proper setup with tx configuration and options
- Home path handling: Robust fallback to default when not specified
- Embedded structure: Clean initialization of embedded types
The constructor follows SDK v0.50+ patterns and maintains backward compatibility.
169-211
: LGTM: Module manager setup with comprehensive documentation.Excellent documentation explaining:
- When keeper changes should happen (before
module.NewManager
)- Proper keeper passing patterns (struct vs interface)
- Code smell identification for keeper dependencies
The module manager initialization properly:
- Uses the new
appModules
function- Sets up services registration with error handling
- Configures upgrade handlers
The error handling with
panic
is appropriate for application startup failures.
189-197
: LGTM: Proper module execution order configuration.The setup correctly configures:
- PreBlockers: Upgrades and auth modules run before other modules
- BeginBlockers: Uses helper function for consistent ordering
- InitGenesis: Proper genesis initialization order
The comment about upgrades happening in pre-block is helpful for understanding the new SDK v0.50+ lifecycle.
213-220
: LGTM: Modern service registration and store mounting.The setup properly:
- Registers AutoCLI and reflection services for improved developer experience
- Mounts stores using the new accessor methods from
apptypes.App
The service registration enables better tooling integration.
239-254
: LGTM: Comprehensive application lifecycle setup.The lifecycle configuration properly sets up:
- Proposal handling: No-op prepare/process for liveness safety
- Block lifecycle: All phases properly configured (init, pre-block, begin, end, ante, precommit, prepare check state)
The comment about no-op ProcessProposal for liveness is important for understanding the consensus safety approach.
256-262
: LGTM: Proper application loading with error handling.The loading logic correctly:
- Loads the latest version when requested
- Uses
cmos.Exit
for proper application termination on initialization failureThe error handling ensures clean startup failure reporting.
264-320
: LGTM: Well-defined module execution order functions.Both
orderBeginBlockers
andOrderEndBlockers
provide:
- Complete module coverage
- Logical ordering for dependencies
- Clear separation of concerns
The ordering ensures proper module execution sequence throughout the block lifecycle.
344-355
: LGTM: InitChainer updated for SDK v0.50+ with proper error handling.The InitChainer method properly:
- Uses the new ABCI request/response types
- Sets module version map for upgrade compatibility
- Includes error handling for critical operations
- Returns proper response types
The error handling ensures initialization failures are caught early.
357-368
: LGTM: PreBlocker with infinite gas meter for non-deterministic operations.The PreBlocker properly:
- Sets infinite gas meter for non-deterministic operations
- Includes clear documentation about why gas metering is disabled
- Uses proper context management
The gas meter approach prevents consensus issues from non-deterministic gas usage.
371-384
: LGTM: Block lifecycle methods updated for new SDK types.The BeginBlocker and EndBlocker methods:
- Maintain existing patch functionality for height-specific fixes
- Use new SDK return types (
sdk.BeginBlock
,sdk.EndBlock
)- Properly delegate to module manager
The patch system integration is preserved during the SDK migration.
386-397
: LGTM: New lifecycle hooks with proper error handling.The new
Precommitter
andPrepareCheckStater
methods:
- Follow SDK v0.50+ lifecycle patterns
- Include appropriate error handling with panic for critical failures
- Delegate to module manager for consistent behavior
These new lifecycle hooks improve the application's state management capabilities.
400-417
: LGTM: Clean accessor methods using embedded fields.The accessor methods properly return values from embedded fields:
LegacyAmino()
: Returns amino codecAppCodec()
: Returns main codecTxConfig()
: New method for transaction configuration accessModuleAccountAddrs()
: Uses helper function from mac.goAll methods provide clean access to internal configuration.
421-429
: LGTM: BlockedAddrs using helper function.The method properly uses the
ModuleAccountAddrs()
helper function while maintaining the existing logic for determining blocked addresses.
449-467
: LGTM: API registration updated for SDK v0.50+.The method properly:
- Uses client context from API server
- Registers all required gRPC gateway routes (auth, tendermint, modules, node)
- Maintains swagger API registration
- Uses the new
ModuleBasics()
functionThe registration covers all necessary API endpoints for full functionality.
469-486
: LGTM: Service registration methods updated.Both methods properly:
- Use the updated service registration APIs
- Accept appropriate context and configuration parameters
- Handle interface registry correctly
The service registration enables proper gRPC functionality.
496-496
: LGTM: Static file serving path updated.The path prefix change from
/swagger/
to/static/
provides more generic static file serving while maintaining swagger support.
505-525
: LGTM: ChainID accessor with reflection and reflection service caching.ChainID method:
- Properly uses reflection to access private BaseApp field
- Includes helpful comment about removal after SDK adoption
- Provides necessary functionality until SDK exposes this publicly
Reflection service caching:
- Efficient caching to avoid repeated service creation
- Proper error handling for service creation
- Clean implementation for test performance
Both implementations are pragmatic solutions for current SDK limitations.
527-538
: LGTM: NewProposalContext for safe proposal processing.The method provides:
- Branched state for safe querying during proposal processing
- Proper context setup with infinite gas meter
- Consensus parameter integration
- Clear documentation about its purpose
This enables safe proposal validation without affecting the main application state.
evidencetypes "cosmossdk.io/x/evidence/types" | ||
"cosmossdk.io/x/feegrant" | ||
upgradetypes "cosmossdk.io/x/upgrade/types" | ||
"github.com/cosmos/cosmos-sdk/types/module" | ||
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" | ||
vestingtypes "github.com/cosmos/cosmos-sdk/x/auth/vesting/types" | ||
"github.com/cosmos/cosmos-sdk/x/authz" | ||
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" | ||
capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" | ||
consensustypes "github.com/cosmos/cosmos-sdk/x/consensus/types" | ||
crisistypes "github.com/cosmos/cosmos-sdk/x/crisis/types" | ||
distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" | ||
evidencetypes "github.com/cosmos/cosmos-sdk/x/evidence/types" | ||
"github.com/cosmos/cosmos-sdk/x/feegrant" | ||
genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" | ||
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" | ||
minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" | ||
paramskeeper "github.com/cosmos/cosmos-sdk/x/params/keeper" | ||
paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" | ||
slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" | ||
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" | ||
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" | ||
|
||
transfertypes "github.com/cosmos/ibc-go/v4/modules/apps/transfer/types" | ||
ibchost "github.com/cosmos/ibc-go/v4/modules/core/24-host" | ||
|
||
audittypes "github.com/akash-network/akash-api/go/node/audit/v1beta3" | ||
certtypes "github.com/akash-network/akash-api/go/node/cert/v1beta3" | ||
deploymenttypes "github.com/akash-network/akash-api/go/node/deployment/v1beta3" | ||
escrowtypes "github.com/akash-network/akash-api/go/node/escrow/v1beta3" | ||
inflationtypes "github.com/akash-network/akash-api/go/node/inflation/v1beta3" | ||
markettypes "github.com/akash-network/akash-api/go/node/market/v1beta4" | ||
providertypes "github.com/akash-network/akash-api/go/node/provider/v1beta3" | ||
taketypes "github.com/akash-network/akash-api/go/node/take/v1beta3" | ||
|
||
"github.com/akash-network/node/x/audit" | ||
akeeper "github.com/akash-network/node/x/audit/keeper" | ||
"github.com/akash-network/node/x/cert" | ||
ckeeper "github.com/akash-network/node/x/cert/keeper" | ||
"github.com/akash-network/node/x/deployment" | ||
"github.com/akash-network/node/x/escrow" | ||
ekeeper "github.com/akash-network/node/x/escrow/keeper" | ||
agov "github.com/akash-network/node/x/gov" | ||
agovkeeper "github.com/akash-network/node/x/gov/keeper" | ||
"github.com/akash-network/node/x/inflation" | ||
ikeeper "github.com/akash-network/node/x/inflation/keeper" | ||
"github.com/akash-network/node/x/market" | ||
mhooks "github.com/akash-network/node/x/market/hooks" | ||
"github.com/akash-network/node/x/provider" | ||
astaking "github.com/akash-network/node/x/staking" | ||
astakingkeeper "github.com/akash-network/node/x/staking/keeper" | ||
"github.com/akash-network/node/x/take" | ||
tkeeper "github.com/akash-network/node/x/take/keeper" | ||
transfertypes "github.com/cosmos/ibc-go/v10/modules/apps/transfer/types" | ||
ibchost "github.com/cosmos/ibc-go/v10/modules/core/exported" | ||
|
||
audittypes "pkg.akt.dev/go/node/audit/v1" | ||
taketypes "pkg.akt.dev/go/node/take/v1" | ||
|
||
"pkg.akt.dev/node/x/audit" | ||
"pkg.akt.dev/node/x/cert" | ||
"pkg.akt.dev/node/x/deployment" | ||
"pkg.akt.dev/node/x/escrow" | ||
"pkg.akt.dev/node/x/market" | ||
"pkg.akt.dev/node/x/provider" | ||
"pkg.akt.dev/node/x/take" | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Include capability module name in imports and InitGenesis order
Capability must be initialized first so other modules can safely claim capabilities during InitGenesis. Add capability types import and update the order accordingly.
import (
+ capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types"
@@
- ibchost "github.com/cosmos/ibc-go/v10/modules/core/exported"
+ ibchost "github.com/cosmos/ibc-go/v10/modules/core/24-host"
)
And in OrderInitGenesis:
func OrderInitGenesis(_ []string) []string {
return []string{
+ capabilitytypes.ModuleName, // must be first
authtypes.ModuleName,
authz.ModuleName,
banktypes.ModuleName,
distrtypes.ModuleName,
stakingtypes.ModuleName,
slashingtypes.ModuleName,
govtypes.ModuleName,
vestingtypes.ModuleName,
paramstypes.ModuleName,
audittypes.ModuleName,
upgradetypes.ModuleName,
minttypes.ModuleName,
crisistypes.ModuleName,
ibchost.ModuleName,
evidencetypes.ModuleName,
transfertypes.ModuleName,
consensustypes.ModuleName,
feegrant.ModuleName,
cert.ModuleName,
taketypes.ModuleName,
escrow.ModuleName,
deployment.ModuleName,
provider.ModuleName,
market.ModuleName,
genutiltypes.ModuleName,
}
}
📝 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.
evidencetypes "cosmossdk.io/x/evidence/types" | |
"cosmossdk.io/x/feegrant" | |
upgradetypes "cosmossdk.io/x/upgrade/types" | |
"github.com/cosmos/cosmos-sdk/types/module" | |
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" | |
vestingtypes "github.com/cosmos/cosmos-sdk/x/auth/vesting/types" | |
"github.com/cosmos/cosmos-sdk/x/authz" | |
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" | |
capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" | |
consensustypes "github.com/cosmos/cosmos-sdk/x/consensus/types" | |
crisistypes "github.com/cosmos/cosmos-sdk/x/crisis/types" | |
distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" | |
evidencetypes "github.com/cosmos/cosmos-sdk/x/evidence/types" | |
"github.com/cosmos/cosmos-sdk/x/feegrant" | |
genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" | |
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" | |
minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" | |
paramskeeper "github.com/cosmos/cosmos-sdk/x/params/keeper" | |
paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" | |
slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" | |
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" | |
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" | |
transfertypes "github.com/cosmos/ibc-go/v4/modules/apps/transfer/types" | |
ibchost "github.com/cosmos/ibc-go/v4/modules/core/24-host" | |
audittypes "github.com/akash-network/akash-api/go/node/audit/v1beta3" | |
certtypes "github.com/akash-network/akash-api/go/node/cert/v1beta3" | |
deploymenttypes "github.com/akash-network/akash-api/go/node/deployment/v1beta3" | |
escrowtypes "github.com/akash-network/akash-api/go/node/escrow/v1beta3" | |
inflationtypes "github.com/akash-network/akash-api/go/node/inflation/v1beta3" | |
markettypes "github.com/akash-network/akash-api/go/node/market/v1beta4" | |
providertypes "github.com/akash-network/akash-api/go/node/provider/v1beta3" | |
taketypes "github.com/akash-network/akash-api/go/node/take/v1beta3" | |
"github.com/akash-network/node/x/audit" | |
akeeper "github.com/akash-network/node/x/audit/keeper" | |
"github.com/akash-network/node/x/cert" | |
ckeeper "github.com/akash-network/node/x/cert/keeper" | |
"github.com/akash-network/node/x/deployment" | |
"github.com/akash-network/node/x/escrow" | |
ekeeper "github.com/akash-network/node/x/escrow/keeper" | |
agov "github.com/akash-network/node/x/gov" | |
agovkeeper "github.com/akash-network/node/x/gov/keeper" | |
"github.com/akash-network/node/x/inflation" | |
ikeeper "github.com/akash-network/node/x/inflation/keeper" | |
"github.com/akash-network/node/x/market" | |
mhooks "github.com/akash-network/node/x/market/hooks" | |
"github.com/akash-network/node/x/provider" | |
astaking "github.com/akash-network/node/x/staking" | |
astakingkeeper "github.com/akash-network/node/x/staking/keeper" | |
"github.com/akash-network/node/x/take" | |
tkeeper "github.com/akash-network/node/x/take/keeper" | |
transfertypes "github.com/cosmos/ibc-go/v10/modules/apps/transfer/types" | |
ibchost "github.com/cosmos/ibc-go/v10/modules/core/exported" | |
audittypes "pkg.akt.dev/go/node/audit/v1" | |
taketypes "pkg.akt.dev/go/node/take/v1" | |
"pkg.akt.dev/node/x/audit" | |
"pkg.akt.dev/node/x/cert" | |
"pkg.akt.dev/node/x/deployment" | |
"pkg.akt.dev/node/x/escrow" | |
"pkg.akt.dev/node/x/market" | |
"pkg.akt.dev/node/x/provider" | |
"pkg.akt.dev/node/x/take" | |
) | |
// --- imports in app/app_configure.go --- | |
import ( | |
capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" | |
evidencetypes "cosmossdk.io/x/evidence/types" | |
"cosmossdk.io/x/feegrant" | |
upgradetypes "cosmossdk.io/x/upgrade/types" | |
"github.com/cosmos/cosmos-sdk/types/module" | |
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" | |
vestingtypes "github.com/cosmos/cosmos-sdk/x/auth/vesting/types" | |
"github.com/cosmos/cosmos-sdk/x/authz" | |
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" | |
consensustypes "github.com/cosmos/cosmos-sdk/x/consensus/types" | |
crisistypes "github.com/cosmos/cosmos-sdk/x/crisis/types" | |
distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" | |
genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" | |
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" | |
minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" | |
paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" | |
slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" | |
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" | |
transfertypes "github.com/cosmos/ibc-go/v10/modules/apps/transfer/types" | |
ibchost "github.com/cosmos/ibc-go/v10/modules/core/24-host" | |
audittypes "pkg.akt.dev/go/node/audit/v1" | |
taketypes "pkg.akt.dev/go/node/take/v1" | |
"pkg.akt.dev/node/x/audit" | |
"pkg.akt.dev/node/x/cert" | |
"pkg.akt.dev/node/x/deployment" | |
"pkg.akt.dev/node/x/escrow" | |
"pkg.akt.dev/node/x/market" | |
"pkg.akt.dev/node/x/provider" | |
"pkg.akt.dev/node/x/take" | |
) | |
// --- OrderInitGenesis in app/app_configure.go --- | |
func OrderInitGenesis(_ []string) []string { | |
return []string{ | |
capabilitytypes.ModuleName, // must be first | |
authtypes.ModuleName, | |
authz.ModuleName, | |
banktypes.ModuleName, | |
distrtypes.ModuleName, | |
stakingtypes.ModuleName, | |
slashingtypes.ModuleName, | |
govtypes.ModuleName, | |
vestingtypes.ModuleName, | |
paramstypes.ModuleName, | |
audittypes.ModuleName, | |
upgradetypes.ModuleName, | |
minttypes.ModuleName, | |
crisistypes.ModuleName, | |
ibchost.ModuleName, | |
evidencetypes.ModuleName, | |
transfertypes.ModuleName, | |
consensustypes.ModuleName, | |
feegrant.ModuleName, | |
cert.ModuleName, | |
taketypes.ModuleName, | |
escrow.ModuleName, | |
deployment.ModuleName, | |
provider.ModuleName, | |
market.ModuleName, | |
genutiltypes.ModuleName, | |
} | |
} |
🤖 Prompt for AI Agents
In app/app_configure.go around lines 4 to 34, the capability module types are
not imported and the InitGenesis order does not initialize the capability module
first; add the capability types import (e.g., capabilitytypes
"github.com/cosmos/cosmos-sdk/x/capability/types") to the import block and
update the module InitGenesis ordering so the capability module is the first
entry (before auth, bank, staking, IBC, etc.) to ensure capabilities are created
before other modules claim them during InitGenesis.
transfertypes "github.com/cosmos/ibc-go/v10/modules/apps/transfer/types" | ||
ibchost "github.com/cosmos/ibc-go/v10/modules/core/exported" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix IBC host import: use core/24-host for ModuleName
The IBC core “exported” package does not define ModuleName/StoreKey. Use core/24-host instead.
- 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.
transfertypes "github.com/cosmos/ibc-go/v10/modules/apps/transfer/types" | |
ibchost "github.com/cosmos/ibc-go/v10/modules/core/exported" | |
transfertypes "github.com/cosmos/ibc-go/v10/modules/apps/transfer/types" | |
ibchost "github.com/cosmos/ibc-go/v10/modules/core/24-host" |
🤖 Prompt for AI Agents
In app/app_configure.go around lines 21 to 23, the import of the IBC core
"exported" package is incorrect for accessing ModuleName/StoreKey; replace the
import path github.com/cosmos/ibc-go/v10/modules/core/exported with the
core/24-host package (github.com/cosmos/ibc-go/v10/modules/core/24-host) and
update any usages if the package name differs (e.g., host.ModuleName /
host.StoreKey) so ModuleName and StoreKey are resolved from the 24-host package.
app/config.go
Outdated
"github.com/cosmos/ibc-go/modules/capability" | ||
"github.com/cosmos/ibc-go/v10/modules/apps/transfer" | ||
ibc "github.com/cosmos/ibc-go/v10/modules/core" | ||
ibclightclient "github.com/cosmos/ibc-go/v10/modules/light-clients/07-tendermint" | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incorrect capability module import path
The capability module is part of the Cosmos SDK, not IBC-Go. Importing it from ibc-go will fail. Switch to the SDK path.
- "github.com/cosmos/ibc-go/modules/capability"
+ capability "github.com/cosmos/cosmos-sdk/x/capability"
📝 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.
"github.com/cosmos/ibc-go/modules/capability" | |
"github.com/cosmos/ibc-go/v10/modules/apps/transfer" | |
ibc "github.com/cosmos/ibc-go/v10/modules/core" | |
ibclightclient "github.com/cosmos/ibc-go/v10/modules/light-clients/07-tendermint" | |
) | |
import ( | |
capability "github.com/cosmos/cosmos-sdk/x/capability" | |
"github.com/cosmos/ibc-go/v10/modules/apps/transfer" | |
ibc "github.com/cosmos/ibc-go/v10/modules/core" | |
ibclightclient "github.com/cosmos/ibc-go/v10/modules/light-clients/07-tendermint" | |
) |
🤖 Prompt for AI Agents
In app/config.go around lines 24 to 28 the capability module is incorrectly
imported from ibc-go; change the import path to the Cosmos SDK capability module
(github.com/cosmos/cosmos-sdk/x/capability) so the package resolves correctly,
keep the package name as capability, update any import aliases if needed, and
run go mod tidy/build to verify imports compile.
ibctransfertypes "github.com/cosmos/ibc-go/v10/modules/apps/transfer/types" | ||
ibchost "github.com/cosmos/ibc-go/v10/modules/core/exported" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix IBC host import: use core/24-host for StoreKey/ModuleName
The IBC host constants (StoreKey/ModuleName) live in core/24-host. The current import points to core/exported, which does not define these constants and will fail to compile.
Apply:
- 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.
ibctransfertypes "github.com/cosmos/ibc-go/v10/modules/apps/transfer/types" | |
ibchost "github.com/cosmos/ibc-go/v10/modules/core/exported" | |
ibctransfertypes "github.com/cosmos/ibc-go/v10/modules/apps/transfer/types" | |
- ibchost "github.com/cosmos/ibc-go/v10/modules/core/exported" | |
+ ibchost "github.com/cosmos/ibc-go/v10/modules/core/24-host" |
🤖 Prompt for AI Agents
In app/sim_test.go around lines 36 to 38, the import currently pulls ibchost
from "github.com/cosmos/ibc-go/v10/modules/core/exported" but the IBC host
constants StoreKey and ModuleName live in
"github.com/cosmos/ibc-go/v10/modules/core/24-host"; update the import path to
core/24-host (keeping the ibchost alias) so the file imports ibchost
"github.com/cosmos/ibc-go/v10/modules/core/24-host" and can reference
StoreKey/ModuleName successfully.
Signed-off-by: Artur Troian <[email protected]>
There was a problem hiding this 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
♻️ Duplicate comments (3)
.github/workflows/tests.yaml (1)
49-49
: Composite action metadata missing required description (actionlint) — please add itactionlint reports that .github/actions/setup-ubuntu/action.yaml is missing the required description field. Add a description to the action’s metadata.
Apply in the action metadata (not here) for example:
name: setup-ubuntu description: Set up Ubuntu with required packages, Go toolchain, Node, and direnv for Akash buildsapp/config.go (1)
3-27
: Include capability module basic to align with IBC capability keeper usageMost IBC-enabled apps include the capability module basic to keep capability state aligned with IBC channel/scoped keepers. If capability is initialized elsewhere, ignore; otherwise, add it here using the Cosmos SDK path (not ibc-go).
@@ import ( + capability "github.com/cosmos/cosmos-sdk/x/capability" @@ consensus.AppModuleBasic{}, crisis.AppModuleBasic{}, slashing.AppModuleBasic{}, + capability.AppModuleBasic{}, ibclightclient.AppModuleBasic{},This follows up on the earlier feedback about the capability module path (use the Cosmos SDK
x/capability
, notibc-go
).Also applies to: 53-57
go.mod (1)
55-77
: Conflicting replaces: x/exp and rapid pins will fight the graph (and likely break builds)You’re pinning
golang.org/x/exp
(2023) andrapid
v0.5.5, but the graph also requiresx/exp
(2025) andrapid
v1.2.0 later in this file. The replaces will force older APIs, causing compile issues.Remove the stale replaces so the graph resolves to the newer, required versions:
replace ( @@ - // 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 )I can run a tidy and propose any further needed bumps if you share the resolver output.
🧹 Nitpick comments (6)
.github/workflows/tests.yaml (4)
123-124
: Quote env var expansions in git tag step (SC2086)Safer and shellcheck-clean to quote tag/message values.
- run: git tag -a ${{ env.RELEASE_TAG }} -m ${{ env.RELEASE_TAG }} + run: git tag -a "${{ env.RELEASE_TAG }}" -m "${{ env.RELEASE_TAG }}"
148-152
: Make the semver validation loop robust to whitespace/special charsUse read -r and process substitution to avoid word splitting/globbing on the find output.
- while read upgrade; do - ./script/semver.sh validate "$upgrade" - done <<< $(find "$dir" ! -path "$dir" -maxdepth 1 -type d -exec basename {} \;) + while IFS= read -r upgrade; do + ./script/semver.sh validate "$upgrade" + done < <(find "$dir" ! -path "$dir" -maxdepth 1 -type d -exec basename {} \;)
140-140
: Fix grammar in step nameMinor nitpick: “directories exist”, not “exists.”
- - name: Ensure only directories exists in upgrades dir + - name: Ensure only directories exist in upgrades dir
24-26
: macOS: chsh and .bashrc hook likely no-ops in GitHub ActionsActions runs non-interactive bash by default and doesn’t load .bashrc. Changing the login shell via chsh won’t affect the shell used by steps. Suggest removing these to speed up the job, or explicitly set the job shell to Homebrew bash if truly required.
- sudo chsh -s /usr/local/bin/bash - - name: Hook direnv to bash - run: echo 'eval "$(direnv hook bash)"' >> $HOME/.bashrc + # Removed: chsh/.bashrc hook are unnecessary in GHA non-interactive shellsIf you really need Homebrew bash for scripts, set:
jobs: build-macos: runs-on: macos-latest defaults: run: shell: /usr/local/bin/bash -eo pipefail {0}app/config.go (2)
47-50
: Only params proposal handler registered — verify governance surfaceRegistering just
paramsclient.ProposalHandler
narrows governance functionality (e.g., no software upgrade proposals). Confirm this is intentional and that any missing proposal types are provided elsewhere (e.g., via Msg-based authority flows).If upgrades should be proposal-driven, add upgrade proposal handlers. Example:
@@ - gov.NewAppModuleBasic( - []govclient.ProposalHandler{ - paramsclient.ProposalHandler, - }, - ), + gov.NewAppModuleBasic( + []govclient.ProposalHandler{ + paramsclient.ProposalHandler, + // If required: + // upgradeclient.ProposalHandler, + }, + ),Note: you will also need to import the client package for upgrade if you add it:
upgradeclient "github.com/cosmos/cosmos-sdk/x/upgrade/client"Want me to wire the appropriate proposal handlers based on your desired governance surface?
69-72
: Nit: tighten comment wording-// ModuleBasics returns all app modules basics +// ModuleBasics returns the app's module basics.
📜 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 settings in your CodeRabbit configuration.
⛔ Files ignored due to path filters (1)
go.sum
is excluded by!**/*.sum
📒 Files selected for processing (3)
.github/workflows/tests.yaml
(8 hunks)app/config.go
(2 hunks)go.mod
(1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
app/config.go (2)
x/deployment/module.go (8)
AppModuleBasic
(44-46)AppModuleBasic
(60-62)AppModuleBasic
(65-67)AppModuleBasic
(78-80)AppModuleBasic
(83-90)AppModuleBasic
(93-98)AppModuleBasic
(101-103)AppModuleBasic
(106-108)x/market/module.go (8)
AppModuleBasic
(43-45)AppModuleBasic
(54-56)AppModuleBasic
(59-61)AppModuleBasic
(70-72)AppModuleBasic
(75-82)AppModuleBasic
(85-90)AppModuleBasic
(93-95)AppModuleBasic
(98-100)
🪛 actionlint (1.7.7)
.github/workflows/tests.yaml
49-49: description is required in metadata of "setup-ubuntu" action at "/home/jailuser/git/.github/actions/setup-ubuntu/action.yaml"
(action)
⏰ 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). (12)
- GitHub Check: lint-shell
- GitHub Check: lint-go
- GitHub Check: build-macos
- GitHub Check: build-bins
- GitHub Check: sims
- GitHub Check: lint-go
- GitHub Check: lint-shell
- GitHub Check: coverage
- GitHub Check: release-dry-run
- GitHub Check: tests
- GitHub Check: build-macos
- GitHub Check: build-bins
🔇 Additional comments (6)
.github/workflows/tests.yaml (2)
46-50
: Good adoption of the centralized setup action across Linux jobsSwitching to the composite setup action keeps env provisioning consistent and reduces duplication. This pattern is applied well across build-bins/tests/coverage/lint/sims/release-dry-run/upgrade jobs.
176-179
: Quote github.ref in shell to avoid word splitting (SC2086)Unquoted GitHub expression can split if it ever contains spaces. Quote it.
[uggest_essential_refactor]- test_required=$(./script/upgrades.sh test-required ${{ github.ref }}) + test_required="$(./script/upgrades.sh test-required "${{ github.ref }}")"app/config.go (2)
24-26
: IBC-Go v10 imports and light client wiring look correctUsing ibc-go v10 module paths (core, transfer, 07-tendermint light client) is aligned with Cosmos SDK v0.53.x.
Also applies to: 56-61
36-36
: Good upgrade to genutil’s new APISwitching to
genutil.NewAppModuleBasic(genutiltypes.DefaultMessageValidator)
matches the v0.53+ pattern.go.mod (2)
22-26
: Cosmos SDK v0.53.3 + ibc-go v10.3.0 pairing is correctThe selected versions are compatible and match the v0.53 series expectations.
70-71
: Legacy goleveldb pin — verify necessity under SDK 0.53The pin to a 2021 goleveldb commit was needed for older SDK lines. With
cometbft-db
and the currentcosmos-db/iavl
stack, this may be obsolete. Consider removing it to avoid dragging legacy code unless you have a migration dependency.Would you like me to test-resolve the graph without this replace and report any conflicts?
uses: actions/checkout@v4 | ||
- name: Setup environment | ||
uses: ./.github/actions/setup-ubuntu | ||
- run: make lint-shell | ||
|
||
sims: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: rokroskar/workflow-run-cleanup-action@master |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Pin third-party actions to commit SHAs for supply-chain safety
A few actions are referenced by branch or tag. For third-party actions, pin to a known-good commit SHA to reduce supply-chain risk.
Examples to update (replace COMMIT_SHA with the intended digest):
- - uses: rokroskar/workflow-run-cleanup-action@master
+ - uses: rokroskar/workflow-run-cleanup-action@<COMMIT_SHA>
- - uses: docker/setup-qemu-action@v3
+ - uses: docker/setup-qemu-action@<COMMIT_SHA>
- - uses: docker/setup-buildx-action@v3
+ - uses: docker/setup-buildx-action@<COMMIT_SHA>
- - uses: fregante/setup-git-user@v2
+ - uses: fregante/setup-git-user@<COMMIT_SHA>
- - uses: HatsuneMiku3939/direnv-action@v1
+ - uses: HatsuneMiku3939/direnv-action@<COMMIT_SHA>
- - uses: actions/upload-artifact@v4
+ - uses: actions/upload-artifact@<COMMIT_SHA>
- - uses: codecov/codecov-action@v4
+ - uses: codecov/codecov-action@<COMMIT_SHA>
- - uses: benc-uk/workflow-dispatch@v1
+ - uses: benc-uk/workflow-dispatch@<COMMIT_SHA>
Note: Pinning official actions under actions/* is also recommended by many orgs, but the priority is third-party ones listed above.
Also applies to: 116-118, 119-119, 173-173, 191-191, 68-68, 215-215
🤖 Prompt for AI Agents
.github/workflows/tests.yaml lines 92 (and also update lines 116-118, 119, 173,
191, 68, 215): third-party GitHub Actions are referenced by branch/tag (e.g.,
rokroskar/workflow-run-cleanup-action@master) which is a supply-chain risk;
replace each third-party action reference with the specific commit SHA for a
known-good release (format: owner/repo@COMMIT_SHA) — find the intended commit on
the action's repository, copy its full commit SHA, and update those workflow
steps to use that SHA, committing the updated workflow file.
go 1.24.3 | ||
|
||
toolchain go1.23.6 | ||
toolchain go1.24.4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
Toolchain requires Go 1.24.x — align CI and images
The go
and toolchain
directives require Go 1.24.x. Ensure workflows, Dockerfiles, and devcontainer use 1.24.x to avoid build-time toolchain errors.
Run this script to spot mismatches:
🏁 Script executed:
#!/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
Length of output: 1006
Toolchain requires Go 1.24.x — align CI, Docker images, and dev environments
I searched for Go version references in GitHub workflows, Dockerfiles, devcontainer.json, and Makefiles/Taskfiles. The only hit was in _build/Dockerfile.test
, which still uses an unpinned golang:alpine
. To prevent mismatches and build-time errors, please:
- .github/workflows/
Ensure you’re using actions/setup-go with Go 1.24.x, for example:- uses: actions/setup-go@v3 with: go-version: '1.24.x'
- _build/Dockerfile.test
Pin the base image to Go 1.24:- FROM golang:alpine AS build-env + FROM golang:1.24-alpine AS build-env
- devcontainer.json, Makefile, Taskfile
If you specifyGO_VERSION
ortoolchain
hints, update them to1.24.x
.
This will keep your CI, Docker images, and local/devcontainer environments in sync with the go 1.24.3
and toolchain go1.24.4
directives in go.mod.
🤖 Prompt for AI Agents
In go.mod around lines 3 to 5, the repo declares Go 1.24.x (go 1.24.3 /
toolchain go1.24.4) but CI/Docker/dev files are not pinned; update them to
match: in .github/workflows use actions/setup-go@v3 with go-version: '1.24.x';
in _build/Dockerfile.test pin the base image to a 1.24 variant (e.g.,
golang:1.24-alpine or golang:1.24.x as appropriate); and update any GO_VERSION
or toolchain hints in devcontainer.json, Makefile, and Taskfile to 1.24.x so CI,
Docker images, and dev environments stay in sync with go.mod.
go.mod
Outdated
replace ( | ||
// use cosmos fork of keyring | ||
github.com/99designs/keyring => github.com/cosmos/keyring v1.2.0 | ||
github.com/cosmos/cosmos-sdk => github.com/akash-network/cosmos-sdk v0.45.16-akash.5 | ||
|
||
// use akash version of cosmos ledger api | ||
github.com/cosmos/ledger-cosmos-go => github.com/akash-network/ledger-go/cosmos v0.14.4 | ||
// dgrijalva/jwt-go is deprecated and doesn't receive security updates. | ||
// TODO: remove it: https://github.com/cosmos/cosmos-sdk/issues/13134 | ||
github.com/dgrijalva/jwt-go => github.com/golang-jwt/jwt/v4 v4.4.2 | ||
// use akash fork of cometbft | ||
github.com/cometbft/cometbft => github.com/akash-network/cometbft v0.38.17-akash.2 | ||
// use akash fork of cosmos sdk | ||
github.com/cosmos/cosmos-sdk => github.com/akash-network/cosmos-sdk v0.53.3-akash.4 | ||
|
||
github.com/cosmos/gogoproto => github.com/akash-network/gogoproto v1.7.0-akash.2 | ||
|
||
// Fix upstream GHSA-h395-qcrw-5vmq vulnerability. | ||
// TODO Remove it: https://github.com/cosmos/cosmos-sdk/issues/10409 | ||
github.com/gin-gonic/gin => github.com/gin-gonic/gin v1.8.1 | ||
// Use regen gogoproto fork | ||
// To be replaced by cosmos/gogoproto in future versions | ||
github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 | ||
// use cometBFT system fork of tendermint with akash patches | ||
|
||
github.com/tendermint/tendermint => github.com/akash-network/cometbft v0.34.27-akash.5 | ||
// as per v0.47.x migration guide goleveldb version must be pinned for the app to work correctly | ||
github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 | ||
|
||
github.com/zondax/hid => github.com/troian/hid v0.13.2 | ||
github.com/zondax/ledger-go => github.com/akash-network/ledger-go v0.14.3 | ||
// latest grpc doesn't work with with cosmos-sdk modified proto compiler, so we need to enforce | ||
// the following version across all dependencies. | ||
google.golang.org/grpc => google.golang.org/grpc v1.33.2 | ||
// 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 | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
Replace zondax HID/Ledger with intended forks
go.mod still pulls github.com/zondax/hid
and github.com/zondax/ledger-go
indirectly. If you intend to use troian/hid
and akash-network/ledger-go
(per PR notes), 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
@@
- 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
to drop the indirect zondax entries.
Also applies to: 244-246
🏁 Script executed:
#!/bin/bash
set -e
# Search for zondax and troian modules in go.mod
grep -n 'github.com/zondax/hid' go.mod || echo 'No match for zondax/hid'
grep -n 'github.com/zondax/ledger-go' go.mod || echo 'No match for zondax/ledger-go'
grep -n 'github.com/troian/hid' go.mod || echo 'No match for troian/hid'
grep -n 'github.com/akash-network/ledger-go' go.mod || echo 'No match for akash-network/ledger-go'
# Check require lines for any zondax entries
grep -n 'require .*zondax' go.mod || echo 'No require entries for zondax modules'
Length of output: 543
Add missing replace directives for HID and Ledger forks
The current go.mod
still pulls the original Zondax packages indirectly:
- Line 244:
github.com/zondax/hid v0.9.2 // indirect
- Line 245:
github.com/zondax/ledger-go v0.14.3 // indirect
If you intend to switch to the Troian HID fork and the Akash Ledger fork, add these replaces inside the existing replace
block (e.g. after the gogoproto
entry):
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
// as per v0.47.x migration guide goleveldb version must be pinned…
github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7
…
)
Then run:
go mod tidy
to drop the old indirect Zondax entries.
🤖 Prompt for AI Agents
In go.mod around lines 55 to 77, the replace block is missing directives to
override the indirect Zondax packages; add replace entries for
github.com/zondax/hid and github.com/zondax/ledger-go pointing to the Troian HID
fork and the Akash Ledger fork respectively (place them inside the existing
replace (...) block, e.g. after the gogoproto entry), then run go mod tidy to
remove the old indirect Zondax entries from the module file.
Signed-off-by: Artur Troian <[email protected]>
There was a problem hiding this 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 remainModule 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 environmentsKeep 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 forksThe 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.2Afterwards, 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.
⛔ 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 correctThis pairing matches the compatibility matrix for SDK v0.53.x. Good upgrade.
59-66
: Replace rules to Akash forks (cometbft, cosmos-sdk, gogoproto) look consistentThe 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 oneYou 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
Signed-off-by: Artur Troian <[email protected]>
Signed-off-by: Artur Troian <[email protected]>
There was a problem hiding this 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 ExecuteWithCtxSupport 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-runAdd 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 executionAdding 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’ varMinor 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.
⛔ 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 registrationReturning 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 goodGood 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.AddModuleInitFlagsIn 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 commandIf 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]>
There was a problem hiding this 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.xYou’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 pathEnsure all Go imports, docs, and scripts have moved from
github.com/akash-network/node
topkg.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 replacego.mod still pulls
github.com/zondax/hid
andgithub.com/zondax/ledger-go
indirectly. If the intent is to usetroian/hid
andakash-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 themThese 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.5Afterward:
- 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 toolsIf
github.com/ianlancetaylor/cgosymbolizer
is used only for developer tooling, consider moving it under atools.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 = qAdditionally, 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 discoverySame 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 = cNote: 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 driftUsing 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.
⛔ 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
, andtoolchain 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 replaceCometBFT, 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.modNo 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 yourgo.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 correctThe import path updates align with the SDK v0.50/CometBFT migration and the new pkg.akt.dev module layout. No issues spotted here.
Signed-off-by: Artur Troian <[email protected]>
There was a problem hiding this 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.2Then:
go mod tidy rg -n "zondax/(hid|ledger-go)" go.mod || trueapp/sim_test.go (1)
37-39
: Fix IBC host import: use core/24-host for StoreKey/ModuleNameThe 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.modAlso applies to: 234-234
app/sim_test.go (6)
126-126
: Use the AppName constant for consistencyPrefer 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 outputSwitch 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 comparisonsNewContext(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 pathUse 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 coverageThe 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 helperThe 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.
⛔ 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
⏰ 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 styleAppStateFn, RandomAccounts, operations builder, and ModuleAccountAddrs are correctly passed to SimulateFromSeed.
447-452
: InitChain usage looks correctPassing exported.AppState and the chain ID via RequestInitChain is aligned with the rest of the test setup.
|
||
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) | ||
|
There was a problem hiding this comment.
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.
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) |
ibchost.StoreKey, | ||
appA, | ||
appB, | ||
[][]byte{}, | ||
}, | ||
{ |
There was a problem hiding this comment.
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.
if sim.FlagVerboseValue { | ||
logger = log.NewTestLogger(&testing.T{}) | ||
} else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
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.
// 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 |
There was a problem hiding this comment.
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/api v0.0.0-20240311132316-a219d84964c2 // indirect | ||
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Signed-off-by: Artur Troian <[email protected]>
There was a problem hiding this 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 remainGood 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
withtoolchain 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 mismatchesYou 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.5Then:
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 duplicatesgopkg.in/yaml.v2
. This will breakgo mod tidy
.- go.yaml.in/yaml/v2 v2.4.2 // indirect
After removal:
go mod tidyAlso applies to: 273-273
244-246
: Intended HID/Ledger forks not enforced; add replace directives to stop pulling Zondax originalsYou still pull
github.com/zondax/hid
andgithub.com/zondax/ledger-go
indirectly. If you intend to usetroian/hid
andakash-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.2Then:
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 importszondax/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.9Known 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 // indirectThen:
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 clarityYou require
github.com/cosmos/cosmos-sdk v0.53.3
but replace toakash-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.4Also 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.
⛔ 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
⏰ 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 correctlyReplace 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 byakash-network/cometbft v0.38.17-akash.2
looks consistent.Also applies to: 60-60
Signed-off-by: Artur Troian <[email protected]>
There was a problem hiding this 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 satisfygo
/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 topkg.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 andrapid
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.5Then:
go mod tidyAlso 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
andgithub.com/zondax/ledger-go v0.14.3
still resolve indirectly. If the plan is to usetroian/hid
andakash-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 tidyAlso 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 // indirectFollow with:
go get github.com/hashicorp/[email protected] go mod tidy
258-258
: Invalid module path:go.yaml.in/yaml/v2
— remove (duplicatesgopkg.in/yaml.v2
).
go.yaml.in/yaml/v2
is not a valid module path and will breakgo mod tidy
. You already havegopkg.in/yaml.v2 v2.4.0
.- go.yaml.in/yaml/v2 v2.4.2 // indirect
Then:
go mod tidyAlso 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.
⛔ 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
⏰ 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
withcosmos-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/akashI’ve confirmed that the only place
cli.DefaultHome
is used incmd/akash
is in thePersistentPreRunE
call (line 40), while every other reference in this package usesapp.DefaultHome
. The environment prefix"AKASH"
is also consistently passed to bothcli.GetPersistentPreRunE
andcmd.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 incmd/akash
– TheExecute(rootCmd, "AKASH")
call incmd/akash/main.go
already matches the same"AKASH"
prefix
Signed-off-by: Artur Troian <[email protected]>
There was a problem hiding this 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 readsFlagHome
and applies it to the Tendermint config viaconfig.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 applyhomePath
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 localappOpts
passed intoappExport
. 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.
📒 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.
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 | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
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.
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) | ||
} | ||
|
There was a problem hiding this comment.
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.
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.
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) | ||
} |
There was a problem hiding this comment.
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.
Signed-off-by: Artur Troian <[email protected]>
There was a problem hiding this 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.5After 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 // indirectapp/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.
⛔ 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
⏰ 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 everyauthtypes.NewModuleAddress(…)
usage inapp/
; no Akash-specific module accounts are missing or require extra Burner/Minter permissions.
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" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
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.
ibchost.StoreKey, | ||
appA, | ||
appB, | ||
[][]byte{}, | ||
}, | ||
{ | ||
ibctransfertypes.StoreKey, | ||
appA, | ||
appB, | ||
[][]byte{}, | ||
}, |
There was a problem hiding this comment.
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/exported
→ github.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.
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" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
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()), | ||
) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
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.
// 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(), | ||
) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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(), ...).
// 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 | ||
} |
There was a problem hiding this comment.
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.
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, | ||
} | ||
|
There was a problem hiding this comment.
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.
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]>
There was a problem hiding this 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/nodeScan 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 directivesPin 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.5Then run: go mod tidy
176-178
: Upgrade hashicorp/go-getter to patch known symlink vulnerabilityv1.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 // indirectThen: go get github.com/hashicorp/[email protected] && go mod tidy
59-65
: Add replaces for HID/Ledger forks to remove indirect zondax pullsYou 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.2Then: 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.
⛔ 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
⏰ 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.xCompatibility is correct for the 0.53 line.
70-72
: Confirm single goleveldb version after tidyYou 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)
Signed-off-by: Artur Troian <[email protected]>
during deposit authorization use only funds that remaining unset after deducting from owner balance Signed-off-by: Artur Troian <[email protected]>
Signed-off-by: Artur Troian <[email protected]>
Signed-off-by: Artur Troian <[email protected]>
There was a problem hiding this 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 toolchaingo 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.5Then:
go mod tidyAlso applies to: 261-261, 279-279
244-246
: Add replaces to use troian/hid and akash-network/ledger-go forksgo.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.2Then:
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 entryThis 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 tidyAlso 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.
⛔ 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
⏰ 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 correctThe 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 goodReplaces 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
🤖 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).
refs akash-network/support#212