[TEST ONLY] Validate PR #998 + local ARM64 follow-ups#1324
Open
patimen wants to merge 7 commits into
Open
Conversation
Participant maintenance windows: proto/state model, governance params, scheduling & credit accrual, consensus-liveness exemption (gonka cosmos-sdk fork v0.53.3-ps19), inference-chain duty exemptions, queries/observability, upgrade-time param init, unit tests, and 5 Testermint E2E tests. Rebuilt cleanly on top of upgrade-v0.2.14 containing only the maintenance-window changes — the previous branch had carried unrelated gm/microrelease history, which is dropped here so follow-up PRs can stack on a clean base (per @patimen's request). Original work developed across 24 commits; squashed onto a clean base. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR primarily adds the maintenance-windows feature plumbing (proto/API surface, keeper state + BeginBlock lifecycle, duty/penalty exemptions, slashing/collateral wiring) and expands Testermint coverage to exercise it end-to-end, while also adding ARM64-aware upgrade packaging/build follow-ups and P2P URL scheme adjustments for local networking.
Changes:
- Implement maintenance window data model, params, messages/queries, keeper storage, and BeginBlock lifecycle transitions in
inference-chain. - Add runtime exemptions (assignment, CPoC evaluation, inference-expiry penalties) plus slashing/collateral integration for active maintenance.
- Update local/CI upgrade build packaging to support multi-arch outputs (with CI scoping) and adjust local-test-net P2P URL formats.
Reviewed changes
Copilot reviewed 60 out of 71 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| testermint/src/test/kotlin/UpgradeTests.kt | Adds multi-arch upgrade artifact handling and readiness waits for inference after upgrades. |
| testermint/src/test/kotlin/MaintenanceWindowTests.kt | Adds new E2E tests validating maintenance scheduling + lifecycle behavior. |
| testermint/src/main/kotlin/DockerGroup.kt | Adjusts P2P URL/external address formats passed into docker env. |
| testermint/src/main/kotlin/data/Maintenance.kt | Adds Testermint-side DTOs for maintenance query responses. |
| testermint/src/main/kotlin/data/AppExport.kt | Extends exported params model with maintenance_params and MaintenanceParams type. |
| testermint/src/main/kotlin/ApplicationCLI.kt | Updates CLI invocation for last-upgrade-height query; reformats execCli signature. |
| proposals/maintenance-windows/maintenance-windows.md | Adds the detailed maintenance-windows proposal document. |
| proposals/maintenance-windows/maintenance-windows-todo.md | Adds a task-plan document for implementing maintenance windows. |
| Makefile | Adds multi-arch variables and loops upgrade packaging over UPGRADE_ARCHES. |
| local-test-net/stop.sh | Rewrites stop script to include shebang/strict mode and explicit compose file lists. |
| local-test-net/stop-rebuild.sh | Adds host-arch detection to set PLATFORM/GOARCH for rebuild flows. |
| local-test-net/launch.sh | Switches seed P2P URL to tcp:// and external address to host:port. |
| local-test-net/launch_full.sh | Switches seed P2P URL to tcp:// and external address to host:port. |
| inference-chain/x/inference/types/query.pb.gw.go | Regenerates gateway bindings to expose maintenance query endpoints. |
| inference-chain/x/inference/types/params.go | Adds default maintenance params + validation and wires into Params validation. |
| inference-chain/x/inference/types/message_signers.go | Adds signer extraction helpers for maintenance messages. |
| inference-chain/x/inference/types/logging.go | Adds a Maintenance logging subsystem enum. |
| inference-chain/x/inference/types/keys.go | Adds collections prefixes for maintenance reservations/state/indexes/transitions. |
| inference-chain/x/inference/types/expected_keepers.go | Extends staking keeper interface with O(1) power/validator lookups for maintenance. |
| inference-chain/x/inference/types/errors.go | Adds maintenance-specific sdkerrors for schedule/cancel/validation failures. |
| inference-chain/x/inference/module/module.go | Runs maintenance lifecycle in BeginBlock and waives expiry penalties during maintenance. |
| inference-chain/x/inference/module/confirmation_poc.go | Skips CPoC ratio assignment for participants in active maintenance. |
| inference-chain/x/inference/module/autocli.go | Adds AutoCLI commands for maintenance queries. |
| inference-chain/x/inference/keeper/query_maintenance.go | Implements maintenance queries: credit, scheduled, active, status, concurrency, schedulability. |
| inference-chain/x/inference/keeper/query_get_random_executor.go | Filters out active-maintenance participants from random executor selection. |
| inference-chain/x/inference/keeper/permissions.go | Adds message permission entries for maintenance messages. |
| inference-chain/x/inference/keeper/params.go | Adds helper to fetch maintenance params with default fallback. |
| inference-chain/x/inference/keeper/msg_server_schedule_maintenance.go | Implements MsgScheduleMaintenance (validation, indexing, transitions, events). |
| inference-chain/x/inference/keeper/msg_server_claim_rewards.go | Grants maintenance credit on successful claim and exempts missed-validation checks during maintenance-covered epochs. |
| inference-chain/x/inference/keeper/msg_server_cancel_maintenance.go | Implements MsgCancelMaintenance (refund, index/transition cleanup, events). |
| inference-chain/x/inference/keeper/maintenance.go | Adds CRUD, transition schedule helpers, active-maintenance checks, credit accrual logic. |
| inference-chain/x/inference/keeper/maintenance_validation.go | Adds epoch-phase overlap checks and scheduling-time concurrency/overlap validation. |
| inference-chain/x/inference/keeper/maintenance_lifecycle.go | Implements BeginBlock lifecycle transitions (activate/complete) + advisory re-check. |
| inference-chain/x/inference/keeper/maintenance_export_test.go | Exposes maintenance filtering helper for tests. |
| inference-chain/x/inference/keeper/keeper.go | Adds maintenance collections and indexes to the keeper schema. |
| inference-chain/x/collateral/types/expected_keepers.go | Adds a MaintenanceChecker interface for collateral module defense-in-depth. |
| inference-chain/x/collateral/module/hooks.go | Skips jail-marking for maintenance-covered participants on unbonding hook; documents slashing behavior. |
| inference-chain/x/collateral/keeper/keeper.go | Wires optional MaintenanceChecker into collateral keeper for hook guards. |
| inference-chain/testutil/keeper/expected_keepers_mocks.go | Updates gomock mocks for expanded expected keeper interfaces. |
| inference-chain/test_genesis_overrides.json | Enables maintenance params in test genesis overrides. |
| inference-chain/proto/inference/inference/tx.proto | Adds schedule/cancel maintenance RPCs and message types. |
| inference-chain/proto/inference/inference/query.proto | Adds maintenance query RPCs and request/response messages. |
| inference-chain/proto/inference/inference/params.proto | Adds maintenance_params and MaintenanceParams proto definition. |
| inference-chain/proto/inference/inference/maintenance.proto | Adds maintenance reservation/state/transition proto types + enums. |
| inference-chain/Makefile | Makes upgrade packaging arch-configurable and emits per-arch zip names/checksums. |
| inference-chain/go.sum | Bumps github.com/gonka-ai/cosmos-sdk dependency version. |
| inference-chain/go.mod | Bumps github.com/gonka-ai/cosmos-sdk replacement version. |
| inference-chain/Dockerfile | Copies wasmvm static libs via wildcard to support multiple arch library names. |
| inference-chain/cmd/inferenced/cmd/set_seeds.go | Accepts host:port and tcp:// formats for P2P seed URL parsing. |
| inference-chain/app/upgrades/v0_2_12/upgrades.go | Initializes maintenance params defaults during upgrade handler. |
| inference-chain/app/maintenance_slashing_adapter.go | Adds adapter bridging inference maintenance state to slashing keeper checks. |
| inference-chain/app/app.go | Wires maintenance checker into collateral and slashing keepers. |
| inference-chain/api/inference/inference/tx_grpc.pb.go | Regenerates gRPC stubs for new maintenance tx RPCs. |
| inference-chain/api/inference/inference/query_grpc.pb.go | Regenerates gRPC stubs for new maintenance query RPCs. |
| decentralized-api/Makefile | Makes upgrade packaging arch-configurable and emits per-arch zip names/checksums. |
| decentralized-api/go.sum | Aligns github.com/gonka-ai/cosmos-sdk version with inference-chain. |
| decentralized-api/go.mod | Aligns github.com/cosmos/cosmos-sdk replacement version. |
| decentralized-api/Dockerfile | Copies wasmvm static libs via wildcard to support multiple arch library names. |
| .gitignore | Ignores inference-chain docker context directory. |
| .github/workflows/test-workflow.yml | Scopes upgrade-test packaging to amd64 in CI. |
| .github/workflows/publish_upgrade_binaries.yml | Adds QEMU setup to package arm64 artifacts. |
| .github/workflows/build-upgrades.yml | Scopes upgrade packaging to amd64 in this workflow. |
Files not reviewed (3)
- inference-chain/api/inference/inference/query_grpc.pb.go: Language not supported
- inference-chain/api/inference/inference/tx_grpc.pb.go: Language not supported
- inference-chain/testutil/keeper/expected_keepers_mocks.go: Language not supported
Comment on lines
+164
to
+168
| val canonicalExecName = "${config.stateDirName}/cosmovisor/current/bin/${config.appName}" | ||
| val command = "$canonicalExecName query inference last-upgrade-height --output json" | ||
| Logger.debug("Executing shell command for last-upgrade-height: {}", command) | ||
| val output = exec(listOf("/bin/sh", "-lc", command)).joinToString("") | ||
| Logger.debug("Output: {}", output) |
Comment on lines
+19
to
+24
| // Authorization: only the participant themselves may schedule their own | ||
| // maintenance window. Without this check, anyone could drain another | ||
| // participant's credit and force them into maintenance. | ||
| if msg.Creator != msg.Participant { | ||
| return nil, types.ErrInvalidPermission | ||
| } |
Comment on lines
+30
to
+37
| // Authorization: only the participant themselves may cancel their | ||
| // reservation. ScheduleMaintenance enforces Creator == Participant, so | ||
| // CreatedBy on existing rows is always equal to Participant — comparing | ||
| // against r.CreatedBy here is redundant and would silently widen | ||
| // authorization if the schedule-side constraint were ever relaxed. | ||
| if msg.Creator != r.Participant { | ||
| return nil, types.ErrInvalidPermission | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Test-only PR to validate CI for the full maintenance-window stack plus the local ARM64 / upgrade-test follow-up commits.\n\nThis branch is not intended to merge anywhere. It exists only to run GitHub checks in a repo where we have permission to execute workflows.\n\nContents:\n- full maintenance-window base from Ryan Chen's \n- local upgrade/ARM64 follow-ups stacked on top\n- CI-only arch scoping change for upgrade artifact builds\n\nIf checks pass here, we can use the result to inform the real stacked PR in Ryan's repo.