diff --git a/app/consumer/genesis.go b/app/consumer/genesis.go index fc13c62994..abd52f4383 100644 --- a/app/consumer/genesis.go +++ b/app/consumer/genesis.go @@ -15,8 +15,6 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/version" - cmtjson "github.com/cometbft/cometbft/libs/json" - consumerTypes "github.com/cosmos/interchain-security/v3/x/ccv/consumer/types" "github.com/cosmos/interchain-security/v3/x/ccv/types" ) @@ -42,8 +40,10 @@ type ( // Migration of consumer genesis content as it is exported from a provider version v2 // to a version readable by current consumer (version v3). func migrateFromV2(jsonRaw []byte, ctx client.Context) (json.RawMessage, error) { + + // v2 uses deprecated fields of GenesisState type oldConsumerGenesis := consumerTypes.GenesisState{} - err := cmtjson.Unmarshal(jsonRaw, &oldConsumerGenesis) + err := ctx.Codec.UnmarshalJSON(jsonRaw, &oldConsumerGenesis) if err != nil { return nil, fmt.Errorf("reading consumer genesis data failed: %s", err) } @@ -61,17 +61,21 @@ func migrateFromV2(jsonRaw []byte, ctx client.Context) (json.RawMessage, error) return nil, fmt.Errorf("invalid source version. Unexpected element 'provider.consensus_state'") } - // Note: version 2 of provider genesis data fills up deprecated fields + // Version 2 of provider genesis data fills up deprecated fields + // ProviderClientState, ConsensusState and InitialValSet newGenesis := types.ConsumerGenesisState{ Params: oldConsumerGenesis.Params, Provider: types.ProviderInfo{ ClientState: oldConsumerGenesis.ProviderClientState, - ConsensusState: oldConsumerGenesis.ConsensusState, + ConsensusState: oldConsumerGenesis.ProviderConsensusState, InitialValSet: oldConsumerGenesis.InitialValSet, }, } - newJson := ctx.Codec.MustMarshalJSON(&newGenesis) + newJson, err := ctx.Codec.MarshalJSON(&newGenesis) + if err != nil { + return nil, fmt.Errorf("failed marshalling data to new type: %s", err) + } return newJson, nil } @@ -103,14 +107,14 @@ func TransformConsumerGenesis(cmd *cobra.Command, args []string, transformationM return err } - bz, err := cmtjson.Marshal(newConsumerGenesis) + bz, err := newConsumerGenesis.MarshalJSON() if err != nil { return fmt.Errorf("failed exporting new consumer genesis to JSON: %s", err) } sortedBz, err := sdk.SortJSON(bz) if err != nil { - return err + return fmt.Errorf("failed sorting transformed consumer genesis JSON: %s", err) } cmd.Println(string(sortedBz)) diff --git a/app/consumer/genesis_test.go b/app/consumer/genesis_test.go new file mode 100644 index 0000000000..036a5370f0 --- /dev/null +++ b/app/consumer/genesis_test.go @@ -0,0 +1,211 @@ +package app_test + +import ( + "bytes" + "context" + "fmt" + "io/fs" + "os" + "testing" + "time" + + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/x/auth/types" + app "github.com/cosmos/interchain-security/v3/app/consumer" + consumerTypes "github.com/cosmos/interchain-security/v3/x/ccv/consumer/types" + "github.com/spf13/cobra" + "github.com/stretchr/testify/require" +) + +var consumerGenesisStates map[string]string = map[string]string{ + "v2": ` + { + "params": { + "enabled": true, + "blocks_per_distribution_transmission": "1500", + "distribution_transmission_channel": "", + "provider_fee_pool_addr_str": "", + "ccv_timeout_period": "2419200s", + "transfer_timeout_period": "3600s", + "consumer_redistribution_fraction": "0.75", + "historical_entries": "10000", + "unbonding_period": "1728000s", + "soft_opt_out_threshold": "", + "reward_denoms": [], + "provider_reward_denoms": [] + }, + "provider_client_id": "", + "provider_channel_id": "", + "new_chain": true, + "provider_client_state": { + "chain_id": "cosmoshub-4", + "trust_level": { + "numerator": "1", + "denominator": "3" + }, + "trusting_period": "1197504s", + "unbonding_period": "1814400s", + "max_clock_drift": "10s", + "frozen_height": { + "revision_number": "0", + "revision_height": "0" + }, + "latest_height": { + "revision_number": "4", + "revision_height": "15211521" + }, + "proof_specs": [ + { + "leaf_spec": { + "hash": "SHA256", + "prehash_key": "NO_HASH", + "prehash_value": "SHA256", + "length": "VAR_PROTO", + "prefix": "AA==" + }, + "inner_spec": { + "child_order": [ + 0, + 1 + ], + "child_size": 33, + "min_prefix_length": 4, + "max_prefix_length": 12, + "empty_child": null, + "hash": "SHA256" + }, + "max_depth": 0, + "min_depth": 0 + }, + { + "leaf_spec": { + "hash": "SHA256", + "prehash_key": "NO_HASH", + "prehash_value": "SHA256", + "length": "VAR_PROTO", + "prefix": "AA==" + }, + "inner_spec": { + "child_order": [ + 0, + 1 + ], + "child_size": 32, + "min_prefix_length": 1, + "max_prefix_length": 1, + "empty_child": null, + "hash": "SHA256" + }, + "max_depth": 0, + "min_depth": 0 + } + ], + "upgrade_path": [ + "upgrade", + "upgradedIBCState" + ], + "allow_update_after_expiry": true, + "allow_update_after_misbehaviour": true + }, + "provider_consensus_state": { + "timestamp": "2023-05-08T11:00:01.563901871Z", + "root": { + "hash": "qKVnVSXlsjDHC8ekKcy/0zSjzr3YekCurld9R4W07EI=" + }, + "next_validators_hash": "E08978F493101A3C5D459FB3087B8CFBA9E82D7A1FE1441E7D77E11AC0586BAC" + }, + "maturing_packets": [], + "initial_val_set": [ + { + "pub_key": { + "ed25519": "cOQZvh/h9ZioSeUMZB/1Vy1Xo5x2sjrVjlE/qHnYifM=" + }, + "power": "2345194" + }, + { + "pub_key": { + "ed25519": "vGSKfbQyKApvBhinpOOA0XQAdjxceihYNwtGskfZGyQ=" + }, + "power": "463811" + } + ], + "height_to_valset_update_id": [], + "outstanding_downtime_slashing": [], + "pending_consumer_packets": { + "list": [] + }, + "last_transmission_block_height": { + "height": "0" + }, + "preCCV": false + } + + `, +} + +func getClientCtx() client.Context { + encodingConfig := app.MakeTestEncodingConfig() + return client.Context{}. + WithCodec(encodingConfig.Codec). + WithInterfaceRegistry(encodingConfig.InterfaceRegistry). + WithTxConfig(encodingConfig.TxConfig). + WithLegacyAmino(encodingConfig.Amino). + WithInput(os.Stdin). + WithAccountRetriever(types.AccountRetriever{}) +} + +// Setup client context +func getGenesisTransformCmd(t *testing.T) *cobra.Command { + cmd := app.GetConsumerGenesisTransformCmd() + clientCtx := getClientCtx() + ctx := context.WithValue(context.Background(), client.ClientContextKey, &clientCtx) + cmd.SetContext(ctx) + err := client.SetCmdClientContext(cmd, clientCtx) + require.NoError(t, err, "Error setting up transformation command: %s", err) + return cmd +} + +// Check transformation of a version 2 ConsumerGenesis export to +// consumer genesis json format used by current consumer implementation. +func TestConsumerGenesisTransformationV2(t *testing.T) { + version := "v2" + filePath := os.TempDir() + "testdata.json" + err := os.WriteFile( + filePath, + []byte(consumerGenesisStates[version]), + fs.FileMode(0644)) + require.NoError(t, err) + defer os.Remove(filePath) + + cmd := getGenesisTransformCmd(t) + cmd.SetArgs([]string{version, filePath}) + + output := new(bytes.Buffer) + cmd.SetOutput(output) + require.NoError(t, err) + _, err = cmd.ExecuteC() + require.NoError(t, err) + + consumerGenesis := consumerTypes.GenesisState{} + + bz := output.Bytes() + fmt.Println(string(bz)) + // err = consumerGenesis.Unmarshal(output.Bytes()) + ctx := client.GetClientContextFromCmd(cmd) + + err = ctx.Codec.UnmarshalJSON(bz, &consumerGenesis) + require.NoError(t, err, "Error unmarshalling transformed genesis state :%s", err) + + // Some basic sanity checks on the content. + require.Nil(t, consumerGenesis.ProviderClientState) + require.NotNil(t, consumerGenesis.Provider.ClientState) + require.Equal(t, "cosmoshub-4", consumerGenesis.Provider.ClientState.ChainId) + + require.Nil(t, consumerGenesis.ProviderConsensusState) + require.NotNil(t, consumerGenesis.Provider.ConsensusState) + require.Equal(t, time.Time(time.Date(2023, time.May, 8, 11, 0, 1, 563901871, time.UTC)), + consumerGenesis.Provider.ConsensusState.Timestamp) + + require.Empty(t, consumerGenesis.InitialValSet) + require.NotEmpty(t, consumerGenesis.Provider.InitialValSet) +} diff --git a/proto/interchain_security/ccv/consumer/v1/genesis.proto b/proto/interchain_security/ccv/consumer/v1/genesis.proto index 62b4262b2e..bb33f34501 100644 --- a/proto/interchain_security/ccv/consumer/v1/genesis.proto +++ b/proto/interchain_security/ccv/consumer/v1/genesis.proto @@ -32,7 +32,7 @@ message GenesisState { // !!! DEPRECATED !!! ProviderClientState is deprecated. Use provider.client_state instead ibc.lightclients.tendermint.v1.ClientState provider_client_state = 5 [ deprecated = true]; // !!! DEPRECATED !!! ProviderConsensusState is deprecated. Use provider.consensus_state instead - ibc.lightclients.tendermint.v1.ConsensusState consensus_state = 6 [ deprecated = true]; + ibc.lightclients.tendermint.v1.ConsensusState provider_consensus_state = 6 [ deprecated = true]; // MaturingPackets nil on new chain, filled in on restart. repeated MaturingVSCPacket maturing_packets = 7 [ (gogoproto.nullable) = false ]; diff --git a/x/ccv/consumer/types/genesis.pb.go b/x/ccv/consumer/types/genesis.pb.go index f91d79523b..66f3544a6c 100644 --- a/x/ccv/consumer/types/genesis.pb.go +++ b/x/ccv/consumer/types/genesis.pb.go @@ -46,7 +46,7 @@ type GenesisState struct { // !!! DEPRECATED !!! ProviderClientState is deprecated. Use provider.client_state instead ProviderClientState *_07_tendermint.ClientState `protobuf:"bytes,5,opt,name=provider_client_state,json=providerClientState,proto3" json:"provider_client_state,omitempty"` // Deprecated: Do not use. // !!! DEPRECATED !!! ProviderConsensusState is deprecated. Use provider.consensus_state instead - ConsensusState *_07_tendermint.ConsensusState `protobuf:"bytes,6,opt,name=consensus_state,json=consensusState,proto3" json:"consensus_state,omitempty"` // Deprecated: Do not use. + ProviderConsensusState *_07_tendermint.ConsensusState `protobuf:"bytes,6,opt,name=provider_consensus_state,json=providerConsensusState,proto3" json:"provider_consensus_state,omitempty"` // Deprecated: Do not use. // MaturingPackets nil on new chain, filled in on restart. MaturingPackets []MaturingVSCPacket `protobuf:"bytes,7,rep,name=maturing_packets,json=maturingPackets,proto3" json:"maturing_packets"` // !!! DEPRECATED !!!! InitialValset is deprecated. Use provider.initial_val_set instead @@ -134,9 +134,9 @@ func (m *GenesisState) GetProviderClientState() *_07_tendermint.ClientState { } // Deprecated: Do not use. -func (m *GenesisState) GetConsensusState() *_07_tendermint.ConsensusState { +func (m *GenesisState) GetProviderConsensusState() *_07_tendermint.ConsensusState { if m != nil { - return m.ConsensusState + return m.ProviderConsensusState } return nil } @@ -463,64 +463,64 @@ func init() { } var fileDescriptor_2db73a6057a27482 = []byte{ - // 907 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x55, 0x4d, 0x6f, 0x23, 0x35, - 0x18, 0xee, 0xb4, 0xdd, 0x90, 0xb8, 0x9f, 0xeb, 0x2e, 0xd1, 0xd0, 0x88, 0x34, 0x0a, 0x42, 0x8a, - 0xf8, 0xf0, 0x90, 0xae, 0x40, 0x48, 0x08, 0x04, 0x49, 0x25, 0x1a, 0x54, 0x44, 0x95, 0x76, 0x83, - 0xb4, 0x1c, 0x46, 0x8e, 0xc7, 0x3b, 0xb1, 0x76, 0xc6, 0x1e, 0x8d, 0x3d, 0x53, 0x2a, 0xc4, 0x85, - 0x2b, 0x97, 0xfd, 0x4f, 0x5c, 0xf6, 0xb8, 0x47, 0x4e, 0x80, 0xda, 0x3f, 0x82, 0xec, 0xf1, 0xe4, - 0x83, 0xa6, 0x25, 0xb7, 0xf1, 0xf8, 0x7d, 0x9f, 0xe7, 0x79, 0xbf, 0xfc, 0x82, 0x2e, 0xe3, 0x8a, - 0xa6, 0x64, 0x82, 0x19, 0xf7, 0x25, 0x25, 0x59, 0xca, 0xd4, 0xb5, 0x47, 0x48, 0xee, 0x11, 0xc1, - 0x65, 0x16, 0xd3, 0xd4, 0xcb, 0xbb, 0x5e, 0x48, 0x39, 0x95, 0x4c, 0xa2, 0x24, 0x15, 0x4a, 0xc0, - 0xf7, 0x96, 0xb8, 0x20, 0x42, 0x72, 0x54, 0xba, 0xa0, 0xbc, 0x7b, 0xf8, 0xc9, 0x7d, 0xb8, 0x79, - 0xd7, 0x93, 0x13, 0x9c, 0xd2, 0xc0, 0x9f, 0x9a, 0x1b, 0xd8, 0x43, 0x8f, 0x8d, 0x89, 0x17, 0xb1, - 0x70, 0xa2, 0x48, 0xc4, 0x28, 0x57, 0xd2, 0x53, 0x94, 0x07, 0x34, 0x8d, 0x19, 0x57, 0xda, 0x6b, - 0x76, 0xb2, 0x0e, 0x4f, 0x42, 0x11,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0x77, 0x00, 0x07, 0x41, 0x4a, 0x65, 0xf1, 0x78, 0xd6, 0x86, 0xef, 0x4c, - 0x4d, 0xa6, 0x23, 0xff, 0x4d, 0x61, 0xd0, 0xfe, 0x14, 0x34, 0xce, 0x1e, 0xce, 0xda, 0x9c, 0xee, - 0x8d, 0x52, 0x77, 0x5b, 0x81, 0xc7, 0x77, 0x46, 0x1b, 0x3e, 0x01, 0x8f, 0x72, 0x49, 0x06, 0x81, - 0x8d, 0xb1, 0x38, 0xc0, 0x01, 0xd8, 0x29, 0x86, 0x5d, 0x5d, 0xfb, 0x5a, 0xb2, 0x89, 0x6f, 0xeb, - 0xf8, 0x10, 0x15, 0x0b, 0x03, 0x95, 0x0b, 0x03, 0x5d, 0x96, 0x0b, 0xa3, 0x57, 0xd5, 0x79, 0x7d, - 0xf5, 0xf7, 0x91, 0x33, 0xdc, 0x2e, 0x5d, 0xf5, 0x65, 0x7b, 0x0c, 0xea, 0xcb, 0x3b, 0x11, 0x9e, - 0x82, 0xcd, 0x88, 0x49, 0xad, 0x72, 0xa3, 0x78, 0xf9, 0x56, 0x59, 0x16, 0x25, 0x82, 0xad, 0xa3, - 0x41, 0xe8, 0xfd, 0xf8, 0xfa, 0xa6, 0xe9, 0xbc, 0xb9, 0x69, 0x3a, 0xff, 0xdc, 0x34, 0x9d, 0x57, - 0xb7, 0xcd, 0xb5, 0x37, 0xb7, 0xcd, 0xb5, 0x3f, 0x6f, 0x9b, 0x6b, 0xcf, 0xbf, 0x0c, 0x99, 0x9a, - 0x64, 0x63, 0x44, 0x44, 0xec, 0x11, 0x21, 0x63, 0x21, 0xbd, 0x19, 0xcd, 0xc7, 0xd3, 0xd5, 0x98, - 0x3f, 0xf5, 0x7e, 0x5e, 0x5c, 0xf8, 0x66, 0xd1, 0x8d, 0x2b, 0x26, 0xd0, 0xa7, 0xff, 0x06, 0x00, - 0x00, 0xff, 0xff, 0x60, 0x28, 0xb3, 0x3c, 0x21, 0x08, 0x00, 0x00, + // 912 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x56, 0xcf, 0x6f, 0x23, 0x35, + 0x14, 0xee, 0xb4, 0xdd, 0x90, 0xb8, 0xed, 0x6e, 0xd7, 0x5d, 0xa2, 0xa1, 0x11, 0x69, 0x14, 0x84, + 0x14, 0xf1, 0xc3, 0x43, 0xba, 0x02, 0x21, 0x21, 0x10, 0x24, 0x95, 0x68, 0x50, 0x11, 0x55, 0xda, + 0x0d, 0xd2, 0x5e, 0x46, 0x8e, 0xc7, 0x3b, 0xb1, 0x76, 0xc6, 0x1e, 0x8d, 0x9d, 0x09, 0x15, 0xe2, + 0xc2, 0x95, 0xcb, 0xfe, 0x59, 0x7b, 0xdc, 0x03, 0x07, 0x4e, 0x80, 0xda, 0x7f, 0x04, 0xd9, 0xe3, + 0x99, 0x24, 0x34, 0xed, 0xe6, 0x16, 0xcf, 0x7b, 0xef, 0xfb, 0xde, 0xfb, 0xde, 0x7b, 0x76, 0x40, + 0x97, 0x71, 0x45, 0x53, 0x32, 0xc1, 0x8c, 0xfb, 0x92, 0x92, 0x69, 0xca, 0xd4, 0x95, 0x47, 0x48, + 0xe6, 0x11, 0xc1, 0xe5, 0x34, 0xa6, 0xa9, 0x97, 0x75, 0xbd, 0x90, 0x72, 0x2a, 0x99, 0x44, 0x49, + 0x2a, 0x94, 0x80, 0x1f, 0xac, 0x08, 0x41, 0x84, 0x64, 0xa8, 0x08, 0x41, 0x59, 0xf7, 0xf0, 0xb3, + 0xbb, 0x70, 0xb3, 0xae, 0x27, 0x27, 0x38, 0xa5, 0x81, 0x5f, 0xba, 0x1b, 0xd8, 0x43, 0x8f, 0x8d, + 0x89, 0x17, 0xb1, 0x70, 0xa2, 0x48, 0xc4, 0x28, 0x57, 0xd2, 0x53, 0x94, 0x07, 0x34, 0x8d, 0x19, + 0x57, 0x3a, 0x6a, 0x7e, 0xb2, 0x01, 0x4f, 0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0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -639,9 +639,9 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0x3a } } - if m.ConsensusState != nil { + if m.ProviderConsensusState != nil { { - size, err := m.ConsensusState.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.ProviderConsensusState.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -898,8 +898,8 @@ func (m *GenesisState) Size() (n int) { l = m.ProviderClientState.Size() n += 1 + l + sovGenesis(uint64(l)) } - if m.ConsensusState != nil { - l = m.ConsensusState.Size() + if m.ProviderConsensusState != nil { + l = m.ProviderConsensusState.Size() n += 1 + l + sovGenesis(uint64(l)) } if len(m.MaturingPackets) > 0 { @@ -1197,7 +1197,7 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 6: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConsensusState", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ProviderConsensusState", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -1224,10 +1224,10 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.ConsensusState == nil { - m.ConsensusState = &_07_tendermint.ConsensusState{} + if m.ProviderConsensusState == nil { + m.ProviderConsensusState = &_07_tendermint.ConsensusState{} } - if err := m.ConsensusState.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.ProviderConsensusState.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex