From 98840784a1809120aa8645f1fff3603f83512077 Mon Sep 17 00:00:00 2001 From: Dan Kanefsky Date: Thu, 7 Nov 2024 16:33:00 -0800 Subject: [PATCH 1/8] feat: add software upgrade cmd --- api/v1/tx.pulsar.go | 186 ++++++++++++++++-------------- api/v1/tx_grpc.pb.go | 39 +++++++ client/cli/parse.go | 23 ++++ client/cli/tx.go | 98 ++++++++++++++++ go.mod | 2 +- keeper/keeper.go | 3 + keeper/msg_server.go | 15 +++ module.go | 2 + proto/noble/authority/v1/tx.proto | 3 + types/codec.go | 3 + types/expected_keepers.go | 5 + types/tx.pb.go | 106 +++++++++++------ utils/mocks/authority.go | 13 ++- 13 files changed, 375 insertions(+), 123 deletions(-) create mode 100644 client/cli/parse.go diff --git a/api/v1/tx.pulsar.go b/api/v1/tx.pulsar.go index a235472..f212099 100644 --- a/api/v1/tx.pulsar.go +++ b/api/v1/tx.pulsar.go @@ -4,6 +4,7 @@ package authorityv1 import ( _ "cosmossdk.io/api/amino" _ "cosmossdk.io/api/cosmos/msg/v1" + v1beta1 "cosmossdk.io/api/cosmos/upgrade/v1beta1" fmt "fmt" _ "github.com/cosmos/cosmos-proto" runtime "github.com/cosmos/cosmos-proto/runtime" @@ -2900,81 +2901,90 @@ var file_noble_authority_v1_tx_proto_rawDesc = []byte{ 0x6f, 0x62, 0x6c, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x2e, 0x76, 0x31, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x73, 0x67, - 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, - 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x97, 0x01, 0x0a, 0x0a, 0x4d, 0x73, - 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, - 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, - 0x6e, 0x67, 0x52, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, 0x30, 0x0a, 0x08, 0x6d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, - 0x6e, 0x79, 0x52, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x3a, 0x25, 0x88, 0xa0, - 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, - 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x0d, 0x6e, 0x6f, 0x62, 0x6c, 0x65, 0x2f, 0x45, 0x78, 0x65, 0x63, - 0x75, 0x74, 0x65, 0x22, 0x2e, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, - 0x6c, 0x74, 0x73, 0x22, 0xb0, 0x01, 0x0a, 0x14, 0x4d, 0x73, 0x67, 0x54, 0x72, 0x61, 0x6e, 0x73, - 0x66, 0x65, 0x72, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x12, 0x30, 0x0a, 0x06, - 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, - 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, 0x35, - 0x0a, 0x09, 0x6e, 0x65, 0x77, 0x5f, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x08, 0x6e, 0x65, 0x77, - 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x3a, 0x2f, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x82, - 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x17, 0x6e, - 0x6f, 0x62, 0x6c, 0x65, 0x2f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x4f, 0x77, 0x6e, - 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x22, 0x1e, 0x0a, 0x1c, 0x4d, 0x73, 0x67, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x66, 0x65, 0x72, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x75, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x41, 0x63, 0x63, - 0x65, 0x70, 0x74, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x12, 0x30, 0x0a, 0x06, - 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, - 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x3a, 0x2d, - 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x69, 0x67, - 0x6e, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x15, 0x6e, 0x6f, 0x62, 0x6c, 0x65, 0x2f, 0x41, 0x63, - 0x63, 0x65, 0x70, 0x74, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x22, 0x1c, 0x0a, - 0x1a, 0x4d, 0x73, 0x67, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, - 0x68, 0x69, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xbb, 0x02, 0x0a, 0x03, - 0x4d, 0x73, 0x67, 0x12, 0x51, 0x0a, 0x07, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x12, 0x1e, - 0x2e, 0x6e, 0x6f, 0x62, 0x6c, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, - 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x1a, 0x26, - 0x2e, 0x6e, 0x6f, 0x62, 0x6c, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, - 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6f, 0x0a, 0x11, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, - 0x65, 0x72, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x12, 0x28, 0x2e, 0x6e, 0x6f, - 0x62, 0x6c, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x2e, 0x76, 0x31, - 0x2e, 0x4d, 0x73, 0x67, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x4f, 0x77, 0x6e, 0x65, - 0x72, 0x73, 0x68, 0x69, 0x70, 0x1a, 0x30, 0x2e, 0x6e, 0x6f, 0x62, 0x6c, 0x65, 0x2e, 0x61, 0x75, - 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x54, 0x72, + 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x97, 0x01, 0x0a, 0x0a, 0x4d, + 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x69, 0x67, + 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x52, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, 0x30, 0x0a, 0x08, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x41, 0x6e, 0x79, 0x52, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x3a, 0x25, 0x88, + 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x69, 0x67, 0x6e, + 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x0d, 0x6e, 0x6f, 0x62, 0x6c, 0x65, 0x2f, 0x45, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x65, 0x22, 0x2e, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x07, 0x72, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x73, 0x22, 0xb0, 0x01, 0x0a, 0x14, 0x4d, 0x73, 0x67, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x66, 0x65, 0x72, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x12, 0x30, 0x0a, + 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, + 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, + 0x35, 0x0a, 0x09, 0x6e, 0x65, 0x77, 0x5f, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x08, 0x6e, 0x65, + 0x77, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x3a, 0x2f, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, + 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x17, + 0x6e, 0x6f, 0x62, 0x6c, 0x65, 0x2f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x4f, 0x77, + 0x6e, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x22, 0x1e, 0x0a, 0x1c, 0x4d, 0x73, 0x67, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x69, 0x0a, 0x0f, 0x41, 0x63, 0x63, 0x65, 0x70, - 0x74, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x12, 0x26, 0x2e, 0x6e, 0x6f, 0x62, - 0x6c, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x2e, 0x76, 0x31, 0x2e, - 0x4d, 0x73, 0x67, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x68, - 0x69, 0x70, 0x1a, 0x2e, 0x2e, 0x6e, 0x6f, 0x62, 0x6c, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, - 0x72, 0x69, 0x74, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x63, 0x63, 0x65, 0x70, - 0x74, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xd1, 0x01, 0x0a, 0x16, 0x63, 0x6f, - 0x6d, 0x2e, 0x6e, 0x6f, 0x62, 0x6c, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, - 0x79, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, - 0x44, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x6f, 0x62, 0x6c, - 0x65, 0x2d, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, - 0x74, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6e, 0x6f, 0x62, 0x6c, 0x65, 0x2f, 0x61, 0x75, 0x74, - 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x2f, 0x76, 0x31, 0x3b, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, - 0x69, 0x74, 0x79, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4e, 0x41, 0x58, 0xaa, 0x02, 0x12, 0x4e, 0x6f, - 0x62, 0x6c, 0x65, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x2e, 0x56, 0x31, - 0xca, 0x02, 0x12, 0x4e, 0x6f, 0x62, 0x6c, 0x65, 0x5c, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, - 0x74, 0x79, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1e, 0x4e, 0x6f, 0x62, 0x6c, 0x65, 0x5c, 0x41, 0x75, - 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x14, 0x4e, 0x6f, 0x62, 0x6c, 0x65, 0x3a, 0x3a, - 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x75, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x41, 0x63, + 0x63, 0x65, 0x70, 0x74, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x12, 0x30, 0x0a, + 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, + 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x3a, + 0x2d, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x69, + 0x67, 0x6e, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x15, 0x6e, 0x6f, 0x62, 0x6c, 0x65, 0x2f, 0x41, + 0x63, 0x63, 0x65, 0x70, 0x74, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x22, 0x1c, + 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x4f, 0x77, 0x6e, 0x65, 0x72, + 0x73, 0x68, 0x69, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xae, 0x03, 0x0a, + 0x03, 0x4d, 0x73, 0x67, 0x12, 0x51, 0x0a, 0x07, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x12, + 0x1e, 0x2e, 0x6e, 0x6f, 0x62, 0x6c, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, + 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x1a, + 0x26, 0x2e, 0x6e, 0x6f, 0x62, 0x6c, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, + 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6f, 0x0a, 0x11, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x66, 0x65, 0x72, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x12, 0x28, 0x2e, 0x6e, + 0x6f, 0x62, 0x6c, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x2e, 0x76, + 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x4f, 0x77, 0x6e, + 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x1a, 0x30, 0x2e, 0x6e, 0x6f, 0x62, 0x6c, 0x65, 0x2e, 0x61, + 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x69, 0x0a, 0x0f, 0x41, 0x63, 0x63, 0x65, + 0x70, 0x74, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x12, 0x26, 0x2e, 0x6e, 0x6f, + 0x62, 0x6c, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x2e, 0x76, 0x31, + 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, + 0x68, 0x69, 0x70, 0x1a, 0x2e, 0x2e, 0x6e, 0x6f, 0x62, 0x6c, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, + 0x6f, 0x72, 0x69, 0x74, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x63, 0x63, 0x65, + 0x70, 0x74, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x71, 0x0a, 0x0f, 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x55, + 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x12, 0x2a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x4d, 0x73, 0x67, 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x55, 0x70, 0x67, 0x72, 0x61, + 0x64, 0x65, 0x1a, 0x32, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x75, 0x70, 0x67, 0x72, + 0x61, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, + 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xd1, 0x01, + 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x6e, 0x6f, 0x62, 0x6c, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, + 0x6f, 0x72, 0x69, 0x74, 0x79, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x44, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x6e, 0x6f, 0x62, 0x6c, 0x65, 0x2d, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x61, 0x75, 0x74, + 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6e, 0x6f, 0x62, 0x6c, 0x65, + 0x2f, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x2f, 0x76, 0x31, 0x3b, 0x61, 0x75, + 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4e, 0x41, 0x58, 0xaa, + 0x02, 0x12, 0x4e, 0x6f, 0x62, 0x6c, 0x65, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, + 0x79, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x12, 0x4e, 0x6f, 0x62, 0x6c, 0x65, 0x5c, 0x41, 0x75, 0x74, + 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1e, 0x4e, 0x6f, 0x62, 0x6c, + 0x65, 0x5c, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x5c, 0x56, 0x31, 0x5c, 0x47, + 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x14, 0x4e, 0x6f, 0x62, + 0x6c, 0x65, 0x3a, 0x3a, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x3a, 0x3a, 0x56, + 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2991,24 +3001,28 @@ func file_noble_authority_v1_tx_proto_rawDescGZIP() []byte { var file_noble_authority_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 6) var file_noble_authority_v1_tx_proto_goTypes = []interface{}{ - (*MsgExecute)(nil), // 0: noble.authority.v1.MsgExecute - (*MsgExecuteResponse)(nil), // 1: noble.authority.v1.MsgExecuteResponse - (*MsgTransferOwnership)(nil), // 2: noble.authority.v1.MsgTransferOwnership - (*MsgTransferOwnershipResponse)(nil), // 3: noble.authority.v1.MsgTransferOwnershipResponse - (*MsgAcceptOwnership)(nil), // 4: noble.authority.v1.MsgAcceptOwnership - (*MsgAcceptOwnershipResponse)(nil), // 5: noble.authority.v1.MsgAcceptOwnershipResponse - (*anypb.Any)(nil), // 6: google.protobuf.Any + (*MsgExecute)(nil), // 0: noble.authority.v1.MsgExecute + (*MsgExecuteResponse)(nil), // 1: noble.authority.v1.MsgExecuteResponse + (*MsgTransferOwnership)(nil), // 2: noble.authority.v1.MsgTransferOwnership + (*MsgTransferOwnershipResponse)(nil), // 3: noble.authority.v1.MsgTransferOwnershipResponse + (*MsgAcceptOwnership)(nil), // 4: noble.authority.v1.MsgAcceptOwnership + (*MsgAcceptOwnershipResponse)(nil), // 5: noble.authority.v1.MsgAcceptOwnershipResponse + (*anypb.Any)(nil), // 6: google.protobuf.Any + (*v1beta1.MsgSoftwareUpgrade)(nil), // 7: cosmos.upgrade.v1beta1.MsgSoftwareUpgrade + (*v1beta1.MsgSoftwareUpgradeResponse)(nil), // 8: cosmos.upgrade.v1beta1.MsgSoftwareUpgradeResponse } var file_noble_authority_v1_tx_proto_depIdxs = []int32{ 6, // 0: noble.authority.v1.MsgExecute.messages:type_name -> google.protobuf.Any 0, // 1: noble.authority.v1.Msg.Execute:input_type -> noble.authority.v1.MsgExecute 2, // 2: noble.authority.v1.Msg.TransferOwnership:input_type -> noble.authority.v1.MsgTransferOwnership 4, // 3: noble.authority.v1.Msg.AcceptOwnership:input_type -> noble.authority.v1.MsgAcceptOwnership - 1, // 4: noble.authority.v1.Msg.Execute:output_type -> noble.authority.v1.MsgExecuteResponse - 3, // 5: noble.authority.v1.Msg.TransferOwnership:output_type -> noble.authority.v1.MsgTransferOwnershipResponse - 5, // 6: noble.authority.v1.Msg.AcceptOwnership:output_type -> noble.authority.v1.MsgAcceptOwnershipResponse - 4, // [4:7] is the sub-list for method output_type - 1, // [1:4] is the sub-list for method input_type + 7, // 4: noble.authority.v1.Msg.SoftwareUpgrade:input_type -> cosmos.upgrade.v1beta1.MsgSoftwareUpgrade + 1, // 5: noble.authority.v1.Msg.Execute:output_type -> noble.authority.v1.MsgExecuteResponse + 3, // 6: noble.authority.v1.Msg.TransferOwnership:output_type -> noble.authority.v1.MsgTransferOwnershipResponse + 5, // 7: noble.authority.v1.Msg.AcceptOwnership:output_type -> noble.authority.v1.MsgAcceptOwnershipResponse + 8, // 8: noble.authority.v1.Msg.SoftwareUpgrade:output_type -> cosmos.upgrade.v1beta1.MsgSoftwareUpgradeResponse + 5, // [5:9] is the sub-list for method output_type + 1, // [1:5] is the sub-list for method input_type 1, // [1:1] is the sub-list for extension type_name 1, // [1:1] is the sub-list for extension extendee 0, // [0:1] is the sub-list for field type_name diff --git a/api/v1/tx_grpc.pb.go b/api/v1/tx_grpc.pb.go index 065589b..b5e4cf2 100644 --- a/api/v1/tx_grpc.pb.go +++ b/api/v1/tx_grpc.pb.go @@ -8,6 +8,7 @@ package authorityv1 import ( context "context" + v1beta1 "cosmossdk.io/api/cosmos/upgrade/v1beta1" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -22,6 +23,7 @@ const ( Msg_Execute_FullMethodName = "/noble.authority.v1.Msg/Execute" Msg_TransferOwnership_FullMethodName = "/noble.authority.v1.Msg/TransferOwnership" Msg_AcceptOwnership_FullMethodName = "/noble.authority.v1.Msg/AcceptOwnership" + Msg_SoftwareUpgrade_FullMethodName = "/noble.authority.v1.Msg/SoftwareUpgrade" ) // MsgClient is the client API for Msg service. @@ -31,6 +33,7 @@ type MsgClient interface { Execute(ctx context.Context, in *MsgExecute, opts ...grpc.CallOption) (*MsgExecuteResponse, error) TransferOwnership(ctx context.Context, in *MsgTransferOwnership, opts ...grpc.CallOption) (*MsgTransferOwnershipResponse, error) AcceptOwnership(ctx context.Context, in *MsgAcceptOwnership, opts ...grpc.CallOption) (*MsgAcceptOwnershipResponse, error) + SoftwareUpgrade(ctx context.Context, in *v1beta1.MsgSoftwareUpgrade, opts ...grpc.CallOption) (*v1beta1.MsgSoftwareUpgradeResponse, error) } type msgClient struct { @@ -71,6 +74,16 @@ func (c *msgClient) AcceptOwnership(ctx context.Context, in *MsgAcceptOwnership, return out, nil } +func (c *msgClient) SoftwareUpgrade(ctx context.Context, in *v1beta1.MsgSoftwareUpgrade, opts ...grpc.CallOption) (*v1beta1.MsgSoftwareUpgradeResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(v1beta1.MsgSoftwareUpgradeResponse) + err := c.cc.Invoke(ctx, Msg_SoftwareUpgrade_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + // MsgServer is the server API for Msg service. // All implementations must embed UnimplementedMsgServer // for forward compatibility. @@ -78,6 +91,7 @@ type MsgServer interface { Execute(context.Context, *MsgExecute) (*MsgExecuteResponse, error) TransferOwnership(context.Context, *MsgTransferOwnership) (*MsgTransferOwnershipResponse, error) AcceptOwnership(context.Context, *MsgAcceptOwnership) (*MsgAcceptOwnershipResponse, error) + SoftwareUpgrade(context.Context, *v1beta1.MsgSoftwareUpgrade) (*v1beta1.MsgSoftwareUpgradeResponse, error) mustEmbedUnimplementedMsgServer() } @@ -97,6 +111,9 @@ func (UnimplementedMsgServer) TransferOwnership(context.Context, *MsgTransferOwn func (UnimplementedMsgServer) AcceptOwnership(context.Context, *MsgAcceptOwnership) (*MsgAcceptOwnershipResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AcceptOwnership not implemented") } +func (UnimplementedMsgServer) SoftwareUpgrade(context.Context, *v1beta1.MsgSoftwareUpgrade) (*v1beta1.MsgSoftwareUpgradeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SoftwareUpgrade not implemented") +} func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} func (UnimplementedMsgServer) testEmbeddedByValue() {} @@ -172,6 +189,24 @@ func _Msg_AcceptOwnership_Handler(srv interface{}, ctx context.Context, dec func return interceptor(ctx, in, info, handler) } +func _Msg_SoftwareUpgrade_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v1beta1.MsgSoftwareUpgrade) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).SoftwareUpgrade(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_SoftwareUpgrade_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).SoftwareUpgrade(ctx, req.(*v1beta1.MsgSoftwareUpgrade)) + } + return interceptor(ctx, in, info, handler) +} + // Msg_ServiceDesc is the grpc.ServiceDesc for Msg service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -191,6 +226,10 @@ var Msg_ServiceDesc = grpc.ServiceDesc{ MethodName: "AcceptOwnership", Handler: _Msg_AcceptOwnership_Handler, }, + { + MethodName: "SoftwareUpgrade", + Handler: _Msg_SoftwareUpgrade_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "noble/authority/v1/tx.proto", diff --git a/client/cli/parse.go b/client/cli/parse.go new file mode 100644 index 0000000..45969ff --- /dev/null +++ b/client/cli/parse.go @@ -0,0 +1,23 @@ +package cli + +import ( + "github.com/spf13/pflag" + + "cosmossdk.io/x/upgrade/types" +) + +// parsePlan was copied from SDK becuase it was not exported +// https://github.com/cosmos/cosmos-sdk/blob/x/upgrade/v0.1.4/x/upgrade/client/cli/parse.go +func parsePlan(fs *pflag.FlagSet, name string) (types.Plan, error) { + height, err := fs.GetInt64(FlagUpgradeHeight) + if err != nil { + return types.Plan{}, err + } + + info, err := fs.GetString(FlagUpgradeInfo) + if err != nil { + return types.Plan{}, err + } + + return types.Plan{Name: name, Height: height, Info: info}, nil +} diff --git a/client/cli/tx.go b/client/cli/tx.go index 046c513..83410d1 100644 --- a/client/cli/tx.go +++ b/client/cli/tx.go @@ -8,15 +8,28 @@ package cli import ( "fmt" + "os" + "path/filepath" + "cosmossdk.io/x/upgrade/plan" + upgradetypes "cosmossdk.io/x/upgrade/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/tx" + sdk "github.com/cosmos/cosmos-sdk/types" authclient "github.com/cosmos/cosmos-sdk/x/auth/client" "github.com/noble-assets/authority/types" "github.com/spf13/cobra" ) +const ( + FlagUpgradeHeight = "upgrade-height" + FlagUpgradeInfo = "upgrade-info" + FlagNoValidate = "no-validate" + FlagNoChecksumRequired = "no-checksum-required" + FlagDaemonName = "daemon-name" +) + func GetTxCmd() *cobra.Command { cmd := &cobra.Command{ Use: types.ModuleName, @@ -24,6 +37,7 @@ func GetTxCmd() *cobra.Command { } cmd.AddCommand(NewCmdExecute()) + cmd.AddCommand(NewCmdSubmitUpgrade()) return cmd } @@ -54,3 +68,87 @@ func NewCmdExecute() *cobra.Command { return cmd } + +// NewCmdSubmitUpgrade has been adapted from the SDK's NewCmdSubmitUpgradeProposal +// https://github.com/cosmos/cosmos-sdk/blob/x/upgrade/v0.1.4/x/upgrade/client/cli/tx.go#L47 +func NewCmdSubmitUpgrade() *cobra.Command { + cmd := &cobra.Command{ + Use: "software-upgrade [--upgrade-height ] [--upgrade-info ] [flags]", + Args: cobra.ExactArgs(1), + Short: "Submit a software upgrade proposal", + Long: "Submit a software upgrade along with an initial deposit.\n" + + "Please specify a unique name and height for the upgrade to take effect.\n" + + "You may include info to reference a binary download link, in a format compatible with: https://docs.cosmos.network/main/build/tooling/cosmovisor", + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + + name := args[0] + p, err := parsePlan(cmd.Flags(), name) + if err != nil { + return err + } + + noValidate, err := cmd.Flags().GetBool(FlagNoValidate) + if err != nil { + return err + } + + if !noValidate { + daemonName, err := cmd.Flags().GetString(FlagDaemonName) + if err != nil { + return err + } + + noChecksum, err := cmd.Flags().GetBool(FlagNoChecksumRequired) + if err != nil { + return err + } + + var planInfo *plan.Info + if planInfo, err = plan.ParseInfo(p.Info, plan.ParseOptionEnforceChecksum(!noChecksum)); err != nil { + return err + } + + if err = planInfo.ValidateFull(daemonName); err != nil { + return err + } + } + + msgs := []sdk.Msg{ + &upgradetypes.MsgSoftwareUpgrade{ + // AUTHORITY MODULE SPECIFIC + // set to from address, check in message server + Authority: clientCtx.FromAddress.String(), + Plan: p, + }, + } + + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msgs...) + }, + } + + cmd.Flags().Int64(FlagUpgradeHeight, 0, "The height at which the upgrade must happen") + cmd.Flags().String(FlagUpgradeInfo, "", "Info for the upgrade plan such as new version download urls, etc.") + cmd.Flags().Bool(FlagNoValidate, false, "Skip validation of the upgrade info (dangerous!)") + cmd.Flags().Bool(FlagNoChecksumRequired, false, "Skip requirement of checksums for binaries in the upgrade info") + cmd.Flags().String(FlagDaemonName, getDefaultDaemonName(), "The name of the executable being upgraded (for upgrade-info validation). Default is the DAEMON_NAME env var if set, or else this executable") + + flags.AddTxFlagsToCmd(cmd) + + return cmd +} + +// getDefaultDaemonName gets the default name to use for the daemon. +// If a DAEMON_NAME env var is set, that is used. +// Otherwise, the last part of the currently running executable is used. +func getDefaultDaemonName() string { + // DAEMON_NAME is specifically used here to correspond with the Cosmovisor setup env vars. + name := os.Getenv("DAEMON_NAME") + if len(name) == 0 { + _, name = filepath.Split(os.Args[0]) + } + return name +} diff --git a/go.mod b/go.mod index 1337a8c..69a67d7 100644 --- a/go.mod +++ b/go.mod @@ -18,6 +18,7 @@ require ( github.com/golangci/golangci-lint v1.55.0 github.com/grpc-ecosystem/grpc-gateway v1.16.0 github.com/spf13/cobra v1.8.1 + github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.9.0 google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237 google.golang.org/grpc v1.64.1 @@ -263,7 +264,6 @@ require ( github.com/sourcegraph/go-diff v0.7.0 // indirect github.com/spf13/afero v1.11.0 // indirect github.com/spf13/cast v1.6.0 // indirect - github.com/spf13/pflag v1.0.5 // indirect github.com/spf13/viper v1.19.0 // indirect github.com/ssgreg/nlreturn/v2 v2.2.1 // indirect github.com/stbenjam/no-sprintf-host-port v0.1.1 // indirect diff --git a/keeper/keeper.go b/keeper/keeper.go index 05d4439..aa0d643 100644 --- a/keeper/keeper.go +++ b/keeper/keeper.go @@ -27,6 +27,7 @@ type Keeper struct { router baseapp.MessageRouter accountKeeper types.AccountKeeper bankKeeper types.BankKeeper + upgradeKeeper types.UpgradeKeeper } func NewKeeper( @@ -36,6 +37,7 @@ func NewKeeper( router baseapp.MessageRouter, accountKeeper types.AccountKeeper, bankKeeper types.BankKeeper, + upgradeKeeper types.UpgradeKeeper, ) *Keeper { builder := collections.NewSchemaBuilder(storeService) @@ -50,6 +52,7 @@ func NewKeeper( router: router, accountKeeper: accountKeeper, bankKeeper: bankKeeper, + upgradeKeeper: upgradeKeeper, } schema, err := builder.Build() diff --git a/keeper/msg_server.go b/keeper/msg_server.go index ff67fef..0ffe7fb 100644 --- a/keeper/msg_server.go +++ b/keeper/msg_server.go @@ -11,6 +11,7 @@ import ( "context" "cosmossdk.io/errors" + upgradetypes "cosmossdk.io/x/upgrade/types" abcitypes "github.com/cometbft/cometbft/abci/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/noble-assets/authority/types" @@ -127,6 +128,20 @@ func (k msgServer) AcceptOwnership(ctx context.Context, msg *types.MsgAcceptOwne }) } +func (k msgServer) SoftwareUpgrade(ctx context.Context, msg *upgradetypes.MsgSoftwareUpgrade) (*upgradetypes.MsgSoftwareUpgradeResponse, error) { + owner, _ := k.Owner.Get(ctx) + if msg.Authority != owner { + return nil, errors.Wrapf(types.ErrInvalidOwner, "expected %s, got %s", owner, msg.Authority) + } + + err := k.upgradeKeeper.ScheduleUpgrade(ctx, msg.Plan) + if err != nil { + return nil, err + } + + return &upgradetypes.MsgSoftwareUpgradeResponse{}, nil +} + // func validateMsgs(msgs []sdk.Msg) error { diff --git a/module.go b/module.go index 8d6103b..be02e7c 100644 --- a/module.go +++ b/module.go @@ -187,6 +187,7 @@ type ModuleInputs struct { Router baseapp.MessageRouter AccountKeeper types.AccountKeeper BankKeeper types.BankKeeper + UpgradeKeeper types.UpgradeKeeper } type ModuleOutputs struct { @@ -204,6 +205,7 @@ func ProvideModule(in ModuleInputs) ModuleOutputs { in.Router, in.AccountKeeper, in.BankKeeper, + in.UpgradeKeeper, ) m := NewAppModule(k, in.AccountKeeper) diff --git a/proto/noble/authority/v1/tx.proto b/proto/noble/authority/v1/tx.proto index 7a16fde..5f9d9dd 100644 --- a/proto/noble/authority/v1/tx.proto +++ b/proto/noble/authority/v1/tx.proto @@ -4,6 +4,7 @@ package noble.authority.v1; import "amino/amino.proto"; import "cosmos/msg/v1/msg.proto"; +import "cosmos/upgrade/v1beta1/tx.proto"; import "cosmos_proto/cosmos.proto"; import "gogoproto/gogo.proto"; import "google/protobuf/any.proto"; @@ -17,6 +18,8 @@ service Msg { rpc TransferOwnership(MsgTransferOwnership) returns (MsgTransferOwnershipResponse); rpc AcceptOwnership(MsgAcceptOwnership) returns (MsgAcceptOwnershipResponse); + + rpc SoftwareUpgrade(cosmos.upgrade.v1beta1.MsgSoftwareUpgrade) returns (cosmos.upgrade.v1beta1.MsgSoftwareUpgradeResponse); } // diff --git a/types/codec.go b/types/codec.go index f9a8059..e73766e 100644 --- a/types/codec.go +++ b/types/codec.go @@ -7,6 +7,7 @@ package types import ( + upgradetypes "cosmossdk.io/x/upgrade/types" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -17,6 +18,7 @@ func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { cdc.RegisterConcrete(&MsgExecute{}, "noble/Execute", nil) cdc.RegisterConcrete(&MsgTransferOwnership{}, "noble/TransferOwnership", nil) cdc.RegisterConcrete(&MsgAcceptOwnership{}, "noble/AcceptOwnership", nil) + cdc.RegisterConcrete(&upgradetypes.MsgSoftwareUpgrade{}, "noble/SoftwareUpgrade", nil) } func RegisterInterfaces(registry codectypes.InterfaceRegistry) { @@ -24,6 +26,7 @@ func RegisterInterfaces(registry codectypes.InterfaceRegistry) { &MsgExecute{}, &MsgTransferOwnership{}, &MsgAcceptOwnership{}, + &upgradetypes.MsgSoftwareUpgrade{}, ) msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) diff --git a/types/expected_keepers.go b/types/expected_keepers.go index fb2a701..e416c84 100644 --- a/types/expected_keepers.go +++ b/types/expected_keepers.go @@ -10,6 +10,7 @@ import ( "context" "cosmossdk.io/core/address" + upgradetypes "cosmossdk.io/x/upgrade/types" sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -22,3 +23,7 @@ type BankKeeper interface { GetAllBalances(ctx context.Context, addr sdk.AccAddress) sdk.Coins SendCoins(ctx context.Context, fromAddr, toAddr sdk.AccAddress, amt sdk.Coins) error } + +type UpgradeKeeper interface { + ScheduleUpgrade(ctx context.Context, plan upgradetypes.Plan) error +} diff --git a/types/tx.pb.go b/types/tx.pb.go index ede18c6..9515215 100644 --- a/types/tx.pb.go +++ b/types/tx.pb.go @@ -5,6 +5,7 @@ package types import ( context "context" + types1 "cosmossdk.io/x/upgrade/types" fmt "fmt" _ "github.com/cosmos/cosmos-proto" types "github.com/cosmos/cosmos-sdk/codec/types" @@ -273,39 +274,42 @@ func init() { func init() { proto.RegisterFile("noble/authority/v1/tx.proto", fileDescriptor_a7f9675ad166e349) } var fileDescriptor_a7f9675ad166e349 = []byte{ - // 501 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x54, 0xbf, 0x6f, 0xd3, 0x40, - 0x14, 0x8e, 0x13, 0xd1, 0x1f, 0x07, 0x08, 0xd5, 0x0a, 0xaa, 0x31, 0x95, 0x1b, 0x59, 0x02, 0xa2, - 0x48, 0xb9, 0x4b, 0x8b, 0x58, 0xb2, 0xa5, 0x12, 0x63, 0x84, 0x08, 0x4c, 0x2c, 0x95, 0xe3, 0xbe, - 0x5e, 0x2c, 0xc5, 0x77, 0x96, 0xdf, 0xb9, 0x69, 0x36, 0xc4, 0x84, 0x98, 0xd8, 0x58, 0xfb, 0x27, - 0x64, 0x60, 0xe3, 0x1f, 0x60, 0xac, 0x98, 0x18, 0x51, 0x32, 0x84, 0x3f, 0x03, 0xc5, 0x67, 0xa7, - 0x28, 0x26, 0x50, 0xd1, 0xc5, 0xf2, 0xf3, 0xf7, 0xbd, 0xf7, 0x7d, 0xef, 0xbd, 0xf3, 0x91, 0x87, - 0x42, 0xf6, 0x87, 0xc0, 0xbc, 0x44, 0x0d, 0x64, 0x1c, 0xa8, 0x31, 0x3b, 0x3b, 0x60, 0xea, 0x9c, - 0x46, 0xb1, 0x54, 0xd2, 0x34, 0x53, 0x90, 0x2e, 0x41, 0x7a, 0x76, 0x60, 0xef, 0x78, 0x61, 0x20, - 0x24, 0x4b, 0x9f, 0x9a, 0x66, 0xef, 0xfa, 0x12, 0x43, 0x89, 0x2c, 0x44, 0xbe, 0x48, 0x0f, 0x91, - 0x67, 0xc0, 0x03, 0x0d, 0x1c, 0xa7, 0x11, 0xd3, 0x41, 0x06, 0x55, 0xb9, 0xe4, 0x52, 0x7f, 0x5f, - 0xbc, 0xe5, 0x09, 0x5c, 0x4a, 0x3e, 0x04, 0x96, 0x46, 0xfd, 0xe4, 0x94, 0x79, 0x62, 0xac, 0x21, - 0xf7, 0x93, 0x41, 0x48, 0x17, 0xf9, 0xf3, 0x73, 0xf0, 0x13, 0x05, 0x66, 0x8b, 0x6c, 0x60, 0xc0, - 0x05, 0xc4, 0x96, 0x51, 0x33, 0xea, 0xdb, 0x47, 0xd6, 0xb7, 0xcf, 0xcd, 0x6a, 0xa6, 0xd0, 0x39, - 0x39, 0x89, 0x01, 0xf1, 0x95, 0x8a, 0x03, 0xc1, 0x7b, 0x19, 0xcf, 0x6c, 0x91, 0xad, 0x10, 0x10, - 0x3d, 0x0e, 0x68, 0x95, 0x6b, 0x95, 0xfa, 0xed, 0xc3, 0x2a, 0xd5, 0x72, 0x34, 0x97, 0xa3, 0x1d, - 0x31, 0xee, 0x2d, 0x59, 0xed, 0x47, 0xef, 0x2f, 0xf6, 0x4b, 0x3f, 0x2f, 0xf6, 0x4b, 0xef, 0xe6, - 0x93, 0x46, 0x56, 0xe6, 0xc3, 0x7c, 0xd2, 0xb8, 0xab, 0x67, 0x96, 0x59, 0x71, 0x29, 0x31, 0xaf, - 0x8c, 0xf5, 0x00, 0x23, 0x29, 0x10, 0x4c, 0x8b, 0x6c, 0xc6, 0x80, 0xc9, 0x50, 0xa1, 0x65, 0xd4, - 0x2a, 0xf5, 0x3b, 0xbd, 0x3c, 0x74, 0x27, 0x06, 0xa9, 0x76, 0x91, 0xbf, 0x8e, 0x3d, 0x81, 0xa7, - 0x10, 0xbf, 0x18, 0x09, 0x88, 0x71, 0x10, 0x44, 0xff, 0xd1, 0xd3, 0x33, 0xb2, 0x2d, 0x60, 0x74, - 0x2c, 0x17, 0x25, 0xac, 0xf2, 0x3f, 0x92, 0xb6, 0x04, 0x8c, 0x52, 0xb1, 0x36, 0x5b, 0xd3, 0xd8, - 0xae, 0x6e, 0xac, 0xe0, 0xcc, 0x75, 0xc8, 0xde, 0x9f, 0x1c, 0xe7, 0xcd, 0xba, 0x49, 0x3a, 0x82, - 0x8e, 0xef, 0x43, 0xa4, 0x6e, 0xd0, 0x4f, 0xbb, 0xb9, 0xc6, 0xd8, 0x7d, 0x6d, 0x6c, 0x45, 0xc0, - 0xdd, 0x23, 0x76, 0x51, 0x36, 0x37, 0x75, 0xf8, 0xa5, 0x4c, 0x2a, 0x5d, 0xe4, 0xe6, 0x4b, 0xb2, - 0x99, 0x9f, 0x1a, 0x87, 0x16, 0x4f, 0x34, 0xbd, 0x5a, 0x9e, 0xfd, 0xf8, 0xef, 0xf8, 0x72, 0xb9, - 0x92, 0xec, 0x14, 0xd7, 0x57, 0x5f, 0x93, 0x5c, 0x60, 0xda, 0xad, 0xeb, 0x32, 0x97, 0x82, 0x01, - 0xb9, 0xb7, 0x3a, 0xdd, 0x75, 0x5e, 0x57, 0x78, 0x36, 0xbd, 0x1e, 0x2f, 0x97, 0xb2, 0x6f, 0xbd, - 0x9d, 0x4f, 0x1a, 0xc6, 0x51, 0xe7, 0xeb, 0xd4, 0x31, 0x2e, 0xa7, 0x8e, 0xf1, 0x63, 0xea, 0x18, - 0x1f, 0x67, 0x4e, 0xe9, 0x72, 0xe6, 0x94, 0xbe, 0xcf, 0x9c, 0xd2, 0x9b, 0x27, 0x3c, 0x50, 0x83, - 0xa4, 0x4f, 0x7d, 0x19, 0xb2, 0xb4, 0x74, 0xd3, 0x43, 0x04, 0x85, 0xbf, 0x5d, 0x22, 0x6a, 0x1c, - 0x01, 0xf6, 0x37, 0xd2, 0xff, 0xea, 0xe9, 0xaf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa7, 0xef, 0x72, - 0x71, 0x64, 0x04, 0x00, 0x00, + // 549 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x54, 0x4f, 0x8f, 0xd2, 0x5e, + 0x14, 0xa5, 0x43, 0x7e, 0xf3, 0xe7, 0xfd, 0x34, 0x93, 0x69, 0x30, 0x53, 0xeb, 0xa4, 0x90, 0x26, + 0x2a, 0x21, 0xe1, 0x15, 0x30, 0x6e, 0xd8, 0x31, 0x89, 0x4b, 0x62, 0x64, 0x74, 0xe3, 0x66, 0x52, + 0xe0, 0xf2, 0x68, 0x42, 0xdf, 0xab, 0xef, 0xbe, 0xc2, 0xb0, 0x33, 0xae, 0x8c, 0x2b, 0x77, 0x6e, + 0xe7, 0x13, 0x18, 0x16, 0x7e, 0x08, 0x97, 0x13, 0x57, 0x2e, 0x0d, 0x2c, 0xf0, 0x63, 0x18, 0xfa, + 0x07, 0x0c, 0x88, 0x12, 0xdd, 0x34, 0xbd, 0x3d, 0xe7, 0xbe, 0x73, 0xee, 0xbd, 0xef, 0x96, 0xdc, + 0xe3, 0xa2, 0x3d, 0x00, 0xc7, 0x0d, 0x55, 0x5f, 0x48, 0x4f, 0x8d, 0x9d, 0x61, 0xd5, 0x51, 0x57, + 0x34, 0x90, 0x42, 0x09, 0x5d, 0x8f, 0x40, 0xba, 0x04, 0xe9, 0xb0, 0x6a, 0x9e, 0xb8, 0xbe, 0xc7, + 0x85, 0x13, 0x3d, 0x63, 0x9a, 0x79, 0xda, 0x11, 0xe8, 0x0b, 0x74, 0x7c, 0x64, 0x8b, 0x74, 0x1f, + 0x59, 0x02, 0xe4, 0x13, 0x20, 0x0c, 0x98, 0x74, 0xbb, 0xe0, 0x0c, 0xab, 0x6d, 0x50, 0xee, 0x4a, + 0xc0, 0xbc, 0x1b, 0x13, 0x2e, 0xa3, 0xc8, 0x89, 0x83, 0x04, 0xca, 0x31, 0xc1, 0x44, 0xfc, 0x7d, + 0xf1, 0x96, 0x26, 0x30, 0x21, 0xd8, 0x00, 0x9c, 0x28, 0x6a, 0x87, 0x3d, 0xc7, 0xe5, 0xe3, 0x18, + 0xb2, 0x3f, 0x68, 0x84, 0x34, 0x91, 0x3d, 0xb9, 0x82, 0x4e, 0xa8, 0x40, 0xaf, 0x90, 0x7d, 0xf4, + 0x18, 0x07, 0x69, 0x68, 0x05, 0xad, 0x78, 0x74, 0x6e, 0x7c, 0xf9, 0x54, 0xce, 0x25, 0x0a, 0x8d, + 0x6e, 0x57, 0x02, 0xe2, 0x85, 0x92, 0x1e, 0x67, 0xad, 0x84, 0xa7, 0x57, 0xc8, 0xa1, 0x0f, 0x88, + 0x2e, 0x03, 0x34, 0xf6, 0x0a, 0xd9, 0xe2, 0xff, 0xb5, 0x1c, 0x8d, 0xe5, 0x68, 0x2a, 0x47, 0x1b, + 0x7c, 0xdc, 0x5a, 0xb2, 0xea, 0xf7, 0xdf, 0x5e, 0xe7, 0x33, 0xdf, 0xaf, 0xf3, 0x99, 0x37, 0xf3, + 0x49, 0x29, 0x39, 0xe6, 0xdd, 0x7c, 0x52, 0xba, 0x1d, 0x37, 0x35, 0xb1, 0x62, 0x53, 0xa2, 0xaf, + 0x8c, 0xb5, 0x00, 0x03, 0xc1, 0x11, 0x74, 0x83, 0x1c, 0x48, 0xc0, 0x70, 0xa0, 0xd0, 0xd0, 0x0a, + 0xd9, 0xe2, 0xad, 0x56, 0x1a, 0xda, 0x13, 0x8d, 0xe4, 0x9a, 0xc8, 0x9e, 0x4b, 0x97, 0x63, 0x0f, + 0xe4, 0xd3, 0x11, 0x07, 0x89, 0x7d, 0x2f, 0xf8, 0x8b, 0x9a, 0x1e, 0x93, 0x23, 0x0e, 0xa3, 0x4b, + 0xb1, 0x38, 0xc2, 0xd8, 0xfb, 0x43, 0xd2, 0x21, 0x87, 0x51, 0x24, 0x56, 0x77, 0xb6, 0x14, 0x76, + 0x1a, 0x17, 0xb6, 0xe1, 0xcc, 0xb6, 0xc8, 0xd9, 0xaf, 0x1c, 0xa7, 0xc5, 0xda, 0x61, 0xd4, 0x82, + 0x46, 0xa7, 0x03, 0x81, 0xfa, 0x87, 0x7a, 0xea, 0xe5, 0x2d, 0xc6, 0xee, 0xc4, 0xc6, 0xd6, 0x04, + 0xec, 0x33, 0x62, 0x6e, 0xca, 0xa6, 0xa6, 0x6a, 0x1f, 0xb3, 0x24, 0xdb, 0x44, 0xa6, 0x3f, 0x23, + 0x07, 0xe9, 0xad, 0xb1, 0xe8, 0xe6, 0x95, 0xa7, 0xab, 0xe1, 0x99, 0x0f, 0x7e, 0x8f, 0x2f, 0x87, + 0x2b, 0xc8, 0xc9, 0xe6, 0xf8, 0x8a, 0x5b, 0x92, 0x37, 0x98, 0x66, 0x65, 0x57, 0xe6, 0x52, 0xd0, + 0x23, 0xc7, 0xeb, 0xdd, 0xdd, 0xe6, 0x75, 0x8d, 0x67, 0xd2, 0xdd, 0x78, 0x4b, 0xa9, 0x57, 0xe4, + 0xf8, 0x42, 0xf4, 0xd4, 0xc8, 0x95, 0xf0, 0x22, 0x5e, 0x6c, 0xbd, 0x44, 0x93, 0xa9, 0x25, 0x9b, + 0x4e, 0x93, 0x4d, 0x5f, 0x1c, 0xb3, 0xc6, 0x35, 0x6b, 0xbb, 0x73, 0x53, 0x49, 0xf3, 0xbf, 0xd7, + 0xf3, 0x49, 0x49, 0x3b, 0x6f, 0x7c, 0x9e, 0x5a, 0xda, 0xcd, 0xd4, 0xd2, 0xbe, 0x4d, 0x2d, 0xed, + 0xfd, 0xcc, 0xca, 0xdc, 0xcc, 0xac, 0xcc, 0xd7, 0x99, 0x95, 0x79, 0xf9, 0x90, 0x79, 0xaa, 0x1f, + 0xb6, 0x69, 0x47, 0xf8, 0x4e, 0x54, 0x4d, 0xd9, 0x45, 0x04, 0x85, 0x3f, 0xfd, 0xd8, 0xd4, 0x38, + 0x00, 0x6c, 0xef, 0x47, 0xab, 0xfc, 0xe8, 0x47, 0x00, 0x00, 0x00, 0xff, 0xff, 0xdf, 0xc6, 0x6d, + 0xd4, 0xf8, 0x04, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -323,6 +327,7 @@ type MsgClient interface { Execute(ctx context.Context, in *MsgExecute, opts ...grpc.CallOption) (*MsgExecuteResponse, error) TransferOwnership(ctx context.Context, in *MsgTransferOwnership, opts ...grpc.CallOption) (*MsgTransferOwnershipResponse, error) AcceptOwnership(ctx context.Context, in *MsgAcceptOwnership, opts ...grpc.CallOption) (*MsgAcceptOwnershipResponse, error) + SoftwareUpgrade(ctx context.Context, in *types1.MsgSoftwareUpgrade, opts ...grpc.CallOption) (*types1.MsgSoftwareUpgradeResponse, error) } type msgClient struct { @@ -360,11 +365,21 @@ func (c *msgClient) AcceptOwnership(ctx context.Context, in *MsgAcceptOwnership, return out, nil } +func (c *msgClient) SoftwareUpgrade(ctx context.Context, in *types1.MsgSoftwareUpgrade, opts ...grpc.CallOption) (*types1.MsgSoftwareUpgradeResponse, error) { + out := new(types1.MsgSoftwareUpgradeResponse) + err := c.cc.Invoke(ctx, "/noble.authority.v1.Msg/SoftwareUpgrade", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // MsgServer is the server API for Msg service. type MsgServer interface { Execute(context.Context, *MsgExecute) (*MsgExecuteResponse, error) TransferOwnership(context.Context, *MsgTransferOwnership) (*MsgTransferOwnershipResponse, error) AcceptOwnership(context.Context, *MsgAcceptOwnership) (*MsgAcceptOwnershipResponse, error) + SoftwareUpgrade(context.Context, *types1.MsgSoftwareUpgrade) (*types1.MsgSoftwareUpgradeResponse, error) } // UnimplementedMsgServer can be embedded to have forward compatible implementations. @@ -380,6 +395,9 @@ func (*UnimplementedMsgServer) TransferOwnership(ctx context.Context, req *MsgTr func (*UnimplementedMsgServer) AcceptOwnership(ctx context.Context, req *MsgAcceptOwnership) (*MsgAcceptOwnershipResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AcceptOwnership not implemented") } +func (*UnimplementedMsgServer) SoftwareUpgrade(ctx context.Context, req *types1.MsgSoftwareUpgrade) (*types1.MsgSoftwareUpgradeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SoftwareUpgrade not implemented") +} func RegisterMsgServer(s grpc1.Server, srv MsgServer) { s.RegisterService(&_Msg_serviceDesc, srv) @@ -439,6 +457,24 @@ func _Msg_AcceptOwnership_Handler(srv interface{}, ctx context.Context, dec func return interceptor(ctx, in, info, handler) } +func _Msg_SoftwareUpgrade_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(types1.MsgSoftwareUpgrade) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).SoftwareUpgrade(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/noble.authority.v1.Msg/SoftwareUpgrade", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).SoftwareUpgrade(ctx, req.(*types1.MsgSoftwareUpgrade)) + } + return interceptor(ctx, in, info, handler) +} + var Msg_serviceDesc = _Msg_serviceDesc var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "noble.authority.v1.Msg", @@ -456,6 +492,10 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "AcceptOwnership", Handler: _Msg_AcceptOwnership_Handler, }, + { + MethodName: "SoftwareUpgrade", + Handler: _Msg_SoftwareUpgrade_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "noble/authority/v1/tx.proto", diff --git a/utils/mocks/authority.go b/utils/mocks/authority.go index 2538849..11c91c7 100644 --- a/utils/mocks/authority.go +++ b/utils/mocks/authority.go @@ -9,6 +9,7 @@ package mocks import ( storetypes "cosmossdk.io/store/types" "cosmossdk.io/x/upgrade" + upgradekeeper "cosmossdk.io/x/upgrade/keeper" upgradetypes "cosmossdk.io/x/upgrade/types" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/codec" @@ -29,7 +30,12 @@ func AuthorityKeeper() (*keeper.Keeper, sdk.Context) { } func AuthorityKeeperWithBank(bank types.BankKeeper) (*keeper.Keeper, sdk.Context) { - key := storetypes.NewKVStoreKey(types.ModuleName) + keys := storetypes.NewKVStoreKeys( + types.ModuleName, + upgradetypes.StoreKey, + ) + + // key := storetypes.NewKVStoreKey(types.ModuleName) tkey := storetypes.NewTransientStoreKey("transient_authority") cfg := MakeTestEncodingConfig("noble", upgrade.AppModuleBasic{}) @@ -39,12 +45,13 @@ func AuthorityKeeperWithBank(bank types.BankKeeper) (*keeper.Keeper, sdk.Context return keeper.NewKeeper( cfg.Codec, - runtime.NewKVStoreService(key), + runtime.NewKVStoreService(keys[types.ModuleName]), runtime.ProvideEventService(), router, AccountKeeper{}, bank, - ), testutil.DefaultContext(key, tkey) + upgradekeeper.Keeper{}, + ), testutil.DefaultContext(keys[types.ModuleName], tkey) } // MakeTestEncodingConfig is a modified testutil.MakeTestEncodingConfig that From 6ded2c805367866bf66c883124305e9497fb3800 Mon Sep 17 00:00:00 2001 From: Dan Kanefsky Date: Fri, 8 Nov 2024 11:47:54 -0800 Subject: [PATCH 2/8] feat: simplify, remove msg server --- api/v1/tx.pulsar.go | 186 ++++++++++++++---------------- api/v1/tx_grpc.pb.go | 39 ------- client/cli/tx.go | 22 ++-- keeper/keeper.go | 3 - keeper/msg_server.go | 15 --- module.go | 2 - proto/noble/authority/v1/tx.proto | 3 - types/codec.go | 3 - types/expected_keepers.go | 5 - types/tx.pb.go | 106 ++++++----------- utils/mocks/authority.go | 13 +-- 11 files changed, 133 insertions(+), 264 deletions(-) diff --git a/api/v1/tx.pulsar.go b/api/v1/tx.pulsar.go index f212099..a235472 100644 --- a/api/v1/tx.pulsar.go +++ b/api/v1/tx.pulsar.go @@ -4,7 +4,6 @@ package authorityv1 import ( _ "cosmossdk.io/api/amino" _ "cosmossdk.io/api/cosmos/msg/v1" - v1beta1 "cosmossdk.io/api/cosmos/upgrade/v1beta1" fmt "fmt" _ "github.com/cosmos/cosmos-proto" runtime "github.com/cosmos/cosmos-proto/runtime" @@ -2901,90 +2900,81 @@ var file_noble_authority_v1_tx_proto_rawDesc = []byte{ 0x6f, 0x62, 0x6c, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x2e, 0x76, 0x31, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x73, 0x67, - 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x2f, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x97, 0x01, 0x0a, 0x0a, 0x4d, - 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x69, 0x67, - 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, - 0x69, 0x6e, 0x67, 0x52, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, 0x30, 0x0a, 0x08, 0x6d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x41, 0x6e, 0x79, 0x52, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x3a, 0x25, 0x88, - 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x69, 0x67, 0x6e, - 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x0d, 0x6e, 0x6f, 0x62, 0x6c, 0x65, 0x2f, 0x45, 0x78, 0x65, - 0x63, 0x75, 0x74, 0x65, 0x22, 0x2e, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, - 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, - 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x07, 0x72, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x73, 0x22, 0xb0, 0x01, 0x0a, 0x14, 0x4d, 0x73, 0x67, 0x54, 0x72, 0x61, 0x6e, - 0x73, 0x66, 0x65, 0x72, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x12, 0x30, 0x0a, - 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, - 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, - 0x35, 0x0a, 0x09, 0x6e, 0x65, 0x77, 0x5f, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x08, 0x6e, 0x65, - 0x77, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x3a, 0x2f, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, - 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x17, - 0x6e, 0x6f, 0x62, 0x6c, 0x65, 0x2f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x4f, 0x77, - 0x6e, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x22, 0x1e, 0x0a, 0x1c, 0x4d, 0x73, 0x67, 0x54, 0x72, - 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x75, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x41, 0x63, - 0x63, 0x65, 0x70, 0x74, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x12, 0x30, 0x0a, - 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, - 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x3a, - 0x2d, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x69, - 0x67, 0x6e, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x15, 0x6e, 0x6f, 0x62, 0x6c, 0x65, 0x2f, 0x41, - 0x63, 0x63, 0x65, 0x70, 0x74, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x22, 0x1c, - 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x4f, 0x77, 0x6e, 0x65, 0x72, - 0x73, 0x68, 0x69, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xae, 0x03, 0x0a, - 0x03, 0x4d, 0x73, 0x67, 0x12, 0x51, 0x0a, 0x07, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x12, - 0x1e, 0x2e, 0x6e, 0x6f, 0x62, 0x6c, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, - 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x1a, - 0x26, 0x2e, 0x6e, 0x6f, 0x62, 0x6c, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, - 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6f, 0x0a, 0x11, 0x54, 0x72, 0x61, 0x6e, 0x73, - 0x66, 0x65, 0x72, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x12, 0x28, 0x2e, 0x6e, - 0x6f, 0x62, 0x6c, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x2e, 0x76, - 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x4f, 0x77, 0x6e, - 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x1a, 0x30, 0x2e, 0x6e, 0x6f, 0x62, 0x6c, 0x65, 0x2e, 0x61, - 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x69, 0x0a, 0x0f, 0x41, 0x63, 0x63, 0x65, - 0x70, 0x74, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x12, 0x26, 0x2e, 0x6e, 0x6f, + 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, + 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x97, 0x01, 0x0a, 0x0a, 0x4d, 0x73, + 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, + 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, + 0x6e, 0x67, 0x52, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, 0x30, 0x0a, 0x08, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, + 0x6e, 0x79, 0x52, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x3a, 0x25, 0x88, 0xa0, + 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, + 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x0d, 0x6e, 0x6f, 0x62, 0x6c, 0x65, 0x2f, 0x45, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x65, 0x22, 0x2e, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, + 0x6c, 0x74, 0x73, 0x22, 0xb0, 0x01, 0x0a, 0x14, 0x4d, 0x73, 0x67, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x66, 0x65, 0x72, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x12, 0x30, 0x0a, 0x06, + 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, + 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, 0x35, + 0x0a, 0x09, 0x6e, 0x65, 0x77, 0x5f, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x08, 0x6e, 0x65, 0x77, + 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x3a, 0x2f, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x82, + 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x17, 0x6e, + 0x6f, 0x62, 0x6c, 0x65, 0x2f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x4f, 0x77, 0x6e, + 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x22, 0x1e, 0x0a, 0x1c, 0x4d, 0x73, 0x67, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x66, 0x65, 0x72, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x75, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x41, 0x63, 0x63, + 0x65, 0x70, 0x74, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x12, 0x30, 0x0a, 0x06, + 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, + 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x3a, 0x2d, + 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x69, 0x67, + 0x6e, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x15, 0x6e, 0x6f, 0x62, 0x6c, 0x65, 0x2f, 0x41, 0x63, + 0x63, 0x65, 0x70, 0x74, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x22, 0x1c, 0x0a, + 0x1a, 0x4d, 0x73, 0x67, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, + 0x68, 0x69, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xbb, 0x02, 0x0a, 0x03, + 0x4d, 0x73, 0x67, 0x12, 0x51, 0x0a, 0x07, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x12, 0x1e, + 0x2e, 0x6e, 0x6f, 0x62, 0x6c, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, + 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x1a, 0x26, + 0x2e, 0x6e, 0x6f, 0x62, 0x6c, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, + 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6f, 0x0a, 0x11, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, + 0x65, 0x72, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x12, 0x28, 0x2e, 0x6e, 0x6f, 0x62, 0x6c, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x2e, 0x76, 0x31, - 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, - 0x68, 0x69, 0x70, 0x1a, 0x2e, 0x2e, 0x6e, 0x6f, 0x62, 0x6c, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, - 0x6f, 0x72, 0x69, 0x74, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x63, 0x63, 0x65, - 0x70, 0x74, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x71, 0x0a, 0x0f, 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x55, - 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x12, 0x2a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x4d, 0x73, 0x67, 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x55, 0x70, 0x67, 0x72, 0x61, - 0x64, 0x65, 0x1a, 0x32, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x75, 0x70, 0x67, 0x72, - 0x61, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, - 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xd1, 0x01, - 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x6e, 0x6f, 0x62, 0x6c, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, - 0x6f, 0x72, 0x69, 0x74, 0x79, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0x5a, 0x44, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x6e, 0x6f, 0x62, 0x6c, 0x65, 0x2d, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x61, 0x75, 0x74, - 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6e, 0x6f, 0x62, 0x6c, 0x65, - 0x2f, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x2f, 0x76, 0x31, 0x3b, 0x61, 0x75, - 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4e, 0x41, 0x58, 0xaa, - 0x02, 0x12, 0x4e, 0x6f, 0x62, 0x6c, 0x65, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, - 0x79, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x12, 0x4e, 0x6f, 0x62, 0x6c, 0x65, 0x5c, 0x41, 0x75, 0x74, - 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1e, 0x4e, 0x6f, 0x62, 0x6c, - 0x65, 0x5c, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x5c, 0x56, 0x31, 0x5c, 0x47, - 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x14, 0x4e, 0x6f, 0x62, - 0x6c, 0x65, 0x3a, 0x3a, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x3a, 0x3a, 0x56, - 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x2e, 0x4d, 0x73, 0x67, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x4f, 0x77, 0x6e, 0x65, + 0x72, 0x73, 0x68, 0x69, 0x70, 0x1a, 0x30, 0x2e, 0x6e, 0x6f, 0x62, 0x6c, 0x65, 0x2e, 0x61, 0x75, + 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x69, 0x0a, 0x0f, 0x41, 0x63, 0x63, 0x65, 0x70, + 0x74, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x12, 0x26, 0x2e, 0x6e, 0x6f, 0x62, + 0x6c, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x2e, 0x76, 0x31, 0x2e, + 0x4d, 0x73, 0x67, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x68, + 0x69, 0x70, 0x1a, 0x2e, 0x2e, 0x6e, 0x6f, 0x62, 0x6c, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, + 0x72, 0x69, 0x74, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x63, 0x63, 0x65, 0x70, + 0x74, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xd1, 0x01, 0x0a, 0x16, 0x63, 0x6f, + 0x6d, 0x2e, 0x6e, 0x6f, 0x62, 0x6c, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, + 0x79, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x44, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x6f, 0x62, 0x6c, + 0x65, 0x2d, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, + 0x74, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6e, 0x6f, 0x62, 0x6c, 0x65, 0x2f, 0x61, 0x75, 0x74, + 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x2f, 0x76, 0x31, 0x3b, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, + 0x69, 0x74, 0x79, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4e, 0x41, 0x58, 0xaa, 0x02, 0x12, 0x4e, 0x6f, + 0x62, 0x6c, 0x65, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x2e, 0x56, 0x31, + 0xca, 0x02, 0x12, 0x4e, 0x6f, 0x62, 0x6c, 0x65, 0x5c, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, + 0x74, 0x79, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1e, 0x4e, 0x6f, 0x62, 0x6c, 0x65, 0x5c, 0x41, 0x75, + 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x14, 0x4e, 0x6f, 0x62, 0x6c, 0x65, 0x3a, 0x3a, + 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -3001,28 +2991,24 @@ func file_noble_authority_v1_tx_proto_rawDescGZIP() []byte { var file_noble_authority_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 6) var file_noble_authority_v1_tx_proto_goTypes = []interface{}{ - (*MsgExecute)(nil), // 0: noble.authority.v1.MsgExecute - (*MsgExecuteResponse)(nil), // 1: noble.authority.v1.MsgExecuteResponse - (*MsgTransferOwnership)(nil), // 2: noble.authority.v1.MsgTransferOwnership - (*MsgTransferOwnershipResponse)(nil), // 3: noble.authority.v1.MsgTransferOwnershipResponse - (*MsgAcceptOwnership)(nil), // 4: noble.authority.v1.MsgAcceptOwnership - (*MsgAcceptOwnershipResponse)(nil), // 5: noble.authority.v1.MsgAcceptOwnershipResponse - (*anypb.Any)(nil), // 6: google.protobuf.Any - (*v1beta1.MsgSoftwareUpgrade)(nil), // 7: cosmos.upgrade.v1beta1.MsgSoftwareUpgrade - (*v1beta1.MsgSoftwareUpgradeResponse)(nil), // 8: cosmos.upgrade.v1beta1.MsgSoftwareUpgradeResponse + (*MsgExecute)(nil), // 0: noble.authority.v1.MsgExecute + (*MsgExecuteResponse)(nil), // 1: noble.authority.v1.MsgExecuteResponse + (*MsgTransferOwnership)(nil), // 2: noble.authority.v1.MsgTransferOwnership + (*MsgTransferOwnershipResponse)(nil), // 3: noble.authority.v1.MsgTransferOwnershipResponse + (*MsgAcceptOwnership)(nil), // 4: noble.authority.v1.MsgAcceptOwnership + (*MsgAcceptOwnershipResponse)(nil), // 5: noble.authority.v1.MsgAcceptOwnershipResponse + (*anypb.Any)(nil), // 6: google.protobuf.Any } var file_noble_authority_v1_tx_proto_depIdxs = []int32{ 6, // 0: noble.authority.v1.MsgExecute.messages:type_name -> google.protobuf.Any 0, // 1: noble.authority.v1.Msg.Execute:input_type -> noble.authority.v1.MsgExecute 2, // 2: noble.authority.v1.Msg.TransferOwnership:input_type -> noble.authority.v1.MsgTransferOwnership 4, // 3: noble.authority.v1.Msg.AcceptOwnership:input_type -> noble.authority.v1.MsgAcceptOwnership - 7, // 4: noble.authority.v1.Msg.SoftwareUpgrade:input_type -> cosmos.upgrade.v1beta1.MsgSoftwareUpgrade - 1, // 5: noble.authority.v1.Msg.Execute:output_type -> noble.authority.v1.MsgExecuteResponse - 3, // 6: noble.authority.v1.Msg.TransferOwnership:output_type -> noble.authority.v1.MsgTransferOwnershipResponse - 5, // 7: noble.authority.v1.Msg.AcceptOwnership:output_type -> noble.authority.v1.MsgAcceptOwnershipResponse - 8, // 8: noble.authority.v1.Msg.SoftwareUpgrade:output_type -> cosmos.upgrade.v1beta1.MsgSoftwareUpgradeResponse - 5, // [5:9] is the sub-list for method output_type - 1, // [1:5] is the sub-list for method input_type + 1, // 4: noble.authority.v1.Msg.Execute:output_type -> noble.authority.v1.MsgExecuteResponse + 3, // 5: noble.authority.v1.Msg.TransferOwnership:output_type -> noble.authority.v1.MsgTransferOwnershipResponse + 5, // 6: noble.authority.v1.Msg.AcceptOwnership:output_type -> noble.authority.v1.MsgAcceptOwnershipResponse + 4, // [4:7] is the sub-list for method output_type + 1, // [1:4] is the sub-list for method input_type 1, // [1:1] is the sub-list for extension type_name 1, // [1:1] is the sub-list for extension extendee 0, // [0:1] is the sub-list for field type_name diff --git a/api/v1/tx_grpc.pb.go b/api/v1/tx_grpc.pb.go index b5e4cf2..065589b 100644 --- a/api/v1/tx_grpc.pb.go +++ b/api/v1/tx_grpc.pb.go @@ -8,7 +8,6 @@ package authorityv1 import ( context "context" - v1beta1 "cosmossdk.io/api/cosmos/upgrade/v1beta1" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -23,7 +22,6 @@ const ( Msg_Execute_FullMethodName = "/noble.authority.v1.Msg/Execute" Msg_TransferOwnership_FullMethodName = "/noble.authority.v1.Msg/TransferOwnership" Msg_AcceptOwnership_FullMethodName = "/noble.authority.v1.Msg/AcceptOwnership" - Msg_SoftwareUpgrade_FullMethodName = "/noble.authority.v1.Msg/SoftwareUpgrade" ) // MsgClient is the client API for Msg service. @@ -33,7 +31,6 @@ type MsgClient interface { Execute(ctx context.Context, in *MsgExecute, opts ...grpc.CallOption) (*MsgExecuteResponse, error) TransferOwnership(ctx context.Context, in *MsgTransferOwnership, opts ...grpc.CallOption) (*MsgTransferOwnershipResponse, error) AcceptOwnership(ctx context.Context, in *MsgAcceptOwnership, opts ...grpc.CallOption) (*MsgAcceptOwnershipResponse, error) - SoftwareUpgrade(ctx context.Context, in *v1beta1.MsgSoftwareUpgrade, opts ...grpc.CallOption) (*v1beta1.MsgSoftwareUpgradeResponse, error) } type msgClient struct { @@ -74,16 +71,6 @@ func (c *msgClient) AcceptOwnership(ctx context.Context, in *MsgAcceptOwnership, return out, nil } -func (c *msgClient) SoftwareUpgrade(ctx context.Context, in *v1beta1.MsgSoftwareUpgrade, opts ...grpc.CallOption) (*v1beta1.MsgSoftwareUpgradeResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(v1beta1.MsgSoftwareUpgradeResponse) - err := c.cc.Invoke(ctx, Msg_SoftwareUpgrade_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - // MsgServer is the server API for Msg service. // All implementations must embed UnimplementedMsgServer // for forward compatibility. @@ -91,7 +78,6 @@ type MsgServer interface { Execute(context.Context, *MsgExecute) (*MsgExecuteResponse, error) TransferOwnership(context.Context, *MsgTransferOwnership) (*MsgTransferOwnershipResponse, error) AcceptOwnership(context.Context, *MsgAcceptOwnership) (*MsgAcceptOwnershipResponse, error) - SoftwareUpgrade(context.Context, *v1beta1.MsgSoftwareUpgrade) (*v1beta1.MsgSoftwareUpgradeResponse, error) mustEmbedUnimplementedMsgServer() } @@ -111,9 +97,6 @@ func (UnimplementedMsgServer) TransferOwnership(context.Context, *MsgTransferOwn func (UnimplementedMsgServer) AcceptOwnership(context.Context, *MsgAcceptOwnership) (*MsgAcceptOwnershipResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AcceptOwnership not implemented") } -func (UnimplementedMsgServer) SoftwareUpgrade(context.Context, *v1beta1.MsgSoftwareUpgrade) (*v1beta1.MsgSoftwareUpgradeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SoftwareUpgrade not implemented") -} func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} func (UnimplementedMsgServer) testEmbeddedByValue() {} @@ -189,24 +172,6 @@ func _Msg_AcceptOwnership_Handler(srv interface{}, ctx context.Context, dec func return interceptor(ctx, in, info, handler) } -func _Msg_SoftwareUpgrade_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(v1beta1.MsgSoftwareUpgrade) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).SoftwareUpgrade(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Msg_SoftwareUpgrade_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).SoftwareUpgrade(ctx, req.(*v1beta1.MsgSoftwareUpgrade)) - } - return interceptor(ctx, in, info, handler) -} - // Msg_ServiceDesc is the grpc.ServiceDesc for Msg service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -226,10 +191,6 @@ var Msg_ServiceDesc = grpc.ServiceDesc{ MethodName: "AcceptOwnership", Handler: _Msg_AcceptOwnership_Handler, }, - { - MethodName: "SoftwareUpgrade", - Handler: _Msg_SoftwareUpgrade_Handler, - }, }, Streams: []grpc.StreamDesc{}, Metadata: "noble/authority/v1/tx.proto", diff --git a/client/cli/tx.go b/client/cli/tx.go index 83410d1..c6dfc18 100644 --- a/client/cli/tx.go +++ b/client/cli/tx.go @@ -75,8 +75,8 @@ func NewCmdSubmitUpgrade() *cobra.Command { cmd := &cobra.Command{ Use: "software-upgrade [--upgrade-height ] [--upgrade-info ] [flags]", Args: cobra.ExactArgs(1), - Short: "Submit a software upgrade proposal", - Long: "Submit a software upgrade along with an initial deposit.\n" + + Short: "Schedule a software upgrade on chain", + Long: "Schedule a software upgrade on chain.\n" + "Please specify a unique name and height for the upgrade to take effect.\n" + "You may include info to reference a binary download link, in a format compatible with: https://docs.cosmos.network/main/build/tooling/cosmovisor", RunE: func(cmd *cobra.Command, args []string) error { @@ -117,16 +117,16 @@ func NewCmdSubmitUpgrade() *cobra.Command { } } - msgs := []sdk.Msg{ - &upgradetypes.MsgSoftwareUpgrade{ - // AUTHORITY MODULE SPECIFIC - // set to from address, check in message server - Authority: clientCtx.FromAddress.String(), - Plan: p, - }, - } + msgExecute := types.NewMsgExecute( + clientCtx.FromAddress.String(), + []sdk.Msg{ + &upgradetypes.MsgSoftwareUpgrade{ + Authority: types.ModuleAddress.String(), + Plan: p, + }, + }) - return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msgs...) + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msgExecute) }, } diff --git a/keeper/keeper.go b/keeper/keeper.go index aa0d643..05d4439 100644 --- a/keeper/keeper.go +++ b/keeper/keeper.go @@ -27,7 +27,6 @@ type Keeper struct { router baseapp.MessageRouter accountKeeper types.AccountKeeper bankKeeper types.BankKeeper - upgradeKeeper types.UpgradeKeeper } func NewKeeper( @@ -37,7 +36,6 @@ func NewKeeper( router baseapp.MessageRouter, accountKeeper types.AccountKeeper, bankKeeper types.BankKeeper, - upgradeKeeper types.UpgradeKeeper, ) *Keeper { builder := collections.NewSchemaBuilder(storeService) @@ -52,7 +50,6 @@ func NewKeeper( router: router, accountKeeper: accountKeeper, bankKeeper: bankKeeper, - upgradeKeeper: upgradeKeeper, } schema, err := builder.Build() diff --git a/keeper/msg_server.go b/keeper/msg_server.go index 0ffe7fb..ff67fef 100644 --- a/keeper/msg_server.go +++ b/keeper/msg_server.go @@ -11,7 +11,6 @@ import ( "context" "cosmossdk.io/errors" - upgradetypes "cosmossdk.io/x/upgrade/types" abcitypes "github.com/cometbft/cometbft/abci/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/noble-assets/authority/types" @@ -128,20 +127,6 @@ func (k msgServer) AcceptOwnership(ctx context.Context, msg *types.MsgAcceptOwne }) } -func (k msgServer) SoftwareUpgrade(ctx context.Context, msg *upgradetypes.MsgSoftwareUpgrade) (*upgradetypes.MsgSoftwareUpgradeResponse, error) { - owner, _ := k.Owner.Get(ctx) - if msg.Authority != owner { - return nil, errors.Wrapf(types.ErrInvalidOwner, "expected %s, got %s", owner, msg.Authority) - } - - err := k.upgradeKeeper.ScheduleUpgrade(ctx, msg.Plan) - if err != nil { - return nil, err - } - - return &upgradetypes.MsgSoftwareUpgradeResponse{}, nil -} - // func validateMsgs(msgs []sdk.Msg) error { diff --git a/module.go b/module.go index be02e7c..8d6103b 100644 --- a/module.go +++ b/module.go @@ -187,7 +187,6 @@ type ModuleInputs struct { Router baseapp.MessageRouter AccountKeeper types.AccountKeeper BankKeeper types.BankKeeper - UpgradeKeeper types.UpgradeKeeper } type ModuleOutputs struct { @@ -205,7 +204,6 @@ func ProvideModule(in ModuleInputs) ModuleOutputs { in.Router, in.AccountKeeper, in.BankKeeper, - in.UpgradeKeeper, ) m := NewAppModule(k, in.AccountKeeper) diff --git a/proto/noble/authority/v1/tx.proto b/proto/noble/authority/v1/tx.proto index 5f9d9dd..7a16fde 100644 --- a/proto/noble/authority/v1/tx.proto +++ b/proto/noble/authority/v1/tx.proto @@ -4,7 +4,6 @@ package noble.authority.v1; import "amino/amino.proto"; import "cosmos/msg/v1/msg.proto"; -import "cosmos/upgrade/v1beta1/tx.proto"; import "cosmos_proto/cosmos.proto"; import "gogoproto/gogo.proto"; import "google/protobuf/any.proto"; @@ -18,8 +17,6 @@ service Msg { rpc TransferOwnership(MsgTransferOwnership) returns (MsgTransferOwnershipResponse); rpc AcceptOwnership(MsgAcceptOwnership) returns (MsgAcceptOwnershipResponse); - - rpc SoftwareUpgrade(cosmos.upgrade.v1beta1.MsgSoftwareUpgrade) returns (cosmos.upgrade.v1beta1.MsgSoftwareUpgradeResponse); } // diff --git a/types/codec.go b/types/codec.go index e73766e..f9a8059 100644 --- a/types/codec.go +++ b/types/codec.go @@ -7,7 +7,6 @@ package types import ( - upgradetypes "cosmossdk.io/x/upgrade/types" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -18,7 +17,6 @@ func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { cdc.RegisterConcrete(&MsgExecute{}, "noble/Execute", nil) cdc.RegisterConcrete(&MsgTransferOwnership{}, "noble/TransferOwnership", nil) cdc.RegisterConcrete(&MsgAcceptOwnership{}, "noble/AcceptOwnership", nil) - cdc.RegisterConcrete(&upgradetypes.MsgSoftwareUpgrade{}, "noble/SoftwareUpgrade", nil) } func RegisterInterfaces(registry codectypes.InterfaceRegistry) { @@ -26,7 +24,6 @@ func RegisterInterfaces(registry codectypes.InterfaceRegistry) { &MsgExecute{}, &MsgTransferOwnership{}, &MsgAcceptOwnership{}, - &upgradetypes.MsgSoftwareUpgrade{}, ) msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) diff --git a/types/expected_keepers.go b/types/expected_keepers.go index e416c84..fb2a701 100644 --- a/types/expected_keepers.go +++ b/types/expected_keepers.go @@ -10,7 +10,6 @@ import ( "context" "cosmossdk.io/core/address" - upgradetypes "cosmossdk.io/x/upgrade/types" sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -23,7 +22,3 @@ type BankKeeper interface { GetAllBalances(ctx context.Context, addr sdk.AccAddress) sdk.Coins SendCoins(ctx context.Context, fromAddr, toAddr sdk.AccAddress, amt sdk.Coins) error } - -type UpgradeKeeper interface { - ScheduleUpgrade(ctx context.Context, plan upgradetypes.Plan) error -} diff --git a/types/tx.pb.go b/types/tx.pb.go index 9515215..ede18c6 100644 --- a/types/tx.pb.go +++ b/types/tx.pb.go @@ -5,7 +5,6 @@ package types import ( context "context" - types1 "cosmossdk.io/x/upgrade/types" fmt "fmt" _ "github.com/cosmos/cosmos-proto" types "github.com/cosmos/cosmos-sdk/codec/types" @@ -274,42 +273,39 @@ func init() { func init() { proto.RegisterFile("noble/authority/v1/tx.proto", fileDescriptor_a7f9675ad166e349) } var fileDescriptor_a7f9675ad166e349 = []byte{ - // 549 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x54, 0x4f, 0x8f, 0xd2, 0x5e, - 0x14, 0xa5, 0x43, 0x7e, 0xf3, 0xe7, 0xfd, 0x34, 0x93, 0x69, 0x30, 0x53, 0xeb, 0xa4, 0x90, 0x26, - 0x2a, 0x21, 0xe1, 0x15, 0x30, 0x6e, 0xd8, 0x31, 0x89, 0x4b, 0x62, 0x64, 0x74, 0xe3, 0x66, 0x52, - 0xe0, 0xf2, 0x68, 0x42, 0xdf, 0xab, 0xef, 0xbe, 0xc2, 0xb0, 0x33, 0xae, 0x8c, 0x2b, 0x77, 0x6e, - 0xe7, 0x13, 0x18, 0x16, 0x7e, 0x08, 0x97, 0x13, 0x57, 0x2e, 0x0d, 0x2c, 0xf0, 0x63, 0x18, 0xfa, - 0x07, 0x0c, 0x88, 0x12, 0xdd, 0x34, 0xbd, 0x3d, 0xe7, 0xbe, 0x73, 0xee, 0xbd, 0xef, 0x96, 0xdc, - 0xe3, 0xa2, 0x3d, 0x00, 0xc7, 0x0d, 0x55, 0x5f, 0x48, 0x4f, 0x8d, 0x9d, 0x61, 0xd5, 0x51, 0x57, - 0x34, 0x90, 0x42, 0x09, 0x5d, 0x8f, 0x40, 0xba, 0x04, 0xe9, 0xb0, 0x6a, 0x9e, 0xb8, 0xbe, 0xc7, - 0x85, 0x13, 0x3d, 0x63, 0x9a, 0x79, 0xda, 0x11, 0xe8, 0x0b, 0x74, 0x7c, 0x64, 0x8b, 0x74, 0x1f, - 0x59, 0x02, 0xe4, 0x13, 0x20, 0x0c, 0x98, 0x74, 0xbb, 0xe0, 0x0c, 0xab, 0x6d, 0x50, 0xee, 0x4a, - 0xc0, 0xbc, 0x1b, 0x13, 0x2e, 0xa3, 0xc8, 0x89, 0x83, 0x04, 0xca, 0x31, 0xc1, 0x44, 0xfc, 0x7d, - 0xf1, 0x96, 0x26, 0x30, 0x21, 0xd8, 0x00, 0x9c, 0x28, 0x6a, 0x87, 0x3d, 0xc7, 0xe5, 0xe3, 0x18, - 0xb2, 0x3f, 0x68, 0x84, 0x34, 0x91, 0x3d, 0xb9, 0x82, 0x4e, 0xa8, 0x40, 0xaf, 0x90, 0x7d, 0xf4, - 0x18, 0x07, 0x69, 0x68, 0x05, 0xad, 0x78, 0x74, 0x6e, 0x7c, 0xf9, 0x54, 0xce, 0x25, 0x0a, 0x8d, - 0x6e, 0x57, 0x02, 0xe2, 0x85, 0x92, 0x1e, 0x67, 0xad, 0x84, 0xa7, 0x57, 0xc8, 0xa1, 0x0f, 0x88, - 0x2e, 0x03, 0x34, 0xf6, 0x0a, 0xd9, 0xe2, 0xff, 0xb5, 0x1c, 0x8d, 0xe5, 0x68, 0x2a, 0x47, 0x1b, - 0x7c, 0xdc, 0x5a, 0xb2, 0xea, 0xf7, 0xdf, 0x5e, 0xe7, 0x33, 0xdf, 0xaf, 0xf3, 0x99, 0x37, 0xf3, - 0x49, 0x29, 0x39, 0xe6, 0xdd, 0x7c, 0x52, 0xba, 0x1d, 0x37, 0x35, 0xb1, 0x62, 0x53, 0xa2, 0xaf, - 0x8c, 0xb5, 0x00, 0x03, 0xc1, 0x11, 0x74, 0x83, 0x1c, 0x48, 0xc0, 0x70, 0xa0, 0xd0, 0xd0, 0x0a, - 0xd9, 0xe2, 0xad, 0x56, 0x1a, 0xda, 0x13, 0x8d, 0xe4, 0x9a, 0xc8, 0x9e, 0x4b, 0x97, 0x63, 0x0f, - 0xe4, 0xd3, 0x11, 0x07, 0x89, 0x7d, 0x2f, 0xf8, 0x8b, 0x9a, 0x1e, 0x93, 0x23, 0x0e, 0xa3, 0x4b, - 0xb1, 0x38, 0xc2, 0xd8, 0xfb, 0x43, 0xd2, 0x21, 0x87, 0x51, 0x24, 0x56, 0x77, 0xb6, 0x14, 0x76, - 0x1a, 0x17, 0xb6, 0xe1, 0xcc, 0xb6, 0xc8, 0xd9, 0xaf, 0x1c, 0xa7, 0xc5, 0xda, 0x61, 0xd4, 0x82, - 0x46, 0xa7, 0x03, 0x81, 0xfa, 0x87, 0x7a, 0xea, 0xe5, 0x2d, 0xc6, 0xee, 0xc4, 0xc6, 0xd6, 0x04, - 0xec, 0x33, 0x62, 0x6e, 0xca, 0xa6, 0xa6, 0x6a, 0x1f, 0xb3, 0x24, 0xdb, 0x44, 0xa6, 0x3f, 0x23, - 0x07, 0xe9, 0xad, 0xb1, 0xe8, 0xe6, 0x95, 0xa7, 0xab, 0xe1, 0x99, 0x0f, 0x7e, 0x8f, 0x2f, 0x87, - 0x2b, 0xc8, 0xc9, 0xe6, 0xf8, 0x8a, 0x5b, 0x92, 0x37, 0x98, 0x66, 0x65, 0x57, 0xe6, 0x52, 0xd0, - 0x23, 0xc7, 0xeb, 0xdd, 0xdd, 0xe6, 0x75, 0x8d, 0x67, 0xd2, 0xdd, 0x78, 0x4b, 0xa9, 0x57, 0xe4, - 0xf8, 0x42, 0xf4, 0xd4, 0xc8, 0x95, 0xf0, 0x22, 0x5e, 0x6c, 0xbd, 0x44, 0x93, 0xa9, 0x25, 0x9b, - 0x4e, 0x93, 0x4d, 0x5f, 0x1c, 0xb3, 0xc6, 0x35, 0x6b, 0xbb, 0x73, 0x53, 0x49, 0xf3, 0xbf, 0xd7, - 0xf3, 0x49, 0x49, 0x3b, 0x6f, 0x7c, 0x9e, 0x5a, 0xda, 0xcd, 0xd4, 0xd2, 0xbe, 0x4d, 0x2d, 0xed, - 0xfd, 0xcc, 0xca, 0xdc, 0xcc, 0xac, 0xcc, 0xd7, 0x99, 0x95, 0x79, 0xf9, 0x90, 0x79, 0xaa, 0x1f, - 0xb6, 0x69, 0x47, 0xf8, 0x4e, 0x54, 0x4d, 0xd9, 0x45, 0x04, 0x85, 0x3f, 0xfd, 0xd8, 0xd4, 0x38, - 0x00, 0x6c, 0xef, 0x47, 0xab, 0xfc, 0xe8, 0x47, 0x00, 0x00, 0x00, 0xff, 0xff, 0xdf, 0xc6, 0x6d, - 0xd4, 0xf8, 0x04, 0x00, 0x00, + // 501 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x54, 0xbf, 0x6f, 0xd3, 0x40, + 0x14, 0x8e, 0x13, 0xd1, 0x1f, 0x07, 0x08, 0xd5, 0x0a, 0xaa, 0x31, 0x95, 0x1b, 0x59, 0x02, 0xa2, + 0x48, 0xb9, 0x4b, 0x8b, 0x58, 0xb2, 0xa5, 0x12, 0x63, 0x84, 0x08, 0x4c, 0x2c, 0x95, 0xe3, 0xbe, + 0x5e, 0x2c, 0xc5, 0x77, 0x96, 0xdf, 0xb9, 0x69, 0x36, 0xc4, 0x84, 0x98, 0xd8, 0x58, 0xfb, 0x27, + 0x64, 0x60, 0xe3, 0x1f, 0x60, 0xac, 0x98, 0x18, 0x51, 0x32, 0x84, 0x3f, 0x03, 0xc5, 0x67, 0xa7, + 0x28, 0x26, 0x50, 0xd1, 0xc5, 0xf2, 0xf3, 0xf7, 0xbd, 0xf7, 0x7d, 0xef, 0xbd, 0xf3, 0x91, 0x87, + 0x42, 0xf6, 0x87, 0xc0, 0xbc, 0x44, 0x0d, 0x64, 0x1c, 0xa8, 0x31, 0x3b, 0x3b, 0x60, 0xea, 0x9c, + 0x46, 0xb1, 0x54, 0xd2, 0x34, 0x53, 0x90, 0x2e, 0x41, 0x7a, 0x76, 0x60, 0xef, 0x78, 0x61, 0x20, + 0x24, 0x4b, 0x9f, 0x9a, 0x66, 0xef, 0xfa, 0x12, 0x43, 0x89, 0x2c, 0x44, 0xbe, 0x48, 0x0f, 0x91, + 0x67, 0xc0, 0x03, 0x0d, 0x1c, 0xa7, 0x11, 0xd3, 0x41, 0x06, 0x55, 0xb9, 0xe4, 0x52, 0x7f, 0x5f, + 0xbc, 0xe5, 0x09, 0x5c, 0x4a, 0x3e, 0x04, 0x96, 0x46, 0xfd, 0xe4, 0x94, 0x79, 0x62, 0xac, 0x21, + 0xf7, 0x93, 0x41, 0x48, 0x17, 0xf9, 0xf3, 0x73, 0xf0, 0x13, 0x05, 0x66, 0x8b, 0x6c, 0x60, 0xc0, + 0x05, 0xc4, 0x96, 0x51, 0x33, 0xea, 0xdb, 0x47, 0xd6, 0xb7, 0xcf, 0xcd, 0x6a, 0xa6, 0xd0, 0x39, + 0x39, 0x89, 0x01, 0xf1, 0x95, 0x8a, 0x03, 0xc1, 0x7b, 0x19, 0xcf, 0x6c, 0x91, 0xad, 0x10, 0x10, + 0x3d, 0x0e, 0x68, 0x95, 0x6b, 0x95, 0xfa, 0xed, 0xc3, 0x2a, 0xd5, 0x72, 0x34, 0x97, 0xa3, 0x1d, + 0x31, 0xee, 0x2d, 0x59, 0xed, 0x47, 0xef, 0x2f, 0xf6, 0x4b, 0x3f, 0x2f, 0xf6, 0x4b, 0xef, 0xe6, + 0x93, 0x46, 0x56, 0xe6, 0xc3, 0x7c, 0xd2, 0xb8, 0xab, 0x67, 0x96, 0x59, 0x71, 0x29, 0x31, 0xaf, + 0x8c, 0xf5, 0x00, 0x23, 0x29, 0x10, 0x4c, 0x8b, 0x6c, 0xc6, 0x80, 0xc9, 0x50, 0xa1, 0x65, 0xd4, + 0x2a, 0xf5, 0x3b, 0xbd, 0x3c, 0x74, 0x27, 0x06, 0xa9, 0x76, 0x91, 0xbf, 0x8e, 0x3d, 0x81, 0xa7, + 0x10, 0xbf, 0x18, 0x09, 0x88, 0x71, 0x10, 0x44, 0xff, 0xd1, 0xd3, 0x33, 0xb2, 0x2d, 0x60, 0x74, + 0x2c, 0x17, 0x25, 0xac, 0xf2, 0x3f, 0x92, 0xb6, 0x04, 0x8c, 0x52, 0xb1, 0x36, 0x5b, 0xd3, 0xd8, + 0xae, 0x6e, 0xac, 0xe0, 0xcc, 0x75, 0xc8, 0xde, 0x9f, 0x1c, 0xe7, 0xcd, 0xba, 0x49, 0x3a, 0x82, + 0x8e, 0xef, 0x43, 0xa4, 0x6e, 0xd0, 0x4f, 0xbb, 0xb9, 0xc6, 0xd8, 0x7d, 0x6d, 0x6c, 0x45, 0xc0, + 0xdd, 0x23, 0x76, 0x51, 0x36, 0x37, 0x75, 0xf8, 0xa5, 0x4c, 0x2a, 0x5d, 0xe4, 0xe6, 0x4b, 0xb2, + 0x99, 0x9f, 0x1a, 0x87, 0x16, 0x4f, 0x34, 0xbd, 0x5a, 0x9e, 0xfd, 0xf8, 0xef, 0xf8, 0x72, 0xb9, + 0x92, 0xec, 0x14, 0xd7, 0x57, 0x5f, 0x93, 0x5c, 0x60, 0xda, 0xad, 0xeb, 0x32, 0x97, 0x82, 0x01, + 0xb9, 0xb7, 0x3a, 0xdd, 0x75, 0x5e, 0x57, 0x78, 0x36, 0xbd, 0x1e, 0x2f, 0x97, 0xb2, 0x6f, 0xbd, + 0x9d, 0x4f, 0x1a, 0xc6, 0x51, 0xe7, 0xeb, 0xd4, 0x31, 0x2e, 0xa7, 0x8e, 0xf1, 0x63, 0xea, 0x18, + 0x1f, 0x67, 0x4e, 0xe9, 0x72, 0xe6, 0x94, 0xbe, 0xcf, 0x9c, 0xd2, 0x9b, 0x27, 0x3c, 0x50, 0x83, + 0xa4, 0x4f, 0x7d, 0x19, 0xb2, 0xb4, 0x74, 0xd3, 0x43, 0x04, 0x85, 0xbf, 0x5d, 0x22, 0x6a, 0x1c, + 0x01, 0xf6, 0x37, 0xd2, 0xff, 0xea, 0xe9, 0xaf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa7, 0xef, 0x72, + 0x71, 0x64, 0x04, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -327,7 +323,6 @@ type MsgClient interface { Execute(ctx context.Context, in *MsgExecute, opts ...grpc.CallOption) (*MsgExecuteResponse, error) TransferOwnership(ctx context.Context, in *MsgTransferOwnership, opts ...grpc.CallOption) (*MsgTransferOwnershipResponse, error) AcceptOwnership(ctx context.Context, in *MsgAcceptOwnership, opts ...grpc.CallOption) (*MsgAcceptOwnershipResponse, error) - SoftwareUpgrade(ctx context.Context, in *types1.MsgSoftwareUpgrade, opts ...grpc.CallOption) (*types1.MsgSoftwareUpgradeResponse, error) } type msgClient struct { @@ -365,21 +360,11 @@ func (c *msgClient) AcceptOwnership(ctx context.Context, in *MsgAcceptOwnership, return out, nil } -func (c *msgClient) SoftwareUpgrade(ctx context.Context, in *types1.MsgSoftwareUpgrade, opts ...grpc.CallOption) (*types1.MsgSoftwareUpgradeResponse, error) { - out := new(types1.MsgSoftwareUpgradeResponse) - err := c.cc.Invoke(ctx, "/noble.authority.v1.Msg/SoftwareUpgrade", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - // MsgServer is the server API for Msg service. type MsgServer interface { Execute(context.Context, *MsgExecute) (*MsgExecuteResponse, error) TransferOwnership(context.Context, *MsgTransferOwnership) (*MsgTransferOwnershipResponse, error) AcceptOwnership(context.Context, *MsgAcceptOwnership) (*MsgAcceptOwnershipResponse, error) - SoftwareUpgrade(context.Context, *types1.MsgSoftwareUpgrade) (*types1.MsgSoftwareUpgradeResponse, error) } // UnimplementedMsgServer can be embedded to have forward compatible implementations. @@ -395,9 +380,6 @@ func (*UnimplementedMsgServer) TransferOwnership(ctx context.Context, req *MsgTr func (*UnimplementedMsgServer) AcceptOwnership(ctx context.Context, req *MsgAcceptOwnership) (*MsgAcceptOwnershipResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AcceptOwnership not implemented") } -func (*UnimplementedMsgServer) SoftwareUpgrade(ctx context.Context, req *types1.MsgSoftwareUpgrade) (*types1.MsgSoftwareUpgradeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SoftwareUpgrade not implemented") -} func RegisterMsgServer(s grpc1.Server, srv MsgServer) { s.RegisterService(&_Msg_serviceDesc, srv) @@ -457,24 +439,6 @@ func _Msg_AcceptOwnership_Handler(srv interface{}, ctx context.Context, dec func return interceptor(ctx, in, info, handler) } -func _Msg_SoftwareUpgrade_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(types1.MsgSoftwareUpgrade) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).SoftwareUpgrade(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/noble.authority.v1.Msg/SoftwareUpgrade", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).SoftwareUpgrade(ctx, req.(*types1.MsgSoftwareUpgrade)) - } - return interceptor(ctx, in, info, handler) -} - var Msg_serviceDesc = _Msg_serviceDesc var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "noble.authority.v1.Msg", @@ -492,10 +456,6 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "AcceptOwnership", Handler: _Msg_AcceptOwnership_Handler, }, - { - MethodName: "SoftwareUpgrade", - Handler: _Msg_SoftwareUpgrade_Handler, - }, }, Streams: []grpc.StreamDesc{}, Metadata: "noble/authority/v1/tx.proto", diff --git a/utils/mocks/authority.go b/utils/mocks/authority.go index 11c91c7..2538849 100644 --- a/utils/mocks/authority.go +++ b/utils/mocks/authority.go @@ -9,7 +9,6 @@ package mocks import ( storetypes "cosmossdk.io/store/types" "cosmossdk.io/x/upgrade" - upgradekeeper "cosmossdk.io/x/upgrade/keeper" upgradetypes "cosmossdk.io/x/upgrade/types" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/codec" @@ -30,12 +29,7 @@ func AuthorityKeeper() (*keeper.Keeper, sdk.Context) { } func AuthorityKeeperWithBank(bank types.BankKeeper) (*keeper.Keeper, sdk.Context) { - keys := storetypes.NewKVStoreKeys( - types.ModuleName, - upgradetypes.StoreKey, - ) - - // key := storetypes.NewKVStoreKey(types.ModuleName) + key := storetypes.NewKVStoreKey(types.ModuleName) tkey := storetypes.NewTransientStoreKey("transient_authority") cfg := MakeTestEncodingConfig("noble", upgrade.AppModuleBasic{}) @@ -45,13 +39,12 @@ func AuthorityKeeperWithBank(bank types.BankKeeper) (*keeper.Keeper, sdk.Context return keeper.NewKeeper( cfg.Codec, - runtime.NewKVStoreService(keys[types.ModuleName]), + runtime.NewKVStoreService(key), runtime.ProvideEventService(), router, AccountKeeper{}, bank, - upgradekeeper.Keeper{}, - ), testutil.DefaultContext(keys[types.ModuleName], tkey) + ), testutil.DefaultContext(key, tkey) } // MakeTestEncodingConfig is a modified testutil.MakeTestEncodingConfig that From bb706711bb6b87c4b14722bd9342fe92fb92f785 Mon Sep 17 00:00:00 2001 From: Dan Kanefsky Date: Fri, 8 Nov 2024 16:36:25 -0800 Subject: [PATCH 3/8] feat: recover client wrapper cmd --- client/cli/parse.go | 23 ------------ client/cli/tx.go | 51 +++++++++++++++++++------- client/cli/utils.go | 37 +++++++++++++++++++ go.mod | 32 +++++++++-------- go.sum | 88 ++++++++++++++++++++++++++------------------- go.work.sum | 19 +++++++--- 6 files changed, 160 insertions(+), 90 deletions(-) delete mode 100644 client/cli/parse.go create mode 100644 client/cli/utils.go diff --git a/client/cli/parse.go b/client/cli/parse.go deleted file mode 100644 index 45969ff..0000000 --- a/client/cli/parse.go +++ /dev/null @@ -1,23 +0,0 @@ -package cli - -import ( - "github.com/spf13/pflag" - - "cosmossdk.io/x/upgrade/types" -) - -// parsePlan was copied from SDK becuase it was not exported -// https://github.com/cosmos/cosmos-sdk/blob/x/upgrade/v0.1.4/x/upgrade/client/cli/parse.go -func parsePlan(fs *pflag.FlagSet, name string) (types.Plan, error) { - height, err := fs.GetInt64(FlagUpgradeHeight) - if err != nil { - return types.Plan{}, err - } - - info, err := fs.GetString(FlagUpgradeInfo) - if err != nil { - return types.Plan{}, err - } - - return types.Plan{Name: name, Height: height, Info: info}, nil -} diff --git a/client/cli/tx.go b/client/cli/tx.go index c6dfc18..a9b49d2 100644 --- a/client/cli/tx.go +++ b/client/cli/tx.go @@ -8,8 +8,6 @@ package cli import ( "fmt" - "os" - "path/filepath" "cosmossdk.io/x/upgrade/plan" upgradetypes "cosmossdk.io/x/upgrade/types" @@ -18,6 +16,7 @@ import ( "github.com/cosmos/cosmos-sdk/client/tx" sdk "github.com/cosmos/cosmos-sdk/types" authclient "github.com/cosmos/cosmos-sdk/x/auth/client" + clienttypes "github.com/cosmos/ibc-go/v8/modules/core/02-client/types" "github.com/noble-assets/authority/types" "github.com/spf13/cobra" ) @@ -38,6 +37,7 @@ func GetTxCmd() *cobra.Command { cmd.AddCommand(NewCmdExecute()) cmd.AddCommand(NewCmdSubmitUpgrade()) + cmd.AddCommand(newSubmitRecoverClientCmd()) return cmd } @@ -69,7 +69,8 @@ func NewCmdExecute() *cobra.Command { return cmd } -// NewCmdSubmitUpgrade has been adapted from the SDK's NewCmdSubmitUpgradeProposal +// NewCmdSubmitUpgrade schedule an on-chain software upgrade. +// This command has been adapted from the SDK's `NewCmdSubmitUpgradeProposal`. // https://github.com/cosmos/cosmos-sdk/blob/x/upgrade/v0.1.4/x/upgrade/client/cli/tx.go#L47 func NewCmdSubmitUpgrade() *cobra.Command { cmd := &cobra.Command{ @@ -141,14 +142,40 @@ func NewCmdSubmitUpgrade() *cobra.Command { return cmd } -// getDefaultDaemonName gets the default name to use for the daemon. -// If a DAEMON_NAME env var is set, that is used. -// Otherwise, the last part of the currently running executable is used. -func getDefaultDaemonName() string { - // DAEMON_NAME is specifically used here to correspond with the Cosmovisor setup env vars. - name := os.Getenv("DAEMON_NAME") - if len(name) == 0 { - _, name = filepath.Split(os.Args[0]) +// newSubmitRecoverClientCmd defines the command to recover an IBC light client. +// This command has been adapted from ibc-go's `newSubmitRecoverClientProposalCmd`. +// https://github.com/cosmos/ibc-go/blob/v8.5.2/modules/core/02-client/client/cli/tx.go#L249 +func newSubmitRecoverClientCmd() *cobra.Command { + cmd := &cobra.Command{ + Use: "recover-client [subject-client-id] [substitute-client-id] [flags]", + Args: cobra.ExactArgs(2), + Short: "recover an IBC client", + Long: `recover an IBC client + Please specify a subject client identifier you want to recover + Please specify the substitute client the subject client will be recovered to.`, + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + + subjectClientID, substituteClientID := args[0], args[1] + + authority := types.ModuleAddress.String() + + msg := clienttypes.NewMsgRecoverClient(authority, subjectClientID, substituteClientID) + + if err = msg.ValidateBasic(); err != nil { + return fmt.Errorf("error validating %T: %w", clienttypes.MsgRecoverClient{}, err) + } + + msgExecute := types.NewMsgExecute(clientCtx.FromAddress.String(), []sdk.Msg{msg}) + + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msgExecute) + }, } - return name + + flags.AddTxFlagsToCmd(cmd) + + return cmd } diff --git a/client/cli/utils.go b/client/cli/utils.go new file mode 100644 index 0000000..1fef861 --- /dev/null +++ b/client/cli/utils.go @@ -0,0 +1,37 @@ +package cli + +import ( + "os" + "path/filepath" + + "github.com/spf13/pflag" + + "cosmossdk.io/x/upgrade/types" +) + +// parsePlan was copied from the SDK because it was not exported +// https://github.com/cosmos/cosmos-sdk/blob/x/upgrade/v0.1.4/x/upgrade/client/cli/parse.go +func parsePlan(fs *pflag.FlagSet, name string) (types.Plan, error) { + height, err := fs.GetInt64(FlagUpgradeHeight) + if err != nil { + return types.Plan{}, err + } + + info, err := fs.GetString(FlagUpgradeInfo) + if err != nil { + return types.Plan{}, err + } + + return types.Plan{Name: name, Height: height, Info: info}, nil +} + +// getDefaultDaemonName was copied from the SDK because it was not exported +// https://github.com/cosmos/cosmos-sdk/blob/x/upgrade/v0.1.4/x/upgrade/client/cli/tx.go#L187 +func getDefaultDaemonName() string { + // DAEMON_NAME is specifically used here to correspond with the Cosmovisor setup env vars. + name := os.Getenv("DAEMON_NAME") + if len(name) == 0 { + _, name = filepath.Split(os.Args[0]) + } + return name +} diff --git a/go.mod b/go.mod index 69a67d7..735fd1d 100644 --- a/go.mod +++ b/go.mod @@ -14,13 +14,14 @@ require ( github.com/cosmos/cosmos-proto v1.0.0-beta.5 github.com/cosmos/cosmos-sdk v0.50.10 github.com/cosmos/gogoproto v1.7.0 + github.com/cosmos/ibc-go/v8 v8.5.2 github.com/golang/protobuf v1.5.4 github.com/golangci/golangci-lint v1.55.0 github.com/grpc-ecosystem/grpc-gateway v1.16.0 github.com/spf13/cobra v1.8.1 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.9.0 - google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237 + google.golang.org/genproto/googleapis/api v0.0.0-20240624140628-dc46fd24d27d google.golang.org/grpc v1.64.1 google.golang.org/protobuf v1.34.2 mvdan.cc/gofumpt v0.7.0 @@ -29,14 +30,16 @@ require ( require ( 4d63.com/gocheckcompilerdirectives v1.2.1 // indirect 4d63.com/gochecknoglobals v0.2.1 // indirect - cloud.google.com/go v0.112.1 // indirect + cloud.google.com/go v0.115.0 // indirect + cloud.google.com/go/auth v0.6.0 // indirect + cloud.google.com/go/auth/oauth2adapt v0.2.2 // indirect cloud.google.com/go/compute/metadata v0.3.0 // indirect - cloud.google.com/go/iam v1.1.6 // indirect - cloud.google.com/go/storage v1.38.0 // indirect + cloud.google.com/go/iam v1.1.9 // indirect + cloud.google.com/go/storage v1.41.0 // indirect cosmossdk.io/log v1.4.1 // indirect cosmossdk.io/math v1.3.0 // indirect cosmossdk.io/x/tx v0.13.5 // indirect - filippo.io/edwards25519 v1.0.0 // indirect + filippo.io/edwards25519 v1.1.0 // indirect github.com/4meepo/tagalign v1.3.3 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.1 // indirect @@ -89,6 +92,7 @@ require ( github.com/cosmos/go-bip39 v1.0.0 // indirect github.com/cosmos/gogogateway v1.2.0 // indirect github.com/cosmos/iavl v1.2.0 // indirect + github.com/cosmos/ibc-go/modules/capability v1.0.1 // indirect github.com/cosmos/ics23/go v0.11.0 // indirect github.com/cosmos/ledger-cosmos-go v0.13.3 // indirect github.com/curioswitch/go-reassign v0.2.0 // indirect @@ -151,10 +155,10 @@ require ( github.com/google/s2a-go v0.1.7 // indirect github.com/google/uuid v1.6.0 // indirect github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect - github.com/googleapis/gax-go/v2 v2.12.3 // indirect + github.com/googleapis/gax-go/v2 v2.12.5 // indirect github.com/gordonklaus/ineffassign v0.0.0-20230610083614-0e73809eb601 // indirect - github.com/gorilla/handlers v1.5.1 // indirect - github.com/gorilla/mux v1.8.0 // indirect + github.com/gorilla/handlers v1.5.2 // indirect + github.com/gorilla/mux v1.8.1 // indirect github.com/gorilla/websocket v1.5.3 // indirect github.com/gostaticanalysis/analysisutil v0.7.1 // indirect github.com/gostaticanalysis/comment v1.4.2 // indirect @@ -300,12 +304,12 @@ require ( go.opentelemetry.io/otel/trace v1.24.0 // indirect go.tmz.dev/musttag v0.7.2 // indirect go.uber.org/atomic v1.10.0 // indirect - go.uber.org/multierr v1.10.0 // indirect + go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.24.0 // indirect golang.org/x/crypto v0.26.0 // indirect - golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0 // indirect + golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8 // indirect golang.org/x/exp/typeparams v0.0.0-20230307190834-24139beb5833 // indirect - golang.org/x/mod v0.17.0 // indirect + golang.org/x/mod v0.18.0 // indirect golang.org/x/net v0.28.0 // indirect golang.org/x/oauth2 v0.21.0 // indirect golang.org/x/sync v0.8.0 // indirect @@ -313,9 +317,9 @@ require ( golang.org/x/term v0.23.0 // indirect golang.org/x/text v0.17.0 // indirect golang.org/x/time v0.5.0 // indirect - golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect - google.golang.org/api v0.171.0 // indirect - google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect + golang.org/x/tools v0.22.0 // indirect + google.golang.org/api v0.186.0 // indirect + google.golang.org/genproto v0.0.0-20240701130421-f6361c86f094 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240709173604-40e1e62336c5 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect diff --git a/go.sum b/go.sum index 0d4867d..6902116 100644 --- a/go.sum +++ b/go.sum @@ -34,8 +34,8 @@ cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w9 cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc= cloud.google.com/go v0.102.1/go.mod h1:XZ77E9qnTEnrgEOvr4xzfdX5TRo7fB4T2F4O6+34hIU= cloud.google.com/go v0.104.0/go.mod h1:OO6xxXdJyvuJPcEPBLN9BJPD+jep5G1+2U5B5gkRYtA= -cloud.google.com/go v0.112.1 h1:uJSeirPke5UNZHIb4SxfZklVSiWWVqW4oXlETwZziwM= -cloud.google.com/go v0.112.1/go.mod h1:+Vbu+Y1UU+I1rjmzeMOb/8RfkKJK2Gyxi1X6jJCZLo4= +cloud.google.com/go v0.115.0 h1:CnFSK6Xo3lDYRoBKEcAtia6VSC837/ZkJuRduSFnr14= +cloud.google.com/go v0.115.0/go.mod h1:8jIM5vVgoAEoiVxQ/O4BFTfHqulPZgs/ufEzMcFMdWU= cloud.google.com/go/aiplatform v1.22.0/go.mod h1:ig5Nct50bZlzV6NvKaTwmplLLddFx0YReh9WfTO5jKw= cloud.google.com/go/aiplatform v1.24.0/go.mod h1:67UUvRBKG6GTayHKV8DBv2RtR1t93YRu5B1P3x99mYY= cloud.google.com/go/analytics v0.11.0/go.mod h1:DjEWCu41bVbYcKyvlws9Er60YE4a//bK6mnhWvQeFNI= @@ -50,6 +50,10 @@ cloud.google.com/go/asset v1.8.0/go.mod h1:mUNGKhiqIdbr8X7KNayoYvyc4HbbFO9URsjby cloud.google.com/go/assuredworkloads v1.5.0/go.mod h1:n8HOZ6pff6re5KYfBXcFvSViQjDwxFkAkmUFffJRbbY= cloud.google.com/go/assuredworkloads v1.6.0/go.mod h1:yo2YOk37Yc89Rsd5QMVECvjaMKymF9OP+QXWlKXUkXw= cloud.google.com/go/assuredworkloads v1.7.0/go.mod h1:z/736/oNmtGAyU47reJgGN+KVoYoxeLBoj4XkKYscNI= +cloud.google.com/go/auth v0.6.0 h1:5x+d6b5zdezZ7gmLWD1m/xNjnaQ2YDhmIz/HH3doy1g= +cloud.google.com/go/auth v0.6.0/go.mod h1:b4acV+jLQDyjwm4OXHYjNvRi4jvGBzHWJRtJcy+2P4g= +cloud.google.com/go/auth/oauth2adapt v0.2.2 h1:+TTV8aXpjeChS9M+aTtN/TjdQnzJvmzKFt//oWu7HX4= +cloud.google.com/go/auth/oauth2adapt v0.2.2/go.mod h1:wcYjgpZI9+Yu7LyYBg4pqSiaRkfEK3GQcpb7C/uyF1Q= cloud.google.com/go/automl v1.5.0/go.mod h1:34EjfoFGMZ5sgJ9EoLsRtdPSNZLcfflJR39VbVNS2M0= cloud.google.com/go/automl v1.6.0/go.mod h1:ugf8a6Fx+zP0D59WLhqgTDsQI9w07o64uf/Is3Nh5p8= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= @@ -111,8 +115,8 @@ cloud.google.com/go/gkehub v0.10.0/go.mod h1:UIPwxI0DsrpsVoWpLB0stwKCP+WFVG9+y97 cloud.google.com/go/grafeas v0.2.0/go.mod h1:KhxgtF2hb0P191HlY5besjYm6MqTSTj3LSI+M+ByZHc= cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= cloud.google.com/go/iam v0.5.0/go.mod h1:wPU9Vt0P4UmCux7mqtRu6jcpPAb74cP1fh50J3QpkUc= -cloud.google.com/go/iam v1.1.6 h1:bEa06k05IO4f4uJonbB5iAgKTPpABy1ayxaIZV/GHVc= -cloud.google.com/go/iam v1.1.6/go.mod h1:O0zxdPeGBoFdWW3HWmBxJsk0pfvNM/p/qa82rWOGTwI= +cloud.google.com/go/iam v1.1.9 h1:oSkYLVtVme29uGYrOcKcvJRht7cHJpYD09GM9JaR0TE= +cloud.google.com/go/iam v1.1.9/go.mod h1:Nt1eDWNYH9nGQg3d/mY7U1hvfGmsaG9o/kLGoLoLXjQ= cloud.google.com/go/language v1.4.0/go.mod h1:F9dRpNFQmJbkaop6g0JhSBXCNlO90e1KWx5iDdxbWic= cloud.google.com/go/language v1.6.0/go.mod h1:6dJ8t3B+lUYfStgls25GusK04NLh3eDLQnWM3mdEbhI= cloud.google.com/go/lifesciences v0.5.0/go.mod h1:3oIKy8ycWGPUyZDR/8RNnTOYevhaMLqh5vLUXs9zvT8= @@ -173,8 +177,8 @@ cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9 cloud.google.com/go/storage v1.22.1/go.mod h1:S8N1cAStu7BOeFfE8KAQzmyyLkK8p/vmRq6kuBTW58Y= cloud.google.com/go/storage v1.23.0/go.mod h1:vOEEDNFnciUMhBeT6hsJIn3ieU5cFRmzeLgDvXzfIXc= cloud.google.com/go/storage v1.27.0/go.mod h1:x9DOL8TK/ygDUMieqwfhdpQryTeEkhGKMi80i/iqR2s= -cloud.google.com/go/storage v1.38.0 h1:Az68ZRGlnNTpIBbLjSMIV2BDcwwXYlRlQzis0llkpJg= -cloud.google.com/go/storage v1.38.0/go.mod h1:tlUADB0mAb9BgYls9lq+8MGkfzOXuLrnHXlpHmvFJoY= +cloud.google.com/go/storage v1.41.0 h1:RusiwatSu6lHeEXe3kglxakAmAbfV+rhtPqA6i8RBx0= +cloud.google.com/go/storage v1.41.0/go.mod h1:J1WCa/Z2FcgdEDuPUY8DxT5I+d9mFKsCepp5vR6Sq80= cloud.google.com/go/talent v1.1.0/go.mod h1:Vl4pt9jiHKvOgF9KoZo6Kob9oV4lwd/ZD5Cto54zDRw= cloud.google.com/go/talent v1.2.0/go.mod h1:MoNF9bhFQbiJ6eFD3uSsg0uBALw4n4gaCaEjBw9zo8g= cloud.google.com/go/videointelligence v1.6.0/go.mod h1:w0DIDlVRKtwPCn/C4iwZIJdvC69yInhW0cfi+p546uU= @@ -188,6 +192,8 @@ cloud.google.com/go/workflows v1.6.0/go.mod h1:6t9F5h/unJz41YqfBmqSASJSXccBLtD1V cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoISEXH2bcHC3M= cosmossdk.io/api v0.7.5 h1:eMPTReoNmGUm8DeiQL9DyM8sYDjEhWzL1+nLbI9DqtQ= cosmossdk.io/api v0.7.5/go.mod h1:IcxpYS5fMemZGqyYtErK7OqvdM0C8kdW3dq8Q/XIG38= +cosmossdk.io/client/v2 v2.0.0-beta.3 h1:+TTuH0DwQYsUq2JFAl3fDZzKq5gQG7nt3dAattkjFDU= +cosmossdk.io/client/v2 v2.0.0-beta.3/go.mod h1:CZcL41HpJPOOayTCO28j8weNBQprG+SRiKX39votypo= cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0= cosmossdk.io/core v0.11.1 h1:h9WfBey7NAiFfIcUhDVNS503I2P2HdZLebJlUIs8LPA= @@ -202,13 +208,19 @@ cosmossdk.io/math v1.3.0 h1:RC+jryuKeytIiictDslBP9i1fhkVm6ZDmZEoNP316zE= cosmossdk.io/math v1.3.0/go.mod h1:vnRTxewy+M7BtXBNFybkuhSH4WfedVAAnERHgVFhp3k= cosmossdk.io/store v1.1.1 h1:NA3PioJtWDVU7cHHeyvdva5J/ggyLDkyH0hGHl2804Y= cosmossdk.io/store v1.1.1/go.mod h1:8DwVTz83/2PSI366FERGbWSH7hL6sB7HbYp8bqksNwM= +cosmossdk.io/x/circuit v0.1.1 h1:KPJCnLChWrxD4jLwUiuQaf5mFD/1m7Omyo7oooefBVQ= +cosmossdk.io/x/circuit v0.1.1/go.mod h1:B6f/urRuQH8gjt4eLIXfZJucrbreuYrKh5CSjaOxr+Q= +cosmossdk.io/x/evidence v0.1.1 h1:Ks+BLTa3uftFpElLTDp9L76t2b58htjVbSZ86aoK/E4= +cosmossdk.io/x/evidence v0.1.1/go.mod h1:OoDsWlbtuyqS70LY51aX8FBTvguQqvFrt78qL7UzeNc= +cosmossdk.io/x/feegrant v0.1.1 h1:EKFWOeo/pup0yF0svDisWWKAA9Zags6Zd0P3nRvVvw8= +cosmossdk.io/x/feegrant v0.1.1/go.mod h1:2GjVVxX6G2fta8LWj7pC/ytHjryA6MHAJroBWHFNiEQ= cosmossdk.io/x/tx v0.13.5 h1:FdnU+MdmFWn1pTsbfU0OCf2u6mJ8cqc1H4OMG418MLw= cosmossdk.io/x/tx v0.13.5/go.mod h1:V6DImnwJMTq5qFjeGWpXNiT/fjgE4HtmclRmTqRVM3w= cosmossdk.io/x/upgrade v0.1.4 h1:/BWJim24QHoXde8Bc64/2BSEB6W4eTydq0X/2f8+g38= cosmossdk.io/x/upgrade v0.1.4/go.mod h1:9v0Aj+fs97O+Ztw+tG3/tp5JSlrmT7IcFhAebQHmOPo= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -filippo.io/edwards25519 v1.0.0 h1:0wAIcmJUqRdI8IJ/3eGi5/HwXZWPujYXXlkrQogz0Ek= -filippo.io/edwards25519 v1.0.0/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= +filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= +filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= github.com/4meepo/tagalign v1.3.3 h1:ZsOxcwGD/jP4U/aw7qeWu58i7dwYemfy5Y+IF1ACoNw= github.com/4meepo/tagalign v1.3.3/go.mod h1:Q9c1rYMZJc9dPRkbQPpcBNCLEmY2njbAsXhQOZFE2dE= github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 h1:/vQbFIOMbk2FiG/kXiLl8BRyzTWDw7gX/Hz7Dd5eDMs= @@ -416,6 +428,10 @@ github.com/cosmos/gogoproto v1.7.0 h1:79USr0oyXAbxg3rspGh/m4SWNyoz/GLaAh0QlCe2fr github.com/cosmos/gogoproto v1.7.0/go.mod h1:yWChEv5IUEYURQasfyBW5ffkMHR/90hiHgbNgrtp4j0= github.com/cosmos/iavl v1.2.0 h1:kVxTmjTh4k0Dh1VNL046v6BXqKziqMDzxo93oh3kOfM= github.com/cosmos/iavl v1.2.0/go.mod h1:HidWWLVAtODJqFD6Hbne2Y0q3SdxByJepHUOeoH4LiI= +github.com/cosmos/ibc-go/modules/capability v1.0.1 h1:ibwhrpJ3SftEEZRxCRkH0fQZ9svjthrX2+oXdZvzgGI= +github.com/cosmos/ibc-go/modules/capability v1.0.1/go.mod h1:rquyOV262nGJplkumH+/LeYs04P3eV8oB7ZM4Ygqk4E= +github.com/cosmos/ibc-go/v8 v8.5.2 h1:27s9oeD2AxLQF3e9BQsYt9doONyZ7FwZi/qkBv6Sdks= +github.com/cosmos/ibc-go/v8 v8.5.2/go.mod h1:P5hkAvq0Qbg0h18uLxDVA9q1kOJ0l36htMsskiNwXbo= github.com/cosmos/ics23/go v0.11.0 h1:jk5skjT0TqX5e5QJbEnwXIS2yI2vnmLOgpQPeM5RtnU= github.com/cosmos/ics23/go v0.11.0/go.mod h1:A8OjxPE67hHST4Icw94hOxxFEJMBG031xIGF/JHNIY0= github.com/cosmos/ledger-cosmos-go v0.13.3 h1:7ehuBGuyIytsXbd4MP43mLeoN2LTOEnk5nvue4rK+yM= @@ -489,7 +505,6 @@ github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= github.com/fatih/structtag v1.2.0 h1:/OdNE99OxoI/PqaW/SuSK9uxxT3f/tcSZgon/ssNSx4= github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= -github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/firefart/nonamedreturns v1.0.4 h1:abzI1p7mAEPYuR4A+VLKn4eNDOycjYo2phmY9sfv40Y= @@ -697,8 +712,8 @@ github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXi github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= -github.com/google/martian/v3 v3.3.2 h1:IqNFLAmvJOgVlpdEBiQbDc2EwKW77amAycfTuWKdfvw= -github.com/google/martian/v3 v3.3.2/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= +github.com/google/martian/v3 v3.3.3 h1:DIhPTQrbPkgs2yJYdXU/eNACCG5DVQjySNRNlflZ9Fc= +github.com/google/martian/v3 v3.3.3/go.mod h1:iEPrYcgCF7jA9OtScMFQyAlZZ4YXTKEtJ1E6RWzmBA0= github.com/google/orderedcode v0.0.1 h1:UzfcAexk9Vhv8+9pNOgRu41f16lHq725vPwnSeiG/Us= github.com/google/orderedcode v0.0.1/go.mod h1:iVyU4/qPKHY5h/wSd6rZZCDcLJNxiWO6dvsYES2Sb20= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= @@ -740,19 +755,19 @@ github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99 github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= github.com/googleapis/gax-go/v2 v2.5.1/go.mod h1:h6B0KMMFNtI2ddbGJn3T3ZbwkeT6yqEF02fYlzkUCyo= github.com/googleapis/gax-go/v2 v2.6.0/go.mod h1:1mjbznJAPHFpesgE5ucqfYEscaz5kMdcIDwU/6+DDoY= -github.com/googleapis/gax-go/v2 v2.12.3 h1:5/zPPDvw8Q1SuXjrqrZslrqT7dL/uJT2CQii/cLCKqA= -github.com/googleapis/gax-go/v2 v2.12.3/go.mod h1:AKloxT6GtNbaLm8QTNSidHUVsHYcBHwWRvkNFJUQcS4= +github.com/googleapis/gax-go/v2 v2.12.5 h1:8gw9KZK8TiVKB6q3zHY3SBzLnrGp6HQjyfYBYGmXdxA= +github.com/googleapis/gax-go/v2 v2.12.5/go.mod h1:BUDKcWo+RaKq5SC9vVYL0wLADa3VcfswbOMMRmB9H3E= github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gordonklaus/ineffassign v0.0.0-20230610083614-0e73809eb601 h1:mrEEilTAUmaAORhssPPkxj84TsHrPMLBGW2Z4SoTxm8= github.com/gordonklaus/ineffassign v0.0.0-20230610083614-0e73809eb601/go.mod h1:Qcp2HIAYhR7mNUVSIxZww3Guk4it82ghYcEXIAk+QT0= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= -github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4= -github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q= +github.com/gorilla/handlers v1.5.2 h1:cLTUSsNkgcwhgRqvCNmdbRWG0A3N4F+M2nWKdScwyEE= +github.com/gorilla/handlers v1.5.2/go.mod h1:dX+xVpaxdSw+q0Qek8SSsl3dfMk3jNddUkMzo0GtH0w= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= -github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= +github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY= +github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg= @@ -810,8 +825,9 @@ github.com/hashicorp/go-safetemp v1.0.0/go.mod h1:oaerMy3BhqiTbVye6QuFhFtIceqFoD github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-uuid v1.0.1 h1:fv1ep09latC32wFoVwnqcnKJGnMSdBanPczbHAYm1BE= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.2 h1:cfejS+Tpcp13yd5nYHWDI6qVCny6wyX2Mt5SGur2IGE= +github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.2.1/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= @@ -1291,8 +1307,8 @@ github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= -github.com/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0= -github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= +github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU= +github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= github.com/ulikunitz/xz v0.5.10/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/ulikunitz/xz v0.5.11 h1:kpFauv27b6ynzBNT/Xy+1k+fK4WswhN/6PN5WhFAGw8= github.com/ulikunitz/xz v0.5.11/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= @@ -1354,8 +1370,8 @@ go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= -go.opentelemetry.io/otel/sdk v1.22.0 h1:6coWHw9xw7EfClIC/+O31R8IY3/+EiRFHevmHafB2Gw= -go.opentelemetry.io/otel/sdk v1.22.0/go.mod h1:iu7luyVGYovrRpe2fmj3CVKouQNdTOkxtLzPvPz1DOc= +go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw= +go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= @@ -1373,8 +1389,8 @@ go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= -go.uber.org/multierr v1.10.0 h1:S0h4aNzvfcFsC3dRF1jLoaov7oRaKqRGC/pUEJ2yvPQ= -go.uber.org/multierr v1.10.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= +go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= @@ -1406,8 +1422,8 @@ golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= -golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0 h1:985EYyeCOxTpcgOTJpflJUwOeEz0CQOdPt73OzpE9F8= -golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0/go.mod h1:/lliqkxwWAhPjf5oSOIJup2XcqJaw8RGS6k3TGEc7GI= +golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8 h1:yixxcjnhBmY0nkL253HFVIm0JsFHwrHdT3Yh6szTnfY= +golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8/go.mod h1:jj3sYF3dwk5D+ghuXyeI3r5MFf+NT2An6/9dOA95KSI= golang.org/x/exp/typeparams v0.0.0-20220428152302-39d4317da171/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/exp/typeparams v0.0.0-20230203172020-98cc5a0785f9/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/exp/typeparams v0.0.0-20230307190834-24139beb5833 h1:jWGQJV4niP+CCmFW9ekjA9Zx8vYORzOUH2/Nl5WPuLQ= @@ -1443,8 +1459,8 @@ golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91 golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= -golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.18.0 h1:5+9lSbEzPSdWkH32vYPBwEpX8KwDbM52Ud9xBUvNlb0= +golang.org/x/mod v0.18.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1771,8 +1787,8 @@ golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA= golang.org/x/tools v0.3.0/go.mod h1:/rWhSS2+zyEVwoJf8YAX6L2f0ntZ7Kn/mGgAWcipA5k= golang.org/x/tools v0.5.0/go.mod h1:N+Kgy78s5I24c24dU8OfWNEotWjutIs8SnJvn5IDq+k= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg= -golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= +golang.org/x/tools v0.22.0 h1:gqSGLZqv+AI9lIQzniJ0nZDRG5GBPsSi+DRNHWNz6yA= +golang.org/x/tools v0.22.0/go.mod h1:aCwcsjqvq7Yqt6TNyX7QMU2enbQ/Gt0bo6krSeEri+c= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1832,8 +1848,8 @@ google.golang.org/api v0.96.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ google.golang.org/api v0.97.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= google.golang.org/api v0.98.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= google.golang.org/api v0.100.0/go.mod h1:ZE3Z2+ZOr87Rx7dqFsdRQkRBk36kDtp/h+QpHbB7a70= -google.golang.org/api v0.171.0 h1:w174hnBPqut76FzW5Qaupt7zY8Kql6fiVjgys4f58sU= -google.golang.org/api v0.171.0/go.mod h1:Hnq5AHm4OTMt2BUVjael2CWZFD6vksJdWCWiUAmjC9o= +google.golang.org/api v0.186.0 h1:n2OPp+PPXX0Axh4GuSsL5QL8xQCTb2oDwyzPnQvqUug= +google.golang.org/api v0.186.0/go.mod h1:hvRbBmgoje49RV3xqVXrmP6w93n6ehGgIVPYrGtBFFc= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -1948,10 +1964,10 @@ google.golang.org/genproto v0.0.0-20221010155953-15ba04fc1c0e/go.mod h1:3526vdqw google.golang.org/genproto v0.0.0-20221014173430-6e2ab493f96b/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= google.golang.org/genproto v0.0.0-20221025140454-527a21cfbd71/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= -google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY= -google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= -google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237 h1:RFiFrvy37/mpSpdySBDrUdipW/dHwsRwh3J3+A9VgT4= -google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237/go.mod h1:Z5Iiy3jtmioajWHDGFk7CeugTyHtPvMHA4UTmUkyalE= +google.golang.org/genproto v0.0.0-20240701130421-f6361c86f094 h1:6whtk83KtD3FkGrVb2hFXuQ+ZMbCNdakARIn/aHMmG8= +google.golang.org/genproto v0.0.0-20240701130421-f6361c86f094/go.mod h1:Zs4wYw8z1zr6RNF4cwYb31mvN/EGaKAdQjNCF3DW6K4= +google.golang.org/genproto/googleapis/api v0.0.0-20240624140628-dc46fd24d27d h1:Aqf0fiIdUQEj0Gn9mKFFXoQfTTEaNopWpfVyYADxiSg= +google.golang.org/genproto/googleapis/api v0.0.0-20240624140628-dc46fd24d27d/go.mod h1:Od4k8V1LQSizPRUK4OzZ7TBE/20k+jPczUDAEyvn69Y= google.golang.org/genproto/googleapis/rpc v0.0.0-20240709173604-40e1e62336c5 h1:SbSDUWW1PAO24TNpLdeheoYPd7kllICcLU52x6eD4kQ= google.golang.org/genproto/googleapis/rpc v0.0.0-20240709173604-40e1e62336c5/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= diff --git a/go.work.sum b/go.work.sum index c200ba3..d2f8bc2 100644 --- a/go.work.sum +++ b/go.work.sum @@ -8,6 +8,7 @@ cloud.google.com/go v0.60.0/go.mod h1:yw2G51M9IfRboUH61Us8GqCeF1PzPblB823Mn2q2eA cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= cloud.google.com/go v0.110.10/go.mod h1:v1OoFqYxiBkUrruItNM3eT4lLByNjxmJSV/xDKJNnic= cloud.google.com/go v0.112.0/go.mod h1:3jEEVwZ/MHU4djK5t5RHuKOA/GbLddgTdVubX1qnPD4= +cloud.google.com/go v0.112.1/go.mod h1:+Vbu+Y1UU+I1rjmzeMOb/8RfkKJK2Gyxi1X6jJCZLo4= cloud.google.com/go v0.112.2/go.mod h1:iEqjp//KquGIJV/m+Pk3xecgKNhV+ry+vVTsy4TbDms= cloud.google.com/go/accessapproval v1.7.5 h1:uzmAMSgYcnlHa9X9YSQZ4Q1wlfl4NNkZyQgho1Z6p04= cloud.google.com/go/accessapproval v1.7.5/go.mod h1:g88i1ok5dvQ9XJsxpUInWWvUBrIZhyPDPbk4T01OoJ0= @@ -513,7 +514,6 @@ contrib.go.opencensus.io/exporter/stackdriver v0.13.4/go.mod h1:aXENhDJ1Y4lIg4EU cosmossdk.io/api v0.7.0/go.mod h1:kJFAEMLN57y0viszHDPLMmieF0471o5QAwwApa+270M= cosmossdk.io/api v0.7.2/go.mod h1:IcxpYS5fMemZGqyYtErK7OqvdM0C8kdW3dq8Q/XIG38= cosmossdk.io/api v0.7.4/go.mod h1:IcxpYS5fMemZGqyYtErK7OqvdM0C8kdW3dq8Q/XIG38= -cosmossdk.io/client/v2 v2.0.0-beta.3/go.mod h1:CZcL41HpJPOOayTCO28j8weNBQprG+SRiKX39votypo= cosmossdk.io/core v0.10.0/go.mod h1:MygXNld9DvMgYY4yE76DM/mdZpgfeyRjy6FPjEEehlY= cosmossdk.io/core v0.11.0/go.mod h1:LaTtayWBSoacF5xNzoF8tmLhehqlA9z1SWiPuNC6X1w= cosmossdk.io/depinject v1.0.0-alpha.4/go.mod h1:HeDk7IkR5ckZ3lMGs/o91AVUc7E596vMaOmslGFM3yU= @@ -540,6 +540,7 @@ cosmossdk.io/x/upgrade v0.1.1/go.mod h1:MNLptLPcIFK9CWt7Ra//8WUZAxweyRDNcbs5nkOc dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9 h1:VpgP7xuJadIUuKccphEpTJnWhS2jkQyMt6Y7pJCD7fY= +filippo.io/edwards25519 v1.0.0/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= gioui.org v0.0.0-20210308172011-57750fc8a0a6 h1:K72hopUosKG3ntOPNG4OzzbuhxGuVf06fa2la1/H/Ho= gioui.org v0.0.0-20210308172011-57750fc8a0a6/go.mod h1:RSH6KIUZ0p2xy5zHDxgAM4zumjgTw83q2ge/PI+yyw8= git.sr.ht/~sbinet/gg v0.3.1 h1:LNhjNn8DerC8f9DHLz6lS0YYul/b602DUxDgGkd/Aik= @@ -741,7 +742,6 @@ github.com/btcsuite/btcd/btcutil v1.0.0/go.mod h1:Uoxwv0pqYWhD//tfTiipkxNfdhG9Ur github.com/btcsuite/btcd/btcutil v1.1.0/go.mod h1:5OapHB7A2hBBWLm48mmw4MOHNJCcUBTwmWH/0Jn8VHE= github.com/btcsuite/btcd/btcutil v1.1.5/go.mod h1:PSZZ4UitpLBWzxGd5VGOrLnmOjtPP/a6HaFo12zMs00= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.0/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= -github.com/btcsuite/btcd/chaincfg/chainhash v1.1.0/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f h1:bAs4lUbRJpnnkd9VhRV3jjAVU7DJVjMaK+IsvSeZvFo= github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA= github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d h1:yJzD/yFppdVCf6ApMkVy8cUxV0XrxdP9rVf6D87/Mng= @@ -999,6 +999,7 @@ github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= github.com/felixge/fgprof v0.9.3 h1:VvyZxILNuCiUCSXtPtYmmtGvb65nqXh2QFWc0Wpf2/g= github.com/felixge/fgprof v0.9.3/go.mod h1:RdbpDgzqYVh/T9fPELJyV7EYJuHB55UTEULNun8eiPw= +github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/felixge/httpsnoop v1.0.2/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/ferranbt/fastssz v0.1.2 h1:Dky6dXlngF6Qjc+EfDipAkE83N5I5DE68bY6O0VLNPk= @@ -1111,8 +1112,6 @@ github.com/go-toolsmith/astcopy v1.0.2/go.mod h1:4TcEdbElGc9twQEYpVo/aieIXfHhiuL github.com/go-toolsmith/astequal v1.0.2/go.mod h1:9Ai4UglvtR+4up+bAD4+hCj7iTo4m/OXVTSLnCyTAx4= github.com/go-zookeeper/zk v1.0.2 h1:4mx0EYENAdX/B/rbunjlt5+4RTA/a9SMHBRuSKdGxPM= github.com/go-zookeeper/zk v1.0.2/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw= -github.com/gobwas/httphead v0.1.0/go.mod h1:O/RXo79gxV8G+RqlR/otEwx4Q36zl9rqC5u12GKvMCM= -github.com/gobwas/pool v0.2.1/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= github.com/goccy/go-json v0.9.7/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/godbus/dbus/v5 v5.0.4 h1:9349emZab16e7zQvpmsbtjc18ykshndd8y2PG3sgJbA= github.com/godbus/dbus/v5 v5.0.6 h1:mkgN1ofwASrYnJ5W6U/BxG15eXXXjirgZc7CLqkcaro= @@ -1164,7 +1163,6 @@ github.com/google/certificate-transparency-go v1.0.21/go.mod h1:QeJfpSbVSfYc7RgB github.com/google/certificate-transparency-go v1.1.1 h1:6JHXZhXEvilMcTjR4MGZn5KV0IRkcFl4CJx5iHVhjFE= github.com/google/certificate-transparency-go v1.1.1/go.mod h1:FDKqPvSXawb2ecErVRrD+nfy23RCzyl7eqVCEmlT1Zs= github.com/google/flatbuffers v1.12.1/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= -github.com/google/flatbuffers v23.5.26+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= github.com/google/go-containerregistry v0.13.0 h1:y1C7Z3e149OJbOPDBxLYR8ITPz8dTKqQwjErKVHJC8k= github.com/google/go-containerregistry v0.13.0/go.mod h1:J9FQ+eSS4a1aC2GNZxvNpbWhgp0487v+cgiilB4FqDo= github.com/google/go-pkcs11 v0.2.1-0.20230907215043-c6f79328ddf9 h1:OF1IPgv+F4NmqmJ98KTjdN97Vs1JxDPB3vbmYzV2dpk= @@ -1196,6 +1194,7 @@ github.com/googleapis/gax-go v0.0.0-20161107002406-da06d194a00e/go.mod h1:SFVmuj github.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qKpsEkdD5+I6QGU= github.com/googleapis/gax-go/v2 v2.12.1/go.mod h1:61M8vcyyXR2kqKFxKrfA22jaA8JGF7Dc8App1U3H6jc= github.com/googleapis/gax-go/v2 v2.12.2/go.mod h1:61M8vcyyXR2kqKFxKrfA22jaA8JGF7Dc8App1U3H6jc= +github.com/googleapis/gax-go/v2 v2.12.3/go.mod h1:AKloxT6GtNbaLm8QTNSidHUVsHYcBHwWRvkNFJUQcS4= github.com/googleapis/gax-go/v2 v2.12.4/go.mod h1:KYEYLorsnIGDi/rPC8b5TdlB9kbKoFubselGIoBMCwI= github.com/googleapis/go-type-adapters v1.0.0 h1:9XdMn+d/G57qq1s8dNc5IesGCXHf6V2HZ2JwRxfA2tA= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= @@ -1211,6 +1210,8 @@ github.com/gorhill/cronexpr v0.0.0-20180427100037-88b0669f7d75/go.mod h1:g2644b0 github.com/gorilla/context v1.1.1 h1:AWwleXJkX/nhcU9bZSnZoi3h/qGYqQAGhq6zZe/aQW8= github.com/gorilla/css v1.0.0 h1:BQqNyPTi50JCFMTw/b67hByjMVXZRwGha6wxVGkeihY= github.com/gorilla/css v1.0.0/go.mod h1:Dn721qIggHpt4+EFCcTLTU/vk5ySda2ReITrtgBl60c= +github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q= +github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/securecookie v1.1.1 h1:miw7JPhV+b/lAHSXz4qd/nN9jRiAFV5FwjeKyCS8BvQ= github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= @@ -1936,6 +1937,7 @@ github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926 h1:G3dpKMzFDjgEh2q1Z github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/ugorji/go v1.2.7 h1:qYhyWUUd6WbiM+C6JZAUkIJt/1WrjzNHY9+KCIjVqTo= github.com/ugorji/go v1.2.7/go.mod h1:nF9osbDWLy6bDVv/Rtoh6QgnvNDpmCalQV5urGCCS6M= +github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= github.com/ultraware/funlen v0.0.3/go.mod h1:Dp4UiAus7Wdb9KUZsYWZEWiRzGuM2kXM1lPbfaF6xhA= github.com/urfave/negroni v1.0.0 h1:kIimOitoypq34K7TG7DUaJ9kq/N4Ofuwi1sjz0KipXc= github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4= @@ -2072,6 +2074,7 @@ go.uber.org/fx v1.20.0 h1:ZMC/pnRvhsthOZh9MZjMq5U8Or3mA9zBSPaLnzs3ihQ= go.uber.org/fx v1.20.0/go.mod h1:qCUj0btiR3/JnanEr1TYEePfSw6o/4qYJscgvzQ5Ub0= go.uber.org/multierr v1.4.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.9.0/go.mod h1:X2jQV1h+kxSjClGpnseKVIxpmcjrj7MNnI0bnlfKTVQ= +go.uber.org/multierr v1.10.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee h1:0mgffUl7nfd+FpvXMVz4IDEaUSmT1ysygQC7qYo7sG4= go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw= golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -2120,6 +2123,7 @@ golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa/go.mod h1:zk2irFbV9DP96SEBUU golang.org/x/exp v0.0.0-20240103183307-be819d1f06fc/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI= golang.org/x/exp v0.0.0-20240222234643-814bf88cf225/go.mod h1:CxmFvTBINI24O/j8iY7H1xHzx2i4OsyguNBmN/uPtqc= golang.org/x/exp v0.0.0-20240314144324-c7f7c6466f7f/go.mod h1:CxmFvTBINI24O/j8iY7H1xHzx2i4OsyguNBmN/uPtqc= +golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0/go.mod h1:/lliqkxwWAhPjf5oSOIJup2XcqJaw8RGS6k3TGEc7GI= golang.org/x/exp/typeparams v0.0.0-20221208152030-732eee02a75a/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/exp/typeparams v0.0.0-20240213143201-ec583247a57a/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= @@ -2144,6 +2148,7 @@ golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/mod v0.16.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190327091125-710a502c58a2/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= @@ -2282,6 +2287,7 @@ golang.org/x/tools v0.17.0/go.mod h1:xsh6VxdV005rRVaS6SSAf9oiAqljS7UZUacMZ8Bnsps golang.org/x/tools v0.18.0/go.mod h1:GL7B4CwcLLeo59yx/9UWWuNOW1n3VZ4f5axWfML7Lcg= golang.org/x/tools v0.19.0/go.mod h1:qoJWxmGSIBmAeriMx19ogtrEPrGtDbPK634QFIcLAhc= golang.org/x/tools v0.20.0/go.mod h1:WvitBU7JJf6A4jOdg4S1tviW9bhUxkgeCui/0JHctQg= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= gonum.org/v1/gonum v0.8.2/go.mod h1:oe/vMfY3deqTw+1EZJhuvEW2iwGF1bW9wwu7XCu0+v0= gonum.org/v1/gonum v0.9.3/go.mod h1:TZumC3NeyVQskjXqmyWt4S3bINhy7B4eYwW69EbyX+0= @@ -2306,6 +2312,7 @@ google.golang.org/api v0.162.0/go.mod h1:6SulDkfoBIg4NFmCuZ39XeeAgSHCPecfSUuDyYl google.golang.org/api v0.166.0/go.mod h1:4FcBc686KFi7QI/U51/2GKKevfZMpM17sCdibqe/bSA= google.golang.org/api v0.167.0/go.mod h1:4FcBc686KFi7QI/U51/2GKKevfZMpM17sCdibqe/bSA= google.golang.org/api v0.169.0/go.mod h1:gpNOiMA2tZ4mf5R9Iwf4rK/Dcz0fbdIgWYWVoxmsyLg= +google.golang.org/api v0.171.0/go.mod h1:Hnq5AHm4OTMt2BUVjael2CWZFD6vksJdWCWiUAmjC9o= google.golang.org/api v0.178.0/go.mod h1:84/k2v8DFpDRebpGcooklv/lais3MEfqpaBLA12gl2U= google.golang.org/api v0.183.0/go.mod h1:q43adC5/pHoSZTx5h2mSmdF7NcyfW9JuDyIOJAgS9ZQ= google.golang.org/api v0.184.0/go.mod h1:CeDTtUEiYENAf8PPG5VZW2yNp2VM3VWbCeTioAZBTBA= @@ -2330,6 +2337,7 @@ google.golang.org/genproto v0.0.0-20231212172506-995d672761c0/go.mod h1:l/k7rMz0 google.golang.org/genproto v0.0.0-20240116215550-a9fa1716bcac/go.mod h1:+Rvu7ElI+aLzyDQhpHMFMMltsD6m7nqpuWDd2CwJw3k= google.golang.org/genproto v0.0.0-20240125205218-1f4bbc51befe/go.mod h1:cc8bqMqtv9gMOr0zHg2Vzff5ULhhL2IXP4sbcn32Dro= google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9/go.mod h1:mqHbVIp48Muh7Ywss/AD6I5kNVKZMmAa/QEW58Gxp2s= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= google.golang.org/genproto v0.0.0-20240401170217-c3f982113cda/go.mod h1:g2LLCvCeCSir/JJSWosk19BR4NVxGqHUC6rxIRsd7Aw= google.golang.org/genproto v0.0.0-20240528184218-531527333157/go.mod h1:ubQlAQnzejB8uZzszhrTCU2Fyp6Vi7ZE5nn0c3W8+qQ= google.golang.org/genproto v0.0.0-20240617180043-68d350f18fd4/go.mod h1:EvuUDCulqGgV80RvP1BHuom+smhX4qtlhnNatHuroGQ= @@ -2347,6 +2355,7 @@ google.golang.org/genproto/googleapis/api v0.0.0-20240221002015-b0ce06bbee7c/go. google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:5iCWqnniDlqZHrd3neWVTOwvh/v6s3232omMecelax8= google.golang.org/genproto/googleapis/api v0.0.0-20240304161311-37d4d3c04a78/go.mod h1:O1cOfN1Cy6QEYr7VxtjOyP5AdAuR0aJ/MYZaaof623Y= google.golang.org/genproto/googleapis/api v0.0.0-20240311132316-a219d84964c2/go.mod h1:O1cOfN1Cy6QEYr7VxtjOyP5AdAuR0aJ/MYZaaof623Y= +google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237/go.mod h1:Z5Iiy3jtmioajWHDGFk7CeugTyHtPvMHA4UTmUkyalE= google.golang.org/genproto/googleapis/api v0.0.0-20240506185236-b8a5c65736ae/go.mod h1:FfiGhwUm6CJviekPrc0oJ+7h29e+DmWU6UtjX0ZvI7Y= google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157/go.mod h1:99sLkeliLXfdj2J75X3Ho+rrVCaJze0uwN7zDDkjPVU= google.golang.org/genproto/googleapis/api v0.0.0-20240604185151-ef581f913117/go.mod h1:OimBR/bc1wPO9iV4NC2bpyjy3VnAwZh5EBPQdtaE5oo= From a8c90ae820b09f3f6c2482554c403e392a28401e Mon Sep 17 00:00:00 2001 From: Dan Kanefsky Date: Fri, 8 Nov 2024 16:36:43 -0800 Subject: [PATCH 4/8] chore: adapt e2e --- Makefile | 2 +- chains.yaml => e2e/chains.yaml | 0 e2e/clients.json | 26 ----------------- e2e/clients_test.go | 52 ++++++++++++++++++++++++++-------- e2e/fee_test.go | 2 +- e2e/go.mod | 2 +- e2e/go.sum | 4 +-- e2e/ownership_test.go | 2 +- e2e/params_test.go | 3 +- e2e/upgrade.json | 28 ------------------ e2e/upgrade_test.go | 28 ++++++++++++------ e2e/utils.go | 5 ++-- 12 files changed, 71 insertions(+), 83 deletions(-) rename chains.yaml => e2e/chains.yaml (100%) delete mode 100644 e2e/clients.json delete mode 100644 e2e/upgrade.json diff --git a/Makefile b/Makefile index ba0a947..0ee87c2 100644 --- a/Makefile +++ b/Makefile @@ -67,7 +67,7 @@ ifeq (,$(shell which heighliner)) @echo heighliner not found. https://github.com/strangelove-ventures/heighliner else @echo "🤖 Building image..." - @heighliner build --chain noble-authority-simd --local 1> /dev/null + @heighliner build --file ./e2e/chains.yaml --chain noble-authority-simd --local @echo "✅ Completed build!" endif diff --git a/chains.yaml b/e2e/chains.yaml similarity index 100% rename from chains.yaml rename to e2e/chains.yaml diff --git a/e2e/clients.json b/e2e/clients.json deleted file mode 100644 index 93966ec..0000000 --- a/e2e/clients.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "body": { - "messages": [ - { - "@type": "/ibc.core.client.v1.MsgRecoverClient", - "signer": "noble13am065qmk680w86wya4u9refhnssqwcvgs0sfk", - "subject_client_id": "07-tendermint-0", - "substitute_client_id": "07-tendermint-1" - } - ], - "memo": "", - "timeout_height": "0", - "extension_options": [], - "non_critical_extension_options": [] - }, - "auth_info": { - "signer_infos": [], - "fee": { - "amount": [], - "gas_limit": "200000", - "payer": "", - "granter": "" - } - }, - "signatures": [] -} diff --git a/e2e/clients_test.go b/e2e/clients_test.go index 290363b..0fa6821 100644 --- a/e2e/clients_test.go +++ b/e2e/clients_test.go @@ -8,8 +8,8 @@ package e2e import ( _ "embed" - "path" "testing" + "time" "cosmossdk.io/math" @@ -19,15 +19,12 @@ import ( "github.com/stretchr/testify/require" ) -//go:embed clients.json -var Clients []byte - // TestClientSubstitution tests the module's ability to substitute IBC clients. func TestClientSubstitution(t *testing.T) { t.Parallel() var wrapper Wrapper - ctx, reporter, rly := Suite(t, &wrapper, true) + ctx, logger, reporter, rly := Suite(t, &wrapper, true) validator := wrapper.chain.Validators[0] nobleChainID, gaiaChainID := wrapper.chain.Config().ChainID, wrapper.gaia.Config().ChainID @@ -36,10 +33,18 @@ func TestClientSubstitution(t *testing.T) { err := rly.GeneratePath(ctx, reporter, nobleChainID, gaiaChainID, pathName) require.NoError(t, err) + tp := 20 * time.Second err = rly.CreateClient(ctx, reporter, nobleChainID, gaiaChainID, pathName, ibc.CreateClientOptions{ - TrustingPeriod: "30s", + TrustingPeriod: tp.String(), }) require.NoError(t, err) + + nobleClients, err := rly.GetClients(ctx, reporter, nobleChainID) + require.NoError(t, err) + require.Len(t, nobleClients, 2) // ignore 09-localhost client + + nobleClientToExpire := nobleClients[0] + err = rly.CreateClient(ctx, reporter, gaiaChainID, nobleChainID, pathName, ibc.CreateClientOptions{}) require.NoError(t, err) require.NoError(t, testutil.WaitForBlocks(ctx, 1, wrapper.chain, wrapper.gaia)) @@ -51,8 +56,12 @@ func TestClientSubstitution(t *testing.T) { err = rly.CreateChannel(ctx, reporter, pathName, ibc.DefaultChannelOpts()) require.NoError(t, err) + timer := time.NewTimer(tp + 2*time.Second) + users := interchaintest.GetAndFundTestUsers(t, ctx, "user", math.NewInt(5_000_000), wrapper.chain, wrapper.gaia) - require.NoError(t, testutil.WaitForBlocks(ctx, 10, wrapper.chain, wrapper.gaia)) + + logger.Info("waiting for client to expire...") + <-timer.C _, err = validator.SendIBCTransfer(ctx, "channel-0", users[0].KeyName(), ibc.WalletAmount{ Address: users[1].FormattedAddress(), @@ -61,13 +70,32 @@ func TestClientSubstitution(t *testing.T) { }, ibc.TransferOptions{}) require.ErrorContains(t, err, "client state is not active") - res := rly.Exec(ctx, reporter, []string{"rly", "tx", "client", nobleChainID, gaiaChainID, pathName, "--override", "--home", rly.HomeDir()}, nil) - require.NoError(t, res.Err) + err = rly.CreateClient(ctx, reporter, nobleChainID, gaiaChainID, pathName, ibc.CreateClientOptions{Override: true}) + require.NoError(t, err) + + nobleClients, err = rly.GetClients(ctx, reporter, nobleChainID) + require.NoError(t, err) + require.Len(t, nobleClients, 3) // ignore 09-localhost client + + newNobleClient := nobleClients[1] + + notAuthorized := interchaintest.GetAndFundTestUsers(t, ctx, "wallet", math.NewInt(100000), wrapper.chain)[0] + + cmd := []string{"authority", "recover-client", nobleClientToExpire.ClientID, newNobleClient.ClientID} + + // broadcast from un-authorized account + _, err = validator.ExecTx( + ctx, + notAuthorized.KeyName(), + cmd..., + ) + require.ErrorContains(t, err, "signer is not authority") - require.NoError(t, validator.WriteFile(ctx, Clients, "clients.json")) + // broadcast from authorized authority account _, err = validator.ExecTx( - ctx, wrapper.owner.KeyName(), - "authority", "execute", path.Join(validator.HomeDir(), "clients.json"), + ctx, + wrapper.owner.KeyName(), + cmd..., ) require.NoError(t, err) diff --git a/e2e/fee_test.go b/e2e/fee_test.go index f34bcea..acb6118 100644 --- a/e2e/fee_test.go +++ b/e2e/fee_test.go @@ -23,7 +23,7 @@ func TestBeginBlocker(t *testing.T) { t.Parallel() var wrapper Wrapper - ctx, _, _ := Suite(t, &wrapper, false) + ctx, _, _, _ := Suite(t, &wrapper, false) validator := wrapper.chain.Validators[0] oldBalance, err := wrapper.chain.BankQueryAllBalances(ctx, wrapper.owner.FormattedAddress()) diff --git a/e2e/go.mod b/e2e/go.mod index ea13d98..c1509e7 100644 --- a/e2e/go.mod +++ b/e2e/go.mod @@ -73,7 +73,7 @@ require ( github.com/cosmos/gogogateway v1.2.0 // indirect github.com/cosmos/iavl v1.2.0 // indirect github.com/cosmos/ibc-go/modules/capability v1.0.1 // indirect - github.com/cosmos/ibc-go/v8 v8.5.1 // indirect + github.com/cosmos/ibc-go/v8 v8.5.2 // indirect github.com/cosmos/ics23/go v0.11.0 // indirect github.com/cosmos/interchain-security/v5 v5.1.1 // indirect github.com/cosmos/ledger-cosmos-go v0.13.3 // indirect diff --git a/e2e/go.sum b/e2e/go.sum index 051e6f6..ea132ca 100644 --- a/e2e/go.sum +++ b/e2e/go.sum @@ -390,8 +390,8 @@ github.com/cosmos/iavl v1.2.0 h1:kVxTmjTh4k0Dh1VNL046v6BXqKziqMDzxo93oh3kOfM= github.com/cosmos/iavl v1.2.0/go.mod h1:HidWWLVAtODJqFD6Hbne2Y0q3SdxByJepHUOeoH4LiI= github.com/cosmos/ibc-go/modules/capability v1.0.1 h1:ibwhrpJ3SftEEZRxCRkH0fQZ9svjthrX2+oXdZvzgGI= github.com/cosmos/ibc-go/modules/capability v1.0.1/go.mod h1:rquyOV262nGJplkumH+/LeYs04P3eV8oB7ZM4Ygqk4E= -github.com/cosmos/ibc-go/v8 v8.5.1 h1:3JleEMKBjRKa3FeTKt4fjg22za/qygLBo7mDkoYTNBs= -github.com/cosmos/ibc-go/v8 v8.5.1/go.mod h1:P5hkAvq0Qbg0h18uLxDVA9q1kOJ0l36htMsskiNwXbo= +github.com/cosmos/ibc-go/v8 v8.5.2 h1:27s9oeD2AxLQF3e9BQsYt9doONyZ7FwZi/qkBv6Sdks= +github.com/cosmos/ibc-go/v8 v8.5.2/go.mod h1:P5hkAvq0Qbg0h18uLxDVA9q1kOJ0l36htMsskiNwXbo= github.com/cosmos/ics23/go v0.11.0 h1:jk5skjT0TqX5e5QJbEnwXIS2yI2vnmLOgpQPeM5RtnU= github.com/cosmos/ics23/go v0.11.0/go.mod h1:A8OjxPE67hHST4Icw94hOxxFEJMBG031xIGF/JHNIY0= github.com/cosmos/interchain-security/v5 v5.1.1 h1:xmRRMeE4xoc+JAZUh0XzXFYWaGBtzFFj5SETuOgnEnY= diff --git a/e2e/ownership_test.go b/e2e/ownership_test.go index 480c938..26fc88c 100644 --- a/e2e/ownership_test.go +++ b/e2e/ownership_test.go @@ -19,7 +19,7 @@ func TestOwnershipTransfer(t *testing.T) { t.Parallel() var wrapper Wrapper - ctx, _, _ := Suite(t, &wrapper, false) + ctx, _, _, _ := Suite(t, &wrapper, false) validator := wrapper.chain.Validators[0] EnsureOwner(t, wrapper, ctx, wrapper.owner.FormattedAddress()) diff --git a/e2e/params_test.go b/e2e/params_test.go index afdecae..894dc9a 100644 --- a/e2e/params_test.go +++ b/e2e/params_test.go @@ -18,11 +18,12 @@ import ( var Params []byte // TestParameterUpdate tests the module's ability to modify module parameters. +// This test uses the "execute" command to test broadcasting arbitrary messages. func TestParameterUpdate(t *testing.T) { t.Parallel() var wrapper Wrapper - ctx, _, _ := Suite(t, &wrapper, false) + ctx, _, _, _ := Suite(t, &wrapper, false) validator := wrapper.chain.Validators[0] EnsureParams(t, wrapper, ctx, 0) diff --git a/e2e/upgrade.json b/e2e/upgrade.json deleted file mode 100644 index 69c9b69..0000000 --- a/e2e/upgrade.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "body": { - "messages": [ - { - "@type": "/cosmos.upgrade.v1beta1.MsgSoftwareUpgrade", - "authority": "noble13am065qmk680w86wya4u9refhnssqwcvgs0sfk", - "plan": { - "name": "v2", - "height": "50" - } - } - ], - "memo": "", - "timeout_height": "0", - "extension_options": [], - "non_critical_extension_options": [] - }, - "auth_info": { - "signer_infos": [], - "fee": { - "amount": [], - "gas_limit": "200000", - "payer": "", - "granter": "" - } - }, - "signatures": [] -} diff --git a/e2e/upgrade_test.go b/e2e/upgrade_test.go index dbfddb9..54d193c 100644 --- a/e2e/upgrade_test.go +++ b/e2e/upgrade_test.go @@ -8,29 +8,41 @@ package e2e import ( _ "embed" - "path" "testing" + "cosmossdk.io/math" + "github.com/strangelove-ventures/interchaintest/v8" "github.com/stretchr/testify/require" ) -//go:embed upgrade.json -var Upgrade []byte - // TestScheduleUpgrade tests the module's ability to schedule an upgrade on-chain. func TestScheduleUpgrade(t *testing.T) { t.Parallel() var wrapper Wrapper - ctx, _, _ := Suite(t, &wrapper, false) + ctx, _, _, _ := Suite(t, &wrapper, false) validator := wrapper.chain.Validators[0] + notAuthorized := interchaintest.GetAndFundTestUsers(t, ctx, "wallet", math.NewInt(100000), wrapper.chain)[0] + EnsureUpgrade(t, wrapper, ctx, "", 0) - require.NoError(t, validator.WriteFile(ctx, Upgrade, "upgrade.json")) + cmd := []string{"authority", "software-upgrade", "v2", "--upgrade-height", "50", + "--chain-id", wrapper.chain.Config().ChainID, "--no-validate"} + + // broadcast from un-authorized account _, err := validator.ExecTx( - ctx, wrapper.owner.KeyName(), - "authority", "execute", path.Join(validator.HomeDir(), "upgrade.json"), + ctx, + notAuthorized.KeyName(), + cmd..., + ) + require.ErrorContains(t, err, "signer is not authority") + + // broadcast from authorized authority account + _, err = validator.ExecTx( + ctx, + wrapper.owner.KeyName(), + cmd..., ) require.NoError(t, err) diff --git a/e2e/utils.go b/e2e/utils.go index 965639f..568c784 100644 --- a/e2e/utils.go +++ b/e2e/utils.go @@ -23,6 +23,7 @@ import ( "github.com/strangelove-ventures/interchaintest/v8/relayer/rly" "github.com/strangelove-ventures/interchaintest/v8/testreporter" "github.com/stretchr/testify/require" + "go.uber.org/zap" "go.uber.org/zap/zaptest" ) @@ -34,9 +35,9 @@ type Wrapper struct { pendingOwner ibc.Wallet } -func Suite(t *testing.T, wrapper *Wrapper, ibcEnabled bool) (ctx context.Context, execReporter *testreporter.RelayerExecReporter, relayer *rly.CosmosRelayer) { +func Suite(t *testing.T, wrapper *Wrapper, ibcEnabled bool) (ctx context.Context, logger *zap.Logger, execReporter *testreporter.RelayerExecReporter, relayer *rly.CosmosRelayer) { ctx = context.Background() - logger := zaptest.NewLogger(t) + logger = zaptest.NewLogger(t) reporter := testreporter.NewNopReporter() execReporter = reporter.RelayerExecReporter(t) client, network := interchaintest.DockerSetup(t) From 9399c268c20c8ce377fad2929494bffa8ff5357c Mon Sep 17 00:00:00 2001 From: Dan Kanefsky <56059752+boojamya@users.noreply.github.com> Date: Fri, 6 Dec 2024 10:08:42 -0800 Subject: [PATCH 5/8] Apply suggestions from code review Co-authored-by: John Letey --- client/cli/tx.go | 27 +++++++++++++-------------- client/cli/utils.go | 10 ++++++---- 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/client/cli/tx.go b/client/cli/tx.go index a9b49d2..2d898bb 100644 --- a/client/cli/tx.go +++ b/client/cli/tx.go @@ -69,17 +69,18 @@ func NewCmdExecute() *cobra.Command { return cmd } -// NewCmdSubmitUpgrade schedule an on-chain software upgrade. -// This command has been adapted from the SDK's `NewCmdSubmitUpgradeProposal`. -// https://github.com/cosmos/cosmos-sdk/blob/x/upgrade/v0.1.4/x/upgrade/client/cli/tx.go#L47 +// NewCmdSoftwareUpgrade is a helper for scheduling a software upgrade. +// +// This command has been adapted from the Cosmos SDK implementation. +// https://github.com/cosmos/cosmos-sdk/blob/x/upgrade/v0.1.4/x/upgrade/client/cli/tx.go#L46-L133 func NewCmdSubmitUpgrade() *cobra.Command { cmd := &cobra.Command{ Use: "software-upgrade [--upgrade-height ] [--upgrade-info ] [flags]", Args: cobra.ExactArgs(1), - Short: "Schedule a software upgrade on chain", - Long: "Schedule a software upgrade on chain.\n" + - "Please specify a unique name and height for the upgrade to take effect.\n" + - "You may include info to reference a binary download link, in a format compatible with: https://docs.cosmos.network/main/build/tooling/cosmovisor", + Short: "Helper for scheduling a software upgrade", + Long: "Helper for scheduling a software upgrade.\n\n" + + "You can additionally include upgrade info via a flag to reference pre-built binaries, documentation, etc.\n" + + "https://docs.cosmos.network/main/build/tooling/cosmovisor", RunE: func(cmd *cobra.Command, args []string) error { clientCtx, err := client.GetClientTxContext(cmd) if err != nil { @@ -142,17 +143,15 @@ func NewCmdSubmitUpgrade() *cobra.Command { return cmd } -// newSubmitRecoverClientCmd defines the command to recover an IBC light client. -// This command has been adapted from ibc-go's `newSubmitRecoverClientProposalCmd`. -// https://github.com/cosmos/ibc-go/blob/v8.5.2/modules/core/02-client/client/cli/tx.go#L249 +// NewCmdRecoverClient is a helper for recovering an expired client. +// +// This command has been adapted from the IBC-Go implementation. +// https://github.com/cosmos/ibc-go/blob/v8.5.2/modules/core/02-client/client/cli/tx.go#L248-L303 func newSubmitRecoverClientCmd() *cobra.Command { cmd := &cobra.Command{ Use: "recover-client [subject-client-id] [substitute-client-id] [flags]", Args: cobra.ExactArgs(2), - Short: "recover an IBC client", - Long: `recover an IBC client - Please specify a subject client identifier you want to recover - Please specify the substitute client the subject client will be recovered to.`, + Short: "Helper for recovering an expired client", RunE: func(cmd *cobra.Command, args []string) error { clientCtx, err := client.GetClientTxContext(cmd) if err != nil { diff --git a/client/cli/utils.go b/client/cli/utils.go index 1fef861..f005f6a 100644 --- a/client/cli/utils.go +++ b/client/cli/utils.go @@ -9,8 +9,9 @@ import ( "cosmossdk.io/x/upgrade/types" ) -// parsePlan was copied from the SDK because it was not exported -// https://github.com/cosmos/cosmos-sdk/blob/x/upgrade/v0.1.4/x/upgrade/client/cli/parse.go +// parsePlan is copied from the Cosmos SDK because it is not exported. +// +// https://github.com/cosmos/cosmos-sdk/blob/x/upgrade/v0.1.4/x/upgrade/client/cli/parse.go#L9-L21 func parsePlan(fs *pflag.FlagSet, name string) (types.Plan, error) { height, err := fs.GetInt64(FlagUpgradeHeight) if err != nil { @@ -25,8 +26,9 @@ func parsePlan(fs *pflag.FlagSet, name string) (types.Plan, error) { return types.Plan{Name: name, Height: height, Info: info}, nil } -// getDefaultDaemonName was copied from the SDK because it was not exported -// https://github.com/cosmos/cosmos-sdk/blob/x/upgrade/v0.1.4/x/upgrade/client/cli/tx.go#L187 +// getDefaultDaemonName is copied from the Cosmos SDK because it is not exported. +// +// https://github.com/cosmos/cosmos-sdk/blob/x/upgrade/v0.1.4/x/upgrade/client/cli/tx.go#L184-L194 func getDefaultDaemonName() string { // DAEMON_NAME is specifically used here to correspond with the Cosmovisor setup env vars. name := os.Getenv("DAEMON_NAME") From cd24a3d9e28383485b3ea38afd49dd96ab90e3a1 Mon Sep 17 00:00:00 2001 From: Dan Kanefsky Date: Fri, 6 Dec 2024 10:42:32 -0800 Subject: [PATCH 6/8] style: feedback from review --- client/cli/tx.go | 8 ++++---- client/cli/utils.go | 6 ++++++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/client/cli/tx.go b/client/cli/tx.go index 2d898bb..fc69aa4 100644 --- a/client/cli/tx.go +++ b/client/cli/tx.go @@ -36,8 +36,8 @@ func GetTxCmd() *cobra.Command { } cmd.AddCommand(NewCmdExecute()) - cmd.AddCommand(NewCmdSubmitUpgrade()) - cmd.AddCommand(newSubmitRecoverClientCmd()) + cmd.AddCommand(NewCmdSoftwareUpgrade()) + cmd.AddCommand(NewCmdRecoverClient()) return cmd } @@ -73,7 +73,7 @@ func NewCmdExecute() *cobra.Command { // // This command has been adapted from the Cosmos SDK implementation. // https://github.com/cosmos/cosmos-sdk/blob/x/upgrade/v0.1.4/x/upgrade/client/cli/tx.go#L46-L133 -func NewCmdSubmitUpgrade() *cobra.Command { +func NewCmdSoftwareUpgrade() *cobra.Command { cmd := &cobra.Command{ Use: "software-upgrade [--upgrade-height ] [--upgrade-info ] [flags]", Args: cobra.ExactArgs(1), @@ -147,7 +147,7 @@ func NewCmdSubmitUpgrade() *cobra.Command { // // This command has been adapted from the IBC-Go implementation. // https://github.com/cosmos/ibc-go/blob/v8.5.2/modules/core/02-client/client/cli/tx.go#L248-L303 -func newSubmitRecoverClientCmd() *cobra.Command { +func NewCmdRecoverClient() *cobra.Command { cmd := &cobra.Command{ Use: "recover-client [subject-client-id] [substitute-client-id] [flags]", Args: cobra.ExactArgs(2), diff --git a/client/cli/utils.go b/client/cli/utils.go index f005f6a..63e5a44 100644 --- a/client/cli/utils.go +++ b/client/cli/utils.go @@ -1,3 +1,9 @@ +// Copyright 2024 NASD Inc. +// +// Use of this source code is governed by a BSL-style +// license that can be found in the LICENSE file or at +// https://mariadb.com/bsl11. + package cli import ( From 695bdf8f77625c7b4455880cfec9ebab9f6afda5 Mon Sep 17 00:00:00 2001 From: Dan Kanefsky Date: Fri, 6 Dec 2024 10:42:40 -0800 Subject: [PATCH 7/8] chore: changelog --- .changelog/config.toml | 1 + .changelog/unreleased/.gitkeep | 0 .changelog/unreleased/improvements/4-add-helper-commands.md | 2 ++ 3 files changed, 3 insertions(+) create mode 100644 .changelog/config.toml create mode 100644 .changelog/unreleased/.gitkeep create mode 100644 .changelog/unreleased/improvements/4-add-helper-commands.md diff --git a/.changelog/config.toml b/.changelog/config.toml new file mode 100644 index 0000000..1e1292c --- /dev/null +++ b/.changelog/config.toml @@ -0,0 +1 @@ +project_url = "https://github.com/noble-assets/authority" diff --git a/.changelog/unreleased/.gitkeep b/.changelog/unreleased/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/.changelog/unreleased/improvements/4-add-helper-commands.md b/.changelog/unreleased/improvements/4-add-helper-commands.md new file mode 100644 index 0000000..c983060 --- /dev/null +++ b/.changelog/unreleased/improvements/4-add-helper-commands.md @@ -0,0 +1,2 @@ +- Add helper commands for broadcasting software upgrade and recover client + messages ([\#4](https://github.com/noble-assets/authority/pull/4)) \ No newline at end of file From 02e79107589444bb9b6d364036b4f610a8ab65da Mon Sep 17 00:00:00 2001 From: Dan Kanefsky Date: Fri, 6 Dec 2024 13:06:13 -0800 Subject: [PATCH 8/8] chore: prep changelog --- .../improvements/4-add-helper-commands.md | 2 +- .changelog/v1.0.1/summary.md | 3 +++ CHANGELOG.md | 11 +++++++++++ 3 files changed, 15 insertions(+), 1 deletion(-) rename .changelog/{unreleased => v1.0.1}/improvements/4-add-helper-commands.md (51%) create mode 100644 .changelog/v1.0.1/summary.md diff --git a/.changelog/unreleased/improvements/4-add-helper-commands.md b/.changelog/v1.0.1/improvements/4-add-helper-commands.md similarity index 51% rename from .changelog/unreleased/improvements/4-add-helper-commands.md rename to .changelog/v1.0.1/improvements/4-add-helper-commands.md index c983060..a0d5db7 100644 --- a/.changelog/unreleased/improvements/4-add-helper-commands.md +++ b/.changelog/v1.0.1/improvements/4-add-helper-commands.md @@ -1,2 +1,2 @@ - Add helper commands for broadcasting software upgrade and recover client - messages ([\#4](https://github.com/noble-assets/authority/pull/4)) \ No newline at end of file + messages. ([\#4](https://github.com/noble-assets/authority/pull/4)) diff --git a/.changelog/v1.0.1/summary.md b/.changelog/v1.0.1/summary.md new file mode 100644 index 0000000..10f321a --- /dev/null +++ b/.changelog/v1.0.1/summary.md @@ -0,0 +1,3 @@ +*Dec 6, 2024* + +This is a non-consensus breaking patch release to the v1 line. diff --git a/CHANGELOG.md b/CHANGELOG.md index 4ac05df..f501175 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,16 @@ # CHANGELOG +## v1.0.1 + +*Dec 6, 2024* + +This is a non-consensus breaking patch release to the v1 line. + +### IMPROVEMENTS + +- Add helper commands for broadcasting software upgrade and recover client + messages. ([\#4](https://github.com/noble-assets/authority/pull/4)) + ## v1.0.0 *Nov 10, 2024*