Skip to content

Add amino.name to all inference module Msg types for Keplr/Ledger support #14

@mingles-agent

Description

@mingles-agent

From research #9

Overview

Add (amino.name) proto option to all 46 remaining Msg types in inference-chain/proto/inference/inference/tx.proto. This unblocks SIGN_MODE_LEGACY_AMINO_JSON signing (Keplr browser wallet + Ledger hardware wallet) for all inference module transactions. Currently only MsgUpdateParams has amino.name; all other 46 Msg types are missing it.

Why this works: In cosmos SDK v0.50+, the (amino.name) proto option is auto-registered into the global amino codec via proto file descriptor init(). No changes to RegisterLegacyAminoCodec or codec.go are needed — they stay as-is.

Reference: inference-chain/proto/inference/collateral/tx.proto — all 3 messages have amino.name and work with Keplr.

Implementation Checklist

Phase 1: Add amino.name annotations to tx.proto (~1.5 hours)

  • Open inference-chain/proto/inference/inference/tx.proto
  • Add option (amino.name) = "inference/x/inference/Msg{Name}"; to each of the 46 Msg types that don't have it yet (follow the existing MsgUpdateParams pattern on line 79)
  • Priority messages for web3 app (add first):
    • MsgSubmitNewParticipant"inference/x/inference/MsgSubmitNewParticipant"
    • MsgSubmitNewUnfundedParticipant"inference/x/inference/MsgSubmitNewUnfundedParticipant"
    • MsgSubmitHardwareDiff"inference/x/inference/MsgSubmitHardwareDiff"
    • MsgClaimRewards"inference/x/inference/MsgClaimRewards"
    • MsgStartInference"inference/x/inference/MsgStartInference"
    • MsgCreateSubnetEscrow"inference/x/inference/MsgCreateSubnetEscrow"
    • MsgSettleSubnetEscrow"inference/x/inference/MsgSettleSubnetEscrow"
    • MsgRequestBridgeWithdrawal"inference/x/inference/MsgRequestBridgeWithdrawal"
    • MsgRequestBridgeMint"inference/x/inference/MsgRequestBridgeMint"
    • MsgBridgeExchange"inference/x/inference/MsgBridgeExchange"
    • MsgRegisterModel"inference/x/inference/MsgRegisterModel"
    • MsgDeleteGovernanceModel"inference/x/inference/MsgDeleteGovernanceModel"
  • All remaining 34 Msg types (internal/automated): same pattern

Phase 2: Regenerate proto files (~30 min)

  • Run make proto-gen (or equivalent) in inference-chain/ to regenerate:
    • inference-chain/x/inference/types/tx.pb.go
    • inference-chain/api/inference/inference/tx.pulsar.go
  • Verify no compilation errors: go build ./...

Phase 3: Verify amino registration works (~30 min)

  • Run existing tests: go test ./x/inference/...
  • Add a basic amino codec test in inference-chain/x/inference/types/codec_test.go:
    • Test that MsgSubmitNewParticipant, MsgClaimRewards, MsgSubmitHardwareDiff can be amino-encoded (verify amino type name is registered)
    • Reference: cosmos SDK's own amino codec tests for bank module

Phase 4: Verify no changes to Go files needed

  • Confirm x/inference/types/codec.go needs NO changes
  • Confirm x/inference/module/module.go RegisterLegacyAminoCodec stays EMPTY
  • Confirm x/collateral/module/module.go RegisterLegacyAminoCodec is still empty (reference)

Dependencies & Blockers

  • Requires proto generation tooling to be available (check Makefile for proto-gen target)
  • No blockers — this is a standalone change, safe to do independently of other issues

Estimated Total: 0.5-1 day (Junior level)

All 47 amino.name values follow an identical pattern. The work is mechanical and well-defined.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions