Conversation
WalkthroughThis update is a comprehensive refactor and modernization of the Akash blockchain node codebase. It upgrades dependencies to Cosmos SDK v0.50+, CometBFT v0.37+, and updates module paths to Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant CLI
participant AkashApp
participant CosmosSDK
participant CometBFT
participant Keepers
participant Modules
User->>CLI: Run command (e.g., start, testnet, prepare-genesis)
CLI->>AkashApp: Initialize app with encoding config, keepers, modules
AkashApp->>Keepers: InitSpecialKeepers & InitNormalKeepers
AkashApp->>Modules: Register modules, services, routes
AkashApp->>CometBFT: Integrate with ABCI/mempool/lanes
AkashApp->>CosmosSDK: Use new lifecycle hooks (BeginBlocker, EndBlocker, etc.)
CLI->>AkashApp: (if testnet) Call InitAkashAppForTestnet
AkashApp->>Keepers: Setup testnet state, validators, balances
User->>CLI: (if simulation) Run simulation tests
CLI->>AkashApp: Setup app for simulation
AkashApp->>Modules: Run simulation modules
Estimated code review effort🎯 5 (Critical) | ⏱️ ~180 minutes This is an extensive, high-complexity refactor affecting core application logic, module wiring, simulation, testnet, CLI, scripts, and CI/CD. It includes both major additions and removals, and requires careful review of new patterns, error handling, and SDK integration. Possibly related PRs
Poem
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. ✨ 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. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
adb4e21 to
4b1d7d3
Compare
There was a problem hiding this comment.
Actionable comments posted: 36
🔭 Outside diff range comments (4)
cmd/akash/cmd/auth.go (3)
68-87:nbfparsing updates the wrong variable (exp)
Inside theFlagJWTNbfbranch you mutateexp, leavingnbfunchanged. This makes the laternbf/expvalidation meaningless.- exp = time.Unix(nbfInt, 0) + nbf = time.Unix(nbfInt, 0) ... - exp = now.Add(dur) + nbf = now.Add(dur)
101-107: Copy-paste bug – wrong flag constant used for scope
You fetchFlagJWTAccessinstead ofFlagJWTScope, so the--scopeflag is silently ignored.- scopeString, err := cmd.Flags().GetString(FlagJWTAccess) + scopeString, err := cmd.Flags().GetString(FlagJWTScope)
116-118: Logic ofnbfvsexpvalidation inverted
Error should trigger whennbfis not beforeexp, not when it is not after.-if !nbf.After(exp) { +if !nbf.Before(exp) {make/releasing.mk (1)
10-10: Remove duplicate variable definitionThe
GORELEASER_MOD_MOUNTvariable is defined twice with different logic. The first definition (line 10) appears to be obsolete.-#GORELEASER_MOD_MOUNT ?= $(shell git config --get remote.origin.url | sed -r 's/.*(\@|\/\/)(.*)(\:|\/)([^:\/]*)\/([^\/\.]*)\.git/\2\/\4\/\5/' | tr -d '\n') -GORELEASER_MOD_MOUNT ?= $(shell cat $(ROOT_DIR)/.github/repo | tr -d '\n') +GORELEASER_MOD_MOUNT ?= $(shell cat $(AKASH_ROOT)/.github/.repo | tr -d '\n')Also applies to: 14-14
🧹 Nitpick comments (23)
_docs/adr/adr-001-network-upgrades.md (2)
42-49: Replace hard tabs with spaces in the code blockThe snippet still contains literal tab characters, which
markdownlint(MD010) flags. Tabs inside fenced blocks aren’t ignored by default, so the file will keep failing lint checks.-import ( - "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" +import ( + "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" )Converting to four spaces (or re-configuring the linter to ignore fenced blocks) removes MD010 violations while keeping alignment intact.
42-49:fmtmissing from the illustrated import listTwo lines below (72-73) the example uses
fmt.Sprintf, butfmtis not imported in the snippet. Readers copying the example verbatim will hit a compile error.import ( "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" + "fmt" )Adding the line keeps the sample self-contained and compile-ready.
README.md (1)
31-31: Update text to match the CometBFT link for consistency.While the hyperlink correctly points to CometBFT, the text still mentions "tendermint". Consider updating the text to maintain consistency.
-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 thatmake/mod.mk (1)
11-15: Remove or activate the commented-outmodtargetLeaving dead code in Makefiles increases maintenance overhead. Either:
-#.PHONY: mod -#mod: go.mod -# -#go.mod: -# go mod tidyor uncomment and rely on it consistently across workflows.
.github/workflows/release.yaml (1)
67-68: Fix shell quoting issueThe static analysis tool identified a shell quoting issue. The variable should be quoted to prevent word splitting.
- run: | - toolchain=$(./script/tools.sh gotoolchain | sed 's/go*//') + run: | + toolchain=$(./script/tools.sh gotoolchain | sed 's/go*//')Actually, the issue is likely in the tools.sh script itself. The current usage appears correct.
.github/actions/setup-ubuntu/action.yaml (1)
17-19: Improve robustness of Go version detection.The
sedcommand assumes the output starts with "go" but could be more explicit and handle edge cases.- toolchain=$(./script/tools.sh gotoolchain | sed 's/go*//') + toolchain=$(./script/tools.sh gotoolchain | sed 's/^go//')This ensures only the leading "go" is removed, not all occurrences of "go" in the string.
app/upgrades.go (1)
53-54: Add documentation for the custom pre-upgrade handler.The empty
customPreUpgradeHandlermethod should include documentation explaining its purpose and when it gets called.+// customPreUpgradeHandler is called when an upgrade is scheduled for the next block. +// This method can be used to perform any custom logic before the upgrade is applied. func (app *AkashApp) customPreUpgradeHandler(_ upgradetypes.Plan) { + // TODO: Add custom pre-upgrade logic if needed }app/decorators/min_commision.go (1)
75-75: Consider using Wrapf for consistency.For consistency with other error messages in this file, consider using
Wrapfwith a formatted message.- return sdkerrors.ErrUnauthorized.Wrap("cannot unmarshal authz exec msgs") + return sdkerrors.ErrUnauthorized.Wrapf("cannot unmarshal authz exec msgs").envrc (1)
61-63: Fix the extra space in the error message.There's an extra space between "git-cliff" and "is" in the error message.
if ! has git-cliff; then - echo "git-cliff is not installed" + echo "git-cliff is not installed" exit 1app/config.go (1)
12-12: Consider removing commented capability module references.The capability module is commented out in both the import and module basics. If this module is no longer needed, consider removing these lines entirely rather than keeping them commented.
- //"github.com/cosmos/cosmos-sdk/x/capability" "github.com/cosmos/cosmos-sdk/x/crisis" ... - //capability.AppModuleBasic{}, // validator stakingAlso applies to: 39-39
app/lanes.go (1)
18-21: Consider making blockspace percentages configurable.The blockspace allocation percentages are hardcoded. Consider making these configurable through app parameters or configuration files to allow for easier adjustments without code changes.
go.mod (1)
66-67: Address the temporary akash-api EOL version replace directive.The replace directive points to an end-of-life (EOL) version of akash-api. As noted in the TODO comment, this should be removed post-upgrade.
Would you like me to create an issue to track the removal of this temporary replace directive?
events/publish.go (1)
72-74: Handle error from UnsubscribeAll in defer.The error from
UnsubscribeAllis assigned but not used.Apply this diff:
defer func() { - err = ev.ebus.UnsubscribeAll(ctx, blkHeaderName) + if err := ev.ebus.UnsubscribeAll(ctx, blkHeaderName); err != nil { + // Log the error or handle it appropriately + _ = err + } }()script/tools.sh (2)
42-42: Use consistent command detection method.The script defines
is_commandfunction but useswhichhere instead.Apply this diff:
- if which go >/dev/null 2>&1; then + if is_command go; then
187-187: Redirect dpkg output to avoid cluttering stdout.The
dpkg -lcommand outputs package information to stdout, which should be suppressed.Apply this diff:
- if ! dpkg -l "$dep"; then + if ! dpkg -l "$dep" >/dev/null 2>&1; thenapp/modules.go (1)
195-199: Clarify the status of the auction module.The auction module is commented out in both
appModulesandappSimModules. Please add a comment explaining whether this is temporary or if the module has been removed.+ // TODO: auction module temporarily disabled - see issue #XXX //auction.NewAppModule( // app.cdc, // *app.Keepers.External.Auction, //),Also applies to: 295-298
.github/workflows/tests.yaml (1)
23-23: Good standardization of dependency installation.The consistent installation of dependencies across all jobs improves maintainability. Consider extracting this into a reusable composite action to reduce duplication.
Create a composite action
.github/actions/setup-dependencies/action.yaml:name: 'Setup Dependencies' description: 'Install common dependencies for CI jobs' runs: using: "composite" steps: - name: Install dependencies run: sudo apt install -y make direnv unzip lz4 wget curl npm jq pv coreutils shell: bash - name: Install git-cliff uses: baptiste0928/cargo-install@v3 with: crate: git-cliffAlso applies to: 49-54, 72-77, 96-101, 121-126, 145-150, 172-177, 203-208, 237-242, 300-305
app/sim/sim_config.go (2)
23-23: Track the TODO for removing FlagOnOperationValue.The comment indicates this flag should be removed in favor of binary search for invariant violation.
Would you like me to create an issue to track this TODO?
74-74: Consider making the DB backend configurable.The DB backend is hardcoded to "goleveldb". Consider making this configurable via a flag for flexibility in different environments.
+var FlagDBBackendValue string + // GetSimulatorFlags gets the values of all the available simulation flags func GetSimulatorFlags() { // config fields + flag.StringVar(&FlagDBBackendValue, "DBBackend", "goleveldb", "database backend for simulation") flag.StringVar(&FlagGenesisFileValue, "Genesis", "", "custom simulation genesis file; cannot be used with params file") // NewConfigFromFlags creates a simulation from the retrieved values of the flags. func NewConfigFromFlags() simulation.Config { return simulation.Config{ // ... other fields ... - DBBackend: "goleveldb", + DBBackend: FlagDBBackendValue, } }app/sim_test.go (1)
491-491: Commented verbose logging reduces debugging capability.The verbose logging is commented out, which might make debugging simulation failures more difficult.
if sim.FlagVerboseValue { - //logger = log.TestingLogger() + logger = log.TestingLogger() } else {app/types/app.go (2)
383-386: TODO: Complete governance router configurationThere's a commented route for staking types that appears incomplete.
Do you need help implementing the staking governance route handler?
493-510: Uncommented code for future modulesSeveral keeper initializations are commented out (inflation, staking, gov). Consider adding TODO comments explaining when these will be enabled or remove if not needed.
- //app.Keepers.Akash.Inflation = ikeeper.NewKeeper( - // cdc, - // app.keys[itypes.StoreKey], - // app.GetSubspace(itypes.ModuleName), - //) + // TODO: Enable inflation keeper when inflation module is ready + //app.Keepers.Akash.Inflation = ikeeper.NewKeeper(...)app/app.go (1)
356-419: Consider using the partial ordering approachThe commented code shows a more maintainable partial ordering approach. The current hardcoded list may become difficult to maintain as modules are added/removed.
Consider implementing the partial ordering approach shown in the comments, which would make the module ordering more maintainable and self-documenting:
func orderBeginBlockers(allModuleNames []string) []string { ord := partialord.NewPartialOrdering(allModuleNames) // Upgrades should be run VERY first ord.FirstElements( upgradetypes.ModuleName, capabilitytypes.ModuleName, ) // ... rest of the ordering logic return ord.TotalOrdering() }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
go.sumis excluded by!**/*.sum
📒 Files selected for processing (107)
.env(1 hunks).envrc(1 hunks).github/.repo(1 hunks).github/actions/setup-ubuntu/action.yaml(1 hunks).github/workflows/concommits.yaml(1 hunks).github/workflows/release.yaml(5 hunks).github/workflows/tests.yaml(18 hunks).golangci.yaml(1 hunks).goreleaser-docker.yaml(0 hunks).goreleaser.yaml(1 hunks).mockery.yaml(1 hunks)CHANGELOG.md(1 hunks)Makefile(3 hunks)README.md(1 hunks)_docs/adr/adr-001-network-upgrades.md(1 hunks)app/ante.go(1 hunks)app/app.go(8 hunks)app/app_configure.go(3 hunks)app/app_test.go(1 hunks)app/config.go(2 hunks)app/decorators/gov_filter.go(0 hunks)app/decorators/min_commision.go(5 hunks)app/export.go(9 hunks)app/genesis.go(2 hunks)app/lanes.go(1 hunks)app/mac.go(2 hunks)app/modules.go(1 hunks)app/option.go(1 hunks)app/params/proto.go(0 hunks)app/sim/sim_config.go(1 hunks)app/sim/sim_utils.go(1 hunks)app/sim_test.go(5 hunks)app/types/app.go(3 hunks)app/upgrades.go(2 hunks)client/client.go(3 hunks)cmd/akash/cmd/auth.go(1 hunks)cmd/akash/cmd/bech32.go(1 hunks)cmd/akash/cmd/flag_test.go(4 hunks)cmd/akash/cmd/genaccounts.go(6 hunks)cmd/akash/cmd/root.go(6 hunks)cmd/akash/cmd/testnetify/cmd.go(3 hunks)cmd/akash/cmd/testnetify/escrow.go(1 hunks)cmd/akash/cmd/testnetify/state.go(14 hunks)cmd/akash/cmd/testnetify/util.go(2 hunks)cmd/akash/main.go(1 hunks)cmd/common/flags.go(0 hunks)docgen/main.go(1 hunks)events/cmd/root.go(4 hunks)events/publish.go(6 hunks)events/publish_test.go(1 hunks)events/query.go(2 hunks)go.mod(1 hunks)make/codegen.mk(1 hunks)make/init.mk(4 hunks)make/lint.mk(2 hunks)make/mod.mk(1 hunks)make/releasing.mk(6 hunks)make/setup-cache.mk(2 hunks)make/test-integration.mk(2 hunks)make/test-simulation.mk(1 hunks)make/test-upgrade.mk(0 hunks)meta.json(1 hunks)pubsub/bus_test.go(1 hunks)script/tools.sh(1 hunks)script/upgrades.sh(1 hunks)sdl/_testdata/deployment-svc-mismatch.yaml(0 hunks)sdl/_testdata/private_service.yaml(0 hunks)sdl/_testdata/profile-svc-name-mismatch.yaml(0 hunks)sdl/_testdata/service-mix.yaml(0 hunks)sdl/_testdata/service-mix2.yaml(0 hunks)sdl/_testdata/simple-double-ram.yaml(0 hunks)sdl/_testdata/simple-gpu.yaml(0 hunks)sdl/_testdata/simple-with-ip.yaml(0 hunks)sdl/_testdata/simple.yaml(0 hunks)sdl/_testdata/simple2.yaml(0 hunks)sdl/_testdata/simple3.yaml(0 hunks)sdl/_testdata/simple4.yaml(0 hunks)sdl/_testdata/storageClass1.yaml(0 hunks)sdl/_testdata/storageClass2.yaml(0 hunks)sdl/_testdata/storageClass3.yaml(0 hunks)sdl/_testdata/storageClass4.yaml(0 hunks)sdl/_testdata/storageClass5.yaml(0 hunks)sdl/_testdata/storageClass6.yaml(0 hunks)sdl/_testdata/v2.1-credentials-error.yaml(0 hunks)sdl/_testdata/v2.1-credentials.yaml(0 hunks)sdl/_testdata/v2.1-deployment-svc-mismatch.yaml(0 hunks)sdl/_testdata/v2.1-private_service.yaml(0 hunks)sdl/_testdata/v2.1-profile-svc-name-mismatch.yaml(0 hunks)sdl/_testdata/v2.1-service-mix.yaml(0 hunks)sdl/_testdata/v2.1-service-mix2.yaml(0 hunks)sdl/_testdata/v2.1-simple-gpu.yaml(0 hunks)sdl/_testdata/v2.1-simple-with-ip.yaml(0 hunks)sdl/_testdata/v2.1-simple.yaml(0 hunks)sdl/_testdata/v2.1-simple2.yaml(0 hunks)sdl/_testdata/v2.1-simple3.yaml(0 hunks)sdl/_testdata/v2.1-simple4.yaml(0 hunks)sdl/coin.go(0 hunks)sdl/coin_test.go(0 hunks)sdl/cpu.go(0 hunks)sdl/cpu_test.go(0 hunks)sdl/expose.go(0 hunks)sdl/full_test.go(0 hunks)sdl/gpu.go(0 hunks)sdl/gpu_test.go(0 hunks)sdl/groupBuilder_v2.go(0 hunks)sdl/groupBuilder_v2_1.go(0 hunks)sdl/memory.go(0 hunks)
⛔ Files not processed due to max files limit (44)
- sdl/placement.go
- sdl/pricing.go
- sdl/resources.go
- sdl/sdl.go
- sdl/sdl_test.go
- sdl/storage.go
- sdl/storage_test.go
- sdl/units.go
- sdl/units_test.go
- sdl/util/util.go
- sdl/util/util_test.go
- sdl/utils.go
- sdl/v2.go
- sdl/v2_1.go
- sdl/v2_1_ip_test.go
- sdl/v2_1_test.go
- sdl/v2_ip_test.go
- sdl/v2_test.go
- tests/e2e/certs_cli_test.go
- tests/e2e/certs_grpc_test.go
- tests/e2e/cli_test.go
- tests/e2e/deployment_cli_test.go
- tests/e2e/deployment_grpc_test.go
- tests/e2e/grpc_test.go
- tests/e2e/market_cli_test.go
- tests/e2e/market_grpc_test.go
- tests/e2e/provider_cli_test.go
- tests/e2e/provider_grpc_test.go
- tests/upgrade/test-cases.json
- tests/upgrade/test-config-gha.json
- tests/upgrade/upgrade_test.go
- tests/upgrade/v0.26.0/postupgrade.go
- tests/upgrade/v0.32.0/postupgrade.go
- tests/upgrade/v0.34.0/postupgrade.go
- tests/upgrade/v0.36.0/postupgrade.go
- tests/upgrade/workers_test.go
- testutil/audit.go
- testutil/base.go
- testutil/cert.go
- testutil/cli/cmd.go
- testutil/cosmos/keepers.go
- testutil/cosmos/mocks/AuthzKeeper_mock.go
- testutil/cosmos/mocks/BankKeeper_mock.go
- testutil/cosmos/mocks/TakeKeeper_mock.go
💤 Files with no reviewable changes (47)
- .goreleaser-docker.yaml
- make/test-upgrade.mk
- app/params/proto.go
- sdl/_testdata/v2.1-service-mix2.yaml
- sdl/_testdata/v2.1-simple2.yaml
- sdl/_testdata/v2.1-credentials.yaml
- sdl/_testdata/simple3.yaml
- sdl/full_test.go
- sdl/_testdata/storageClass3.yaml
- sdl/_testdata/v2.1-private_service.yaml
- sdl/_testdata/v2.1-simple.yaml
- sdl/_testdata/storageClass2.yaml
- sdl/_testdata/simple-with-ip.yaml
- sdl/_testdata/v2.1-credentials-error.yaml
- sdl/_testdata/v2.1-service-mix.yaml
- sdl/_testdata/storageClass4.yaml
- sdl/_testdata/simple-gpu.yaml
- sdl/_testdata/service-mix2.yaml
- sdl/_testdata/v2.1-profile-svc-name-mismatch.yaml
- sdl/_testdata/storageClass1.yaml
- sdl/_testdata/v2.1-simple3.yaml
- sdl/coin_test.go
- sdl/cpu_test.go
- sdl/_testdata/profile-svc-name-mismatch.yaml
- sdl/expose.go
- sdl/_testdata/simple2.yaml
- sdl/_testdata/storageClass5.yaml
- sdl/memory.go
- sdl/coin.go
- sdl/_testdata/v2.1-simple-with-ip.yaml
- sdl/_testdata/v2.1-simple-gpu.yaml
- sdl/cpu.go
- sdl/_testdata/simple.yaml
- sdl/_testdata/v2.1-deployment-svc-mismatch.yaml
- sdl/_testdata/storageClass6.yaml
- sdl/_testdata/service-mix.yaml
- sdl/_testdata/deployment-svc-mismatch.yaml
- sdl/_testdata/private_service.yaml
- sdl/_testdata/simple-double-ram.yaml
- sdl/_testdata/simple4.yaml
- sdl/gpu_test.go
- sdl/groupBuilder_v2.go
- sdl/groupBuilder_v2_1.go
- sdl/gpu.go
- cmd/common/flags.go
- sdl/_testdata/v2.1-simple4.yaml
- app/decorators/gov_filter.go
🧰 Additional context used
🧬 Code Graph Analysis (9)
events/cmd/root.go (1)
events/publish.go (1)
NewEvents(50-94)
cmd/akash/main.go (1)
cmd/akash/cmd/root.go (2)
NewRootCmd(55-72)Execute(100-109)
cmd/akash/cmd/testnetify/cmd.go (2)
cmd/akash/cmd/testnetify/state.go (1)
GovState(94-98)cmd/akash/cmd/testnetify/config.go (1)
VotingPeriod(35-37)
app/upgrades.go (3)
upgrades/types/types.go (1)
GetUpgradesList(95-97)app/types/app.go (1)
App(128-139)app/app.go (1)
AkashApp(103-114)
cmd/akash/cmd/testnetify/state.go (1)
x/market/alias.go (1)
ModuleName(13-13)
cmd/akash/cmd/flag_test.go (2)
cmd/akash/cmd/root.go (1)
GetPersistentPreRunE(75-97)app/app.go (1)
DefaultHome(93-93)
app/app_configure.go (4)
x/market/alias.go (1)
ModuleName(13-13)x/take/alias.go (1)
ModuleName(11-11)x/staking/alias.go (1)
ModuleName(13-13)x/cert/alias.go (1)
ModuleName(13-13)
app/types/app.go (6)
x/escrow/keeper/keeper.go (2)
Keeper(20-38)NewKeeper(40-56)x/take/keeper/keeper.go (2)
Keeper(24-30)NewKeeper(33-39)testutil/state/suite.go (1)
Keepers(49-58)testutil/log.go (1)
Logger(10-12)x/take/alias.go (2)
StoreKey(9-9)ModuleName(11-11)x/market/hooks/hooks.go (1)
Hooks(13-16)
app/app.go (12)
app/types/app.go (1)
App(128-139)app/mac.go (2)
ModuleAccountPerms(14-25)ModuleAccountAddrs(27-34)x/staking/alias.go (1)
ModuleName(13-13)x/cert/alias.go (1)
ModuleName(13-13)x/market/handler/keepers.go (1)
Keepers(44-52)x/market/genesis.go (1)
InitGenesis(35-86)x/audit/genesis.go (1)
InitGenesis(36-57)x/cert/genesis.go (1)
InitGenesis(29-55)x/deployment/genesis.go (1)
InitGenesis(35-60)x/escrow/genesis.go (1)
InitGenesis(67-74)x/provider/genesis.go (1)
InitGenesis(36-54)app/config.go (1)
ModuleBasics(75-77)
🪛 actionlint (1.7.7)
.github/workflows/release.yaml
56-56: 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)
67-67: shellcheck reported issue in this script: SC2086:info:2:34: Double quote to prevent globbing and word splitting
(shellcheck)
.github/workflows/tests.yaml
320-320: shellcheck reported issue in this script: SC2086:info:2:40: Double quote to prevent globbing and word splitting
(shellcheck)
🪛 markdownlint-cli2 (0.17.2)
_docs/adr/adr-001-network-upgrades.md
43-43: Hard tabs
Column: 1
(MD010, no-hard-tabs)
45-45: Hard tabs
Column: 1
(MD010, no-hard-tabs)
46-46: Hard tabs
Column: 1
(MD010, no-hard-tabs)
47-47: Hard tabs
Column: 1
(MD010, no-hard-tabs)
48-48: Hard tabs
Column: 1
(MD010, no-hard-tabs)
🪛 golangci-lint (1.64.8)
app/ante.go
17-17: field mevLane is unused
(unused)
18-18: field auctionKeeper is unused
(unused)
19-19: field txConfig is unused
(unused)
app/modules.go
144-144: SA1019: params.NewAppModule is deprecated: the params module is deprecated and will be removed in the next Cosmos SDK major release.
(staticcheck)
cmd/akash/cmd/root.go
49-49: type appCreator is unused
(unused)
183-183: func appCreator.newApp is unused
(unused)
252-252: func appCreator.appExport is unused
(unused)
app/app.go
188-188: SA1019: crisis.FlagSkipGenesisInvariants is deprecated: this flag is no longer used and will be removed along with x/crisis in the next major Cosmos SDK release.
(staticcheck)
220-220: SA1019: app.MM.RegisterInvariants is deprecated: this function is a no-op and will be removed in the next release of the Cosmos SDK.
(staticcheck)
⏰ 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). (7)
- GitHub Check: coverage
- GitHub Check: release-dry-run
- GitHub Check: sims
- GitHub Check: tests
- GitHub Check: lint-go
- GitHub Check: build-bins
- GitHub Check: build-macos
🔇 Additional comments (86)
.github/.repo (1)
1-1: LGTM: Repository identifier correctly configured.The repository URL is accurate and properly formatted for use in build automation.
events/query.go (2)
6-8: LGTM: Import paths correctly updated for CometBFT migration.The import path changes from Tendermint to CometBFT are consistent with the broader migration effort.
22-22: EnsureMustCompileis available and matchesMustParsebehaviorI didn’t find
MustCompiledefined in our repo (it’s imported from the external CometBFT query package), so please confirm that in the CometBFT version you’re using:
- The module version in your go.mod includes a
MustCompilefunction.- Its signature is effectively
MustCompile(string) pubsub.Query(or*Query)—just likeMustParse.- It panics on invalid query strings, so behavior hasn’t changed.
Once you’ve verified that, this change is safe.
pubsub/bus_test.go (2)
6-6: LGTM: CometBFT import path correctly updated.The ed25519 package import has been properly migrated from Tendermint to CometBFT.
9-9: LGTM: Module path correctly updated to pkg.akt.dev namespace.The pubsub package import has been properly updated to use the new module path.
cmd/akash/main.go (1)
4-6: LGTM: Import paths correctly updated for module migration.The import paths have been properly updated to use the new
pkg.akt.devnamespace.cmd/akash/cmd/auth.go (1)
13-13: Import path change looks good
Nothing else to flag on this line.cmd/akash/cmd/bech32.go (1)
6-6: Import path switch acknowledged
Path switch topkg.akt.dev/go/sdkutilis consistent with the repo-wide module migration.docgen/main.go (1)
8-8: Module path update looks correct
Keepsdocgenin sync with the new root command location..env (1)
14-15: Verify downstream scripts for the newAKASH_RUN_BINvariable
Ensure every make/CI script now references$(AKASH_RUN_BIN)(not the previous hard-coded path) to prevent regressions on artifact locations..goreleaser.yaml (1)
4-4: Dist path change: confirm CI artefact upload
Moving artefacts to.cache/goreleaser/mainwill break any step that expects the old directory. Double-checkmake/releasing.mk, GH actions and release pipeline before merging.CHANGELOG.md (1)
41-41: Confirm external URL migration is correct and reachableThe PR link was updated to the new
pkg.akt.devhost. Please double-check that the repository is publicly accessible and that GitHub correctly forwards or resolves to avoid dead links in future release notes..github/workflows/concommits.yaml (1)
17-18: Validate action version bump tov1.3.0
webiny/action-conventional-commits@v1.3.0was published recently; ensure the tag exists and the change log for the action does not introduce breaking defaults (e.g. stricter scopes) that could fail PR CI.cmd/akash/cmd/testnetify/escrow.go (1)
8-9: Compile-time verification for newescrow/v1typesThe import migrates from
v1beta3tov1, but the code still references the same type and enum names. If any were renamed or re-scoped in the stable API (common for beta→v1 promotions), this will fail at build time. Rungo vet ./...aftergo mod tidyto confirm.meta.json (1)
42-47: Ensure a corresponding upgrade handler exists forv1.0.0Adding the upgrade metadata is great, but the binary must register an upgrade handler and, if necessary, migrations. Verify
app/upgrades.go(or equivalent) includes:if name == "v1.0.0" { … }and that CI integration tests cover the path from
v0.38.4→v1.0.0.make/codegen.mk (1)
8-9: LGTM! Clean addition of direct mockery target.The new
mockstarget provides a convenient way to run mockery directly, complementing the existinggeneratetarget that usesgo generate.make/test-simulation.mk (4)
7-7: Good simplification of simulation test execution.Removing the
-tags=$(BUILD_MAINNET)option standardizes simulation test execution and aligns with the broader build system modernization efforts.
12-12: Consistent with standardization approach.The removal of build tags from the nondeterminism test maintains consistency with other simulation tests.
17-17: Maintains consistency across simulation tests.The import/export simulation test follows the same standardization pattern.
22-22: Completes the standardization of simulation tests.The after-import simulation test now matches the consistent execution pattern without build tags.
Makefile (3)
15-15: Correct golangci-lint flag usage.The change from
--timeout=5mto--deadline=5muses the proper flag syntax for golangci-lint.
28-28: Fix variable naming consistency.The correction from
GO_MODtoGOMODensures consistency with the variable usage inBUILD_FLAGSand aligns with Go's standard environment variable naming.
64-64: Consistent variable usage in build flags.The usage of
GOMODinBUILD_FLAGSis now consistent with the variable declaration above.make/test-integration.mk (2)
11-11: Reasonable timeout increase for test stability.Doubling the timeout from 300s to 600s should help prevent test failures due to timing issues while still maintaining reasonable bounds.
21-23: Good addition of dedicated integration test target.The new
test-integrationtarget provides a clean way to run e2e integration tests separately, following the established pattern of other test targets.script/upgrades.sh (1)
216-216: Good standardization to use Go's architecture variable.Using
$GOARCHinstead of the customuname_arch()function provides better consistency with Go toolchain conventions and environment setup.cmd/akash/cmd/testnetify/util.go (3)
8-9: LGTM: Governance module import structure is consistent.The dual import approach with
govfor the module name andgovtypesfor the specific v1 types maintains clear separation and aligns with the usage pattern in the functions below.
28-29: LGTM: Module name reference updated consistently.The change from
govtypes.ModuleNametogov.ModuleNamecorrectly aligns with the new import alias while maintaining the same unmarshaling target type.
11-12: All IBC imports have been upgraded to v8
No remainingibc-go/v[1-7]references were found in the codebase.Next steps – validate the upgrade at the integration level:
- Run genesis‐state migration tests for the IBC modules to confirm v4→v8 compatibility
- Execute end-to-end and simulation tests covering core, transfer, ICA, and light-client functionality
- Review any custom IBC handlers or extensions for breaking changes in module interfaces
make/setup-cache.mk (2)
8-8: LGTM: Directory creation added for new environment variable.The addition of
$(AKASH_RUN_BIN)directory creation aligns with the environment setup improvements mentioned in the summary.
20-20: LGTM: Dynamic major version extraction improves maintainability.Using
semverto dynamically extract the major version fromMOCKERY_VERSIONeliminates hardcoded version dependencies and makes the build system more flexible.events/cmd/root.go (3)
13-13: LGTM: Import path migration is consistent.The updates from
github.com/akash-network/nodetopkg.akt.dev/nodeand the flag constants update align with the broader package migration effort.Also applies to: 15-18
33-34: LGTM: Flag constant usage updated correctly.Using
cflags.FlagNodeinstead of a hardcoded string improves maintainability and consistency with the new flag package.
44-47: LGTM: Client initialization updated for CometBFT architecture.The change from directly starting the client to using
cctx.GetNode()and passing the node interface toevents.NewEventscorrectly aligns with the new CometBFT client architecture. Based on the relevant code snippet,NewEventsexpects asdkclient.CometRPCinterface, which the node should satisfy.#!/bin/bash # Description: Verify the node interface satisfies sdkclient.CometRPC requirements # Expected: Find interface definitions and confirm compatibility echo "Checking sdkclient.CometRPC interface definition..." rg "type.*CometRPC.*interface" --type go -A 10 echo "Verifying GetNode() return type..." rg "func.*GetNode" --type go -A 3 -B 1 echo "Checking events.NewEvents function signature..." rg "func NewEvents" events/ --type go -A 3Also applies to: 59-59
app/mac.go (3)
9-9: LGTM: IBC module upgrade to v8The upgrade from IBC v4 to v8 is correctly implemented.
11-11: LGTM: Escrow module path migrationThe migration to the new
pkg.akt.devnamespace is correctly implemented.
14-14: No active references toMacPerms/MacAddrsremain
A search for the old names only returned commented‐out lines inapp/app_test.go; there are no live calls to update..golangci.yaml (4)
1-1: LGTM: Added YAML document start markerProper YAML formatting with document start marker.
7-11: LGTM: Improved directory exclusion configurationThe restructured
runsection with explicitskip-dirsfor mocks improves configuration clarity and maintainability.
15-29: LGTM: Enhanced linter coverageThe addition of
errcheck,errchkjson,govet,revive,gosec, andcopyloopvarwill improve code quality by catching more potential issues.
31-36: LGTM: Reasonable gocritic configurationDisabling
ifElseChainandsingleCaseSwitchchecks is sensible as these can produce noisy warnings in legitimate code patterns.cmd/akash/cmd/testnetify/cmd.go (4)
13-14: LGTM: Migration from Tendermint to CometBFTThe import path updates correctly reflect the migration from Tendermint to CometBFT.
19-20: LGTM: IBC Go v8 upgradeThe upgrade from IBC v4 to v8 is correctly implemented in the import paths.
303-303: Confirm externalParams.VotingPeriodfield type
Please verify that theParamsstruct in the Cosmos SDK’s governance module (github.com/cosmos/cosmos-sdk/x/gov/types.Params) declares itsVotingPeriodfield as a*time.Duration. The current change at
- cmd/akash/cmd/testnetify/cmd.go:303
assigns a pointer (
¶ms.VotingPeriod.Duration). If the SDK’sParams.VotingPeriodis defined as a plaintime.Duration, this will be incorrect and should be changed back to a value assignment. Otherwise, if it’s indeed a*time.Duration, the pointer assignment is appropriate.
288-289: Double-check genesis state extraction changeThe invocation in cmd/akash/cmd/testnetify/cmd.go has switched from:
genesisState, err = genutiltypes.GenesisStateFromGenDoc(*genDoc)to:
genesisState, _, err = genutiltypes.GenesisStateFromGenFile(file) return genesisState, genDoc, err
GenesisStateFromGenFilenow returns three values(map[string]json.RawMessage, *tmtypes.GenesisDoc, error), but the new*tmtypes.GenesisDocis being ignored in favor of the originalgenDoc. Please verify that:
- The
*tmtypes.GenesisDocreturned byGenesisStateFromGenFileis identical togenDocloaded earlier.- Discarding that return value does not introduce inconsistencies downstream.
If you need to use the newly parsed doc, update the assignment accordingly:
- genesisState, _, err = genutiltypes.GenesisStateFromGenFile(file) + genesisState, genDoc, err = genutiltypes.GenesisStateFromGenFile(file).github/workflows/release.yaml (5)
17-18: LGTM: Explicit dependency installationStandardizing dependency installation improves workflow reliability and transparency.
19-22: LGTM: git-cliff installationUsing the cargo-install action for git-cliff is a clean approach for installing Rust-based tools.
32-33: LGTM: direnv-action configurationThe explicit
masks: ''parameter improves configuration clarity.Also applies to: 81-82
94-94: LGTM: Test configuration specificationAdding the
TEST_CONFIGenvironment variable improves test configuration management.
104-104: LGTM: Refined artifact collectionNarrowing the artifact path to
.akash*.logfiles reduces noise and focuses on relevant logs.make/releasing.mk (3)
14-14: LGTM: Path correction for repository fileThe path change from
.github/repoto.github/.repoaligns with the file structure updates.
39-39: LGTM: Added .PHONY declarationAdding the
.PHONYdeclaration for the$(AKASH)target improves Makefile correctness.
88-88: LGTM: Consistent variable usage in Docker commandsThe updates to use
$(GOMOD)and$(GORELEASER_MOD_MOUNT)consistently across all Docker commands improve maintainability.Also applies to: 98-99, 117-117, 129-130
.mockery.yaml (1)
1-15: LGTM! Well-structured mockery configuration.The hierarchical configuration is well-organized with appropriate template settings and interface specifications. The use of
unroll-variadic: trueis a good practice for handling variadic parameters in mocks.app/decorators/min_commision.go (3)
4-11: LGTM! Proper migration to newer SDK patterns.The import updates correctly migrate to the new
cosmossdk.io/mathpackage and updated module paths. The aliassdkmathis a good choice for clarity.
35-36: LGTM! Correct type migration to LegacyDec.The migration from
sdk.Dectosdkmath.LegacyDecaligns with the newer Cosmos SDK math types.
60-65: LGTM! Improved error handling.The migration to
sdkerrors.ErrUnauthorized.Wrapfprovides better error context and follows modern SDK patterns.cmd/akash/cmd/genaccounts.go (4)
37-37: LGTM! Simplified command name.The command name change from "add-genesis-account" to "add-account" is more concise and user-friendly.
57-57: LGTM! Proper migration to custom flags package.The migration to the
cflagspackage provides consistent flag handling across the codebase.Also applies to: 186-187, 192-192
60-60: LGTM! Correct keyring initialization.Adding the codec parameter to
keyring.Newaligns with the updated keyring interface requirements.
70-73: LGTM! Improved error handling.Adding proper error handling for
GetAddress()is a good defensive programming practice..envrc (1)
9-14: Good improvement on shell detection!Using
psto detect the actual running shell is more accurate than relying on theSHELLenvironment variable.make/lint.mk (1)
24-29: Remove duplicated content that will cause make errors.Lines 26-29 are duplicated content that appears to be a merge/edit error. This will cause make syntax errors.
.PHONY: test-sublinter-% test-sublinter-%: $(GOLANGCI_LINT) -# Execute the same lint methods as configured in .github/workflows/tests.yaml -# Clear feedback from each method as it fails. -.PHONY: test-sublinters -test-sublinters: $(patsubst %, test-sublinter-%,$(SUBLINTERS)) + $(LINT) $*Likely an incorrect or invalid review comment.
client/client.go (1)
11-16: Clean API version upgrade.The migration from v1beta2 to v1beta3 and the import path updates are consistent throughout the file.
app/config.go (1)
47-56: Governance handlers simplified as expected for SDK v0.50.The reduction to only params proposal handler aligns with SDK v0.50 changes where governance proposals are handled differently.
app/ante.go (1)
64-64: Confirm TxFeeChecker usage in NewDeductFeeDecoratorThe fourth argument to
NewDeductFeeDecoratoris aTxFeeCheckerinterface for custom fee‐validation logic. You’ve passednil, which effectively opts out of any custom fee checks. Please ensure:
- Passing
nilis intentional and falls back to the SDK’s default fee enforcement.- If you need custom fee rules (e.g., dynamic minimum fees), inject the appropriate
TxFeeCheckerimplementation instead ofnil.cmd/akash/cmd/testnetify/state.go (1)
949-950: Verify safety of integer conversions with gosec suppressions.Multiple integer conversions are marked with
// nolint goseccomments. Please ensure these conversions are safe from overflow, particularly:
- Converting
ga.doc.InitialHeighttouint64- Converting validator count comparisons between
uint32andintConsider adding bounds checking or documenting why these conversions are guaranteed to be safe.
Also applies to: 1003-1004, 1015-1015, 1171-1171, 1183-1183
cmd/akash/cmd/flag_test.go (1)
1-205: LGTM! Clean migration to new packages.The test file has been properly updated to use the new package structure and flag constants. All changes are consistent with the migration from Tendermint to CometBFT and the reorganization to
pkg.akt.devnamespace.app/app_configure.go (3)
4-40: LGTM! Import paths successfully migrated to new module structure.The import paths have been updated to the new
pkg.akt.devpaths and IBC v8, which aligns with the broader refactoring effort.
57-63: Good documentation for the genesis initialization order.The comments clearly explain the critical ordering requirements for genesis initialization.
82-82: Chain upgrade compatibility verified
- Confirmed
consensustypes.ModuleNameis added in app/app_configure.go (lines 82, 90, 92) and is included in upgrades/software/v1.0.0/upgrade.go.- Verified that
inflation.ModuleNameandagov.ModuleNameare commented out in app/app_configure.go and no longer referenced in any upgrade handlers..github/workflows/tests.yaml (1)
116-116: Job naming improvements enhance clarity.The renaming from
linttolint-goandshellchecktolint-shellbetter describes what each job does.Also applies to: 141-141
app/sim_test.go (3)
1-1: Good practice moving tests to separate package.Moving from
apptoapp_testpackage improves test isolation and ensures tests use only the public API.
119-124: GenesisTime configuration verifiedThe calls to
appOpts.Set("GenesisTime", genTime)in
- sim_test.go (lines 122, 164, 417, 504)
- app/export.go (line 309)
align with the
getGenesisTimeimplementation in app/app.go. No further changes are needed.
296-301: Verify IBC Host Store Inclusion
The IBC host store block in app/sim_test.go (lines ~296–301) is commented out while the IBC transfer store is still being compared. Please confirm whether this exclusion is intentional:• File: app/sim_test.go
• Lines: 296–301// { // ibchost.StoreKey, // appA, // appB, // [][]byte{}, // },Action items:
- If the host store comparison causes known non-deterministic diffs, leave it commented but add a clarifying comment explaining why.
- Otherwise, uncomment the block to include the IBC host store in the equality check.
app/export.go (5)
30-33: Good improvement: Added module-specific export capabilityThe addition of the
modulesToExportparameter provides better flexibility for selective module exports.
47-51: Improved error handling for ExportGenesisForModulesGood change to propagate errors from
ExportGenesisForModulesinstead of silently ignoring them.
104-109: Excellent error handling for commission withdrawalGood practice to check for specific error types and only panic on unexpected errors.
286-299: Clean options pattern implementationThe refactoring to use functional options pattern provides better flexibility and extensibility for the Setup function.
338-347: Improved error handling in InitChainGood change to properly handle errors from InitChain instead of ignoring the return value.
cmd/akash/cmd/root.go (2)
205-216: Good chain ID handling with fallbackExcellent implementation of chain ID retrieval with fallback to genesis file when not provided via flags.
264-275: Robust error handling in appExportGood defensive programming with proper type assertion and error handling for app options.
app/types/app.go (2)
90-126: Well-organized keeper structureThe reorganization of keepers into logical groups (Cosmos, Akash, External) improves code organization and maintainability.
135-137: Thread-safe lazy initializationGood use of
sync.Oncefor thread-safe lazy initialization of store keys.app/app.go (2)
247-259: Good BlockSDK lane integrationExcellent implementation of MEV-aware lanes with proper error handling.
507-518: Well-implemented PreBlocker with infinite gas meterGood implementation addressing non-deterministic gas usage in the pre-blocker. The comment clearly explains the rationale.
| // import ( | ||
| // "testing" | ||
| // | ||
| // sdk "github.com/cosmos/cosmos-sdk/types" | ||
| // "github.com/stretchr/testify/assert" | ||
| // | ||
| // dtypes "pkg.akt.dev/go/node/deployment/v1" | ||
| // mtypes "pkg.akt.dev/go/node/market/v1beta5" | ||
| // ptypes "pkg.akt.dev/go/node/provider/v1beta4" | ||
| // "pkg.akt.dev/go/sdkutil" | ||
| // | ||
| // "pkg.akt.dev/node/testutil" | ||
| // ) | ||
| // | ||
| // func Test_processEvent(t *testing.T) { | ||
| // tests := []sdkutil.ModuleEvent{ | ||
| // // x/deployment events | ||
| // dtypes.NewEventDeploymentCreated(testutil.DeploymentID(t), testutil.DeploymentVersion(t)), | ||
| // dtypes.NewEventDeploymentUpdated(testutil.DeploymentID(t), testutil.DeploymentVersion(t)), | ||
| // dtypes.NewEventDeploymentClosed(testutil.DeploymentID(t)), | ||
| // dtypes.NewEventGroupClosed(testutil.GroupID(t)), | ||
| // | ||
| // // x/market events | ||
| // mtypes.NewEventOrderCreated(testutil.OrderID(t)), | ||
| // mtypes.NewEventOrderClosed(testutil.OrderID(t)), | ||
| // mtypes.NewEventBidCreated(testutil.BidID(t), testutil.DecCoin(t)), | ||
| // mtypes.NewEventBidClosed(testutil.BidID(t), testutil.DecCoin(t)), | ||
| // mtypes.NewEventLeaseCreated(testutil.LeaseID(t), testutil.DecCoin(t)), | ||
| // mtypes.NewEventLeaseClosed(testutil.LeaseID(t), testutil.DecCoin(t)), | ||
| // | ||
| // // x/provider events | ||
| // ptypes.NewEventProviderCreated(testutil.AccAddress(t)), | ||
| // ptypes.NewEventProviderUpdated(testutil.AccAddress(t)), | ||
| // ptypes.NewEventProviderDeleted(testutil.AccAddress(t)), | ||
| // } | ||
| // | ||
| // for _, test := range tests { | ||
| // sdkevs := sdk.Events{ | ||
| // test.ToSDKEvent(), | ||
| // }.ToABCIEvents() | ||
| // | ||
| // sdkev := sdkevs[0] | ||
| // | ||
| // ev, ok := processEvent(sdkev) | ||
| // assert.True(t, ok, test) | ||
| // assert.Equal(t, test, ev, test) | ||
| // } | ||
| // } |
There was a problem hiding this comment.
Critical: Event processing test coverage completely removed.
The entire Test_processEvent test has been commented out, removing test coverage for event processing across deployment, market, and provider modules. The imports were updated to new paths, suggesting the underlying functionality still exists.
Consider either:
- Updating the test to work with the new CometBFT event system, or
- Ensuring equivalent coverage exists elsewhere in the test suite
#!/bin/bash
# Description: Check for alternative event processing test coverage
# Expected: Find other tests covering processEvent or event handling
echo "Searching for event processing tests..."
rg "processEvent|Test.*Event|event.*test" --type go -A 3 -B 1
echo "Checking for event-related tests in events package..."
fd ".*test\.go$" events/ --exec grep -l "Test\|event" {} \;
echo "Verifying if processEvent function still exists..."
rg "func processEvent" --type go -A 5Would you like me to help restore this test by updating it to work with the new event system, or create a tracking issue for this missing coverage?
🤖 Prompt for AI Agents
In events/publish_test.go from lines 3 to 50, the entire Test_processEvent
function and its imports are commented out, removing critical test coverage for
event processing across deployment, market, and provider modules. To fix this,
restore the test by updating it to be compatible with the new CometBFT event
system, adjusting imports and event creation calls as needed to match the
current SDK and event structures, ensuring the test verifies processEvent
behavior correctly. Alternatively, confirm equivalent test coverage exists
elsewhere if you prefer not to restore this test here.
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| test-network-upgrade-on-release: | ||
| runs-on: upgrade-tester | ||
| runs-on: gh-runner-test |
There was a problem hiding this comment.
💡 Verification agent
🧩 Analysis chain
Address unknown runner label
The static analysis tool flagged gh-runner-test as an unknown runner label. If this is a custom self-hosted runner, ensure it's properly configured and consider documenting it in an actionlint.yaml config file.
🏁 Script executed:
#!/bin/bash
# Description: Check if actionlint.yaml config exists to define custom runner labels
# Expected: Either find the config file or confirm this is a valid self-hosted runner
echo "Checking for actionlint configuration..."
fd actionlint.yamlLength of output: 111
Document custom runner label for actionlint
The workflow at .github/workflows/release.yaml:56 uses a self-hosted runner label gh-runner-test, but there’s no actionlint.yaml to whitelist it, so actionlint will continue flagging it as unknown. To resolve:
• If gh-runner-test is intended, add an actionlint.yaml at your repo root with:
runners:
- gh-runner-test• Otherwise, update the runs-on value to a valid GitHub-hosted or existing self-hosted label.
🧰 Tools
🪛 actionlint (1.7.7)
56-56: 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 line 56, the self-hosted runner label
"gh-runner-test" is not whitelisted in an actionlint.yaml file, causing
actionlint to flag it as unknown. To fix this, either create an actionlint.yaml
file at the repository root that includes "gh-runner-test" under the runners
list, or change the runs-on value to a valid GitHub-hosted or existing
self-hosted runner label.
|
|
||
| // register akash api routes | ||
| cmtrpc.Routes["akash"] = cmtrpcsrv.NewRPCFunc(client.RPCAkash, "") | ||
| //cmtrpc.Routes["akash"] = cmtrpcsrv.NewRPCFunc(client.RPCAkash, "") |
There was a problem hiding this comment.
💡 Verification agent
🧩 Analysis chain
Clarify the status of commented RPC route
The akash RPC route registration is commented out. This should either be removed or have a TODO comment explaining why it's disabled.
🏁 Script executed:
#!/bin/bash
# Check if there are any references to RPCAkash or if this functionality moved elsewhere
rg "RPCAkash|akash.*rpc.*route" --type goLength of output: 317
Clarify or remove commented Akash RPC registration
The Akash RPC route is commented out in the codebase without any explanation:
- cmd/akash/cmd/root.go (line 67):
// cmtrpc.Routes["akash"] = cmtrpcsrv.NewRPCFunc(client.RPCAkash, "")- testutil/network/network.go:
// cmtrpc.RoutesMap["akash"] = cmtrpcsrv.NewRPCFunc(client.RPCAkash, "")Please either:
- Remove these dead‐code lines if the Akash RPC route is no longer supported, or
- Add a clear TODO/rationale (e.g. “// TODO: re-enable once module X is stabilized — see issue Test monitor bump #123”) so future maintainers understand why it’s disabled.
🤖 Prompt for AI Agents
In cmd/akash/cmd/root.go at line 67, the Akash RPC route registration is
commented out without explanation. Either remove this commented line entirely if
the Akash RPC route is deprecated, or add a clear TODO comment explaining why it
is disabled and under what conditions it should be re-enabled, referencing any
relevant issues or context for future maintainers.
There was a problem hiding this comment.
Actionable comments posted: 1
🔭 Outside diff range comments (2)
.github/workflows/release.yaml (1)
99-105: Hidden log files will not be uploaded – fix YAML structure & include-hidden flag
actions/upload-artifactskips dotfiles unlessinclude-hidden-files: trueis set.
Additionally, the current structure provides only one path entry; extra lines afterinclude-hidden-filesare parsed as invalid YAML, causing the workflow to fail.- - name: upload validator(s) stdout/stderr + - name: upload validator(s) stdout/stderr if: always() && steps.test.outcome != 'skipped' uses: actions/upload-artifact@v4 with: name: logs - path: | - .cache/run/upgrade/validators/logs/.akash*.log + path: | + .cache/run/upgrade/validators/logs/.akash*.log + include-hidden-files: true.github/workflows/tests.yaml (1)
335-340: Workflow is syntactically invalid – second path entry is outside thewith:mapLine 339 is indented as a sibling to
include-hidden-files, making the YAML invalid.
Merge both patterns under the existingpath:block.- path: | - .cache/run/upgrade/validators/logs/*.log - include-hidden-files: true - .cache/run/upgrade/validators/logs/.akash*.log + path: | + .cache/run/upgrade/validators/logs/*.log + .cache/run/upgrade/validators/logs/.akash*.log + include-hidden-files: true
♻️ Duplicate comments (23)
.github/workflows/release.yaml (2)
32-33: Redundant emptymasks:input – remove it
Passing an empty string disables masking but still clutters the YAML. Omit the key entirely unless you actually have variables to mask.
56-56:gh-runner-testis still unknown to action-lint
Unless this self-hosted label is whitelisted via anactionlint.yaml, the workflow will keep failing static checks..github/workflows/tests.yaml (8)
87-88: Remove emptymasks:input – see earlier note.
136-137: Same as above – drop the emptymasks:key.
161-162: Same as above – drop the emptymasks:key.
187-188: Same as above – drop the emptymasks:key.
218-219: Same as above – drop the emptymasks:key.
264-265: Same as above – drop the emptymasks:key.
317-318: Same as above – drop the emptymasks:key.
320-323: Quote${{ github.ref }}to satisfy shellcheck SC2086Unquoted variables may break when tag/branch names contain spaces or wildcard characters.
- test_required=$(./script/upgrades.sh test-required ${{ github.ref }}) + test_required=$(./script/upgrades.sh test-required "${{ github.ref }}")app/ante.go (1)
15-20: BlockSDKAnteHandlerParams remains unused.The struct and its fields are still not utilized in the ante handler setup, as previously identified in past reviews.
Consider either:
- Removing the unused struct and field from
HandlerOptionsuntil MEV integration is ready- Completing the BlockSDK integration by wiring these parameters into the ante decorators
-// BlockSDKAnteHandlerParams are the parameters necessary to configure the block-sdk antehandlers -type BlockSDKAnteHandlerParams struct { - mevLane auctionante.MEVLane - auctionKeeper auctionkeeper.Keeper - txConfig client.TxConfig -}type HandlerOptions struct { ante.HandlerOptions CDC codec.BinaryCodec GovKeeper *govkeeper.Keeper - BlockSDK BlockSDKAnteHandlerParams }app/genesis.go (3)
32-64: Address error handling and implementation issues in genesisFilterTokens.The function still has the same issues identified in previous reviews:
- Panics instead of returning errors
- String replacement could affect unintended occurrences
- Unnecessary map unmarshaling
Consider the previously suggested refactor to return errors instead of panicking and use a more robust token replacement approach.
73-81: Handle GetPubKey error and remove unused Address call.The error from
GetPubKey()is still ignored and theAddress()call on line 80 is unused, as previously identified.Apply the previously suggested fix:
- pubKey, _ := privVal.GetPubKey() + pubKey, err := privVal.GetPubKey() + if err != nil { + panic(fmt.Errorf("failed to get public key: %w", err)) + } - senderPrivKey.PubKey().Address()
153-157: Improve error message and remove unused validation.The validator updates conversion result is unused and the error message is too generic, as previously noted.
Either remove the unused validation or improve the error message:
- _, err := tmtypes.PB2TM.ValidatorUpdates(initValPowers) - if err != nil { - panic("failed to get vals") - }app/modules.go (2)
144-146: Consider migrating away from the deprecated params module.The params module is deprecated and will be removed in the next Cosmos SDK major release. Consider planning for this migration.
238-244: Remove duplicate authzmodule initialization in simulation modules.The
authzmodule.NewAppModuleis initialized twice in theappSimModulesfunction (lines 213-219 and 238-244). This creates a duplicate entry that should be removed.app/app_configure.go (1)
52-53: Address commented-out staking and governance modules.The staking and governance modules are commented out, but there are still multiple lingering references to these modules in upgrade scripts, app wiring, decorators, and module code. Please either fully remove or refactor all references, or re-enable these modules to maintain consistency.
cmd/akash/cmd/root.go (2)
46-48: Remove or document unused appCreator and its methods.The
appCreatorstruct and its methods (newApp,appExport) appear to be unused since theserver.Commands(...)registration is not visible in the current code. Please either remove these unused definitions or add a clear TODO explaining when they'll be re-enabled.Also applies to: 180-284
64-64: Clarify or remove commented Akash RPC registration.The Akash RPC route registration is commented out without explanation. Please either remove this dead code or add a clear TODO comment explaining why it's disabled and when it should be re-enabled.
app/types/app.go (1)
200-263: Address the missing parameter validation (duplicate comment)The
InitSpecialKeepersmethod should validate critical parameters to fail fast, as noted in previous reviews. Add validation for essential parameters likecdc,bApp, andhomePath.app/app.go (3)
188-188: Remove usage of deprecated flag (duplicate comment)The
crisis.FlagSkipGenesisInvariantsflag is deprecated and will be removed in the next major Cosmos SDK release.
220-220: Remove deprecated RegisterInvariants call (duplicate comment)The
MM.RegisterInvariantsfunction is deprecated and is a no-op in the current SDK version.
670-673: Consider a cleaner approach for ChainID access (duplicate comment)Using reflection to access private fields is fragile and may break with SDK updates.
🧹 Nitpick comments (6)
CHANGELOG.md (1)
41-41: Convert bare URL to Markdown link for consistency and to satisfy MD034CHANGELOG already uses link markdown elsewhere (see line 45). Wrapping the PR reference keeps style uniform and silences markdownlint’s “no-bare-urls” warning.
-* (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)).github/workflows/release.yaml (1)
17-23: Preferapt-get update && apt-get install …(or the new composite action) to avoid stale package indexesDirectly invoking
sudo apt install …may intermittently fail when the image’s package cache is stale.
Either run an update first or (even better) reuse the new.github/actions/setup-ubuntucomposite action to DRY-up these identical chunks that appear across jobs.- - name: Install dependencies - run: sudo apt install -y make direnv unzip lz4 wget curl npm jq pv coreutils + - name: Install dependencies + run: | + sudo apt-get update -y + sudo apt-get install -y make direnv unzip lz4 wget curl npm jq pv coreutils(Apply the same principle to the other
apt installblocks.).github/workflows/tests.yaml (1)
49-54: Sameapt installblock repeated – update cache and deduplicatePerform an
apt-get updatebefore installation (GitHub images don’t guarantee a fresh cache) or, preferably, swap this out for the newsetup-ubuntucomposite action to remove repetition across 10+ jobs._docs/adr/adr-001-network-upgrades.md (1)
45-47: Fix markdown list style for consistency.The markdown linter indicates inconsistent list styles. Consider using asterisks consistently throughout the document.
- - [Upgrade handler](#upgrade-handler) **mandatory** - - [State migrations](#state-migrations) **optional** -- [Height patch](#implementing-height-patch) - Allows urgent patching of the network state at given height + * [Upgrade handler](#upgrade-handler) **mandatory** + * [State migrations](#state-migrations) **optional** +* [Height patch](#implementing-height-patch) - Allows urgent patching of the network state at given heightapp/config.go (1)
12-12: Consider removing commented capability module code.The capability module is commented out in multiple places. If it's no longer needed, consider removing the commented lines entirely for cleaner code.
- //"github.com/cosmos/cosmos-sdk/x/capability" + // capability module removed - no longer needed- //capability.AppModuleBasic{},Also applies to: 39-39
app/modules.go (1)
91-91: Address TODO comments for mint module integration.Both TODO comments reference "akash-network/support#4" for mint module integration. This appears to be a missing feature that needs implementation.
Would you like me to help track this issue or generate a solution for the mint module integration?
Also applies to: 256-256
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
go.sumis excluded by!**/*.sum
📒 Files selected for processing (107)
.env(1 hunks).envrc(1 hunks).github/.repo(1 hunks).github/actions/setup-ubuntu/action.yaml(1 hunks).github/workflows/concommits.yaml(1 hunks).github/workflows/release.yaml(5 hunks).github/workflows/tests.yaml(18 hunks).golangci.yaml(1 hunks).goreleaser-docker.yaml(0 hunks).goreleaser.yaml(1 hunks).mockery.yaml(1 hunks)CHANGELOG.md(1 hunks)Makefile(3 hunks)README.md(1 hunks)_docs/adr/adr-001-network-upgrades.md(1 hunks)app/ante.go(1 hunks)app/app.go(8 hunks)app/app_configure.go(3 hunks)app/app_test.go(1 hunks)app/config.go(2 hunks)app/decorators/gov_filter.go(0 hunks)app/decorators/min_commision.go(5 hunks)app/export.go(9 hunks)app/genesis.go(2 hunks)app/lanes.go(1 hunks)app/mac.go(2 hunks)app/modules.go(1 hunks)app/option.go(1 hunks)app/params/proto.go(0 hunks)app/sim/sim_config.go(1 hunks)app/sim/sim_utils.go(1 hunks)app/sim_test.go(5 hunks)app/types/app.go(3 hunks)app/upgrades.go(2 hunks)client/client.go(3 hunks)cmd/akash/cmd/auth.go(1 hunks)cmd/akash/cmd/bech32.go(1 hunks)cmd/akash/cmd/flag_test.go(4 hunks)cmd/akash/cmd/genaccounts.go(6 hunks)cmd/akash/cmd/root.go(6 hunks)cmd/akash/cmd/testnetify/cmd.go(3 hunks)cmd/akash/cmd/testnetify/escrow.go(1 hunks)cmd/akash/cmd/testnetify/state.go(14 hunks)cmd/akash/cmd/testnetify/util.go(2 hunks)cmd/akash/main.go(1 hunks)cmd/common/flags.go(0 hunks)docgen/main.go(1 hunks)events/cmd/root.go(4 hunks)events/publish.go(6 hunks)events/publish_test.go(1 hunks)events/query.go(2 hunks)go.mod(1 hunks)make/codegen.mk(1 hunks)make/init.mk(4 hunks)make/lint.mk(2 hunks)make/mod.mk(1 hunks)make/releasing.mk(6 hunks)make/setup-cache.mk(2 hunks)make/test-integration.mk(2 hunks)make/test-simulation.mk(1 hunks)make/test-upgrade.mk(0 hunks)meta.json(1 hunks)pubsub/bus_test.go(1 hunks)script/tools.sh(1 hunks)script/upgrades.sh(1 hunks)sdl/_testdata/deployment-svc-mismatch.yaml(0 hunks)sdl/_testdata/private_service.yaml(0 hunks)sdl/_testdata/profile-svc-name-mismatch.yaml(0 hunks)sdl/_testdata/service-mix.yaml(0 hunks)sdl/_testdata/service-mix2.yaml(0 hunks)sdl/_testdata/simple-double-ram.yaml(0 hunks)sdl/_testdata/simple-gpu.yaml(0 hunks)sdl/_testdata/simple-with-ip.yaml(0 hunks)sdl/_testdata/simple.yaml(0 hunks)sdl/_testdata/simple2.yaml(0 hunks)sdl/_testdata/simple3.yaml(0 hunks)sdl/_testdata/simple4.yaml(0 hunks)sdl/_testdata/storageClass1.yaml(0 hunks)sdl/_testdata/storageClass2.yaml(0 hunks)sdl/_testdata/storageClass3.yaml(0 hunks)sdl/_testdata/storageClass4.yaml(0 hunks)sdl/_testdata/storageClass5.yaml(0 hunks)sdl/_testdata/storageClass6.yaml(0 hunks)sdl/_testdata/v2.1-credentials-error.yaml(0 hunks)sdl/_testdata/v2.1-credentials.yaml(0 hunks)sdl/_testdata/v2.1-deployment-svc-mismatch.yaml(0 hunks)sdl/_testdata/v2.1-private_service.yaml(0 hunks)sdl/_testdata/v2.1-profile-svc-name-mismatch.yaml(0 hunks)sdl/_testdata/v2.1-service-mix.yaml(0 hunks)sdl/_testdata/v2.1-service-mix2.yaml(0 hunks)sdl/_testdata/v2.1-simple-gpu.yaml(0 hunks)sdl/_testdata/v2.1-simple-with-ip.yaml(0 hunks)sdl/_testdata/v2.1-simple.yaml(0 hunks)sdl/_testdata/v2.1-simple2.yaml(0 hunks)sdl/_testdata/v2.1-simple3.yaml(0 hunks)sdl/_testdata/v2.1-simple4.yaml(0 hunks)sdl/coin.go(0 hunks)sdl/coin_test.go(0 hunks)sdl/cpu.go(0 hunks)sdl/cpu_test.go(0 hunks)sdl/expose.go(0 hunks)sdl/full_test.go(0 hunks)sdl/gpu.go(0 hunks)sdl/gpu_test.go(0 hunks)sdl/groupBuilder_v2.go(0 hunks)sdl/groupBuilder_v2_1.go(0 hunks)sdl/memory.go(0 hunks)
⛔ Files not processed due to max files limit (44)
- sdl/placement.go
- sdl/pricing.go
- sdl/resources.go
- sdl/sdl.go
- sdl/sdl_test.go
- sdl/storage.go
- sdl/storage_test.go
- sdl/units.go
- sdl/units_test.go
- sdl/util/util.go
- sdl/util/util_test.go
- sdl/utils.go
- sdl/v2.go
- sdl/v2_1.go
- sdl/v2_1_ip_test.go
- sdl/v2_1_test.go
- sdl/v2_ip_test.go
- sdl/v2_test.go
- tests/e2e/certs_cli_test.go
- tests/e2e/certs_grpc_test.go
- tests/e2e/cli_test.go
- tests/e2e/deployment_cli_test.go
- tests/e2e/deployment_grpc_test.go
- tests/e2e/grpc_test.go
- tests/e2e/market_cli_test.go
- tests/e2e/market_grpc_test.go
- tests/e2e/provider_cli_test.go
- tests/e2e/provider_grpc_test.go
- tests/upgrade/test-cases.json
- tests/upgrade/test-config-gha.json
- tests/upgrade/upgrade_test.go
- tests/upgrade/v0.26.0/postupgrade.go
- tests/upgrade/v0.32.0/postupgrade.go
- tests/upgrade/v0.34.0/postupgrade.go
- tests/upgrade/v0.36.0/postupgrade.go
- tests/upgrade/workers_test.go
- testutil/audit.go
- testutil/base.go
- testutil/cert.go
- testutil/cli/cmd.go
- testutil/cosmos/keepers.go
- testutil/cosmos/mocks/AuthzKeeper_mock.go
- testutil/cosmos/mocks/BankKeeper_mock.go
- testutil/cosmos/mocks/TakeKeeper_mock.go
💤 Files with no reviewable changes (47)
- make/test-upgrade.mk
- .goreleaser-docker.yaml
- app/params/proto.go
- sdl/_testdata/v2.1-service-mix2.yaml
- sdl/_testdata/v2.1-profile-svc-name-mismatch.yaml
- sdl/_testdata/v2.1-credentials.yaml
- sdl/_testdata/v2.1-simple2.yaml
- sdl/_testdata/service-mix2.yaml
- sdl/_testdata/v2.1-deployment-svc-mismatch.yaml
- sdl/coin.go
- sdl/_testdata/simple2.yaml
- sdl/_testdata/simple-gpu.yaml
- sdl/memory.go
- sdl/_testdata/simple-with-ip.yaml
- sdl/full_test.go
- sdl/_testdata/profile-svc-name-mismatch.yaml
- sdl/_testdata/deployment-svc-mismatch.yaml
- sdl/coin_test.go
- sdl/_testdata/v2.1-simple-with-ip.yaml
- sdl/cpu_test.go
- sdl/_testdata/v2.1-simple3.yaml
- sdl/_testdata/simple.yaml
- sdl/_testdata/simple3.yaml
- sdl/_testdata/storageClass2.yaml
- sdl/_testdata/storageClass3.yaml
- sdl/_testdata/service-mix.yaml
- sdl/_testdata/v2.1-credentials-error.yaml
- sdl/_testdata/private_service.yaml
- sdl/_testdata/v2.1-private_service.yaml
- sdl/cpu.go
- sdl/_testdata/storageClass1.yaml
- sdl/_testdata/simple-double-ram.yaml
- app/decorators/gov_filter.go
- sdl/_testdata/storageClass5.yaml
- sdl/_testdata/v2.1-simple.yaml
- sdl/_testdata/simple4.yaml
- sdl/_testdata/v2.1-simple-gpu.yaml
- sdl/_testdata/storageClass4.yaml
- sdl/_testdata/storageClass6.yaml
- sdl/groupBuilder_v2_1.go
- sdl/_testdata/v2.1-service-mix.yaml
- sdl/groupBuilder_v2.go
- sdl/expose.go
- sdl/gpu_test.go
- cmd/common/flags.go
- sdl/gpu.go
- sdl/_testdata/v2.1-simple4.yaml
✅ Files skipped from review due to trivial changes (8)
- cmd/akash/cmd/auth.go
- .github/workflows/concommits.yaml
- README.md
- pubsub/bus_test.go
- .goreleaser.yaml
- app/app_test.go
- events/publish_test.go
- cmd/akash/cmd/testnetify/state.go
🚧 Files skipped from review as they are similar to previous changes (37)
- cmd/akash/cmd/bech32.go
- docgen/main.go
- .github/.repo
- .env
- events/query.go
- meta.json
- make/mod.mk
- script/upgrades.sh
- make/codegen.mk
- cmd/akash/cmd/testnetify/escrow.go
- events/cmd/root.go
- make/test-simulation.mk
- cmd/akash/main.go
- make/test-integration.mk
- cmd/akash/cmd/testnetify/util.go
- Makefile
- make/setup-cache.mk
- app/upgrades.go
- .golangci.yaml
- .github/actions/setup-ubuntu/action.yaml
- app/mac.go
- make/releasing.mk
- app/lanes.go
- cmd/akash/cmd/genaccounts.go
- app/decorators/min_commision.go
- cmd/akash/cmd/testnetify/cmd.go
- events/publish.go
- .envrc
- client/client.go
- script/tools.sh
- app/option.go
- make/lint.mk
- cmd/akash/cmd/flag_test.go
- app/sim/sim_utils.go
- go.mod
- make/init.mk
- app/sim/sim_config.go
🧰 Additional context used
🧬 Code Graph Analysis (2)
app/app_configure.go (4)
x/market/alias.go (1)
ModuleName(13-13)x/take/alias.go (1)
ModuleName(11-11)x/staking/alias.go (1)
ModuleName(13-13)x/cert/alias.go (1)
ModuleName(13-13)
app/app.go (6)
app/types/app.go (1)
App(128-139)app/mac.go (2)
ModuleAccountPerms(14-25)ModuleAccountAddrs(27-34)app/app_configure.go (1)
OrderInitGenesis(63-95)app/ante.go (1)
NewAnteHandler(33-73)upgrades/types/types.go (1)
GetHeightPatchesList(99-101)app/config.go (1)
ModuleBasics(75-77)
🪛 actionlint (1.7.7)
.github/workflows/tests.yaml
320-320: shellcheck reported issue in this script: SC2086:info:2:40: Double quote to prevent globbing and word splitting
(shellcheck)
.github/workflows/release.yaml
56-56: 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)
67-67: shellcheck reported issue in this script: SC2086:info:2:34: Double quote to prevent globbing and word splitting
(shellcheck)
🪛 golangci-lint (1.64.8)
app/app.go
188-188: SA1019: crisis.FlagSkipGenesisInvariants is deprecated: this flag is no longer used and will be removed along with x/crisis in the next major Cosmos SDK release.
(staticcheck)
220-220: SA1019: app.MM.RegisterInvariants is deprecated: this function is a no-op and will be removed in the next release of the Cosmos SDK.
(staticcheck)
app/ante.go
17-17: field mevLane is unused
(unused)
18-18: field auctionKeeper is unused
(unused)
19-19: field txConfig is unused
(unused)
app/modules.go
144-144: SA1019: params.NewAppModule is deprecated: the params module is deprecated and will be removed in the next Cosmos SDK major release.
(staticcheck)
🪛 markdownlint-cli2 (0.17.2)
CHANGELOG.md
41-41: Bare URL used
(MD034, no-bare-urls)
_docs/adr/adr-001-network-upgrades.md
45-45: Unordered list style
Expected: asterisk; Actual: dash
(MD004, ul-style)
46-46: Unordered list style
Expected: asterisk; Actual: dash
(MD004, ul-style)
47-47: Unordered list style
Expected: asterisk; Actual: dash
(MD004, ul-style)
⏰ 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). (8)
- GitHub Check: network-upgrade-names
- GitHub Check: release-dry-run
- GitHub Check: lint-shell
- GitHub Check: sims
- GitHub Check: lint-go
- GitHub Check: tests
- GitHub Check: coverage
- GitHub Check: build-bins
🔇 Additional comments (27)
_docs/adr/adr-001-network-upgrades.md (1)
43-48: LGTM! Import path updates are consistent with the migration.The updated import paths correctly reflect the migration from Tendermint to CometBFT and the new Cosmos SDK module paths.
.mockery.yaml (1)
1-14: Excellent modernization of mockery configuration.The new structured YAML configuration is much more maintainable and organized compared to the previous flat structure. The package-specific configuration and template settings provide better control over mock generation.
app/config.go (2)
4-27: LGTM! Import updates are consistent with Cosmos SDK migration.The updated import paths correctly reflect the migration to Cosmos SDK v0.50+ and the new module organization.
36-36: Good update to genutil initialization.The new
genutil.NewAppModuleBasic(genutiltypes.DefaultMessageValidator)properly configures the genesis utilities with message validation.app/ante.go (1)
64-64: Good update to DeductFeeDecorator call.The addition of the
nilparameter aligns with the updated SDK interface.app/modules.go (1)
45-200: Well-structured module organization.The module definition is clean and follows good separation between Cosmos SDK and Akash-specific modules. The function accepts appropriate parameters and properly initializes modules with their respective keepers.
app/app_configure.go (1)
82-82: Appropriate addition of consensus module.The consensus module has been properly added to the genesis initialization order, which aligns with the Cosmos SDK v0.47+ requirements.
app/sim_test.go (3)
1-1: Excellent package separation.Changing from
package apptopackage app_testfollows Go best practices for test isolation and prevents circular import dependencies.
85-97: Well-modernized simulation testing.The simulation functions have been properly updated to use new patterns from
simtestutil, new app initialization with encoding config, and enhanced error handling. The integration with the new app structure is clean.Also applies to: 130-130, 170-170
214-372: Comprehensive store key validation.The expanded store key prefixes list now includes all relevant modules (feegrant, authz, upgrade, consensus) with proper exclusion prefixes. This provides thorough coverage for import/export testing.
app/export.go (3)
47-50: Improved error handling for module export.The addition of explicit error checking and return for
ExportGenesisForModulesis a significant improvement over previous silent error handling.
98-114: Enhanced error handling throughout prepForZeroHeightGenesis.The replacement of silent error ignores with explicit error checks and panics significantly improves error visibility and debugging. Each keeper operation now properly validates results and fails fast on unexpected errors.
Also applies to: 146-176, 205-233
286-351: Well-designed Setup function with functional options.The refactored Setup function provides clean configuration through variadic options while maintaining backward compatibility. The genesis handling and app initialization logic is well-structured.
cmd/akash/cmd/root.go (2)
52-69: Excellent modernization of CLI structure.The refactored root command properly uses the new encoding config, updated flag constants from
cflags, and modernized command initialization. The separation of concerns and proper context handling are well-implemented.Also applies to: 130-159
165-178: Clean genesis command structure.The new
genesisCommandfunction provides a clean, extensible way to build genesis-related commands while properly integrating with the encoding configuration.app/types/app.go (7)
7-82: LGTM: Import organization and dependency updatesThe import restructuring properly organizes Cosmos SDK, IBC, and Akash-specific dependencies. The migration to
pkg.akt.devmodule paths and updated SDK versions aligns with the modernization objectives.
90-126: Excellent architectural improvement with nested keeper organizationThe modular keeper structure with
Cosmos,Akash, andExternalgroups provides clear separation of concerns and improves code maintainability. The pointer types for certain keepers (Cap, Staking, Gov, etc.) are appropriate for their lifecycle management.
128-139: Well-implemented lazy initialization patternThe
sync.Oncepattern for store key initialization is thread-safe and efficient. The separation of KV, transient, and memory store keys follows Cosmos SDK best practices.
141-153: Proper implementation of thread-safe store key generationThe
GenerateKeysmethod correctly usessync.Onceto ensure store keys are initialized exactly once, even in concurrent scenarios.
512-534: LGTM: Proper hook registrationThe
SetupHooksmethod correctly registers hooks for staking, governance, and escrow modules. The market hooks integration is well-structured.
536-616: Well-organized parameter subspace initializationThe
initParamsKeeperfunction and store key helper functions provide clear organization of module parameters and store keys. The separation of Cosmos SDK and Akash-specific keys is logical.
265-510: Keeper initialization order verified—no issues detectedAll dependent keepers (Auth, Bank, Staking, Upgrade, ScopedIBCKeeper, etc.) are initialized before being passed to any NewKeeper call. No circular dependencies were found in InitNormalKeepers.
app/app.go (5)
103-114: Excellent structural modernizationThe updated
AkashAppstruct properly embeds*baseapp.BaseAppand*apptypes.App, following modern Cosmos SDK patterns. The addition of BlockSDK components (checkTxHandler) enables MEV-aware transaction processing.
246-336: Excellent BlockSDK integration for MEV awarenessThe implementation properly integrates BlockSDK lanes, mempool, and transaction processing. The MEV lane and default lane configuration with proper ante handler setup enables sophisticated transaction ordering and MEV protection.
338-346: Modern ABCI lifecycle handlers properly implementedThe new ABCI handlers (
PreBlocker,Precommitter,PrepareCheckStater) are correctly set up with proper error handling, aligning with Cosmos SDK 0.50+ patterns.
494-547: Updated ABCI method signatures correctly implementedThe ABCI methods now properly return errors and use the updated SDK response types (
*abci.ResponseInitChain,*sdk.ResponsePreBlock, etc.), following the new SDK patterns.
655-666: Well-implemented custom CheckTx with BlockSDK integrationThe custom
CheckTxmethod properly delegates to the BlockSDK-aware handler, enabling MEV transaction verification before mempool insertion.
There was a problem hiding this comment.
Actionable comments posted: 1
🔭 Outside diff range comments (2)
.github/workflows/tests.yaml (1)
331-339:include-hidden-filesplaced inside the multi-linepathstring – YAML will break the stepBecause
|starts a literal block, everything indented beneath it becomes part of the string assigned topath.
include-hidden-files: trueis therefore interpreted as text, not as a new key, and the real input is lost → the action will fail.Fix by closing the block and moving the key out:
- path: | - .cache/run/upgrade/validators/logs/*.log - include-hidden-files: true - .cache/run/upgrade/validators/logs/.akash*.log + path: | + .cache/run/upgrade/validators/logs/*.log + .cache/run/upgrade/validators/logs/.akash*.log + include-hidden-files: true.github/workflows/release.yaml (1)
86-88: SC2086: quote${{ env.RELEASE_TAG }}when passing to the script- test_required=$(./script/upgrades.sh test-required ${{ env.RELEASE_TAG }}) + test_required=$(./script/upgrades.sh test-required "${{ env.RELEASE_TAG }}")Prevents word-splitting / globbing if the tag ever contains spaces or shell metacharacters.
♻️ Duplicate comments (14)
app/ante.go (1)
15-20: BlockSDKAnteHandlerParams is defined but never usedapp/modules.go (2)
144-146: Consider migrating away from the deprecated params module.
213-244: Duplicate authzmodule initialization in simulation modules.app/app_configure.go (1)
52-53: Action Required: Address commented-out staking and governance modulescmd/akash/cmd/root.go (1)
64-64: Address the commented RPC route consistentlyThe commented Akash RPC route lacks explanation and should either be removed or documented with a clear TODO explaining when it will be re-enabled.
app/types/app.go (1)
200-263: Consider adding parameter validationThe
InitSpecialKeepersmethod should validate critical parameters to fail fast if any are nil or invalid, as noted in the previous review.app/app.go (4)
179-184: Address hook setup timing issueThe TODO comment highlights a critical issue where governance proposal handlers are registered before hooks are set up, potentially causing nil pointer dereferences. Consider restructuring to call
app.SetupHooks()immediately after keeper initialization.
188-188: Remove usage of deprecated flagThe
crisis.FlagSkipGenesisInvariantsflag is deprecated and should be removed or replaced with the recommended alternative from the latest Cosmos SDK migration guide.
220-220: Remove deprecated RegisterInvariants callThe
MM.RegisterInvariantsfunction is deprecated and is a no-op. This line should be removed or commented out.
670-673: Use the existing WithChainID option and remove reflectionThe reflection-based approach for accessing the private
BaseApp.chainIDfield is fragile. Consider storing the chain ID in theAkashAppstruct during construction and using that instead of reflection..github/workflows/tests.yaml (2)
87-88: Emptymasksinput defeats its purpose
The exact same issue was pointed out previously — please either drop themasks:line or list the vars that must be masked.
320-322: Quote${{ github.ref }}to silence SC2086
Same ShellCheck warning as in the previous commit – still unfixed..github/workflows/release.yaml (2)
56-56:gh-runner-testis still an unknown runner label
Action-lint will keep failing until the label is whitelisted inactionlint.yamlor changed toself-hosted.
80-83: Emptymasksinput – same concern as earlier
Remove the line or specify variables to mask.
🧹 Nitpick comments (7)
CHANGELOG.md (1)
41-41: Wrap the bare URL in Markdown link format to satisfy MD034
markdownlintis flagging this line because bare URLs violate rule MD034. Converting it to an inline link also makes the entry more readable.-* (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)_docs/adr/adr-001-network-upgrades.md (3)
42-49: Replace hard tabs with spaces for markdown-lint compliance
markdownlintflags these lines (MD010) because they start with tab characters.
Since the code block is purely illustrative, switching to 4-space indents keeps the snippet readable while satisfying the linter.- log log.Logger + log log.Logger(Apply the same change to every line in the import block.)
42-52:fmtpackage missing in the import blockLater in the snippet (
log.With(fmt.Sprintf(...)))fmtis referenced, but it isn’t imported.
Readers copying this code verbatim will hit a compilation error.import ( + "fmt" "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"
9-9: Consider updating ADR statusThe ADR still lists its status as
InProgress.
If the implementation is now merged, updating toAccepted(or the appropriate state) avoids confusion for future readers.app/app_configure.go (1)
35-40: Clean up commented imports and organize import structure.Several imports are commented out (lines 35-36, 39) while others remain active. Consider either removing these commented imports entirely or documenting when they will be re-enabled to maintain code cleanliness.
-//agov "pkg.akt.dev/node/x/gov" -//"pkg.akt.dev/node/x/inflation"app/sim_test.go (1)
482-482: Consider making iterations per seed configurable.The hardcoded
numTimesToRunPerSeed := 3could benefit from being configurable through test flags for different testing scenarios.- numTimesToRunPerSeed := 3 + numTimesToRunPerSeed := sim.FlagNumBlocksValue // or introduce a new flag.github/workflows/release.yaml (1)
70-76: Consolidate dependency installation via the sharedsetup-ubuntuactionThe manual
apt install+cargo-installblock duplicates logic that already lives in.github/actions/setup-ubuntu. Re-use it for consistency and faster CI.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
go.sumis excluded by!**/*.sum
📒 Files selected for processing (107)
.env(1 hunks).envrc(1 hunks).github/.repo(1 hunks).github/actions/setup-ubuntu/action.yaml(1 hunks).github/workflows/concommits.yaml(1 hunks).github/workflows/release.yaml(5 hunks).github/workflows/tests.yaml(18 hunks).golangci.yaml(1 hunks).goreleaser-docker.yaml(0 hunks).goreleaser.yaml(1 hunks).mockery.yaml(1 hunks)CHANGELOG.md(1 hunks)Makefile(3 hunks)README.md(1 hunks)_docs/adr/adr-001-network-upgrades.md(1 hunks)app/ante.go(1 hunks)app/app.go(8 hunks)app/app_configure.go(3 hunks)app/app_test.go(1 hunks)app/config.go(2 hunks)app/decorators/gov_filter.go(0 hunks)app/decorators/min_commision.go(5 hunks)app/export.go(9 hunks)app/genesis.go(2 hunks)app/lanes.go(1 hunks)app/mac.go(2 hunks)app/modules.go(1 hunks)app/option.go(1 hunks)app/params/proto.go(0 hunks)app/sim/sim_config.go(1 hunks)app/sim/sim_utils.go(1 hunks)app/sim_test.go(5 hunks)app/types/app.go(3 hunks)app/upgrades.go(2 hunks)client/client.go(3 hunks)cmd/akash/cmd/auth.go(1 hunks)cmd/akash/cmd/bech32.go(1 hunks)cmd/akash/cmd/flag_test.go(4 hunks)cmd/akash/cmd/genaccounts.go(6 hunks)cmd/akash/cmd/root.go(6 hunks)cmd/akash/cmd/testnetify/cmd.go(3 hunks)cmd/akash/cmd/testnetify/escrow.go(1 hunks)cmd/akash/cmd/testnetify/state.go(14 hunks)cmd/akash/cmd/testnetify/util.go(2 hunks)cmd/akash/main.go(1 hunks)cmd/common/flags.go(0 hunks)docgen/main.go(1 hunks)events/cmd/root.go(4 hunks)events/publish.go(6 hunks)events/publish_test.go(1 hunks)events/query.go(2 hunks)go.mod(1 hunks)make/codegen.mk(1 hunks)make/init.mk(4 hunks)make/lint.mk(2 hunks)make/mod.mk(1 hunks)make/releasing.mk(6 hunks)make/setup-cache.mk(2 hunks)make/test-integration.mk(2 hunks)make/test-simulation.mk(1 hunks)make/test-upgrade.mk(0 hunks)meta.json(1 hunks)pubsub/bus_test.go(1 hunks)script/tools.sh(1 hunks)script/upgrades.sh(1 hunks)sdl/_testdata/deployment-svc-mismatch.yaml(0 hunks)sdl/_testdata/private_service.yaml(0 hunks)sdl/_testdata/profile-svc-name-mismatch.yaml(0 hunks)sdl/_testdata/service-mix.yaml(0 hunks)sdl/_testdata/service-mix2.yaml(0 hunks)sdl/_testdata/simple-double-ram.yaml(0 hunks)sdl/_testdata/simple-gpu.yaml(0 hunks)sdl/_testdata/simple-with-ip.yaml(0 hunks)sdl/_testdata/simple.yaml(0 hunks)sdl/_testdata/simple2.yaml(0 hunks)sdl/_testdata/simple3.yaml(0 hunks)sdl/_testdata/simple4.yaml(0 hunks)sdl/_testdata/storageClass1.yaml(0 hunks)sdl/_testdata/storageClass2.yaml(0 hunks)sdl/_testdata/storageClass3.yaml(0 hunks)sdl/_testdata/storageClass4.yaml(0 hunks)sdl/_testdata/storageClass5.yaml(0 hunks)sdl/_testdata/storageClass6.yaml(0 hunks)sdl/_testdata/v2.1-credentials-error.yaml(0 hunks)sdl/_testdata/v2.1-credentials.yaml(0 hunks)sdl/_testdata/v2.1-deployment-svc-mismatch.yaml(0 hunks)sdl/_testdata/v2.1-private_service.yaml(0 hunks)sdl/_testdata/v2.1-profile-svc-name-mismatch.yaml(0 hunks)sdl/_testdata/v2.1-service-mix.yaml(0 hunks)sdl/_testdata/v2.1-service-mix2.yaml(0 hunks)sdl/_testdata/v2.1-simple-gpu.yaml(0 hunks)sdl/_testdata/v2.1-simple-with-ip.yaml(0 hunks)sdl/_testdata/v2.1-simple.yaml(0 hunks)sdl/_testdata/v2.1-simple2.yaml(0 hunks)sdl/_testdata/v2.1-simple3.yaml(0 hunks)sdl/_testdata/v2.1-simple4.yaml(0 hunks)sdl/coin.go(0 hunks)sdl/coin_test.go(0 hunks)sdl/cpu.go(0 hunks)sdl/cpu_test.go(0 hunks)sdl/expose.go(0 hunks)sdl/full_test.go(0 hunks)sdl/gpu.go(0 hunks)sdl/gpu_test.go(0 hunks)sdl/groupBuilder_v2.go(0 hunks)sdl/groupBuilder_v2_1.go(0 hunks)sdl/memory.go(0 hunks)
⛔ Files not processed due to max files limit (44)
- sdl/placement.go
- sdl/pricing.go
- sdl/resources.go
- sdl/sdl.go
- sdl/sdl_test.go
- sdl/storage.go
- sdl/storage_test.go
- sdl/units.go
- sdl/units_test.go
- sdl/util/util.go
- sdl/util/util_test.go
- sdl/utils.go
- sdl/v2.go
- sdl/v2_1.go
- sdl/v2_1_ip_test.go
- sdl/v2_1_test.go
- sdl/v2_ip_test.go
- sdl/v2_test.go
- tests/e2e/certs_cli_test.go
- tests/e2e/certs_grpc_test.go
- tests/e2e/cli_test.go
- tests/e2e/deployment_cli_test.go
- tests/e2e/deployment_grpc_test.go
- tests/e2e/grpc_test.go
- tests/e2e/market_cli_test.go
- tests/e2e/market_grpc_test.go
- tests/e2e/provider_cli_test.go
- tests/e2e/provider_grpc_test.go
- tests/upgrade/test-cases.json
- tests/upgrade/test-config-gha.json
- tests/upgrade/upgrade_test.go
- tests/upgrade/v0.26.0/postupgrade.go
- tests/upgrade/v0.32.0/postupgrade.go
- tests/upgrade/v0.34.0/postupgrade.go
- tests/upgrade/v0.36.0/postupgrade.go
- tests/upgrade/workers_test.go
- testutil/audit.go
- testutil/base.go
- testutil/cert.go
- testutil/cli/cmd.go
- testutil/cosmos/keepers.go
- testutil/cosmos/mocks/AuthzKeeper_mock.go
- testutil/cosmos/mocks/BankKeeper_mock.go
- testutil/cosmos/mocks/TakeKeeper_mock.go
💤 Files with no reviewable changes (47)
- .goreleaser-docker.yaml
- make/test-upgrade.mk
- sdl/_testdata/v2.1-profile-svc-name-mismatch.yaml
- sdl/_testdata/simple3.yaml
- app/params/proto.go
- sdl/_testdata/v2.1-service-mix2.yaml
- sdl/coin.go
- sdl/coin_test.go
- sdl/cpu_test.go
- sdl/_testdata/simple2.yaml
- sdl/_testdata/v2.1-private_service.yaml
- sdl/_testdata/v2.1-credentials.yaml
- sdl/cpu.go
- sdl/_testdata/v2.1-deployment-svc-mismatch.yaml
- sdl/_testdata/v2.1-simple.yaml
- sdl/_testdata/storageClass2.yaml
- sdl/_testdata/simple-double-ram.yaml
- sdl/_testdata/service-mix.yaml
- sdl/_testdata/simple-gpu.yaml
- sdl/_testdata/v2.1-simple2.yaml
- sdl/_testdata/simple-with-ip.yaml
- sdl/_testdata/profile-svc-name-mismatch.yaml
- sdl/_testdata/v2.1-simple-with-ip.yaml
- sdl/_testdata/private_service.yaml
- sdl/_testdata/deployment-svc-mismatch.yaml
- sdl/_testdata/v2.1-service-mix.yaml
- sdl/_testdata/v2.1-simple3.yaml
- sdl/_testdata/storageClass1.yaml
- sdl/_testdata/v2.1-credentials-error.yaml
- sdl/_testdata/simple.yaml
- sdl/_testdata/v2.1-simple-gpu.yaml
- app/decorators/gov_filter.go
- sdl/_testdata/service-mix2.yaml
- sdl/full_test.go
- sdl/groupBuilder_v2.go
- sdl/_testdata/storageClass6.yaml
- sdl/_testdata/storageClass3.yaml
- sdl/memory.go
- sdl/groupBuilder_v2_1.go
- sdl/expose.go
- sdl/_testdata/storageClass5.yaml
- sdl/_testdata/storageClass4.yaml
- sdl/_testdata/v2.1-simple4.yaml
- sdl/gpu.go
- cmd/common/flags.go
- sdl/gpu_test.go
- sdl/_testdata/simple4.yaml
✅ Files skipped from review due to trivial changes (4)
- app/app_test.go
- README.md
- app/sim/sim_utils.go
- cmd/akash/cmd/auth.go
🚧 Files skipped from review as they are similar to previous changes (44)
- .github/.repo
- .env
- .github/workflows/concommits.yaml
- docgen/main.go
- .goreleaser.yaml
- cmd/akash/cmd/testnetify/escrow.go
- cmd/akash/cmd/bech32.go
- make/mod.mk
- meta.json
- pubsub/bus_test.go
- make/test-simulation.mk
- make/codegen.mk
- Makefile
- cmd/akash/cmd/testnetify/util.go
- events/publish_test.go
- script/upgrades.sh
- make/test-integration.mk
- cmd/akash/main.go
- .golangci.yaml
- events/query.go
- app/mac.go
- make/setup-cache.mk
- app/upgrades.go
- .mockery.yaml
- .github/actions/setup-ubuntu/action.yaml
- events/cmd/root.go
- app/lanes.go
- cmd/akash/cmd/genaccounts.go
- make/releasing.mk
- cmd/akash/cmd/testnetify/cmd.go
- events/publish.go
- .envrc
- app/config.go
- app/decorators/min_commision.go
- client/client.go
- app/genesis.go
- cmd/akash/cmd/flag_test.go
- make/lint.mk
- app/option.go
- cmd/akash/cmd/testnetify/state.go
- app/sim/sim_config.go
- go.mod
- make/init.mk
- script/tools.sh
🧰 Additional context used
🧬 Code Graph Analysis (2)
app/app_configure.go (4)
x/market/alias.go (1)
ModuleName(13-13)x/take/alias.go (1)
ModuleName(11-11)x/staking/alias.go (1)
ModuleName(13-13)x/cert/alias.go (1)
ModuleName(13-13)
cmd/akash/cmd/root.go (7)
util/cli/configs.go (1)
InterceptConfigsPreRunHandler(148-247)app/app.go (3)
DefaultHome(93-93)NewApp(117-354)AkashApp(103-114)cmd/akash/cmd/testnetify/cmd.go (1)
Cmd(32-259)events/cmd/root.go (1)
EventCmd(22-39)cmd/akash/cmd/auth.go (1)
AuthCmd(23-31)cmd/akash/cmd/genaccounts.go (1)
AddGenesisAccountCmd(35-195)util/server/server.go (1)
Commands(31-58)
🪛 golangci-lint (1.64.8)
app/modules.go
144-144: SA1019: params.NewAppModule is deprecated: the params module is deprecated and will be removed in the next Cosmos SDK major release.
(staticcheck)
app/app.go
188-188: SA1019: crisis.FlagSkipGenesisInvariants is deprecated: this flag is no longer used and will be removed along with x/crisis in the next major Cosmos SDK release.
(staticcheck)
220-220: SA1019: app.MM.RegisterInvariants is deprecated: this function is a no-op and will be removed in the next release of the Cosmos SDK.
(staticcheck)
app/ante.go
17-17: field mevLane is unused
(unused)
18-18: field auctionKeeper is unused
(unused)
19-19: field txConfig is unused
(unused)
🪛 actionlint (1.7.7)
.github/workflows/release.yaml
56-56: 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)
67-67: shellcheck reported issue in this script: SC2086:info:2:34: Double quote to prevent globbing and word splitting
(shellcheck)
.github/workflows/tests.yaml
320-320: shellcheck reported issue in this script: SC2086:info:2:40: Double quote to prevent globbing and word splitting
(shellcheck)
🪛 markdownlint-cli2 (0.17.2)
CHANGELOG.md
41-41: Bare URL used
(MD034, no-bare-urls)
_docs/adr/adr-001-network-upgrades.md
43-43: Hard tabs
Column: 1
(MD010, no-hard-tabs)
45-45: Hard tabs
Column: 1
(MD010, no-hard-tabs)
46-46: Hard tabs
Column: 1
(MD010, no-hard-tabs)
47-47: Hard tabs
Column: 1
(MD010, no-hard-tabs)
48-48: Hard tabs
Column: 1
(MD010, no-hard-tabs)
⏰ 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). (7)
- GitHub Check: network-upgrade-names
- GitHub Check: lint-go
- GitHub Check: release-dry-run
- GitHub Check: sims
- GitHub Check: tests
- GitHub Check: coverage
- GitHub Check: build-bins
🔇 Additional comments (23)
app/ante.go (1)
64-64: Verify theNewDeductFeeDecoratorsignature against your Cosmos SDK versionI wasn’t able to locate the
NewDeductFeeDecoratordefinition in the local codebase—this decorator is imported fromgithub.com/cosmos/cosmos-sdk/x/auth/ante. Please:
- Check your
go.modto confirm which Cosmos SDK version you’re using.- Inspect the
NewDeductFeeDecoratorsignature in that version’sx/auth/antepackage (e.g. on GitHub or in your module cache).- Ensure that it now expects a fourth parameter and that passing
nilhere is appropriate for your use case. If not, remove the extra argument or replacenilwith the correct value.app/export.go (2)
86-89: LGTM: Consistent error handling implemented.The error handling is now consistent with explicit error checking and panic calls throughout the function, addressing the previous concern about inconsistent error handling patterns.
286-351: LGTM: Well-designed setup function with options pattern.The new
Setupfunction uses a clean options pattern that allows flexible configuration while maintaining sensible defaults. The error handling is appropriate and the function structure is clear.app/sim_test.go (2)
58-67: LGTM: Clean abstraction with storeKeyGetter interface.The
storeKeyGetterinterface provides a clean abstraction for store key access, and the updatedStoreKeysPrefixesstruct using string keys is more maintainable than the previous approach.
85-97: LGTM: Modernized simulation function with proper utilities.The
simulateFromSeedFuncis well-structured using the new simulation utilities and maintains all necessary parameters for comprehensive testing.cmd/akash/cmd/root.go (6)
46-48: LGTM: Clean encapsulation of encoding configurationThe
appCreatorstruct properly encapsulates the encoding config, making it reusable across app creation and export operations.
72-94: LGTM: Proper modernization of persistent prerun setupThe function properly uses the new encoding config and updated flag constants from the
cflagspackage. The client context initialization is correctly structured.
144-153: LGTM: Clean CLI command integrationThe updated command registration properly uses the new CLI package commands with encoding options. The replacement of explicit
QueryCmdandTxCmdfunctions with calls tocli.QueryCmd()andcli.TxCmd()is a good modernization.
165-178: LGTM: Well-structured genesis command builderThe
genesisCommandfunction provides a clean way to build genesis-related commands with proper encoding config integration and extensibility for additional subcommands.
180-247: LGTM: Comprehensive app creation with proper configurationThe
newAppmethod correctly:
- Uses updated flag constants from
cflagspackage- Handles chain ID fallback from genesis if not provided
- Properly configures BaseApp options
- Comments out snapshot-related code appropriately
The implementation aligns well with the broader SDK modernization.
249-284: LGTM: Robust app export implementationThe
appExportmethod includes proper validation:
- Validates
appOptsis aviper.Viperinstance- Forces invariant check period to 1 for exports
- Supports module-specific exports
- Includes proper error handling
The implementation is well-structured and handles edge cases appropriately.
app/types/app.go (7)
84-86: LGTM: Centralized account address prefixThe
AccountAddressPrefixconstant provides a single source of truth for the Akash address prefix, improving maintainability.
90-126: LGTM: Excellent keeper organizationThe reorganization of
AppKeepersintoCosmos,Akash, andExternalgroups provides:
- Clear separation of concerns
- Better maintainability
- Logical grouping of related keepers
- Consistent pointer usage for SDK keepers
This is a significant architectural improvement.
134-139: LGTM: Proper lazy initialization patternThe use of
sync.Oncefor lazy initialization of store key maps is a good pattern that:
- Ensures thread-safe initialization
- Avoids redundant key generation
- Provides clean separation of concerns
141-153: LGTM: Clean store key generationThe
GenerateKeysmethod properly uses the helper functions to create all necessary store keys with appropriate thread safety viasync.Once.
265-510: LGTM: Comprehensive keeper initializationThe
InitNormalKeepersmethod provides excellent coverage of:
- All Cosmos SDK keepers with proper configuration
- Akash-specific keepers with correct dependencies
- IBC routing setup
- Governance proposal handlers
- Proper authority configuration
The commented sections for auction and other modules show good forward planning.
512-534: LGTM: Proper hook registrationThe
SetupHooksmethod correctly:
- Registers staking hooks for distribution and slashing
- Sets up governance hooks (ready for future expansion)
- Configures market hooks for escrow events
This provides the necessary integration between modules.
565-616: LGTM: Well-organized store key managementThe helper functions provide clean separation between:
- Core Cosmos SDK store keys
- Akash-specific store keys
- Transient and memory store keys
This modular approach makes it easy to manage and extend the key sets.
app/app.go (5)
103-114: LGTM: Clean app structure compositionThe updated
AkashAppstruct properly:
- Embeds
*baseapp.BaseAppand*apptypes.App- Separates codec concerns (main vs legacy amino)
- Includes BlockSDK CheckTx handler
- Maintains clear field organization
117-156: LGTM: Proper app initialization with encoding configThe constructor correctly:
- Uses the new
sdkutil.EncodingConfig- Sets up BaseApp with proper configuration
- Handles home path defaulting appropriately
- Embeds the app types for modular keeper management
246-336: LGTM: Excellent BlockSDK v2 integrationThe mempool and lane system setup is well-implemented:
- Proper MEV and default lane creation
- Correct mempool configuration with lanes
- Proper ante handler setup across lanes
- Clean ABCI handler configuration (PrepareProposal, ProcessProposal, CheckTx)
This represents a significant upgrade to the transaction processing architecture.
494-547: LGTM: Updated ABCI lifecycle methodsThe ABCI methods properly:
- Return appropriate response types and errors
- Include new lifecycle hooks (
PreBlocker,Precommitter,PrepareCheckStater)- Handle module manager calls correctly
- Maintain existing patch application logic
599-636: LGTM: Modernized service registrationThe service registration updates properly use:
- New
cmtservicepackage for Tendermint services- Updated grpc-gateway route registration
- New node service registration
- Consistent client context usage
6679569 to
a5eac07
Compare
There was a problem hiding this comment.
Actionable comments posted: 4
♻️ Duplicate comments (16)
.github/workflows/release.yaml (1)
56-56: Address unknown runner labelThe static analysis tool flagged
gh-runner-testas an unknown runner label. If this is a custom self-hosted runner, ensure it's properly configured and consider documenting it in an actionlint.yaml config file.app/ante.go (1)
15-20: BlockSDKAnteHandlerParams is defined but never usedStatic analysis and code inspection confirm:
- The fields
mevLane,auctionKeeper, andtxConfiginBlockSDKAnteHandlerParamsare never referenced inNewAnteHandler.HandlerOptionsincludes aBlockSDK BlockSDKAnteHandlerParamsfield, but it isn't consumed by any ante decorator.Actions required:
- Either remove
BlockSDKAnteHandlerParamsand theBlockSDKfield fromHandlerOptionsuntil MEV integration is implemented,- Or wire
BlockSDKAnteHandlerParamsinto your ante handler setup by implementing the MEV lane logic.go.mod (1)
3-5: Update to latest Go patch release.The current go.mod specifies valid releases but could benefit from the latest patch. Consider updating to Go 1.24.5 for the newest security and bug fixes.
app/modules.go (2)
144-146: Consider migrating away from the deprecated params module.The params module is deprecated and will be removed in the next Cosmos SDK major release. Plan for migration to avoid future compatibility issues.
238-244: Remove duplicate authzmodule initialization.The
authzmodule.NewAppModuleis initialized twice in the simulation modules (lines 213-219 and 238-244).app/app_configure.go (1)
52-53: Address commented-out staking and governance modules.Commenting out these modules while maintaining references elsewhere in the codebase will cause issues. Either fully remove all references or re-enable the modules.
script/tools.sh (2)
18-18: Fix typo in Debian package name.Should be
build-essential(singular) notbuild-essentials.
75-75: Make sed command portable across platforms.The
-rflag is GNU sed specific and should use-Efor better portability..github/workflows/tests.yaml (2)
302-302: Fix empty masks parameter in direnv-action.The empty
masks: ''parameter should either be removed or populated with environment variables that need masking.
57-61: Replace repeated dependency installation with composite action.Multiple jobs repeat the same dependency installation commands. This should use the existing
setup-ubuntucomposite action.Also applies to: 81-85, 106-110, 129-133, 157-161, 187-191, 222-226, 285-289
cmd/akash/cmd/root.go (2)
46-48: appCreator usage resolvedThe
appCreatorstruct and its methods are now properly utilized in the code (lines 131, 151-155), resolving the previous concern about dead code.
64-64: Address commented Akash RPC routeThe Akash RPC route registration remains commented without explanation. Please either remove this dead code or add a clear TODO comment explaining why it's disabled and under what conditions it should be re-enabled.
app/types/app.go (1)
200-263: Address parameter validation in InitSpecialKeepersThe method should validate critical parameters such as
cdc,bApp, andhomePathto ensure they are not nil or empty. Adding validation at the start of the method would enable fail-fast behavior and improve robustness.app/app.go (3)
188-188: Remove deprecated flag usageThe
crisis.FlagSkipGenesisInvariantsflag is deprecated and will be removed in the next major Cosmos SDK release. Consider removing this usage or replacing it with the recommended alternative from the latest SDK migration guide.
220-220: Remove deprecated RegisterInvariants callThe
MM.RegisterInvariantsfunction is deprecated and is now a no-op. This call should be removed or commented out as part of the modernization effort.
655-673: Approve CheckTx modernization but address reflection usageThe BlockSDK CheckTx integration is excellent and provides the MEV-aware transaction handling capabilities. However, the reflection-based
ChainID()method accessing private BaseApp fields is fragile and should be replaced with a stored chainID field in the AkashApp struct as suggested in the past review comment.
🧹 Nitpick comments (4)
CHANGELOG.md (1)
41-41: URL migration aligns with module namespace update.The URL update correctly reflects the migration from
github.com/akash-network/nodetopkg.akt.dev/nodeas part of the broader refactoring effort.Consider using proper markdown link syntax to address the static analysis warning:
-* (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)_docs/adr/adr-001-network-upgrades.md (1)
43-48: Import path updates correctly reflect dependency migration.The documentation properly reflects the migration from:
- Tendermint → CometBFT
- Legacy Cosmos SDK paths →
cosmossdk.iomodulesHowever, address the formatting inconsistency:
import ( - "github.com/cometbft/cometbft/libs/log" + "github.com/cometbft/cometbft/libs/log" - storetypes "cosmossdk.io/store" + storetypes "cosmossdk.io/store" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" - upgradetypes "cosmossdk.io/x/upgrade/types" + upgradetypes "cosmossdk.io/x/upgrade/types" )app/modules.go (2)
91-91: Address TODO comment for mint module configuration.Both module functions contain the same TODO comment
// todo akash-network/support#4for the mint module's nil parameter. Consider tracking this in your issue system if not already done.Would you like me to help identify what this nil parameter should be or create an issue to track this TODO?
Also applies to: 256-256
195-198: Consistent commenting of auction module.The auction module is commented out in both functions but with slightly different comment styles. Consider standardizing the approach or documenting why it's disabled.
Also applies to: 295-298
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
go.sumis excluded by!**/*.sum
📒 Files selected for processing (107)
.env(1 hunks).envrc(1 hunks).github/.repo(1 hunks).github/actions/setup-ubuntu/action.yaml(1 hunks).github/workflows/concommits.yaml(1 hunks).github/workflows/release.yaml(5 hunks).github/workflows/tests.yaml(18 hunks).golangci.yaml(1 hunks).goreleaser-docker.yaml(0 hunks).goreleaser.yaml(1 hunks).mockery.yaml(1 hunks)CHANGELOG.md(1 hunks)Makefile(3 hunks)README.md(1 hunks)_docs/adr/adr-001-network-upgrades.md(1 hunks)app/ante.go(1 hunks)app/app.go(8 hunks)app/app_configure.go(3 hunks)app/app_test.go(1 hunks)app/config.go(2 hunks)app/decorators/gov_filter.go(0 hunks)app/decorators/min_commision.go(5 hunks)app/export.go(9 hunks)app/genesis.go(2 hunks)app/lanes.go(1 hunks)app/mac.go(2 hunks)app/modules.go(1 hunks)app/option.go(1 hunks)app/params/proto.go(0 hunks)app/sim/sim_config.go(1 hunks)app/sim/sim_utils.go(1 hunks)app/sim_test.go(5 hunks)app/types/app.go(3 hunks)app/upgrades.go(2 hunks)client/client.go(3 hunks)cmd/akash/cmd/auth.go(1 hunks)cmd/akash/cmd/bech32.go(1 hunks)cmd/akash/cmd/flag_test.go(4 hunks)cmd/akash/cmd/genaccounts.go(6 hunks)cmd/akash/cmd/root.go(6 hunks)cmd/akash/cmd/testnetify/cmd.go(3 hunks)cmd/akash/cmd/testnetify/escrow.go(1 hunks)cmd/akash/cmd/testnetify/state.go(14 hunks)cmd/akash/cmd/testnetify/util.go(2 hunks)cmd/akash/main.go(1 hunks)cmd/common/flags.go(0 hunks)docgen/main.go(1 hunks)events/cmd/root.go(4 hunks)events/publish.go(6 hunks)events/publish_test.go(1 hunks)events/query.go(2 hunks)go.mod(1 hunks)make/codegen.mk(1 hunks)make/init.mk(4 hunks)make/lint.mk(2 hunks)make/mod.mk(1 hunks)make/releasing.mk(6 hunks)make/setup-cache.mk(2 hunks)make/test-integration.mk(2 hunks)make/test-simulation.mk(1 hunks)make/test-upgrade.mk(0 hunks)meta.json(1 hunks)pubsub/bus_test.go(1 hunks)script/tools.sh(1 hunks)script/upgrades.sh(1 hunks)sdl/_testdata/deployment-svc-mismatch.yaml(0 hunks)sdl/_testdata/private_service.yaml(0 hunks)sdl/_testdata/profile-svc-name-mismatch.yaml(0 hunks)sdl/_testdata/service-mix.yaml(0 hunks)sdl/_testdata/service-mix2.yaml(0 hunks)sdl/_testdata/simple-double-ram.yaml(0 hunks)sdl/_testdata/simple-gpu.yaml(0 hunks)sdl/_testdata/simple-with-ip.yaml(0 hunks)sdl/_testdata/simple.yaml(0 hunks)sdl/_testdata/simple2.yaml(0 hunks)sdl/_testdata/simple3.yaml(0 hunks)sdl/_testdata/simple4.yaml(0 hunks)sdl/_testdata/storageClass1.yaml(0 hunks)sdl/_testdata/storageClass2.yaml(0 hunks)sdl/_testdata/storageClass3.yaml(0 hunks)sdl/_testdata/storageClass4.yaml(0 hunks)sdl/_testdata/storageClass5.yaml(0 hunks)sdl/_testdata/storageClass6.yaml(0 hunks)sdl/_testdata/v2.1-credentials-error.yaml(0 hunks)sdl/_testdata/v2.1-credentials.yaml(0 hunks)sdl/_testdata/v2.1-deployment-svc-mismatch.yaml(0 hunks)sdl/_testdata/v2.1-private_service.yaml(0 hunks)sdl/_testdata/v2.1-profile-svc-name-mismatch.yaml(0 hunks)sdl/_testdata/v2.1-service-mix.yaml(0 hunks)sdl/_testdata/v2.1-service-mix2.yaml(0 hunks)sdl/_testdata/v2.1-simple-gpu.yaml(0 hunks)sdl/_testdata/v2.1-simple-with-ip.yaml(0 hunks)sdl/_testdata/v2.1-simple.yaml(0 hunks)sdl/_testdata/v2.1-simple2.yaml(0 hunks)sdl/_testdata/v2.1-simple3.yaml(0 hunks)sdl/_testdata/v2.1-simple4.yaml(0 hunks)sdl/coin.go(0 hunks)sdl/coin_test.go(0 hunks)sdl/cpu.go(0 hunks)sdl/cpu_test.go(0 hunks)sdl/expose.go(0 hunks)sdl/full_test.go(0 hunks)sdl/gpu.go(0 hunks)sdl/gpu_test.go(0 hunks)sdl/groupBuilder_v2.go(0 hunks)sdl/groupBuilder_v2_1.go(0 hunks)sdl/memory.go(0 hunks)
⛔ Files not processed due to max files limit (44)
- sdl/placement.go
- sdl/pricing.go
- sdl/resources.go
- sdl/sdl.go
- sdl/sdl_test.go
- sdl/storage.go
- sdl/storage_test.go
- sdl/units.go
- sdl/units_test.go
- sdl/util/util.go
- sdl/util/util_test.go
- sdl/utils.go
- sdl/v2.go
- sdl/v2_1.go
- sdl/v2_1_ip_test.go
- sdl/v2_1_test.go
- sdl/v2_ip_test.go
- sdl/v2_test.go
- tests/e2e/certs_cli_test.go
- tests/e2e/certs_grpc_test.go
- tests/e2e/cli_test.go
- tests/e2e/deployment_cli_test.go
- tests/e2e/deployment_grpc_test.go
- tests/e2e/grpc_test.go
- tests/e2e/market_cli_test.go
- tests/e2e/market_grpc_test.go
- tests/e2e/provider_cli_test.go
- tests/e2e/provider_grpc_test.go
- tests/upgrade/test-cases.json
- tests/upgrade/test-config-gha.json
- tests/upgrade/upgrade_test.go
- tests/upgrade/v0.26.0/postupgrade.go
- tests/upgrade/v0.32.0/postupgrade.go
- tests/upgrade/v0.34.0/postupgrade.go
- tests/upgrade/v0.36.0/postupgrade.go
- tests/upgrade/workers_test.go
- testutil/audit.go
- testutil/base.go
- testutil/cert.go
- testutil/cli/cmd.go
- testutil/cosmos/keepers.go
- testutil/cosmos/mocks/AuthzKeeper_mock.go
- testutil/cosmos/mocks/BankKeeper_mock.go
- testutil/cosmos/mocks/TakeKeeper_mock.go
💤 Files with no reviewable changes (47)
- make/test-upgrade.mk
- .goreleaser-docker.yaml
- sdl/_testdata/v2.1-service-mix2.yaml
- app/params/proto.go
- sdl/_testdata/v2.1-simple3.yaml
- sdl/_testdata/v2.1-profile-svc-name-mismatch.yaml
- sdl/coin.go
- sdl/_testdata/simple2.yaml
- sdl/_testdata/simple.yaml
- sdl/_testdata/simple3.yaml
- sdl/_testdata/v2.1-private_service.yaml
- sdl/_testdata/private_service.yaml
- sdl/_testdata/simple-with-ip.yaml
- sdl/_testdata/v2.1-deployment-svc-mismatch.yaml
- sdl/_testdata/profile-svc-name-mismatch.yaml
- sdl/_testdata/simple-gpu.yaml
- sdl/memory.go
- sdl/_testdata/v2.1-credentials.yaml
- sdl/_testdata/v2.1-credentials-error.yaml
- sdl/_testdata/storageClass6.yaml
- sdl/_testdata/v2.1-simple-gpu.yaml
- sdl/_testdata/v2.1-simple2.yaml
- sdl/_testdata/storageClass3.yaml
- sdl/_testdata/v2.1-service-mix.yaml
- sdl/_testdata/v2.1-simple.yaml
- sdl/coin_test.go
- sdl/_testdata/storageClass1.yaml
- sdl/cpu_test.go
- sdl/_testdata/storageClass5.yaml
- sdl/groupBuilder_v2.go
- sdl/full_test.go
- sdl/expose.go
- app/decorators/gov_filter.go
- sdl/cpu.go
- sdl/_testdata/v2.1-simple4.yaml
- sdl/_testdata/simple4.yaml
- sdl/_testdata/storageClass2.yaml
- sdl/groupBuilder_v2_1.go
- sdl/_testdata/service-mix.yaml
- sdl/gpu_test.go
- sdl/_testdata/v2.1-simple-with-ip.yaml
- sdl/gpu.go
- sdl/_testdata/storageClass4.yaml
- cmd/common/flags.go
- sdl/_testdata/service-mix2.yaml
- sdl/_testdata/simple-double-ram.yaml
- sdl/_testdata/deployment-svc-mismatch.yaml
✅ Files skipped from review due to trivial changes (5)
- README.md
- make/test-integration.mk
- events/publish_test.go
- cmd/akash/cmd/auth.go
- app/sim/sim_utils.go
🚧 Files skipped from review as they are similar to previous changes (40)
- .github/.repo
- docgen/main.go
- .github/workflows/concommits.yaml
- .goreleaser.yaml
- cmd/akash/cmd/bech32.go
- make/mod.mk
- meta.json
- make/codegen.mk
- events/query.go
- cmd/akash/cmd/testnetify/escrow.go
- make/test-simulation.mk
- pubsub/bus_test.go
- Makefile
- .env
- cmd/akash/cmd/testnetify/util.go
- cmd/akash/main.go
- app/app_test.go
- .golangci.yaml
- app/mac.go
- cmd/akash/cmd/testnetify/cmd.go
- script/upgrades.sh
- events/cmd/root.go
- .mockery.yaml
- make/setup-cache.mk
- cmd/akash/cmd/genaccounts.go
- app/decorators/min_commision.go
- events/publish.go
- make/releasing.mk
- .github/actions/setup-ubuntu/action.yaml
- app/option.go
- app/genesis.go
- .envrc
- cmd/akash/cmd/flag_test.go
- client/client.go
- app/sim/sim_config.go
- make/lint.mk
- cmd/akash/cmd/testnetify/state.go
- make/init.mk
- app/lanes.go
- app/upgrades.go
🧰 Additional context used
🧬 Code Graph Analysis (3)
app/app_configure.go (4)
x/market/alias.go (1)
ModuleName(13-13)x/take/alias.go (1)
ModuleName(11-11)x/staking/alias.go (1)
ModuleName(13-13)x/cert/alias.go (1)
ModuleName(13-13)
app/export.go (2)
app/app.go (3)
AkashApp(103-114)DefaultHome(93-93)NewApp(117-354)app/config.go (1)
ModuleBasics(75-77)
app/types/app.go (4)
x/escrow/keeper/keeper.go (2)
Keeper(20-38)NewKeeper(40-56)x/take/keeper/keeper.go (2)
Keeper(24-30)NewKeeper(33-39)testutil/state/suite.go (1)
Keepers(49-58)x/market/hooks/hooks.go (1)
Hooks(13-16)
🪛 golangci-lint (1.64.8)
app/ante.go
17-17: field mevLane is unused
(unused)
18-18: field auctionKeeper is unused
(unused)
19-19: field txConfig is unused
(unused)
app/app.go
188-188: SA1019: crisis.FlagSkipGenesisInvariants is deprecated: this flag is no longer used and will be removed along with x/crisis in the next major Cosmos SDK release.
(staticcheck)
220-220: SA1019: app.MM.RegisterInvariants is deprecated: this function is a no-op and will be removed in the next release of the Cosmos SDK.
(staticcheck)
app/modules.go
144-144: SA1019: params.NewAppModule is deprecated: the params module is deprecated and will be removed in the next Cosmos SDK major release.
(staticcheck)
🪛 actionlint (1.7.7)
.github/workflows/release.yaml
56-56: 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)
67-67: shellcheck reported issue in this script: SC2086:info:2:34: Double quote to prevent globbing and word splitting
(shellcheck)
.github/workflows/tests.yaml
47-47: description is required in metadata of "setup-ubuntu" action at "/home/jailuser/git/.github/actions/setup-ubuntu/action.yaml"
(action)
304-304: shellcheck reported issue in this script: SC2086:info:2:40: Double quote to prevent globbing and word splitting
(shellcheck)
🪛 markdownlint-cli2 (0.17.2)
CHANGELOG.md
41-41: Bare URL used
(MD034, no-bare-urls)
_docs/adr/adr-001-network-upgrades.md
43-43: Hard tabs
Column: 1
(MD010, no-hard-tabs)
45-45: Hard tabs
Column: 1
(MD010, no-hard-tabs)
46-46: Hard tabs
Column: 1
(MD010, no-hard-tabs)
47-47: Hard tabs
Column: 1
(MD010, no-hard-tabs)
48-48: Hard tabs
Column: 1
(MD010, no-hard-tabs)
⏰ 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). (6)
- GitHub Check: network-upgrade-names
- GitHub Check: lint-go
- GitHub Check: coverage
- GitHub Check: tests
- GitHub Check: release-dry-run
- GitHub Check: sims
🔇 Additional comments (25)
.github/workflows/release.yaml (3)
17-22: Standardized dependency installation improves workflow consistency.The addition of comprehensive dependency installation (
make,direnv,unzip,lz4,wget,curl,npm,jq,pv,coreutils) andgit-clifftool installation standardizes the environment setup across CI workflows.Also applies to: 70-75
60-63: Cleanup step prevents potential conflicts.The workspace cleanup before checkout is a good practice to prevent artifacts from previous runs interfering with the current workflow.
94-94: Environment and artifact configuration improvements.The addition of
TEST_CONFIGenvironment variable and more specific artifact path (.akash*.log) improve test configuration and reduce artifact noise.Also applies to: 104-104
app/config.go (3)
4-6: Module import modernization aligns with dependency upgrades.The migration to
cosmossdk.iomodules and IBC v8 correctly reflects the broader dependency upgrade throughout the codebase.Also applies to: 24-26
36-36: Genutil initialization updated for new SDK pattern.The change from
genutil.AppModuleBasic{}togenutil.NewAppModuleBasic(genutiltypes.DefaultMessageValidator)follows the new Cosmos SDK initialization pattern.
48-55: Governance proposal handlers significantly reduced.Only the params client proposal handler remains active. Verify this doesn't break existing governance functionality, especially for upgrade proposals and IBC client updates.
app/ante.go (2)
35-55: Error handling improved with consistent wrapping.The updated error wrapping using
sdkerrors.ErrLogic.Wrap()provides more consistent error handling throughout the ante handler validation.
64-64: DeductFeeDecorator updated for new SDK signature.The additional
nilparameter inNewDeductFeeDecoratorreflects the updated Cosmos SDK signature, likely for transaction fee granter functionality.go.mod (2)
1-1: LGTM: Module path migration to pkg.akt.dev.The migration from
github.com/akash-network/nodetopkg.akt.dev/nodealigns with the broader namespace reorganization seen throughout this PR.
22-27: Major Dependency Upgrades VerifiedWe’ve confirmed that custom migration logic for breaking changes is in place and no unmanaged deprecated APIs remain:
UpgradeHandler implementations found in
• upgrades/software/v1.0.0/upgrade.go
• registered via app/upgrades.go
This covers Tendermint consensus‐param migrations and any store upgrades.No TODO/FIXME deprecation markers in application code.
The only “deprecated” notices are:
• Cosmos SDK’s own legacy‐amino codec stubs in x/staking/module.go
• Temporary zero-height genesis support in app/export.go
Those are upstream deprecations and do not affect your current upgrade path.Please proceed with your end-to-end upgrade tests to validate the migration flows.
app/app_configure.go (1)
82-82: Consensus module initialization confirmedThe consensus parameter keeper is properly set up and the module is correctly integrated:
- In app/types/app.go,
consensusparamkeeper.NewKeeper(...)initializes the keeper and assigns it toapp.Keepers.Cosmos.ConsensusParams.consensustypes.ModuleNameis imported and included in the genesis initialization order in app/app_configure.go.No further action required.
.github/workflows/tests.yaml (1)
264-266: Inconsistent runner configuration — please verify.File:
.github/workflows/tests.yaml
Lines: 264–266runs-on: upgrade-tester needs: network-upgrade-names
- The
network-upgradejob uses theupgrade-testerlabel, whilenetwork-upgrade-namesusesubuntu-latest.- We didn’t find any references to an
upgrade-testerrunner in your workflow files. Please confirm that:
- The
upgrade-testerself-hosted runner label is registered and active in your GitHub organization.- It has all the tools, permissions, and environment setup required by the
network-upgradejob.- If this difference was not intentional, align both jobs to run on the same runner.
app/export.go (3)
30-50: Excellent modernization of export functionalityThe updated function signature with
modulesToExportparameter and improved error handling with explicit returns fromExportGenesisForModulessignificantly enhances the modularity and robustness of the export process.
98-282: Comprehensive error handling improvementsThe systematic addition of error checking throughout
prepForZeroHeightGenesissignificantly improves the robustness of the zero-height genesis preparation. The consistent pattern of explicit error checking and panic on failure is appropriate for this critical initialization code.
286-351: Well-designed Setup function refactoringThe new variadic options pattern and encoding config usage modernize the Setup function effectively. The conditional genesis initialization and improved configurability enhance flexibility while maintaining backward compatibility.
app/sim_test.go (3)
1-51: Excellent modernization of simulation test infrastructureThe package change to
app_testimproves test isolation, and the comprehensive import updates to CometBFT and newer Cosmos SDK versions align perfectly with the broader modernization effort.
58-67: Clean abstraction with storeKeyGetter interfaceThe introduction of the
storeKeyGetterinterface provides a clean abstraction for store key retrieval, improving testability and flexibility in the simulation tests.
99-532: Comprehensive test modernizationThe test functions have been effectively updated to use the new app initialization patterns, enhanced simulation setup, and improved error handling. The updated store comparison logic with the
storeKeyGetterinterface provides better flexibility and maintainability.cmd/akash/cmd/root.go (1)
52-178: Well-executed CLI modernizationThe migration to
sdkutil.MakeEncodingConfig()and the newcflagspackage demonstrates excellent alignment with the broader modernization effort. The updated command structure and initialization patterns improve maintainability.app/types/app.go (3)
90-153: Excellent architectural improvementsThe new nested
AppKeepersstructure withCosmos,Akash, andExternalgroups provides excellent separation of concerns. The lazy initialization of store keys usingsync.Onceis a performance optimization that maintains thread safety.
265-510: Well-structured keeper initializationThe
InitNormalKeepersmethod demonstrates excellent dependency injection patterns and proper use of the new runtime services. The systematic keeper creation with appropriate address codecs and module addresses follows modern Cosmos SDK best practices.
512-616: Clean hook setup and helper organizationThe
SetupHooksmethod provides clean hook registration for the various modules, and the helper functions for store key organization maintain excellent separation of concerns and readability.app/app.go (3)
117-354: Comprehensive app modernization with BlockSDK integrationThe
NewAppfunction has been excellently modernized with proper integration of the new encoding config, BlockSDK lanes, and laned mempool system. The initialization flow is well-structured and follows modern Cosmos SDK patterns.
494-547: Excellent ABCI method modernizationThe updated ABCI method signatures with proper error returns and new lifecycle hooks (
PreBlocker,Precommitter,PrepareCheckStater) align perfectly with the newer Cosmos SDK patterns and improve error handling throughout the application lifecycle.
599-648: Well-executed API route modernizationThe updated API route registration with new grpc-gateway routes, node service registration, and improved Swagger static file serving demonstrates excellent alignment with modern Cosmos SDK patterns.
| done < <(find . -type f -not \( \ | ||
| -path "./install.sh" \ | ||
| -or -path "./upgrades/*" \ | ||
| -or -path "./.cache/*" \ | ||
| -or -path "./dist/*" \ | ||
| -or -path "./.git*" \ | ||
| -or -name "*.md" \ | ||
| -or -path "./.idea/*" \)) |
There was a problem hiding this comment.
🛠️ Refactor suggestion
Consider security implications of broad file modification.
The replace_import_path function modifies files across the entire repository except for specific exclusions. Consider adding more restrictive patterns to avoid accidentally modifying sensitive files.
Add more specific file type restrictions:
done < <(find . -type f -not \( \
-path "./install.sh" \
-or -path "./upgrades/*" \
-or -path "./.cache/*" \
-or -path "./dist/*" \
-or -path "./.git*" \
-or -name "*.md" \
- -or -path "./.idea/*" \))
+ -or -path "./.idea/*" \
+ -or -name "*.json" \
+ -or -name "*.yaml" \
+ -or -name "*.yml" \
+ \) -name "*.go" -o -name "go.mod" -o -name "go.sum")Committable suggestion skipped: line range outside the PR's diff.
🤖 Prompt for AI Agents
In script/tools.sh around lines 103 to 110, the find command used in
replace_import_path is too broad and risks modifying sensitive files. Restrict
the file types processed by adding specific file extensions (e.g., .js, .ts,
.py) to the find command to limit modifications only to relevant source code
files. Adjust the find expression to include these file type filters while
maintaining existing exclusions.
783710c to
275474f
Compare
There was a problem hiding this comment.
Actionable comments posted: 0
♻️ Duplicate comments (15)
events/publish.go (1)
56-56: Type assertion safety concern already addressed.The type assertion could panic if the node doesn't implement
EventsClientinterface. This issue was previously identified and should be resolved..github/workflows/release.yaml (1)
41-41: Custom runner label still needs documentation.The
gh-runner-testrunner label remains unknown to actionlint. This issue was previously identified and should be resolved by either adding an actionlint.yaml configuration or updating to a valid runner label.app/app_test.go (1)
7-42: Test coverage removed without replacement.The entire
TestAkashApp_Exporttest function is commented out, removing critical test coverage for application export functionality. This issue was previously identified and should be addressed.app/app_configure.go (1)
52-53: Address commented-out staking and governance modules.This is the same issue identified in previous reviews. The astaking and agov modules are still commented out, which will break functionality that depends on these modules.
app/genesis.go (3)
32-64: Improve error handling in genesisFilterTokens function.This function still panics on errors instead of returning them, uses string replacement that could have unintended side effects, and has unnecessary map unmarshaling as identified in previous reviews.
73-81: Handle GetPubKey error and remove unused code.The function still ignores the error from
GetPubKey()and callsAddress()without using the result, as identified in previous reviews.
153-157: Improve error message and remove unused validator updates conversion.The panic message is still too generic and the validator updates conversion result is not used, as identified in previous reviews.
app/modules.go (2)
144-146: Consider migrating away from the deprecated params module.The params module is deprecated and will be removed in the next Cosmos SDK major release, as identified in previous reviews.
213-244: Remove duplicate authzmodule initialization in simulation modules.The
authzmodule.NewAppModuleis initialized twice in theappSimModulesfunction, as identified in previous reviews..github/workflows/tests.yaml (2)
163-165: Duplicate checkout step should be removed.There are two consecutive checkout steps in the network-upgrade job, which is redundant.
178-180: Shellcheck warning needs to be addressed.The static analysis detected an unquoted variable that could cause word splitting issues.
app/app.go (4)
157-184: Keeper initialization order needs attention.The TODO comment highlights a critical issue where governance proposal handlers are registered before hooks are set up, potentially causing nil pointer dereferences.
188-188: Deprecated flag usage should be addressed.The usage of
crisis.FlagSkipGenesisInvariantsis deprecated and should be removed or replaced.
220-220: Deprecated RegisterInvariants call should be removed.The
MM.RegisterInvariantsfunction is deprecated and should be removed.
622-625: ChainID method uses fragile reflection.The
ChainIDmethod uses reflection to access private fields, which is fragile and may break with SDK updates.
🧹 Nitpick comments (5)
CHANGELOG.md (1)
41-41: Wrap URL in Markdown link to silence MD034 and stay stylistically consistentEvery other external reference in the changelog uses
[text](url)syntax.
Switching this bare URL to the same pattern both removes themarkdownlintwarning and keeps formatting uniform.-* (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)_docs/adr/adr-001-network-upgrades.md (1)
43-48: Fix indentation formatting in code blocks.The code blocks contain hard tabs which should be replaced with spaces for consistency.
Apply consistent spacing:
- "github.com/cometbft/cometbft/libs/log" + "github.com/cometbft/cometbft/libs/log" - storetypes "cosmossdk.io/store" + storetypes "cosmossdk.io/store" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" - upgradetypes "cosmossdk.io/x/upgrade/types" + upgradetypes "cosmossdk.io/x/upgrade/types".github/workflows/release.yaml (1)
18-18: Add description to custom action.The setup-ubuntu action is missing a description field in its metadata, which is required for proper action documentation.
Add a description field to
.github/actions/setup-ubuntu/action.yaml:name: "Setup Ubuntu Environment" description: "Sets up Go, Node.js, and other dependencies for Ubuntu runners"app/modules.go (1)
91-91: Address TODO comment for mint module.There's a TODO comment referencing "akash-network/support#4" for the mint module. Consider addressing this or providing more context about the missing functionality.
Would you like me to help investigate what should be implemented for the mint module's missing parameter?
app/sim_test.go (1)
52-55: Consider making the hardcoded chain ID configurable.The hardcoded
AppChainID = "akash-sim"might be better as a configurable parameter or environment variable to support different test environments.Consider making this configurable:
-const ( - AppChainID = "akash-sim" -) +var AppChainID = func() string { + if id := os.Getenv("SIM_CHAIN_ID"); id != "" { + return id + } + return "akash-sim" +}()
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
go.sumis excluded by!**/*.sum
📒 Files selected for processing (107)
.env(1 hunks).envrc(1 hunks).github/.repo(1 hunks).github/actions/setup-ubuntu/action.yaml(1 hunks).github/workflows/concommits.yaml(1 hunks).github/workflows/release.yaml(4 hunks).github/workflows/tests.yaml(8 hunks).golangci.yaml(1 hunks).goreleaser-docker.yaml(0 hunks).goreleaser.yaml(1 hunks).mockery.yaml(1 hunks)CHANGELOG.md(1 hunks)Makefile(3 hunks)README.md(1 hunks)_docs/adr/adr-001-network-upgrades.md(1 hunks)app/ante.go(1 hunks)app/app.go(7 hunks)app/app_configure.go(3 hunks)app/app_test.go(1 hunks)app/config.go(2 hunks)app/decorators/gov_filter.go(0 hunks)app/decorators/min_commision.go(5 hunks)app/export.go(7 hunks)app/genesis.go(2 hunks)app/lanes.go(1 hunks)app/mac.go(2 hunks)app/modules.go(1 hunks)app/option.go(1 hunks)app/params/proto.go(0 hunks)app/sim/sim_config.go(1 hunks)app/sim/sim_utils.go(1 hunks)app/sim_test.go(5 hunks)app/types/app.go(3 hunks)app/upgrades.go(2 hunks)client/client.go(3 hunks)cmd/akash/cmd/auth.go(2 hunks)cmd/akash/cmd/bech32.go(1 hunks)cmd/akash/cmd/flag_test.go(4 hunks)cmd/akash/cmd/genaccounts.go(6 hunks)cmd/akash/cmd/root.go(6 hunks)cmd/akash/cmd/testnetify/cmd.go(3 hunks)cmd/akash/cmd/testnetify/escrow.go(1 hunks)cmd/akash/cmd/testnetify/state.go(17 hunks)cmd/akash/cmd/testnetify/util.go(2 hunks)cmd/akash/main.go(1 hunks)cmd/common/flags.go(0 hunks)docgen/main.go(1 hunks)events/cmd/root.go(4 hunks)events/publish.go(6 hunks)events/publish_test.go(1 hunks)events/query.go(2 hunks)go.mod(1 hunks)make/codegen.mk(1 hunks)make/init.mk(4 hunks)make/lint.mk(2 hunks)make/mod.mk(1 hunks)make/releasing.mk(6 hunks)make/setup-cache.mk(2 hunks)make/test-integration.mk(2 hunks)make/test-simulation.mk(1 hunks)make/test-upgrade.mk(0 hunks)meta.json(1 hunks)pubsub/bus_test.go(1 hunks)script/tools.sh(1 hunks)script/upgrades.sh(1 hunks)sdl/_testdata/deployment-svc-mismatch.yaml(0 hunks)sdl/_testdata/private_service.yaml(0 hunks)sdl/_testdata/profile-svc-name-mismatch.yaml(0 hunks)sdl/_testdata/service-mix.yaml(0 hunks)sdl/_testdata/service-mix2.yaml(0 hunks)sdl/_testdata/simple-double-ram.yaml(0 hunks)sdl/_testdata/simple-gpu.yaml(0 hunks)sdl/_testdata/simple-with-ip.yaml(0 hunks)sdl/_testdata/simple.yaml(0 hunks)sdl/_testdata/simple2.yaml(0 hunks)sdl/_testdata/simple3.yaml(0 hunks)sdl/_testdata/simple4.yaml(0 hunks)sdl/_testdata/storageClass1.yaml(0 hunks)sdl/_testdata/storageClass2.yaml(0 hunks)sdl/_testdata/storageClass3.yaml(0 hunks)sdl/_testdata/storageClass4.yaml(0 hunks)sdl/_testdata/storageClass5.yaml(0 hunks)sdl/_testdata/storageClass6.yaml(0 hunks)sdl/_testdata/v2.1-credentials-error.yaml(0 hunks)sdl/_testdata/v2.1-credentials.yaml(0 hunks)sdl/_testdata/v2.1-deployment-svc-mismatch.yaml(0 hunks)sdl/_testdata/v2.1-private_service.yaml(0 hunks)sdl/_testdata/v2.1-profile-svc-name-mismatch.yaml(0 hunks)sdl/_testdata/v2.1-service-mix.yaml(0 hunks)sdl/_testdata/v2.1-service-mix2.yaml(0 hunks)sdl/_testdata/v2.1-simple-gpu.yaml(0 hunks)sdl/_testdata/v2.1-simple-with-ip.yaml(0 hunks)sdl/_testdata/v2.1-simple.yaml(0 hunks)sdl/_testdata/v2.1-simple2.yaml(0 hunks)sdl/_testdata/v2.1-simple3.yaml(0 hunks)sdl/_testdata/v2.1-simple4.yaml(0 hunks)sdl/coin.go(0 hunks)sdl/coin_test.go(0 hunks)sdl/cpu.go(0 hunks)sdl/cpu_test.go(0 hunks)sdl/expose.go(0 hunks)sdl/full_test.go(0 hunks)sdl/gpu.go(0 hunks)sdl/gpu_test.go(0 hunks)sdl/groupBuilder_v2.go(0 hunks)sdl/groupBuilder_v2_1.go(0 hunks)sdl/memory.go(0 hunks)
⛔ Files not processed due to max files limit (44)
- sdl/placement.go
- sdl/pricing.go
- sdl/resources.go
- sdl/sdl.go
- sdl/sdl_test.go
- sdl/storage.go
- sdl/storage_test.go
- sdl/units.go
- sdl/units_test.go
- sdl/util/util.go
- sdl/util/util_test.go
- sdl/utils.go
- sdl/v2.go
- sdl/v2_1.go
- sdl/v2_1_ip_test.go
- sdl/v2_1_test.go
- sdl/v2_ip_test.go
- sdl/v2_test.go
- tests/e2e/certs_cli_test.go
- tests/e2e/certs_grpc_test.go
- tests/e2e/cli_test.go
- tests/e2e/deployment_cli_test.go
- tests/e2e/deployment_grpc_test.go
- tests/e2e/grpc_test.go
- tests/e2e/market_cli_test.go
- tests/e2e/market_grpc_test.go
- tests/e2e/provider_cli_test.go
- tests/e2e/provider_grpc_test.go
- tests/upgrade/test-cases.json
- tests/upgrade/test-config-gha.json
- tests/upgrade/upgrade_test.go
- tests/upgrade/v0.26.0/postupgrade.go
- tests/upgrade/v0.32.0/postupgrade.go
- tests/upgrade/v0.34.0/postupgrade.go
- tests/upgrade/v0.36.0/postupgrade.go
- tests/upgrade/workers_test.go
- testutil/audit.go
- testutil/base.go
- testutil/cert.go
- testutil/cli/cmd.go
- testutil/cosmos/keepers.go
- testutil/cosmos/mocks/AuthzKeeper_mock.go
- testutil/cosmos/mocks/BankKeeper_mock.go
- testutil/cosmos/mocks/TakeKeeper_mock.go
💤 Files with no reviewable changes (47)
- .goreleaser-docker.yaml
- make/test-upgrade.mk
- app/params/proto.go
- sdl/_testdata/v2.1-deployment-svc-mismatch.yaml
- sdl/_testdata/v2.1-simple3.yaml
- sdl/_testdata/simple3.yaml
- sdl/_testdata/v2.1-credentials.yaml
- sdl/_testdata/v2.1-service-mix2.yaml
- sdl/cpu_test.go
- sdl/coin_test.go
- sdl/full_test.go
- sdl/_testdata/service-mix2.yaml
- sdl/_testdata/v2.1-profile-svc-name-mismatch.yaml
- sdl/_testdata/simple.yaml
- sdl/coin.go
- sdl/_testdata/simple2.yaml
- sdl/_testdata/v2.1-simple.yaml
- sdl/_testdata/storageClass3.yaml
- sdl/_testdata/v2.1-simple2.yaml
- sdl/_testdata/v2.1-credentials-error.yaml
- sdl/_testdata/simple-double-ram.yaml
- sdl/memory.go
- sdl/_testdata/private_service.yaml
- sdl/_testdata/v2.1-private_service.yaml
- sdl/_testdata/storageClass6.yaml
- sdl/_testdata/profile-svc-name-mismatch.yaml
- sdl/_testdata/deployment-svc-mismatch.yaml
- sdl/_testdata/v2.1-service-mix.yaml
- sdl/_testdata/storageClass2.yaml
- sdl/_testdata/simple-gpu.yaml
- sdl/_testdata/simple-with-ip.yaml
- sdl/_testdata/simple4.yaml
- sdl/_testdata/service-mix.yaml
- sdl/_testdata/v2.1-simple-with-ip.yaml
- sdl/cpu.go
- sdl/_testdata/storageClass4.yaml
- sdl/_testdata/v2.1-simple-gpu.yaml
- sdl/_testdata/storageClass1.yaml
- cmd/common/flags.go
- sdl/expose.go
- app/decorators/gov_filter.go
- sdl/groupBuilder_v2_1.go
- sdl/groupBuilder_v2.go
- sdl/_testdata/storageClass5.yaml
- sdl/gpu_test.go
- sdl/gpu.go
- sdl/_testdata/v2.1-simple4.yaml
✅ Files skipped from review due to trivial changes (2)
- events/publish_test.go
- README.md
🚧 Files skipped from review as they are similar to previous changes (42)
- .github/.repo
- cmd/akash/cmd/bech32.go
- docgen/main.go
- .env
- .goreleaser.yaml
- meta.json
- cmd/akash/cmd/auth.go
- make/codegen.mk
- make/test-simulation.mk
- pubsub/bus_test.go
- events/query.go
- make/mod.mk
- script/upgrades.sh
- Makefile
- .github/workflows/concommits.yaml
- cmd/akash/main.go
- cmd/akash/cmd/testnetify/escrow.go
- app/upgrades.go
- .mockery.yaml
- cmd/akash/cmd/testnetify/util.go
- make/test-integration.mk
- events/cmd/root.go
- make/setup-cache.mk
- make/releasing.mk
- app/mac.go
- cmd/akash/cmd/genaccounts.go
- .envrc
- app/decorators/min_commision.go
- app/ante.go
- client/client.go
- app/lanes.go
- cmd/akash/cmd/testnetify/cmd.go
- make/lint.mk
- app/sim/sim_utils.go
- .github/actions/setup-ubuntu/action.yaml
- script/tools.sh
- cmd/akash/cmd/flag_test.go
- make/init.mk
- app/option.go
- app/sim/sim_config.go
- cmd/akash/cmd/testnetify/state.go
- go.mod
🧰 Additional context used
🧬 Code Graph Analysis (3)
app/app_configure.go (4)
x/market/alias.go (1)
ModuleName(13-13)x/take/alias.go (1)
ModuleName(11-11)x/staking/alias.go (1)
ModuleName(13-13)x/cert/alias.go (1)
ModuleName(13-13)
app/export.go (2)
app/app.go (2)
AkashApp(103-114)NewApp(117-354)app/config.go (1)
ModuleBasics(75-77)
app/app.go (5)
app/types/app.go (1)
App(129-140)app/mac.go (2)
ModuleAccountPerms(14-25)ModuleAccountAddrs(27-34)app/app_configure.go (1)
OrderInitGenesis(63-95)app/ante.go (1)
NewAnteHandler(33-73)upgrades/types/types.go (1)
GetHeightPatchesList(99-101)
🪛 actionlint (1.7.7)
.github/workflows/release.yaml
18-18: description is required in metadata of "setup-ubuntu" action at "/home/jailuser/git/.github/actions/setup-ubuntu/action.yaml"
(action)
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)
.github/workflows/tests.yaml
98-98: description is required in metadata of "setup-ubuntu" action at "/home/jailuser/git/.github/actions/setup-ubuntu/action.yaml"
(action)
178-178: shellcheck reported issue in this script: SC2086:info:2:40: Double quote to prevent globbing and word splitting
(shellcheck)
🪛 markdownlint-cli2 (0.17.2)
CHANGELOG.md
41-41: Bare URL used
(MD034, no-bare-urls)
_docs/adr/adr-001-network-upgrades.md
43-43: Hard tabs
Column: 1
(MD010, no-hard-tabs)
45-45: Hard tabs
Column: 1
(MD010, no-hard-tabs)
46-46: Hard tabs
Column: 1
(MD010, no-hard-tabs)
47-47: Hard tabs
Column: 1
(MD010, no-hard-tabs)
48-48: Hard tabs
Column: 1
(MD010, no-hard-tabs)
⏰ 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). (8)
- GitHub Check: network-upgrade-names
- GitHub Check: release-dry-run
- GitHub Check: sims
- GitHub Check: lint-shell
- GitHub Check: lint-go
- GitHub Check: build-bins
- GitHub Check: coverage
- GitHub Check: tests
🔇 Additional comments (54)
events/publish.go (1)
155-181: LGTM! Event processing simplified effectively.The refactored
processEventfunction usingsdk.ParseTypedEventwith explicit type filtering is cleaner and more maintainable than the previous approach. The type switch pattern provides clear event type validation._docs/adr/adr-001-network-upgrades.md (1)
42-52: Documentation correctly reflects import path modernization.The import path updates from Tendermint to CometBFT and to newer cosmossdk.io modules are properly documented and align with the broader migration effort.
.github/workflows/release.yaml (1)
15-18: LGTM! Workflow simplification improves maintainability.The consolidation of multiple setup steps into a single custom action
.github/actions/setup-ubuntureduces duplication and makes the workflow more maintainable..golangci.yaml (1)
1-48: LGTM! Linting configuration modernized effectively.The upgrade to golangci-lint v2 format with expanded linter coverage is excellent. Notable improvements include:
- Added security-focused linters (
gosec,errcheck,errchkjson)- Configured
gocriticwith practical exclusions- Added structured exclusions for generated code and common false positives
- Enabled
gofmtformatter with appropriate exclusionsThis provides more comprehensive code quality checks while maintaining practical usability.
app/config.go (3)
36-36: Good modernization of genutil initialization.The update to use
genutil.NewAppModuleBasic(genutiltypes.DefaultMessageValidator)properly incorporates message validation, which is the recommended approach for newer Cosmos SDK versions.
61-61: Confirm IBC light client module addition.The addition of
ibclightclient.AppModuleBasic{}is appropriate for IBC v8 compatibility.
48-55: Confirm intentional removal of CLI proposal handlers for distribution, upgrade, and IBC proposalsThe following CLI handlers in app/config.go have been commented out:
// distrclient.ProposalHandler, // upgradeclient.LegacyProposalHandler, // upgradeclient.LegacyCancelProposalHandler, // ibcclient.UpdateClientProposalHandler, // ibcclient.UpgradeProposalHandler,– ModuleBasics still includes
distr.AppModuleBasic,upgrade.AppModuleBasic, andibc.AppModuleBasic,
– app/modules.go still registersdistr.NewAppModule,upgrade.NewAppModule, andibc.NewAppModule.On-chain support for these proposals remains intact, but the corresponding CLI subcommands will no longer be available.
Please verify that this change is intentional. If CLI support for these governance proposals is required, uncomment the handlers above or update the documentation to reflect their removal.
Location:
- app/config.go, lines 48–55
app/app_configure.go (2)
82-82: Verify consensus module addition in genesis order.The addition of
consensustypes.ModuleNameto the genesis initialization order is appropriate for newer Cosmos SDK versions.
90-92: Confirm intentional commenting of inflation and governance modules.The inflation and governance modules are commented out in the genesis order, which should align with the commented modules in the basic manager.
app/genesis.go (1)
67-70: Good addition of codec parameter to NewDefaultGenesisState.The updated function signature properly accepts a codec parameter, which is necessary for the filtering functionality.
app/modules.go (1)
45-200: Excellent modularization of app module initialization.The centralization of module initialization into dedicated functions improves code organization and maintainability. The separation of main app modules and simulation modules is well-structured.
app/export.go (4)
47-50: Good improvement to export error handling.The change to use
ExportGenesisForModuleswith proper error return and checking is a significant improvement over the previous implementation.
282-347: Excellent refactoring of Setup function with options pattern.The new Setup function using variadic options provides much better flexibility and configurability. The use of
SetupAppOptionallows for clean customization of the app initialization process.
94-110: Improved error handling in validator iteration.The explicit error checking and panics for validator operations provide better error visibility compared to silent failures.
15-19: Good modernization of imports.The migration from Tendermint to CometBFT imports and updated Cosmos SDK imports align with the broader modernization effort.
app/sim_test.go (8)
1-1: Package name change is appropriate for external testing.The package name change from
apptoapp_testfollows Go testing conventions for external testing, which is good practice for simulation tests that should test the public API.
57-66: The storeKeyGetter interface abstracts store key access well.The new
storeKeyGetterinterface provides a clean abstraction for accessing store keys, which improves testability and allows for different implementations.
68-70: Init function properly initializes simulation flags.The
init()function correctly callssim.GetSimulatorFlags()to set up simulation flags during package initialization.
84-96: Simulation function signature updated correctly.The
simulateFromSeedFuncfunction has been updated to work with the new app structure and simulation utilities. The function signature and implementation look correct for the new patterns.
98-139: Test setup modernized with new configuration patterns.The
TestFullAppSimulationfunction correctly uses the new simulation setup utilities and app initialization patterns. The encoding config registration and app options setup are appropriate.
213-371: Store key comparison updated with comprehensive coverage.The
storeKeysPrefixesarray has been updated to include all the necessary store keys for comparison, including new keys for feegrant, authz, upgrade, and consensus modules. The structure correctly uses the newstoreKeyGetterinterface.
373-390: Store comparison logic improved with better error handling.The store comparison loop now uses the new
storeKeyGetterinterface and provides detailed mismatch information. The error handling and logging are comprehensive.
466-481: Determinism test optimized with more iterations.The determinism test now runs more iterations per seed (
numTimesToRunPerSeed = 3) which provides better coverage for non-determinism detection..github/workflows/tests.yaml (5)
23-23: Additional macOS dependencies added appropriately.The addition of
pv,lz4, andgit-cliffto the macOS dependencies is consistent with the Ubuntu setup and supports the build requirements.
46-50: Composite action usage reduces duplication effectively.The replacement of repetitive setup steps with
./.github/actions/setup-ubuntucomposite action is a good practice that reduces code duplication and improves maintainability.
70-88: Job renaming improves clarity.The renaming of jobs from
linttolint-goandshellchecktolint-shellprovides better clarity about what each job does.
128-157: Network upgrade job configuration updated consistently.The network upgrade job has been updated to use
ubuntu-latestrunner and the new composite action, which is consistent with other jobs.
206-208: Dispatch release job dependencies updated correctly.The job dependencies have been updated to reflect the renamed lint jobs, maintaining the correct dependency chain.
cmd/akash/cmd/root.go (7)
45-47: AppCreator struct encapsulates app creation logic well.The
appCreatorstruct provides a clean way to encapsulate app creation logic with the encoding config, which is good practice for maintainability.
51-68: Root command initialization updated correctly.The root command initialization has been updated to use the new
sdkutil.MakeEncodingConfig()and properly configure the persistent pre-run hook.
71-93: Client context setup modernized appropriately.The persistent pre-run hook has been updated to use the new encoding config and updated broadcast mode flags from the
cflagspackage.
104-127: ExecuteWithCtx function provides better context handling.The new
ExecuteWithCtxfunction provides better context handling by accepting a context parameter and setting up both client and server contexts appropriately.
129-158: Command initialization updated with new patterns.The
initRootCmdfunction has been updated to use the new CLI command patterns and theappCreatorstruct methods, which is consistent with the modernization effort.
179-246: App creation method handles configuration comprehensively.The
newAppmethod properly handles various configuration options including chain ID fallback, skip upgrade heights, and BaseApp options. The chain ID fallback logic is particularly well-implemented.
248-283: App export method includes proper validation.The
appExportmethod includes proper validation for required parameters and handles the export configuration appropriately.app/types/app.go (8)
91-127: AppKeepers structure provides excellent organization.The reorganization of keepers into nested
CosmosandAkashstructs with anExternalplaceholder provides excellent organization and makes the codebase more maintainable.
129-140: App struct enhanced with comprehensive store key management.The
Appstruct now includes a logger and lazy-initialized maps for different types of store keys, which is a good improvement for organization and performance.
142-154: Store key generation uses thread-safe lazy initialization.The
GenerateKeysmethod usessync.Onceto ensure thread-safe lazy initialization of store keys, which is excellent practice.
156-199: Accessor methods provide clean API for store keys.The accessor methods (
GetSubspace,GetKVStoreKey, etc.) provide a clean API for accessing store keys and subspaces with proper error handling.
201-264: InitSpecialKeepers method handles critical initialization properly.The
InitSpecialKeepersmethod properly handles the initialization of foundational keepers like params, consensus params, capability, crisis, and upgrade keepers in the correct order.
266-493: InitNormalKeepers method comprehensively initializes all keepers.The
InitNormalKeepersmethod properly initializes all the Cosmos SDK and Akash-specific keepers with correct dependencies and configurations. The governance router setup is particularly well-implemented.
495-517: SetupHooks method configures module hooks appropriately.The
SetupHooksmethod properly configures hooks for staking, governance, and escrow modules, ensuring proper interaction between modules.
519-602: Helper functions provide comprehensive store key management.The helper functions (
kvStoreKeys,akashKVStoreKeys, etc.) provide comprehensive coverage of all store keys needed by the application.app/app.go (11)
103-114: AkashApp struct modernized with proper embedding.The
AkashAppstruct now properly embeds*baseapp.BaseAppand*apptypes.App, which provides a clean architecture for accessing both base functionality and custom app features.
117-155: App constructor updated with new configuration patterns.The
NewAppfunction has been updated to use the new encoding config and properly initialize the embedded structs. The home path handling is well-implemented.
210-221: Module manager setup updated correctly.The module manager setup has been updated to use the new patterns with proper ordering of PreBlockers, BeginBlockers, and InitGenesis.
246-259: BlockSDK integration implemented correctly.The BlockSDK integration with MEV-aware lanes and laned mempool is implemented correctly, providing advanced transaction processing capabilities.
262-265: Store mounting updated with new patterns.The store mounting has been updated to use the new store key accessor methods, which is consistent with the app architecture changes.
283-343: ABCI handlers configured comprehensively.The ABCI handlers are properly configured with the new BlockSDK prepare proposal, process proposal, and check transaction handlers.
339-346: Lifecycle methods initialized correctly.The app lifecycle methods (InitChainer, PreBlocker, BeginBlocker, etc.) are properly initialized with the new method signatures.
446-457: InitChainer updated with error handling.The
InitChainermethod has been updated to return an error and properly handle the module version map initialization.
459-470: PreBlocker implemented with proper gas handling.The
PreBlockermethod is properly implemented with infinite gas meter to handle non-deterministic gas usage.
607-625: CheckTx override provides BlockSDK integration.The
CheckTxoverride properly integrates with the BlockSDK to verify bid transactions and bundled transactions before mempool insertion.
627-640: Reflection service caching is well-implemented.The caching of the reflection service is a good optimization to avoid recreating the service in tests.
There was a problem hiding this comment.
Actionable comments posted: 0
♻️ Duplicate comments (16)
.github/workflows/tests.yaml (4)
162-164: Duplicate checkout step still present
We still have two consecutiveactions/checkout@v4steps. Remove either one.
175-177: Emptymasks:disables masking – clarify or drop the input
Same concern as last round; omit the line if no vars need masking or list the vars to hide.
195-197: Log upload pattern likely misses real filesOnly files starting with a dot match
.akash*.log; upgrade tests usually createakashd.log.
Use both patterns or drop the leading dot:- .cache/run/upgrade/validators/logs/.akash*.log + .cache/run/upgrade/validators/logs/akash*.log + .cache/run/upgrade/validators/logs/.akash*.log
178-180: Quote${{ github.ref }}to avoid word-splitting (SC2086)- test_required=$(./script/upgrades.sh test-required ${{ github.ref }}) + test_required=$(./script/upgrades.sh test-required "${{ github.ref }}").github/workflows/release.yaml (2)
41-41: Unknown runner labelgh-runner-test
actionlintflags this label. Either:
- Add it to an
actionlint.yamlwhitelist, or- Switch to
self-hosted+ additional labels, or a GitHub-hosted runner.
74-75: Same log-pattern issue as in tests workflowThe release workflow still uploads only hidden
.akash*.logfiles; consider the dual-pattern fix suggested earlier.app/genesis.go (3)
32-64: Consider returning errors instead of panicking and use a more robust token replacement approach.The function has several issues that were previously identified:
- Panics on errors instead of returning them, which prevents proper error handling by callers
- String replacement approach (
strings.ReplaceAll) could replace unintended occurrences of"stake"in values or keys- The unmarshaling to
map[string]interface{}serves no purpose
73-81: Handle GetPubKey error and remove unused code.The function ignores the error from
GetPubKey()and callsAddress()without using the result. This issue was previously identified and should be addressed.
153-157: Improve error message and remove unused validator updates conversion.The panic message is too generic and the validator updates conversion result is not used. This issue was previously identified and should be addressed.
app/app_configure.go (1)
52-53: Action Required: Address commented-out staking and governance modules.Commenting out
astaking.AppModuleBasic{}andagov.AppModuleBasic{}will leave dangling references and break parameter migrations, CLI commands, and keeper wiring. This issue was previously identified and still needs to be addressed.app/export.go (1)
83-83: Inconsistent error handling patternWhile most of the function uses explicit error checking and panics, this line uses a direct panic on error. For consistency with the rest of the function's error handling pattern, consider:
if err != nil { - panic(err) + panic(fmt.Errorf("invalid validator address %s: %w", addr, err)) }cmd/akash/cmd/root.go (1)
63-63: Clarify or remove commented Akash RPC registrationThe Akash RPC route is commented out without explanation. Please either remove this commented line if the Akash RPC route is deprecated, or add a clear TODO comment explaining why it's disabled and under what conditions it should be re-enabled.
app/types/app.go (1)
201-264: Consider adding parameter validationThe
InitSpecialKeepersmethod should validate critical parameters to fail fast:func (app *App) InitSpecialKeepers( cdc codec.Codec, legacyAmino *codec.LegacyAmino, bApp *baseapp.BaseApp, invCheckPeriod uint, skipUpgradeHeights map[int64]bool, homePath string) { + + if cdc == nil { + panic("codec cannot be nil") + } + if bApp == nil { + panic("baseapp cannot be nil") + } + if homePath == "" { + panic("homePath cannot be empty") + } app.GenerateKeys()app/app.go (3)
188-188: Remove usage of deprecated flagThe
crisis.FlagSkipGenesisInvariantsflag is deprecated and will be removed in the next major Cosmos SDK release. Consider using an alternative approach or removing this functionality if it's no longer needed.
220-220: Remove deprecated RegisterInvariants callThe
MM.RegisterInvariantsfunction is deprecated and is a no-op in the current SDK version.- app.MM.RegisterInvariants(app.Keepers.Cosmos.Crisis) + // RegisterInvariants is deprecated and no longer needed
622-625: Use the existing WithChainID option and remove reflectionRather than pulling the private
BaseApp.chainIDviareflect, store the chain ID in yourAkashAppwhen you build it. Add achainIDfield to theAkashAppstruct, set it during construction, and return it directly instead of using fragile reflection.
🧹 Nitpick comments (5)
.github/workflows/tests.yaml (2)
22-25: Avoid hard-coding Homebrew Bash path on macOS runners
/usr/local/bin/bashexists only on Intel runners; Apple-silicon runners use/opt/homebrew/bin/bash. Resolve via the prefix returned bybrew --prefix:- sudo chsh -s /usr/local/bin/bash + sudo chsh -s "$(brew --prefix)"/bin/bash
46-49: Missingdescriptionkey in composite action breaks actionlint
setup-ubuntutriggersactionlinterror (description is required).
Add a short description to.github/actions/setup-ubuntu/action.yamlmetadata..github/workflows/release.yaml (1)
15-18:setup-ubuntucomposite action lacksdescriptionfieldThe action violates metadata requirements and fails
actionlint.
Add a briefdescription:key to.github/actions/setup-ubuntu/action.yaml.CHANGELOG.md (1)
41-41: Format the URL as a proper markdown link.The static analysis tool correctly flags this as a bare URL. Consider formatting it as a proper markdown link for better readability and compliance with markdown standards.
Apply this diff to format the URL properly:
-* (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)_docs/adr/adr-001-network-upgrades.md (1)
43-48: Replace hard tabs with spaces.The static analysis tool correctly identifies hard tabs in the import section. Please replace them with spaces for consistency with markdown formatting standards.
Apply this diff to replace hard tabs with spaces:
- "github.com/cometbft/cometbft/libs/log" + "github.com/cometbft/cometbft/libs/log" - storetypes "cosmossdk.io/store" + storetypes "cosmossdk.io/store" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" - upgradetypes "cosmossdk.io/x/upgrade/types" + upgradetypes "cosmossdk.io/x/upgrade/types"
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
go.sumis excluded by!**/*.sum
📒 Files selected for processing (107)
.env(1 hunks).envrc(1 hunks).github/.repo(1 hunks).github/actions/setup-ubuntu/action.yaml(1 hunks).github/workflows/concommits.yaml(1 hunks).github/workflows/release.yaml(4 hunks).github/workflows/tests.yaml(8 hunks).golangci.yaml(1 hunks).goreleaser-docker.yaml(0 hunks).goreleaser.yaml(1 hunks).mockery.yaml(1 hunks)CHANGELOG.md(1 hunks)Makefile(3 hunks)README.md(1 hunks)_docs/adr/adr-001-network-upgrades.md(1 hunks)app/ante.go(1 hunks)app/app.go(7 hunks)app/app_configure.go(3 hunks)app/app_test.go(1 hunks)app/config.go(2 hunks)app/decorators/gov_filter.go(0 hunks)app/decorators/min_commision.go(5 hunks)app/export.go(7 hunks)app/genesis.go(2 hunks)app/lanes.go(1 hunks)app/mac.go(2 hunks)app/modules.go(1 hunks)app/option.go(1 hunks)app/params/proto.go(0 hunks)app/sim/sim_config.go(1 hunks)app/sim/sim_utils.go(1 hunks)app/sim_test.go(5 hunks)app/types/app.go(3 hunks)app/upgrades.go(2 hunks)client/client.go(3 hunks)cmd/akash/cmd/auth.go(2 hunks)cmd/akash/cmd/bech32.go(1 hunks)cmd/akash/cmd/flag_test.go(4 hunks)cmd/akash/cmd/genaccounts.go(6 hunks)cmd/akash/cmd/root.go(6 hunks)cmd/akash/cmd/testnetify/cmd.go(3 hunks)cmd/akash/cmd/testnetify/escrow.go(1 hunks)cmd/akash/cmd/testnetify/state.go(17 hunks)cmd/akash/cmd/testnetify/util.go(2 hunks)cmd/akash/main.go(1 hunks)cmd/common/flags.go(0 hunks)docgen/main.go(1 hunks)events/cmd/root.go(4 hunks)events/publish.go(6 hunks)events/publish_test.go(1 hunks)events/query.go(2 hunks)go.mod(1 hunks)make/codegen.mk(1 hunks)make/init.mk(4 hunks)make/lint.mk(2 hunks)make/mod.mk(1 hunks)make/releasing.mk(6 hunks)make/setup-cache.mk(2 hunks)make/test-integration.mk(2 hunks)make/test-simulation.mk(1 hunks)make/test-upgrade.mk(0 hunks)meta.json(1 hunks)pubsub/bus_test.go(1 hunks)script/tools.sh(1 hunks)script/upgrades.sh(1 hunks)sdl/_testdata/deployment-svc-mismatch.yaml(0 hunks)sdl/_testdata/private_service.yaml(0 hunks)sdl/_testdata/profile-svc-name-mismatch.yaml(0 hunks)sdl/_testdata/service-mix.yaml(0 hunks)sdl/_testdata/service-mix2.yaml(0 hunks)sdl/_testdata/simple-double-ram.yaml(0 hunks)sdl/_testdata/simple-gpu.yaml(0 hunks)sdl/_testdata/simple-with-ip.yaml(0 hunks)sdl/_testdata/simple.yaml(0 hunks)sdl/_testdata/simple2.yaml(0 hunks)sdl/_testdata/simple3.yaml(0 hunks)sdl/_testdata/simple4.yaml(0 hunks)sdl/_testdata/storageClass1.yaml(0 hunks)sdl/_testdata/storageClass2.yaml(0 hunks)sdl/_testdata/storageClass3.yaml(0 hunks)sdl/_testdata/storageClass4.yaml(0 hunks)sdl/_testdata/storageClass5.yaml(0 hunks)sdl/_testdata/storageClass6.yaml(0 hunks)sdl/_testdata/v2.1-credentials-error.yaml(0 hunks)sdl/_testdata/v2.1-credentials.yaml(0 hunks)sdl/_testdata/v2.1-deployment-svc-mismatch.yaml(0 hunks)sdl/_testdata/v2.1-private_service.yaml(0 hunks)sdl/_testdata/v2.1-profile-svc-name-mismatch.yaml(0 hunks)sdl/_testdata/v2.1-service-mix.yaml(0 hunks)sdl/_testdata/v2.1-service-mix2.yaml(0 hunks)sdl/_testdata/v2.1-simple-gpu.yaml(0 hunks)sdl/_testdata/v2.1-simple-with-ip.yaml(0 hunks)sdl/_testdata/v2.1-simple.yaml(0 hunks)sdl/_testdata/v2.1-simple2.yaml(0 hunks)sdl/_testdata/v2.1-simple3.yaml(0 hunks)sdl/_testdata/v2.1-simple4.yaml(0 hunks)sdl/coin.go(0 hunks)sdl/coin_test.go(0 hunks)sdl/cpu.go(0 hunks)sdl/cpu_test.go(0 hunks)sdl/expose.go(0 hunks)sdl/full_test.go(0 hunks)sdl/gpu.go(0 hunks)sdl/gpu_test.go(0 hunks)sdl/groupBuilder_v2.go(0 hunks)sdl/groupBuilder_v2_1.go(0 hunks)sdl/memory.go(0 hunks)
⛔ Files not processed due to max files limit (44)
- sdl/placement.go
- sdl/pricing.go
- sdl/resources.go
- sdl/sdl.go
- sdl/sdl_test.go
- sdl/storage.go
- sdl/storage_test.go
- sdl/units.go
- sdl/units_test.go
- sdl/util/util.go
- sdl/util/util_test.go
- sdl/utils.go
- sdl/v2.go
- sdl/v2_1.go
- sdl/v2_1_ip_test.go
- sdl/v2_1_test.go
- sdl/v2_ip_test.go
- sdl/v2_test.go
- tests/e2e/certs_cli_test.go
- tests/e2e/certs_grpc_test.go
- tests/e2e/cli_test.go
- tests/e2e/deployment_cli_test.go
- tests/e2e/deployment_grpc_test.go
- tests/e2e/grpc_test.go
- tests/e2e/market_cli_test.go
- tests/e2e/market_grpc_test.go
- tests/e2e/provider_cli_test.go
- tests/e2e/provider_grpc_test.go
- tests/upgrade/test-cases.json
- tests/upgrade/test-config-gha.json
- tests/upgrade/upgrade_test.go
- tests/upgrade/v0.26.0/postupgrade.go
- tests/upgrade/v0.32.0/postupgrade.go
- tests/upgrade/v0.34.0/postupgrade.go
- tests/upgrade/v0.36.0/postupgrade.go
- tests/upgrade/workers_test.go
- testutil/audit.go
- testutil/base.go
- testutil/cert.go
- testutil/cli/cmd.go
- testutil/cosmos/keepers.go
- testutil/cosmos/mocks/AuthzKeeper_mock.go
- testutil/cosmos/mocks/BankKeeper_mock.go
- testutil/cosmos/mocks/TakeKeeper_mock.go
💤 Files with no reviewable changes (47)
- .goreleaser-docker.yaml
- make/test-upgrade.mk
- app/params/proto.go
- sdl/_testdata/v2.1-service-mix2.yaml
- sdl/coin_test.go
- sdl/cpu_test.go
- sdl/_testdata/service-mix2.yaml
- sdl/_testdata/v2.1-simple3.yaml
- sdl/_testdata/v2.1-deployment-svc-mismatch.yaml
- sdl/_testdata/v2.1-private_service.yaml
- sdl/memory.go
- sdl/cpu.go
- sdl/_testdata/v2.1-credentials.yaml
- sdl/full_test.go
- sdl/_testdata/v2.1-simple2.yaml
- sdl/_testdata/v2.1-profile-svc-name-mismatch.yaml
- sdl/coin.go
- sdl/_testdata/v2.1-credentials-error.yaml
- sdl/_testdata/profile-svc-name-mismatch.yaml
- sdl/_testdata/simple2.yaml
- sdl/_testdata/storageClass3.yaml
- sdl/_testdata/simple-double-ram.yaml
- sdl/_testdata/storageClass1.yaml
- sdl/_testdata/storageClass2.yaml
- sdl/_testdata/simple3.yaml
- sdl/_testdata/private_service.yaml
- sdl/_testdata/simple-gpu.yaml
- sdl/_testdata/simple.yaml
- sdl/_testdata/storageClass6.yaml
- sdl/_testdata/v2.1-simple.yaml
- sdl/_testdata/simple-with-ip.yaml
- sdl/_testdata/v2.1-simple-gpu.yaml
- sdl/_testdata/v2.1-service-mix.yaml
- sdl/_testdata/deployment-svc-mismatch.yaml
- sdl/_testdata/service-mix.yaml
- sdl/_testdata/storageClass4.yaml
- sdl/_testdata/v2.1-simple-with-ip.yaml
- sdl/_testdata/storageClass5.yaml
- sdl/_testdata/simple4.yaml
- sdl/expose.go
- sdl/_testdata/v2.1-simple4.yaml
- app/decorators/gov_filter.go
- sdl/groupBuilder_v2.go
- sdl/groupBuilder_v2_1.go
- sdl/gpu_test.go
- cmd/common/flags.go
- sdl/gpu.go
✅ Files skipped from review due to trivial changes (3)
- .goreleaser.yaml
- README.md
- app/sim/sim_utils.go
🚧 Files skipped from review as they are similar to previous changes (45)
- .github/.repo
- docgen/main.go
- .env
- make/codegen.mk
- cmd/akash/cmd/testnetify/escrow.go
- make/mod.mk
- cmd/akash/cmd/auth.go
- events/query.go
- meta.json
- pubsub/bus_test.go
- script/upgrades.sh
- .github/workflows/concommits.yaml
- cmd/akash/cmd/bech32.go
- make/test-integration.mk
- make/test-simulation.mk
- events/publish_test.go
- cmd/akash/main.go
- cmd/akash/cmd/testnetify/util.go
- app/app_test.go
- app/upgrades.go
- Makefile
- events/cmd/root.go
- app/mac.go
- cmd/akash/cmd/testnetify/cmd.go
- make/setup-cache.mk
- cmd/akash/cmd/genaccounts.go
- app/decorators/min_commision.go
- .mockery.yaml
- .golangci.yaml
- make/releasing.mk
- .envrc
- app/ante.go
- make/lint.mk
- .github/actions/setup-ubuntu/action.yaml
- cmd/akash/cmd/flag_test.go
- app/option.go
- events/publish.go
- app/modules.go
- make/init.mk
- script/tools.sh
- app/sim/sim_config.go
- go.mod
- client/client.go
- app/lanes.go
- cmd/akash/cmd/testnetify/state.go
🧰 Additional context used
🧬 Code Graph Analysis (1)
app/app_configure.go (4)
x/market/alias.go (1)
ModuleName(13-13)x/take/alias.go (1)
ModuleName(11-11)x/staking/alias.go (1)
ModuleName(13-13)x/cert/alias.go (1)
ModuleName(13-13)
🪛 actionlint (1.7.7)
.github/workflows/release.yaml
18-18: description is required in metadata of "setup-ubuntu" action at "/home/jailuser/git/.github/actions/setup-ubuntu/action.yaml"
(action)
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)
.github/workflows/tests.yaml
76-76: description is required in metadata of "setup-ubuntu" action at "/home/jailuser/git/.github/actions/setup-ubuntu/action.yaml"
(action)
178-178: shellcheck reported issue in this script: SC2086:info:2:40: Double quote to prevent globbing and word splitting
(shellcheck)
🪛 markdownlint-cli2 (0.17.2)
CHANGELOG.md
41-41: Bare URL used
(MD034, no-bare-urls)
_docs/adr/adr-001-network-upgrades.md
43-43: Hard tabs
Column: 1
(MD010, no-hard-tabs)
45-45: Hard tabs
Column: 1
(MD010, no-hard-tabs)
46-46: Hard tabs
Column: 1
(MD010, no-hard-tabs)
47-47: Hard tabs
Column: 1
(MD010, no-hard-tabs)
48-48: Hard tabs
Column: 1
(MD010, no-hard-tabs)
⏰ 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). (8)
- GitHub Check: lint-shell
- GitHub Check: sims
- GitHub Check: lint-go
- GitHub Check: release-dry-run
- GitHub Check: build-macos
- GitHub Check: tests
- GitHub Check: coverage
- GitHub Check: build-bins
🔇 Additional comments (24)
_docs/adr/adr-001-network-upgrades.md (1)
43-48: Import path updates look correct.The migration from Tendermint to CometBFT and the update to newer Cosmos SDK import paths (
cosmossdk.io) is consistent with the broader dependency upgrade throughout the codebase.app/config.go (4)
4-27: Import path updates are consistent with the migration.The updates to use
cosmossdk.io/x/*modules and IBC-go v8 imports are correct and align with the broader dependency migration across the codebase.
36-36: Updated genutil initialization looks correct.The use of
genutil.NewAppModuleBasic(genutiltypes.DefaultMessageValidator)follows the new API pattern for genutil module initialization.
61-61: Addition of IBC light client module is correct.The
ibclightclient.AppModuleBasic{}addition is consistent with IBC v8 requirements for Tendermint light client support.
48-55: Confirm Intentional Removal of Governance Proposal HandlersOnly
paramsclient.ProposalHandlerremains in app/config.go (around lines 48–55); all other handlers have been commented out. Please verify that this change aligns with the updated governance architecture. If these handlers are no longer needed, consider removing the commented code; otherwise, restore any required handlers.• File: app/config.go
• Lines: 48–55app/app_configure.go (2)
4-41: Import path updates are consistent with the migration.The migration to
cosmossdk.io/x/*modules, IBC-go v8, and the newpkg.akt.dev/nodemodule paths is correct and aligns with the broader dependency upgrade.
57-95: OrderInitGenesis function is well-documented and properly structured.The function includes comprehensive comments explaining the ordering requirements and follows the standard Cosmos SDK initialization order patterns.
app/export.go (3)
7-26: LGTM: Import updates align with modernization goalsThe imports have been correctly updated to use newer versions (CometBFT, Cosmos SDK v0.47+), which aligns with the overall modernization objectives of this PR.
30-50: Good: Enhanced function signature and error handlingThe addition of
modulesToExportparameter and proper error handling withExportGenesisForModulesimproves the modularity and reliability of the export functionality.
282-347: Well-structured Setup function with good configurabilityThe new
Setupfunction follows good practices with variadic options pattern, proper default values, and clear separation of concerns. The random seed generation and genesis time setup are appropriate for testing scenarios.app/sim_test.go (4)
1-1: Good: Package name change improves test isolationChanging the package name from
apptoapp_testis a good practice that ensures tests are written from an external perspective and don't rely on internal implementation details.
47-50: Well-structured simulation imports and utilitiesThe new import structure clearly separates simulation utilities into dedicated packages (
sim,simtestutil) which improves code organization and reusability.
84-96: Improved simulation function with proper error handlingThe refactored
simulateFromSeedFuncproperly uses the new simulation utilities and includes comprehensive error handling, which is a significant improvement over the previous implementation.
213-390: Comprehensive store key comparison with enhanced error reportingThe updated store key comparison logic includes more detailed error reporting and uses the new
storeKeyGetterinterface, which provides better abstraction and maintainability.cmd/akash/cmd/root.go (3)
45-47: appCreator struct looks good and addresses past concernsThe
appCreatorstruct is now being used by thesdkserver.AddCommandscall on line 154, which addresses the previous concern about unused code.
51-52: Good: Updated to use modern encoding configThe transition to
sdkutil.MakeEncodingConfig()aligns with the modernization goals and provides better abstraction for encoding configuration.
179-283: Well-implemented appCreator methods with proper error handlingThe
newAppandappExportmethods are well-structured with appropriate error handling, validation, and configuration management. The chain ID fallback logic and app options validation are particularly good additions.app/types/app.go (4)
85-87: Good: Clear constant definition for account address prefixThe
AccountAddressPrefixconstant is well-defined and provides a clear, centralized location for the Akash address prefix.
92-127: Excellent: Well-structured keeper organizationThe restructured
AppKeeperswith nested structs (Cosmos,Akash,External) provides excellent organization and clear separation of concerns. The use of pointer types for key keepers is appropriate.
129-199: Good: Comprehensive App struct with proper store key managementThe App struct with logger and lazy initialization of store keys using
sync.Onceis well-designed. The getter methods provide clear access patterns for different store key types.
266-493: Comprehensive keeper initialization with proper dependenciesThe
InitNormalKeepersmethod is well-structured with proper dependency injection and configuration. The keeper initialization follows the correct order and includes all necessary parameters.app/app.go (3)
103-114: Good: Well-structured AkashApp with proper compositionThe AkashApp struct changes with embedded
*baseapp.BaseAppand*apptypes.Appprovide good composition and clear separation of concerns. The field organization is logical and maintainable.
116-354: Excellent: Comprehensive app initialization with modern patternsThe NewApp function refactoring introduces modern patterns with proper encoding config usage, modular keeper initialization, and BlockSDK integration. The initialization flow is well-structured and follows best practices.
246-336: Excellent: Well-implemented BlockSDK integrationThe BlockSDK integration with MEV lanes, laned mempool, and proper ABCI handlers is well-implemented. The lane setup, ante handler configuration, and transaction processing flow demonstrate good understanding of the BlockSDK architecture.
1d3db8e to
2c10ebf
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (15)
.github/workflows/release.yaml (1)
41-41: Unknown runner labelgh-runner-test
Same issue flagged previously; either whitelist it inactionlint.yamlor switch to a recognised label.app/genesis.go (3)
32-64: Address the token replacement approach and error handlingThe
genesisFilterTokensfunction has several issues that were identified in past reviews but remain unaddressed:
- Error handling: The function panics instead of returning errors
- Token replacement: String-based replacement could affect unintended occurrences
- Unnecessary operations: The unmarshaling to
map[string]interface{}serves no purpose
73-81: Handle GetPubKey error and remove unused codeThe function ignores the error from
GetPubKey()and has unused code that was flagged in past reviews.
153-157: Improve error handling or remove unused validationThe validator updates conversion result is not used and has a generic error message, as noted in past reviews.
app/app_configure.go (1)
52-53: Address commented-out modules and their dependenciesThe staking and governance modules are commented out, but as noted in past reviews, there are still lingering references throughout the codebase that will break.
script/tools.sh (4)
16-26: Fix typo in Debian package nameThe package name should be
build-essential(singular), notbuild-essentials.
65-76: Make sed command portable across platformsThe
-rflag is GNU sed specific and should be made portable as noted in past reviews.
103-110: Consider security implications of broad file modificationThe file modification approach is too broad and could accidentally modify sensitive files, as noted in past reviews.
187-187: Fix dependency detection output redirectionThe
dpkg -lcommand output handling was addressed in past reviews but the pattern should be verified..github/workflows/tests.yaml (2)
178-180: Fix shellcheck warning for variable quotingThe static analysis detected an unquoted variable that could cause word splitting issues.
- test_required=$(./script/upgrades.sh test-required ${{ github.ref }}) + test_required=$(./script/upgrades.sh test-required "${{ github.ref }}")
175-176: Clarify or remove the emptymasksinputThe
masksparameter tells the action which environment variables to mask (replace with***) in workflow logs. An empty string effectively disables masking. Please either remove themasks:line entirely if no secrets need masking, or specify the variables that should be masked.app/types/app.go (1)
201-264: Consider adding parameter validationThe
InitSpecialKeepersmethod should validate critical parameters to fail fast:func (app *App) InitSpecialKeepers( cdc codec.Codec, legacyAmino *codec.LegacyAmino, bApp *baseapp.BaseApp, invCheckPeriod uint, skipUpgradeHeights map[int64]bool, homePath string) { + + if cdc == nil { + panic("codec cannot be nil") + } + if bApp == nil { + panic("baseapp cannot be nil") + } + if homePath == "" { + panic("homePath cannot be empty") + } app.GenerateKeys()app/app.go (3)
188-188: Remove usage of deprecated flagThe
crisis.FlagSkipGenesisInvariantsflag is deprecated and will be removed in the next major Cosmos SDK release.Consider using an alternative approach or removing this functionality if it's no longer needed.
220-220: Remove deprecated RegisterInvariants callThe
MM.RegisterInvariantsfunction is deprecated and is a no-op in the current SDK version.- app.MM.RegisterInvariants(app.Keepers.Cosmos.Crisis) + // RegisterInvariants is deprecated and no longer needed
622-625: Use a cleaner approach for ChainID accessUsing reflection to access private fields is fragile and may break with SDK updates. Consider storing the chain ID in the
AkashAppstruct during initialization:type AkashApp struct { BaseApp *baseapp.BaseApp + chainID string // … other fields … }Then capture and store it during app construction instead of using reflection.
🧹 Nitpick comments (5)
_docs/adr/adr-001-network-upgrades.md (2)
42-52: Code sample fails to compile – missingfmtimportThe snippet references
fmt.Sprintfon line 72, yetfmtis absent from the import block. Readers who copy-paste will hit a compile error.-import ( - "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" - apptypes "github.com/akash-network/node/app/types" - utypes "github.com/akash-network/node/upgrades/types" -) +import ( + "fmt" + "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" + apptypes "github.com/akash-network/node/app/types" + utypes "github.com/akash-network/node/upgrades/types" +)
43-48: Tabs in markdown violate MD010 ruleHard tabs are used in these lines, triggering
markdownlint. Convert to spaces to keep the docs lint-clean.CHANGELOG.md (1)
41-41: Prefer Markdown links over bare URLsBare URL trips MD034. Wrap the link so it renders nicely:
-* (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)).github/workflows/release.yaml (2)
15-19: Composite action metadata missingdescription
actionlintwarns because.github/actions/setup-ubuntu/action.yamllacks the mandatorydescription. Add one-line metadata to silence the warning.
74-75: Artifact glob may expand to empty path
upload-artifactfails if the glob is empty. Addif-no-files-found: ignoreto avoid job failure when no logs match.- path: | - .cache/run/upgrade/validators/logs/.akash*.log + path: | + .cache/run/upgrade/validators/logs/.akash*.log + if-no-files-found: ignore
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
go.sumis excluded by!**/*.sum
📒 Files selected for processing (107)
.env(1 hunks).envrc(1 hunks).github/.repo(1 hunks).github/actions/setup-ubuntu/action.yaml(1 hunks).github/workflows/concommits.yaml(1 hunks).github/workflows/release.yaml(4 hunks).github/workflows/tests.yaml(8 hunks).golangci.yaml(1 hunks).goreleaser-docker.yaml(1 hunks).goreleaser-test-bins.yaml(1 hunks).goreleaser.yaml(3 hunks).mockery.yaml(1 hunks)CHANGELOG.md(1 hunks)Makefile(3 hunks)README.md(1 hunks)_docs/adr/adr-001-network-upgrades.md(1 hunks)app/ante.go(1 hunks)app/app.go(7 hunks)app/app_configure.go(3 hunks)app/app_test.go(1 hunks)app/config.go(2 hunks)app/decorators/gov_filter.go(0 hunks)app/decorators/min_commision.go(5 hunks)app/export.go(7 hunks)app/genesis.go(2 hunks)app/lanes.go(1 hunks)app/mac.go(2 hunks)app/modules.go(1 hunks)app/option.go(1 hunks)app/params/proto.go(0 hunks)app/sim/sim_config.go(1 hunks)app/sim/sim_utils.go(1 hunks)app/sim_test.go(5 hunks)app/types/app.go(3 hunks)app/upgrades.go(2 hunks)client/client.go(3 hunks)cmd/akash/cmd/auth.go(2 hunks)cmd/akash/cmd/bech32.go(1 hunks)cmd/akash/cmd/flag_test.go(4 hunks)cmd/akash/cmd/genaccounts.go(6 hunks)cmd/akash/cmd/root.go(6 hunks)cmd/akash/cmd/testnetify/cmd.go(3 hunks)cmd/akash/cmd/testnetify/escrow.go(1 hunks)cmd/akash/cmd/testnetify/state.go(17 hunks)cmd/akash/cmd/testnetify/util.go(2 hunks)cmd/akash/main.go(1 hunks)cmd/common/flags.go(0 hunks)docgen/main.go(1 hunks)events/cmd/root.go(4 hunks)events/publish.go(6 hunks)events/publish_test.go(1 hunks)events/query.go(2 hunks)go.mod(1 hunks)make/codegen.mk(1 hunks)make/init.mk(4 hunks)make/lint.mk(2 hunks)make/mod.mk(1 hunks)make/releasing.mk(6 hunks)make/setup-cache.mk(2 hunks)make/test-integration.mk(2 hunks)make/test-simulation.mk(1 hunks)make/test-upgrade.mk(0 hunks)meta.json(1 hunks)pubsub/bus_test.go(1 hunks)script/tools.sh(1 hunks)script/upgrades.sh(1 hunks)sdl/_testdata/deployment-svc-mismatch.yaml(0 hunks)sdl/_testdata/private_service.yaml(0 hunks)sdl/_testdata/profile-svc-name-mismatch.yaml(0 hunks)sdl/_testdata/service-mix.yaml(0 hunks)sdl/_testdata/service-mix2.yaml(0 hunks)sdl/_testdata/simple-double-ram.yaml(0 hunks)sdl/_testdata/simple-gpu.yaml(0 hunks)sdl/_testdata/simple-with-ip.yaml(0 hunks)sdl/_testdata/simple.yaml(0 hunks)sdl/_testdata/simple2.yaml(0 hunks)sdl/_testdata/simple3.yaml(0 hunks)sdl/_testdata/simple4.yaml(0 hunks)sdl/_testdata/storageClass1.yaml(0 hunks)sdl/_testdata/storageClass2.yaml(0 hunks)sdl/_testdata/storageClass3.yaml(0 hunks)sdl/_testdata/storageClass4.yaml(0 hunks)sdl/_testdata/storageClass5.yaml(0 hunks)sdl/_testdata/storageClass6.yaml(0 hunks)sdl/_testdata/v2.1-credentials-error.yaml(0 hunks)sdl/_testdata/v2.1-credentials.yaml(0 hunks)sdl/_testdata/v2.1-deployment-svc-mismatch.yaml(0 hunks)sdl/_testdata/v2.1-private_service.yaml(0 hunks)sdl/_testdata/v2.1-profile-svc-name-mismatch.yaml(0 hunks)sdl/_testdata/v2.1-service-mix.yaml(0 hunks)sdl/_testdata/v2.1-service-mix2.yaml(0 hunks)sdl/_testdata/v2.1-simple-gpu.yaml(0 hunks)sdl/_testdata/v2.1-simple-with-ip.yaml(0 hunks)sdl/_testdata/v2.1-simple.yaml(0 hunks)sdl/_testdata/v2.1-simple2.yaml(0 hunks)sdl/_testdata/v2.1-simple3.yaml(0 hunks)sdl/_testdata/v2.1-simple4.yaml(0 hunks)sdl/coin.go(0 hunks)sdl/coin_test.go(0 hunks)sdl/cpu.go(0 hunks)sdl/cpu_test.go(0 hunks)sdl/expose.go(0 hunks)sdl/full_test.go(0 hunks)sdl/gpu.go(0 hunks)sdl/gpu_test.go(0 hunks)sdl/groupBuilder_v2.go(0 hunks)sdl/groupBuilder_v2_1.go(0 hunks)
⛔ Files not processed due to max files limit (46)
- sdl/memory.go
- sdl/placement.go
- sdl/pricing.go
- sdl/resources.go
- sdl/sdl.go
- sdl/sdl_test.go
- sdl/storage.go
- sdl/storage_test.go
- sdl/units.go
- sdl/units_test.go
- sdl/util/util.go
- sdl/util/util_test.go
- sdl/utils.go
- sdl/v2.go
- sdl/v2_1.go
- sdl/v2_1_ip_test.go
- sdl/v2_1_test.go
- sdl/v2_ip_test.go
- sdl/v2_test.go
- tests/e2e/certs_cli_test.go
- tests/e2e/certs_grpc_test.go
- tests/e2e/cli_test.go
- tests/e2e/deployment_cli_test.go
- tests/e2e/deployment_grpc_test.go
- tests/e2e/grpc_test.go
- tests/e2e/market_cli_test.go
- tests/e2e/market_grpc_test.go
- tests/e2e/provider_cli_test.go
- tests/e2e/provider_grpc_test.go
- tests/upgrade/test-cases.json
- tests/upgrade/test-config-gha.json
- tests/upgrade/test-config.json
- tests/upgrade/upgrade_test.go
- tests/upgrade/v0.26.0/postupgrade.go
- tests/upgrade/v0.32.0/postupgrade.go
- tests/upgrade/v0.34.0/postupgrade.go
- tests/upgrade/v0.36.0/postupgrade.go
- tests/upgrade/workers_test.go
- testutil/audit.go
- testutil/base.go
- testutil/cert.go
- testutil/cli/cmd.go
- testutil/cosmos/keepers.go
- testutil/cosmos/mocks/AuthzKeeper_mock.go
- testutil/cosmos/mocks/BankKeeper_mock.go
- testutil/cosmos/mocks/TakeKeeper_mock.go
💤 Files with no reviewable changes (45)
- make/test-upgrade.mk
- sdl/_testdata/v2.1-simple3.yaml
- sdl/coin.go
- sdl/_testdata/simple3.yaml
- sdl/coin_test.go
- sdl/cpu_test.go
- sdl/_testdata/service-mix2.yaml
- sdl/cpu.go
- app/params/proto.go
- sdl/_testdata/v2.1-profile-svc-name-mismatch.yaml
- sdl/_testdata/v2.1-service-mix2.yaml
- sdl/_testdata/simple-double-ram.yaml
- sdl/_testdata/profile-svc-name-mismatch.yaml
- sdl/_testdata/simple2.yaml
- sdl/_testdata/v2.1-credentials.yaml
- sdl/_testdata/storageClass6.yaml
- sdl/_testdata/simple-with-ip.yaml
- sdl/_testdata/v2.1-simple2.yaml
- sdl/full_test.go
- sdl/_testdata/v2.1-deployment-svc-mismatch.yaml
- sdl/_testdata/v2.1-simple.yaml
- sdl/_testdata/v2.1-private_service.yaml
- sdl/_testdata/storageClass1.yaml
- sdl/_testdata/v2.1-credentials-error.yaml
- sdl/_testdata/deployment-svc-mismatch.yaml
- sdl/_testdata/storageClass5.yaml
- sdl/_testdata/storageClass3.yaml
- sdl/_testdata/v2.1-simple4.yaml
- sdl/_testdata/v2.1-simple-with-ip.yaml
- sdl/_testdata/private_service.yaml
- sdl/_testdata/simple4.yaml
- sdl/_testdata/simple.yaml
- sdl/groupBuilder_v2.go
- sdl/_testdata/simple-gpu.yaml
- app/decorators/gov_filter.go
- sdl/expose.go
- sdl/_testdata/storageClass4.yaml
- sdl/_testdata/v2.1-service-mix.yaml
- sdl/_testdata/v2.1-simple-gpu.yaml
- sdl/_testdata/service-mix.yaml
- sdl/gpu_test.go
- sdl/groupBuilder_v2_1.go
- sdl/gpu.go
- sdl/_testdata/storageClass2.yaml
- cmd/common/flags.go
✅ Files skipped from review due to trivial changes (5)
- .goreleaser-docker.yaml
- .goreleaser.yaml
- README.md
- events/publish_test.go
- cmd/akash/main.go
🚧 Files skipped from review as they are similar to previous changes (42)
- .github/.repo
- cmd/akash/cmd/bech32.go
- .env
- docgen/main.go
- .github/workflows/concommits.yaml
- events/query.go
- meta.json
- make/mod.mk
- cmd/akash/cmd/testnetify/escrow.go
- make/codegen.mk
- Makefile
- pubsub/bus_test.go
- script/upgrades.sh
- cmd/akash/cmd/auth.go
- app/app_test.go
- make/test-simulation.mk
- cmd/akash/cmd/testnetify/util.go
- app/mac.go
- make/test-integration.mk
- .mockery.yaml
- events/cmd/root.go
- make/setup-cache.mk
- app/upgrades.go
- client/client.go
- app/ante.go
- cmd/akash/cmd/testnetify/cmd.go
- events/publish.go
- cmd/akash/cmd/genaccounts.go
- app/modules.go
- app/lanes.go
- make/releasing.mk
- app/decorators/min_commision.go
- app/sim/sim_utils.go
- app/option.go
- make/init.mk
- make/lint.mk
- .envrc
- app/sim/sim_config.go
- .github/actions/setup-ubuntu/action.yaml
- cmd/akash/cmd/testnetify/state.go
- cmd/akash/cmd/flag_test.go
- go.mod
🧰 Additional context used
🧬 Code Graph Analysis (2)
app/app_configure.go (4)
x/market/alias.go (1)
ModuleName(13-13)x/take/alias.go (1)
ModuleName(11-11)x/staking/alias.go (1)
ModuleName(13-13)x/cert/alias.go (1)
ModuleName(13-13)
app/types/app.go (5)
x/escrow/keeper/keeper.go (2)
Keeper(20-38)NewKeeper(40-56)x/take/keeper/keeper.go (2)
Keeper(24-30)NewKeeper(33-39)testutil/state/suite.go (1)
Keepers(49-58)x/take/alias.go (2)
StoreKey(9-9)ModuleName(11-11)x/market/hooks/hooks.go (1)
Hooks(13-16)
🪛 actionlint (1.7.7)
.github/workflows/release.yaml
18-18: description is required in metadata of "setup-ubuntu" action at "/home/jailuser/git/.github/actions/setup-ubuntu/action.yaml"
(action)
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)
.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)
178-178: shellcheck reported issue in this script: SC2086:info:2:40: Double quote to prevent globbing and word splitting
(shellcheck)
🪛 markdownlint-cli2 (0.17.2)
CHANGELOG.md
41-41: Bare URL used
(MD034, no-bare-urls)
_docs/adr/adr-001-network-upgrades.md
43-43: Hard tabs
Column: 1
(MD010, no-hard-tabs)
45-45: Hard tabs
Column: 1
(MD010, no-hard-tabs)
46-46: Hard tabs
Column: 1
(MD010, no-hard-tabs)
47-47: Hard tabs
Column: 1
(MD010, no-hard-tabs)
48-48: Hard tabs
Column: 1
(MD010, no-hard-tabs)
⏰ 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). (8)
- GitHub Check: sims
- GitHub Check: release-dry-run
- GitHub Check: lint-shell
- GitHub Check: coverage
- GitHub Check: tests
- GitHub Check: lint-go
- GitHub Check: build-macos
- GitHub Check: build-bins
🔇 Additional comments (25)
.goreleaser-test-bins.yaml (1)
91-97:builds→idsswitch looks correctGoReleaser v1.21+ expects
idshere; nothing else to change. 👍app/config.go (3)
36-36: LGTM: Correct genutil initialization patternThe update to use
genutil.NewAppModuleBasic(genutiltypes.DefaultMessageValidator)follows the correct pattern for newer Cosmos SDK versions.
61-61: LGTM: IBC light client module additionThe addition of
ibclightclient.AppModuleBasic{}is appropriate for IBC v8 support.
47-55: Confirm disabled governance proposal handlers
I searched the codebase and found no other references to the commented-out handlers:
- File:
app/config.go, lines 47–55Commenting out these handlers disables governance proposals for:
- Distribution parameter changes (
distrclient.ProposalHandler)- Upgrade module proposals (
upgradeclient.LegacyProposalHandler,upgradeclient.LegacyCancelProposalHandler)- IBC client updates/upgrades (
ibcclient.UpdateClientProposalHandler,ibcclient.UpgradeProposalHandler)Please confirm whether this restriction is intentional. If you need any of these proposal types available, re-enable the corresponding handlers.
app/app_configure.go (1)
57-63: LGTM: Improved documentation and function namingThe
OrderInitGenesisfunction has clear documentation explaining the module ordering requirements, particularly for genutils and capability modules.app/export.go (4)
15-26: LGTM: Comprehensive import modernizationThe import updates correctly migrate from Tendermint to CometBFT and use newer Cosmos SDK packages. The changes are consistent with the overall modernization effort.
47-50: LGTM: Improved error handling in export functionThe switch from
ExportGenesistoExportGenesisForModuleswith proper error handling is a good improvement over the previous panic-based approach.
282-347: LGTM: Flexible setup function with good defaultsThe new
Setupfunction provides good flexibility through options while maintaining sensible defaults. The error handling in the initialization chain is appropriate.
94-116: Enhanced error handling in validator iterationThe validator iteration now properly handles errors from
GetAllDelegationsand other operations, which is an improvement over the previous implementation.app/sim_test.go (4)
57-59: Good abstraction with storeKeyGetter interfaceThe new
storeKeyGetterinterface provides a clean abstraction for accessing store keys, making the store comparison logic more flexible and testable.
84-96: Well-structured simulation function with proper error handlingThe updated
simulateFromSeedFuncproperly uses the new simulation utilities and includes comprehensive error handling. The function signature is clean and follows the updated SDK patterns.
106-123: Proper encoding configuration and app initializationThe test correctly uses the new
sdkutil.MakeEncodingConfig()and properly registers interfaces. The app options setup with viper and genesis time configuration follows best practices.
373-390: Robust store comparison with detailed error reportingThe store comparison logic properly handles mismatches and provides detailed logging before failing. The use of
simtestutil.DiffKVStoresand comprehensive error reporting helps with debugging test failures..github/workflows/tests.yaml (2)
43-50: Excellent consolidation of repetitive setup stepsThe refactoring to use the
.github/actions/setup-ubuntucomposite action successfully eliminates code duplication across multiple jobs. This improves maintainability and reduces the risk of inconsistent environment setups.
70-78: Good job renaming for clarityRenaming
linttolint-goandshellchecktolint-shellimproves clarity about what each job actually does, making the workflow more self-documenting.cmd/akash/cmd/root.go (4)
49-51: Good encapsulation with appCreator structThe
appCreatorstruct properly encapsulates the encoding configuration and provides a clean interface for app creation and export operations. This is a solid architectural improvement.
55-72: Well-structured root command setupThe updated
NewRootCmdfunction properly uses the new encoding configuration and maintains a clean separation of concerns. The persistent pre-run hook setup is well-organized.
183-251: Comprehensive app creation with proper configurationThe
newAppmethod properly handles all the configuration options including chain ID fallback from genesis, snapshot configuration, and baseapp options. The error handling for missing chain ID is particularly good.
265-276: Good validation in appExport methodThe validation of
appOptsparameters and the requirement forviper.Vipertype provides good fail-fast behavior. The explicit override ofFlagInvCheckPeriodto 1 is properly documented.app/types/app.go (3)
91-127: Excellent keeper organization with nested structureThe nested organization of keepers into
Cosmos,Akash, andExternalstructs significantly improves code organization and makes the relationships between different keeper types much clearer.
142-154: Good encapsulation of store key generationThe
GenerateKeysmethod withsync.Onceensures thread-safe lazy initialization of store keys. The explicit separation of KV, transient, and memory store keys is well-designed.
495-517: Well-structured hook setupThe
SetupHooksmethod properly configures staking, governance, and escrow hooks. The separation of concerns and the explicit hook registration pattern is clean and maintainable.app/app.go (3)
103-114: Good architectural improvement with embedded typesThe new
AkashAppstructure with embedded*baseapp.BaseAppand*apptypes.Appprovides a clean separation of concerns and better code organization. The additional fields for codec, transaction config, and handlers are well-organized.
246-260: Excellent integration of BlockSDK lane systemThe integration of MEV-aware lanes and the laned mempool represents a significant architectural improvement. The error handling for mempool creation and the proper lane configuration demonstrate good engineering practices.
459-470: Well-implemented PreBlocker with proper gas handlingThe
PreBlockerimplementation correctly sets an infinite gas meter to handle non-deterministic gas usage and includes good documentation explaining the rationale. The error handling is appropriate.
There was a problem hiding this comment.
Actionable comments posted: 11
♻️ Duplicate comments (16)
.github/workflows/release.yaml (1)
41-41: Document custom runner label for actionlintThe workflow uses a self-hosted runner label
gh-runner-test, but there's noactionlint.yamlto whitelist it, so actionlint flags it as unknown. Either create anactionlint.yamlfile at the repo root with this runner listed, or update to use a valid GitHub-hosted runner label.app/genesis.go (4)
80-80: Remove unused Address() call.The
Address()call result is not being used and should be removed.
32-64: Consider returning errors instead of panicking and use a more robust token replacement approach.The function has several issues:
- Panics on errors instead of returning them, which prevents proper error handling by callers
- String replacement approach could replace unintended occurrences of
"stake"in values or keys- The unnecessary buffer usage and map unmarshaling
74-74: Handle GetPubKey error properly.The error from
GetPubKey()is being ignored, which could lead to runtime issues.
153-156: Improve error message and remove unused validator updates conversion.The panic message is too generic and the validator updates conversion result is not used.
script/tools.sh (2)
65-76: Useful function but has portability concern.The
replace_pathsfunction provides valuable automation for import path updates, but the sed command portability issue was already identified in past reviews.
18-18: Fix typo in Debian package name.The package name should be
build-essential(singular), notbuild-essentials.app/export.go (1)
83-84: Consider consistent error handling patternWhile most of the function uses explicit error checking with descriptive panics, this line uses a direct panic on error. For consistency with the rest of the function's error handling pattern, consider adding a descriptive error message.
if err != nil { - panic(err) + panic(fmt.Errorf("invalid validator address %s: %w", addr, err)) }.github/workflows/tests.yaml (2)
179-179: Fix shellcheck warning for variable quoting.The static analysis detected an unquoted variable that could cause word splitting issues.
- test_required=$(./script/upgrades.sh test-required ${{ github.ref }}) + test_required=$(./script/upgrades.sh test-required "${{ github.ref }}")
162-164: Remove duplicate checkout stepThe
network-upgradejob has two consecutive checkout steps. Remove the redundant one.- uses: actions/checkout@v4 -- name: Checkout code - uses: actions/checkout@v4app/types/app.go (1)
196-203: Consider adding parameter validationThe
InitSpecialKeepersmethod should validate critical parameters to fail fast.func (app *App) InitSpecialKeepers( cdc codec.Codec, legacyAmino *codec.LegacyAmino, bApp *baseapp.BaseApp, invCheckPeriod uint, skipUpgradeHeights map[int64]bool, homePath string) { + + if cdc == nil { + panic("codec cannot be nil") + } + if bApp == nil { + panic("baseapp cannot be nil") + } + if homePath == "" { + panic("homePath cannot be empty") + } app.GenerateKeys()app/app.go (5)
9-9: New reflection import suggests fragile implementationThe addition of the
reflectpackage import indicates usage of reflection for accessing private fields, which can be fragile and break with SDK updates.
167-172: TODO comment indicates known hook setup timing issueThis TODO comment describes a critical initialization order problem that was previously flagged. The issue remains unresolved where governance routes are registered before hooks are set up.
176-176: Deprecated flag usage remainsThe code still uses the deprecated
crisis.FlagSkipGenesisInvariantsflag which was flagged in previous reviews.
208-208: Deprecated RegisterInvariants call remainsThe deprecated
MM.RegisterInvariantscall is still present despite being flagged in previous reviews.
535-538: ChainID method still uses fragile reflectionThe
ChainIDmethod continues to use reflection to access privateBaseApp.chainIDfield, which was flagged in previous reviews as fragile and prone to breaking with SDK updates.
🧹 Nitpick comments (11)
CHANGELOG.md (1)
41-41: Convert bare URL to Markdown link for style-consistencyMarkdown-lint flags this as
MD034(no-bare-urls). Converting the raw URL to an inline link keeps the changelog tidy and consistent with the rest of the document.-* (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)_docs/adr/adr-001-network-upgrades.md (1)
43-48: Replace hard tabs with spaces for markdown consistency.The code block uses hard tabs which violates markdown formatting conventions. Consider replacing tabs with spaces for better consistency.
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/genesis.go (3)
75-76: Remove or update the misleading commentThe comment "get genesis params" on line 75 is misleading as line 76 retrieves the chain ID, not genesis params. The actual genesis params were already retrieved in lines 65-73.
- // get genesis params + // get chain ID chainID := args[1]
161-162: Remove duplicate and misplaced TODO commentThis TODO comment about setting the community pool is duplicated from the distribution module section (lines 139-140) and appears to be misplaced in the crisis module section.
crisisGenState := crisistypes.DefaultGenesisState() crisisGenState.ConstantFee = genesisParams.CrisisConstantFee - // TODO Set initial community pool - // distributionGenState.FeePool.CommunityPool = sdk.NewDecCoins() crisisGenStateBz, err := cdc.MarshalJSON(crisisGenState)
266-269: Fix incorrect comment referencing OSMOThe comment mentions "1 OSMO" but the actual implementation uses the Akash base denom (uakt).
genParams.GovParams.DepositParams.MinDeposit = sdk.NewCoins(sdk.NewCoin( genParams.NativeCoinMetadatas[0].Base, - sdkmath.NewInt(1000000), // 1 OSMO + sdkmath.NewInt(1000000), // 1 AKT (assuming 6 decimal places) ))app/sim_test.go (3)
127-127: Remove or guard debug print statementThe debug print statement should be removed or controlled by a verbose flag to avoid cluttering test output.
- fmt.Printf("config--------\n%v", config) + if config.Verbose { + fmt.Printf("config--------\n%v", config) + }
295-300: Uncomment or remove IBC host store key comparisonThe IBC host store key comparison is commented out. Either uncomment it if IBC functionality should be tested, or remove the commented code entirely.
- //{ - // ibchost.StoreKey, - // appA, - // appB, - // [][]byte{}, - //}, + { + ibcexported.StoreKey, + appA, + appB, + [][]byte{}, + },
489-491: Clean up commented logger codeRemove the commented logger assignment to keep the code clean.
if sim.FlagVerboseValue { - //logger = log.TestingLogger() + logger = log.TestingLogger() } else {cmd/akash/cmd/testnetify/testnetify.go (1)
494-494: Remove unnecessary empty comment lineRemove the empty comment line to improve code readability.
seenCommit.BlockID = state.LastBlockID seenCommit.Round = 0 -~ seenCommit.Signatures = signaturesapp/types/app.go (1)
429-442: Remove commented auction keeper codeThe auction keeper initialization code is completely commented out. If this feature is not planned, remove the dead code to improve maintainability.
Remove the entire commented block to keep the codebase clean.
cmd/akash/cmd/app_creator.go (1)
108-143: Well-implemented export method with proper error handling.The method correctly validates inputs and handles the export process. The forced setting of
FlagInvCheckPeriodto 1 during export is a good safety measure.Consider extracting the common app creation logic to reduce duplication:
+ skipUpgradeHeights := map[int64]bool{} + invCheckPeriod := uint(1) + if height != -1 { - akashApp = akash.NewApp(logger, db, tio, false, uint(1), map[int64]bool{}, a.encCfg, appOpts) + akashApp = akash.NewApp(logger, db, tio, false, invCheckPeriod, skipUpgradeHeights, a.encCfg, appOpts) if err := akashApp.LoadHeight(height); err != nil { return servertypes.ExportedApp{}, err } } else { - akashApp = akash.NewApp(logger, db, tio, true, uint(1), map[int64]bool{}, a.encCfg, appOpts) + akashApp = akash.NewApp(logger, db, tio, true, invCheckPeriod, skipUpgradeHeights, a.encCfg, appOpts) }
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
go.sumis excluded by!**/*.sum
📒 Files selected for processing (107)
.env(1 hunks).envrc(1 hunks).github/.repo(1 hunks).github/actions/setup-ubuntu/action.yaml(1 hunks).github/workflows/concommits.yaml(1 hunks).github/workflows/release.yaml(4 hunks).github/workflows/tests.yaml(8 hunks).golangci.yaml(1 hunks).goreleaser-docker.yaml(1 hunks).goreleaser-test-bins.yaml(1 hunks).goreleaser.yaml(2 hunks).mockery.yaml(1 hunks)CHANGELOG.md(1 hunks)Makefile(3 hunks)README.md(1 hunks)_docs/adr/adr-001-network-upgrades.md(1 hunks)app/ante.go(1 hunks)app/app.go(7 hunks)app/app_configure.go(3 hunks)app/app_test.go(1 hunks)app/config.go(2 hunks)app/decorators/gov_filter.go(0 hunks)app/decorators/min_commision.go(5 hunks)app/export.go(7 hunks)app/genesis.go(2 hunks)app/mac.go(2 hunks)app/modules.go(1 hunks)app/option.go(1 hunks)app/params/config.go(1 hunks)app/params/proto.go(0 hunks)app/sim/sim_config.go(1 hunks)app/sim/sim_utils.go(1 hunks)app/sim_test.go(5 hunks)app/testnet.go(4 hunks)app/types/app.go(3 hunks)app/upgrades.go(2 hunks)client/client.go(3 hunks)cmd/akash/cmd/app_creator.go(1 hunks)cmd/akash/cmd/auth.go(2 hunks)cmd/akash/cmd/bech32.go(1 hunks)cmd/akash/cmd/flag_test.go(4 hunks)cmd/akash/cmd/genaccounts.go(6 hunks)cmd/akash/cmd/genesis.go(1 hunks)cmd/akash/cmd/root.go(5 hunks)cmd/akash/cmd/testnet.go(1 hunks)cmd/akash/cmd/testnetify/cmt_abci.go(1 hunks)cmd/akash/cmd/testnetify/config.go(3 hunks)cmd/akash/cmd/testnetify/testnetify.go(10 hunks)cmd/akash/cmd/testnetify/utils.go(2 hunks)cmd/akash/main.go(1 hunks)cmd/common/flags.go(0 hunks)docgen/main.go(1 hunks)events/cmd/root.go(4 hunks)events/publish.go(6 hunks)events/publish_test.go(1 hunks)events/query.go(2 hunks)go.mod(1 hunks)make/codegen.mk(1 hunks)make/init.mk(4 hunks)make/lint.mk(2 hunks)make/mod.mk(1 hunks)make/releasing.mk(6 hunks)make/setup-cache.mk(2 hunks)make/test-integration.mk(2 hunks)make/test-simulation.mk(1 hunks)make/test-upgrade.mk(2 hunks)meta.json(1 hunks)pubsub/bus_test.go(1 hunks)script/tools.sh(1 hunks)script/upgrades.sh(9 hunks)sdl/_testdata/deployment-svc-mismatch.yaml(0 hunks)sdl/_testdata/private_service.yaml(0 hunks)sdl/_testdata/profile-svc-name-mismatch.yaml(0 hunks)sdl/_testdata/service-mix.yaml(0 hunks)sdl/_testdata/service-mix2.yaml(0 hunks)sdl/_testdata/simple-double-ram.yaml(0 hunks)sdl/_testdata/simple-gpu.yaml(0 hunks)sdl/_testdata/simple-with-ip.yaml(0 hunks)sdl/_testdata/simple.yaml(0 hunks)sdl/_testdata/simple2.yaml(0 hunks)sdl/_testdata/simple3.yaml(0 hunks)sdl/_testdata/simple4.yaml(0 hunks)sdl/_testdata/storageClass1.yaml(0 hunks)sdl/_testdata/storageClass2.yaml(0 hunks)sdl/_testdata/storageClass3.yaml(0 hunks)sdl/_testdata/storageClass4.yaml(0 hunks)sdl/_testdata/storageClass5.yaml(0 hunks)sdl/_testdata/storageClass6.yaml(0 hunks)sdl/_testdata/v2.1-credentials-error.yaml(0 hunks)sdl/_testdata/v2.1-credentials.yaml(0 hunks)sdl/_testdata/v2.1-deployment-svc-mismatch.yaml(0 hunks)sdl/_testdata/v2.1-private_service.yaml(0 hunks)sdl/_testdata/v2.1-profile-svc-name-mismatch.yaml(0 hunks)sdl/_testdata/v2.1-service-mix.yaml(0 hunks)sdl/_testdata/v2.1-service-mix2.yaml(0 hunks)sdl/_testdata/v2.1-simple-gpu.yaml(0 hunks)sdl/_testdata/v2.1-simple-with-ip.yaml(0 hunks)sdl/_testdata/v2.1-simple.yaml(0 hunks)sdl/_testdata/v2.1-simple2.yaml(0 hunks)sdl/_testdata/v2.1-simple3.yaml(0 hunks)sdl/_testdata/v2.1-simple4.yaml(0 hunks)sdl/coin.go(0 hunks)sdl/coin_test.go(0 hunks)sdl/cpu.go(0 hunks)sdl/cpu_test.go(0 hunks)sdl/expose.go(0 hunks)sdl/full_test.go(0 hunks)
⛔ Files not processed due to max files limit (40)
- sdl/gpu.go
- sdl/gpu_test.go
- sdl/groupBuilder_v2.go
- sdl/groupBuilder_v2_1.go
- sdl/memory.go
- sdl/placement.go
- sdl/pricing.go
- sdl/resources.go
- sdl/sdl.go
- sdl/sdl_test.go
- sdl/storage.go
- sdl/storage_test.go
- sdl/units.go
- sdl/units_test.go
- sdl/util/util.go
- sdl/util/util_test.go
- sdl/utils.go
- sdl/v2.go
- sdl/v2_1.go
- sdl/v2_1_ip_test.go
- sdl/v2_1_test.go
- sdl/v2_ip_test.go
- sdl/v2_test.go
- tests/README.md
- tests/e2e/certs_cli_test.go
- tests/e2e/certs_grpc_test.go
- tests/e2e/cli_test.go
- tests/e2e/deployment_cli_test.go
- tests/e2e/deployment_grpc_test.go
- tests/e2e/grpc_test.go
- tests/e2e/market_cli_test.go
- tests/e2e/market_grpc_test.go
- tests/e2e/provider_cli_test.go
- tests/e2e/provider_grpc_test.go
- tests/upgrade/config.json
- tests/upgrade/test-cases.json
- tests/upgrade/test-config-gha.json
- tests/upgrade/upgrade_test.go
- tests/upgrade/v0.26.0/postupgrade.go
- tests/upgrade/v0.32.0/postupgrade.go
🪛 actionlint (1.7.7)
.github/workflows/release.yaml
18-18: description is required in metadata of "setup-ubuntu" action at "/home/jailuser/git/.github/actions/setup-ubuntu/action.yaml"
(action)
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)
.github/workflows/tests.yaml
59-59: description is required in metadata of "setup-ubuntu" action at "/home/jailuser/git/.github/actions/setup-ubuntu/action.yaml"
(action)
178-178: shellcheck reported issue in this script: SC2086:info:2:40: Double quote to prevent globbing and word splitting
(shellcheck)
🪛 markdownlint-cli2 (0.17.2)
CHANGELOG.md
41-41: Bare URL used
(MD034, no-bare-urls)
_docs/adr/adr-001-network-upgrades.md
43-43: Hard tabs
Column: 1
(MD010, no-hard-tabs)
45-45: Hard tabs
Column: 1
(MD010, no-hard-tabs)
46-46: Hard tabs
Column: 1
(MD010, no-hard-tabs)
47-47: Hard tabs
Column: 1
(MD010, no-hard-tabs)
48-48: Hard tabs
Column: 1
(MD010, no-hard-tabs)
💤 Files with no reviewable changes (40)
- sdl/_testdata/v2.1-service-mix2.yaml
- sdl/coin_test.go
- sdl/cpu_test.go
- sdl/_testdata/v2.1-simple2.yaml
- sdl/coin.go
- sdl/_testdata/v2.1-credentials.yaml
- sdl/_testdata/v2.1-profile-svc-name-mismatch.yaml
- sdl/_testdata/v2.1-deployment-svc-mismatch.yaml
- sdl/full_test.go
- sdl/_testdata/simple3.yaml
- sdl/_testdata/simple-double-ram.yaml
- sdl/_testdata/simple-with-ip.yaml
- sdl/_testdata/storageClass3.yaml
- sdl/_testdata/v2.1-simple-with-ip.yaml
- app/params/proto.go
- sdl/_testdata/simple-gpu.yaml
- sdl/_testdata/simple.yaml
- sdl/_testdata/v2.1-credentials-error.yaml
- sdl/cpu.go
- sdl/_testdata/v2.1-simple3.yaml
- sdl/_testdata/storageClass6.yaml
- sdl/_testdata/service-mix2.yaml
- sdl/_testdata/private_service.yaml
- sdl/_testdata/v2.1-service-mix.yaml
- sdl/_testdata/storageClass5.yaml
- sdl/_testdata/simple2.yaml
- sdl/_testdata/deployment-svc-mismatch.yaml
- sdl/_testdata/service-mix.yaml
- sdl/_testdata/v2.1-simple-gpu.yaml
- app/decorators/gov_filter.go
- sdl/_testdata/v2.1-private_service.yaml
- sdl/_testdata/profile-svc-name-mismatch.yaml
- sdl/_testdata/storageClass2.yaml
- sdl/expose.go
- sdl/_testdata/v2.1-simple.yaml
- sdl/_testdata/simple4.yaml
- sdl/_testdata/storageClass1.yaml
- sdl/_testdata/storageClass4.yaml
- sdl/_testdata/v2.1-simple4.yaml
- cmd/common/flags.go
✅ Files skipped from review due to trivial changes (6)
- events/publish_test.go
- README.md
- pubsub/bus_test.go
- cmd/akash/cmd/testnetify/config.go
- app/params/config.go
- cmd/akash/cmd/testnetify/cmt_abci.go
🚧 Files skipped from review as they are similar to previous changes (44)
- cmd/akash/cmd/bech32.go
- .env
- .github/.repo
- docgen/main.go
- .github/workflows/concommits.yaml
- .goreleaser-test-bins.yaml
- .goreleaser-docker.yaml
- make/codegen.mk
- meta.json
- make/test-upgrade.mk
- make/test-simulation.mk
- events/query.go
- .goreleaser.yaml
- make/mod.mk
- cmd/akash/cmd/auth.go
- make/test-integration.mk
- cmd/akash/main.go
- make/setup-cache.mk
- app/ante.go
- Makefile
- .golangci.yaml
- cmd/akash/cmd/genaccounts.go
- app/app_test.go
- events/cmd/root.go
- .envrc
- .mockery.yaml
- app/decorators/min_commision.go
- app/mac.go
- .github/actions/setup-ubuntu/action.yaml
- app/config.go
- make/releasing.mk
- app/modules.go
- app/upgrades.go
- client/client.go
- make/lint.mk
- app/app_configure.go
- app/option.go
- go.mod
- events/publish.go
- app/sim/sim_config.go
- cmd/akash/cmd/flag_test.go
- app/sim/sim_utils.go
- make/init.mk
- cmd/akash/cmd/root.go
🧰 Additional context used
🪛 actionlint (1.7.7)
.github/workflows/release.yaml
18-18: description is required in metadata of "setup-ubuntu" action at "/home/jailuser/git/.github/actions/setup-ubuntu/action.yaml"
(action)
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)
.github/workflows/tests.yaml
59-59: description is required in metadata of "setup-ubuntu" action at "/home/jailuser/git/.github/actions/setup-ubuntu/action.yaml"
(action)
178-178: shellcheck reported issue in this script: SC2086:info:2:40: Double quote to prevent globbing and word splitting
(shellcheck)
🪛 markdownlint-cli2 (0.17.2)
CHANGELOG.md
41-41: Bare URL used
(MD034, no-bare-urls)
_docs/adr/adr-001-network-upgrades.md
43-43: Hard tabs
Column: 1
(MD010, no-hard-tabs)
45-45: Hard tabs
Column: 1
(MD010, no-hard-tabs)
46-46: Hard tabs
Column: 1
(MD010, no-hard-tabs)
47-47: Hard tabs
Column: 1
(MD010, no-hard-tabs)
48-48: Hard tabs
Column: 1
(MD010, no-hard-tabs)
⏰ 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). (9)
- GitHub Check: network-upgrade-names
- GitHub Check: coverage
- GitHub Check: release-dry-run
- GitHub Check: lint-shell
- GitHub Check: sims
- GitHub Check: lint-go
- GitHub Check: build-macos
- GitHub Check: build-bins
- GitHub Check: tests
🔇 Additional comments (32)
_docs/adr/adr-001-network-upgrades.md (1)
43-48: Import path updates are correct for the ecosystem migration.The updates correctly reflect the migration from Tendermint to CometBFT and the transition to newer Cosmos SDK module paths using
cosmossdk.io. These changes align with the broader dependency upgrades in the codebase..github/workflows/release.yaml (4)
15-18: Excellent refactoring to use composite action for setup.The consolidation of multiple setup steps into a single
.github/actions/setup-ubuntuaction improves maintainability and follows DRY principles. This standardization across workflows is a positive change.
45-52: Good addition of cleanup step for test reliability.Adding the cleanup step before checkout ensures a clean environment for the test job, which can prevent issues from previous runs. The standardization to use the composite setup action is also beneficial.
64-64: Environment variable addition improves test configuration.Adding
TEST_CONFIG: test-config-gha.jsonprovides better control over test execution in the GitHub Actions environment.
74-74: More specific artifact path reduces noise.Narrowing the artifact upload path to
.akash*.logfiles only is a good improvement that reduces the amount of unnecessary artifacts uploaded.cmd/akash/cmd/testnetify/utils.go (4)
18-21: Improved database opening with backend flexibility.The enhanced
openDBfunction now accepts abackendTypeparameter, providing flexibility in database backend selection. This is a good design improvement that makes the code more testable and adaptable to different environments.
23-33: Well-designed configuration validation function.The new
getAndValidateConfigfunction properly separates configuration retrieval and validation concerns, with appropriate error handling. This modular approach improves code maintainability and testability.
39-39: Good use of namespaced flag constant.Using
cflags.FlagTraceStoreinstead of a magic string improves consistency and maintainability across the codebase. This aligns with the systematic flag handling improvements in the PR.
68-75: Excellent context management with graceful shutdown.The new
getCtxfunction properly implements context management with errgroup and signal handling. The use ofserver.ListenForQuitSignalsprovides graceful shutdown capabilities, which is essential for reliable service operation.app/genesis.go (1)
67-70: Good enhancement to include token filtering.The updated
NewDefaultGenesisStatefunction now accepts a codec parameter and applies token filtering, which ensures consistent use of "uakt" instead of "stake" throughout the genesis state. This is a logical improvement.script/tools.sh (3)
8-26: Good addition of platform-specific dependency arrays.The platform-specific dependency arrays (
macos_depsanddebian_deps) are a valuable addition for automated dependency management across different environments.
78-142: Sophisticated automation for Go module upgrades.The
replace_import_pathfunction provides comprehensive automation for major version upgrades, including handling retractions and updating module paths. This is valuable tooling for the development workflow.
144-216: Excellent cross-platform dependency installation automation.The
install_gha_depsfunction provides robust cross-platform dependency management with proper OS detection, conditional installation of missing packages, and good user feedback. This significantly improves the development experience.app/testnet.go (1)
83-84: Return app instead of nil on errorThe function returns
nilwhen an error occurs, but the error is handled bytmos.Exitin the deferred function. This makes the return value inconsistent and could be confusing.- if err != nil { - return nil - } + if err != nil { + return app + }Likely an incorrect or invalid review comment.
app/types/app.go (1)
366-381: Clarify or remove commented route handlersThere are commented-out route handlers for upgrades and staking. Please clarify if these are intentionally disabled or remove the commented code.
- //AddRoute( - // upgradetypes.RouterKey, - // upgrade.NewSoftwareUpgradeProposalHandler(app.Keepers.Cosmos.Upgrade), - //). AddRoute( ibcclienttypes.RouterKey, ibcclient.NewClientProposalHandler(app.Keepers.Cosmos.IBC.ClientKeeper), ). AddRoute( ibcexported.RouterKey, ibcclient.NewClientProposalHandler(app.Keepers.Cosmos.IBC.ClientKeeper), ) - // AddRoute( - // astakingtypes.RouterKey, - // ibcclient.NewClientProposalHandler(app.Keepers.Cosmos.IBC.ClientKeeper), - // )app/app.go (15)
15-80: Import organization looks good with proper SDK v0.50+ modulesThe imports have been properly updated to use the new Cosmos SDK v0.50+ module paths (
cosmossdk.io,cometbft) and the updated Akash module paths (pkg.akt.dev). The organization is logical with clear separation between different dependency groups.
87-107: Struct embedding and field organization is well-designedThe
AkashAppstruct now properly embeds*baseapp.BaseAppand*apptypes.App, which provides clean access to base functionality. The field organization separating codec components and other properties is logical and maintainable.
117-125: Encoding configuration handling is properly modernizedThe constructor now uses
sdkutil.EncodingConfigparameter and properly extracts the individual codec components, which aligns with the modern SDK patterns.
133-157: Home path handling and keeper initialization looks correctThe home path defaulting logic and the two-phase keeper initialization (
InitSpecialKeepersandInitNormalKeepers) follows a clear pattern that should work well with the new keeper management structure.
187-214: Module management modernization is well-implementedThe dynamic creation of modules using
appModules()function and proper error handling in service registration shows good modernization practices. The configurator setup follows current SDK patterns.
216-230: Upgrade handler registration and commented governance setupThe upgrade handler registration is properly implemented. The commented-out governance module basic setup suggests this might be intentionally disabled during the migration.
234-242: Service registration and store mounting is properly implementedThe AutoCLI service registration, reflection service setup, and store mounting logic follows current SDK best practices.
256-276: ABCI method setup uses modern patternsThe ante handler creation and ABCI method setup properly uses the new lifecycle methods (
PreBlocker,Precommitter,PrepareCheckStater) which aligns with SDK v0.50+ requirements.
287-348: Module ordering functions are comprehensiveThe
orderBeginBlockersandOrderEndBlockersfunctions provide explicit control over module execution order, which is essential for proper blockchain operation. The ordering appears logical with upgrades first and critical consensus modules properly sequenced.
372-383: InitChainer properly handles error casesThe
InitChainernow returns errors properly and includes proper version map initialization, following modern SDK patterns.
385-425: New lifecycle methods are properly implementedThe
PreBlocker,BeginBlocker,EndBlocker,Precommitter, andPrepareCheckStatermethods are all properly implemented with appropriate error handling and gas meter management.
477-515: API route registration updated for modern SDKThe API route registration properly uses the new grpc-gateway routes, updated Tendermint service registration with
cmtservice, and includes node service registration. This follows current SDK patterns.
524-524: Swagger route fix with static prefixThe addition of the
/static/prefix route properly handles static file serving, which fixes a common issue with Swagger UI access.
540-553: Reflection service caching is a good optimizationThe caching of the reflection service prevents repeated initialization and improves performance, especially in test scenarios. This is a solid implementation pattern.
555-566: NewProposalContext provides safe query contextThe
NewProposalContextmethod properly creates a branched context with appropriate gas metering and consensus parameters, which is essential for safe proposal processing.cmd/akash/cmd/app_creator.go (2)
145-162: Clean testnet app initialization with proper type safety.The method correctly handles type assertions and validates the testnet configuration before initialization.
42-98: Add validation for type conversions to prevent panics.The method uses multiple
cast.To*functions without validation. If the app options contain invalid values, these conversions could panic at runtime.Consider adding validation for critical conversions:
- if cast.ToBool(appOpts.Get(cflags.FlagInterBlockCache)) { + interBlockCache, err := cast.ToBoolE(appOpts.Get(cflags.FlagInterBlockCache)) + if err != nil { + panic(fmt.Errorf("invalid inter-block cache flag: %w", err)) + } + if interBlockCache { cache = store.NewCommitKVStoreCacheManager() }Similar validation should be added for other critical conversions like
FlagStateSyncSnapshotInterval,FlagStateSyncSnapshotKeepRecent,FlagHaltHeight, etc.Likely an incorrect or invalid review comment.
| _, bz, err := bech32.DecodeAndConvert(val.OperatorAddress.String()) | ||
| if err != nil { | ||
| return nil | ||
| } | ||
| bech32Addr, err := bech32.ConvertAndEncode("akashvaloper", bz) | ||
| if err != nil { | ||
| return nil | ||
| } | ||
|
|
There was a problem hiding this comment.
💡 Verification agent
🧩 Analysis chain
Simplify validator address handling
The code decodes and re-encodes the validator operator address to ensure it uses the "akashvaloper" prefix. Consider adding a comment explaining why this conversion is necessary, or verify if the address already has the correct prefix.
🏁 Script executed:
#!/bin/bash
# Description: Check if validator addresses in the codebase already use the correct prefix
# Search for validator address creation or usage patterns
ast-grep --pattern 'sdk.ValAddressFromBech32($_)'
# Check for any hardcoded validator addresses
rg -A 2 'ValAddress|valoper' --type goLength of output: 4293
🏁 Script executed:
#!/bin/bash
# Display context around bech32.DecodeAndConvert usage in app/testnet.go
rg -n "bech32.DecodeAndConvert" -C5 app/testnet.go || trueLength of output: 386
🏁 Script executed:
#!/bin/bash
# Show file header and context around tcfg in app/testnet.go
sed -n '1,200p' app/testnet.goLength of output: 5821
Simplify validator address conversion in InitAkashAppForTestnet
Rather than manually decoding and re-encoding the operator address, you can leverage the SDK’s built-in ValAddress conversion (or even change the TestnetValidator field type) to produce the correct prefix. This both clarifies intent and removes boilerplate.
• In app/testnet.go (lines 115–123), replace:
_, bz, err := bech32.DecodeAndConvert(val.OperatorAddress.String())
if err != nil {
return nil
}
bech32Addr, err := bech32.ConvertAndEncode("akashvaloper", bz)
if err != nil {
return nil
}
with something like:
// derive the validator operator address with the “akashvaloper” prefix
operatorAddr := sdk.ValAddress(val.OperatorAddress).String()and then use operatorAddr when constructing stakingtypes.Validator.
• (Optional) Change TestnetValidator.OperatorAddress from sdk.Address to sdk.ValAddress so you can drop the cast entirely:
type TestnetValidator struct {
OperatorAddress sdk.ValAddress
…
}• Add a brief comment explaining that the conversion ensures the correct bech32 prefix for validator operators.
🤖 Prompt for AI Agents
In app/testnet.go around lines 115 to 123, simplify the validator operator
address conversion by replacing the manual bech32 decode and encode steps with a
direct conversion using sdk.ValAddress(val.OperatorAddress).String() to get the
correct "akashvaloper" prefix. Use this operatorAddr string when constructing
stakingtypes.Validator. Optionally, change the TestnetValidator.OperatorAddress
field type from sdk.Address to sdk.ValAddress to avoid the cast entirely. Add a
comment explaining that this conversion ensures the correct bech32 prefix for
validator operators.
| snapshotDir := filepath.Join(homeDir, "data", "snapshots") | ||
| snapshotDB, err := dbm.NewDB("metadata", server.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.
🛠️ Refactor suggestion
Add cleanup for snapshot DB on initialization failure.
The snapshot DB is created but not cleaned up if snapshots.NewStore fails. This could lead to resource leaks.
snapshotDB, err := dbm.NewDB("metadata", server.GetAppDBBackend(appOpts), snapshotDir)
if err != nil {
panic(err)
}
snapshotStore, err := snapshots.NewStore(snapshotDB, snapshotDir)
if err != nil {
+ snapshotDB.Close()
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", server.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") | |
| snapshotDB, err := dbm.NewDB("metadata", server.GetAppDBBackend(appOpts), snapshotDir) | |
| if err != nil { | |
| panic(err) | |
| } | |
| snapshotStore, err := snapshots.NewStore(snapshotDB, snapshotDir) | |
| if err != nil { | |
| snapshotDB.Close() | |
| panic(err) | |
| } |
🤖 Prompt for AI Agents
In cmd/akash/cmd/app_creator.go around lines 69 to 78, the snapshot DB is
created but not cleaned up if snapshots.NewStore returns an error, potentially
causing resource leaks. Modify the error handling after snapshots.NewStore to
close or clean up the snapshotDB resource before panicking, ensuring proper
cleanup on initialization failure.
| genParams.NativeCoinMetadatas = []banktypes.Metadata{ | ||
| { | ||
| Description: "The native token of Osmosis", | ||
| DenomUnits: []*banktypes.DenomUnit{ | ||
| { | ||
| Denom: appparams.BaseCoinUnit, | ||
| Exponent: 0, | ||
| Aliases: nil, | ||
| }, | ||
| { | ||
| Denom: appparams.HumanCoinUnit, | ||
| Exponent: appparams.OsmoExponent, | ||
| Aliases: nil, | ||
| }, | ||
| }, | ||
| Base: appparams.BaseCoinUnit, | ||
| Display: appparams.HumanCoinUnit, | ||
| }, | ||
| } |
There was a problem hiding this comment.
Fix incorrect token description
The native coin metadata description incorrectly refers to "Osmosis" instead of "Akash".
genParams.NativeCoinMetadatas = []banktypes.Metadata{
{
- Description: "The native token of Osmosis",
+ Description: "The native token of Akash",
DenomUnits: []*banktypes.DenomUnit{📝 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.
| genParams.NativeCoinMetadatas = []banktypes.Metadata{ | |
| { | |
| Description: "The native token of Osmosis", | |
| DenomUnits: []*banktypes.DenomUnit{ | |
| { | |
| Denom: appparams.BaseCoinUnit, | |
| Exponent: 0, | |
| Aliases: nil, | |
| }, | |
| { | |
| Denom: appparams.HumanCoinUnit, | |
| Exponent: appparams.OsmoExponent, | |
| Aliases: nil, | |
| }, | |
| }, | |
| Base: appparams.BaseCoinUnit, | |
| Display: appparams.HumanCoinUnit, | |
| }, | |
| } | |
| genParams.NativeCoinMetadatas = []banktypes.Metadata{ | |
| { | |
| Description: "The native token of Akash", | |
| DenomUnits: []*banktypes.DenomUnit{ | |
| { | |
| Denom: appparams.BaseCoinUnit, | |
| Exponent: 0, | |
| Aliases: nil, | |
| }, | |
| { | |
| Denom: appparams.HumanCoinUnit, | |
| Exponent: appparams.OsmoExponent, | |
| Aliases: nil, | |
| }, | |
| }, | |
| Base: appparams.BaseCoinUnit, | |
| Display: appparams.HumanCoinUnit, | |
| }, | |
| } |
🤖 Prompt for AI Agents
In cmd/akash/cmd/genesis.go between lines 205 and 223, the native coin metadata
description incorrectly mentions "Osmosis" instead of "Akash". Update the
Description field to correctly state "The native token of Akash" to reflect the
proper token name.
| Note, strict routability for addresses is turned off in the config file. | ||
|
|
||
| Example: | ||
| osmosisd testnet --v 4 --output-dir ./output --starting-ip-address 192.168.10.2 |
There was a problem hiding this comment.
Typo in example command - incorrect binary name
The example shows osmosisd but this is for Akash testnet. Update the binary name to match Akash.
- osmosisd testnet --v 4 --output-dir ./output --starting-ip-address 192.168.10.2
+ akash testnet --v 4 --output-dir ./output --starting-ip-address 192.168.10.2📝 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.
| osmosisd testnet --v 4 --output-dir ./output --starting-ip-address 192.168.10.2 | |
| akash testnet --v 4 --output-dir ./output --starting-ip-address 192.168.10.2 |
🤖 Prompt for AI Agents
In cmd/akash/cmd/testnet.go at line 62, the example command uses the incorrect
binary name "osmosisd". Replace "osmosisd" with the correct binary name "akash"
to accurately reflect the Akash testnet command usage.
| info := map[string]string{"secret": secret} | ||
|
|
||
| cliPrint, err := json.Marshal(info) | ||
| if err != nil { | ||
| return err | ||
| } | ||
|
|
||
| // save private key seed words | ||
| if err := writeFile(fmt.Sprintf("%v.json", "key_seed"), nodeDir, cliPrint); err != nil { | ||
| return err | ||
| } |
There was a problem hiding this comment.
Security: Private key seeds saved unencrypted
The private key seed words are saved as plain text JSON files without encryption. This poses a security risk if these files are accidentally exposed.
Consider encrypting the seed words or at least:
- Adding a warning in the output about securing these files
- Setting restrictive file permissions (0600)
- Adding a flag to optionally skip saving seeds to disk
// save private key seed words
+cmd.PrintErrf("WARNING: Private key seeds will be saved unencrypted in %s\n", nodeDir)
-if err := writeFile(fmt.Sprintf("%v.json", "key_seed"), nodeDir, cliPrint); err != nil {
+if err := writeFile(fmt.Sprintf("%v.json", "key_seed"), nodeDir, cliPrint, 0600); err != nil {
return err
}Committable suggestion skipped: line range outside the PR's diff.
🤖 Prompt for AI Agents
In cmd/akash/cmd/testnet.go around lines 195 to 205, the private key seed words
are saved as unencrypted JSON files, which is a security risk. To fix this, add
an option flag to allow skipping saving the seed to disk, set the file
permissions to 0600 when writing the file to restrict access, and include a
warning message in the output advising users to securely store these files.
Optionally, consider implementing encryption for the seed before saving.
| func calculateIP(ip string, i int) (string, error) { | ||
| ipv4 := net.ParseIP(ip).To4() | ||
| if ipv4 == nil { | ||
| return "", fmt.Errorf("%v: non ipv4 address", ip) | ||
| } | ||
|
|
||
| for j := 0; j < i; j++ { | ||
| ipv4[3]++ | ||
| } | ||
|
|
||
| return ipv4.String(), nil | ||
| } |
There was a problem hiding this comment.
Potential IP address overflow
The calculateIP function increments the last octet without checking for overflow. This could result in invalid IP addresses if the starting IP's last octet plus the validator count exceeds 255.
func calculateIP(ip string, i int) (string, error) {
ipv4 := net.ParseIP(ip).To4()
if ipv4 == nil {
return "", fmt.Errorf("%v: non ipv4 address", ip)
}
+ if int(ipv4[3])+i > 255 {
+ return "", fmt.Errorf("IP address overflow: %v + %d exceeds valid range", ip, i)
+ }
+
for j := 0; j < i; j++ {
ipv4[3]++
}
return ipv4.String(), nil
}📝 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 calculateIP(ip string, i int) (string, error) { | |
| ipv4 := net.ParseIP(ip).To4() | |
| if ipv4 == nil { | |
| return "", fmt.Errorf("%v: non ipv4 address", ip) | |
| } | |
| for j := 0; j < i; j++ { | |
| ipv4[3]++ | |
| } | |
| return ipv4.String(), nil | |
| } | |
| func calculateIP(ip string, i int) (string, error) { | |
| ipv4 := net.ParseIP(ip).To4() | |
| if ipv4 == nil { | |
| return "", fmt.Errorf("%v: non ipv4 address", ip) | |
| } | |
| if int(ipv4[3])+i > 255 { | |
| return "", fmt.Errorf("IP address overflow: %v + %d exceeds valid range", ip, i) | |
| } | |
| for j := 0; j < i; j++ { | |
| ipv4[3]++ | |
| } | |
| return ipv4.String(), nil | |
| } |
🤖 Prompt for AI Agents
In cmd/akash/cmd/testnet.go around lines 384 to 395, the calculateIP function
increments the last octet of the IP address without checking for overflow, which
can produce invalid IPs. Modify the function to check if incrementing the last
octet would exceed 255 and handle the overflow properly, either by returning an
error or by incrementing the preceding octets accordingly to maintain a valid
IPv4 address.
| Example: "testnetify", | ||
| Args: cobra.NoArgs, | ||
| Args: cobra.ExactArgs(1), |
There was a problem hiding this comment.
Inconsistency between example and args validation
The command now requires exactly one argument but the example shows usage without any arguments.
Either update the example to show the required argument or change back to cobra.NoArgs if no argument is actually needed:
- Example: "testnetify",
+ Example: "testnetify <chain-id>",Or if no argument is needed:
- Args: cobra.ExactArgs(1),
+ Args: cobra.NoArgs,🤖 Prompt for AI Agents
In cmd/akash/cmd/testnetify/testnetify.go around lines 72 to 73, there is a
mismatch between the example usage and the argument validation; the example
shows no arguments but Args requires exactly one argument. To fix this, either
update the example string to include the required argument or revert Args to
cobra.NoArgs if no argument is actually needed by the command.
| CHAIN_METADATA=$(curl -s "${CHAIN_METADATA_URL}") | ||
| GENESIS_URL="$(echo "$CHAIN_METADATA" | jq -r '.codebase.genesis.genesis_url? // .genesis?')" |
There was a problem hiding this comment.
Add error handling for chain metadata retrieval
The script doesn't handle potential failures when fetching chain metadata or parsing JSON. This could lead to silent failures or cryptic errors later in the script.
-CHAIN_METADATA=$(curl -s "${CHAIN_METADATA_URL}")
-GENESIS_URL="$(echo "$CHAIN_METADATA" | jq -r '.codebase.genesis.genesis_url? // .genesis?')"
+CHAIN_METADATA=$(curl -s "${CHAIN_METADATA_URL}")
+if [ $? -ne 0 ] || [ -z "$CHAIN_METADATA" ]; then
+ echo >&2 "Failed to fetch chain metadata from ${CHAIN_METADATA_URL}"
+ exit 1
+fi
+
+GENESIS_URL="$(echo "$CHAIN_METADATA" | jq -r '.codebase.genesis.genesis_url? // .genesis?' 2>/dev/null)"
+if [ $? -ne 0 ] || [ -z "$GENESIS_URL" ] || [ "$GENESIS_URL" = "null" ]; then
+ echo >&2 "Failed to extract genesis URL from chain metadata"
+ exit 1
+fi📝 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.
| CHAIN_METADATA=$(curl -s "${CHAIN_METADATA_URL}") | |
| GENESIS_URL="$(echo "$CHAIN_METADATA" | jq -r '.codebase.genesis.genesis_url? // .genesis?')" | |
| CHAIN_METADATA=$(curl -s "${CHAIN_METADATA_URL}") | |
| if [ $? -ne 0 ] || [ -z "$CHAIN_METADATA" ]; then | |
| echo >&2 "Failed to fetch chain metadata from ${CHAIN_METADATA_URL}" | |
| exit 1 | |
| fi | |
| GENESIS_URL="$(echo "$CHAIN_METADATA" | jq -r '.codebase.genesis.genesis_url? // .genesis?' 2>/dev/null)" | |
| if [ $? -ne 0 ] || [ -z "$GENESIS_URL" ] || [ "$GENESIS_URL" = "null" ]; then | |
| echo >&2 "Failed to extract genesis URL from chain metadata" | |
| exit 1 | |
| fi |
🤖 Prompt for AI Agents
In script/upgrades.sh around lines 126 to 127, add error handling for the curl
command fetching CHAIN_METADATA and for the jq JSON parsing. Check if the curl
command succeeds and if the output is valid JSON before proceeding. If either
fails, output a clear error message and exit the script to prevent silent
failures or cryptic errors later.
| tar_cmd=$(content_type "$(content_name "${GENESIS_URL}")") | ||
|
|
||
| if [ "$tar_cmd" != "" ]; then | ||
| # shellcheck disable=SC2086 | ||
| wget -nq -O - "${GENESIS_URL}" | pv $pv_args | eval "$tar_cmd" | ||
| else | ||
| wget -q --show-progress -O "$genesis_file" "${GENESIS_URL}" | ||
| fi | ||
| else |
There was a problem hiding this comment.
Fix undefined variable reference
The variable tar_cmd is assigned a string value from content_type function (which returns strings like "tar.gz"), but it's being used with eval as if it contains shell commands. This appears to be a bug where tar_by_content_type should be called instead.
- tar_cmd=$(content_type "$(content_name "${GENESIS_URL}")")
+ tar_cmd=$(tar_by_content_type "$(content_name "${GENESIS_URL}")")
if [ "$tar_cmd" != "" ]; then
# shellcheck disable=SC2086
wget -nq -O - "${GENESIS_URL}" | pv $pv_args | eval "$tar_cmd"📝 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.
| tar_cmd=$(content_type "$(content_name "${GENESIS_URL}")") | |
| if [ "$tar_cmd" != "" ]; then | |
| # shellcheck disable=SC2086 | |
| wget -nq -O - "${GENESIS_URL}" | pv $pv_args | eval "$tar_cmd" | |
| else | |
| wget -q --show-progress -O "$genesis_file" "${GENESIS_URL}" | |
| fi | |
| else | |
| tar_cmd=$(tar_by_content_type "$(content_name "${GENESIS_URL}")") | |
| if [ "$tar_cmd" != "" ]; then | |
| # shellcheck disable=SC2086 | |
| wget -nq -O - "${GENESIS_URL}" | pv $pv_args | eval "$tar_cmd" | |
| else | |
| wget -q --show-progress -O "$genesis_file" "${GENESIS_URL}" | |
| fi |
🤖 Prompt for AI Agents
In script/upgrades.sh around lines 386 to 394, the variable tar_cmd is
incorrectly assigned the output of content_type, which returns a string like
"tar.gz" instead of a shell command. Replace the assignment to call
tar_by_content_type with the content type as argument to get the correct tar
command string. This will ensure that eval executes a valid shell command
instead of a content type string.
Signed-off-by: Artur Troian <troian@users.noreply.github.com>
Signed-off-by: Artur Troian <troian@users.noreply.github.com>
There was a problem hiding this comment.
Actionable comments posted: 6
🔭 Outside diff range comments (1)
tests/README.md (1)
1-226: Update documentation to reflect Akash project context.This README contains extensive references to Osmosis (LocalOsmosis, osmosisd, osmosis addresses, etc.) but is located in the Akash repository. The documentation needs to be updated to:
- Replace "LocalOsmosis" with appropriate Akash testnet naming
- Update
osmosisdcommands toakash- Replace Osmosis addresses with Akash addresses
- Update chain-id from "localosmosis" to an appropriate Akash testnet chain-id
- Update repository paths and Docker image references
Would you like me to help rewrite this documentation with the correct Akash project context and commands?
♻️ Duplicate comments (27)
.github/workflows/release.yaml (1)
41-41: Document custom runner label for actionlintThis is the same issue flagged in previous reviews. The
gh-runner-testrunner label needs to be documented in anactionlint.yamlconfiguration file to resolve the static analysis warning.app/genesis.go (3)
32-64: Consider returning errors instead of panicking and use a more robust token replacement approach.The function has several issues:
- Panics on errors instead of returning them, which prevents proper error handling by callers
- String replacement approach (
strings.ReplaceAll) could replace unintended occurrences of"stake"in values or keys- The unmarshaling to
map[string]interface{}(lines 53-57) serves no purpose
73-81: Handle GetPubKey error and remove unused code.The function ignores the error from
GetPubKey()and callsAddress()without using the result.
153-157: Improve error message and remove unused validator updates conversion.The panic message is too generic and the validator updates conversion result is not used.
app/modules.go (2)
145-147: Consider migrating away from the deprecated params module.The static analysis indicates that
params.NewAppModuleis deprecated and will be removed in the next Cosmos SDK major release. Consider planning for this migration.
209-240: Duplicate authzmodule initialization in simulation modules.The
authzmodule.NewAppModuleis initialized twice in theappSimModulesfunction (lines 209-215 and 234-240).Remove the duplicate initialization:
- authzmodule.NewAppModule( - app.cdc, - app.Keepers.Cosmos.Authz, - app.Keepers.Cosmos.Acct, - app.Keepers.Cosmos.Bank, - app.interfaceRegistry, - ), gov.NewAppModule(script/tools.sh (3)
16-26: Fix typo in Debian package name.The package name should be
build-essential(singular), notbuild-essentials.
65-76: Make sed command portable across platforms.The
-rflag is GNU sed specific. The script already handles macOS withgsed, but the flag should be adjusted for portability.
103-110: Consider security implications of broad file modification.The
replace_import_pathfunction modifies files across the entire repository except for specific exclusions. Consider adding more restrictive patterns to avoid accidentally modifying sensitive files.cmd/akash/cmd/app_creator.go (1)
69-78: Add cleanup for snapshot DB on initialization failure.The snapshot DB is created but not cleaned up if
snapshots.NewStorefails. This could lead to resource leaks.snapshotDB, err := dbm.NewDB("metadata", server.GetAppDBBackend(appOpts), snapshotDir) if err != nil { panic(err) } snapshotStore, err := snapshots.NewStore(snapshotDB, snapshotDir) if err != nil { + snapshotDB.Close() panic(err) }cmd/akash/cmd/genesis.go (1)
204-222: Fix incorrect token description.The native coin metadata description incorrectly refers to "Osmosis" instead of "Akash".
genParams.NativeCoinMetadatas = []banktypes.Metadata{ { - Description: "The native token of Osmosis", + Description: "The native token of Akash", DenomUnits: []*banktypes.DenomUnit{script/upgrades.sh (3)
126-127: Add error handling for chain metadata retrieval.The script doesn't handle potential failures when fetching chain metadata or parsing JSON. This could lead to silent failures or cryptic errors later in the script.
-CHAIN_METADATA=$(curl -s "${CHAIN_METADATA_URL}") -GENESIS_URL="$(echo "$CHAIN_METADATA" | jq -r '.codebase.genesis.genesis_url? // .genesis?')" +CHAIN_METADATA=$(curl -s "${CHAIN_METADATA_URL}") +if [ $? -ne 0 ] || [ -z "$CHAIN_METADATA" ]; then + echo >&2 "Failed to fetch chain metadata from ${CHAIN_METADATA_URL}" + exit 1 +fi + +GENESIS_URL="$(echo "$CHAIN_METADATA" | jq -r '.codebase.genesis.genesis_url? // .genesis?' 2>/dev/null)" +if [ $? -ne 0 ] || [ -z "$GENESIS_URL" ] || [ "$GENESIS_URL" = "null" ]; then + echo >&2 "Failed to extract genesis URL from chain metadata" + exit 1 +fi
389-397: Fix undefined variable reference.The variable
tar_cmdis assigned a string value fromcontent_typefunction (which returns strings like "tar.gz"), but it's being used withevalas if it contains shell commands. This appears to be a bug wheretar_by_content_typeshould be called instead.- tar_cmd=$(content_type "$(content_name "${GENESIS_URL}")") + tar_cmd=$(tar_by_content_type "$(content_name "${GENESIS_URL}")") if [ "$tar_cmd" != "" ]; then # shellcheck disable=SC2086 wget -nq -O - "${GENESIS_URL}" | pv $pv_args | eval "$tar_cmd"
402-404: Fix another instance of incorrect function usage.Same issue as above -
content_typereturns archive type strings, not shell commands.- tar_cmd=$(content_type "${GENESIS_URL}") + tar_cmd=$(tar_by_content_type "${GENESIS_URL}") # shellcheck disable=SC2086 (pv -petrafb -i 5 "${GENESIS_URL}" | eval "$tar_cmd") 2>&1 | stdbuf -o0 tr '\r' '\n'app/testnet.go (1)
115-123: Simplify validator address conversionThe manual bech32 decode and re-encode steps can be simplified by directly converting to
sdk.ValAddress:- _, bz, err := bech32.DecodeAndConvert(val.OperatorAddress.String()) - if err != nil { - return nil - } - bech32Addr, err := bech32.ConvertAndEncode("akashvaloper", bz) - if err != nil { - return nil - } + // Convert to ValAddress to get the correct "akashvaloper" prefix + bech32Addr := sdk.ValAddress(val.OperatorAddress).String()app/export.go (1)
83-83: Consider consistent error handling patternFor consistency with descriptive error messages, consider wrapping the error with context:
- if err != nil { - panic(err) - } + if err != nil { + panic(fmt.Errorf("invalid validator address %s: %w", addr, err)) + }cmd/akash/cmd/testnet.go (4)
62-62: Typo in example command - incorrect binary nameThe example shows
osmosisdbut this is for Akash testnet. Update the binary name:- osmosisd testnet --v 4 --output-dir ./output --starting-ip-address 192.168.10.2 + akash testnet --v 4 --output-dir ./output --starting-ip-address 192.168.10.2
99-99: Incorrect default daemon homeThe default daemon home should be "akash" instead of "osmosisd":
- cmd.Flags().String(flagNodeDaemonHome, "osmosisd", "Home directory of the node's daemon configuration") + cmd.Flags().String(flagNodeDaemonHome, "akash", "Home directory of the node's daemon configuration")
195-205: Security: Private key seeds saved unencryptedPrivate key seed words are saved as plain text JSON files without encryption. This poses a security risk.
Consider:
- Adding a warning about securing these files
- Using more restrictive file permissions (0600)
- Adding a flag to optionally skip saving seeds
// save private key seed words +cmd.PrintErrf("WARNING: Private key seeds will be saved unencrypted in %s\n", nodeDir) if err := writeFile(fmt.Sprintf("%v.json", "key_seed"), nodeDir, cliPrint); err != nil { return err }Also update the writeFile function to use more restrictive permissions:
-err = tmos.WriteFile(file, contents, 0o644) +err = tmos.WriteFile(file, contents, 0o600)
384-395: Potential IP address overflowThe
calculateIPfunction doesn't check for overflow when incrementing the last octet:func calculateIP(ip string, i int) (string, error) { ipv4 := net.ParseIP(ip).To4() if ipv4 == nil { return "", fmt.Errorf("%v: non ipv4 address", ip) } + if int(ipv4[3])+i > 255 { + return "", fmt.Errorf("IP address overflow: %v + %d exceeds valid range", ip, i) + } + for j := 0; j < i; j++ { ipv4[3]++ } return ipv4.String(), nil }cmd/akash/cmd/testnetify/testnetify.go (1)
74-75: Fix example/args validation mismatchThe example shows no arguments but Args requires exactly one argument. Update the example to match the requirement or adjust Args if no argument is needed.
.github/workflows/tests.yaml (1)
178-180: Fix shellcheck warning for variable quotingThe variable should be quoted to prevent word splitting issues.
- test_required=$(./script/upgrades.sh test-required ${{ github.ref }}) + test_required=$(./script/upgrades.sh test-required "${{ github.ref }}")app/types/app.go (1)
197-259: Add parameter validation for InitSpecialKeepersThe method should validate critical parameters to fail fast and prevent proceeding with invalid inputs.
app/app.go (4)
166-171: Address the hook setup timing issueThe TODO comment highlights a critical issue where governance proposal handlers are registered before hooks are set up, potentially causing nil pointer dereferences.
175-175: Remove deprecated crisis flag usageThe
crisis.FlagSkipGenesisInvariantsflag is deprecated and should be replaced or removed.
207-207: Remove deprecated RegisterInvariants callThe
MM.RegisterInvariantsfunction is deprecated and is now a no-op.
534-537: Replace reflection-based ChainID accessUsing reflection to access private fields is fragile and may break with SDK updates. Store the chain ID in the AkashApp struct during initialization instead.
🧹 Nitpick comments (7)
CHANGELOG.md (1)
41-41: Wrap bare URL in link syntax to satisfy Markdown linting and keep consistencyBare URL triggers MD034 and looks inconsistent with the rest of the changelog, which relies on automatic link-ification of issue numbers.
Suggested diff:-* (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)Please make sure the vanity-domain URL actually resolves to the intended PR after the repository migration.
app/config.go (1)
48-57: Verify the intentional limitation of governance proposal handlers.Most governance proposal handlers are commented out, leaving only parameter change proposals enabled. This significantly restricts governance functionality by disabling:
- Distribution proposals
- Software upgrade proposals
- IBC client update proposals
Please confirm this is intentional for your deployment scenario.
Would you like me to help enable the additional proposal handlers if they're needed for your governance model?
tests/e2e/provider_grpc_test.go (1)
127-127: Fix test case description typo.The test case name should be "get provider with empty input" instead of "get group with empty input".
- "get group with empty input", + "get provider with empty input",tests/e2e/deployment_cli_test.go (1)
224-232: Consider using a more robust approach for invalid address testing.The hardcoded address might pass validation in future SDK versions. Consider using a clearly malformed address.
- WithOwner("akash102ruvpv2srmunfffxavttxnhezln6fnc3pf7tt")..., + WithOwner("invalid-address-format")...,app/testnet.go (1)
158-177: Optimize redundant validator address conversionsThe validator address is converted from string twice (lines 158 and 174). Consider reusing the converted address:
valAddr, err := sdk.ValAddressFromBech32(newVal.GetOperator()) if err != nil { return nil } err = app.Keepers.Cosmos.Staking.SetLastValidatorPower(ctx, valAddr, 0) if err != nil { return nil } if err := app.Keepers.Cosmos.Staking.Hooks().AfterValidatorCreated(ctx, valAddr); err != nil { panic(err) } // DISTRIBUTION // // Initialize records for this validator across all distribution stores - valAddr, err = sdk.ValAddressFromBech32(newVal.GetOperator()) - if err != nil { - return nil - } + // Reuse valAddr from abovetests/e2e/market_cli_test.go (1)
118-118: Consider using test ordering instead of numbered namesWhile the numbered test names ensure sequential execution, consider using Go 1.17+'s
testing.InternalTestordering or a test runner that supports ordered tests. This would allow more descriptive test names while maintaining execution order.Also applies to: 224-224, 379-379, 482-482
cmd/akash/cmd/root.go (1)
58-80: Consider adding parameter validationThe
GetPersistentPreRunEfunction should validate critical parameters to prevent runtime errors.func GetPersistentPreRunE(encodingConfig sdkutil.EncodingConfig, envPrefixes []string) func(*cobra.Command, []string) error { return func(cmd *cobra.Command, _ []string) error { + if encodingConfig.Codec == nil { + return fmt.Errorf("encoding config codec cannot be nil") + } if err := utilcli.InterceptConfigsPreRunHandler(cmd, envPrefixes, false, "", nil); err != nil { return err }
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
go.sumis excluded by!**/*.sum
📒 Files selected for processing (146)
.env(1 hunks).envrc(1 hunks).github/.repo(1 hunks).github/actions/setup-ubuntu/action.yaml(1 hunks).github/workflows/concommits.yaml(1 hunks).github/workflows/release.yaml(4 hunks).github/workflows/tests.yaml(8 hunks).golangci.yaml(1 hunks).goreleaser-docker.yaml(1 hunks).goreleaser-test-bins.yaml(1 hunks).goreleaser.yaml(3 hunks).mockery.yaml(1 hunks)CHANGELOG.md(1 hunks)Makefile(3 hunks)README.md(1 hunks)_docs/adr/adr-001-network-upgrades.md(1 hunks)app/ante.go(1 hunks)app/app.go(7 hunks)app/app_configure.go(3 hunks)app/app_test.go(1 hunks)app/config.go(2 hunks)app/decorators/gov_filter.go(0 hunks)app/decorators/min_commision.go(5 hunks)app/export.go(7 hunks)app/genesis.go(2 hunks)app/mac.go(2 hunks)app/modules.go(1 hunks)app/option.go(1 hunks)app/params/config.go(1 hunks)app/params/proto.go(0 hunks)app/sim/sim_config.go(1 hunks)app/sim/sim_utils.go(1 hunks)app/sim_test.go(5 hunks)app/testnet.go(4 hunks)app/types/app.go(3 hunks)app/upgrades.go(2 hunks)client/client.go(3 hunks)cmd/akash/cmd/app_creator.go(1 hunks)cmd/akash/cmd/auth.go(2 hunks)cmd/akash/cmd/bech32.go(1 hunks)cmd/akash/cmd/flag_test.go(4 hunks)cmd/akash/cmd/genaccounts.go(6 hunks)cmd/akash/cmd/genesis.go(1 hunks)cmd/akash/cmd/root.go(5 hunks)cmd/akash/cmd/testnet.go(1 hunks)cmd/akash/cmd/testnetify/cmt_abci.go(1 hunks)cmd/akash/cmd/testnetify/config.go(3 hunks)cmd/akash/cmd/testnetify/testnetify.go(11 hunks)cmd/akash/cmd/testnetify/utils.go(2 hunks)cmd/akash/main.go(1 hunks)cmd/common/flags.go(0 hunks)docgen/main.go(1 hunks)events/cmd/root.go(4 hunks)events/publish.go(6 hunks)events/publish_test.go(1 hunks)events/query.go(2 hunks)go.mod(1 hunks)make/codegen.mk(1 hunks)make/init.mk(4 hunks)make/lint.mk(2 hunks)make/mod.mk(1 hunks)make/releasing.mk(6 hunks)make/setup-cache.mk(2 hunks)make/test-integration.mk(2 hunks)make/test-simulation.mk(1 hunks)make/test-upgrade.mk(3 hunks)meta.json(1 hunks)pubsub/bus_test.go(1 hunks)script/tools.sh(1 hunks)script/upgrades.sh(10 hunks)sdl/_testdata/deployment-svc-mismatch.yaml(0 hunks)sdl/_testdata/private_service.yaml(0 hunks)sdl/_testdata/profile-svc-name-mismatch.yaml(0 hunks)sdl/_testdata/service-mix.yaml(0 hunks)sdl/_testdata/service-mix2.yaml(0 hunks)sdl/_testdata/simple-double-ram.yaml(0 hunks)sdl/_testdata/simple-gpu.yaml(0 hunks)sdl/_testdata/simple-with-ip.yaml(0 hunks)sdl/_testdata/simple.yaml(0 hunks)sdl/_testdata/simple2.yaml(0 hunks)sdl/_testdata/simple3.yaml(0 hunks)sdl/_testdata/simple4.yaml(0 hunks)sdl/_testdata/storageClass1.yaml(0 hunks)sdl/_testdata/storageClass2.yaml(0 hunks)sdl/_testdata/storageClass3.yaml(0 hunks)sdl/_testdata/storageClass4.yaml(0 hunks)sdl/_testdata/storageClass5.yaml(0 hunks)sdl/_testdata/storageClass6.yaml(0 hunks)sdl/_testdata/v2.1-credentials-error.yaml(0 hunks)sdl/_testdata/v2.1-credentials.yaml(0 hunks)sdl/_testdata/v2.1-deployment-svc-mismatch.yaml(0 hunks)sdl/_testdata/v2.1-private_service.yaml(0 hunks)sdl/_testdata/v2.1-profile-svc-name-mismatch.yaml(0 hunks)sdl/_testdata/v2.1-service-mix.yaml(0 hunks)sdl/_testdata/v2.1-service-mix2.yaml(0 hunks)sdl/_testdata/v2.1-simple-gpu.yaml(0 hunks)sdl/_testdata/v2.1-simple-with-ip.yaml(0 hunks)sdl/_testdata/v2.1-simple.yaml(0 hunks)sdl/_testdata/v2.1-simple2.yaml(0 hunks)sdl/_testdata/v2.1-simple3.yaml(0 hunks)sdl/_testdata/v2.1-simple4.yaml(0 hunks)sdl/coin.go(0 hunks)sdl/coin_test.go(0 hunks)sdl/cpu.go(0 hunks)sdl/cpu_test.go(0 hunks)sdl/expose.go(0 hunks)sdl/full_test.go(0 hunks)sdl/gpu.go(0 hunks)sdl/gpu_test.go(0 hunks)sdl/groupBuilder_v2.go(0 hunks)sdl/groupBuilder_v2_1.go(0 hunks)sdl/memory.go(0 hunks)sdl/placement.go(0 hunks)sdl/pricing.go(0 hunks)sdl/resources.go(0 hunks)sdl/sdl.go(0 hunks)sdl/sdl_test.go(0 hunks)sdl/storage.go(0 hunks)sdl/storage_test.go(0 hunks)sdl/units.go(0 hunks)sdl/units_test.go(0 hunks)sdl/util/util.go(0 hunks)sdl/util/util_test.go(0 hunks)sdl/utils.go(0 hunks)sdl/v2.go(0 hunks)sdl/v2_1.go(0 hunks)sdl/v2_1_ip_test.go(0 hunks)sdl/v2_1_test.go(0 hunks)sdl/v2_ip_test.go(0 hunks)sdl/v2_test.go(0 hunks)tests/README.md(1 hunks)tests/e2e/certs_cli_test.go(1 hunks)tests/e2e/certs_grpc_test.go(1 hunks)tests/e2e/cli_test.go(1 hunks)tests/e2e/deployment_cli_test.go(1 hunks)tests/e2e/deployment_grpc_test.go(1 hunks)tests/e2e/grpc_test.go(1 hunks)tests/e2e/market_cli_test.go(1 hunks)tests/e2e/market_grpc_test.go(1 hunks)tests/e2e/provider_cli_test.go(1 hunks)tests/e2e/provider_grpc_test.go(1 hunks)tests/upgrade/config.json(1 hunks)tests/upgrade/test-cases.json(1 hunks)tests/upgrade/test-config-gha.json(1 hunks)tests/upgrade/upgrade_test.go(12 hunks)tests/upgrade/v0.26.0/postupgrade.go(0 hunks)
💤 Files with no reviewable changes (64)
- sdl/placement.go
- sdl/cpu_test.go
- sdl/_testdata/v2.1-service-mix2.yaml
- sdl/_testdata/v2.1-credentials.yaml
- sdl/_testdata/service-mix2.yaml
- sdl/_testdata/simple3.yaml
- app/params/proto.go
- sdl/_testdata/v2.1-simple3.yaml
- sdl/_testdata/simple-gpu.yaml
- sdl/_testdata/storageClass3.yaml
- sdl/sdl_test.go
- sdl/_testdata/profile-svc-name-mismatch.yaml
- sdl/_testdata/storageClass2.yaml
- sdl/coin.go
- sdl/_testdata/simple-double-ram.yaml
- sdl/_testdata/storageClass1.yaml
- sdl/_testdata/v2.1-deployment-svc-mismatch.yaml
- sdl/_testdata/v2.1-private_service.yaml
- sdl/pricing.go
- sdl/_testdata/v2.1-profile-svc-name-mismatch.yaml
- sdl/_testdata/simple.yaml
- app/decorators/gov_filter.go
- sdl/memory.go
- sdl/_testdata/v2.1-simple.yaml
- sdl/_testdata/v2.1-simple2.yaml
- sdl/util/util_test.go
- sdl/resources.go
- sdl/_testdata/v2.1-credentials-error.yaml
- sdl/_testdata/v2.1-simple-with-ip.yaml
- sdl/utils.go
- sdl/_testdata/storageClass6.yaml
- sdl/_testdata/storageClass5.yaml
- sdl/units_test.go
- sdl/util/util.go
- sdl/_testdata/v2.1-simple4.yaml
- sdl/_testdata/storageClass4.yaml
- tests/upgrade/v0.26.0/postupgrade.go
- sdl/_testdata/simple2.yaml
- sdl/_testdata/deployment-svc-mismatch.yaml
- sdl/storage_test.go
- sdl/coin_test.go
- sdl/v2_1.go
- sdl/_testdata/simple-with-ip.yaml
- sdl/full_test.go
- sdl/_testdata/private_service.yaml
- sdl/storage.go
- sdl/cpu.go
- cmd/common/flags.go
- sdl/v2_1_ip_test.go
- sdl/_testdata/service-mix.yaml
- sdl/units.go
- sdl/_testdata/simple4.yaml
- sdl/_testdata/v2.1-service-mix.yaml
- sdl/gpu_test.go
- sdl/expose.go
- sdl/v2_1_test.go
- sdl/v2_test.go
- sdl/_testdata/v2.1-simple-gpu.yaml
- sdl/groupBuilder_v2_1.go
- sdl/gpu.go
- sdl/groupBuilder_v2.go
- sdl/sdl.go
- sdl/v2_ip_test.go
- sdl/v2.go
✅ Files skipped from review due to trivial changes (8)
- .goreleaser-docker.yaml
- tests/upgrade/config.json
- README.md
- pubsub/bus_test.go
- tests/upgrade/test-config-gha.json
- Makefile
- app/option.go
- app/sim/sim_utils.go
🚧 Files skipped from review as they are similar to previous changes (43)
- .env
- docgen/main.go
- make/mod.mk
- cmd/akash/cmd/bech32.go
- .github/workflows/concommits.yaml
- .goreleaser-test-bins.yaml
- meta.json
- cmd/akash/cmd/auth.go
- make/codegen.mk
- make/test-simulation.mk
- .github/.repo
- .goreleaser.yaml
- events/publish_test.go
- events/cmd/root.go
- app/decorators/min_commision.go
- cmd/akash/main.go
- app/app_test.go
- make/test-upgrade.mk
- _docs/adr/adr-001-network-upgrades.md
- app/mac.go
- .envrc
- .mockery.yaml
- make/setup-cache.mk
- cmd/akash/cmd/testnetify/config.go
- make/test-integration.mk
- app/params/config.go
- events/publish.go
- make/releasing.mk
- app/ante.go
- .golangci.yaml
- client/client.go
- .github/actions/setup-ubuntu/action.yaml
- cmd/akash/cmd/testnetify/utils.go
- app/app_configure.go
- app/upgrades.go
- go.mod
- cmd/akash/cmd/genaccounts.go
- make/lint.mk
- events/query.go
- cmd/akash/cmd/flag_test.go
- app/sim/sim_config.go
- cmd/akash/cmd/testnetify/cmt_abci.go
- make/init.mk
🧰 Additional context used
🧬 Code Graph Analysis (4)
app/modules.go (4)
app/app.go (1)
AkashApp(96-106)x/deployment/module.go (5)
AppModule(49-57)AppModule(132-134)AppModule(189-191)AppModule(194-196)NewAppModule(111-129)x/market/module.go (5)
AppModule(48-51)AppModule(133-135)AppModule(187-189)AppModule(192-194)NewAppModule(108-130)x/escrow/module.go (1)
AppModuleSimulation(211-213)
app/testnet.go (4)
cmd/akash/cmd/testnetify/config.go (4)
ConsAddress(42-44)AccAddress(34-36)TestnetValidator(46-58)TestnetConfig(62-68)app/app.go (1)
AkashApp(96-106)upgrades/types/types.go (1)
GetUpgradesList(95-97)app/types/app.go (1)
App(124-135)
app/app.go (5)
app/types/app.go (1)
App(124-135)app/mac.go (2)
ModuleAccountPerms(14-25)ModuleAccountAddrs(27-34)app/app_configure.go (1)
OrderInitGenesis(63-95)app/ante.go (1)
NewAnteHandler(21-61)upgrades/types/types.go (1)
GetHeightPatchesList(99-101)
app/types/app.go (6)
x/deployment/keeper/keeper.go (2)
Keeper(36-44)NewKeeper(47-54)x/escrow/keeper/keeper.go (2)
Keeper(20-38)NewKeeper(40-56)x/take/keeper/keeper.go (2)
Keeper(24-30)NewKeeper(33-39)testutil/log.go (1)
Logger(10-12)testutil/state/suite.go (1)
Keepers(49-58)x/market/hooks/hooks.go (1)
Hooks(13-16)
🪛 LanguageTool
tests/README.md
[style] ~4-~4: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...ts for a standard testing environment. LocalOsmosis comes in two flavors: 1. No initial st...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[uncategorized] ~139-~139: Do not mix variants of the same word (‘pre-configure’ and ‘preconfigure’) within a single text.
Context: ...osis Accounts and Keys LocalOsmosis is pre-configured with one validator and 9 accounts with ...
(EN_WORD_COHERENCY)
[style] ~152-~152: This is not the usual sequence for adjectives that have no special emphasis.
Context: ... | `index light average senior silent limit usual local involve...
(EN_ADJ_ORDER)
🪛 markdownlint-cli2 (0.17.2)
tests/README.md
124-124: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
134-134: Bare URL used
(MD034, no-bare-urls)
134-134: Bare URL used
(MD034, no-bare-urls)
CHANGELOG.md
41-41: Bare URL used
(MD034, no-bare-urls)
🪛 actionlint (1.7.7)
.github/workflows/release.yaml
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)
52-52: description is required in metadata of "setup-ubuntu" action at "/home/jailuser/git/.github/actions/setup-ubuntu/action.yaml"
(action)
.github/workflows/tests.yaml
98-98: description is required in metadata of "setup-ubuntu" action at "/home/jailuser/git/.github/actions/setup-ubuntu/action.yaml"
(action)
178-178: shellcheck reported issue in this script: SC2086:info:2:40: Double quote to prevent globbing and word splitting
(shellcheck)
⏰ 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). (8)
- GitHub Check: lint-shell
- GitHub Check: lint-go
- GitHub Check: coverage
- GitHub Check: network-upgrade-names
- GitHub Check: release-dry-run
- GitHub Check: tests
- GitHub Check: sims
- GitHub Check: build-bins
🔇 Additional comments (41)
tests/e2e/cli_test.go (2)
14-14: Global test constant is well-defined.The
DefaultDepositconstant provides a sensible default for integration tests and is appropriately scoped to the test package.
16-33: Sequential test execution is appropriate for integration tests.The test function properly initializes each integration test suite with the shared
NetworkTestSuiteand executes them sequentially. This approach is suitable for integration tests that may share network resources or have interdependencies.tests/e2e/grpc_test.go (1)
13-30: Consistent test architecture with CLI tests.The gRPC test suite follows the same well-established pattern as the CLI tests, with proper initialization of each test suite using the shared
NetworkTestSuiteinfrastructure. Sequential execution ensures proper resource management for integration tests..github/workflows/release.yaml (3)
15-18: Good consolidation with composite action.Using the
.github/actions/setup-ubuntucomposite action reduces duplication and centralizes environment setup logic across workflows.
45-48: Proper cleanup before checkout.The cleanup steps ensure a clean environment by removing both visible and hidden files before checkout, which is good practice for self-hosted runners.
74-74: More specific artifact collection.Narrowing the artifact path to
.akash*.logfiles reduces noise and focuses on relevant log files for debugging.tests/upgrade/test-cases.json (2)
2-13: Major version upgrade properly configured.The upgrade from v0.38.0 to v1.0.0 correctly reflects the architectural changes, including the removal of custom Akash modules (
agov,astaking,crisis) and addition of standard Cosmos SDK modules (07-tendermint,consensus). This aligns with the modernization to Cosmos SDK v0.50+.
14-173: Comprehensive migration paths defined.The migration configurations cover all necessary modules with detailed version transitions. The granular migration steps (e.g., auth: 2→3→4→5) ensure proper state transitions during the upgrade process.
tests/e2e/provider_cli_test.go (1)
21-107: Comprehensive provider lifecycle testing.This test provides excellent coverage of provider functionality:
- Creates provider from YAML configuration
- Validates provider creation through queries
- Tests provider updates with different configuration
- Includes proper error handling and network synchronization
- Uses appropriate JSON unmarshaling for response validation
The test structure follows Go testing best practices and ensures the provider CLI commands work correctly end-to-end.
tests/e2e/certs_grpc_test.go (2)
19-22: LGTM!The test suite structure is clean and follows the established pattern for integration tests.
24-73: Well-structured certificate lifecycle test!The test comprehensively covers certificate generation, publication, and retrieval with proper validation of PEM encoding and issuer information.
tests/e2e/market_grpc_test.go (4)
25-209: Comprehensive test setup covering the full market lifecycle!The SetupSuite method properly orchestrates the creation of all necessary entities (certificates, deployments, providers, orders, bids, leases) with appropriate blockchain confirmations between operations.
211-276: Well-structured order query tests with good coverage!The test cases appropriately cover various filter combinations including error scenarios.
278-342: Thorough individual order query testing!Good coverage of edge cases including empty input, invalid parameters, and non-existent orders.
344-632: Consistent and comprehensive bid and lease query tests!All test functions maintain the same high quality with thorough coverage of query scenarios, filters, and error cases.
app/config.go (1)
3-41: Module configuration properly updated for SDK v0.50 and IBC v8!The imports and basic module setup correctly use the new cosmossdk.io package structure and IBC v8 modules. The capability module is properly included.
tests/e2e/provider_grpc_test.go (2)
25-68: Clean provider setup with proper validation!The SetupSuite correctly creates and validates a provider for subsequent tests.
70-112: Well-structured provider list query tests!Good coverage of pagination scenarios with appropriate validations.
tests/upgrade/upgrade_test.go (7)
401-403: Good fix for the RPC error with auto gas.The change from auto to a fixed gas limit of 500000 is appropriate given the RPC error. The comment clearly explains the reason for the change.
493-494: Appropriate test environment configuration.Adding GRPC RPC address configuration and disabling P2P peer exchange are good practices for test environments.
Also applies to: 505-505
715-718: Good use of SDK math library for parsing.Using
sdkmath.NewIntFromStringis more consistent with the SDK patterns and provides better error handling than manual string parsing.
877-888: Excellent error handling and debugging improvements.The additions improve observability:
- Stack trace capture on panic aids debugging
- Error logging ensures visibility
- Proper error propagation maintains error chain
1164-1164: Improved error message formatting.The newline in the error message improves readability when displaying migration version mismatches.
1211-1211: Smart timeout adjustment for block production.The progressive timeout reduction (180 minutes initially, then 20 minutes after 3 blocks) accommodates slow initial block production while maintaining responsiveness once the chain stabilizes.
Also applies to: 1237-1239
1299-1301: Critical regex validation improvements.The added validation prevents runtime panics from invalid regex matches and provides clear error messages for debugging. This is essential for test stability.
Also applies to: 1308-1311
tests/e2e/deployment_grpc_test.go (1)
97-161: Well-structured test implementation.The table-driven test approach with comprehensive coverage of filter combinations is excellent.
tests/e2e/deployment_cli_test.go (3)
39-123: Well-designed test setup with proper account initialization.The setup correctly creates and funds test accounts, and properly generates client certificates for the deployer.
274-348: Good test coverage for group operations.The test properly validates group lifecycle including closure and state verification.
350-542: Excellent test coverage for funded deployment scenarios.The test thoroughly validates authorization flows, balance deductions, and refunds. The helper method properly extracts account balances.
cmd/akash/cmd/app_creator.go (2)
108-143: Well-implemented app export with proper error handling.The method correctly validates inputs and handles edge cases for height-specific exports.
147-162: Robust testnet app initialization with proper type checking.Good use of type assertions with clear panic messages for debugging.
script/upgrades.sh (1)
345-456: Well-structured state preparation function.The new
prepare_statefunction effectively modularizes the state initialization process with proper handling of genesis files and snapshots.app/sim_test.go (1)
294-299: Clarify commented IBC host store comparisonThe IBC host store comparison is commented out. If this is intentional (e.g., due to non-deterministic state), consider adding a comment explaining why. Otherwise, uncomment it to ensure complete store comparison:
- //{ - // ibchost.StoreKey, - // appA, - // appB, - // [][]byte{}, - //}, + // TODO: IBC host store comparison disabled due to [reason] + // { + // ibchost.StoreKey, + // appA, + // appB, + // [][]byte{}, + // },cmd/akash/cmd/root.go (1)
37-39: LGTM: Modernized encoding config setupThe transition from
app.MakeEncodingConfig()tosdkutil.MakeEncodingConfig()with explicit interface registration aligns well with the SDK 0.50+ upgrade pattern.cmd/akash/cmd/testnetify/testnetify.go (2)
170-178: Good implementation of graceful shutdownThe context-based shutdown mechanism with errgroup properly handles signal propagation and cleanup, which is essential for the testnetify process.
396-411: Review Complete:NewCometABCIWrapperCovers All Required MethodsI’ve reviewed
cmd/akash/cmd/testnetify/cmt_abci.goand confirmed thatNewCometABCIWrapperimplements and forwards every CometBFT v1 ABCI method to the underlyingservertypes.ABCIapplication. No missing methods or signature mismatches were found..github/workflows/tests.yaml (1)
46-49: LGTM: Consolidated environment setupThe replacement of manual dependency installation with the
./.github/actions/setup-ubuntucomposite action successfully reduces duplication and maintenance overhead across jobs.app/types/app.go (2)
90-122: Well-structured keeper organizationThe separation of Cosmos SDK keepers and Akash-specific keepers into nested structs improves code organization and maintainability. The use of pointer types for key keepers is appropriate for the SDK upgrade.
475-497: Proper hook registration patternThe
SetupHooksmethod correctly registers hooks for staking, governance, and escrow modules, following the standard Cosmos SDK pattern for inter-module communication.app/app.go (2)
96-106: Clean app structure with embedded typesThe new
AkashAppstructure with embedded*baseapp.BaseAppand*apptypes.Appprovides good separation of concerns and aligns with the SDK 0.50+ patterns.
371-382: Good error handling in InitChainerThe explicit error handling for module version map setting and the updated ABCI response type align well with the SDK 0.50+ upgrade patterns.
cmd/akash/cmd/genesis.go
Outdated
| }, | ||
| { | ||
| Denom: appparams.HumanCoinUnit, | ||
| Exponent: appparams.OsmoExponent, |
There was a problem hiding this comment.
Remove remaining Osmosis references.
The code contains additional Osmosis references that should be updated to Akash.
- Line 215 uses
appparams.OsmoExponent- verify if this constant name should beAkashExponent - Line 267 comment mentions "1 OSMO" but should be "1 AKT" or "1 AKASH"
- sdkmath.NewInt(1000000), // 1 OSMO
+ sdkmath.NewInt(1000000), // 1 AKTAlso applies to: 267-267
🤖 Prompt for AI Agents
In cmd/akash/cmd/genesis.go at line 215, replace the Osmosis-specific constant
appparams.OsmoExponent with the corresponding Akash-specific constant, likely
named appparams.AkashExponent. Also, at line 267, update the comment from "1
OSMO" to "1 AKT" or "1 AKASH" to reflect the correct token name. Ensure all
Osmosis references are replaced with Akash equivalents consistently.
| WithFrom(certTestHost). | ||
| WithFrom(s.WalletForTest().String()). | ||
| WithGasAutoFlags(). | ||
| WithSkipConfirm(). | ||
| WithBroadcastModeBlock()..., |
There was a problem hiding this comment.
Fix duplicate WithFrom calls in test flags.
The test calls WithFrom twice, which would overwrite the first value. The first call should likely be a different flag method.
For example, in line 153, it appears the first WithFrom(certTestHost) should probably be With(certTestHost) to specify the certificate host:
cli.TestFlags().
- WithFrom(certTestHost).
+ With(certTestHost).
WithFrom(s.WalletForTest().String()).Also applies to: 210-211, 223-224
🤖 Prompt for AI Agents
In tests/e2e/certs_cli_test.go around lines 153 to 157, the test code calls
WithFrom twice, causing the first call to be overwritten. Replace the first
WithFrom(certTestHost) call with With(certTestHost) to correctly specify the
certificate host without overwriting the sender address. Apply the same fix to
similar duplicate WithFrom calls at lines 210-211 and 223-224.
| // func (s *GRPCRestTestSuite) TestGetCertificates() { | ||
| // val := s.network.Validators[0] | ||
| // certs := s.certs | ||
| // | ||
| // testCases := []struct { | ||
| // name string | ||
| // url string | ||
| // expErr bool | ||
| // expResp types.CertificatesResponse | ||
| // expLen int | ||
| // }{ | ||
| // { | ||
| // "get certificates without filters", | ||
| // fmt.Sprintf("%s/akash/cert/%s/certificates/list", val.APIAddress, atypes.ProtoAPIVersion), | ||
| // false, | ||
| // certs, | ||
| // 1, | ||
| // }, | ||
| // } | ||
| // | ||
| // for _, tc := range testCases { | ||
| // tc := tc | ||
| // s.Run(tc.name, func() { | ||
| // resp, err := sdkrest.GetRequest(tc.url) | ||
| // s.Require().NoError(err) | ||
| // | ||
| // var certs types.QueryCertificatesResponse | ||
| // err = val.ClientCtx.Codec.UnmarshalJSON(resp, &certs) | ||
| // | ||
| // if tc.expErr { | ||
| // s.Require().NotNil(err) | ||
| // s.Require().Empty(certs.Certificates) | ||
| // } else { | ||
| // s.Require().NoError(err) | ||
| // s.Require().Len(certs.Certificates, tc.expLen) | ||
| // s.Require().Equal(tc.expResp, certs.Certificates) | ||
| // } | ||
| // }) | ||
| // } | ||
| // } |
There was a problem hiding this comment.
🛠️ Refactor suggestion
Address the commented-out REST API test.
This commented-out test function appears to be incomplete REST API testing code. Consider either:
- Completing the implementation if REST API testing is needed
- Removing it entirely to avoid confusion
The current state with incomplete URL formatting and commented code reduces code clarity.
Would you like me to help complete the REST API test implementation or create an issue to track this work?
🤖 Prompt for AI Agents
In tests/e2e/certs_grpc_test.go around lines 75 to 114, there is a commented-out
REST API test function that is incomplete and contains unclear URL formatting.
To fix this, either fully implement the test by correcting the URL formatting
and ensuring the test logic is complete and functional, or remove the entire
commented-out block to improve code clarity and avoid confusion.
| out := &v1beta4.QueryDeploymentsResponse{} | ||
| err = val.ClientCtx.Codec.UnmarshalJSON(resp.Bytes(), out) | ||
| s.Require().NoError(err) | ||
| s.Require().Len(out.Deployments, 1, "Cert Create Failed") |
There was a problem hiding this comment.
Fix misleading error message in deployment assertion.
The error message references certificate creation but this assertion is checking deployment creation.
- s.Require().Len(out.Deployments, 1, "Cert Create Failed")
+ s.Require().Len(out.Deployments, 1, "Deployment Create Failed")📝 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.
| s.Require().Len(out.Deployments, 1, "Cert Create Failed") | |
| s.Require().Len(out.Deployments, 1, "Deployment Create Failed") |
🤖 Prompt for AI Agents
In tests/e2e/deployment_grpc_test.go at line 90, the error message "Cert Create
Failed" is misleading because the assertion is checking the number of
deployments, not certificate creation. Update the error message to accurately
reflect the deployment creation check, such as "Deployment creation failed" or a
similar relevant message.
| "get deployment with empty input", | ||
| fmt.Sprintf("%s/akash/deployment/v1beta4/deployments/info", val.APIAddress), | ||
| true, |
There was a problem hiding this comment.
🛠️ Refactor suggestion
Maintain consistency in API version usage.
Use v1beta4.GatewayVersion instead of hardcoding "v1beta4" in the URL for consistency with other test cases.
- fmt.Sprintf("%s/akash/deployment/v1beta4/deployments/info", val.APIAddress),
+ fmt.Sprintf("%s/akash/deployment/%s/deployments/info", val.APIAddress, v1beta4.GatewayVersion),📝 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.
| "get deployment with empty input", | |
| fmt.Sprintf("%s/akash/deployment/v1beta4/deployments/info", val.APIAddress), | |
| true, | |
| "get deployment with empty input", | |
| fmt.Sprintf("%s/akash/deployment/%s/deployments/info", val.APIAddress, v1beta4.GatewayVersion), | |
| true, |
🤖 Prompt for AI Agents
In tests/e2e/deployment_grpc_test.go around lines 174 to 176, the API version
"v1beta4" is hardcoded in the URL string. Replace the hardcoded "v1beta4" with
the constant v1beta4.GatewayVersion to maintain consistency with other test
cases and avoid duplication of version strings.
| }{ | ||
| { | ||
| "get group with empty input", | ||
| fmt.Sprintf("%s/akash/deployment/v1beta4/groups/info", val.APIAddress), |
There was a problem hiding this comment.
🛠️ Refactor suggestion
Use GatewayVersion constant consistently across all test URLs.
Replace hardcoded "v1beta4" with v1beta4.GatewayVersion for better maintainability.
- fmt.Sprintf("%s/akash/deployment/v1beta4/groups/info", val.APIAddress),
+ fmt.Sprintf("%s/akash/deployment/%s/groups/info", val.APIAddress, v1beta4.GatewayVersion),Apply similar changes to lines 244, 251, and 259.
Also applies to: 244-244, 251-251, 259-259
🤖 Prompt for AI Agents
In tests/e2e/deployment_grpc_test.go at lines 238, 244, 251, and 259, replace
the hardcoded version string "v1beta4" in the URL paths with the constant
v1beta4.GatewayVersion. This ensures consistent use of the GatewayVersion
constant across all test URLs for better maintainability. Update the fmt.Sprintf
calls accordingly to use the constant instead of the string literal.
Signed-off-by: Artur Troian <troian@users.noreply.github.com>
There was a problem hiding this comment.
Actionable comments posted: 4
🔭 Outside diff range comments (1)
script/upgrades.sh (1)
137-156: Typo in archive pattern (*.tar.cz*) and incomplete extraction map
.tar.czis not a recognised extension (looks like.tar.xzwas intended).
Relying on the wrong pattern silently skips thexzbranch and falls back to the generic handler, breaking extraction for.tar.xzpayloads. Add the correct pattern and keep the existing-xJflag which handlesxz.- *.tar.cz*) - tar_cmd="tar -xJ -" + *.tar.xz*) + tar_cmd="tar -xJ -"Consider also wiring in the common short aliases (
*.tgz,*.txz) for robustness.
♻️ Duplicate comments (9)
script/upgrades.sh (2)
126-128: Still no error handling for failed chain-metadata fetch/parsingThe
curl+jqsequence is executed without checking exit codes or validating the JSON payload. A transient network hiccup or malformed JSON will propagate undefined variables downstream and break the script later on.
389-396: Archive extension string still fed toevalas a shell commandPrevious feedback pointed out that
tar_cmdmust be produced bytar_by_content_type, notcontent_type, otherwiseevalreceives something liketar.gzinstead oftar xzf -.The block remains unchanged and will fail at runtime.
- tar_cmd=$(content_type "$(content_name "${GENESIS_URL}")") + tar_cmd=$(tar_by_content_type "$(content_name "${GENESIS_URL}")")app/modules.go (2)
145-147: Consider migrating away from the deprecated params moduleThe
params.NewAppModuleis deprecated and will be removed in the next Cosmos SDK major release. Plan for migration to avoid breaking changes.
234-240: Remove duplicate authzmodule initializationThe
authzmodule.NewAppModuleis initialized twice in theappSimModulesfunction. Remove this duplicate initialization.- authzmodule.NewAppModule( - app.cdc, - app.Keepers.Cosmos.Authz, - app.Keepers.Cosmos.Acct, - app.Keepers.Cosmos.Bank, - app.interfaceRegistry, - ),cmd/akash/cmd/testnetify/testnetify.go (1)
74-75: Fix example and argument validation mismatchThe command requires exactly one argument (
cobra.ExactArgs(1)) but the example shows usage without any arguments. This inconsistency should be resolved.- Example: "testnetify", + Example: "testnetify <chain-id>",app/types/app.go (1)
196-259: Consider adding parameter validation as previously suggested.The
InitSpecialKeepersmethod lacks validation for critical input parameters, which was pointed out in a previous review. Adding nil checks would improve robustness and provide fail-fast behavior.The implementation properly initializes core keepers in the correct order:
- Params keeper
- Consensus params keeper
- Capability keeper with proper sealing
- Crisis and Upgrade keepers
app/app.go (3)
175-175: Remove usage of deprecated flag.The
crisis.FlagSkipGenesisInvariantsflag is deprecated and will be removed in the next major Cosmos SDK release.
207-207: Remove deprecated RegisterInvariants call.The
MM.RegisterInvariantsfunction is deprecated and is a no-op in the current SDK version.
534-537: Consider a cleaner approach for ChainID access.Using reflection to access private fields is fragile and may break with SDK updates.
🧹 Nitpick comments (4)
app/sim_test.go (1)
481-483: Clean up empty conditional blockThe empty if block for verbose logging should either be removed or properly implemented with the intended logging functionality.
- if sim.FlagVerboseValue { - //logger = log.TestingLogger() - } else { + if sim.FlagVerboseValue { + logger = log.TestingLogger() + } else {Or remove entirely if verbose logging is not needed:
- if sim.FlagVerboseValue { - //logger = log.TestingLogger() - } else { - logger = log.NewNopLogger() - } + logger = log.NewNopLogger()tests/upgrade/test-cases.json (3)
21-26: Formatting glitch makes the JSON diff noisyThe closing brace and next object opener sit on the same line (
"}, {").
Split them onto dedicated lines to restore standard pretty-print formatting:- }, { + }, + {
124-133: Duplicate version numbers can break the on-chain version map
slashinglists two independent objects:
- 2 → 3
- 3 → 4
That is correct, but make sure there is no previous 2 → 3 migration already executed on mainnet, otherwise the upgrader will refuse to re-run it. If this file is reused across multiple network upgrades, you may need a separate test-case per height instead of stacking them in one.
154-166: Apply the same formatting fix as above for thetransfersectionThe line containing
"}, {should be split for readability.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
go.sumis excluded by!**/*.sum
📒 Files selected for processing (14)
app/app.go(7 hunks)app/config.go(2 hunks)app/modules.go(1 hunks)app/sim_test.go(5 hunks)app/types/app.go(3 hunks)cmd/akash/cmd/genesis.go(1 hunks)cmd/akash/cmd/root.go(5 hunks)cmd/akash/cmd/testnetify/testnetify.go(11 hunks)go.mod(1 hunks)make/test-upgrade.mk(3 hunks)meta.json(1 hunks)script/upgrades.sh(10 hunks)tests/upgrade/test-cases.json(1 hunks)tests/upgrade/upgrade_test.go(12 hunks)
🚧 Files skipped from review as they are similar to previous changes (5)
- meta.json
- make/test-upgrade.mk
- tests/upgrade/upgrade_test.go
- go.mod
- cmd/akash/cmd/genesis.go
🧰 Additional context used
🧬 Code Graph Analysis (2)
app/types/app.go (4)
x/escrow/keeper/keeper.go (2)
Keeper(20-38)NewKeeper(40-56)x/take/keeper/keeper.go (2)
Keeper(24-30)NewKeeper(33-39)testutil/state/suite.go (1)
Keepers(49-58)x/market/hooks/hooks.go (1)
Hooks(13-16)
app/modules.go (4)
app/app.go (1)
AkashApp(96-106)x/market/module.go (5)
AppModule(48-51)AppModule(133-135)AppModule(187-189)AppModule(192-194)NewAppModule(108-130)x/deployment/module.go (5)
AppModule(49-57)AppModule(132-134)AppModule(189-191)AppModule(194-196)NewAppModule(111-129)x/escrow/module.go (1)
AppModuleSimulation(211-213)
🪛 golangci-lint (2.2.2)
app/app.go
175-175: SA1019: crisis.FlagSkipGenesisInvariants is deprecated: this flag is no longer used and will be removed along with x/crisis in the next major Cosmos SDK release.
(staticcheck)
207-207: SA1019: app.MM.RegisterInvariants is deprecated: this function is a no-op and will be removed in the next release of the Cosmos SDK.
(staticcheck)
app/sim_test.go
[warning] 481-481: empty-block: this block is empty, you can remove it
(revive)
app/modules.go
[warning] 48-48: unused-parameter: parameter 'skipGenesisInvariants' seems to be unused, consider removing or renaming it as _
(revive)
145-145: SA1019: params.NewAppModule is deprecated: the params module is deprecated and will be removed in the next Cosmos SDK major release.
(staticcheck)
279-279: SA1019: params.NewAppModule is deprecated: the params module is deprecated and will be removed in the next Cosmos SDK major release.
(staticcheck)
⏰ 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). (9)
- GitHub Check: release-dry-run
- GitHub Check: network-upgrade-names
- GitHub Check: sims
- GitHub Check: lint-shell
- GitHub Check: coverage
- GitHub Check: lint-go
- GitHub Check: tests
- GitHub Check: build-bins
- GitHub Check: build-macos
🔇 Additional comments (37)
script/upgrades.sh (1)
159-176:content_type()leaks confusing naming & shadowingThis helper is meant to return an extension string, but the local variable is still called
tar_cmd, which shadows the variable of the same name used for real shell commands intar_by_content_type(). This increases the risk of future copy-paste errors (see usage below).-case "$1" in - *.tar.gz*) - tar_cmd="tar.gz" +case "$1" in + *.tar.gz*) + ext="tar.gz" ... -esac - -echo "$tar_cmd" +esac + +echo "$ext"[ suggest_optional_refactor ]
app/config.go (2)
4-28: LGTM: Import modernization aligns with SDK upgradeThe import updates correctly migrate from legacy Cosmos SDK v4 paths to newer
cosmossdk.iomodules and IBC v8, which is consistent with the broader dependency upgrade to Cosmos SDK v0.50+ and CometBFT v0.37+.
37-37: LGTM: Updated genutil initialization patternThe use of
genutiltypes.DefaultMessageValidatorparameter aligns with the updated Cosmos SDK v0.50+ initialization patterns.app/modules.go (1)
45-196: LGTM: Well-organized module initializationThe
appModulesfunction provides a clean, centralized approach to module initialization. The separation between Cosmos SDK modules and Akash-specific modules improves maintainability, and the consistent use of keepers and encoding config throughout is well-structured.app/sim_test.go (2)
1-48: LGTM: Simulation test modernizationThe package rename to
app_testfollows Go testing best practices, and the import updates correctly migrate from Tendermint to CometBFT and use updated Cosmos SDK modules, aligning with the broader dependency upgrade.
105-107: LGTM: Updated encoding configuration setupThe explicit creation of encoding config and registration of module interfaces properly adapts the simulation tests to the new SDK patterns.
cmd/akash/cmd/root.go (3)
37-39: LGTM: Improved encoding configuration managementThe updated function signature that returns the encoding config along with the root command improves modularity. The use of
sdkutil.MakeEncodingConfig()and explicit interface registration aligns with the modern SDK patterns.
129-143: LGTM: Enhanced command setup with modern patternsThe updated command initialization properly uses the new CLI patterns with encoding options, and the addition of pruning and snapshot commands improves the CLI's functionality.
94-114: LGTM: Enhanced context management and flag consistencyThe new
ExecuteWithCtxfunction provides better context management for the CLI, and the use ofcflagsconstants ensures consistent flag handling across the application.cmd/akash/cmd/testnetify/testnetify.go (3)
15-42: LGTM: Comprehensive modernization to CometBFT and Cosmos DBThe import updates correctly migrate from Tendermint to CometBFT and switch to the newer cosmos-db backend, aligning with the broader technology stack upgrade in the pull request.
156-178: LGTM: Enhanced server configuration and lifecycle managementThe addition of server configuration validation, telemetry setup, and structured context management with error groups significantly improves the robustness of the testnetify command's server lifecycle.
276-328: LGTM: Proper migration to CometBFT genesis and state handlingThe updated genesis file handling using
genutiltypes.AppGenesisFromFileand the CometBFT state store initialization correctly adapt the testnetify functionality to the new technology stack while maintaining proper validation and configuration.app/types/app.go (10)
7-7: Import of sync package indicates thread-safe initialization.The addition of the
syncpackage import supports the lazy initialization pattern used for store keys withsync.Once, which is a good practice for ensuring thread-safe initialization.
9-82: Import reorganization aligns with Cosmos SDK v0.50+ modernization.The imports have been comprehensively updated to use:
- CosmosSDK v0.50+ modules with new import paths
- CometBFT instead of Tendermint
- IBC-go v8 modules
- Updated Akash module paths to
pkg.akt.dev/nodeThis aligns well with the SDK upgrade objectives mentioned in the PR.
84-86: AccountAddressPrefix constant provides centralized configuration.Good practice to define the address prefix as a constant for consistent usage across the application.
90-122: AppKeepers restructuring improves organization and type safety.The restructuring groups keepers logically:
- Cosmos SDK keepers under
Cosmosstruct- Akash-specific keepers under
AkashstructKey keepers are now pointer types (
*govkeeper.Keeper,*crisiskeeper.Keeper, etc.), which is consistent with the newer SDK patterns and allows for proper nil checking.
124-135: App struct extended with proper logging and store key management.The addition of:
Log log.Loggerfor structured logging- Store key maps with lazy initialization using
sync.Once- Proper separation of KV, transient, and memory store keys
This follows modern Cosmos SDK patterns and improves maintainability.
137-149: Store key generation with thread-safe lazy initialization.The
GenerateKeysmethod usessync.Onceto ensure store keys are initialized only once in a thread-safe manner. This is a solid pattern for avoiding race conditions during concurrent access.
151-194: Store key accessor methods provide clean API.The getter methods for store keys are well-structured:
- Clear method names and documentation
- Proper return types
- Testing-specific methods clearly marked with comments
261-473: Comprehensive keeper initialization with proper dependencies.The
InitNormalKeepersmethod correctly initializes all keepers with their dependencies:
- Proper codec and store service usage
- Correct authority addresses using
govtypes.ModuleName- Address codec configuration for different address types
- IBC router setup with transfer module
- Akash-specific keeper initialization with proper dependencies
The governance configuration with increased metadata length (10,200) is appropriately documented.
475-497: Hook setup correctly registers module interactions.The hook registration follows the correct pattern:
- Staking hooks for distribution and slashing
- Empty governance hooks (prepared for future use)
- Market hooks properly connected to escrow events
499-577: Parameter keeper initialization and store key definitions are comprehensive.The
initParamsKeeperfunction properly sets up parameter subspaces for all modules, including both Cosmos SDK and Akash-specific modules.The store key helper functions provide clear separation between:
- General KV store keys
- Akash-specific keys
- Transient and memory store keys
app/app.go (14)
9-9: Reflection import indicates fragile implementation.The addition of the
reflectpackage import is used for theChainID()method implementation, which accesses private BaseApp fields. This was flagged in previous reviews as fragile and should be addressed.
15-79: Import modernization aligns with SDK upgrade objectives.The imports have been updated to use:
- CometBFT instead of Tendermint APIs
- Cosmos SDK v0.50+ with new module paths
- IBC-go v8 modules
- Updated Akash module paths
This comprehensive import reorganization supports the SDK upgrade to v0.50+.
96-106: AkashApp struct modernization with proper embedding.The struct now properly embeds:
*baseapp.BaseAppfor core ABCI functionality*apptypes.Appfor custom app functionality- Updated field types using
sdkutil.EncodingConfigThis follows modern Cosmos SDK patterns and improves type safety.
116-147: Constructor updated with modern encoding configuration.The constructor now:
- Uses
sdkutil.EncodingConfiginstead of separate codec parameters- Properly extracts individual components (codec, amino, tx config)
- Sets up BaseApp with correct decoder and encoder
149-171: Modular keeper initialization with documented timing issue.The initialization properly calls the new modular methods:
InitSpecialKeepersfor core infrastructure keepersInitNormalKeepersfor application keepersSetupHooksafter keeper initializationThe TODO comment acknowledges the governance router timing issue identified in previous reviews, but this was reportedly addressed in a later commit.
186-213: Module manager setup with proper service registration.The module manager is now created from the
appModulesfunction with:
- Proper module ordering for BeginBlock and InitGenesis
- Service registration through the new Configurator
- Error handling for service registration
286-347: Module ordering functions provide clear dependency management.The
orderBeginBlockersandOrderEndBlockersfunctions explicitly define the execution order for modules, replacing previous hardcoded orders. This improves maintainability and makes dependencies clear.
371-382: InitChainer updated with modern ABCI signature.The method signature now properly uses
*abci.RequestInitChainand returns(*abci.ResponseInitChain, error), aligning with CometBFT ABCI interface changes.
384-395: PreBlocker implementation with infinite gas meter.The new
PreBlockermethod properly:
- Uses infinite gas meter for non-deterministic operations
- Implements the new ABCI lifecycle hook
- Returns appropriate response type
398-424: ABCI lifecycle methods updated with modern signatures.All ABCI methods now return appropriate error types:
BeginBlockerreturns(sdk.BeginBlock, error)EndBlockerreturns(sdk.EndBlock, error)- New lifecycle hooks
PrecommitterandPrepareCheckStateradded
476-513: API route registration modernized.The route registration has been updated to use:
cmtserviceinstead of deprecated Tendermint service- New node service registration
- Updated grpc-gateway routes
523-523: Swagger route fix with proper prefix.The addition of
/static/prefix route ensures proper swagger static file serving.
540-552: Reflection service caching improves performance.The cached reflection service pattern avoids creating multiple instances during tests, which is a good optimization.
554-565: NewProposalContext provides safe query context.The method creates a proper branched context for proposal processing with:
- Cache multistore for safe querying
- Infinite gas meter for proposal validation
- Proper consensus parameters
tests/upgrade/test-cases.json (1)
2-3: Preserve historical test-case entries instead of replacing them outrightBy overwriting the previous
v0.38.0entry withv1.0.0, we lose automated regression coverage for the older upgrade path. Unless the test harness explicitly loads earlier JSON snapshots from a different location, consider keeping the old block and appending the new one so that both upgrade scenarios remain testable.
| []govclient.ProposalHandler{ | ||
| paramsclient.ProposalHandler, | ||
| // distrclient.ProposalHandler, | ||
| //upgradeclient.LegacyProposalHandler, | ||
| //upgradeclient.LegacyCancelProposalHandler, | ||
| //ibcclient.UpdateClientProposalHandler, | ||
| //ibcclient.UpgradeProposalHandler, | ||
| }, |
There was a problem hiding this comment.
💡 Verification agent
🧩 Analysis chain
Verify governance proposal handler restrictions are intentional
The governance proposal handlers have been significantly restricted to only paramsclient.ProposalHandler, with distribution, upgrade, and IBC client proposal handlers commented out. This reduces governance functionality and may impact the ability to perform certain on-chain operations.
Please confirm this restriction is intentional and document the rationale. If these proposal types are still needed, they should be restored with updated imports.
🏁 Script executed:
#!/bin/bash
# Description: Check if restricted proposal handlers are used elsewhere in the codebase
# Expected: Find usage patterns that might be affected
echo "Searching for usage of commented proposal handlers:"
rg -A 3 -B 3 "distrclient\.ProposalHandler|upgradeclient\..*ProposalHandler|ibcclient\..*ProposalHandler"
echo -e "\nSearching for governance proposal submissions:"
rg -A 5 -B 5 "SubmitProposal|MsgSubmitProposal"Length of output: 1543
Add documentation for disabled governance proposal handlers
I’ve searched the entire codebase for distrclient.ProposalHandler, upgradeclient.*ProposalHandler, ibcclient.*ProposalHandler, as well as any MsgSubmitProposal or SubmitProposal calls and found no remaining references. It appears the removal of distribution, upgrade and IBC client proposal handlers is intentional.
• No usage of the commented-out proposal handlers elsewhere
• No on-chain governance submissions detected
Please add a comment above the handler list in app/config.go (lines 49–56) explaining why distr, upgrade and IBC client proposals are disabled, and reference any upgrade or security rationale.
🤖 Prompt for AI Agents
In app/config.go around lines 49 to 56, add a comment above the list of
governance proposal handlers explaining why the distrclient, upgradeclient, and
ibcclient proposal handlers are commented out and disabled. The comment should
clarify that these handlers are intentionally removed due to no usage or
on-chain governance submissions, and include any relevant upgrade or security
rationale for disabling them to provide clear context for future maintainers.
Signed-off-by: Artur Troian <troian@users.noreply.github.com>
There was a problem hiding this comment.
Actionable comments posted: 2
🔭 Outside diff range comments (1)
script/upgrades.sh (1)
138-157: Typo in archive extension – should be.tar.xz, not.tar.cz
Bothtar_by_content_typeandcontent_typematch on the non-existent.tar.czextension, so.tar.xzarchives will fall through to the generic handler and fail for compressed input.- *.tar.cz*) - tar_cmd="tar -xJ -" + *.tar.xz*) + tar_cmd="tar -xJ -"Apply the same correction inside
content_type.
♻️ Duplicate comments (2)
script/upgrades.sh (2)
127-129: Previous error-handling concern still unresolved
Thecurl/jqpipeline has no failure checks, so a network glitch or malformed JSON will silently propagate empty variables downstream.
390-397: Extraction still uses the wrong helper – archives won’t unpack
You’re assigningtar_cmd=$(content_type ...)which only returns a string like
tar.gz, yet you later execute it witheval.
This is the exact bug flagged in the previous review; usetar_by_content_typeinstead.- tar_cmd=$(content_type "$(content_name "${GENESIS_URL}")") + tar_cmd=$(tar_by_content_type "$(content_name "${GENESIS_URL}")")
🧹 Nitpick comments (2)
script/upgrades.sh (2)
160-176: Nit: marktar_cmdas local to avoid global leakage
Declare the variable local insidecontent_type; otherwise the globaltar_cmdmay be polluted and reused accidentally.-function content_type() { - case "$1" in +function content_type() { + local tar_cmd + case "$1" in
205-206: Header case sensitivity may break redirect detection
wget --server-responseprintsLocation:with a capitalL. The currentgrep "location:"is case-sensitive and will usually miss it.- name=$(wget "$1" --spider --server-response -O - 2>&1 | grep "location:" | awk '{print $2}' | tr -d '\n') + name=$(wget "$1" --spider --server-response -O - 2>&1 | grep -i "location:" | awk '{print $2}' | tr -d '\n')
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
script/upgrades.sh(11 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). (7)
- GitHub Check: lint-go
- GitHub Check: coverage
- GitHub Check: tests
- GitHub Check: release-dry-run
- GitHub Check: lint-shell
- GitHub Check: sims
- GitHub Check: build-bins
| echo "Unpacking genesis from ${GENESIS_URL}" | ||
| tar_cmd=$(content_type "${GENESIS_URL}") | ||
| # shellcheck disable=SC2086 | ||
| (pv -petrafb -i 5 "${GENESIS_URL}" | eval "$tar_cmd") 2>&1 | stdbuf -o0 tr '\r' '\n' |
There was a problem hiding this comment.
Same helper mix-up for local genesis archives
When unpacking a local file, content_type is again used where tar_by_content_type is required.
- tar_cmd=$(content_type "${GENESIS_URL}")
+ tar_cmd=$(tar_by_content_type "${GENESIS_URL}")📝 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.
| echo "Unpacking genesis from ${GENESIS_URL}" | |
| tar_cmd=$(content_type "${GENESIS_URL}") | |
| # shellcheck disable=SC2086 | |
| (pv -petrafb -i 5 "${GENESIS_URL}" | eval "$tar_cmd") 2>&1 | stdbuf -o0 tr '\r' '\n' | |
| echo "Unpacking genesis from ${GENESIS_URL}" | |
| tar_cmd=$(tar_by_content_type "${GENESIS_URL}") | |
| # shellcheck disable=SC2086 | |
| (pv -petrafb -i 5 "${GENESIS_URL}" | eval "$tar_cmd") 2>&1 | stdbuf -o0 tr '\r' '\n' |
🤖 Prompt for AI Agents
In script/upgrades.sh around lines 402 to 405, the code uses the content_type
helper to determine the tar command for unpacking the genesis archive, but for
local files it should use tar_by_content_type instead. Replace the call to
content_type with tar_by_content_type when setting the tar_cmd variable to
ensure the correct unpacking command is used for local genesis archives.
There was a problem hiding this comment.
Actionable comments posted: 2
♻️ Duplicate comments (14)
app/app_test.go (1)
3-47: Critical: Test coverage removed without replacement verification.The entire
TestAkashApp_Exporttest has been commented out, which removes important test coverage for application export functionality. This was already flagged in previous reviews.Please verify that equivalent export test coverage exists in
app/sim_test.goor other test files, and either restore this test or confirm that comprehensive replacement coverage is in place.go.mod (1)
3-5: Update to latest Go patch release.The Go version directives should be updated to the latest patch release. As noted in previous reviews, Go 1.24.5 is available with important security and bug fixes.
Apply this diff to update to the latest patch version:
-go 1.24.3 +go 1.24.5 -toolchain go1.24.4 +toolchain go1.24.5app/app_configure.go (1)
37-47: Action Required: Address commented-out staking and governance modules.As identified in previous reviews, the removal of
astaking.AppModuleBasic{}andagov.AppModuleBasic{}from the akashModuleBasics function may leave dangling references in upgrade scripts, decorators, and other parts of the codebase.Please ensure all references to these modules have been properly addressed or confirm that their removal is intentional and complete.
app/sim/sim_utils.go (1)
43-46: Add cleanup for snapshot DB on initialization failure.The snapshot DB is created but not cleaned up if
snapshots.NewStorefails. This could lead to resource leaks.db, err := dbm.NewDB(dbName, dbm.BackendType(config.DBBackend), dir) if err != nil { return simtypes.Config{}, nil, "", nil, false, err } snapshotStore, err := snapshots.NewStore(snapshotDB, snapshotDir) if err != nil { + snapshotDB.Close() panic(err) }cmd/akash/cmd/app_creator.go (1)
69-77: Add cleanup for snapshot DB on initialization failure.The snapshot DB is created but not cleaned up if
snapshots.NewStorefails. This could lead to resource leaks.snapshotDB, err := dbm.NewDB("metadata", sdkserver.GetAppDBBackend(appOpts), snapshotDir) if err != nil { panic(err) } snapshotStore, err := snapshots.NewStore(snapshotDB, snapshotDir) if err != nil { + snapshotDB.Close() panic(err) }app/testnet.go (1)
115-123: Simplify validator address conversion in InitAkashAppForTestnetRather than manually decoding and re-encoding the operator address, you can leverage the SDK's built-in ValAddress conversion to produce the correct prefix. This both clarifies intent and removes boilerplate.
Replace the manual bech32 decode and encode steps:
- _, bz, err := bech32.DecodeAndConvert(val.OperatorAddress.String()) - if err != nil { - return nil - } - bech32Addr, err := bech32.ConvertAndEncode("akashvaloper", bz) - if err != nil { - return nil - } + // derive the validator operator address with the "akashvaloper" prefix + operatorAddr := sdk.ValAddress(val.OperatorAddress).String()Then use
operatorAddrwhen constructingstakingtypes.Validator.cmd/akash/cmd/testnet.go (4)
62-62: Typo in example command - incorrect binary nameThe example shows
osmosisdbut this is for Akash testnet. Update the binary name to match Akash.
99-99: Incorrect default daemon homeThe default daemon home should be "akash" instead of "osmosisd" to maintain consistency with the Akash project.
195-205: Security: Private key seeds saved unencryptedThe private key seed words are saved as plain text JSON files without encryption. This poses a security risk if these files are accidentally exposed.
384-395: Potential IP address overflowThe
calculateIPfunction increments the last octet without checking for overflow. This could result in invalid IP addresses if the starting IP's last octet plus the validator count exceeds 255.cmd/akash/cmd/root.go (1)
48-48: Clarify the status of commented RPC routeThe akash RPC route registration is commented out. This should either be removed or have a TODO comment explaining why it's disabled.
cmd/akash/cmd/testnetify/testnetify.go (1)
75-76: Inconsistency between example and args validationThe command now requires exactly one argument but the example shows usage without any arguments.
app/app.go (2)
163-168: Address the hook setup timing issueThe TODO comment indicates a critical timing issue where governance proposal handlers are registered before hooks are set up, potentially causing nil pointer dereferences. This issue should be resolved by restructuring the initialization order.
Consider moving
app.SetupHooks()to immediately after keeper initialization:app.InitNormalKeepers( app.cdc, encodingConfig, app.BaseApp, ModuleAccountPerms(), app.BlockedAddrs(), ) +// Set up hooks before any module routing +app.SetupHooks() + -// TODO: There is a bug here... -app.SetupHooks()
511-514: Use a cleaner approach instead of reflection for ChainID accessUsing reflection to access private fields is fragile and may break with SDK updates. Consider storing the chainID in the AkashApp struct during initialization instead.
Store the chainID in AkashApp:
type AkashApp struct { *baseapp.BaseApp *apptypes.App + chainID string // ... other fields }And set it during construction:
func NewApp(..., options ...func(*baseapp.BaseApp)) *AkashApp { // ... setup code ... + chainID := cast.ToString(appOpts.Get("chain-id")) app := &AkashApp{ BaseApp: bapp, + chainID: chainID, // ... other fields }Then simplify the accessor:
func (app *AkashApp) ChainID() string { - field := reflect.ValueOf(app.BaseApp).Elem().FieldByName("chainID") - return field.String() + return app.chainID }
🧹 Nitpick comments (5)
app/sim/sim_utils.go (1)
106-110: Consider making database statistics printing more robust.The function assumes LevelDB and uses hardcoded keys. Consider adding error handling for missing keys or checking database type.
func PrintStats(db dbm.DB) { fmt.Println("\nLevelDB Stats") - fmt.Println(db.Stats()["leveldb.stats"]) - fmt.Println("LevelDB cached block size", db.Stats()["leveldb.cachedblock"]) + stats := db.Stats() + if leveldbStats, ok := stats["leveldb.stats"]; ok { + fmt.Println(leveldbStats) + } + if cachedBlock, ok := stats["leveldb.cachedblock"]; ok { + fmt.Println("LevelDB cached block size", cachedBlock) + } }app/sim_test.go (1)
299-299: Fix comment formatting and remove commented code.The comment lacks proper spacing and appears to be leftover commented code that should be removed.
- //logger = log.TestingLogger()Since this is inside a conditional block that already has proper logger initialization, this commented line can be removed entirely.
cmd/akash/cmd/testnet.go (2)
132-138: Configure telemetry settings appropriately for testnetThe telemetry configuration enables telemetry by default with a 60-second retention time, which may not be appropriate for all testnet scenarios. Consider making telemetry configurable via flags.
+ enableTelemetry, _ := cmd.Flags().GetBool("enable-telemetry") simappConfig.API.Enable = true - simappConfig.Telemetry.Enabled = true - simappConfig.Telemetry.PrometheusRetentionTime = 60 + simappConfig.Telemetry.Enabled = enableTelemetry + if enableTelemetry { + simappConfig.Telemetry.PrometheusRetentionTime = 60 + }Add the flag in the command setup:
cmd.Flags().Bool("enable-telemetry", false, "Enable telemetry for the testnet")
406-406: Consider parameterizing file permissionsThe
writeFilefunction uses fixed permissions (0o644) which may not be appropriate for all file types, especially sensitive files like private keys.-func writeFile(name string, dir string, contents []byte) error { +func writeFile(name string, dir string, contents []byte, perm ...os.FileMode) error { + filePerm := os.FileMode(0o644) + if len(perm) > 0 { + filePerm = perm[0] + } - err = tmos.WriteFile(file, contents, 0o644) + err = tmos.WriteFile(file, contents, filePerm)app/types/app.go (1)
194-256: Consider adding parameter validation for robustnessWhile not critical, adding validation for key parameters like
cdc,bApp, andhomePathwould improve error handling and debugging experience.func (app *App) InitSpecialKeepers( cdc codec.Codec, legacyAmino *codec.LegacyAmino, bApp *baseapp.BaseApp, _ uint, skipUpgradeHeights map[int64]bool, homePath string) { + + if cdc == nil { + panic("codec cannot be nil") + } + if bApp == nil { + panic("baseapp cannot be nil") + } + if homePath == "" { + panic("homePath cannot be empty") + }
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
go.sumis excluded by!**/*.sum
📒 Files selected for processing (24)
app/app.go(7 hunks)app/app_configure.go(3 hunks)app/app_test.go(1 hunks)app/config.go(2 hunks)app/decorators/min_commision.go(0 hunks)app/export.go(6 hunks)app/modules.go(1 hunks)app/sim/sim_utils.go(1 hunks)app/sim_test.go(5 hunks)app/testnet.go(4 hunks)app/types/app.go(3 hunks)app/types/app_test.go(1 hunks)cmd/akash/cmd/app_creator.go(1 hunks)cmd/akash/cmd/flag_test.go(4 hunks)cmd/akash/cmd/genesis.go(1 hunks)cmd/akash/cmd/root.go(4 hunks)cmd/akash/cmd/testnet.go(1 hunks)cmd/akash/cmd/testnetify/config.go(3 hunks)cmd/akash/cmd/testnetify/testnetify.go(12 hunks)cmd/akash/cmd/testnetify/utils.go(2 hunks)cmd/common/util.go(1 hunks)cmd/common/util_test.go(1 hunks)go.mod(1 hunks)tests/upgrade/types/types.go(1 hunks)
💤 Files with no reviewable changes (1)
- app/decorators/min_commision.go
✅ Files skipped from review due to trivial changes (3)
- tests/upgrade/types/types.go
- cmd/common/util_test.go
- app/types/app_test.go
🚧 Files skipped from review as they are similar to previous changes (5)
- cmd/akash/cmd/testnetify/config.go
- app/modules.go
- app/config.go
- cmd/akash/cmd/flag_test.go
- cmd/akash/cmd/genesis.go
🧰 Additional context used
🧬 Code Graph Analysis (3)
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/sim/sim_utils.go (2)
testutil/network/network.go (1)
Config(79-102)app/app.go (1)
AkashApp(93-103)
cmd/akash/cmd/testnet.go (2)
testutil/network/network.go (2)
Config(79-102)New(221-443)cmd/akash/cmd/genesis.go (3)
TestnetGenesisParams(259-274)GenesisParams(182-198)PrepareGenesis(107-180)
🪛 golangci-lint (2.2.2)
app/app_test.go
3-3: commentFormatting: put a space between // and comment text
(gocritic)
app/sim_test.go
299-299: commentFormatting: put a space between // and comment text
(gocritic)
cmd/common/util.go
[warning] 3-3: var-naming: avoid meaningless package names
(revive)
⏰ 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). (9)
- GitHub Check: coverage
- GitHub Check: lint-shell
- GitHub Check: lint-go
- GitHub Check: network-upgrade-names
- GitHub Check: release-dry-run
- GitHub Check: sims
- GitHub Check: tests
- GitHub Check: build-macos
- GitHub Check: build-bins
🔇 Additional comments (48)
cmd/common/util.go (1)
1-1: LGTM: Linter directive addition is appropriate.The
//nolint: revivedirective addition aligns with the broader effort to standardize linting behavior across the codebase, as mentioned in the AI summary.cmd/akash/cmd/testnetify/utils.go (3)
17-20: LGTM: Database backend generalization.The updated
openDBfunction properly generalizes database backend selection by accepting abackendTypeparameter and using Cosmos DB'sdbm.NewDB. This aligns with the migration from Tendermint DB to Cosmos DB across the codebase.
26-26: LGTM: Improved flag handling with constants.Using the namespaced flag constant
cflags.FlagTraceStoreinstead of a local flag improves maintainability and consistency across the CLI commands.
55-62: LGTM: Excellent graceful shutdown implementation.The new
getCtxfunction provides proper context cancellation and errgroup management with signal handling for graceful shutdown. This is a robust implementation that follows Go best practices for concurrent application lifecycle management.go.mod (3)
1-1: LGTM: Module path migration is appropriate.The module path change from
github.com/akash-network/nodetopkg.akt.dev/nodealigns with the broader organizational restructuring mentioned in the AI summary.
20-26: LGTM: Major dependency upgrades are well-executed.The comprehensive upgrades to Cosmos SDK v0.53.3, CometBFT v0.38.17, and the addition of new cosmossdk.io modules represent a significant modernization effort. The version selections appear appropriate for the ecosystem upgrade.
60-64: LGTM: Akash fork replacements are properly configured.The replace directives correctly point to Akash forks of CometBFT and Cosmos SDK with appropriate version suffixes (
-akash.2and-akash.4), ensuring compatibility with Akash-specific customizations.app/app_configure.go (2)
4-24: LGTM: Import path modernization.The updated import paths to use
cosmossdk.iomodules and newer IBC-go v8 packages correctly align with the Cosmos SDK v0.50+ upgrade and ecosystem modernization.
49-84: LGTM: Genesis initialization order is well-structured.The
OrderInitGenesisfunction properly orders module initialization with capability module first and maintains the correct dependency chain. The addition ofconsensustypes.ModuleNameis appropriate for the SDK upgrade.app/sim/sim_utils.go (1)
78-103: LGTM!The export function is well-implemented with proper error handling, appropriate file permissions (0o600), and clear progress logging.
cmd/akash/cmd/app_creator.go (2)
107-142: LGTM!The export method has robust error handling, proper type validation, and correct logic for handling different export scenarios (specific height vs current state).
146-161: LGTM!The testnet app initialization method is well-structured with proper type checking and clear separation between general app creation and testnet-specific modifications.
app/testnet.go (1)
146-283: Excellent error handling improvements.The function now properly handles errors from all keeper operations instead of ignoring them, making the testnet initialization more robust and debuggable.
app/export.go (3)
30-68: LGTM!The export method has consistent error handling, proper use of updated APIs, and clear logic flow for handling different export scenarios.
74-276: Improved error handling consistency.The function now has consistent error handling throughout, with proper error checks and panics on unexpected conditions. The extensive validation and cleanup logic is well-structured.
279-344: LGTM!The Setup function is well-designed with flexible configuration options, proper initialization sequence, and good error handling. The variadic options pattern provides good extensibility.
app/sim_test.go (3)
1-49: LGTM!The package structure and imports are properly updated to use the new testing package pattern and modernized dependencies (CometBFT, Cosmos SDK v0.50+, etc.).
67-95: LGTM!The utility functions are well-structured and properly use the updated simulation framework APIs. The
simulateFromSeedFunccorrectly integrates with simtestutil functions.
97-523: Excellent modernization of simulation tests.All test functions have been properly updated to use the new app initialization pattern, updated simulation utilities, and improved error handling. The tests comprehensively cover simulation scenarios including full simulation, import/export validation, and determinism checks.
cmd/akash/cmd/testnet.go (2)
276-326: LGTM - Well-structured genesis initializationThe
initGenFilesfunction properly handles genesis state setup, account/balance configuration, and file generation. The error handling and state management look correct.
328-371: LGTM - Proper genesis file collection and standardizationThe
collectGenFilesfunction correctly handles the complex process of collecting genesis transactions from multiple validators and creating consistent genesis files with canonical timing.cmd/akash/cmd/root.go (5)
35-37: LGTM - Appropriate modernization of encoding configThe change to use
sdkutil.MakeEncodingConfig()and explicit interface registry registration aligns well with the broader SDK v0.50+ migration.
56-78: LGTM - Proper context initialization with new encoding configThe updates to use the new encoding config and
cflags.BroadcastBlockare consistent with the broader modernization effort.
92-112: LGTM - Good addition of context-aware executionThe new
ExecuteWithCtxfunction provides better context management and proper flag handling using the newcflagspackage constants.
114-145: LGTM - Well-structured command initializationThe modular approach using
appCreatorand the updated CLI command structure withcli.QueryCmd(),cli.TxCmd(), and new genesis/testnet commands improves maintainability.
152-164: LGTM - Clean modular genesis command structureThe
genesisCommandfunction provides a clean way to organize genesis-related commands while allowing for extensibility through additional subcommands.cmd/akash/cmd/testnetify/testnetify.go (7)
171-178: LGTM - Excellent context and signal handlingThe use of
errgroup.WithContextand proper signal handling provides robust resource management and graceful shutdown capabilities.
142-145: LGTM - Modern database handlingThe use of
DBOpenerwith backend from server context is a good modernization that provides better configurability.
277-290: LGTM - Proper migration to SDK genesis typesThe migration from Tendermint genesis types to
genutiltypes.AppGenesisis appropriate and follows the SDK v0.50+ patterns.
296-313: LGTM - Modern CometBFT database provider usageThe use of
cmtcfg.DefaultDBProviderwith proper resource cleanup via defer statements follows CometBFT best practices.
374-387: LGTM - Proper validator configurationThe validator configuration properly handles operator addresses and consensus keys with the updated type system.
396-412: LGTM - Proper CometBFT ABCI integrationThe use of
NewCometABCIWrapperand proper proxy app setup with metrics follows CometBFT integration patterns correctly.
450-555: LGTM - Comprehensive validator set modificationThe complex logic for creating new validator sets, handling vote signatures, and updating state is thorough and necessary for testnet state modification. The implementation correctly handles all the required state updates.
app/types/app.go (7)
88-132: LGTM - Excellent architectural improvementThe separation of keepers into
CosmosandAkashstructs provides clear organization and maintainability. The lazy initialization pattern withsync.Onceis appropriate.
258-454: LGTM - Comprehensive and well-structured keeper initializationThe keeper initialization properly handles dependencies and uses modern SDK v0.50+ patterns with runtime services. The modular approach makes the code maintainable.
354-381: LGTM - Comprehensive governance configurationThe governance router setup properly handles both legacy and modern proposal types. The increased maximum metadata length (10,200) is appropriate for governance needs.
456-478: LGTM - Well-structured hook registrationThe hook setup properly registers staking, governance, and escrow hooks using appropriate multi-hook patterns. The connection of market hooks to escrow events is correctly implemented.
481-508: LGTM - Comprehensive parameter subspace configurationThe parameter keeper initialization properly sets up subspaces for all Cosmos SDK and Akash modules with appropriate parameter key tables.
510-558: LGTM - Clean store key organizationThe separation of store keys into different categories (KV, transient, memory) and the distinction between Cosmos SDK and Akash keys improves maintainability.
560-591: LGTM - Well-implemented generic utility functionThe
FindStructFieldfunction provides type-safe reflection-based field access with proper error handling for invalid fields and type mismatches.app/app.go (8)
93-144: LGTM - Excellent architectural modernizationThe embedded
*baseapp.BaseAppand*apptypes.Appstructure withsdkutil.EncodingConfigparameter represents a clean modernization for SDK v0.50+.
348-401: LGTM - Excellent ABCI lifecycle improvementsThe updated ABCI methods with error returns and new lifecycle hooks (PreBlocker, Precommitter, PrepareCheckStater) provide better application lifecycle management. The infinite gas meter setup in PreBlocker is appropriate for non-deterministic operations.
453-471: LGTM - Proper API route modernizationThe migration from Tendermint service to
cmtserviceand addition of node service registration correctly follows the CometBFT migration patterns.
517-529: LGTM - Good caching pattern for reflection serviceThe caching of the reflection service is a good optimization that avoids repeated expensive initialization while maintaining proper error handling.
533-542: LGTM - Important addition for safe proposal processingThe
NewProposalContextmethod correctly creates a branched context that's safe for querying during ProcessProposal, with proper gas meter and consensus parameter setup.
267-324: LGTM - Well-structured module orderingThe module begin/end blocker ordering properly considers inter-module dependencies and places critical modules like upgrade in appropriate positions.
200-256: LGTM - Comprehensive application configurationThe configurator setup, service registration, upgrade handler integration, and simulation manager configuration are all properly implemented with appropriate error handling.
224-256: LGTM - Proper ante handler and ABCI configurationThe ante handler setup with comprehensive options and the ABCI method configuration including new lifecycle hooks (PreBlocker, Precommitter, PrepareCheckStater) is appropriate for the modernized application.
| if config.ParamsFile != "" { | ||
| bz, err := os.ReadFile(config.ParamsFile) | ||
| if err != nil { | ||
| panic(err) | ||
| } | ||
|
|
||
| err = json.Unmarshal(bz, &simState.AppParams) | ||
| if err != nil { | ||
| panic(err) | ||
| } | ||
| } |
There was a problem hiding this comment.
🛠️ Refactor suggestion
Improve error handling by returning errors instead of panicking.
The function currently panics on file reading and JSON unmarshaling errors. Consider returning errors to allow callers to handle them appropriately.
-func SimulationOperations(app *akash.AkashApp, cdc codec.JSONCodec, config simtypes.Config) []simtypes.WeightedOperation {
+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, err
}
err = json.Unmarshal(bz, &simState.AppParams)
if err != nil {
- panic(err)
+ return nil, 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📝 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 config.ParamsFile != "" { | |
| bz, err := os.ReadFile(config.ParamsFile) | |
| if err != nil { | |
| panic(err) | |
| } | |
| err = json.Unmarshal(bz, &simState.AppParams) | |
| if err != nil { | |
| panic(err) | |
| } | |
| } | |
| 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 { | |
| return nil, err | |
| } | |
| err = json.Unmarshal(bz, &simState.AppParams) | |
| if err != nil { | |
| return nil, err | |
| } | |
| } | |
| simState.LegacyProposalContents = app.SimulationManager().GetProposalContents(simState) //nolint:staticcheck | |
| simState.ProposalMsgs = app.SimulationManager().GetProposalMsgs(simState) | |
| return app.SimulationManager().WeightedOperations(simState), nil | |
| } |
🤖 Prompt for AI Agents
In app/sim/sim_utils.go around lines 59 to 69, the code panics on errors from
reading the file and unmarshaling JSON. Modify the function to return these
errors instead of panicking, so callers can handle them properly. Replace panic
calls with error returns and update the function signature to return an error if
it doesn't already.
| stakingtypes.NewDescription(nodeDirName, "", "", "", ""), | ||
| stakingtypes.NewCommissionRates(sdkmath.LegacyOneDec(), sdkmath.LegacyOneDec(), sdkmath.LegacyOneDec()), | ||
| sdkmath.OneInt(), |
There was a problem hiding this comment.
🛠️ Refactor suggestion
Review validator commission rates
The commission rates are set to 100% (LegacyOneDec()) for all rates, which means validators will take all rewards. This may not be intended behavior even for a testnet.
Consider using more realistic commission rates:
- stakingtypes.NewCommissionRates(sdkmath.LegacyOneDec(), sdkmath.LegacyOneDec(), sdkmath.LegacyOneDec()),
+ stakingtypes.NewCommissionRates(sdkmath.LegacyNewDecWithPrec(5, 2), sdkmath.LegacyNewDecWithPrec(20, 2), sdkmath.LegacyNewDecWithPrec(1, 2)), // 5%, 20%, 1%📝 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.
| stakingtypes.NewDescription(nodeDirName, "", "", "", ""), | |
| stakingtypes.NewCommissionRates(sdkmath.LegacyOneDec(), sdkmath.LegacyOneDec(), sdkmath.LegacyOneDec()), | |
| sdkmath.OneInt(), | |
| stakingtypes.NewDescription(nodeDirName, "", "", "", ""), | |
| - stakingtypes.NewCommissionRates(sdkmath.LegacyOneDec(), sdkmath.LegacyOneDec(), sdkmath.LegacyOneDec()), | |
| + stakingtypes.NewCommissionRates( | |
| + sdkmath.LegacyNewDecWithPrec(5, 2), // 5% initial commission rate | |
| + sdkmath.LegacyNewDecWithPrec(20, 2), // 20% maximum commission rate | |
| + sdkmath.LegacyNewDecWithPrec(1, 2), // 1% maximum daily rate change | |
| + ), | |
| sdkmath.OneInt(), |
🤖 Prompt for AI Agents
In cmd/akash/cmd/testnet.go around lines 222 to 224, the validator commission
rates are set to 100% using LegacyOneDec(), which means validators take all
rewards. To fix this, replace these values with more realistic commission rates
less than 100%, such as 0.1 (10%) or 0.05 (5%), by using appropriate sdkmath
decimal values to better reflect typical validator commission settings.
Signed-off-by: Artur Troian <troian@users.noreply.github.com>
There was a problem hiding this comment.
Actionable comments posted: 0
♻️ Duplicate comments (11)
app/app_test.go (1)
3-47: Critical: Test coverage removed without replacement.The entire
TestAkashApp_Exporttest remains commented out, removing important test coverage for application export functionality. This issue was previously raised but not addressed.app/config.go (1)
48-52: Document rationale for restricted governance proposal handlers.The governance proposal handlers remain limited to only
paramsclient.ProposalHandler, with distribution, upgrade, and IBC client proposal handlers still commented out. This significantly reduces governance functionality.Add a comment explaining why these handlers are disabled:
// governance functionality (voting) gov.NewAppModuleBasic( + // Note: Only params proposals are enabled. Distribution, upgrade, and IBC client + // proposals are disabled due to [provide specific reason here] []govclient.ProposalHandler{ paramsclient.ProposalHandler, }, ),app/modules.go (1)
208-214: Remove duplicate authzmodule initialization.The
authzmodule.NewAppModuleis initialized twice in theappSimModulesfunction.Remove the second initialization:
capability.NewAppModule( app.cdc, *app.Keepers.Cosmos.Cap, false, ), -authzmodule.NewAppModule( - app.cdc, - app.Keepers.Cosmos.Authz, - app.Keepers.Cosmos.Acct, - app.Keepers.Cosmos.Bank, - app.interfaceRegistry, -), gov.NewAppModule(Also applies to: 233-239
cmd/akash/cmd/app_creator.go (1)
74-77: Add cleanup for snapshot DB on initialization failure.The snapshot DB is created but not cleaned up if
snapshots.NewStorefails, potentially causing resource leaks.snapshotStore, err := snapshots.NewStore(snapshotDB, snapshotDir) if err != nil { + snapshotDB.Close() panic(err) }app/testnet.go (2)
115-123: Simplify validator address conversion in InitAkashAppForTestnetThe manual bech32 decode and re-encode operations can be simplified using SDK's built-in address conversion methods to ensure the correct "akashvaloper" prefix.
As previously suggested, consider replacing the manual bech32 operations with:
- _, bz, err := bech32.DecodeAndConvert(val.OperatorAddress.String()) - if err != nil { - return nil - } - bech32Addr, err := bech32.ConvertAndEncode("akashvaloper", bz) - if err != nil { - return nil - } + // Convert address to validator operator address with correct prefix + operatorAddr := sdk.ValAddress(val.OperatorAddress).String()Then use
operatorAddrin thestakingtypes.Validatorconstruction.
29-29: Reconsider the OperatorAddress type change.Changing
TestnetValidator.OperatorAddressfromsdk.ValAddresstosdk.Addressmay cause type compatibility issues since validator operator addresses should use thesdk.ValAddresstype. This change conflicts with the validator address handling logic in lines 115-123 where manual bech32 conversion is needed to get the correct "akashvaloper" prefix.Consider reverting to
sdk.ValAddressfor type safety and consistency with validator address semantics.type TestnetValidator struct { - OperatorAddress sdk.Address + OperatorAddress sdk.ValAddress ConsensusAddress sdk.ConsAddress ConsensusPubKey *types.Any Moniker string Commission stakingtypes.Commission MinSelfDelegation sdkmath.Int }cmd/akash/cmd/root.go (1)
48-48: Clarify or remove commented Akash RPC registrationThe Akash RPC route registration is still commented out without explanation. This was previously flagged for clarification.
Please either remove this commented line if the Akash RPC route is no longer supported, or add a clear TODO comment explaining why it's disabled and when it should be re-enabled.
cmd/akash/cmd/testnetify/testnetify.go (1)
75-76: Inconsistency between example and args validationThe mismatch between the example usage and argument validation persists. The example shows no arguments while
Args: cobra.ExactArgs(1)requires exactly one argument.Either update the example to show the required argument:
- Example: "testnetify", + Example: "testnetify <chain-id>",Or change the args validation if no argument is actually needed:
- Args: cobra.ExactArgs(1), + Args: cobra.NoArgs,app/types/app.go (1)
194-256: Address the parameter validation concern from previous reviewThe
InitSpecialKeepersmethod still lacks validation for critical parameters as highlighted in the previous review comment. This validation is important for fail-fast behavior.Based on the previous review, consider adding parameter validation:
func (app *App) InitSpecialKeepers( cdc codec.Codec, legacyAmino *codec.LegacyAmino, bApp *baseapp.BaseApp, _ uint, skipUpgradeHeights map[int64]bool, homePath string) { + + if cdc == nil { + panic("codec cannot be nil") + } + if bApp == nil { + panic("baseapp cannot be nil") + } + if homePath == "" { + panic("homePath cannot be empty") + } app.GenerateKeys()app/app.go (2)
163-168: Hook setup timing issue remains unresolvedThe TODO comment from previous reviews is still present, indicating that governance router routes are registered before hooks are set up, which can cause nil pointer dereferences.
This critical timing issue should be addressed by moving hook setup before governance router configuration:
app.InitNormalKeepers( app.cdc, encodingConfig, app.BaseApp, ModuleAccountPerms(), app.BlockedAddrs(), ) +// Set up hooks before governance router configuration +app.SetupHooks() + -// TODO: There is a bug here, where we register the govRouter routes in InitNormalKeepers and then -// call setupHooks afterwards. Therefore, if a gov proposal needs to call a method and that method calls a -// hook, we will get a nil pointer dereference error due to the hooks in the keeper not being -// setup yet. I will refrain from creating an issue in the sdk for now until after we unfork to 0.47, -// because I believe the concept of Routes is going away. -app.SetupHooks()
511-514: ChainID method still uses fragile reflectionThis issue was flagged in previous reviews but remains unaddressed. Using reflection to access private BaseApp fields is fragile and may break with SDK updates.
Consider storing the chain ID directly in the AkashApp struct during initialization:
type AkashApp struct { *baseapp.BaseApp *apptypes.App + chainID string // ... other fields } func NewApp(..., options ...func(*baseapp.BaseApp)) *AkashApp { // ... existing code ... + + // Extract chain ID from options if provided + var chainID string + for _, opt := range options { + if chainIDOpt, ok := opt.(interface{ GetChainID() string }); ok { + chainID = chainIDOpt.GetChainID() + } + } app := &AkashApp{ BaseApp: bapp, + chainID: chainID, // ... other fields } } -func (app *AkashApp) ChainID() string { - field := reflect.ValueOf(app.BaseApp).Elem().FieldByName("chainID") - return field.String() -} +func (app *AkashApp) ChainID() string { + return app.chainID +}
🧹 Nitpick comments (2)
app/types/app.go (1)
82-84: Consider making AccountAddressPrefix configurableWhile the hardcoded prefix "akash" is appropriate for the mainnet, consider making this configurable for different network environments (testnet, devnet, etc.).
-const ( - AccountAddressPrefix = "akash" -) +var ( + // AccountAddressPrefix can be overridden for different networks + AccountAddressPrefix = "akash" +)app/app_configure.go (1)
49-54: Consider updating outdated comments.The comment mentions "genutils module must occur after staking" but doesn't reflect the current complexity of the genesis order with IBC, consensus, and other newer modules. Consider updating the comment to reflect the current initialization requirements.
-// OrderInitGenesis returns module names in order for init genesis calls. -// NOTE: The genutils module must occur after staking so that pools are -// properly initialized with tokens from genesis accounts. -// NOTE: Capability module must occur first so that it can initialize any capabilities -// so that other modules that want to create or claim capabilities afterwards in InitChain -// can do so safely. +// OrderInitGenesis returns module names in order for init genesis calls. +// NOTE: Capability module must occur first so that it can initialize any capabilities +// so that other modules that want to create or claim capabilities afterwards in InitChain +// can do so safely. +// NOTE: The genutils module occurs last to ensure all other modules are properly +// initialized before processing genesis transactions.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
go.sumis excluded by!**/*.sum
📒 Files selected for processing (25)
app/app.go(7 hunks)app/app_configure.go(3 hunks)app/app_test.go(1 hunks)app/config.go(2 hunks)app/decorators/min_commision.go(0 hunks)app/export.go(6 hunks)app/modules.go(1 hunks)app/params/config.go(1 hunks)app/sim/sim_utils.go(1 hunks)app/sim_test.go(5 hunks)app/testnet.go(4 hunks)app/types/app.go(3 hunks)app/types/app_test.go(1 hunks)cmd/akash/cmd/app_creator.go(1 hunks)cmd/akash/cmd/flag_test.go(4 hunks)cmd/akash/cmd/genesis.go(1 hunks)cmd/akash/cmd/root.go(4 hunks)cmd/akash/cmd/testnet.go(1 hunks)cmd/akash/cmd/testnetify/config.go(3 hunks)cmd/akash/cmd/testnetify/testnetify.go(12 hunks)cmd/akash/cmd/testnetify/utils.go(2 hunks)cmd/common/util.go(1 hunks)cmd/common/util_test.go(1 hunks)go.mod(1 hunks)tests/upgrade/types/types.go(1 hunks)
💤 Files with no reviewable changes (1)
- app/decorators/min_commision.go
✅ Files skipped from review due to trivial changes (5)
- app/types/app_test.go
- tests/upgrade/types/types.go
- cmd/common/util.go
- cmd/common/util_test.go
- app/sim/sim_utils.go
🚧 Files skipped from review as they are similar to previous changes (7)
- app/params/config.go
- cmd/akash/cmd/testnetify/config.go
- cmd/akash/cmd/testnetify/utils.go
- cmd/akash/cmd/flag_test.go
- cmd/akash/cmd/genesis.go
- go.mod
- cmd/akash/cmd/testnet.go
🧰 Additional context used
🧬 Code Graph Analysis (3)
app/modules.go (8)
app/app.go (1)
AkashApp(93-103)x/audit/module.go (4)
AppModule(119-122)AppModule(133-135)AppModule(205-207)NewAppModule(125-130)x/cert/module.go (5)
AppModule(44-47)AppModule(118-120)AppModule(169-171)AppModule(174-176)NewAppModule(110-115)x/deployment/module.go (5)
AppModule(49-57)AppModule(132-134)AppModule(186-188)AppModule(191-193)NewAppModule(111-129)x/escrow/module.go (2)
AppModule(119-122)NewAppModule(125-130)x/market/module.go (5)
AppModule(48-51)AppModule(133-135)AppModule(184-186)AppModule(189-191)NewAppModule(108-130)x/provider/module.go (1)
NewAppModule(107-121)x/take/module.go (1)
NewAppModule(103-108)
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)
cmd/akash/cmd/root.go (9)
app/config.go (1)
ModuleBasics(72-74)util/cli/configs.go (1)
InterceptConfigsPreRunHandler(148-247)app/app.go (1)
DefaultHome(83-83)cmd/akash/cmd/bech32.go (1)
ConvertBech32Cmd(12-47)events/cmd/root.go (1)
EventCmd(21-38)cmd/akash/cmd/auth.go (1)
AuthCmd(23-31)cmd/akash/cmd/genaccounts.go (1)
AddGenesisAccountCmd(35-195)util/server/server.go (1)
Commands(31-58)cmd/akash/cmd/testnetify/testnetify.go (1)
GetCmd(48-263)
🪛 golangci-lint (2.2.2)
app/sim_test.go
299-299: commentFormatting: put a space between // and comment text
(gocritic)
app/app_test.go
3-3: commentFormatting: put a space between // and comment text
(gocritic)
⏰ 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). (9)
- GitHub Check: network-upgrade-names
- GitHub Check: coverage
- GitHub Check: sims
- GitHub Check: release-dry-run
- GitHub Check: lint-go
- GitHub Check: lint-shell
- GitHub Check: build-bins
- GitHub Check: tests
- GitHub Check: build-macos
🔇 Additional comments (41)
app/testnet.go (2)
56-60: LGTM!The function signature updates are appropriate for the SDK v0.50+ migration, with the additional
dbm.DBparameter and value-basedTestnetConfigparameter improving the API design.
81-168: Excellent error handling improvements.The comprehensive error handling updates properly check all returned errors from staking, distribution, and slashing keeper methods. The consistent pattern of returning
nilon error prevents panics and allows graceful failure handling.app/export.go (3)
30-68: LGTM!The function updates properly handle the new
modulesToExportparameter and use updated SDK v0.50+ APIs includingNewContextLegacy,ExportGenesisForModules, andGetConsensusParams. Error handling is comprehensive throughout.
74-276: Comprehensive error handling improvements.The function now properly checks and handles errors from all keeper operations including validator iteration, delegation retrieval, distribution hooks, and slashing operations. The consistent use of
panic(err)for unrecoverable errors is appropriate in this genesis preparation context.
279-344: Excellent refactoring with options pattern.The Setup function modernization using variadic
SetupAppOptionparameters and configuration struct provides excellent flexibility. The optional genesis function, improved encoding config handling, and updated app initialization align well with SDK v0.50+ patterns.app/sim_test.go (3)
1-49: LGTM!The package name change to
app_testenables external testing, and the import updates properly reflect the migration to CometBFT v0.37+ and Cosmos SDK v0.50+ dependencies. The new simulation utilities fromsimtestutilare appropriate replacements.
97-457: Comprehensive simulation test modernization.The test functions are properly updated to use the new app initialization patterns with encoding config,
simtestutilutilities, and improved error handling. The transition from legacy simulation APIs to the new modular approach is well-executed.
459-523: Enhanced determinism testing.The test improvements including more iterations per seed (
numTimesToRunPerSeed = 3) and updated simulation configuration provide more thorough determinism validation. The app initialization updates are consistent with the modernization effort.cmd/akash/cmd/root.go (2)
114-145: LGTM!The command structure updates properly utilize the
appCreatorinstance and modernize the CLI command initialization with updated encoding config patterns. The use ofcli.QueryCmd(),cli.TxCmd(), and other updated command functions is appropriate for the SDK v0.50+ migration.
151-164: Well-designed genesis command modularization.The
genesisCommandfunction provides a clean, extensible pattern for building genesis-related commands usingcli.GetGenesisCmdwith the ability to add custom subcommands. The modular approach improves maintainability.cmd/akash/cmd/testnetify/testnetify.go (2)
49-248: Comprehensive modernization for CometBFT migration.The updates properly modernize the testnetify command with:
StartCmdOptionswith DB opener for better database handling- Updated flag constants from the
cflagspackage- Proper telemetry and server configuration validation
- Context with errgroup for graceful signal handling
- Updated app start parameters for SDK v0.50+
These changes align well with the broader modernization effort.
267-556: Comprehensive testnetify implementation updates.The function properly modernizes genesis file handling with
genutiltypes.AppGenesisFromFile, uses CometBFT config and database providers, and implements robust block/state reconciliation logic. The validator set replacement and signature handling are thorough and handle various node stop scenarios appropriately.app/types/app.go (10)
7-7: Good addition of sync package for thread safetyThe
syncpackage import is appropriately added to support thesync.Onceused in lazy initialization of store keys.
9-80: Import modernization looks goodThe comprehensive update to Cosmos SDK v0.50+ and IBC v8 imports properly reflects the framework upgrades. The new module path
pkg.akt.devand updated import structure align with the modernization effort.
88-119: Excellent keeper organizationThe nested structure separating Cosmos SDK keepers from Akash-specific keepers improves code clarity and maintainability. This architectural change makes the codebase more modular.
127-132: Thread-safe store key management implementationThe lazy initialization using
sync.Onceensures thread safety and prevents race conditions during concurrent access to store keys.
134-146: Store key generation method is well-designedThe
GenerateKeysmethod properly usessync.Onceto ensure keys are initialized exactly once, preventing potential race conditions in concurrent environments.
148-191: Store key accessor methods provide good encapsulationThe getter methods for different store key types provide clean access to the internal key maps while maintaining proper encapsulation.
258-454: Comprehensive keeper initialization with proper dependency managementThe
InitNormalKeepersmethod demonstrates proper dependency injection and initialization order. The governance router setup and IBC routing configuration are correctly implemented.
456-478: Hook setup properly manages dependenciesThe
SetupHooksmethod correctly sets up staking, governance, and escrow hooks with proper dependency relationships between keepers.
481-508: Parameters keeper initialization is comprehensiveThe
initParamsKeeperfunction properly sets up parameter subspaces for all modules with appropriate key tables. The nolint comments appropriately suppress deprecation warnings for legacy parameter handling.
510-558: Store key enumeration functions are well-organizedThe separation of Cosmos SDK keys and Akash-specific keys in different functions provides good organization and makes it easy to understand which keys belong to which modules.
app/app.go (15)
9-9: Verify necessity of reflection importThe reflection import is used for the
ChainID()method which accesses private BaseApp fields. This was flagged in previous reviews as fragile and should be addressed.Consider storing the chain ID directly in the AkashApp struct during initialization to avoid reflection:
type AkashApp struct { *baseapp.BaseApp *apptypes.App + chainID string // ... other fields }
15-76: Import modernization is comprehensiveThe update to CometBFT imports and Cosmos SDK v0.50+ packages properly reflects the framework upgrades. The new module paths and updated import structure align well with the modernization effort.
83-90: DefaultHome path update is appropriateSetting the default home to
$HOME/.akashfollows standard conventions and the environment variable expansion is correctly handled.
93-103: App struct modernization is well-designedThe embedding of
*baseapp.BaseAppand*apptypes.Appalong with the addition of encoding-related fields properly supports the new architecture.
106-144: Constructor parameter changes improve flexibilityThe change from home path string to
sdkutil.EncodingConfigparameter makes the constructor more flexible and aligns with the new encoding configuration approach.
146-168: Modular keeper initialization is well-structuredThe separation into
InitSpecialKeepersandInitNormalKeepersprovides clear phases of initialization and improves code organization.
179-211: Module manager setup is properly implementedThe dynamic creation of the module manager from
appModulesand the proper ordering of pre-blockers, begin-blockers, and init genesis modules demonstrates good architectural design.
214-222: Service registration and store mounting is correctThe registration of AutoCLI and reflection services, along with proper store mounting for different store types, is implemented correctly.
236-256: ABCI lifecycle setup is comprehensiveThe setup of prepare/process proposal handlers, ante handler, and all ABCI lifecycle methods (including new hooks like
PreBlocker,Precommitter, andPrepareCheckStater) is properly implemented.
267-324: Module ordering functions are well-definedThe explicit ordering of begin-blockers and end-blockers provides clear control over module execution order and helps prevent dependency issues.
348-401: ABCI method signatures properly updatedThe updated signatures for
InitChainer,PreBlocker,BeginBlocker,EndBlocker,Precommitter, andPrepareCheckStatercorrectly use the new SDK types and return appropriate error values.
453-490: API route registration is modernizedThe update to use
cmtserviceinstead of Tendermint service and the addition of node service registration properly reflects the CometBFT migration.
500-500: Swagger route fix is appropriateAdding the
/static/prefix route fixes the swagger static file serving issue.
519-529: Reflection service caching is efficientThe caching of the reflection service prevents unnecessary recreation and improves performance, especially in test environments.
533-542: NewProposalContext method is well-implementedThe method properly creates a branched context with infinite gas meter and appropriate consensus parameters for safe proposal processing.
app/app_configure.go (4)
4-6: LGTM: Import path updates align with Cosmos SDK modernization.The import updates to newer Cosmos SDK modules (
cosmossdk.io/x/evidence/types,cosmossdk.io/x/feegrant,cosmossdk.io/x/upgrade/types) and IBC-go v8 (github.com/cosmos/ibc-go/v8/modules/...) correctly reflect the migration to Cosmos SDK v0.50+ as described in the PR objectives.Also applies to: 21-23
25-34: LGTM: Akash module import paths updated consistently.The migration from legacy import paths to the new
pkg.akt.dev/node/x/*pattern is consistent across all Akash-specific modules and aligns with the codebase modernization goals.
37-47: LGTM: Akash module basics correctly exclude Cosmos SDK modules.The
akashModuleBasicsfunction appropriately contains only Akash-specific modules (take, escrow, deployment, market, provider, audit, cert). Cosmos SDK modules like staking and governance are handled separately, which is the correct pattern.
55-84: Genesis module ordering is correct—no changes required.All core Cosmos SDK modules (including the new
x/consensus) appear in the proper sequence for v0.50+ migration, and all Akash modules respect their inter-module imports:• Cosmos SDK
paramstypes→ … →transfertypes→consensustypes→feegrant• Akash modules
cert,takehave no direct imports from other x/… modulesescrowprecedesdeployment(deployment tests import escrow)deploymentprecedesmarket(market code imports deployment)providerhas no required inter-dependencies, and its placement between deployment and market is safeAll required modules for the Cosmos v0.50+ migration are present and correctly ordered.
Signed-off-by: Artur Troian <troian@users.noreply.github.com>
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
.golangci.yaml(1 hunks)cmd/akash/cmd/auth.go(4 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- cmd/akash/cmd/auth.go
🔇 Additional comments (2)
.golangci.yaml (2)
20-38: Settings / exclusions are finally top-level – good catch
settings:andexclusions:are now siblings oflinters, so GolangCI-Lint will honour them.
3-4: Verifydefault: noneusage in .golangci.yamlI attempted to inspect the merged config with
golangci-lint run --config .golangci.yaml --print-config, but that flag isn’t supported in this version of golangci-lint. Please manually confirm whetherdefault: noneis actually recognised by your installed linter. If it isn’t, it will silently fall back to defaults (re-enabling many linters).Consider replacing:
linters: default: nonewith:
linters: disable-all: true # explicitly disable all lintersor remove the line and rely on your explicit
enable:/disable:lists.
| formatters: | ||
| enable: | ||
| - gofmt | ||
| exclusions: | ||
| generated: lax | ||
| paths: | ||
| - third_party$ | ||
| - builtin$ | ||
| - examples$ |
There was a problem hiding this comment.
formatters: block is not part of GolangCI-Lint config – gofmt must live under linters.enable
gofmt is treated as a linter; GolangCI-Lint will ignore the entire formatters: node, so gofmt (and its path exclusions) never run.
Proposed fix:
- formatters:
- enable:
- - gofmt
- exclusions:
- generated: lax
- paths:
- - third_party$
- - builtin$
- - examples$
+ # run gofmt as a linter; path patterns are already excluded globally
+ linters:
+ enable:
+ - gofmtCommittable suggestion skipped: line range outside the PR's diff.
🤖 Prompt for AI Agents
In .golangci.yaml around lines 39 to 47, the `formatters:` block is incorrectly
used for enabling `gofmt`, which GolangCI-Lint does not recognize. To fix this,
move `gofmt` under the `linters.enable` section and apply any path exclusions
there as well, ensuring `gofmt` runs properly as a linter within the
configuration.
|
superseded by #1998 |
Summary by CodeRabbit
New Features
Improvements
Bug Fixes
Refactor
Chores
Tests
Documentation
Removals