From e161f16e4374c4b6998183f578025af0cb9b7ee4 Mon Sep 17 00:00:00 2001 From: antstalepresh Date: Tue, 27 Oct 2020 19:18:57 +1000 Subject: [PATCH 001/136] modify gov split proto modification --- proto/cosmos/gov/v1beta1/gov.proto | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/proto/cosmos/gov/v1beta1/gov.proto b/proto/cosmos/gov/v1beta1/gov.proto index 1d72e64321..3c00d4b2b2 100644 --- a/proto/cosmos/gov/v1beta1/gov.proto +++ b/proto/cosmos/gov/v1beta1/gov.proto @@ -119,9 +119,9 @@ message Vote { option (gogoproto.goproto_stringer) = false; option (gogoproto.equal) = false; - uint64 proposal_id = 1 [(gogoproto.moretags) = "yaml:\"proposal_id\""]; - string voter = 2; - VoteOption option = 3; + uint64 proposal_id = 1 [(gogoproto.moretags) = "yaml:\"proposal_id\""]; + string voter = 2; + repeated VoteOption options = 3; } // DepositParams defines the params for deposits on governance proposals. From 426d1953871ea34149e67c9a9b054bb8ffd50e99 Mon Sep 17 00:00:00 2001 From: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Date: Wed, 28 Oct 2020 10:41:54 +0100 Subject: [PATCH 002/136] ibc: Connection Version changed from string to proto definition (#7644) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ibc: Version to proto Any * change version string to struct * various version fixes * fix build * reorder code * update spec * rename to ProtoVersionsToExported and ExportedVersionsToProto Co-authored-by: Colin Axner Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- proto/ibc/core/connection/v1/connection.proto | 4 +- proto/ibc/core/connection/v1/tx.proto | 6 +- x/ibc/core/03-connection/client/cli/tx.go | 60 +++- .../03-connection/keeper/grpc_query_test.go | 8 +- x/ibc/core/03-connection/keeper/handshake.go | 38 +-- .../03-connection/keeper/handshake_test.go | 44 ++- .../core/03-connection/keeper/keeper_test.go | 9 +- .../03-connection/simulation/decoder_test.go | 2 +- x/ibc/core/03-connection/types/codec.go | 13 +- x/ibc/core/03-connection/types/connection.go | 6 +- .../core/03-connection/types/connection.pb.go | 141 +++++---- .../03-connection/types/connection_test.go | 12 +- .../core/03-connection/types/genesis_test.go | 8 +- x/ibc/core/03-connection/types/msgs.go | 10 +- x/ibc/core/03-connection/types/msgs_test.go | 42 +-- x/ibc/core/03-connection/types/tx.pb.go | 218 +++++++------ x/ibc/core/03-connection/types/version.go | 288 +++++++----------- .../core/03-connection/types/version_test.go | 111 +++---- .../core/04-channel/keeper/handshake_test.go | 16 +- x/ibc/core/exported/connection.go | 9 +- x/ibc/core/genesis_test.go | 6 +- x/ibc/core/keeper/msg_server.go | 2 +- x/ibc/core/simulation/decoder_test.go | 2 +- x/ibc/core/spec/01_concepts.md | 24 +- .../06-solomachine/types/client_state_test.go | 2 +- .../06-solomachine/types/codec_test.go | 4 +- .../09-localhost/types/client_state_test.go | 4 +- x/ibc/testing/chain.go | 11 +- 28 files changed, 541 insertions(+), 559 deletions(-) diff --git a/proto/ibc/core/connection/v1/connection.proto b/proto/ibc/core/connection/v1/connection.proto index 37c7609c37..0cf4f2092e 100644 --- a/proto/ibc/core/connection/v1/connection.proto +++ b/proto/ibc/core/connection/v1/connection.proto @@ -18,7 +18,7 @@ message ConnectionEnd { string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; // IBC version which can be utilised to determine encodings or protocols for // channels or packets utilising this connection - repeated string versions = 2; + repeated Version versions = 2; // current state of the connection end. State state = 3; // counterparty chain associated with this connection. @@ -35,7 +35,7 @@ message IdentifiedConnection { string client_id = 2 [(gogoproto.moretags) = "yaml:\"client_id\""]; // IBC version which can be utilised to determine encodings or protocols for // channels or packets utilising this connection - repeated string versions = 3; + repeated Version versions = 3; // current state of the connection end. State state = 4; // counterparty chain associated with this connection. diff --git a/proto/ibc/core/connection/v1/tx.proto b/proto/ibc/core/connection/v1/tx.proto index 86f87b53e7..8de521886b 100644 --- a/proto/ibc/core/connection/v1/tx.proto +++ b/proto/ibc/core/connection/v1/tx.proto @@ -32,7 +32,7 @@ message MsgConnectionOpenInit { string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; string connection_id = 2 [(gogoproto.moretags) = "yaml:\"connection_id\""]; Counterparty counterparty = 3 [(gogoproto.nullable) = false]; - string version = 4; + Version version = 4; string signer = 5; } @@ -50,7 +50,7 @@ message MsgConnectionOpenTry { string counterparty_chosen_connection_id = 3 [(gogoproto.moretags) = "yaml:\"counterparty_chosen_connection_id\""]; google.protobuf.Any client_state = 4 [(gogoproto.moretags) = "yaml:\"client_state\""]; Counterparty counterparty = 5 [(gogoproto.nullable) = false]; - repeated string counterparty_versions = 6 [(gogoproto.moretags) = "yaml:\"counterparty_versions\""]; + repeated Version counterparty_versions = 6 [(gogoproto.moretags) = "yaml:\"counterparty_versions\""]; ibc.core.client.v1.Height proof_height = 7 [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; // proof of the initialization the connection on Chain A: `UNITIALIZED -> @@ -76,7 +76,7 @@ message MsgConnectionOpenAck { string connection_id = 1 [(gogoproto.moretags) = "yaml:\"connection_id\""]; string counterparty_connection_id = 2 [(gogoproto.moretags) = "yaml:\"counterparty_connection_id\""]; - string version = 3; + Version version = 3; google.protobuf.Any client_state = 4 [(gogoproto.moretags) = "yaml:\"client_state\""]; ibc.core.client.v1.Height proof_height = 5 [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; diff --git a/x/ibc/core/03-connection/client/cli/tx.go b/x/ibc/core/03-connection/client/cli/tx.go index e67ae94f42..9526c5f8c0 100644 --- a/x/ibc/core/03-connection/client/cli/tx.go +++ b/x/ibc/core/03-connection/client/cli/tx.go @@ -2,13 +2,16 @@ package cli import ( "fmt" + "io/ioutil" "strings" + "github.com/pkg/errors" "github.com/spf13/cobra" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/tx" + "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/version" clienttypes "github.com/cosmos/cosmos-sdk/x/ibc/core/02-client/types" "github.com/cosmos/cosmos-sdk/x/ibc/core/03-connection/client/utils" @@ -53,7 +56,7 @@ func NewConnectionOpenInitCmd() *cobra.Command { return err } - var encodedVersion string + var version *types.Version versionIdentifier, _ := cmd.Flags().GetString(flagVersionIdentifier) if versionIdentifier != "" { @@ -64,16 +67,12 @@ func NewConnectionOpenInitCmd() *cobra.Command { features = strings.Split(versionFeatures, ",") } - version := types.NewVersion(versionIdentifier, features) - encodedVersion, err = version.Encode() - if err != nil { - return err - } + version = types.NewVersion(versionIdentifier, features) } msg := types.NewMsgConnectionOpenInit( connectionID, clientID, counterpartyConnectionID, counterpartyClientID, - counterpartyPrefix, encodedVersion, clientCtx.GetFromAddress(), + counterpartyPrefix, version, clientCtx.GetFromAddress(), ) if err := msg.ValidateBasic(); err != nil { @@ -99,9 +98,9 @@ func NewConnectionOpenTryCmd() *cobra.Command { cmd := &cobra.Command{ Use: strings.TrimSpace(`open-try [connection-id] [client-id] [counterparty-connection-id] [counterparty-client-id] [path/to/counterparty_prefix.json] [path/to/client_state.json] -[counterparty-versions] [consensus-height] [proof-height] [path/to/proof_init.json] [path/to/proof_client.json] [path/to/proof_consensus.json]`), +[path/to/counterparty_version1.json,path/to/counterparty_version2.json...] [consensus-height] [proof-height] [path/to/proof_init.json] [path/to/proof_client.json] [path/to/proof_consensus.json]`), Short: "initiate connection handshake between two chains", - Long: "Initialize a connection on chain A with a given counterparty chain B", + Long: "Initialize a connection on chain A with a given counterparty chain B. Provide counterparty versions separated by commas", Example: fmt.Sprintf( `%s tx %s %s open-try connection-id] [client-id] \ [counterparty-connection-id] [counterparty-client-id] [path/to/counterparty_prefix.json] [path/to/client_state.json]\ @@ -132,8 +131,28 @@ func NewConnectionOpenTryCmd() *cobra.Command { return err } - // TODO: parse strings? - counterpartyVersions := args[6] + cdc := codec.NewProtoCodec(clientCtx.InterfaceRegistry) + + versionsStr := strings.Split(args[6], ",") + counterpartyVersions := make([]*types.Version, len(versionsStr)) + + for _, ver := range versionsStr { + + // attempt to unmarshal version + version := &types.Version{} + if err := cdc.UnmarshalJSON([]byte(ver), version); err != nil { + + // check for file path if JSON input is not provided + contents, err := ioutil.ReadFile(ver) + if err != nil { + return errors.Wrap(err, "neither JSON input nor path to .json file for version were provided") + } + + if err := cdc.UnmarshalJSON(contents, version); err != nil { + return errors.Wrap(err, "error unmarshalling version file") + } + } + } consensusHeight, err := clienttypes.ParseHeight(args[7]) if err != nil { @@ -161,7 +180,7 @@ func NewConnectionOpenTryCmd() *cobra.Command { msg := types.NewMsgConnectionOpenTry( connectionID, provedID, clientID, counterpartyConnectionID, counterpartyClientID, - counterpartyClient, counterpartyPrefix, []string{counterpartyVersions}, + counterpartyClient, counterpartyPrefix, counterpartyVersions, proofInit, proofClient, proofConsensus, proofHeight, consensusHeight, clientCtx.GetFromAddress(), ) @@ -233,7 +252,22 @@ func NewConnectionOpenAckCmd() *cobra.Command { return err } - version := args[8] + cdc := codec.NewProtoCodec(clientCtx.InterfaceRegistry) + + // attempt to unmarshal version + version := &types.Version{} + if err := cdc.UnmarshalJSON([]byte(args[8]), version); err != nil { + + // check for file path if JSON input is not provided + contents, err := ioutil.ReadFile(args[8]) + if err != nil { + return errors.Wrap(err, "neither JSON input nor path to .json file for version were provided") + } + + if err := cdc.UnmarshalJSON(contents, version); err != nil { + return errors.Wrap(err, "error unmarshalling version file") + } + } msg := types.NewMsgConnectionOpenAck( connectionID, counterpartyConnectionID, counterpartyClient, proofTry, proofClient, proofConsensus, proofHeight, diff --git a/x/ibc/core/03-connection/keeper/grpc_query_test.go b/x/ibc/core/03-connection/keeper/grpc_query_test.go index 69443a1c03..5a8122e279 100644 --- a/x/ibc/core/03-connection/keeper/grpc_query_test.go +++ b/x/ibc/core/03-connection/keeper/grpc_query_test.go @@ -52,7 +52,7 @@ func (suite *KeeperTestSuite) TestQueryConnection() { connB := suite.chainB.GetFirstTestConnection(clientB, clientA) counterparty := types.NewCounterparty(clientB, connB.ID, suite.chainB.GetPrefix()) - expConnection = types.NewConnectionEnd(types.INIT, clientA, counterparty, types.GetCompatibleEncodedVersions()) + expConnection = types.NewConnectionEnd(types.INIT, clientA, counterparty, types.ExportedVersionsToProto(types.GetCompatibleVersions())) suite.chainA.App.IBCKeeper.ConnectionKeeper.SetConnection(suite.chainA.GetContext(), connA.ID, expConnection) req = &types.QueryConnectionRequest{ @@ -121,9 +121,9 @@ func (suite *KeeperTestSuite) TestQueryConnections() { counterparty2 := types.NewCounterparty(clientB, connB1.ID, suite.chainB.GetPrefix()) counterparty3 := types.NewCounterparty(clientB1, connB2.ID, suite.chainB.GetPrefix()) - conn1 := types.NewConnectionEnd(types.OPEN, clientA, counterparty1, types.GetCompatibleEncodedVersions()) - conn2 := types.NewConnectionEnd(types.INIT, clientA, counterparty2, types.GetCompatibleEncodedVersions()) - conn3 := types.NewConnectionEnd(types.OPEN, clientA1, counterparty3, types.GetCompatibleEncodedVersions()) + conn1 := types.NewConnectionEnd(types.OPEN, clientA, counterparty1, types.ExportedVersionsToProto(types.GetCompatibleVersions())) + conn2 := types.NewConnectionEnd(types.INIT, clientA, counterparty2, types.ExportedVersionsToProto(types.GetCompatibleVersions())) + conn3 := types.NewConnectionEnd(types.OPEN, clientA1, counterparty3, types.ExportedVersionsToProto(types.GetCompatibleVersions())) iconn1 := types.NewIdentifiedConnection(connA0.ID, conn1) iconn2 := types.NewIdentifiedConnection(connA1.ID, conn2) diff --git a/x/ibc/core/03-connection/keeper/handshake.go b/x/ibc/core/03-connection/keeper/handshake.go index 56cb9bf362..0fce7d9006 100644 --- a/x/ibc/core/03-connection/keeper/handshake.go +++ b/x/ibc/core/03-connection/keeper/handshake.go @@ -3,6 +3,8 @@ package keeper import ( "bytes" + "github.com/gogo/protobuf/proto" + "github.com/cosmos/cosmos-sdk/telemetry" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" @@ -20,24 +22,24 @@ func (k Keeper) ConnOpenInit( connectionID, // identifier clientID string, counterparty types.Counterparty, // desiredCounterpartyConnectionIdentifier, counterpartyPrefix, counterpartyClientIdentifier - version string, + version *types.Version, ) error { _, found := k.GetConnection(ctx, connectionID) if found { return sdkerrors.Wrap(types.ErrConnectionExists, connectionID) } - versions := types.GetCompatibleEncodedVersions() - if version != "" { + versions := types.GetCompatibleVersions() + if version != nil { if !types.IsSupportedVersion(version) { return sdkerrors.Wrap(types.ErrInvalidVersion, "version is not supported") } - versions = []string{version} + versions = []exported.Version{version} } // connection defines chain A's ConnectionEnd - connection := types.NewConnectionEnd(types.INIT, clientID, counterparty, versions) + connection := types.NewConnectionEnd(types.INIT, clientID, counterparty, types.ExportedVersionsToProto(versions)) k.SetConnection(ctx, connectionID, connection) if err := k.addConnectionToClient(ctx, clientID, connectionID); err != nil { @@ -66,7 +68,7 @@ func (k Keeper) ConnOpenTry( counterparty types.Counterparty, // counterpartyConnectionIdentifier, counterpartyPrefix and counterpartyClientIdentifier clientID string, // clientID of chainA clientState exported.ClientState, // clientState that chainA has for chainB - counterpartyVersions []string, // supported versions of chain A + counterpartyVersions []exported.Version, // supported versions of chain A proofInit []byte, // proof that chainA stored connectionEnd in state (on ConnOpenInit) proofClient []byte, // proof that chainA stored a light client of chainB proofConsensus []byte, // proof that chainA stored chainB's consensus state at consensus height @@ -105,7 +107,7 @@ func (k Keeper) ConnOpenTry( // NOTE: chain A's counterparty is chain B (i.e where this code is executed) prefix := k.GetCommitmentPrefix() expectedCounterparty := types.NewCounterparty(clientID, counterpartyChosenConnectionID, commitmenttypes.NewMerklePrefix(prefix.Bytes())) - expectedConnection := types.NewConnectionEnd(types.INIT, counterparty.ClientId, expectedCounterparty, counterpartyVersions) + expectedConnection := types.NewConnectionEnd(types.INIT, counterparty.ClientId, expectedCounterparty, types.ExportedVersionsToProto(counterpartyVersions)) // If connection already exists for desiredConnectionID, ensure that the existing connection's // counterparty is chainA and connection is on INIT stage. @@ -120,9 +122,9 @@ func (k Keeper) ConnOpenTry( return sdkerrors.Wrap(types.ErrInvalidConnection, "cannot relay connection attempt") } - supportedVersions := types.GetCompatibleEncodedVersions() + supportedVersions := types.GetCompatibleVersions() if len(previousConnection.Versions) != 0 { - supportedVersions = previousConnection.Versions + supportedVersions = previousConnection.GetVersions() } // chain B picks a version from Chain A's available versions that is compatible @@ -134,7 +136,7 @@ func (k Keeper) ConnOpenTry( } // connection defines chain B's ConnectionEnd - connection := types.NewConnectionEnd(types.TRYOPEN, clientID, counterparty, []string{version}) + connection := types.NewConnectionEnd(types.TRYOPEN, clientID, counterparty, []*types.Version{version}) // Check that ChainA committed expectedConnectionEnd to its state if err := k.VerifyConnectionState( @@ -179,7 +181,7 @@ func (k Keeper) ConnOpenAck( ctx sdk.Context, connectionID string, clientState exported.ClientState, // client state for chainA on chainB - encodedVersion, // version that ChainB chose in ConnOpenTry + version *types.Version, // version that ChainB chose in ConnOpenTry counterpartyConnectionID string, proofTry []byte, // proof that connectionEnd was added to ChainB state in ConnOpenTry proofClient []byte, // proof of client state on chainB for chainA @@ -222,18 +224,18 @@ func (k Keeper) ConnOpenAck( ) // if the connection is INIT then the provided version must be supproted - case connection.State == types.INIT && !types.IsSupportedVersion(encodedVersion): + case connection.State == types.INIT && !types.IsSupportedVersion(version): return sdkerrors.Wrapf( types.ErrInvalidConnectionState, - "connection state is in INIT but the provided encoded version is not supported %s", encodedVersion, + "connection state is in INIT but the provided version is not supported %s", version, ) - // if the connection is in TRYOPEN then the encoded version must be the only set version in the + // if the connection is in TRYOPEN then the version must be the only set version in the // retreived connection state. - case connection.State == types.TRYOPEN && (len(connection.Versions) != 1 || connection.Versions[0] != encodedVersion): + case connection.State == types.TRYOPEN && (len(connection.Versions) != 1 || !proto.Equal(connection.Versions[0], version)): return sdkerrors.Wrapf( types.ErrInvalidConnectionState, - "connection state is in TRYOPEN but the provided encoded version (%s) is not set in the previous connection %s", encodedVersion, connection, + "connection state is in TRYOPEN but the provided version (%s) is not set in the previous connection versions %s", version, connection.Versions, ) } @@ -250,7 +252,7 @@ func (k Keeper) ConnOpenAck( prefix := k.GetCommitmentPrefix() expectedCounterparty := types.NewCounterparty(connection.ClientId, connectionID, commitmenttypes.NewMerklePrefix(prefix.Bytes())) - expectedConnection := types.NewConnectionEnd(types.TRYOPEN, connection.Counterparty.ClientId, expectedCounterparty, []string{encodedVersion}) + expectedConnection := types.NewConnectionEnd(types.TRYOPEN, connection.Counterparty.ClientId, expectedCounterparty, []*types.Version{version}) // Ensure that ChainB stored expected connectionEnd in its state during ConnOpenTry if err := k.VerifyConnectionState( @@ -280,7 +282,7 @@ func (k Keeper) ConnOpenAck( // Update connection state to Open connection.State = types.OPEN - connection.Versions = []string{encodedVersion} + connection.Versions = []*types.Version{version} connection.Counterparty.ConnectionId = counterpartyConnectionID k.SetConnection(ctx, connectionID, connection) return nil diff --git a/x/ibc/core/03-connection/keeper/handshake_test.go b/x/ibc/core/03-connection/keeper/handshake_test.go index 117965e6da..b677b23520 100644 --- a/x/ibc/core/03-connection/keeper/handshake_test.go +++ b/x/ibc/core/03-connection/keeper/handshake_test.go @@ -17,7 +17,7 @@ func (suite *KeeperTestSuite) TestConnOpenInit() { var ( clientA string clientB string - version string + version *types.Version emptyConnBID bool ) @@ -35,14 +35,14 @@ func (suite *KeeperTestSuite) TestConnOpenInit() { }, true}, {"success with non empty version", func() { clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, ibctesting.Tendermint) - version = types.GetCompatibleEncodedVersions()[0] + version = types.ExportedVersionsToProto(types.GetCompatibleVersions())[0] }, true}, {"connection already exists", func() { clientA, clientB, _, _ = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, ibctesting.Tendermint) }, false}, {"invalid version", func() { clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, ibctesting.Tendermint) - version = "bad version" + version = &types.Version{} }, false}, {"couldn't add connection to client", func() { // swap client identifiers to result in client that does not exist @@ -55,7 +55,7 @@ func (suite *KeeperTestSuite) TestConnOpenInit() { suite.Run(tc.msg, func() { suite.SetupTest() // reset emptyConnBID = false // must be explicitly changed - version = "" // must be explicitly changed + version = nil // must be explicitly changed tc.malleate() @@ -83,7 +83,7 @@ func (suite *KeeperTestSuite) TestConnOpenTry() { var ( clientA string clientB string - versions []string + versions []exported.Version consensusHeight exported.Height counterpartyClient exported.ClientState ) @@ -198,9 +198,8 @@ func (suite *KeeperTestSuite) TestConnOpenTry() { // retrieve client state of chainA to pass as counterpartyClient counterpartyClient = suite.chainA.GetClientState(clientA) - version, err := types.NewVersion("0.0", nil).Encode() - suite.Require().NoError(err) - versions = []string{version} + version := types.NewVersion("0.0", nil) + versions = []exported.Version{version} }, false}, {"connection state verification failed", func() { clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, ibctesting.Tendermint) @@ -274,7 +273,7 @@ func (suite *KeeperTestSuite) TestConnOpenTry() { suite.Require().True(found) connection.State = types.INIT - connection.Versions = []string{"invalid version"} + connection.Versions = []*types.Version{&types.Version{}} suite.chainB.App.IBCKeeper.ConnectionKeeper.SetConnection(suite.chainB.GetContext(), connB.ID, connection) @@ -290,9 +289,9 @@ func (suite *KeeperTestSuite) TestConnOpenTry() { tc := tc suite.Run(tc.msg, func() { - suite.SetupTest() // reset - consensusHeight = clienttypes.ZeroHeight() // must be explicitly changed in malleate - versions = types.GetCompatibleEncodedVersions() // must be explicitly changed in malleate + suite.SetupTest() // reset + consensusHeight = clienttypes.ZeroHeight() // must be explicitly changed in malleate + versions = types.GetCompatibleVersions() // must be explicitly changed in malleate tc.malleate() @@ -344,7 +343,7 @@ func (suite *KeeperTestSuite) TestConnOpenAck() { clientB string counterpartyConnectionID string consensusHeight exported.Height - version string + version *types.Version counterpartyClient exported.ClientState ) @@ -533,7 +532,7 @@ func (suite *KeeperTestSuite) TestConnOpenAck() { err = suite.coordinator.ConnOpenTry(suite.chainB, suite.chainA, connB, connA) suite.Require().NoError(err) - version = "2.0" + version = types.NewVersion("2.0", nil) }, false}, {"connection is in TRYOPEN but the set version in the connection is invalid", func() { // chainA is in TRYOPEN, chainB is in TRYOPEN @@ -556,7 +555,7 @@ func (suite *KeeperTestSuite) TestConnOpenAck() { // retrieve client state of chainB to pass as counterpartyClient counterpartyClient = suite.chainB.GetClientState(clientB) - version = "2.0" + version = types.NewVersion("2.0", nil) }, false}, {"incompatible IBC versions", func() { clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, ibctesting.Tendermint) @@ -570,7 +569,7 @@ func (suite *KeeperTestSuite) TestConnOpenAck() { suite.Require().NoError(err) // set version to a non-compatible version - version = "(2.0,[])" + version = types.NewVersion("2.0", nil) }, false}, {"empty version", func() { clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, ibctesting.Tendermint) @@ -583,7 +582,7 @@ func (suite *KeeperTestSuite) TestConnOpenAck() { err = suite.coordinator.ConnOpenTry(suite.chainB, suite.chainA, connB, connA) suite.Require().NoError(err) - version = "" + version = &types.Version{} }, false}, {"feature set verification failed - unsupported feature", func() { clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, ibctesting.Tendermint) @@ -596,8 +595,7 @@ func (suite *KeeperTestSuite) TestConnOpenAck() { err = suite.coordinator.ConnOpenTry(suite.chainB, suite.chainA, connB, connA) suite.Require().NoError(err) - version, err = types.NewVersion(types.DefaultIBCVersionIdentifier, []string{"ORDER_ORDERED", "ORDER_UNORDERED", "ORDER_DAG"}).Encode() - suite.Require().NoError(err) + version = types.NewVersion(types.DefaultIBCVersionIdentifier, []string{"ORDER_ORDERED", "ORDER_UNORDERED", "ORDER_DAG"}) }, false}, {"self consensus state not found", func() { clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, ibctesting.Tendermint) @@ -663,10 +661,10 @@ func (suite *KeeperTestSuite) TestConnOpenAck() { for _, tc := range testCases { tc := tc suite.Run(tc.msg, func() { - suite.SetupTest() // reset - version = types.GetCompatibleEncodedVersions()[0] // must be explicitly changed in malleate - consensusHeight = clienttypes.ZeroHeight() // must be explicitly changed in malleate - counterpartyConnectionID = "" // must be explicitly changed in malleate + suite.SetupTest() // reset + version = types.ExportedVersionsToProto(types.GetCompatibleVersions())[0] // must be explicitly changed in malleate + consensusHeight = clienttypes.ZeroHeight() // must be explicitly changed in malleate + counterpartyConnectionID = "" // must be explicitly changed in malleate tc.malleate() diff --git a/x/ibc/core/03-connection/keeper/keeper_test.go b/x/ibc/core/03-connection/keeper/keeper_test.go index 85a22d6946..3ae867a5a0 100644 --- a/x/ibc/core/03-connection/keeper/keeper_test.go +++ b/x/ibc/core/03-connection/keeper/keeper_test.go @@ -46,10 +46,11 @@ func (suite *KeeperTestSuite) TestSetAndGetClientConnectionPaths() { _, existed := suite.chainA.App.IBCKeeper.ConnectionKeeper.GetClientConnectionPaths(suite.chainA.GetContext(), clientA) suite.False(existed) - suite.chainA.App.IBCKeeper.ConnectionKeeper.SetClientConnectionPaths(suite.chainA.GetContext(), clientA, types.GetCompatibleEncodedVersions()) + connections := []string{"connectionA", "connectionB"} + suite.chainA.App.IBCKeeper.ConnectionKeeper.SetClientConnectionPaths(suite.chainA.GetContext(), clientA, connections) paths, existed := suite.chainA.App.IBCKeeper.ConnectionKeeper.GetClientConnectionPaths(suite.chainA.GetContext(), clientA) suite.True(existed) - suite.EqualValues(types.GetCompatibleEncodedVersions(), paths) + suite.EqualValues(connections, paths) } // create 2 connections: A0 - B0, A1 - B1 @@ -60,8 +61,8 @@ func (suite KeeperTestSuite) TestGetAllConnections() { counterpartyB0 := types.NewCounterparty(clientB, connB0.ID, suite.chainB.GetPrefix()) // connection B0 counterpartyB1 := types.NewCounterparty(clientB, connB1.ID, suite.chainB.GetPrefix()) // connection B1 - conn1 := types.NewConnectionEnd(types.OPEN, clientA, counterpartyB0, types.GetCompatibleEncodedVersions()) // A0 - B0 - conn2 := types.NewConnectionEnd(types.OPEN, clientA, counterpartyB1, types.GetCompatibleEncodedVersions()) // A1 - B1 + conn1 := types.NewConnectionEnd(types.OPEN, clientA, counterpartyB0, types.ExportedVersionsToProto(types.GetCompatibleVersions())) // A0 - B0 + conn2 := types.NewConnectionEnd(types.OPEN, clientA, counterpartyB1, types.ExportedVersionsToProto(types.GetCompatibleVersions())) // A1 - B1 iconn1 := types.NewIdentifiedConnection(connA0.ID, conn1) iconn2 := types.NewIdentifiedConnection(connA1.ID, conn2) diff --git a/x/ibc/core/03-connection/simulation/decoder_test.go b/x/ibc/core/03-connection/simulation/decoder_test.go index df13c8b5f0..7e36b05a70 100644 --- a/x/ibc/core/03-connection/simulation/decoder_test.go +++ b/x/ibc/core/03-connection/simulation/decoder_test.go @@ -21,7 +21,7 @@ func TestDecodeStore(t *testing.T) { connection := types.ConnectionEnd{ ClientId: "clientidone", - Versions: []string{"1.0"}, + Versions: types.ExportedVersionsToProto(types.GetCompatibleVersions()), } paths := types.ClientPaths{ diff --git a/x/ibc/core/03-connection/types/codec.go b/x/ibc/core/03-connection/types/codec.go index 9caa35332b..c784590d0c 100644 --- a/x/ibc/core/03-connection/types/codec.go +++ b/x/ibc/core/03-connection/types/codec.go @@ -13,19 +13,18 @@ func RegisterInterfaces(registry codectypes.InterfaceRegistry) { registry.RegisterInterface( "ibc.core.connection.v1.ConnectionI", (*exported.ConnectionI)(nil), + &ConnectionEnd{}, ) registry.RegisterInterface( "ibc.core.connection.v1.CounterpartyConnectionI", (*exported.CounterpartyConnectionI)(nil), - ) - registry.RegisterImplementations( - (*exported.ConnectionI)(nil), - &ConnectionEnd{}, - ) - registry.RegisterImplementations( - (*exported.CounterpartyConnectionI)(nil), &Counterparty{}, ) + registry.RegisterInterface( + "ibc.core.connection.v1.Version", + (*exported.Version)(nil), + &Version{}, + ) registry.RegisterImplementations( (*sdk.Msg)(nil), &MsgConnectionOpenInit{}, diff --git a/x/ibc/core/03-connection/types/connection.go b/x/ibc/core/03-connection/types/connection.go index 26fdcb49dd..224998c6a9 100644 --- a/x/ibc/core/03-connection/types/connection.go +++ b/x/ibc/core/03-connection/types/connection.go @@ -10,7 +10,7 @@ import ( var _ exported.ConnectionI = (*ConnectionEnd)(nil) // NewConnectionEnd creates a new ConnectionEnd instance. -func NewConnectionEnd(state State, clientID string, counterparty Counterparty, versions []string) ConnectionEnd { +func NewConnectionEnd(state State, clientID string, counterparty Counterparty, versions []*Version) ConnectionEnd { return ConnectionEnd{ ClientId: clientID, Versions: versions, @@ -35,8 +35,8 @@ func (c ConnectionEnd) GetCounterparty() exported.CounterpartyConnectionI { } // GetVersions implements the Connection interface -func (c ConnectionEnd) GetVersions() []string { - return c.Versions +func (c ConnectionEnd) GetVersions() []exported.Version { + return ProtoVersionsToExported(c.Versions) } // ValidateBasic implements the Connection interface. diff --git a/x/ibc/core/03-connection/types/connection.pb.go b/x/ibc/core/03-connection/types/connection.pb.go index b2b51dd75a..ff0f6db1fa 100644 --- a/x/ibc/core/03-connection/types/connection.pb.go +++ b/x/ibc/core/03-connection/types/connection.pb.go @@ -70,7 +70,7 @@ type ConnectionEnd struct { ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty" yaml:"client_id"` // IBC version which can be utilised to determine encodings or protocols for // channels or packets utilising this connection - Versions []string `protobuf:"bytes,2,rep,name=versions,proto3" json:"versions,omitempty"` + Versions []*Version `protobuf:"bytes,2,rep,name=versions,proto3" json:"versions,omitempty"` // current state of the connection end. State State `protobuf:"varint,3,opt,name=state,proto3,enum=ibc.core.connection.v1.State" json:"state,omitempty"` // counterparty chain associated with this connection. @@ -119,7 +119,7 @@ type IdentifiedConnection struct { ClientId string `protobuf:"bytes,2,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty" yaml:"client_id"` // IBC version which can be utilised to determine encodings or protocols for // channels or packets utilising this connection - Versions []string `protobuf:"bytes,3,rep,name=versions,proto3" json:"versions,omitempty"` + Versions []*Version `protobuf:"bytes,3,rep,name=versions,proto3" json:"versions,omitempty"` // current state of the connection end. State State `protobuf:"varint,4,opt,name=state,proto3,enum=ibc.core.connection.v1.State" json:"state,omitempty"` // counterparty chain associated with this connection. @@ -362,45 +362,46 @@ func init() { } var fileDescriptor_90572467c054e43a = []byte{ - // 608 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x54, 0x41, 0x6b, 0xdb, 0x4c, - 0x10, 0xd5, 0xca, 0x72, 0x12, 0x6f, 0xe2, 0xef, 0x73, 0x17, 0x53, 0x84, 0x20, 0x92, 0x50, 0x0b, - 0x35, 0x85, 0x48, 0x75, 0x02, 0x3d, 0xa4, 0xf4, 0x10, 0x3b, 0x2a, 0x88, 0xb6, 0xae, 0x51, 0x9c, - 0x42, 0x73, 0x09, 0xb6, 0xb4, 0x49, 0x96, 0xc4, 0x92, 0x91, 0x36, 0x26, 0xfe, 0x07, 0xc1, 0x97, - 0xf6, 0xda, 0x83, 0xa1, 0xd0, 0x3f, 0x13, 0x7a, 0xca, 0xb1, 0x27, 0x53, 0xec, 0x53, 0xaf, 0xfe, - 0x05, 0x45, 0x5a, 0x59, 0x56, 0x42, 0x73, 0x68, 0xda, 0x93, 0x67, 0x76, 0xde, 0x1b, 0xef, 0x7b, - 0x33, 0x5a, 0xf8, 0x84, 0x74, 0x1c, 0xc3, 0xf1, 0x03, 0x6c, 0x38, 0xbe, 0xe7, 0x61, 0x87, 0x12, - 0xdf, 0x33, 0xfa, 0xd5, 0x4c, 0xa6, 0xf7, 0x02, 0x9f, 0xfa, 0xe8, 0x21, 0xe9, 0x38, 0x7a, 0x04, - 0xd4, 0x33, 0xa5, 0x7e, 0x55, 0x2a, 0x1f, 0xfb, 0xc7, 0x7e, 0x0c, 0x31, 0xa2, 0x88, 0xa1, 0xa5, - 0x6c, 0xdb, 0x6e, 0x97, 0xd0, 0x2e, 0xf6, 0x28, 0x6b, 0x3b, 0xcf, 0x18, 0x50, 0xfb, 0x09, 0x60, - 0xb1, 0x9e, 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1, 0xf2, 0xab, 0xcc, 0xd5, 0xf6, 0xaf, 0x26, 0x32, 0xb8, 0x9e, 0xc8, 0xe0, 0xc7, 0x44, 0x06, - 0x9f, 0xa6, 0x32, 0x77, 0x3d, 0x95, 0xb9, 0xef, 0x53, 0x99, 0x3b, 0x78, 0x71, 0x4c, 0xe8, 0xc9, - 0x79, 0x27, 0x1a, 0x9d, 0xe1, 0xf8, 0x61, 0xd7, 0x0f, 0x93, 0x9f, 0x8d, 0xd0, 0x3d, 0x35, 0x2e, - 0x8c, 0xf4, 0x59, 0x7a, 0xb6, 0xb5, 0x91, 0x79, 0xf0, 0xe8, 0xa0, 0x87, 0xc3, 0xce, 0x52, 0xfc, - 0x24, 0x6d, 0xfd, 0x0a, 0x00, 0x00, 0xff, 0xff, 0x61, 0x3b, 0x7e, 0x26, 0x14, 0x05, 0x00, 0x00, + // 617 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x54, 0xc1, 0x6a, 0xdb, 0x4c, + 0x10, 0x96, 0x64, 0x39, 0xb1, 0xd7, 0xf1, 0xff, 0xbb, 0x8b, 0x29, 0x42, 0x10, 0x49, 0xa8, 0x85, + 0x9a, 0x42, 0xa4, 0x3a, 0x81, 0x1e, 0x12, 0x7a, 0x88, 0x1d, 0x15, 0x44, 0x5b, 0xd7, 0x28, 0x4e, + 0xa1, 0xb9, 0x04, 0x5b, 0xda, 0x24, 0x4b, 0x62, 0xc9, 0x48, 0x6b, 0x13, 0xbf, 0x41, 0xf0, 0xa9, + 0xd7, 0x1e, 0x0c, 0x85, 0xbe, 0x40, 0x1f, 0x23, 0xf4, 0x94, 0x63, 0x4f, 0xa6, 0xd8, 0x6f, 0xe0, + 0x27, 0x28, 0xd2, 0xca, 0xb2, 0x12, 0x9a, 0x43, 0xdd, 0x9e, 0x34, 0xb3, 0xf3, 0x7d, 0x9f, 0x76, + 0xbe, 0x1d, 0x06, 0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 0x27, 0x47, 0x0d, 0xb3, 0x61, 0xb6, 0xcc, 0xfd, 0xb7, 0xe6, 0xb1, 0x71, 0x70, 0x72, 0xd4, 0x38, + 0x6c, 0x1a, 0x75, 0xf3, 0xb5, 0x69, 0x1c, 0x94, 0x18, 0xf1, 0xd1, 0x68, 0xac, 0x14, 0xef, 0x00, + 0xa0, 0x00, 0x00, 0xe5, 0x85, 0x87, 0x25, 0x56, 0xcc, 0x8d, 0xc6, 0x0a, 0x1f, 0xc6, 0x50, 0x02, + 0x45, 0x5a, 0x69, 0x59, 0x1f, 0xdf, 0x37, 0x8d, 0x46, 0x89, 0x13, 0x0b, 0xa3, 0xb1, 0xb2, 0x1e, + 0xa7, 0x4b, 0x66, 0x54, 0xcc, 0x50, 0x66, 0x18, 0x8b, 0xfc, 0xf5, 0x57, 0x89, 0xa9, 0x1d, 0xdd, + 0x4c, 0x25, 0xf6, 0x76, 0x2a, 0xb1, 0x3f, 0xa7, 0x12, 0xfb, 0x69, 0x26, 0x31, 0xb7, 0x33, 0x89, + 0xf9, 0x31, 0x93, 0x98, 0xe3, 0xbd, 0x33, 0x4c, 0xce, 0xfb, 0x9d, 0xf0, 0xe9, 0x74, 0xdb, 0x0b, + 0xba, 0x5e, 0x10, 0x7f, 0xb6, 0x02, 0xe7, 0x42, 0xbf, 0xd2, 0x93, 0xc5, 0xf6, 0x62, 0x67, 0x2b, + 0xb5, 0x32, 0xc9, 0xb0, 0x87, 0x82, 0xce, 0x5a, 0xb4, 0xd4, 0x76, 0x7e, 0x05, 0x00, 0x00, 0xff, + 0xff, 0x6d, 0xfb, 0xee, 0xb6, 0x56, 0x05, 0x00, 0x00, } func (m *ConnectionEnd) Marshal() (dAtA []byte, err error) { @@ -440,9 +441,14 @@ func (m *ConnectionEnd) MarshalToSizedBuffer(dAtA []byte) (int, error) { } if len(m.Versions) > 0 { for iNdEx := len(m.Versions) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Versions[iNdEx]) - copy(dAtA[i:], m.Versions[iNdEx]) - i = encodeVarintConnection(dAtA, i, uint64(len(m.Versions[iNdEx]))) + { + size, err := m.Versions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintConnection(dAtA, i, uint64(size)) + } i-- dAtA[i] = 0x12 } @@ -494,9 +500,14 @@ func (m *IdentifiedConnection) MarshalToSizedBuffer(dAtA []byte) (int, error) { } if len(m.Versions) > 0 { for iNdEx := len(m.Versions) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Versions[iNdEx]) - copy(dAtA[i:], m.Versions[iNdEx]) - i = encodeVarintConnection(dAtA, i, uint64(len(m.Versions[iNdEx]))) + { + size, err := m.Versions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintConnection(dAtA, i, uint64(size)) + } i-- dAtA[i] = 0x1a } @@ -697,8 +708,8 @@ func (m *ConnectionEnd) Size() (n int) { n += 1 + l + sovConnection(uint64(l)) } if len(m.Versions) > 0 { - for _, s := range m.Versions { - l = len(s) + for _, e := range m.Versions { + l = e.Size() n += 1 + l + sovConnection(uint64(l)) } } @@ -725,8 +736,8 @@ func (m *IdentifiedConnection) Size() (n int) { n += 1 + l + sovConnection(uint64(l)) } if len(m.Versions) > 0 { - for _, s := range m.Versions { - l = len(s) + for _, e := range m.Versions { + l = e.Size() n += 1 + l + sovConnection(uint64(l)) } } @@ -881,7 +892,7 @@ func (m *ConnectionEnd) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Versions", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowConnection @@ -891,23 +902,25 @@ func (m *ConnectionEnd) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthConnection } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthConnection } if postIndex > l { return io.ErrUnexpectedEOF } - m.Versions = append(m.Versions, string(dAtA[iNdEx:postIndex])) + m.Versions = append(m.Versions, &Version{}) + if err := m.Versions[len(m.Versions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex case 3: if wireType != 0 { @@ -1082,7 +1095,7 @@ func (m *IdentifiedConnection) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Versions", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowConnection @@ -1092,23 +1105,25 @@ func (m *IdentifiedConnection) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthConnection } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthConnection } if postIndex > l { return io.ErrUnexpectedEOF } - m.Versions = append(m.Versions, string(dAtA[iNdEx:postIndex])) + m.Versions = append(m.Versions, &Version{}) + if err := m.Versions[len(m.Versions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex case 4: if wireType != 0 { diff --git a/x/ibc/core/03-connection/types/connection_test.go b/x/ibc/core/03-connection/types/connection_test.go index 6fe486c352..c735841b0e 100644 --- a/x/ibc/core/03-connection/types/connection_test.go +++ b/x/ibc/core/03-connection/types/connection_test.go @@ -28,12 +28,12 @@ func TestConnectionValidateBasic(t *testing.T) { }{ { "valid connection", - types.ConnectionEnd{clientID, []string{ibctesting.ConnectionVersion}, types.INIT, types.Counterparty{clientID2, connectionID2, commitmenttypes.NewMerklePrefix([]byte("prefix"))}}, + types.ConnectionEnd{clientID, []*types.Version{ibctesting.ConnectionVersion}, types.INIT, types.Counterparty{clientID2, connectionID2, commitmenttypes.NewMerklePrefix([]byte("prefix"))}}, true, }, { "invalid client id", - types.ConnectionEnd{"(clientID1)", []string{ibctesting.ConnectionVersion}, types.INIT, types.Counterparty{clientID2, connectionID2, commitmenttypes.NewMerklePrefix([]byte("prefix"))}}, + types.ConnectionEnd{"(clientID1)", []*types.Version{ibctesting.ConnectionVersion}, types.INIT, types.Counterparty{clientID2, connectionID2, commitmenttypes.NewMerklePrefix([]byte("prefix"))}}, false, }, { @@ -43,12 +43,12 @@ func TestConnectionValidateBasic(t *testing.T) { }, { "invalid version", - types.ConnectionEnd{clientID, []string{"1.0.0"}, types.INIT, types.Counterparty{clientID2, connectionID2, commitmenttypes.NewMerklePrefix([]byte("prefix"))}}, + types.ConnectionEnd{clientID, []*types.Version{&types.Version{}}, types.INIT, types.Counterparty{clientID2, connectionID2, commitmenttypes.NewMerklePrefix([]byte("prefix"))}}, false, }, { "invalid counterparty", - types.ConnectionEnd{clientID, []string{ibctesting.ConnectionVersion}, types.INIT, types.Counterparty{clientID2, connectionID2, emptyPrefix}}, + types.ConnectionEnd{clientID, []*types.Version{ibctesting.ConnectionVersion}, types.INIT, types.Counterparty{clientID2, connectionID2, emptyPrefix}}, false, }, } @@ -97,12 +97,12 @@ func TestIdentifiedConnectionValidateBasic(t *testing.T) { }{ { "valid connection", - types.NewIdentifiedConnection(clientID, types.ConnectionEnd{clientID, []string{ibctesting.ConnectionVersion}, types.INIT, types.Counterparty{clientID2, connectionID2, commitmenttypes.NewMerklePrefix([]byte("prefix"))}}), + types.NewIdentifiedConnection(clientID, types.ConnectionEnd{clientID, []*types.Version{ibctesting.ConnectionVersion}, types.INIT, types.Counterparty{clientID2, connectionID2, commitmenttypes.NewMerklePrefix([]byte("prefix"))}}), true, }, { "invalid connection id", - types.NewIdentifiedConnection("(connectionIDONE)", types.ConnectionEnd{clientID, []string{ibctesting.ConnectionVersion}, types.INIT, types.Counterparty{clientID2, connectionID2, commitmenttypes.NewMerklePrefix([]byte("prefix"))}}), + types.NewIdentifiedConnection("(connectionIDONE)", types.ConnectionEnd{clientID, []*types.Version{ibctesting.ConnectionVersion}, types.INIT, types.Counterparty{clientID2, connectionID2, commitmenttypes.NewMerklePrefix([]byte("prefix"))}}), false, }, } diff --git a/x/ibc/core/03-connection/types/genesis_test.go b/x/ibc/core/03-connection/types/genesis_test.go index 05f8a88988..8080f49d5c 100644 --- a/x/ibc/core/03-connection/types/genesis_test.go +++ b/x/ibc/core/03-connection/types/genesis_test.go @@ -27,7 +27,7 @@ func TestValidateGenesis(t *testing.T) { name: "valid genesis", genState: types.NewGenesisState( []types.IdentifiedConnection{ - types.NewIdentifiedConnection(connectionID, types.NewConnectionEnd(types.INIT, clientID, types.Counterparty{clientID2, connectionID2, commitmenttypes.NewMerklePrefix([]byte("prefix"))}, []string{ibctesting.ConnectionVersion})), + types.NewIdentifiedConnection(connectionID, types.NewConnectionEnd(types.INIT, clientID, types.Counterparty{clientID2, connectionID2, commitmenttypes.NewMerklePrefix([]byte("prefix"))}, []*types.Version{ibctesting.ConnectionVersion})), }, []types.ConnectionPaths{ {clientID, []string{host.ConnectionPath(connectionID)}}, @@ -39,7 +39,7 @@ func TestValidateGenesis(t *testing.T) { name: "invalid connection", genState: types.NewGenesisState( []types.IdentifiedConnection{ - types.NewIdentifiedConnection(connectionID, types.NewConnectionEnd(types.INIT, "(CLIENTIDONE)", types.Counterparty{clientID, connectionID, commitmenttypes.NewMerklePrefix([]byte("prefix"))}, []string{ibctesting.ConnectionVersion})), + types.NewIdentifiedConnection(connectionID, types.NewConnectionEnd(types.INIT, "(CLIENTIDONE)", types.Counterparty{clientID, connectionID, commitmenttypes.NewMerklePrefix([]byte("prefix"))}, []*types.Version{ibctesting.ConnectionVersion})), }, []types.ConnectionPaths{ {clientID, []string{host.ConnectionPath(connectionID)}}, @@ -51,7 +51,7 @@ func TestValidateGenesis(t *testing.T) { name: "invalid client id", genState: types.NewGenesisState( []types.IdentifiedConnection{ - types.NewIdentifiedConnection(connectionID, types.NewConnectionEnd(types.INIT, clientID, types.Counterparty{clientID2, connectionID2, commitmenttypes.NewMerklePrefix([]byte("prefix"))}, []string{ibctesting.ConnectionVersion})), + types.NewIdentifiedConnection(connectionID, types.NewConnectionEnd(types.INIT, clientID, types.Counterparty{clientID2, connectionID2, commitmenttypes.NewMerklePrefix([]byte("prefix"))}, []*types.Version{ibctesting.ConnectionVersion})), }, []types.ConnectionPaths{ {"(CLIENTIDONE)", []string{host.ConnectionPath(connectionID)}}, @@ -63,7 +63,7 @@ func TestValidateGenesis(t *testing.T) { name: "invalid path", genState: types.NewGenesisState( []types.IdentifiedConnection{ - types.NewIdentifiedConnection(connectionID, types.NewConnectionEnd(types.INIT, clientID, types.Counterparty{clientID2, connectionID2, commitmenttypes.NewMerklePrefix([]byte("prefix"))}, []string{ibctesting.ConnectionVersion})), + types.NewIdentifiedConnection(connectionID, types.NewConnectionEnd(types.INIT, clientID, types.Counterparty{clientID2, connectionID2, commitmenttypes.NewMerklePrefix([]byte("prefix"))}, []*types.Version{ibctesting.ConnectionVersion})), }, []types.ConnectionPaths{ {clientID, []string{connectionID}}, diff --git a/x/ibc/core/03-connection/types/msgs.go b/x/ibc/core/03-connection/types/msgs.go index a461dd1cca..6df9512e15 100644 --- a/x/ibc/core/03-connection/types/msgs.go +++ b/x/ibc/core/03-connection/types/msgs.go @@ -17,7 +17,7 @@ var _ sdk.Msg = &MsgConnectionOpenInit{} func NewMsgConnectionOpenInit( connectionID, clientID, counterpartyConnectionID, counterpartyClientID string, counterpartyPrefix commitmenttypes.MerklePrefix, - version string, signer sdk.AccAddress, + version *Version, signer sdk.AccAddress, ) *MsgConnectionOpenInit { counterparty := NewCounterparty(counterpartyClientID, counterpartyConnectionID, counterpartyPrefix) return &MsgConnectionOpenInit{ @@ -47,7 +47,8 @@ func (msg MsgConnectionOpenInit) ValidateBasic() error { if err := host.ClientIdentifierValidator(msg.ClientId); err != nil { return sdkerrors.Wrap(err, "invalid client ID") } - if msg.Version != "" { + // NOTE: Version can be nil on MsgConnectionOpenInit + if msg.Version != nil { if err := ValidateVersion(msg.Version); err != nil { return sdkerrors.Wrap(err, "basic validation of the provided version failed") } @@ -80,7 +81,7 @@ var _ sdk.Msg = &MsgConnectionOpenTry{} func NewMsgConnectionOpenTry( desiredConnectionID, counterpartyChosenConnectionID, clientID, counterpartyConnectionID, counterpartyClientID string, counterpartyClient exported.ClientState, - counterpartyPrefix commitmenttypes.MerklePrefix, counterpartyVersions []string, + counterpartyPrefix commitmenttypes.MerklePrefix, counterpartyVersions []*Version, proofInit, proofClient, proofConsensus []byte, proofHeight, consensusHeight clienttypes.Height, signer sdk.AccAddress, ) *MsgConnectionOpenTry { @@ -195,7 +196,8 @@ var _ sdk.Msg = &MsgConnectionOpenAck{} func NewMsgConnectionOpenAck( connectionID, counterpartyConnectionID string, counterpartyClient exported.ClientState, proofTry, proofClient, proofConsensus []byte, - proofHeight, consensusHeight clienttypes.Height, version string, + proofHeight, consensusHeight clienttypes.Height, + version *Version, signer sdk.AccAddress, ) *MsgConnectionOpenAck { csAny, _ := clienttypes.PackClientState(counterpartyClient) diff --git a/x/ibc/core/03-connection/types/msgs_test.go b/x/ibc/core/03-connection/types/msgs_test.go index 3ccb5114a5..cfb8ce7351 100644 --- a/x/ibc/core/03-connection/types/msgs_test.go +++ b/x/ibc/core/03-connection/types/msgs_test.go @@ -79,7 +79,7 @@ func (suite *MsgTestSuite) TestNewMsgConnectionOpenInit() { signer, _ := sdk.AccAddressFromBech32("cosmos1ckgw5d7jfj7wwxjzs9fdrdev9vc8dzcw3n2lht") // empty versions are considered valid, the default compatible versions // will be used in protocol. - version := "" + var version *types.Version var testCases = []struct { name string @@ -91,7 +91,7 @@ func (suite *MsgTestSuite) TestNewMsgConnectionOpenInit() { {"invalid counterparty client ID", types.NewMsgConnectionOpenInit("ibcconntest", "clienttotest", "test/conn1", "clienttotest", prefix, version, signer), false}, {"invalid counterparty connection ID", types.NewMsgConnectionOpenInit("ibcconntest", "clienttotest", "connectiontotest", "test/conn1", prefix, version, signer), false}, {"empty counterparty prefix", types.NewMsgConnectionOpenInit("ibcconntest", "clienttotest", "connectiontotest", "clienttotest", emptyPrefix, version, signer), false}, - {"supplied version fails basic validation", types.NewMsgConnectionOpenInit("ibcconntest", "clienttotest", "connectiontotest", "clienttotest", prefix, "bad version", signer), false}, + {"supplied version fails basic validation", types.NewMsgConnectionOpenInit("ibcconntest", "clienttotest", "connectiontotest", "clienttotest", prefix, &types.Version{}, signer), false}, {"empty singer", types.NewMsgConnectionOpenInit("ibcconntest", "clienttotest", "connectiontotest", "clienttotest", prefix, version, nil), false}, {"success", types.NewMsgConnectionOpenInit("ibcconntest", "clienttotest", "connectiontotest", "clienttotest", prefix, version, signer), true}, } @@ -132,24 +132,24 @@ func (suite *MsgTestSuite) TestNewMsgConnectionOpenTry() { msg *types.MsgConnectionOpenTry expPass bool }{ - {"invalid connection ID", types.NewMsgConnectionOpenTry("test/conn1", provedID, "clienttotesta", "connectiontotest", "clienttotest", clientState, prefix, []string{ibctesting.ConnectionVersion}, suite.proof, suite.proof, suite.proof, clientHeight, clientHeight, signer), false}, - {"invalid connection ID", types.NewMsgConnectionOpenTry("ibcconntest", "test/conn1", "clienttotesta", "connectiontotest", "clienttotest", clientState, prefix, []string{ibctesting.ConnectionVersion}, suite.proof, suite.proof, suite.proof, clientHeight, clientHeight, signer), false}, - {"invalid client ID", types.NewMsgConnectionOpenTry("ibcconntest", provedID, "test/iris", "connectiontotest", "clienttotest", clientState, prefix, []string{ibctesting.ConnectionVersion}, suite.proof, suite.proof, suite.proof, clientHeight, clientHeight, signer), false}, - {"invalid counterparty connection ID", types.NewMsgConnectionOpenTry("ibcconntest", provedID, "clienttotesta", "ibc/test", "clienttotest", clientState, prefix, []string{ibctesting.ConnectionVersion}, suite.proof, suite.proof, suite.proof, clientHeight, clientHeight, signer), false}, - {"invalid counterparty client ID", types.NewMsgConnectionOpenTry("ibcconntest", provedID, "clienttotesta", "connectiontotest", "test/conn1", clientState, prefix, []string{ibctesting.ConnectionVersion}, suite.proof, suite.proof, suite.proof, clientHeight, clientHeight, signer), false}, - {"invalid nil counterparty client", types.NewMsgConnectionOpenTry("ibcconntest", provedID, "clienttotesta", "connectiontotest", "clienttotest", nil, prefix, []string{ibctesting.ConnectionVersion}, suite.proof, suite.proof, suite.proof, clientHeight, clientHeight, signer), false}, - {"invalid client unpacking", &types.MsgConnectionOpenTry{"ibcconntest", provedID, "clienttotesta", invalidAny, counterparty, []string{ibctesting.ConnectionVersion}, clientHeight, suite.proof, suite.proof, suite.proof, clientHeight, signer.String()}, false}, - {"counterparty failed Validate", types.NewMsgConnectionOpenTry("ibcconntest", provedID, "clienttotesta", "connectiontotest", "clienttotest", invalidClient, prefix, []string{ibctesting.ConnectionVersion}, suite.proof, suite.proof, suite.proof, clientHeight, clientHeight, signer), false}, - {"empty counterparty prefix", types.NewMsgConnectionOpenTry("ibcconntest", provedID, "clienttotesta", "connectiontotest", "clienttotest", clientState, emptyPrefix, []string{ibctesting.ConnectionVersion}, suite.proof, suite.proof, suite.proof, clientHeight, clientHeight, signer), false}, - {"empty counterpartyVersions", types.NewMsgConnectionOpenTry("ibcconntest", provedID, "clienttotesta", "connectiontotest", "clienttotest", clientState, prefix, []string{}, suite.proof, suite.proof, suite.proof, clientHeight, clientHeight, signer), false}, - {"empty proofInit", types.NewMsgConnectionOpenTry("ibcconntest", provedID, "clienttotesta", "connectiontotest", "clienttotest", clientState, prefix, []string{ibctesting.ConnectionVersion}, emptyProof, suite.proof, suite.proof, clientHeight, clientHeight, signer), false}, - {"empty proofClient", types.NewMsgConnectionOpenTry("ibcconntest", provedID, "clienttotesta", "connectiontotest", "clienttotest", clientState, prefix, []string{ibctesting.ConnectionVersion}, suite.proof, emptyProof, suite.proof, clientHeight, clientHeight, signer), false}, - {"empty proofConsensus", types.NewMsgConnectionOpenTry("ibcconntest", provedID, "clienttotesta", "connectiontotest", "clienttotest", clientState, prefix, []string{ibctesting.ConnectionVersion}, suite.proof, suite.proof, emptyProof, clientHeight, clientHeight, signer), false}, - {"invalid proofHeight", types.NewMsgConnectionOpenTry("ibcconntest", provedID, "clienttotesta", "connectiontotest", "clienttotest", clientState, prefix, []string{ibctesting.ConnectionVersion}, suite.proof, suite.proof, suite.proof, clienttypes.ZeroHeight(), clientHeight, signer), false}, - {"invalid consensusHeight", types.NewMsgConnectionOpenTry("ibcconntest", provedID, "clienttotesta", "connectiontotest", "clienttotest", clientState, prefix, []string{ibctesting.ConnectionVersion}, suite.proof, suite.proof, suite.proof, clientHeight, clienttypes.ZeroHeight(), signer), false}, - {"empty singer", types.NewMsgConnectionOpenTry("ibcconntest", provedID, "clienttotesta", "connectiontotest", "clienttotest", clientState, prefix, []string{ibctesting.ConnectionVersion}, suite.proof, suite.proof, suite.proof, clientHeight, clientHeight, nil), false}, - {"success", types.NewMsgConnectionOpenTry("ibcconntest", provedID, "clienttotesta", "connectiontotest", "clienttotest", clientState, prefix, []string{ibctesting.ConnectionVersion}, suite.proof, suite.proof, suite.proof, clientHeight, clientHeight, signer), true}, - {"invalid version", types.NewMsgConnectionOpenTry("ibcconntest", provedID, "clienttotesta", "connectiontotest", "clienttotest", clientState, prefix, []string{"(invalid version)"}, suite.proof, suite.proof, suite.proof, clientHeight, clientHeight, signer), false}, + {"invalid connection ID", types.NewMsgConnectionOpenTry("test/conn1", provedID, "clienttotesta", "connectiontotest", "clienttotest", clientState, prefix, []*types.Version{ibctesting.ConnectionVersion}, suite.proof, suite.proof, suite.proof, clientHeight, clientHeight, signer), false}, + {"invalid connection ID", types.NewMsgConnectionOpenTry("ibcconntest", "test/conn1", "clienttotesta", "connectiontotest", "clienttotest", clientState, prefix, []*types.Version{ibctesting.ConnectionVersion}, suite.proof, suite.proof, suite.proof, clientHeight, clientHeight, signer), false}, + {"invalid client ID", types.NewMsgConnectionOpenTry("ibcconntest", provedID, "test/iris", "connectiontotest", "clienttotest", clientState, prefix, []*types.Version{ibctesting.ConnectionVersion}, suite.proof, suite.proof, suite.proof, clientHeight, clientHeight, signer), false}, + {"invalid counterparty connection ID", types.NewMsgConnectionOpenTry("ibcconntest", provedID, "clienttotesta", "ibc/test", "clienttotest", clientState, prefix, []*types.Version{ibctesting.ConnectionVersion}, suite.proof, suite.proof, suite.proof, clientHeight, clientHeight, signer), false}, + {"invalid counterparty client ID", types.NewMsgConnectionOpenTry("ibcconntest", provedID, "clienttotesta", "connectiontotest", "test/conn1", clientState, prefix, []*types.Version{ibctesting.ConnectionVersion}, suite.proof, suite.proof, suite.proof, clientHeight, clientHeight, signer), false}, + {"invalid nil counterparty client", types.NewMsgConnectionOpenTry("ibcconntest", provedID, "clienttotesta", "connectiontotest", "clienttotest", nil, prefix, []*types.Version{ibctesting.ConnectionVersion}, suite.proof, suite.proof, suite.proof, clientHeight, clientHeight, signer), false}, + {"invalid client unpacking", &types.MsgConnectionOpenTry{"ibcconntest", provedID, "clienttotesta", invalidAny, counterparty, []*types.Version{ibctesting.ConnectionVersion}, clientHeight, suite.proof, suite.proof, suite.proof, clientHeight, signer.String()}, false}, + {"counterparty failed Validate", types.NewMsgConnectionOpenTry("ibcconntest", provedID, "clienttotesta", "connectiontotest", "clienttotest", invalidClient, prefix, []*types.Version{ibctesting.ConnectionVersion}, suite.proof, suite.proof, suite.proof, clientHeight, clientHeight, signer), false}, + {"empty counterparty prefix", types.NewMsgConnectionOpenTry("ibcconntest", provedID, "clienttotesta", "connectiontotest", "clienttotest", clientState, emptyPrefix, []*types.Version{ibctesting.ConnectionVersion}, suite.proof, suite.proof, suite.proof, clientHeight, clientHeight, signer), false}, + {"empty counterpartyVersions", types.NewMsgConnectionOpenTry("ibcconntest", provedID, "clienttotesta", "connectiontotest", "clienttotest", clientState, prefix, []*types.Version{}, suite.proof, suite.proof, suite.proof, clientHeight, clientHeight, signer), false}, + {"empty proofInit", types.NewMsgConnectionOpenTry("ibcconntest", provedID, "clienttotesta", "connectiontotest", "clienttotest", clientState, prefix, []*types.Version{ibctesting.ConnectionVersion}, emptyProof, suite.proof, suite.proof, clientHeight, clientHeight, signer), false}, + {"empty proofClient", types.NewMsgConnectionOpenTry("ibcconntest", provedID, "clienttotesta", "connectiontotest", "clienttotest", clientState, prefix, []*types.Version{ibctesting.ConnectionVersion}, suite.proof, emptyProof, suite.proof, clientHeight, clientHeight, signer), false}, + {"empty proofConsensus", types.NewMsgConnectionOpenTry("ibcconntest", provedID, "clienttotesta", "connectiontotest", "clienttotest", clientState, prefix, []*types.Version{ibctesting.ConnectionVersion}, suite.proof, suite.proof, emptyProof, clientHeight, clientHeight, signer), false}, + {"invalid proofHeight", types.NewMsgConnectionOpenTry("ibcconntest", provedID, "clienttotesta", "connectiontotest", "clienttotest", clientState, prefix, []*types.Version{ibctesting.ConnectionVersion}, suite.proof, suite.proof, suite.proof, clienttypes.ZeroHeight(), clientHeight, signer), false}, + {"invalid consensusHeight", types.NewMsgConnectionOpenTry("ibcconntest", provedID, "clienttotesta", "connectiontotest", "clienttotest", clientState, prefix, []*types.Version{ibctesting.ConnectionVersion}, suite.proof, suite.proof, suite.proof, clientHeight, clienttypes.ZeroHeight(), signer), false}, + {"empty singer", types.NewMsgConnectionOpenTry("ibcconntest", provedID, "clienttotesta", "connectiontotest", "clienttotest", clientState, prefix, []*types.Version{ibctesting.ConnectionVersion}, suite.proof, suite.proof, suite.proof, clientHeight, clientHeight, nil), false}, + {"success", types.NewMsgConnectionOpenTry("ibcconntest", provedID, "clienttotesta", "connectiontotest", "clienttotest", clientState, prefix, []*types.Version{ibctesting.ConnectionVersion}, suite.proof, suite.proof, suite.proof, clientHeight, clientHeight, signer), true}, + {"invalid version", types.NewMsgConnectionOpenTry("ibcconntest", provedID, "clienttotesta", "connectiontotest", "clienttotest", clientState, prefix, []*types.Version{&types.Version{}}, suite.proof, suite.proof, suite.proof, clientHeight, clientHeight, signer), false}, } for _, tc := range testCases { @@ -195,7 +195,7 @@ func (suite *MsgTestSuite) TestNewMsgConnectionOpenAck() { {"empty proofConsensus", types.NewMsgConnectionOpenAck(connectionID, connectionID, clientState, suite.proof, suite.proof, emptyProof, clientHeight, clientHeight, ibctesting.ConnectionVersion, signer), false}, {"invalid proofHeight", types.NewMsgConnectionOpenAck(connectionID, connectionID, clientState, suite.proof, suite.proof, suite.proof, clienttypes.ZeroHeight(), clientHeight, ibctesting.ConnectionVersion, signer), false}, {"invalid consensusHeight", types.NewMsgConnectionOpenAck(connectionID, connectionID, clientState, suite.proof, suite.proof, suite.proof, clientHeight, clienttypes.ZeroHeight(), ibctesting.ConnectionVersion, signer), false}, - {"invalid version", types.NewMsgConnectionOpenAck(connectionID, connectionID, clientState, suite.proof, suite.proof, suite.proof, clientHeight, clientHeight, "", signer), false}, + {"invalid version", types.NewMsgConnectionOpenAck(connectionID, connectionID, clientState, suite.proof, suite.proof, suite.proof, clientHeight, clientHeight, &types.Version{}, signer), false}, {"empty signer", types.NewMsgConnectionOpenAck(connectionID, connectionID, clientState, suite.proof, suite.proof, suite.proof, clientHeight, clientHeight, ibctesting.ConnectionVersion, nil), false}, {"success", types.NewMsgConnectionOpenAck(connectionID, connectionID, clientState, suite.proof, suite.proof, suite.proof, clientHeight, clientHeight, ibctesting.ConnectionVersion, signer), true}, } diff --git a/x/ibc/core/03-connection/types/tx.pb.go b/x/ibc/core/03-connection/types/tx.pb.go index af859b042c..be78639db0 100644 --- a/x/ibc/core/03-connection/types/tx.pb.go +++ b/x/ibc/core/03-connection/types/tx.pb.go @@ -36,7 +36,7 @@ type MsgConnectionOpenInit struct { ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty" yaml:"client_id"` ConnectionId string `protobuf:"bytes,2,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty" yaml:"connection_id"` Counterparty Counterparty `protobuf:"bytes,3,opt,name=counterparty,proto3" json:"counterparty"` - Version string `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"` + Version *Version `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"` Signer string `protobuf:"bytes,5,opt,name=signer,proto3" json:"signer,omitempty"` } @@ -118,7 +118,7 @@ type MsgConnectionOpenTry struct { CounterpartyChosenConnectionId string `protobuf:"bytes,3,opt,name=counterparty_chosen_connection_id,json=counterpartyChosenConnectionId,proto3" json:"counterparty_chosen_connection_id,omitempty" yaml:"counterparty_chosen_connection_id"` ClientState *types.Any `protobuf:"bytes,4,opt,name=client_state,json=clientState,proto3" json:"client_state,omitempty" yaml:"client_state"` Counterparty Counterparty `protobuf:"bytes,5,opt,name=counterparty,proto3" json:"counterparty"` - CounterpartyVersions []string `protobuf:"bytes,6,rep,name=counterparty_versions,json=counterpartyVersions,proto3" json:"counterparty_versions,omitempty" yaml:"counterparty_versions"` + CounterpartyVersions []*Version `protobuf:"bytes,6,rep,name=counterparty_versions,json=counterpartyVersions,proto3" json:"counterparty_versions,omitempty" yaml:"counterparty_versions"` ProofHeight types1.Height `protobuf:"bytes,7,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height" yaml:"proof_height"` // proof of the initialization the connection on Chain A: `UNITIALIZED -> // INIT` @@ -206,7 +206,7 @@ var xxx_messageInfo_MsgConnectionOpenTryResponse proto.InternalMessageInfo type MsgConnectionOpenAck struct { ConnectionId string `protobuf:"bytes,1,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty" yaml:"connection_id"` CounterpartyConnectionId string `protobuf:"bytes,2,opt,name=counterparty_connection_id,json=counterpartyConnectionId,proto3" json:"counterparty_connection_id,omitempty" yaml:"counterparty_connection_id"` - Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` + Version *Version `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` ClientState *types.Any `protobuf:"bytes,4,opt,name=client_state,json=clientState,proto3" json:"client_state,omitempty" yaml:"client_state"` ProofHeight types1.Height `protobuf:"bytes,5,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height" yaml:"proof_height"` // proof of the initialization the connection on Chain B: `UNITIALIZED -> @@ -384,64 +384,65 @@ func init() { func init() { proto.RegisterFile("ibc/core/connection/v1/tx.proto", fileDescriptor_5d00fde5fc97399e) } var fileDescriptor_5d00fde5fc97399e = []byte{ - // 909 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xbf, 0x93, 0xdb, 0x44, - 0x14, 0xb6, 0xce, 0xf7, 0xc3, 0x5e, 0x1b, 0x92, 0x28, 0xf6, 0x9d, 0x10, 0x41, 0x72, 0x76, 0x60, - 0xb8, 0x22, 0x27, 0xc5, 0x97, 0x30, 0xc3, 0x1c, 0x43, 0x61, 0xbb, 0xe1, 0x8a, 0x00, 0x23, 0x2e, - 0x14, 0x69, 0x3c, 0xb6, 0xbc, 0x96, 0x35, 0x3e, 0xef, 0x7a, 0xb4, 0xb2, 0x13, 0xd1, 0xd2, 0x30, - 0x54, 0x34, 0xf4, 0xf9, 0x0b, 0xf8, 0x1b, 0x28, 0x53, 0xa6, 0xa4, 0xd2, 0x30, 0x77, 0x0d, 0xb5, - 0x3a, 0x3a, 0x46, 0xab, 0x1f, 0x5e, 0xd9, 0xf2, 0xe4, 0xcc, 0x39, 0x95, 0xf7, 0xed, 0xfb, 0xde, - 0xbe, 0xa7, 0x6f, 0xbf, 0xf7, 0xbc, 0x40, 0xb5, 0xfb, 0xa6, 0x6e, 0x12, 0x07, 0xe9, 0x26, 0xc1, - 0x18, 0x99, 0xae, 0x4d, 0xb0, 0x3e, 0x6f, 0xea, 0xee, 0x2b, 0x6d, 0xea, 0x10, 0x97, 0x88, 0x87, - 0x76, 0xdf, 0xd4, 0x42, 0x80, 0xb6, 0x00, 0x68, 0xf3, 0xa6, 0x5c, 0xb3, 0x88, 0x45, 0x18, 0x44, - 0x0f, 0x57, 0x11, 0x5a, 0xfe, 0xc8, 0x22, 0xc4, 0xba, 0x44, 0x3a, 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x09, 0xf7, 0xfc, 0x76, 0xbd, 0x29, 0xa2, 0xfd, 0x7d, 0x36, 0x71, 0x9f, 0xfc, - 0x17, 0x00, 0x00, 0xff, 0xff, 0x93, 0xae, 0x01, 0xa9, 0x2d, 0x0c, 0x00, 0x00, + // 917 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0x3f, 0x93, 0xdb, 0x44, + 0x14, 0xb7, 0xce, 0xf7, 0xc7, 0xde, 0x33, 0x24, 0x51, 0xec, 0x3b, 0x21, 0x82, 0xe4, 0xec, 0xc0, + 0x70, 0x45, 0x4e, 0x8a, 0x93, 0x30, 0x03, 0xc7, 0x50, 0xd8, 0x6e, 0xb8, 0x22, 0xc0, 0x88, 0x83, + 0x22, 0x8d, 0xc7, 0x96, 0xd7, 0xb2, 0xc6, 0xe7, 0x5d, 0x8f, 0x56, 0x76, 0x22, 0x5a, 0x1a, 0x86, + 0x8a, 0x8f, 0x90, 0x4f, 0xc1, 0x67, 0x48, 0x47, 0x4a, 0x2a, 0x0d, 0xdc, 0x35, 0xd4, 0xea, 0xe8, + 0x18, 0xad, 0xfe, 0x78, 0x65, 0xcb, 0x73, 0x36, 0xe7, 0x54, 0xd2, 0xdb, 0xf7, 0x7b, 0xef, 0xed, + 0xfe, 0xf6, 0xfd, 0xde, 0x2c, 0x50, 0xed, 0x9e, 0xa9, 0x9b, 0xc4, 0x41, 0xba, 0x49, 0x30, 0x46, + 0xa6, 0x6b, 0x13, 0xac, 0xcf, 0x1a, 0xba, 0xfb, 0x4a, 0x9b, 0x38, 0xc4, 0x25, 0xe2, 0x91, 0xdd, + 0x33, 0xb5, 0x10, 0xa0, 0xcd, 0x01, 0xda, 0xac, 0x21, 0x57, 0x2d, 0x62, 0x11, 0x06, 0xd1, 0xc3, + 0xbf, 0x08, 0x2d, 0x7f, 0x60, 0x11, 0x62, 0x5d, 0x22, 0x9d, 0x59, 0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fe, 0x4a, 0x4f, 0x9f, 0xf7, 0x8f, 0x9f, 0x9e, 0x72, 0x2f, 0x7c, 0xd7, 0x9b, + 0x20, 0xda, 0xdb, 0x67, 0x13, 0xf7, 0xe9, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x86, 0xcf, 0x23, + 0x2c, 0x90, 0x0c, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -667,10 +668,15 @@ func (m *MsgConnectionOpenInit) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x2a } - if len(m.Version) > 0 { - i -= len(m.Version) - copy(dAtA[i:], m.Version) - i = encodeVarintTx(dAtA, i, uint64(len(m.Version))) + if m.Version != nil { + { + size, err := m.Version.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } i-- dAtA[i] = 0x22 } @@ -794,9 +800,14 @@ func (m *MsgConnectionOpenTry) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0x3a if len(m.CounterpartyVersions) > 0 { for iNdEx := len(m.CounterpartyVersions) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.CounterpartyVersions[iNdEx]) - copy(dAtA[i:], m.CounterpartyVersions[iNdEx]) - i = encodeVarintTx(dAtA, i, uint64(len(m.CounterpartyVersions[iNdEx]))) + { + size, err := m.CounterpartyVersions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } i-- dAtA[i] = 0x32 } @@ -950,10 +961,15 @@ func (m *MsgConnectionOpenAck) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x22 } - if len(m.Version) > 0 { - i -= len(m.Version) - copy(dAtA[i:], m.Version) - i = encodeVarintTx(dAtA, i, uint64(len(m.Version))) + if m.Version != nil { + { + size, err := m.Version.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } i-- dAtA[i] = 0x1a } @@ -1101,8 +1117,8 @@ func (m *MsgConnectionOpenInit) Size() (n int) { } l = m.Counterparty.Size() n += 1 + l + sovTx(uint64(l)) - l = len(m.Version) - if l > 0 { + if m.Version != nil { + l = m.Version.Size() n += 1 + l + sovTx(uint64(l)) } l = len(m.Signer) @@ -1146,8 +1162,8 @@ func (m *MsgConnectionOpenTry) Size() (n int) { l = m.Counterparty.Size() n += 1 + l + sovTx(uint64(l)) if len(m.CounterpartyVersions) > 0 { - for _, s := range m.CounterpartyVersions { - l = len(s) + for _, e := range m.CounterpartyVersions { + l = e.Size() n += 1 + l + sovTx(uint64(l)) } } @@ -1197,8 +1213,8 @@ func (m *MsgConnectionOpenAck) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = len(m.Version) - if l > 0 { + if m.Version != nil { + l = m.Version.Size() n += 1 + l + sovTx(uint64(l)) } if m.ClientState != nil { @@ -1405,7 +1421,7 @@ func (m *MsgConnectionOpenInit) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -1415,23 +1431,27 @@ func (m *MsgConnectionOpenInit) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthTx } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTx } if postIndex > l { return io.ErrUnexpectedEOF } - m.Version = string(dAtA[iNdEx:postIndex]) + if m.Version == nil { + m.Version = &Version{} + } + if err := m.Version.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex case 5: if wireType != 2 { @@ -1740,7 +1760,7 @@ func (m *MsgConnectionOpenTry) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field CounterpartyVersions", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -1750,23 +1770,25 @@ func (m *MsgConnectionOpenTry) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthTx } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTx } if postIndex > l { return io.ErrUnexpectedEOF } - m.CounterpartyVersions = append(m.CounterpartyVersions, string(dAtA[iNdEx:postIndex])) + m.CounterpartyVersions = append(m.CounterpartyVersions, &Version{}) + if err := m.CounterpartyVersions[len(m.CounterpartyVersions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex case 7: if wireType != 2 { @@ -2142,7 +2164,7 @@ func (m *MsgConnectionOpenAck) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -2152,23 +2174,27 @@ func (m *MsgConnectionOpenAck) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthTx } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTx } if postIndex > l { return io.ErrUnexpectedEOF } - m.Version = string(dAtA[iNdEx:postIndex]) + if m.Version == nil { + m.Version = &Version{} + } + if err := m.Version.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex case 4: if wireType != 2 { diff --git a/x/ibc/core/03-connection/types/version.go b/x/ibc/core/03-connection/types/version.go index 7134719485..10c5b33d28 100644 --- a/x/ibc/core/03-connection/types/version.go +++ b/x/ibc/core/03-connection/types/version.go @@ -4,6 +4,7 @@ import ( "strings" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/cosmos/cosmos-sdk/x/ibc/core/exported" ) var ( @@ -24,9 +25,11 @@ var ( } ) +var _ exported.Version = &Version{} + // NewVersion returns a new instance of Version. -func NewVersion(identifier string, features []string) Version { - return Version{ +func NewVersion(identifier string, features []string) *Version { + return &Version{ Identifier: identifier, Features: features, } @@ -44,12 +47,10 @@ func (version Version) GetFeatures() []string { // ValidateVersion does basic validation of the version identifier and // features. It unmarshals the version string into a Version object. -func ValidateVersion(encodedVersion string) error { - var version Version - if err := SubModuleCdc.UnmarshalBinaryBare([]byte(encodedVersion), &version); err != nil { - return sdkerrors.Wrapf(err, "failed to unmarshal version string %s", encodedVersion) +func ValidateVersion(version *Version) error { + if version == nil { + return sdkerrors.Wrap(ErrInvalidVersion, "version cannot be nil") } - if strings.TrimSpace(version.Identifier) == "" { return sdkerrors.Wrap(ErrInvalidVersion, "version identifier cannot be blank") } @@ -62,173 +63,11 @@ func ValidateVersion(encodedVersion string) error { return nil } -// Encode proto encodes the version and returns the bytes as a string. -func (version Version) Encode() (string, error) { - encodedVersion, err := SubModuleCdc.MarshalBinaryBare(&version) - if err != nil { - return "", err - } - - return string(encodedVersion), nil -} - -// EncodeVersions iterates over the provided versions and marshals each -// into proto encoded strings. This represents the stored value of the version -// in the connection end as well as the value passed over the wire. -func EncodeVersions(versions []Version) ([]string, error) { - encodedVersions := make([]string, len(versions)) - - for i, version := range versions { - ver, err := version.Encode() - if err != nil { - return nil, err - } - - encodedVersions[i] = ver - } - - return encodedVersions, nil -} - -// DecodeVersion unmarshals a proto encoded version into a Version struct. -func DecodeVersion(encodedVersion string) (Version, error) { - var version Version - if err := SubModuleCdc.UnmarshalBinaryBare([]byte(encodedVersion), &version); err != nil { - return Version{}, sdkerrors.Wrapf(err, "failed to unmarshal version string %s", encodedVersion) - } - - return version, nil -} - -// DecodeVersions returns the supplied list of proto encoded version strings -// as unmarshalled Version structs. -func DecodeVersions(encodedVersions []string) ([]Version, error) { - versions := make([]Version, len(encodedVersions)) - - for i, encodedVersion := range encodedVersions { - version, err := DecodeVersion(encodedVersion) - if err != nil { - return nil, err - } - - versions[i] = version - } - - return versions, nil -} - -// GetCompatibleVersions returns a descending ordered set of compatible IBC -// versions for the caller chain's connection end. The latest supported -// version should be first element and the set should descend to the oldest -// supported version. -func GetCompatibleVersions() []Version { - return []Version{DefaultIBCVersion} -} - -// GetCompatibleEncodedVersions returns the return value from GetCompatibleVersions -// as a proto encoded string. -func GetCompatibleEncodedVersions() []string { - versions, err := EncodeVersions(GetCompatibleVersions()) - if err != nil { - panic(err) // should not occur with properly set hardcoded versions - } - - return versions -} - -// IsSupportedVersion returns true if the proposed version has a matching version -// identifier and its entire feature set is supported or the version identifier -// supports an empty feature set. -func IsSupportedVersion(encodedProposedVersion string) bool { - proposedVersion, err := DecodeVersion(encodedProposedVersion) - if err != nil { - return false - } - - supportedVersion, found := FindSupportedVersion(proposedVersion, GetCompatibleVersions()) - if !found { - return false - } - - if err := supportedVersion.VerifyProposedVersion(proposedVersion); err != nil { - return false - } - - return true -} - -// FindSupportedVersion returns the version with a matching version identifier -// if it exists. The returned boolean is true if the version is found and -// false otherwise. -func FindSupportedVersion(version Version, supportedVersions []Version) (Version, bool) { - for _, supportedVersion := range supportedVersions { - if version.GetIdentifier() == supportedVersion.GetIdentifier() { - return supportedVersion, true - } - } - return Version{}, false -} - -// PickVersion iterates over the descending ordered set of compatible IBC -// versions and selects the first version with a version identifier that is -// supported by the counterparty. The returned version contains a feature -// set with the intersection of the features supported by the source and -// counterparty chains. If the feature set intersection is nil and this is -// not allowed for the chosen version identifier then the search for a -// compatible version continues. This function is called in the ConnOpenTry -// handshake procedure. -// -// CONTRACT: PickVersion must only provide a version that is in the -// intersection of the supported versions and the counterparty versions. -func PickVersion(encodedSupportedVersions, encodedCounterpartyVersions []string) (string, error) { - supportedVersions, err := DecodeVersions(encodedSupportedVersions) - if err != nil { - return "", sdkerrors.Wrapf(err, "failed to unmarshal supported versions (%s) when attempting to pick compatible version", encodedSupportedVersions) - } - - counterpartyVersions, err := DecodeVersions(encodedCounterpartyVersions) - if err != nil { - return "", sdkerrors.Wrapf(err, "failed to unmarshal counterparty versions (%s) when attempting to pick compatible version", encodedCounterpartyVersions) - } - - for _, supportedVersion := range supportedVersions { - // check if the source version is supported by the counterparty - if counterpartyVersion, found := FindSupportedVersion(supportedVersion, counterpartyVersions); found { - - featureSet := GetFeatureSetIntersection(supportedVersion.GetFeatures(), counterpartyVersion.GetFeatures()) - if len(featureSet) == 0 && !allowNilFeatureSet[supportedVersion.GetIdentifier()] { - continue - } - - return NewVersion(supportedVersion.GetIdentifier(), featureSet).Encode() - } - } - - return "", sdkerrors.Wrapf( - ErrVersionNegotiationFailed, - "failed to find a matching counterparty version (%s) from the supported version list (%s)", counterpartyVersions, supportedVersions, - ) -} - -// GetFeatureSetIntersection returns the intersections of source feature set -// and the counterparty feature set. This is done by iterating over all the -// features in the source version and seeing if they exist in the feature -// set for the counterparty version. -func GetFeatureSetIntersection(sourceFeatureSet, counterpartyFeatureSet []string) (featureSet []string) { - for _, feature := range sourceFeatureSet { - if contains(feature, counterpartyFeatureSet) { - featureSet = append(featureSet, feature) - } - } - - return featureSet -} - // VerifyProposedVersion verifies that the entire feature set in the // proposed version is supported by this chain. If the feature set is // empty it verifies that this is allowed for the specified version // identifier. -func (version Version) VerifyProposedVersion(proposedVersion Version) error { +func (version Version) VerifyProposedVersion(proposedVersion exported.Version) error { if proposedVersion.GetIdentifier() != version.GetIdentifier() { return sdkerrors.Wrapf( ErrVersionNegotiationFailed, @@ -257,12 +96,7 @@ func (version Version) VerifyProposedVersion(proposedVersion Version) error { // VerifySupportedFeature takes in a version and feature string and returns // true if the feature is supported by the version and false otherwise. -func VerifySupportedFeature(encodedVersion, feature string) bool { - version, err := DecodeVersion(encodedVersion) - if err != nil { - return false - } - +func VerifySupportedFeature(version exported.Version, feature string) bool { for _, f := range version.GetFeatures() { if f == feature { return true @@ -271,6 +105,108 @@ func VerifySupportedFeature(encodedVersion, feature string) bool { return false } +// GetCompatibleVersions returns a descending ordered set of compatible IBC +// versions for the caller chain's connection end. The latest supported +// version should be first element and the set should descend to the oldest +// supported version. +func GetCompatibleVersions() []exported.Version { + return []exported.Version{DefaultIBCVersion} +} + +// IsSupportedVersion returns true if the proposed version has a matching version +// identifier and its entire feature set is supported or the version identifier +// supports an empty feature set. +func IsSupportedVersion(proposedVersion *Version) bool { + supportedVersion, found := FindSupportedVersion(proposedVersion, GetCompatibleVersions()) + if !found { + return false + } + + if err := supportedVersion.VerifyProposedVersion(proposedVersion); err != nil { + return false + } + + return true +} + +// FindSupportedVersion returns the version with a matching version identifier +// if it exists. The returned boolean is true if the version is found and +// false otherwise. +func FindSupportedVersion(version exported.Version, supportedVersions []exported.Version) (exported.Version, bool) { + for _, supportedVersion := range supportedVersions { + if version.GetIdentifier() == supportedVersion.GetIdentifier() { + return supportedVersion, true + } + } + return nil, false +} + +// PickVersion iterates over the descending ordered set of compatible IBC +// versions and selects the first version with a version identifier that is +// supported by the counterparty. The returned version contains a feature +// set with the intersection of the features supported by the source and +// counterparty chains. If the feature set intersection is nil and this is +// not allowed for the chosen version identifier then the search for a +// compatible version continues. This function is called in the ConnOpenTry +// handshake procedure. +// +// CONTRACT: PickVersion must only provide a version that is in the +// intersection of the supported versions and the counterparty versions. +func PickVersion(supportedVersions, counterpartyVersions []exported.Version) (*Version, error) { + for _, supportedVersion := range supportedVersions { + // check if the source version is supported by the counterparty + if counterpartyVersion, found := FindSupportedVersion(supportedVersion, counterpartyVersions); found { + featureSet := GetFeatureSetIntersection(supportedVersion.GetFeatures(), counterpartyVersion.GetFeatures()) + if len(featureSet) == 0 && !allowNilFeatureSet[supportedVersion.GetIdentifier()] { + continue + } + + return NewVersion(supportedVersion.GetIdentifier(), featureSet), nil + } + } + + return nil, sdkerrors.Wrapf( + ErrVersionNegotiationFailed, + "failed to find a matching counterparty version (%v) from the supported version list (%v)", counterpartyVersions, supportedVersions, + ) +} + +// GetFeatureSetIntersection returns the intersections of source feature set +// and the counterparty feature set. This is done by iterating over all the +// features in the source version and seeing if they exist in the feature +// set for the counterparty version. +func GetFeatureSetIntersection(sourceFeatureSet, counterpartyFeatureSet []string) (featureSet []string) { + for _, feature := range sourceFeatureSet { + if contains(feature, counterpartyFeatureSet) { + featureSet = append(featureSet, feature) + } + } + + return featureSet +} + +// ExportedVersionsToProto casts a slice of the Version interface to a slice +// of the Version proto definition. +func ExportedVersionsToProto(exportedVersions []exported.Version) []*Version { + versions := make([]*Version, len(exportedVersions)) + for i := range exportedVersions { + versions[i] = exportedVersions[i].(*Version) + } + + return versions +} + +// ProtoVersionsToExported converts a slice of the Version proto definition to +// the Version interface. +func ProtoVersionsToExported(versions []*Version) []exported.Version { + exportedVersions := make([]exported.Version, len(versions)) + for i := range versions { + exportedVersions[i] = versions[i] + } + + return exportedVersions +} + // contains returns true if the provided string element exists within the // string set. func contains(elem string, set []string) bool { diff --git a/x/ibc/core/03-connection/types/version_test.go b/x/ibc/core/03-connection/types/version_test.go index a18c87dde3..8f882dd327 100644 --- a/x/ibc/core/03-connection/types/version_test.go +++ b/x/ibc/core/03-connection/types/version_test.go @@ -6,13 +6,14 @@ import ( "github.com/stretchr/testify/require" "github.com/cosmos/cosmos-sdk/x/ibc/core/03-connection/types" + "github.com/cosmos/cosmos-sdk/x/ibc/core/exported" ibctesting "github.com/cosmos/cosmos-sdk/x/ibc/testing" ) func TestValidateVersion(t *testing.T) { testCases := []struct { name string - version types.Version + version *types.Version expPass bool }{ {"valid version", types.DefaultIBCVersion, true}, @@ -22,10 +23,7 @@ func TestValidateVersion(t *testing.T) { } for i, tc := range testCases { - encodedVersion, err := tc.version.Encode() - require.NoError(t, err, "test case %d failed to marshal version string: %s", i, tc.name) - - err = types.ValidateVersion(encodedVersion) + err := types.ValidateVersion(tc.version) if tc.expPass { require.NoError(t, err, "valid test case %d failed: %s", i, tc.name) @@ -35,44 +33,20 @@ func TestValidateVersion(t *testing.T) { } } -func TestDecodeVersion(t *testing.T) { - testCases := []struct { - name string - version string - expVersion types.Version - expPass bool - }{ - {"valid version", ibctesting.ConnectionVersion, types.DefaultIBCVersion, true}, - {"invalid version", "not a proto encoded version", types.Version{}, false}, - {"empty string", " ", types.Version{}, false}, - } - - for i, tc := range testCases { - version, err := types.DecodeVersion(tc.version) - - if tc.expPass { - require.NoError(t, err, "valid test case %d failed: %s", i, tc.name) - require.Equal(t, tc.expVersion, version) - } else { - require.Error(t, err, "invalid test case %d passed: %s", i, tc.name) - } - } -} - func TestIsSupportedVersion(t *testing.T) { testCases := []struct { name string - version types.Version + version *types.Version expPass bool }{ { "version is supported", - types.GetCompatibleVersions()[0], + types.ExportedVersionsToProto(types.GetCompatibleVersions())[0], true, }, { "version is not supported", - types.Version{}, + &types.Version{}, false, }, { @@ -82,75 +56,64 @@ func TestIsSupportedVersion(t *testing.T) { }, } - // test that a version that cannot be decoded does not pass - require.False(t, types.IsSupportedVersion("1.0")) - for _, tc := range testCases { - encodedVersion, err := tc.version.Encode() - require.NoError(t, err) - - require.Equal(t, tc.expPass, types.IsSupportedVersion(encodedVersion)) + require.Equal(t, tc.expPass, types.IsSupportedVersion(tc.version)) } } func TestFindSupportedVersion(t *testing.T) { testCases := []struct { name string - version types.Version - supportedVersions []types.Version - expVersion types.Version + version *types.Version + supportedVersions []exported.Version + expVersion *types.Version expFound bool }{ {"valid supported version", types.DefaultIBCVersion, types.GetCompatibleVersions(), types.DefaultIBCVersion, true}, - {"empty (invalid) version", types.Version{}, types.GetCompatibleVersions(), types.Version{}, false}, - {"empty supported versions", types.DefaultIBCVersion, []types.Version{}, types.Version{}, false}, - {"desired version is last", types.DefaultIBCVersion, []types.Version{types.NewVersion("1.1", nil), types.NewVersion("2", []string{"ORDER_UNORDERED"}), types.NewVersion("3", nil), types.DefaultIBCVersion}, types.DefaultIBCVersion, true}, + {"empty (invalid) version", &types.Version{}, types.GetCompatibleVersions(), &types.Version{}, false}, + {"empty supported versions", types.DefaultIBCVersion, []exported.Version{}, &types.Version{}, false}, + {"desired version is last", types.DefaultIBCVersion, []exported.Version{types.NewVersion("1.1", nil), types.NewVersion("2", []string{"ORDER_UNORDERED"}), types.NewVersion("3", nil), types.DefaultIBCVersion}, types.DefaultIBCVersion, true}, {"desired version identifier with different feature set", types.NewVersion(types.DefaultIBCVersionIdentifier, []string{"ORDER_DAG"}), types.GetCompatibleVersions(), types.DefaultIBCVersion, true}, - {"version not supported", types.NewVersion("2", []string{"ORDER_DAG"}), types.GetCompatibleVersions(), types.Version{}, false}, + {"version not supported", types.NewVersion("2", []string{"ORDER_DAG"}), types.GetCompatibleVersions(), &types.Version{}, false}, } for i, tc := range testCases { version, found := types.FindSupportedVersion(tc.version, tc.supportedVersions) - - require.Equal(t, tc.expVersion.GetIdentifier(), version.GetIdentifier(), "test case %d: %s", i, tc.name) - require.Equal(t, tc.expFound, found, "test case %d: %s", i, tc.name) + if tc.expFound { + require.Equal(t, tc.expVersion.GetIdentifier(), version.GetIdentifier(), "test case %d: %s", i, tc.name) + require.True(t, found, "test case %d: %s", i, tc.name) + } else { + require.False(t, found, "test case: %s", tc.name) + require.Nil(t, version, "test case: %s", tc.name) + } } } func TestPickVersion(t *testing.T) { testCases := []struct { name string - supportedVersions []types.Version - counterpartyVersions []types.Version - expVer types.Version + supportedVersions []exported.Version + counterpartyVersions []exported.Version + expVer *types.Version expPass bool }{ {"valid default ibc version", types.GetCompatibleVersions(), types.GetCompatibleVersions(), types.DefaultIBCVersion, true}, - {"valid version in counterparty versions", types.GetCompatibleVersions(), []types.Version{types.NewVersion("version1", nil), types.NewVersion("2.0.0", []string{"ORDER_UNORDERED-ZK"}), types.DefaultIBCVersion}, types.DefaultIBCVersion, true}, - {"valid identifier match but empty feature set not allowed", types.GetCompatibleVersions(), []types.Version{types.NewVersion(types.DefaultIBCVersionIdentifier, []string{"DAG", "ORDERED-ZK", "UNORDERED-zk]"})}, types.NewVersion(types.DefaultIBCVersionIdentifier, nil), false}, - {"empty counterparty versions", types.GetCompatibleVersions(), []types.Version{}, types.Version{}, false}, - {"non-matching counterparty versions", types.GetCompatibleVersions(), []types.Version{types.NewVersion("2.0.0", nil)}, types.Version{}, false}, - {"non-matching counterparty versions (uses ordered channels only) contained in supported versions (uses unordered channels only)", []types.Version{types.NewVersion(types.DefaultIBCVersionIdentifier, []string{"ORDER_UNORDERED"})}, []types.Version{types.NewVersion(types.DefaultIBCVersionIdentifier, []string{"ORDER_ORDERED"})}, types.Version{}, false}, + {"valid version in counterparty versions", types.GetCompatibleVersions(), []exported.Version{types.NewVersion("version1", nil), types.NewVersion("2.0.0", []string{"ORDER_UNORDERED-ZK"}), types.DefaultIBCVersion}, types.DefaultIBCVersion, true}, + {"valid identifier match but empty feature set not allowed", types.GetCompatibleVersions(), []exported.Version{types.NewVersion(types.DefaultIBCVersionIdentifier, []string{"DAG", "ORDERED-ZK", "UNORDERED-zk]"})}, types.NewVersion(types.DefaultIBCVersionIdentifier, nil), false}, + {"empty counterparty versions", types.GetCompatibleVersions(), []exported.Version{}, &types.Version{}, false}, + {"non-matching counterparty versions", types.GetCompatibleVersions(), []exported.Version{types.NewVersion("2.0.0", nil)}, &types.Version{}, false}, + {"non-matching counterparty versions (uses ordered channels only) contained in supported versions (uses unordered channels only)", []exported.Version{types.NewVersion(types.DefaultIBCVersionIdentifier, []string{"ORDER_UNORDERED"})}, []exported.Version{types.NewVersion(types.DefaultIBCVersionIdentifier, []string{"ORDER_ORDERED"})}, &types.Version{}, false}, } for i, tc := range testCases { - encodedSupportedVersions, err := types.EncodeVersions(tc.supportedVersions) - require.NoError(t, err) - - encodedCounterpartyVersions, err := types.EncodeVersions(tc.counterpartyVersions) - require.NoError(t, err) - - encodedVersion, err := types.PickVersion(encodedSupportedVersions, encodedCounterpartyVersions) + version, err := types.PickVersion(tc.supportedVersions, tc.counterpartyVersions) if tc.expPass { require.NoError(t, err, "valid test case %d failed: %s", i, tc.name) - - version, err := types.DecodeVersion(encodedVersion) - require.NoError(t, err) - require.Equal(t, tc.expVer, version, "valid test case %d falied: %s", i, tc.name) } else { require.Error(t, err, "invalid test case %d passed: %s", i, tc.name) - require.Equal(t, "", encodedVersion, "invalid test case %d passed: %s", i, tc.name) + var emptyVersion *types.Version + require.Equal(t, emptyVersion, version, "invalid test case %d passed: %s", i, tc.name) } } } @@ -158,8 +121,8 @@ func TestPickVersion(t *testing.T) { func TestVerifyProposedVersion(t *testing.T) { testCases := []struct { name string - proposedVersion types.Version - supportedVersion types.Version + proposedVersion *types.Version + supportedVersion *types.Version expPass bool }{ {"entire feature set supported", types.DefaultIBCVersion, types.NewVersion("1", []string{"ORDER_ORDERED", "ORDER_UNORDERED", "ORDER_DAG"}), true}, @@ -182,12 +145,11 @@ func TestVerifyProposedVersion(t *testing.T) { } func TestVerifySupportedFeature(t *testing.T) { - nilFeatures, err := types.NewVersion(types.DefaultIBCVersionIdentifier, nil).Encode() - require.NoError(t, err) + nilFeatures := types.NewVersion(types.DefaultIBCVersionIdentifier, nil) testCases := []struct { name string - version string + version *types.Version feature string expPass bool }{ @@ -195,7 +157,6 @@ func TestVerifySupportedFeature(t *testing.T) { {"check UNORDERED supported", ibctesting.ConnectionVersion, "ORDER_UNORDERED", true}, {"check DAG unsupported", ibctesting.ConnectionVersion, "ORDER_DAG", false}, {"check empty feature set returns false", nilFeatures, "ORDER_ORDERED", false}, - {"failed to unmarshal version", "not an encoded version", "ORDER_ORDERED", false}, } for i, tc := range testCases { diff --git a/x/ibc/core/04-channel/keeper/handshake_test.go b/x/ibc/core/04-channel/keeper/handshake_test.go index 927bc3131b..fe5dc3593a 100644 --- a/x/ibc/core/04-channel/keeper/handshake_test.go +++ b/x/ibc/core/04-channel/keeper/handshake_test.go @@ -56,8 +56,7 @@ func (suite *KeeperTestSuite) TestChanOpenInit() { // modify connA versions conn := suite.chainA.GetConnection(connA) - version, err := connectiontypes.NewVersion("2", []string{"ORDER_ORDERED", "ORDER_UNORDERED"}).Encode() - suite.Require().NoError(err) + version := connectiontypes.NewVersion("2", []string{"ORDER_ORDERED", "ORDER_UNORDERED"}) conn.Versions = append(conn.Versions, version) suite.chainA.App.IBCKeeper.ConnectionKeeper.SetConnection( @@ -74,9 +73,8 @@ func (suite *KeeperTestSuite) TestChanOpenInit() { // modify connA versions to only support UNORDERED channels conn := suite.chainA.GetConnection(connA) - version, err := connectiontypes.NewVersion("1", []string{"ORDER_UNORDERED"}).Encode() - suite.Require().NoError(err) - conn.Versions = []string{version} + version := connectiontypes.NewVersion("1", []string{"ORDER_UNORDERED"}) + conn.Versions = []*connectiontypes.Version{version} suite.chainA.App.IBCKeeper.ConnectionKeeper.SetConnection( suite.chainA.GetContext(), @@ -244,8 +242,7 @@ func (suite *KeeperTestSuite) TestChanOpenTry() { // modify connB versions conn := suite.chainB.GetConnection(connB) - version, err := connectiontypes.NewVersion("2", []string{"ORDER_ORDERED", "ORDER_UNORDERED"}).Encode() - suite.Require().NoError(err) + version := connectiontypes.NewVersion("2", []string{"ORDER_ORDERED", "ORDER_UNORDERED"}) conn.Versions = append(conn.Versions, version) suite.chainB.App.IBCKeeper.ConnectionKeeper.SetConnection( @@ -262,9 +259,8 @@ func (suite *KeeperTestSuite) TestChanOpenTry() { // modify connA versions to only support UNORDERED channels conn := suite.chainA.GetConnection(connA) - version, err := connectiontypes.NewVersion("1", []string{"ORDER_UNORDERED"}).Encode() - suite.Require().NoError(err) - conn.Versions = []string{version} + version := connectiontypes.NewVersion("1", []string{"ORDER_UNORDERED"}) + conn.Versions = []*connectiontypes.Version{version} suite.chainA.App.IBCKeeper.ConnectionKeeper.SetConnection( suite.chainA.GetContext(), diff --git a/x/ibc/core/exported/connection.go b/x/ibc/core/exported/connection.go index d8eddf9df1..a21c5a5364 100644 --- a/x/ibc/core/exported/connection.go +++ b/x/ibc/core/exported/connection.go @@ -5,7 +5,7 @@ type ConnectionI interface { GetClientID() string GetState() int32 GetCounterparty() CounterpartyConnectionI - GetVersions() []string + GetVersions() []Version ValidateBasic() error } @@ -16,3 +16,10 @@ type CounterpartyConnectionI interface { GetPrefix() Prefix ValidateBasic() error } + +// Version defines an IBC version used in connection handshake negotiation. +type Version interface { + GetIdentifier() string + GetFeatures() []string + VerifyProposedVersion(Version) error +} diff --git a/x/ibc/core/genesis_test.go b/x/ibc/core/genesis_test.go index 6dc06a5de8..482027fb88 100644 --- a/x/ibc/core/genesis_test.go +++ b/x/ibc/core/genesis_test.go @@ -100,7 +100,7 @@ func (suite *IBCTestSuite) TestValidateGenesis() { ), ConnectionGenesis: connectiontypes.NewGenesisState( []connectiontypes.IdentifiedConnection{ - connectiontypes.NewIdentifiedConnection(connectionID, connectiontypes.NewConnectionEnd(connectiontypes.INIT, clientID, connectiontypes.NewCounterparty(clientID2, connectionID2, commitmenttypes.NewMerklePrefix([]byte("prefix"))), []string{ibctesting.ConnectionVersion})), + connectiontypes.NewIdentifiedConnection(connectionID, connectiontypes.NewConnectionEnd(connectiontypes.INIT, clientID, connectiontypes.NewCounterparty(clientID2, connectionID2, commitmenttypes.NewMerklePrefix([]byte("prefix"))), []*connectiontypes.Version{ibctesting.ConnectionVersion})), }, []connectiontypes.ConnectionPaths{ connectiontypes.NewConnectionPaths(clientID, []string{host.ConnectionPath(connectionID)}), @@ -159,7 +159,7 @@ func (suite *IBCTestSuite) TestValidateGenesis() { ClientGenesis: clienttypes.DefaultGenesisState(), ConnectionGenesis: connectiontypes.NewGenesisState( []connectiontypes.IdentifiedConnection{ - connectiontypes.NewIdentifiedConnection(connectionID, connectiontypes.NewConnectionEnd(connectiontypes.INIT, "(CLIENTIDONE)", connectiontypes.NewCounterparty(clientID, connectionID2, commitmenttypes.NewMerklePrefix([]byte("prefix"))), []string{"1.0.0"})), + connectiontypes.NewIdentifiedConnection(connectionID, connectiontypes.NewConnectionEnd(connectiontypes.INIT, "(CLIENTIDONE)", connectiontypes.NewCounterparty(clientID, connectionID2, commitmenttypes.NewMerklePrefix([]byte("prefix"))), []*connectiontypes.Version{connectiontypes.NewVersion("1.1", nil)})), }, []connectiontypes.ConnectionPaths{ connectiontypes.NewConnectionPaths(clientID, []string{host.ConnectionPath(connectionID)}), @@ -234,7 +234,7 @@ func (suite *IBCTestSuite) TestInitGenesis() { ), ConnectionGenesis: connectiontypes.NewGenesisState( []connectiontypes.IdentifiedConnection{ - connectiontypes.NewIdentifiedConnection(connectionID, connectiontypes.NewConnectionEnd(connectiontypes.INIT, clientID, connectiontypes.NewCounterparty(clientID2, connectionID2, commitmenttypes.NewMerklePrefix([]byte("prefix"))), []string{ibctesting.ConnectionVersion})), + connectiontypes.NewIdentifiedConnection(connectionID, connectiontypes.NewConnectionEnd(connectiontypes.INIT, clientID, connectiontypes.NewCounterparty(clientID2, connectionID2, commitmenttypes.NewMerklePrefix([]byte("prefix"))), []*connectiontypes.Version{ibctesting.ConnectionVersion})), }, []connectiontypes.ConnectionPaths{ connectiontypes.NewConnectionPaths(clientID, []string{host.ConnectionPath(connectionID)}), diff --git a/x/ibc/core/keeper/msg_server.go b/x/ibc/core/keeper/msg_server.go index 15af734846..d448aca8b6 100644 --- a/x/ibc/core/keeper/msg_server.go +++ b/x/ibc/core/keeper/msg_server.go @@ -165,7 +165,7 @@ func (k Keeper) ConnectionOpenTry(goCtx context.Context, msg *connectiontypes.Ms if err := k.ConnectionKeeper.ConnOpenTry( ctx, msg.DesiredConnectionId, msg.CounterpartyChosenConnectionId, msg.Counterparty, msg.ClientId, targetClient, - msg.CounterpartyVersions, msg.ProofInit, msg.ProofClient, msg.ProofConsensus, + connectiontypes.ProtoVersionsToExported(msg.CounterpartyVersions), msg.ProofInit, msg.ProofClient, msg.ProofConsensus, msg.ProofHeight, msg.ConsensusHeight, ); err != nil { return nil, sdkerrors.Wrap(err, "connection handshake open try failed") diff --git a/x/ibc/core/simulation/decoder_test.go b/x/ibc/core/simulation/decoder_test.go index 17f584d00a..d14a9f28cc 100644 --- a/x/ibc/core/simulation/decoder_test.go +++ b/x/ibc/core/simulation/decoder_test.go @@ -30,7 +30,7 @@ func TestDecodeStore(t *testing.T) { } connection := connectiontypes.ConnectionEnd{ ClientId: "clientidone", - Versions: []string{"1.0"}, + Versions: []*connectiontypes.Version{connectiontypes.NewVersion("1", nil)}, } channel := channeltypes.Channel{ State: channeltypes.OPEN, diff --git a/x/ibc/core/spec/01_concepts.md b/x/ibc/core/spec/01_concepts.md index 9e7654ddda..079e6fa702 100644 --- a/x/ibc/core/spec/01_concepts.md +++ b/x/ibc/core/spec/01_concepts.md @@ -160,7 +160,7 @@ connection is set and stored in the OPEN state upon success. ## Connection Version Negotiation -During the handshake procedure for connections a version string is agreed +During the handshake procedure for connections a version is agreed upon between the two parties. This occurs during the first 3 steps of the handshake. @@ -181,16 +181,20 @@ During `ConnOpenAck`, party A will verify that they can support the version party B selected. If they do not support the selected version an error is returned. After this step, the connection version is considered agreed upon. -A valid connection version is considered to be in the following format: -`(version-identifier,[feature-0,feature-1])` -- the version tuple must be enclosed in parentheses -- the feature set must be enclosed in brackets -- there should be no space between the comma separating the identifier and the - feature set -- the version identifier must no contain any commas -- each feature must not contain any commas -- each feature must be separated by commas +A `Version` is defined as follows: + +```go +type Version struct { + // unique version identifier + Identifier string + // list of features compatible with the specified identifier + Features []string +} +``` + +A version must contain a non empty identifier. Empty feature sets are allowed, but each +feature must be a non empty string. ::: warning A set of versions should not contain two versions with the same diff --git a/x/ibc/light-clients/06-solomachine/types/client_state_test.go b/x/ibc/light-clients/06-solomachine/types/client_state_test.go index 30da780488..f13eba0576 100644 --- a/x/ibc/light-clients/06-solomachine/types/client_state_test.go +++ b/x/ibc/light-clients/06-solomachine/types/client_state_test.go @@ -336,7 +336,7 @@ func (suite *SoloMachineTestSuite) TestVerifyClientConsensusState() { func (suite *SoloMachineTestSuite) TestVerifyConnectionState() { counterparty := connectiontypes.NewCounterparty("clientB", testConnectionID, prefix) - conn := connectiontypes.NewConnectionEnd(connectiontypes.OPEN, "clientA", counterparty, []string{"1.0.0"}) + conn := connectiontypes.NewConnectionEnd(connectiontypes.OPEN, "clientA", counterparty, connectiontypes.ExportedVersionsToProto(connectiontypes.GetCompatibleVersions())) path := suite.solomachine.GetConnectionStatePath(testConnectionID) diff --git a/x/ibc/light-clients/06-solomachine/types/codec_test.go b/x/ibc/light-clients/06-solomachine/types/codec_test.go index 5f9589466e..eb304bb28d 100644 --- a/x/ibc/light-clients/06-solomachine/types/codec_test.go +++ b/x/ibc/light-clients/06-solomachine/types/codec_test.go @@ -68,7 +68,7 @@ func (suite SoloMachineTestSuite) TestUnmarshalDataByType() { { "connection", types.CONNECTION, func() { counterparty := connectiontypes.NewCounterparty("clientB", testConnectionID, prefix) - conn := connectiontypes.NewConnectionEnd(connectiontypes.OPEN, "clientA", counterparty, []string{"1.0.0"}) + conn := connectiontypes.NewConnectionEnd(connectiontypes.OPEN, "clientA", counterparty, connectiontypes.ExportedVersionsToProto(connectiontypes.GetCompatibleVersions())) path := solomachine.GetConnectionStatePath("connectionID") data, err = types.ConnectionStateDataBytes(cdc, path, conn) @@ -99,7 +99,7 @@ func (suite SoloMachineTestSuite) TestUnmarshalDataByType() { { "bad channel (uses connection data)", types.CHANNEL, func() { counterparty := connectiontypes.NewCounterparty("clientB", testConnectionID, prefix) - conn := connectiontypes.NewConnectionEnd(connectiontypes.OPEN, "clientA", counterparty, []string{"1.0.0"}) + conn := connectiontypes.NewConnectionEnd(connectiontypes.OPEN, "clientA", counterparty, connectiontypes.ExportedVersionsToProto(connectiontypes.GetCompatibleVersions())) path := solomachine.GetConnectionStatePath("connectionID") data, err = types.ConnectionStateDataBytes(cdc, path, conn) diff --git a/x/ibc/light-clients/09-localhost/types/client_state_test.go b/x/ibc/light-clients/09-localhost/types/client_state_test.go index f251d086f6..abe6f20b60 100644 --- a/x/ibc/light-clients/09-localhost/types/client_state_test.go +++ b/x/ibc/light-clients/09-localhost/types/client_state_test.go @@ -145,8 +145,8 @@ func (suite *LocalhostTestSuite) TestProposedHeaderAndUpdateState() { func (suite *LocalhostTestSuite) TestVerifyConnectionState() { counterparty := connectiontypes.NewCounterparty("clientB", testConnectionID, commitmenttypes.NewMerklePrefix([]byte("ibc"))) - conn1 := connectiontypes.NewConnectionEnd(connectiontypes.OPEN, "clientA", counterparty, []string{"1.0.0"}) - conn2 := connectiontypes.NewConnectionEnd(connectiontypes.OPEN, "clientA", counterparty, []string{"2.0.0"}) + conn1 := connectiontypes.NewConnectionEnd(connectiontypes.OPEN, "clientA", counterparty, []*connectiontypes.Version{connectiontypes.NewVersion("1", nil)}) + conn2 := connectiontypes.NewConnectionEnd(connectiontypes.OPEN, "clientA", counterparty, []*connectiontypes.Version{connectiontypes.NewVersion("2", nil)}) testCases := []struct { name string diff --git a/x/ibc/testing/chain.go b/x/ibc/testing/chain.go index 923e6ae4eb..4ef4676eef 100644 --- a/x/ibc/testing/chain.go +++ b/x/ibc/testing/chain.go @@ -50,9 +50,8 @@ const ( UnbondingPeriod time.Duration = time.Hour * 24 * 7 * 3 MaxClockDrift time.Duration = time.Second * 10 - DefaultChannelVersion = ibctransfertypes.Version - DefaultOpenInitVersion = "" - InvalidID = "IDisInvalid" + DefaultChannelVersion = ibctransfertypes.Version + InvalidID = "IDisInvalid" ConnectionIDPrefix = "conn" ChannelIDPrefix = "chan" @@ -68,6 +67,8 @@ const ( var ( DefaultConsensusParams = simapp.DefaultConsensusParams + DefaultOpenInitVersion *connectiontypes.Version + // Default params variables used to create a TM client DefaultTrustLevel ibctmtypes.Fraction = ibctmtypes.DefaultTrustLevel TestHash = tmhash.Sum([]byte("TESTING HASH")) @@ -75,7 +76,7 @@ var ( UpgradePath = fmt.Sprintf("%s/%s", "upgrade", "upgradedClient") - ConnectionVersion = connectiontypes.GetCompatibleEncodedVersions()[0] + ConnectionVersion = connectiontypes.ExportedVersionsToProto(connectiontypes.GetCompatibleVersions())[0] MockAcknowledgement = mock.MockAcknowledgement MockCommitment = mock.MockCommitment @@ -654,7 +655,7 @@ func (chain *TestChain) ConnectionOpenTry( msg := connectiontypes.NewMsgConnectionOpenTry( connection.ID, connection.ID, connection.ClientID, // testing doesn't use flexible selection counterpartyConnection.ID, counterpartyConnection.ClientID, - counterpartyClient, counterparty.GetPrefix(), []string{ConnectionVersion}, + counterpartyClient, counterparty.GetPrefix(), []*connectiontypes.Version{ConnectionVersion}, proofInit, proofClient, proofConsensus, proofHeight, consensusHeight, chain.SenderAccount.GetAddress(), From bd9af94174ad84d2a74ca8637035358a7ab34345 Mon Sep 17 00:00:00 2001 From: Robert Zaremba Date: Wed, 28 Oct 2020 11:24:41 +0100 Subject: [PATCH 003/136] Use embedded lib key type in sdk pub keys instead of bytes. (#7672) * Remove duplicate print message on keys add command (#7654) Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> * ed25519: use stdlib/crypto types * use standard package testing * use crypto/ed25519 instead of golang.org/x/crypto/ed25519 In Go 1.13 the new crypto/ed25519 package implements the Ed25519 signature scheme. This functionality was previously provided by the golang.org/x/crypto/ed25519 package, which becomes a wrapper for crypto/ed25519 when used with Go 1.13+. * use standard package testing for secp256k1 tests * secp256k1: add cross packages signature checks * ed25519: rollback the _test package name * rename underlyingSecp256k1 to btcSecp256k1 * package update Co-authored-by: Denis Fadeev Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- crypto/keys/ed25519/ed25519.go | 6 +- crypto/keys/ed25519/ed25519_test.go | 18 +- crypto/keys/ed25519/keys.pb.go | 29 +- crypto/keys/secp256k1/secp256k1.go | 3 +- crypto/keys/secp256k1/secp256k1_cgo.go | 2 + .../keys/secp256k1/secp256k1_internal_test.go | 7 +- crypto/keys/secp256k1/secp256k1_test.go | 36 +- proto/cosmos/crypto/ed25519/keys.proto | 4 +- x/staking/types/staking.pb.go | 1198 ++++++++--------- 9 files changed, 668 insertions(+), 635 deletions(-) diff --git a/crypto/keys/ed25519/ed25519.go b/crypto/keys/ed25519/ed25519.go index 2a94a2e802..4c935a0760 100644 --- a/crypto/keys/ed25519/ed25519.go +++ b/crypto/keys/ed25519/ed25519.go @@ -1,6 +1,7 @@ package ed25519 import ( + "crypto/ed25519" "crypto/subtle" "fmt" "io" @@ -8,7 +9,6 @@ import ( "github.com/tendermint/tendermint/crypto" tmed25519 "github.com/tendermint/tendermint/crypto/ed25519" "github.com/tendermint/tendermint/crypto/tmhash" - "golang.org/x/crypto/ed25519" "github.com/cosmos/cosmos-sdk/codec" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" @@ -50,7 +50,7 @@ func (privKey *PrivKey) Bytes() []byte { // If these conditions aren't met, Sign will panic or produce an // incorrect signature. func (privKey *PrivKey) Sign(msg []byte) ([]byte, error) { - return ed25519.Sign(ed25519.PrivateKey(privKey.Key), msg), nil + return ed25519.Sign(privKey.Key, msg), nil } // PubKey gets the corresponding public key from the private key. @@ -171,7 +171,7 @@ func (pubKey *PubKey) VerifySignature(msg []byte, sig []byte) bool { return false } - return ed25519.Verify(ed25519.PublicKey(pubKey.Key), msg, sig) + return ed25519.Verify(pubKey.Key, msg, sig) } func (pubKey *PubKey) String() string { diff --git a/crypto/keys/ed25519/ed25519_test.go b/crypto/keys/ed25519/ed25519_test.go index f2c3d7ba38..6b2ad36dc4 100644 --- a/crypto/keys/ed25519/ed25519_test.go +++ b/crypto/keys/ed25519/ed25519_test.go @@ -1,6 +1,7 @@ package ed25519_test import ( + stded25519 "crypto/ed25519" "encoding/base64" "testing" @@ -11,7 +12,7 @@ import ( "github.com/tendermint/tendermint/crypto/sr25519" "github.com/cosmos/cosmos-sdk/codec" - "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" + ed25519 "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" ) @@ -19,17 +20,28 @@ func TestSignAndValidateEd25519(t *testing.T) { privKey := ed25519.GenPrivKey() pubKey := privKey.PubKey() - msg := crypto.CRandBytes(128) + msg := crypto.CRandBytes(1000) sig, err := privKey.Sign(msg) require.Nil(t, err) // Test the signature assert.True(t, pubKey.VerifySignature(msg, sig)) + // ---- + // Test cross packages verification + stdPrivKey := stded25519.PrivateKey(privKey.Key) + stdPubKey := stdPrivKey.Public().(stded25519.PublicKey) + + assert.Equal(t, stdPubKey, pubKey.(*ed25519.PubKey).Key) + assert.Equal(t, stdPrivKey, privKey.Key) + assert.True(t, stded25519.Verify(stdPubKey, msg, sig)) + sig2 := stded25519.Sign(stdPrivKey, msg) + assert.True(t, pubKey.VerifySignature(msg, sig2)) + + // ---- // Mutate the signature, just one bit. // TODO: Replace this with a much better fuzzer, tendermint/ed25519/issues/10 sig[7] ^= byte(0x01) - assert.False(t, pubKey.VerifySignature(msg, sig)) } diff --git a/crypto/keys/ed25519/keys.pb.go b/crypto/keys/ed25519/keys.pb.go index 2951e0ae28..848dca4f47 100644 --- a/crypto/keys/ed25519/keys.pb.go +++ b/crypto/keys/ed25519/keys.pb.go @@ -4,6 +4,7 @@ package ed25519 import ( + crypto_ed25519 "crypto/ed25519" fmt "fmt" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" @@ -29,7 +30,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // the x-coordinate. Otherwise the first byte is a 0x03. // This prefix is followed with the x-coordinate. type PubKey struct { - Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + Key crypto_ed25519.PublicKey `protobuf:"bytes,1,opt,name=key,proto3,casttype=crypto/ed25519.PublicKey" json:"key,omitempty"` } func (m *PubKey) Reset() { *m = PubKey{} } @@ -64,7 +65,7 @@ func (m *PubKey) XXX_DiscardUnknown() { var xxx_messageInfo_PubKey proto.InternalMessageInfo -func (m *PubKey) GetKey() []byte { +func (m *PubKey) GetKey() crypto_ed25519.PublicKey { if m != nil { return m.Key } @@ -73,7 +74,7 @@ func (m *PubKey) GetKey() []byte { // PrivKey defines a ed25519 private key. type PrivKey struct { - Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + Key crypto_ed25519.PrivateKey `protobuf:"bytes,1,opt,name=key,proto3,casttype=crypto/ed25519.PrivateKey" json:"key,omitempty"` } func (m *PrivKey) Reset() { *m = PrivKey{} } @@ -109,7 +110,7 @@ func (m *PrivKey) XXX_DiscardUnknown() { var xxx_messageInfo_PrivKey proto.InternalMessageInfo -func (m *PrivKey) GetKey() []byte { +func (m *PrivKey) GetKey() crypto_ed25519.PrivateKey { if m != nil { return m.Key } @@ -124,19 +125,21 @@ func init() { func init() { proto.RegisterFile("cosmos/crypto/ed25519/keys.proto", fileDescriptor_48fe3336771e732d) } var fileDescriptor_48fe3336771e732d = []byte{ - // 183 bytes of a gzipped FileDescriptorProto + // 221 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x48, 0xce, 0x2f, 0xce, 0xcd, 0x2f, 0xd6, 0x4f, 0x2e, 0xaa, 0x2c, 0x28, 0xc9, 0xd7, 0x4f, 0x4d, 0x31, 0x32, 0x35, 0x35, 0xb4, 0xd4, 0xcf, 0x4e, 0xad, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x85, 0xa8, 0xd0, 0x83, 0xa8, 0xd0, 0x83, 0xaa, 0x90, 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0xab, 0xd0, 0x07, - 0xb1, 0x20, 0x8a, 0x95, 0x14, 0xb8, 0xd8, 0x02, 0x4a, 0x93, 0xbc, 0x53, 0x2b, 0x85, 0x04, 0xb8, - 0x98, 0xb3, 0x53, 0x2b, 0x25, 0x18, 0x15, 0x18, 0x35, 0x78, 0x82, 0x40, 0x4c, 0x2b, 0x96, 0x19, - 0x0b, 0xe4, 0x19, 0x94, 0xa4, 0xb9, 0xd8, 0x03, 0x8a, 0x32, 0xcb, 0xb0, 0x2a, 0x71, 0xf2, 0x3a, - 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0x27, 0x3c, 0x96, 0x63, - 0xb8, 0xf0, 0x58, 0x8e, 0xe1, 0xc6, 0x63, 0x39, 0x86, 0x28, 0x83, 0xf4, 0xcc, 0x92, 0x8c, 0xd2, - 0x24, 0xbd, 0xe4, 0xfc, 0x5c, 0x7d, 0x98, 0x93, 0xc1, 0x94, 0x6e, 0x71, 0x4a, 0x36, 0xcc, 0xf5, - 0x20, 0x57, 0xc3, 0xbc, 0x90, 0xc4, 0x06, 0x76, 0x91, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0xcc, - 0xf3, 0x11, 0x99, 0xe2, 0x00, 0x00, 0x00, + 0xb1, 0x20, 0x8a, 0x95, 0xec, 0xb8, 0xd8, 0x02, 0x4a, 0x93, 0xbc, 0x53, 0x2b, 0x85, 0xf4, 0xb8, + 0x98, 0xb3, 0x53, 0x2b, 0x25, 0x18, 0x15, 0x18, 0x35, 0x78, 0x9c, 0x64, 0x7e, 0xdd, 0x93, 0x97, + 0x40, 0xb5, 0x42, 0x2f, 0xa0, 0x34, 0x29, 0x27, 0x33, 0xd9, 0x3b, 0xb5, 0x32, 0x08, 0xa4, 0xd0, + 0x8a, 0x65, 0xc6, 0x02, 0x79, 0x06, 0x25, 0x2b, 0x2e, 0xf6, 0x80, 0xa2, 0xcc, 0x32, 0x90, 0x01, + 0xfa, 0xc8, 0x06, 0xc8, 0xfe, 0xba, 0x27, 0x2f, 0x89, 0x6e, 0x40, 0x51, 0x66, 0x59, 0x62, 0x49, + 0x2a, 0xcc, 0x04, 0x27, 0xaf, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, + 0x8e, 0x71, 0xc2, 0x63, 0x39, 0x86, 0x0b, 0x8f, 0xe5, 0x18, 0x6e, 0x3c, 0x96, 0x63, 0x88, 0x32, + 0x48, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x87, 0xf9, 0x17, 0x4c, 0xe9, + 0x16, 0xa7, 0x64, 0xc3, 0xbc, 0x0e, 0xf2, 0x32, 0xcc, 0xec, 0x24, 0x36, 0xb0, 0x77, 0x8c, 0x01, + 0x01, 0x00, 0x00, 0xff, 0xff, 0xb0, 0xd8, 0x01, 0xc0, 0x1f, 0x01, 0x00, 0x00, } func (m *PubKey) Marshal() (dAtA []byte, err error) { diff --git a/crypto/keys/secp256k1/secp256k1.go b/crypto/keys/secp256k1/secp256k1.go index 32dbc9fbe9..77d546812c 100644 --- a/crypto/keys/secp256k1/secp256k1.go +++ b/crypto/keys/secp256k1/secp256k1.go @@ -9,13 +9,12 @@ import ( "math/big" secp256k1 "github.com/btcsuite/btcd/btcec" + "github.com/tendermint/tendermint/crypto" "golang.org/x/crypto/ripemd160" // nolint: staticcheck // necessary for Bitcoin address format "github.com/cosmos/cosmos-sdk/codec" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/types/errors" - - "github.com/tendermint/tendermint/crypto" ) var _ cryptotypes.PrivKey = &PrivKey{} diff --git a/crypto/keys/secp256k1/secp256k1_cgo.go b/crypto/keys/secp256k1/secp256k1_cgo.go index 0c028c6875..42088483d3 100644 --- a/crypto/keys/secp256k1/secp256k1_cgo.go +++ b/crypto/keys/secp256k1/secp256k1_cgo.go @@ -19,6 +19,8 @@ func (privKey *PrivKey) Sign(msg []byte) ([]byte, error) { return rs, nil } +// VerifySignature validates the signature. +// The msg will be hashed prior to signature verification. func (pubKey *PrivKey) VerifySignature(msg []byte, sig []byte) bool { return secp256k1.VerifySignature(pubKey.Key, crypto.Sha256(msg), sig) } diff --git a/crypto/keys/secp256k1/secp256k1_internal_test.go b/crypto/keys/secp256k1/secp256k1_internal_test.go index 3103413f84..a2c8e73bcb 100644 --- a/crypto/keys/secp256k1/secp256k1_internal_test.go +++ b/crypto/keys/secp256k1/secp256k1_internal_test.go @@ -5,9 +5,8 @@ import ( "math/big" "testing" + btcSecp256k1 "github.com/btcsuite/btcd/btcec" "github.com/stretchr/testify/require" - - underlyingSecp256k1 "github.com/btcsuite/btcd/btcec" ) func Test_genPrivKey(t *testing.T) { @@ -25,7 +24,7 @@ func Test_genPrivKey(t *testing.T) { shouldPanic bool }{ {"empty bytes (panics because 1st 32 bytes are zero and 0 is not a valid field element)", empty, true}, - {"curve order: N", underlyingSecp256k1.S256().N.Bytes(), true}, + {"curve order: N", btcSecp256k1.S256().N.Bytes(), true}, {"valid because 0 < 1 < N", validOne, false}, } for _, tt := range tests { @@ -39,7 +38,7 @@ func Test_genPrivKey(t *testing.T) { } got := genPrivKey(bytes.NewReader(tt.notSoRand)) fe := new(big.Int).SetBytes(got[:]) - require.True(t, fe.Cmp(underlyingSecp256k1.S256().N) < 0) + require.True(t, fe.Cmp(btcSecp256k1.S256().N) < 0) require.True(t, fe.Sign() > 0) }) } diff --git a/crypto/keys/secp256k1/secp256k1_test.go b/crypto/keys/secp256k1/secp256k1_test.go index e4ac581119..0133d68509 100644 --- a/crypto/keys/secp256k1/secp256k1_test.go +++ b/crypto/keys/secp256k1/secp256k1_test.go @@ -1,20 +1,19 @@ package secp256k1_test import ( + "crypto/ecdsa" "encoding/base64" "encoding/hex" "math/big" "testing" + btcSecp256k1 "github.com/btcsuite/btcd/btcec" "github.com/btcsuite/btcutil/base58" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/tendermint/tendermint/crypto" "github.com/tendermint/tendermint/crypto/sr25519" - underlyingSecp256k1 "github.com/btcsuite/btcd/btcec" - "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" @@ -41,7 +40,7 @@ func TestPubKeySecp256k1Address(t *testing.T) { addrBbz, _, _ := base58.CheckDecode(d.addr) addrB := crypto.Address(addrBbz) - var priv secp256k1.PrivKey = secp256k1.PrivKey{Key: privB} + var priv = secp256k1.PrivKey{Key: privB} pubKey := priv.PubKey() pubT, _ := pubKey.(*secp256k1.PubKey) @@ -56,15 +55,34 @@ func TestSignAndValidateSecp256k1(t *testing.T) { privKey := secp256k1.GenPrivKey() pubKey := privKey.PubKey() - msg := crypto.CRandBytes(128) + msg := crypto.CRandBytes(1000) sig, err := privKey.Sign(msg) require.Nil(t, err) - assert.True(t, pubKey.VerifySignature(msg, sig)) + // ---- + // Test cross packages verification + msgHash := crypto.Sha256(msg) + btcPrivKey, btcPubKey := btcSecp256k1.PrivKeyFromBytes(btcSecp256k1.S256(), privKey.Key) + // This fails: malformed signature: no header magic + // btcSig, err := secp256k1.ParseSignature(sig, secp256k1.S256()) + // require.NoError(t, err) + // assert.True(t, btcSig.Verify(msgHash, btcPubKey)) + // So we do a hacky way: + r := new(big.Int) + s := new(big.Int) + r.SetBytes(sig[:32]) + s.SetBytes(sig[32:]) + ok := ecdsa.Verify(btcPubKey.ToECDSA(), msgHash, r, s) + require.True(t, ok) + + sig2, err := btcPrivKey.Sign(msgHash) + require.NoError(t, err) + pubKey.VerifySignature(msg, sig2.Serialize()) + + // ---- // Mutate the signature, just one bit. sig[3] ^= byte(0x01) - assert.False(t, pubKey.VerifySignature(msg, sig)) } @@ -79,7 +97,7 @@ func TestSecp256k1LoadPrivkeyAndSerializeIsIdentity(t *testing.T) { // This function creates a private and public key in the underlying libraries format. // The private key is basically calling new(big.Int).SetBytes(pk), which removes leading zero bytes - priv, _ := underlyingSecp256k1.PrivKeyFromBytes(underlyingSecp256k1.S256(), privKeyBytes[:]) + priv, _ := btcSecp256k1.PrivKeyFromBytes(btcSecp256k1.S256(), privKeyBytes[:]) // this takes the bytes returned by `(big int).Bytes()`, and if the length is less than 32 bytes, // pads the bytes from the left with zero bytes. Therefore these two functions composed // result in the identity function on privKeyBytes, hence the following equality check @@ -91,7 +109,7 @@ func TestSecp256k1LoadPrivkeyAndSerializeIsIdentity(t *testing.T) { func TestGenPrivKeyFromSecret(t *testing.T) { // curve oder N - N := underlyingSecp256k1.S256().N + N := btcSecp256k1.S256().N tests := []struct { name string secret []byte diff --git a/proto/cosmos/crypto/ed25519/keys.proto b/proto/cosmos/crypto/ed25519/keys.proto index abf6f98d8e..3f667a0b21 100644 --- a/proto/cosmos/crypto/ed25519/keys.proto +++ b/proto/cosmos/crypto/ed25519/keys.proto @@ -13,10 +13,10 @@ option go_package = "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519"; message PubKey { option (gogoproto.goproto_stringer) = false; - bytes key = 1; + bytes key = 1 [(gogoproto.casttype) = "crypto/ed25519.PublicKey"]; } // PrivKey defines a ed25519 private key. message PrivKey { - bytes key = 1; + bytes key = 1 [(gogoproto.casttype) = "crypto/ed25519.PrivateKey"]; } diff --git a/x/staking/types/staking.pb.go b/x/staking/types/staking.pb.go index 554851aa3a..60d666c682 100644 --- a/x/staking/types/staking.pb.go +++ b/x/staking/types/staking.pb.go @@ -1216,605 +1216,605 @@ func (this *Pool) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_ func StakingDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} var gzipped = []byte{ - // 9558 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x7d, 0x6d, 0x70, 0x24, 0xd7, - 0x71, 0xd8, 0xcd, 0x7e, 0x00, 0xbb, 0x8d, 0x05, 0xb0, 0x78, 0xc0, 0xdd, 0xed, 0x2d, 0x8f, 0x00, - 0x38, 0xfc, 0x3a, 0x1e, 0x49, 0x80, 0x3c, 0xf2, 0x8e, 0xc7, 0x3d, 0x89, 0x34, 0x16, 0xbb, 0x87, - 0x03, 0x0f, 0x5f, 0x1c, 0x00, 0x47, 0x7d, 0x39, 0x5b, 0x83, 0xdd, 0x87, 0xc5, 0x10, 0xbb, 0x33, - 0xc3, 0x99, 0xd9, 0x3b, 0x80, 0x92, 0xaa, 0x68, 0x49, 0x51, 0xa4, 0x73, 0x1c, 0x49, 0x96, 0xcb, - 0x91, 0x28, 0x9d, 0x22, 0x59, 0x4e, 0xe4, 0xc8, 0x4a, 0xfc, 0x21, 0x45, 0x89, 0x93, 0x54, 0x45, - 0x4e, 0xc5, 0xb1, 0xa4, 0x54, 0x5c, 0x52, 0xc5, 0x95, 0x38, 0xae, 0xf8, 0xec, 0x50, 0x2a, 0x87, - 0x51, 0x94, 0x58, 0x3e, 0xcb, 0x89, 0x53, 0xfa, 0x91, 0xd4, 0xfb, 0x9a, 0xaf, 0xfd, 0x98, 0x05, - 0x74, 0x27, 0xca, 0x71, 0x7e, 0x61, 0x5f, 0x4f, 0x77, 0xbf, 0xee, 0x7e, 0xfd, 0xfa, 0xf5, 0xeb, - 0x79, 0x6f, 0x00, 0x9f, 0xb8, 0x00, 0xd3, 0x75, 0xc3, 0xa8, 0x37, 0xf0, 0xac, 0x69, 0x19, 0x8e, - 0xb1, 0xd5, 0xda, 0x9e, 0xad, 0x61, 0xbb, 0x6a, 0x69, 0xa6, 0x63, 0x58, 0x33, 0x14, 0x86, 0x46, - 0x19, 0xc6, 0x8c, 0xc0, 0x90, 0x97, 0x61, 0xec, 0xa2, 0xd6, 0xc0, 0x25, 0x17, 0x71, 0x1d, 0x3b, - 0xe8, 0x3c, 0x24, 0xb6, 0xb5, 0x06, 0xce, 0x49, 0xd3, 0xf1, 0x53, 0x43, 0x67, 0xee, 0x9b, 0x09, - 0x11, 0xcd, 0x04, 0x29, 0xd6, 0x08, 0x58, 0xa1, 0x14, 0xf2, 0xb7, 0x13, 0x30, 0xde, 0xe1, 0x29, - 0x42, 0x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, 0x0e, 0xdd, 0x05, 0x69, 0xf2, 0x97, 0xf9, 0xc6, 0x00, - 0x95, 0x39, 0x45, 0x00, 0xc4, 0x2f, 0x50, 0x1e, 0x52, 0x74, 0x9a, 0xd4, 0xb0, 0x58, 0xda, 0xdc, - 0x36, 0x71, 0xac, 0x1a, 0xde, 0x56, 0x5b, 0x0d, 0xa7, 0x72, 0x55, 0x6d, 0xb4, 0x30, 0x75, 0xf8, - 0xb4, 0x92, 0xe1, 0xc0, 0x2b, 0x04, 0x86, 0xa6, 0x60, 0x88, 0xcd, 0x2a, 0x4d, 0xaf, 0xe1, 0x3d, - 0x1a, 0x3d, 0x93, 0x0a, 0x9b, 0x68, 0x8b, 0x04, 0x42, 0xba, 0x7f, 0xd1, 0x36, 0x74, 0xe1, 0x9a, - 0xb4, 0x0b, 0x02, 0xa0, 0xdd, 0x3f, 0x15, 0x0e, 0xdc, 0x77, 0x77, 0x56, 0x2f, 0xec, 0x53, 0xf2, - 0x97, 0x63, 0x90, 0xa0, 0xf1, 0x62, 0x14, 0x86, 0x36, 0xde, 0xba, 0x56, 0xae, 0x94, 0x56, 0x37, - 0x8b, 0x4b, 0xe5, 0xac, 0x84, 0x46, 0x00, 0x28, 0xe0, 0xe2, 0xd2, 0xea, 0xdc, 0x46, 0x36, 0xe6, - 0xb6, 0x17, 0x57, 0x36, 0xce, 0x3d, 0x99, 0x8d, 0xbb, 0x04, 0x9b, 0x0c, 0x90, 0xf0, 0x23, 0x3c, - 0x71, 0x26, 0x9b, 0x44, 0x59, 0xc8, 0x30, 0x06, 0x8b, 0x6f, 0x29, 0x97, 0xce, 0x3d, 0x99, 0x1d, - 0x08, 0x42, 0x9e, 0x38, 0x93, 0x1d, 0x44, 0xc3, 0x90, 0xa6, 0x90, 0xe2, 0xea, 0xea, 0x52, 0x36, - 0xe5, 0xf2, 0x5c, 0xdf, 0x50, 0x16, 0x57, 0x16, 0xb2, 0x69, 0x97, 0xe7, 0x82, 0xb2, 0xba, 0xb9, - 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a, 0x8e, 0xb1, 0xef, 0x95, 0x20, 0xd7, 0xcd, 0x38, 0x11, - 0x91, 0x2e, 0x16, 0x88, 0x74, 0x17, 0xc2, 0x16, 0xbc, 0xa7, 0xfb, 0x20, 0xb4, 0x8d, 0xf5, 0xe7, - 0x24, 0x38, 0xd6, 0x39, 0x53, 0xec, 0x28, 0xc3, 0x33, 0x30, 0xd0, 0xc4, 0xce, 0x8e, 0x21, 0xb2, - 0xa5, 0x07, 0x3a, 0xac, 0xc1, 0xe4, 0x71, 0x78, 0xb0, 0x39, 0x95, 0x7f, 0x11, 0x8f, 0x77, 0x4b, - 0xf7, 0x98, 0x34, 0x6d, 0x92, 0x7e, 0x30, 0x06, 0x47, 0x3b, 0x32, 0xef, 0x28, 0xe8, 0xdd, 0x00, - 0x9a, 0x6e, 0xb6, 0x1c, 0x96, 0x11, 0xb1, 0x00, 0x9b, 0xa6, 0x10, 0x1a, 0xbc, 0x48, 0xf0, 0x6c, - 0x39, 0xee, 0xf3, 0x38, 0x7d, 0x0e, 0x0c, 0x44, 0x11, 0xce, 0x7b, 0x82, 0x26, 0xa8, 0xa0, 0x93, - 0x5d, 0x34, 0x6d, 0x73, 0xcc, 0xc7, 0x20, 0x5b, 0x6d, 0x68, 0x58, 0x77, 0x2a, 0xb6, 0x63, 0x61, - 0xb5, 0xa9, 0xe9, 0x75, 0xba, 0x82, 0xa4, 0x0a, 0xc9, 0x6d, 0xb5, 0x61, 0x63, 0x65, 0x94, 0x3d, - 0x5e, 0x17, 0x4f, 0x09, 0x05, 0x75, 0x20, 0xcb, 0x47, 0x31, 0x10, 0xa0, 0x60, 0x8f, 0x5d, 0x0a, - 0xf9, 0x67, 0xd3, 0x30, 0xe4, 0xcb, 0xab, 0xd1, 0x3d, 0x90, 0x79, 0x51, 0xbd, 0xaa, 0x56, 0xc4, - 0x5e, 0x89, 0x59, 0x62, 0x88, 0xc0, 0xd6, 0xf8, 0x7e, 0xe9, 0x31, 0x98, 0xa0, 0x28, 0x46,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 0x2e, 0x48, 0x37, 0x55, 0xb3, 0x82, 0x75, 0xc7, 0xda, 0xa7, 0x79, 0x77, 0x4a, 0x49, - 0x35, 0x55, 0xb3, 0x4c, 0xda, 0x3f, 0x92, 0xed, 0xcf, 0x73, 0x89, 0x54, 0x2a, 0x9b, 0x7e, 0x2e, - 0x91, 0x4a, 0x67, 0x41, 0x7e, 0x2d, 0x0e, 0x19, 0x7f, 0x1e, 0x4e, 0xb6, 0x35, 0x55, 0xba, 0x64, - 0x49, 0x34, 0xa8, 0xdd, 0xdb, 0x33, 0x6b, 0x9f, 0x99, 0x27, 0x6b, 0x59, 0x61, 0x80, 0x65, 0xc7, - 0x0a, 0xa3, 0x24, 0x79, 0x04, 0x71, 0x36, 0xcc, 0xb2, 0x91, 0x94, 0xc2, 0x5b, 0x68, 0x01, 0x06, - 0x5e, 0xb4, 0x29, 0xef, 0x01, 0xca, 0xfb, 0xbe, 0xde, 0xbc, 0x9f, 0x5b, 0xa7, 0xcc, 0xd3, 0xcf, - 0xad, 0x57, 0x56, 0x56, 0x95, 0xe5, 0xb9, 0x25, 0x85, 0x93, 0xa3, 0x13, 0x90, 0x68, 0xa8, 0x2f, - 0xef, 0x07, 0x57, 0x3d, 0x0a, 0xea, 0x77, 0x10, 0x4e, 0x40, 0xe2, 0x1a, 0x56, 0x77, 0x83, 0x6b, - 0x0d, 0x05, 0xdd, 0xc1, 0xc9, 0x30, 0x0b, 0x49, 0x6a, 0x2f, 0x04, 0xc0, 0x2d, 0x96, 0x3d, 0x82, - 0x52, 0x90, 0x98, 0x5f, 0x55, 0xc8, 0x84, 0xc8, 0x42, 0x86, 0x41, 0x2b, 0x6b, 0x8b, 0xe5, 0xf9, - 0x72, 0x36, 0x26, 0x9f, 0x85, 0x01, 0x66, 0x04, 0x32, 0x59, 0x5c, 0x33, 0x64, 0x8f, 0xf0, 0x26, - 0xe7, 0x21, 0x89, 0xa7, 0x9b, 0xcb, 0xc5, 0xb2, 0x92, 0x8d, 0x05, 0x87, 0x3a, 0x91, 0x4d, 0xca, - 0x36, 0x64, 0xfc, 0x89, 0xf8, 0x8f, 0x66, 0x93, 0xfd, 0x15, 0x09, 0x86, 0x7c, 0x89, 0x35, 0xc9, - 0x88, 0xd4, 0x46, 0xc3, 0xb8, 0x56, 0x51, 0x1b, 0x9a, 0x6a, 0x73, 0xd7, 0x00, 0x0a, 0x9a, 0x23, - 0x90, 0x7e, 0x87, 0xee, 0x47, 0x34, 0x45, 0x92, 0xd9, 0x01, 0xf9, 0x53, 0x12, 0x64, 0xc3, 0x99, - 0x6d, 0x48, 0x4c, 0xe9, 0x8d, 0x14, 0x53, 0xfe, 0xa4, 0x04, 0x23, 0xc1, 0x74, 0x36, 0x24, 0xde, - 0x3d, 0x6f, 0xa8, 0x78, 0x7f, 0x14, 0x83, 0xe1, 0x40, 0x12, 0xdb, 0xaf, 0x74, 0x2f, 0xc1, 0x98, - 0x56, 0xc3, 0x4d, 0xd3, 0x70, 0xb0, 0x5e, 0xdd, 0xaf, 0x34, 0xf0, 0x55, 0xdc, 0xc8, 0xc9, 0x34, - 0x68, 0xcc, 0xf6, 0x4e, 0x93, 0x67, 0x16, 0x3d, 0xba, 0x25, 0x42, 0x56, 0x18, 0x5f, 0x2c, 0x95, - 0x97, 0xd7, 0x56, 0x37, 0xca, 0x2b, 0xf3, 0x6f, 0xad, 0x6c, 0xae, 0x5c, 0x5e, 0x59, 0x7d, 0x61, - 0x45, 0xc9, 0x6a, 0x21, 0xb4, 0x3b, 0x38, 0xed, 0xd7, 0x20, 0x1b, 0x16, 0x0a, 0x1d, 0x87, 0x4e, - 0x62, 0x65, 0x8f, 0xa0, 0x71, 0x18, 0x5d, 0x59, 0xad, 0xac, 0x2f, 0x96, 0xca, 0x95, 0xf2, 0xc5, - 0x8b, 0xe5, 0xf9, 0x8d, 0x75, 0x56, 0xf8, 0x70, 0xb1, 0x37, 0x02, 0x13, 0x5c, 0x7e, 0x35, 0x0e, - 0xe3, 0x1d, 0x24, 0x41, 0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 0x1c, 0x5f, 0x71, 0x29, - 0xf3, 0xbf, 0x23, 0x41, 0x4a, 0x80, 0xd1, 0x31, 0x48, 0x98, 0xaa, 0xb3, 0x43, 0xd9, 0x25, 0x8b, - 0xb1, 0xac, 0xa4, 0xd0, 0x36, 0x81, 0xdb, 0xa6, 0xaa, 0x53, 0x17, 0xe0, 0x70, 0xd2, 0x26, 0xe3, - 0xda, 0xc0, 0x6a, 0x8d, 0xee, 0x7a, 0x8c, 0x66, 0x13, 0xeb, 0x8e, 0x2d, 0xc6, 0x95, 0xc3, 0xe7, - 0x39, 0x18, 0x3d, 0x0c, 0x63, 0x8e, 0xa5, 0x6a, 0x8d, 0x00, 0x6e, 0x82, 0xe2, 0x66, 0xc5, 0x03, - 0x17, 0xb9, 0x00, 0x27, 0x04, 0xdf, 0x1a, 0x76, 0xd4, 0xea, 0x0e, 0xae, 0x79, 0x44, 0x03, 0xb4, - 0xba, 0x71, 0x9c, 0x23, 0x94, 0xf8, 0x73, 0x41, 0x2b, 0x7f, 0x53, 0x82, 0x31, 0xb1, 0x4f, 0xab, - 0xb9, 0xc6, 0x5a, 0x06, 0x50, 0x75, 0xdd, 0x70, 0xfc, 0xe6, 0x6a, 0x77, 0xe5, 0x36, 0xba, 0x99, - 0x39, 0x97, 0x48, 0xf1, 0x31, 0xc8, 0x37, 0x01, 0xbc, 0x27, 0x5d, 0xcd, 0x36, 0x05, 0x43, 0xfc, - 0xcd, 0x11, 0x7d, 0xfd, 0xc8, 0x76, 0xf6, 0xc0, 0x40, 0x64, 0x43, 0x87, 0x26, 0x20, 0xb9, 0x85, - 0xeb, 0x9a, 0xce, 0xeb, 0xc1, 0xac, 0x21, 0xea, 0x2f, 0x09, 0xb7, 0xfe, 0x52, 0xfc, 0x90, 0x04, - 0xe3, 0x55, 0xa3, 0x19, 0x96, 0xb7, 0x98, 0x0d, 0x95, 0x17, 0xec, 0x4b, 0xd2, 0xdb, 0x9e, 0xa9, - 0x6b, 0xce, 0x4e, 0x6b,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 0x8d, 0x73, 0x16, 0x11, 0xdf, 0xcd, 0x78, 0xed, 0x65, 0xd5, 0x24, 0xcc, - 0xdf, 0x02, 0x39, 0xc1, 0xbc, 0xa5, 0x5b, 0xb8, 0x6a, 0xd4, 0x75, 0xed, 0x65, 0x5c, 0xeb, 0x83, - 0xf5, 0xaf, 0x87, 0x86, 0x6a, 0xd3, 0x47, 0x4e, 0x38, 0x2f, 0x42, 0xd6, 0xcd, 0x55, 0x2a, 0x5a, - 0xd3, 0x34, 0x2c, 0x27, 0x82, 0xe3, 0x17, 0xc5, 0x48, 0xb9, 0x74, 0x8b, 0x94, 0xac, 0x50, 0x86, - 0x11, 0xda, 0xec, 0xd7, 0x25, 0xbf, 0xc4, 0x19, 0x0d, 0x7b, 0x54, 0x3c, 0x70, 0x54, 0x8d, 0xa6, - 0xa9, 0x5a, 0xfd, 0xc4, 0xbf, 0x7f, 0x24, 0x02, 0x07, 0x27, 0xe1, 0x81, 0xc3, 0xd9, 0x37, 0x31, - 0x59, 0xed, 0xfb, 0xe0, 0xf0, 0x65, 0x11, 0x38, 0x04, 0x0d, 0x67, 0x21, 0x12, 0x86, 0x3e, 0x58, - 0xfc, 0x63, 0xc1, 0x42, 0xd0, 0x10, 0x16, 0xcf, 0x7b, 0x0b, 0xad, 0x85, 0xeb, 0x9a, 0xed, 0x58, - 0x2c, 0x4d, 0xee, 0xcd, 0xea, 0x9f, 0x7c, 0x37, 0x98, 0x84, 0x29, 0x3e, 0x52, 0x12, 0x89, 0x78, - 0xd9, 0x95, 0xee, 0xa2, 0xa2, 0x05, 0xfb, 0x0d, 0x11, 0x89, 0x7c, 0x64, 0x44, 0x36, 0x5f, 0x86, - 0x48, 0xcc, 0x5e, 0x25, 0x7b, 0x87, 0x3e, 0xd8, 0xfd, 0xd3, 0x90, 0x70, 0xeb, 0x82, 0x96, 0xf0, - 0xf4, 0xe5, 0x3f, 0x2d, 0x7d, 0x17, 0xef, 0xf7, 0xe5, 0x9d, 0xff, 0x2c, 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x3b, 0x58, 0xab, 0xef, 0x38, 0x7c, - 0x86, 0xf1, 0x16, 0x3a, 0x0f, 0x09, 0xe2, 0x10, 0xfc, 0xe6, 0x56, 0xbe, 0x6d, 0x6f, 0xe1, 0x6e, - 0xf0, 0x8a, 0x29, 0xd2, 0xf1, 0x87, 0xff, 0x70, 0x4a, 0x52, 0x28, 0x05, 0x9a, 0x87, 0xe1, 0x86, - 0x6a, 0x3b, 0x15, 0xba, 0x42, 0x91, 0xee, 0x93, 0x94, 0xc5, 0x89, 0x76, 0x83, 0x70, 0xc3, 0x72, - 0xd1, 0x87, 0x08, 0x15, 0x03, 0xd5, 0xd0, 0x29, 0xc8, 0x52, 0x26, 0x55, 0xa3, 0xd9, 0xd4, 0x1c, - 0x96, 0x3b, 0x0d, 0x50, 0xbb, 0x8f, 0x10, 0xf8, 0x3c, 0x05, 0xd3, 0x0c, 0xea, 0x2e, 0x48, 0xd3, - 0xab, 0x22, 0x14, 0x85, 0x1d, 0x8b, 0x4c, 0x11, 0x00, 0x7d, 0xf8, 0x20, 0x8c, 0x7a, 0xf1, 0x91, - 0xa1, 0xa4, 0x18, 0x17, 0x0f, 0x4c, 0x11, 0x1f, 0x83, 0x09, 0x1d, 0xef, 0xd1, 0x83, 0x9a, 0x01, - 0xec, 0x34, 0xc5, 0x46, 0xe4, 0xd9, 0x95, 0x20, 0xc5, 0xfd, 0x30, 0x52, 0x15, 0xc6, 0x67, 0xb8, - 0x40, 0x71, 0x87, 0x5d, 0x28, 0x45, 0x3b, 0x01, 0x29, 0xd5, 0x34, 0x19, 0xc2, 0x10, 0x8f, 0x8f, - 0xa6, 0x49, 0x1f, 0x9d, 0x86, 0x31, 0xaa, 0xa3, 0x85, 0xed, 0x56, 0xc3, 0xe1, 0x4c, 0x32, 0x14, - 0x67, 0x94, 0x3c, 0x50, 0x18, 0x9c, 0xe2, 0xde, 0x0b, 0xc3, 0xf8, 0xaa, 0x56, 0xc3, 0x7a, 0x15, - 0x33, 0xbc, 0x61,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 0xa4, 0x69, 0xef, 0x3b, 0xa4, 0x13, 0x90, 0xf4, 0x7f, 0xa9, - 0x93, 0x35, 0xbc, 0x3a, 0xc5, 0xed, 0x9e, 0xf3, 0xff, 0x37, 0x00, 0x00, 0xff, 0xff, 0x43, 0x89, - 0xb3, 0x44, 0x22, 0x94, 0x00, 0x00, + // 9556 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x7d, 0x6b, 0x70, 0x1c, 0xc9, + 0x79, 0x18, 0x67, 0x77, 0x01, 0xec, 0x7e, 0x58, 0x00, 0x8b, 0x06, 0x48, 0x2e, 0xf7, 0x78, 0x00, + 0x6e, 0xee, 0xc5, 0xe3, 0xdd, 0x01, 0x77, 0xbc, 0x23, 0x8f, 0x5c, 0x4a, 0x77, 0xc6, 0x02, 0x4b, + 0x10, 0x24, 0x5e, 0x37, 0x00, 0x78, 0x7a, 0x39, 0x5b, 0x83, 0xd9, 0xc6, 0x62, 0x0e, 0xbb, 0x33, + 0x73, 0x33, 0xb3, 0x24, 0x71, 0x92, 0xaa, 0xce, 0x92, 0xa2, 0x48, 0x74, 0x1c, 0x49, 0x96, 0xcb, + 0x91, 0x4e, 0xa2, 0x22, 0x59, 0x4e, 0xe4, 0xc8, 0x4a, 0xfc, 0x90, 0xa2, 0xc4, 0x49, 0xaa, 0x22, + 0xa7, 0xe2, 0x58, 0x52, 0x2a, 0x2e, 0xa9, 0xe2, 0x4a, 0x1c, 0x57, 0x4c, 0x3b, 0x27, 0x95, 0x73, + 0x51, 0x94, 0x58, 0xa6, 0xe5, 0xc4, 0x29, 0xfd, 0x48, 0xaa, 0x5f, 0xf3, 0xda, 0xc7, 0x2c, 0x20, + 0x52, 0x27, 0xc7, 0xf9, 0x85, 0x9d, 0xee, 0xef, 0xfb, 0xfa, 0x7b, 0xf5, 0xf7, 0x7d, 0xdd, 0xd3, + 0x3d, 0x80, 0x4f, 0x9c, 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, 0x10, + 0x5e, 0xc6, 0xfb, 0xbb, 0x59, 0x59, 0x65, 0x90, 0xb5, 0x31, 0x90, 0x87, 0x61, 0x44, 0xad, 0xd5, + 0x6c, 0x42, 0x5c, 0x10, 0x62, 0x0b, 0x93, 0x61, 0xaf, 0x99, 0x02, 0x16, 0x2e, 0x41, 0x5a, 0xe8, + 0x81, 0xa4, 0x6a, 0xa2, 0x89, 0x8a, 0xc5, 0x56, 0xdb, 0x89, 0x13, 0x19, 0x25, 0x6d, 0x88, 0xce, + 0xfb, 0x20, 0xab, 0x3b, 0x15, 0x7f, 0x73, 0x3e, 0x31, 0x95, 0x38, 0x91, 0x56, 0x06, 0x75, 0xc7, + 0xdb, 0xd8, 0x94, 0x3f, 0x97, 0x80, 0xe1, 0xf0, 0xcb, 0x05, 0x34, 0x0f, 0xe9, 0xba, 0xa9, 0xa9, + 0xd4, 0xb5, 0xd8, 0x9b, 0xad, 0x13, 0x31, 0xef, 0x23, 0xa6, 0x97, 0x38, 0xbc, 0xe2, 0x61, 0x16, + 0x7e, 0x47, 0x82, 0xb4, 0x68, 0x46, 0x47, 0x20, 0x65, 0xa9, 0xee, 0x0e, 0x25, 0xd7, 0x57, 0x4a, + 0xe4, 0x24, 0x85, 0x3e, 0x93, 0x76, 0xc7, 0x52, 0x0d, 0xea, 0x02, 0xbc, 0x9d, 0x3c, 0x13, 0xbb, + 0xd6, 0xb1, 0x5a, 0xa5, 0xab, 0x1e, 0xb3, 0xd1, 0xc0, 0x86, 0xeb, 0x08, 0xbb, 0xf2, 0xf6, 0x39, + 0xde, 0x8c, 0x1e, 0x85, 0x51, 0xd7, 0x56, 0xf5, 0x7a, 0x08, 0x36, 0x45, 0x61, 0x73, 0xa2, 0xc3, + 0x03, 0x2e, 0xc2, 0x31, 0x41, 0xb7, 0x8a, 0x5d, 0x55, 0xdb, 0xc1, 0x55, 0x1f, 0xa9, 0x9f, 0xee, + 0x6e, 0x1c, 0xe5, 0x00, 0xf3, 0xbc, 0x5f,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xa9, 0x16, 0x10, 0xb9, 0x75, 0x59, 0x1b, 0x11, 0xb3, 0x0c, 0x03, 0x8c, 0x5b, 0x07, 0x15, + 0xa1, 0xcf, 0x22, 0x3f, 0xf8, 0x8b, 0x81, 0x89, 0x8e, 0xce, 0x4b, 0xe1, 0xbd, 0x8d, 0x4c, 0x82, + 0x22, 0x7f, 0x24, 0x01, 0x30, 0x7f, 0xe5, 0xca, 0x86, 0xad, 0x5b, 0x75, 0xec, 0xde, 0x49, 0xc9, + 0x37, 0xe0, 0x70, 0x60, 0x95, 0x64, 0x6b, 0x11, 0xe9, 0xa7, 0x6e, 0xdf, 0x9a, 0x3c, 0x1e, 0x95, + 0x3e, 0x00, 0x26, 0x2b, 0x63, 0xfe, 0x7a, 0xc9, 0xd6, 0xda, 0x52, 0xad, 0x3a, 0xae, 0x47, 0x35, + 0xd9, 0x99, 0x6a, 0x00, 0x2c, 0x48, 0x75, 0xde, 0x71, 0xdb, 0xab, 0x76, 0x1d, 0x06, 0x7d, 0x95, + 0x38, 0x68, 0x1e, 0xd2, 0x2e, 0xff, 0xcd, 0x35, 0x2c, 0x77, 0xd6, 0xb0, 0x40, 0xe3, 0x5a, 0xf6, + 0x30, 0xe5, 0xbf, 0x90, 0x00, 0x7c, 0x9f, 0xfd, 0xf1, 0x74, 0x31, 0x12, 0xca, 0x79, 0xe0, 0x4d, + 0x1e, 0xa8, 0x54, 0xe3, 0xd8, 0x11, 0x7d, 0xfe, 0x74, 0x02, 0xc6, 0x36, 0x45, 0xe4, 0xf9, 0xb1, + 0xd7, 0xc1, 0x1a, 0x0c, 0x60, 0xc3, 0xb5, 0x75, 0xaa, 0x04, 0x62, 0xed, 0x27, 0x3a, 0x59, 0xbb, + 0x8d, 0x4c, 0xf4, 0x63, 0x36, 0x62, 0xd3, 0x9d, 0x93, 0x89, 0x68, 0xe3, 0x43, 0x49, 0xc8, 0x77, + 0xc2, 0x44, 0x73, 0x30, 0xa2, 0xd9, 0x98, 0x36, 0x54, 0x82, 0x3b, 0x7f, 0xa5, 0x82, 0x5f, 0x59, + 0x46, 0x00, 0x64, 0x65, 0x58, 0xb4, 0xf0, 0xec, 0x51, 0x03, 0x52, 0xf6, 0x11, 0xb7, 0x23, 0x50, + 0x3d, 0xd6, 0x79, 0x32, 0x4f, 0x1f, 0x62, 0x90, 0x30, 0x01, 0x96, 0x3f, 0x86, 0xfd, 0x56, 0x9a, + 0x40, 0x5e, 0x82, 0x11, 0xdd, 0xd0, 0x5d, 0x5d, 0xad, 0x57, 0xb6, 0xd4, 0xba, 0x6a, 0x68, 0x07, + 0xa9, 0x9a, 0x59, 0xc8, 0xe7, 0xc3, 0x46, 0xc8, 0xc9, 0xca, 0x30, 0x6f, 0x29, 0xb1, 0x06, 0x74, + 0x11, 0x06, 0xc4, 0x50, 0xa9, 0x03, 0x55, 0x1b, 0x02, 0x3d, 0x50, 0xe0, 0xfd, 0x4c, 0x12, 0x46, + 0x15, 0x5c, 0xfd, 0xff, 0xa6, 0xd8, 0x9f, 0x29, 0x96, 0x01, 0xd8, 0x74, 0x27, 0x01, 0xf6, 0x00, + 0xd6, 0x20, 0x01, 0x23, 0xc3, 0x28, 0xcc, 0x3b, 0x6e, 0xc0, 0x1e, 0xb7, 0x12, 0x90, 0x0d, 0xda, + 0xe3, 0xaf, 0x68, 0x56, 0x42, 0x8b, 0x7e, 0x24, 0x4a, 0xf1, 0x6f, 0x80, 0x76, 0x88, 0x44, 0x2d, + 0xde, 0xdb, 0x3d, 0x04, 0xfd, 0xcf, 0x04, 0xf4, 0xaf, 0xa9, 0xb6, 0xda, 0x70, 0x90, 0xd6, 0x52, + 0x69, 0x8a, 0xed, 0xc7, 0x96, 0x0f, 0x38, 0xf3, 0xdd, 0x8e, 0x98, 0x42, 0xf3, 0x63, 0x6d, 0x0a, + 0xcd, 0x9f, 0x80, 0x61, 0xb2, 0x1c, 0x0e, 0x1c, 0x61, 0x20, 0xda, 0x1e, 0x2a, 0x1d, 0xf3, 0xa9, + 0x84, 0x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 0xcd, 0x3a, 0x17, 0x9b, 0xc2, 0xcb, 0xe3, 0x80, 0x18, 0x31, 0xba, 0x91, + 0x2f, 0x86, 0x58, 0x87, 0xb1, 0x50, 0x2b, 0x1f, 0xe4, 0x87, 0x7a, 0x49, 0x70, 0xea, 0x3b, 0x87, + 0xa1, 0x8f, 0x52, 0x45, 0x1f, 0x97, 0x00, 0x02, 0x6f, 0x84, 0xa7, 0x3b, 0x91, 0x69, 0xbf, 0x26, + 0x2e, 0xcc, 0xf4, 0x0c, 0xcf, 0x6b, 0xb6, 0x93, 0xef, 0xf9, 0x77, 0xdf, 0xfe, 0x68, 0xe2, 0x01, + 0x24, 0xcf, 0x74, 0x58, 0x8d, 0x07, 0xe6, 0xcb, 0xe7, 0x42, 0x77, 0xdf, 0x1f, 0xef, 0x6d, 0x28, + 0xc1, 0xd9, 0x74, 0xaf, 0xe0, 0x9c, 0xb1, 0xf3, 0x94, 0xb1, 0xd3, 0xe8, 0xa9, 0x78, 0xc6, 0x66, + 0xde, 0x19, 0x9e, 0x34, 0xef, 0x46, 0xbf, 0x2b, 0xc1, 0x78, 0xbb, 0x25, 0x1d, 0x3a, 0xdb, 0x1b, + 0x17, 0xad, 0x25, 0x45, 0xe1, 0xdc, 0x01, 0x30, 0xb9, 0x28, 0x0b, 0x54, 0x94, 0x59, 0xf4, 0xdc, + 0x01, 0x44, 0x99, 0x09, 0xee, 0xef, 0xff, 0x6f, 0x09, 0xee, 0xed, 0xba, 0x42, 0x42, 0xb3, 0xbd, + 0x71, 0xd9, 0xa5, 0x76, 0x2a, 0x94, 0x7e, 0x18, 0x12, 0x5c, 0xe2, 0xe7, 0xa9, 0xc4, 0x97, 0xd1, + 0xe2, 0x41, 0x24, 0x6e, 0xfb, 0x12, 0x05, 0xfd, 0x76, 0xf8, 0x64, 0x61, 0x77, 0x77, 0x6a, 0x59, + 0x78, 0xc4, 0x4c, 0x8c, 0xd6, 0xa2, 0x56, 0x7e, 0x0b, 0x15, 0x41, 0x41, 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0xff, 0x9f, + 0xf7, 0xdf, 0x6d, 0x38, 0x1c, 0x92, 0xf4, 0x2e, 0xa9, 0xf4, 0xd4, 0xab, 0x29, 0x48, 0x2e, 0x3b, + 0x35, 0xf4, 0x12, 0x8c, 0x44, 0x8b, 0x86, 0x8e, 0xb5, 0x60, 0x6b, 0x46, 0xe8, 0xbc, 0x5e, 0xeb, + 0x9c, 0x3d, 0xd0, 0x2e, 0x0c, 0x85, 0x33, 0xc7, 0x89, 0x2e, 0x44, 0x42, 0x90, 0x85, 0x27, 0x7a, + 0x85, 0xf4, 0x06, 0x7b, 0x07, 0xa4, 0xbd, 0xa0, 0x77, 0x7f, 0x17, 0x6c, 0x01, 0xd4, 0xb9, 0xba, + 0x6d, 0x13, 0x56, 0x88, 0xf6, 0xa2, 0x21, 0xa5, 0x9b, 0xf6, 0x22, 0xb0, 0x5d, 0xb5, 0xd7, 0x69, + 0x6a, 0x6d, 0x01, 0x04, 0xe6, 0xc1, 0x83, 0x5d, 0x28, 0xf8, 0x60, 0x85, 0xc7, 0x7b, 0x02, 0xf3, + 0x5e, 0x3a, 0xdd, 0xe1, 0x62, 0xfc, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0xa3, 0xcd, 0x83, 0x8b, + 0x22, 0x94, 0x00, 0x00, } r := bytes.NewReader(gzipped) gzipr, err := compress_gzip.NewReader(r) From afb6771726ec3702cb7d4915dde6c51a3135c6dd Mon Sep 17 00:00:00 2001 From: yihuang Date: Wed, 28 Oct 2020 18:41:55 +0800 Subject: [PATCH 004/136] fix inconsistent flag names in upgrade proposal command (#7697) Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- CHANGELOG.md | 1 + x/upgrade/client/cli/tx.go | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2c4e7d1f83..1003e6bd00 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,6 +40,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ * (x/staking) [\#7499](https://github.com/cosmos/cosmos-sdk/pull/7499) `BondStatus` is now a protobuf `enum` instead of an `int32`, and JSON serialized using its protobuf name, so expect names like `BOND_STATUS_UNBONDING` as opposed to `Unbonding`. * (x/evidence) [\#7538](https://github.com/cosmos/cosmos-sdk/pull/7538) The ABCI's `Result.Data` field of `MsgSubmitEvidence` does not contain the raw evidence's hash, but the encoded `MsgSubmitEvidenceResponse` struct. +* (x/upgrade) [#7697](https://github.com/cosmos/cosmos-sdk/pull/7697) Rename flag name "--time" to "--upgrade-time", "--info" to "--upgrade-info", to keep it consistent with help message. ### API Breaking diff --git a/x/upgrade/client/cli/tx.go b/x/upgrade/client/cli/tx.go index 9d8609d232..2a44cd5591 100644 --- a/x/upgrade/client/cli/tx.go +++ b/x/upgrade/client/cli/tx.go @@ -19,8 +19,8 @@ const ( TimeFormat = "2006-01-02T15:04:05Z" FlagUpgradeHeight = "upgrade-height" - FlagUpgradeTime = "time" - FlagUpgradeInfo = "info" + FlagUpgradeTime = "upgrade-time" + FlagUpgradeInfo = "upgrade-info" ) // GetTxCmd returns the transaction commands for this module From c3638adddc1a0e43e3b63f7cf79edee6bcd9b8ee Mon Sep 17 00:00:00 2001 From: Akhil Kumar P <36399231+akhilkumarpilli@users.noreply.github.com> Date: Wed, 28 Oct 2020 16:32:39 +0530 Subject: [PATCH 005/136] init: Implement ADR 032 typed events (#7564) * Add EmitTypedEvent in events * Add parseTypedEvent method * Use jsonpb * Modify unmarshal proto in events * Add a test for typed events * Fix reflect issue in parseTypedEvent * Modify event tests and add comments * Add EmitTypedEvents and refactor other methods * Fix golangci-lint issues * Update ProtoMarshalJSON params * Address PR comments Co-authored-by: anilCSE Co-authored-by: Jack Zampolin Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- types/events.go | 98 ++++++++++++++++++++++++++++++++++++++++++++ types/events_test.go | 34 +++++++++++++++ 2 files changed, 132 insertions(+) diff --git a/types/events.go b/types/events.go index d334d3d60b..44d48d9cd5 100644 --- a/types/events.go +++ b/types/events.go @@ -1,10 +1,15 @@ package types import ( + "encoding/json" "fmt" + "reflect" "sort" "strings" + "github.com/cosmos/cosmos-sdk/codec" + "github.com/gogo/protobuf/jsonpb" + proto "github.com/gogo/protobuf/proto" abci "github.com/tendermint/tendermint/abci/types" ) @@ -25,11 +30,13 @@ func NewEventManager() *EventManager { func (em *EventManager) Events() Events { return em.events } // EmitEvent stores a single Event object. +// Deprecated: Use EmitTypedEvent func (em *EventManager) EmitEvent(event Event) { em.events = em.events.AppendEvent(event) } // EmitEvents stores a series of Event objects. +// Deprecated: Use EmitTypedEvents func (em *EventManager) EmitEvents(events Events) { em.events = em.events.AppendEvents(events) } @@ -39,6 +46,97 @@ func (em EventManager) ABCIEvents() []abci.Event { return em.events.ToABCIEvents() } +// EmitTypedEvent takes typed event and emits converting it into Event +func (em *EventManager) EmitTypedEvent(tev proto.Message) error { + event, err := TypedEventToEvent(tev) + if err != nil { + return err + } + + em.EmitEvent(event) + return nil +} + +// EmitTypedEvents takes series of typed events and emit +func (em *EventManager) EmitTypedEvents(tevs ...proto.Message) error { + events := make(Events, len(tevs)) + for i, tev := range tevs { + res, err := TypedEventToEvent(tev) + if err != nil { + return err + } + events[i] = res + } + + em.EmitEvents(events) + return nil +} + +// TypedEventToEvent takes typed event and converts to Event object +func TypedEventToEvent(tev proto.Message) (Event, error) { + evtType := proto.MessageName(tev) + evtJSON, err := codec.ProtoMarshalJSON(tev, nil) + if err != nil { + return Event{}, err + } + + var attrMap map[string]json.RawMessage + err = json.Unmarshal(evtJSON, &attrMap) + if err != nil { + return Event{}, err + } + + attrs := make([]abci.EventAttribute, 0, len(attrMap)) + for k, v := range attrMap { + attrs = append(attrs, abci.EventAttribute{ + Key: []byte(k), + Value: v, + }) + } + + return Event{ + Type: evtType, + Attributes: attrs, + }, nil +} + +// ParseTypedEvent converts abci.Event back to typed event +func ParseTypedEvent(event abci.Event) (proto.Message, error) { + concreteGoType := proto.MessageType(event.Type) + if concreteGoType == nil { + return nil, fmt.Errorf("failed to retrieve the message of type %q", event.Type) + } + + var value reflect.Value + if concreteGoType.Kind() == reflect.Ptr { + value = reflect.New(concreteGoType.Elem()) + } else { + value = reflect.Zero(concreteGoType) + } + + protoMsg, ok := value.Interface().(proto.Message) + if !ok { + return nil, fmt.Errorf("%q does not implement proto.Message", event.Type) + } + + attrMap := make(map[string]json.RawMessage) + for _, attr := range event.Attributes { + attrMap[string(attr.Key)] = attr.Value + } + + attrBytes, err := json.Marshal(attrMap) + if err != nil { + return nil, err + } + + err = jsonpb.Unmarshal(strings.NewReader(string(attrBytes)), protoMsg) + if err != nil { + return nil, err + } + + return protoMsg, nil +} + // ---------------------------------------------------------------------------- // Events // ---------------------------------------------------------------------------- diff --git a/types/events_test.go b/types/events_test.go index d712e24cd8..7363355fb1 100644 --- a/types/events_test.go +++ b/types/events_test.go @@ -2,11 +2,14 @@ package types_test import ( "encoding/json" + "reflect" "testing" "github.com/stretchr/testify/suite" abci "github.com/tendermint/tendermint/abci/types" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + testdata "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -68,6 +71,37 @@ func (s *eventsTestSuite) TestEventManager() { s.Require().Equal(em.Events(), events.AppendEvent(event)) } +func (s *eventsTestSuite) TestEventManagerTypedEvents() { + em := sdk.NewEventManager() + + coin := sdk.NewCoin("fakedenom", sdk.NewInt(1999999)) + cat := testdata.Cat{ + Moniker: "Garfield", + Lives: 6, + } + animal, err := codectypes.NewAnyWithValue(&cat) + s.Require().NoError(err) + hasAnimal := testdata.HasAnimal{ + X: 1000, + Animal: animal, + } + + s.Require().NoError(em.EmitTypedEvents(&coin)) + s.Require().NoError(em.EmitTypedEvent(&hasAnimal)) + s.Require().Len(em.Events(), 2) + + msg1, err := sdk.ParseTypedEvent(em.Events().ToABCIEvents()[0]) + s.Require().NoError(err) + s.Require().Equal(coin.String(), msg1.String()) + s.Require().Equal(reflect.TypeOf(&coin), reflect.TypeOf(msg1)) + + msg2, err := sdk.ParseTypedEvent(em.Events().ToABCIEvents()[1]) + s.Require().NoError(err) + s.Require().Equal(reflect.TypeOf(&hasAnimal), reflect.TypeOf(msg2)) + response := msg2.(*testdata.HasAnimal) + s.Require().Equal(hasAnimal.Animal.String(), response.Animal.String()) +} + func (s *eventsTestSuite) TestStringifyEvents() { e := sdk.Events{ sdk.NewEvent("message", sdk.NewAttribute("sender", "foo")), From 51ac6f876b2a03bafd4e56c3554486a823cb70f7 Mon Sep 17 00:00:00 2001 From: Anil Kumar Kammari Date: Wed, 28 Oct 2020 17:09:49 +0530 Subject: [PATCH 006/136] Rename RegisterGRPCRoutes (#7696) * Rename * Fix missing Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- docs/basics/app-anatomy.md | 2 +- docs/building-modules/module-interfaces.md | 2 +- docs/building-modules/module-manager.md | 4 +-- server/api/server.go | 4 +-- simapp/app.go | 2 +- tests/mocks/types_module_module.go | 36 +++++++++++----------- types/module/module.go | 8 ++--- x/auth/module.go | 4 +-- x/auth/vesting/module.go | 4 +-- x/bank/module.go | 4 +-- x/capability/module.go | 4 +-- x/crisis/module.go | 4 +-- x/distribution/module.go | 4 +-- x/evidence/module.go | 4 +-- x/genutil/module.go | 4 +-- x/gov/module.go | 4 +-- x/ibc/applications/transfer/module.go | 4 +-- x/ibc/core/module.go | 4 +-- x/ibc/testing/mock/mock.go | 4 +-- x/mint/module.go | 4 +-- x/params/module.go | 4 +-- x/slashing/module.go | 4 +-- x/staking/module.go | 4 +-- x/upgrade/module.go | 4 +-- 24 files changed, 63 insertions(+), 63 deletions(-) diff --git a/docs/basics/app-anatomy.md b/docs/basics/app-anatomy.md index 529ec9b275..68d799e366 100644 --- a/docs/basics/app-anatomy.md +++ b/docs/basics/app-anatomy.md @@ -223,7 +223,7 @@ Generally, the [commands related to a module](../building-modules/module-interfa Each module can expose gRPC endpoints, called [service methods](https://grpc.io/docs/what-is-grpc/core-concepts/#service-definition) and are defined in the [module's Protobuf `query.proto` file](#grpc-query-services). A service method is defined by its name, input arguments and output response. The module then needs to: -- define a `RegisterGRPCRoutes` method on `AppModuleBasic` to wire the client gRPC requests to the correct handler inside the module. +- define a `RegisterGRPCGatewayRoutes` method on `AppModuleBasic` to wire the client gRPC requests to the correct handler inside the module. - for each service method, define a corresponding handler. The handler implements the core logic necessary to serve the gRPC request, and is located in the `keeper/grpc_query.go` file. #### gRPC-gateway REST Endpoints diff --git a/docs/building-modules/module-interfaces.md b/docs/building-modules/module-interfaces.md index 1c8dcdbce2..2acb4ac997 100644 --- a/docs/building-modules/module-interfaces.md +++ b/docs/building-modules/module-interfaces.md @@ -97,7 +97,7 @@ Similarly, there is a `AddQueryFlagsToCmd(cmd *cobra.Command)` to add common fla In addition to providing an ABCI query pathway, modules [custom queries](./messages-and-queries.md#grpc-queries) can provide a GRPC proxy server that routes requests in the GRPC protocol to ABCI query requests under the hood. -In order to do that, module should implement `RegisterGRPCRoutes(clientCtx client.Context, mux *runtime.ServeMux)` on `AppModuleBasic` to wire the client gRPC requests to the correct handler inside the module. +In order to do that, module should implement `RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux)` on `AppModuleBasic` to wire the client gRPC requests to the correct handler inside the module. Here's an example from the `auth` module: diff --git a/docs/building-modules/module-manager.md b/docs/building-modules/module-manager.md index 1c034bde71..7c6ead627b 100644 --- a/docs/building-modules/module-manager.md +++ b/docs/building-modules/module-manager.md @@ -39,7 +39,7 @@ Let us go through the methods: - `DefaultGenesis(codec.JSONMarshaler)`: Returns a default [`GenesisState`](./genesis.md#genesisstate) for the module, marshalled to `json.RawMessage`. The default `GenesisState` need to be defined by the module developer and is primarily used for testing. - `ValidateGenesis(codec.JSONMarshaler, client.TxEncodingConfig, json.RawMessage)`: Used to validate the `GenesisState` defined by a module, given in its `json.RawMessage` form. It will usually unmarshall the `json` before running a custom [`ValidateGenesis`](./genesis.md#validategenesis) function defined by the module developer. - `RegisterRESTRoutes(client.Context, *mux.Router)`: Registers the REST routes for the module. These routes will be used to map REST request to the module in order to process them. See [../interfaces/rest.md] for more. -- `RegisterGRPCRoutes(client.Context, *runtime.ServeMux)`: Registers gRPC routes for the module. +- `RegisterGRPCGatewayRoutes(client.Context, *runtime.ServeMux)`: Registers gRPC routes for the module. - `GetTxCmd()`: Returns the root [`Tx` command](./module-interfaces.md#tx) for the module. The subcommands of this root command are used by end-users to generate new transactions containing [`message`s](./messages-and-queries.md#queries) defined in the module. - `GetQueryCmd()`: Return the root [`query` command](./module-interfaces.md#query) for the module. The subcommands of this root command are used by end-users to generate new queries to the subset of the state defined by the module. @@ -116,7 +116,7 @@ It implements the following methods: - `DefaultGenesis(cdc codec.JSONMarshaler)`: Provides default genesis information for modules in the application by calling the [`DefaultGenesis(cdc codec.JSONMarshaler)`](./genesis.md#defaultgenesis) function of each module. It is used to construct a default genesis file for the application. - `ValidateGenesis(cdc codec.JSONMarshaler, txEncCfg client.TxEncodingConfig, genesis map[string]json.RawMessage)`: Validates the genesis information modules by calling the [`ValidateGenesis(codec.JSONMarshaler, client.TxEncodingConfig, json.RawMessage)`](./genesis.md#validategenesis) function of each module. - `RegisterRESTRoutes(ctx client.Context, rtr *mux.Router)`: Registers REST routes for modules by calling the [`RegisterRESTRoutes`](./module-interfaces.md#register-routes) function of each module. This function is usually called function from the `main.go` function of the [application's command-line interface](../interfaces/cli.md). -- `RegisterGRPCRoutes(clientCtx client.Context, rtr *runtime.ServeMux)`: Registers gRPC routes for modules. +- `RegisterGRPCGatewayRoutes(clientCtx client.Context, rtr *runtime.ServeMux)`: Registers gRPC routes for modules. - `AddTxCommands(rootTxCmd *cobra.Command)`: Adds modules' transaction commands to the application's [`rootTxCommand`](../interfaces/cli.md#transaction-commands). This function is usually called function from the `main.go` function of the [application's command-line interface](../interfaces/cli.md). - `AddQueryCommands(rootQueryCmd *cobra.Command)`: Adds modules' query commands to the application's [`rootQueryCommand`](../interfaces/cli.md#query-commands). This function is usually called function from the `main.go` function of the [application's command-line interface](../interfaces/cli.md). diff --git a/server/api/server.go b/server/api/server.go index 5c037101c6..b73b955566 100644 --- a/server/api/server.go +++ b/server/api/server.go @@ -104,7 +104,7 @@ func (s *Server) Start(cfg config.Config) error { return err } - s.registerGRPCRoutes() + s.registerGRPCGatewayRoutes() s.listener = listener var h http.Handler = s.Router @@ -123,7 +123,7 @@ func (s *Server) Close() error { return s.listener.Close() } -func (s *Server) registerGRPCRoutes() { +func (s *Server) registerGRPCGatewayRoutes() { s.Router.PathPrefix("/").Handler(s.GRPCRouter) } diff --git a/simapp/app.go b/simapp/app.go index 41683dff82..0d1d226d85 100644 --- a/simapp/app.go +++ b/simapp/app.go @@ -547,7 +547,7 @@ func (app *SimApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APICon authrest.RegisterTxRoutes(clientCtx, apiSvr.Router) ModuleBasics.RegisterRESTRoutes(clientCtx, apiSvr.Router) - ModuleBasics.RegisterGRPCRoutes(apiSvr.ClientCtx, apiSvr.GRPCRouter) + ModuleBasics.RegisterGRPCGatewayRoutes(apiSvr.ClientCtx, apiSvr.GRPCRouter) // register swagger API from root so that other applications can override easily if apiConfig.Swagger { diff --git a/tests/mocks/types_module_module.go b/tests/mocks/types_module_module.go index b03b358094..41ded4d7a2 100644 --- a/tests/mocks/types_module_module.go +++ b/tests/mocks/types_module_module.go @@ -120,16 +120,16 @@ func (mr *MockAppModuleBasicMockRecorder) RegisterRESTRoutes(arg0, arg1 interfac return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterRESTRoutes", reflect.TypeOf((*MockAppModuleBasic)(nil).RegisterRESTRoutes), arg0, arg1) } -// RegisterGRPCRoutes mocks base method -func (m *MockAppModuleBasic) RegisterGRPCRoutes(arg0 client.Context, arg1 *runtime.ServeMux) { +// RegisterGRPCGatewayRoutes mocks base method +func (m *MockAppModuleBasic) RegisterGRPCGatewayRoutes(arg0 client.Context, arg1 *runtime.ServeMux) { m.ctrl.T.Helper() - m.ctrl.Call(m, "RegisterGRPCRoutes", arg0, arg1) + m.ctrl.Call(m, "RegisterGRPCGatewayRoutes", arg0, arg1) } -// RegisterGRPCRoutes indicates an expected call of RegisterGRPCRoutes -func (mr *MockAppModuleBasicMockRecorder) RegisterGRPCRoutes(arg0, arg1 interface{}) *gomock.Call { +// RegisterGRPCGatewayRoutes indicates an expected call of RegisterGRPCGatewayRoutes +func (mr *MockAppModuleBasicMockRecorder) RegisterGRPCGatewayRoutes(arg0, arg1 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterGRPCRoutes", reflect.TypeOf((*MockAppModuleBasic)(nil).RegisterGRPCRoutes), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterGRPCGatewayRoutes", reflect.TypeOf((*MockAppModuleBasic)(nil).RegisterGRPCGatewayRoutes), arg0, arg1) } // GetTxCmd mocks base method @@ -261,16 +261,16 @@ func (mr *MockAppModuleGenesisMockRecorder) RegisterRESTRoutes(arg0, arg1 interf return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterRESTRoutes", reflect.TypeOf((*MockAppModuleGenesis)(nil).RegisterRESTRoutes), arg0, arg1) } -// RegisterGRPCRoutes mocks base method -func (m *MockAppModuleGenesis) RegisterGRPCRoutes(arg0 client.Context, arg1 *runtime.ServeMux) { +// RegisterGRPCGatewayRoutes mocks base method +func (m *MockAppModuleGenesis) RegisterGRPCGatewayRoutes(arg0 client.Context, arg1 *runtime.ServeMux) { m.ctrl.T.Helper() - m.ctrl.Call(m, "RegisterGRPCRoutes", arg0, arg1) + m.ctrl.Call(m, "RegisterGRPCGatewayRoutes", arg0, arg1) } -// RegisterGRPCRoutes indicates an expected call of RegisterGRPCRoutes -func (mr *MockAppModuleGenesisMockRecorder) RegisterGRPCRoutes(arg0, arg1 interface{}) *gomock.Call { +// RegisterGRPCGatewayRoutes indicates an expected call of RegisterGRPCGatewayRoutes +func (mr *MockAppModuleGenesisMockRecorder) RegisterGRPCGatewayRoutes(arg0, arg1 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterGRPCRoutes", reflect.TypeOf((*MockAppModuleGenesis)(nil).RegisterGRPCRoutes), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterGRPCGatewayRoutes", reflect.TypeOf((*MockAppModuleGenesis)(nil).RegisterGRPCGatewayRoutes), arg0, arg1) } // GetTxCmd mocks base method @@ -430,16 +430,16 @@ func (mr *MockAppModuleMockRecorder) RegisterRESTRoutes(arg0, arg1 interface{}) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterRESTRoutes", reflect.TypeOf((*MockAppModule)(nil).RegisterRESTRoutes), arg0, arg1) } -// RegisterGRPCRoutes mocks base method -func (m *MockAppModule) RegisterGRPCRoutes(arg0 client.Context, arg1 *runtime.ServeMux) { +// RegisterGRPCGatewayRoutes mocks base method +func (m *MockAppModule) RegisterGRPCGatewayRoutes(arg0 client.Context, arg1 *runtime.ServeMux) { m.ctrl.T.Helper() - m.ctrl.Call(m, "RegisterGRPCRoutes", arg0, arg1) + m.ctrl.Call(m, "RegisterGRPCGatewayRoutes", arg0, arg1) } -// RegisterGRPCRoutes indicates an expected call of RegisterGRPCRoutes -func (mr *MockAppModuleMockRecorder) RegisterGRPCRoutes(arg0, arg1 interface{}) *gomock.Call { +// RegisterGRPCGatewayRoutes indicates an expected call of RegisterGRPCGatewayRoutes +func (mr *MockAppModuleMockRecorder) RegisterGRPCGatewayRoutes(arg0, arg1 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterGRPCRoutes", reflect.TypeOf((*MockAppModule)(nil).RegisterGRPCRoutes), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterGRPCGatewayRoutes", reflect.TypeOf((*MockAppModule)(nil).RegisterGRPCGatewayRoutes), arg0, arg1) } // GetTxCmd mocks base method diff --git a/types/module/module.go b/types/module/module.go index ec9c1c77b5..97319e5d00 100644 --- a/types/module/module.go +++ b/types/module/module.go @@ -56,7 +56,7 @@ type AppModuleBasic interface { // client functionality RegisterRESTRoutes(client.Context, *mux.Router) - RegisterGRPCRoutes(client.Context, *runtime.ServeMux) + RegisterGRPCGatewayRoutes(client.Context, *runtime.ServeMux) GetTxCmd() *cobra.Command GetQueryCmd() *cobra.Command } @@ -115,10 +115,10 @@ func (bm BasicManager) RegisterRESTRoutes(clientCtx client.Context, rtr *mux.Rou } } -// RegisterGRPCRoutes registers all module rest routes -func (bm BasicManager) RegisterGRPCRoutes(clientCtx client.Context, rtr *runtime.ServeMux) { +// RegisterGRPCGatewayRoutes registers all module rest routes +func (bm BasicManager) RegisterGRPCGatewayRoutes(clientCtx client.Context, rtr *runtime.ServeMux) { for _, b := range bm { - b.RegisterGRPCRoutes(clientCtx, rtr) + b.RegisterGRPCGatewayRoutes(clientCtx, rtr) } } diff --git a/x/auth/module.go b/x/auth/module.go index 55b5dc7fbb..098dd774ee 100644 --- a/x/auth/module.go +++ b/x/auth/module.go @@ -65,8 +65,8 @@ func (AppModuleBasic) RegisterRESTRoutes(clientCtx client.Context, rtr *mux.Rout rest.RegisterRoutes(clientCtx, rtr, types.StoreKey) } -// RegisterGRPCRoutes registers the gRPC Gateway routes for the auth module. -func (AppModuleBasic) RegisterGRPCRoutes(clientCtx client.Context, mux *runtime.ServeMux) { +// RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the auth module. +func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) { types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)) } diff --git a/x/auth/vesting/module.go b/x/auth/vesting/module.go index 7afab8d34b..3cc579a40e 100644 --- a/x/auth/vesting/module.go +++ b/x/auth/vesting/module.go @@ -57,9 +57,9 @@ func (AppModuleBasic) ValidateGenesis(_ codec.JSONMarshaler, _ client.TxEncoding // RegisterRESTRoutes registers module's REST handlers. Currently, this is a no-op. func (AppModuleBasic) RegisterRESTRoutes(_ client.Context, _ *mux.Router) {} -// RegisterGRPCRoutes registers the module's gRPC Gateway routes. Currently, this +// RegisterGRPCGatewayRoutes registers the module's gRPC Gateway routes. Currently, this // is a no-op. -func (a AppModuleBasic) RegisterGRPCRoutes(_ client.Context, _ *runtime.ServeMux) {} +func (a AppModuleBasic) RegisterGRPCGatewayRoutes(_ client.Context, _ *runtime.ServeMux) {} // GetTxCmd returns the root tx command for the auth module. func (AppModuleBasic) GetTxCmd() *cobra.Command { diff --git a/x/bank/module.go b/x/bank/module.go index 9712636133..958d0db754 100644 --- a/x/bank/module.go +++ b/x/bank/module.go @@ -64,8 +64,8 @@ func (AppModuleBasic) RegisterRESTRoutes(clientCtx client.Context, rtr *mux.Rout rest.RegisterHandlers(clientCtx, rtr) } -// RegisterGRPCRoutes registers the gRPC Gateway routes for the bank module. -func (AppModuleBasic) RegisterGRPCRoutes(clientCtx client.Context, mux *runtime.ServeMux) { +// RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the bank module. +func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) { types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)) } diff --git a/x/capability/module.go b/x/capability/module.go index cc1d6272eb..f27e5cdb5d 100644 --- a/x/capability/module.go +++ b/x/capability/module.go @@ -69,8 +69,8 @@ func (AppModuleBasic) ValidateGenesis(cdc codec.JSONMarshaler, config client.TxE // RegisterRESTRoutes registers the capability module's REST service handlers. func (a AppModuleBasic) RegisterRESTRoutes(_ client.Context, _ *mux.Router) {} -// RegisterGRPCRoutes registers the gRPC Gateway routes for the capability module. -func (a AppModuleBasic) RegisterGRPCRoutes(_ client.Context, _ *runtime.ServeMux) { +// RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the capability module. +func (a AppModuleBasic) RegisterGRPCGatewayRoutes(_ client.Context, _ *runtime.ServeMux) { } // GetTxCmd returns the capability module's root tx command. diff --git a/x/crisis/module.go b/x/crisis/module.go index 4066cb2ef9..9793dc8bfc 100644 --- a/x/crisis/module.go +++ b/x/crisis/module.go @@ -56,8 +56,8 @@ func (AppModuleBasic) ValidateGenesis(cdc codec.JSONMarshaler, config client.TxE // RegisterRESTRoutes registers no REST routes for the crisis module. func (AppModuleBasic) RegisterRESTRoutes(_ client.Context, _ *mux.Router) {} -// RegisterGRPCRoutes registers the gRPC Gateway routes for the capability module. -func (AppModuleBasic) RegisterGRPCRoutes(_ client.Context, _ *runtime.ServeMux) {} +// RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the capability module. +func (AppModuleBasic) RegisterGRPCGatewayRoutes(_ client.Context, _ *runtime.ServeMux) {} // GetTxCmd returns the root tx command for the crisis module. func (b AppModuleBasic) GetTxCmd() *cobra.Command { diff --git a/x/distribution/module.go b/x/distribution/module.go index c32bcbc1ed..034be6d965 100644 --- a/x/distribution/module.go +++ b/x/distribution/module.go @@ -68,8 +68,8 @@ func (AppModuleBasic) RegisterRESTRoutes(clientCtx sdkclient.Context, rtr *mux.R rest.RegisterHandlers(clientCtx, rtr) } -// RegisterGRPCRoutes registers the gRPC Gateway routes for the distribution module. -func (AppModuleBasic) RegisterGRPCRoutes(clientCtx sdkclient.Context, mux *runtime.ServeMux) { +// RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the distribution module. +func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx sdkclient.Context, mux *runtime.ServeMux) { types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)) } diff --git a/x/evidence/module.go b/x/evidence/module.go index 7ff49aabd5..4367fe8d58 100644 --- a/x/evidence/module.go +++ b/x/evidence/module.go @@ -85,8 +85,8 @@ func (a AppModuleBasic) RegisterRESTRoutes(clientCtx client.Context, rtr *mux.Ro rest.RegisterRoutes(clientCtx, rtr, evidenceRESTHandlers) } -// RegisterGRPCRoutes registers the gRPC Gateway routes for the evidence module. -func (a AppModuleBasic) RegisterGRPCRoutes(clientCtx client.Context, mux *runtime.ServeMux) { +// RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the evidence module. +func (a AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) { types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)) } diff --git a/x/genutil/module.go b/x/genutil/module.go index 711e5a6884..bfaeb0c591 100644 --- a/x/genutil/module.go +++ b/x/genutil/module.go @@ -56,8 +56,8 @@ func (b AppModuleBasic) ValidateGenesis(cdc codec.JSONMarshaler, txEncodingConfi // RegisterRESTRoutes registers the REST routes for the genutil module. func (AppModuleBasic) RegisterRESTRoutes(_ client.Context, _ *mux.Router) {} -// RegisterGRPCRoutes registers the gRPC Gateway routes for the genutil module. -func (AppModuleBasic) RegisterGRPCRoutes(_ client.Context, _ *runtime.ServeMux) { +// RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the genutil module. +func (AppModuleBasic) RegisterGRPCGatewayRoutes(_ client.Context, _ *runtime.ServeMux) { } // GetTxCmd returns no root tx command for the genutil module. diff --git a/x/gov/module.go b/x/gov/module.go index 1183f6060e..ad2191660c 100644 --- a/x/gov/module.go +++ b/x/gov/module.go @@ -84,8 +84,8 @@ func (a AppModuleBasic) RegisterRESTRoutes(clientCtx client.Context, rtr *mux.Ro rest.RegisterHandlers(clientCtx, rtr, proposalRESTHandlers) } -// RegisterGRPCRoutes registers the gRPC Gateway routes for the gov module. -func (a AppModuleBasic) RegisterGRPCRoutes(clientCtx client.Context, mux *runtime.ServeMux) { +// RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the gov module. +func (a AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) { types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)) } diff --git a/x/ibc/applications/transfer/module.go b/x/ibc/applications/transfer/module.go index 9947828809..0f9b3faee2 100644 --- a/x/ibc/applications/transfer/module.go +++ b/x/ibc/applications/transfer/module.go @@ -72,8 +72,8 @@ func (AppModuleBasic) ValidateGenesis(cdc codec.JSONMarshaler, config client.TxE func (AppModuleBasic) RegisterRESTRoutes(clientCtx client.Context, rtr *mux.Router) { } -// RegisterGRPCRoutes registers the gRPC Gateway routes for the ibc-transfer module. -func (AppModuleBasic) RegisterGRPCRoutes(clientCtx client.Context, mux *runtime.ServeMux) { +// RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the ibc-transfer module. +func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) { types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)) } diff --git a/x/ibc/core/module.go b/x/ibc/core/module.go index 4590556be9..3371dc88a4 100644 --- a/x/ibc/core/module.go +++ b/x/ibc/core/module.go @@ -67,8 +67,8 @@ func (AppModuleBasic) ValidateGenesis(cdc codec.JSONMarshaler, config client.TxE // RegisterRESTRoutes does nothing. IBC does not support legacy REST routes. func (AppModuleBasic) RegisterRESTRoutes(client.Context, *mux.Router) {} -// RegisterGRPCRoutes registers the gRPC Gateway routes for the ibc module. -func (AppModuleBasic) RegisterGRPCRoutes(clientCtx client.Context, mux *runtime.ServeMux) { +// RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the ibc module. +func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) { clienttypes.RegisterQueryHandlerClient(context.Background(), mux, clienttypes.NewQueryClient(clientCtx)) connectiontypes.RegisterQueryHandlerClient(context.Background(), mux, connectiontypes.NewQueryClient(clientCtx)) channeltypes.RegisterQueryHandlerClient(context.Background(), mux, channeltypes.NewQueryClient(clientCtx)) diff --git a/x/ibc/testing/mock/mock.go b/x/ibc/testing/mock/mock.go index 89ed2a4dd4..e338e24d3b 100644 --- a/x/ibc/testing/mock/mock.go +++ b/x/ibc/testing/mock/mock.go @@ -58,8 +58,8 @@ func (AppModuleBasic) ValidateGenesis(codec.JSONMarshaler, client.TxEncodingConf // RegisterRESTRoutes implements AppModuleBasic interface. func (AppModuleBasic) RegisterRESTRoutes(clientCtx client.Context, rtr *mux.Router) {} -// RegisterGRPCRoutes implements AppModuleBasic interface. -func (a AppModuleBasic) RegisterGRPCRoutes(_ client.Context, _ *runtime.ServeMux) {} +// RegisterGRPCGatewayRoutes implements AppModuleBasic interface. +func (a AppModuleBasic) RegisterGRPCGatewayRoutes(_ client.Context, _ *runtime.ServeMux) {} // GetTxCmd implements AppModuleBasic interface. func (AppModuleBasic) GetTxCmd() *cobra.Command { diff --git a/x/mint/module.go b/x/mint/module.go index 0a29598add..a100139825 100644 --- a/x/mint/module.go +++ b/x/mint/module.go @@ -69,8 +69,8 @@ func (AppModuleBasic) RegisterRESTRoutes(clientCtx client.Context, rtr *mux.Rout rest.RegisterRoutes(clientCtx, rtr) } -// RegisterGRPCRoutes registers the gRPC Gateway routes for the mint module. -func (AppModuleBasic) RegisterGRPCRoutes(clientCtx client.Context, mux *runtime.ServeMux) { +// RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the mint module. +func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) { types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)) } diff --git a/x/params/module.go b/x/params/module.go index b95f76947d..1460460317 100644 --- a/x/params/module.go +++ b/x/params/module.go @@ -55,8 +55,8 @@ func (AppModuleBasic) ValidateGenesis(_ codec.JSONMarshaler, config client.TxEnc // RegisterRESTRoutes registers the REST routes for the params module. func (AppModuleBasic) RegisterRESTRoutes(_ client.Context, _ *mux.Router) {} -// RegisterGRPCRoutes registers the gRPC Gateway routes for the params module. -func (AppModuleBasic) RegisterGRPCRoutes(clientCtx client.Context, mux *runtime.ServeMux) { +// RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the params module. +func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) { proposal.RegisterQueryHandlerClient(context.Background(), mux, proposal.NewQueryClient(clientCtx)) } diff --git a/x/slashing/module.go b/x/slashing/module.go index 3698bb6987..91ad472e90 100644 --- a/x/slashing/module.go +++ b/x/slashing/module.go @@ -76,8 +76,8 @@ func (AppModuleBasic) RegisterRESTRoutes(clientCtx client.Context, rtr *mux.Rout rest.RegisterHandlers(clientCtx, rtr) } -// RegisterGRPCRoutes registers the gRPC Gateway routes for the slashig module. -func (AppModuleBasic) RegisterGRPCRoutes(clientCtx client.Context, mux *runtime.ServeMux) { +// RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the slashig module. +func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) { types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)) } diff --git a/x/staking/module.go b/x/staking/module.go index 4fa17d4d45..f2e4221174 100644 --- a/x/staking/module.go +++ b/x/staking/module.go @@ -74,8 +74,8 @@ func (AppModuleBasic) RegisterRESTRoutes(clientCtx client.Context, rtr *mux.Rout rest.RegisterHandlers(clientCtx, rtr) } -// RegisterGRPCRoutes registers the gRPC Gateway routes for the staking module. -func (AppModuleBasic) RegisterGRPCRoutes(clientCtx client.Context, mux *runtime.ServeMux) { +// RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the staking module. +func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) { types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)) } diff --git a/x/upgrade/module.go b/x/upgrade/module.go index df5e23a2f4..c136d9cf0a 100644 --- a/x/upgrade/module.go +++ b/x/upgrade/module.go @@ -47,8 +47,8 @@ func (AppModuleBasic) RegisterRESTRoutes(clientCtx client.Context, r *mux.Router rest.RegisterRoutes(clientCtx, r) } -// RegisterGRPCRoutes registers the gRPC Gateway routes for the upgrade module. -func (AppModuleBasic) RegisterGRPCRoutes(clientCtx client.Context, mux *runtime.ServeMux) { +// RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the upgrade module. +func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) { types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)) } From a15bb7562e1c900f48b38ed67736faf8ae4bd6d7 Mon Sep 17 00:00:00 2001 From: Amaury Martiny Date: Wed, 28 Oct 2020 12:47:22 +0100 Subject: [PATCH 007/136] docs: Basic/App-anatomy explains Msg Service by default (#7670) * Add msg service * Add handlers * Small tweaks * Remove todo Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- docs/basics/app-anatomy.md | 75 +++++++++++++++++++++++--------------- 1 file changed, 46 insertions(+), 29 deletions(-) diff --git a/docs/basics/app-anatomy.md b/docs/basics/app-anatomy.md index 68d799e366..e7bfc8cf0c 100644 --- a/docs/basics/app-anatomy.md +++ b/docs/basics/app-anatomy.md @@ -49,17 +49,17 @@ The first thing defined in `app.go` is the `type` of the application. It is gene - **A list of module's `keeper`s.** Each module defines an abstraction called [`keeper`](../building-modules/keeper.md), which handles reads and writes for this module's store(s). The `keeper`'s methods of one module can be called from other modules (if authorized), which is why they are declared in the application's type and exported as interfaces to other modules so that the latter can only access the authorized functions. - **A reference to an [`appCodec`](../core/encoding.md).** The application's `appCodec` is used to serialize and deserialize data structures in order to store them, as stores can only persist `[]bytes`. The default codec is [Protocol Buffers](../core/encoding.md). - **A reference to a [`legacyAmino`](../core/encoding.md) codec.** Some parts of the SDK have not been migrated to use the `appCodec` above, and are still hardcoded to use Amino. Other parts explicity use Amino for backwards compatibility. For these reasons, the application still holds a reference to the legacy Amino codec. Please note that the Amino codec will be removed from the SDK in the upcoming releases. -- **A reference to a [module manager](../building-modules/module-manager.md#manager)** and a [basic module manager](../building-modules/module-manager.md#basicmanager). The module manager is an object that contains a list of the application's module. It facilitates operations related to these modules, like registering [`routes`](../core/baseapp.md#routing), [gRPC query services](../core/baseapp.md#grpc-query-services) and [legacy Tendermint query routes](../core/baseapp.md#legacy-query-routing) or setting the order of execution between modules for various functions like [`InitChainer`](#initchainer), [`BeginBlocker` and `EndBlocker`](#beginblocker-and-endblocker). +- **A reference to a [module manager](../building-modules/module-manager.md#manager)** and a [basic module manager](../building-modules/module-manager.md#basicmanager). The module manager is an object that contains a list of the application's module. It facilitates operations related to these modules, like registering their [`Msg` services](../core/baseapp.md#msg-services) and [gRPC `Query` services](../core/baseapp.md#grpc-query-services), or setting the order of execution between modules for various functions like [`InitChainer`](#initchainer), [`BeginBlocker` and `EndBlocker`](#beginblocker-and-endblocker). For backwards-compatibility reasons, all modules expose [legacy `Msg`s routes](../core/baseapp.md#routing) and [legacy query routes](../core/baseapp.md#legacy-query-routing), which are also registered by the module manager.. See an example of application type definition from `simapp`, the SDK's own app used for demo and testing purposes: -+++ https://github.com/cosmos/cosmos-sdk/blob/d9175200920e96bfa4182b5c8bc46d91b17a28a1/simapp/app.go#L140-L179 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc1/simapp/app.go#L139-L181 ### Constructor Function This function constructs a new application of the type defined in the section above. It must fulfill the `AppCreator` signature in order to be used in the [`start` command](../core/node.md#start-command) of the application's daemon command. -+++ https://github.com/cosmos/cosmos-sdk/blob/d9175200920e96bfa4182b5c8bc46d91b17a28a1/server/types/app.go#L42-L44 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc1/server/types/app.go#L42-L44 Here are the main actions performed by this function: @@ -67,7 +67,7 @@ Here are the main actions performed by this function: - Instantiate a new application with a reference to a `baseapp` instance, a codec and all the appropriate store keys. - Instantiate all the [`keeper`s](#keeper) defined in the application's `type` using the `NewKeeper` function of each of the application's modules. Note that `keepers` must be instantiated in the correct order, as the `NewKeeper` of one module might require a reference to another module's `keeper`. - Instantiate the application's [module manager](../building-modules/module-manager.md#manager) with the [`AppModule`](#application-module-interface) object of each of the application's modules. -- With the module manager, initialize the application's [`routes`](../core/baseapp.md#routing), [`gRPC query services`](../core/baseapp.md#grpc-query-services) and [`legacy query routes`](../core/baseapp.md#query-routing). When a transaction is relayed to the application by Tendermint via the ABCI, it is routed to the appropriate module's [`handler`](#handler) using the `routes` defined here. Likewise, when a gRPC request is received by the application, it is routed to the appropriate module's [`gRPC query service`](#grpc-query-services) using the gRPC routes defined here. The SDK still supports legacy Tendermint queries, and these queries are routes using the `legacy query routes`. +- With the module manager, initialize the application's [`Msg` services](../core/baseapp.md#msg-services), [gRPC `Query` services](../core/baseapp.md#grpc-query-services), [legacy `Msg` routes](../core/baseapp.md#routing) and [legacy query routes](../core/baseapp.md#query-routing). When a transaction is relayed to the application by Tendermint via the ABCI, it is routed to the appropriate module's [`Msg` service](#msg-services) using the routes defined here. Likewise, when a gRPC query request is received by the application, it is routed to the appropriate module's [`gRPC query service`](#grpc-query-services) using the gRPC routes defined here. The SDK still supports legacy `Msg`s and legacy Tendermint queries, which are routed using respectively the legacy `Msg` routes and the legacy query routes. - With the module manager, register the [application's modules' invariants](../building-modules/invariants.md). Invariants are variables (e.g. total supply of a token) that are evaluated at the end of each block. The process of checking invariants is done via a special module called the [`InvariantsRegistry`](../building-modules/invariants.md#invariant-registry). The value of the invariant should be equal to a predicted value defined in the module. Should the value be different than the predicted one, special logic defined in the invariant registry will be triggered (usually the chain is halted). This is useful to make sure no critical bug goes unnoticed and produces long-lasting effects that would be hard to fix. - With the module manager, set the order of execution between the `InitGenesis`, `BegingBlocker` and `EndBlocker` functions of each of the [application's modules](#application-module-interface). Note that not all modules implement these functions. - Set the remainer of application's parameters: @@ -81,7 +81,7 @@ Note that this function only creates an instance of the app, while the actual st See an example of application constructor from `simapp`: -+++ https://github.com/cosmos/cosmos-sdk/blob/d9175200920e96bfa4182b5c8bc46d91b17a28a1/simapp/app.go#L190-L427 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc1/simapp/app.go#L192-L429 ### InitChainer @@ -91,7 +91,7 @@ In general, the `InitChainer` is mostly composed of the [`InitGenesis`](../build See an example of an `InitChainer` from `simapp`: -+++ https://github.com/cosmos/cosmos-sdk/blob/d9175200920e96bfa4182b5c8bc46d91b17a28a1/simapp/app.go#L450-L455 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc1/simapp/app.go#L452-L459 ### BeginBlocker and EndBlocker @@ -103,13 +103,13 @@ As a sidenote, it is important to remember that application-specific blockchains See an example of `BeginBlocker` and `EndBlocker` functions from `simapp` -+++ https://github.com/cosmos/cosmos-sdk/blob/d9175200920e96bfa4182b5c8bc46d91b17a28a1/simapp/app.go#L440-L448 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc1/simapp/app.go#L442-L450 ### Register Codec The `EncodingConfig` structure is the last important part of the `app.go` file. The goal of this structure is to define the codecs that will be used throughout the app. -+++ https://github.com/cosmos/cosmos-sdk/blob/d9175200920e96bfa4182b5c8bc46d91b17a28a1/simapp/params/encoding.go#L9-L16 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc1/simapp/params/encoding.go#L9-L16 Here are descriptions of what each of the four fields means: @@ -123,7 +123,7 @@ The SDK exposes a `MakeCodecs` function used to create a `EncodingConfig`. It us See an example of a `MakeCodecs` from `simapp`: -+++ https://github.com/cosmos/cosmos-sdk/blob/d9175200920e96bfa4182b5c8bc46d91b17a28a1/simapp/app.go#L429-L435 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc1/simapp/app.go#L429-L435 ## Modules @@ -135,56 +135,73 @@ Modules must implement [interfaces](../building-modules/module-manager.md#applic `AppModule` exposes a collection of useful methods on the module that facilitates the composition of modules into a coherent application. These methods are are called from the `module manager`(../building-modules/module-manager.md#manager), which manages the application's collection of modules. -### Message Types +### `Msg` Services -[`Message`s](../building-modules/messages-and-queries.md#messages) are objects defined by each module that implement the [`message`](../building-modules/messages-and-queries.md#messages) interface. Each [`transaction`](../core/transactions.md) contains one or multiple `messages`. +Each module defines two [Protobuf services](https://developers.google.com/protocol-buffers/docs/proto#services): one `Msg` service to handle messages, and one gRPC `Query` service to handle queries. If we consider the module as a state-machine, then a `Msg` is a state transition. A `Msg` service is a Protobuf service defining all possible `Msg`s a module exposes. Note that `Msg`s are bundled in [`transactions`](../core/transactions.md), and each transaction contains one or multiple `messages`. When a valid block of transactions is received by the full-node, Tendermint relays each one to the application via [`DeliverTx`](https://tendermint.com/docs/app-dev/abci-spec.html#delivertx). Then, the application handles the transaction: 1. Upon receiving the transaction, the application first unmarshalls it from `[]bytes`. -2. Then, it verifies a few things about the transaction like [fee payment and signatures](#gas-fees.md#antehandler) before extracting the message(s) contained in the transaction. -3. With the `Type()` method of the `message`, `baseapp` is able to route it to the appropriate module's [`handler`](#handler) in order for it to be processed. +2. Then, it verifies a few things about the transaction like [fee payment and signatures](#gas-fees.md#antehandler) before extracting the `Msg`(s) contained in the transaction. +3. `Msg`s are encoded as Protobuf [`Any`s](#register-codec) via the `sdk.ServiceMsg` struct. By analyzing each `Any`'s `type_url`, the application routes the `Msg` to the corresponding module's `Msg` service. 4. If the message is successfully processed, the state is updated. For a more detailed look at a transaction lifecycle, click [here](./tx-lifecycle.md). -Module developers create custom message types when they build their own module. The general practice is to prefix the type declaration of the message with `Msg`. For example, the message type `MsgSend` allows users to transfer tokens: +Module developers create custom `Msg`s when they build their own module. The general practice is to define all `Msg`s in a Protobuf service called `service Msg {}`, and define each `Msg` as a Protobuf service method, using the `rpc` keyword. These definitions usually reside in a `tx.proto` file. For example, the `x/bank` module defines two `Msg`s to allows users to transfer tokens: -+++ https://github.com/cosmos/cosmos-sdk/blob/d9175200920e96bfa4182b5c8bc46d91b17a28a1/proto/cosmos/bank/v1beta1/tx.proto#L10-L19 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc1/proto/cosmos/bank/v1beta1/tx.proto#L10-L17 -It is processed by the `handler` of the `bank` module, which ultimately calls the `keeper` of the `auth` module in order to update the state. +These two `Msg`s are processed by the `Msg` service of the `x/bank` module, which ultimately calls the `keeper` of the `x/auth` module in order to update the state. -### Handler +Each module should also implement the `RegisterServices` method as part of the [`AppModule` interface](#application-module-interface). This method should call the `RegisterMsgServer` function provided by the generated Protobuf code. -The [`handler`](../building-modules/handler.md) refers to the part of the module responsible for processing the `message` after it is routed by `baseapp`. `handler` functions of modules are only executed if the transaction is relayed from Tendermint by the `DeliverTx` ABCI message. If the transaction is relayed by `CheckTx`, only stateless checks and fee-related stateful checks are performed. To better understand the difference between `DeliverTx`and `CheckTx`, as well as the difference between stateful and stateless checks, click [here](./tx-lifecycle.md). +#### Handlers + +The [handler](../building-modules/handler.md) refers to the part of the module responsible for processing the `Msg` after it is routed by `baseapp`. Handler functions of modules are only executed if the transaction is relayed from Tendermint by the `DeliverTx` ABCI message. If the transaction is relayed by `CheckTx`, only stateless checks and fee-related stateful checks are performed. To better understand the difference between `DeliverTx`and `CheckTx`, as well as the difference between stateful and stateless checks, click [here](./tx-lifecycle.md). The `handler` of a module is generally defined in a file called `handler.go` and consists of: -- A **switch function** `NewHandler` to route the message to the appropriate `handler` function. This function returns a `handler` function, and is registered in the [`AppModule`](#application-module-interface) to be used in the application's module manager to initialize the [application's router](../core/baseapp.md#routing). Next is an example of such a switch from the [nameservice tutorial](https://github.com/cosmos/sdk-tutorials/tree/master/nameservice) - +++ https://github.com/cosmos/sdk-tutorials/blob/master/nameservice/x/nameservice/handler.go#L12-L26 +- A **switch function** `NewHandler` to route the message to the appropriate `handler` function. This function returns a `handler` function, and is registered in the [`AppModule`](#application-module-interface) to be used in the application's module manager to initialize the [application's router](../core/baseapp.md#routing). Next is an example from `x/bank`: + +++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc1/x/bank/handler.go#L10-L30 - **One handler function for each message type defined by the module**. Developers write the message processing logic in these functions. This generally involves doing stateful checks to ensure the message is valid and calling [`keeper`](#keeper)'s methods to update the state. Handler functions return a result of type `sdk.Result`, which informs the application on whether the message was successfully processed: -+++ https://github.com/cosmos/cosmos-sdk/blob/d9175200920e96bfa4182b5c8bc46d91b17a28a1/types/result.go#L15-L40 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc1/types/result.go#L15-L40 -### gRPC Query Services +### gRPC `Query` Services -gRPC query services are introduced in the v0.40 Stargate release. They allow users to query the state using [gRPC](https://grpc.io). They are enabled by default, and can be configued under the `grpc.enable` and `grpc.address` fields inside `app.toml`. +gRPC `Query` services are introduced in the v0.40 Stargate release. They allow users to query the state using [gRPC](https://grpc.io). They are enabled by default, and can be configued under the `grpc.enable` and `grpc.address` fields inside `app.toml`. -gRPC query services are defined in the module's Protobuf definition, specifically inside `query.proto`. The `query.proto` definition file exposes a single `Query` [Protobuf service](https://developers.google.com/protocol-buffers/docs/proto#services). Each gRPC query endpoint corresponds to a service method, starting with the `rpc` keyword, inside the `Query` service. +gRPC `Query` services are defined in the module's Protobuf definition files, specifically inside `query.proto`. The `query.proto` definition file exposes a single `Query` [Protobuf service](https://developers.google.com/protocol-buffers/docs/proto#services). Each gRPC query endpoint corresponds to a service method, starting with the `rpc` keyword, inside the `Query` service. Protobuf generates a `QueryServer` interface for each module, containing all the service methods. A module's [`keeper`](#keeper) then needs to implement this `QueryServer` interface, by providing the concrete implementation of each service method. This concrete implementation is the handler of the corresponding gRPC query endpoint. -Finally, each module should also implement the `RegisterQueryService` method as part of the [`AppModule` interface](#application-module-interface). This method should call the `RegisterQueryServer` function provided by the generated Protobuf code. +Finally, each module should also implement the `RegisterServices` method as part of the [`AppModule` interface](#application-module-interface). This method should call the `RegisterQueryServer` function provided by the generated Protobuf code. -### Legacy Querier +### Legacy `Msg`s -Legacy queriers were queriers used before the introduction of Protobuf and gRPC in the SDK. They are present for existing modules, but will be deprecated in a future release of the SDK. If you are developing new modules, gRPC query services should be preferred, and you only need to implement the `LegacyQuerierHandler` interface if you wish to use legacy queriers. +While the [`Msg` service](#msg-services) introduced in v0.40 is the official way to define `Msg`s, the SDK still handles legacy `Msg`s defined with previous versions of the SDK. + +[Legacy `Msg`s](../building-modules/messages-and-queries.md#messages) are objects defined by each module that implement the [`sdk.Msg`](../building-modules/messages-and-queries.md#messages) interface. Each [`transaction`](../core/transactions.md) contains one or multiple legacy `Msg`s, and can also contain both legacy and non-legacy `Msg`s. + +The application handles the transaction almost like with `Msg` service `Msg`s, only the third step (routing) differs: + +1. Upon receiving the transaction, the application first unmarshalls it from `[]bytes`. +2. Then, it verifies a few things about the transaction like [fee payment and signatures](#gas-fees.md#antehandler) before extracting the message(s) contained in the transaction. +3. With the `Type()` method of the legacy `Msg`, `baseapp` is able to route it to the appropriate module's [legacy `Msg` handler](#handler) in order for it to be processed. +4. If the message is successfully processed, the state is updated. + +New `Msg` services are compatible with legacy `Msg`s in terms of how `Msg`s are handled, please refer to the [handler](#handlers) section for more information. + +### Legacy Query Routes + +Legacy queriers were queriers used before the introduction of Protobuf and gRPC in the SDK. They are present for existing modules, but will be deprecated in a future release of the SDK. If you are developing new modules, gRPC `Query` services should be preferred, and you only need to implement the `LegacyQuerierHandler` interface if you wish to use legacy queriers. [`Legacy queriers`](../building-modules/query-services.md#legacy-queriers) are very similar to `handlers`, except they serve user queries to the state as opposed to processing transactions. A [query](../building-modules/messages-and-queries.md#queries) is initiated from an [interface](#application-interface) by an end-user who provides a `queryRoute` and some `data`. The query is then routed to the correct application's `querier` by `baseapp`'s `handleQueryCustom` method using `queryRoute`: -+++ https://github.com/cosmos/cosmos-sdk/blob/d9175200920e96bfa4182b5c8bc46d91b17a28a1/baseapp/abci.go#L388-L418 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc1/baseapp/abci.go#L388-L418 The `Querier` of a module is defined in a file called `keeper/querier.go`, and consists of: @@ -240,7 +257,7 @@ The [module's Legacy REST interface](../building-modules/module-interfaces.md#le - A `RegisterRoutes` function, which registers each route defined in the file. This function is called from the [main application's interface](#application-interfaces) for each module used within the application. The router used in the SDK is [Gorilla's mux](https://github.com/gorilla/mux). - Custom request type definitions for each query or transaction creation function that needs to be exposed. These custom request types build on the base `request` type of the Cosmos SDK: - +++ https://github.com/cosmos/cosmos-sdk/blob/d9175200920e96bfa4182b5c8bc46d91b17a28a1/types/rest/rest.go#L62-L76 + +++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc1/types/rest/rest.go#L62-L76 - One handler function for each request that can be routed to the given module. These functions implement the core logic necessary to serve the request. These Legacy API endpoints are present in the SDK for backward compatibility purposes and will be removed in the next release. From 5061b8fe19086e07f8f610babb2395b5b07113d1 Mon Sep 17 00:00:00 2001 From: antstalepresh Date: Wed, 28 Oct 2020 23:24:55 +1000 Subject: [PATCH 008/136] basic ADR for gov split vote --- docs/architecture/adr-033-gov-split-vote.md | 65 +++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 docs/architecture/adr-033-gov-split-vote.md diff --git a/docs/architecture/adr-033-gov-split-vote.md b/docs/architecture/adr-033-gov-split-vote.md new file mode 100644 index 0000000000..f8e914b4a0 --- /dev/null +++ b/docs/architecture/adr-033-gov-split-vote.md @@ -0,0 +1,65 @@ +# ADR 028: Public Key Addresses + +## Changelog + +- 2020/10/28: Intial draft + +## Status + +Proposed + +## Abstract + +This ADR defines a validator to split votes into several pieces. Assuming a group with multisig address vote on a proposal, the members could have different opinion. In this case spliting voting power into pieces could be useful. + +## Context + +Currently, an address can cast vote with only one of vote options(yes/no/abstrain/no_with_veto) and full votingPower of that address goes to one vote option. + +To be more accurate in voting process, allowing the split of voting power could be very helpful. + +Assume that there are 100 members associated to a single validator address and they participate in voting process via that address. + +60 members cast yes vote, 30 members cast no vote, 5 members abstrain, 5 members no_with_veto. +If they just cast yes vote for 100% of voting power, it won't be fair enough for 40 members especially when that validator's voting power is quite high. + +If total voting power is 10000, and on above case we split voting power into 6000, 3000, 500, 500 pieces. + +## Decision + +We will modify cli command from +```sh +simd tx gov vote 1 yes --from mykey +``` +to +```sh +simd tx gov vote 1 "yes=60,no=30,abstain=5,no_with_veto=5" --from mykey +``` + +``` +simd tx gov vote 1 yes --from mykey +``` +Old command still works and it's automatically converted to like below +``` +simd tx gov vote 1 "yes=1" --from mykey +``` + +If you want to set VoteOption=1, you can omit `=1`. +``` +simd tx gov vote 1 "yes,no" --from mykey +``` +is same as +``` +simd tx gov vote 1 "yes=1,no=1" --from mykey +``` + +## Consequences + +### Positive +- It can make more accurate voting process especially for big validators. + +### Negative + +### Neutral + +## References From e91be95d30998d98c0fd9e879b4e4a75763e7031 Mon Sep 17 00:00:00 2001 From: antstalepresh Date: Wed, 28 Oct 2020 23:27:39 +1000 Subject: [PATCH 009/136] revert proto change --- proto/cosmos/gov/v1beta1/gov.proto | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/proto/cosmos/gov/v1beta1/gov.proto b/proto/cosmos/gov/v1beta1/gov.proto index 3c00d4b2b2..1d72e64321 100644 --- a/proto/cosmos/gov/v1beta1/gov.proto +++ b/proto/cosmos/gov/v1beta1/gov.proto @@ -119,9 +119,9 @@ message Vote { option (gogoproto.goproto_stringer) = false; option (gogoproto.equal) = false; - uint64 proposal_id = 1 [(gogoproto.moretags) = "yaml:\"proposal_id\""]; - string voter = 2; - repeated VoteOption options = 3; + uint64 proposal_id = 1 [(gogoproto.moretags) = "yaml:\"proposal_id\""]; + string voter = 2; + VoteOption option = 3; } // DepositParams defines the params for deposits on governance proposals. From dca9dcd2764896bcaffd71686911c8fa60801bc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?colin=20axn=C3=A9r?= <25233464+colin-axner@users.noreply.github.com> Date: Wed, 28 Oct 2020 14:31:22 +0100 Subject: [PATCH 010/136] Fix panic in context when setting nodeURI (#7699) * Fix panic in context Move URI parsing outside of context. WithNodeURI will only set the nodeURI. To set the Client in the context, WithClient must be called. * add changelog * add deleted space back --- CHANGELOG.md | 1 + client/cmd.go | 8 ++++++++ client/context.go | 7 ------- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1003e6bd00..fd6ba83dd4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -60,6 +60,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### Bug Fixes * (kvstore) [\#7415](https://github.com/cosmos/cosmos-sdk/pull/7415) Allow new stores to be registered during on-chain upgrades. +* (client) [\#7699](https://github.com/cosmos/cosmos-sdk/pull/7699) Fix panic in context when setting invalid nodeURI. `WithNodeURI` does not set the `Client` in the context. ## [v0.40.0-rc0](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.40.0-rc0) - 2020-10-13 diff --git a/client/cmd.go b/client/cmd.go index 712a792740..8395fb49b5 100644 --- a/client/cmd.go +++ b/client/cmd.go @@ -8,6 +8,7 @@ import ( "github.com/spf13/cobra" "github.com/spf13/pflag" "github.com/tendermint/tendermint/libs/cli" + rpchttp "github.com/tendermint/tendermint/rpc/client/http" "github.com/cosmos/cosmos-sdk/client/flags" sdk "github.com/cosmos/cosmos-sdk/types" @@ -131,6 +132,13 @@ func ReadPersistentCommandFlags(clientCtx Context, flagSet *pflag.FlagSet) (Cont rpcURI, _ := flagSet.GetString(flags.FlagNode) if rpcURI != "" { clientCtx = clientCtx.WithNodeURI(rpcURI) + + client, err := rpchttp.New(rpcURI, "/websocket") + if err != nil { + return clientCtx, err + } + + clientCtx = clientCtx.WithClient(client) } } diff --git a/client/context.go b/client/context.go index 96c909478b..7afddcf431 100644 --- a/client/context.go +++ b/client/context.go @@ -10,7 +10,6 @@ import ( "github.com/gogo/protobuf/proto" "github.com/pkg/errors" rpcclient "github.com/tendermint/tendermint/rpc/client" - rpchttp "github.com/tendermint/tendermint/rpc/client/http" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" @@ -95,12 +94,6 @@ func (ctx Context) WithOutputFormat(format string) Context { // WithNodeURI returns a copy of the context with an updated node URI. func (ctx Context) WithNodeURI(nodeURI string) Context { ctx.NodeURI = nodeURI - client, err := rpchttp.New(nodeURI, "/websocket") - if err != nil { - panic(err) - } - - ctx.Client = client return ctx } From ffced9ebefa1b92f0187636514c6f02a21571ee9 Mon Sep 17 00:00:00 2001 From: antstalepresh Date: Wed, 28 Oct 2020 23:31:45 +1000 Subject: [PATCH 011/136] modify title --- docs/architecture/adr-033-gov-split-vote.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/architecture/adr-033-gov-split-vote.md b/docs/architecture/adr-033-gov-split-vote.md index f8e914b4a0..d88ff773a8 100644 --- a/docs/architecture/adr-033-gov-split-vote.md +++ b/docs/architecture/adr-033-gov-split-vote.md @@ -1,4 +1,4 @@ -# ADR 028: Public Key Addresses +# ADR 033: Governance split votes ## Changelog From d83fc46b970c7bf8cac28b1a5cde5d3218a9f4ea Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 28 Oct 2020 14:39:23 +0100 Subject: [PATCH 012/136] build(deps): bump codecov/codecov-action from v1.0.13 to v1.0.14 (#7698) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Alessio Treglia Co-authored-by: Marko --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1976f21f0c..82003294f4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -151,7 +151,7 @@ jobs: sed -i.bak "/$(echo $filename | sed 's/\//\\\//g')/d" coverage.txt done if: env.GIT_DIFF - - uses: codecov/codecov-action@v1.0.13 + - uses: codecov/codecov-action@v1.0.14 with: file: ./coverage.txt if: env.GIT_DIFF From 1b0d6540d8d59c3df5d236884d2d36c15f55c6d9 Mon Sep 17 00:00:00 2001 From: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Date: Wed, 28 Oct 2020 16:57:48 +0100 Subject: [PATCH 013/136] ibc: internal audit part 1 (#7704) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ibc: internal audit part 1 * Update x/ibc/core/02-client/keeper/client.go * gofmt * fix tests Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com> Co-authored-by: Colin Axner --- x/ibc/core/02-client/abci_test.go | 8 +++++++ x/ibc/core/02-client/keeper/client.go | 18 +++++++------- x/ibc/core/02-client/keeper/client_test.go | 12 +++++----- x/ibc/core/02-client/keeper/keeper_test.go | 19 ++++++++++----- x/ibc/core/02-client/types/genesis.go | 2 +- x/ibc/core/02-client/types/proposal.go | 7 +++++- x/ibc/core/24-host/keys.go | 14 ++--------- x/ibc/core/24-host/parse.go | 10 -------- x/ibc/core/24-host/validate.go | 16 ++++++------- x/ibc/core/handler.go | 4 ++++ x/ibc/core/keeper/msg_server.go | 4 ---- x/ibc/core/keeper/msg_server_test.go | 28 ---------------------- 12 files changed, 57 insertions(+), 85 deletions(-) diff --git a/x/ibc/core/02-client/abci_test.go b/x/ibc/core/02-client/abci_test.go index 33774b7c53..fe9016750f 100644 --- a/x/ibc/core/02-client/abci_test.go +++ b/x/ibc/core/02-client/abci_test.go @@ -8,6 +8,7 @@ import ( client "github.com/cosmos/cosmos-sdk/x/ibc/core/02-client" "github.com/cosmos/cosmos-sdk/x/ibc/core/02-client/types" "github.com/cosmos/cosmos-sdk/x/ibc/core/exported" + localhosttypes "github.com/cosmos/cosmos-sdk/x/ibc/light-clients/09-localhost/types" ibctesting "github.com/cosmos/cosmos-sdk/x/ibc/testing" ) @@ -25,6 +26,13 @@ func (suite *ClientTestSuite) SetupTest() { suite.chainA = suite.coordinator.GetChain(ibctesting.GetChainID(0)) suite.chainB = suite.coordinator.GetChain(ibctesting.GetChainID(1)) + + // set localhost client + version := types.ParseChainID(suite.chainA.GetContext().ChainID()) + localHostClient := localhosttypes.NewClientState( + suite.chainA.GetContext().ChainID(), types.NewHeight(version, uint64(suite.chainA.GetContext().BlockHeight())), + ) + suite.chainA.App.IBCKeeper.ClientKeeper.SetClientState(suite.chainA.GetContext(), exported.Localhost, localHostClient) } func TestClientTestSuite(t *testing.T) { diff --git a/x/ibc/core/02-client/keeper/client.go b/x/ibc/core/02-client/keeper/client.go index 463df9ef46..49e9c62c88 100644 --- a/x/ibc/core/02-client/keeper/client.go +++ b/x/ibc/core/02-client/keeper/client.go @@ -22,6 +22,7 @@ func (k Keeper) CreateClient( return sdkerrors.Wrapf(types.ErrClientExists, "cannot create client with ID %s", clientID) } + // check if consensus state is nil in case the created client is Localhost if consensusState != nil { k.SetClientConsensusState(ctx, clientID, clientState.GetLatestHeight(), consensusState) } @@ -52,20 +53,15 @@ func (k Keeper) UpdateClient(ctx sdk.Context, clientID string, header exported.H return sdkerrors.Wrapf(types.ErrClientFrozen, "cannot update client with ID %s", clientID) } - var ( - consensusState exported.ConsensusState - consensusHeight exported.Height - err error - ) - - clientState, consensusState, err = clientState.CheckHeaderAndUpdateState(ctx, k.cdc, k.ClientStore(ctx, clientID), header) - + clientState, consensusState, err := clientState.CheckHeaderAndUpdateState(ctx, k.cdc, k.ClientStore(ctx, clientID), header) if err != nil { return sdkerrors.Wrapf(err, "cannot update client with ID %s", clientID) } k.SetClientState(ctx, clientID, clientState) + var consensusHeight exported.Height + // we don't set consensus state for localhost client if header != nil && clientID != exported.Localhost { k.SetClientConsensusState(ctx, clientID, header.GetHeight(), consensusState) @@ -116,7 +112,7 @@ func (k Keeper) UpgradeClient(ctx sdk.Context, clientID string, upgradedClient e err := clientState.VerifyUpgrade(ctx, k.cdc, k.ClientStore(ctx, clientID), upgradedClient, upgradeHeight, proofUpgrade) if err != nil { - return sdkerrors.Wrapf(err, "cannot upgrade client with ID: %s", clientID) + return sdkerrors.Wrapf(err, "cannot upgrade client with ID %s", clientID) } k.SetClientState(ctx, clientID, upgradedClient) @@ -155,6 +151,10 @@ func (k Keeper) CheckMisbehaviourAndUpdateState(ctx sdk.Context, misbehaviour ex return sdkerrors.Wrapf(types.ErrClientNotFound, "cannot check misbehaviour for client with ID %s", misbehaviour.GetClientID()) } + if clientState.IsFrozen() && clientState.GetFrozenHeight().LTE(misbehaviour.GetHeight()) { + return sdkerrors.Wrapf(types.ErrInvalidMisbehaviour, "client is already frozen at height ≤ misbehaviour height (%s ≤ %s)", clientState.GetFrozenHeight(), misbehaviour.GetHeight()) + } + clientState, err := clientState.CheckMisbehaviourAndUpdateState(ctx, k.cdc, k.ClientStore(ctx, misbehaviour.GetClientID()), misbehaviour) if err != nil { return err diff --git a/x/ibc/core/02-client/keeper/client_test.go b/x/ibc/core/02-client/keeper/client_test.go index d0e8a06254..31cf5d80fe 100644 --- a/x/ibc/core/02-client/keeper/client_test.go +++ b/x/ibc/core/02-client/keeper/client_test.go @@ -222,14 +222,14 @@ func (suite *KeeperTestSuite) TestUpdateClientTendermint() { } func (suite *KeeperTestSuite) TestUpdateClientLocalhost() { - var localhostClient exported.ClientState = localhosttypes.NewClientState(suite.header.Header.GetChainID(), types.NewHeight(0, uint64(suite.ctx.BlockHeight()))) + version := types.ParseChainID(suite.chainA.ChainID) + var localhostClient exported.ClientState = localhosttypes.NewClientState(suite.chainA.ChainID, types.NewHeight(version, uint64(suite.chainA.GetContext().BlockHeight()))) - suite.ctx = suite.ctx.WithBlockHeight(suite.ctx.BlockHeight() + 1) + ctx := suite.chainA.GetContext().WithBlockHeight(suite.chainA.GetContext().BlockHeight() + 1) + err := suite.chainA.App.IBCKeeper.ClientKeeper.UpdateClient(ctx, exported.Localhost, nil) + suite.Require().NoError(err) - err := suite.keeper.UpdateClient(suite.ctx, exported.Localhost, nil) - suite.Require().NoError(err, err) - - clientState, found := suite.keeper.GetClientState(suite.ctx, exported.Localhost) + clientState, found := suite.chainA.App.IBCKeeper.ClientKeeper.GetClientState(ctx, exported.Localhost) suite.Require().True(found) suite.Require().Equal(localhostClient.GetLatestHeight().(types.Height).Increment(), clientState.GetLatestHeight()) } diff --git a/x/ibc/core/02-client/keeper/keeper_test.go b/x/ibc/core/02-client/keeper/keeper_test.go index 9679353422..11db64a4d6 100644 --- a/x/ibc/core/02-client/keeper/keeper_test.go +++ b/x/ibc/core/02-client/keeper/keeper_test.go @@ -113,6 +113,13 @@ func (suite *KeeperTestSuite) SetupTest() { app.StakingKeeper.SetHistoricalInfo(suite.ctx, int64(i), &hi) } + // add localhost client + version := types.ParseChainID(suite.chainA.ChainID) + localHostClient := localhosttypes.NewClientState( + suite.chainA.ChainID, types.NewHeight(version, uint64(suite.chainA.GetContext().BlockHeight())), + ) + suite.chainA.App.IBCKeeper.ClientKeeper.SetClientState(suite.chainA.GetContext(), exported.Localhost, localHostClient) + queryHelper := baseapp.NewQueryServerTestHelper(suite.ctx, app.InterfaceRegistry()) types.RegisterQueryServer(queryHelper, app.IBCKeeper.ClientKeeper) suite.queryClient = types.NewQueryClient(queryHelper) @@ -245,15 +252,15 @@ func (suite KeeperTestSuite) TestGetAllClients() { } for i := range expClients { - suite.keeper.SetClientState(suite.ctx, clientIDs[i], expClients[i]) + suite.chainA.App.IBCKeeper.ClientKeeper.SetClientState(suite.chainA.GetContext(), clientIDs[i], expClients[i]) } // add localhost client - localHostClient, found := suite.keeper.GetClientState(suite.ctx, exported.Localhost) + localHostClient, found := suite.chainA.App.IBCKeeper.ClientKeeper.GetClientState(suite.chainA.GetContext(), exported.Localhost) suite.Require().True(found) expClients = append(expClients, localHostClient) - clients := suite.keeper.GetAllClients(suite.ctx) + clients := suite.chainA.App.IBCKeeper.ClientKeeper.GetAllClients(suite.chainA.GetContext()) suite.Require().Len(clients, len(expClients)) suite.Require().Equal(expClients, clients) } @@ -271,16 +278,16 @@ func (suite KeeperTestSuite) TestGetAllGenesisClients() { expGenClients := make([]types.IdentifiedClientState, len(expClients)) for i := range expClients { - suite.keeper.SetClientState(suite.ctx, clientIDs[i], expClients[i]) + suite.chainA.App.IBCKeeper.ClientKeeper.SetClientState(suite.chainA.GetContext(), clientIDs[i], expClients[i]) expGenClients[i] = types.NewIdentifiedClientState(clientIDs[i], expClients[i]) } // add localhost client - localHostClient, found := suite.keeper.GetClientState(suite.ctx, exported.Localhost) + localHostClient, found := suite.chainA.App.IBCKeeper.ClientKeeper.GetClientState(suite.chainA.GetContext(), exported.Localhost) suite.Require().True(found) expGenClients = append(expGenClients, types.NewIdentifiedClientState(exported.Localhost, localHostClient)) - genClients := suite.keeper.GetAllGenesisClients(suite.ctx) + genClients := suite.chainA.App.IBCKeeper.ClientKeeper.GetAllGenesisClients(suite.chainA.GetContext()) suite.Require().Equal(expGenClients, genClients) } diff --git a/x/ibc/core/02-client/types/genesis.go b/x/ibc/core/02-client/types/genesis.go index 77efae936e..c9be22f821 100644 --- a/x/ibc/core/02-client/types/genesis.go +++ b/x/ibc/core/02-client/types/genesis.go @@ -80,7 +80,7 @@ func DefaultGenesisState() GenesisState { return GenesisState{ Clients: []IdentifiedClientState{}, ClientsConsensus: ClientsConsensusStates{}, - CreateLocalhost: true, + CreateLocalhost: false, } } diff --git a/x/ibc/core/02-client/types/proposal.go b/x/ibc/core/02-client/types/proposal.go index b91fd1d06c..edbb4a8063 100644 --- a/x/ibc/core/02-client/types/proposal.go +++ b/x/ibc/core/02-client/types/proposal.go @@ -2,6 +2,7 @@ package types import ( govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + host "github.com/cosmos/cosmos-sdk/x/ibc/core/24-host" "github.com/cosmos/cosmos-sdk/x/ibc/core/exported" ) @@ -33,7 +34,7 @@ func (cup *ClientUpdateProposal) GetTitle() string { return cup.Title } // GetDescription returns the description of a client update proposal. func (cup *ClientUpdateProposal) GetDescription() string { return cup.Description } -// GetDescription returns the routing key of a client update proposal. +// ProposalRoute returns the routing key of a client update proposal. func (cup *ClientUpdateProposal) ProposalRoute() string { return RouterKey } // ProposalType returns the type of a client update proposal. @@ -46,6 +47,10 @@ func (cup *ClientUpdateProposal) ValidateBasic() error { return err } + if err := host.ClientIdentifierValidator(cup.ClientId); err != nil { + return err + } + header, err := UnpackHeader(cup.Header) if err != nil { return err diff --git a/x/ibc/core/24-host/keys.go b/x/ibc/core/24-host/keys.go index 50249552c0..c2f344028e 100644 --- a/x/ibc/core/24-host/keys.go +++ b/x/ibc/core/24-host/keys.go @@ -39,11 +39,6 @@ const ( KeyPacketReceiptPrefix = "receipts" ) -// KeyPrefixBytes return the key prefix bytes from a URL string format -func KeyPrefixBytes(prefix int) []byte { - return []byte(fmt.Sprintf("%d/", prefix)) -} - // FullClientPath returns the full path of a specific client path in the format: // "clients/{clientID}/{path}" as a string. func FullClientPath(clientID string, path string) string { @@ -87,7 +82,7 @@ func KeyConsensusState(height exported.Height) []byte { // ClientConnectionsPath defines a reverse mapping from clients to a set of connections func ClientConnectionsPath(clientID string) string { - return fmt.Sprintf("clients/%s/connections", clientID) + return fmt.Sprintf("%s/%s/connections", KeyClientStorePrefix, clientID) } // ConnectionPath defines the path under which connection paths are stored @@ -95,7 +90,7 @@ func ConnectionPath(connectionID string) string { return fmt.Sprintf("%s/%s", KeyConnectionPrefix, connectionID) } -// KeyClientConnections returns the store key for the connectios of a given client +// KeyClientConnections returns the store key for the connections of a given client func KeyClientConnections(clientID string) []byte { return []byte(ClientConnectionsPath(clientID)) } @@ -108,11 +103,6 @@ func KeyConnection(connectionID string) []byte { // ICS04 // The following paths are the keys to the store as defined in https://github.com/cosmos/ics/tree/master/spec/ics-004-channel-and-packet-semantics#store-paths -// GetChannelPortsKeysPrefix returns the prefix bytes for ICS04 and ICS05 iterators -func GetChannelPortsKeysPrefix(prefix int) []byte { - return []byte(fmt.Sprintf("%d/ports/", prefix)) -} - // ChannelPath defines the path under which channels are stored func ChannelPath(portID, channelID string) string { return fmt.Sprintf("%s/", KeyChannelPrefix) + channelPath(portID, channelID) diff --git a/x/ibc/core/24-host/parse.go b/x/ibc/core/24-host/parse.go index 31500c3463..7200c4ff00 100644 --- a/x/ibc/core/24-host/parse.go +++ b/x/ibc/core/24-host/parse.go @@ -6,16 +6,6 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) -// RemovePath is an util function to remove a path from a set. -func RemovePath(paths []string, path string) ([]string, bool) { - for i, p := range paths { - if p == path { - return append(paths[:i], paths[i+1:]...), true - } - } - return paths, false -} - // ParseConnectionPath returns the connection ID from a full path. It returns // an error if the provided path is invalid. func ParseConnectionPath(path string) (string, error) { diff --git a/x/ibc/core/24-host/validate.go b/x/ibc/core/24-host/validate.go index 0a8db56067..6d512fbe0c 100644 --- a/x/ibc/core/24-host/validate.go +++ b/x/ibc/core/24-host/validate.go @@ -56,29 +56,29 @@ func defaultIdentifierValidator(id string, min, max int) error { //nolint:unpara } // ClientIdentifierValidator is the default validator function for Client identifiers. -// A valid Identifier must be between 9-20 characters and only contain lowercase -// alphabetic characters, +// A valid Identifier must be between 9-64 characters and only contain lowercase +// alphabetic characters. func ClientIdentifierValidator(id string) error { return defaultIdentifierValidator(id, 9, DefaultMaxCharacterLength) } // ConnectionIdentifierValidator is the default validator function for Connection identifiers. -// A valid Identifier must be between 10-20 characters and only contain lowercase -// alphabetic characters, +// A valid Identifier must be between 10-64 characters and only contain lowercase +// alphabetic characters. func ConnectionIdentifierValidator(id string) error { return defaultIdentifierValidator(id, 10, DefaultMaxCharacterLength) } // ChannelIdentifierValidator is the default validator function for Channel identifiers. -// A valid Identifier must be between 10-20 characters and only contain lowercase -// alphabetic characters, +// A valid Identifier must be between 10-64 characters and only contain lowercase +// alphabetic characters. func ChannelIdentifierValidator(id string) error { return defaultIdentifierValidator(id, 10, DefaultMaxCharacterLength) } // PortIdentifierValidator is the default validator function for Port identifiers. -// A valid Identifier must be between 2-20 characters and only contain lowercase -// alphabetic characters, +// A valid Identifier must be between 2-64 characters and only contain lowercase +// alphabetic characters. func PortIdentifierValidator(id string) error { return defaultIdentifierValidator(id, 2, DefaultMaxCharacterLength) } diff --git a/x/ibc/core/handler.go b/x/ibc/core/handler.go index d2ef7f7b61..c8e4dfc898 100644 --- a/x/ibc/core/handler.go +++ b/x/ibc/core/handler.go @@ -24,6 +24,10 @@ func NewHandler(k keeper.Keeper) sdk.Handler { res, err := k.UpdateClient(sdk.WrapSDKContext(ctx), msg) return sdk.WrapServiceResult(ctx, res, err) + case *clienttypes.MsgUpgradeClient: + res, err := k.UpgradeClient(sdk.WrapSDKContext(ctx), msg) + return sdk.WrapServiceResult(ctx, res, err) + case *clienttypes.MsgSubmitMisbehaviour: res, err := k.SubmitMisbehaviour(sdk.WrapSDKContext(ctx), msg) return sdk.WrapServiceResult(ctx, res, err) diff --git a/x/ibc/core/keeper/msg_server.go b/x/ibc/core/keeper/msg_server.go index d448aca8b6..d26ea627b0 100644 --- a/x/ibc/core/keeper/msg_server.go +++ b/x/ibc/core/keeper/msg_server.go @@ -84,10 +84,6 @@ func (k Keeper) UpgradeClient(goCtx context.Context, msg *clienttypes.MsgUpgrade return nil, err } - if err := upgradedClient.Validate(); err != nil { - return nil, err - } - if err = k.ClientKeeper.UpgradeClient(ctx, msg.ClientId, upgradedClient, msg.UpgradeHeight, msg.ProofUpgrade); err != nil { return nil, err } diff --git a/x/ibc/core/keeper/msg_server_test.go b/x/ibc/core/keeper/msg_server_test.go index 2f3910fe71..0e1f6aab77 100644 --- a/x/ibc/core/keeper/msg_server_test.go +++ b/x/ibc/core/keeper/msg_server_test.go @@ -688,34 +688,6 @@ func (suite *KeeperTestSuite) TestUpgradeClient() { }, expPass: false, }, - { - name: "invalid clientstate", - setup: func() { - - upgradedClient = ibctmtypes.NewClientState("", ibctmtypes.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod+ibctesting.TrustingPeriod, ibctesting.MaxClockDrift, newClientHeight, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) - - // upgrade Height is at next block - upgradeHeight = clienttypes.NewHeight(0, uint64(suite.chainB.GetContext().BlockHeight()+1)) - - // zero custom fields and store in upgrade store - suite.chainB.App.UpgradeKeeper.SetUpgradedClient(suite.chainB.GetContext(), int64(upgradeHeight.GetVersionHeight()), upgradedClient) - - // commit upgrade store changes and update clients - - suite.coordinator.CommitBlock(suite.chainB) - err := suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, ibctesting.Tendermint) - suite.Require().NoError(err) - - cs, found := suite.chainA.App.IBCKeeper.ClientKeeper.GetClientState(suite.chainA.GetContext(), clientA) - suite.Require().True(found) - - proofUpgrade, _ := suite.chainB.QueryUpgradeProof(upgradetypes.UpgradedClientKey(int64(upgradeHeight.GetVersionHeight())), cs.GetLatestHeight().GetVersionHeight()) - - msg, err = clienttypes.NewMsgUpgradeClient(clientA, upgradedClient, upgradeHeight, proofUpgrade, suite.chainA.SenderAccount.GetAddress()) - suite.Require().NoError(err) - }, - expPass: false, - }, { name: "VerifyUpgrade fails", setup: func() { From 82f15f306e8a6a2e9ae3e122c348b579c43a3d92 Mon Sep 17 00:00:00 2001 From: Amaury Martiny Date: Wed, 28 Oct 2020 20:20:45 +0100 Subject: [PATCH 014/136] RegisterInterfaces registers service Msg type_urls (#7671) * Add RegisterMsgServiceDesc * Refactor newSendTxMsgServiceCmd * Add test * Register in all modules * Remove RegisterMsgServiceDesc from baseapp * Add explicit error message * Add comment * Update comment * Add test * Update comment * Remove duplicate import * Fix lint * Forgot vesting * Fix lint * Fix test * Put in types/module * Put in types/msgservice * Add comment about panic * Update baseapp/msg_service_router.go Co-authored-by: Robert Zaremba * Update baseapp/msg_service_router.go Co-authored-by: Robert Zaremba * Update baseapp/msg_service_router.go Co-authored-by: Robert Zaremba * Add comment * Add better test * Update baseapp/msg_service_router.go Co-authored-by: Marie Gauthier Co-authored-by: Robert Zaremba Co-authored-by: Marie Gauthier Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- baseapp/msg_service_router.go | 40 ++++----- baseapp/msg_service_router_test.go | 31 ++++++- testutil/testdata/codec.go | 3 + types/msgservice/msg_service.go | 44 ++++++++++ x/auth/client/cli/cli_test.go | 39 +++++++-- x/auth/vesting/types/codec.go | 3 + x/bank/client/cli/cli_test.go | 88 +------------------- x/bank/client/testutil/cli_helpers.go | 95 ++++++++++++++++++++++ x/bank/types/codec.go | 3 + x/crisis/types/codec.go | 3 + x/distribution/types/codec.go | 3 + x/evidence/types/codec.go | 3 + x/gov/types/codec.go | 3 + x/ibc/applications/transfer/types/codec.go | 3 + x/ibc/core/02-client/types/codec.go | 3 + x/ibc/core/03-connection/types/codec.go | 3 + x/ibc/core/04-channel/types/codec.go | 3 + x/slashing/types/codec.go | 3 + x/staking/types/codec.go | 3 + 19 files changed, 259 insertions(+), 117 deletions(-) create mode 100644 types/msgservice/msg_service.go diff --git a/baseapp/msg_service_router.go b/baseapp/msg_service_router.go index b02fbd10c0..b883faa37b 100644 --- a/baseapp/msg_service_router.go +++ b/baseapp/msg_service_router.go @@ -39,27 +39,32 @@ func (msr *MsgServiceRouter) Handler(methodName string) MsgServiceHandler { // RegisterService implements the gRPC Server.RegisterService method. sd is a gRPC // service description, handler is an object which implements that gRPC service. +// +// This function PANICs if it is called before the service `Msg`s have been +// registered using RegisterInterfaces. func (msr *MsgServiceRouter) RegisterService(sd *grpc.ServiceDesc, handler interface{}) { // Adds a top-level query handler based on the gRPC service name. for _, method := range sd.Methods { fqMethod := fmt.Sprintf("/%s/%s", sd.ServiceName, method.MethodName) methodHandler := method.Handler - // NOTE: This is how we pull the concrete request type for each handler for registering in the InterfaceRegistry. - // This approach is maybe a bit hacky, but less hacky than reflecting on the handler object itself. - // We use a no-op interceptor to avoid actually calling into the handler itself. - _, _ = methodHandler(nil, context.Background(), func(i interface{}) error { - msg, ok := i.(proto.Message) - if !ok { - // We panic here because there is no other alternative and the app cannot be initialized correctly - // this should only happen if there is a problem with code generation in which case the app won't - // work correctly anyway. - panic(fmt.Errorf("can't register request type %T for service method %s", i, fqMethod)) - } - - msr.interfaceRegistry.RegisterCustomTypeURL((*sdk.MsgRequest)(nil), fqMethod, msg) - return nil - }, noopInterceptor) + // Check that the service Msg fully-qualified method name has already + // been registered (via RegisterInterfaces). If the user registers a + // service without registering according service Msg type, there might be + // some unexpected behavior down the road. Since we can't return an error + // (`Server.RegisterService` interface restriction) we panic (at startup). + serviceMsg, err := msr.interfaceRegistry.Resolve(fqMethod) + if err != nil || serviceMsg == nil { + panic( + fmt.Errorf( + "type_url %s has not been registered yet. "+ + "Before calling RegisterService, you must register all interfaces by calling the `RegisterInterfaces` "+ + "method on module.BasicManager. Each module should call `msgservice.RegisterMsgServiceDesc` inside its "+ + "`RegisterInterfaces` method with the `_Msg_serviceDesc` generated by proto-gen", + fqMethod, + ), + ) + } msr.routes[fqMethod] = func(ctx sdk.Context, req sdk.MsgRequest) (*sdk.Result, error) { ctx = ctx.WithEventManager(sdk.NewEventManager()) @@ -89,9 +94,4 @@ func (msr *MsgServiceRouter) SetInterfaceRegistry(interfaceRegistry codectypes.I msr.interfaceRegistry = interfaceRegistry } -// gRPC NOOP interceptor -func noopInterceptor(_ context.Context, _ interface{}, _ *grpc.UnaryServerInfo, _ grpc.UnaryHandler) (interface{}, error) { - return nil, nil -} - func noopDecoder(_ interface{}) error { return nil } diff --git a/baseapp/msg_service_router_test.go b/baseapp/msg_service_router_test.go index d5e01acd17..bbbf9e1356 100644 --- a/baseapp/msg_service_router_test.go +++ b/baseapp/msg_service_router_test.go @@ -4,15 +4,13 @@ import ( "os" "testing" - "github.com/cosmos/cosmos-sdk/baseapp" - - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/libs/log" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" dbm "github.com/tendermint/tm-db" + "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client/tx" "github.com/cosmos/cosmos-sdk/simapp" "github.com/cosmos/cosmos-sdk/testutil/testdata" @@ -20,9 +18,34 @@ import ( authsigning "github.com/cosmos/cosmos-sdk/x/auth/signing" ) +func TestRegisterService(t *testing.T) { + db := dbm.NewMemDB() + + // Create an encoding config that doesn't register testdata Msg services. + encCfg := simapp.MakeTestEncodingConfig() + app := baseapp.NewBaseApp("test", log.NewTMLogger(log.NewSyncWriter(os.Stdout)), db, encCfg.TxConfig.TxDecoder()) + app.SetInterfaceRegistry(encCfg.InterfaceRegistry) + require.Panics(t, func() { + testdata.RegisterMsgServer( + app.MsgServiceRouter(), + testdata.MsgServerImpl{}, + ) + }) + + // Register testdata Msg services, and rerun `RegisterService`. + testdata.RegisterInterfaces(encCfg.InterfaceRegistry) + require.NotPanics(t, func() { + testdata.RegisterMsgServer( + app.MsgServiceRouter(), + testdata.MsgServerImpl{}, + ) + }) +} + func TestMsgService(t *testing.T) { priv, _, _ := testdata.KeyTestPubAddr() encCfg := simapp.MakeTestEncodingConfig() + testdata.RegisterInterfaces(encCfg.InterfaceRegistry) db := dbm.NewMemDB() app := baseapp.NewBaseApp("test", log.NewTMLogger(log.NewSyncWriter(os.Stdout)), db, encCfg.TxConfig.TxDecoder()) app.SetInterfaceRegistry(encCfg.InterfaceRegistry) diff --git a/testutil/testdata/codec.go b/testutil/testdata/codec.go index 54f63d03c2..d5c6e8abd2 100644 --- a/testutil/testdata/codec.go +++ b/testutil/testdata/codec.go @@ -5,6 +5,7 @@ import ( "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/msgservice" ) func NewTestInterfaceRegistry() types.InterfaceRegistry { @@ -30,6 +31,8 @@ func RegisterInterfaces(registry types.InterfaceRegistry) { (*HasHasAnimalI)(nil), &HasHasAnimal{}, ) + + msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) } func NewTestAmino() *amino.Codec { diff --git a/types/msgservice/msg_service.go b/types/msgservice/msg_service.go new file mode 100644 index 0000000000..277ee3d157 --- /dev/null +++ b/types/msgservice/msg_service.go @@ -0,0 +1,44 @@ +package msgservice + +import ( + "context" + "fmt" + + "github.com/gogo/protobuf/proto" + "google.golang.org/grpc" + + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" +) + +// RegisterMsgServiceDesc registers all type_urls from Msg services described +// in `sd` into the registry. +func RegisterMsgServiceDesc(registry codectypes.InterfaceRegistry, sd *grpc.ServiceDesc) { + // Adds a top-level type_url based on the Msg service name. + for _, method := range sd.Methods { + fqMethod := fmt.Sprintf("/%s/%s", sd.ServiceName, method.MethodName) + methodHandler := method.Handler + + // NOTE: This is how we pull the concrete request type for each handler for registering in the InterfaceRegistry. + // This approach is maybe a bit hacky, but less hacky than reflecting on the handler object itself. + // We use a no-op interceptor to avoid actually calling into the handler itself. + _, _ = methodHandler(nil, context.Background(), func(i interface{}) error { + msg, ok := i.(proto.Message) + if !ok { + // We panic here because there is no other alternative and the app cannot be initialized correctly + // this should only happen if there is a problem with code generation in which case the app won't + // work correctly anyway. + panic(fmt.Errorf("can't register request type %T for service method %s", i, fqMethod)) + } + + registry.RegisterCustomTypeURL((*sdk.MsgRequest)(nil), fqMethod, msg) + return nil + }, noopInterceptor) + + } +} + +// gRPC NOOP interceptor +func noopInterceptor(_ context.Context, _ interface{}, _ *grpc.UnaryServerInfo, _ grpc.UnaryHandler) (interface{}, error) { + return nil, nil +} diff --git a/x/auth/client/cli/cli_test.go b/x/auth/client/cli/cli_test.go index 0902501a79..4961e91c37 100644 --- a/x/auth/client/cli/cli_test.go +++ b/x/auth/client/cli/cli_test.go @@ -174,9 +174,11 @@ func (s *IntegrationTestSuite) TestCLIQueryTxCmd() { account2, err := val.ClientCtx.Keyring.Key("newAccount2") s.Require().NoError(err) - // Send coins. sendTokens := sdk.NewInt64Coin(s.cfg.BondDenom, 10) - out, err := bankcli.MsgSendExec( + + // Send coins, try both with legacy Msg and with Msg service. + // Legacy Msg. + legacyMsgOut, err := bankcli.MsgSendExec( val.ClientCtx, val.Address, account2.GetAddress(), @@ -187,31 +189,55 @@ func (s *IntegrationTestSuite) TestCLIQueryTxCmd() { fmt.Sprintf("--gas=%d", flags.DefaultGasLimit), ) s.Require().NoError(err) + var legacyMsgTxRes sdk.TxResponse + s.Require().NoError(val.ClientCtx.JSONMarshaler.UnmarshalJSON(legacyMsgOut.Bytes(), &legacyMsgTxRes)) + // Service Msg. + out, err := bankcli.ServiceMsgSendExec( + val.ClientCtx, + val.Address, + account2.GetAddress(), + sdk.NewCoins(sendTokens), + fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--gas=%d", flags.DefaultGasLimit), + ) + s.Require().NoError(err) var txRes sdk.TxResponse s.Require().NoError(val.ClientCtx.JSONMarshaler.UnmarshalJSON(out.Bytes(), &txRes)) s.Require().NoError(s.network.WaitForNextBlock()) testCases := []struct { - name string - args []string - expectErr bool + name string + args []string + expectErr bool + rawLogContains string }{ { "with invalid hash", []string{"somethinginvalid", fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, true, + "", }, { "with valid and not existing hash", []string{"C7E7D3A86A17AB3A321172239F3B61357937AF0F25D9FA4D2F4DCCAD9B0D7747", fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, true, + "", }, { - "happy case", + "happy case (legacy Msg)", + []string{legacyMsgTxRes.TxHash, fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, + false, + "", + }, + { + "happy case (service Msg)", []string{txRes.TxHash, fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, false, + "/cosmos.bank.v1beta1.Msg/Send", }, } @@ -230,6 +256,7 @@ func (s *IntegrationTestSuite) TestCLIQueryTxCmd() { var result sdk.TxResponse s.Require().NoError(val.ClientCtx.JSONMarshaler.UnmarshalJSON(out.Bytes(), &result)) s.Require().NotNil(result.Height) + s.Require().Contains(result.RawLog, tc.rawLogContains) } }) } diff --git a/x/auth/vesting/types/codec.go b/x/auth/vesting/types/codec.go index f5652ea017..eeaf80a95a 100644 --- a/x/auth/vesting/types/codec.go +++ b/x/auth/vesting/types/codec.go @@ -4,6 +4,7 @@ import ( "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/msgservice" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/cosmos/cosmos-sdk/x/auth/vesting/exported" ) @@ -49,6 +50,8 @@ func RegisterInterfaces(registry types.InterfaceRegistry) { (*sdk.Msg)(nil), &MsgCreateVestingAccount{}, ) + + msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) } var amino = codec.NewLegacyAmino() diff --git a/x/bank/client/cli/cli_test.go b/x/bank/client/cli/cli_test.go index c68be4ccd3..9b8c5cf612 100644 --- a/x/bank/client/cli/cli_test.go +++ b/x/bank/client/cli/cli_test.go @@ -5,13 +5,6 @@ import ( "fmt" "testing" - "github.com/spf13/cobra" - - "github.com/cosmos/cosmos-sdk/client/tx" - - "github.com/gogo/protobuf/grpc" - grpc2 "google.golang.org/grpc" - "github.com/gogo/protobuf/proto" "github.com/stretchr/testify/suite" tmcli "github.com/tendermint/tendermint/libs/cli" @@ -302,82 +295,6 @@ func (s *IntegrationTestSuite) TestNewSendTxCmd() { } } -// serviceMsgClientConn is an instance of grpc.ClientConn that is used to test building -// transactions with MsgClient's. It is intended to be replaced by the work in -// https://github.com/cosmos/cosmos-sdk/issues/7541 when that is ready. -type serviceMsgClientConn struct { - msgs []sdk.Msg -} - -func (t *serviceMsgClientConn) Invoke(_ context.Context, method string, args, _ interface{}, _ ...grpc2.CallOption) error { - req, ok := args.(sdk.MsgRequest) - if !ok { - return fmt.Errorf("%T should implement %T", args, (*sdk.MsgRequest)(nil)) - } - - err := req.ValidateBasic() - if err != nil { - return err - } - - t.msgs = append(t.msgs, sdk.ServiceMsg{ - MethodName: method, - Request: req, - }) - - return nil -} - -func (t *serviceMsgClientConn) NewStream(context.Context, *grpc2.StreamDesc, string, ...grpc2.CallOption) (grpc2.ClientStream, error) { - return nil, fmt.Errorf("not supported") -} - -var _ grpc.ClientConn = &serviceMsgClientConn{} - -// newSendTxMsgServiceCmd is just for the purpose of testing ServiceMsg's in an end-to-end case. It is effectively -// NewSendTxCmd but using MsgClient. -func newSendTxMsgServiceCmd() *cobra.Command { - cmd := &cobra.Command{ - Use: "send [from_key_or_address] [to_address] [amount]", - Short: `Send funds from one account to another. Note, the'--from' flag is -ignored as it is implied from [from_key_or_address].`, - Args: cobra.ExactArgs(3), - RunE: func(cmd *cobra.Command, args []string) error { - cmd.Flags().Set(flags.FlagFrom, args[0]) - - clientCtx := client.GetClientContextFromCmd(cmd) - clientCtx, err := client.ReadTxCommandFlags(clientCtx, cmd.Flags()) - if err != nil { - return err - } - - toAddr, err := sdk.AccAddressFromBech32(args[1]) - if err != nil { - return err - } - - coins, err := sdk.ParseCoins(args[2]) - if err != nil { - return err - } - - msg := types.NewMsgSend(clientCtx.GetFromAddress(), toAddr, coins) - svcMsgClientConn := &serviceMsgClientConn{} - bankMsgClient := types.NewMsgClient(svcMsgClientConn) - _, err = bankMsgClient.Send(context.Background(), msg) - if err != nil { - return err - } - - return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), svcMsgClientConn.msgs...) - }, - } - - flags.AddTxFlagsToCmd(cmd) - - return cmd -} - // TestBankMsgService does a basic test of whether or not service Msg's as defined // in ADR 031 work in the most basic end-to-end case. func (s *IntegrationTestSuite) TestBankMsgService() { @@ -419,10 +336,7 @@ func (s *IntegrationTestSuite) TestBankMsgService() { s.Run(tc.name, func() { clientCtx := val.ClientCtx - args := []string{tc.from.String(), tc.to.String(), tc.amount.String()} - args = append(args, tc.args...) - - bz, err := clitestutil.ExecTestCLICmd(clientCtx, newSendTxMsgServiceCmd(), args) + bz, err := banktestutil.ServiceMsgSendExec(clientCtx, tc.from, tc.to, tc.amount, tc.args...) if tc.expectErr { s.Require().Error(err) } else { diff --git a/x/bank/client/testutil/cli_helpers.go b/x/bank/client/testutil/cli_helpers.go index a1a33c4f67..4dff74e2b5 100644 --- a/x/bank/client/testutil/cli_helpers.go +++ b/x/bank/client/testutil/cli_helpers.go @@ -1,14 +1,22 @@ package testutil import ( + "context" "fmt" + gogogrpc "github.com/gogo/protobuf/grpc" + "github.com/spf13/cobra" "github.com/tendermint/tendermint/libs/cli" + grpc "google.golang.org/grpc" "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/flags" + "github.com/cosmos/cosmos-sdk/client/tx" "github.com/cosmos/cosmos-sdk/testutil" clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" + sdk "github.com/cosmos/cosmos-sdk/types" bankcli "github.com/cosmos/cosmos-sdk/x/bank/client/cli" + "github.com/cosmos/cosmos-sdk/x/bank/types" ) func MsgSendExec(clientCtx client.Context, from, to, amount fmt.Stringer, extraArgs ...string) (testutil.BufferWriter, error) { @@ -24,3 +32,90 @@ func QueryBalancesExec(clientCtx client.Context, address fmt.Stringer, extraArgs return clitestutil.ExecTestCLICmd(clientCtx, bankcli.GetBalancesCmd(), args) } + +// serviceMsgClientConn is an instance of grpc.ClientConn that is used to test building +// transactions with MsgClient's. It is intended to be replaced by the work in +// https://github.com/cosmos/cosmos-sdk/issues/7541 when that is ready. +type serviceMsgClientConn struct { + msgs []sdk.Msg +} + +func (t *serviceMsgClientConn) Invoke(_ context.Context, method string, args, _ interface{}, _ ...grpc.CallOption) error { + req, ok := args.(sdk.MsgRequest) + if !ok { + return fmt.Errorf("%T should implement %T", args, (*sdk.MsgRequest)(nil)) + } + + err := req.ValidateBasic() + if err != nil { + return err + } + + t.msgs = append(t.msgs, sdk.ServiceMsg{ + MethodName: method, + Request: req, + }) + + return nil +} + +func (t *serviceMsgClientConn) NewStream(context.Context, *grpc.StreamDesc, string, ...grpc.CallOption) (grpc.ClientStream, error) { + return nil, fmt.Errorf("not supported") +} + +var _ gogogrpc.ClientConn = &serviceMsgClientConn{} + +// newSendTxMsgServiceCmd is just for the purpose of testing ServiceMsg's in an end-to-end case. It is effectively +// NewSendTxCmd but using MsgClient. +func newSendTxMsgServiceCmd() *cobra.Command { + cmd := &cobra.Command{ + Use: "send [from_key_or_address] [to_address] [amount]", + Short: `Send funds from one account to another. Note, the'--from' flag is +ignored as it is implied from [from_key_or_address].`, + Args: cobra.ExactArgs(3), + RunE: func(cmd *cobra.Command, args []string) error { + cmd.Flags().Set(flags.FlagFrom, args[0]) + + clientCtx := client.GetClientContextFromCmd(cmd) + clientCtx, err := client.ReadTxCommandFlags(clientCtx, cmd.Flags()) + if err != nil { + return err + } + + toAddr, err := sdk.AccAddressFromBech32(args[1]) + if err != nil { + return err + } + + coins, err := sdk.ParseCoins(args[2]) + if err != nil { + return err + } + + msg := types.NewMsgSend(clientCtx.GetFromAddress(), toAddr, coins) + svcMsgClientConn := &serviceMsgClientConn{} + bankMsgClient := types.NewMsgClient(svcMsgClientConn) + _, err = bankMsgClient.Send(context.Background(), msg) + if err != nil { + return err + } + + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), svcMsgClientConn.msgs...) + }, + } + + flags.AddTxFlagsToCmd(cmd) + + return cmd +} + +// ServiceMsgSendExec is a temporary method to test Msg services in CLI using +// x/bank's Msg/Send service. After https://github.com/cosmos/cosmos-sdk/issues/7541 +// is merged, this method should be removed, and we should prefer MsgSendExec +// instead. +func ServiceMsgSendExec(clientCtx client.Context, from, to, amount fmt.Stringer, extraArgs ...string) (testutil.BufferWriter, error) { + args := []string{from.String(), to.String(), amount.String()} + args = append(args, extraArgs...) + + return clitestutil.ExecTestCLICmd(clientCtx, newSendTxMsgServiceCmd(), args) +} diff --git a/x/bank/types/codec.go b/x/bank/types/codec.go index 42c117e24a..ef1c897d97 100644 --- a/x/bank/types/codec.go +++ b/x/bank/types/codec.go @@ -5,6 +5,7 @@ import ( "github.com/cosmos/cosmos-sdk/codec/types" cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/msgservice" "github.com/cosmos/cosmos-sdk/x/bank/exported" ) @@ -28,6 +29,8 @@ func RegisterInterfaces(registry types.InterfaceRegistry) { (*exported.SupplyI)(nil), &Supply{}, ) + + msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) } var ( diff --git a/x/crisis/types/codec.go b/x/crisis/types/codec.go index 3b5dd5eb5a..ac02c54630 100644 --- a/x/crisis/types/codec.go +++ b/x/crisis/types/codec.go @@ -5,6 +5,7 @@ import ( codectypes "github.com/cosmos/cosmos-sdk/codec/types" cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/msgservice" ) // RegisterLegacyAminoCodec registers the necessary x/crisis interfaces and concrete types @@ -17,6 +18,8 @@ func RegisterInterfaces(registry codectypes.InterfaceRegistry) { registry.RegisterImplementations((*sdk.Msg)(nil), &MsgVerifyInvariant{}, ) + + msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) } var ( diff --git a/x/distribution/types/codec.go b/x/distribution/types/codec.go index 8d0e81f370..73aca45060 100644 --- a/x/distribution/types/codec.go +++ b/x/distribution/types/codec.go @@ -5,6 +5,7 @@ import ( "github.com/cosmos/cosmos-sdk/codec/types" cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/msgservice" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" ) @@ -30,6 +31,8 @@ func RegisterInterfaces(registry types.InterfaceRegistry) { (*govtypes.Content)(nil), &CommunityPoolSpendProposal{}, ) + + msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) } var ( diff --git a/x/evidence/types/codec.go b/x/evidence/types/codec.go index b75d9efb4f..9de2743e38 100644 --- a/x/evidence/types/codec.go +++ b/x/evidence/types/codec.go @@ -5,6 +5,7 @@ import ( "github.com/cosmos/cosmos-sdk/codec/types" cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/msgservice" "github.com/cosmos/cosmos-sdk/x/evidence/exported" ) @@ -23,6 +24,8 @@ func RegisterInterfaces(registry types.InterfaceRegistry) { (*exported.Evidence)(nil), &Equivocation{}, ) + + msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) } var ( diff --git a/x/gov/types/codec.go b/x/gov/types/codec.go index 85bac043ab..46deb5c59e 100644 --- a/x/gov/types/codec.go +++ b/x/gov/types/codec.go @@ -5,6 +5,7 @@ import ( "github.com/cosmos/cosmos-sdk/codec/types" cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/msgservice" ) // RegisterLegacyAminoCodec registers all the necessary types and interfaces for the @@ -28,6 +29,8 @@ func RegisterInterfaces(registry types.InterfaceRegistry) { (*Content)(nil), &TextProposal{}, ) + + msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) } // RegisterProposalTypeCodec registers an external proposal content type defined diff --git a/x/ibc/applications/transfer/types/codec.go b/x/ibc/applications/transfer/types/codec.go index e7ee37abb4..18b594f8a7 100644 --- a/x/ibc/applications/transfer/types/codec.go +++ b/x/ibc/applications/transfer/types/codec.go @@ -4,12 +4,15 @@ import ( "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/msgservice" ) // RegisterInterfaces register the ibc transfer module interfaces to protobuf // Any. func RegisterInterfaces(registry codectypes.InterfaceRegistry) { registry.RegisterImplementations((*sdk.Msg)(nil), &MsgTransfer{}) + + msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) } var ( diff --git a/x/ibc/core/02-client/types/codec.go b/x/ibc/core/02-client/types/codec.go index 76402a1116..d3cb8f7a5f 100644 --- a/x/ibc/core/02-client/types/codec.go +++ b/x/ibc/core/02-client/types/codec.go @@ -6,6 +6,7 @@ import ( codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/cosmos/cosmos-sdk/types/msgservice" "github.com/cosmos/cosmos-sdk/x/ibc/core/exported" ) @@ -41,6 +42,8 @@ func RegisterInterfaces(registry codectypes.InterfaceRegistry) { &MsgUpdateClient{}, &MsgSubmitMisbehaviour{}, ) + + msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) } // PackClientState constructs a new Any packed with the given client state value. It returns diff --git a/x/ibc/core/03-connection/types/codec.go b/x/ibc/core/03-connection/types/codec.go index c784590d0c..6105fa9ee1 100644 --- a/x/ibc/core/03-connection/types/codec.go +++ b/x/ibc/core/03-connection/types/codec.go @@ -4,6 +4,7 @@ import ( "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/msgservice" "github.com/cosmos/cosmos-sdk/x/ibc/core/exported" ) @@ -32,6 +33,8 @@ func RegisterInterfaces(registry codectypes.InterfaceRegistry) { &MsgConnectionOpenAck{}, &MsgConnectionOpenConfirm{}, ) + + msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) } var ( diff --git a/x/ibc/core/04-channel/types/codec.go b/x/ibc/core/04-channel/types/codec.go index 6ea150a792..a74f0a7fc9 100644 --- a/x/ibc/core/04-channel/types/codec.go +++ b/x/ibc/core/04-channel/types/codec.go @@ -4,6 +4,7 @@ import ( "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/msgservice" "github.com/cosmos/cosmos-sdk/x/ibc/core/exported" ) @@ -47,6 +48,8 @@ func RegisterInterfaces(registry codectypes.InterfaceRegistry) { &MsgTimeout{}, &MsgTimeoutOnClose{}, ) + + msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) } // SubModuleCdc references the global x/ibc/core/04-channel module codec. Note, the codec should diff --git a/x/slashing/types/codec.go b/x/slashing/types/codec.go index a6edce9fb9..bc89862f1b 100644 --- a/x/slashing/types/codec.go +++ b/x/slashing/types/codec.go @@ -5,6 +5,7 @@ import ( "github.com/cosmos/cosmos-sdk/codec/types" cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/msgservice" ) // RegisterLegacyAminoCodec registers concrete types on LegacyAmino codec @@ -16,6 +17,8 @@ func RegisterInterfaces(registry types.InterfaceRegistry) { registry.RegisterImplementations((*sdk.Msg)(nil), &MsgUnjail{}, ) + + msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) } var ( diff --git a/x/staking/types/codec.go b/x/staking/types/codec.go index b4b3c353dc..714554a33c 100644 --- a/x/staking/types/codec.go +++ b/x/staking/types/codec.go @@ -5,6 +5,7 @@ import ( "github.com/cosmos/cosmos-sdk/codec/types" cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/msgservice" ) // RegisterLegacyAminoCodec registers the necessary x/staking interfaces and concrete types @@ -26,6 +27,8 @@ func RegisterInterfaces(registry types.InterfaceRegistry) { &MsgUndelegate{}, &MsgBeginRedelegate{}, ) + + msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) } var ( From 536eb689dca9e5456bece211ca9da604714865c3 Mon Sep 17 00:00:00 2001 From: Cory Date: Thu, 29 Oct 2020 04:37:46 -0700 Subject: [PATCH 015/136] Add Deprecation headers for legacy rest endpoints (#7686) * add deprecation headers for legacy rest endpoints * add deprecation headers for missing tx routes * rm handler-level deprecation headers * switch to middleware Route.Use method for setting deprecation Headers * set deprecation headers using subrouter * cleanup gofmt * goimports * Update client/rest/rest.go * update deprecation headers to be set on each module individually Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- client/docs/swagger-ui/swagger-ui-bundle.js | 2 +- client/docs/swagger_legacy.yaml | 2 +- client/rest/rest.go | 27 +++++++++++++++++++++ types/module/module.go | 3 +-- x/auth/client/rest/rest.go | 7 ++++-- x/bank/client/rest/rest.go | 4 ++- x/distribution/client/rest/rest.go | 5 +++- x/evidence/client/rest/rest.go | 5 +++- x/gov/client/rest/rest.go | 4 ++- x/mint/client/rest/rest.go | 4 ++- x/slashing/client/rest/rest.go | 5 +++- x/staking/client/rest/rest.go | 4 ++- x/upgrade/client/rest/rest.go | 4 ++- 13 files changed, 62 insertions(+), 14 deletions(-) create mode 100644 client/rest/rest.go diff --git a/client/docs/swagger-ui/swagger-ui-bundle.js b/client/docs/swagger-ui/swagger-ui-bundle.js index 4491b4b284..07eceace93 100644 --- a/client/docs/swagger-ui/swagger-ui-bundle.js +++ b/client/docs/swagger-ui/swagger-ui-bundle.js @@ -41773,4 +41773,4 @@ }, o.resolve = i, e.exports = o, o.id = 1058 }]) }); -//# sourceMappingURL=swagger-ui-bundle.js.map \ No newline at end of file +//# sourceMappingURL=swagger-ui-bundle.js.map diff --git a/client/docs/swagger_legacy.yaml b/client/docs/swagger_legacy.yaml index 6e996d42cd..fe00efa484 100644 --- a/client/docs/swagger_legacy.yaml +++ b/client/docs/swagger_legacy.yaml @@ -2595,4 +2595,4 @@ definitions: total: type: array items: - $ref: "#/definitions/Coin" \ No newline at end of file + $ref: "#/definitions/Coin" diff --git a/client/rest/rest.go b/client/rest/rest.go new file mode 100644 index 0000000000..9a0f901840 --- /dev/null +++ b/client/rest/rest.go @@ -0,0 +1,27 @@ +package rest + +import ( + "net/http" + + "github.com/gorilla/mux" +) + +// addHTTPDeprecationHeaders is a mux middleware function for adding HTTP +// Deprecation headers to a http handler +func addHTTPDeprecationHeaders(h http.Handler) http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Deprecation", "true") + w.Header().Set("Link", "; rel=\"deprecation\"") + w.Header().Set("Warning", "199 - \"this endpoint is deprecated and may not work as before, see deprecation link for more info\"") + h.ServeHTTP(w, r) + }) +} + +// WithHTTPDeprecationHeaders returns a new *mux.Router, identical to its input +// but with the addition of HTTP Deprecation headers. This is used to mark legacy +// amino REST endpoints as deprecated in the REST API. +func WithHTTPDeprecationHeaders(r *mux.Router) *mux.Router { + subRouter := r.NewRoute().Subrouter() + subRouter.Use(addHTTPDeprecationHeaders) + return subRouter +} diff --git a/types/module/module.go b/types/module/module.go index 97319e5d00..6b678745e2 100644 --- a/types/module/module.go +++ b/types/module/module.go @@ -31,9 +31,8 @@ package module import ( "encoding/json" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/gorilla/mux" + "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" abci "github.com/tendermint/tendermint/abci/types" diff --git a/x/auth/client/rest/rest.go b/x/auth/client/rest/rest.go index d3106edca2..77f8f48964 100644 --- a/x/auth/client/rest/rest.go +++ b/x/auth/client/rest/rest.go @@ -4,6 +4,7 @@ import ( "github.com/gorilla/mux" "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/rest" ) // REST query and parameter values @@ -12,7 +13,8 @@ const ( ) // RegisterRoutes registers the auth module REST routes. -func RegisterRoutes(clientCtx client.Context, r *mux.Router, storeName string) { +func RegisterRoutes(clientCtx client.Context, rtr *mux.Router, storeName string) { + r := rest.WithHTTPDeprecationHeaders(rtr) r.HandleFunc( "/auth/accounts/{address}", QueryAccountRequestHandlerFn(storeName, clientCtx), ).Methods(MethodGet) @@ -24,7 +26,8 @@ func RegisterRoutes(clientCtx client.Context, r *mux.Router, storeName string) { } // RegisterTxRoutes registers all transaction routes on the provided router. -func RegisterTxRoutes(clientCtx client.Context, r *mux.Router) { +func RegisterTxRoutes(clientCtx client.Context, rtr *mux.Router) { + r := rest.WithHTTPDeprecationHeaders(rtr) r.HandleFunc("/txs/{hash}", QueryTxRequestHandlerFn(clientCtx)).Methods("GET") r.HandleFunc("/txs", QueryTxsRequestHandlerFn(clientCtx)).Methods("GET") r.HandleFunc("/txs", BroadcastTxRequest(clientCtx)).Methods("POST") diff --git a/x/bank/client/rest/rest.go b/x/bank/client/rest/rest.go index e70a946d26..4325386d44 100644 --- a/x/bank/client/rest/rest.go +++ b/x/bank/client/rest/rest.go @@ -1,6 +1,7 @@ package rest import ( + "github.com/cosmos/cosmos-sdk/client/rest" "github.com/gorilla/mux" "github.com/cosmos/cosmos-sdk/client" @@ -8,7 +9,8 @@ import ( // RegisterHandlers registers all x/bank transaction and query HTTP REST handlers // on the provided mux router. -func RegisterHandlers(clientCtx client.Context, r *mux.Router) { +func RegisterHandlers(clientCtx client.Context, rtr *mux.Router) { + r := rest.WithHTTPDeprecationHeaders(rtr) r.HandleFunc("/bank/accounts/{address}/transfers", NewSendRequestHandlerFn(clientCtx)).Methods("POST") r.HandleFunc("/bank/balances/{address}", QueryBalancesRequestHandlerFn(clientCtx)).Methods("GET") r.HandleFunc("/bank/total", totalSupplyHandlerFn(clientCtx)).Methods("GET") diff --git a/x/distribution/client/rest/rest.go b/x/distribution/client/rest/rest.go index 0269e92611..3fdcef89e1 100644 --- a/x/distribution/client/rest/rest.go +++ b/x/distribution/client/rest/rest.go @@ -6,6 +6,7 @@ import ( "github.com/gorilla/mux" "github.com/cosmos/cosmos-sdk/client" + clientrest "github.com/cosmos/cosmos-sdk/client/rest" "github.com/cosmos/cosmos-sdk/client/tx" "github.com/cosmos/cosmos-sdk/types/rest" "github.com/cosmos/cosmos-sdk/x/distribution/types" @@ -13,7 +14,9 @@ import ( govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" ) -func RegisterHandlers(clientCtx client.Context, r *mux.Router) { +func RegisterHandlers(clientCtx client.Context, rtr *mux.Router) { + r := clientrest.WithHTTPDeprecationHeaders(rtr) + registerQueryRoutes(clientCtx, r) registerTxHandlers(clientCtx, r) } diff --git a/x/evidence/client/rest/rest.go b/x/evidence/client/rest/rest.go index 89756eb58a..f2714cc7ba 100644 --- a/x/evidence/client/rest/rest.go +++ b/x/evidence/client/rest/rest.go @@ -4,6 +4,7 @@ import ( "net/http" "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/rest" "github.com/gorilla/mux" ) @@ -24,7 +25,9 @@ type EvidenceRESTHandler struct { // RegisterRoutes registers all Evidence submission handlers for the evidence module's // REST service handler. -func RegisterRoutes(clientCtx client.Context, r *mux.Router, handlers []EvidenceRESTHandler) { +func RegisterRoutes(clientCtx client.Context, rtr *mux.Router, handlers []EvidenceRESTHandler) { + r := rest.WithHTTPDeprecationHeaders(rtr) + registerQueryRoutes(clientCtx, r) registerTxRoutes(clientCtx, r, handlers) } diff --git a/x/gov/client/rest/rest.go b/x/gov/client/rest/rest.go index 5136e19ea1..f11798e967 100644 --- a/x/gov/client/rest/rest.go +++ b/x/gov/client/rest/rest.go @@ -6,6 +6,7 @@ import ( "github.com/gorilla/mux" "github.com/cosmos/cosmos-sdk/client" + clientrest "github.com/cosmos/cosmos-sdk/client/rest" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/rest" ) @@ -28,7 +29,8 @@ type ProposalRESTHandler struct { Handler func(http.ResponseWriter, *http.Request) } -func RegisterHandlers(clientCtx client.Context, r *mux.Router, phs []ProposalRESTHandler) { +func RegisterHandlers(clientCtx client.Context, rtr *mux.Router, phs []ProposalRESTHandler) { + r := clientrest.WithHTTPDeprecationHeaders(rtr) registerQueryRoutes(clientCtx, r) registerTxHandlers(clientCtx, r, phs) } diff --git a/x/mint/client/rest/rest.go b/x/mint/client/rest/rest.go index a159739a0b..2ed28d41d7 100644 --- a/x/mint/client/rest/rest.go +++ b/x/mint/client/rest/rest.go @@ -4,9 +4,11 @@ import ( "github.com/gorilla/mux" "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/rest" ) // RegisterRoutes registers minting module REST handlers on the provided router. -func RegisterRoutes(clientCtx client.Context, r *mux.Router) { +func RegisterRoutes(clientCtx client.Context, rtr *mux.Router) { + r := rest.WithHTTPDeprecationHeaders(rtr) registerQueryRoutes(clientCtx, r) } diff --git a/x/slashing/client/rest/rest.go b/x/slashing/client/rest/rest.go index cdce1a34a0..21d73a5e88 100644 --- a/x/slashing/client/rest/rest.go +++ b/x/slashing/client/rest/rest.go @@ -1,12 +1,15 @@ package rest import ( + "github.com/cosmos/cosmos-sdk/client/rest" "github.com/gorilla/mux" "github.com/cosmos/cosmos-sdk/client" ) -func RegisterHandlers(clientCtx client.Context, r *mux.Router) { +func RegisterHandlers(clientCtx client.Context, rtr *mux.Router) { + r := rest.WithHTTPDeprecationHeaders(rtr) + registerQueryRoutes(clientCtx, r) registerTxHandlers(clientCtx, r) } diff --git a/x/staking/client/rest/rest.go b/x/staking/client/rest/rest.go index cdce1a34a0..bb4e82917c 100644 --- a/x/staking/client/rest/rest.go +++ b/x/staking/client/rest/rest.go @@ -1,12 +1,14 @@ package rest import ( + "github.com/cosmos/cosmos-sdk/client/rest" "github.com/gorilla/mux" "github.com/cosmos/cosmos-sdk/client" ) -func RegisterHandlers(clientCtx client.Context, r *mux.Router) { +func RegisterHandlers(clientCtx client.Context, rtr *mux.Router) { + r := rest.WithHTTPDeprecationHeaders(rtr) registerQueryRoutes(clientCtx, r) registerTxHandlers(clientCtx, r) } diff --git a/x/upgrade/client/rest/rest.go b/x/upgrade/client/rest/rest.go index cdb078e7da..83577c0cbc 100644 --- a/x/upgrade/client/rest/rest.go +++ b/x/upgrade/client/rest/rest.go @@ -1,13 +1,15 @@ package rest import ( + "github.com/cosmos/cosmos-sdk/client/rest" "github.com/gorilla/mux" "github.com/cosmos/cosmos-sdk/client" ) // RegisterRoutes registers REST routes for the upgrade module under the path specified by routeName. -func RegisterRoutes(clientCtx client.Context, r *mux.Router) { +func RegisterRoutes(clientCtx client.Context, rtr *mux.Router) { + r := rest.WithHTTPDeprecationHeaders(rtr) registerQueryRoutes(clientCtx, r) registerTxHandlers(clientCtx, r) } From b7b925a1acf6d48e4ba08737b65bb540ee0920a7 Mon Sep 17 00:00:00 2001 From: Aditya Date: Thu, 29 Oct 2020 12:17:37 +0000 Subject: [PATCH 016/136] Sort validators like tendermint in HistoricalInfo (#7691) * sort validators like tendermint * address comments * switch ordering in tests * change sort logic in error case * don't change test validators array order Co-authored-by: Jack Zampolin Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- x/staking/keeper/historical_info_test.go | 11 +++++---- x/staking/keeper/keeper_test.go | 6 ++++- x/staking/types/historical_info.go | 3 ++- x/staking/types/validator.go | 25 +++++++++++++++++++ x/staking/types/validator_test.go | 31 ++++++++++++++++++++++++ 5 files changed, 69 insertions(+), 7 deletions(-) diff --git a/x/staking/keeper/historical_info_test.go b/x/staking/keeper/historical_info_test.go index 0ccdee9408..a9411d0db9 100644 --- a/x/staking/keeper/historical_info_test.go +++ b/x/staking/keeper/historical_info_test.go @@ -31,7 +31,7 @@ func TestHistoricalInfo(t *testing.T) { recv, found := app.StakingKeeper.GetHistoricalInfo(ctx, 2) require.True(t, found, "HistoricalInfo not found after set") require.Equal(t, hi, recv, "HistoricalInfo not equal") - require.True(t, sort.IsSorted(types.Validators(recv.Valset)), "HistoricalInfo validators is not sorted") + require.True(t, sort.IsSorted(types.ValidatorsByVotingPower(recv.Valset)), "HistoricalInfo validators is not sorted") app.StakingKeeper.DeleteHistoricalInfo(ctx, 2) @@ -76,15 +76,16 @@ func TestTrackHistoricalInfo(t *testing.T) { require.True(t, found) require.Equal(t, hi5, recv) - // Set last validators in keeper + // Set bonded validators in keeper val1 := teststaking.NewValidator(t, addrVals[2], PKs[2]) app.StakingKeeper.SetValidator(ctx, val1) app.StakingKeeper.SetLastValidatorPower(ctx, val1.GetOperator(), 10) val2 := teststaking.NewValidator(t, addrVals[3], PKs[3]) - vals := []types.Validator{val1, val2} - sort.Sort(types.Validators(vals)) app.StakingKeeper.SetValidator(ctx, val2) - app.StakingKeeper.SetLastValidatorPower(ctx, val2.GetOperator(), 8) + app.StakingKeeper.SetLastValidatorPower(ctx, val2.GetOperator(), 80) + + vals := []types.Validator{val1, val2} + sort.Sort(types.ValidatorsByVotingPower(vals)) // Set Header for BeginBlock context header := tmproto.Header{ diff --git a/x/staking/keeper/keeper_test.go b/x/staking/keeper/keeper_test.go index 0342dfea9b..2f9819989f 100644 --- a/x/staking/keeper/keeper_test.go +++ b/x/staking/keeper/keeper_test.go @@ -41,7 +41,11 @@ func (suite *KeeperTestSuite) SetupTest() { Height: 5, } - hi := types.NewHistoricalInfo(header, validators) + // sort a copy of the validators, so that original validators does not + // have its order changed + sortedVals := make([]types.Validator, len(validators)) + copy(sortedVals, validators) + hi := types.NewHistoricalInfo(header, sortedVals) app.StakingKeeper.SetHistoricalInfo(ctx, 5, &hi) suite.app, suite.ctx, suite.queryClient, suite.addrs, suite.vals = app, ctx, queryClient, addrs, validators diff --git a/x/staking/types/historical_info.go b/x/staking/types/historical_info.go index 10df3ced02..1a8461ad13 100644 --- a/x/staking/types/historical_info.go +++ b/x/staking/types/historical_info.go @@ -14,7 +14,8 @@ import ( // NewHistoricalInfo will create a historical information struct from header and valset // it will first sort valset before inclusion into historical info func NewHistoricalInfo(header tmproto.Header, valSet Validators) HistoricalInfo { - sort.Sort(valSet) + // Must sort in the same way that tendermint does + sort.Sort(ValidatorsByVotingPower(valSet)) return HistoricalInfo{ Header: header, diff --git a/x/staking/types/validator.go b/x/staking/types/validator.go index 8b5cfcdf14..19e032dbab 100644 --- a/x/staking/types/validator.go +++ b/x/staking/types/validator.go @@ -123,6 +123,31 @@ func (v Validators) Swap(i, j int) { v[j] = it } +// ValidatorsByVotingPower implements sort.Interface for []Validator based on +// the VotingPower and Address fields. +// The validators are sorted first by their voting power (descending). Secondary index - Address (ascending). +// Copied from tendermint/types/validator_set.go +type ValidatorsByVotingPower []Validator + +func (valz ValidatorsByVotingPower) Len() int { return len(valz) } + +func (valz ValidatorsByVotingPower) Less(i, j int) bool { + if valz[i].ConsensusPower() == valz[j].ConsensusPower() { + addrI, errI := valz[i].GetConsAddr() + addrJ, errJ := valz[j].GetConsAddr() + // If either returns error, then return false + if errI != nil || errJ != nil { + return false + } + return bytes.Compare(addrI, addrJ) == -1 + } + return valz[i].ConsensusPower() > valz[j].ConsensusPower() +} + +func (valz ValidatorsByVotingPower) Swap(i, j int) { + valz[i], valz[j] = valz[j], valz[i] +} + // UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces func (v Validators) UnpackInterfaces(c codectypes.AnyUnpacker) error { for i := range v { diff --git a/x/staking/types/validator_test.go b/x/staking/types/validator_test.go index 2e9d961169..64afc97681 100644 --- a/x/staking/types/validator_test.go +++ b/x/staking/types/validator_test.go @@ -274,6 +274,37 @@ func TestValidatorsSortDeterminism(t *testing.T) { } } +// Check SortTendermint sorts the same as tendermint +func TestValidatorsSortTendermint(t *testing.T) { + vals := make([]Validator, 100) + + for i := range vals { + pk := ed25519.GenPrivKey().PubKey() + pk2 := ed25519.GenPrivKey().PubKey() + vals[i] = newValidator(t, sdk.ValAddress(pk2.Address()), pk) + vals[i].Status = Bonded + vals[i].Tokens = sdk.NewInt(rand.Int63()) + } + // create some validators with the same power + for i := 0; i < 10; i++ { + vals[i].Tokens = sdk.NewInt(1000000) + } + + valz := Validators(vals) + + // create expected tendermint validators by converting to tendermint then sorting + expectedVals, err := valz.ToTmValidators() + require.NoError(t, err) + sort.Sort(tmtypes.ValidatorsByVotingPower(expectedVals)) + + // sort in SDK and then convert to tendermint + sort.Sort(ValidatorsByVotingPower(valz)) + actualVals, err := valz.ToTmValidators() + require.NoError(t, err) + + require.Equal(t, expectedVals, actualVals, "sorting in SDK is not the same as sorting in Tendermint") +} + func TestValidatorToTm(t *testing.T) { vals := make(Validators, 10) expected := make([]*tmtypes.Validator, 10) From 1a157132899d95d7075dbf3a6750e10d5e4b2dcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?colin=20axn=C3=A9r?= <25233464+colin-axner@users.noreply.github.com> Date: Thu, 29 Oct 2020 13:42:12 +0100 Subject: [PATCH 017/136] remove proof path from IBC queries (#7725) * remove proof path * make proto-all with old install * fix build --- proto/ibc/core/channel/v1/query.proto | 24 +- proto/ibc/core/client/v1/query.proto | 8 +- proto/ibc/core/connection/v1/query.proto | 16 +- x/ibc/core/02-client/client/utils/utils.go | 4 +- x/ibc/core/02-client/types/query.go | 12 +- x/ibc/core/02-client/types/query.pb.go | 209 ++----- .../core/03-connection/client/utils/utils.go | 4 +- x/ibc/core/03-connection/types/query.go | 16 +- x/ibc/core/03-connection/types/query.pb.go | 340 +++--------- x/ibc/core/04-channel/client/utils/utils.go | 6 +- x/ibc/core/04-channel/keeper/grpc_query.go | 8 +- x/ibc/core/04-channel/types/query.go | 24 +- x/ibc/core/04-channel/types/query.pb.go | 510 ++++-------------- 13 files changed, 246 insertions(+), 935 deletions(-) diff --git a/proto/ibc/core/channel/v1/query.proto b/proto/ibc/core/channel/v1/query.proto index 13b14ce4c0..16faf462d5 100644 --- a/proto/ibc/core/channel/v1/query.proto +++ b/proto/ibc/core/channel/v1/query.proto @@ -94,10 +94,8 @@ message QueryChannelResponse { ibc.core.channel.v1.Channel channel = 1; // merkle proof of existence bytes proof = 2; - // merkle proof path - string proof_path = 3; // height at which the proof was retrieved - ibc.core.client.v1.Height proof_height = 4 [(gogoproto.nullable) = false]; + ibc.core.client.v1.Height proof_height = 3 [(gogoproto.nullable) = false]; } // QueryChannelsRequest is the request type for the Query/Channels RPC method @@ -152,10 +150,8 @@ message QueryChannelClientStateResponse { ibc.core.client.v1.IdentifiedClientState identified_client_state = 1; // merkle proof of existence bytes proof = 2; - // merkle proof path - string proof_path = 3; // height at which the proof was retrieved - ibc.core.client.v1.Height proof_height = 4 [(gogoproto.nullable) = false]; + ibc.core.client.v1.Height proof_height = 3 [(gogoproto.nullable) = false]; } // QueryChannelConsensusStateRequest is the request type for the @@ -180,10 +176,8 @@ message QueryChannelConsensusStateResponse { string client_id = 2; // merkle proof of existence bytes proof = 3; - // merkle proof path - string proof_path = 4; // height at which the proof was retrieved - ibc.core.client.v1.Height proof_height = 5 [(gogoproto.nullable) = false]; + ibc.core.client.v1.Height proof_height = 4 [(gogoproto.nullable) = false]; } // QueryPacketCommitmentRequest is the request type for the @@ -205,10 +199,8 @@ message QueryPacketCommitmentResponse { bytes commitment = 1; // merkle proof of existence bytes proof = 2; - // merkle proof path - string proof_path = 3; // height at which the proof was retrieved - ibc.core.client.v1.Height proof_height = 4 [(gogoproto.nullable) = false]; + ibc.core.client.v1.Height proof_height = 3 [(gogoproto.nullable) = false]; } // QueryPacketCommitmentsRequest is the request type for the @@ -251,10 +243,8 @@ message QueryPacketAcknowledgementResponse { bytes acknowledgement = 1; // merkle proof of existence bytes proof = 2; - // merkle proof path - string proof_path = 3; // height at which the proof was retrieved - ibc.core.client.v1.Height proof_height = 4 [(gogoproto.nullable) = false]; + ibc.core.client.v1.Height proof_height = 3 [(gogoproto.nullable) = false]; } // QueryUnreceivedPacketsRequest is the request type for the @@ -313,8 +303,6 @@ message QueryNextSequenceReceiveResponse { uint64 next_sequence_receive = 1; // merkle proof of existence bytes proof = 2; - // merkle proof path - string proof_path = 3; // height at which the proof was retrieved - ibc.core.client.v1.Height proof_height = 4 [(gogoproto.nullable) = false]; + ibc.core.client.v1.Height proof_height = 3 [(gogoproto.nullable) = false]; } diff --git a/proto/ibc/core/client/v1/query.proto b/proto/ibc/core/client/v1/query.proto index 25584b13bd..a40fed843e 100644 --- a/proto/ibc/core/client/v1/query.proto +++ b/proto/ibc/core/client/v1/query.proto @@ -50,10 +50,8 @@ message QueryClientStateResponse { google.protobuf.Any client_state = 1; // merkle proof of existence bytes proof = 2; - // merkle proof path - string proof_path = 3; // height at which the proof was retrieved - ibc.core.client.v1.Height proof_height = 4 [(gogoproto.nullable) = false]; + ibc.core.client.v1.Height proof_height = 3 [(gogoproto.nullable) = false]; } // QueryClientStatesRequest is the request type for the Query/ClientStates RPC @@ -94,10 +92,8 @@ message QueryConsensusStateResponse { google.protobuf.Any consensus_state = 1; // merkle proof of existence bytes proof = 2; - // merkle proof path - string proof_path = 3; // height at which the proof was retrieved - ibc.core.client.v1.Height proof_height = 4 [(gogoproto.nullable) = false]; + ibc.core.client.v1.Height proof_height = 3 [(gogoproto.nullable) = false]; } // QueryConsensusStatesRequest is the request type for the Query/ConsensusStates diff --git a/proto/ibc/core/connection/v1/query.proto b/proto/ibc/core/connection/v1/query.proto index 6a36a382b5..c2666ee28a 100644 --- a/proto/ibc/core/connection/v1/query.proto +++ b/proto/ibc/core/connection/v1/query.proto @@ -57,10 +57,8 @@ message QueryConnectionResponse { ibc.core.connection.v1.ConnectionEnd connection = 1; // merkle proof of existence bytes proof = 2; - // merkle proof path - string proof_path = 3; // height at which the proof was retrieved - ibc.core.client.v1.Height proof_height = 4 [(gogoproto.nullable) = false]; + ibc.core.client.v1.Height proof_height = 3 [(gogoproto.nullable) = false]; } // QueryConnectionsRequest is the request type for the Query/Connections RPC @@ -94,10 +92,8 @@ message QueryClientConnectionsResponse { repeated string connection_paths = 1; // merkle proof of existence bytes proof = 2; - // merkle proof path - string proof_path = 3; // height at which the proof was generated - ibc.core.client.v1.Height proof_height = 4 [(gogoproto.nullable) = false]; + ibc.core.client.v1.Height proof_height = 3 [(gogoproto.nullable) = false]; } // QueryConnectionClientStateRequest is the request type for the @@ -114,10 +110,8 @@ message QueryConnectionClientStateResponse { ibc.core.client.v1.IdentifiedClientState identified_client_state = 1; // merkle proof of existence bytes proof = 2; - // merkle proof path - string proof_path = 3; // height at which the proof was retrieved - ibc.core.client.v1.Height proof_height = 4 [(gogoproto.nullable) = false]; + ibc.core.client.v1.Height proof_height = 3 [(gogoproto.nullable) = false]; } // QueryConnectionConsensusStateRequest is the request type for the @@ -138,8 +132,6 @@ message QueryConnectionConsensusStateResponse { string client_id = 2; // merkle proof of existence bytes proof = 3; - // merkle proof path - string proof_path = 4; // height at which the proof was retrieved - ibc.core.client.v1.Height proof_height = 5 [(gogoproto.nullable) = false]; + ibc.core.client.v1.Height proof_height = 4 [(gogoproto.nullable) = false]; } diff --git a/x/ibc/core/02-client/client/utils/utils.go b/x/ibc/core/02-client/client/utils/utils.go index e87073cb4b..bcd649ae77 100644 --- a/x/ibc/core/02-client/client/utils/utils.go +++ b/x/ibc/core/02-client/client/utils/utils.go @@ -62,7 +62,7 @@ func QueryClientStateABCI( return nil, err } - clientStateRes := types.NewQueryClientStateResponse(clientID, anyClientState, proofBz, proofHeight) + clientStateRes := types.NewQueryClientStateResponse(anyClientState, proofBz, proofHeight) return clientStateRes, nil } @@ -115,7 +115,7 @@ func QueryConsensusStateABCI( return nil, err } - return types.NewQueryConsensusStateResponse(clientID, anyConsensusState, proofBz, proofHeight), nil + return types.NewQueryConsensusStateResponse(anyConsensusState, proofBz, proofHeight), nil } // QueryTendermintHeader takes a client context and returns the appropriate diff --git a/x/ibc/core/02-client/types/query.go b/x/ibc/core/02-client/types/query.go index c629898ff5..3f898dadb4 100644 --- a/x/ibc/core/02-client/types/query.go +++ b/x/ibc/core/02-client/types/query.go @@ -1,35 +1,27 @@ package types import ( - "strings" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" - commitmenttypes "github.com/cosmos/cosmos-sdk/x/ibc/core/23-commitment/types" - host "github.com/cosmos/cosmos-sdk/x/ibc/core/24-host" ) // NewQueryClientStateResponse creates a new QueryClientStateResponse instance. func NewQueryClientStateResponse( - clientID string, clientStateAny *codectypes.Any, proof []byte, height Height, + clientStateAny *codectypes.Any, proof []byte, height Height, ) *QueryClientStateResponse { - path := commitmenttypes.NewMerklePath(append([]string{clientID}, strings.Split(host.ClientStatePath(), "/")...)) return &QueryClientStateResponse{ ClientState: clientStateAny, Proof: proof, - ProofPath: path.Pretty(), ProofHeight: height, } } // NewQueryConsensusStateResponse creates a new QueryConsensusStateResponse instance. func NewQueryConsensusStateResponse( - clientID string, consensusStateAny *codectypes.Any, proof []byte, height Height, + consensusStateAny *codectypes.Any, proof []byte, height Height, ) *QueryConsensusStateResponse { - path := commitmenttypes.NewMerklePath(strings.Split(host.FullClientPath(clientID, host.ConsensusStatePath(height)), "/")) return &QueryConsensusStateResponse{ ConsensusState: consensusStateAny, Proof: proof, - ProofPath: path.Pretty(), ProofHeight: height, } } diff --git a/x/ibc/core/02-client/types/query.pb.go b/x/ibc/core/02-client/types/query.pb.go index 3b2c2612b8..fb91ead13c 100644 --- a/x/ibc/core/02-client/types/query.pb.go +++ b/x/ibc/core/02-client/types/query.pb.go @@ -86,10 +86,8 @@ type QueryClientStateResponse struct { ClientState *types.Any `protobuf:"bytes,1,opt,name=client_state,json=clientState,proto3" json:"client_state,omitempty"` // merkle proof of existence Proof []byte `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof,omitempty"` - // merkle proof path - ProofPath string `protobuf:"bytes,3,opt,name=proof_path,json=proofPath,proto3" json:"proof_path,omitempty"` // height at which the proof was retrieved - ProofHeight Height `protobuf:"bytes,4,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height"` + ProofHeight Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height"` } func (m *QueryClientStateResponse) Reset() { *m = QueryClientStateResponse{} } @@ -139,13 +137,6 @@ func (m *QueryClientStateResponse) GetProof() []byte { return nil } -func (m *QueryClientStateResponse) GetProofPath() string { - if m != nil { - return m.ProofPath - } - return "" -} - func (m *QueryClientStateResponse) GetProofHeight() Height { if m != nil { return m.ProofHeight @@ -339,10 +330,8 @@ type QueryConsensusStateResponse struct { ConsensusState *types.Any `protobuf:"bytes,1,opt,name=consensus_state,json=consensusState,proto3" json:"consensus_state,omitempty"` // merkle proof of existence Proof []byte `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof,omitempty"` - // merkle proof path - ProofPath string `protobuf:"bytes,3,opt,name=proof_path,json=proofPath,proto3" json:"proof_path,omitempty"` // height at which the proof was retrieved - ProofHeight Height `protobuf:"bytes,4,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height"` + ProofHeight Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height"` } func (m *QueryConsensusStateResponse) Reset() { *m = QueryConsensusStateResponse{} } @@ -392,13 +381,6 @@ func (m *QueryConsensusStateResponse) GetProof() []byte { return nil } -func (m *QueryConsensusStateResponse) GetProofPath() string { - if m != nil { - return m.ProofPath - } - return "" -} - func (m *QueryConsensusStateResponse) GetProofHeight() Height { if m != nil { return m.ProofHeight @@ -532,55 +514,54 @@ func init() { func init() { proto.RegisterFile("ibc/core/client/v1/query.proto", fileDescriptor_dc42cdfd1d52d76e) } var fileDescriptor_dc42cdfd1d52d76e = []byte{ - // 765 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x56, 0x4f, 0x4f, 0x13, 0x41, - 0x14, 0xef, 0xf0, 0xc7, 0xc0, 0xb4, 0x80, 0x99, 0x90, 0x58, 0x16, 0x2c, 0x58, 0xa2, 0x82, 0xd2, - 0x19, 0x5a, 0xa3, 0x78, 0xf1, 0x20, 0x24, 0x28, 0x17, 0x02, 0xeb, 0xc1, 0xc4, 0xc4, 0x90, 0xdd, - 0xed, 0xb0, 0x9d, 0x08, 0x3b, 0xa5, 0x33, 0x6d, 0x24, 0x84, 0x0b, 0x9f, 0xc0, 0xc4, 0xc4, 0xab, - 0x5f, 0xc0, 0x78, 0xf2, 0x33, 0x18, 0x2e, 0x26, 0x44, 0x13, 0xe3, 0xc1, 0x18, 0x03, 0x7e, 0x10, - 0xb3, 0x33, 0xb3, 0xb0, 0x0b, 0x4b, 0x58, 0x8d, 0x89, 0xa7, 0xee, 0xbe, 0x3f, 0xf3, 0x7e, 0xef, - 0xf7, 0x7b, 0xf3, 0xba, 0xb0, 0xc4, 0x5c, 0x8f, 0x78, 0xbc, 0x45, 0x89, 0xb7, 0xc1, 0x68, 0x20, - 0x49, 0xa7, 0x4a, 0xb6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0x28, 0x76, 0x2b, 0x24, 0xfd, - 0xca, 0xb2, 0xe2, 0xc8, 0x06, 0x5a, 0x80, 0x05, 0xed, 0x6e, 0x50, 0xe6, 0x37, 0x64, 0xb1, 0x47, - 0x55, 0xb3, 0xf0, 0x59, 0x25, 0xf0, 0x63, 0x15, 0x31, 0xdf, 0xb3, 0xff, 0x63, 0x3c, 0x67, 0xe7, - 0x55, 0x96, 0x36, 0x95, 0xdd, 0xb3, 0xed, 0x88, 0x88, 0x88, 0x45, 0x08, 0x4f, 0x74, 0x32, 0xcd, - 0xdc, 0xc0, 0x5a, 0x54, 0x1c, 0x8a, 0x8a, 0xf5, 0x04, 0x18, 0x51, 0xf1, 0x8a, 0xe3, 0x47, 0x24, - 0xda, 0xb1, 0xcc, 0xf2, 0x07, 0x00, 0x47, 0x52, 0x8a, 0x18, 0xd2, 0x96, 0xe1, 0x40, 0x9c, 0x34, - 0x51, 0x04, 0x13, 0xdd, 0x53, 0xf9, 0xda, 0x74, 0x5a, 0x1f, 0x4b, 0x75, 0x1a, 0x48, 0xb6, 0xce, - 0x68, 0x3d, 0x4e, 0x7f, 0x21, 0x46, 0xa5, 0x40, 0x8f, 0x12, 0xa8, 0xbb, 0x14, 0xea, 0x9b, 0x17, - 0xa2, 0xd6, 0x60, 0x12, 0xb0, 0xdf, 0x01, 0x68, 0x69, 0xd8, 0xa1, 0x2b, 0x10, 0x6d, 0x91, 0x79, - 0x4c, 0xd0, 0x75, 0x38, 0xd8, 0xa1, 0x2d, 0xc1, 0x78, 0xb0, 0x16, 0xb4, 0x37, 0x5d, 0xda, 0x52, - 0x40, 0x7a, 0xec, 0x01, 0x63, 0x5d, 0x56, 0xc6, 0x78, 0x98, 0x11, 0xb1, 0x3b, 0x11, 0xa6, 0x45, - 0x42, 0x93, 0x70, 0x60, 0x23, 0xec, 0x4d, 0xc6, 0xa5, 0xee, 0xb3, 0x0b, 0xda, 0x68, 0x94, 0xfc, - 0x0a, 0xe0, 0x68, 0x2a, 0x5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x1c, 0x3a, 0x35, 0xe7, - 0x28, 0x2b, 0xde, 0x63, 0xf6, 0x67, 0xb3, 0x27, 0x98, 0x0e, 0xef, 0xab, 0x0e, 0x6b, 0x68, 0xf6, - 0x4f, 0x3b, 0x9c, 0x5f, 0xdd, 0x3f, 0x2c, 0x81, 0x83, 0xc3, 0x12, 0xf8, 0x79, 0x58, 0x02, 0xaf, - 0x8e, 0x4a, 0xb9, 0x83, 0xa3, 0x52, 0xee, 0xdb, 0x51, 0x29, 0xf7, 0x6c, 0xce, 0x67, 0xb2, 0xd1, - 0x76, 0xb1, 0xc7, 0x37, 0x89, 0xf9, 0x1c, 0xd1, 0x3f, 0x15, 0x51, 0x7f, 0x41, 0x5e, 0x92, 0xe3, - 0xcf, 0x8e, 0xd9, 0x5a, 0xc5, 0x54, 0x94, 0xdb, 0x4d, 0x2a, 0xdc, 0x4b, 0x6a, 0x1b, 0xde, 0xf9, - 0x1d, 0x00, 0x00, 0xff, 0xff, 0xc3, 0x28, 0x91, 0xcd, 0xf9, 0x08, 0x00, 0x00, + // 747 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0x4f, 0x4f, 0x13, 0x41, + 0x14, 0xef, 0xf0, 0xc7, 0xc0, 0xb4, 0x80, 0x99, 0x90, 0x58, 0x16, 0x52, 0x6a, 0x89, 0x5a, 0x94, + 0xce, 0xd0, 0x1a, 0xc5, 0x8b, 0x07, 0x21, 0x41, 0xb9, 0x10, 0x59, 0x0f, 0x26, 0x26, 0x86, 0xec, + 0x6e, 0x87, 0xed, 0x44, 0xd8, 0x29, 0x9d, 0x69, 0x23, 0x21, 0x5c, 0xf8, 0x04, 0x26, 0x26, 0x5e, + 0xfd, 0x02, 0x86, 0x93, 0x89, 0xdf, 0xc0, 0x70, 0x24, 0x7a, 0xf1, 0x60, 0x8c, 0x01, 0x3f, 0x88, + 0xe9, 0xcc, 0x2c, 0x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x14, 0xec, 0xd8, 0x59, 0xaf, 0x17, + 0x00, 0x8d, 0xc3, 0xc1, 0x66, 0x8b, 0xf3, 0x8d, 0x7c, 0x5f, 0x11, 0x94, 0x73, 0xb6, 0xbe, 0xa0, + 0x25, 0x98, 0x53, 0x87, 0xf5, 0x06, 0x65, 0x7e, 0x43, 0xe6, 0xfb, 0x55, 0x38, 0x0b, 0x9f, 0xa7, + 0x1a, 0x3f, 0x51, 0x16, 0x8b, 0x03, 0x87, 0x3f, 0xa6, 0x33, 0x76, 0x56, 0x79, 0x69, 0x51, 0xc9, + 0x3d, 0x8f, 0x57, 0x84, 0x95, 0x2e, 0x43, 0xd8, 0x6b, 0x84, 0x41, 0x7b, 0x13, 0xeb, 0xae, 0xe1, + 0x6e, 0xd7, 0xb0, 0x6e, 0xb1, 0xe9, 0x1a, 0x7e, 0xea, 0xf8, 0x21, 0x4b, 0x76, 0xc4, 0xb3, 0xf4, + 0x11, 0xc0, 0x89, 0x84, 0x24, 0x86, 0x95, 0x55, 0x38, 0x12, 0x65, 0x45, 0xe4, 0x41, 0xb1, 0xbf, + 0x9c, 0xad, 0xcd, 0x26, 0xd5, 0xb1, 0x52, 0xa7, 0x81, 0x64, 0x1b, 0x8c, 0xd6, 0xa3, 0xfc, 0xe6, + 0x22, 0x5c, 0x09, 0xf4, 0x38, 0x86, 0xba, 0x4f, 0xa1, 0xbe, 0x75, 0x29, 0x6a, 0x0d, 0x26, 0x06, + 0xfb, 0x03, 0x80, 0x96, 0x86, 0xdd, 0x55, 0x05, 0xa2, 0x2d, 0x52, 0xcf, 0x01, 0xba, 0x01, 0x47, + 0x3b, 0xb4, 0x25, 0x18, 0x0f, 0xd6, 0x83, 0xf6, 0x96, 0x4b, 0x5b, 0x0a, 0xc8, 0x80, 0x3d, 0x62, + 0xa4, 0xab, 0x4a, 0x18, 0x35, 0x8b, 0x34, 0xb1, 0x67, 0xa6, 0x9b, 0x84, 0x66, 0xe0, 0xc8, 0x66, + 0xb7, 0x36, 0x19, 0x5a, 0x0d, 0x14, 0x41, 0x79, 0xc8, 0xce, 0x69, 0xa1, 0xe9, 0xe4, 0x27, 0x00, + 0x27, 0x13, 0xe1, 0x1a, 0x9e, 0x1f, 0xc2, 0x31, 0x2f, 0xd4, 0xa4, 0x18, 0xc0, 0x51, 0x2f, 0x16, + 0xe6, 0x7f, 0xce, 0xe0, 0x7e, 0x32, 0x72, 0x91, 0x8a, 0xe9, 0xe5, 0x84, 0x76, 0xff, 0xcd, 0x90, + 0x7e, 0x06, 0x70, 0x2a, 0x19, 0x84, 0xe1, 0xef, 0x25, 0xbc, 0x7a, 0x86, 0xbf, 0x70, 0x54, 0xe7, + 0x92, 0xca, 0x8d, 0x87, 0x79, 0xce, 0x64, 0x23, 0x46, 0xc0, 0x58, 0x9c, 0xde, 0x7f, 0x37, 0xb6, + 0xb5, 0x2f, 0x83, 0x70, 0x50, 0x15, 0x82, 0xde, 0x03, 0x98, 0x8d, 0xbc, 0x13, 0x74, 0x27, 0x09, + 0xe7, 0x05, 0x6b, 0xce, 0x9a, 0x4b, 0x67, 0xac, 0x01, 0x94, 0xee, 0xed, 0x7f, 0xfd, 0xf5, 0xb6, + 0x8f, 0xa0, 0x0a, 0x51, 0x8b, 0x3a, 0xdc, 0xd1, 0x7a, 0x9b, 0xc7, 0x9e, 0x37, 0xd9, 0x3d, 0xed, + 0xe5, 0x1e, 0x7a, 0x07, 0x60, 0x2e, 0xba, 0x14, 0x50, 0xaa, 0xac, 0xe1, 0x60, 0x58, 0x95, 0x94, + 0xd6, 0x06, 0xe4, 0xac, 0x02, 0x39, 0x83, 0xae, 0x5f, 0x0a, 0x12, 0x7d, 0x07, 0x70, 0x34, 0xde, + 0x41, 0x84, 0x2f, 0x4e, 0x96, 0xb4, 0x1f, 0x2c, 0x92, 0xda, 0xde, 0xc0, 0x63, 0x0a, 0x9e, 0x87, + 0x9c, 0x44, 0x78, 0x67, 0x46, 0x2f, 0x4a, 0x23, 0x31, 0xdb, 0x82, 0xec, 0xc6, 0x77, 0xce, 0x1e, + 0xd1, 0xaf, 0xb2, 0x27, 0xd7, 0xf7, 0x3d, 0x74, 0x00, 0xe0, 0xd8, 0x99, 0x39, 0x47, 0x69, 0xf1, + 0x9e, 0xb2, 0x3f, 0x9f, 0xde, 0xc1, 0x54, 0xf8, 0x40, 0x55, 0x58, 0x43, 0xf3, 0x7f, 0x5a, 0xe1, + 0xe2, 0xda, 0xe1, 0x71, 0x01, 0x1c, 0x1d, 0x17, 0xc0, 0xcf, 0xe3, 0x02, 0x78, 0x73, 0x52, 0xc8, + 0x1c, 0x9d, 0x14, 0x32, 0xdf, 0x4e, 0x0a, 0x99, 0x17, 0x0b, 0x3e, 0x93, 0x8d, 0xb6, 0x8b, 0x3d, + 0xbe, 0x45, 0xcc, 0x0f, 0x85, 0xfe, 0x54, 0x44, 0xfd, 0x15, 0x79, 0x4d, 0x4e, 0x7f, 0x1c, 0xe6, + 0x6b, 0x15, 0x93, 0x51, 0xee, 0x34, 0xa9, 0x70, 0xaf, 0xa8, 0x75, 0x77, 0xf7, 0x77, 0x00, 0x00, + 0x00, 0xff, 0xff, 0x09, 0x8e, 0x83, 0x3d, 0xbb, 0x08, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -842,14 +823,7 @@ func (m *QueryClientStateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error i = encodeVarintQuery(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x22 - if len(m.ProofPath) > 0 { - i -= len(m.ProofPath) - copy(dAtA[i:], m.ProofPath) - i = encodeVarintQuery(dAtA, i, uint64(len(m.ProofPath))) - i-- - dAtA[i] = 0x1a - } + dAtA[i] = 0x1a if len(m.Proof) > 0 { i -= len(m.Proof) copy(dAtA[i:], m.Proof) @@ -1035,14 +1009,7 @@ func (m *QueryConsensusStateResponse) MarshalToSizedBuffer(dAtA []byte) (int, er i = encodeVarintQuery(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x22 - if len(m.ProofPath) > 0 { - i -= len(m.ProofPath) - copy(dAtA[i:], m.ProofPath) - i = encodeVarintQuery(dAtA, i, uint64(len(m.ProofPath))) - i-- - dAtA[i] = 0x1a - } + dAtA[i] = 0x1a if len(m.Proof) > 0 { i -= len(m.Proof) copy(dAtA[i:], m.Proof) @@ -1194,10 +1161,6 @@ func (m *QueryClientStateResponse) Size() (n int) { if l > 0 { n += 1 + l + sovQuery(uint64(l)) } - l = len(m.ProofPath) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } l = m.ProofHeight.Size() n += 1 + l + sovQuery(uint64(l)) return n @@ -1271,10 +1234,6 @@ func (m *QueryConsensusStateResponse) Size() (n int) { if l > 0 { n += 1 + l + sovQuery(uint64(l)) } - l = len(m.ProofPath) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } l = m.ProofHeight.Size() n += 1 + l + sovQuery(uint64(l)) return n @@ -1507,38 +1466,6 @@ func (m *QueryClientStateResponse) Unmarshal(dAtA []byte) error { } iNdEx = postIndex case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProofPath", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProofPath = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ProofHeight", wireType) } @@ -2050,38 +1977,6 @@ func (m *QueryConsensusStateResponse) Unmarshal(dAtA []byte) error { } iNdEx = postIndex case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProofPath", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProofPath = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ProofHeight", wireType) } diff --git a/x/ibc/core/03-connection/client/utils/utils.go b/x/ibc/core/03-connection/client/utils/utils.go index 87de8a720c..955ecfe6ba 100644 --- a/x/ibc/core/03-connection/client/utils/utils.go +++ b/x/ibc/core/03-connection/client/utils/utils.go @@ -57,7 +57,7 @@ func queryConnectionABCI(clientCtx client.Context, connectionID string) (*types. return nil, err } - return types.NewQueryConnectionResponse(connectionID, connection, proofBz, proofHeight), nil + return types.NewQueryConnectionResponse(connection, proofBz, proofHeight), nil } // QueryClientConnections queries the connection paths registered for a particular client. @@ -96,7 +96,7 @@ func queryClientConnectionsABCI(clientCtx client.Context, clientID string) (*typ return nil, err } - return types.NewQueryClientConnectionsResponse(clientID, paths, proofBz, proofHeight), nil + return types.NewQueryClientConnectionsResponse(paths, proofBz, proofHeight), nil } // QueryConnectionClientState returns the ClientState of a connection end. If diff --git a/x/ibc/core/03-connection/types/query.go b/x/ibc/core/03-connection/types/query.go index d13f7ff913..09058e6e8e 100644 --- a/x/ibc/core/03-connection/types/query.go +++ b/x/ibc/core/03-connection/types/query.go @@ -1,37 +1,29 @@ package types import ( - "strings" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" clienttypes "github.com/cosmos/cosmos-sdk/x/ibc/core/02-client/types" - commitmenttypes "github.com/cosmos/cosmos-sdk/x/ibc/core/23-commitment/types" - host "github.com/cosmos/cosmos-sdk/x/ibc/core/24-host" "github.com/cosmos/cosmos-sdk/x/ibc/core/exported" ) // NewQueryConnectionResponse creates a new QueryConnectionResponse instance func NewQueryConnectionResponse( - connectionID string, connection ConnectionEnd, proof []byte, height clienttypes.Height, + connection ConnectionEnd, proof []byte, height clienttypes.Height, ) *QueryConnectionResponse { - path := commitmenttypes.NewMerklePath(strings.Split(host.ConnectionPath(connectionID), "/")) return &QueryConnectionResponse{ Connection: &connection, Proof: proof, - ProofPath: path.Pretty(), ProofHeight: height, } } // NewQueryClientConnectionsResponse creates a new ConnectionPaths instance func NewQueryClientConnectionsResponse( - clientID string, connectionPaths []string, proof []byte, height clienttypes.Height, + connectionPaths []string, proof []byte, height clienttypes.Height, ) *QueryClientConnectionsResponse { - path := commitmenttypes.NewMerklePath(strings.Split(host.ClientConnectionsPath(clientID), "/")) return &QueryClientConnectionsResponse{ ConnectionPaths: connectionPaths, Proof: proof, - ProofPath: path.Pretty(), ProofHeight: height, } } @@ -45,23 +37,19 @@ func NewQueryClientConnectionsRequest(clientID string) *QueryClientConnectionsRe // NewQueryConnectionClientStateResponse creates a newQueryConnectionClientStateResponse instance func NewQueryConnectionClientStateResponse(identifiedClientState clienttypes.IdentifiedClientState, proof []byte, height clienttypes.Height) *QueryConnectionClientStateResponse { - path := commitmenttypes.NewMerklePath(strings.Split(host.FullClientPath(identifiedClientState.ClientId, host.ClientStatePath()), "/")) return &QueryConnectionClientStateResponse{ IdentifiedClientState: &identifiedClientState, Proof: proof, - ProofPath: path.Pretty(), ProofHeight: height, } } // NewQueryConnectionConsensusStateResponse creates a newQueryConnectionConsensusStateResponse instance func NewQueryConnectionConsensusStateResponse(clientID string, anyConsensusState *codectypes.Any, consensusStateHeight exported.Height, proof []byte, height clienttypes.Height) *QueryConnectionConsensusStateResponse { - path := commitmenttypes.NewMerklePath(strings.Split(host.FullClientPath(clientID, host.ConsensusStatePath(consensusStateHeight)), "/")) return &QueryConnectionConsensusStateResponse{ ConsensusState: anyConsensusState, ClientId: clientID, Proof: proof, - ProofPath: path.Pretty(), ProofHeight: height, } } diff --git a/x/ibc/core/03-connection/types/query.pb.go b/x/ibc/core/03-connection/types/query.pb.go index 7db05b66bb..3007ac05bc 100644 --- a/x/ibc/core/03-connection/types/query.pb.go +++ b/x/ibc/core/03-connection/types/query.pb.go @@ -87,10 +87,8 @@ type QueryConnectionResponse struct { Connection *ConnectionEnd `protobuf:"bytes,1,opt,name=connection,proto3" json:"connection,omitempty"` // merkle proof of existence Proof []byte `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof,omitempty"` - // merkle proof path - ProofPath string `protobuf:"bytes,3,opt,name=proof_path,json=proofPath,proto3" json:"proof_path,omitempty"` // height at which the proof was retrieved - ProofHeight types.Height `protobuf:"bytes,4,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height"` + ProofHeight types.Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height"` } func (m *QueryConnectionResponse) Reset() { *m = QueryConnectionResponse{} } @@ -140,13 +138,6 @@ func (m *QueryConnectionResponse) GetProof() []byte { return nil } -func (m *QueryConnectionResponse) GetProofPath() string { - if m != nil { - return m.ProofPath - } - return "" -} - func (m *QueryConnectionResponse) GetProofHeight() types.Height { if m != nil { return m.ProofHeight @@ -319,10 +310,8 @@ type QueryClientConnectionsResponse struct { ConnectionPaths []string `protobuf:"bytes,1,rep,name=connection_paths,json=connectionPaths,proto3" json:"connection_paths,omitempty"` // merkle proof of existence Proof []byte `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof,omitempty"` - // merkle proof path - ProofPath string `protobuf:"bytes,3,opt,name=proof_path,json=proofPath,proto3" json:"proof_path,omitempty"` // height at which the proof was generated - ProofHeight types.Height `protobuf:"bytes,4,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height"` + ProofHeight types.Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height"` } func (m *QueryClientConnectionsResponse) Reset() { *m = QueryClientConnectionsResponse{} } @@ -372,13 +361,6 @@ func (m *QueryClientConnectionsResponse) GetProof() []byte { return nil } -func (m *QueryClientConnectionsResponse) GetProofPath() string { - if m != nil { - return m.ProofPath - } - return "" -} - func (m *QueryClientConnectionsResponse) GetProofHeight() types.Height { if m != nil { return m.ProofHeight @@ -440,10 +422,8 @@ type QueryConnectionClientStateResponse struct { IdentifiedClientState *types.IdentifiedClientState `protobuf:"bytes,1,opt,name=identified_client_state,json=identifiedClientState,proto3" json:"identified_client_state,omitempty"` // merkle proof of existence Proof []byte `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof,omitempty"` - // merkle proof path - ProofPath string `protobuf:"bytes,3,opt,name=proof_path,json=proofPath,proto3" json:"proof_path,omitempty"` // height at which the proof was retrieved - ProofHeight types.Height `protobuf:"bytes,4,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height"` + ProofHeight types.Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height"` } func (m *QueryConnectionClientStateResponse) Reset() { *m = QueryConnectionClientStateResponse{} } @@ -493,13 +473,6 @@ func (m *QueryConnectionClientStateResponse) GetProof() []byte { return nil } -func (m *QueryConnectionClientStateResponse) GetProofPath() string { - if m != nil { - return m.ProofPath - } - return "" -} - func (m *QueryConnectionClientStateResponse) GetProofHeight() types.Height { if m != nil { return m.ProofHeight @@ -579,10 +552,8 @@ type QueryConnectionConsensusStateResponse struct { ClientId string `protobuf:"bytes,2,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` // merkle proof of existence Proof []byte `protobuf:"bytes,3,opt,name=proof,proto3" json:"proof,omitempty"` - // merkle proof path - ProofPath string `protobuf:"bytes,4,opt,name=proof_path,json=proofPath,proto3" json:"proof_path,omitempty"` // height at which the proof was retrieved - ProofHeight types.Height `protobuf:"bytes,5,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height"` + ProofHeight types.Height `protobuf:"bytes,4,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height"` } func (m *QueryConnectionConsensusStateResponse) Reset() { *m = QueryConnectionConsensusStateResponse{} } @@ -639,13 +610,6 @@ func (m *QueryConnectionConsensusStateResponse) GetProof() []byte { return nil } -func (m *QueryConnectionConsensusStateResponse) GetProofPath() string { - if m != nil { - return m.ProofPath - } - return "" -} - func (m *QueryConnectionConsensusStateResponse) GetProofHeight() types.Height { if m != nil { return m.ProofHeight @@ -671,65 +635,63 @@ func init() { } var fileDescriptor_cd8d529f8c7cd06b = []byte{ - // 921 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x56, 0x41, 0x6f, 0x1b, 0x45, - 0x14, 0xce, 0x38, 0x49, 0xd5, 0x3c, 0xa7, 0x05, 0x46, 0x69, 0xbb, 0x2c, 0xd4, 0x09, 0x5b, 0x42, - 0x53, 0xa0, 0x33, 0x75, 0xa2, 0x56, 0xa5, 0xad, 0x11, 0xb8, 0x2a, 0x34, 0x97, 0xaa, 0x2c, 0xe2, - 0xc2, 0x25, 0xda, 0x5d, 0x4f, 0xd6, 0x2b, 0xe2, 0x1d, 0xd7, 0xb3, 0xb6, 0xb0, 0x8a, 0x0f, 0x70, - 0xe6, 0x80, 0x84, 0x38, 0xf2, 0x07, 0xb8, 0xf2, 0x0f, 0x90, 0x90, 0x7a, 0xac, 0xc4, 0xa5, 0xe2, - 0x50, 0xa1, 0x84, 0x2b, 0x17, 0xee, 0x48, 0x68, 0x67, 0xc6, 0xd9, 0xd9, 0x78, 0xb7, 0x31, 0x16, - 0x52, 0x4e, 0xde, 0x79, 0xf3, 0xde, 0xbc, 0xef, 0x7d, 0xef, 0xcd, 0x37, 0x06, 0x27, 0xf2, 0x03, - 0x1a, 0xf0, 0x1e, 0xa3, 0x01, 0x8f, 0x63, 0x16, 0x24, 0x11, 0x8f, 0xe9, 0xa0, 0x4e, 0x1f, 0xf5, - 0x59, 0x6f, 0x48, 0xba, 0x3d, 0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e6, 0x9e, 0x1e, 0xd4, 0xe6, - 0x9e, 0x1d, 0xd4, 0xe6, 0x3e, 0xbf, 0x1d, 0x46, 0x49, 0xbb, 0xef, 0x93, 0x80, 0x77, 0xa8, 0xfe, - 0xd7, 0xad, 0x7e, 0xae, 0x8a, 0xd6, 0x17, 0xf4, 0x4b, 0x7a, 0xf8, 0xe7, 0xf9, 0xda, 0xd6, 0x55, - 0x03, 0x75, 0x32, 0xec, 0x32, 0xe1, 0x9f, 0x92, 0xd2, 0xb8, 0xf5, 0x6f, 0x00, 0x00, 0x00, 0xff, - 0xff, 0xa3, 0x81, 0x7f, 0x88, 0x02, 0x0c, 0x00, 0x00, + // 891 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xc1, 0x4f, 0x2b, 0x45, + 0x18, 0xef, 0x14, 0xde, 0xcb, 0x63, 0xca, 0x7b, 0xea, 0xa4, 0x0f, 0xea, 0xaa, 0x05, 0x17, 0x2b, + 0xa0, 0x32, 0x43, 0x21, 0x10, 0x04, 0x6a, 0xb4, 0x04, 0x85, 0x0b, 0xc1, 0x35, 0x5e, 0xbc, 0x90, + 0xdd, 0xed, 0xb0, 0xdd, 0x48, 0x77, 0x4a, 0x77, 0xdb, 0xd8, 0x60, 0x2f, 0x9e, 0x3d, 0x98, 0x18, + 0x8f, 0x5e, 0x3d, 0x78, 0xf5, 0xe8, 0xcd, 0x13, 0x47, 0x12, 0x2f, 0x9c, 0x88, 0x29, 0x5e, 0xbd, + 0xf8, 0x17, 0x98, 0x9d, 0x99, 0xb2, 0xb3, 0x74, 0x0b, 0xa5, 0x91, 0x53, 0x77, 0xbf, 0xf9, 0xbe, + 0x99, 0xdf, 0xef, 0xf7, 0x7d, 0xf3, 0xdb, 0x42, 0xdd, 0xb5, 0x6c, 0x62, 0xb3, 0x06, 0x25, 0x36, + 0xf3, 0x3c, 0x6a, 0x07, 0x2e, 0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b, 0xac, + 0x46, 0xe4, 0x3f, 0x5f, 0xf1, 0xb3, 0xe4, 0x57, 0xbe, 0x26, 0xdf, 0x90, 0x9b, 0x3f, 0xb0, 0xcb, + 0xab, 0x4b, 0x0a, 0xea, 0xa0, 0x5d, 0xa7, 0xbe, 0xf5, 0x94, 0x7b, 0xdf, 0xea, 0x7f, 0x01, 0x00, + 0x00, 0xff, 0xff, 0x3b, 0x66, 0x6e, 0x99, 0x86, 0x0b, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1031,14 +993,7 @@ func (m *QueryConnectionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) i = encodeVarintQuery(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x22 - if len(m.ProofPath) > 0 { - i -= len(m.ProofPath) - copy(dAtA[i:], m.ProofPath) - i = encodeVarintQuery(dAtA, i, uint64(len(m.ProofPath))) - i-- - dAtA[i] = 0x1a - } + dAtA[i] = 0x1a if len(m.Proof) > 0 { i -= len(m.Proof) copy(dAtA[i:], m.Proof) @@ -1214,14 +1169,7 @@ func (m *QueryClientConnectionsResponse) MarshalToSizedBuffer(dAtA []byte) (int, i = encodeVarintQuery(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x22 - if len(m.ProofPath) > 0 { - i -= len(m.ProofPath) - copy(dAtA[i:], m.ProofPath) - i = encodeVarintQuery(dAtA, i, uint64(len(m.ProofPath))) - i-- - dAtA[i] = 0x1a - } + dAtA[i] = 0x1a if len(m.Proof) > 0 { i -= len(m.Proof) copy(dAtA[i:], m.Proof) @@ -1300,14 +1248,7 @@ func (m *QueryConnectionClientStateResponse) MarshalToSizedBuffer(dAtA []byte) ( i = encodeVarintQuery(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x22 - if len(m.ProofPath) > 0 { - i -= len(m.ProofPath) - copy(dAtA[i:], m.ProofPath) - i = encodeVarintQuery(dAtA, i, uint64(len(m.ProofPath))) - i-- - dAtA[i] = 0x1a - } + dAtA[i] = 0x1a if len(m.Proof) > 0 { i -= len(m.Proof) copy(dAtA[i:], m.Proof) @@ -1399,14 +1340,7 @@ func (m *QueryConnectionConsensusStateResponse) MarshalToSizedBuffer(dAtA []byte i = encodeVarintQuery(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x2a - if len(m.ProofPath) > 0 { - i -= len(m.ProofPath) - copy(dAtA[i:], m.ProofPath) - i = encodeVarintQuery(dAtA, i, uint64(len(m.ProofPath))) - i-- - dAtA[i] = 0x22 - } + dAtA[i] = 0x22 if len(m.Proof) > 0 { i -= len(m.Proof) copy(dAtA[i:], m.Proof) @@ -1474,10 +1408,6 @@ func (m *QueryConnectionResponse) Size() (n int) { if l > 0 { n += 1 + l + sovQuery(uint64(l)) } - l = len(m.ProofPath) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } l = m.ProofHeight.Size() n += 1 + l + sovQuery(uint64(l)) return n @@ -1546,10 +1476,6 @@ func (m *QueryClientConnectionsResponse) Size() (n int) { if l > 0 { n += 1 + l + sovQuery(uint64(l)) } - l = len(m.ProofPath) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } l = m.ProofHeight.Size() n += 1 + l + sovQuery(uint64(l)) return n @@ -1582,10 +1508,6 @@ func (m *QueryConnectionClientStateResponse) Size() (n int) { if l > 0 { n += 1 + l + sovQuery(uint64(l)) } - l = len(m.ProofPath) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } l = m.ProofHeight.Size() n += 1 + l + sovQuery(uint64(l)) return n @@ -1628,10 +1550,6 @@ func (m *QueryConnectionConsensusStateResponse) Size() (n int) { if l > 0 { n += 1 + l + sovQuery(uint64(l)) } - l = len(m.ProofPath) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } l = m.ProofHeight.Size() n += 1 + l + sovQuery(uint64(l)) return n @@ -1828,38 +1746,6 @@ func (m *QueryConnectionResponse) Unmarshal(dAtA []byte) error { } iNdEx = postIndex case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProofPath", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProofPath = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ProofHeight", wireType) } @@ -2342,38 +2228,6 @@ func (m *QueryClientConnectionsResponse) Unmarshal(dAtA []byte) error { } iNdEx = postIndex case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProofPath", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProofPath = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ProofHeight", wireType) } @@ -2615,38 +2469,6 @@ func (m *QueryConnectionClientStateResponse) Unmarshal(dAtA []byte) error { } iNdEx = postIndex case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProofPath", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProofPath = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ProofHeight", wireType) } @@ -2958,38 +2780,6 @@ func (m *QueryConnectionConsensusStateResponse) Unmarshal(dAtA []byte) error { } iNdEx = postIndex case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProofPath", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProofPath = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ProofHeight", wireType) } diff --git a/x/ibc/core/04-channel/client/utils/utils.go b/x/ibc/core/04-channel/client/utils/utils.go index 725c346c6c..5657367f41 100644 --- a/x/ibc/core/04-channel/client/utils/utils.go +++ b/x/ibc/core/04-channel/client/utils/utils.go @@ -51,7 +51,7 @@ func queryPacketCommitmentABCI( return nil, sdkerrors.Wrapf(types.ErrPacketCommitmentNotFound, "portID (%s), channelID (%s), sequence (%d)", portID, channelID, sequence) } - return types.NewQueryPacketCommitmentResponse(portID, channelID, sequence, value, proofBz, proofHeight), nil + return types.NewQueryPacketCommitmentResponse(value, proofBz, proofHeight), nil } // QueryChannel returns a channel end. @@ -93,7 +93,7 @@ func queryChannelABCI(clientCtx client.Context, portID, channelID string) (*type return nil, err } - return types.NewQueryChannelResponse(portID, channelID, channel, proofBz, proofHeight), nil + return types.NewQueryChannelResponse(channel, proofBz, proofHeight), nil } // QueryChannelClientState returns the ClientState of a channel end. If @@ -229,5 +229,5 @@ func queryNextSequenceRecvABCI(clientCtx client.Context, portID, channelID strin sequence := binary.BigEndian.Uint64(value) - return types.NewQueryNextSequenceReceiveResponse(portID, channelID, sequence, proofBz, proofHeight), nil + return types.NewQueryNextSequenceReceiveResponse(sequence, proofBz, proofHeight), nil } diff --git a/x/ibc/core/04-channel/keeper/grpc_query.go b/x/ibc/core/04-channel/keeper/grpc_query.go index 433b135fc2..86d340a507 100644 --- a/x/ibc/core/04-channel/keeper/grpc_query.go +++ b/x/ibc/core/04-channel/keeper/grpc_query.go @@ -40,7 +40,7 @@ func (q Keeper) Channel(c context.Context, req *types.QueryChannelRequest) (*typ } selfHeight := clienttypes.GetSelfHeight(ctx) - return types.NewQueryChannelResponse(req.PortId, req.ChannelId, channel, nil, selfHeight), nil + return types.NewQueryChannelResponse(channel, nil, selfHeight), nil } // Channels implements the Query/Channels gRPC method @@ -222,7 +222,7 @@ func (q Keeper) PacketCommitment(c context.Context, req *types.QueryPacketCommit } selfHeight := clienttypes.GetSelfHeight(ctx) - return types.NewQueryPacketCommitmentResponse(req.PortId, req.ChannelId, req.Sequence, commitmentBz, nil, selfHeight), nil + return types.NewQueryPacketCommitmentResponse(commitmentBz, nil, selfHeight), nil } // PacketCommitments implements the Query/PacketCommitments gRPC method @@ -287,7 +287,7 @@ func (q Keeper) PacketAcknowledgement(c context.Context, req *types.QueryPacketA } selfHeight := clienttypes.GetSelfHeight(ctx) - return types.NewQueryPacketAcknowledgementResponse(req.PortId, req.ChannelId, req.Sequence, acknowledgementBz, nil, selfHeight), nil + return types.NewQueryPacketAcknowledgementResponse(acknowledgementBz, nil, selfHeight), nil } // UnreceivedPackets implements the Query/UnreceivedPackets gRPC method. Given @@ -411,7 +411,7 @@ func (q Keeper) NextSequenceReceive(c context.Context, req *types.QueryNextSeque } selfHeight := clienttypes.GetSelfHeight(ctx) - return types.NewQueryNextSequenceReceiveResponse(req.PortId, req.ChannelId, sequence, nil, selfHeight), nil + return types.NewQueryNextSequenceReceiveResponse(sequence, nil, selfHeight), nil } func validategRPCRequest(portID, channelID string) error { diff --git a/x/ibc/core/04-channel/types/query.go b/x/ibc/core/04-channel/types/query.go index 91bf2ed823..debe1acb33 100644 --- a/x/ibc/core/04-channel/types/query.go +++ b/x/ibc/core/04-channel/types/query.go @@ -1,84 +1,68 @@ package types import ( - "strings" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" clienttypes "github.com/cosmos/cosmos-sdk/x/ibc/core/02-client/types" - commitmenttypes "github.com/cosmos/cosmos-sdk/x/ibc/core/23-commitment/types" - host "github.com/cosmos/cosmos-sdk/x/ibc/core/24-host" "github.com/cosmos/cosmos-sdk/x/ibc/core/exported" ) // NewQueryChannelResponse creates a new QueryChannelResponse instance -func NewQueryChannelResponse(portID, channelID string, channel Channel, proof []byte, height clienttypes.Height) *QueryChannelResponse { - path := commitmenttypes.NewMerklePath(strings.Split(host.ChannelPath(portID, channelID), "/")) +func NewQueryChannelResponse(channel Channel, proof []byte, height clienttypes.Height) *QueryChannelResponse { return &QueryChannelResponse{ Channel: &channel, Proof: proof, - ProofPath: path.Pretty(), ProofHeight: height, } } // NewQueryChannelClientStateResponse creates a newQueryChannelClientStateResponse instance func NewQueryChannelClientStateResponse(identifiedClientState clienttypes.IdentifiedClientState, proof []byte, height clienttypes.Height) *QueryChannelClientStateResponse { - path := commitmenttypes.NewMerklePath(strings.Split(host.FullClientPath(identifiedClientState.ClientId, host.ClientStatePath()), "/")) return &QueryChannelClientStateResponse{ IdentifiedClientState: &identifiedClientState, Proof: proof, - ProofPath: path.Pretty(), ProofHeight: height, } } // NewQueryChannelConsensusStateResponse creates a newQueryChannelConsensusStateResponse instance func NewQueryChannelConsensusStateResponse(clientID string, anyConsensusState *codectypes.Any, consensusStateHeight exported.Height, proof []byte, height clienttypes.Height) *QueryChannelConsensusStateResponse { - path := commitmenttypes.NewMerklePath(strings.Split(host.FullClientPath(clientID, host.ConsensusStatePath(consensusStateHeight)), "/")) return &QueryChannelConsensusStateResponse{ ConsensusState: anyConsensusState, ClientId: clientID, Proof: proof, - ProofPath: path.Pretty(), ProofHeight: height, } } // NewQueryPacketCommitmentResponse creates a new QueryPacketCommitmentResponse instance func NewQueryPacketCommitmentResponse( - portID, channelID string, sequence uint64, commitment []byte, proof []byte, height clienttypes.Height, + commitment []byte, proof []byte, height clienttypes.Height, ) *QueryPacketCommitmentResponse { - path := commitmenttypes.NewMerklePath(strings.Split(host.PacketCommitmentPath(portID, channelID, sequence), "/")) return &QueryPacketCommitmentResponse{ Commitment: commitment, Proof: proof, - ProofPath: path.Pretty(), ProofHeight: height, } } // NewQueryPacketAcknowledgementResponse creates a new QueryPacketAcknowledgementResponse instance func NewQueryPacketAcknowledgementResponse( - portID, channelID string, sequence uint64, acknowledgement []byte, proof []byte, height clienttypes.Height, + acknowledgement []byte, proof []byte, height clienttypes.Height, ) *QueryPacketAcknowledgementResponse { - path := commitmenttypes.NewMerklePath(strings.Split(host.PacketAcknowledgementPath(portID, channelID, sequence), "/")) return &QueryPacketAcknowledgementResponse{ Acknowledgement: acknowledgement, Proof: proof, - ProofPath: path.Pretty(), ProofHeight: height, } } // NewQueryNextSequenceReceiveResponse creates a new QueryNextSequenceReceiveResponse instance func NewQueryNextSequenceReceiveResponse( - portID, channelID string, sequence uint64, proof []byte, height clienttypes.Height, + sequence uint64, proof []byte, height clienttypes.Height, ) *QueryNextSequenceReceiveResponse { - path := commitmenttypes.NewMerklePath(strings.Split(host.NextSequenceRecvPath(portID, channelID), "/")) return &QueryNextSequenceReceiveResponse{ NextSequenceReceive: sequence, Proof: proof, - ProofPath: path.Pretty(), ProofHeight: height, } } diff --git a/x/ibc/core/04-channel/types/query.pb.go b/x/ibc/core/04-channel/types/query.pb.go index 8bb272f255..073e2c5bec 100644 --- a/x/ibc/core/04-channel/types/query.pb.go +++ b/x/ibc/core/04-channel/types/query.pb.go @@ -95,10 +95,8 @@ type QueryChannelResponse struct { Channel *Channel `protobuf:"bytes,1,opt,name=channel,proto3" json:"channel,omitempty"` // merkle proof of existence Proof []byte `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof,omitempty"` - // merkle proof path - ProofPath string `protobuf:"bytes,3,opt,name=proof_path,json=proofPath,proto3" json:"proof_path,omitempty"` // height at which the proof was retrieved - ProofHeight types.Height `protobuf:"bytes,4,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height"` + ProofHeight types.Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height"` } func (m *QueryChannelResponse) Reset() { *m = QueryChannelResponse{} } @@ -148,13 +146,6 @@ func (m *QueryChannelResponse) GetProof() []byte { return nil } -func (m *QueryChannelResponse) GetProofPath() string { - if m != nil { - return m.ProofPath - } - return "" -} - func (m *QueryChannelResponse) GetProofHeight() types.Height { if m != nil { return m.ProofHeight @@ -456,10 +447,8 @@ type QueryChannelClientStateResponse struct { IdentifiedClientState *types.IdentifiedClientState `protobuf:"bytes,1,opt,name=identified_client_state,json=identifiedClientState,proto3" json:"identified_client_state,omitempty"` // merkle proof of existence Proof []byte `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof,omitempty"` - // merkle proof path - ProofPath string `protobuf:"bytes,3,opt,name=proof_path,json=proofPath,proto3" json:"proof_path,omitempty"` // height at which the proof was retrieved - ProofHeight types.Height `protobuf:"bytes,4,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height"` + ProofHeight types.Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height"` } func (m *QueryChannelClientStateResponse) Reset() { *m = QueryChannelClientStateResponse{} } @@ -509,13 +498,6 @@ func (m *QueryChannelClientStateResponse) GetProof() []byte { return nil } -func (m *QueryChannelClientStateResponse) GetProofPath() string { - if m != nil { - return m.ProofPath - } - return "" -} - func (m *QueryChannelClientStateResponse) GetProofHeight() types.Height { if m != nil { return m.ProofHeight @@ -606,10 +588,8 @@ type QueryChannelConsensusStateResponse struct { ClientId string `protobuf:"bytes,2,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` // merkle proof of existence Proof []byte `protobuf:"bytes,3,opt,name=proof,proto3" json:"proof,omitempty"` - // merkle proof path - ProofPath string `protobuf:"bytes,4,opt,name=proof_path,json=proofPath,proto3" json:"proof_path,omitempty"` // height at which the proof was retrieved - ProofHeight types.Height `protobuf:"bytes,5,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height"` + ProofHeight types.Height `protobuf:"bytes,4,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height"` } func (m *QueryChannelConsensusStateResponse) Reset() { *m = QueryChannelConsensusStateResponse{} } @@ -666,13 +646,6 @@ func (m *QueryChannelConsensusStateResponse) GetProof() []byte { return nil } -func (m *QueryChannelConsensusStateResponse) GetProofPath() string { - if m != nil { - return m.ProofPath - } - return "" -} - func (m *QueryChannelConsensusStateResponse) GetProofHeight() types.Height { if m != nil { return m.ProofHeight @@ -753,10 +726,8 @@ type QueryPacketCommitmentResponse struct { Commitment []byte `protobuf:"bytes,1,opt,name=commitment,proto3" json:"commitment,omitempty"` // merkle proof of existence Proof []byte `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof,omitempty"` - // merkle proof path - ProofPath string `protobuf:"bytes,3,opt,name=proof_path,json=proofPath,proto3" json:"proof_path,omitempty"` // height at which the proof was retrieved - ProofHeight types.Height `protobuf:"bytes,4,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height"` + ProofHeight types.Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height"` } func (m *QueryPacketCommitmentResponse) Reset() { *m = QueryPacketCommitmentResponse{} } @@ -806,13 +777,6 @@ func (m *QueryPacketCommitmentResponse) GetProof() []byte { return nil } -func (m *QueryPacketCommitmentResponse) GetProofPath() string { - if m != nil { - return m.ProofPath - } - return "" -} - func (m *QueryPacketCommitmentResponse) GetProofHeight() types.Height { if m != nil { return m.ProofHeight @@ -1022,10 +986,8 @@ type QueryPacketAcknowledgementResponse struct { Acknowledgement []byte `protobuf:"bytes,1,opt,name=acknowledgement,proto3" json:"acknowledgement,omitempty"` // merkle proof of existence Proof []byte `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof,omitempty"` - // merkle proof path - ProofPath string `protobuf:"bytes,3,opt,name=proof_path,json=proofPath,proto3" json:"proof_path,omitempty"` // height at which the proof was retrieved - ProofHeight types.Height `protobuf:"bytes,4,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height"` + ProofHeight types.Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height"` } func (m *QueryPacketAcknowledgementResponse) Reset() { *m = QueryPacketAcknowledgementResponse{} } @@ -1075,13 +1037,6 @@ func (m *QueryPacketAcknowledgementResponse) GetProof() []byte { return nil } -func (m *QueryPacketAcknowledgementResponse) GetProofPath() string { - if m != nil { - return m.ProofPath - } - return "" -} - func (m *QueryPacketAcknowledgementResponse) GetProofHeight() types.Height { if m != nil { return m.ProofHeight @@ -1394,10 +1349,8 @@ type QueryNextSequenceReceiveResponse struct { NextSequenceReceive uint64 `protobuf:"varint,1,opt,name=next_sequence_receive,json=nextSequenceReceive,proto3" json:"next_sequence_receive,omitempty"` // merkle proof of existence Proof []byte `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof,omitempty"` - // merkle proof path - ProofPath string `protobuf:"bytes,3,opt,name=proof_path,json=proofPath,proto3" json:"proof_path,omitempty"` // height at which the proof was retrieved - ProofHeight types.Height `protobuf:"bytes,4,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height"` + ProofHeight types.Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height"` } func (m *QueryNextSequenceReceiveResponse) Reset() { *m = QueryNextSequenceReceiveResponse{} } @@ -1447,13 +1400,6 @@ func (m *QueryNextSequenceReceiveResponse) GetProof() []byte { return nil } -func (m *QueryNextSequenceReceiveResponse) GetProofPath() string { - if m != nil { - return m.ProofPath - } - return "" -} - func (m *QueryNextSequenceReceiveResponse) GetProofHeight() types.Height { if m != nil { return m.ProofHeight @@ -1489,94 +1435,92 @@ func init() { func init() { proto.RegisterFile("ibc/core/channel/v1/query.proto", fileDescriptor_1034a1e9abc4cca1) } var fileDescriptor_1034a1e9abc4cca1 = []byte{ - // 1377 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x59, 0xcf, 0x6f, 0x1b, 0x45, - 0x14, 0xce, 0xd8, 0x6e, 0x9b, 0xbc, 0xfe, 0xa2, 0x93, 0x44, 0x4d, 0xb7, 0xa9, 0x93, 0xae, 0x54, - 0x48, 0x2b, 0x75, 0x07, 0x27, 0x25, 0x44, 0x08, 0x2a, 0x25, 0x91, 0x68, 0x53, 0xa9, 0x6d, 0xba, - 0x51, 0xa5, 0xb6, 0x07, 0xcc, 0x7a, 0x3d, 0xb1, 0x57, 0x89, 0x77, 0x5d, 0xef, 0xda, 0x4d, 0x08, - 0x46, 0xa8, 0x48, 0xd0, 0x13, 0x42, 0xea, 0x81, 0x23, 0x12, 0x37, 0xfe, 0x04, 0x4e, 0x5c, 0x73, - 0x23, 0x52, 0x39, 0x20, 0x21, 0x55, 0x28, 0xe1, 0xc0, 0x8d, 0x13, 0x17, 0x0e, 0x08, 0xed, 0xcc, - 0xec, 0x7a, 0xd7, 0xde, 0xdd, 0xc4, 0x71, 0x4a, 0x10, 0xa7, 0x7a, 0xdf, 0xbc, 0xf7, 0xe6, 0xfb, - 0xbe, 0xf7, 0x76, 0xf6, 0x4d, 0x03, 0x63, 0x46, 0x41, 0x27, 0xba, 0x55, 0xa3, 0x44, 0x2f, 0x6b, - 0xa6, 0x49, 0x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xf6, 0x4c, 0x98, 0x99, 0x9a, 0xa4, 0xee, - 0x03, 0xca, 0x57, 0x05, 0xe5, 0x3f, 0x11, 0x9c, 0x0c, 0x8d, 0x48, 0x58, 0x49, 0x26, 0xd4, 0x3e, - 0xe0, 0x49, 0x64, 0xcf, 0xfe, 0x82, 0xfc, 0x53, 0x4e, 0xfe, 0x63, 0xfc, 0xd1, 0xbf, 0xcd, 0x9d, - 0x61, 0x61, 0xbd, 0x80, 0x7f, 0x42, 0x30, 0x18, 0x31, 0x48, 0xe1, 0x84, 0x4f, 0x49, 0xfc, 0x4c, - 0x27, 0xbd, 0xd5, 0x65, 0x94, 0x50, 0x62, 0x91, 0x09, 0x71, 0x0b, 0xdf, 0xec, 0x41, 0x88, 0xd0, - 0xb8, 0x37, 0xa7, 0x6e, 0x6e, 0x67, 0xd1, 0xd6, 0x76, 0x16, 0xfd, 0xba, 0x9d, 0x45, 0x5f, 0xed, - 0x64, 0xfb, 0xb6, 0x76, 0xb2, 0x7d, 0x3f, 0xef, 0x64, 0xfb, 0x1e, 0xcd, 0x94, 0x0c, 0xa7, 0x5c, - 0x2f, 0x28, 0xba, 0x55, 0x21, 0xe2, 0xef, 0x07, 0xfc, 0x9f, 0xab, 0x76, 0x71, 0x85, 0xac, 0x11, - 0xff, 0xef, 0x04, 0x6f, 0x5e, 0xbb, 0xea, 0x21, 0x71, 0xd6, 0xab, 0xd4, 0x2e, 0x1c, 0x65, 0xff, - 0x61, 0x33, 0xf5, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x51, 0xd1, 0xa1, 0x4e, 0xce, 0x18, 0x00, - 0x00, + // 1353 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x58, 0xcf, 0x6f, 0xdc, 0xc4, + 0x17, 0xcf, 0xec, 0x6e, 0xdb, 0xe4, 0xf5, 0xd7, 0xb7, 0x93, 0x44, 0x4d, 0xdd,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x6a, 0x05, 0x45, 0xb7, 0xca, 0x44, 0xfc, 0x17, + 0x9e, 0xff, 0xb9, 0x6a, 0x17, 0x57, 0xc9, 0x3a, 0xf1, 0xff, 0xdb, 0xfe, 0xe6, 0xb5, 0xab, 0x1e, + 0x12, 0x67, 0xa3, 0x42, 0xed, 0xc2, 0x51, 0xf6, 0x4f, 0x93, 0xa9, 0xbf, 0x02, 0x00, 0x00, 0xff, + 0xff, 0x4c, 0x6c, 0x44, 0xa5, 0x14, 0x18, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -2119,14 +2063,7 @@ func (m *QueryChannelResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintQuery(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x22 - if len(m.ProofPath) > 0 { - i -= len(m.ProofPath) - copy(dAtA[i:], m.ProofPath) - i = encodeVarintQuery(dAtA, i, uint64(len(m.ProofPath))) - i-- - dAtA[i] = 0x1a - } + dAtA[i] = 0x1a if len(m.Proof) > 0 { i -= len(m.Proof) copy(dAtA[i:], m.Proof) @@ -2410,14 +2347,7 @@ func (m *QueryChannelClientStateResponse) MarshalToSizedBuffer(dAtA []byte) (int i = encodeVarintQuery(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x22 - if len(m.ProofPath) > 0 { - i -= len(m.ProofPath) - copy(dAtA[i:], m.ProofPath) - i = encodeVarintQuery(dAtA, i, uint64(len(m.ProofPath))) - i-- - dAtA[i] = 0x1a - } + dAtA[i] = 0x1a if len(m.Proof) > 0 { i -= len(m.Proof) copy(dAtA[i:], m.Proof) @@ -2516,14 +2446,7 @@ func (m *QueryChannelConsensusStateResponse) MarshalToSizedBuffer(dAtA []byte) ( i = encodeVarintQuery(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x2a - if len(m.ProofPath) > 0 { - i -= len(m.ProofPath) - copy(dAtA[i:], m.ProofPath) - i = encodeVarintQuery(dAtA, i, uint64(len(m.ProofPath))) - i-- - dAtA[i] = 0x22 - } + dAtA[i] = 0x22 if len(m.Proof) > 0 { i -= len(m.Proof) copy(dAtA[i:], m.Proof) @@ -2624,14 +2547,7 @@ func (m *QueryPacketCommitmentResponse) MarshalToSizedBuffer(dAtA []byte) (int, i = encodeVarintQuery(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x22 - if len(m.ProofPath) > 0 { - i -= len(m.ProofPath) - copy(dAtA[i:], m.ProofPath) - i = encodeVarintQuery(dAtA, i, uint64(len(m.ProofPath))) - i-- - dAtA[i] = 0x1a - } + dAtA[i] = 0x1a if len(m.Proof) > 0 { i -= len(m.Proof) copy(dAtA[i:], m.Proof) @@ -2828,14 +2744,7 @@ func (m *QueryPacketAcknowledgementResponse) MarshalToSizedBuffer(dAtA []byte) ( i = encodeVarintQuery(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x22 - if len(m.ProofPath) > 0 { - i -= len(m.ProofPath) - copy(dAtA[i:], m.ProofPath) - i = encodeVarintQuery(dAtA, i, uint64(len(m.ProofPath))) - i-- - dAtA[i] = 0x1a - } + dAtA[i] = 0x1a if len(m.Proof) > 0 { i -= len(m.Proof) copy(dAtA[i:], m.Proof) @@ -3131,14 +3040,7 @@ func (m *QueryNextSequenceReceiveResponse) MarshalToSizedBuffer(dAtA []byte) (in i = encodeVarintQuery(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x22 - if len(m.ProofPath) > 0 { - i -= len(m.ProofPath) - copy(dAtA[i:], m.ProofPath) - i = encodeVarintQuery(dAtA, i, uint64(len(m.ProofPath))) - i-- - dAtA[i] = 0x1a - } + dAtA[i] = 0x1a if len(m.Proof) > 0 { i -= len(m.Proof) copy(dAtA[i:], m.Proof) @@ -3196,10 +3098,6 @@ func (m *QueryChannelResponse) Size() (n int) { if l > 0 { n += 1 + l + sovQuery(uint64(l)) } - l = len(m.ProofPath) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } l = m.ProofHeight.Size() n += 1 + l + sovQuery(uint64(l)) return n @@ -3308,10 +3206,6 @@ func (m *QueryChannelClientStateResponse) Size() (n int) { if l > 0 { n += 1 + l + sovQuery(uint64(l)) } - l = len(m.ProofPath) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } l = m.ProofHeight.Size() n += 1 + l + sovQuery(uint64(l)) return n @@ -3358,10 +3252,6 @@ func (m *QueryChannelConsensusStateResponse) Size() (n int) { if l > 0 { n += 1 + l + sovQuery(uint64(l)) } - l = len(m.ProofPath) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } l = m.ProofHeight.Size() n += 1 + l + sovQuery(uint64(l)) return n @@ -3401,10 +3291,6 @@ func (m *QueryPacketCommitmentResponse) Size() (n int) { if l > 0 { n += 1 + l + sovQuery(uint64(l)) } - l = len(m.ProofPath) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } l = m.ProofHeight.Size() n += 1 + l + sovQuery(uint64(l)) return n @@ -3486,10 +3372,6 @@ func (m *QueryPacketAcknowledgementResponse) Size() (n int) { if l > 0 { n += 1 + l + sovQuery(uint64(l)) } - l = len(m.ProofPath) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } l = m.ProofHeight.Size() n += 1 + l + sovQuery(uint64(l)) return n @@ -3609,10 +3491,6 @@ func (m *QueryNextSequenceReceiveResponse) Size() (n int) { if l > 0 { n += 1 + l + sovQuery(uint64(l)) } - l = len(m.ProofPath) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } l = m.ProofHeight.Size() n += 1 + l + sovQuery(uint64(l)) return n @@ -3841,38 +3719,6 @@ func (m *QueryChannelResponse) Unmarshal(dAtA []byte) error { } iNdEx = postIndex case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProofPath", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProofPath = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ProofHeight", wireType) } @@ -4668,38 +4514,6 @@ func (m *QueryChannelClientStateResponse) Unmarshal(dAtA []byte) error { } iNdEx = postIndex case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProofPath", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProofPath = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ProofHeight", wireType) } @@ -5043,38 +4857,6 @@ func (m *QueryChannelConsensusStateResponse) Unmarshal(dAtA []byte) error { } iNdEx = postIndex case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProofPath", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProofPath = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ProofHeight", wireType) } @@ -5365,38 +5147,6 @@ func (m *QueryPacketCommitmentResponse) Unmarshal(dAtA []byte) error { } iNdEx = postIndex case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProofPath", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProofPath = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ProofHeight", wireType) } @@ -5996,38 +5746,6 @@ func (m *QueryPacketAcknowledgementResponse) Unmarshal(dAtA []byte) error { } iNdEx = postIndex case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProofPath", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProofPath = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ProofHeight", wireType) } @@ -6994,38 +6712,6 @@ func (m *QueryNextSequenceReceiveResponse) Unmarshal(dAtA []byte) error { } iNdEx = postIndex case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProofPath", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProofPath = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ProofHeight", wireType) } From 9087ffc774a8c586d04cb90c90438c02cca9ab5b Mon Sep 17 00:00:00 2001 From: Amaury Martiny Date: Thu, 29 Oct 2020 16:32:47 +0100 Subject: [PATCH 018/136] Throw an error on duplicate registration (#7729) * Panic on registering a service twice * Panic if we register twice * Fix test * Fix test * Add clearer panic message * Add comment * Fix test --- baseapp/grpcrouter.go | 20 +++++++++++- baseapp/grpcrouter_helpers.go | 6 ++-- baseapp/grpcrouter_test.go | 38 +++++++++++++++++++--- baseapp/msg_service_router.go | 21 ++++++++++-- baseapp/msg_service_router_test.go | 27 +++++++++++++++- client/grpc/reflection/reflection_test.go | 5 --- codec/types/interface_registry.go | 33 +++++++++++++++++++ codec/types/types_test.go | 39 +++++++++++++++++++++++ 8 files changed, 173 insertions(+), 16 deletions(-) diff --git a/baseapp/grpcrouter.go b/baseapp/grpcrouter.go index a32da67581..566333b2a4 100644 --- a/baseapp/grpcrouter.go +++ b/baseapp/grpcrouter.go @@ -54,13 +54,31 @@ func (qrt *GRPCQueryRouter) Route(path string) GRPCQueryHandler { } // RegisterService implements the gRPC Server.RegisterService method. sd is a gRPC -// service description, handler is an object which implements that gRPC service +// service description, handler is an object which implements that gRPC service/ +// +// This functions PANICS: +// - if a protobuf service is registered twice. func (qrt *GRPCQueryRouter) RegisterService(sd *grpc.ServiceDesc, handler interface{}) { // adds a top-level query handler based on the gRPC service name for _, method := range sd.Methods { fqName := fmt.Sprintf("/%s/%s", sd.ServiceName, method.MethodName) methodHandler := method.Handler + // Check that each service is only registered once. If a service is + // registered more than once, then we should error. Since we can't + // return an error (`Server.RegisterService` interface restriction) we + // panic (at startup). + _, found := qrt.routes[fqName] + if found { + panic( + fmt.Errorf( + "gRPC query service %s has already been registered. Please make sure to only register each service once. "+ + "This usually means that there are conflicting modules registering the same gRPC query service", + fqName, + ), + ) + } + qrt.routes[fqName] = func(ctx sdk.Context, req abci.RequestQuery) (abci.ResponseQuery, error) { // call the method handler from the service description with the handler object, // a wrapped sdk.Context with proto-unmarshaled data from the ABCI request data diff --git a/baseapp/grpcrouter_helpers.go b/baseapp/grpcrouter_helpers.go index bd7d498e7a..2ea74b55fc 100644 --- a/baseapp/grpcrouter_helpers.go +++ b/baseapp/grpcrouter_helpers.go @@ -18,7 +18,7 @@ import ( // service client. type QueryServiceTestHelper struct { *GRPCQueryRouter - ctx sdk.Context + Ctx sdk.Context } var ( @@ -31,7 +31,7 @@ var ( func NewQueryServerTestHelper(ctx sdk.Context, interfaceRegistry types.InterfaceRegistry) *QueryServiceTestHelper { qrt := NewGRPCQueryRouter() qrt.SetInterfaceRegistry(interfaceRegistry) - return &QueryServiceTestHelper{GRPCQueryRouter: qrt, ctx: ctx} + return &QueryServiceTestHelper{GRPCQueryRouter: qrt, Ctx: ctx} } // Invoke implements the grpc ClientConn.Invoke method @@ -45,7 +45,7 @@ func (q *QueryServiceTestHelper) Invoke(_ gocontext.Context, method string, args return err } - res, err := querier(q.ctx, abci.RequestQuery{Data: reqBz}) + res, err := querier(q.Ctx, abci.RequestQuery{Data: reqBz}) if err != nil { return err } diff --git a/baseapp/grpcrouter_test.go b/baseapp/grpcrouter_test.go index d2051a1132..6a83939b4a 100644 --- a/baseapp/grpcrouter_test.go +++ b/baseapp/grpcrouter_test.go @@ -1,24 +1,29 @@ -package baseapp +package baseapp_test import ( "context" + "os" "testing" "github.com/stretchr/testify/require" + "github.com/tendermint/tendermint/libs/log" + dbm "github.com/tendermint/tm-db" + "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/codec/types" + "github.com/cosmos/cosmos-sdk/simapp" "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" ) func TestGRPCRouter(t *testing.T) { - qr := NewGRPCQueryRouter() + qr := baseapp.NewGRPCQueryRouter() interfaceRegistry := testdata.NewTestInterfaceRegistry() qr.SetInterfaceRegistry(interfaceRegistry) testdata.RegisterQueryServer(qr, testdata.QueryImpl{}) - helper := &QueryServiceTestHelper{ + helper := &baseapp.QueryServiceTestHelper{ GRPCQueryRouter: qr, - ctx: sdk.Context{}.WithContext(context.Background()), + Ctx: sdk.Context{}.WithContext(context.Background()), } client := testdata.NewQueryClient(helper) @@ -44,3 +49,28 @@ func TestGRPCRouter(t *testing.T) { require.NotNil(t, res3) require.Equal(t, spot, res3.HasAnimal.Animal.GetCachedValue()) } + +func TestRegisterQueryServiceTwice(t *testing.T) { + // Setup baseapp. + db := dbm.NewMemDB() + encCfg := simapp.MakeTestEncodingConfig() + app := baseapp.NewBaseApp("test", log.NewTMLogger(log.NewSyncWriter(os.Stdout)), db, encCfg.TxConfig.TxDecoder()) + app.SetInterfaceRegistry(encCfg.InterfaceRegistry) + testdata.RegisterInterfaces(encCfg.InterfaceRegistry) + + // First time registering service shouldn't panic. + require.NotPanics(t, func() { + testdata.RegisterQueryServer( + app.GRPCQueryRouter(), + testdata.QueryImpl{}, + ) + }) + + // Second time should panic. + require.Panics(t, func() { + testdata.RegisterQueryServer( + app.GRPCQueryRouter(), + testdata.QueryImpl{}, + ) + }) +} diff --git a/baseapp/msg_service_router.go b/baseapp/msg_service_router.go index b883faa37b..ea2ed4b4eb 100644 --- a/baseapp/msg_service_router.go +++ b/baseapp/msg_service_router.go @@ -40,8 +40,10 @@ func (msr *MsgServiceRouter) Handler(methodName string) MsgServiceHandler { // RegisterService implements the gRPC Server.RegisterService method. sd is a gRPC // service description, handler is an object which implements that gRPC service. // -// This function PANICs if it is called before the service `Msg`s have been -// registered using RegisterInterfaces. +// This function PANICs: +// - if it is called before the service `Msg`s have been registered using +// RegisterInterfaces, +// - or if a service is being registered twice. func (msr *MsgServiceRouter) RegisterService(sd *grpc.ServiceDesc, handler interface{}) { // Adds a top-level query handler based on the gRPC service name. for _, method := range sd.Methods { @@ -66,6 +68,21 @@ func (msr *MsgServiceRouter) RegisterService(sd *grpc.ServiceDesc, handler inter ) } + // Check that each service is only registered once. If a service is + // registered more than once, then we should error. Since we can't + // return an error (`Server.RegisterService` interface restriction) we + // panic (at startup). + _, found := msr.routes[fqMethod] + if found { + panic( + fmt.Errorf( + "msg service %s has already been registered. Please make sure to only register each service once. "+ + "This usually means that there are conflicting modules registering the same msg service", + fqMethod, + ), + ) + } + msr.routes[fqMethod] = func(ctx sdk.Context, req sdk.MsgRequest) (*sdk.Result, error) { ctx = ctx.WithEventManager(sdk.NewEventManager()) interceptor := func(goCtx context.Context, _ interface{}, _ *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error) { diff --git a/baseapp/msg_service_router_test.go b/baseapp/msg_service_router_test.go index bbbf9e1356..34f9c08027 100644 --- a/baseapp/msg_service_router_test.go +++ b/baseapp/msg_service_router_test.go @@ -18,7 +18,7 @@ import ( authsigning "github.com/cosmos/cosmos-sdk/x/auth/signing" ) -func TestRegisterService(t *testing.T) { +func TestRegisterMsgService(t *testing.T) { db := dbm.NewMemDB() // Create an encoding config that doesn't register testdata Msg services. @@ -42,6 +42,31 @@ func TestRegisterService(t *testing.T) { }) } +func TestRegisterMsgServiceTwice(t *testing.T) { + // Setup baseapp. + db := dbm.NewMemDB() + encCfg := simapp.MakeTestEncodingConfig() + app := baseapp.NewBaseApp("test", log.NewTMLogger(log.NewSyncWriter(os.Stdout)), db, encCfg.TxConfig.TxDecoder()) + app.SetInterfaceRegistry(encCfg.InterfaceRegistry) + testdata.RegisterInterfaces(encCfg.InterfaceRegistry) + + // First time registering service shouldn't panic. + require.NotPanics(t, func() { + testdata.RegisterMsgServer( + app.MsgServiceRouter(), + testdata.MsgServerImpl{}, + ) + }) + + // Second time should panic. + require.Panics(t, func() { + testdata.RegisterMsgServer( + app.MsgServiceRouter(), + testdata.MsgServerImpl{}, + ) + }) +} + func TestMsgService(t *testing.T) { priv, _, _ := testdata.KeyTestPubAddr() encCfg := simapp.MakeTestEncodingConfig() diff --git a/client/grpc/reflection/reflection_test.go b/client/grpc/reflection/reflection_test.go index 037e7e06ae..211fc397ad 100644 --- a/client/grpc/reflection/reflection_test.go +++ b/client/grpc/reflection/reflection_test.go @@ -21,14 +21,9 @@ type IntegrationTestSuite struct { func (s *IntegrationTestSuite) SetupSuite() { app := simapp.Setup(false) - srv := reflection.NewReflectionServiceServer(app.InterfaceRegistry()) - sdkCtx := app.BaseApp.NewContext(false, tmproto.Header{}) queryHelper := baseapp.NewQueryServerTestHelper(sdkCtx, app.InterfaceRegistry()) - - reflection.RegisterReflectionServiceServer(queryHelper, srv) queryClient := reflection.NewReflectionServiceClient(queryHelper) - s.queryClient = queryClient } diff --git a/codec/types/interface_registry.go b/codec/types/interface_registry.go index 57650af61d..0f9eb760be 100644 --- a/codec/types/interface_registry.go +++ b/codec/types/interface_registry.go @@ -115,6 +115,11 @@ func (registry *interfaceRegistry) RegisterInterface(protoName string, iface int registry.RegisterImplementations(iface, impls...) } +// RegisterImplementations registers a concrete proto Message which implements +// the given interface. +// +// This function PANICs if different concrete types are registered under the +// same typeURL. func (registry *interfaceRegistry) RegisterImplementations(iface interface{}, impls ...proto.Message) { for _, impl := range impls { typeURL := "/" + proto.MessageName(impl) @@ -122,10 +127,20 @@ func (registry *interfaceRegistry) RegisterImplementations(iface interface{}, im } } +// RegisterCustomTypeURL registers a concrete type which implements the given +// interface under `typeURL`. +// +// This function PANICs if different concrete types are registered under the +// same typeURL. func (registry *interfaceRegistry) RegisterCustomTypeURL(iface interface{}, typeURL string, impl proto.Message) { registry.registerImpl(iface, typeURL, impl) } +// registerImpl registers a concrete type which implements the given +// interface under `typeURL`. +// +// This function PANICs if different concrete types are registered under the +// same typeURL. func (registry *interfaceRegistry) registerImpl(iface interface{}, typeURL string, impl proto.Message) { ityp := reflect.TypeOf(iface).Elem() imap, found := registry.interfaceImpls[ityp] @@ -138,6 +153,24 @@ func (registry *interfaceRegistry) registerImpl(iface interface{}, typeURL strin panic(fmt.Errorf("type %T doesn't actually implement interface %+v", impl, ityp)) } + // Check if we already registered something under the given typeURL. It's + // okay to register the same concrete type again, but if we are registering + // a new concrete type under the same typeURL, then we throw an error (here, + // we panic). + foundImplType, found := imap[typeURL] + if found && foundImplType != implType { + panic( + fmt.Errorf( + "concrete type %s has already been registered under typeURL %s, cannot register %s under same typeURL. "+ + "This usually means that there are conflicting modules registering different concrete types "+ + "for a same interface implementation", + foundImplType, + typeURL, + implType, + ), + ) + } + imap[typeURL] = implType registry.typeURLMap[typeURL] = implType diff --git a/codec/types/types_test.go b/codec/types/types_test.go index 5e2a0f7f77..1ff03a5f56 100644 --- a/codec/types/types_test.go +++ b/codec/types/types_test.go @@ -48,22 +48,61 @@ type TestI interface { DoSomething() } +// A struct that has the same typeURL as testdata.Dog, but is actually another +// concrete type. +type FakeDog struct{} + +var ( + _ proto.Message = &FakeDog{} + _ testdata.Animal = &FakeDog{} +) + +// dummy implementation of proto.Message and testdata.Animal +func (dog FakeDog) Reset() {} +func (dog FakeDog) String() string { return "fakedog" } +func (dog FakeDog) ProtoMessage() {} +func (dog FakeDog) XXX_MessageName() string { return proto.MessageName(&testdata.Dog{}) } +func (dog FakeDog) Greet() string { return "fakedog" } + func TestRegister(t *testing.T) { registry := types.NewInterfaceRegistry() registry.RegisterInterface("Animal", (*testdata.Animal)(nil)) registry.RegisterInterface("TestI", (*TestI)(nil)) + + // Happy path. require.NotPanics(t, func() { registry.RegisterImplementations((*testdata.Animal)(nil), &testdata.Dog{}) }) + + // testdata.Dog doesn't implement TestI require.Panics(t, func() { registry.RegisterImplementations((*TestI)(nil), &testdata.Dog{}) }) + + // nil proto message require.Panics(t, func() { registry.RegisterImplementations((*TestI)(nil), nil) }) + + // Not an interface. require.Panics(t, func() { registry.RegisterInterface("not_an_interface", (*testdata.Dog)(nil)) }) + + // Duplicate registration with same concrete type. + require.NotPanics(t, func() { + registry.RegisterImplementations((*testdata.Animal)(nil), &testdata.Dog{}) + }) + + // Duplicate registration with different concrete type on same typeURL. + require.PanicsWithError( + t, + "concrete type *testdata.Dog has already been registered under typeURL /testdata.Dog, cannot register *types_test.FakeDog under same typeURL. "+ + "This usually means that there are conflicting modules registering different concrete types for a same interface implementation", + func() { + registry.RegisterImplementations((*testdata.Animal)(nil), &FakeDog{}) + }, + ) } func TestUnpackInterfaces(t *testing.T) { From 3a871b86cef8c56baa6ed5bb6f1f1556dd60fab1 Mon Sep 17 00:00:00 2001 From: Sunny Aggarwal Date: Thu, 29 Oct 2020 14:09:05 -0400 Subject: [PATCH 019/136] sunny updates --- docs/architecture/adr-033-gov-split-vote.md | 74 +++++++++++++-------- 1 file changed, 45 insertions(+), 29 deletions(-) diff --git a/docs/architecture/adr-033-gov-split-vote.md b/docs/architecture/adr-033-gov-split-vote.md index d88ff773a8..5ef1cf5c9e 100644 --- a/docs/architecture/adr-033-gov-split-vote.md +++ b/docs/architecture/adr-033-gov-split-vote.md @@ -10,56 +10,72 @@ Proposed ## Abstract -This ADR defines a validator to split votes into several pieces. Assuming a group with multisig address vote on a proposal, the members could have different opinion. In this case spliting voting power into pieces could be useful. +This ADR defines a modification to the the governance module that would allow a staker to split their votes into several voting options. For example, it could use 70% of its voting power to vote Yes and 30% of its voting power to vote No. ## Context -Currently, an address can cast vote with only one of vote options(yes/no/abstrain/no_with_veto) and full votingPower of that address goes to one vote option. +Currently, an address can cast a vote with only one options (Yes/No/Abstain/NoWithVeto) and use their full voting power behind that choice. -To be more accurate in voting process, allowing the split of voting power could be very helpful. - -Assume that there are 100 members associated to a single validator address and they participate in voting process via that address. - -60 members cast yes vote, 30 members cast no vote, 5 members abstrain, 5 members no_with_veto. -If they just cast yes vote for 100% of voting power, it won't be fair enough for 40 members especially when that validator's voting power is quite high. - -If total voting power is 10000, and on above case we split voting power into 6000, 3000, 500, 500 pieces. +However, often times the entity owning that address might not be a single individual. For example, a company might have different stakeholders who want to vote differently, and so it makes sense to allow them to split their voting power. Another example use case is exchanges. Many centralized exchanges often stake a portion of their users' tokens in their custody. Currently, it is not possible for them to do "passthrough voting" and giving their users voting rights over their tokens. However, with this system, exchanges can poll their users for voting preferences, and then vote on-chain proportionally to the results of the poll. ## Decision -We will modify cli command from -```sh -simd tx gov vote 1 yes --from mykey -``` -to -```sh -simd tx gov vote 1 "yes=60,no=30,abstain=5,no_with_veto=5" --from mykey -``` +We modify the vote structs to be ``` -simd tx gov vote 1 yes --from mykey +Vote { + ProposalId int64 + Voter sdk.Address + Options []Option + Rates []sdk.Dec +} ``` -Old command still works and it's automatically converted to like below + +The `ValidateBasic` of a MsgVote struct would require that +1. The length of the Options slice is equal to the length of Rates slice +2. The sum of all the Rates is equal to 1.0 +3. No Option is repeated + +The governance tally function will iterate over all the options in a vote and add to the tally the result of the voter's voting power * the rate for that option. + +``` +tally() { + map tally + + for (_, vote) in votes { + for (i, options) in vote{ + tally.option += getVotingPower(vote.voter) * vote.rate[i] + } + } +} +``` + +The CLI command for creating a multi-option vote would be as such: +```sh +simd tx gov vote 1 "yes=0.6,no=0.3,abstain=0.05,no_with_veto=0.05" --from mykey +``` + +To create a single-option vote a user can do either ``` simd tx gov vote 1 "yes=1" --from mykey ``` -If you want to set VoteOption=1, you can omit `=1`. -``` -simd tx gov vote 1 "yes,no" --from mykey -``` -is same as -``` -simd tx gov vote 1 "yes=1,no=1" --from mykey +or + +```sh +simd tx gov vote 1 yes --from mykey ``` +to maintain backwards compatibility. + + ## Consequences ### Positive - It can make more accurate voting process especially for big validators. ### Negative +- ### Neutral - -## References +- Relatively minor change to governance tally function. From 71e551bbae237bf570779d451d2c4e21e9744548 Mon Sep 17 00:00:00 2001 From: Sunny Aggarwal Date: Thu, 29 Oct 2020 16:35:50 -0400 Subject: [PATCH 020/136] address @alexanderbez review --- docs/architecture/adr-033-gov-split-vote.md | 29 ++++++++++++--------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/docs/architecture/adr-033-gov-split-vote.md b/docs/architecture/adr-033-gov-split-vote.md index 5ef1cf5c9e..a567dd692d 100644 --- a/docs/architecture/adr-033-gov-split-vote.md +++ b/docs/architecture/adr-033-gov-split-vote.md @@ -23,28 +23,31 @@ However, often times the entity owning that address might not be a single indivi We modify the vote structs to be ``` -Vote { - ProposalId int64 - Voter sdk.Address - Options []Option - Rates []sdk.Dec +type WeightedVoteOption struct { + Option string + Weight sdk.Dec +} + +type Vote struct { + ProposalID int64 + Voter sdk.Address + Options []WeightedVoteOption } ``` The `ValidateBasic` of a MsgVote struct would require that -1. The length of the Options slice is equal to the length of Rates slice -2. The sum of all the Rates is equal to 1.0 -3. No Option is repeated +1. The sum of all the Rates is equal to 1.0 +2. No Option is repeated The governance tally function will iterate over all the options in a vote and add to the tally the result of the voter's voting power * the rate for that option. ``` tally() { - map tally + results := map[types.VoteOption]sdk.Dec - for (_, vote) in votes { - for (i, options) in vote{ - tally.option += getVotingPower(vote.voter) * vote.rate[i] + for _, vote := range votes { + for i, weightedOption := range vote.Options { + results[weightedOption.Option] += getVotingPower(vote.voter) * weightedOption.Weight } } } @@ -72,7 +75,7 @@ to maintain backwards compatibility. ## Consequences ### Positive -- It can make more accurate voting process especially for big validators. +- Can make the voting process more accurate for addresses representing multiple stakeholders, often some of the largest addresses. ### Negative - From e0e16f62f938f2e72c6e63a5f856c8a8535c293f Mon Sep 17 00:00:00 2001 From: Robert Zaremba Date: Thu, 29 Oct 2020 23:01:09 +0100 Subject: [PATCH 021/136] Remove duplicated Module.Route calls (#7716) * Remove duplicated Module.Route calls * make a proper test for registering empty route Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- types/module/module.go | 8 ++++---- types/module/module_test.go | 18 +++++++----------- types/router.go | 4 ++-- 3 files changed, 13 insertions(+), 17 deletions(-) diff --git a/types/module/module.go b/types/module/module.go index 6b678745e2..c58555a980 100644 --- a/types/module/module.go +++ b/types/module/module.go @@ -277,11 +277,11 @@ func (m *Manager) RegisterInvariants(ir sdk.InvariantRegistry) { // RegisterRoutes registers all module routes and module querier routes func (m *Manager) RegisterRoutes(router sdk.Router, queryRouter sdk.QueryRouter, legacyQuerierCdc *codec.LegacyAmino) { for _, module := range m.Modules { - if !module.Route().Empty() { - router.AddRoute(module.Route()) + if r := module.Route(); !r.Empty() { + router.AddRoute(r) } - if module.QuerierRoute() != "" { - queryRouter.AddRoute(module.QuerierRoute(), module.LegacyQuerierHandler(legacyQuerierCdc)) + if r := module.QuerierRoute(); r != "" { + queryRouter.AddRoute(r, module.LegacyQuerierHandler(legacyQuerierCdc)) } } } diff --git a/types/module/module_test.go b/types/module/module_test.go index cc331cf58f..630c576192 100644 --- a/types/module/module_test.go +++ b/types/module/module_test.go @@ -147,19 +147,15 @@ func TestManager_RegisterRoutes(t *testing.T) { require.Equal(t, 2, len(mm.Modules)) router := mocks.NewMockRouter(mockCtrl) - handler1, handler2 := sdk.Handler(func(ctx sdk.Context, msg sdk.Msg) (*sdk.Result, error) { - return nil, nil - }), sdk.Handler(func(ctx sdk.Context, msg sdk.Msg) (*sdk.Result, error) { - return nil, nil - }) - route1 := sdk.NewRoute("route1", handler1) - route2 := sdk.NewRoute("route2", handler2) - mockAppModule1.EXPECT().Route().Times(2).Return(route1) - mockAppModule2.EXPECT().Route().Times(2).Return(route2) - router.EXPECT().AddRoute(gomock.Any()).Times(2) // Use of Any due to limitations to compare Functions as the sdk.Handler + noopHandler := sdk.Handler(func(ctx sdk.Context, msg sdk.Msg) (*sdk.Result, error) { return nil, nil }) + route1 := sdk.NewRoute("route1", noopHandler) + route2 := sdk.NewRoute("", noopHandler) + mockAppModule1.EXPECT().Route().Times(1).Return(route1) + mockAppModule2.EXPECT().Route().Times(1).Return(route2) + router.EXPECT().AddRoute(gomock.Any()).Times(1) // Use of Any due to limitations to compare Functions as the sdk.Handler queryRouter := mocks.NewMockQueryRouter(mockCtrl) - mockAppModule1.EXPECT().QuerierRoute().Times(2).Return("querierRoute1") + mockAppModule1.EXPECT().QuerierRoute().Times(1).Return("querierRoute1") mockAppModule2.EXPECT().QuerierRoute().Times(1).Return("") handler3 := sdk.Querier(nil) amino := codec.NewLegacyAmino() diff --git a/types/router.go b/types/router.go index 27c2127d5f..9dab11f606 100644 --- a/types/router.go +++ b/types/router.go @@ -40,7 +40,7 @@ type Route struct { // NewRoute returns an instance of Route. func NewRoute(p string, h Handler) Route { - return Route{path: p, handler: h} + return Route{path: strings.TrimSpace(p), handler: h} } // Path returns the path the route has assigned. @@ -55,7 +55,7 @@ func (r Route) Handler() Handler { // Empty returns true only if both handler and path are not empty. func (r Route) Empty() bool { - return r.handler == nil || r.path == strings.TrimSpace("") + return r.handler == nil || r.path == "" } // QueryRouter provides queryables for each query path. From b2bc32f3c9e289a54ca7ca2aac767032a8892f72 Mon Sep 17 00:00:00 2001 From: Jack Zampolin Date: Thu, 29 Oct 2020 15:19:01 -0700 Subject: [PATCH 022/136] Add function to query ack proofs (#7732) * Add function to query ack proofs * Fix compilation issue Co-authored-by: Aditya Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- x/ibc/core/04-channel/client/utils/utils.go | 33 +++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/x/ibc/core/04-channel/client/utils/utils.go b/x/ibc/core/04-channel/client/utils/utils.go index 5657367f41..4aa1363d31 100644 --- a/x/ibc/core/04-channel/client/utils/utils.go +++ b/x/ibc/core/04-channel/client/utils/utils.go @@ -231,3 +231,36 @@ func queryNextSequenceRecvABCI(clientCtx client.Context, portID, channelID strin return types.NewQueryNextSequenceReceiveResponse(sequence, proofBz, proofHeight), nil } + +// QueryPacketAcknowledgement returns the data about a packet acknowledgement. +// If prove is true, it performs an ABCI store query in order to retrieve the merkle proof. Otherwise, +// it uses the gRPC query client +func QueryPacketAcknowledgement(clientCtx client.Context, portID, channelID string, sequence uint64, prove bool) (*types.QueryPacketAcknowledgementResponse, error) { + if prove { + return queryPacketAcknowledgementABCI(clientCtx, portID, channelID, sequence) + } + + queryClient := types.NewQueryClient(clientCtx) + req := &types.QueryPacketAcknowledgementRequest{ + PortId: portID, + ChannelId: channelID, + Sequence: sequence, + } + + return queryClient.PacketAcknowledgement(context.Background(), req) +} + +func queryPacketAcknowledgementABCI(clientCtx client.Context, portID, channelID string, sequence uint64) (*types.QueryPacketAcknowledgementResponse, error) { + key := host.KeyPacketAcknowledgement(portID, channelID, sequence) + + value, proofBz, proofHeight, err := ibcclient.QueryTendermintProof(clientCtx, key) + if err != nil { + return nil, err + } + + if len(value) == 0 { + return nil, sdkerrors.Wrapf(types.ErrInvalidAcknowledgement, "portID (%s), channelID (%s), sequence (%d)", portID, channelID, sequence) + } + + return types.NewQueryPacketAcknowledgementResponse(value, proofBz, proofHeight), nil +} From 1961935fc7191c649f585d520608dcc0ca074114 Mon Sep 17 00:00:00 2001 From: Amaury Martiny Date: Fri, 30 Oct 2020 13:32:02 +0100 Subject: [PATCH 023/136] Add GetTx gRPC endpoint (#7688) * Add empty TxByHash * Fix search & replace * Renname to GetTx * Make getTx grpc work * Hash as string * Add todo comment * /tx * Make tests pass * Put into function * Add changelog * Fix lint * RegisterTxService in server * Remove comment * Update proto/cosmos/tx/v1beta1/service.proto Co-authored-by: Cory * Create new protoCdc * Move tx service to x/auth * Small tweaks * Link gh issue * Fix lint * Update x/auth/tx/service.go Co-authored-by: Aleksandr Bezobchuk Co-authored-by: Cory Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Co-authored-by: Aleksandr Bezobchuk Co-authored-by: SaReN --- CHANGELOG.md | 2 + baseapp/grpcrouter.go | 12 - client/grpc/simulate/simulate.go | 55 - client/grpc/simulate/simulate.pb.go | 679 ----------- client/grpc/simulate/simulate.pb.gw.go | 166 --- client/grpc/simulate/simulate_test.go | 119 -- client/tx/tx.go | 17 +- client/tx/tx_test.go | 4 +- .../base/simulate/v1beta1/simulate.proto | 33 - proto/cosmos/tx/v1beta1/service.proto | 49 + server/start.go | 3 + server/types/app.go | 5 + simapp/app.go | 19 +- testutil/network/util.go | 8 +- types/tx/service.pb.go | 1078 +++++++++++++++++ types/tx/service.pb.gw.go | 264 ++++ x/auth/tx/service.go | 111 ++ x/auth/tx/service_test.go | 164 +++ 18 files changed, 1710 insertions(+), 1078 deletions(-) delete mode 100644 client/grpc/simulate/simulate.go delete mode 100644 client/grpc/simulate/simulate.pb.go delete mode 100644 client/grpc/simulate/simulate.pb.gw.go delete mode 100644 client/grpc/simulate/simulate_test.go delete mode 100644 proto/cosmos/base/simulate/v1beta1/simulate.proto create mode 100644 proto/cosmos/tx/v1beta1/service.proto create mode 100644 types/tx/service.pb.go create mode 100644 types/tx/service.pb.gw.go create mode 100644 x/auth/tx/service.go create mode 100644 x/auth/tx/service_test.go diff --git a/CHANGELOG.md b/CHANGELOG.md index fd6ba83dd4..ef865bda5c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -51,11 +51,13 @@ Ref: https://keepachangelog.com/en/1.0.0/ * `Validator.ConsensusPubkey` type changed from `string` to `codectypes.Any`. * `MsgCreateValidator.Pubkey` type changed from `string` to `codectypes.Any`. * Deprecating and renaming `MakeEncodingConfig` to `MakeTestEncodingConfig` (both in `simapp` and `simapp/params` packages). +* (tx) [\#7688](https://github.com/cosmos/cosmos-sdk/pull/7688) The gRPC simulate service method has been moved from `cosmos.base.v1beta1.simulate` to `cosmos.tx.v1beta1`, as a method in the Tx service. ### Features * (codec) [\#7519](https://github.com/cosmos/cosmos-sdk/pull/7519) `InterfaceRegistry` now inherits `jsonpb.AnyResolver`, and has a `RegisterCustomTypeURL` method to support ADR 031 packing of `Any`s. `AnyResolver` is now a required parameter to `RejectUnknownFields`. * (baseapp) [\#7519](https://github.com/cosmos/cosmos-sdk/pull/7519) Add `ServiceMsgRouter` to BaseApp to handle routing of protobuf service `Msg`s. The two new types defined in ADR 031, `sdk.ServiceMsg` and `sdk.MsgRequest` are introduced with this router. +* (tx) [\#7688](https://github.com/cosmos/cosmos-sdk/pull/7688) Add a new Tx gRPC service with methods `Simulate` and `GetTx` (by hash). ### Bug Fixes diff --git a/baseapp/grpcrouter.go b/baseapp/grpcrouter.go index 566333b2a4..de553589c9 100644 --- a/baseapp/grpcrouter.go +++ b/baseapp/grpcrouter.go @@ -10,7 +10,6 @@ import ( "google.golang.org/grpc/encoding/proto" "github.com/cosmos/cosmos-sdk/client/grpc/reflection" - "github.com/cosmos/cosmos-sdk/client/grpc/simulate" codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -128,14 +127,3 @@ func (qrt *GRPCQueryRouter) SetInterfaceRegistry(interfaceRegistry codectypes.In reflection.NewReflectionServiceServer(interfaceRegistry), ) } - -// RegisterSimulateService registers the simulate service on the gRPC router. -func (qrt *GRPCQueryRouter) RegisterSimulateService( - simulateFn simulate.BaseAppSimulateFn, - interfaceRegistry codectypes.InterfaceRegistry, -) { - simulate.RegisterSimulateServiceServer( - qrt, - simulate.NewSimulateServer(simulateFn, interfaceRegistry), - ) -} diff --git a/client/grpc/simulate/simulate.go b/client/grpc/simulate/simulate.go deleted file mode 100644 index 9eed3e30a1..0000000000 --- a/client/grpc/simulate/simulate.go +++ /dev/null @@ -1,55 +0,0 @@ -package simulate - -import ( - "context" - - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" - - codectypes "github.com/cosmos/cosmos-sdk/codec/types" - sdk "github.com/cosmos/cosmos-sdk/types" -) - -// BaseAppSimulateFn is the signature of the Baseapp#Simulate function. -type BaseAppSimulateFn func(txBytes []byte) (sdk.GasInfo, *sdk.Result, error) - -type simulateServer struct { - simulate BaseAppSimulateFn - interfaceRegistry codectypes.InterfaceRegistry -} - -// NewSimulateServer creates a new SimulateServer. -func NewSimulateServer(simulate BaseAppSimulateFn, interfaceRegistry codectypes.InterfaceRegistry) SimulateServiceServer { - return simulateServer{ - simulate: simulate, - interfaceRegistry: interfaceRegistry, - } -} - -var _ SimulateServiceServer = simulateServer{} - -// Simulate implements the SimulateService.Simulate RPC method. -func (s simulateServer) Simulate(ctx context.Context, req *SimulateRequest) (*SimulateResponse, error) { - if req.Tx == nil { - return nil, status.Error(codes.InvalidArgument, "invalid empty tx") - } - - err := req.Tx.UnpackInterfaces(s.interfaceRegistry) - if err != nil { - return nil, err - } - txBytes, err := req.Tx.Marshal() - if err != nil { - return nil, err - } - - gasInfo, result, err := s.simulate(txBytes) - if err != nil { - return nil, err - } - - return &SimulateResponse{ - GasInfo: &gasInfo, - Result: result, - }, nil -} diff --git a/client/grpc/simulate/simulate.pb.go b/client/grpc/simulate/simulate.pb.go deleted file mode 100644 index 8fe707913e..0000000000 --- a/client/grpc/simulate/simulate.pb.go +++ /dev/null @@ -1,679 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: cosmos/base/simulate/v1beta1/simulate.proto - -package simulate - -import ( - context "context" - fmt "fmt" - types "github.com/cosmos/cosmos-sdk/types" - tx "github.com/cosmos/cosmos-sdk/types/tx" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" - _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// SimulateRequest is the request type for the SimulateServiceService.Simulate -// RPC method. -type SimulateRequest struct { - // tx is the transaction to simulate. - Tx *tx.Tx `protobuf:"bytes,1,opt,name=tx,proto3" json:"tx,omitempty"` -} - -func (m *SimulateRequest) Reset() { *m = SimulateRequest{} } -func (m *SimulateRequest) String() string { return proto.CompactTextString(m) } -func (*SimulateRequest) ProtoMessage() {} -func (*SimulateRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_503c836d80bb2d47, []int{0} -} -func (m *SimulateRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SimulateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SimulateRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *SimulateRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_SimulateRequest.Merge(m, src) -} -func (m *SimulateRequest) XXX_Size() int { - return m.Size() -} -func (m *SimulateRequest) XXX_DiscardUnknown() { - xxx_messageInfo_SimulateRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_SimulateRequest proto.InternalMessageInfo - -func (m *SimulateRequest) GetTx() *tx.Tx { - if m != nil { - return m.Tx - } - return nil -} - -// SimulateResponse is the response type for the -// SimulateServiceService.SimulateRPC method. -type SimulateResponse struct { - // gas_info is the information about gas used in the simulation. - GasInfo *types.GasInfo `protobuf:"bytes,1,opt,name=gas_info,json=gasInfo,proto3" json:"gas_info,omitempty"` - // result is the result of the simulation. - Result *types.Result `protobuf:"bytes,2,opt,name=result,proto3" json:"result,omitempty"` -} - -func (m *SimulateResponse) Reset() { *m = SimulateResponse{} } -func (m *SimulateResponse) String() string { return proto.CompactTextString(m) } -func (*SimulateResponse) ProtoMessage() {} -func (*SimulateResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_503c836d80bb2d47, []int{1} -} -func (m *SimulateResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SimulateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SimulateResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *SimulateResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_SimulateResponse.Merge(m, src) -} -func (m *SimulateResponse) XXX_Size() int { - return m.Size() -} -func (m *SimulateResponse) XXX_DiscardUnknown() { - xxx_messageInfo_SimulateResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_SimulateResponse proto.InternalMessageInfo - -func (m *SimulateResponse) GetGasInfo() *types.GasInfo { - if m != nil { - return m.GasInfo - } - return nil -} - -func (m *SimulateResponse) GetResult() *types.Result { - if m != nil { - return m.Result - } - return nil -} - -func init() { - proto.RegisterType((*SimulateRequest)(nil), "cosmos.base.simulate.v1beta1.SimulateRequest") - proto.RegisterType((*SimulateResponse)(nil), "cosmos.base.simulate.v1beta1.SimulateResponse") -} - -func init() { - proto.RegisterFile("cosmos/base/simulate/v1beta1/simulate.proto", fileDescriptor_503c836d80bb2d47) -} - -var fileDescriptor_503c836d80bb2d47 = []byte{ - // 351 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x91, 0xbf, 0x4b, 0xf3, 0x40, - 0x18, 0xc7, 0x7b, 0x19, 0xfa, 0x96, 0x7b, 0x87, 0xf7, 0x25, 0x20, 0x94, 0x50, 0x42, 0x8d, 0x28, - 0x05, 0xe9, 0x1d, 0xad, 0x4b, 0x07, 0x27, 0x17, 0x11, 0xb7, 0xd4, 0xc9, 0x45, 0x2e, 0xf1, 0x1a, - 0x0f, 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, 0x16, 0x43, 0xdb, 0x2a, 0xb4, 0xdd, 0x9f, 0xb5, - 0x7e, 0xc1, 0xf9, 0x86, 0x1f, 0xbe, 0xa0, 0xf5, 0x1c, 0x63, 0x9e, 0xce, 0x44, 0xc8, 0xed, 0x67, - 0x84, 0x5b, 0x55, 0xcc, 0xee, 0x93, 0xdf, 0xb6, 0x4c, 0xbe, 0xed, 0xc0, 0x21, 0xdb, 0xe2, 0xe5, - 0xdc, 0x1e, 0xb9, 0x7f, 0xfb, 0x7c, 0xb2, 0x7a, 0xde, 0x01, 0xdd, 0xea, 0xf2, 0x27, 0xe7, 0xaf, - 0x0b, 0x17, 0xcd, 0x17, 0x2e, 0xfa, 0x58, 0xb8, 0xe8, 0x71, 0xe9, 0x36, 0xe6, 0x4b, 0xb7, 0xf1, - 0xbe, 0x74, 0x1b, 0x97, 0x83, 0x48, 0xc0, 0x4d, 0x16, 0x90, 0x50, 0x4d, 0x2b, 0xaf, 0xf2, 0xd3, - 0xd7, 0xd7, 0xb7, 0x34, 0x8c, 0x05, 0x97, 0x40, 0xa3, 0x34, 0x09, 0x6b, 0xb3, 0xa0, 0x59, 0x9c, - 0xf2, 0xe8, 0x2b, 0x00, 0x00, 0xff, 0xff, 0x7d, 0x16, 0xed, 0x90, 0x76, 0x02, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// SimulateServiceClient is the client API for SimulateService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type SimulateServiceClient interface { - // Simulate simulates executing a transaction for estimating gas usage. - Simulate(ctx context.Context, in *SimulateRequest, opts ...grpc.CallOption) (*SimulateResponse, error) -} - -type simulateServiceClient struct { - cc grpc1.ClientConn -} - -func NewSimulateServiceClient(cc grpc1.ClientConn) SimulateServiceClient { - return &simulateServiceClient{cc} -} - -func (c *simulateServiceClient) Simulate(ctx context.Context, in *SimulateRequest, opts ...grpc.CallOption) (*SimulateResponse, error) { - out := new(SimulateResponse) - err := c.cc.Invoke(ctx, "/cosmos.base.simulate.v1beta1.SimulateService/Simulate", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// SimulateServiceServer is the server API for SimulateService service. -type SimulateServiceServer interface { - // Simulate simulates executing a transaction for estimating gas usage. - Simulate(context.Context, *SimulateRequest) (*SimulateResponse, error) -} - -// UnimplementedSimulateServiceServer can be embedded to have forward compatible implementations. -type UnimplementedSimulateServiceServer struct { -} - -func (*UnimplementedSimulateServiceServer) Simulate(ctx context.Context, req *SimulateRequest) (*SimulateResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Simulate not implemented") -} - -func RegisterSimulateServiceServer(s grpc1.Server, srv SimulateServiceServer) { - s.RegisterService(&_SimulateService_serviceDesc, srv) -} - -func _SimulateService_Simulate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SimulateRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SimulateServiceServer).Simulate(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.base.simulate.v1beta1.SimulateService/Simulate", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SimulateServiceServer).Simulate(ctx, req.(*SimulateRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _SimulateService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "cosmos.base.simulate.v1beta1.SimulateService", - HandlerType: (*SimulateServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Simulate", - Handler: _SimulateService_Simulate_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "cosmos/base/simulate/v1beta1/simulate.proto", -} - -func (m *SimulateRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SimulateRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SimulateRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Tx != nil { - { - size, err := m.Tx.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSimulate(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SimulateResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SimulateResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SimulateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Result != nil { - { - size, err := m.Result.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSimulate(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.GasInfo != nil { - { - size, err := m.GasInfo.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSimulate(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintSimulate(dAtA []byte, offset int, v uint64) int { - offset -= sovSimulate(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *SimulateRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Tx != nil { - l = m.Tx.Size() - n += 1 + l + sovSimulate(uint64(l)) - } - return n -} - -func (m *SimulateResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.GasInfo != nil { - l = m.GasInfo.Size() - n += 1 + l + sovSimulate(uint64(l)) - } - if m.Result != nil { - l = m.Result.Size() - n += 1 + l + sovSimulate(uint64(l)) - } - return n -} - -func sovSimulate(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozSimulate(x uint64) (n int) { - return sovSimulate(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *SimulateRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSimulate - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SimulateRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SimulateRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Tx", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSimulate - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSimulate - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSimulate - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Tx == nil { - m.Tx = &tx.Tx{} - } - if err := m.Tx.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipSimulate(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthSimulate - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthSimulate - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SimulateResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSimulate - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SimulateResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SimulateResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GasInfo", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSimulate - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSimulate - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSimulate - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.GasInfo == nil { - m.GasInfo = &types.GasInfo{} - } - if err := m.GasInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSimulate - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSimulate - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSimulate - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Result == nil { - m.Result = &types.Result{} - } - if err := m.Result.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipSimulate(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthSimulate - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthSimulate - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipSimulate(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowSimulate - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowSimulate - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowSimulate - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthSimulate - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupSimulate - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthSimulate - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthSimulate = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowSimulate = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupSimulate = fmt.Errorf("proto: unexpected end of group") -) diff --git a/client/grpc/simulate/simulate.pb.gw.go b/client/grpc/simulate/simulate.pb.gw.go deleted file mode 100644 index 78cb85437c..0000000000 --- a/client/grpc/simulate/simulate.pb.gw.go +++ /dev/null @@ -1,166 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: cosmos/base/simulate/v1beta1/simulate.proto - -/* -Package simulate is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package simulate - -import ( - "context" - "io" - "net/http" - - "github.com/golang/protobuf/descriptor" - "github.com/golang/protobuf/proto" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/grpc-ecosystem/grpc-gateway/utilities" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/status" -) - -// Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = descriptor.ForMessage - -var ( - filter_SimulateService_Simulate_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_SimulateService_Simulate_0(ctx context.Context, marshaler runtime.Marshaler, client SimulateServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq SimulateRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SimulateService_Simulate_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.Simulate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_SimulateService_Simulate_0(ctx context.Context, marshaler runtime.Marshaler, server SimulateServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq SimulateRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SimulateService_Simulate_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.Simulate(ctx, &protoReq) - return msg, metadata, err - -} - -// RegisterSimulateServiceHandlerServer registers the http handlers for service SimulateService to "mux". -// UnaryRPC :call SimulateServiceServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features (such as grpc.SendHeader, etc) to stop working. Consider using RegisterSimulateServiceHandlerFromEndpoint instead. -func RegisterSimulateServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server SimulateServiceServer) error { - - mux.Handle("POST", pattern_SimulateService_Simulate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_SimulateService_Simulate_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_SimulateService_Simulate_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -// RegisterSimulateServiceHandlerFromEndpoint is same as RegisterSimulateServiceHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterSimulateServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) - if err != nil { - return err - } - defer func() { - if err != nil { - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - return - } - go func() { - <-ctx.Done() - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - }() - }() - - return RegisterSimulateServiceHandler(ctx, mux, conn) -} - -// RegisterSimulateServiceHandler registers the http handlers for service SimulateService to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterSimulateServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterSimulateServiceHandlerClient(ctx, mux, NewSimulateServiceClient(conn)) -} - -// RegisterSimulateServiceHandlerClient registers the http handlers for service SimulateService -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "SimulateServiceClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "SimulateServiceClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "SimulateServiceClient" to call the correct interceptors. -func RegisterSimulateServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SimulateServiceClient) error { - - mux.Handle("POST", pattern_SimulateService_Simulate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_SimulateService_Simulate_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_SimulateService_Simulate_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -var ( - pattern_SimulateService_Simulate_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 2}, []string{"cosmos", "base", "simulate", "v1beta1"}, "", runtime.AssumeColonVerbOpt(true))) -) - -var ( - forward_SimulateService_Simulate_0 = runtime.ForwardResponseMessage -) diff --git a/client/grpc/simulate/simulate_test.go b/client/grpc/simulate/simulate_test.go deleted file mode 100644 index 11b58168a9..0000000000 --- a/client/grpc/simulate/simulate_test.go +++ /dev/null @@ -1,119 +0,0 @@ -package simulate_test - -import ( - "context" - "testing" - - "github.com/stretchr/testify/suite" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - - "github.com/cosmos/cosmos-sdk/baseapp" - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/grpc/simulate" - "github.com/cosmos/cosmos-sdk/client/tx" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" - "github.com/cosmos/cosmos-sdk/simapp" - "github.com/cosmos/cosmos-sdk/testutil/testdata" - sdk "github.com/cosmos/cosmos-sdk/types" - txtypes "github.com/cosmos/cosmos-sdk/types/tx" - "github.com/cosmos/cosmos-sdk/types/tx/signing" - authsigning "github.com/cosmos/cosmos-sdk/x/auth/signing" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" -) - -type IntegrationTestSuite struct { - suite.Suite - - app *simapp.SimApp - clientCtx client.Context - queryClient simulate.SimulateServiceClient - sdkCtx sdk.Context -} - -func (s *IntegrationTestSuite) SetupSuite() { - app := simapp.Setup(true) - sdkCtx := app.BaseApp.NewContext(true, tmproto.Header{}) - - app.AccountKeeper.SetParams(sdkCtx, authtypes.DefaultParams()) - app.BankKeeper.SetParams(sdkCtx, banktypes.DefaultParams()) - - // Set up TxConfig. - encodingConfig := simapp.MakeTestEncodingConfig() - clientCtx := client.Context{}.WithTxConfig(encodingConfig.TxConfig) - - // Create new simulation server. - srv := simulate.NewSimulateServer(app.BaseApp.Simulate, encodingConfig.InterfaceRegistry) - - queryHelper := baseapp.NewQueryServerTestHelper(sdkCtx, app.InterfaceRegistry()) - simulate.RegisterSimulateServiceServer(queryHelper, srv) - queryClient := simulate.NewSimulateServiceClient(queryHelper) - - s.app = app - s.clientCtx = clientCtx - s.queryClient = queryClient - s.sdkCtx = sdkCtx -} - -func (s IntegrationTestSuite) TestSimulateService() { - // Create an account with some funds. - priv1, _, addr1 := testdata.KeyTestPubAddr() - acc1 := s.app.AccountKeeper.NewAccountWithAddress(s.sdkCtx, addr1) - err := acc1.SetAccountNumber(0) - s.Require().NoError(err) - s.app.AccountKeeper.SetAccount(s.sdkCtx, acc1) - s.app.BankKeeper.SetBalances(s.sdkCtx, addr1, sdk.Coins{ - sdk.NewInt64Coin("atom", 10000000), - }) - - // Create a test x/bank MsgSend. - coins := sdk.NewCoins(sdk.NewInt64Coin("atom", 10)) - _, _, addr2 := testdata.KeyTestPubAddr() - msg := banktypes.NewMsgSend(addr1, addr2, coins) - feeAmount := testdata.NewTestFeeAmount() - gasLimit := testdata.NewTestGasLimit() - memo := "foo" - accSeq, accNum := uint64(0), uint64(0) - - // Create a txBuilder. - txBuilder := s.clientCtx.TxConfig.NewTxBuilder() - txBuilder.SetMsgs(msg) - txBuilder.SetMemo(memo) - txBuilder.SetFeeAmount(feeAmount) - txBuilder.SetGasLimit(gasLimit) - // 1st round: set empty signature - sigV2 := signing.SignatureV2{ - PubKey: priv1.PubKey(), - Data: &signing.SingleSignatureData{ - SignMode: s.clientCtx.TxConfig.SignModeHandler().DefaultMode(), - Signature: nil, - }, - } - txBuilder.SetSignatures(sigV2) - // 2nd round: actually sign - sigV2, err = tx.SignWithPrivKey( - s.clientCtx.TxConfig.SignModeHandler().DefaultMode(), - authsigning.SignerData{ChainID: s.sdkCtx.ChainID(), AccountNumber: accNum, Sequence: accSeq}, - txBuilder, priv1, s.clientCtx.TxConfig, accSeq, - ) - txBuilder.SetSignatures(sigV2) - - any, ok := txBuilder.(codectypes.IntoAny) - s.Require().True(ok) - cached := any.AsAny().GetCachedValue() - txTx, ok := cached.(*txtypes.Tx) - s.Require().True(ok) - res, err := s.queryClient.Simulate( - context.Background(), - &simulate.SimulateRequest{Tx: txTx}, - ) - s.Require().NoError(err) - - // Check the result and gas used are correct. - s.Require().Equal(len(res.GetResult().GetEvents()), 4) // 1 transfer, 3 messages. - s.Require().True(res.GetGasInfo().GetGasUsed() > 0) // Gas used sometimes change, just check it's not empty. -} - -func TestSimulateTestSuite(t *testing.T) { - suite.Run(t, new(IntegrationTestSuite)) -} diff --git a/client/tx/tx.go b/client/tx/tx.go index 43f2235b1b..fb0e712805 100644 --- a/client/tx/tx.go +++ b/client/tx/tx.go @@ -12,7 +12,6 @@ import ( "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" - sim "github.com/cosmos/cosmos-sdk/client/grpc/simulate" "github.com/cosmos/cosmos-sdk/client/input" codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" @@ -279,7 +278,7 @@ func BuildSimTx(txf Factory, msgs ...sdk.Msg) ([]byte, error) { return nil, fmt.Errorf("cannot simulate amino tx") } - simReq := sim.SimulateRequest{Tx: protoTx} + simReq := tx.SimulateRequest{Tx: protoTx} return simReq.Marshal() } @@ -288,21 +287,23 @@ func BuildSimTx(txf Factory, msgs ...sdk.Msg) ([]byte, error) { // simulation response obtained by the query and the adjusted gas amount. func CalculateGas( queryFunc func(string, []byte) ([]byte, int64, error), txf Factory, msgs ...sdk.Msg, -) (sim.SimulateResponse, uint64, error) { +) (tx.SimulateResponse, uint64, error) { txBytes, err := BuildSimTx(txf, msgs...) if err != nil { - return sim.SimulateResponse{}, 0, err + return tx.SimulateResponse{}, 0, err } - bz, _, err := queryFunc("/cosmos.base.simulate.v1beta1.SimulateService/Simulate", txBytes) + // TODO This should use the generated tx service Client. + // https://github.com/cosmos/cosmos-sdk/issues/7726 + bz, _, err := queryFunc("/cosmos.tx.v1beta1.Service/Simulate", txBytes) if err != nil { - return sim.SimulateResponse{}, 0, err + return tx.SimulateResponse{}, 0, err } - var simRes sim.SimulateResponse + var simRes tx.SimulateResponse if err := simRes.Unmarshal(bz); err != nil { - return sim.SimulateResponse{}, 0, err + return tx.SimulateResponse{}, 0, err } return simRes, uint64(txf.GasAdjustment() * float64(simRes.GasInfo.GasUsed)), nil diff --git a/client/tx/tx_test.go b/client/tx/tx_test.go index da4db5fc8b..3325e738d5 100644 --- a/client/tx/tx_test.go +++ b/client/tx/tx_test.go @@ -7,12 +7,12 @@ import ( "github.com/stretchr/testify/require" "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/grpc/simulate" "github.com/cosmos/cosmos-sdk/client/tx" "github.com/cosmos/cosmos-sdk/crypto/hd" "github.com/cosmos/cosmos-sdk/crypto/keyring" "github.com/cosmos/cosmos-sdk/simapp" sdk "github.com/cosmos/cosmos-sdk/types" + txtypes "github.com/cosmos/cosmos-sdk/types/tx" "github.com/cosmos/cosmos-sdk/x/auth/signing" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" ) @@ -28,7 +28,7 @@ func TestCalculateGas(t *testing.T) { if wantErr { return nil, 0, errors.New("query failed") } - simRes := &simulate.SimulateResponse{ + simRes := &txtypes.SimulateResponse{ GasInfo: &sdk.GasInfo{GasUsed: gasUsed, GasWanted: gasUsed}, Result: &sdk.Result{Data: []byte("tx data"), Log: "log"}, } diff --git a/proto/cosmos/base/simulate/v1beta1/simulate.proto b/proto/cosmos/base/simulate/v1beta1/simulate.proto deleted file mode 100644 index e7e678d99c..0000000000 --- a/proto/cosmos/base/simulate/v1beta1/simulate.proto +++ /dev/null @@ -1,33 +0,0 @@ -syntax = "proto3"; -package cosmos.base.simulate.v1beta1; - -import "google/api/annotations.proto"; -import "cosmos/base/abci/v1beta1/abci.proto"; -import "cosmos/tx/v1beta1/tx.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/client/grpc/simulate"; - -// SimulateService defines a gRPC service for simulating transactions. -// It may also support querying and broadcasting in the future. -service SimulateService { - // Simulate simulates executing a transaction for estimating gas usage. - rpc Simulate(SimulateRequest) returns (SimulateResponse) { - option (google.api.http).post = "/cosmos/base/simulate/v1beta1/simulate"; - } -} - -// SimulateRequest is the request type for the SimulateServiceService.Simulate -// RPC method. -message SimulateRequest { - // tx is the transaction to simulate. - cosmos.tx.v1beta1.Tx tx = 1; -} - -// SimulateResponse is the response type for the -// SimulateServiceService.SimulateRPC method. -message SimulateResponse { - // gas_info is the information about gas used in the simulation. - cosmos.base.abci.v1beta1.GasInfo gas_info = 1; - // result is the result of the simulation. - cosmos.base.abci.v1beta1.Result result = 2; -} diff --git a/proto/cosmos/tx/v1beta1/service.proto b/proto/cosmos/tx/v1beta1/service.proto new file mode 100644 index 0000000000..eb7784001c --- /dev/null +++ b/proto/cosmos/tx/v1beta1/service.proto @@ -0,0 +1,49 @@ +syntax = "proto3"; +package cosmos.tx.v1beta1; + +import "google/api/annotations.proto"; +import "cosmos/base/abci/v1beta1/abci.proto"; +import "cosmos/tx/v1beta1/tx.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/types/tx"; + +// Service defines a gRPC service for interacting with transactions. +service Service { + // Simulate simulates executing a transaction for estimating gas usage. + rpc Simulate(SimulateRequest) returns (SimulateResponse) { + option (google.api.http).post = "/cosmos/tx/v1beta1/simulate"; + } + // GetTx fetches a tx by hash. + rpc GetTx(GetTxRequest) returns (GetTxResponse) { + option (google.api.http).get = "/cosmos/tx/v1beta1/tx/{hash}"; + } +} + +// SimulateRequest is the request type for the Service.Simulate +// RPC method. +message SimulateRequest { + // tx is the transaction to simulate. + cosmos.tx.v1beta1.Tx tx = 1; +} + +// SimulateResponse is the response type for the +// Service.SimulateRPC method. +message SimulateResponse { + // gas_info is the information about gas used in the simulation. + cosmos.base.abci.v1beta1.GasInfo gas_info = 1; + // result is the result of the simulation. + cosmos.base.abci.v1beta1.Result result = 2; +} + +// GetTx is the request type for the Service.GetTx +// RPC method. +message GetTxRequest { + // hash is the tx hash to query, encoded as a hex string. + string hash = 1; +} + +// GetTxResponse is the response type for the Service.GetTx method. +message GetTxResponse { + // tx is the queried transaction. + cosmos.tx.v1beta1.Tx tx = 1; +} diff --git a/server/start.go b/server/start.go index ca39a7606e..6e014de750 100644 --- a/server/start.go +++ b/server/start.go @@ -231,6 +231,9 @@ func startInProcess(ctx *Context, clientCtx client.Context, appCreator types.App return err } + // Add the tx service to the gRPC router. + app.RegisterTxService(clientCtx) + var apiSrv *api.Server config := config.GetConfig(ctx.Viper) diff --git a/server/types/app.go b/server/types/app.go index 9dfc565ee3..f036f6ff09 100644 --- a/server/types/app.go +++ b/server/types/app.go @@ -10,6 +10,7 @@ import ( tmtypes "github.com/tendermint/tendermint/types" dbm "github.com/tendermint/tm-db" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/server/api" "github.com/cosmos/cosmos-sdk/server/config" ) @@ -37,6 +38,10 @@ type ( // RegisterGRPCServer registers gRPC services directly with the gRPC // server. RegisterGRPCServer(grpc.Server) + + // RegisterTxService registers the gRPC Query service for tx (such as tx + // simulation, fetching txs by hash...). + RegisterTxService(clientCtx client.Context) } // AppCreator is a function that allows us to lazily initialize an diff --git a/simapp/app.go b/simapp/app.go index 0d1d226d85..3f11216af3 100644 --- a/simapp/app.go +++ b/simapp/app.go @@ -22,6 +22,7 @@ import ( "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/server/api" "github.com/cosmos/cosmos-sdk/server/config" + servertypes "github.com/cosmos/cosmos-sdk/server/types" simappparams "github.com/cosmos/cosmos-sdk/simapp/params" "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" @@ -32,6 +33,7 @@ import ( authrest "github.com/cosmos/cosmos-sdk/x/auth/client/rest" authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" authsims "github.com/cosmos/cosmos-sdk/x/auth/simulation" + authtx "github.com/cosmos/cosmos-sdk/x/auth/tx" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/cosmos/cosmos-sdk/x/auth/vesting" "github.com/cosmos/cosmos-sdk/x/bank" @@ -134,7 +136,10 @@ var ( } ) -var _ App = (*SimApp)(nil) +var ( + _ App = (*SimApp)(nil) + _ servertypes.Application = (*SimApp)(nil) +) // SimApp extends an ABCI application, but with most of its parameters exported. // They are exported for convenience in creating helper functions, as object @@ -204,7 +209,6 @@ func NewSimApp( bApp.SetCommitMultiStoreTracer(traceStore) bApp.SetAppVersion(version.Version) bApp.SetInterfaceRegistry(interfaceRegistry) - bApp.GRPCQueryRouter().RegisterSimulateService(bApp.Simulate, interfaceRegistry) keys := sdk.NewKVStoreKeys( authtypes.StoreKey, banktypes.StoreKey, stakingtypes.StoreKey, @@ -544,10 +548,14 @@ func (app *SimApp) SimulationManager() *module.SimulationManager { func (app *SimApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig) { clientCtx := apiSvr.ClientCtx rpc.RegisterRoutes(clientCtx, apiSvr.Router) + // Register legacy tx routes. authrest.RegisterTxRoutes(clientCtx, apiSvr.Router) + // Register new tx routes from grpc-gateway. + authtx.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCRouter) + // Register legacy and grpc-gateway routes for all modules. ModuleBasics.RegisterRESTRoutes(clientCtx, apiSvr.Router) - ModuleBasics.RegisterGRPCGatewayRoutes(apiSvr.ClientCtx, apiSvr.GRPCRouter) + ModuleBasics.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCRouter) // register swagger API from root so that other applications can override easily if apiConfig.Swagger { @@ -555,6 +563,11 @@ func (app *SimApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APICon } } +// RegisterTxService implements the Application.RegisterTxService method. +func (app *SimApp) RegisterTxService(clientCtx client.Context) { + authtx.RegisterTxService(app.BaseApp.GRPCQueryRouter(), clientCtx, app.BaseApp.Simulate, app.interfaceRegistry) +} + // RegisterSwaggerAPI registers swagger route with API Server func RegisterSwaggerAPI(ctx client.Context, rtr *mux.Router) { statikFS, err := fs.New() diff --git a/testutil/network/util.go b/testutil/network/util.go index 28a43ea7d5..d85dafd0a1 100644 --- a/testutil/network/util.go +++ b/testutil/network/util.go @@ -59,10 +59,16 @@ func startInProcess(cfg Config, val *Validator) error { val.RPCClient = local.New(tmNode) } - if val.APIAddress != "" { + // We'll need a RPC client if the validator exposes a gRPC or REST endpoint. + if val.APIAddress != "" || val.AppConfig.GRPC.Enable { val.ClientCtx = val.ClientCtx. WithClient(val.RPCClient) + // Add the tx service in the gRPC router. + app.RegisterTxService(val.ClientCtx) + } + + if val.APIAddress != "" { apiSrv := api.New(val.ClientCtx, logger.With("module", "api-server")) app.RegisterAPIRoutes(apiSrv, val.AppConfig.API) diff --git a/types/tx/service.pb.go b/types/tx/service.pb.go new file mode 100644 index 0000000000..ae691fd627 --- /dev/null +++ b/types/tx/service.pb.go @@ -0,0 +1,1078 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: cosmos/tx/v1beta1/service.proto + +package tx + +import ( + context "context" + fmt "fmt" + types "github.com/cosmos/cosmos-sdk/types" + grpc1 "github.com/gogo/protobuf/grpc" + proto "github.com/gogo/protobuf/proto" + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// SimulateRequest is the request type for the Service.Simulate +// RPC method. +type SimulateRequest struct { + // tx is the transaction to simulate. + Tx *Tx `protobuf:"bytes,1,opt,name=tx,proto3" json:"tx,omitempty"` +} + +func (m *SimulateRequest) Reset() { *m = SimulateRequest{} } +func (m *SimulateRequest) String() string { return proto.CompactTextString(m) } +func (*SimulateRequest) ProtoMessage() {} +func (*SimulateRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_e0b00a618705eca7, []int{0} +} +func (m *SimulateRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SimulateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SimulateRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SimulateRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_SimulateRequest.Merge(m, src) +} +func (m *SimulateRequest) XXX_Size() int { + return m.Size() +} +func (m *SimulateRequest) XXX_DiscardUnknown() { + xxx_messageInfo_SimulateRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_SimulateRequest proto.InternalMessageInfo + +func (m *SimulateRequest) GetTx() *Tx { + if m != nil { + return m.Tx + } + return nil +} + +// SimulateResponse is the response type for the +// Service.SimulateRPC method. +type SimulateResponse struct { + // gas_info is the information about gas used in the simulation. + GasInfo *types.GasInfo `protobuf:"bytes,1,opt,name=gas_info,json=gasInfo,proto3" json:"gas_info,omitempty"` + // result is the result of the simulation. + Result *types.Result `protobuf:"bytes,2,opt,name=result,proto3" json:"result,omitempty"` +} + +func (m *SimulateResponse) Reset() { *m = SimulateResponse{} } +func (m *SimulateResponse) String() string { return proto.CompactTextString(m) } +func (*SimulateResponse) ProtoMessage() {} +func (*SimulateResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_e0b00a618705eca7, []int{1} +} +func (m *SimulateResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SimulateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SimulateResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SimulateResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_SimulateResponse.Merge(m, src) +} +func (m *SimulateResponse) XXX_Size() int { + return m.Size() +} +func (m *SimulateResponse) XXX_DiscardUnknown() { + xxx_messageInfo_SimulateResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_SimulateResponse proto.InternalMessageInfo + +func (m *SimulateResponse) GetGasInfo() *types.GasInfo { + if m != nil { + return m.GasInfo + } + return nil +} + +func (m *SimulateResponse) GetResult() *types.Result { + if m != nil { + return m.Result + } + return nil +} + +// GetTx is the request type for the Service.GetTx +// RPC method. +type GetTxRequest struct { + // hash is the tx hash to query, encoded as a hex string. + Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` +} + +func (m *GetTxRequest) Reset() { *m = GetTxRequest{} } +func (m *GetTxRequest) String() string { return proto.CompactTextString(m) } +func (*GetTxRequest) ProtoMessage() {} +func (*GetTxRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_e0b00a618705eca7, []int{2} +} +func (m *GetTxRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetTxRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetTxRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GetTxRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetTxRequest.Merge(m, src) +} +func (m *GetTxRequest) XXX_Size() int { + return m.Size() +} +func (m *GetTxRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GetTxRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_GetTxRequest proto.InternalMessageInfo + +func (m *GetTxRequest) GetHash() string { + if m != nil { + return m.Hash + } + return "" +} + +// GetTxResponse is the response type for the Service.GetTx method. +type GetTxResponse struct { + // tx is the queried transaction. + Tx *Tx `protobuf:"bytes,1,opt,name=tx,proto3" json:"tx,omitempty"` +} + +func (m *GetTxResponse) Reset() { *m = GetTxResponse{} } +func (m *GetTxResponse) String() string { return proto.CompactTextString(m) } +func (*GetTxResponse) ProtoMessage() {} +func (*GetTxResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_e0b00a618705eca7, []int{3} +} +func (m *GetTxResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetTxResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetTxResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GetTxResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetTxResponse.Merge(m, src) +} +func (m *GetTxResponse) XXX_Size() int { + return m.Size() +} +func (m *GetTxResponse) XXX_DiscardUnknown() { + xxx_messageInfo_GetTxResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_GetTxResponse proto.InternalMessageInfo + +func (m *GetTxResponse) GetTx() *Tx { + if m != nil { + return m.Tx + } + return nil +} + +func init() { + proto.RegisterType((*SimulateRequest)(nil), "cosmos.tx.v1beta1.SimulateRequest") + proto.RegisterType((*SimulateResponse)(nil), "cosmos.tx.v1beta1.SimulateResponse") + proto.RegisterType((*GetTxRequest)(nil), "cosmos.tx.v1beta1.GetTxRequest") + proto.RegisterType((*GetTxResponse)(nil), "cosmos.tx.v1beta1.GetTxResponse") +} + +func init() { proto.RegisterFile("cosmos/tx/v1beta1/service.proto", fileDescriptor_e0b00a618705eca7) } + +var fileDescriptor_e0b00a618705eca7 = []byte{ + // 404 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0x31, 0x6b, 0xdb, 0x40, + 0x1c, 0xc5, 0x2d, 0xd1, 0xda, 0xee, 0xb5, 0xa5, 0xed, 0x41, 0xc1, 0xa8, 0xae, 0xec, 0x9e, 0x6b, + 0xe8, 0x52, 0x1d, 0x76, 0xa1, 0x78, 0x08, 0x04, 0xb2, 0x98, 0xac, 0xb2, 0xa7, 0x2c, 0xe1, 0xa4, + 0x9c, 0x65, 0x11, 0x5b, 0xa7, 0xf8, 0x4e, 0xe6, 0x42, 0xc8, 0x92, 0x31, 0x53, 0x20, 0x5f, 0x2a, + 0xa3, 0x21, 0x4b, 0xc6, 0x60, 0xe7, 0x2b, 0x64, 0x0f, 0x3a, 0x9d, 0x92, 0x10, 0xcb, 0x21, 0x93, + 0x4e, 0xe8, 0xbd, 0xdf, 0xff, 0xbd, 0xd3, 0x1f, 0x34, 0x7c, 0xc6, 0xa7, 0x8c, 0x63, 0x21, 0xf1, + 0xbc, 0xe3, 0x51, 0x41, 0x3a, 0x98, 0xd3, 0xd9, 0x3c, 0xf4, 0xa9, 0x13, 0xcf, 0x98, 0x60, 0xf0, + 0x5b, 0x26, 0x70, 0x84, 0x74, 0xb4, 0xc0, 0xaa, 0x07, 0x8c, 0x05, 0x13, 0x8a, 0x49, 0x1c, 0x62, + 0x12, 0x45, 0x4c, 0x10, 0x11, 0xb2, 0x88, 0x67, 0x06, 0xab, 0xa5, 0x89, 0x1e, 0xe1, 0x14, 0x13, + 0xcf, 0x0f, 0x1f, 0xc1, 0xe9, 0x8b, 0x16, 0x59, 0xeb, 0x63, 0x85, 0xcc, 0xbe, 0xa1, 0x1e, 0xf8, + 0x32, 0x08, 0xa7, 0xc9, 0x84, 0x08,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0x16, 0x4b, 0xdb, 0xb8, 0x5d, + 0xda, 0xc6, 0xc5, 0xca, 0x2e, 0x2d, 0x56, 0x76, 0xe9, 0x66, 0x65, 0x97, 0xf6, 0xda, 0x41, 0x28, + 0xc6, 0x89, 0xe7, 0xf8, 0x6c, 0x9a, 0x13, 0xb2, 0xc7, 0x5f, 0x7e, 0x70, 0x88, 0xc5, 0x71, 0x4c, + 0x53, 0xa4, 0x57, 0x56, 0x2b, 0xf6, 0xef, 0x21, 0x00, 0x00, 0xff, 0xff, 0x0f, 0x4c, 0x40, 0xff, + 0xf7, 0x02, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// ServiceClient is the client API for Service service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type ServiceClient interface { + // Simulate simulates executing a transaction for estimating gas usage. + Simulate(ctx context.Context, in *SimulateRequest, opts ...grpc.CallOption) (*SimulateResponse, error) + // GetTx fetches a tx by hash. + GetTx(ctx context.Context, in *GetTxRequest, opts ...grpc.CallOption) (*GetTxResponse, error) +} + +type serviceClient struct { + cc grpc1.ClientConn +} + +func NewServiceClient(cc grpc1.ClientConn) ServiceClient { + return &serviceClient{cc} +} + +func (c *serviceClient) Simulate(ctx context.Context, in *SimulateRequest, opts ...grpc.CallOption) (*SimulateResponse, error) { + out := new(SimulateResponse) + err := c.cc.Invoke(ctx, "/cosmos.tx.v1beta1.Service/Simulate", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serviceClient) GetTx(ctx context.Context, in *GetTxRequest, opts ...grpc.CallOption) (*GetTxResponse, error) { + out := new(GetTxResponse) + err := c.cc.Invoke(ctx, "/cosmos.tx.v1beta1.Service/GetTx", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ServiceServer is the server API for Service service. +type ServiceServer interface { + // Simulate simulates executing a transaction for estimating gas usage. + Simulate(context.Context, *SimulateRequest) (*SimulateResponse, error) + // GetTx fetches a tx by hash. + GetTx(context.Context, *GetTxRequest) (*GetTxResponse, error) +} + +// UnimplementedServiceServer can be embedded to have forward compatible implementations. +type UnimplementedServiceServer struct { +} + +func (*UnimplementedServiceServer) Simulate(ctx context.Context, req *SimulateRequest) (*SimulateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Simulate not implemented") +} +func (*UnimplementedServiceServer) GetTx(ctx context.Context, req *GetTxRequest) (*GetTxResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetTx not implemented") +} + +func RegisterServiceServer(s grpc1.Server, srv ServiceServer) { + s.RegisterService(&_Service_serviceDesc, srv) +} + +func _Service_Simulate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SimulateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ServiceServer).Simulate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.tx.v1beta1.Service/Simulate", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ServiceServer).Simulate(ctx, req.(*SimulateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Service_GetTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetTxRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ServiceServer).GetTx(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.tx.v1beta1.Service/GetTx", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ServiceServer).GetTx(ctx, req.(*GetTxRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Service_serviceDesc = grpc.ServiceDesc{ + ServiceName: "cosmos.tx.v1beta1.Service", + HandlerType: (*ServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Simulate", + Handler: _Service_Simulate_Handler, + }, + { + MethodName: "GetTx", + Handler: _Service_GetTx_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "cosmos/tx/v1beta1/service.proto", +} + +func (m *SimulateRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SimulateRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SimulateRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Tx != nil { + { + size, err := m.Tx.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SimulateResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SimulateResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SimulateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Result != nil { + { + size, err := m.Result.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.GasInfo != nil { + { + size, err := m.GasInfo.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetTxRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetTxRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetTxRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Hash) > 0 { + i -= len(m.Hash) + copy(dAtA[i:], m.Hash) + i = encodeVarintService(dAtA, i, uint64(len(m.Hash))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetTxResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetTxResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetTxResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Tx != nil { + { + size, err := m.Tx.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintService(dAtA []byte, offset int, v uint64) int { + offset -= sovService(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *SimulateRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Tx != nil { + l = m.Tx.Size() + n += 1 + l + sovService(uint64(l)) + } + return n +} + +func (m *SimulateResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.GasInfo != nil { + l = m.GasInfo.Size() + n += 1 + l + sovService(uint64(l)) + } + if m.Result != nil { + l = m.Result.Size() + n += 1 + l + sovService(uint64(l)) + } + return n +} + +func (m *GetTxRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Hash) + if l > 0 { + n += 1 + l + sovService(uint64(l)) + } + return n +} + +func (m *GetTxResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Tx != nil { + l = m.Tx.Size() + n += 1 + l + sovService(uint64(l)) + } + return n +} + +func sovService(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozService(x uint64) (n int) { + return sovService(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *SimulateRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SimulateRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SimulateRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Tx", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Tx == nil { + m.Tx = &Tx{} + } + if err := m.Tx.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SimulateResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SimulateResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SimulateResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GasInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.GasInfo == nil { + m.GasInfo = &types.GasInfo{} + } + if err := m.GasInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Result == nil { + m.Result = &types.Result{} + } + if err := m.Result.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetTxRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetTxRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetTxRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Hash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetTxResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetTxResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetTxResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Tx", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Tx == nil { + m.Tx = &Tx{} + } + if err := m.Tx.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipService(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowService + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowService + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowService + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthService + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupService + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthService + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthService = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowService = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupService = fmt.Errorf("proto: unexpected end of group") +) diff --git a/types/tx/service.pb.gw.go b/types/tx/service.pb.gw.go new file mode 100644 index 0000000000..270036363a --- /dev/null +++ b/types/tx/service.pb.gw.go @@ -0,0 +1,264 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: cosmos/tx/v1beta1/service.proto + +/* +Package tx is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package tx + +import ( + "context" + "io" + "net/http" + + "github.com/golang/protobuf/descriptor" + "github.com/golang/protobuf/proto" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/grpc-ecosystem/grpc-gateway/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/status" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = descriptor.ForMessage + +var ( + filter_Service_Simulate_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Service_Simulate_0(ctx context.Context, marshaler runtime.Marshaler, client ServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq SimulateRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Service_Simulate_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Simulate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Service_Simulate_0(ctx context.Context, marshaler runtime.Marshaler, server ServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq SimulateRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Service_Simulate_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Simulate(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Service_GetTx_0(ctx context.Context, marshaler runtime.Marshaler, client ServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetTxRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["hash"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "hash") + } + + protoReq.Hash, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "hash", err) + } + + msg, err := client.GetTx(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Service_GetTx_0(ctx context.Context, marshaler runtime.Marshaler, server ServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetTxRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["hash"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "hash") + } + + protoReq.Hash, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "hash", err) + } + + msg, err := server.GetTx(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterServiceHandlerServer registers the http handlers for service Service to "mux". +// UnaryRPC :call ServiceServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features (such as grpc.SendHeader, etc) to stop working. Consider using RegisterServiceHandlerFromEndpoint instead. +func RegisterServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ServiceServer) error { + + mux.Handle("POST", pattern_Service_Simulate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Service_Simulate_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Service_Simulate_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Service_GetTx_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Service_GetTx_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Service_GetTx_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterServiceHandlerFromEndpoint is same as RegisterServiceHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterServiceHandler(ctx, mux, conn) +} + +// RegisterServiceHandler registers the http handlers for service Service to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterServiceHandlerClient(ctx, mux, NewServiceClient(conn)) +} + +// RegisterServiceHandlerClient registers the http handlers for service Service +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ServiceClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "ServiceClient" to call the correct interceptors. +func RegisterServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ServiceClient) error { + + mux.Handle("POST", pattern_Service_Simulate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Service_Simulate_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Service_Simulate_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Service_GetTx_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Service_GetTx_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Service_GetTx_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_Service_Simulate_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"cosmos", "tx", "v1beta1", "simulate"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Service_GetTx_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 1, 1, 0, 4, 1, 5, 3}, []string{"cosmos", "tx", "v1beta1", "hash"}, "", runtime.AssumeColonVerbOpt(true))) +) + +var ( + forward_Service_Simulate_0 = runtime.ForwardResponseMessage + + forward_Service_GetTx_0 = runtime.ForwardResponseMessage +) diff --git a/x/auth/tx/service.go b/x/auth/tx/service.go new file mode 100644 index 0000000000..d430dc2b0a --- /dev/null +++ b/x/auth/tx/service.go @@ -0,0 +1,111 @@ +package tx + +import ( + "context" + "encoding/hex" + + gogogrpc "github.com/gogo/protobuf/grpc" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/codec" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" + txtypes "github.com/cosmos/cosmos-sdk/types/tx" +) + +// baseAppSimulateFn is the signature of the Baseapp#Simulate function. +type baseAppSimulateFn func(txBytes []byte) (sdk.GasInfo, *sdk.Result, error) + +// txServer is the server for the protobuf Tx service. +type txServer struct { + clientCtx client.Context + simulate baseAppSimulateFn + interfaceRegistry codectypes.InterfaceRegistry +} + +// NewTxServer creates a new Tx service server. +func NewTxServer(clientCtx client.Context, simulate baseAppSimulateFn, interfaceRegistry codectypes.InterfaceRegistry) txtypes.ServiceServer { + return txServer{ + clientCtx: clientCtx, + simulate: simulate, + interfaceRegistry: interfaceRegistry, + } +} + +var _ txtypes.ServiceServer = txServer{} + +// Simulate implements the ServiceServer.Simulate RPC method. +func (s txServer) Simulate(ctx context.Context, req *txtypes.SimulateRequest) (*txtypes.SimulateResponse, error) { + if req.Tx == nil { + return nil, status.Error(codes.InvalidArgument, "invalid empty tx") + } + + err := req.Tx.UnpackInterfaces(s.interfaceRegistry) + if err != nil { + return nil, err + } + txBytes, err := req.Tx.Marshal() + if err != nil { + return nil, err + } + + gasInfo, result, err := s.simulate(txBytes) + if err != nil { + return nil, err + } + + return &txtypes.SimulateResponse{ + GasInfo: &gasInfo, + Result: result, + }, nil +} + +// GetTx implements the ServiceServer.GetTx RPC method. +func (s txServer) GetTx(ctx context.Context, req *txtypes.GetTxRequest) (*txtypes.GetTxResponse, error) { + // We get hash as a hex string in the request, convert it to bytes. + hash, err := hex.DecodeString(req.Hash) + if err != nil { + return nil, err + } + + // TODO We should also check the proof flag in gRPC header. + // https://github.com/cosmos/cosmos-sdk/issues/7036. + result, err := s.clientCtx.Client.Tx(ctx, hash, false) + if err != nil { + return nil, err + } + + // Create a proto codec, we need it to unmarshal the tx bytes. + cdc := codec.NewProtoCodec(s.clientCtx.InterfaceRegistry) + var protoTx txtypes.Tx + + if err := cdc.UnmarshalBinaryBare(result.Tx, &protoTx); err != nil { + return nil, err + } + + return &txtypes.GetTxResponse{ + Tx: &protoTx, + }, nil +} + +// RegisterTxService registers the tx service on the gRPC router. +func RegisterTxService( + qrt gogogrpc.Server, + clientCtx client.Context, + simulateFn baseAppSimulateFn, + interfaceRegistry codectypes.InterfaceRegistry, +) { + txtypes.RegisterServiceServer( + qrt, + NewTxServer(clientCtx, simulateFn, interfaceRegistry), + ) +} + +// RegisterGRPCGatewayRoutes mounts the tx service's GRPC-gateway routes on the +// given Mux. +func RegisterGRPCGatewayRoutes(clientConn gogogrpc.ClientConn, mux *runtime.ServeMux) { + txtypes.RegisterServiceHandlerClient(context.Background(), mux, txtypes.NewServiceClient(clientConn)) +} diff --git a/x/auth/tx/service_test.go b/x/auth/tx/service_test.go new file mode 100644 index 0000000000..ec51cf0e2b --- /dev/null +++ b/x/auth/tx/service_test.go @@ -0,0 +1,164 @@ +package tx_test + +import ( + "context" + "fmt" + "testing" + + "github.com/stretchr/testify/suite" + + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/flags" + clienttx "github.com/cosmos/cosmos-sdk/client/tx" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + "github.com/cosmos/cosmos-sdk/testutil/network" + "github.com/cosmos/cosmos-sdk/testutil/testdata" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/cosmos/cosmos-sdk/types/rest" + "github.com/cosmos/cosmos-sdk/types/tx" + "github.com/cosmos/cosmos-sdk/types/tx/signing" + authclient "github.com/cosmos/cosmos-sdk/x/auth/client" + bankcli "github.com/cosmos/cosmos-sdk/x/bank/client/testutil" + banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" +) + +type IntegrationTestSuite struct { + suite.Suite + + cfg network.Config + network *network.Network + + queryClient tx.ServiceClient +} + +func (s *IntegrationTestSuite) SetupSuite() { + s.T().Log("setting up integration test suite") + + cfg := network.DefaultConfig() + cfg.NumValidators = 1 + + s.cfg = cfg + s.network = network.New(s.T(), cfg) + + s.Require().NotNil(s.network) + + _, err := s.network.WaitForHeight(1) + s.Require().NoError(err) + + s.queryClient = tx.NewServiceClient(s.network.Validators[0].ClientCtx) +} + +func (s *IntegrationTestSuite) TearDownSuite() { + s.T().Log("tearing down integration test suite") + s.network.Cleanup() +} + +func (s IntegrationTestSuite) TestSimulate() { + val := s.network.Validators[0] + + // prepare txBuilder with msg + txBuilder := val.ClientCtx.TxConfig.NewTxBuilder() + feeAmount := sdk.Coins{sdk.NewInt64Coin(s.cfg.BondDenom, 10)} + gasLimit := testdata.NewTestGasLimit() + s.Require().NoError( + txBuilder.SetMsgs(&banktypes.MsgSend{ + FromAddress: val.Address.String(), + ToAddress: val.Address.String(), + Amount: sdk.Coins{sdk.NewInt64Coin(s.cfg.BondDenom, 10)}, + }), + ) + txBuilder.SetFeeAmount(feeAmount) + txBuilder.SetGasLimit(gasLimit) + txBuilder.SetMemo("foobar") + + // setup txFactory + txFactory := clienttx.Factory{}. + WithChainID(val.ClientCtx.ChainID). + WithKeybase(val.ClientCtx.Keyring). + WithTxConfig(val.ClientCtx.TxConfig). + WithSignMode(signing.SignMode_SIGN_MODE_DIRECT) + + // Sign Tx. + err := authclient.SignTx(txFactory, val.ClientCtx, val.Moniker, txBuilder, false) + s.Require().NoError(err) + + // Convert the txBuilder to a tx.Tx. + protoTx, err := txBuilderToProtoTx(txBuilder) + s.Require().NoError(err) + + // Run the simulate gRPC query. + res, err := s.queryClient.Simulate( + context.Background(), + &tx.SimulateRequest{Tx: protoTx}, + ) + s.Require().NoError(err) + + // Check the result and gas used are correct. + s.Require().Equal(len(res.GetResult().GetEvents()), 4) // 1 transfer, 3 messages. + s.Require().True(res.GetGasInfo().GetGasUsed() > 0) // Gas used sometimes change, just check it's not empty. +} + +func (s IntegrationTestSuite) TestGetTx() { + val := s.network.Validators[0] + + // Create a new MsgSend tx from val to itself. + out, err := bankcli.MsgSendExec( + val.ClientCtx, + val.Address, + val.Address, + sdk.NewCoins( + sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10)), + ), + fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--gas=%d", flags.DefaultGasLimit), + fmt.Sprintf("--%s=foobar", flags.FlagMemo), + ) + s.Require().NoError(err) + var txRes sdk.TxResponse + s.Require().NoError(val.ClientCtx.JSONMarshaler.UnmarshalJSON(out.Bytes(), &txRes)) + s.Require().Equal(uint32(0), txRes.Code) + + s.Require().NoError(s.network.WaitForNextBlock()) + + // Query the tx via gRPC. + grpcRes, err := s.queryClient.GetTx( + context.Background(), + &tx.GetTxRequest{Hash: txRes.TxHash}, + ) + s.Require().NoError(err) + s.Require().Equal("foobar", grpcRes.Tx.Body.Memo) + + // Query the tx via grpc-gateway. + restRes, err := rest.GetRequest(fmt.Sprintf("%s/cosmos/tx/v1beta1/tx/%s", val.APIAddress, txRes.TxHash)) + s.Require().NoError(err) + var getTxRes tx.GetTxResponse + s.Require().NoError(val.ClientCtx.JSONMarshaler.UnmarshalJSON(restRes, &getTxRes)) + s.Require().Equal("foobar", getTxRes.Tx.Body.Memo) +} + +func TestIntegrationTestSuite(t *testing.T) { + suite.Run(t, new(IntegrationTestSuite)) +} + +// txBuilderToProtoTx converts a txBuilder into a proto tx.Tx. +func txBuilderToProtoTx(txBuilder client.TxBuilder) (*tx.Tx, error) { // nolint + intoAnyTx, ok := txBuilder.(codectypes.IntoAny) + if !ok { + return nil, sdkerrors.Wrapf(sdkerrors.ErrInvalidType, "expected %T, got %T", (codectypes.IntoAny)(nil), intoAnyTx) + } + + any := intoAnyTx.AsAny().GetCachedValue() + if any == nil { + return nil, sdkerrors.Wrapf(sdkerrors.ErrInvalidType, "any's cached value is empty") + } + + protoTx, ok := any.(*tx.Tx) + if !ok { + return nil, sdkerrors.Wrapf(sdkerrors.ErrInvalidType, "expected %T, got %T", (codectypes.IntoAny)(nil), intoAnyTx) + } + + return protoTx, nil +} From bd6c16b4628cf3383689893090d1f9ea741eac65 Mon Sep 17 00:00:00 2001 From: Marie Gauthier Date: Fri, 30 Oct 2020 16:27:12 +0100 Subject: [PATCH 024/136] Handle ServiceMsg in StdTxBuilder.SetMsgs (#7731) * Handle ServiceMsg in StdTxBuilder.SetMsgs * Add test --- x/auth/client/rest/rest_test.go | 50 +++++++++++++++++++++++-- x/auth/legacy/legacytx/stdtx_builder.go | 20 +++++++++- 2 files changed, 66 insertions(+), 4 deletions(-) diff --git a/x/auth/client/rest/rest_test.go b/x/auth/client/rest/rest_test.go index 1c8d492426..e06778e4e4 100644 --- a/x/auth/client/rest/rest_test.go +++ b/x/auth/client/rest/rest_test.go @@ -2,19 +2,22 @@ package rest_test import ( "fmt" - "testing" - "strings" + "testing" "github.com/stretchr/testify/suite" + "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/tx" + "github.com/cosmos/cosmos-sdk/crypto/hd" + "github.com/cosmos/cosmos-sdk/crypto/keyring" "github.com/cosmos/cosmos-sdk/testutil/network" "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/rest" "github.com/cosmos/cosmos-sdk/types/tx/signing" authclient "github.com/cosmos/cosmos-sdk/x/auth/client" + bankcli "github.com/cosmos/cosmos-sdk/x/bank/client/testutil" rest2 "github.com/cosmos/cosmos-sdk/x/auth/client/rest" "github.com/cosmos/cosmos-sdk/x/auth/legacy/legacytx" @@ -37,7 +40,11 @@ func (s *IntegrationTestSuite) SetupSuite() { s.cfg = cfg s.network = network.New(s.T(), cfg) - _, err := s.network.WaitForHeight(1) + kb := s.network.Validators[0].ClientCtx.Keyring + _, _, err := kb.NewMnemonic("newAccount", keyring.English, sdk.FullFundraiserPath, hd.Secp256k1) + s.Require().NoError(err) + + _, err = s.network.WaitForHeight(1) s.Require().NoError(err) } @@ -128,6 +135,43 @@ func (s *IntegrationTestSuite) TestQueryTxByHash() { s.Require().True(strings.Contains(string(txJSON), stdTx.Memo)) } +func (s *IntegrationTestSuite) TestQueryTxByHashWithServiceMessage() { + val := s.network.Validators[0] + + account, err := val.ClientCtx.Keyring.Key("newAccount") + s.Require().NoError(err) + + sendTokens := sdk.NewInt64Coin(s.cfg.BondDenom, 10) + + out, err := bankcli.ServiceMsgSendExec( + val.ClientCtx, + val.Address, + account.GetAddress(), + sdk.NewCoins(sendTokens), + fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--gas=%d", flags.DefaultGasLimit), + ) + + s.Require().NoError(err) + var txRes sdk.TxResponse + s.Require().NoError(val.ClientCtx.JSONMarshaler.UnmarshalJSON(out.Bytes(), &txRes)) + + s.Require().NoError(s.network.WaitForNextBlock()) + + txJSON, err := rest.GetRequest(fmt.Sprintf("%s/txs/%s", val.APIAddress, txRes.TxHash)) + s.Require().NoError(err) + + var result legacytx.StdTx + s.Require().NoError(val.ClientCtx.LegacyAmino.UnmarshalJSON(txJSON, &result)) + s.Require().NotNil(result) + msgs := result.GetMsgs() + s.Require().Equal(len(msgs), 1) + _, ok := msgs[0].(*types.MsgSend) + s.Require().True(ok) +} + func (s *IntegrationTestSuite) TestMultipleSyncBroadcastTxRequests() { // First test transaction from validator should have sequence=1 (non-genesis tx) testCases := []struct { diff --git a/x/auth/legacy/legacytx/stdtx_builder.go b/x/auth/legacy/legacytx/stdtx_builder.go index 1b1a55c042..153c4b2bbb 100644 --- a/x/auth/legacy/legacytx/stdtx_builder.go +++ b/x/auth/legacy/legacytx/stdtx_builder.go @@ -29,7 +29,25 @@ func (s *StdTxBuilder) GetTx() authsigning.Tx { // SetMsgs implements TxBuilder.SetMsgs func (s *StdTxBuilder) SetMsgs(msgs ...sdk.Msg) error { - s.Msgs = msgs + stdTxMsgs := make([]sdk.Msg, len(msgs)) + + for i, msg := range msgs { + switch msg := msg.(type) { + case sdk.ServiceMsg: + // Since ServiceMsg isn't registered with amino, we unpack msg.Request + // into a Msg so that it's handled gracefully for the legacy + // GET /txs/{hash} and /txs endpoints. + sdkMsg, ok := msg.Request.(sdk.Msg) + if !ok { + return sdkerrors.Wrapf(sdkerrors.ErrInvalidType, "Expecting %T at %d to implement sdk.Msg", msg.Request, i) + } + stdTxMsgs[i] = sdkMsg + default: + // legacy sdk.Msg + stdTxMsgs[i] = msg + } + } + s.Msgs = stdTxMsgs return nil } From cdc73ac6057f0586bb86e5cca4d657c6da21e182 Mon Sep 17 00:00:00 2001 From: Alessio Treglia Date: Sat, 31 Oct 2020 12:02:16 +0000 Subject: [PATCH 025/136] cosmovisor: docs first draft (#7608) Closes: #7118 --- docs/using-the-sdk/README.md | 1 + docs/using-the-sdk/cosmovisor.md | 174 +++++++++++++++++++++++++++++++ 2 files changed, 175 insertions(+) create mode 100644 docs/using-the-sdk/cosmovisor.md diff --git a/docs/using-the-sdk/README.md b/docs/using-the-sdk/README.md index 747dfd5005..fb645c679c 100644 --- a/docs/using-the-sdk/README.md +++ b/docs/using-the-sdk/README.md @@ -7,3 +7,4 @@ parent: - [Modules](../../x/README.md) - [Simulation](./simulation.md) +- [Cosmos Upgrade Manager](./cosmovisor.md) diff --git a/docs/using-the-sdk/cosmovisor.md b/docs/using-the-sdk/cosmovisor.md new file mode 100644 index 0000000000..21d3ee34ad --- /dev/null +++ b/docs/using-the-sdk/cosmovisor.md @@ -0,0 +1,174 @@ +# Cosmosvisor Quick Start + +`cosmovisor` is a small process manager around Cosmos SDK binaries that uses the upgrade module to allow +for smooth and configurable management of upgrading binaries as a live chain is upgraded, and can be +used to simplify validator operations while doing upgrades or to make syncing a full node for genesis +simple. The `cosmovisor` program monitors the stdout of Cosmos SDK application's executable to look for +messages from the upgrade module indicating a pending or required upgrade and act appropriately. + +## Installation + +Run: + +`go get github.com/cosmos/cosmos-sdk/cosmovisor/cmd/cosmovisor` + +## Command Line Arguments And Environment Variables + +All arguments passed to the `cosmovisor` program will be passed to the current daemon binary (as a subprocess). +It will return `/dev/stdout` and `/dev/stderr` of the subprocess as its own. Because of that, it cannot accept +any command line arguments, nor print anything to output (unless it terminates unexpectedly before executing a +binary). + +`cosmovisor` reads its configuration from environment variables: + +* `DAEMON_HOME` is the location where upgrade binaries should be kept (e.g. `$HOME/.gaiad` or `$HOME/.xrnd`). +* `DAEMON_NAME` is the name of the binary itself (eg. `xrnd`, `gaiad`, `simd`, etc). +* `DAEMON_ALLOW_DOWNLOAD_BINARIES` (*optional*) if set to `true` will enable auto-downloading of new binaries +(for security reasons, this is intended for full nodes rather than validators). +* `DAEMON_RESTART_AFTER_UPGRADE` (*optional*) if set to `true` it will restart the sub-process with the same +command line arguments and flags (but new binary) after a successful upgrade. By default, `cosmovisor` dies +afterwards and allows the supervisor to restart it if needed. Note that this will not auto-restart the child +if there was an error. + +## Data Folder Layout + +`$DAEMON_HOME/cosmovisor` is expected to belong completely to `cosmovisor` and +subprocesses the controlled by it. The folder content is organised as follows: + +``` +. +├── current -> genesis or upgrades/ +├── genesis +│   └── bin +│   └── $DAEMON_NAME +└── upgrades + └── + └── bin + └── $DAEMON_NAME +``` + +Each version of the Cosmos SDK application is stored under either `genesis` or `upgrades/`, which holds `bin/$DAEMON_NAME` +along with any other needed files such as auxiliary client programs or libraries. `current` is a symbolic link to the currently +active folder (so `current/bin/$DAEMON_NAME` is the currently active binary). + +*Note: the `name` variable in `upgrades/` holds the URI-encoded name of the upgrade as specified in the upgrade module plan.* + +Please note that `$DAEMON_HOME/cosmovisor` just stores the *binaries* and associated *program code*. +The `cosmovisor` binary can be stored in any typical location (eg `/usr/local/bin`). The actual blockchain +program will store it's data under their default data directory (e.g. `$HOME/.gaiad`) which is independent of +the `$DAEMON_HOME`. You can choose to set `$DAEMON_HOME` to the actual binary's home directory and then end up +with a configuation like the following, but this is left as a choice to the system admininstrator for best +directory layout: + +``` +.gaiad +├── config +├── data +└── cosmovisor +``` + +## Usage + +The system administrator admin is responsible for: +* installing the `cosmovisor` binary and configure the host's init system (e.g. `systemd`, `launchd`, etc) along with the environmental variables appropriately; +* installing the `genesis` folder manually; +* installing the `upgrades/` folders manually. + +`cosmovisor` will set the `current` link to point to `genesis` at first start (when no `current` link exists) and handles +binaries switch overs at the correct points in time, so that the system administrator can prepare days in advance and relax at upgrade time. + +Note that blockchain applications that wish to support upgrades may package up a genesis `cosmovisor` tarball with this information, +just as they prepare the genesis binary tarball. In fact, they may offer a tarball will all upgrades up to current point for easy download +for those who wish to sync a fullnode from start. + +The `DAEMON` specific code and operations (e.g. tendermint config, the application db, syncing blocks, etc) are performed as normal. +Application binaries' directives such as command-line flags and environment variables work normally. + +## Example: simd + +The following instructions provide a demonstration of `cosmovisor`'s integration with the `simd` application +shipped along the Cosmos SDK's source code. + +First compile `simd`: + +``` +cd cosmos-sdk/ +make build +``` + +Create a new key and setup the `simd` node: + +``` +rm -rf $HOME/.simapp +./build/simd keys --keyring-backend=test add validator +./build/simd init testing --chain-id test +./build/simd add-genesis-account --keyring-backend=test $(./build/simd keys --keyring-backend=test show validator -a) 1000000000stake,1000000000validatortoken +./build/simd gentx --keyring-backend test --chain-id test validator +./build/simd collect-gentxs +``` + +Set the required environment variables: + +``` +export DAEMON_NAME=simd # binary name +export DAEMON_HOME=$HOME/.simapp # daemon's home directory +``` + +Create the `cosmovisor`’s genesis folders and deploy the binary: + +``` +mkdir -p $DAEMON_HOME/cosmovisor/genesis/bin +cp ./build/simd $DAEMON_HOME/cosmovisor/genesis/bin +``` + +For the sake of this demonstration, we would amend `voting_params.voting_period` in `.simapp/config/genesis.json` to a reduced time ~5 minutes (300s) and eventually launch `cosmosvisor`: + +``` +cosmovisor start +``` + +Submit a software upgrade proposal: + +``` +./build/simd tx gov submit-proposal software-upgrade test1 --title "upgrade-demo" --description "upgrade" --from validator --upgrade-height 100 --deposit 10000000stake --chain-id test --keyring-backend test -y +``` + +Query the proposal to ensure it was correctly broadcast and added to a block: + +``` +./build/simd query gov proposal 1 +``` + +Submit a `Yes` vote for the upgrade proposal: + +``` +./build/simd tx gov vote 1 yes --from validator --keyring-backend test --chain-id test -y +``` + +For the sake of this demonstration, we will hardcode a modification in `simapp` to simulate a code change. +In `simapp/app.go`, find the line containing the upgrade Keeper initialisation, it should look like +`app.UpgradeKeeper = upgradekeeper.NewKeeper(skipUpgradeHeights, keys[upgradetypes.StoreKey], appCodec, homePath)`. +After that line, add the following snippet: + + ``` + app.UpgradeKeeper.SetUpgradeHandler("test1", func(ctx sdk.Context, plan upgradetypes.Plan) { + // Add some coins to a random account + addr, err := sdk.AccAddressFromBech32("cosmos18cgkqduwuh253twzmhedesw3l7v3fm37sppt58") + if err != nil { + panic(err) + } + err = app.BankKeeper.AddCoins(ctx, addr, sdk.Coins{sdk.Coin{Denom: "stake", Amount: sdk.NewInt(345600000)}}) + if err != nil { + panic(err) + } + }) +``` + +Now recompile a new binary and place it in `$DAEMON_HOME/cosmosvisor/upgrades/test1/bin`: + +``` +make build +cp ./build/simd $DAEMON_HOME/cosmovisor/upgrades/test1/bin +``` + +The upgrade will occur automatically at height 100. From 194d2aa196cf8853f1a78168c93394dbbe653c90 Mon Sep 17 00:00:00 2001 From: Amaury Martiny Date: Mon, 2 Nov 2020 12:52:52 +0100 Subject: [PATCH 026/136] Fix fetch txs by height on legacy REST endpoint (#7730) * Add test * Fix potential flakiness in sequence * Remove test with ?height * Fix test * Fix tests Co-authored-by: Aleksandr Bezobchuk Co-authored-by: Zaki Manian Co-authored-by: Aaron Craelius Co-authored-by: Aaron Craelius --- x/auth/client/rest/decode.go | 19 +++++---- x/auth/client/rest/query.go | 33 +++++++++++--- x/auth/client/rest/rest_test.go | 76 ++++++++++++++++++++++----------- 3 files changed, 87 insertions(+), 41 deletions(-) diff --git a/x/auth/client/rest/decode.go b/x/auth/client/rest/decode.go index ca72487a80..a3aa5ec750 100644 --- a/x/auth/client/rest/decode.go +++ b/x/auth/client/rest/decode.go @@ -6,12 +6,12 @@ import ( "io/ioutil" "net/http" - "github.com/cosmos/cosmos-sdk/x/auth/signing" - "github.com/cosmos/cosmos-sdk/client" clienttx "github.com/cosmos/cosmos-sdk/client/tx" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/types/rest" "github.com/cosmos/cosmos-sdk/x/auth/legacy/legacytx" + "github.com/cosmos/cosmos-sdk/x/auth/signing" ) type ( @@ -47,8 +47,9 @@ func DecodeTxRequestHandlerFn(clientCtx client.Context) http.HandlerFunc { return } - stdTx, ok := convertToStdTx(w, clientCtx, txBytes) - if !ok { + stdTx, err := convertToStdTx(w, clientCtx, txBytes) + if err != nil { + // Error is already returned by convertToStdTx. return } @@ -61,22 +62,22 @@ func DecodeTxRequestHandlerFn(clientCtx client.Context) http.HandlerFunc { // convertToStdTx converts tx proto binary bytes retrieved from Tendermint into // a StdTx. Returns the StdTx, as well as a flag denoting if the function // successfully converted or not. -func convertToStdTx(w http.ResponseWriter, clientCtx client.Context, txBytes []byte) (legacytx.StdTx, bool) { +func convertToStdTx(w http.ResponseWriter, clientCtx client.Context, txBytes []byte) (legacytx.StdTx, error) { txI, err := clientCtx.TxConfig.TxDecoder()(txBytes) if rest.CheckBadRequestError(w, err) { - return legacytx.StdTx{}, false + return legacytx.StdTx{}, err } tx, ok := txI.(signing.Tx) if !ok { rest.WriteErrorResponse(w, http.StatusBadRequest, fmt.Sprintf("%+v is not backwards compatible with %T", tx, legacytx.StdTx{})) - return legacytx.StdTx{}, false + return legacytx.StdTx{}, sdkerrors.Wrapf(sdkerrors.ErrInvalidType, "expected %T, got %T", (signing.Tx)(nil), txI) } stdTx, err := clienttx.ConvertTxToStdTx(clientCtx.LegacyAmino, tx) if rest.CheckBadRequestError(w, err) { - return legacytx.StdTx{}, false + return legacytx.StdTx{}, err } - return stdTx, true + return stdTx, nil } diff --git a/x/auth/client/rest/query.go b/x/auth/client/rest/query.go index c40fc5530d..23afef323c 100644 --- a/x/auth/client/rest/query.go +++ b/x/auth/client/rest/query.go @@ -9,6 +9,7 @@ import ( "github.com/gorilla/mux" "github.com/cosmos/cosmos-sdk/client" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/rest" authclient "github.com/cosmos/cosmos-sdk/x/auth/client" @@ -102,6 +103,10 @@ func QueryTxsRequestHandlerFn(clientCtx client.Context) http.HandlerFunc { return } + for _, txRes := range searchResult.Txs { + packStdTxResponse(w, clientCtx, txRes) + } + rest.PostProcessResponseBare(w, clientCtx, searchResult) } } @@ -128,11 +133,9 @@ func QueryTxRequestHandlerFn(clientCtx client.Context) http.HandlerFunc { return } - // We just unmarshalled from Tendermint, we take the proto Tx's raw - // bytes, and convert them into a StdTx to be displayed. - txBytes := output.Tx.Value - stdTx, ok := convertToStdTx(w, clientCtx, txBytes) - if !ok { + err = packStdTxResponse(w, clientCtx, output) + if err != nil { + // Error is already returned by packStdTxResponse. return } @@ -140,7 +143,7 @@ func QueryTxRequestHandlerFn(clientCtx client.Context) http.HandlerFunc { rest.WriteErrorResponse(w, http.StatusNotFound, fmt.Sprintf("no transaction found with hash %s", hashHexStr)) } - rest.PostProcessResponseBare(w, clientCtx, stdTx) + rest.PostProcessResponseBare(w, clientCtx, output) } } @@ -161,3 +164,21 @@ func queryParamsHandler(clientCtx client.Context) http.HandlerFunc { rest.PostProcessResponse(w, clientCtx, res) } } + +// packStdTxResponse takes a sdk.TxResponse, converts the Tx into a StdTx, and +// packs the StdTx again into the sdk.TxResponse Any. Amino then takes care of +// seamlessly JSON-outputting the Any. +func packStdTxResponse(w http.ResponseWriter, clientCtx client.Context, txRes *sdk.TxResponse) error { + // We just unmarshalled from Tendermint, we take the proto Tx's raw + // bytes, and convert them into a StdTx to be displayed. + txBytes := txRes.Tx.Value + stdTx, err := convertToStdTx(w, clientCtx, txBytes) + if err != nil { + return err + } + + // Pack the amino stdTx into the TxResponse's Any. + txRes.Tx = codectypes.UnsafePackAny(stdTx) + + return nil +} diff --git a/x/auth/client/rest/rest_test.go b/x/auth/client/rest/rest_test.go index e06778e4e4..86216dd53b 100644 --- a/x/auth/client/rest/rest_test.go +++ b/x/auth/client/rest/rest_test.go @@ -2,7 +2,6 @@ package rest_test import ( "fmt" - "strings" "testing" "github.com/stretchr/testify/suite" @@ -29,6 +28,9 @@ type IntegrationTestSuite struct { cfg network.Config network *network.Network + + stdTx legacytx.StdTx + stdTxRes sdk.TxResponse } func (s *IntegrationTestSuite) SetupSuite() { @@ -46,6 +48,17 @@ func (s *IntegrationTestSuite) SetupSuite() { _, err = s.network.WaitForHeight(1) s.Require().NoError(err) + + // Broadcast a StdTx used for tests. + s.stdTx = s.createTestStdTx(s.network.Validators[0], 0, 1) + res, err := s.broadcastReq(s.stdTx, "block") + s.Require().NoError(err) + + // NOTE: this uses amino explicitly, don't migrate it! + s.Require().NoError(s.cfg.LegacyAmino.UnmarshalJSON(res, &s.stdTxRes)) + s.Require().Equal(uint32(0), s.stdTxRes.Code) + + s.Require().NoError(s.network.WaitForNextBlock()) } func (s *IntegrationTestSuite) TearDownSuite() { @@ -114,39 +127,48 @@ func (s *IntegrationTestSuite) TestBroadcastTxRequest() { func (s *IntegrationTestSuite) TestQueryTxByHash() { val0 := s.network.Validators[0] - // Create and broadcast a tx. - stdTx := s.createTestStdTx(val0, 1) // Validator's sequence starts at 1. - res, err := s.broadcastReq(stdTx, "block") - s.Require().NoError(err) - var txRes sdk.TxResponse - // NOTE: this uses amino explicitly, don't migrate it! - s.Require().NoError(s.cfg.LegacyAmino.UnmarshalJSON(res, &txRes)) + // We broadcasted a StdTx in SetupSuite. // we just check for a non-empty TxHash here, the actual hash will depend on the underlying tx configuration - s.Require().NotEmpty(txRes.TxHash) + s.Require().NotEmpty(s.stdTxRes.TxHash) - s.network.WaitForNextBlock() - - // We now fetch the tx by has on the `/tx/{hash}` route. - txJSON, err := rest.GetRequest(fmt.Sprintf("%s/txs/%s", val0.APIAddress, txRes.TxHash)) + // We now fetch the tx by hash on the `/tx/{hash}` route. + txJSON, err := rest.GetRequest(fmt.Sprintf("%s/txs/%s", val0.APIAddress, s.stdTxRes.TxHash)) s.Require().NoError(err) // txJSON should contain the whole tx, we just make sure that our custom // memo is there. - s.Require().True(strings.Contains(string(txJSON), stdTx.Memo)) + s.Require().Contains(string(txJSON), s.stdTx.Memo) +} + +func (s *IntegrationTestSuite) TestQueryTxByHeight() { + val0 := s.network.Validators[0] + + // We broadcasted a StdTx in SetupSuite. + // we just check for a non-empty height here, as we'll need to for querying. + s.Require().NotEmpty(s.stdTxRes.Height) + + // We now fetch the tx on `/txs` route, filtering by `tx.height` + txJSON, err := rest.GetRequest(fmt.Sprintf("%s/txs?limit=10&page=1&tx.height=%d", val0.APIAddress, s.stdTxRes.Height)) + s.Require().NoError(err) + + // txJSON should contain the whole tx, we just make sure that our custom + // memo is there. + s.Require().Contains(string(txJSON), s.stdTx.Memo) } func (s *IntegrationTestSuite) TestQueryTxByHashWithServiceMessage() { val := s.network.Validators[0] - account, err := val.ClientCtx.Keyring.Key("newAccount") - s.Require().NoError(err) - sendTokens := sdk.NewInt64Coin(s.cfg.BondDenom, 10) + // Right after this line, we're sending a tx. Might need to wait a block + // to refresh sequences. + s.Require().NoError(s.network.WaitForNextBlock()) + out, err := bankcli.ServiceMsgSendExec( val.ClientCtx, val.Address, - account.GetAddress(), + val.Address, sdk.NewCoins(sendTokens), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), @@ -157,18 +179,20 @@ func (s *IntegrationTestSuite) TestQueryTxByHashWithServiceMessage() { s.Require().NoError(err) var txRes sdk.TxResponse s.Require().NoError(val.ClientCtx.JSONMarshaler.UnmarshalJSON(out.Bytes(), &txRes)) + s.Require().Equal(uint32(0), txRes.Code) s.Require().NoError(s.network.WaitForNextBlock()) txJSON, err := rest.GetRequest(fmt.Sprintf("%s/txs/%s", val.APIAddress, txRes.TxHash)) s.Require().NoError(err) - var result legacytx.StdTx - s.Require().NoError(val.ClientCtx.LegacyAmino.UnmarshalJSON(txJSON, &result)) - s.Require().NotNil(result) - msgs := result.GetMsgs() + var txResAmino sdk.TxResponse + s.Require().NoError(val.ClientCtx.LegacyAmino.UnmarshalJSON(txJSON, &txResAmino)) + stdTx, ok := txResAmino.Tx.GetCachedValue().(legacytx.StdTx) + s.Require().True(ok) + msgs := stdTx.GetMsgs() s.Require().Equal(len(msgs), 1) - _, ok := msgs[0].(*types.MsgSend) + _, ok = msgs[0].(*types.MsgSend) s.Require().True(ok) } @@ -197,9 +221,8 @@ func (s *IntegrationTestSuite) TestMultipleSyncBroadcastTxRequests() { } for _, tc := range testCases { s.Run(fmt.Sprintf("Case %s", tc.desc), func() { - // broadcast test with sync mode, as we want to run CheckTx to verify account sequence is correct - stdTx := s.createTestStdTx(s.network.Validators[0], tc.sequence) + stdTx := s.createTestStdTx(s.network.Validators[1], 1, tc.sequence) res, err := s.broadcastReq(stdTx, "sync") s.Require().NoError(err) @@ -224,7 +247,7 @@ func (s *IntegrationTestSuite) TestMultipleSyncBroadcastTxRequests() { } } -func (s *IntegrationTestSuite) createTestStdTx(val *network.Validator, sequence uint64) legacytx.StdTx { +func (s *IntegrationTestSuite) createTestStdTx(val *network.Validator, accNum, sequence uint64) legacytx.StdTx { txConfig := legacytx.StdTxConfig{Cdc: s.cfg.LegacyAmino} msg := &types.MsgSend{ @@ -248,6 +271,7 @@ func (s *IntegrationTestSuite) createTestStdTx(val *network.Validator, sequence WithKeybase(val.ClientCtx.Keyring). WithTxConfig(txConfig). WithSignMode(signing.SignMode_SIGN_MODE_LEGACY_AMINO_JSON). + WithAccountNumber(accNum). WithSequence(sequence) // sign Tx (offline mode so we can manually set sequence number) From ebe73fa28b5c1f320bb0a8a63f5c8228cb64ef72 Mon Sep 17 00:00:00 2001 From: antstalepresh <36045227+antstalepresh@users.noreply.github.com> Date: Mon, 2 Nov 2020 23:10:39 +1000 Subject: [PATCH 027/136] modify ADR for MsgVote backwards compatibility --- docs/architecture/adr-033-gov-split-vote.md | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/docs/architecture/adr-033-gov-split-vote.md b/docs/architecture/adr-033-gov-split-vote.md index a567dd692d..b473bfc3b2 100644 --- a/docs/architecture/adr-033-gov-split-vote.md +++ b/docs/architecture/adr-033-gov-split-vote.md @@ -35,7 +35,22 @@ type Vote struct { } ``` -The `ValidateBasic` of a MsgVote struct would require that +And for backwards compatibility, we introduce `MsgWeightedVote` while keeping `MsgVote`. +``` +type MsgVote struct { + ProposalID int64 + Voter sdk.Address + Option Option +} + +type MsgWeightedVote struct { + ProposalID int64 + Voter sdk.Address + Options []WeightedVoteOption +} +``` + +The `ValidateBasic` of a `MsgWeightedVote` struct would require that 1. The sum of all the Rates is equal to 1.0 2. No Option is repeated From 88e4acac6b5e8eeaa961ae7315eff0a482468f8b Mon Sep 17 00:00:00 2001 From: Aditya Date: Mon, 2 Nov 2020 14:32:32 +0000 Subject: [PATCH 028/136] Don't claim channel capability on crossing hellos (#7763) * don't claim capability on crossing hellos * clarify comment --- x/ibc/applications/transfer/keeper/keeper.go | 5 +++++ x/ibc/applications/transfer/module.go | 12 +++++++++--- x/ibc/applications/transfer/module_test.go | 12 ++++++------ 3 files changed, 20 insertions(+), 9 deletions(-) diff --git a/x/ibc/applications/transfer/keeper/keeper.go b/x/ibc/applications/transfer/keeper/keeper.go index c255606da0..e1149ef9be 100644 --- a/x/ibc/applications/transfer/keeper/keeper.go +++ b/x/ibc/applications/transfer/keeper/keeper.go @@ -159,6 +159,11 @@ func (k Keeper) IterateDenomTraces(ctx sdk.Context, cb func(denomTrace types.Den } } +// AuthenticateCapability wraps the scopedKeeper's AuthenticateCapability function +func (k Keeper) AuthenticateCapability(ctx sdk.Context, cap *capabilitytypes.Capability, name string) bool { + return k.scopedKeeper.AuthenticateCapability(ctx, cap, name) +} + // ClaimCapability allows the transfer module that can claim a capability that IBC module // passes to it func (k Keeper) ClaimCapability(ctx sdk.Context, cap *capabilitytypes.Capability, name string) error { diff --git a/x/ibc/applications/transfer/module.go b/x/ibc/applications/transfer/module.go index 0f9b3faee2..d14637614b 100644 --- a/x/ibc/applications/transfer/module.go +++ b/x/ibc/applications/transfer/module.go @@ -245,9 +245,15 @@ func (am AppModule) OnChanOpenTry( return sdkerrors.Wrapf(types.ErrInvalidVersion, "invalid counterparty version: got: %s, expected %s", counterpartyVersion, types.Version) } - // Claim channel capability passed back by IBC module - if err := am.keeper.ClaimCapability(ctx, chanCap, host.ChannelCapabilityPath(portID, channelID)); err != nil { - return err + // Module may have already claimed capability in OnChanOpenInit in the case of crossing hellos + // (ie chainA and chainB both call ChanOpenInit before one of them calls ChanOpenTry) + // If module can already authenticate the capability then module already owns it so we don't need to claim + // Otherwise, module does not have channel capability and we must claim it from IBC + if !am.keeper.AuthenticateCapability(ctx, chanCap, host.ChannelCapabilityPath(portID, channelID)) { + // Only claim channel capability passed back by IBC module if we do not already own it + if err := am.keeper.ClaimCapability(ctx, chanCap, host.ChannelCapabilityPath(portID, channelID)); err != nil { + return err + } } return nil diff --git a/x/ibc/applications/transfer/module_test.go b/x/ibc/applications/transfer/module_test.go index 308c998672..7f3cec0bde 100644 --- a/x/ibc/applications/transfer/module_test.go +++ b/x/ibc/applications/transfer/module_test.go @@ -108,6 +108,12 @@ func (suite *TransferTestSuite) TestOnChanOpenTry() { { "success", func() {}, true, }, + { + "capability already claimed in INIT should pass", func() { + err := suite.chainA.App.ScopedTransferKeeper.ClaimCapability(suite.chainA.GetContext(), chanCap, host.ChannelCapabilityPath(testChannel.PortID, testChannel.ID)) + suite.Require().NoError(err) + }, true, + }, { "invalid order - ORDERED", func() { channel.Ordering = channeltypes.ORDERED @@ -128,12 +134,6 @@ func (suite *TransferTestSuite) TestOnChanOpenTry() { counterpartyVersion = "version" }, false, }, - { - "capability already claimed", func() { - err := suite.chainA.App.ScopedTransferKeeper.ClaimCapability(suite.chainA.GetContext(), chanCap, host.ChannelCapabilityPath(testChannel.PortID, testChannel.ID)) - suite.Require().NoError(err) - }, false, - }, } for _, tc := range testCases { From aff88bbe99c7bd1b499c2854a158fb9deea1f8c7 Mon Sep 17 00:00:00 2001 From: yihuang Date: Mon, 2 Nov 2020 22:50:33 +0800 Subject: [PATCH 029/136] Fix #7640: tally calculation precision error (#7641) Solution: - change `(a / b) * c` to `a * b / c` Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- CHANGELOG.md | 10 +++++++--- types/decimal_test.go | 8 ++++++++ x/gov/keeper/tally.go | 7 +++---- 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ef865bda5c..17ba026380 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,7 +40,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ * (x/staking) [\#7499](https://github.com/cosmos/cosmos-sdk/pull/7499) `BondStatus` is now a protobuf `enum` instead of an `int32`, and JSON serialized using its protobuf name, so expect names like `BOND_STATUS_UNBONDING` as opposed to `Unbonding`. * (x/evidence) [\#7538](https://github.com/cosmos/cosmos-sdk/pull/7538) The ABCI's `Result.Data` field of `MsgSubmitEvidence` does not contain the raw evidence's hash, but the encoded `MsgSubmitEvidenceResponse` struct. -* (x/upgrade) [#7697](https://github.com/cosmos/cosmos-sdk/pull/7697) Rename flag name "--time" to "--upgrade-time", "--info" to "--upgrade-info", to keep it consistent with help message. +* (x/upgrade) [#7697](https://github.com/cosmos/cosmos-sdk/pull/7697) Rename flag name "--time" to "--upgrade-time", "--info" to "--upgrade-info", to keep it consistent with help message. ### API Breaking @@ -63,6 +63,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ * (kvstore) [\#7415](https://github.com/cosmos/cosmos-sdk/pull/7415) Allow new stores to be registered during on-chain upgrades. * (client) [\#7699](https://github.com/cosmos/cosmos-sdk/pull/7699) Fix panic in context when setting invalid nodeURI. `WithNodeURI` does not set the `Client` in the context. +* (x/gov) [#7641](https://github.com/cosmos/cosmos-sdk/pull/7641) Fix tally calculation precision error. ## [v0.40.0-rc0](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.40.0-rc0) - 2020-10-13 @@ -653,6 +654,7 @@ generalized genesis accounts through the `GenesisAccount` interface. * (sdk) [\#4758](https://github.com/cosmos/cosmos-sdk/issues/4758) update `x/genaccounts` to match module spec * (simulation) [\#4824](https://github.com/cosmos/cosmos-sdk/issues/4824) `PrintAllInvariants` flag will print all failed invariants * (simulation) [\#4490](https://github.com/cosmos/cosmos-sdk/issues/4490) add `InitialBlockHeight` flag to resume a simulation from a given block + * Support exporting the simulation stats to a given JSON file * (simulation) [\#4847](https://github.com/cosmos/cosmos-sdk/issues/4847), [\#4838](https://github.com/cosmos/cosmos-sdk/pull/4838) and [\#4869](https://github.com/cosmos/cosmos-sdk/pull/4869) `SimApp` and simulation refactors: * Implement `SimulationManager` for executing modules' simulation functionalities in a modularized way @@ -966,6 +968,7 @@ that error is that the account doesn't exist. * (simulation) PrintAllInvariants flag will print all failed invariants * (simulation) Add `InitialBlockHeight` flag to resume a simulation from a given block * (simulation) [\#4670](https://github.com/cosmos/cosmos-sdk/issues/4670) Update simulation statistics to JSON format + - Support exporting the simulation stats to a given JSON file * [\#4775](https://github.com/cosmos/cosmos-sdk/issues/4775) Refactor CI config * Upgrade IAVL to v0.12.4 @@ -1571,8 +1574,9 @@ BREAKING CHANGES FEATURES * Gaia REST API - * [\#2358](https://github.com/cosmos/cosmos-sdk/issues/2358) Add distribution module REST interface - + +* [\#2358](https://github.com/cosmos/cosmos-sdk/issues/2358) Add distribution module REST interface + * Gaia CLI (`gaiacli`) * [\#3429](https://github.com/cosmos/cosmos-sdk/issues/3429) Support querying for all delegator distribution rewards. diff --git a/types/decimal_test.go b/types/decimal_test.go index 2c7e6e87ba..ffd09afc27 100644 --- a/types/decimal_test.go +++ b/types/decimal_test.go @@ -478,6 +478,14 @@ func (s *decimalTestSuite) TestDecEncoding() { } } +// Showcase that different orders of operations causes different results. +func (s *decimalTestSuite) TestOperationOrders() { + n1 := sdk.NewDec(10) + n2 := sdk.NewDec(1000000010) + s.Require().Equal(n1.Mul(n2).Quo(n2), sdk.NewDec(10)) + s.Require().NotEqual(n1.Mul(n2).Quo(n2), n1.Quo(n2).Mul(n2)) +} + func BenchmarkMarshalTo(b *testing.B) { bis := []struct { in sdk.Dec diff --git a/x/gov/keeper/tally.go b/x/gov/keeper/tally.go index 796609db5a..cddfd59027 100644 --- a/x/gov/keeper/tally.go +++ b/x/gov/keeper/tally.go @@ -57,8 +57,8 @@ func (keeper Keeper) Tally(ctx sdk.Context, proposal types.Proposal) (passes boo val.DelegatorDeductions = val.DelegatorDeductions.Add(delegation.GetShares()) currValidators[valAddrStr] = val - delegatorShare := delegation.GetShares().Quo(val.DelegatorShares) - votingPower := delegatorShare.MulInt(val.BondedTokens) + // delegation shares * bonded / total shares + votingPower := delegation.GetShares().MulInt(val.BondedTokens).Quo(val.DelegatorShares) results[vote.Option] = results[vote.Option].Add(votingPower) totalVotingPower = totalVotingPower.Add(votingPower) @@ -78,8 +78,7 @@ func (keeper Keeper) Tally(ctx sdk.Context, proposal types.Proposal) (passes boo } sharesAfterDeductions := val.DelegatorShares.Sub(val.DelegatorDeductions) - fractionAfterDeductions := sharesAfterDeductions.Quo(val.DelegatorShares) - votingPower := fractionAfterDeductions.MulInt(val.BondedTokens) + votingPower := sharesAfterDeductions.MulInt(val.BondedTokens).Quo(val.DelegatorShares) results[val.Vote] = results[val.Vote].Add(votingPower) totalVotingPower = totalVotingPower.Add(votingPower) From e9801edb99fb844741540c25916a192e1ef4e859 Mon Sep 17 00:00:00 2001 From: Aditya Date: Mon, 2 Nov 2020 15:13:48 +0000 Subject: [PATCH 030/136] Async Ack Fixes (#7735) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add function to query ack proofs * fix bugs * fix swagger * fix final queries * docs and add test case * Rename QueryUnrelayedAcks to more accurate QueryUnreceivedAcks * Apply suggestions from code review Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com> * address rest of reviews * consistent spelling Co-authored-by: Jack Zampolin Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com> --- client/docs/config.json | 8 +- client/docs/swagger-ui/swagger.yaml | 9834 +++++++++++++---- docs/ibc/custom.md | 4 +- proto/ibc/core/channel/v1/channel.proto | 14 +- proto/ibc/core/channel/v1/genesis.proto | 12 +- proto/ibc/core/channel/v1/query.proto | 90 +- x/ibc/core/04-channel/client/cli/cli.go | 4 +- x/ibc/core/04-channel/client/cli/query.go | 114 +- x/ibc/core/04-channel/client/utils/utils.go | 112 +- x/ibc/core/04-channel/genesis.go | 8 +- x/ibc/core/04-channel/keeper/grpc_query.go | 101 +- .../core/04-channel/keeper/grpc_query_test.go | 282 +- x/ibc/core/04-channel/keeper/keeper.go | 31 +- x/ibc/core/04-channel/keeper/keeper_test.go | 50 +- x/ibc/core/04-channel/types/channel.pb.go | 189 +- x/ibc/core/04-channel/types/genesis.go | 33 +- x/ibc/core/04-channel/types/genesis.pb.go | 152 +- x/ibc/core/04-channel/types/genesis_test.go | 19 +- x/ibc/core/04-channel/types/query.go | 11 + x/ibc/core/04-channel/types/query.pb.go | 1657 ++- x/ibc/core/04-channel/types/query.pb.gw.go | 324 +- x/ibc/core/24-host/keys.go | 5 + x/ibc/core/genesis_test.go | 26 +- x/ibc/core/keeper/grpc_query.go | 16 +- .../09-localhost/types/client_state_test.go | 2 +- x/staking/types/staking.pb.go | 1199 +- 26 files changed, 11002 insertions(+), 3295 deletions(-) diff --git a/client/docs/config.json b/client/docs/config.json index 0d284ec5a2..6901442da7 100644 --- a/client/docs/config.json +++ b/client/docs/config.json @@ -94,7 +94,7 @@ } }, { - "url": "./tmp-swagger-gen/ibc/channel/query.swagger.json", + "url": "./tmp-swagger-gen/ibc/core/channel/v1/query.swagger.json", "operationIds": { "rename": { "Params": "IBCChannelParams" @@ -102,7 +102,7 @@ } }, { - "url": "./tmp-swagger-gen/ibc/client/query.swagger.json", + "url": "./tmp-swagger-gen/ibc/core/client/v1/query.swagger.json", "operationIds": { "rename": { "Params": "IBCClientParams" @@ -110,7 +110,7 @@ } }, { - "url": "./tmp-swagger-gen/ibc/connection/query.swagger.json", + "url": "./tmp-swagger-gen/ibc/core/connection/v1/query.swagger.json", "operationIds": { "rename": { "Params": "IBCConnectionParams" @@ -118,7 +118,7 @@ } }, { - "url": "./tmp-swagger-gen/ibc/transfer/query.swagger.json", + "url": "./tmp-swagger-gen/ibc/applications/transfer/v1/query.swagger.json", "operationIds": { "rename": { "Params": "IBCTransferParams" diff --git a/client/docs/swagger-ui/swagger.yaml b/client/docs/swagger-ui/swagger.yaml index b61e7c060d..06500d7545 100644 --- a/client/docs/swagger-ui/swagger.yaml +++ b/client/docs/swagger-ui/swagger.yaml @@ -1,7 +1,7 @@ -swagger: "2.0" +swagger: '2.0' info: title: Cosmos SDK - Legacy REST and gRPC Gateway docs - description: "A REST interface for state queries, legacy transactions" + description: 'A REST interface for state queries, legacy transactions' version: 1.0.0 paths: /node_info: @@ -13,7 +13,7 @@ paths: produces: - application/json responses: - "200": + '200': description: Node status schema: type: object @@ -59,7 +59,7 @@ paths: type: string listen_addr: type: string - example: "192.168.56.1:26656" + example: '192.168.56.1:26656' version: description: Tendermint version type: string @@ -70,11 +70,11 @@ paths: properties: tx_index: type: string - example: "on" + example: 'on' rpc_address: type: string - example: "tcp://0.0.0.0:26657" - "500": + example: 'tcp://0.0.0.0:26657' + '500': description: Failed to query node status /syncing: get: @@ -85,14 +85,14 @@ paths: produces: - application/json responses: - "200": + '200': description: Node syncing status schema: type: object properties: syncing: type: boolean - "500": + '500': description: Server internal error /blocks/latest: get: @@ -102,7 +102,7 @@ paths: produces: - application/json responses: - "200": + '200': description: The latest block schema: type: object @@ -121,7 +121,7 @@ paths: example: 1 time: type: string - example: "2017-12-30T05:53:09.287+01:00" + example: '2017-12-30T05:53:09.287+01:00' num_txs: type: number example: 0 @@ -209,7 +209,7 @@ paths: example: 1 time: type: string - example: "2017-12-30T05:53:09.287+01:00" + example: '2017-12-30T05:53:09.287+01:00' num_txs: type: number example: 0 @@ -303,16 +303,16 @@ paths: type: string validator_index: type: string - example: "0" + example: '0' height: type: string - example: "0" + example: '0' round: type: string - example: "0" + example: '0' timestamp: type: string - example: "2017-12-30T05:53:09.287+01:00" + example: '2017-12-30T05:53:09.287+01:00' type: type: number example: 2 @@ -335,9 +335,9 @@ paths: type: string example: >- 7uTC74QlknqYWEwg7Vn6M8Om7FuZ0EO4bjvuj6rwH1mTUJrRuMMZvAAqT9VjNgP0RA/TDp6u/92AqrZfXJSpBQ== - "500": + '500': description: Server internal error - "/blocks/{height}": + '/blocks/{height}': get: summary: Get a block at a certain height tags: @@ -352,7 +352,7 @@ paths: type: number x-example: 1 responses: - "200": + '200': description: The block at a specific height schema: type: object @@ -371,7 +371,7 @@ paths: example: 1 time: type: string - example: "2017-12-30T05:53:09.287+01:00" + example: '2017-12-30T05:53:09.287+01:00' num_txs: type: number example: 0 @@ -459,7 +459,7 @@ paths: example: 1 time: type: string - example: "2017-12-30T05:53:09.287+01:00" + example: '2017-12-30T05:53:09.287+01:00' num_txs: type: number example: 0 @@ -553,16 +553,16 @@ paths: type: string validator_index: type: string - example: "0" + example: '0' height: type: string - example: "0" + example: '0' round: type: string - example: "0" + example: '0' timestamp: type: string - example: "2017-12-30T05:53:09.287+01:00" + example: '2017-12-30T05:53:09.287+01:00' type: type: number example: 2 @@ -585,11 +585,11 @@ paths: type: string example: >- 7uTC74QlknqYWEwg7Vn6M8Om7FuZ0EO4bjvuj6rwH1mTUJrRuMMZvAAqT9VjNgP0RA/TDp6u/92AqrZfXJSpBQ== - "400": + '400': description: Invalid height - "404": + '404': description: Request block height doesn't - "500": + '500': description: Server internal error /validatorsets/latest: get: @@ -599,7 +599,7 @@ paths: produces: - application/json responses: - "200": + '200': description: The validator set at the latest block height schema: type: object @@ -621,13 +621,13 @@ paths: cosmosvalconspub1zcjduepq0vu2zgkgk49efa0nqwzndanq5m4c7pa3u4apz4g2r9gspqg6g9cs3k9cuf voting_power: type: string - example: "1000" + example: '1000' proposer_priority: type: string - example: "1000" - "500": + example: '1000' + '500': description: Server internal error - "/validatorsets/{height}": + '/validatorsets/{height}': get: summary: Get a validator set a certain height tags: @@ -642,7 +642,7 @@ paths: type: number x-example: 1 responses: - "200": + '200': description: The validator set at a specific block height schema: type: object @@ -664,17 +664,17 @@ paths: cosmosvalconspub1zcjduepq0vu2zgkgk49efa0nqwzndanq5m4c7pa3u4apz4g2r9gspqg6g9cs3k9cuf voting_power: type: string - example: "1000" + example: '1000' proposer_priority: type: string - example: "1000" - "400": + example: '1000' + '400': description: Invalid height - "404": + '404': description: Block at height not available - "500": + '500': description: Server internal error - "/txs/{hash}": + '/txs/{hash}': get: deprecated: true summary: Get a Tx by hash @@ -691,7 +691,7 @@ paths: type: string x-example: BCBE20E8D46758B96AE5883B792858296AC06E51435490FBDCAE25A72B3CC76B responses: - "200": + '200': description: Tx with the provided hash schema: type: object @@ -725,7 +725,7 @@ paths: example: stake amount: type: string - example: "50" + example: '50' memo: type: string signature: @@ -746,10 +746,10 @@ paths: example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH account_number: type: string - example: "0" + example: '0' sequence: type: string - example: "0" + example: '0' result: type: object properties: @@ -757,10 +757,10 @@ paths: type: string gas_wanted: type: string - example: "200000" + example: '200000' gas_used: type: string - example: "26354" + example: '26354' tags: type: array items: @@ -770,7 +770,7 @@ paths: type: string value: type: string - "500": + '500': description: Internal Server Error /txs: get: @@ -819,7 +819,7 @@ paths: description: transactions on blocks with height less than or equal this value x-example: 800000 responses: - "200": + '200': description: All txs matching the provided events schema: type: object @@ -873,7 +873,7 @@ paths: example: stake amount: type: string - example: "50" + example: '50' memo: type: string signature: @@ -894,10 +894,10 @@ paths: example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH account_number: type: string - example: "0" + example: '0' sequence: type: string - example: "0" + example: '0' result: type: object properties: @@ -905,10 +905,10 @@ paths: type: string gas_wanted: type: string - example: "200000" + example: '200000' gas_used: type: string - example: "26354" + example: '26354' tags: type: array items: @@ -918,9 +918,9 @@ paths: type: string value: type: string - "400": + '400': description: Invalid search events - "500": + '500': description: Internal Server Error post: tags: @@ -964,7 +964,7 @@ paths: example: stake amount: type: string - example: "50" + example: '50' memo: type: string signature: @@ -985,15 +985,15 @@ paths: example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH account_number: type: string - example: "0" + example: '0' sequence: type: string - example: "0" + example: '0' mode: type: string example: block responses: - "200": + '200': description: Tx broadcasting result schema: type: object @@ -1030,8 +1030,8 @@ paths: gas_wanted: 10000 info: info tags: - - "" - - "" + - '' + - '' deliver_tx: type: object properties: @@ -1064,14 +1064,14 @@ paths: gas_wanted: 10000 info: info tags: - - "" - - "" + - '' + - '' hash: type: string example: EE5F3404034C524501629B56E0DDC38FAD651F04 height: type: integer - "500": + '500': description: Internal Server Error /txs/encode: post: @@ -1116,7 +1116,7 @@ paths: example: stake amount: type: string - example: "50" + example: '50' memo: type: string signature: @@ -1137,12 +1137,12 @@ paths: example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH account_number: type: string - example: "0" + example: '0' sequence: type: string - example: "0" + example: '0' responses: - "200": + '200': description: The tx was successfully decoded and re-encoded schema: type: object @@ -1150,9 +1150,9 @@ paths: tx: type: string example: The base64-encoded Amino-serialized bytes for the tx - "400": + '400': description: The tx was malformated - "500": + '500': description: Server internal error /txs/decode: post: @@ -1180,7 +1180,7 @@ paths: example: >- SvBiXe4KPqijYZoKFFHEzJ8c2HPAfv2EFUcIhx0yPagwEhTy0vPA+GGhCEslKXa4Af0uB+mfShoMCgVzdGFrZRIDMTAwEgQQwJoM responses: - "200": + '200': description: The tx was successfully decoded schema: type: object @@ -1204,7 +1204,7 @@ paths: example: stake amount: type: string - example: "50" + example: '50' memo: type: string signature: @@ -1225,15 +1225,15 @@ paths: example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH account_number: type: string - example: "0" + example: '0' sequence: type: string - example: "0" - "400": + example: '0' + '400': description: The tx was malformated - "500": + '500': description: Server internal error - "/bank/balances/{address}": + '/bank/balances/{address}': get: deprecated: true summary: Get the account balances @@ -1249,7 +1249,7 @@ paths: type: string x-example: cosmos16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv responses: - "200": + '200': description: Account balances schema: type: array @@ -1261,10 +1261,10 @@ paths: example: stake amount: type: string - example: "50" - "500": + example: '50' + '500': description: Server internal error - "/bank/accounts/{address}/transfers": + '/bank/accounts/{address}/transfers': post: deprecated: true summary: Send coins from one account to another @@ -1303,16 +1303,16 @@ paths: example: Cosmos-Hub account_number: type: string - example: "0" + example: '0' sequence: type: string - example: "1" + example: '1' gas: type: string - example: "200000" + example: '200000' gas_adjustment: type: string - example: "1.2" + example: '1.2' fees: type: array items: @@ -1323,7 +1323,7 @@ paths: example: stake amount: type: string - example: "50" + example: '50' simulate: type: boolean example: false @@ -1340,9 +1340,9 @@ paths: example: stake amount: type: string - example: "50" + example: '50' responses: - "202": + '202': description: Tx was succesfully generated schema: type: object @@ -1366,7 +1366,7 @@ paths: example: stake amount: type: string - example: "50" + example: '50' memo: type: string signature: @@ -1387,15 +1387,15 @@ paths: example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH account_number: type: string - example: "0" + example: '0' sequence: type: string - example: "0" - "400": + example: '0' + '400': description: Invalid request - "500": + '500': description: Server internal error - "/auth/accounts/{address}": + '/auth/accounts/{address}': get: deprecated: true summary: Get the account information on blockchain @@ -1411,7 +1411,7 @@ paths: type: string x-example: cosmos16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv responses: - "200": + '200': description: Account information on the blockchain schema: type: object @@ -1435,7 +1435,7 @@ paths: example: stake amount: type: string - example: "50" + example: '50' public_key: type: object properties: @@ -1445,9 +1445,9 @@ paths: type: string sequence: type: string - "500": + '500': description: Server internel error - "/staking/delegators/{delegatorAddr}/delegations": + '/staking/delegators/{delegatorAddr}/delegations': parameters: - in: path name: delegatorAddr @@ -1463,7 +1463,7 @@ paths: produces: - application/json responses: - "200": + '200': description: OK schema: type: array @@ -1484,10 +1484,10 @@ paths: example: stake amount: type: string - example: "50" - "400": + example: '50' + '400': description: Invalid delegator address - "500": + '500': description: Internal Server Error post: summary: Submit delegation @@ -1513,16 +1513,16 @@ paths: example: Cosmos-Hub account_number: type: string - example: "0" + example: '0' sequence: type: string - example: "1" + example: '1' gas: type: string - example: "200000" + example: '200000' gas_adjustment: type: string - example: "1.2" + example: '1.2' fees: type: array items: @@ -1533,7 +1533,7 @@ paths: example: stake amount: type: string - example: "50" + example: '50' simulate: type: boolean example: false @@ -1556,7 +1556,7 @@ paths: example: stake amount: type: string - example: "50" + example: '50' tags: - Staking consumes: @@ -1564,7 +1564,7 @@ paths: produces: - application/json responses: - "200": + '200': description: OK schema: type: object @@ -1588,7 +1588,7 @@ paths: example: stake amount: type: string - example: "50" + example: '50' memo: type: string signature: @@ -1609,17 +1609,17 @@ paths: example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH account_number: type: string - example: "0" + example: '0' sequence: type: string - example: "0" - "400": + example: '0' + '400': description: Invalid delegator address or delegation request body - "401": + '401': description: Key password is wrong - "500": + '500': description: Internal Server Error - "/staking/delegators/{delegatorAddr}/delegations/{validatorAddr}": + '/staking/delegators/{delegatorAddr}/delegations/{validatorAddr}': parameters: - in: path name: delegatorAddr @@ -1641,7 +1641,7 @@ paths: produces: - application/json responses: - "200": + '200': description: OK schema: type: object @@ -1660,12 +1660,12 @@ paths: example: stake amount: type: string - example: "50" - "400": + example: '50' + '400': description: Invalid delegator address or validator address - "500": + '500': description: Internal Server Error - "/staking/delegators/{delegatorAddr}/unbonding_delegations": + '/staking/delegators/{delegatorAddr}/unbonding_delegations': parameters: - in: path name: delegatorAddr @@ -1681,7 +1681,7 @@ paths: produces: - application/json responses: - "200": + '200': description: OK schema: type: array @@ -1700,9 +1700,9 @@ paths: type: integer min_time: type: integer - "400": + '400': description: Invalid delegator address - "500": + '500': description: Internal Server Error post: summary: Submit an unbonding delegation @@ -1728,16 +1728,16 @@ paths: example: Cosmos-Hub account_number: type: string - example: "0" + example: '0' sequence: type: string - example: "1" + example: '1' gas: type: string - example: "200000" + example: '200000' gas_adjustment: type: string - example: "1.2" + example: '1.2' fees: type: array items: @@ -1748,7 +1748,7 @@ paths: example: stake amount: type: string - example: "50" + example: '50' simulate: type: boolean example: false @@ -1765,7 +1765,7 @@ paths: example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l shares: type: string - example: "100" + example: '100' tags: - Staking consumes: @@ -1773,7 +1773,7 @@ paths: produces: - application/json responses: - "200": + '200': description: OK schema: type: object @@ -1797,7 +1797,7 @@ paths: example: stake amount: type: string - example: "50" + example: '50' memo: type: string signature: @@ -1818,17 +1818,17 @@ paths: example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH account_number: type: string - example: "0" + example: '0' sequence: type: string - example: "0" - "400": + example: '0' + '400': description: Invalid delegator address or unbonding delegation request body - "401": + '401': description: Key password is wrong - "500": + '500': description: Internal Server Error - "/staking/delegators/{delegatorAddr}/unbonding_delegations/{validatorAddr}": + '/staking/delegators/{delegatorAddr}/unbonding_delegations/{validatorAddr}': parameters: - in: path name: delegatorAddr @@ -1850,7 +1850,7 @@ paths: produces: - application/json responses: - "200": + '200': description: OK schema: type: object @@ -1872,9 +1872,9 @@ paths: type: string min_time: type: string - "400": + '400': description: Invalid delegator address or validator address - "500": + '500': description: Internal Server Error /staking/redelegations: parameters: @@ -1901,15 +1901,15 @@ paths: produces: - application/json responses: - "200": + '200': description: OK schema: type: array items: - $ref: "#/definitions/Redelegation" - "500": + $ref: '#/definitions/Redelegation' + '500': description: Internal Server Error - "/staking/delegators/{delegatorAddr}/redelegations": + '/staking/delegators/{delegatorAddr}/redelegations': parameters: - in: path name: delegatorAddr @@ -1942,16 +1942,16 @@ paths: example: Cosmos-Hub account_number: type: string - example: "0" + example: '0' sequence: type: string - example: "1" + example: '1' gas: type: string - example: "200000" + example: '200000' gas_adjustment: type: string - example: "1.2" + example: '1.2' fees: type: array items: @@ -1962,7 +1962,7 @@ paths: example: stake amount: type: string - example: "50" + example: '50' simulate: type: boolean example: false @@ -1983,7 +1983,7 @@ paths: example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l shares: type: string - example: "100" + example: '100' tags: - Staking consumes: @@ -1991,7 +1991,7 @@ paths: produces: - application/json responses: - "200": + '200': description: Tx was succesfully generated schema: type: object @@ -2015,7 +2015,7 @@ paths: example: stake amount: type: string - example: "50" + example: '50' memo: type: string signature: @@ -2036,15 +2036,15 @@ paths: example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH account_number: type: string - example: "0" + example: '0' sequence: type: string - example: "0" - "400": + example: '0' + '400': description: Invalid delegator address or redelegation request body - "500": + '500': description: Internal Server Error - "/staking/delegators/{delegatorAddr}/validators": + '/staking/delegators/{delegatorAddr}/validators': parameters: - in: path name: delegatorAddr @@ -2060,7 +2060,7 @@ paths: produces: - application/json responses: - "200": + '200': description: OK schema: type: array @@ -2098,36 +2098,36 @@ paths: type: string bond_height: type: string - example: "0" + example: '0' bond_intra_tx_counter: type: integer example: 0 unbonding_height: type: string - example: "0" + example: '0' unbonding_time: type: string - example: "1970-01-01T00:00:00Z" + example: '1970-01-01T00:00:00Z' commission: type: object properties: rate: type: string - example: "0" + example: '0' max_rate: type: string - example: "0" + example: '0' max_change_rate: type: string - example: "0" + example: '0' update_time: type: string - example: "1970-01-01T00:00:00Z" - "400": + example: '1970-01-01T00:00:00Z' + '400': description: Invalid delegator address - "500": + '500': description: Internal Server Error - "/staking/delegators/{delegatorAddr}/validators/{validatorAddr}": + '/staking/delegators/{delegatorAddr}/validators/{validatorAddr}': parameters: - in: path name: delegatorAddr @@ -2149,7 +2149,7 @@ paths: produces: - application/json responses: - "200": + '200': description: OK schema: type: object @@ -2185,34 +2185,34 @@ paths: type: string bond_height: type: string - example: "0" + example: '0' bond_intra_tx_counter: type: integer example: 0 unbonding_height: type: string - example: "0" + example: '0' unbonding_time: type: string - example: "1970-01-01T00:00:00Z" + example: '1970-01-01T00:00:00Z' commission: type: object properties: rate: type: string - example: "0" + example: '0' max_rate: type: string - example: "0" + example: '0' max_change_rate: type: string - example: "0" + example: '0' update_time: type: string - example: "1970-01-01T00:00:00Z" - "400": + example: '1970-01-01T00:00:00Z' + '400': description: Invalid delegator address or validator address - "500": + '500': description: Internal Server Error /staking/validators: get: @@ -2243,7 +2243,7 @@ paths: produces: - application/json responses: - "200": + '200': description: OK schema: type: array @@ -2281,34 +2281,34 @@ paths: type: string bond_height: type: string - example: "0" + example: '0' bond_intra_tx_counter: type: integer example: 0 unbonding_height: type: string - example: "0" + example: '0' unbonding_time: type: string - example: "1970-01-01T00:00:00Z" + example: '1970-01-01T00:00:00Z' commission: type: object properties: rate: type: string - example: "0" + example: '0' max_rate: type: string - example: "0" + example: '0' max_change_rate: type: string - example: "0" + example: '0' update_time: type: string - example: "1970-01-01T00:00:00Z" - "500": + example: '1970-01-01T00:00:00Z' + '500': description: Internal Server Error - "/staking/validators/{validatorAddr}": + '/staking/validators/{validatorAddr}': parameters: - in: path name: validatorAddr @@ -2324,7 +2324,7 @@ paths: produces: - application/json responses: - "200": + '200': description: OK schema: type: object @@ -2360,36 +2360,36 @@ paths: type: string bond_height: type: string - example: "0" + example: '0' bond_intra_tx_counter: type: integer example: 0 unbonding_height: type: string - example: "0" + example: '0' unbonding_time: type: string - example: "1970-01-01T00:00:00Z" + example: '1970-01-01T00:00:00Z' commission: type: object properties: rate: type: string - example: "0" + example: '0' max_rate: type: string - example: "0" + example: '0' max_change_rate: type: string - example: "0" + example: '0' update_time: type: string - example: "1970-01-01T00:00:00Z" - "400": + example: '1970-01-01T00:00:00Z' + '400': description: Invalid validator address - "500": + '500': description: Internal Server Error - "/staking/validators/{validatorAddr}/delegations": + '/staking/validators/{validatorAddr}/delegations': parameters: - in: path name: validatorAddr @@ -2405,7 +2405,7 @@ paths: produces: - application/json responses: - "200": + '200': description: OK schema: type: array @@ -2426,12 +2426,12 @@ paths: example: stake amount: type: string - example: "50" - "400": + example: '50' + '400': description: Invalid validator address - "500": + '500': description: Internal Server Error - "/staking/validators/{validatorAddr}/unbonding_delegations": + '/staking/validators/{validatorAddr}/unbonding_delegations': parameters: - in: path name: validatorAddr @@ -2447,7 +2447,7 @@ paths: produces: - application/json responses: - "200": + '200': description: OK schema: type: array @@ -2466,9 +2466,9 @@ paths: type: integer min_time: type: integer - "400": + '400': description: Invalid validator address - "500": + '500': description: Internal Server Error /staking/pool: get: @@ -2479,7 +2479,7 @@ paths: produces: - application/json responses: - "200": + '200': description: OK schema: type: object @@ -2496,7 +2496,7 @@ paths: type: string prev_bonded_shares: type: string - "500": + '500': description: Internal Server Error /staking/parameters: get: @@ -2507,7 +2507,7 @@ paths: produces: - application/json responses: - "200": + '200': description: OK schema: type: object @@ -2526,7 +2526,7 @@ paths: type: integer bond_denom: type: string - "500": + '500': description: Internal Server Error /slashing/signing_infos: get: @@ -2551,7 +2551,7 @@ paths: required: true x-example: 5 responses: - "200": + '200': description: OK schema: type: array @@ -2566,11 +2566,11 @@ paths: type: string missed_blocks_counter: type: string - "400": + '400': description: Invalid validator public key for one of the validators - "500": + '500': description: Internal Server Error - "/slashing/validators/{validatorAddr}/unjail": + '/slashing/validators/{validatorAddr}/unjail': post: deprecated: true summary: Unjail a jailed validator @@ -2588,7 +2588,7 @@ paths: required: true in: path x-example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l - - description: "" + - description: '' name: UnjailBody in: body required: true @@ -2617,7 +2617,7 @@ paths: example: stake amount: type: string - example: "50" + example: '50' memo: type: string signature: @@ -2638,12 +2638,12 @@ paths: example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH account_number: type: string - example: "0" + example: '0' sequence: type: string - example: "0" + example: '0' responses: - "200": + '200': description: Tx was succesfully generated schema: type: object @@ -2667,7 +2667,7 @@ paths: example: stake amount: type: string - example: "50" + example: '50' memo: type: string signature: @@ -2688,13 +2688,13 @@ paths: example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH account_number: type: string - example: "0" + example: '0' sequence: type: string - example: "0" - "400": + example: '0' + '400': description: Invalid validator address or base_req - "500": + '500': description: Internal Server Error /slashing/parameters: get: @@ -2705,7 +2705,7 @@ paths: produces: - application/json responses: - "200": + '200': description: OK schema: type: object @@ -2724,7 +2724,7 @@ paths: type: string slash_fraction_downtime: type: string - "500": + '500': description: Internal Server Error /gov/proposals: post: @@ -2762,16 +2762,16 @@ paths: example: Cosmos-Hub account_number: type: string - example: "0" + example: '0' sequence: type: string - example: "1" + example: '1' gas: type: string - example: "200000" + example: '200000' gas_adjustment: type: string - example: "1.2" + example: '1.2' fees: type: array items: @@ -2782,7 +2782,7 @@ paths: example: stake amount: type: string - example: "50" + example: '50' simulate: type: boolean example: false @@ -2810,9 +2810,9 @@ paths: example: stake amount: type: string - example: "50" + example: '50' responses: - "200": + '200': description: Tx was succesfully generated schema: type: object @@ -2836,7 +2836,7 @@ paths: example: stake amount: type: string - example: "50" + example: '50' memo: type: string signature: @@ -2857,13 +2857,13 @@ paths: example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH account_number: type: string - example: "0" + example: '0' sequence: type: string - example: "0" - "400": + example: '0' + '400': description: Invalid proposal body - "500": + '500': description: Internal Server Error get: deprecated: true @@ -2892,7 +2892,7 @@ paths: required: false type: string responses: - "200": + '200': description: OK schema: type: array @@ -2912,18 +2912,18 @@ paths: final_tally_result: type: object properties: - "yes": + 'yes': type: string - example: "0.0000000000" + example: '0.0000000000' abstain: type: string - example: "0.0000000000" - "no": + example: '0.0000000000' + 'no': type: string - example: "0.0000000000" + example: '0.0000000000' no_with_veto: type: string - example: "0.0000000000" + example: '0.0000000000' submit_time: type: string total_deposit: @@ -2936,12 +2936,12 @@ paths: example: stake amount: type: string - example: "50" + example: '50' voting_start_time: type: string - "400": + '400': description: Invalid query parameters - "500": + '500': description: Internal Server Error /gov/proposals/param_change: post: @@ -2979,16 +2979,16 @@ paths: example: Cosmos-Hub account_number: type: string - example: "0" + example: '0' sequence: type: string - example: "1" + example: '1' gas: type: string - example: "200000" + example: '200000' gas_adjustment: type: string - example: "1.2" + example: '1.2' fees: type: array items: @@ -2999,7 +2999,7 @@ paths: example: stake amount: type: string - example: "50" + example: '50' simulate: type: boolean example: false @@ -3026,7 +3026,7 @@ paths: example: stake amount: type: string - example: "50" + example: '50' changes: type: array items: @@ -3040,11 +3040,11 @@ paths: example: MaxValidators subkey: type: string - example: "" + example: '' value: type: object responses: - "200": + '200': description: The transaction was succesfully generated schema: type: object @@ -3068,7 +3068,7 @@ paths: example: stake amount: type: string - example: "50" + example: '50' memo: type: string signature: @@ -3089,15 +3089,15 @@ paths: example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH account_number: type: string - example: "0" + example: '0' sequence: type: string - example: "0" - "400": + example: '0' + '400': description: Invalid proposal body - "500": + '500': description: Internal Server Error - "/gov/proposals/{proposalId}": + '/gov/proposals/{proposalId}': get: deprecated: true summary: Query a proposal @@ -3111,9 +3111,9 @@ paths: name: proposalId required: true in: path - x-example: "2" + x-example: '2' responses: - "200": + '200': description: OK schema: type: object @@ -3131,18 +3131,18 @@ paths: final_tally_result: type: object properties: - "yes": + 'yes': type: string - example: "0.0000000000" + example: '0.0000000000' abstain: type: string - example: "0.0000000000" - "no": + example: '0.0000000000' + 'no': type: string - example: "0.0000000000" + example: '0.0000000000' no_with_veto: type: string - example: "0.0000000000" + example: '0.0000000000' submit_time: type: string total_deposit: @@ -3155,14 +3155,14 @@ paths: example: stake amount: type: string - example: "50" + example: '50' voting_start_time: type: string - "400": + '400': description: Invalid proposal id - "500": + '500': description: Internal Server Error - "/gov/proposals/{proposalId}/proposer": + '/gov/proposals/{proposalId}/proposer': get: deprecated: true summary: Query proposer @@ -3176,9 +3176,9 @@ paths: name: proposalId required: true in: path - x-example: "2" + x-example: '2' responses: - "200": + '200': description: OK schema: type: object @@ -3187,11 +3187,11 @@ paths: type: string proposer: type: string - "400": + '400': description: Invalid proposal ID - "500": + '500': description: Internal Server Error - "/gov/proposals/{proposalId}/deposits": + '/gov/proposals/{proposalId}/deposits': get: deprecated: true summary: Query deposits @@ -3205,9 +3205,9 @@ paths: name: proposalId required: true in: path - x-example: "2" + x-example: '2' responses: - "200": + '200': description: OK schema: type: array @@ -3224,16 +3224,16 @@ paths: example: stake amount: type: string - example: "50" + example: '50' proposal_id: type: string depositor: type: string description: bech32 encoded address example: cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27 - "400": + '400': description: Invalid proposal id - "500": + '500': description: Internal Server Error post: deprecated: true @@ -3251,8 +3251,8 @@ paths: name: proposalId required: true in: path - x-example: "2" - - description: "" + x-example: '2' + - description: '' name: post_deposit_body in: body required: true @@ -3274,16 +3274,16 @@ paths: example: Cosmos-Hub account_number: type: string - example: "0" + example: '0' sequence: type: string - example: "1" + example: '1' gas: type: string - example: "200000" + example: '200000' gas_adjustment: type: string - example: "1.2" + example: '1.2' fees: type: array items: @@ -3294,7 +3294,7 @@ paths: example: stake amount: type: string - example: "50" + example: '50' simulate: type: boolean example: false @@ -3315,9 +3315,9 @@ paths: example: stake amount: type: string - example: "50" + example: '50' responses: - "200": + '200': description: OK schema: type: object @@ -3341,7 +3341,7 @@ paths: example: stake amount: type: string - example: "50" + example: '50' memo: type: string signature: @@ -3362,17 +3362,17 @@ paths: example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH account_number: type: string - example: "0" + example: '0' sequence: type: string - example: "0" - "400": + example: '0' + '400': description: Invalid proposal id or deposit body - "401": + '401': description: Key password is wrong - "500": + '500': description: Internal Server Error - "/gov/proposals/{proposalId}/deposits/{depositor}": + '/gov/proposals/{proposalId}/deposits/{depositor}': get: deprecated: true summary: Query deposit @@ -3387,7 +3387,7 @@ paths: name: proposalId required: true in: path - x-example: "2" + x-example: '2' - type: string description: Bech32 depositor address name: depositor @@ -3395,7 +3395,7 @@ paths: in: path x-example: cosmos16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv responses: - "200": + '200': description: OK schema: type: object @@ -3410,20 +3410,20 @@ paths: example: stake amount: type: string - example: "50" + example: '50' proposal_id: type: string depositor: type: string description: bech32 encoded address example: cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27 - "400": + '400': description: Invalid proposal id or depositor address - "404": + '404': description: Found no deposit - "500": + '500': description: Internal Server Error - "/gov/proposals/{proposalId}/votes": + '/gov/proposals/{proposalId}/votes': get: deprecated: true summary: Query voters @@ -3438,9 +3438,9 @@ paths: name: proposalId required: true in: path - x-example: "2" + x-example: '2' responses: - "200": + '200': description: OK schema: type: array @@ -3453,9 +3453,9 @@ paths: type: string option: type: string - "400": + '400': description: Invalid proposal id - "500": + '500': description: Internal Server Error post: deprecated: true @@ -3473,7 +3473,7 @@ paths: name: proposalId required: true in: path - x-example: "2" + x-example: '2' - description: >- valid value of `"option"` field can be `"yes"`, `"no"`, `"no_with_veto"` and `"abstain"` @@ -3498,16 +3498,16 @@ paths: example: Cosmos-Hub account_number: type: string - example: "0" + example: '0' sequence: type: string - example: "1" + example: '1' gas: type: string - example: "200000" + example: '200000' gas_adjustment: type: string - example: "1.2" + example: '1.2' fees: type: array items: @@ -3518,7 +3518,7 @@ paths: example: stake amount: type: string - example: "50" + example: '50' simulate: type: boolean example: false @@ -3531,9 +3531,9 @@ paths: example: cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27 option: type: string - example: "yes" + example: 'yes' responses: - "200": + '200': description: OK schema: type: object @@ -3557,7 +3557,7 @@ paths: example: stake amount: type: string - example: "50" + example: '50' memo: type: string signature: @@ -3578,17 +3578,17 @@ paths: example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH account_number: type: string - example: "0" + example: '0' sequence: type: string - example: "0" - "400": + example: '0' + '400': description: Invalid proposal id or vote body - "401": + '401': description: Key password is wrong - "500": + '500': description: Internal Server Error - "/gov/proposals/{proposalId}/votes/{voter}": + '/gov/proposals/{proposalId}/votes/{voter}': get: deprecated: true summary: Query vote @@ -3603,7 +3603,7 @@ paths: name: proposalId required: true in: path - x-example: "2" + x-example: '2' - type: string description: Bech32 voter address name: voter @@ -3611,7 +3611,7 @@ paths: in: path x-example: cosmos16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv responses: - "200": + '200': description: OK schema: type: object @@ -3622,13 +3622,13 @@ paths: type: string option: type: string - "400": + '400': description: Invalid proposal id or voter address - "404": + '404': description: Found no vote - "500": + '500': description: Internal Server Error - "/gov/proposals/{proposalId}/tally": + '/gov/proposals/{proposalId}/tally': get: deprecated: true summary: Get a proposal's tally result at the current time @@ -3646,28 +3646,28 @@ paths: name: proposalId required: true in: path - x-example: "2" + x-example: '2' responses: - "200": + '200': description: OK schema: type: object properties: - "yes": + 'yes': type: string - example: "0.0000000000" + example: '0.0000000000' abstain: type: string - example: "0.0000000000" - "no": + example: '0.0000000000' + 'no': type: string - example: "0.0000000000" + example: '0.0000000000' no_with_veto: type: string - example: "0.0000000000" - "400": + example: '0.0000000000' + '400': description: Invalid proposal id - "500": + '500': description: Internal Server Error /gov/parameters/deposit: get: @@ -3681,7 +3681,7 @@ paths: tags: - Governance responses: - "200": + '200': description: OK schema: type: object @@ -3696,15 +3696,15 @@ paths: example: stake amount: type: string - example: "50" + example: '50' max_deposit_period: type: string - example: "86400000000000" - "400": + example: '86400000000000' + '400': description: is not a valid query request path - "404": + '404': description: Found no deposit parameters - "500": + '500': description: Internal Server Error /gov/parameters/tallying: get: @@ -3716,24 +3716,24 @@ paths: tags: - Governance responses: - "200": + '200': description: OK schema: properties: threshold: type: string - example: "0.5000000000" + example: '0.5000000000' veto: type: string - example: "0.3340000000" + example: '0.3340000000' governance_penalty: type: string - example: "0.0100000000" - "400": + example: '0.0100000000' + '400': description: is not a valid query request path - "404": + '404': description: Found no tally parameters - "500": + '500': description: Internal Server Error /gov/parameters/voting: get: @@ -3747,20 +3747,20 @@ paths: tags: - Governance responses: - "200": + '200': description: OK schema: properties: voting_period: type: string - example: "86400000000000" - "400": + example: '86400000000000' + '400': description: is not a valid query request path - "404": + '404': description: Found no voting parameters - "500": + '500': description: Internal Server Error - "/distribution/delegators/{delegatorAddr}/rewards": + '/distribution/delegators/{delegatorAddr}/rewards': parameters: - in: path name: delegatorAddr @@ -3779,7 +3779,7 @@ paths: tags: - Distribution responses: - "200": + '200': description: OK schema: type: object @@ -3803,7 +3803,7 @@ paths: example: stake amount: type: string - example: "50" + example: '50' total: type: array items: @@ -3814,10 +3814,10 @@ paths: example: stake amount: type: string - example: "50" - "400": + example: '50' + '400': description: Invalid delegator address - "500": + '500': description: Internal Server Error post: deprecated: true @@ -3849,16 +3849,16 @@ paths: example: Cosmos-Hub account_number: type: string - example: "0" + example: '0' sequence: type: string - example: "1" + example: '1' gas: type: string - example: "200000" + example: '200000' gas_adjustment: type: string - example: "1.2" + example: '1.2' fees: type: array items: @@ -3869,7 +3869,7 @@ paths: example: stake amount: type: string - example: "50" + example: '50' simulate: type: boolean example: false @@ -3877,7 +3877,7 @@ paths: Estimate gas for a transaction (cannot be used in conjunction with generate_only) responses: - "200": + '200': description: OK schema: type: object @@ -3901,7 +3901,7 @@ paths: example: stake amount: type: string - example: "50" + example: '50' memo: type: string signature: @@ -3922,17 +3922,17 @@ paths: example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH account_number: type: string - example: "0" + example: '0' sequence: type: string - example: "0" - "400": + example: '0' + '400': description: Invalid delegator address - "401": + '401': description: Key password is wrong - "500": + '500': description: Internal Server Error - "/distribution/delegators/{delegatorAddr}/rewards/{validatorAddr}": + '/distribution/delegators/{delegatorAddr}/rewards/{validatorAddr}': parameters: - in: path name: delegatorAddr @@ -3955,7 +3955,7 @@ paths: produces: - application/json responses: - "200": + '200': description: OK schema: type: array @@ -3967,10 +3967,10 @@ paths: example: stake amount: type: string - example: "50" - "400": + example: '50' + '400': description: Invalid delegator address - "500": + '500': description: Internal Server Error post: deprecated: true @@ -4002,16 +4002,16 @@ paths: example: Cosmos-Hub account_number: type: string - example: "0" + example: '0' sequence: type: string - example: "1" + example: '1' gas: type: string - example: "200000" + example: '200000' gas_adjustment: type: string - example: "1.2" + example: '1.2' fees: type: array items: @@ -4022,7 +4022,7 @@ paths: example: stake amount: type: string - example: "50" + example: '50' simulate: type: boolean example: false @@ -4030,7 +4030,7 @@ paths: Estimate gas for a transaction (cannot be used in conjunction with generate_only) responses: - "200": + '200': description: OK schema: type: object @@ -4054,7 +4054,7 @@ paths: example: stake amount: type: string - example: "50" + example: '50' memo: type: string signature: @@ -4075,17 +4075,17 @@ paths: example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH account_number: type: string - example: "0" + example: '0' sequence: type: string - example: "0" - "400": + example: '0' + '400': description: Invalid delegator address or delegation body - "401": + '401': description: Key password is wrong - "500": + '500': description: Internal Server Error - "/distribution/delegators/{delegatorAddr}/withdraw_address": + '/distribution/delegators/{delegatorAddr}/withdraw_address': parameters: - in: path name: delegatorAddr @@ -4104,15 +4104,15 @@ paths: produces: - application/json responses: - "200": + '200': description: OK schema: type: string description: bech32 encoded address example: cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27 - "400": + '400': description: Invalid delegator address - "500": + '500': description: Internal Server Error post: deprecated: true @@ -4144,16 +4144,16 @@ paths: example: Cosmos-Hub account_number: type: string - example: "0" + example: '0' sequence: type: string - example: "1" + example: '1' gas: type: string - example: "200000" + example: '200000' gas_adjustment: type: string - example: "1.2" + example: '1.2' fees: type: array items: @@ -4164,7 +4164,7 @@ paths: example: stake amount: type: string - example: "50" + example: '50' simulate: type: boolean example: false @@ -4176,7 +4176,7 @@ paths: description: bech32 encoded address example: cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27 responses: - "200": + '200': description: OK schema: type: object @@ -4200,7 +4200,7 @@ paths: example: stake amount: type: string - example: "50" + example: '50' memo: type: string signature: @@ -4221,17 +4221,17 @@ paths: example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH account_number: type: string - example: "0" + example: '0' sequence: type: string - example: "0" - "400": + example: '0' + '400': description: Invalid delegator or withdraw address - "401": + '401': description: Key password is wrong - "500": + '500': description: Internal Server Error - "/distribution/validators/{validatorAddr}": + '/distribution/validators/{validatorAddr}': parameters: - in: path name: validatorAddr @@ -4248,7 +4248,7 @@ paths: produces: - application/json responses: - "200": + '200': description: OK schema: type: object @@ -4267,7 +4267,7 @@ paths: example: stake amount: type: string - example: "50" + example: '50' val_commission: type: array items: @@ -4278,12 +4278,12 @@ paths: example: stake amount: type: string - example: "50" - "400": + example: '50' + '400': description: Invalid validator address - "500": + '500': description: Internal Server Error - "/distribution/validators/{validatorAddr}/outstanding_rewards": + '/distribution/validators/{validatorAddr}/outstanding_rewards': parameters: - in: path name: validatorAddr @@ -4299,7 +4299,7 @@ paths: produces: - application/json responses: - "200": + '200': description: OK schema: type: array @@ -4311,10 +4311,10 @@ paths: example: stake amount: type: string - example: "50" - "500": + example: '50' + '500': description: Internal Server Error - "/distribution/validators/{validatorAddr}/rewards": + '/distribution/validators/{validatorAddr}/rewards': parameters: - in: path name: validatorAddr @@ -4331,7 +4331,7 @@ paths: produces: - application/json responses: - "200": + '200': description: OK schema: type: array @@ -4343,10 +4343,10 @@ paths: example: stake amount: type: string - example: "50" - "400": + example: '50' + '400': description: Invalid validator address - "500": + '500': description: Internal Server Error post: deprecated: true @@ -4378,16 +4378,16 @@ paths: example: Cosmos-Hub account_number: type: string - example: "0" + example: '0' sequence: type: string - example: "1" + example: '1' gas: type: string - example: "200000" + example: '200000' gas_adjustment: type: string - example: "1.2" + example: '1.2' fees: type: array items: @@ -4398,7 +4398,7 @@ paths: example: stake amount: type: string - example: "50" + example: '50' simulate: type: boolean example: false @@ -4406,7 +4406,7 @@ paths: Estimate gas for a transaction (cannot be used in conjunction with generate_only) responses: - "200": + '200': description: OK schema: type: object @@ -4430,7 +4430,7 @@ paths: example: stake amount: type: string - example: "50" + example: '50' memo: type: string signature: @@ -4451,15 +4451,15 @@ paths: example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH account_number: type: string - example: "0" + example: '0' sequence: type: string - example: "0" - "400": + example: '0' + '400': description: Invalid validator address - "401": + '401': description: Key password is wrong - "500": + '500': description: Internal Server Error /distribution/community_pool: get: @@ -4470,7 +4470,7 @@ paths: produces: - application/json responses: - "200": + '200': description: OK schema: type: array @@ -4482,8 +4482,8 @@ paths: example: stake amount: type: string - example: "50" - "500": + example: '50' + '500': description: Internal Server Error /distribution/parameters: get: @@ -4494,7 +4494,7 @@ paths: produces: - application/json responses: - "200": + '200': description: OK schema: properties: @@ -4504,7 +4504,7 @@ paths: type: string community_tax: type: string - "500": + '500': description: Internal Server Error /minting/parameters: get: @@ -4515,7 +4515,7 @@ paths: produces: - application/json responses: - "200": + '200': description: OK schema: properties: @@ -4531,7 +4531,7 @@ paths: type: string blocks_per_year: type: string - "500": + '500': description: Internal Server Error /minting/inflation: get: @@ -4542,11 +4542,11 @@ paths: produces: - application/json responses: - "200": + '200': description: OK schema: type: string - "500": + '500': description: Internal Server Error /minting/annual-provisions: get: @@ -4557,11 +4557,11 @@ paths: produces: - application/json responses: - "200": + '200': description: OK schema: type: string - "500": + '500': description: Internal Server Error /supply/total: get: @@ -4572,7 +4572,7 @@ paths: produces: - application/json responses: - "200": + '200': description: OK schema: type: object @@ -4587,10 +4587,10 @@ paths: example: stake amount: type: string - example: "50" - "500": + example: '50' + '500': description: Internal Server Error - "/supply/total/{denomination}": + '/supply/total/{denomination}': parameters: - in: path name: denomination @@ -4606,20 +4606,20 @@ paths: produces: - application/json responses: - "200": + '200': description: OK schema: type: string - "400": + '400': description: Invalid coin denomination - "500": + '500': description: Internal Server Error - "/cosmos/auth/v1beta1/accounts/{address}": + '/cosmos/auth/v1beta1/accounts/{address}': get: summary: Account returns account details based on address. operationId: Account responses: - "200": + '200': description: A successful response. schema: type: object @@ -4695,7 +4695,7 @@ paths: QueryAccountResponse is the response type for the Query/Account RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -4896,7 +4896,7 @@ paths: summary: Params queries all parameters. operationId: AuthParams responses: - "200": + '200': description: A successful response. schema: type: object @@ -4924,7 +4924,7 @@ paths: QueryParamsResponse is the response type for the Query/Params RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -5114,12 +5114,12 @@ paths: } tags: - Query - "/cosmos/bank/v1beta1/balances/{address}": + '/cosmos/bank/v1beta1/balances/{address}': get: summary: AllBalances queries the balance of all coins for a single account. operationId: AllBalances responses: - "200": + '200': description: A successful response. schema: type: object @@ -5166,7 +5166,7 @@ paths: method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -5239,15 +5239,14 @@ paths: in: query required: false type: boolean - format: boolean tags: - Query - "/cosmos/bank/v1beta1/balances/{address}/{denom}": + '/cosmos/bank/v1beta1/balances/{address}/{denom}': get: summary: Balance queries the balance of a single coin for a single account. operationId: Balance responses: - "200": + '200': description: A successful response. schema: type: object @@ -5264,7 +5263,7 @@ paths: QueryBalanceResponse is the response type for the Query/Balance RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -5303,7 +5302,7 @@ paths: summary: Params queries the parameters of x/bank module. operationId: BankParams responses: - "200": + '200': description: A successful response. schema: type: object @@ -5320,7 +5319,6 @@ paths: type: string enabled: type: boolean - format: boolean description: >- SendEnabled maps coin denom to a send_enabled status (whether a denom is @@ -5328,13 +5326,12 @@ paths: sendable). default_send_enabled: type: boolean - format: boolean description: Params defines the parameters for the bank module. description: >- QueryParamsResponse defines the response type for querying x/bank parameters. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -5362,7 +5359,7 @@ paths: summary: TotalSupply queries the total supply of all coins. operationId: TotalSupply responses: - "200": + '200': description: A successful response. schema: type: object @@ -5391,7 +5388,7 @@ paths: method default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -5414,12 +5411,12 @@ paths: format: byte tags: - Query - "/cosmos/bank/v1beta1/supply/{denom}": + '/cosmos/bank/v1beta1/supply/{denom}': get: summary: SupplyOf queries the supply of a single coin. operationId: SupplyOf responses: - "200": + '200': description: A successful response. schema: type: object @@ -5436,7 +5433,7 @@ paths: QuerySupplyOfResponse is the response type for the Query/SupplyOf RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -5470,7 +5467,7 @@ paths: summary: CommunityPool queries the community pool coins. operationId: CommunityPool responses: - "200": + '200': description: A successful response. schema: type: object @@ -5500,7 +5497,7 @@ paths: RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -5523,14 +5520,14 @@ paths: format: byte tags: - Query - "/cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards": + '/cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards': get: summary: |- DelegationTotalRewards queries the total rewards accrued by a each validator. operationId: DelegationTotalRewards responses: - "200": + '200': description: A successful response. schema: type: object @@ -5587,7 +5584,7 @@ paths: QueryDelegationTotalRewardsResponse is the response type for the Query/DelegationTotalRewards RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -5616,12 +5613,12 @@ paths: type: string tags: - Query - ? "/cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards/{validator_address}" - : get: + '/cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards/{validator_address}': + get: summary: DelegationRewards queries the total rewards accrued by a delegation. operationId: DelegationRewards responses: - "200": + '200': description: A successful response. schema: type: object @@ -5649,7 +5646,7 @@ paths: QueryDelegationRewardsResponse is the response type for the Query/DelegationRewards RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -5683,12 +5680,12 @@ paths: type: string tags: - Query - "/cosmos/distribution/v1beta1/delegators/{delegator_address}/validators": + '/cosmos/distribution/v1beta1/delegators/{delegator_address}/validators': get: summary: DelegatorValidators queries the validators of a delegator. operationId: DelegatorValidators responses: - "200": + '200': description: A successful response. schema: type: object @@ -5704,7 +5701,7 @@ paths: QueryDelegatorValidatorsResponse is the response type for the Query/DelegatorValidators RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -5733,12 +5730,12 @@ paths: type: string tags: - Query - ? "/cosmos/distribution/v1beta1/delegators/{delegator_address}/withdraw_address" - : get: + '/cosmos/distribution/v1beta1/delegators/{delegator_address}/withdraw_address': + get: summary: DelegatorWithdrawAddress queries withdraw address of a delegator. operationId: DelegatorWithdrawAddress responses: - "200": + '200': description: A successful response. schema: type: object @@ -5750,7 +5747,7 @@ paths: QueryDelegatorWithdrawAddressResponse is the response type for the Query/DelegatorWithdrawAddress RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -5784,7 +5781,7 @@ paths: summary: Params queries params of the distribution module. operationId: DistributionParams responses: - "200": + '200': description: A successful response. schema: type: object @@ -5801,12 +5798,11 @@ paths: type: string withdraw_addr_enabled: type: boolean - format: boolean description: >- QueryParamsResponse is the response type for the Query/Params RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -5829,12 +5825,12 @@ paths: format: byte tags: - Query - "/cosmos/distribution/v1beta1/validators/{validator_address}/commission": + '/cosmos/distribution/v1beta1/validators/{validator_address}/commission': get: summary: ValidatorCommission queries accumulated commission for a validator. operationId: ValidatorCommission responses: - "200": + '200': description: A successful response. schema: type: object @@ -5865,7 +5861,7 @@ paths: QueryValidatorCommissionResponse is the response type for the Query/ValidatorCommission RPC method default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -5894,12 +5890,12 @@ paths: type: string tags: - Query - ? "/cosmos/distribution/v1beta1/validators/{validator_address}/outstanding_rewards" - : get: + '/cosmos/distribution/v1beta1/validators/{validator_address}/outstanding_rewards': + get: summary: ValidatorOutstandingRewards queries rewards of a validator address. operationId: ValidatorOutstandingRewards responses: - "200": + '200': description: A successful response. schema: type: object @@ -5937,7 +5933,7 @@ paths: Query/ValidatorOutstandingRewards RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -5966,12 +5962,12 @@ paths: type: string tags: - Query - "/cosmos/distribution/v1beta1/validators/{validator_address}/slashes": + '/cosmos/distribution/v1beta1/validators/{validator_address}/slashes': get: summary: ValidatorSlashes queries slash events of a validator. operationId: ValidatorSlashes responses: - "200": + '200': description: A successful response. schema: type: object @@ -6019,7 +6015,7 @@ paths: QueryValidatorSlashesResponse is the response type for the Query/ValidatorSlashes RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -6108,7 +6104,6 @@ paths: in: query required: false type: boolean - format: boolean tags: - Query /cosmos/evidence/v1beta1/evidence: @@ -6116,7 +6111,7 @@ paths: summary: AllEvidence queries all evidence. operationId: AllEvidence responses: - "200": + '200': description: A successful response. schema: type: object @@ -6323,7 +6318,7 @@ paths: method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -6558,15 +6553,14 @@ paths: in: query required: false type: boolean - format: boolean tags: - Query - "/cosmos/evidence/v1beta1/evidence/{evidence_hash}": + '/cosmos/evidence/v1beta1/evidence/{evidence_hash}': get: summary: Evidence queries evidence based on evidence hash. operationId: Evidence responses: - "200": + '200': description: A successful response. schema: type: object @@ -6642,7 +6636,7 @@ paths: QueryEvidenceResponse is the response type for the Query/Evidence RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -6839,12 +6833,12 @@ paths: format: byte tags: - Query - "/cosmos/gov/v1beta1/params/{params_type}": + '/cosmos/gov/v1beta1/params/{params_type}': get: summary: Params queries all parameters of the gov module. operationId: GovParams responses: - "200": + '200': description: A successful response. schema: type: object @@ -6912,7 +6906,7 @@ paths: QueryParamsResponse is the response type for the Query/Params RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -7117,7 +7111,7 @@ paths: summary: Proposals queries all proposals based on given status. operationId: Proposals responses: - "200": + '200': description: A successful response. schema: type: object @@ -7335,11 +7329,11 @@ paths: final_tally_result: type: object properties: - "yes": + 'yes': type: string abstain: type: string - "no": + 'no': type: string no_with_veto: type: string @@ -7403,7 +7397,7 @@ paths: method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -7674,15 +7668,14 @@ paths: in: query required: false type: boolean - format: boolean tags: - Query - "/cosmos/gov/v1beta1/proposals/{proposal_id}": + '/cosmos/gov/v1beta1/proposals/{proposal_id}': get: summary: Proposal queries proposal details based on ProposalID. operationId: Proposal responses: - "200": + '200': description: A successful response. schema: type: object @@ -7896,11 +7889,11 @@ paths: final_tally_result: type: object properties: - "yes": + 'yes': type: string abstain: type: string - "no": + 'no': type: string no_with_veto: type: string @@ -7943,7 +7936,7 @@ paths: QueryProposalResponse is the response type for the Query/Proposal RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -8140,12 +8133,12 @@ paths: format: uint64 tags: - Query - "/cosmos/gov/v1beta1/proposals/{proposal_id}/deposits": + '/cosmos/gov/v1beta1/proposals/{proposal_id}/deposits': get: summary: Deposits queries all deposits of a single proposal. operationId: Deposits responses: - "200": + '200': description: A successful response. schema: type: object @@ -8205,7 +8198,7 @@ paths: QueryDepositsResponse is the response type for the Query/Deposits RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -8446,17 +8439,16 @@ paths: in: query required: false type: boolean - format: boolean tags: - Query - "/cosmos/gov/v1beta1/proposals/{proposal_id}/deposits/{depositor}": + '/cosmos/gov/v1beta1/proposals/{proposal_id}/deposits/{depositor}': get: summary: >- Deposit queries single deposit information based proposalID, depositAddr. operationId: Deposit responses: - "200": + '200': description: A successful response. schema: type: object @@ -8491,7 +8483,7 @@ paths: QueryDepositResponse is the response type for the Query/Deposit RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -8693,12 +8685,12 @@ paths: type: string tags: - Query - "/cosmos/gov/v1beta1/proposals/{proposal_id}/tally": + '/cosmos/gov/v1beta1/proposals/{proposal_id}/tally': get: summary: TallyResult queries the tally of a proposal vote. operationId: TallyResult responses: - "200": + '200': description: A successful response. schema: type: object @@ -8707,11 +8699,11 @@ paths: description: tally defines the requested tally. type: object properties: - "yes": + 'yes': type: string abstain: type: string - "no": + 'no': type: string no_with_veto: type: string @@ -8719,7 +8711,7 @@ paths: QueryTallyResultResponse is the response type for the Query/Tally RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -8916,12 +8908,12 @@ paths: format: uint64 tags: - Query - "/cosmos/gov/v1beta1/proposals/{proposal_id}/votes": + '/cosmos/gov/v1beta1/proposals/{proposal_id}/votes': get: summary: Votes queries votes of a given proposal. operationId: Votes responses: - "200": + '200': description: A successful response. schema: type: object @@ -8982,7 +8974,7 @@ paths: QueryVotesResponse is the response type for the Query/Votes RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -9223,15 +9215,14 @@ paths: in: query required: false type: boolean - format: boolean tags: - Query - "/cosmos/gov/v1beta1/proposals/{proposal_id}/votes/{voter}": + '/cosmos/gov/v1beta1/proposals/{proposal_id}/votes/{voter}': get: - summary: "Vote queries voted information based on proposalID, voterAddr." + summary: 'Vote queries voted information based on proposalID, voterAddr.' operationId: Vote responses: - "200": + '200': description: A successful response. schema: type: object @@ -9267,7 +9258,7 @@ paths: QueryVoteResponse is the response type for the Query/Vote RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -9474,7 +9465,7 @@ paths: summary: AnnualProvisions current minting annual provisions value. operationId: AnnualProvisions responses: - "200": + '200': description: A successful response. schema: type: object @@ -9489,7 +9480,7 @@ paths: QueryAnnualProvisionsResponse is the response type for the Query/AnnualProvisions RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -9517,7 +9508,7 @@ paths: summary: Inflation returns the current minting inflation value. operationId: Inflation responses: - "200": + '200': description: A successful response. schema: type: object @@ -9532,7 +9523,7 @@ paths: method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -9560,7 +9551,7 @@ paths: summary: Params returns the total set of minting parameters. operationId: MintParams responses: - "200": + '200': description: A successful response. schema: type: object @@ -9592,7 +9583,7 @@ paths: QueryParamsResponse is the response type for the Query/Params RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -9622,7 +9613,7 @@ paths: key. operationId: Params responses: - "200": + '200': description: A successful response. schema: type: object @@ -9641,7 +9632,7 @@ paths: QueryParamsResponse is response type for the Query/Params RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -9680,7 +9671,7 @@ paths: summary: Params queries the parameters of slashing module operationId: SlashingParams responses: - "200": + '200': description: A successful response. schema: type: object @@ -9709,7 +9700,7 @@ paths: QueryParamsResponse is the response type for the Query/Params RPC method default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -9737,7 +9728,7 @@ paths: summary: SigningInfos queries signing info of all validators operationId: SigningInfos responses: - "200": + '200': description: A successful response. schema: type: object @@ -9765,7 +9756,6 @@ paths: title: timestamp validator cannot be unjailed until tombstoned: type: boolean - format: boolean title: >- whether or not a validator has been tombstoned (killed out of validator @@ -9816,7 +9806,7 @@ paths: method default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -9884,15 +9874,14 @@ paths: in: query required: false type: boolean - format: boolean tags: - Query - "/cosmos/slashing/v1beta1/signing_infos/{cons_address}": + '/cosmos/slashing/v1beta1/signing_infos/{cons_address}': get: summary: SigningInfo queries the signing info of given cons address operationId: SigningInfo responses: - "200": + '200': description: A successful response. schema: type: object @@ -9921,7 +9910,6 @@ paths: title: timestamp validator cannot be unjailed until tombstoned: type: boolean - format: boolean title: >- whether or not a validator has been tombstoned (killed out of validator @@ -9944,7 +9932,7 @@ paths: method default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -9973,14 +9961,14 @@ paths: type: string tags: - Query - "/cosmos/staking/v1beta1/delegations/{delegator_addr}": + '/cosmos/staking/v1beta1/delegations/{delegator_addr}': get: summary: >- DelegatorDelegations queries all delegations of a given delegator address. operationId: DelegatorDelegations responses: - "200": + '200': description: A successful response. schema: type: object @@ -10053,7 +10041,7 @@ paths: QueryDelegatorDelegationsResponse is response type for the Query/DelegatorDelegations RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -10071,9 +10059,176 @@ paths: properties: type_url: type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. value: type: string format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } parameters: - name: delegator_addr description: delegator_addr defines the delegator address to query for. @@ -10126,15 +10281,14 @@ paths: in: query required: false type: boolean - format: boolean tags: - Query - "/cosmos/staking/v1beta1/delegators/{delegator_addr}/redelegations": + '/cosmos/staking/v1beta1/delegators/{delegator_addr}/redelegations': get: summary: Redelegations queries redelegations of given address. operationId: Redelegations responses: - "200": + '200': description: A successful response. schema: type: object @@ -10240,7 +10394,7 @@ paths: method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -10258,9 +10412,176 @@ paths: properties: type_url: type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. value: type: string format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } parameters: - name: delegator_addr description: delegator_addr defines the delegator address to query for. @@ -10323,10 +10644,9 @@ paths: in: query required: false type: boolean - format: boolean tags: - Query - "/cosmos/staking/v1beta1/delegators/{delegator_addr}/unbonding_delegations": + '/cosmos/staking/v1beta1/delegators/{delegator_addr}/unbonding_delegations': get: summary: >- DelegatorUnbondingDelegations queries all unbonding delegations of a @@ -10335,7 +10655,7 @@ paths: delegator address. operationId: DelegatorUnbondingDelegations responses: - "200": + '200': description: A successful response. schema: type: object @@ -10396,7 +10716,7 @@ paths: Query/UnbondingDelegatorDelegations RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -10414,9 +10734,176 @@ paths: properties: type_url: type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. value: type: string format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } parameters: - name: delegator_addr description: delegator_addr defines the delegator address to query for. @@ -10469,17 +10956,16 @@ paths: in: query required: false type: boolean - format: boolean tags: - Query - "/cosmos/staking/v1beta1/delegators/{delegator_addr}/validators": + '/cosmos/staking/v1beta1/delegators/{delegator_addr}/validators': get: summary: |- DelegatorValidators queries all validators info for given delegator address. operationId: StakingDelegatorValidators responses: - "200": + '200': description: A successful response. schema: type: object @@ -10492,13 +10978,199 @@ paths: operator_address: type: string consensus_pubkey: - type: string + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the + type of the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's + path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be + in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the + binary all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can + optionally set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results + based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available + in the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty + scheme) might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the + above specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any + values in the form + + of utility functions or additional generated methods of + the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and + the unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will + yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the + regular + + representation of the deserialized, embedded message, + with an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a + custom JSON + + representation, that representation will be embedded + adding a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message + [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } jailed: type: boolean - format: boolean status: - type: integer - format: int32 + type: string + enum: + - BOND_STATUS_UNSPECIFIED + - BOND_STATUS_UNBONDED + - BOND_STATUS_UNBONDING + - BOND_STATUS_BONDED + default: BOND_STATUS_UNSPECIFIED + description: |- + BondStatus is the status of a validator. + + - BOND_STATUS_UNSPECIFIED: UNSPECIFIED defines an invalid validator status. + - BOND_STATUS_UNBONDED: UNBONDED defines a validator that is not bonded. + - BOND_STATUS_UNBONDING: UNBONDING defines a validator that is unbonding. + - BOND_STATUS_BONDED: BONDED defines a validator that is bonded. tokens: type: string delegator_shares: @@ -10594,7 +11266,7 @@ paths: QueryDelegatorValidatorsResponse is response type for the Query/DelegatorValidators RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -10612,9 +11284,176 @@ paths: properties: type_url: type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. value: type: string format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } parameters: - name: delegator_addr description: delegator_addr defines the delegator address to query for. @@ -10667,17 +11506,16 @@ paths: in: query required: false type: boolean - format: boolean tags: - Query - ? "/cosmos/staking/v1beta1/delegators/{delegator_addr}/validators/{validator_addr}" - : get: + '/cosmos/staking/v1beta1/delegators/{delegator_addr}/validators/{validator_addr}': + get: summary: |- DelegatorValidator queries validator info for given delegator validator pair. operationId: DelegatorValidator responses: - "200": + '200': description: A successful response. schema: type: object @@ -10689,13 +11527,197 @@ paths: operator_address: type: string consensus_pubkey: - type: string + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type + of the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be + in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can + optionally set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results + based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty + scheme) might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the + above specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any + values in the form + + of utility functions or additional generated methods of + the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and + the unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will + yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a + custom JSON + + representation, that representation will be embedded + adding a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } jailed: type: boolean - format: boolean status: - type: integer - format: int32 + type: string + enum: + - BOND_STATUS_UNSPECIFIED + - BOND_STATUS_UNBONDED + - BOND_STATUS_UNBONDING + - BOND_STATUS_BONDED + default: BOND_STATUS_UNSPECIFIED + description: |- + BondStatus is the status of a validator. + + - BOND_STATUS_UNSPECIFIED: UNSPECIFIED defines an invalid validator status. + - BOND_STATUS_UNBONDED: UNBONDED defines a validator that is not bonded. + - BOND_STATUS_UNBONDING: UNBONDING defines a validator that is unbonding. + - BOND_STATUS_BONDED: BONDED defines a validator that is bonded. tokens: type: string delegator_shares: @@ -10749,7 +11771,7 @@ paths: QueryDelegatorValidatorResponse response type for the Query/DelegatorValidator RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -10767,9 +11789,176 @@ paths: properties: type_url: type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. value: type: string format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } parameters: - name: delegator_addr description: delegator_addr defines the delegator address to query for. @@ -10783,12 +11972,12 @@ paths: type: string tags: - Query - "/cosmos/staking/v1beta1/historical_info/{height}": + '/cosmos/staking/v1beta1/historical_info/{height}': get: summary: HistoricalInfo queries the historical info for given height. operationId: HistoricalInfo responses: - "200": + '200': description: A successful response. schema: type: object @@ -10882,13 +12071,200 @@ paths: operator_address: type: string consensus_pubkey: - type: string + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the + type of the serialized + + protocol buffer message. This string must + contain at least + + one "/" character. The last segment of the URL's + path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name + should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the + binary all types that they + + expect it to use in the context of Any. However, + for URLs which use the + + scheme `http`, `https`, or no scheme, one can + optionally set up a type + + server that maps type URLs to message + definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup + results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently + available in the official + + protobuf release, and it is not used for type + URLs beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty + scheme) might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of + the above specified type. + description: >- + `Any` contains an arbitrary serialized protocol + buffer message along with a + + URL that describes the type of the serialized + message. + + + Protobuf library provides support to pack/unpack Any + values in the form + + of utility functions or additional generated methods + of the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will + by default use + + 'type.googleapis.com/full.type.name' as the type URL + and the unpack + + methods only use the fully qualified type name after + the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" + will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the + regular + + representation of the deserialized, embedded + message, with an + + additional field `@type` which contains the type + URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a + custom JSON + + representation, that representation will be embedded + adding a field + + `value` which holds the custom JSON in addition to + the `@type` + + field. Example (for message + [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } jailed: type: boolean - format: boolean status: - type: integer - format: int32 + type: string + enum: + - BOND_STATUS_UNSPECIFIED + - BOND_STATUS_UNBONDED + - BOND_STATUS_UNBONDING + - BOND_STATUS_BONDED + default: BOND_STATUS_UNSPECIFIED + description: |- + BondStatus is the status of a validator. + + - BOND_STATUS_UNSPECIFIED: UNSPECIFIED defines an invalid validator status. + - BOND_STATUS_UNBONDED: UNBONDED defines a validator that is not bonded. + - BOND_STATUS_UNBONDING: UNBONDING defines a validator that is unbonding. + - BOND_STATUS_BONDED: BONDED defines a validator that is bonded. tokens: type: string delegator_shares: @@ -10967,7 +12343,7 @@ paths: method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -10985,9 +12361,176 @@ paths: properties: type_url: type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. value: type: string format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } parameters: - name: height description: height defines at which height to query the historical info. @@ -11002,7 +12545,7 @@ paths: summary: Parameters queries the staking parameters. operationId: StakingParams responses: - "200": + '200': description: A successful response. schema: type: object @@ -11028,7 +12571,7 @@ paths: QueryParamsResponse is response type for the Query/Params RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -11046,9 +12589,176 @@ paths: properties: type_url: type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. value: type: string format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } tags: - Query /cosmos/staking/v1beta1/pool: @@ -11056,7 +12766,7 @@ paths: summary: Pool queries the pool info. operationId: Pool responses: - "200": + '200': description: A successful response. schema: type: object @@ -11071,7 +12781,7 @@ paths: type: string description: QueryPoolResponse is response type for the Query/Pool RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -11089,9 +12799,176 @@ paths: properties: type_url: type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. value: type: string format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } tags: - Query /cosmos/staking/v1beta1/validators: @@ -11099,7 +12976,7 @@ paths: summary: Validators queries all validators that match the given status. operationId: Validators responses: - "200": + '200': description: A successful response. schema: type: object @@ -11112,13 +12989,199 @@ paths: operator_address: type: string consensus_pubkey: - type: string + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the + type of the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's + path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be + in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the + binary all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can + optionally set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results + based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available + in the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty + scheme) might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the + above specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any + values in the form + + of utility functions or additional generated methods of + the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and + the unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will + yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the + regular + + representation of the deserialized, embedded message, + with an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a + custom JSON + + representation, that representation will be embedded + adding a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message + [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } jailed: type: boolean - format: boolean status: - type: integer - format: int32 + type: string + enum: + - BOND_STATUS_UNSPECIFIED + - BOND_STATUS_UNBONDED + - BOND_STATUS_UNBONDING + - BOND_STATUS_BONDED + default: BOND_STATUS_UNSPECIFIED + description: |- + BondStatus is the status of a validator. + + - BOND_STATUS_UNSPECIFIED: UNSPECIFIED defines an invalid validator status. + - BOND_STATUS_UNBONDED: UNBONDED defines a validator that is not bonded. + - BOND_STATUS_UNBONDING: UNBONDING defines a validator that is unbonding. + - BOND_STATUS_BONDED: BONDED defines a validator that is bonded. tokens: type: string delegator_shares: @@ -11214,7 +13277,7 @@ paths: QueryValidatorsResponse is response type for the Query/Validators RPC method default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -11232,9 +13295,176 @@ paths: properties: type_url: type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. value: type: string format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } parameters: - name: status description: status enables to query for validators matching a given status. @@ -11287,15 +13517,14 @@ paths: in: query required: false type: boolean - format: boolean tags: - Query - "/cosmos/staking/v1beta1/validators/{validator_addr}": + '/cosmos/staking/v1beta1/validators/{validator_addr}': get: summary: Validator queries validator info for given validator address. operationId: Validator responses: - "200": + '200': description: A successful response. schema: type: object @@ -11307,13 +13536,197 @@ paths: operator_address: type: string consensus_pubkey: - type: string + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type + of the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be + in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can + optionally set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results + based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty + scheme) might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the + above specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any + values in the form + + of utility functions or additional generated methods of + the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and + the unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will + yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a + custom JSON + + representation, that representation will be embedded + adding a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } jailed: type: boolean - format: boolean status: - type: integer - format: int32 + type: string + enum: + - BOND_STATUS_UNSPECIFIED + - BOND_STATUS_UNBONDED + - BOND_STATUS_UNBONDING + - BOND_STATUS_BONDED + default: BOND_STATUS_UNSPECIFIED + description: |- + BondStatus is the status of a validator. + + - BOND_STATUS_UNSPECIFIED: UNSPECIFIED defines an invalid validator status. + - BOND_STATUS_UNBONDED: UNBONDED defines a validator that is not bonded. + - BOND_STATUS_UNBONDING: UNBONDING defines a validator that is unbonding. + - BOND_STATUS_BONDED: BONDED defines a validator that is bonded. tokens: type: string delegator_shares: @@ -11367,7 +13780,7 @@ paths: QueryValidatorResponse is response type for the Query/Validator RPC method default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -11385,9 +13798,176 @@ paths: properties: type_url: type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. value: type: string format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } parameters: - name: validator_addr description: validator_addr defines the validator address to query for. @@ -11396,12 +13976,12 @@ paths: type: string tags: - Query - "/cosmos/staking/v1beta1/validators/{validator_addr}/delegations": + '/cosmos/staking/v1beta1/validators/{validator_addr}/delegations': get: summary: ValidatorDelegations queries delegate info for given validator. operationId: ValidatorDelegations responses: - "200": + '200': description: A successful response. schema: type: object @@ -11471,7 +14051,7 @@ paths: QueryValidatorDelegationsResponse is response type for the Query/ValidatorDelegations RPC method default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -11489,9 +14069,176 @@ paths: properties: type_url: type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. value: type: string format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } parameters: - name: validator_addr description: validator_addr defines the validator address to query for. @@ -11544,15 +14291,14 @@ paths: in: query required: false type: boolean - format: boolean tags: - Query - ? "/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr}" - : get: + '/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr}': + get: summary: Delegation queries delegate info for given validator delegator pair. operationId: Delegation responses: - "200": + '200': description: A successful response. schema: type: object @@ -11599,7 +14345,7 @@ paths: QueryDelegationResponse is response type for the Query/Delegation RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -11617,9 +14363,176 @@ paths: properties: type_url: type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. value: type: string format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } parameters: - name: validator_addr description: validator_addr defines the validator address to query for. @@ -11633,14 +14546,14 @@ paths: type: string tags: - Query - ? "/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr}/unbonding_delegation" - : get: + '/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr}/unbonding_delegation': + get: summary: |- UnbondingDelegation queries unbonding info for given validator delegator pair. operationId: UnbondingDelegation responses: - "200": + '200': description: A successful response. schema: type: object @@ -11677,7 +14590,7 @@ paths: RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -11695,9 +14608,176 @@ paths: properties: type_url: type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. value: type: string format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } parameters: - name: validator_addr description: validator_addr defines the validator address to query for. @@ -11711,14 +14791,14 @@ paths: type: string tags: - Query - "/cosmos/staking/v1beta1/validators/{validator_addr}/unbonding_delegations": + '/cosmos/staking/v1beta1/validators/{validator_addr}/unbonding_delegations': get: summary: >- ValidatorUnbondingDelegations queries unbonding delegations of a validator. operationId: ValidatorUnbondingDelegations responses: - "200": + '200': description: A successful response. schema: type: object @@ -11779,7 +14859,7 @@ paths: Query/ValidatorUnbondingDelegations RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -11797,9 +14877,176 @@ paths: properties: type_url: type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. value: type: string format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } parameters: - name: validator_addr description: validator_addr defines the validator address to query for. @@ -11852,15 +15099,14 @@ paths: in: query required: false type: boolean - format: boolean tags: - Query - "/cosmos/upgrade/v1beta1/applied_plan/{name}": + '/cosmos/upgrade/v1beta1/applied_plan/{name}': get: summary: AppliedPlan queries a previously applied upgrade plan by its name. operationId: AppliedPlan responses: - "200": + '200': description: A successful response. schema: type: object @@ -11875,7 +15121,7 @@ paths: method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -11893,9 +15139,176 @@ paths: properties: type_url: type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. value: type: string format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } parameters: - name: name description: name is the name of the applied plan to query for. @@ -11909,7 +15322,7 @@ paths: summary: CurrentPlan queries the current upgrade plan. operationId: CurrentPlan responses: - "200": + '200': description: A successful response. schema: type: object @@ -11962,13 +15375,202 @@ paths: such as a git commit that validators could automatically upgrade to + upgraded_client_state: + title: >- + IBC-enabled chains can opt-in to including the upgraded + client state in its upgrade plan + + This will make the chain commit to the correct upgraded + (self) client state before the upgrade occurs, + + so that connecting chains can verify that the new upgraded + client is valid by verifying a proof on the + + previous version of the chain. + + This will allow IBC connections to persist smoothly across + planned chain upgrades + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type + of the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be + in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can + optionally set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results + based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty + scheme) might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the + above specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any + values in the form + + of utility functions or additional generated methods of + the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and + the unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will + yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a + custom JSON + + representation, that representation will be embedded + adding a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } description: >- QueryCurrentPlanResponse is the response type for the Query/CurrentPlan RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -11986,9 +15588,176 @@ paths: properties: type_url: type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. value: type: string format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } tags: - Query /ibc/channel/v1beta1/channels: @@ -11996,7 +15765,7 @@ paths: summary: Channels queries all the IBC channels of a chain. operationId: Channels responses: - "200": + '200': description: A successful response. schema: type: object @@ -12131,15 +15900,16 @@ paths: height in certain conditions e.g. hard forks, state-machine breaking changes - In these cases, the version number is incremented so that height - continues to + In these cases, the version number is incremented so that + height continues to - be monitonically increasing even as the VersionHeight gets reset + be monitonically increasing even as the VersionHeight gets + reset description: >- QueryChannelsResponse is the response type for the Query/Channels RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -12374,15 +16144,14 @@ paths: in: query required: false type: boolean - format: boolean tags: - Query - "/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}": + '/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}': get: summary: Channel queries an IBC Channel. operationId: Channel responses: - "200": + '200': description: A successful response. schema: type: object @@ -12465,9 +16234,6 @@ paths: type: string format: byte title: merkle proof of existence - proof_path: - type: string - title: merkle proof path proof_height: title: height at which the proof was retrieved type: object @@ -12490,10 +16256,11 @@ paths: height in certain conditions e.g. hard forks, state-machine breaking changes - In these cases, the version number is incremented so that height - continues to + In these cases, the version number is incremented so that + height continues to - be monitonically increasing even as the VersionHeight gets reset + be monitonically increasing even as the VersionHeight gets + reset description: >- QueryChannelResponse is the response type for the Query/Channel RPC method. @@ -12503,7 +16270,7 @@ paths: proof was retrieved. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -12704,7 +16471,7 @@ paths: type: string tags: - Query - "/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/client_state": + '/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/client_state': get: summary: >- ChannelClientState queries for the client state for the channel @@ -12713,7 +16480,7 @@ paths: with the provided channel identifiers. operationId: ChannelClientState responses: - "200": + '200': description: A successful response. schema: type: object @@ -12910,9 +16677,6 @@ paths: type: string format: byte title: merkle proof of existence - proof_path: - type: string - title: merkle proof path proof_height: title: height at which the proof was retrieved type: object @@ -12935,15 +16699,16 @@ paths: height in certain conditions e.g. hard forks, state-machine breaking changes - In these cases, the version number is incremented so that height - continues to + In these cases, the version number is incremented so that + height continues to - be monitonically increasing even as the VersionHeight gets reset + be monitonically increasing even as the VersionHeight gets + reset title: |- QueryChannelClientStateResponse is the Response type for the Query/QueryChannelClientState RPC method default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -13144,14 +16909,14 @@ paths: type: string tags: - Query - ? "/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/consensus_state/version/{version_number}/height/{version_height}" - : get: + '/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/consensus_state/version/{version_number}/height/{version_height}': + get: summary: |- ChannelConsensusState queries for the consensus state for the channel associated with the provided channel identifiers. operationId: ChannelConsensusState responses: - "200": + '200': description: A successful response. schema: type: object @@ -13335,9 +17100,6 @@ paths: type: string format: byte title: merkle proof of existence - proof_path: - type: string - title: merkle proof path proof_height: title: height at which the proof was retrieved type: object @@ -13360,15 +17122,16 @@ paths: height in certain conditions e.g. hard forks, state-machine breaking changes - In these cases, the version number is incremented so that height - continues to + In these cases, the version number is incremented so that + height continues to - be monitonically increasing even as the VersionHeight gets reset + be monitonically increasing even as the VersionHeight gets + reset title: |- QueryChannelClientStateResponse is the Response type for the Query/QueryChannelClientState RPC method default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -13581,14 +17344,14 @@ paths: format: uint64 tags: - Query - "/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/next_sequence": + '/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/next_sequence': get: summary: >- NextSequenceReceive returns the next receive sequence for a given channel. operationId: NextSequenceReceive responses: - "200": + '200': description: A successful response. schema: type: object @@ -13601,9 +17364,6 @@ paths: type: string format: byte title: merkle proof of existence - proof_path: - type: string - title: merkle proof path proof_height: title: height at which the proof was retrieved type: object @@ -13626,15 +17386,16 @@ paths: height in certain conditions e.g. hard forks, state-machine breaking changes - In these cases, the version number is incremented so that height - continues to + In these cases, the version number is incremented so that + height continues to - be monitonically increasing even as the VersionHeight gets reset + be monitonically increasing even as the VersionHeight gets + reset title: |- QuerySequenceResponse is the request type for the Query/QueryNextSequenceReceiveResponse RPC method default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -13835,284 +17596,21 @@ paths: type: string tags: - Query - ? "/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_acks/{sequence}" - : get: - summary: PacketAcknowledgement queries a stored packet acknowledgement hash. - operationId: PacketAcknowledgement - responses: - "200": - description: A successful response. - schema: - type: object - properties: - acknowledgement: - type: string - format: byte - title: packet associated with the request fields - proof: - type: string - format: byte - title: merkle proof of existence - proof_path: - type: string - title: merkle proof path - proof_height: - title: height at which the proof was retrieved - type: object - properties: - version_number: - type: string - format: uint64 - title: the version that the client is currently on - version_height: - type: string - format: uint64 - title: the height within the given version - description: >- - Normally the VersionHeight is incremented at each height while - keeping version - - number the same However some consensus algorithms may choose - to reset the - - height in certain conditions e.g. hard forks, state-machine - breaking changes - - In these cases, the version number is incremented so that height - continues to - - be monitonically increasing even as the VersionHeight gets reset - title: >- - QueryPacketAcknowledgementResponse defines the client query - response for a - - packet which also includes a proof, its path and the height form - which the - - proof was retrieved - default: - description: An unexpected error response - schema: - type: object - properties: - error: - type: string - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the type of - the serialized - - protocol buffer message. This string must contain at - least - - one "/" character. The last segment of the URL's path - must represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in - a canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary - all types that they - - expect it to use in the context of Any. However, for - URLs which use the - - scheme `http`, `https`, or no scheme, one can optionally - set up a type - - server that maps type URLs to message definitions as - follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based - on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in - the official - - protobuf release, and it is not used for type URLs - beginning with - - type.googleapis.com. - - - Schemes other than `http`, `https` (or the empty scheme) - might be - - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the above - specified type. - description: >- - `Any` contains an arbitrary serialized protocol buffer - message along with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any values - in the form - - of utility functions or additional generated methods of the - Any type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by - default use - - 'type.googleapis.com/full.type.name' as the type URL and the - unpack - - methods only use the fully qualified type name after the - last '/' - - in the type URL, for example "foo.bar.com/x/y.z" will yield - type - - name "y.z". - - - - JSON - - ==== - - The JSON representation of an `Any` value uses the regular - - representation of the deserialized, embedded message, with - an - - additional field `@type` which contains the type URL. - Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a custom - JSON - - representation, that representation will be embedded adding - a field - - `value` which holds the custom JSON in addition to the - `@type` - - field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - parameters: - - name: channel_id - description: channel unique identifier - in: path - required: true - type: string - - name: port_id - description: port unique identifier - in: path - required: true - type: string - - name: sequence - description: packet sequence - in: path - required: true - type: string - format: uint64 - tags: - - Query - ? "/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_commitments" - : get: + '/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_acknowledgements': + get: summary: >- - PacketCommitments returns the all the packet commitments hashes + PacketAcknowledgements returns all the packet acknowledgements associated with a channel. - operationId: PacketCommitments + operationId: PacketAcknowledgements responses: - "200": + '200': description: A successful response. schema: type: object properties: - commitments: + acknowledgements: type: array items: type: object @@ -14127,15 +17625,20 @@ paths: type: string format: uint64 description: packet sequence. - hash: + data: type: string format: byte - description: packet commitment hash. + description: embedded data that represents packet state. description: >- - PacketAckCommitment defines the genesis type necessary to - retrieve and store + PacketState defines the generic type necessary to retrieve + and store - acknowlegements. + packet commitments, acknowledgements, and receipts. + + Caller is responsible for knowing the context necessary to + interpret this + + state as a commitment, acknowledgement, or a receipt. pagination: title: pagination response type: object @@ -14186,15 +17689,16 @@ paths: height in certain conditions e.g. hard forks, state-machine breaking changes - In these cases, the version number is incremented so that height - continues to + In these cases, the version number is incremented so that + height continues to - be monitonically increasing even as the VersionHeight gets reset + be monitonically increasing even as the VersionHeight gets + reset title: |- - QueryPacketCommitmentsResponse is the request type for the - Query/QueryPacketCommitments RPC method + QueryPacketAcknowledgemetsResponse is the request type for the + Query/QueryPacketAcknowledgements RPC method default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -14439,19 +17943,887 @@ paths: in: query required: false type: boolean - format: boolean tags: - Query - ? "/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_commitments/{packet_commitment_sequences}/unreceived_packets" - : get: + '/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_acks/{sequence}': + get: + summary: PacketAcknowledgement queries a stored packet acknowledgement hash. + operationId: PacketAcknowledgement + responses: + '200': + description: A successful response. + schema: + type: object + properties: + acknowledgement: + type: string + format: byte + title: packet associated with the request fields + proof: + type: string + format: byte + title: merkle proof of existence + proof_height: + title: height at which the proof was retrieved + type: object + properties: + version_number: + type: string + format: uint64 + title: the version that the client is currently on + version_height: + type: string + format: uint64 + title: the height within the given version + description: >- + Normally the VersionHeight is incremented at each height while + keeping version + + number the same However some consensus algorithms may choose + to reset the + + height in certain conditions e.g. hard forks, state-machine + breaking changes + + In these cases, the version number is incremented so that + height continues to + + be monitonically increasing even as the VersionHeight gets + reset + title: >- + QueryPacketAcknowledgementResponse defines the client query + response for a + + packet which also includes a proof and the height from which the + + proof was retrieved + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: channel_id + description: channel unique identifier + in: path + required: true + type: string + - name: port_id + description: port unique identifier + in: path + required: true + type: string + - name: sequence + description: packet sequence + in: path + required: true + type: string + format: uint64 + tags: + - Query + '/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_commitments': + get: + summary: |- + PacketCommitments returns all the packet commitments hashes associated + with a channel. + operationId: PacketCommitments + responses: + '200': + description: A successful response. + schema: + type: object + properties: + commitments: + type: array + items: + type: object + properties: + port_id: + type: string + description: channel port identifier. + channel_id: + type: string + description: channel unique identifier. + sequence: + type: string + format: uint64 + description: packet sequence. + data: + type: string + format: byte + description: embedded data that represents packet state. + description: >- + PacketState defines the generic type necessary to retrieve + and store + + packet commitments, acknowledgements, and receipts. + + Caller is responsible for knowing the context necessary to + interpret this + + state as a commitment, acknowledgement, or a receipt. + pagination: + title: pagination response + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + PageResponse is to be embedded in gRPC response messages where + the + + corresponding request message has used PageRequest. + + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + height: + title: query block height + type: object + properties: + version_number: + type: string + format: uint64 + title: the version that the client is currently on + version_height: + type: string + format: uint64 + title: the height within the given version + description: >- + Normally the VersionHeight is incremented at each height while + keeping version + + number the same However some consensus algorithms may choose + to reset the + + height in certain conditions e.g. hard forks, state-machine + breaking changes + + In these cases, the version number is incremented so that + height continues to + + be monitonically increasing even as the VersionHeight gets + reset + title: |- + QueryPacketCommitmentsResponse is the request type for the + Query/QueryPacketCommitments RPC method + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: channel_id + description: channel unique identifier + in: path + required: true + type: string + - name: port_id + description: port unique identifier + in: path + required: true + type: string + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + type: string + format: byte + - name: pagination.offset + description: >- + offset is a numeric offset that can be used when key is unavailable. + + It is less efficient than using key. Only one of offset or key + should + + be set. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + limit is the total number of results to be returned in the result + page. + + If left empty it will default to a value to be set by each app. + in: query + required: false + type: string + format: uint64 + - name: pagination.count_total + description: >- + count_total is set to true to indicate that the result set should + include + + a count of the total number of items available for pagination in + UIs. + + count_total is only respected when offset is used. It is ignored + when key + + is set. + in: query + required: false + type: boolean + tags: + - Query + '/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_commitments/{packet_ack_sequences}/unreceived_acks': + get: summary: >- - UnreceivedPackets returns all the unrelayed IBC packets associated with + UnreceivedAcks returns all the unreceived IBC acknowledgements + associated with a + + channel and sequences. + operationId: UnreceivedAcks + responses: + '200': + description: A successful response. + schema: + type: object + properties: + sequences: + type: array + items: + type: string + format: uint64 + title: list of unreceived acknowledgement sequences + height: + title: query block height + type: object + properties: + version_number: + type: string + format: uint64 + title: the version that the client is currently on + version_height: + type: string + format: uint64 + title: the height within the given version + description: >- + Normally the VersionHeight is incremented at each height while + keeping version + + number the same However some consensus algorithms may choose + to reset the + + height in certain conditions e.g. hard forks, state-machine + breaking changes + + In these cases, the version number is incremented so that + height continues to + + be monitonically increasing even as the VersionHeight gets + reset + title: |- + QueryUnreceivedAcksResponse is the response type for the + Query/UnreceivedAcks RPC method + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: channel_id + description: channel unique identifier + in: path + required: true + type: string + - name: port_id + description: port unique identifier + in: path + required: true + type: string + - name: packet_ack_sequences + description: list of acknowledgement sequences + in: path + required: true + type: array + items: + type: string + format: uint64 + collectionFormat: csv + minItems: 1 + tags: + - Query + '/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_commitments/{packet_commitment_sequences}/unreceived_packets': + get: + summary: >- + UnreceivedPackets returns all the unreceived IBC packets associated with a channel and sequences. operationId: UnreceivedPackets responses: - "200": + '200': description: A successful response. schema: type: object @@ -14484,15 +18856,16 @@ paths: height in certain conditions e.g. hard forks, state-machine breaking changes - In these cases, the version number is incremented so that height - continues to + In these cases, the version number is incremented so that + height continues to - be monitonically increasing even as the VersionHeight gets reset + be monitonically increasing even as the VersionHeight gets + reset title: |- QueryUnreceivedPacketsResponse is the response type for the Query/UnreceivedPacketCommitments RPC method default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -14703,273 +19076,12 @@ paths: minItems: 1 tags: - Query - ? "/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_commitments/{packet_commitment_sequences}/unrelayed_acks" - : get: - summary: >- - UnrelayedAcks returns all the unrelayed IBC acknowledgements associated - with a - - channel and sequences. - operationId: UnrelayedAcks - responses: - "200": - description: A successful response. - schema: - type: object - properties: - sequences: - type: array - items: - type: string - format: uint64 - title: list of unrelayed acknowledgement sequences - height: - title: query block height - type: object - properties: - version_number: - type: string - format: uint64 - title: the version that the client is currently on - version_height: - type: string - format: uint64 - title: the height within the given version - description: >- - Normally the VersionHeight is incremented at each height while - keeping version - - number the same However some consensus algorithms may choose - to reset the - - height in certain conditions e.g. hard forks, state-machine - breaking changes - - In these cases, the version number is incremented so that height - continues to - - be monitonically increasing even as the VersionHeight gets reset - title: |- - QueryUnrelayedAcksResponse is the response type for the - Query/UnrelayedAcks RPC method - default: - description: An unexpected error response - schema: - type: object - properties: - error: - type: string - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the type of - the serialized - - protocol buffer message. This string must contain at - least - - one "/" character. The last segment of the URL's path - must represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in - a canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary - all types that they - - expect it to use in the context of Any. However, for - URLs which use the - - scheme `http`, `https`, or no scheme, one can optionally - set up a type - - server that maps type URLs to message definitions as - follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based - on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in - the official - - protobuf release, and it is not used for type URLs - beginning with - - type.googleapis.com. - - - Schemes other than `http`, `https` (or the empty scheme) - might be - - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the above - specified type. - description: >- - `Any` contains an arbitrary serialized protocol buffer - message along with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any values - in the form - - of utility functions or additional generated methods of the - Any type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by - default use - - 'type.googleapis.com/full.type.name' as the type URL and the - unpack - - methods only use the fully qualified type name after the - last '/' - - in the type URL, for example "foo.bar.com/x/y.z" will yield - type - - name "y.z". - - - - JSON - - ==== - - The JSON representation of an `Any` value uses the regular - - representation of the deserialized, embedded message, with - an - - additional field `@type` which contains the type URL. - Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a custom - JSON - - representation, that representation will be embedded adding - a field - - `value` which holds the custom JSON in addition to the - `@type` - - field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - parameters: - - name: channel_id - description: channel unique identifier - in: path - required: true - type: string - - name: port_id - description: port unique identifier - in: path - required: true - type: string - - name: packet_commitment_sequences - description: list of commitment sequences - in: path - required: true - type: array - items: - type: string - format: uint64 - collectionFormat: csv - minItems: 1 - tags: - - Query - ? "/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_commitments/{sequence}" - : get: + '/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_commitments/{sequence}': + get: summary: PacketCommitment queries a stored packet commitment hash. operationId: PacketCommitment responses: - "200": + '200': description: A successful response. schema: type: object @@ -14982,9 +19094,6 @@ paths: type: string format: byte title: merkle proof of existence - proof_path: - type: string - title: merkle proof path proof_height: title: height at which the proof was retrieved type: object @@ -15007,20 +19116,21 @@ paths: height in certain conditions e.g. hard forks, state-machine breaking changes - In these cases, the version number is incremented so that height - continues to + In these cases, the version number is incremented so that + height continues to - be monitonically increasing even as the VersionHeight gets reset + be monitonically increasing even as the VersionHeight gets + reset title: >- QueryPacketCommitmentResponse defines the client query response for a packet - which also includes a proof, its path and the height form which - the proof was + which also includes a proof and the height from which the proof + was retrieved default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -15227,14 +19337,276 @@ paths: format: uint64 tags: - Query - "/ibc/channel/v1beta1/connections/{connection}/channels": + '/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_receipts/{sequence}': + get: + summary: >- + PacketReceipt queries if a given packet sequence has been received on + the queried chain + operationId: PacketReceipt + responses: + '200': + description: A successful response. + schema: + type: object + properties: + received: + type: boolean + title: success flag for if receipt exists + proof: + type: string + format: byte + title: merkle proof of existence + proof_height: + title: height at which the proof was retrieved + type: object + properties: + version_number: + type: string + format: uint64 + title: the version that the client is currently on + version_height: + type: string + format: uint64 + title: the height within the given version + description: >- + Normally the VersionHeight is incremented at each height while + keeping version + + number the same However some consensus algorithms may choose + to reset the + + height in certain conditions e.g. hard forks, state-machine + breaking changes + + In these cases, the version number is incremented so that + height continues to + + be monitonically increasing even as the VersionHeight gets + reset + title: >- + QueryPacketReceiptResponse defines the client query response for a + packet receipt + + which also includes a proof, and the height from which the proof + was + + retrieved + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: channel_id + description: channel unique identifier + in: path + required: true + type: string + - name: port_id + description: port unique identifier + in: path + required: true + type: string + - name: sequence + description: packet sequence + in: path + required: true + type: string + format: uint64 + tags: + - Query + '/ibc/channel/v1beta1/connections/{connection}/channels': get: summary: |- ConnectionChannels queries all the channels associated with a connection end. operationId: ConnectionChannels responses: - "200": + '200': description: A successful response. schema: type: object @@ -15369,15 +19741,16 @@ paths: height in certain conditions e.g. hard forks, state-machine breaking changes - In these cases, the version number is incremented so that height - continues to + In these cases, the version number is incremented so that + height continues to - be monitonically increasing even as the VersionHeight gets reset + be monitonically increasing even as the VersionHeight gets + reset title: |- QueryConnectionChannelsResponse is the Response type for the Query/QueryConnectionChannels RPC method default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -15617,7 +19990,6 @@ paths: in: query required: false type: boolean - format: boolean tags: - Query /ibc/client/v1beta1/client_states: @@ -15625,7 +19997,7 @@ paths: summary: ClientStates queries all the IBC light clients of a chain. operationId: ClientStates responses: - "200": + '200': description: A successful response. schema: type: object @@ -15856,7 +20228,7 @@ paths: method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -16091,15 +20463,14 @@ paths: in: query required: false type: boolean - format: boolean tags: - Query - "/ibc/client/v1beta1/client_states/{client_id}": + '/ibc/client/v1beta1/client_states/{client_id}': get: summary: ClientState queries an IBC light client. operationId: ClientState responses: - "200": + '200': description: A successful response. schema: type: object @@ -16280,9 +20651,6 @@ paths: type: string format: byte title: merkle proof of existence - proof_path: - type: string - title: merkle proof path proof_height: title: height at which the proof was retrieved type: object @@ -16305,10 +20673,11 @@ paths: height in certain conditions e.g. hard forks, state-machine breaking changes - In these cases, the version number is incremented so that height - continues to + In these cases, the version number is incremented so that + height continues to - be monitonically increasing even as the VersionHeight gets reset + be monitonically increasing even as the VersionHeight gets + reset description: >- QueryClientStateResponse is the response type for the Query/ClientState RPC @@ -16318,7 +20687,7 @@ paths: which the proof was retrieved. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -16514,14 +20883,14 @@ paths: type: string tags: - Query - "/ibc/client/v1beta1/consensus_states/{client_id}": + '/ibc/client/v1beta1/consensus_states/{client_id}': get: summary: |- ConsensusStates queries all the consensus state associated with a given client. operationId: ConsensusStates responses: - "200": + '200': description: A successful response. schema: type: object @@ -16553,11 +20922,11 @@ paths: height in certain conditions e.g. hard forks, state-machine breaking changes - In these cases, the version number is incremented so that - height continues to + In these cases, the version number is incremented so + that height continues to - be monitonically increasing even as the VersionHeight gets - reset + be monitonically increasing even as the VersionHeight + gets reset consensus_state: title: consensus state type: object @@ -16772,7 +21141,7 @@ paths: QueryConsensusStatesResponse is the response type for the Query/ConsensusStates RPC method default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -17012,11 +21381,10 @@ paths: in: query required: false type: boolean - format: boolean tags: - Query - ? "/ibc/client/v1beta1/consensus_states/{client_id}/version/{version_number}/height/{version_height}" - : get: + '/ibc/client/v1beta1/consensus_states/{client_id}/version/{version_number}/height/{version_height}': + get: summary: >- ConsensusState queries a consensus state associated with a client state at @@ -17024,7 +21392,7 @@ paths: a given height. operationId: ConsensusState responses: - "200": + '200': description: A successful response. schema: type: object @@ -17207,9 +21575,6 @@ paths: type: string format: byte title: merkle proof of existence - proof_path: - type: string - title: merkle proof path proof_height: title: height at which the proof was retrieved type: object @@ -17232,17 +21597,18 @@ paths: height in certain conditions e.g. hard forks, state-machine breaking changes - In these cases, the version number is incremented so that height - continues to + In these cases, the version number is incremented so that + height continues to - be monitonically increasing even as the VersionHeight gets reset + be monitonically increasing even as the VersionHeight gets + reset title: >- QueryConsensusStateResponse is the response type for the Query/ConsensusState RPC method default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -17457,17 +21823,16 @@ paths: in: query required: false type: boolean - format: boolean tags: - Query - "/ibc/connection/v1beta1/client_connections/{client_id}": + '/ibc/connection/v1beta1/client_connections/{client_id}': get: summary: |- ClientConnections queries the connection paths associated with a client state. operationId: ClientConnections responses: - "200": + '200': description: A successful response. schema: type: object @@ -17481,9 +21846,6 @@ paths: type: string format: byte title: merkle proof of existence - proof_path: - type: string - title: merkle proof path proof_height: title: height at which the proof was generated type: object @@ -17506,15 +21868,16 @@ paths: height in certain conditions e.g. hard forks, state-machine breaking changes - In these cases, the version number is incremented so that height - continues to + In these cases, the version number is incremented so that + height continues to - be monitonically increasing even as the VersionHeight gets reset + be monitonically increasing even as the VersionHeight gets + reset title: |- QueryClientConnectionsResponse is the response type for the Query/ClientConnections RPC method default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -17715,7 +22078,7 @@ paths: summary: Connections queries all the IBC connections of a chain. operationId: Connections responses: - "200": + '200': description: A successful response. schema: type: object @@ -17734,7 +22097,23 @@ paths: versions: type: array items: - type: string + type: object + properties: + identifier: + type: string + title: unique version identifier + features: + type: array + items: + type: string + title: >- + list of features compatible with the specified + identifier + description: >- + Version defines the versioning scheme used to + negotiate the IBC verison in + + the connection handshake. title: >- IBC version which can be utilised to determine encodings or protocols for @@ -17830,17 +22209,18 @@ paths: height in certain conditions e.g. hard forks, state-machine breaking changes - In these cases, the version number is incremented so that height - continues to + In these cases, the version number is incremented so that + height continues to - be monitonically increasing even as the VersionHeight gets reset + be monitonically increasing even as the VersionHeight gets + reset description: >- QueryConnectionsResponse is the response type for the Query/Connections RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -18075,15 +22455,14 @@ paths: in: query required: false type: boolean - format: boolean tags: - Query - "/ibc/connection/v1beta1/connections/{connection_id}": + '/ibc/connection/v1beta1/connections/{connection_id}': get: summary: Connection queries an IBC connection end. operationId: Connection responses: - "200": + '200': description: A successful response. schema: type: object @@ -18098,7 +22477,23 @@ paths: versions: type: array items: - type: string + type: object + properties: + identifier: + type: string + title: unique version identifier + features: + type: array + items: + type: string + title: >- + list of features compatible with the specified + identifier + description: >- + Version defines the versioning scheme used to negotiate + the IBC verison in + + the connection handshake. title: >- IBC version which can be utilised to determine encodings or protocols for @@ -18150,9 +22545,6 @@ paths: type: string format: byte title: merkle proof of existence - proof_path: - type: string - title: merkle proof path proof_height: title: height at which the proof was retrieved type: object @@ -18175,10 +22567,11 @@ paths: height in certain conditions e.g. hard forks, state-machine breaking changes - In these cases, the version number is incremented so that height - continues to + In these cases, the version number is incremented so that + height continues to - be monitonically increasing even as the VersionHeight gets reset + be monitonically increasing even as the VersionHeight gets + reset description: >- QueryConnectionResponse is the response type for the Query/Connection RPC @@ -18188,7 +22581,7 @@ paths: which the proof was retrieved. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -18384,14 +22777,14 @@ paths: type: string tags: - Query - "/ibc/connection/v1beta1/connections/{connection_id}/client_state": + '/ibc/connection/v1beta1/connections/{connection_id}/client_state': get: summary: |- ConnectionClientState queries the client state associated with the connection. operationId: ConnectionClientState responses: - "200": + '200': description: A successful response. schema: type: object @@ -18588,9 +22981,6 @@ paths: type: string format: byte title: merkle proof of existence - proof_path: - type: string - title: merkle proof path proof_height: title: height at which the proof was retrieved type: object @@ -18613,15 +23003,16 @@ paths: height in certain conditions e.g. hard forks, state-machine breaking changes - In these cases, the version number is incremented so that height - continues to + In these cases, the version number is incremented so that + height continues to - be monitonically increasing even as the VersionHeight gets reset + be monitonically increasing even as the VersionHeight gets + reset title: |- QueryConnectionClientStateResponse is the response type for the Query/ConnectionClientState RPC method default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -18817,14 +23208,14 @@ paths: type: string tags: - Query - ? "/ibc/connection/v1beta1/connections/{connection_id}/consensus_state/version/{version_number}/height/{version_height}" - : get: + '/ibc/connection/v1beta1/connections/{connection_id}/consensus_state/version/{version_number}/height/{version_height}': + get: summary: |- ConnectionConsensusState queries the consensus state associated with the connection. operationId: ConnectionConsensusState responses: - "200": + '200': description: A successful response. schema: type: object @@ -19008,9 +23399,6 @@ paths: type: string format: byte title: merkle proof of existence - proof_path: - type: string - title: merkle proof path proof_height: title: height at which the proof was retrieved type: object @@ -19033,15 +23421,16 @@ paths: height in certain conditions e.g. hard forks, state-machine breaking changes - In these cases, the version number is incremented so that height - continues to + In these cases, the version number is incremented so that + height continues to - be monitonically increasing even as the VersionHeight gets reset + be monitonically increasing even as the VersionHeight gets + reset title: |- QueryConnectionConsensusStateResponse is the response type for the Query/ConnectionConsensusState RPC method default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -19252,7 +23641,7 @@ paths: summary: DenomTraces queries all denomination traces. operationId: DenomTraces responses: - "200": + '200': description: A successful response. schema: type: object @@ -19302,7 +23691,7 @@ paths: method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -19320,176 +23709,9 @@ paths: properties: type_url: type: string - description: >- - A URL/resource name that uniquely identifies the type of - the serialized - - protocol buffer message. This string must contain at - least - - one "/" character. The last segment of the URL's path - must represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in - a canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary - all types that they - - expect it to use in the context of Any. However, for - URLs which use the - - scheme `http`, `https`, or no scheme, one can optionally - set up a type - - server that maps type URLs to message definitions as - follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based - on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in - the official - - protobuf release, and it is not used for type URLs - beginning with - - type.googleapis.com. - - - Schemes other than `http`, `https` (or the empty scheme) - might be - - used with implementation specific semantics. value: type: string format: byte - description: >- - Must be a valid serialized protocol buffer of the above - specified type. - description: >- - `Any` contains an arbitrary serialized protocol buffer - message along with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any values - in the form - - of utility functions or additional generated methods of the - Any type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by - default use - - 'type.googleapis.com/full.type.name' as the type URL and the - unpack - - methods only use the fully qualified type name after the - last '/' - - in the type URL, for example "foo.bar.com/x/y.z" will yield - type - - name "y.z". - - - - JSON - - ==== - - The JSON representation of an `Any` value uses the regular - - representation of the deserialized, embedded message, with - an - - additional field `@type` which contains the type URL. - Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a custom - JSON - - representation, that representation will be embedded adding - a field - - `value` which holds the custom JSON in addition to the - `@type` - - field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } parameters: - name: pagination.key description: |- @@ -19537,15 +23759,14 @@ paths: in: query required: false type: boolean - format: boolean tags: - Query - "/ibc_transfer/v1beta1/denom_traces/{hash}": + '/ibc_transfer/v1beta1/denom_traces/{hash}': get: summary: DenomTrace queries a denomination trace information. operationId: DenomTrace responses: - "200": + '200': description: A successful response. schema: type: object @@ -19572,7 +23793,7 @@ paths: method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -19590,176 +23811,9 @@ paths: properties: type_url: type: string - description: >- - A URL/resource name that uniquely identifies the type of - the serialized - - protocol buffer message. This string must contain at - least - - one "/" character. The last segment of the URL's path - must represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in - a canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary - all types that they - - expect it to use in the context of Any. However, for - URLs which use the - - scheme `http`, `https`, or no scheme, one can optionally - set up a type - - server that maps type URLs to message definitions as - follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based - on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in - the official - - protobuf release, and it is not used for type URLs - beginning with - - type.googleapis.com. - - - Schemes other than `http`, `https` (or the empty scheme) - might be - - used with implementation specific semantics. value: type: string format: byte - description: >- - Must be a valid serialized protocol buffer of the above - specified type. - description: >- - `Any` contains an arbitrary serialized protocol buffer - message along with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any values - in the form - - of utility functions or additional generated methods of the - Any type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by - default use - - 'type.googleapis.com/full.type.name' as the type URL and the - unpack - - methods only use the fully qualified type name after the - last '/' - - in the type URL, for example "foo.bar.com/x/y.z" will yield - type - - name "y.z". - - - - JSON - - ==== - - The JSON representation of an `Any` value uses the regular - - representation of the deserialized, embedded message, with - an - - additional field `@type` which contains the type URL. - Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a custom - JSON - - representation, that representation will be embedded adding - a field - - `value` which holds the custom JSON in addition to the - `@type` - - field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } parameters: - name: hash description: hash (in hex format) of the denomination trace information. @@ -19773,7 +23827,7 @@ paths: summary: Params queries all parameters of the ibc-transfer module. operationId: IBCTransferParams responses: - "200": + '200': description: A successful response. schema: type: object @@ -19784,7 +23838,6 @@ paths: properties: send_enabled: type: boolean - format: boolean description: >- send_enabled enables or disables all cross-chain token transfers from this @@ -19792,7 +23845,6 @@ paths: chain. receive_enabled: type: boolean - format: boolean description: >- receive_enabled enables or disables all cross-chain token transfers to this @@ -19802,7 +23854,7 @@ paths: QueryParamsResponse is the response type for the Query/Params RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -19820,176 +23872,9 @@ paths: properties: type_url: type: string - description: >- - A URL/resource name that uniquely identifies the type of - the serialized - - protocol buffer message. This string must contain at - least - - one "/" character. The last segment of the URL's path - must represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in - a canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary - all types that they - - expect it to use in the context of Any. However, for - URLs which use the - - scheme `http`, `https`, or no scheme, one can optionally - set up a type - - server that maps type URLs to message definitions as - follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based - on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in - the official - - protobuf release, and it is not used for type URLs - beginning with - - type.googleapis.com. - - - Schemes other than `http`, `https` (or the empty scheme) - might be - - used with implementation specific semantics. value: type: string format: byte - description: >- - Must be a valid serialized protocol buffer of the above - specified type. - description: >- - `Any` contains an arbitrary serialized protocol buffer - message along with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any values - in the form - - of utility functions or additional generated methods of the - Any type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by - default use - - 'type.googleapis.com/full.type.name' as the type URL and the - unpack - - methods only use the fully qualified type name after the - last '/' - - in the type URL, for example "foo.bar.com/x/y.z" will yield - type - - name "y.z". - - - - JSON - - ==== - - The JSON representation of an `Any` value uses the regular - - representation of the deserialized, embedded message, with - an - - additional field `@type` which contains the type URL. - Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a custom - JSON - - representation, that representation will be embedded adding - a field - - `value` which holds the custom JSON in addition to the - `@type` - - field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } tags: - Query securityDefinitions: @@ -20028,8 +23913,8 @@ definitions: gas_wanted: 10000 info: info tags: - - "" - - "" + - '' + - '' DeliverTxResult: type: object properties: @@ -20062,8 +23947,8 @@ definitions: gas_wanted: 10000 info: info tags: - - "" - - "" + - '' + - '' BroadcastTxCommitResult: type: object properties: @@ -20099,8 +23984,8 @@ definitions: gas_wanted: 10000 info: info tags: - - "" - - "" + - '' + - '' deliver_tx: type: object properties: @@ -20133,8 +24018,8 @@ definitions: gas_wanted: 10000 info: info tags: - - "" - - "" + - '' + - '' hash: type: string example: EE5F3404034C524501629B56E0DDC38FAD651F04 @@ -20165,7 +24050,7 @@ definitions: example: stake amount: type: string - example: "50" + example: '50' Hash: type: string example: EE5F3404034C524501629B56E0DDC38FAD651F04 @@ -20200,7 +24085,7 @@ definitions: example: stake amount: type: string - example: "50" + example: '50' memo: type: string signature: @@ -20221,10 +24106,10 @@ definitions: example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH account_number: type: string - example: "0" + example: '0' sequence: type: string - example: "0" + example: '0' result: type: object properties: @@ -20232,10 +24117,10 @@ definitions: type: string gas_wanted: type: string - example: "200000" + example: '200000' gas_used: type: string - example: "26354" + example: '26354' tags: type: array items: @@ -20296,7 +24181,7 @@ definitions: example: stake amount: type: string - example: "50" + example: '50' memo: type: string signature: @@ -20317,10 +24202,10 @@ definitions: example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH account_number: type: string - example: "0" + example: '0' sequence: type: string - example: "0" + example: '0' result: type: object properties: @@ -20328,10 +24213,10 @@ definitions: type: string gas_wanted: type: string - example: "200000" + example: '200000' gas_used: type: string - example: "26354" + example: '26354' tags: type: array items: @@ -20363,7 +24248,7 @@ definitions: example: stake amount: type: string - example: "50" + example: '50' memo: type: string signature: @@ -20384,10 +24269,10 @@ definitions: example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH account_number: type: string - example: "0" + example: '0' sequence: type: string - example: "0" + example: '0' BlockID: type: object properties: @@ -20414,7 +24299,7 @@ definitions: example: 1 time: type: string - example: "2017-12-30T05:53:09.287+01:00" + example: '2017-12-30T05:53:09.287+01:00' num_txs: type: number example: 0 @@ -20487,7 +24372,7 @@ definitions: example: 1 time: type: string - example: "2017-12-30T05:53:09.287+01:00" + example: '2017-12-30T05:53:09.287+01:00' num_txs: type: number example: 0 @@ -20581,16 +24466,16 @@ definitions: type: string validator_index: type: string - example: "0" + example: '0' height: type: string - example: "0" + example: '0' round: type: string - example: "0" + example: '0' timestamp: type: string - example: "2017-12-30T05:53:09.287+01:00" + example: '2017-12-30T05:53:09.287+01:00' type: type: number example: 2 @@ -20630,7 +24515,7 @@ definitions: example: 1 time: type: string - example: "2017-12-30T05:53:09.287+01:00" + example: '2017-12-30T05:53:09.287+01:00' num_txs: type: number example: 0 @@ -20718,7 +24603,7 @@ definitions: example: 1 time: type: string - example: "2017-12-30T05:53:09.287+01:00" + example: '2017-12-30T05:53:09.287+01:00' num_txs: type: number example: 0 @@ -20812,16 +24697,16 @@ definitions: type: string validator_index: type: string - example: "0" + example: '0' height: type: string - example: "0" + example: '0' round: type: string - example: "0" + example: '0' timestamp: type: string - example: "2017-12-30T05:53:09.287+01:00" + example: '2017-12-30T05:53:09.287+01:00' type: type: number example: 2 @@ -20861,7 +24746,7 @@ definitions: example: stake amount: type: string - example: "50" + example: '50' DelegatorTotalRewards: type: object properties: @@ -20884,7 +24769,7 @@ definitions: example: stake amount: type: string - example: "50" + example: '50' total: type: array items: @@ -20895,7 +24780,7 @@ definitions: example: stake amount: type: string - example: "50" + example: '50' BaseReq: type: object properties: @@ -20911,16 +24796,16 @@ definitions: example: Cosmos-Hub account_number: type: string - example: "0" + example: '0' sequence: type: string - example: "1" + example: '1' gas: type: string - example: "200000" + example: '200000' gas_adjustment: type: string - example: "1.2" + example: '1.2' fees: type: array items: @@ -20931,7 +24816,7 @@ definitions: example: stake amount: type: string - example: "50" + example: '50' simulate: type: boolean example: false @@ -20951,10 +24836,10 @@ definitions: cosmosvalconspub1zcjduepq0vu2zgkgk49efa0nqwzndanq5m4c7pa3u4apz4g2r9gspqg6g9cs3k9cuf voting_power: type: string - example: "1000" + example: '1000' proposer_priority: type: string - example: "1000" + example: '1000' TextProposal: type: object properties: @@ -20971,18 +24856,18 @@ definitions: final_tally_result: type: object properties: - "yes": + 'yes': type: string - example: "0.0000000000" + example: '0.0000000000' abstain: type: string - example: "0.0000000000" - "no": + example: '0.0000000000' + 'no': type: string - example: "0.0000000000" + example: '0.0000000000' no_with_veto: type: string - example: "0.0000000000" + example: '0.0000000000' submit_time: type: string total_deposit: @@ -20995,7 +24880,7 @@ definitions: example: stake amount: type: string - example: "50" + example: '50' voting_start_time: type: string Proposer: @@ -21018,7 +24903,7 @@ definitions: example: stake amount: type: string - example: "50" + example: '50' proposal_id: type: string depositor: @@ -21028,18 +24913,18 @@ definitions: TallyResult: type: object properties: - "yes": + 'yes': type: string - example: "0.0000000000" + example: '0.0000000000' abstain: type: string - example: "0.0000000000" - "no": + example: '0.0000000000' + 'no': type: string - example: "0.0000000000" + example: '0.0000000000' no_with_veto: type: string - example: "0.0000000000" + example: '0.0000000000' Vote: type: object properties: @@ -21083,31 +24968,31 @@ definitions: type: string bond_height: type: string - example: "0" + example: '0' bond_intra_tx_counter: type: integer example: 0 unbonding_height: type: string - example: "0" + example: '0' unbonding_time: type: string - example: "1970-01-01T00:00:00Z" + example: '1970-01-01T00:00:00Z' commission: type: object properties: rate: type: string - example: "0" + example: '0' max_rate: type: string - example: "0" + example: '0' max_change_rate: type: string - example: "0" + example: '0' update_time: type: string - example: "1970-01-01T00:00:00Z" + example: '1970-01-01T00:00:00Z' Delegation: type: object properties: @@ -21125,7 +25010,7 @@ definitions: example: stake amount: type: string - example: "50" + example: '50' UnbondingDelegationPair: type: object properties: @@ -21184,7 +25069,7 @@ definitions: entries: type: array items: - $ref: "#/definitions/Redelegation" + $ref: '#/definitions/Redelegation' RedelegationEntry: type: object properties: @@ -21215,7 +25100,7 @@ definitions: example: stake amount: type: string - example: "50" + example: '50' val_commission: type: array items: @@ -21226,7 +25111,7 @@ definitions: example: stake amount: type: string - example: "50" + example: '50' PublicKey: type: object properties: @@ -21256,7 +25141,7 @@ definitions: example: MaxValidators subkey: type: string - example: "" + example: '' value: type: object Supply: @@ -21272,7 +25157,7 @@ definitions: example: stake amount: type: string - example: "50" + example: '50' cosmos.auth.v1beta1.Params: type: object properties: @@ -21724,7 +25609,6 @@ definitions: type: string enabled: type: boolean - format: boolean description: >- SendEnabled maps coin denom to a send_enabled status (whether a denom is @@ -21732,7 +25616,6 @@ definitions: sendable). default_send_enabled: type: boolean - format: boolean description: Params defines the parameters for the bank module. cosmos.bank.v1beta1.QueryAllBalancesResponse: type: object @@ -21804,7 +25687,6 @@ definitions: type: string enabled: type: boolean - format: boolean description: >- SendEnabled maps coin denom to a send_enabled status (whether a denom is @@ -21812,7 +25694,6 @@ definitions: sendable). default_send_enabled: type: boolean - format: boolean description: Params defines the parameters for the bank module. description: >- QueryParamsResponse defines the response type for querying x/bank @@ -21861,7 +25742,6 @@ definitions: type: string enabled: type: boolean - format: boolean description: |- SendEnabled maps coin denom to a send_enabled status (whether a denom is sendable). @@ -21892,7 +25772,6 @@ definitions: If left empty it will default to a value to be set by each app. count_total: type: boolean - format: boolean description: >- count_total is set to true to indicate that the result set should include @@ -21991,7 +25870,6 @@ definitions: type: string withdraw_addr_enabled: type: boolean - format: boolean description: Params defines the set of params for the distribution module. cosmos.distribution.v1beta1.QueryCommunityPoolResponse: type: object @@ -22122,7 +26000,6 @@ definitions: type: string withdraw_addr_enabled: type: boolean - format: boolean description: QueryParamsResponse is the response type for the Query/Params RPC method. cosmos.distribution.v1beta1.QueryValidatorCommissionResponse: type: object @@ -22778,11 +26655,11 @@ definitions: final_tally_result: type: object properties: - "yes": + 'yes': type: string abstain: type: string - "no": + 'no': type: string no_with_veto: type: string @@ -23190,11 +27067,11 @@ definitions: final_tally_result: type: object properties: - "yes": + 'yes': type: string abstain: type: string - "no": + 'no': type: string no_with_veto: type: string @@ -23439,11 +27316,11 @@ definitions: final_tally_result: type: object properties: - "yes": + 'yes': type: string abstain: type: string - "no": + 'no': type: string no_with_veto: type: string @@ -23506,11 +27383,11 @@ definitions: description: tally defines the requested tally. type: object properties: - "yes": + 'yes': type: string abstain: type: string - "no": + 'no': type: string no_with_veto: type: string @@ -23627,11 +27504,11 @@ definitions: cosmos.gov.v1beta1.TallyResult: type: object properties: - "yes": + 'yes': type: string abstain: type: string - "no": + 'no': type: string no_with_veto: type: string @@ -23849,7 +27726,6 @@ definitions: title: timestamp validator cannot be unjailed until tombstoned: type: boolean - format: boolean title: >- whether or not a validator has been tombstoned (killed out of validator @@ -23893,7 +27769,6 @@ definitions: title: timestamp validator cannot be unjailed until tombstoned: type: boolean - format: boolean title: >- whether or not a validator has been tombstoned (killed out of validator @@ -23958,7 +27833,6 @@ definitions: title: timestamp validator cannot be unjailed until tombstoned: type: boolean - format: boolean title: >- whether or not a validator has been tombstoned (killed out of validator @@ -23973,6 +27847,21 @@ definitions: their liveness activity. + cosmos.staking.v1beta1.BondStatus: + type: string + enum: + - BOND_STATUS_UNSPECIFIED + - BOND_STATUS_UNBONDED + - BOND_STATUS_UNBONDING + - BOND_STATUS_BONDED + default: BOND_STATUS_UNSPECIFIED + description: |- + BondStatus is the status of a validator. + + - BOND_STATUS_UNSPECIFIED: UNSPECIFIED defines an invalid validator status. + - BOND_STATUS_UNBONDED: UNBONDED defines a validator that is not bonded. + - BOND_STATUS_UNBONDING: UNBONDING defines a validator that is unbonding. + - BOND_STATUS_BONDED: BONDED defines a validator that is bonded. cosmos.staking.v1beta1.Commission: type: object properties: @@ -24154,13 +28043,191 @@ definitions: operator_address: type: string consensus_pubkey: - type: string + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all + types that they + + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally set + up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message + along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in + the form + + of utility functions or additional generated methods of the Any + type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default + use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the last + '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a + field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } jailed: type: boolean - format: boolean status: - type: integer - format: int32 + type: string + enum: + - BOND_STATUS_UNSPECIFIED + - BOND_STATUS_UNBONDED + - BOND_STATUS_UNBONDING + - BOND_STATUS_BONDED + default: BOND_STATUS_UNSPECIFIED + description: |- + BondStatus is the status of a validator. + + - BOND_STATUS_UNSPECIFIED: UNSPECIFIED defines an invalid validator status. + - BOND_STATUS_UNBONDED: UNBONDED defines a validator that is not bonded. + - BOND_STATUS_UNBONDING: UNBONDING defines a validator that is unbonding. + - BOND_STATUS_BONDED: BONDED defines a validator that is bonded. tokens: type: string delegator_shares: @@ -24442,13 +28509,187 @@ definitions: operator_address: type: string consensus_pubkey: - type: string + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all + types that they + + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally set + up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) might + be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message + along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in the + form + + of utility functions or additional generated methods of the Any + type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a + field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } jailed: type: boolean - format: boolean status: - type: integer - format: int32 + type: string + enum: + - BOND_STATUS_UNSPECIFIED + - BOND_STATUS_UNBONDED + - BOND_STATUS_UNBONDING + - BOND_STATUS_BONDED + default: BOND_STATUS_UNSPECIFIED + description: |- + BondStatus is the status of a validator. + + - BOND_STATUS_UNSPECIFIED: UNSPECIFIED defines an invalid validator status. + - BOND_STATUS_UNBONDED: UNBONDED defines a validator that is not bonded. + - BOND_STATUS_UNBONDING: UNBONDING defines a validator that is unbonding. + - BOND_STATUS_BONDED: BONDED defines a validator that is bonded. tokens: type: string delegator_shares: @@ -24510,13 +28751,191 @@ definitions: operator_address: type: string consensus_pubkey: - type: string + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all + types that they + + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally set + up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message + along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in + the form + + of utility functions or additional generated methods of the Any + type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default + use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the last + '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a + field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } jailed: type: boolean - format: boolean status: - type: integer - format: int32 + type: string + enum: + - BOND_STATUS_UNSPECIFIED + - BOND_STATUS_UNBONDED + - BOND_STATUS_UNBONDING + - BOND_STATUS_BONDED + default: BOND_STATUS_UNSPECIFIED + description: |- + BondStatus is the status of a validator. + + - BOND_STATUS_UNSPECIFIED: UNSPECIFIED defines an invalid validator status. + - BOND_STATUS_UNBONDED: UNBONDED defines a validator that is not bonded. + - BOND_STATUS_UNBONDING: UNBONDING defines a validator that is unbonding. + - BOND_STATUS_BONDED: BONDED defines a validator that is bonded. tokens: type: string delegator_shares: @@ -24699,13 +29118,197 @@ definitions: operator_address: type: string consensus_pubkey: - type: string + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } jailed: type: boolean - format: boolean status: - type: integer - format: int32 + type: string + enum: + - BOND_STATUS_UNSPECIFIED + - BOND_STATUS_UNBONDED + - BOND_STATUS_UNBONDING + - BOND_STATUS_BONDED + default: BOND_STATUS_UNSPECIFIED + description: |- + BondStatus is the status of a validator. + + - BOND_STATUS_UNSPECIFIED: UNSPECIFIED defines an invalid validator status. + - BOND_STATUS_UNBONDED: UNBONDED defines a validator that is not bonded. + - BOND_STATUS_UNBONDING: UNBONDING defines a validator that is unbonding. + - BOND_STATUS_BONDED: BONDED defines a validator that is bonded. tokens: type: string delegator_shares: @@ -25028,13 +29631,187 @@ definitions: operator_address: type: string consensus_pubkey: - type: string + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all + types that they + + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally set + up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) might + be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message + along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in the + form + + of utility functions or additional generated methods of the Any + type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a + field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } jailed: type: boolean - format: boolean status: - type: integer - format: int32 + type: string + enum: + - BOND_STATUS_UNSPECIFIED + - BOND_STATUS_UNBONDED + - BOND_STATUS_UNBONDING + - BOND_STATUS_BONDED + default: BOND_STATUS_UNSPECIFIED + description: |- + BondStatus is the status of a validator. + + - BOND_STATUS_UNSPECIFIED: UNSPECIFIED defines an invalid validator status. + - BOND_STATUS_UNBONDED: UNBONDED defines a validator that is not bonded. + - BOND_STATUS_UNBONDING: UNBONDING defines a validator that is unbonding. + - BOND_STATUS_BONDED: BONDED defines a validator that is bonded. tokens: type: string delegator_shares: @@ -25150,13 +29927,191 @@ definitions: operator_address: type: string consensus_pubkey: - type: string + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all + types that they + + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally set + up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message + along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in + the form + + of utility functions or additional generated methods of the Any + type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default + use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the last + '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a + field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } jailed: type: boolean - format: boolean status: - type: integer - format: int32 + type: string + enum: + - BOND_STATUS_UNSPECIFIED + - BOND_STATUS_UNBONDED + - BOND_STATUS_UNBONDING + - BOND_STATUS_BONDED + default: BOND_STATUS_UNSPECIFIED + description: |- + BondStatus is the status of a validator. + + - BOND_STATUS_UNSPECIFIED: UNSPECIFIED defines an invalid validator status. + - BOND_STATUS_UNBONDED: UNBONDED defines a validator that is not bonded. + - BOND_STATUS_UNBONDING: UNBONDING defines a validator that is unbonding. + - BOND_STATUS_BONDED: BONDED defines a validator that is bonded. tokens: type: string delegator_shares: @@ -25445,13 +30400,181 @@ definitions: operator_address: type: string consensus_pubkey: - type: string + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types + that they + + expect it to use in the context of Any. However, for URLs which + use the + + scheme `http`, `https`, or no scheme, one can optionally set up a + type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above specified + type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message along + with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in the + form + + of utility functions or additional generated methods of the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } jailed: type: boolean - format: boolean status: - type: integer - format: int32 + type: string + enum: + - BOND_STATUS_UNSPECIFIED + - BOND_STATUS_UNBONDED + - BOND_STATUS_UNBONDING + - BOND_STATUS_BONDED + default: BOND_STATUS_UNSPECIFIED + description: |- + BondStatus is the status of a validator. + + - BOND_STATUS_UNSPECIFIED: UNSPECIFIED defines an invalid validator status. + - BOND_STATUS_UNBONDED: UNBONDED defines a validator that is not bonded. + - BOND_STATUS_UNBONDING: UNBONDING defines a validator that is unbonding. + - BOND_STATUS_BONDED: BONDED defines a validator that is bonded. tokens: type: string delegator_shares: @@ -25680,6 +30803,179 @@ definitions: title: |- Any application specific upgrade info to be included on-chain such as a git commit that validators could automatically upgrade to + upgraded_client_state: + title: >- + IBC-enabled chains can opt-in to including the upgraded client state + in its upgrade plan + + This will make the chain commit to the correct upgraded (self) client + state before the upgrade occurs, + + so that connecting chains can verify that the new upgraded client is + valid by verifying a proof on the + + previous version of the chain. + + This will allow IBC connections to persist smoothly across planned + chain upgrades + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types + that they + + expect it to use in the context of Any. However, for URLs which + use the + + scheme `http`, `https`, or no scheme, one can optionally set up a + type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above specified + type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message along + with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in the + form + + of utility functions or additional generated methods of the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } description: >- Plan specifies information about a planned upgrade and when it should occur. @@ -25743,12 +31039,191 @@ definitions: such as a git commit that validators could automatically upgrade to + upgraded_client_state: + title: >- + IBC-enabled chains can opt-in to including the upgraded client + state in its upgrade plan + + This will make the chain commit to the correct upgraded (self) + client state before the upgrade occurs, + + so that connecting chains can verify that the new upgraded client + is valid by verifying a proof on the + + previous version of the chain. + + This will allow IBC connections to persist smoothly across planned + chain upgrades + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all + types that they + + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally set + up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) might + be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message + along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in the + form + + of utility functions or additional generated methods of the Any + type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a + field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } description: >- QueryCurrentPlanResponse is the response type for the Query/CurrentPlan RPC method. - ibc.channel.Channel: + ibc.core.channel.v1.Channel: type: object properties: state: @@ -25806,12 +31281,12 @@ definitions: this channel will travel version: type: string - title: "opaque channel version, which is agreed upon during the handshake" + title: 'opaque channel version, which is agreed upon during the handshake' description: |- Channel defines pipeline for exactly-once packet delivery between specific modules on separate blockchains, which has at least one end capable of sending packets and one end capable of receiving packets. - ibc.channel.Counterparty: + ibc.core.channel.v1.Counterparty: type: object properties: port_id: @@ -25823,7 +31298,7 @@ definitions: type: string title: channel end on the counterparty chain title: Counterparty defines a channel end counterparty - ibc.channel.IdentifiedChannel: + ibc.core.channel.v1.IdentifiedChannel: type: object properties: state: @@ -25881,7 +31356,7 @@ definitions: this channel will travel version: type: string - title: "opaque channel version, which is agreed upon during the handshake" + title: 'opaque channel version, which is agreed upon during the handshake' port_id: type: string title: port identifier @@ -25891,7 +31366,7 @@ definitions: description: |- IdentifiedChannel defines a channel with additional port and channel identifier fields. - ibc.channel.Order: + ibc.core.channel.v1.Order: type: string enum: - ORDER_NONE_UNSPECIFIED @@ -25904,7 +31379,7 @@ definitions: which they were sent. - ORDER_ORDERED: packets are delivered exactly in the order which they were sent title: Order defines if a channel is ORDERED or UNORDERED - ibc.channel.PacketAckCommitment: + ibc.core.channel.v1.PacketState: type: object properties: port_id: @@ -25917,16 +31392,16 @@ definitions: type: string format: uint64 description: packet sequence. - hash: + data: type: string format: byte - description: packet commitment hash. - description: >- - PacketAckCommitment defines the genesis type necessary to retrieve and - store - - acknowlegements. - ibc.channel.QueryChannelClientStateResponse: + description: embedded data that represents packet state. + description: |- + PacketState defines the generic type necessary to retrieve and store + packet commitments, acknowledgements, and receipts. + Caller is responsible for knowing the context necessary to interpret this + state as a commitment, acknowledgement, or a receipt. + ibc.core.channel.v1.QueryChannelClientStateResponse: type: object properties: identified_client_state: @@ -26109,9 +31584,6 @@ definitions: type: string format: byte title: merkle proof of existence - proof_path: - type: string - title: merkle proof path proof_height: title: height at which the proof was retrieved type: object @@ -26141,7 +31613,7 @@ definitions: title: |- QueryChannelClientStateResponse is the Response type for the Query/QueryChannelClientState RPC method - ibc.channel.QueryChannelConsensusStateResponse: + ibc.core.channel.v1.QueryChannelConsensusStateResponse: type: object properties: consensus_state: @@ -26311,9 +31783,6 @@ definitions: type: string format: byte title: merkle proof of existence - proof_path: - type: string - title: merkle proof path proof_height: title: height at which the proof was retrieved type: object @@ -26343,7 +31812,7 @@ definitions: title: |- QueryChannelClientStateResponse is the Response type for the Query/QueryChannelClientState RPC method - ibc.channel.QueryChannelResponse: + ibc.core.channel.v1.QueryChannelResponse: type: object properties: channel: @@ -26407,7 +31876,7 @@ definitions: this channel will travel version: type: string - title: "opaque channel version, which is agreed upon during the handshake" + title: 'opaque channel version, which is agreed upon during the handshake' description: >- Channel defines pipeline for exactly-once packet delivery between specific @@ -26419,9 +31888,6 @@ definitions: type: string format: byte title: merkle proof of existence - proof_path: - type: string - title: merkle proof path proof_height: title: height at which the proof was retrieved type: object @@ -26455,7 +31921,7 @@ definitions: Besides the Channel end, it includes a proof and the height from which the proof was retrieved. - ibc.channel.QueryChannelsResponse: + ibc.core.channel.v1.QueryChannelsResponse: type: object properties: channels: @@ -26588,7 +32054,7 @@ definitions: description: >- QueryChannelsResponse is the response type for the Query/Channels RPC method. - ibc.channel.QueryConnectionChannelsResponse: + ibc.core.channel.v1.QueryConnectionChannelsResponse: type: object properties: channels: @@ -26721,7 +32187,7 @@ definitions: title: |- QueryConnectionChannelsResponse is the Response type for the Query/QueryConnectionChannels RPC method - ibc.channel.QueryNextSequenceReceiveResponse: + ibc.core.channel.v1.QueryNextSequenceReceiveResponse: type: object properties: next_sequence_receive: @@ -26732,9 +32198,6 @@ definitions: type: string format: byte title: merkle proof of existence - proof_path: - type: string - title: merkle proof path proof_height: title: height at which the proof was retrieved type: object @@ -26764,7 +32227,7 @@ definitions: title: |- QuerySequenceResponse is the request type for the Query/QueryNextSequenceReceiveResponse RPC method - ibc.channel.QueryPacketAcknowledgementResponse: + ibc.core.channel.v1.QueryPacketAcknowledgementResponse: type: object properties: acknowledgement: @@ -26775,9 +32238,6 @@ definitions: type: string format: byte title: merkle proof of existence - proof_path: - type: string - title: merkle proof path proof_height: title: height at which the proof was retrieved type: object @@ -26806,9 +32266,95 @@ definitions: be monitonically increasing even as the VersionHeight gets reset title: |- QueryPacketAcknowledgementResponse defines the client query response for a - packet which also includes a proof, its path and the height form which the + packet which also includes a proof and the height from which the proof was retrieved - ibc.channel.QueryPacketCommitmentResponse: + ibc.core.channel.v1.QueryPacketAcknowledgementsResponse: + type: object + properties: + acknowledgements: + type: array + items: + type: object + properties: + port_id: + type: string + description: channel port identifier. + channel_id: + type: string + description: channel unique identifier. + sequence: + type: string + format: uint64 + description: packet sequence. + data: + type: string + format: byte + description: embedded data that represents packet state. + description: >- + PacketState defines the generic type necessary to retrieve and store + + packet commitments, acknowledgements, and receipts. + + Caller is responsible for knowing the context necessary to interpret + this + + state as a commitment, acknowledgement, or a receipt. + pagination: + title: pagination response + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: |- + PageResponse is to be embedded in gRPC response messages where the + corresponding request message has used PageRequest. + + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + height: + title: query block height + type: object + properties: + version_number: + type: string + format: uint64 + title: the version that the client is currently on + version_height: + type: string + format: uint64 + title: the height within the given version + description: >- + Normally the VersionHeight is incremented at each height while keeping + version + + number the same However some consensus algorithms may choose to reset + the + + height in certain conditions e.g. hard forks, state-machine breaking + changes + + In these cases, the version number is incremented so that height + continues to + + be monitonically increasing even as the VersionHeight gets reset + title: |- + QueryPacketAcknowledgemetsResponse is the request type for the + Query/QueryPacketAcknowledgements RPC method + ibc.core.channel.v1.QueryPacketCommitmentResponse: type: object properties: commitment: @@ -26819,9 +32365,6 @@ definitions: type: string format: byte title: merkle proof of existence - proof_path: - type: string - title: merkle proof path proof_height: title: height at which the proof was retrieved type: object @@ -26852,11 +32395,10 @@ definitions: QueryPacketCommitmentResponse defines the client query response for a packet - which also includes a proof, its path and the height form which the proof - was + which also includes a proof and the height from which the proof was retrieved - ibc.channel.QueryPacketCommitmentsResponse: + ibc.core.channel.v1.QueryPacketCommitmentsResponse: type: object properties: commitments: @@ -26874,15 +32416,19 @@ definitions: type: string format: uint64 description: packet sequence. - hash: + data: type: string format: byte - description: packet commitment hash. + description: embedded data that represents packet state. description: >- - PacketAckCommitment defines the genesis type necessary to retrieve - and store + PacketState defines the generic type necessary to retrieve and store - acknowlegements. + packet commitments, acknowledgements, and receipts. + + Caller is responsible for knowing the context necessary to interpret + this + + state as a commitment, acknowledgement, or a receipt. pagination: title: pagination response type: object @@ -26938,7 +32484,88 @@ definitions: title: |- QueryPacketCommitmentsResponse is the request type for the Query/QueryPacketCommitments RPC method - ibc.channel.QueryUnreceivedPacketsResponse: + ibc.core.channel.v1.QueryPacketReceiptResponse: + type: object + properties: + received: + type: boolean + title: success flag for if receipt exists + proof: + type: string + format: byte + title: merkle proof of existence + proof_height: + title: height at which the proof was retrieved + type: object + properties: + version_number: + type: string + format: uint64 + title: the version that the client is currently on + version_height: + type: string + format: uint64 + title: the height within the given version + description: >- + Normally the VersionHeight is incremented at each height while keeping + version + + number the same However some consensus algorithms may choose to reset + the + + height in certain conditions e.g. hard forks, state-machine breaking + changes + + In these cases, the version number is incremented so that height + continues to + + be monitonically increasing even as the VersionHeight gets reset + title: >- + QueryPacketReceiptResponse defines the client query response for a packet + receipt + + which also includes a proof, and the height from which the proof was + + retrieved + ibc.core.channel.v1.QueryUnreceivedAcksResponse: + type: object + properties: + sequences: + type: array + items: + type: string + format: uint64 + title: list of unreceived acknowledgement sequences + height: + title: query block height + type: object + properties: + version_number: + type: string + format: uint64 + title: the version that the client is currently on + version_height: + type: string + format: uint64 + title: the height within the given version + description: >- + Normally the VersionHeight is incremented at each height while keeping + version + + number the same However some consensus algorithms may choose to reset + the + + height in certain conditions e.g. hard forks, state-machine breaking + changes + + In these cases, the version number is incremented so that height + continues to + + be monitonically increasing even as the VersionHeight gets reset + title: |- + QueryUnreceivedAcksResponse is the response type for the + Query/UnreceivedAcks RPC method + ibc.core.channel.v1.QueryUnreceivedPacketsResponse: type: object properties: sequences: @@ -26976,45 +32603,7 @@ definitions: title: |- QueryUnreceivedPacketsResponse is the response type for the Query/UnreceivedPacketCommitments RPC method - ibc.channel.QueryUnrelayedAcksResponse: - type: object - properties: - sequences: - type: array - items: - type: string - format: uint64 - title: list of unrelayed acknowledgement sequences - height: - title: query block height - type: object - properties: - version_number: - type: string - format: uint64 - title: the version that the client is currently on - version_height: - type: string - format: uint64 - title: the height within the given version - description: >- - Normally the VersionHeight is incremented at each height while keeping - version - - number the same However some consensus algorithms may choose to reset - the - - height in certain conditions e.g. hard forks, state-machine breaking - changes - - In these cases, the version number is incremented so that height - continues to - - be monitonically increasing even as the VersionHeight gets reset - title: |- - QueryUnrelayedAcksResponse is the response type for the - Query/UnrelayedAcks RPC method - ibc.channel.State: + ibc.core.channel.v1.State: type: string enum: - STATE_UNINITIALIZED_UNSPECIFIED @@ -27034,7 +32623,7 @@ definitions: ready to send and receive packets. - STATE_CLOSED: A channel has been closed and can no longer be used to send or receive packets. - ibc.client.Height: + ibc.core.client.v1.Height: type: object properties: version_number: @@ -27046,7 +32635,8 @@ definitions: format: uint64 title: the height within the given version description: >- - Normally the VersionHeight is incremented at each height while keeping version + Normally the VersionHeight is incremented at each height while keeping + version number the same However some consensus algorithms may choose to reset the @@ -27064,7 +32654,7 @@ definitions: and freezing clients - ibc.client.IdentifiedClientState: + ibc.core.client.v1.IdentifiedClientState: type: object properties: client_id: @@ -27233,7 +32823,7 @@ definitions: description: |- IdentifiedClientState defines a client state with an additional client identifier field. - ibc.client.ConsensusStateWithHeight: + ibc.core.client.v1.ConsensusStateWithHeight: type: object properties: height: @@ -27425,7 +33015,7 @@ definitions: description: >- ConsensusStateWithHeight defines a consensus state with an additional height field. - ibc.client.QueryClientStateResponse: + ibc.core.client.v1.QueryClientStateResponse: type: object properties: client_state: @@ -27592,9 +33182,6 @@ definitions: type: string format: byte title: merkle proof of existence - proof_path: - type: string - title: merkle proof path proof_height: title: height at which the proof was retrieved type: object @@ -27628,7 +33215,7 @@ definitions: method. Besides the client state, it includes a proof and the height from which the proof was retrieved. - ibc.client.QueryClientStatesResponse: + ibc.core.client.v1.QueryClientStatesResponse: type: object properties: client_states: @@ -27846,7 +33433,7 @@ definitions: RPC method. - ibc.client.QueryConsensusStateResponse: + ibc.core.client.v1.QueryConsensusStateResponse: type: object properties: consensus_state: @@ -28015,9 +33602,6 @@ definitions: type: string format: byte title: merkle proof of existence - proof_path: - type: string - title: merkle proof path proof_height: title: height at which the proof was retrieved type: object @@ -28049,7 +33633,7 @@ definitions: Query/ConsensusState RPC method - ibc.client.QueryConsensusStatesResponse: + ibc.core.client.v1.QueryConsensusStatesResponse: type: object properties: consensus_states: @@ -28286,7 +33870,7 @@ definitions: title: |- QueryConsensusStatesResponse is the response type for the Query/ConsensusStates RPC method - ibc.commitment.MerklePrefix: + ibc.core.commitment.v1.MerklePrefix: type: object properties: key_prefix: @@ -28296,7 +33880,7 @@ definitions: MerklePrefix is merkle path prefixed to the key. The constructed key from the Path and the key will be append(Path.KeyPath, append(Path.KeyPrefix, key...)) - ibc.connection.ConnectionEnd: + ibc.core.connection.v1.ConnectionEnd: type: object properties: client_id: @@ -28305,7 +33889,21 @@ definitions: versions: type: array items: - type: string + type: object + properties: + identifier: + type: string + title: unique version identifier + features: + type: array + items: + type: string + title: list of features compatible with the specified identifier + description: >- + Version defines the versioning scheme used to negotiate the IBC + verison in + + the connection handshake. title: >- IBC version which can be utilised to determine encodings or protocols for @@ -28352,7 +33950,7 @@ definitions: establish a connection between two chains. - ibc.connection.Counterparty: + ibc.core.connection.v1.Counterparty: type: object properties: client_id: @@ -28379,7 +33977,7 @@ definitions: description: >- Counterparty defines the counterparty chain associated with a connection end. - ibc.connection.IdentifiedConnection: + ibc.core.connection.v1.IdentifiedConnection: type: object properties: id: @@ -28391,7 +33989,21 @@ definitions: versions: type: array items: - type: string + type: object + properties: + identifier: + type: string + title: unique version identifier + features: + type: array + items: + type: string + title: list of features compatible with the specified identifier + description: >- + Version defines the versioning scheme used to negotiate the IBC + verison in + + the connection handshake. title: >- IBC version which can be utilised to determine encodings or protocols for @@ -28434,7 +34046,7 @@ definitions: description: |- IdentifiedConnection defines a connection with additional connection identifier field. - ibc.connection.QueryClientConnectionsResponse: + ibc.core.connection.v1.QueryClientConnectionsResponse: type: object properties: connection_paths: @@ -28446,9 +34058,6 @@ definitions: type: string format: byte title: merkle proof of existence - proof_path: - type: string - title: merkle proof path proof_height: title: height at which the proof was generated type: object @@ -28478,7 +34087,7 @@ definitions: title: |- QueryClientConnectionsResponse is the response type for the Query/ClientConnections RPC method - ibc.connection.QueryConnectionClientStateResponse: + ibc.core.connection.v1.QueryConnectionClientStateResponse: type: object properties: identified_client_state: @@ -28661,9 +34270,6 @@ definitions: type: string format: byte title: merkle proof of existence - proof_path: - type: string - title: merkle proof path proof_height: title: height at which the proof was retrieved type: object @@ -28693,7 +34299,7 @@ definitions: title: |- QueryConnectionClientStateResponse is the response type for the Query/ConnectionClientState RPC method - ibc.connection.QueryConnectionConsensusStateResponse: + ibc.core.connection.v1.QueryConnectionConsensusStateResponse: type: object properties: consensus_state: @@ -28863,9 +34469,6 @@ definitions: type: string format: byte title: merkle proof of existence - proof_path: - type: string - title: merkle proof path proof_height: title: height at which the proof was retrieved type: object @@ -28895,7 +34498,7 @@ definitions: title: |- QueryConnectionConsensusStateResponse is the response type for the Query/ConnectionConsensusState RPC method - ibc.connection.QueryConnectionResponse: + ibc.core.connection.v1.QueryConnectionResponse: type: object properties: connection: @@ -28908,7 +34511,21 @@ definitions: versions: type: array items: - type: string + type: object + properties: + identifier: + type: string + title: unique version identifier + features: + type: array + items: + type: string + title: list of features compatible with the specified identifier + description: >- + Version defines the versioning scheme used to negotiate the IBC + verison in + + the connection handshake. title: >- IBC version which can be utilised to determine encodings or protocols for @@ -28960,9 +34577,6 @@ definitions: type: string format: byte title: merkle proof of existence - proof_path: - type: string - title: merkle proof path proof_height: title: height at which the proof was retrieved type: object @@ -28996,7 +34610,7 @@ definitions: from which the proof was retrieved. - ibc.connection.QueryConnectionsResponse: + ibc.core.connection.v1.QueryConnectionsResponse: type: object properties: connections: @@ -29013,7 +34627,21 @@ definitions: versions: type: array items: - type: string + type: object + properties: + identifier: + type: string + title: unique version identifier + features: + type: array + items: + type: string + title: list of features compatible with the specified identifier + description: >- + Version defines the versioning scheme used to negotiate the + IBC verison in + + the connection handshake. title: >- IBC version which can be utilised to determine encodings or protocols for @@ -29114,7 +34742,7 @@ definitions: RPC method. - ibc.connection.State: + ibc.core.connection.v1.State: type: string enum: - STATE_UNINITIALIZED_UNSPECIFIED @@ -29131,7 +34759,21 @@ definitions: - STATE_TRYOPEN: A connection end has acknowledged the handshake step on the counterparty chain. - STATE_OPEN: A connection end has completed the handshake. - ibc.transfer.DenomTrace: + ibc.core.connection.v1.Version: + type: object + properties: + identifier: + type: string + title: unique version identifier + features: + type: array + items: + type: string + title: list of features compatible with the specified identifier + description: |- + Version defines the versioning scheme used to negotiate the IBC verison in + the connection handshake. + ibc.applications.transfer.v1.DenomTrace: type: object properties: path: @@ -29149,12 +34791,11 @@ definitions: the source tracing information path. - ibc.transfer.Params: + ibc.applications.transfer.v1.Params: type: object properties: send_enabled: type: boolean - format: boolean description: >- send_enabled enables or disables all cross-chain token transfers from this @@ -29162,7 +34803,6 @@ definitions: chain. receive_enabled: type: boolean - format: boolean description: >- receive_enabled enables or disables all cross-chain token transfers to this @@ -29177,7 +34817,7 @@ definitions: SendEnabled parameter for the denomination to false. - ibc.transfer.QueryDenomTraceResponse: + ibc.applications.transfer.v1.QueryDenomTraceResponse: type: object properties: denom_trace: @@ -29197,7 +34837,7 @@ definitions: description: |- QueryDenomTraceResponse is the response type for the Query/DenomTrace RPC method. - ibc.transfer.QueryDenomTracesResponse: + ibc.applications.transfer.v1.QueryDenomTracesResponse: type: object properties: denom_traces: @@ -29244,7 +34884,7 @@ definitions: RPC method. - ibc.transfer.QueryParamsResponse: + ibc.applications.transfer.v1.QueryParamsResponse: type: object properties: params: @@ -29253,7 +34893,6 @@ definitions: properties: send_enabled: type: boolean - format: boolean description: >- send_enabled enables or disables all cross-chain token transfers from this @@ -29261,7 +34900,6 @@ definitions: chain. receive_enabled: type: boolean - format: boolean description: >- receive_enabled enables or disables all cross-chain token transfers to this diff --git a/docs/ibc/custom.md b/docs/ibc/custom.md index 56d25cd14a..dd840ebf13 100644 --- a/docs/ibc/custom.md +++ b/docs/ibc/custom.md @@ -286,7 +286,7 @@ keepers. Thus, the `OnRecvPacket` callback only needs to worry about making the changes given the packet data without worrying about whether the packet is valid or not. Modules must return an acknowledgement as a byte string and return it to the IBC handler. -The IBC handler will then commit this acknowledgment of the packet so that a relayer may relay the +The IBC handler will then commit this acknowledgement of the packet so that a relayer may relay the acknowledgement back to the sender module. ```go @@ -354,7 +354,7 @@ with some additional data that could be useful for remediation if the packet pro Since the modules are responsible for agreeing on an encoding/decoding standard for packet data and acknowledgements, IBC will pass in the acknowledgements as `[]byte` to this callback. The callback -is responsible for decoding the acknowledgment and processing it. +is responsible for decoding the acknowledgement and processing it. ```go OnAcknowledgementPacket( diff --git a/proto/ibc/core/channel/v1/channel.proto b/proto/ibc/core/channel/v1/channel.proto index 376ce9764e..302a480689 100644 --- a/proto/ibc/core/channel/v1/channel.proto +++ b/proto/ibc/core/channel/v1/channel.proto @@ -114,9 +114,11 @@ message Packet { uint64 timeout_timestamp = 8 [(gogoproto.moretags) = "yaml:\"timeout_timestamp\""]; } -// PacketAckCommitment defines the genesis type necessary to retrieve and store -// acknowlegements. -message PacketAckCommitment { +// PacketState defines the generic type necessary to retrieve and store +// packet commitments, acknowledgements, and receipts. +// Caller is responsible for knowing the context necessary to interpret this +// state as a commitment, acknowledgement, or a receipt. +message PacketState { option (gogoproto.goproto_getters) = false; // channel port identifier. @@ -125,8 +127,8 @@ message PacketAckCommitment { string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; // packet sequence. uint64 sequence = 3; - // packet commitment hash. - bytes hash = 4; + // embedded data that represents packet state. + bytes data = 4; } // Acknowledgement is the recommended acknowledgement format to be used by @@ -142,4 +144,4 @@ message Acknowledgement { bytes result = 21; string error = 22; } -} \ No newline at end of file +} diff --git a/proto/ibc/core/channel/v1/genesis.proto b/proto/ibc/core/channel/v1/genesis.proto index c7ff9b33f9..98a7e630aa 100644 --- a/proto/ibc/core/channel/v1/genesis.proto +++ b/proto/ibc/core/channel/v1/genesis.proto @@ -9,14 +9,14 @@ import "ibc/core/channel/v1/channel.proto"; // GenesisState defines the ibc channel submodule's genesis state. message GenesisState { repeated IdentifiedChannel channels = 1 [(gogoproto.casttype) = "IdentifiedChannel", (gogoproto.nullable) = false]; - repeated PacketAckCommitment acknowledgements = 2 - [(gogoproto.casttype) = "PacketAckCommitment", (gogoproto.nullable) = false]; - repeated PacketAckCommitment commitments = 3 [(gogoproto.nullable) = false]; - repeated PacketSequence send_sequences = 4 + repeated PacketState acknowledgements = 2 [(gogoproto.nullable) = false]; + repeated PacketState commitments = 3 [(gogoproto.nullable) = false]; + repeated PacketState receipts = 4 [(gogoproto.nullable) = false]; + repeated PacketSequence send_sequences = 5 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"send_sequences\""]; - repeated PacketSequence recv_sequences = 5 + repeated PacketSequence recv_sequences = 6 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"recv_sequences\""]; - repeated PacketSequence ack_sequences = 6 + repeated PacketSequence ack_sequences = 7 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"ack_sequences\""]; } diff --git a/proto/ibc/core/channel/v1/query.proto b/proto/ibc/core/channel/v1/query.proto index 16faf462d5..dcff04f7f4 100644 --- a/proto/ibc/core/channel/v1/query.proto +++ b/proto/ibc/core/channel/v1/query.proto @@ -47,29 +47,41 @@ service Query { "/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_commitments/{sequence}"; } - // PacketCommitments returns the all the packet commitments hashes associated + // PacketCommitments returns all the packet commitments hashes associated // with a channel. rpc PacketCommitments(QueryPacketCommitmentsRequest) returns (QueryPacketCommitmentsResponse) { option (google.api.http).get = "/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_commitments"; } + // PacketReceipt queries if a given packet sequence has been received on the queried chain + rpc PacketReceipt(QueryPacketReceiptRequest) returns (QueryPacketReceiptResponse) { + option (google.api.http).get = "/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_receipts/{sequence}"; + } + // PacketAcknowledgement queries a stored packet acknowledgement hash. rpc PacketAcknowledgement(QueryPacketAcknowledgementRequest) returns (QueryPacketAcknowledgementResponse) { option (google.api.http).get = "/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_acks/{sequence}"; } - // UnreceivedPackets returns all the unrelayed IBC packets associated with a + // PacketAcknowledgements returns all the packet acknowledgements associated + // with a channel. + rpc PacketAcknowledgements(QueryPacketAcknowledgementsRequest) returns (QueryPacketAcknowledgementsResponse) { + option (google.api.http).get = "/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_acknowledgements"; + } + + + // UnreceivedPackets returns all the unreceived IBC packets associated with a // channel and sequences. rpc UnreceivedPackets(QueryUnreceivedPacketsRequest) returns (QueryUnreceivedPacketsResponse) { option (google.api.http).get = "/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_commitments/" "{packet_commitment_sequences}/unreceived_packets"; } - // UnrelayedAcks returns all the unrelayed IBC acknowledgements associated with a + // UnreceivedAcks returns all the unreceived IBC acknowledgements associated with a // channel and sequences. - rpc UnrelayedAcks(QueryUnrelayedAcksRequest) returns (QueryUnrelayedAcksResponse) { + rpc UnreceivedAcks(QueryUnreceivedAcksRequest) returns (QueryUnreceivedAcksResponse) { option (google.api.http).get = "/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_commitments/" - "{packet_commitment_sequences}/unrelayed_acks"; + "{packet_ack_sequences}/unreceived_acks"; } // NextSequenceReceive returns the next receive sequence for a given channel. @@ -192,7 +204,7 @@ message QueryPacketCommitmentRequest { } // QueryPacketCommitmentResponse defines the client query response for a packet -// which also includes a proof, its path and the height form which the proof was +// which also includes a proof and the height from which the proof was // retrieved message QueryPacketCommitmentResponse { // packet associated with the request fields @@ -217,13 +229,36 @@ message QueryPacketCommitmentsRequest { // QueryPacketCommitmentsResponse is the request type for the // Query/QueryPacketCommitments RPC method message QueryPacketCommitmentsResponse { - repeated ibc.core.channel.v1.PacketAckCommitment commitments = 1; + repeated ibc.core.channel.v1.PacketState commitments = 1; // pagination response cosmos.base.query.v1beta1.PageResponse pagination = 2; // query block height ibc.core.client.v1.Height height = 3 [(gogoproto.nullable) = false]; } +// QueryPacketReceiptRequest is the request type for the +// Query/PacketReceipt RPC method +message QueryPacketReceiptRequest { + // port unique identifier + string port_id = 1; + // channel unique identifier + string channel_id = 2; + // packet sequence + uint64 sequence = 3; +} + +// QueryPacketReceiptResponse defines the client query response for a packet receipt +// which also includes a proof, and the height from which the proof was +// retrieved +message QueryPacketReceiptResponse { + // success flag for if receipt exists + bool received = 2; + // merkle proof of existence + bytes proof = 3; + // height at which the proof was retrieved + ibc.core.client.v1.Height proof_height = 4 [(gogoproto.nullable) = false]; +} + // QueryPacketAcknowledgementRequest is the request type for the // Query/PacketAcknowledgement RPC method message QueryPacketAcknowledgementRequest { @@ -236,7 +271,7 @@ message QueryPacketAcknowledgementRequest { } // QueryPacketAcknowledgementResponse defines the client query response for a -// packet which also includes a proof, its path and the height form which the +// packet which also includes a proof and the height from which the // proof was retrieved message QueryPacketAcknowledgementResponse { // packet associated with the request fields @@ -247,6 +282,27 @@ message QueryPacketAcknowledgementResponse { ibc.core.client.v1.Height proof_height = 3 [(gogoproto.nullable) = false]; } +// QueryPacketAcknowledgementsRequest is the request type for the +// Query/QueryPacketCommitments RPC method +message QueryPacketAcknowledgementsRequest { + // port unique identifier + string port_id = 1; + // channel unique identifier + string channel_id = 2; + // pagination request + cosmos.base.query.v1beta1.PageRequest pagination = 3; +} + +// QueryPacketAcknowledgemetsResponse is the request type for the +// Query/QueryPacketAcknowledgements RPC method +message QueryPacketAcknowledgementsResponse { + repeated ibc.core.channel.v1.PacketState acknowledgements = 1; + // pagination response + cosmos.base.query.v1beta1.PageResponse pagination = 2; + // query block height + ibc.core.client.v1.Height height = 3 [(gogoproto.nullable) = false]; +} + // QueryUnreceivedPacketsRequest is the request type for the // Query/UnreceivedPackets RPC method message QueryUnreceivedPacketsRequest { @@ -267,21 +323,21 @@ message QueryUnreceivedPacketsResponse { ibc.core.client.v1.Height height = 2 [(gogoproto.nullable) = false]; } -// QueryUnrelayedAcksRequest is the request type for the -// Query/UnrelayedAcks RPC method -message QueryUnrelayedAcksRequest { +// QueryUnreceivedAcks is the request type for the +// Query/UnreceivedAcks RPC method +message QueryUnreceivedAcksRequest { // port unique identifier string port_id = 1; // channel unique identifier string channel_id = 2; - // list of commitment sequences - repeated uint64 packet_commitment_sequences = 3; + // list of acknowledgement sequences + repeated uint64 packet_ack_sequences = 3; } -// QueryUnrelayedAcksResponse is the response type for the -// Query/UnrelayedAcks RPC method -message QueryUnrelayedAcksResponse { - // list of unrelayed acknowledgement sequences +// QueryUnreceivedAcksResponse is the response type for the +// Query/UnreceivedAcks RPC method +message QueryUnreceivedAcksResponse { + // list of unreceived acknowledgement sequences repeated uint64 sequences = 1; // query block height ibc.core.client.v1.Height height = 2 [(gogoproto.nullable) = false]; diff --git a/x/ibc/core/04-channel/client/cli/cli.go b/x/ibc/core/04-channel/client/cli/cli.go index 5eb4d81ae4..baf386feca 100644 --- a/x/ibc/core/04-channel/client/cli/cli.go +++ b/x/ibc/core/04-channel/client/cli/cli.go @@ -24,8 +24,10 @@ func GetQueryCmd() *cobra.Command { GetCmdQueryChannelClientState(), GetCmdQueryPacketCommitment(), GetCmdQueryPacketCommitments(), + GetCmdQueryPacketReceipt(), + GetCmdQueryPacketAcknowledgement(), GetCmdQueryUnreceivedPackets(), - GetCmdQueryUnrelayedAcks(), + GetCmdQueryUnreceivedAcks(), GetCmdQueryNextSequenceReceive(), // TODO: next sequence Send ? ) diff --git a/x/ibc/core/04-channel/client/cli/query.go b/x/ibc/core/04-channel/client/cli/query.go index 0f2f95dbc5..cfb10183d1 100644 --- a/x/ibc/core/04-channel/client/cli/query.go +++ b/x/ibc/core/04-channel/client/cli/query.go @@ -211,14 +211,14 @@ func GetCmdQueryPacketCommitments() *cobra.Command { return cmd } -// GetCmdQueryPacketCommitment defines the command to query a channel end +// GetCmdQueryPacketCommitment defines the command to query a packet commitment func GetCmdQueryPacketCommitment() *cobra.Command { cmd := &cobra.Command{ Use: "packet-commitment [port-id] [channel-id] [sequence]", Short: "Query a packet commitment", Long: "Query a packet commitment", Example: fmt.Sprintf( - "%s query %s %s end [port-id] [channel-id]", version.AppName, host.ModuleName, types.SubModuleName, + "%s query %s %s packet-commitment [port-id] [channel-id] [sequence]", version.AppName, host.ModuleName, types.SubModuleName, ), Args: cobra.ExactArgs(3), RunE: func(cmd *cobra.Command, args []string) error { @@ -252,6 +252,88 @@ func GetCmdQueryPacketCommitment() *cobra.Command { return cmd } +// GetCmdQueryPacketReceipt defines the command to query a packet receipt +func GetCmdQueryPacketReceipt() *cobra.Command { + cmd := &cobra.Command{ + Use: "packet-receipt [port-id] [channel-id] [sequence]", + Short: "Query a packet receipt", + Long: "Query a packet receipt", + Example: fmt.Sprintf( + "%s query %s %s packet-receipt [port-id] [channel-id] [sequence]", version.AppName, host.ModuleName, types.SubModuleName, + ), + Args: cobra.ExactArgs(3), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx := client.GetClientContextFromCmd(cmd) + clientCtx, err := client.ReadQueryCommandFlags(clientCtx, cmd.Flags()) + if err != nil { + return err + } + + portID := args[0] + channelID := args[1] + prove, _ := cmd.Flags().GetBool(flags.FlagProve) + + seq, err := strconv.ParseUint(args[2], 10, 64) + if err != nil { + return err + } + + res, err := utils.QueryPacketReceipt(clientCtx, portID, channelID, seq, prove) + if err != nil { + return err + } + + return clientCtx.PrintOutput(res) + }, + } + + cmd.Flags().Bool(flags.FlagProve, true, "show proofs for the query results") + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} + +// GetCmdQueryPacketAcknowledgement defines the command to query a packet acknowledgement +func GetCmdQueryPacketAcknowledgement() *cobra.Command { + cmd := &cobra.Command{ + Use: "packet-ack [port-id] [channel-id] [sequence]", + Short: "Query a packet acknowledgement", + Long: "Query a packet acknowledgement", + Example: fmt.Sprintf( + "%s query %s %s packet-ack [port-id] [channel-id] [sequence]", version.AppName, host.ModuleName, types.SubModuleName, + ), + Args: cobra.ExactArgs(3), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx := client.GetClientContextFromCmd(cmd) + clientCtx, err := client.ReadQueryCommandFlags(clientCtx, cmd.Flags()) + if err != nil { + return err + } + + portID := args[0] + channelID := args[1] + prove, _ := cmd.Flags().GetBool(flags.FlagProve) + + seq, err := strconv.ParseUint(args[2], 10, 64) + if err != nil { + return err + } + + res, err := utils.QueryPacketAcknowledgement(clientCtx, portID, channelID, seq, prove) + if err != nil { + return err + } + + return clientCtx.PrintOutput(res) + }, + } + + cmd.Flags().Bool(flags.FlagProve, true, "show proofs for the query results") + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} + // GetCmdQueryUnreceivedPackets defines the command to query all the unreceived // packets on the receiving chain func GetCmdQueryUnreceivedPackets() *cobra.Command { @@ -264,7 +346,7 @@ The return value represents: - Unreceived packet commitments: no acknowledgement exists on receiving chain for the given packet commitment sequence on sending chain. `, Example: fmt.Sprintf("%s query %s %s unreceived-packets [port-id] [channel-id] --sequences=1,2,3", version.AppName, host.ModuleName, types.SubModuleName), - Args: cobra.ExactArgs(3), + Args: cobra.ExactArgs(2), RunE: func(cmd *cobra.Command, args []string) error { clientCtx := client.GetClientContextFromCmd(cmd) clientCtx, err := client.ReadQueryCommandFlags(clientCtx, cmd.Flags()) @@ -304,18 +386,18 @@ The return value represents: return cmd } -// GetCmdQueryUnrelayedAcks defines the command to query all the unrelayed acks on the original sending chain -func GetCmdQueryUnrelayedAcks() *cobra.Command { +// GetCmdQueryUnreceivedAcks defines the command to query all the unreceived acks on the original sending chain +func GetCmdQueryUnreceivedAcks() *cobra.Command { cmd := &cobra.Command{ - Use: "unrelayed-acks [port-id] [channel-id]", - Short: "Query all the unrelayed acks associated with a channel", - Long: `Given a list of packet commitment sequences from counterparty, determine if an ack on executing chain has not been relayed to counterparty. + Use: "unreceived-acks [port-id] [channel-id]", + Short: "Query all the unreceived acks associated with a channel", + Long: `Given a list of acknowledgement sequences from counterparty, determine if an ack on the counterparty chain has been received on the executing chain. The return value represents: -- Unrelayed packet acknowledgement: packet commitment exists on original sending chain and ack exists on receiving (executing) chain. +- Unreceived packet acknowledgement: packet commitment exists on original sending (executing) chain and ack exists on receiving chain. `, - Example: fmt.Sprintf("%s query %s %s unrelayed-acks [port-id] [channel-id] --sequences=1,2,3", version.AppName, host.ModuleName, types.SubModuleName), - Args: cobra.ExactArgs(3), + Example: fmt.Sprintf("%s query %s %s unreceived-acks [port-id] [channel-id] --sequences=1,2,3", version.AppName, host.ModuleName, types.SubModuleName), + Args: cobra.ExactArgs(2), RunE: func(cmd *cobra.Command, args []string) error { clientCtx := client.GetClientContextFromCmd(cmd) clientCtx, err := client.ReadQueryCommandFlags(clientCtx, cmd.Flags()) @@ -334,13 +416,13 @@ The return value represents: seqs[i] = uint64(seqSlice[i]) } - req := &types.QueryUnrelayedAcksRequest{ - PortId: args[0], - ChannelId: args[1], - PacketCommitmentSequences: seqs, + req := &types.QueryUnreceivedAcksRequest{ + PortId: args[0], + ChannelId: args[1], + PacketAckSequences: seqs, } - res, err := queryClient.UnrelayedAcks(context.Background(), req) + res, err := queryClient.UnreceivedAcks(context.Background(), req) if err != nil { return err } diff --git a/x/ibc/core/04-channel/client/utils/utils.go b/x/ibc/core/04-channel/client/utils/utils.go index 4aa1363d31..a5cae383bd 100644 --- a/x/ibc/core/04-channel/client/utils/utils.go +++ b/x/ibc/core/04-channel/client/utils/utils.go @@ -15,45 +15,6 @@ import ( "github.com/cosmos/cosmos-sdk/x/ibc/core/exported" ) -// QueryPacketCommitment returns a packet commitment. -// If prove is true, it performs an ABCI store query in order to retrieve the merkle proof. Otherwise, -// it uses the gRPC query client. -func QueryPacketCommitment( - clientCtx client.Context, portID, channelID string, - sequence uint64, prove bool, -) (*types.QueryPacketCommitmentResponse, error) { - if prove { - return queryPacketCommitmentABCI(clientCtx, portID, channelID, sequence) - } - - queryClient := types.NewQueryClient(clientCtx) - req := &types.QueryPacketCommitmentRequest{ - PortId: portID, - ChannelId: channelID, - Sequence: sequence, - } - - return queryClient.PacketCommitment(context.Background(), req) -} - -func queryPacketCommitmentABCI( - clientCtx client.Context, portID, channelID string, sequence uint64, -) (*types.QueryPacketCommitmentResponse, error) { - key := host.KeyPacketCommitment(portID, channelID, sequence) - - value, proofBz, proofHeight, err := ibcclient.QueryTendermintProof(clientCtx, key) - if err != nil { - return nil, err - } - - // check if packet commitment exists - if len(value) == 0 { - return nil, sdkerrors.Wrapf(types.ErrPacketCommitmentNotFound, "portID (%s), channelID (%s), sequence (%d)", portID, channelID, sequence) - } - - return types.NewQueryPacketCommitmentResponse(value, proofBz, proofHeight), nil -} - // QueryChannel returns a channel end. // If prove is true, it performs an ABCI store query in order to retrieve the merkle proof. Otherwise, // it uses the gRPC query client. @@ -232,6 +193,79 @@ func queryNextSequenceRecvABCI(clientCtx client.Context, portID, channelID strin return types.NewQueryNextSequenceReceiveResponse(sequence, proofBz, proofHeight), nil } +// QueryPacketCommitment returns a packet commitment. +// If prove is true, it performs an ABCI store query in order to retrieve the merkle proof. Otherwise, +// it uses the gRPC query client. +func QueryPacketCommitment( + clientCtx client.Context, portID, channelID string, + sequence uint64, prove bool, +) (*types.QueryPacketCommitmentResponse, error) { + if prove { + return queryPacketCommitmentABCI(clientCtx, portID, channelID, sequence) + } + + queryClient := types.NewQueryClient(clientCtx) + req := &types.QueryPacketCommitmentRequest{ + PortId: portID, + ChannelId: channelID, + Sequence: sequence, + } + + return queryClient.PacketCommitment(context.Background(), req) +} + +func queryPacketCommitmentABCI( + clientCtx client.Context, portID, channelID string, sequence uint64, +) (*types.QueryPacketCommitmentResponse, error) { + key := host.KeyPacketCommitment(portID, channelID, sequence) + + value, proofBz, proofHeight, err := ibcclient.QueryTendermintProof(clientCtx, key) + if err != nil { + return nil, err + } + + // check if packet commitment exists + if len(value) == 0 { + return nil, sdkerrors.Wrapf(types.ErrPacketCommitmentNotFound, "portID (%s), channelID (%s), sequence (%d)", portID, channelID, sequence) + } + + return types.NewQueryPacketCommitmentResponse(value, proofBz, proofHeight), nil +} + +// QueryPacketReceipt returns data about a packet receipt. +// If prove is true, it performs an ABCI store query in order to retrieve the merkle proof. Otherwise, +// it uses the gRPC query client. +func QueryPacketReceipt( + clientCtx client.Context, portID, channelID string, + sequence uint64, prove bool, +) (*types.QueryPacketReceiptResponse, error) { + if prove { + return queryPacketReceiptABCI(clientCtx, portID, channelID, sequence) + } + + queryClient := types.NewQueryClient(clientCtx) + req := &types.QueryPacketReceiptRequest{ + PortId: portID, + ChannelId: channelID, + Sequence: sequence, + } + + return queryClient.PacketReceipt(context.Background(), req) +} + +func queryPacketReceiptABCI( + clientCtx client.Context, portID, channelID string, sequence uint64, +) (*types.QueryPacketReceiptResponse, error) { + key := host.KeyPacketReceipt(portID, channelID, sequence) + + value, proofBz, proofHeight, err := ibcclient.QueryTendermintProof(clientCtx, key) + if err != nil { + return nil, err + } + + return types.NewQueryPacketReceiptResponse(value != nil, proofBz, proofHeight), nil +} + // QueryPacketAcknowledgement returns the data about a packet acknowledgement. // If prove is true, it performs an ABCI store query in order to retrieve the merkle proof. Otherwise, // it uses the gRPC query client diff --git a/x/ibc/core/04-channel/genesis.go b/x/ibc/core/04-channel/genesis.go index 24034f171e..bd557bc5bf 100644 --- a/x/ibc/core/04-channel/genesis.go +++ b/x/ibc/core/04-channel/genesis.go @@ -14,10 +14,13 @@ func InitGenesis(ctx sdk.Context, k keeper.Keeper, gs types.GenesisState) { k.SetChannel(ctx, channel.PortId, channel.ChannelId, ch) } for _, ack := range gs.Acknowledgements { - k.SetPacketAcknowledgement(ctx, ack.PortId, ack.ChannelId, ack.Sequence, ack.Hash) + k.SetPacketAcknowledgement(ctx, ack.PortId, ack.ChannelId, ack.Sequence, ack.Data) } for _, commitment := range gs.Commitments { - k.SetPacketCommitment(ctx, commitment.PortId, commitment.ChannelId, commitment.Sequence, commitment.Hash) + k.SetPacketCommitment(ctx, commitment.PortId, commitment.ChannelId, commitment.Sequence, commitment.Data) + } + for _, receipt := range gs.Receipts { + k.SetPacketReceipt(ctx, receipt.PortId, receipt.ChannelId, receipt.Sequence) } for _, ss := range gs.SendSequences { k.SetNextSequenceSend(ctx, ss.PortId, ss.ChannelId, ss.Sequence) @@ -36,6 +39,7 @@ func ExportGenesis(ctx sdk.Context, k keeper.Keeper) types.GenesisState { Channels: k.GetAllChannels(ctx), Acknowledgements: k.GetAllPacketAcks(ctx), Commitments: k.GetAllPacketCommitments(ctx), + Receipts: k.GetAllPacketReceipts(ctx), SendSequences: k.GetAllPacketSendSeqs(ctx), RecvSequences: k.GetAllPacketRecvSeqs(ctx), AckSequences: k.GetAllPacketAckSeqs(ctx), diff --git a/x/ibc/core/04-channel/keeper/grpc_query.go b/x/ibc/core/04-channel/keeper/grpc_query.go index 86d340a507..5e279ee435 100644 --- a/x/ibc/core/04-channel/keeper/grpc_query.go +++ b/x/ibc/core/04-channel/keeper/grpc_query.go @@ -237,7 +237,7 @@ func (q Keeper) PacketCommitments(c context.Context, req *types.QueryPacketCommi ctx := sdk.UnwrapSDKContext(c) - commitments := []*types.PacketAckCommitment{} + commitments := []*types.PacketState{} store := prefix.NewStore(ctx.KVStore(q.storeKey), []byte(host.PacketCommitmentPrefixPath(req.PortId, req.ChannelId))) pageRes, err := query.Paginate(store, req.Pagination, func(key, value []byte) error { @@ -248,7 +248,7 @@ func (q Keeper) PacketCommitments(c context.Context, req *types.QueryPacketCommi return err } - commitment := types.NewPacketAckCommitment(req.PortId, req.ChannelId, sequence, value) + commitment := types.NewPacketState(req.PortId, req.ChannelId, sequence, value) commitments = append(commitments, &commitment) return nil }) @@ -265,6 +265,28 @@ func (q Keeper) PacketCommitments(c context.Context, req *types.QueryPacketCommi }, nil } +// PacketReceipt implements the Query/PacketReceipt gRPC method +func (q Keeper) PacketReceipt(c context.Context, req *types.QueryPacketReceiptRequest) (*types.QueryPacketReceiptResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "empty request") + } + + if err := validategRPCRequest(req.PortId, req.ChannelId); err != nil { + return nil, err + } + + if req.Sequence == 0 { + return nil, status.Error(codes.InvalidArgument, "packet sequence cannot be 0") + } + + ctx := sdk.UnwrapSDKContext(c) + + _, recvd := q.GetPacketReceipt(ctx, req.PortId, req.ChannelId, req.Sequence) + + selfHeight := clienttypes.GetSelfHeight(ctx) + return types.NewQueryPacketReceiptResponse(recvd, nil, selfHeight), nil +} + // PacketAcknowledgement implements the Query/PacketAcknowledgement gRPC method func (q Keeper) PacketAcknowledgement(c context.Context, req *types.QueryPacketAcknowledgementRequest) (*types.QueryPacketAcknowledgementResponse, error) { if req == nil { @@ -290,9 +312,49 @@ func (q Keeper) PacketAcknowledgement(c context.Context, req *types.QueryPacketA return types.NewQueryPacketAcknowledgementResponse(acknowledgementBz, nil, selfHeight), nil } +// PacketAcknowledgements implements the Query/PacketAcknowledgements gRPC method +func (q Keeper) PacketAcknowledgements(c context.Context, req *types.QueryPacketAcknowledgementsRequest) (*types.QueryPacketAcknowledgementsResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "empty request") + } + + if err := validategRPCRequest(req.PortId, req.ChannelId); err != nil { + return nil, err + } + + ctx := sdk.UnwrapSDKContext(c) + + acks := []*types.PacketState{} + store := prefix.NewStore(ctx.KVStore(q.storeKey), []byte(host.PacketAcknowledgementPrefixPath(req.PortId, req.ChannelId))) + + pageRes, err := query.Paginate(store, req.Pagination, func(key, value []byte) error { + keySplit := strings.Split(string(key), "/") + + sequence, err := strconv.ParseUint(keySplit[len(keySplit)-1], 10, 64) + if err != nil { + return err + } + + ack := types.NewPacketState(req.PortId, req.ChannelId, sequence, value) + acks = append(acks, &ack) + return nil + }) + + if err != nil { + return nil, err + } + + selfHeight := clienttypes.GetSelfHeight(ctx) + return &types.QueryPacketAcknowledgementsResponse{ + Acknowledgements: acks, + Pagination: pageRes, + Height: selfHeight, + }, nil +} + // UnreceivedPackets implements the Query/UnreceivedPackets gRPC method. Given // a list of counterparty packet commitments, the querier checks if the packet -// has already been received by checking if an acknowledgement exists on this +// has already been received by checking if a receipt exists on this // chain for the packet sequence. All packets that haven't been received yet // are returned in the response // Usage: To use this method correctly, first query all packet commitments on @@ -306,9 +368,6 @@ func (q Keeper) PacketAcknowledgement(c context.Context, req *types.QueryPacketA // commitments is correct and will not function properly if the list // is not up to date. Ideally the query height should equal the latest height // on the counterparty's client which represents this chain. -// TODO: Replace GetPacketAcknowledgement with GetPacketReceipt once async -// acknowledgements issue is implemented. -// Issue #7254: https://github.com/cosmos/cosmos-sdk/issues/7254 func (q Keeper) UnreceivedPackets(c context.Context, req *types.QueryUnreceivedPacketsRequest) (*types.QueryUnreceivedPacketsResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "empty request") @@ -327,8 +386,8 @@ func (q Keeper) UnreceivedPackets(c context.Context, req *types.QueryUnreceivedP return nil, status.Errorf(codes.InvalidArgument, "packet sequence %d cannot be 0", i) } - // if acknowledgement exists on the receiving chain, then packet has already been received - if _, found := q.GetPacketAcknowledgement(ctx, req.PortId, req.ChannelId, seq); !found { + // if packet receipt exists on the receiving chain, then packet has already been received + if _, found := q.GetPacketReceipt(ctx, req.PortId, req.ChannelId, seq); !found { unreceivedSequences = append(unreceivedSequences, seq) } @@ -341,24 +400,24 @@ func (q Keeper) UnreceivedPackets(c context.Context, req *types.QueryUnreceivedP }, nil } -// UnrelayedAcks implements the Query/UnrelayedAcks gRPC method. Given +// UnreceivedAcks implements the Query/UnreceivedAcks gRPC method. Given // a list of counterparty packet acknowledgements, the querier checks if the packet // has already been received by checking if the packet commitment still exists on this // chain (original sender) for the packet sequence. // All acknowledgmeents that haven't been received yet are returned in the response. -// Usage: To use this method correctly, first query all packet commitments on -// the sending chain using the Query/PacketCommitments gRPC method. -// Then input the returned sequences into the QueryUnrelayedPacketsRequest -// and send the request to this Query/UnrelayedPackets on the **receiving** +// Usage: To use this method correctly, first query all packet acknowledgements on +// the original receiving chain (ie the chain that wrote the acks) using the Query/PacketAcknowledgements gRPC method. +// Then input the returned sequences into the QueryUnreceivedAcksRequest +// and send the request to this Query/UnreceivedAcks on the **original sending** // chain. This gRPC method will then return the list of packet sequences whose // acknowledgements are already written on the receiving chain but haven't yet -// been relayed back to the sending chain. +// been received back to the sending chain. // // NOTE: The querier makes the assumption that the provided list of packet // acknowledgements is correct and will not function properly if the list // is not up to date. Ideally the query height should equal the latest height // on the counterparty's client which represents this chain. -func (q Keeper) UnrelayedAcks(c context.Context, req *types.QueryUnrelayedAcksRequest) (*types.QueryUnrelayedAcksResponse, error) { +func (q Keeper) UnreceivedAcks(c context.Context, req *types.QueryUnreceivedAcksRequest) (*types.QueryUnreceivedAcksResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "empty request") } @@ -369,24 +428,24 @@ func (q Keeper) UnrelayedAcks(c context.Context, req *types.QueryUnrelayedAcksRe ctx := sdk.UnwrapSDKContext(c) - var unrelayedSequences = []uint64{} + var unreceivedSequences = []uint64{} - for i, seq := range req.PacketCommitmentSequences { + for i, seq := range req.PacketAckSequences { if seq == 0 { return nil, status.Errorf(codes.InvalidArgument, "packet sequence %d cannot be 0", i) } // if packet commitment still exists on the original sending chain, then packet ack has not been received // since processing the ack will delete the packet commitment - if _, found := q.GetPacketAcknowledgement(ctx, req.PortId, req.ChannelId, seq); found { - unrelayedSequences = append(unrelayedSequences, seq) + if commitment := q.GetPacketCommitment(ctx, req.PortId, req.ChannelId, seq); len(commitment) != 0 { + unreceivedSequences = append(unreceivedSequences, seq) } } selfHeight := clienttypes.GetSelfHeight(ctx) - return &types.QueryUnrelayedAcksResponse{ - Sequences: unrelayedSequences, + return &types.QueryUnreceivedAcksResponse{ + Sequences: unreceivedSequences, Height: selfHeight, }, nil } diff --git a/x/ibc/core/04-channel/keeper/grpc_query_test.go b/x/ibc/core/04-channel/keeper/grpc_query_test.go index 9621c09168..031b89cc10 100644 --- a/x/ibc/core/04-channel/keeper/grpc_query_test.go +++ b/x/ibc/core/04-channel/keeper/grpc_query_test.go @@ -649,7 +649,7 @@ func (suite *KeeperTestSuite) TestQueryPacketCommitment() { func (suite *KeeperTestSuite) TestQueryPacketCommitments() { var ( req *types.QueryPacketCommitmentsRequest - expCommitments = []*types.PacketAckCommitment{} + expCommitments = []*types.PacketState{} ) testCases := []struct { @@ -677,7 +677,7 @@ func (suite *KeeperTestSuite) TestQueryPacketCommitments() { { "success, empty res", func() { - expCommitments = []*types.PacketAckCommitment{} + expCommitments = []*types.PacketState{} req = &types.QueryPacketCommitmentsRequest{ PortId: "test-port-id", @@ -696,11 +696,11 @@ func (suite *KeeperTestSuite) TestQueryPacketCommitments() { func() { _, _, _, _, channelA, _ := suite.coordinator.Setup(suite.chainA, suite.chainB, types.UNORDERED) - expCommitments = make([]*types.PacketAckCommitment, 9) + expCommitments = make([]*types.PacketState, 9) for i := uint64(0); i < 9; i++ { - commitment := types.NewPacketAckCommitment(channelA.PortID, channelA.ID, i, []byte(fmt.Sprintf("hash_%d", i))) - suite.chainA.App.IBCKeeper.ChannelKeeper.SetPacketCommitment(suite.chainA.GetContext(), commitment.PortId, commitment.ChannelId, commitment.Sequence, commitment.Hash) + commitment := types.NewPacketState(channelA.PortID, channelA.ID, i, []byte(fmt.Sprintf("hash_%d", i))) + suite.chainA.App.IBCKeeper.ChannelKeeper.SetPacketCommitment(suite.chainA.GetContext(), commitment.PortId, commitment.ChannelId, commitment.Sequence, commitment.Data) expCommitments[i] = &commitment } @@ -738,6 +738,108 @@ func (suite *KeeperTestSuite) TestQueryPacketCommitments() { } } +func (suite *KeeperTestSuite) TestQueryPacketReceipt() { + var ( + req *types.QueryPacketReceiptRequest + expReceived bool + ) + + testCases := []struct { + msg string + malleate func() + expPass bool + }{ + { + "empty request", + func() { + req = nil + }, + false, + }, + { + "invalid port ID", + func() { + req = &types.QueryPacketReceiptRequest{ + PortId: "", + ChannelId: "test-channel-id", + Sequence: 1, + } + }, + false, + }, + { + "invalid channel ID", + func() { + req = &types.QueryPacketReceiptRequest{ + PortId: "test-port-id", + ChannelId: "", + Sequence: 1, + } + }, + false, + }, + {"invalid sequence", + func() { + req = &types.QueryPacketReceiptRequest{ + PortId: "test-port-id", + ChannelId: "test-channel-id", + Sequence: 0, + } + }, + false, + }, + { + "success: receipt not found", + func() { + _, _, _, _, channelA, _ := suite.coordinator.Setup(suite.chainA, suite.chainB, types.UNORDERED) + suite.chainA.App.IBCKeeper.ChannelKeeper.SetPacketReceipt(suite.chainA.GetContext(), channelA.PortID, channelA.ID, 1) + + req = &types.QueryPacketReceiptRequest{ + PortId: channelA.PortID, + ChannelId: channelA.ID, + Sequence: 3, + } + expReceived = false + }, + true, + }, + { + "success: receipt found", + func() { + _, _, _, _, channelA, _ := suite.coordinator.Setup(suite.chainA, suite.chainB, types.UNORDERED) + suite.chainA.App.IBCKeeper.ChannelKeeper.SetPacketReceipt(suite.chainA.GetContext(), channelA.PortID, channelA.ID, 1) + + req = &types.QueryPacketReceiptRequest{ + PortId: channelA.PortID, + ChannelId: channelA.ID, + Sequence: 1, + } + expReceived = true + }, + true, + }, + } + + for _, tc := range testCases { + suite.Run(fmt.Sprintf("Case %s", tc.msg), func() { + suite.SetupTest() // reset + + tc.malleate() + ctx := sdk.WrapSDKContext(suite.chainA.GetContext()) + + res, err := suite.chainA.QueryServer.PacketReceipt(ctx, req) + + if tc.expPass { + suite.Require().NoError(err) + suite.Require().NotNil(res) + suite.Require().Equal(expReceived, res.Received) + } else { + suite.Require().Error(err) + } + }) + } +} + func (suite *KeeperTestSuite) TestQueryPacketAcknowledgement() { var ( req *types.QueryPacketAcknowledgementRequest @@ -835,6 +937,98 @@ func (suite *KeeperTestSuite) TestQueryPacketAcknowledgement() { } } +func (suite *KeeperTestSuite) TestQueryPacketAcknowledgements() { + var ( + req *types.QueryPacketAcknowledgementsRequest + expAcknowledgements = []*types.PacketState{} + ) + + testCases := []struct { + msg string + malleate func() + expPass bool + }{ + { + "empty request", + func() { + req = nil + }, + false, + }, + { + "invalid ID", + func() { + req = &types.QueryPacketAcknowledgementsRequest{ + PortId: "", + ChannelId: "test-channel-id", + } + }, + false, + }, + { + "success, empty res", + func() { + expAcknowledgements = []*types.PacketState{} + + req = &types.QueryPacketAcknowledgementsRequest{ + PortId: "test-port-id", + ChannelId: "test-channel-id", + Pagination: &query.PageRequest{ + Key: nil, + Limit: 2, + CountTotal: true, + }, + } + }, + true, + }, + { + "success", + func() { + _, _, _, _, channelA, _ := suite.coordinator.Setup(suite.chainA, suite.chainB, types.UNORDERED) + + expAcknowledgements = make([]*types.PacketState, 9) + + for i := uint64(0); i < 9; i++ { + ack := types.NewPacketState(channelA.PortID, channelA.ID, i, []byte(fmt.Sprintf("hash_%d", i))) + suite.chainA.App.IBCKeeper.ChannelKeeper.SetPacketAcknowledgement(suite.chainA.GetContext(), ack.PortId, ack.ChannelId, ack.Sequence, ack.Data) + expAcknowledgements[i] = &ack + } + + req = &types.QueryPacketAcknowledgementsRequest{ + PortId: channelA.PortID, + ChannelId: channelA.ID, + Pagination: &query.PageRequest{ + Key: nil, + Limit: 11, + CountTotal: true, + }, + } + }, + true, + }, + } + + for _, tc := range testCases { + suite.Run(fmt.Sprintf("Case %s", tc.msg), func() { + suite.SetupTest() // reset + + tc.malleate() + ctx := sdk.WrapSDKContext(suite.chainA.GetContext()) + + res, err := suite.chainA.QueryServer.PacketAcknowledgements(ctx, req) + + if tc.expPass { + suite.Require().NoError(err) + suite.Require().NotNil(res) + suite.Require().Equal(expAcknowledgements, res.Acknowledgements) + } else { + suite.Require().Error(err) + } + }) + } +} + func (suite *KeeperTestSuite) TestQueryUnreceivedPackets() { var ( req *types.QueryUnreceivedPacketsRequest @@ -885,7 +1079,7 @@ func (suite *KeeperTestSuite) TestQueryUnreceivedPackets() { false, }, { - "basic success unrelayed packet commitments", + "basic success unreceived packet commitments", func() { _, _, _, _, channelA, _ := suite.coordinator.Setup(suite.chainA, suite.chainB, types.UNORDERED) @@ -901,13 +1095,11 @@ func (suite *KeeperTestSuite) TestQueryUnreceivedPackets() { true, }, { - "basic success unrelayed packet commitments, nothing to relay", + "basic success unreceived packet commitments, nothing to relay", func() { _, _, _, _, channelA, _ := suite.coordinator.Setup(suite.chainA, suite.chainB, types.UNORDERED) - // ack exists - ack := types.NewPacketAckCommitment(channelA.PortID, channelA.ID, 1, []byte("hash")) - suite.chainA.App.IBCKeeper.ChannelKeeper.SetPacketAcknowledgement(suite.chainA.GetContext(), channelA.PortID, channelA.ID, 1, ack.Hash) + suite.chainA.App.IBCKeeper.ChannelKeeper.SetPacketReceipt(suite.chainA.GetContext(), channelA.PortID, channelA.ID, 1) expSeq = []uint64{} req = &types.QueryUnreceivedPacketsRequest{ @@ -919,19 +1111,18 @@ func (suite *KeeperTestSuite) TestQueryUnreceivedPackets() { true, }, { - "success multiple unrelayed packet commitments", + "success multiple unreceived packet commitments", func() { _, _, _, _, channelA, _ := suite.coordinator.Setup(suite.chainA, suite.chainB, types.UNORDERED) expSeq = []uint64{} // reset packetCommitments := []uint64{} - // set ack for every other sequence + // set packet receipt for every other sequence for seq := uint64(1); seq < 10; seq++ { packetCommitments = append(packetCommitments, seq) if seq%2 == 0 { - ack := types.NewPacketAckCommitment(channelA.PortID, channelA.ID, seq, []byte("hash")) - suite.chainA.App.IBCKeeper.ChannelKeeper.SetPacketAcknowledgement(suite.chainA.GetContext(), channelA.PortID, channelA.ID, seq, ack.Hash) + suite.chainA.App.IBCKeeper.ChannelKeeper.SetPacketReceipt(suite.chainA.GetContext(), channelA.PortID, channelA.ID, seq) } else { expSeq = append(expSeq, seq) } @@ -967,9 +1158,9 @@ func (suite *KeeperTestSuite) TestQueryUnreceivedPackets() { } } -func (suite *KeeperTestSuite) TestQueryUnrelayedAcks() { +func (suite *KeeperTestSuite) TestQueryUnreceivedAcks() { var ( - req *types.QueryUnrelayedAcksRequest + req *types.QueryUnreceivedAcksRequest expSeq = []uint64{} ) @@ -988,7 +1179,7 @@ func (suite *KeeperTestSuite) TestQueryUnrelayedAcks() { { "invalid port ID", func() { - req = &types.QueryUnrelayedAcksRequest{ + req = &types.QueryUnreceivedAcksRequest{ PortId: "", ChannelId: "test-channel-id", } @@ -998,7 +1189,7 @@ func (suite *KeeperTestSuite) TestQueryUnrelayedAcks() { { "invalid channel ID", func() { - req = &types.QueryUnrelayedAcksRequest{ + req = &types.QueryUnreceivedAcksRequest{ PortId: "test-port-id", ChannelId: "", } @@ -1008,70 +1199,65 @@ func (suite *KeeperTestSuite) TestQueryUnrelayedAcks() { { "invalid seq", func() { - req = &types.QueryUnrelayedAcksRequest{ - PortId: "test-port-id", - ChannelId: "test-channel-id", - PacketCommitmentSequences: []uint64{0}, + req = &types.QueryUnreceivedAcksRequest{ + PortId: "test-port-id", + ChannelId: "test-channel-id", + PacketAckSequences: []uint64{0}, } }, false, }, { - "basic success unrelayed packet acks", + "basic success unreceived packet acks", func() { _, _, _, _, channelA, _ := suite.coordinator.Setup(suite.chainA, suite.chainB, types.UNORDERED) - // ack exists - ack := types.NewPacketAckCommitment(channelA.PortID, channelA.ID, 1, []byte("hash")) - suite.chainA.App.IBCKeeper.ChannelKeeper.SetPacketAcknowledgement(suite.chainA.GetContext(), channelA.PortID, channelA.ID, 1, ack.Hash) + suite.chainA.App.IBCKeeper.ChannelKeeper.SetPacketCommitment(suite.chainA.GetContext(), channelA.PortID, channelA.ID, 1, []byte("commitment")) expSeq = []uint64{1} - req = &types.QueryUnrelayedAcksRequest{ - PortId: channelA.PortID, - ChannelId: channelA.ID, - PacketCommitmentSequences: []uint64{1}, + req = &types.QueryUnreceivedAcksRequest{ + PortId: channelA.PortID, + ChannelId: channelA.ID, + PacketAckSequences: []uint64{1}, } }, true, }, { - "basic success unrelayed packet acknowledgements, nothing to relay", + "basic success unreceived packet acknowledgements, nothing to relay", func() { _, _, _, _, channelA, _ := suite.coordinator.Setup(suite.chainA, suite.chainB, types.UNORDERED) - // no ack exists - expSeq = []uint64{} - req = &types.QueryUnrelayedAcksRequest{ - PortId: channelA.PortID, - ChannelId: channelA.ID, - PacketCommitmentSequences: []uint64{1}, + req = &types.QueryUnreceivedAcksRequest{ + PortId: channelA.PortID, + ChannelId: channelA.ID, + PacketAckSequences: []uint64{1}, } }, true, }, { - "success multiple unrelayed packet acknowledgements", + "success multiple unreceived packet acknowledgements", func() { _, _, _, _, channelA, _ := suite.coordinator.Setup(suite.chainA, suite.chainB, types.UNORDERED) expSeq = []uint64{} // reset - packetCommitments := []uint64{} + packetAcks := []uint64{} - // set ack for every other sequence + // set packet commitment for every other sequence for seq := uint64(1); seq < 10; seq++ { - packetCommitments = append(packetCommitments, seq) + packetAcks = append(packetAcks, seq) if seq%2 == 0 { - ack := types.NewPacketAckCommitment(channelA.PortID, channelA.ID, seq, []byte("hash")) - suite.chainA.App.IBCKeeper.ChannelKeeper.SetPacketAcknowledgement(suite.chainA.GetContext(), channelA.PortID, channelA.ID, seq, ack.Hash) + suite.chainA.App.IBCKeeper.ChannelKeeper.SetPacketCommitment(suite.chainA.GetContext(), channelA.PortID, channelA.ID, seq, []byte("commitement")) expSeq = append(expSeq, seq) } } - req = &types.QueryUnrelayedAcksRequest{ - PortId: channelA.PortID, - ChannelId: channelA.ID, - PacketCommitmentSequences: packetCommitments, + req = &types.QueryUnreceivedAcksRequest{ + PortId: channelA.PortID, + ChannelId: channelA.ID, + PacketAckSequences: packetAcks, } }, true, @@ -1085,7 +1271,7 @@ func (suite *KeeperTestSuite) TestQueryUnrelayedAcks() { tc.malleate() ctx := sdk.WrapSDKContext(suite.chainA.GetContext()) - res, err := suite.chainA.QueryServer.UnrelayedAcks(ctx, req) + res, err := suite.chainA.QueryServer.UnreceivedAcks(ctx, req) if tc.expPass { suite.Require().NoError(err) diff --git a/x/ibc/core/04-channel/keeper/keeper.go b/x/ibc/core/04-channel/keeper/keeper.go index f71abe0552..b3f23ca7fb 100644 --- a/x/ibc/core/04-channel/keeper/keeper.go +++ b/x/ibc/core/04-channel/keeper/keeper.go @@ -258,9 +258,9 @@ func (k Keeper) IteratePacketCommitment(ctx sdk.Context, cb func(portID, channel } // GetAllPacketCommitments returns all stored PacketCommitments objects. -func (k Keeper) GetAllPacketCommitments(ctx sdk.Context) (commitments []types.PacketAckCommitment) { +func (k Keeper) GetAllPacketCommitments(ctx sdk.Context) (commitments []types.PacketState) { k.IteratePacketCommitment(ctx, func(portID, channelID string, sequence uint64, hash []byte) bool { - pc := types.NewPacketAckCommitment(portID, channelID, sequence, hash) + pc := types.NewPacketState(portID, channelID, sequence, hash) commitments = append(commitments, pc) return false }) @@ -278,15 +278,34 @@ func (k Keeper) IteratePacketCommitmentAtChannel(ctx sdk.Context, portID, channe // GetAllPacketCommitmentsAtChannel returns all stored PacketCommitments objects for a specified // port ID and channel ID. -func (k Keeper) GetAllPacketCommitmentsAtChannel(ctx sdk.Context, portID, channelID string) (commitments []types.PacketAckCommitment) { +func (k Keeper) GetAllPacketCommitmentsAtChannel(ctx sdk.Context, portID, channelID string) (commitments []types.PacketState) { k.IteratePacketCommitmentAtChannel(ctx, portID, channelID, func(_, _ string, sequence uint64, hash []byte) bool { - pc := types.NewPacketAckCommitment(portID, channelID, sequence, hash) + pc := types.NewPacketState(portID, channelID, sequence, hash) commitments = append(commitments, pc) return false }) return commitments } +// IteratePacketReceipt provides an iterator over all PacketReceipt objects. For each +// receipt, cb will be called. If the cb returns true, the iterator will close +// and stop. +func (k Keeper) IteratePacketReceipt(ctx sdk.Context, cb func(portID, channelID string, sequence uint64, receipt []byte) bool) { + store := ctx.KVStore(k.storeKey) + iterator := sdk.KVStorePrefixIterator(store, []byte(host.KeyPacketReceiptPrefix)) + k.iterateHashes(ctx, iterator, cb) +} + +// GetAllPacketReceipts returns all stored PacketReceipt objects. +func (k Keeper) GetAllPacketReceipts(ctx sdk.Context) (receipts []types.PacketState) { + k.IteratePacketReceipt(ctx, func(portID, channelID string, sequence uint64, receipt []byte) bool { + packetReceipt := types.NewPacketState(portID, channelID, sequence, receipt) + receipts = append(receipts, packetReceipt) + return false + }) + return receipts +} + // IteratePacketAcknowledgement provides an iterator over all PacketAcknowledgement objects. For each // aknowledgement, cb will be called. If the cb returns true, the iterator will close // and stop. @@ -297,9 +316,9 @@ func (k Keeper) IteratePacketAcknowledgement(ctx sdk.Context, cb func(portID, ch } // GetAllPacketAcks returns all stored PacketAcknowledgements objects. -func (k Keeper) GetAllPacketAcks(ctx sdk.Context) (acks []types.PacketAckCommitment) { +func (k Keeper) GetAllPacketAcks(ctx sdk.Context) (acks []types.PacketState) { k.IteratePacketAcknowledgement(ctx, func(portID, channelID string, sequence uint64, ack []byte) bool { - packetAck := types.NewPacketAckCommitment(portID, channelID, sequence, ack) + packetAck := types.NewPacketState(portID, channelID, sequence, ack) acks = append(acks, packetAck) return false }) diff --git a/x/ibc/core/04-channel/keeper/keeper_test.go b/x/ibc/core/04-channel/keeper/keeper_test.go index d69ec96dcd..9fcc9e20da 100644 --- a/x/ibc/core/04-channel/keeper/keeper_test.go +++ b/x/ibc/core/04-channel/keeper/keeper_test.go @@ -143,51 +143,69 @@ func (suite KeeperTestSuite) TestGetAllSequences() { suite.Equal(expSeqs, ackSeqs) } -// TestGetAllCommitmentsAcks creates a set of acks and packet commitments on two different +// TestGetAllPacketState creates a set of acks, packet commitments, and receipts on two different // channels on chain A and tests their retrieval. -func (suite KeeperTestSuite) TestGetAllCommitmentsAcks() { +func (suite KeeperTestSuite) TestGetAllPacketState() { _, _, connA, connB, channelA0, _ := suite.coordinator.Setup(suite.chainA, suite.chainB, types.UNORDERED) channelA1, _ := suite.coordinator.CreateMockChannels(suite.chainA, suite.chainB, connA, connB, types.UNORDERED) // channel 0 acks - ack1 := types.NewPacketAckCommitment(channelA0.PortID, channelA0.ID, 1, []byte("ack")) - ack2 := types.NewPacketAckCommitment(channelA0.PortID, channelA0.ID, 2, []byte("ack")) + ack1 := types.NewPacketState(channelA0.PortID, channelA0.ID, 1, []byte("ack")) + ack2 := types.NewPacketState(channelA0.PortID, channelA0.ID, 2, []byte("ack")) // duplicate ack - ack2dup := types.NewPacketAckCommitment(channelA0.PortID, channelA0.ID, 2, []byte("ack")) + ack2dup := types.NewPacketState(channelA0.PortID, channelA0.ID, 2, []byte("ack")) // channel 1 acks - ack3 := types.NewPacketAckCommitment(channelA1.PortID, channelA1.ID, 1, []byte("ack")) + ack3 := types.NewPacketState(channelA1.PortID, channelA1.ID, 1, []byte("ack")) + + // create channel 0 receipts + rec1 := types.NewPacketState(channelA0.PortID, channelA0.ID, 1, []byte("")) + rec2 := types.NewPacketState(channelA0.PortID, channelA0.ID, 2, []byte("")) + + // channel 1 receipts + rec3 := types.NewPacketState(channelA1.PortID, channelA1.ID, 1, []byte("")) + rec4 := types.NewPacketState(channelA1.PortID, channelA1.ID, 2, []byte("")) // channel 0 packet commitments - comm1 := types.NewPacketAckCommitment(channelA0.PortID, channelA0.ID, 1, []byte("hash")) - comm2 := types.NewPacketAckCommitment(channelA0.PortID, channelA0.ID, 2, []byte("hash")) + comm1 := types.NewPacketState(channelA0.PortID, channelA0.ID, 1, []byte("hash")) + comm2 := types.NewPacketState(channelA0.PortID, channelA0.ID, 2, []byte("hash")) // channel 1 packet commitments - comm3 := types.NewPacketAckCommitment(channelA1.PortID, channelA1.ID, 1, []byte("hash")) - comm4 := types.NewPacketAckCommitment(channelA1.PortID, channelA1.ID, 2, []byte("hash")) + comm3 := types.NewPacketState(channelA1.PortID, channelA1.ID, 1, []byte("hash")) + comm4 := types.NewPacketState(channelA1.PortID, channelA1.ID, 2, []byte("hash")) - expAcks := []types.PacketAckCommitment{ack1, ack2, ack3} - expCommitments := []types.PacketAckCommitment{comm1, comm2, comm3, comm4} + expAcks := []types.PacketState{ack1, ack2, ack3} + expReceipts := []types.PacketState{rec1, rec2, rec3, rec4} + expCommitments := []types.PacketState{comm1, comm2, comm3, comm4} ctxA := suite.chainA.GetContext() // set acknowledgements - for _, ack := range []types.PacketAckCommitment{ack1, ack2, ack2dup, ack3} { - suite.chainA.App.IBCKeeper.ChannelKeeper.SetPacketAcknowledgement(ctxA, ack.PortId, ack.ChannelId, ack.Sequence, ack.Hash) + for _, ack := range []types.PacketState{ack1, ack2, ack2dup, ack3} { + suite.chainA.App.IBCKeeper.ChannelKeeper.SetPacketAcknowledgement(ctxA, ack.PortId, ack.ChannelId, ack.Sequence, ack.Data) + } + + // set packet receipts + for _, rec := range expReceipts { + suite.chainA.App.IBCKeeper.ChannelKeeper.SetPacketReceipt(ctxA, rec.PortId, rec.ChannelId, rec.Sequence) } // set packet commitments for _, comm := range expCommitments { - suite.chainA.App.IBCKeeper.ChannelKeeper.SetPacketCommitment(ctxA, comm.PortId, comm.ChannelId, comm.Sequence, comm.Hash) + suite.chainA.App.IBCKeeper.ChannelKeeper.SetPacketCommitment(ctxA, comm.PortId, comm.ChannelId, comm.Sequence, comm.Data) } acks := suite.chainA.App.IBCKeeper.ChannelKeeper.GetAllPacketAcks(ctxA) + receipts := suite.chainA.App.IBCKeeper.ChannelKeeper.GetAllPacketReceipts(ctxA) commitments := suite.chainA.App.IBCKeeper.ChannelKeeper.GetAllPacketCommitments(ctxA) + suite.Require().Len(acks, len(expAcks)) suite.Require().Len(commitments, len(expCommitments)) + suite.Require().Len(receipts, len(expReceipts)) suite.Require().Equal(expAcks, acks) + suite.Require().Equal(expReceipts, receipts) suite.Require().Equal(expCommitments, commitments) } @@ -275,7 +293,7 @@ func (suite *KeeperTestSuite) TestGetAllPacketCommitmentsAtChannel() { suite.True(expectedSeqs[packet.Sequence]) suite.Equal(channelA.PortID, packet.PortId) suite.Equal(channelA.ID, packet.ChannelId) - suite.Equal(hash, packet.Hash) + suite.Equal(hash, packet.Data) // prevent duplicates from passing checks expectedSeqs[packet.Sequence] = false diff --git a/x/ibc/core/04-channel/types/channel.pb.go b/x/ibc/core/04-channel/types/channel.pb.go index 19ca87cdbc..e1be136186 100644 --- a/x/ibc/core/04-channel/types/channel.pb.go +++ b/x/ibc/core/04-channel/types/channel.pb.go @@ -299,31 +299,33 @@ func (m *Packet) XXX_DiscardUnknown() { var xxx_messageInfo_Packet proto.InternalMessageInfo -// PacketAckCommitment defines the genesis type necessary to retrieve and store -// acknowlegements. -type PacketAckCommitment struct { +// PacketState defines the generic type necessary to retrieve and store +// packet commitments, acknowledgements, and receipts. +// Caller is responsible for knowing the context necessary to interpret this +// state as a commitment, acknowledgement, or a receipt. +type PacketState struct { // channel port identifier. PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty" yaml:"port_id"` // channel unique identifier. ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty" yaml:"channel_id"` // packet sequence. Sequence uint64 `protobuf:"varint,3,opt,name=sequence,proto3" json:"sequence,omitempty"` - // packet commitment hash. - Hash []byte `protobuf:"bytes,4,opt,name=hash,proto3" json:"hash,omitempty"` + // embedded data that represents packet state. + Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` } -func (m *PacketAckCommitment) Reset() { *m = PacketAckCommitment{} } -func (m *PacketAckCommitment) String() string { return proto.CompactTextString(m) } -func (*PacketAckCommitment) ProtoMessage() {} -func (*PacketAckCommitment) Descriptor() ([]byte, []int) { +func (m *PacketState) Reset() { *m = PacketState{} } +func (m *PacketState) String() string { return proto.CompactTextString(m) } +func (*PacketState) ProtoMessage() {} +func (*PacketState) Descriptor() ([]byte, []int) { return fileDescriptor_c3a07336710636a0, []int{4} } -func (m *PacketAckCommitment) XXX_Unmarshal(b []byte) error { +func (m *PacketState) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *PacketAckCommitment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *PacketState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_PacketAckCommitment.Marshal(b, m, deterministic) + return xxx_messageInfo_PacketState.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -333,17 +335,17 @@ func (m *PacketAckCommitment) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } -func (m *PacketAckCommitment) XXX_Merge(src proto.Message) { - xxx_messageInfo_PacketAckCommitment.Merge(m, src) +func (m *PacketState) XXX_Merge(src proto.Message) { + xxx_messageInfo_PacketState.Merge(m, src) } -func (m *PacketAckCommitment) XXX_Size() int { +func (m *PacketState) XXX_Size() int { return m.Size() } -func (m *PacketAckCommitment) XXX_DiscardUnknown() { - xxx_messageInfo_PacketAckCommitment.DiscardUnknown(m) +func (m *PacketState) XXX_DiscardUnknown() { + xxx_messageInfo_PacketState.DiscardUnknown(m) } -var xxx_messageInfo_PacketAckCommitment proto.InternalMessageInfo +var xxx_messageInfo_PacketState proto.InternalMessageInfo // Acknowledgement is the recommended acknowledgement format to be used by // app-specific protocols. @@ -446,72 +448,71 @@ func init() { proto.RegisterType((*IdentifiedChannel)(nil), "ibc.core.channel.v1.IdentifiedChannel") proto.RegisterType((*Counterparty)(nil), "ibc.core.channel.v1.Counterparty") proto.RegisterType((*Packet)(nil), "ibc.core.channel.v1.Packet") - proto.RegisterType((*PacketAckCommitment)(nil), "ibc.core.channel.v1.PacketAckCommitment") + proto.RegisterType((*PacketState)(nil), "ibc.core.channel.v1.PacketState") proto.RegisterType((*Acknowledgement)(nil), "ibc.core.channel.v1.Acknowledgement") } func init() { proto.RegisterFile("ibc/core/channel/v1/channel.proto", fileDescriptor_c3a07336710636a0) } var fileDescriptor_c3a07336710636a0 = []byte{ - // 916 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x55, 0xcd, 0x6e, 0xdb, 0x46, - 0x10, 0x16, 0x25, 0xea, 0x6f, 0x2c, 0xc9, 0xf2, 0xba, 0x56, 0x58, 0x36, 0x11, 0x15, 0xa2, 0x07, - 0x23, 0x45, 0xa4, 0x38, 0x0d, 0xda, 0x22, 0xa7, 0x5a, 0x3f, 0x81, 0x89, 0x06, 0x92, 0x41, 0xc9, - 0x87, 0xe6, 0xa2, 0xd2, 0xe4, 0x56, 0x22, 0x2c, 0x71, 0x55, 0x72, 0x65, 0xd7, 0x6f, 0x10, 0xe8, - 0xd4, 0x17, 0x10, 0x50, 0xa0, 0xe8, 0xb5, 0xd7, 0xbe, 0x42, 0x8e, 0x39, 0xf6, 0x24, 0x14, 0xf6, - 0xa1, 0x77, 0xbd, 0x40, 0x0b, 0xee, 0x2e, 0xf5, 0xe3, 0x04, 0x39, 0xf6, 0x94, 0x13, 0x77, 0xbe, - 0xef, 0x9b, 0x99, 0x8f, 0x3b, 0x03, 0x12, 0x1e, 0xba, 0xe7, 0x76, 0xcd, 0x26, 0x3e, 0xae, 0xd9, - 0x43, 0xcb, 0xf3, 0xf0, 0xa8, 0x76, 0x79, 0x14, 0x1d, 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 0x72, 0x5b, 0x8e, 0xbd, 0xbd, 0x2d, 0xc7, 0xfe, 0xba, 0x2d, 0xc7, 0x5e, 0x7d, 0x33, 0x70, - 0xe9, 0x70, 0x7a, 0x5e, 0xb5, 0xc9, 0xb8, 0x66, 0x93, 0x60, 0x4c, 0x02, 0xf1, 0x78, 0x1c, 0x38, - 0x17, 0xb5, 0x9f, 0x6b, 0xab, 0x7f, 0xf3, 0x93, 0x67, 0x8f, 0xa3, 0x9f, 0x3d, 0xbd, 0x9e, 0xe0, - 0xe0, 0x3c, 0xc5, 0x7e, 0xce, 0x5f, 0xfe, 0x17, 0x00, 0x00, 0xff, 0xff, 0xfd, 0xef, 0x9f, 0xe3, - 0x0d, 0x08, 0x00, 0x00, + // 904 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x55, 0xcb, 0x6e, 0xdb, 0x46, + 0x14, 0x15, 0x25, 0xea, 0x75, 0x65, 0xc9, 0xf2, 0xa4, 0x56, 0x58, 0x36, 0x11, 0x15, 0xa2, 0x0b, + 0x23, 0x45, 0xa4, 0x38, 0x0d, 0xda, 0x22, 0xab, 0x5a, 0x8f, 0xc0, 0x44, 0x03, 0xc9, 0xa0, 0xe4, + 0x45, 0xb3, 0x51, 0x65, 0x72, 0x2a, 0x11, 0x96, 0x38, 0x2a, 0x39, 0xb2, 0xeb, 0x3f, 0x08, 0xb4, + 0xea, 0x0f, 0x08, 0x28, 0x50, 0xb4, 0xbf, 0xd0, 0x5f, 0xc8, 0x32, 0xcb, 0xae, 0x88, 0xc2, 0x5e, + 0x74, 0xaf, 0x1f, 0x68, 0xc1, 0x99, 0xa1, 0x1e, 0x4e, 0xe0, 0x65, 0x57, 0x59, 0x71, 0xee, 0x39, + 0xe7, 0x3e, 0x74, 0xef, 0xd5, 0x0c, 0x3c, 0x72, 0xce, 0xac, 0x9a, 0x45, 0x3c, 0x5c, 0xb3, 0x46, + 0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xd8, 0xbb, 0x9b, 0x72, 0xec, 0xaf, 0x9b, 0x72, + 0xec, 0xf5, 0x37, 0x43, 0x87, 0x8e, 0x66, 0x67, 0x55, 0x8b, 0x4c, 0x6a, 0x16, 0xf1, 0x27, 0xc4, + 0x17, 0x9f, 0x27, 0xbe, 0x7d, 0x5e, 0xfb, 0xb9, 0xb6, 0x7a, 0x93, 0x9f, 0x3e, 0x7f, 0x12, 0x3d, + 0xf2, 0xf4, 0x6a, 0x8a, 0xfd, 0xb3, 0x14, 0x7b, 0x94, 0xbf, 0xfc, 0x2f, 0x00, 0x00, 0xff, 0xff, + 0xd7, 0x33, 0x69, 0x35, 0x05, 0x08, 0x00, 0x00, } func (m *Channel) Marshal() (dAtA []byte, err error) { @@ -761,7 +762,7 @@ func (m *Packet) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *PacketAckCommitment) Marshal() (dAtA []byte, err error) { +func (m *PacketState) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -771,20 +772,20 @@ func (m *PacketAckCommitment) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *PacketAckCommitment) MarshalTo(dAtA []byte) (int, error) { +func (m *PacketState) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *PacketAckCommitment) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *PacketState) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Hash) > 0 { - i -= len(m.Hash) - copy(dAtA[i:], m.Hash) - i = encodeVarintChannel(dAtA, i, uint64(len(m.Hash))) + if len(m.Data) > 0 { + i -= len(m.Data) + copy(dAtA[i:], m.Data) + i = encodeVarintChannel(dAtA, i, uint64(len(m.Data))) i-- dAtA[i] = 0x22 } @@ -1003,7 +1004,7 @@ func (m *Packet) Size() (n int) { return n } -func (m *PacketAckCommitment) Size() (n int) { +func (m *PacketState) Size() (n int) { if m == nil { return 0 } @@ -1020,7 +1021,7 @@ func (m *PacketAckCommitment) Size() (n int) { if m.Sequence != 0 { n += 1 + sovChannel(uint64(m.Sequence)) } - l = len(m.Hash) + l = len(m.Data) if l > 0 { n += 1 + l + sovChannel(uint64(l)) } @@ -1911,7 +1912,7 @@ func (m *Packet) Unmarshal(dAtA []byte) error { } return nil } -func (m *PacketAckCommitment) Unmarshal(dAtA []byte) error { +func (m *PacketState) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1934,10 +1935,10 @@ func (m *PacketAckCommitment) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: PacketAckCommitment: wiretype end group for non-group") + return fmt.Errorf("proto: PacketState: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: PacketAckCommitment: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: PacketState: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -2025,7 +2026,7 @@ func (m *PacketAckCommitment) Unmarshal(dAtA []byte) error { } case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { @@ -2052,9 +2053,9 @@ func (m *PacketAckCommitment) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...) - if m.Hash == nil { - m.Hash = []byte{} + m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) + if m.Data == nil { + m.Data = []byte{} } iNdEx = postIndex default: diff --git a/x/ibc/core/04-channel/types/genesis.go b/x/ibc/core/04-channel/types/genesis.go index 708872eb86..51de681271 100644 --- a/x/ibc/core/04-channel/types/genesis.go +++ b/x/ibc/core/04-channel/types/genesis.go @@ -7,21 +7,21 @@ import ( host "github.com/cosmos/cosmos-sdk/x/ibc/core/24-host" ) -// NewPacketAckCommitment creates a new PacketAckCommitment instance. -func NewPacketAckCommitment(portID, channelID string, seq uint64, hash []byte) PacketAckCommitment { - return PacketAckCommitment{ +// NewPacketState creates a new PacketState instance. +func NewPacketState(portID, channelID string, seq uint64, data []byte) PacketState { + return PacketState{ PortId: portID, ChannelId: channelID, Sequence: seq, - Hash: hash, + Data: data, } } // Validate performs basic validation of fields returning an error upon any // failure. -func (pa PacketAckCommitment) Validate() error { - if len(pa.Hash) == 0 { - return errors.New("hash bytes cannot be empty") +func (pa PacketState) Validate() error { + if pa.Data == nil { + return errors.New("data bytes cannot be nil") } return validateGenFields(pa.PortId, pa.ChannelId, pa.Sequence) } @@ -43,7 +43,7 @@ func (ps PacketSequence) Validate() error { // NewGenesisState creates a GenesisState instance. func NewGenesisState( - channels []IdentifiedChannel, acks, commitments []PacketAckCommitment, + channels []IdentifiedChannel, acks, receipts, commitments []PacketState, sendSeqs, recvSeqs, ackSeqs []PacketSequence, ) GenesisState { return GenesisState{ @@ -60,8 +60,9 @@ func NewGenesisState( func DefaultGenesisState() GenesisState { return GenesisState{ Channels: []IdentifiedChannel{}, - Acknowledgements: []PacketAckCommitment{}, - Commitments: []PacketAckCommitment{}, + Acknowledgements: []PacketState{}, + Receipts: []PacketState{}, + Commitments: []PacketState{}, SendSequences: []PacketSequence{}, RecvSequences: []PacketSequence{}, AckSequences: []PacketSequence{}, @@ -81,12 +82,24 @@ func (gs GenesisState) Validate() error { if err := ack.Validate(); err != nil { return fmt.Errorf("invalid acknowledgement %v ack index %d: %w", ack, i, err) } + if len(ack.Data) == 0 { + return fmt.Errorf("invalid acknowledgement %v ack index %d: data bytes cannot be empty", ack, i) + } + } + + for i, receipt := range gs.Receipts { + if err := receipt.Validate(); err != nil { + return fmt.Errorf("invalid acknowledgement %v ack index %d: %w", receipt, i, err) + } } for i, commitment := range gs.Commitments { if err := commitment.Validate(); err != nil { return fmt.Errorf("invalid commitment %v index %d: %w", commitment, i, err) } + if len(commitment.Data) == 0 { + return fmt.Errorf("invalid acknowledgement %v ack index %d: data bytes cannot be empty", commitment, i) + } } for i, ss := range gs.SendSequences { diff --git a/x/ibc/core/04-channel/types/genesis.pb.go b/x/ibc/core/04-channel/types/genesis.pb.go index 53ddffa0ec..ca26a9bb5d 100644 --- a/x/ibc/core/04-channel/types/genesis.pb.go +++ b/x/ibc/core/04-channel/types/genesis.pb.go @@ -25,12 +25,13 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // GenesisState defines the ibc channel submodule's genesis state. type GenesisState struct { - Channels []IdentifiedChannel `protobuf:"bytes,1,rep,name=channels,proto3,casttype=IdentifiedChannel" json:"channels"` - Acknowledgements []PacketAckCommitment `protobuf:"bytes,2,rep,name=acknowledgements,proto3,casttype=PacketAckCommitment" json:"acknowledgements"` - Commitments []PacketAckCommitment `protobuf:"bytes,3,rep,name=commitments,proto3" json:"commitments"` - SendSequences []PacketSequence `protobuf:"bytes,4,rep,name=send_sequences,json=sendSequences,proto3" json:"send_sequences" yaml:"send_sequences"` - RecvSequences []PacketSequence `protobuf:"bytes,5,rep,name=recv_sequences,json=recvSequences,proto3" json:"recv_sequences" yaml:"recv_sequences"` - AckSequences []PacketSequence `protobuf:"bytes,6,rep,name=ack_sequences,json=ackSequences,proto3" json:"ack_sequences" yaml:"ack_sequences"` + Channels []IdentifiedChannel `protobuf:"bytes,1,rep,name=channels,proto3,casttype=IdentifiedChannel" json:"channels"` + Acknowledgements []PacketState `protobuf:"bytes,2,rep,name=acknowledgements,proto3" json:"acknowledgements"` + Commitments []PacketState `protobuf:"bytes,3,rep,name=commitments,proto3" json:"commitments"` + Receipts []PacketState `protobuf:"bytes,4,rep,name=receipts,proto3" json:"receipts"` + SendSequences []PacketSequence `protobuf:"bytes,5,rep,name=send_sequences,json=sendSequences,proto3" json:"send_sequences" yaml:"send_sequences"` + RecvSequences []PacketSequence `protobuf:"bytes,6,rep,name=recv_sequences,json=recvSequences,proto3" json:"recv_sequences" yaml:"recv_sequences"` + AckSequences []PacketSequence `protobuf:"bytes,7,rep,name=ack_sequences,json=ackSequences,proto3" json:"ack_sequences" yaml:"ack_sequences"` } func (m *GenesisState) Reset() { *m = GenesisState{} } @@ -73,20 +74,27 @@ func (m *GenesisState) GetChannels() []IdentifiedChannel { return nil } -func (m *GenesisState) GetAcknowledgements() []PacketAckCommitment { +func (m *GenesisState) GetAcknowledgements() []PacketState { if m != nil { return m.Acknowledgements } return nil } -func (m *GenesisState) GetCommitments() []PacketAckCommitment { +func (m *GenesisState) GetCommitments() []PacketState { if m != nil { return m.Commitments } return nil } +func (m *GenesisState) GetReceipts() []PacketState { + if m != nil { + return m.Receipts + } + return nil +} + func (m *GenesisState) GetSendSequences() []PacketSequence { if m != nil { return m.SendSequences @@ -178,37 +186,37 @@ func init() { func init() { proto.RegisterFile("ibc/core/channel/v1/genesis.proto", fileDescriptor_cb06ec201f452595) } var fileDescriptor_cb06ec201f452595 = []byte{ - // 470 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x93, 0x41, 0x6f, 0xd3, 0x30, - 0x18, 0x86, 0x9b, 0xb5, 0x94, 0xcd, 0x5b, 0x2b, 0xe6, 0x6d, 0x52, 0x28, 0x90, 0x94, 0x20, 0xa1, - 0x4a, 0x68, 0x09, 0x83, 0x1d, 0x10, 0x37, 0xb2, 0x03, 0xea, 0x6d, 0xf2, 0x6e, 0x48, 0x68, 0x4a, - 0x9d, 0x6f, 0x99, 0x95, 0x26, 0xee, 0x6a, 0xaf, 0xb0, 0x5f, 0x01, 0x3f, 0x6b, 0xc7, 0x1d, 0x39, - 0x45, 0xa8, 0xfd, 0x03, 0xa8, 0x47, 0x4e, 0xc8, 0x89, 0x9b, 0xb5, 0x5a, 0x84, 0x60, 0xa7, 0xc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xbf, 0xd8, 0x31, 0x79, - 0x35, 0x02, 0x31, 0x68, 0xe6, 0xfb, 0xf5, 0xf6, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa6, 0x0a, - 0xe5, 0x3b, 0xd2, 0x03, 0x00, 0x00, + // 471 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x93, 0x31, 0x6f, 0xd3, 0x40, + 0x14, 0xc7, 0xe3, 0x26, 0x4d, 0xd3, 0x6b, 0x13, 0xd1, 0xa3, 0x95, 0x4c, 0x04, 0x76, 0x30, 0x12, + 0x8a, 0x84, 0x6a, 0x53, 0xe8, 0x80, 0x18, 0xcd, 0x00, 0xd9, 0xd0, 0xb1, 0x21, 0xa1, 0xca, 0x39, + 0xbf, 0xba, 0x27, 0xc7, 0xbe, 0xe0, 0xbb, 0x06, 0xfa, 0x21, 0x10, 0x7c, 0xac, 0x8e, 0x1d, 0x99, + 0x2c, 0x94, 0x7c, 0x83, 0x8c, 0x4c, 0xc8, 0xe7, 0x8b, 0x9b, 0xa8, 0x11, 0x22, 0x4c, 0xf6, 0xbd, + 0xf7, 0x7f, 0xbf, 0xdf, 0x5b, 0x1e, 0x7a, 0xcc, 0x86, 0xd4, 0xa3, 0x3c, 0x03, 0x8f, 0x5e, 0x04, + 0x69, 0x0a, 0x23, 0x6f, 0x72, 0xe2, 0x45, 0x90, 0x82, 0x60, 0xc2, 0x1d, 0x67, 0x5c, 0x72, 0x7c, + 0x9f, 0x0d, 0xa9, 0x5b, 0x44, 0x5c, 0x1d, 0x71, 0x27, 0x27, 0xdd, 0xc3, 0x88, 0x47, 0x5c, 0xf5, + 0xbd, 0xe2, 0xaf, 0x8c, 0x76, 0xd7, 0xd2, 0x16, 0x53, 0x2a, 0xe2, 0x7c, 0xdb, 0x46, 0xfb, 0x6f, + 0x4b, 0xfe, 0x07, 0x19, 0x48, 0xc0, 0x9f, 0x50, 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, + 0x67, 0x68, 0x67, 0xcc, 0x33, 0x79, 0xc6, 0x42, 0xd3, 0xe8, 0x19, 0xfd, 0x5d, 0x1f, 0xcf, 0x73, + 0xbb, 0x53, 0xb2, 0x74, 0xc3, 0x21, 0xcd, 0xe2, 0x6f, 0x10, 0xe2, 0x53, 0x84, 0xf4, 0x22, 0x45, + 0x7e, 0x4b, 0xe5, 0x8f, 0xe6, 0xb9, 0x7d, 0x50, 0xe6, 0x6f, 0x7b, 0x0e, 0xd9, 0xd5, 0x8f, 0x41, + 0x88, 0xbb, 0xa8, 0xb5, 0xd8, 0xc8, 0xac, 0xf7, 0x8c, 0x7e, 0x83, 0x54, 0x6f, 0x9f, 0x5c, 0x4f, + 0x2d, 0xe3, 0x66, 0x6a, 0x19, 0xbf, 0xa6, 0x96, 0xf1, 0x63, 0x66, 0xd5, 0x6e, 0x66, 0x56, 0xed, + 0xe7, 0xcc, 0xaa, 0x7d, 0x7c, 0x15, 0x31, 0x79, 0x71, 0x39, 0x74, 0x29, 0x4f, 0x3c, 0xca, 0x45, + 0xc2, 0x85, 0xfe, 0x1c, 0x8b, 0x30, 0xf6, 0xbe, 0x7a, 0xd5, 0xf5, 0x3d, 0x3f, 0x3d, 0x5e, 0x1c, + 0xa0, 0xbc, 0x1a, 0x83, 0x18, 0x36, 0xd5, 0xf1, 0xbd, 0xfc, 0x13, 0x00, 0x00, 0xff, 0xff, 0x70, + 0xac, 0x09, 0x09, 0xef, 0x03, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -242,7 +250,7 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintGenesis(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x32 + dAtA[i] = 0x3a } } if len(m.RecvSequences) > 0 { @@ -256,7 +264,7 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintGenesis(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x2a + dAtA[i] = 0x32 } } if len(m.SendSequences) > 0 { @@ -270,6 +278,20 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintGenesis(dAtA, i, uint64(size)) } i-- + dAtA[i] = 0x2a + } + } + if len(m.Receipts) > 0 { + for iNdEx := len(m.Receipts) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Receipts[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- dAtA[i] = 0x22 } } @@ -395,6 +417,12 @@ func (m *GenesisState) Size() (n int) { n += 1 + l + sovGenesis(uint64(l)) } } + if len(m.Receipts) > 0 { + for _, e := range m.Receipts { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } if len(m.SendSequences) > 0 { for _, e := range m.SendSequences { l = e.Size() @@ -534,7 +562,7 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Acknowledgements = append(m.Acknowledgements, PacketAckCommitment{}) + m.Acknowledgements = append(m.Acknowledgements, PacketState{}) if err := m.Acknowledgements[len(m.Acknowledgements)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -568,12 +596,46 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Commitments = append(m.Commitments, PacketAckCommitment{}) + m.Commitments = append(m.Commitments, PacketState{}) if err := m.Commitments[len(m.Commitments)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Receipts", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Receipts = append(m.Receipts, PacketState{}) + if err := m.Receipts[len(m.Receipts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field SendSequences", wireType) } @@ -607,7 +669,7 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 5: + case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RecvSequences", wireType) } @@ -641,7 +703,7 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 6: + case 7: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field AckSequences", wireType) } diff --git a/x/ibc/core/04-channel/types/genesis_test.go b/x/ibc/core/04-channel/types/genesis_test.go index 8110a50614..c1dbfd76e0 100644 --- a/x/ibc/core/04-channel/types/genesis_test.go +++ b/x/ibc/core/04-channel/types/genesis_test.go @@ -48,11 +48,14 @@ func TestValidateGenesis(t *testing.T) { ), ), }, - []types.PacketAckCommitment{ - types.NewPacketAckCommitment(testPort2, testChannel2, 1, []byte("ack")), + []types.PacketState{ + types.NewPacketState(testPort2, testChannel2, 1, []byte("ack")), }, - []types.PacketAckCommitment{ - types.NewPacketAckCommitment(testPort1, testChannel1, 1, []byte("commit_hash")), + []types.PacketState{ + types.NewPacketState(testPort2, testChannel2, 1, []byte("")), + }, + []types.PacketState{ + types.NewPacketState(testPort1, testChannel1, 1, []byte("commit_hash")), }, []types.PacketSequence{ types.NewPacketSequence(testPort1, testChannel1, 1), @@ -82,8 +85,8 @@ func TestValidateGenesis(t *testing.T) { { name: "invalid ack", genState: types.GenesisState{ - Acknowledgements: []types.PacketAckCommitment{ - types.NewPacketAckCommitment(testPort2, testChannel2, 1, nil), + Acknowledgements: []types.PacketState{ + types.NewPacketState(testPort2, testChannel2, 1, nil), }, }, expPass: false, @@ -91,8 +94,8 @@ func TestValidateGenesis(t *testing.T) { { name: "invalid commitment", genState: types.GenesisState{ - Commitments: []types.PacketAckCommitment{ - types.NewPacketAckCommitment(testPort1, testChannel1, 1, nil), + Commitments: []types.PacketState{ + types.NewPacketState(testPort1, testChannel1, 1, nil), }, }, expPass: false, diff --git a/x/ibc/core/04-channel/types/query.go b/x/ibc/core/04-channel/types/query.go index debe1acb33..1f1962a6e5 100644 --- a/x/ibc/core/04-channel/types/query.go +++ b/x/ibc/core/04-channel/types/query.go @@ -45,6 +45,17 @@ func NewQueryPacketCommitmentResponse( } } +// NewQueryPacketReceiptResponse creates a new QueryPacketReceiptResponse instance +func NewQueryPacketReceiptResponse( + recvd bool, proof []byte, height clienttypes.Height, +) *QueryPacketReceiptResponse { + return &QueryPacketReceiptResponse{ + Received: recvd, + Proof: proof, + ProofHeight: height, + } +} + // NewQueryPacketAcknowledgementResponse creates a new QueryPacketAcknowledgementResponse instance func NewQueryPacketAcknowledgementResponse( acknowledgement []byte, proof []byte, height clienttypes.Height, diff --git a/x/ibc/core/04-channel/types/query.pb.go b/x/ibc/core/04-channel/types/query.pb.go index 073e2c5bec..d66ace7113 100644 --- a/x/ibc/core/04-channel/types/query.pb.go +++ b/x/ibc/core/04-channel/types/query.pb.go @@ -719,7 +719,7 @@ func (m *QueryPacketCommitmentRequest) GetSequence() uint64 { } // QueryPacketCommitmentResponse defines the client query response for a packet -// which also includes a proof, its path and the height form which the proof was +// which also includes a proof and the height from which the proof was // retrieved type QueryPacketCommitmentResponse struct { // packet associated with the request fields @@ -852,7 +852,7 @@ func (m *QueryPacketCommitmentsRequest) GetPagination() *query.PageRequest { // QueryPacketCommitmentsResponse is the request type for the // Query/QueryPacketCommitments RPC method type QueryPacketCommitmentsResponse struct { - Commitments []*PacketAckCommitment `protobuf:"bytes,1,rep,name=commitments,proto3" json:"commitments,omitempty"` + Commitments []*PacketState `protobuf:"bytes,1,rep,name=commitments,proto3" json:"commitments,omitempty"` // pagination response Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` // query block height @@ -892,7 +892,7 @@ func (m *QueryPacketCommitmentsResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QueryPacketCommitmentsResponse proto.InternalMessageInfo -func (m *QueryPacketCommitmentsResponse) GetCommitments() []*PacketAckCommitment { +func (m *QueryPacketCommitmentsResponse) GetCommitments() []*PacketState { if m != nil { return m.Commitments } @@ -913,6 +913,137 @@ func (m *QueryPacketCommitmentsResponse) GetHeight() types.Height { return types.Height{} } +// QueryPacketReceiptRequest is the request type for the +// Query/PacketReceipt RPC method +type QueryPacketReceiptRequest struct { + // port unique identifier + PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty"` + // channel unique identifier + ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` + // packet sequence + Sequence uint64 `protobuf:"varint,3,opt,name=sequence,proto3" json:"sequence,omitempty"` +} + +func (m *QueryPacketReceiptRequest) Reset() { *m = QueryPacketReceiptRequest{} } +func (m *QueryPacketReceiptRequest) String() string { return proto.CompactTextString(m) } +func (*QueryPacketReceiptRequest) ProtoMessage() {} +func (*QueryPacketReceiptRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_1034a1e9abc4cca1, []int{14} +} +func (m *QueryPacketReceiptRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryPacketReceiptRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryPacketReceiptRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryPacketReceiptRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryPacketReceiptRequest.Merge(m, src) +} +func (m *QueryPacketReceiptRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryPacketReceiptRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryPacketReceiptRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryPacketReceiptRequest proto.InternalMessageInfo + +func (m *QueryPacketReceiptRequest) GetPortId() string { + if m != nil { + return m.PortId + } + return "" +} + +func (m *QueryPacketReceiptRequest) GetChannelId() string { + if m != nil { + return m.ChannelId + } + return "" +} + +func (m *QueryPacketReceiptRequest) GetSequence() uint64 { + if m != nil { + return m.Sequence + } + return 0 +} + +// QueryPacketReceiptResponse defines the client query response for a packet receipt +// which also includes a proof, and the height from which the proof was +// retrieved +type QueryPacketReceiptResponse struct { + // success flag for if receipt exists + Received bool `protobuf:"varint,2,opt,name=received,proto3" json:"received,omitempty"` + // merkle proof of existence + Proof []byte `protobuf:"bytes,3,opt,name=proof,proto3" json:"proof,omitempty"` + // height at which the proof was retrieved + ProofHeight types.Height `protobuf:"bytes,4,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height"` +} + +func (m *QueryPacketReceiptResponse) Reset() { *m = QueryPacketReceiptResponse{} } +func (m *QueryPacketReceiptResponse) String() string { return proto.CompactTextString(m) } +func (*QueryPacketReceiptResponse) ProtoMessage() {} +func (*QueryPacketReceiptResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_1034a1e9abc4cca1, []int{15} +} +func (m *QueryPacketReceiptResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryPacketReceiptResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryPacketReceiptResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryPacketReceiptResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryPacketReceiptResponse.Merge(m, src) +} +func (m *QueryPacketReceiptResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryPacketReceiptResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryPacketReceiptResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryPacketReceiptResponse proto.InternalMessageInfo + +func (m *QueryPacketReceiptResponse) GetReceived() bool { + if m != nil { + return m.Received + } + return false +} + +func (m *QueryPacketReceiptResponse) GetProof() []byte { + if m != nil { + return m.Proof + } + return nil +} + +func (m *QueryPacketReceiptResponse) GetProofHeight() types.Height { + if m != nil { + return m.ProofHeight + } + return types.Height{} +} + // QueryPacketAcknowledgementRequest is the request type for the // Query/PacketAcknowledgement RPC method type QueryPacketAcknowledgementRequest struct { @@ -928,7 +1059,7 @@ func (m *QueryPacketAcknowledgementRequest) Reset() { *m = QueryPacketAc func (m *QueryPacketAcknowledgementRequest) String() string { return proto.CompactTextString(m) } func (*QueryPacketAcknowledgementRequest) ProtoMessage() {} func (*QueryPacketAcknowledgementRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_1034a1e9abc4cca1, []int{14} + return fileDescriptor_1034a1e9abc4cca1, []int{16} } func (m *QueryPacketAcknowledgementRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -979,7 +1110,7 @@ func (m *QueryPacketAcknowledgementRequest) GetSequence() uint64 { } // QueryPacketAcknowledgementResponse defines the client query response for a -// packet which also includes a proof, its path and the height form which the +// packet which also includes a proof and the height from which the // proof was retrieved type QueryPacketAcknowledgementResponse struct { // packet associated with the request fields @@ -994,7 +1125,7 @@ func (m *QueryPacketAcknowledgementResponse) Reset() { *m = QueryPacketA func (m *QueryPacketAcknowledgementResponse) String() string { return proto.CompactTextString(m) } func (*QueryPacketAcknowledgementResponse) ProtoMessage() {} func (*QueryPacketAcknowledgementResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_1034a1e9abc4cca1, []int{15} + return fileDescriptor_1034a1e9abc4cca1, []int{17} } func (m *QueryPacketAcknowledgementResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1044,6 +1175,135 @@ func (m *QueryPacketAcknowledgementResponse) GetProofHeight() types.Height { return types.Height{} } +// QueryPacketAcknowledgementsRequest is the request type for the +// Query/QueryPacketCommitments RPC method +type QueryPacketAcknowledgementsRequest struct { + // port unique identifier + PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty"` + // channel unique identifier + ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` + // pagination request + Pagination *query.PageRequest `protobuf:"bytes,3,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryPacketAcknowledgementsRequest) Reset() { *m = QueryPacketAcknowledgementsRequest{} } +func (m *QueryPacketAcknowledgementsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryPacketAcknowledgementsRequest) ProtoMessage() {} +func (*QueryPacketAcknowledgementsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_1034a1e9abc4cca1, []int{18} +} +func (m *QueryPacketAcknowledgementsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryPacketAcknowledgementsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryPacketAcknowledgementsRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryPacketAcknowledgementsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryPacketAcknowledgementsRequest.Merge(m, src) +} +func (m *QueryPacketAcknowledgementsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryPacketAcknowledgementsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryPacketAcknowledgementsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryPacketAcknowledgementsRequest proto.InternalMessageInfo + +func (m *QueryPacketAcknowledgementsRequest) GetPortId() string { + if m != nil { + return m.PortId + } + return "" +} + +func (m *QueryPacketAcknowledgementsRequest) GetChannelId() string { + if m != nil { + return m.ChannelId + } + return "" +} + +func (m *QueryPacketAcknowledgementsRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryPacketAcknowledgemetsResponse is the request type for the +// Query/QueryPacketAcknowledgements RPC method +type QueryPacketAcknowledgementsResponse struct { + Acknowledgements []*PacketState `protobuf:"bytes,1,rep,name=acknowledgements,proto3" json:"acknowledgements,omitempty"` + // pagination response + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` + // query block height + Height types.Height `protobuf:"bytes,3,opt,name=height,proto3" json:"height"` +} + +func (m *QueryPacketAcknowledgementsResponse) Reset() { *m = QueryPacketAcknowledgementsResponse{} } +func (m *QueryPacketAcknowledgementsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryPacketAcknowledgementsResponse) ProtoMessage() {} +func (*QueryPacketAcknowledgementsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_1034a1e9abc4cca1, []int{19} +} +func (m *QueryPacketAcknowledgementsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryPacketAcknowledgementsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryPacketAcknowledgementsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryPacketAcknowledgementsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryPacketAcknowledgementsResponse.Merge(m, src) +} +func (m *QueryPacketAcknowledgementsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryPacketAcknowledgementsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryPacketAcknowledgementsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryPacketAcknowledgementsResponse proto.InternalMessageInfo + +func (m *QueryPacketAcknowledgementsResponse) GetAcknowledgements() []*PacketState { + if m != nil { + return m.Acknowledgements + } + return nil +} + +func (m *QueryPacketAcknowledgementsResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + +func (m *QueryPacketAcknowledgementsResponse) GetHeight() types.Height { + if m != nil { + return m.Height + } + return types.Height{} +} + // QueryUnreceivedPacketsRequest is the request type for the // Query/UnreceivedPackets RPC method type QueryUnreceivedPacketsRequest struct { @@ -1059,7 +1319,7 @@ func (m *QueryUnreceivedPacketsRequest) Reset() { *m = QueryUnreceivedPa func (m *QueryUnreceivedPacketsRequest) String() string { return proto.CompactTextString(m) } func (*QueryUnreceivedPacketsRequest) ProtoMessage() {} func (*QueryUnreceivedPacketsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_1034a1e9abc4cca1, []int{16} + return fileDescriptor_1034a1e9abc4cca1, []int{20} } func (m *QueryUnreceivedPacketsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1122,7 +1382,7 @@ func (m *QueryUnreceivedPacketsResponse) Reset() { *m = QueryUnreceivedP func (m *QueryUnreceivedPacketsResponse) String() string { return proto.CompactTextString(m) } func (*QueryUnreceivedPacketsResponse) ProtoMessage() {} func (*QueryUnreceivedPacketsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_1034a1e9abc4cca1, []int{17} + return fileDescriptor_1034a1e9abc4cca1, []int{21} } func (m *QueryUnreceivedPacketsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1165,29 +1425,29 @@ func (m *QueryUnreceivedPacketsResponse) GetHeight() types.Height { return types.Height{} } -// QueryUnrelayedAcksRequest is the request type for the -// Query/UnrelayedAcks RPC method -type QueryUnrelayedAcksRequest struct { +// QueryUnreceivedAcks is the request type for the +// Query/UnreceivedAcks RPC method +type QueryUnreceivedAcksRequest struct { // port unique identifier PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty"` // channel unique identifier ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` - // list of commitment sequences - PacketCommitmentSequences []uint64 `protobuf:"varint,3,rep,packed,name=packet_commitment_sequences,json=packetCommitmentSequences,proto3" json:"packet_commitment_sequences,omitempty"` + // list of acknowledgement sequences + PacketAckSequences []uint64 `protobuf:"varint,3,rep,packed,name=packet_ack_sequences,json=packetAckSequences,proto3" json:"packet_ack_sequences,omitempty"` } -func (m *QueryUnrelayedAcksRequest) Reset() { *m = QueryUnrelayedAcksRequest{} } -func (m *QueryUnrelayedAcksRequest) String() string { return proto.CompactTextString(m) } -func (*QueryUnrelayedAcksRequest) ProtoMessage() {} -func (*QueryUnrelayedAcksRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_1034a1e9abc4cca1, []int{18} +func (m *QueryUnreceivedAcksRequest) Reset() { *m = QueryUnreceivedAcksRequest{} } +func (m *QueryUnreceivedAcksRequest) String() string { return proto.CompactTextString(m) } +func (*QueryUnreceivedAcksRequest) ProtoMessage() {} +func (*QueryUnreceivedAcksRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_1034a1e9abc4cca1, []int{22} } -func (m *QueryUnrelayedAcksRequest) XXX_Unmarshal(b []byte) error { +func (m *QueryUnreceivedAcksRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryUnrelayedAcksRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryUnreceivedAcksRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryUnrelayedAcksRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryUnreceivedAcksRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -1197,60 +1457,60 @@ func (m *QueryUnrelayedAcksRequest) XXX_Marshal(b []byte, deterministic bool) ([ return b[:n], nil } } -func (m *QueryUnrelayedAcksRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryUnrelayedAcksRequest.Merge(m, src) +func (m *QueryUnreceivedAcksRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryUnreceivedAcksRequest.Merge(m, src) } -func (m *QueryUnrelayedAcksRequest) XXX_Size() int { +func (m *QueryUnreceivedAcksRequest) XXX_Size() int { return m.Size() } -func (m *QueryUnrelayedAcksRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryUnrelayedAcksRequest.DiscardUnknown(m) +func (m *QueryUnreceivedAcksRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryUnreceivedAcksRequest.DiscardUnknown(m) } -var xxx_messageInfo_QueryUnrelayedAcksRequest proto.InternalMessageInfo +var xxx_messageInfo_QueryUnreceivedAcksRequest proto.InternalMessageInfo -func (m *QueryUnrelayedAcksRequest) GetPortId() string { +func (m *QueryUnreceivedAcksRequest) GetPortId() string { if m != nil { return m.PortId } return "" } -func (m *QueryUnrelayedAcksRequest) GetChannelId() string { +func (m *QueryUnreceivedAcksRequest) GetChannelId() string { if m != nil { return m.ChannelId } return "" } -func (m *QueryUnrelayedAcksRequest) GetPacketCommitmentSequences() []uint64 { +func (m *QueryUnreceivedAcksRequest) GetPacketAckSequences() []uint64 { if m != nil { - return m.PacketCommitmentSequences + return m.PacketAckSequences } return nil } -// QueryUnrelayedAcksResponse is the response type for the -// Query/UnrelayedAcks RPC method -type QueryUnrelayedAcksResponse struct { - // list of unrelayed acknowledgement sequences +// QueryUnreceivedAcksResponse is the response type for the +// Query/UnreceivedAcks RPC method +type QueryUnreceivedAcksResponse struct { + // list of unreceived acknowledgement sequences Sequences []uint64 `protobuf:"varint,1,rep,packed,name=sequences,proto3" json:"sequences,omitempty"` // query block height Height types.Height `protobuf:"bytes,2,opt,name=height,proto3" json:"height"` } -func (m *QueryUnrelayedAcksResponse) Reset() { *m = QueryUnrelayedAcksResponse{} } -func (m *QueryUnrelayedAcksResponse) String() string { return proto.CompactTextString(m) } -func (*QueryUnrelayedAcksResponse) ProtoMessage() {} -func (*QueryUnrelayedAcksResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_1034a1e9abc4cca1, []int{19} +func (m *QueryUnreceivedAcksResponse) Reset() { *m = QueryUnreceivedAcksResponse{} } +func (m *QueryUnreceivedAcksResponse) String() string { return proto.CompactTextString(m) } +func (*QueryUnreceivedAcksResponse) ProtoMessage() {} +func (*QueryUnreceivedAcksResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_1034a1e9abc4cca1, []int{23} } -func (m *QueryUnrelayedAcksResponse) XXX_Unmarshal(b []byte) error { +func (m *QueryUnreceivedAcksResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryUnrelayedAcksResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryUnreceivedAcksResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryUnrelayedAcksResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryUnreceivedAcksResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -1260,26 +1520,26 @@ func (m *QueryUnrelayedAcksResponse) XXX_Marshal(b []byte, deterministic bool) ( return b[:n], nil } } -func (m *QueryUnrelayedAcksResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryUnrelayedAcksResponse.Merge(m, src) +func (m *QueryUnreceivedAcksResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryUnreceivedAcksResponse.Merge(m, src) } -func (m *QueryUnrelayedAcksResponse) XXX_Size() int { +func (m *QueryUnreceivedAcksResponse) XXX_Size() int { return m.Size() } -func (m *QueryUnrelayedAcksResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryUnrelayedAcksResponse.DiscardUnknown(m) +func (m *QueryUnreceivedAcksResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryUnreceivedAcksResponse.DiscardUnknown(m) } -var xxx_messageInfo_QueryUnrelayedAcksResponse proto.InternalMessageInfo +var xxx_messageInfo_QueryUnreceivedAcksResponse proto.InternalMessageInfo -func (m *QueryUnrelayedAcksResponse) GetSequences() []uint64 { +func (m *QueryUnreceivedAcksResponse) GetSequences() []uint64 { if m != nil { return m.Sequences } return nil } -func (m *QueryUnrelayedAcksResponse) GetHeight() types.Height { +func (m *QueryUnreceivedAcksResponse) GetHeight() types.Height { if m != nil { return m.Height } @@ -1299,7 +1559,7 @@ func (m *QueryNextSequenceReceiveRequest) Reset() { *m = QueryNextSequen func (m *QueryNextSequenceReceiveRequest) String() string { return proto.CompactTextString(m) } func (*QueryNextSequenceReceiveRequest) ProtoMessage() {} func (*QueryNextSequenceReceiveRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_1034a1e9abc4cca1, []int{20} + return fileDescriptor_1034a1e9abc4cca1, []int{24} } func (m *QueryNextSequenceReceiveRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1357,7 +1617,7 @@ func (m *QueryNextSequenceReceiveResponse) Reset() { *m = QueryNextSeque func (m *QueryNextSequenceReceiveResponse) String() string { return proto.CompactTextString(m) } func (*QueryNextSequenceReceiveResponse) ProtoMessage() {} func (*QueryNextSequenceReceiveResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_1034a1e9abc4cca1, []int{21} + return fileDescriptor_1034a1e9abc4cca1, []int{25} } func (m *QueryNextSequenceReceiveResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1422,12 +1682,16 @@ func init() { proto.RegisterType((*QueryPacketCommitmentResponse)(nil), "ibc.core.channel.v1.QueryPacketCommitmentResponse") proto.RegisterType((*QueryPacketCommitmentsRequest)(nil), "ibc.core.channel.v1.QueryPacketCommitmentsRequest") proto.RegisterType((*QueryPacketCommitmentsResponse)(nil), "ibc.core.channel.v1.QueryPacketCommitmentsResponse") + proto.RegisterType((*QueryPacketReceiptRequest)(nil), "ibc.core.channel.v1.QueryPacketReceiptRequest") + proto.RegisterType((*QueryPacketReceiptResponse)(nil), "ibc.core.channel.v1.QueryPacketReceiptResponse") proto.RegisterType((*QueryPacketAcknowledgementRequest)(nil), "ibc.core.channel.v1.QueryPacketAcknowledgementRequest") proto.RegisterType((*QueryPacketAcknowledgementResponse)(nil), "ibc.core.channel.v1.QueryPacketAcknowledgementResponse") + proto.RegisterType((*QueryPacketAcknowledgementsRequest)(nil), "ibc.core.channel.v1.QueryPacketAcknowledgementsRequest") + proto.RegisterType((*QueryPacketAcknowledgementsResponse)(nil), "ibc.core.channel.v1.QueryPacketAcknowledgementsResponse") proto.RegisterType((*QueryUnreceivedPacketsRequest)(nil), "ibc.core.channel.v1.QueryUnreceivedPacketsRequest") proto.RegisterType((*QueryUnreceivedPacketsResponse)(nil), "ibc.core.channel.v1.QueryUnreceivedPacketsResponse") - proto.RegisterType((*QueryUnrelayedAcksRequest)(nil), "ibc.core.channel.v1.QueryUnrelayedAcksRequest") - proto.RegisterType((*QueryUnrelayedAcksResponse)(nil), "ibc.core.channel.v1.QueryUnrelayedAcksResponse") + proto.RegisterType((*QueryUnreceivedAcksRequest)(nil), "ibc.core.channel.v1.QueryUnreceivedAcksRequest") + proto.RegisterType((*QueryUnreceivedAcksResponse)(nil), "ibc.core.channel.v1.QueryUnreceivedAcksResponse") proto.RegisterType((*QueryNextSequenceReceiveRequest)(nil), "ibc.core.channel.v1.QueryNextSequenceReceiveRequest") proto.RegisterType((*QueryNextSequenceReceiveResponse)(nil), "ibc.core.channel.v1.QueryNextSequenceReceiveResponse") } @@ -1435,92 +1699,100 @@ func init() { func init() { proto.RegisterFile("ibc/core/channel/v1/query.proto", fileDescriptor_1034a1e9abc4cca1) } var fileDescriptor_1034a1e9abc4cca1 = []byte{ - // 1353 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x58, 0xcf, 0x6f, 0xdc, 0xc4, - 0x17, 0xcf, 0xec, 0x6e, 0xdb, 0xe4, 0x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6, 0xef, 0xd1, 0x4c, 0xc9, 0x70, 0x56, 0x6a, 0x05, 0x45, 0xb7, 0xca, 0x44, 0xfc, 0x17, - 0x9e, 0xff, 0xb9, 0x6a, 0x17, 0x57, 0xc9, 0x3a, 0xf1, 0xff, 0xdb, 0xfe, 0xe6, 0xb5, 0xab, 0x1e, - 0x12, 0x67, 0xa3, 0x42, 0xed, 0xc2, 0x51, 0xf6, 0x4f, 0x93, 0xa9, 0xbf, 0x02, 0x00, 0x00, 0xff, - 0xff, 0x4c, 0x6c, 0x44, 0xa5, 0x14, 0x18, 0x00, 0x00, + // 1488 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x59, 0xcf, 0x6f, 0x13, 0xc7, + 0x17, 0xcf, 0x38, 0x01, 0x92, 0xc7, 0xef, 0x49, 0x02, 0x61, 0x09, 0x4e, 0xf0, 0x57, 0x7c, 0x1b, + 0x90, 0xd8, 0x21, 0x81, 0xd2, 0xa8, 0x6a, 0x91, 0x48, 0xa4, 0x42, 0xaa, 0xf2, 0x6b, 0x29, 0x2a, + 0x20, 0xb5, 0xee, 0x7a, 0x3d, 0x38, 0xab, 0x24, 0xbb, 0xc6, 0xbb, 0x36, 0x41, 0xa9, 0xab, 0xaa, + 0x95, 0x80, 0x53, 0x55, 0x89, 0x43, 0xa5, 0x5e, 0x2a, 0x55, 0xbd, 0x70, 0xec, 0x5f, 0xd0, 0x2b, + 0xb7, 0x22, 0xd1, 0x43, 0x25, 0x24, 0x5a, 0x91, 0x4a, 0xf4, 0xda, 0x4b, 0xcf, 0xd5, 0xce, 0xbc, + 0x5d, 0xef, 0xda, 0xbb, 0x9b, 0x38, 0x8e, 0xa5, 0xa8, 0xa7, 0x78, 0x67, 0xe7, 0xbd, 0xf9, 0x7c, + 0x3e, 0x6f, 0xde, 0xf3, 0x7b, 0x0e, 0x8c, 0x99, 0x05, 0x83, 0x19, 0x76, 0x85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, 0xf4, 0x62, 0x07, 0x12, 0x44, 0xfa, 0xf0, + 0x19, 0xed, 0xe9, 0xab, 0x2c, 0x79, 0xf6, 0x2a, 0x4b, 0xfe, 0x78, 0x95, 0x25, 0xdf, 0xac, 0x66, + 0x7b, 0x9e, 0xad, 0x66, 0x7b, 0x7e, 0x5b, 0xcd, 0xf6, 0xdc, 0x9e, 0x2e, 0x99, 0xee, 0x7c, 0xb5, + 0xa0, 0x1a, 0xf6, 0x12, 0xc3, 0x7f, 0xe8, 0xc9, 0x3f, 0x27, 0x9d, 0xe2, 0x02, 0x5b, 0x66, 0xc1, + 0x3f, 0xee, 0x4e, 0x9d, 0x39, 0xe9, 0x23, 0x71, 0xef, 0x97, 0xb9, 0x53, 0xd8, 0x2e, 0x7e, 0x7f, + 0x3d, 0xfd, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x07, 0x22, 0x97, 0x6e, 0x5f, 0x1c, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1550,17 +1822,22 @@ type QueryClient interface { ChannelConsensusState(ctx context.Context, in *QueryChannelConsensusStateRequest, opts ...grpc.CallOption) (*QueryChannelConsensusStateResponse, error) // PacketCommitment queries a stored packet commitment hash. PacketCommitment(ctx context.Context, in *QueryPacketCommitmentRequest, opts ...grpc.CallOption) (*QueryPacketCommitmentResponse, error) - // PacketCommitments returns the all the packet commitments hashes associated + // PacketCommitments returns all the packet commitments hashes associated // with a channel. PacketCommitments(ctx context.Context, in *QueryPacketCommitmentsRequest, opts ...grpc.CallOption) (*QueryPacketCommitmentsResponse, error) + // PacketReceipt queries if a given packet sequence has been received on the queried chain + PacketReceipt(ctx context.Context, in *QueryPacketReceiptRequest, opts ...grpc.CallOption) (*QueryPacketReceiptResponse, error) // PacketAcknowledgement queries a stored packet acknowledgement hash. PacketAcknowledgement(ctx context.Context, in *QueryPacketAcknowledgementRequest, opts ...grpc.CallOption) (*QueryPacketAcknowledgementResponse, error) - // UnreceivedPackets returns all the unrelayed IBC packets associated with a + // PacketAcknowledgements returns all the packet acknowledgements associated + // with a channel. + PacketAcknowledgements(ctx context.Context, in *QueryPacketAcknowledgementsRequest, opts ...grpc.CallOption) (*QueryPacketAcknowledgementsResponse, error) + // UnreceivedPackets returns all the unreceived IBC packets associated with a // channel and sequences. UnreceivedPackets(ctx context.Context, in *QueryUnreceivedPacketsRequest, opts ...grpc.CallOption) (*QueryUnreceivedPacketsResponse, error) - // UnrelayedAcks returns all the unrelayed IBC acknowledgements associated with a + // UnreceivedAcks returns all the unreceived IBC acknowledgements associated with a // channel and sequences. - UnrelayedAcks(ctx context.Context, in *QueryUnrelayedAcksRequest, opts ...grpc.CallOption) (*QueryUnrelayedAcksResponse, error) + UnreceivedAcks(ctx context.Context, in *QueryUnreceivedAcksRequest, opts ...grpc.CallOption) (*QueryUnreceivedAcksResponse, error) // NextSequenceReceive returns the next receive sequence for a given channel. NextSequenceReceive(ctx context.Context, in *QueryNextSequenceReceiveRequest, opts ...grpc.CallOption) (*QueryNextSequenceReceiveResponse, error) } @@ -1636,6 +1913,15 @@ func (c *queryClient) PacketCommitments(ctx context.Context, in *QueryPacketComm return out, nil } +func (c *queryClient) PacketReceipt(ctx context.Context, in *QueryPacketReceiptRequest, opts ...grpc.CallOption) (*QueryPacketReceiptResponse, error) { + out := new(QueryPacketReceiptResponse) + err := c.cc.Invoke(ctx, "/ibc.core.channel.v1.Query/PacketReceipt", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *queryClient) PacketAcknowledgement(ctx context.Context, in *QueryPacketAcknowledgementRequest, opts ...grpc.CallOption) (*QueryPacketAcknowledgementResponse, error) { out := new(QueryPacketAcknowledgementResponse) err := c.cc.Invoke(ctx, "/ibc.core.channel.v1.Query/PacketAcknowledgement", in, out, opts...) @@ -1645,6 +1931,15 @@ func (c *queryClient) PacketAcknowledgement(ctx context.Context, in *QueryPacket return out, nil } +func (c *queryClient) PacketAcknowledgements(ctx context.Context, in *QueryPacketAcknowledgementsRequest, opts ...grpc.CallOption) (*QueryPacketAcknowledgementsResponse, error) { + out := new(QueryPacketAcknowledgementsResponse) + err := c.cc.Invoke(ctx, "/ibc.core.channel.v1.Query/PacketAcknowledgements", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *queryClient) UnreceivedPackets(ctx context.Context, in *QueryUnreceivedPacketsRequest, opts ...grpc.CallOption) (*QueryUnreceivedPacketsResponse, error) { out := new(QueryUnreceivedPacketsResponse) err := c.cc.Invoke(ctx, "/ibc.core.channel.v1.Query/UnreceivedPackets", in, out, opts...) @@ -1654,9 +1949,9 @@ func (c *queryClient) UnreceivedPackets(ctx context.Context, in *QueryUnreceived return out, nil } -func (c *queryClient) UnrelayedAcks(ctx context.Context, in *QueryUnrelayedAcksRequest, opts ...grpc.CallOption) (*QueryUnrelayedAcksResponse, error) { - out := new(QueryUnrelayedAcksResponse) - err := c.cc.Invoke(ctx, "/ibc.core.channel.v1.Query/UnrelayedAcks", in, out, opts...) +func (c *queryClient) UnreceivedAcks(ctx context.Context, in *QueryUnreceivedAcksRequest, opts ...grpc.CallOption) (*QueryUnreceivedAcksResponse, error) { + out := new(QueryUnreceivedAcksResponse) + err := c.cc.Invoke(ctx, "/ibc.core.channel.v1.Query/UnreceivedAcks", in, out, opts...) if err != nil { return nil, err } @@ -1689,17 +1984,22 @@ type QueryServer interface { ChannelConsensusState(context.Context, *QueryChannelConsensusStateRequest) (*QueryChannelConsensusStateResponse, error) // PacketCommitment queries a stored packet commitment hash. PacketCommitment(context.Context, *QueryPacketCommitmentRequest) (*QueryPacketCommitmentResponse, error) - // PacketCommitments returns the all the packet commitments hashes associated + // PacketCommitments returns all the packet commitments hashes associated // with a channel. PacketCommitments(context.Context, *QueryPacketCommitmentsRequest) (*QueryPacketCommitmentsResponse, error) + // PacketReceipt queries if a given packet sequence has been received on the queried chain + PacketReceipt(context.Context, *QueryPacketReceiptRequest) (*QueryPacketReceiptResponse, error) // PacketAcknowledgement queries a stored packet acknowledgement hash. PacketAcknowledgement(context.Context, *QueryPacketAcknowledgementRequest) (*QueryPacketAcknowledgementResponse, error) - // UnreceivedPackets returns all the unrelayed IBC packets associated with a + // PacketAcknowledgements returns all the packet acknowledgements associated + // with a channel. + PacketAcknowledgements(context.Context, *QueryPacketAcknowledgementsRequest) (*QueryPacketAcknowledgementsResponse, error) + // UnreceivedPackets returns all the unreceived IBC packets associated with a // channel and sequences. UnreceivedPackets(context.Context, *QueryUnreceivedPacketsRequest) (*QueryUnreceivedPacketsResponse, error) - // UnrelayedAcks returns all the unrelayed IBC acknowledgements associated with a + // UnreceivedAcks returns all the unreceived IBC acknowledgements associated with a // channel and sequences. - UnrelayedAcks(context.Context, *QueryUnrelayedAcksRequest) (*QueryUnrelayedAcksResponse, error) + UnreceivedAcks(context.Context, *QueryUnreceivedAcksRequest) (*QueryUnreceivedAcksResponse, error) // NextSequenceReceive returns the next receive sequence for a given channel. NextSequenceReceive(context.Context, *QueryNextSequenceReceiveRequest) (*QueryNextSequenceReceiveResponse, error) } @@ -1729,14 +2029,20 @@ func (*UnimplementedQueryServer) PacketCommitment(ctx context.Context, req *Quer func (*UnimplementedQueryServer) PacketCommitments(ctx context.Context, req *QueryPacketCommitmentsRequest) (*QueryPacketCommitmentsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method PacketCommitments not implemented") } +func (*UnimplementedQueryServer) PacketReceipt(ctx context.Context, req *QueryPacketReceiptRequest) (*QueryPacketReceiptResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PacketReceipt not implemented") +} func (*UnimplementedQueryServer) PacketAcknowledgement(ctx context.Context, req *QueryPacketAcknowledgementRequest) (*QueryPacketAcknowledgementResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method PacketAcknowledgement not implemented") } +func (*UnimplementedQueryServer) PacketAcknowledgements(ctx context.Context, req *QueryPacketAcknowledgementsRequest) (*QueryPacketAcknowledgementsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PacketAcknowledgements not implemented") +} func (*UnimplementedQueryServer) UnreceivedPackets(ctx context.Context, req *QueryUnreceivedPacketsRequest) (*QueryUnreceivedPacketsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UnreceivedPackets not implemented") } -func (*UnimplementedQueryServer) UnrelayedAcks(ctx context.Context, req *QueryUnrelayedAcksRequest) (*QueryUnrelayedAcksResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UnrelayedAcks not implemented") +func (*UnimplementedQueryServer) UnreceivedAcks(ctx context.Context, req *QueryUnreceivedAcksRequest) (*QueryUnreceivedAcksResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UnreceivedAcks not implemented") } func (*UnimplementedQueryServer) NextSequenceReceive(ctx context.Context, req *QueryNextSequenceReceiveRequest) (*QueryNextSequenceReceiveResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method NextSequenceReceive not implemented") @@ -1872,6 +2178,24 @@ func _Query_PacketCommitments_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } +func _Query_PacketReceipt_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryPacketReceiptRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).PacketReceipt(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ibc.core.channel.v1.Query/PacketReceipt", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).PacketReceipt(ctx, req.(*QueryPacketReceiptRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _Query_PacketAcknowledgement_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryPacketAcknowledgementRequest) if err := dec(in); err != nil { @@ -1890,6 +2214,24 @@ func _Query_PacketAcknowledgement_Handler(srv interface{}, ctx context.Context, return interceptor(ctx, in, info, handler) } +func _Query_PacketAcknowledgements_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryPacketAcknowledgementsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).PacketAcknowledgements(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ibc.core.channel.v1.Query/PacketAcknowledgements", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).PacketAcknowledgements(ctx, req.(*QueryPacketAcknowledgementsRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _Query_UnreceivedPackets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryUnreceivedPacketsRequest) if err := dec(in); err != nil { @@ -1908,20 +2250,20 @@ func _Query_UnreceivedPackets_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } -func _Query_UnrelayedAcks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryUnrelayedAcksRequest) +func _Query_UnreceivedAcks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryUnreceivedAcksRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(QueryServer).UnrelayedAcks(ctx, in) + return srv.(QueryServer).UnreceivedAcks(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/ibc.core.channel.v1.Query/UnrelayedAcks", + FullMethod: "/ibc.core.channel.v1.Query/UnreceivedAcks", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).UnrelayedAcks(ctx, req.(*QueryUnrelayedAcksRequest)) + return srv.(QueryServer).UnreceivedAcks(ctx, req.(*QueryUnreceivedAcksRequest)) } return interceptor(ctx, in, info, handler) } @@ -1976,17 +2318,25 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "PacketCommitments", Handler: _Query_PacketCommitments_Handler, }, + { + MethodName: "PacketReceipt", + Handler: _Query_PacketReceipt_Handler, + }, { MethodName: "PacketAcknowledgement", Handler: _Query_PacketAcknowledgement_Handler, }, + { + MethodName: "PacketAcknowledgements", + Handler: _Query_PacketAcknowledgements_Handler, + }, { MethodName: "UnreceivedPackets", Handler: _Query_UnreceivedPackets_Handler, }, { - MethodName: "UnrelayedAcks", - Handler: _Query_UnrelayedAcks_Handler, + MethodName: "UnreceivedAcks", + Handler: _Query_UnreceivedAcks_Handler, }, { MethodName: "NextSequenceReceive", @@ -2673,6 +3023,98 @@ func (m *QueryPacketCommitmentsResponse) MarshalToSizedBuffer(dAtA []byte) (int, return len(dAtA) - i, nil } +func (m *QueryPacketReceiptRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryPacketReceiptRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryPacketReceiptRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Sequence != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.Sequence)) + i-- + dAtA[i] = 0x18 + } + if len(m.ChannelId) > 0 { + i -= len(m.ChannelId) + copy(dAtA[i:], m.ChannelId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.ChannelId))) + i-- + dAtA[i] = 0x12 + } + if len(m.PortId) > 0 { + i -= len(m.PortId) + copy(dAtA[i:], m.PortId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.PortId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryPacketReceiptResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryPacketReceiptResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryPacketReceiptResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + if len(m.Proof) > 0 { + i -= len(m.Proof) + copy(dAtA[i:], m.Proof) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Proof))) + i-- + dAtA[i] = 0x1a + } + if m.Received { + i-- + if m.Received { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 + } + return len(dAtA) - i, nil +} + func (m *QueryPacketAcknowledgementRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -2762,6 +3204,114 @@ func (m *QueryPacketAcknowledgementResponse) MarshalToSizedBuffer(dAtA []byte) ( return len(dAtA) - i, nil } +func (m *QueryPacketAcknowledgementsRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryPacketAcknowledgementsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryPacketAcknowledgementsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if len(m.ChannelId) > 0 { + i -= len(m.ChannelId) + copy(dAtA[i:], m.ChannelId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.ChannelId))) + i-- + dAtA[i] = 0x12 + } + if len(m.PortId) > 0 { + i -= len(m.PortId) + copy(dAtA[i:], m.PortId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.PortId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryPacketAcknowledgementsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryPacketAcknowledgementsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryPacketAcknowledgementsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Height.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Acknowledgements) > 0 { + for iNdEx := len(m.Acknowledgements) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Acknowledgements[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + func (m *QueryUnreceivedPacketsRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -2783,20 +3333,20 @@ func (m *QueryUnreceivedPacketsRequest) MarshalToSizedBuffer(dAtA []byte) (int, var l int _ = l if len(m.PacketCommitmentSequences) > 0 { - dAtA19 := make([]byte, len(m.PacketCommitmentSequences)*10) - var j18 int + dAtA23 := make([]byte, len(m.PacketCommitmentSequences)*10) + var j22 int for _, num := range m.PacketCommitmentSequences { for num >= 1<<7 { - dAtA19[j18] = uint8(uint64(num)&0x7f | 0x80) + dAtA23[j22] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 - j18++ + j22++ } - dAtA19[j18] = uint8(num) - j18++ + dAtA23[j22] = uint8(num) + j22++ } - i -= j18 - copy(dAtA[i:], dAtA19[:j18]) - i = encodeVarintQuery(dAtA, i, uint64(j18)) + i -= j22 + copy(dAtA[i:], dAtA23[:j22]) + i = encodeVarintQuery(dAtA, i, uint64(j22)) i-- dAtA[i] = 0x1a } @@ -2848,27 +3398,27 @@ func (m *QueryUnreceivedPacketsResponse) MarshalToSizedBuffer(dAtA []byte) (int, i-- dAtA[i] = 0x12 if len(m.Sequences) > 0 { - dAtA22 := make([]byte, len(m.Sequences)*10) - var j21 int + dAtA26 := make([]byte, len(m.Sequences)*10) + var j25 int for _, num := range m.Sequences { for num >= 1<<7 { - dAtA22[j21] = uint8(uint64(num)&0x7f | 0x80) + dAtA26[j25] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 - j21++ + j25++ } - dAtA22[j21] = uint8(num) - j21++ + dAtA26[j25] = uint8(num) + j25++ } - i -= j21 - copy(dAtA[i:], dAtA22[:j21]) - i = encodeVarintQuery(dAtA, i, uint64(j21)) + i -= j25 + copy(dAtA[i:], dAtA26[:j25]) + i = encodeVarintQuery(dAtA, i, uint64(j25)) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *QueryUnrelayedAcksRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryUnreceivedAcksRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2878,31 +3428,31 @@ func (m *QueryUnrelayedAcksRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryUnrelayedAcksRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryUnreceivedAcksRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryUnrelayedAcksRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryUnreceivedAcksRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.PacketCommitmentSequences) > 0 { - dAtA24 := make([]byte, len(m.PacketCommitmentSequences)*10) - var j23 int - for _, num := range m.PacketCommitmentSequences { + if len(m.PacketAckSequences) > 0 { + dAtA28 := make([]byte, len(m.PacketAckSequences)*10) + var j27 int + for _, num := range m.PacketAckSequences { for num >= 1<<7 { - dAtA24[j23] = uint8(uint64(num)&0x7f | 0x80) + dAtA28[j27] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 - j23++ + j27++ } - dAtA24[j23] = uint8(num) - j23++ + dAtA28[j27] = uint8(num) + j27++ } - i -= j23 - copy(dAtA[i:], dAtA24[:j23]) - i = encodeVarintQuery(dAtA, i, uint64(j23)) + i -= j27 + copy(dAtA[i:], dAtA28[:j27]) + i = encodeVarintQuery(dAtA, i, uint64(j27)) i-- dAtA[i] = 0x1a } @@ -2923,7 +3473,7 @@ func (m *QueryUnrelayedAcksRequest) MarshalToSizedBuffer(dAtA []byte) (int, erro return len(dAtA) - i, nil } -func (m *QueryUnrelayedAcksResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryUnreceivedAcksResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2933,12 +3483,12 @@ func (m *QueryUnrelayedAcksResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryUnrelayedAcksResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryUnreceivedAcksResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryUnrelayedAcksResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryUnreceivedAcksResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2954,20 +3504,20 @@ func (m *QueryUnrelayedAcksResponse) MarshalToSizedBuffer(dAtA []byte) (int, err i-- dAtA[i] = 0x12 if len(m.Sequences) > 0 { - dAtA27 := make([]byte, len(m.Sequences)*10) - var j26 int + dAtA31 := make([]byte, len(m.Sequences)*10) + var j30 int for _, num := range m.Sequences { for num >= 1<<7 { - dAtA27[j26] = uint8(uint64(num)&0x7f | 0x80) + dAtA31[j30] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 - j26++ + j30++ } - dAtA27[j26] = uint8(num) - j26++ + dAtA31[j30] = uint8(num) + j30++ } - i -= j26 - copy(dAtA[i:], dAtA27[:j26]) - i = encodeVarintQuery(dAtA, i, uint64(j26)) + i -= j30 + copy(dAtA[i:], dAtA31[:j30]) + i = encodeVarintQuery(dAtA, i, uint64(j30)) i-- dAtA[i] = 0xa } @@ -3338,6 +3888,44 @@ func (m *QueryPacketCommitmentsResponse) Size() (n int) { return n } +func (m *QueryPacketReceiptRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.PortId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.ChannelId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.Sequence != 0 { + n += 1 + sovQuery(uint64(m.Sequence)) + } + return n +} + +func (m *QueryPacketReceiptResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Received { + n += 2 + } + l = len(m.Proof) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = m.ProofHeight.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + func (m *QueryPacketAcknowledgementRequest) Size() (n int) { if m == nil { return 0 @@ -3377,6 +3965,48 @@ func (m *QueryPacketAcknowledgementResponse) Size() (n int) { return n } +func (m *QueryPacketAcknowledgementsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.PortId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.ChannelId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryPacketAcknowledgementsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Acknowledgements) > 0 { + for _, e := range m.Acknowledgements { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + l = m.Height.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + func (m *QueryUnreceivedPacketsRequest) Size() (n int) { if m == nil { return 0 @@ -3419,7 +4049,7 @@ func (m *QueryUnreceivedPacketsResponse) Size() (n int) { return n } -func (m *QueryUnrelayedAcksRequest) Size() (n int) { +func (m *QueryUnreceivedAcksRequest) Size() (n int) { if m == nil { return 0 } @@ -3433,9 +4063,9 @@ func (m *QueryUnrelayedAcksRequest) Size() (n int) { if l > 0 { n += 1 + l + sovQuery(uint64(l)) } - if len(m.PacketCommitmentSequences) > 0 { + if len(m.PacketAckSequences) > 0 { l = 0 - for _, e := range m.PacketCommitmentSequences { + for _, e := range m.PacketAckSequences { l += sovQuery(uint64(e)) } n += 1 + sovQuery(uint64(l)) + l @@ -3443,7 +4073,7 @@ func (m *QueryUnrelayedAcksRequest) Size() (n int) { return n } -func (m *QueryUnrelayedAcksResponse) Size() (n int) { +func (m *QueryUnreceivedAcksResponse) Size() (n int) { if m == nil { return 0 } @@ -5414,7 +6044,7 @@ func (m *QueryPacketCommitmentsResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Commitments = append(m.Commitments, &PacketAckCommitment{}) + m.Commitments = append(m.Commitments, &PacketState{}) if err := m.Commitments[len(m.Commitments)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -5512,6 +6142,282 @@ func (m *QueryPacketCommitmentsResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *QueryPacketReceiptRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryPacketReceiptRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryPacketReceiptRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PortId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PortId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChannelId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ChannelId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) + } + m.Sequence = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Sequence |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryPacketReceiptResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryPacketReceiptResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryPacketReceiptResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Received", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Received = bool(v != 0) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Proof", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Proof = append(m.Proof[:0], dAtA[iNdEx:postIndex]...) + if m.Proof == nil { + m.Proof = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ProofHeight", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ProofHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *QueryPacketAcknowledgementRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -5802,6 +6708,315 @@ func (m *QueryPacketAcknowledgementResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *QueryPacketAcknowledgementsRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryPacketAcknowledgementsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryPacketAcknowledgementsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PortId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PortId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChannelId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ChannelId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageRequest{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryPacketAcknowledgementsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryPacketAcknowledgementsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryPacketAcknowledgementsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Acknowledgements", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Acknowledgements = append(m.Acknowledgements, &PacketState{}) + if err := m.Acknowledgements[len(m.Acknowledgements)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Height.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *QueryUnreceivedPacketsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -6157,7 +7372,7 @@ func (m *QueryUnreceivedPacketsResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryUnrelayedAcksRequest) Unmarshal(dAtA []byte) error { +func (m *QueryUnreceivedAcksRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6180,10 +7395,10 @@ func (m *QueryUnrelayedAcksRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryUnrelayedAcksRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryUnreceivedAcksRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryUnrelayedAcksRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryUnreceivedAcksRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -6267,7 +7482,7 @@ func (m *QueryUnrelayedAcksRequest) Unmarshal(dAtA []byte) error { break } } - m.PacketCommitmentSequences = append(m.PacketCommitmentSequences, v) + m.PacketAckSequences = append(m.PacketAckSequences, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { @@ -6302,8 +7517,8 @@ func (m *QueryUnrelayedAcksRequest) Unmarshal(dAtA []byte) error { } } elementCount = count - if elementCount != 0 && len(m.PacketCommitmentSequences) == 0 { - m.PacketCommitmentSequences = make([]uint64, 0, elementCount) + if elementCount != 0 && len(m.PacketAckSequences) == 0 { + m.PacketAckSequences = make([]uint64, 0, elementCount) } for iNdEx < postIndex { var v uint64 @@ -6321,10 +7536,10 @@ func (m *QueryUnrelayedAcksRequest) Unmarshal(dAtA []byte) error { break } } - m.PacketCommitmentSequences = append(m.PacketCommitmentSequences, v) + m.PacketAckSequences = append(m.PacketAckSequences, v) } } else { - return fmt.Errorf("proto: wrong wireType = %d for field PacketCommitmentSequences", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field PacketAckSequences", wireType) } default: iNdEx = preIndex @@ -6350,7 +7565,7 @@ func (m *QueryUnrelayedAcksRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryUnrelayedAcksResponse) Unmarshal(dAtA []byte) error { +func (m *QueryUnreceivedAcksResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6373,10 +7588,10 @@ func (m *QueryUnrelayedAcksResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryUnrelayedAcksResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryUnreceivedAcksResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryUnrelayedAcksResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryUnreceivedAcksResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: diff --git a/x/ibc/core/04-channel/types/query.pb.gw.go b/x/ibc/core/04-channel/types/query.pb.gw.go index 8b74a6799c..a2ae71d96b 100644 --- a/x/ibc/core/04-channel/types/query.pb.gw.go +++ b/x/ibc/core/04-channel/types/query.pb.gw.go @@ -603,6 +603,104 @@ func local_request_Query_PacketCommitments_0(ctx context.Context, marshaler runt } +func request_Query_PacketReceipt_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryPacketReceiptRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["channel_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "channel_id") + } + + protoReq.ChannelId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "channel_id", err) + } + + val, ok = pathParams["port_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "port_id") + } + + protoReq.PortId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "port_id", err) + } + + val, ok = pathParams["sequence"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "sequence") + } + + protoReq.Sequence, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "sequence", err) + } + + msg, err := client.PacketReceipt(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_PacketReceipt_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryPacketReceiptRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["channel_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "channel_id") + } + + protoReq.ChannelId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "channel_id", err) + } + + val, ok = pathParams["port_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "port_id") + } + + protoReq.PortId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "port_id", err) + } + + val, ok = pathParams["sequence"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "sequence") + } + + protoReq.Sequence, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "sequence", err) + } + + msg, err := server.PacketReceipt(ctx, &protoReq) + return msg, metadata, err + +} + func request_Query_PacketAcknowledgement_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryPacketAcknowledgementRequest var metadata runtime.ServerMetadata @@ -701,6 +799,100 @@ func local_request_Query_PacketAcknowledgement_0(ctx context.Context, marshaler } +var ( + filter_Query_PacketAcknowledgements_0 = &utilities.DoubleArray{Encoding: map[string]int{"channel_id": 0, "port_id": 1}, Base: []int{1, 1, 2, 0, 0}, Check: []int{0, 1, 1, 2, 3}} +) + +func request_Query_PacketAcknowledgements_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryPacketAcknowledgementsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["channel_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "channel_id") + } + + protoReq.ChannelId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "channel_id", err) + } + + val, ok = pathParams["port_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "port_id") + } + + protoReq.PortId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "port_id", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_PacketAcknowledgements_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.PacketAcknowledgements(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_PacketAcknowledgements_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryPacketAcknowledgementsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["channel_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "channel_id") + } + + protoReq.ChannelId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "channel_id", err) + } + + val, ok = pathParams["port_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "port_id") + } + + protoReq.PortId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "port_id", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_PacketAcknowledgements_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.PacketAcknowledgements(ctx, &protoReq) + return msg, metadata, err + +} + func request_Query_UnreceivedPackets_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryUnreceivedPacketsRequest var metadata runtime.ServerMetadata @@ -799,8 +991,8 @@ func local_request_Query_UnreceivedPackets_0(ctx context.Context, marshaler runt } -func request_Query_UnrelayedAcks_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryUnrelayedAcksRequest +func request_Query_UnreceivedAcks_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryUnreceivedAcksRequest var metadata runtime.ServerMetadata var ( @@ -832,24 +1024,24 @@ func request_Query_UnrelayedAcks_0(ctx context.Context, marshaler runtime.Marsha return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "port_id", err) } - val, ok = pathParams["packet_commitment_sequences"] + val, ok = pathParams["packet_ack_sequences"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_commitment_sequences") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_ack_sequences") } - protoReq.PacketCommitmentSequences, err = runtime.Uint64Slice(val, ",") + protoReq.PacketAckSequences, err = runtime.Uint64Slice(val, ",") if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_commitment_sequences", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_ack_sequences", err) } - msg, err := client.UnrelayedAcks(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.UnreceivedAcks(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_Query_UnrelayedAcks_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryUnrelayedAcksRequest +func local_request_Query_UnreceivedAcks_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryUnreceivedAcksRequest var metadata runtime.ServerMetadata var ( @@ -881,18 +1073,18 @@ func local_request_Query_UnrelayedAcks_0(ctx context.Context, marshaler runtime. return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "port_id", err) } - val, ok = pathParams["packet_commitment_sequences"] + val, ok = pathParams["packet_ack_sequences"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_commitment_sequences") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_ack_sequences") } - protoReq.PacketCommitmentSequences, err = runtime.Uint64Slice(val, ",") + protoReq.PacketAckSequences, err = runtime.Uint64Slice(val, ",") if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_commitment_sequences", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_ack_sequences", err) } - msg, err := server.UnrelayedAcks(ctx, &protoReq) + msg, err := server.UnreceivedAcks(ctx, &protoReq) return msg, metadata, err } @@ -1119,6 +1311,26 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_PacketReceipt_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_PacketReceipt_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_PacketReceipt_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_Query_PacketAcknowledgement_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -1139,6 +1351,26 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_PacketAcknowledgements_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_PacketAcknowledgements_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_PacketAcknowledgements_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_Query_UnreceivedPackets_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -1159,7 +1391,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) - mux.Handle("GET", pattern_Query_UnrelayedAcks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_UnreceivedAcks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -1168,14 +1400,14 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_UnrelayedAcks_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_UnreceivedAcks_0(rctx, inboundMarshaler, server, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Query_UnrelayedAcks_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_UnreceivedAcks_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -1380,6 +1612,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_PacketReceipt_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_PacketReceipt_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_PacketReceipt_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_Query_PacketAcknowledgement_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -1400,6 +1652,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_PacketAcknowledgements_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_PacketAcknowledgements_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_PacketAcknowledgements_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_Query_UnreceivedPackets_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -1420,7 +1692,7 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) - mux.Handle("GET", pattern_Query_UnrelayedAcks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_UnreceivedAcks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -1429,14 +1701,14 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_UnrelayedAcks_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Query_UnreceivedAcks_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Query_UnrelayedAcks_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_UnreceivedAcks_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -1478,11 +1750,15 @@ var ( pattern_Query_PacketCommitments_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6, 2, 7}, []string{"ibc", "channel", "v1beta1", "channels", "channel_id", "ports", "port_id", "packet_commitments"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_PacketReceipt_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6, 2, 7, 1, 0, 4, 1, 5, 8}, []string{"ibc", "channel", "v1beta1", "channels", "channel_id", "ports", "port_id", "packet_receipts", "sequence"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_PacketAcknowledgement_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6, 2, 7, 1, 0, 4, 1, 5, 8}, []string{"ibc", "channel", "v1beta1", "channels", "channel_id", "ports", "port_id", "packet_acks", "sequence"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_PacketAcknowledgements_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6, 2, 7}, []string{"ibc", "channel", "v1beta1", "channels", "channel_id", "ports", "port_id", "packet_acknowledgements"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_UnreceivedPackets_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6, 2, 7, 1, 0, 4, 1, 5, 8, 2, 9}, []string{"ibc", "channel", "v1beta1", "channels", "channel_id", "ports", "port_id", "packet_commitments", "packet_commitment_sequences", "unreceived_packets"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Query_UnrelayedAcks_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6, 2, 7, 1, 0, 4, 1, 5, 8, 2, 9}, []string{"ibc", "channel", "v1beta1", "channels", "channel_id", "ports", "port_id", "packet_commitments", "packet_commitment_sequences", "unrelayed_acks"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_UnreceivedAcks_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6, 2, 7, 1, 0, 4, 1, 5, 8, 2, 9}, []string{"ibc", "channel", "v1beta1", "channels", "channel_id", "ports", "port_id", "packet_commitments", "packet_ack_sequences", "unreceived_acks"}, "", runtime.AssumeColonVerbOpt(true))) pattern_Query_NextSequenceReceive_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6, 2, 7}, []string{"ibc", "channel", "v1beta1", "channels", "channel_id", "ports", "port_id", "next_sequence"}, "", runtime.AssumeColonVerbOpt(true))) ) @@ -1502,11 +1778,15 @@ var ( forward_Query_PacketCommitments_0 = runtime.ForwardResponseMessage + forward_Query_PacketReceipt_0 = runtime.ForwardResponseMessage + forward_Query_PacketAcknowledgement_0 = runtime.ForwardResponseMessage + forward_Query_PacketAcknowledgements_0 = runtime.ForwardResponseMessage + forward_Query_UnreceivedPackets_0 = runtime.ForwardResponseMessage - forward_Query_UnrelayedAcks_0 = runtime.ForwardResponseMessage + forward_Query_UnreceivedAcks_0 = runtime.ForwardResponseMessage forward_Query_NextSequenceReceive_0 = runtime.ForwardResponseMessage ) diff --git a/x/ibc/core/24-host/keys.go b/x/ibc/core/24-host/keys.go index c2f344028e..0ab66467dc 100644 --- a/x/ibc/core/24-host/keys.go +++ b/x/ibc/core/24-host/keys.go @@ -144,6 +144,11 @@ func PacketAcknowledgementPath(portID, channelID string, sequence uint64) string return fmt.Sprintf("%s/", KeyPacketAckPrefix) + channelPath(portID, channelID) + fmt.Sprintf("/acknowledgements/%d", sequence) } +// PacketAcknowledgementPrefixPath defines the prefix for commitments to packet data fields store path. +func PacketAcknowledgementPrefixPath(portID, channelID string) string { + return fmt.Sprintf("%s/", KeyPacketAckPrefix) + channelPath(portID, channelID) +} + // PacketReceiptPath defines the packet receipt store path func PacketReceiptPath(portID, channelID string, sequence uint64) string { return fmt.Sprintf("%s/", KeyPacketReceiptPrefix) + channelPath(portID, channelID) + fmt.Sprintf("/receipts/%d", sequence) diff --git a/x/ibc/core/genesis_test.go b/x/ibc/core/genesis_test.go index 482027fb88..d4cf1ec3aa 100644 --- a/x/ibc/core/genesis_test.go +++ b/x/ibc/core/genesis_test.go @@ -115,11 +115,14 @@ func (suite *IBCTestSuite) TestValidateGenesis() { ), ), }, - []channeltypes.PacketAckCommitment{ - channeltypes.NewPacketAckCommitment(port2, channel2, 1, []byte("ack")), + []channeltypes.PacketState{ + channeltypes.NewPacketState(port2, channel2, 1, []byte("ack")), }, - []channeltypes.PacketAckCommitment{ - channeltypes.NewPacketAckCommitment(port1, channel1, 1, []byte("commit_hash")), + []channeltypes.PacketState{ + channeltypes.NewPacketState(port2, channel2, 1, []byte("")), + }, + []channeltypes.PacketState{ + channeltypes.NewPacketState(port1, channel1, 1, []byte("commit_hash")), }, []channeltypes.PacketSequence{ channeltypes.NewPacketSequence(port1, channel1, 1), @@ -174,8 +177,8 @@ func (suite *IBCTestSuite) TestValidateGenesis() { ClientGenesis: clienttypes.DefaultGenesisState(), ConnectionGenesis: connectiontypes.DefaultGenesisState(), ChannelGenesis: channeltypes.GenesisState{ - Acknowledgements: []channeltypes.PacketAckCommitment{ - channeltypes.NewPacketAckCommitment("(portID)", channel1, 1, []byte("ack")), + Acknowledgements: []channeltypes.PacketState{ + channeltypes.NewPacketState("(portID)", channel1, 1, []byte("ack")), }, }, }, @@ -249,11 +252,14 @@ func (suite *IBCTestSuite) TestInitGenesis() { ), ), }, - []channeltypes.PacketAckCommitment{ - channeltypes.NewPacketAckCommitment(port2, channel2, 1, []byte("ack")), + []channeltypes.PacketState{ + channeltypes.NewPacketState(port2, channel2, 1, []byte("ack")), }, - []channeltypes.PacketAckCommitment{ - channeltypes.NewPacketAckCommitment(port1, channel1, 1, []byte("commit_hash")), + []channeltypes.PacketState{ + channeltypes.NewPacketState(port2, channel2, 1, []byte("")), + }, + []channeltypes.PacketState{ + channeltypes.NewPacketState(port1, channel1, 1, []byte("commit_hash")), }, []channeltypes.PacketSequence{ channeltypes.NewPacketSequence(port1, channel1, 1), diff --git a/x/ibc/core/keeper/grpc_query.go b/x/ibc/core/keeper/grpc_query.go index f15b116561..e7dbe26109 100644 --- a/x/ibc/core/keeper/grpc_query.go +++ b/x/ibc/core/keeper/grpc_query.go @@ -88,19 +88,29 @@ func (q Keeper) PacketCommitments(c context.Context, req *channeltypes.QueryPack return q.ChannelKeeper.PacketCommitments(c, req) } +// PacketReceipt implements the IBC QueryServer interface +func (q Keeper) PacketReceipt(c context.Context, req *channeltypes.QueryPacketReceiptRequest) (*channeltypes.QueryPacketReceiptResponse, error) { + return q.ChannelKeeper.PacketReceipt(c, req) +} + // PacketAcknowledgement implements the IBC QueryServer interface func (q Keeper) PacketAcknowledgement(c context.Context, req *channeltypes.QueryPacketAcknowledgementRequest) (*channeltypes.QueryPacketAcknowledgementResponse, error) { return q.ChannelKeeper.PacketAcknowledgement(c, req) } +// PacketAcknowledgements implements the IBC QueryServer interface +func (q Keeper) PacketAcknowledgements(c context.Context, req *channeltypes.QueryPacketAcknowledgementsRequest) (*channeltypes.QueryPacketAcknowledgementsResponse, error) { + return q.ChannelKeeper.PacketAcknowledgements(c, req) +} + // UnreceivedPackets implements the IBC QueryServer interface func (q Keeper) UnreceivedPackets(c context.Context, req *channeltypes.QueryUnreceivedPacketsRequest) (*channeltypes.QueryUnreceivedPacketsResponse, error) { return q.ChannelKeeper.UnreceivedPackets(c, req) } -// UnrelayedAcks implements the IBC QueryServer interface -func (q Keeper) UnrelayedAcks(c context.Context, req *channeltypes.QueryUnrelayedAcksRequest) (*channeltypes.QueryUnrelayedAcksResponse, error) { - return q.ChannelKeeper.UnrelayedAcks(c, req) +// UnreceivedAcks implements the IBC QueryServer interface +func (q Keeper) UnreceivedAcks(c context.Context, req *channeltypes.QueryUnreceivedAcksRequest) (*channeltypes.QueryUnreceivedAcksResponse, error) { + return q.ChannelKeeper.UnreceivedAcks(c, req) } // NextSequenceReceive implements the IBC QueryServer interface diff --git a/x/ibc/light-clients/09-localhost/types/client_state_test.go b/x/ibc/light-clients/09-localhost/types/client_state_test.go index abe6f20b60..6b5c0b41ca 100644 --- a/x/ibc/light-clients/09-localhost/types/client_state_test.go +++ b/x/ibc/light-clients/09-localhost/types/client_state_test.go @@ -375,7 +375,7 @@ func (suite *LocalhostTestSuite) TestVerifyPacketAcknowledgement() { host.KeyPacketAcknowledgement(testPortID, testChannelID, testSequence), []byte("different"), ) }, - ack: []byte("acknowledgment"), + ack: []byte("acknowledgement"), expPass: false, }, { diff --git a/x/staking/types/staking.pb.go b/x/staking/types/staking.pb.go index 60d666c682..8b54a0ed29 100644 --- a/x/staking/types/staking.pb.go +++ b/x/staking/types/staking.pb.go @@ -1216,605 +1216,606 @@ func (this *Pool) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_ func StakingDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} var gzipped = []byte{ - // 9556 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x7d, 0x6b, 0x70, 0x1c, 0xc9, - 0x79, 0x18, 0x67, 0x77, 0x01, 0xec, 0x7e, 0x58, 0x00, 0x8b, 0x06, 0x48, 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xca, 0x6a, 0x65, 0x7d, 0x71, 0xbe, 0x5c, 0x29, 0x5f, 0xb8, 0x50, - 0x9e, 0xdb, 0x58, 0x67, 0x1b, 0x1f, 0x1e, 0xf4, 0x46, 0x68, 0x82, 0xcb, 0xaf, 0x26, 0x61, 0xac, - 0x0d, 0x27, 0x68, 0x96, 0x2f, 0x59, 0xd8, 0x2a, 0xea, 0xf1, 0x5e, 0xb8, 0x9f, 0x26, 0x35, 0xc3, - 0x9a, 0x6a, 0xbb, 0x7c, 0x85, 0xf3, 0x08, 0x10, 0x2d, 0x19, 0xae, 0xbe, 0xad, 0x63, 0x9b, 0xef, - 0x13, 0xb1, 0x75, 0xcc, 0x88, 0xdf, 0xce, 0xb6, 0x8a, 0x1e, 0x03, 0x64, 0x99, 0x8e, 0xee, 0xea, - 0x57, 0x71, 0x45, 0x37, 0xc4, 0xa6, 0x12, 0x59, 0xd7, 0xa4, 0x94, 0x9c, 0xe8, 0x59, 0x34, 0x5c, - 0x0f, 0xda, 0xc0, 0x35, 0x35, 0x02, 0x4d, 0x82, 0x79, 0x52, 0xc9, 0x89, 0x1e, 0x0f, 0xfa, 0x3e, - 0xc8, 0x56, 0xcd, 0x26, 0x29, 0xf6, 0x18, 0x1c, 0xc9, 0x1d, 0x92, 0x32, 0xc8, 0xda, 0x3c, 0x10, - 0x5e, 0xc6, 0xfb, 0xbb, 0x59, 0x59, 0x65, 0x90, 0xb5, 0x31, 0x90, 0x87, 0x61, 0x44, 0xad, 0xd5, - 0x6c, 0x42, 0x5c, 0x10, 0x62, 0x0b, 0x93, 0x61, 0xaf, 0x99, 0x02, 0x16, 0x2e, 0x41, 0x5a, 0xe8, - 0x81, 0xa4, 0x6a, 0xa2, 0x89, 0x8a, 0xc5, 0x56, 0xdb, 0x89, 0x13, 0x19, 0x25, 0x6d, 0x88, 0xce, - 0xfb, 0x20, 0xab, 0x3b, 0x15, 0x7f, 0x73, 0x3e, 0x31, 0x95, 0x38, 0x91, 0x56, 0x06, 0x75,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x70, 0x84, 0x53, 0xdc, 0x9f, 0x5d, 0x7f, 0x55, 0x04, 0x56, 0x86, - 0xbd, 0x19, 0xb6, 0xee, 0xdb, 0xa1, 0xe0, 0xa9, 0x53, 0x14, 0xac, 0x4e, 0xa5, 0xa1, 0x5a, 0x3d, - 0x50, 0xfe, 0x35, 0x4e, 0x59, 0x44, 0x7c, 0xaf, 0xe2, 0x75, 0x96, 0x55, 0x8b, 0x10, 0x7f, 0x0b, - 0xe4, 0x05, 0xf1, 0xa6, 0x61, 0x63, 0xcd, 0xac, 0x19, 0xfa, 0xcb, 0xb8, 0xda, 0x03, 0xe9, 0x5f, - 0x8f, 0x98, 0x6a, 0x33, 0x80, 0x4e, 0x28, 0x2f, 0x42, 0xce, 0xab, 0x55, 0x2a, 0x7a, 0xc3, 0x32, - 0x6d, 0x37, 0x86, 0xe2, 0x17, 0x85, 0xa5, 0x3c, 0xbc, 0x45, 0x8a, 0x56, 0x2c, 0xc3, 0x30, 0x7d, - 0xec, 0xd5, 0x25, 0xbf, 0xc4, 0x09, 0x0d, 0xf9, 0x58, 0x3c, 0x70, 0x68, 0x66, 0xc3, 0x52, 0xed, - 0x5e, 0xe2, 0xdf, 0x3f, 0x12, 0x81, 0x83, 0xa3, 0xf0, 0xc0, 0xe1, 0xee, 0x59, 0x98, 0x64, 0xfb, - 0x1e, 0x28, 0x7c, 0x59, 0x04, 0x0e, 0x81, 0xc3, 0x49, 0x88, 0x82, 0xa1, 0x07, 0x12, 0xff, 0x58, - 0x90, 0x10, 0x38, 0x84, 0xc4, 0xf3, 0x7e, 0xa2, 0xb5, 0x71, 0x4d, 0x77, 0x5c, 0x9b, 0x95, 0xc9, - 0xdd, 0x49, 0xfd, 0x93, 0xef, 0x86, 0x8b, 0x30, 0x25, 0x80, 0x4a, 0x22, 0x11, 0xdf, 0x76, 0xa5, - 0xab, 0xa8, 0x78, 0xc6, 0x7e, 0x43, 0x44, 0xa2, 0x00, 0x1a, 0xe1, 0x2d, 0x50, 0x21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b5, 0x1d, 0x55, 0x37, 0x2a, 0x7a, 0x55, 0x94, - 0x71, 0xaf, 0xdd, 0x9a, 0x1c, 0x98, 0x23, 0x6d, 0x8b, 0xf3, 0xca, 0x00, 0xed, 0x5c, 0xac, 0x92, - 0x4c, 0xbf, 0x83, 0xf5, 0xda, 0x8e, 0xcb, 0x67, 0x18, 0x7f, 0x42, 0x67, 0x21, 0x45, 0x1c, 0x82, - 0xdf, 0xdc, 0x2a, 0xb4, 0x14, 0xd3, 0xde, 0x8a, 0xa6, 0x94, 0x26, 0x03, 0x7f, 0xf8, 0x0f, 0x27, - 0x25, 0x85, 0x62, 0xa0, 0x39, 0x18, 0xaa, 0xab, 0x8e, 0x5b, 0xa1, 0x19, 0x8a, 0x0c, 0xdf, 0x47, - 0x49, 0x1c, 0x6b, 0x55, 0x08, 0x57, 0x2c, 0x67, 0x7d, 0x90, 0x60, 0xb1, 0xa6, 0x2a, 0x3a, 0x01, - 0x39, 0x4a, 0x44, 0x33, 0x1b, 0x0d, 0xdd, 0x65, 0xb5, 0x53, 0x3f, 0xd5, 0xfb, 0x30, 0x69, 0x9f, - 0xa3, 0xcd, 0xb4, 0x82, 0xba, 0x07, 0x32, 0xf4, 0xaa, 0x08, 0x05, 0x61, 0xc7, 0x22, 0xd3, 0xa4, - 0x81, 0x76, 0x3e, 0x0c, 0x23, 0x7e, 0x7c, 0x64, 0x20, 0x69, 0x46, 0xc5, 0x6f, 0xa6, 0x80, 0x4f, - 0xc0, 0xb8, 0x81, 0xaf, 0xd3, 0x83, 0x9a, 0x21, 0xe8, 0x0c, 0x85, 0x46, 0xa4, 0xef, 0x4a, 0x18, - 0xe3, 0x41, 0x18, 0xd6, 0x84, 0xf2, 0x19, 0x2c, 0x50, 0xd8, 0x21, 0xaf, 0x95, 0x82, 0x1d, 0x83, - 0xb4, 0x6a, 0x59, 0x0c, 0x60, 0x90, 0xc7, 0x47, 0xcb, 0xa2, 0x5d, 0x27, 0x61, 0x94, 0xca, 0x68, - 0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 0xd6, 0xa4, - 0xa4, 0x8c, 0x68, 0x11, 0x53, 0xbc, 0x1d, 0x06, 0x9b, 0x56, 0x55, 0x75, 0x71, 0x85, 0xae, 0xe3, - 0x12, 0xb1, 0x79, 0x7e, 0x82, 0xd0, 0xba, 0x7d, 0x6b, 0x12, 0x31, 0xb1, 0x02, 0xc8, 0x32, 0xcd, - 0xfe, 0xc0, 0x5a, 0x08, 0x42, 0x40, 0xa6, 0xaf, 0x49, 0x30, 0x38, 0x1f, 0x38, 0xc9, 0x95, 0x87, - 0x81, 0x86, 0x69, 0xe8, 0xbb, 0xdc, 0x1f, 0x33, 0x8a, 0x78, 0x44, 0x05, 0x48, 0xb3, 0x4b, 0x75, - 0xee, 0x9e, 0xd8, 0xea, 0x14, 0xcf, 0x04, 0xeb, 0x1a, 0xde, 0x72, 0x74, 0x61, 0x0d, 0x45, 0x3c, - 0xa2, 0x0b, 0x90, 0x73, 0xb0, 0xd6, 0xb4, 0x75, 0x77, 0xaf, 0xa2, 0x99, 0x86, 0xab, 0x6a, 0x2e, - 0xbb, 0x9e, 0x55, 0xba, 0xe7, 0xf6, 0xad, 0xc9, 0xa3, 0x8c, 0xd7, 0x28, 0x84, 0xac, 0x8c, 0x88, - 0xa6, 0x39, 0xd6, 0x42, 0x46, 0xa8, 0x62, 0x57, 0xd5, 0xeb, 0x4e, 0x9e, 0xbd, 0xf8, 0x11, 0x8f, - 0x01, 0x59, 0xbe, 0x30, 0x10, 0xdc, 0xd8, 0xba, 0x00, 0x39, 0xd3, 0xc2, 0x76, 0xa8, 0x10, 0x95, - 0xa2, 0x23, 0x47, 0x21, 0x64, 0x65, 0x44, 0x34, 0x89, 0x22, 0xd5, 0x25, 0x66, 0x16, 0x0b, 0x45, - 0xab, 0xb9, 0xe5, 0xef, 0x87, 0x8d, 0xb7, 0x58, 0x63, 0xd6, 0xd8, 0x2b, 0x3d, 0xe5, 0x53, 0x8f, - 0xe2, 0xc9, 0x5f, 0xff, 0xd2, 0xe3, 0x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 0x3e, 0x00, 0x26, 0x2b, 0x63, 0xfe, 0x7a, 0xc9, 0xd6, 0xda, 0x52, 0xad, 0x3a, 0xae, 0x47, 0x35, - 0xd9, 0x99, 0x6a, 0x00, 0x2c, 0x48, 0x75, 0xde, 0x71, 0xdb, 0xab, 0x76, 0x1d, 0x06, 0x7d, 0x95, - 0x38, 0x68, 0x1e, 0xd2, 0x2e, 0xff, 0xcd, 0x35, 0x2c, 0x77, 0xd6, 0xb0, 0x40, 0xe3, 0x5a, 0xf6, - 0x30, 0xe5, 0xbf, 0x90, 0x00, 0x7c, 0x9f, 0xfd, 0xf1, 0x74, 0x31, 0x12, 0xca, 0x79, 0xe0, 0x4d, - 0x1e, 0xa8, 0x54, 0xe3, 0xd8, 0x11, 0x7d, 0xfe, 0x74, 0x02, 0xc6, 0x36, 0x45, 0xe4, 0xf9, 0xb1, - 0xd7, 0xc1, 0x1a, 0x0c, 0x60, 0xc3, 0xb5, 0x75, 0xaa, 0x04, 0x62, 0xed, 0x27, 0x3a, 0x59, 0xbb, - 0x8d, 0x4c, 0xf4, 0x63, 0x36, 0x62, 0xd3, 0x9d, 0x93, 0x89, 0x68, 0xe3, 0x43, 0x49, 0xc8, 0x77, - 0xc2, 0x44, 0x73, 0x30, 0xa2, 0xd9, 0x98, 0x36, 0x54, 0x82, 0x3b, 0x7f, 0xa5, 0x82, 0x5f, 0x59, - 0x46, 0x00, 0x64, 0x65, 0x58, 0xb4, 0xf0, 0xec, 0x51, 0x03, 0x52, 0xf6, 0x11, 0xb7, 0x23, 0x50, - 0x3d, 0xd6, 0x79, 0x32, 0x4f, 0x1f, 0x62, 0x90, 0x30, 0x01, 0x96, 0x3f, 0x86, 0xfd, 0x56, 0x9a, - 0x40, 0x5e, 0x82, 0x11, 0xdd, 0xd0, 0x5d, 0x5d, 0xad, 0x57, 0xb6, 0xd4, 0xba, 0x6a, 0x68, 0x07, - 0xa9, 0x9a, 0x59, 0xc8, 0xe7, 0xc3, 0x46, 0xc8, 0xc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, 0x06, 0x82, 0xca, 0x30, 0xb9, 0xdd, 0xac, 0xd7, 0xf7, 0x2a, 0x55, 0x4c, 0xff, - 0xe7, 0x8e, 0xf7, 0x79, 0x7b, 0x7c, 0xdd, 0x52, 0xc5, 0x37, 0xf2, 0x88, 0x6e, 0x8e, 0x53, 0xb0, - 0x79, 0x0a, 0x25, 0x3e, 0x6d, 0x5f, 0x16, 0x30, 0xf2, 0xef, 0x27, 0x20, 0x2d, 0x48, 0xd3, 0x13, - 0xe0, 0xb8, 0x8e, 0x35, 0xd7, 0x14, 0x6f, 0x4c, 0xbc, 0x67, 0x84, 0x20, 0x59, 0xe3, 0x26, 0xca, - 0x5c, 0x3c, 0xa4, 0x90, 0x07, 0xd2, 0xe6, 0x9d, 0xcb, 0x27, 0x6d, 0x56, 0x93, 0x58, 0x2d, 0x65, - 0x99, 0x62, 0x69, 0x76, 0xf1, 0x90, 0x42, 0x9f, 0x50, 0x1e, 0xfa, 0xc9, 0xcc, 0x70, 0xd9, 0x87, - 0x07, 0x49, 0x3b, 0x7f, 0x46, 0x47, 0xa0, 0xcf, 0x52, 0x5d, 0x8d, 0x1d, 0xa9, 0x23, 0x1d, 0xec, - 0x11, 0x3d, 0x03, 0xfd, 0xec, 0xc2, 0x67, 0xf4, 0x1f, 0x5a, 0x10, 0x65, 0xb0, 0x2f, 0x6b, 0x11, - 0xbe, 0xd7, 0x54, 0xd7, 0xc5, 0xb6, 0x41, 0x08, 0x32, 0x70, 0x84, 0x20, 0xb5, 0x65, 0x56, 0xf7, - 0xf8, 0x3f, 0xd9, 0xa0, 0xbf, 0xf9, 0xe7, 0xff, 0xa9, 0x3f, 0x54, 0x68, 0x27, 0xfb, 0xdf, 0x42, - 0x59, 0xd1, 0x58, 0x22, 0x40, 0x65, 0x18, 0x53, 0xab, 0x55, 0x9d, 0x78, 0x35, 0x59, 0x81, 0xea, - 0x34, 0x42, 0x38, 0xf4, 0x3f, 0x47, 0x75, 0xb2, 0x05, 0xf2, 0x11, 0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, 0x01, 0xd4, 0xb9, 0xba, - 0x6d, 0x13, 0x56, 0x88, 0xf6, 0xa2, 0x21, 0xa5, 0x9b, 0xf6, 0x22, 0xb0, 0x5d, 0xb5, 0xd7, 0x69, - 0x6a, 0x6d, 0x01, 0x04, 0xe6, 0xc1, 0x83, 0x5d, 0x28, 0xf8, 0x60, 0x85, 0xc7, 0x7b, 0x02, 0xf3, - 0x5e, 0x3a, 0xdd, 0xe1, 0x62, 0xfc, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0xa3, 0xcd, 0x83, 0x8b, - 0x22, 0x94, 0x00, 0x00, + // 9584 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x7d, 0x6d, 0x70, 0x24, 0xd7, + 0x71, 0xd8, 0xcd, 0x7e, 0x00, 0xbb, 0x8d, 0x05, 0xb0, 0x78, 0xc0, 0xdd, 0xed, 0x2d, 0x8f, 0x00, + 0x38, 0xfc, 0x3a, 0x1e, 0x49, 0x80, 0x3c, 0xf2, 0x8e, 0xc7, 0x3d, 0x89, 0x34, 0x16, 0xbb, 0x87, + 0x03, 0x0f, 0x5f, 0x1c, 0x00, 0x47, 0x7d, 0x39, 0x5b, 0x83, 0xdd, 0x87, 0xc5, 0x10, 0xbb, 0x33, + 0xc3, 0x99, 0xd9, 0x3b, 0x80, 0x92, 0xaa, 0x68, 0x49, 0x51, 0xa4, 0x73, 0x1c, 0x49, 0x91, 0xcb, + 0x91, 0x68, 0x9d, 0x22, 0x59, 0x4e, 0xe4, 0xc8, 0x4a, 0xfc, 0x21, 0x45, 0x89, 0x93, 0x54, 0x45, + 0x4a, 0xe2, 0x58, 0x52, 0x2a, 0x2e, 0xa9, 0xe2, 0x4a, 0x1c, 0x57, 0x7c, 0x76, 0x28, 0x95, 0xc3, + 0x28, 0x4a, 0x2c, 0x9f, 0xe5, 0xc4, 0x29, 0xfd, 0x48, 0xea, 0x7d, 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, + 0xf4, 0x16, 0x98, 0x68, 0xe9, 0x9a, 0xee, 0x60, 0xcb, 0xb4, 0x30, 0xf1, 0x58, 0xd6, 0x55, 0xee, + 0xbf, 0x0c, 0x76, 0xf1, 0xb9, 0x4d, 0x3f, 0x36, 0xe3, 0xa2, 0x8c, 0xb7, 0xda, 0x81, 0xa7, 0xd3, + 0xa9, 0xd7, 0x07, 0xb3, 0xaf, 0xbc, 0xf2, 0xca, 0x2b, 0x31, 0xf9, 0x2b, 0x03, 0x30, 0xd1, 0x29, + 0x66, 0x3a, 0x86, 0xef, 0x31, 0x18, 0xd0, 0x5b, 0xcd, 0x2d, 0x6c, 0x51, 0x23, 0x25, 0x15, 0xfe, + 0x84, 0xe6, 0x20, 0xd9, 0x50, 0xb7, 0x70, 0x23, 0x97, 0x98, 0x96, 0x4e, 0x8d, 0x9c, 0x79, 0xb8, + 0xaf, 0xa8, 0x9c, 0x59, 0x22, 0x24, 0x0a, 0xa3, 0x44, 0xcf, 0x40, 0x82, 0xa7, 0x68, 0xc2, 0xe1, + 0x74, 0x7f, 0x1c, 0x48, 0x2c, 0x29, 0x94, 0x0e, 0xdd, 0x05, 0x69, 0xf2, 0x97, 0xf9, 0xc6, 0x00, + 0x95, 0x39, 0x45, 0x00, 0xc4, 0x2f, 0x50, 0x1e, 0x52, 0x34, 0x4c, 0x6a, 0x58, 0x4c, 0x6d, 0xee, + 0x33, 0x71, 0xac, 0x1a, 0xde, 0x56, 0x5b, 0x0d, 0xa7, 0x72, 0x55, 0x6d, 0xb4, 0x30, 0x75, 0xf8, + 0xb4, 0x92, 0xe1, 0xc0, 0x2b, 0x04, 0x86, 0xa6, 0x60, 0x88, 0x45, 0x95, 0xa6, 0xd7, 0xf0, 0x1e, + 0xcd, 0x9e, 0x49, 0x85, 0x05, 0xda, 0x22, 0x81, 0x90, 0xee, 0x5f, 0xb4, 0x0d, 0x5d, 0xb8, 0x26, + 0xed, 0x82, 0x00, 0x68, 0xf7, 0x4f, 0x85, 0x13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ee, 0x67, + 0xe6, 0xc9, 0x54, 0x56, 0x18, 0x60, 0xc5, 0xb1, 0xc2, 0x28, 0x49, 0x19, 0x41, 0x9c, 0x0d, 0xb3, + 0x62, 0x24, 0xa5, 0xf0, 0x27, 0xb4, 0x00, 0x03, 0x2f, 0xda, 0x94, 0xf7, 0x00, 0xe5, 0x7d, 0x5f, + 0x6f, 0xde, 0xcf, 0xad, 0x53, 0xe6, 0xe9, 0xe7, 0xd6, 0x2b, 0x2b, 0xab, 0xca, 0xf2, 0xdc, 0x92, + 0xc2, 0xc9, 0xd1, 0x09, 0x48, 0x34, 0xd4, 0x97, 0xf7, 0x83, 0x93, 0x1e, 0x05, 0xf5, 0x3b, 0x08, + 0x27, 0x20, 0x71, 0x0d, 0xab, 0xbb, 0xc1, 0xa9, 0x86, 0x82, 0xee, 0x60, 0x30, 0xcc, 0x42, 0x92, + 0xda, 0x0b, 0x01, 0x70, 0x8b, 0x65, 0x8f, 0xa0, 0x14, 0x24, 0xe6, 0x57, 0x15, 0x12, 0x10, 0x59, + 0xc8, 0x30, 0x68, 0x65, 0x6d, 0xb1, 0x3c, 0x5f, 0xce, 0xc6, 0xe4, 0xb3, 0x30, 0xc0, 0x8c, 0x40, + 0x82, 0xc5, 0x35, 0x43, 0xf6, 0x08, 0x7f, 0xe4, 0x3c, 0x24, 0xd1, 0xba, 0xb9, 0x5c, 0x2c, 0x2b, + 0xd9, 0x58, 0x70, 0xa8, 0x13, 0xd9, 0xa4, 0x6c, 0x43, 0xc6, 0x5f, 0x87, 0xff, 0x68, 0x16, 0xe3, + 0x5f, 0x96, 0x60, 0xc8, 0x57, 0x57, 0x93, 0x82, 0x48, 0x6d, 0x34, 0x8c, 0x6b, 0x15, 0xb5, 0xa1, + 0xa9, 0x36, 0x77, 0x0d, 0xa0, 0xa0, 0x39, 0x02, 0xe9, 0x77, 0xe8, 0x7e, 0x44, 0x21, 0x92, 0xcc, + 0x0e, 0xc8, 0x9f, 0x94, 0x20, 0x1b, 0x2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, 0x6c, 0x3e, 0x91, + 0x65, 0x4d, 0x42, 0xc9, 0x8a, 0x96, 0x45, 0xdd, 0x71, 0xb1, 0x75, 0x5c, 0x57, 0x43, 0xd8, 0x24, + 0x99, 0xc7, 0x95, 0xac, 0x68, 0x71, 0xb1, 0xef, 0x81, 0x4c, 0xcd, 0x68, 0x91, 0x5a, 0x8f, 0xe1, + 0x91, 0xb9, 0x43, 0x52, 0x86, 0x18, 0xcc, 0x45, 0xe1, 0x55, 0xbc, 0xb7, 0xeb, 0x95, 0x51, 0x86, + 0x18, 0x8c, 0xa1, 0x3c, 0x08, 0xa3, 0x6a, 0xbd, 0x6e, 0x11, 0xe6, 0x82, 0x11, 0x5b, 0x97, 0x8c, + 0xb8, 0x60, 0x8a, 0x98, 0x7f, 0x0e, 0x52, 0xc2, 0x0e, 0x64, 0xaa, 0x26, 0x96, 0xa8, 0x98, 0x6c, + 0xb1, 0x1d, 0x3b, 0x95, 0x56, 0x52, 0xba, 0x68, 0xbc, 0x07, 0x32, 0x9a, 0x5d, 0xf1, 0x36, 0xf1, + 0x63, 0xd3, 0xb1, 0x53, 0x29, 0x65, 0x48, 0xb3, 0xdd, 0x0d, 0x50, 0xf9, 0xb3, 0x31, 0x18, 0x09, + 0xbe, 0x84, 0x40, 0x25, 0x48, 0x35, 0x8c, 0xaa, 0x4a, 0x5d, 0x8b, 0xbd, 0x01, 0x3b, 0x15, 0xf1, + 0xde, 0x62, 0x66, 0x89, 0xe3, 0x2b, 0x2e, 0x65, 0xfe, 0xb7, 0x25, 0x48, 0x09, 0x30, 0x3a, 0x06, + 0x09, 0x53, 0x75, 0x76, 0x28, 0xbb, 0x64, 0x31, 0x96, 0x95, 0x14, 0xfa, 0x4c, 0xe0, 0xb6, 0xa9, + 0xea, 0xd4, 0x05, 0x38, 0x9c, 0x3c, 0x93, 0x71, 0x6d, 0x60, 0xb5, 0x46, 0x17, 0x3d, 0x46, 0xb3, + 0x89, 0x75, 0xc7, 0x16, 0xe3, 0xca,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ef, 0xe3, 0xac, 0x32, 0xfe, 0x7a, 0xa7, 0x70, 0x16, 0x12, 0xa4, 0x78, + 0x89, 0x26, 0xff, 0xab, 0x9c, 0x9c, 0xa2, 0x17, 0xde, 0x0c, 0x29, 0x51, 0xb4, 0x44, 0x93, 0xbe, + 0x9f, 0x93, 0xba, 0x24, 0x84, 0x5c, 0x14, 0x2c, 0xd1, 0xe4, 0x7f, 0x4d, 0x90, 0x0b, 0x12, 0x42, + 0xde, 0xbf, 0x09, 0xbf, 0xfc, 0xd3, 0x09, 0x3e, 0xe9, 0x08, 0xdb, 0x5d, 0x80, 0x41, 0x5e, 0xa9, + 0x44, 0x53, 0x7f, 0x90, 0x77, 0x2e, 0x28, 0x0a, 0x4f, 0x41, 0xb2, 0x4f, 0x83, 0xff, 0x0c, 0x27, + 0x65, 0xf8, 0x85, 0x79, 0x18, 0xf2, 0x55, 0x27, 0xd1, 0xe4, 0x7f, 0x83, 0x93, 0xfb, 0xa9, 0x88, + 0xe8, 0xbc, 0x3a, 0x89, 0x66, 0xf0, 0x21, 0x21, 0x3a, 0xa7, 0x20, 0x66, 0x13, 0x85, 0x49, 0x34, + 0xf5, 0x87, 0x85, 0xd5, 0x05, 0x49, 0xe1, 0x59, 0x48, 0xbb, 0x93, 0x4d, 0x34, 0xfd, 0x47, 0x38, + 0xbd, 0x47, 0x43, 0x2c, 0xe0, 0x9b, 0xec, 0xa2, 0x59, 0xfc, 0x4d, 0x61, 0x01, 0x1f, 0x15, 0x09, + 0xa3, 0x70, 0x01, 0x13, 0xcd, 0xe9, 0xa3, 0x22, 0x8c, 0x42, 0xf5, 0x0b, 0x19, 0x4d, 0x9a, 0xf3, + 0xa3, 0x59, 0xfc, 0xac, 0x18, 0x4d, 0x8a, 0x4f, 0xc4, 0x08, 0x57, 0x04, 0xd1, 0x3c, 0xfe, 0x96, + 0x10, 0x23, 0x54, 0x10, 0x14, 0xd6, 0x00, 0xb5, 0x57, 0x03, 0xd1, 0xfc, 0x3e, 0xc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f3, 0xfc, 0xd8, 0xdb, 0x60, 0x0d, + 0x06, 0xb1, 0xee, 0x58, 0x1a, 0x35, 0x02, 0x19, 0xed, 0xc7, 0xba, 0x8d, 0x76, 0x07, 0x9d, 0xe8, + 0xc7, 0x6c, 0xc4, 0xa6, 0x3b, 0x67, 0x13, 0xb2, 0xc6, 0x87, 0xe2, 0x90, 0xeb, 0x46, 0x89, 0xe6, + 0x61, 0xb4, 0x6a, 0x61, 0x0a, 0xa8, 0xf8, 0x77, 0xfe, 0x8a, 0x79, 0xaf, 0xb2, 0x0c, 0x21, 0xc8, + 0xca, 0x88, 0x80, 0xf0, 0xd9, 0xa3, 0x0e, 0xa4, 0xec, 0x23, 0x6e, 0x47, 0xb0, 0xfa, 0xac, 0xf3, + 0x64, 0x3e, 0x7d, 0x88, 0x4e, 0x82, 0x0c, 0xd8, 0xfc, 0x31, 0xe2, 0x41, 0xe9, 0x04, 0xf2, 0x12, + 0x8c, 0x6a, 0xba, 0xe6, 0x68, 0x6a, 0xa3, 0xb2, 0xa5, 0x36, 0x54, 0xbd, 0x7a, 0x98, 0xaa, 0x99, + 0xa5, 0x7c, 0xde, 0x6d, 0x88, 0x9d, 0xac, 0x8c, 0x70, 0x48, 0x91, 0x01, 0xd0, 0x25, 0x18, 0x14, + 0x5d, 0x25, 0x0e, 0x55, 0x6d, 0x08, 0x72, 0x5f, 0x81, 0xf7, 0x33, 0x71, 0x18, 0x53, 0x70, 0xed, + 0xff, 0x0f, 0xc5, 0xc1, 0x86, 0x62, 0x19, 0x80, 0x85, 0x3b, 0x49, 0xb0, 0x87, 0x18, 0x0d, 0x92, + 0x30, 0xd2, 0x8c, 0x43, 0xc9, 0x76, 0x7c, 0xe3, 0x71, 0x33, 0x06, 0x19, 0xff, 0x78, 0xfc, 0x25, + 0x9d, 0x95, 0xd0, 0xa2, 0x97, 0x89, 0x12, 0xfc, 0x13, 0xa0, 0x5d, 0x32, 0x51, 0x9b, 0xf7, 0xf6, + 0x4e, 0x41, 0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xd9, 0x21, 0x41, 0x7e, 0x43, 0x3a, 0xcc, 0x4f, 0x66, 0x9f, 0x77, + 0xa3, 0x67, 0x17, 0xd8, 0x47, 0x1e, 0xdf, 0x27, 0xc1, 0x51, 0x8a, 0xe5, 0xc5, 0x1b, 0xc5, 0x14, + 0x77, 0xf6, 0xba, 0x7a, 0xcc, 0x92, 0xea, 0xdb, 0x82, 0x61, 0x9f, 0x65, 0xbc, 0x8f, 0xdf, 0x67, + 0x39, 0xe9, 0xeb, 0x3c, 0xcc, 0x56, 0x56, 0xc6, 0x1b, 0x6d, 0x94, 0x76, 0x68, 0x5d, 0x9f, 0x38, + 0xfc, 0xba, 0xfe, 0x39, 0x18, 0xf2, 0x65, 0xfa, 0x5c, 0x32, 0xe2, 0x9a, 0x69, 0x78, 0x13, 0xcd, + 0x4f, 0x8c, 0xde, 0x2f, 0xc1, 0xd1, 0x8e, 0x93, 0x20, 0xfd, 0x5f, 0xb4, 0x07, 0xdc, 0xa4, 0x0b, + 0x19, 0xa7, 0x23, 0x5f, 0x59, 0x99, 0x68, 0x75, 0xaa, 0x26, 0xd6, 0x60, 0x38, 0x30, 0x81, 0xe5, + 0xc4, 0x7f, 0x94, 0xee, 0xff, 0x86, 0x45, 0x90, 0x01, 0xca, 0x43, 0x0a, 0xef, 0x99, 0x86, 0xe5, + 0xe0, 0x1a, 0x3d, 0xf2, 0x90, 0x52, 0xdc, 0x67, 0x79, 0x05, 0x50, 0xfb, 0xe0, 0x86, 0xbf, 0x43, + 0x9a, 0xf6, 0xbe, 0x43, 0x3a, 0x01, 0x49, 0xff, 0x97, 0x3a, 0xd9, 0x83, 0xb7, 0x4f, 0x71, 0xbb, + 0x63, 0xfe, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0x5a, 0x69, 0x9a, 0x3e, 0x4a, 0x94, 0x00, 0x00, } r := bytes.NewReader(gzipped) gzipr, err := compress_gzip.NewReader(r) From e9d6a8a48dd1ccbc271521738246f27162e44421 Mon Sep 17 00:00:00 2001 From: Sunny Aggarwal Date: Mon, 2 Nov 2020 12:56:45 -0400 Subject: [PATCH 031/136] add backwards compatibility section --- docs/architecture/adr-033-gov-split-vote.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/architecture/adr-033-gov-split-vote.md b/docs/architecture/adr-033-gov-split-vote.md index b473bfc3b2..759778c0c4 100644 --- a/docs/architecture/adr-033-gov-split-vote.md +++ b/docs/architecture/adr-033-gov-split-vote.md @@ -89,11 +89,16 @@ to maintain backwards compatibility. ## Consequences +### Backwards Compatibility +- Previous VoteMsg types will remain the same and so clients will not have to update their procedure unless they want to support the WeightedVoteMsg feature. +- When querying a Vote struct from state, its structure will be different, and so clients wanting to display all voters and their respective votes will have to handle the new format and the fact that a single voter can have split votes. +- The result of querying the tally function should have the same API for clients. + ### Positive - Can make the voting process more accurate for addresses representing multiple stakeholders, often some of the largest addresses. ### Negative -- +- Is more complex than simple voting, and so may be harder to explain to users. However, this is mostly mitigated because the feature is opt-in. ### Neutral - Relatively minor change to governance tally function. From 4420fe2d52923613bb0588b8141ce80e13b1418d Mon Sep 17 00:00:00 2001 From: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Date: Mon, 2 Nov 2020 18:16:22 +0100 Subject: [PATCH 032/136] ibc: remove root from verification funcs (#7780) * ibc: remove root from verification funcs * fix VerifyClientConsensusState Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- x/ibc/core/03-connection/keeper/verify.go | 14 ++------------ x/ibc/core/exported/client.go | 2 -- .../06-solomachine/types/client_state.go | 2 -- .../06-solomachine/types/client_state_test.go | 4 ++-- .../07-tendermint/types/client_state.go | 10 ++++------ .../07-tendermint/types/client_state_test.go | 2 +- .../light-clients/07-tendermint/types/store.go | 6 +++--- .../07-tendermint/types/store_test.go | 18 +++++++++--------- .../09-localhost/types/client_state.go | 4 ++-- .../09-localhost/types/client_state_test.go | 4 ++-- 10 files changed, 25 insertions(+), 41 deletions(-) diff --git a/x/ibc/core/03-connection/keeper/verify.go b/x/ibc/core/03-connection/keeper/verify.go index 886ece6834..2b9e00706c 100644 --- a/x/ibc/core/03-connection/keeper/verify.go +++ b/x/ibc/core/03-connection/keeper/verify.go @@ -22,13 +22,8 @@ func (k Keeper) VerifyClientState( return sdkerrors.Wrap(clienttypes.ErrClientNotFound, clientID) } - targetConsState, found := k.clientKeeper.GetClientConsensusState(ctx, clientID, height) - if !found { - return sdkerrors.Wrapf(clienttypes.ErrConsensusStateNotFound, "clientID: %s with height: %s", clientID, height) - } - if err := targetClient.VerifyClientState( - k.clientKeeper.ClientStore(ctx, clientID), k.cdc, targetConsState.GetRoot(), height, + k.clientKeeper.ClientStore(ctx, clientID), k.cdc, height, connection.GetCounterparty().GetPrefix(), connection.GetCounterparty().GetClientID(), proof, clientState); err != nil { return sdkerrors.Wrapf(err, "failed client state verification for target client: %s", connection.GetClientID()) } @@ -52,13 +47,8 @@ func (k Keeper) VerifyClientConsensusState( return sdkerrors.Wrap(clienttypes.ErrClientNotFound, clientID) } - targetConsState, found := k.clientKeeper.GetClientConsensusState(ctx, clientID, height) - if !found { - return sdkerrors.Wrapf(clienttypes.ErrConsensusStateNotFound, "clientID: %s with height: %s", clientID, height) - } - if err := clientState.VerifyClientConsensusState( - k.clientKeeper.ClientStore(ctx, clientID), k.cdc, targetConsState.GetRoot(), height, + k.clientKeeper.ClientStore(ctx, clientID), k.cdc, height, connection.GetCounterparty().GetClientID(), consensusHeight, connection.GetCounterparty().GetPrefix(), proof, consensusState, ); err != nil { return sdkerrors.Wrapf(err, "failed consensus state verification for client (%s)", connection.GetClientID()) diff --git a/x/ibc/core/exported/client.go b/x/ibc/core/exported/client.go index 7bfa6d2cd3..e5b38a0598 100644 --- a/x/ibc/core/exported/client.go +++ b/x/ibc/core/exported/client.go @@ -51,7 +51,6 @@ type ClientState interface { VerifyClientState( store sdk.KVStore, cdc codec.BinaryMarshaler, - root Root, height Height, prefix Prefix, counterpartyClientIdentifier string, @@ -61,7 +60,6 @@ type ClientState interface { VerifyClientConsensusState( store sdk.KVStore, cdc codec.BinaryMarshaler, - root Root, height Height, counterpartyClientIdentifier string, consensusHeight Height, diff --git a/x/ibc/light-clients/06-solomachine/types/client_state.go b/x/ibc/light-clients/06-solomachine/types/client_state.go index 401235f9ad..f23b6824bf 100644 --- a/x/ibc/light-clients/06-solomachine/types/client_state.go +++ b/x/ibc/light-clients/06-solomachine/types/client_state.go @@ -89,7 +89,6 @@ func (cs ClientState) VerifyUpgrade( func (cs ClientState) VerifyClientState( store sdk.KVStore, cdc codec.BinaryMarshaler, - _ exported.Root, height exported.Height, prefix exported.Prefix, counterpartyClientIdentifier string, @@ -127,7 +126,6 @@ func (cs ClientState) VerifyClientState( func (cs ClientState) VerifyClientConsensusState( store sdk.KVStore, cdc codec.BinaryMarshaler, - _ exported.Root, height exported.Height, counterpartyClientIdentifier string, consensusHeight exported.Height, diff --git a/x/ibc/light-clients/06-solomachine/types/client_state_test.go b/x/ibc/light-clients/06-solomachine/types/client_state_test.go index f13eba0576..f2daca5ae3 100644 --- a/x/ibc/light-clients/06-solomachine/types/client_state_test.go +++ b/x/ibc/light-clients/06-solomachine/types/client_state_test.go @@ -192,7 +192,7 @@ func (suite *SoloMachineTestSuite) TestVerifyClientState() { } err := tc.clientState.VerifyClientState( - suite.store, suite.chainA.Codec, nil, solomachine.GetHeight(), tc.prefix, counterpartyClientIdentifier, tc.proof, clientState, + suite.store, suite.chainA.Codec, solomachine.GetHeight(), tc.prefix, counterpartyClientIdentifier, tc.proof, clientState, ) if tc.expPass { @@ -320,7 +320,7 @@ func (suite *SoloMachineTestSuite) TestVerifyClientConsensusState() { } err := tc.clientState.VerifyClientConsensusState( - suite.store, suite.chainA.Codec, nil, solomachine.GetHeight(), counterpartyClientIdentifier, consensusHeight, tc.prefix, tc.proof, consensusState, + suite.store, suite.chainA.Codec, solomachine.GetHeight(), counterpartyClientIdentifier, consensusHeight, tc.prefix, tc.proof, consensusState, ) if tc.expPass { diff --git a/x/ibc/light-clients/07-tendermint/types/client_state.go b/x/ibc/light-clients/07-tendermint/types/client_state.go index 25c40eb0b5..cb6e4630fa 100644 --- a/x/ibc/light-clients/07-tendermint/types/client_state.go +++ b/x/ibc/light-clients/07-tendermint/types/client_state.go @@ -169,14 +169,13 @@ func (cs ClientState) ZeroCustomFields() exported.ClientState { func (cs ClientState) VerifyClientState( store sdk.KVStore, cdc codec.BinaryMarshaler, - provingRoot exported.Root, height exported.Height, prefix exported.Prefix, counterpartyClientIdentifier string, proof []byte, clientState exported.ClientState, ) error { - merkleProof, _, err := produceVerificationArgs(store, cdc, cs, height, prefix, proof) + merkleProof, provingConsensusState, err := produceVerificationArgs(store, cdc, cs, height, prefix, proof) if err != nil { return err } @@ -201,7 +200,7 @@ func (cs ClientState) VerifyClientState( return err } - return merkleProof.VerifyMembership(cs.ProofSpecs, provingRoot, path, bz) + return merkleProof.VerifyMembership(cs.ProofSpecs, provingConsensusState.GetRoot(), path, bz) } // VerifyClientConsensusState verifies a proof of the consensus state of the @@ -209,7 +208,6 @@ func (cs ClientState) VerifyClientState( func (cs ClientState) VerifyClientConsensusState( store sdk.KVStore, cdc codec.BinaryMarshaler, - provingRoot exported.Root, height exported.Height, counterpartyClientIdentifier string, consensusHeight exported.Height, @@ -217,7 +215,7 @@ func (cs ClientState) VerifyClientConsensusState( proof []byte, consensusState exported.ConsensusState, ) error { - merkleProof, _, err := produceVerificationArgs(store, cdc, cs, height, prefix, proof) + merkleProof, provingConsensusState, err := produceVerificationArgs(store, cdc, cs, height, prefix, proof) if err != nil { return err } @@ -242,7 +240,7 @@ func (cs ClientState) VerifyClientConsensusState( return err } - if err := merkleProof.VerifyMembership(cs.ProofSpecs, provingRoot, path, bz); err != nil { + if err := merkleProof.VerifyMembership(cs.ProofSpecs, provingConsensusState.GetRoot(), path, bz); err != nil { return err } diff --git a/x/ibc/light-clients/07-tendermint/types/client_state_test.go b/x/ibc/light-clients/07-tendermint/types/client_state_test.go index 1bb787d2b6..b032e68b12 100644 --- a/x/ibc/light-clients/07-tendermint/types/client_state_test.go +++ b/x/ibc/light-clients/07-tendermint/types/client_state_test.go @@ -160,7 +160,7 @@ func (suite *TendermintTestSuite) TestVerifyClientConsensusState() { tc := tc err := tc.clientState.VerifyClientConsensusState( - nil, suite.cdc, tc.consensusState.Root, height, "chainA", tc.clientState.LatestHeight, tc.prefix, tc.proof, tc.consensusState, + nil, suite.cdc, height, "chainA", tc.clientState.LatestHeight, tc.prefix, tc.proof, tc.consensusState, ) if tc.expPass { diff --git a/x/ibc/light-clients/07-tendermint/types/store.go b/x/ibc/light-clients/07-tendermint/types/store.go index cebd3b8eca..096d798333 100644 --- a/x/ibc/light-clients/07-tendermint/types/store.go +++ b/x/ibc/light-clients/07-tendermint/types/store.go @@ -16,12 +16,12 @@ func GetConsensusState(store sdk.KVStore, cdc codec.BinaryMarshaler, height expo if bz == nil { return nil, sdkerrors.Wrapf( clienttypes.ErrConsensusStateNotFound, - "consensus state does not exist for height %d", height, + "consensus state does not exist for height %s", height, ) } - var consensusStateI exported.ConsensusState - if err := codec.UnmarshalAny(cdc, &consensusStateI, bz); err != nil { + consensusStateI, err := clienttypes.UnmarshalConsensusState(cdc, bz) + if err != nil { return nil, sdkerrors.Wrapf(clienttypes.ErrInvalidConsensus, "unmarshal error: %v", err) } diff --git a/x/ibc/light-clients/07-tendermint/types/store_test.go b/x/ibc/light-clients/07-tendermint/types/store_test.go index 42bee567c3..91cb973ca0 100644 --- a/x/ibc/light-clients/07-tendermint/types/store_test.go +++ b/x/ibc/light-clients/07-tendermint/types/store_test.go @@ -5,6 +5,7 @@ import ( channeltypes "github.com/cosmos/cosmos-sdk/x/ibc/core/04-channel/types" host "github.com/cosmos/cosmos-sdk/x/ibc/core/24-host" "github.com/cosmos/cosmos-sdk/x/ibc/core/exported" + solomachinetypes "github.com/cosmos/cosmos-sdk/x/ibc/light-clients/06-solomachine/types" "github.com/cosmos/cosmos-sdk/x/ibc/light-clients/07-tendermint/types" ) @@ -36,15 +37,14 @@ func (suite *TendermintTestSuite) TestGetConsensusState() { store.Set(host.KeyConsensusState(height), clientStateBz) }, false, }, - // TODO: uncomment upon merge of solomachine - // { - // "invalid consensus state (solomachine)", func() { - // // marshal and set solomachine consensus state - // store := suite.chainA.App.IBCKeeper.ClientKeeper.ClientStore(suite.chainA.GetContext(), clientA) - // consensusStateBz := suite.chainA.App.IBCKeeper.ClientKeeper.MustMarshalConsensusState(&solomachinetypes.ConsensusState{}) - // store.Set(host.KeyConsensusState(height), consensusStateBz) - // }, false, - // }, + { + "invalid consensus state (solomachine)", func() { + // marshal and set solomachine consensus state + store := suite.chainA.App.IBCKeeper.ClientKeeper.ClientStore(suite.chainA.GetContext(), clientA) + consensusStateBz := suite.chainA.App.IBCKeeper.ClientKeeper.MustMarshalConsensusState(&solomachinetypes.ConsensusState{}) + store.Set(host.KeyConsensusState(height), consensusStateBz) + }, false, + }, } for _, tc := range testCases { diff --git a/x/ibc/light-clients/09-localhost/types/client_state.go b/x/ibc/light-clients/09-localhost/types/client_state.go index edaa74c687..fa4223fc9a 100644 --- a/x/ibc/light-clients/09-localhost/types/client_state.go +++ b/x/ibc/light-clients/09-localhost/types/client_state.go @@ -112,7 +112,7 @@ func (cs ClientState) VerifyUpgrade( // VerifyClientState verifies that the localhost client state is stored locally func (cs ClientState) VerifyClientState( - store sdk.KVStore, cdc codec.BinaryMarshaler, _ exported.Root, + store sdk.KVStore, cdc codec.BinaryMarshaler, _ exported.Height, _ exported.Prefix, _ string, _ []byte, clientState exported.ClientState, ) error { path := host.KeyClientState() @@ -136,7 +136,7 @@ func (cs ClientState) VerifyClientState( // VerifyClientConsensusState returns nil since a local host client does not store consensus // states. func (cs ClientState) VerifyClientConsensusState( - sdk.KVStore, codec.BinaryMarshaler, exported.Root, + sdk.KVStore, codec.BinaryMarshaler, exported.Height, string, exported.Height, exported.Prefix, []byte, exported.ConsensusState, ) error { diff --git a/x/ibc/light-clients/09-localhost/types/client_state_test.go b/x/ibc/light-clients/09-localhost/types/client_state_test.go index 6b5c0b41ca..f56cec5d7a 100644 --- a/x/ibc/light-clients/09-localhost/types/client_state_test.go +++ b/x/ibc/light-clients/09-localhost/types/client_state_test.go @@ -98,7 +98,7 @@ func (suite *LocalhostTestSuite) TestVerifyClientState() { tc.malleate() err := tc.clientState.VerifyClientState( - suite.store, suite.cdc, nil, clienttypes.NewHeight(0, 10), nil, "", []byte{}, tc.counterparty, + suite.store, suite.cdc, clienttypes.NewHeight(0, 10), nil, "", []byte{}, tc.counterparty, ) if tc.expPass { @@ -114,7 +114,7 @@ func (suite *LocalhostTestSuite) TestVerifyClientState() { func (suite *LocalhostTestSuite) TestVerifyClientConsensusState() { clientState := types.NewClientState("chainID", clientHeight) err := clientState.VerifyClientConsensusState( - nil, nil, nil, nil, "", nil, nil, nil, nil, + nil, nil, nil, "", nil, nil, nil, nil, ) suite.Require().NoError(err) } From c201963e411f93538c2197a5cd82cb33945ffbac Mon Sep 17 00:00:00 2001 From: Robert Zaremba Date: Mon, 2 Nov 2020 20:10:14 +0100 Subject: [PATCH 033/136] Update x/banking and x/crisis InitChain re slow Gaia startup (#7764) * add more logs during the initialization process * initializtion: move profiling to the top of the startProcess function * x/bank InitGenesis: remove k.ValidateBalance * debug: add logs and telemetry to x/bank and x/crisis * make x/crisis AssertInvariants optional during InitGenesis * Add module init flags mechanism * update changelog * remove debug fmt.Print * fix testutil/network/ * fix log message * update test NewApp calls * review changes Co-authored-by: Aaron Craelius --- CHANGELOG.md | 6 ++++++ server/export.go | 2 +- server/export_test.go | 8 ++++---- server/start.go | 41 +++++++++++++++++++------------------ server/types/app.go | 6 +++++- server/util.go | 6 ++++-- simapp/app.go | 12 +++++++++-- simapp/app_test.go | 6 +++--- simapp/sim_bench_test.go | 4 ++-- simapp/sim_test.go | 12 +++++------ simapp/simd/cmd/root.go | 22 ++++++++++++-------- simapp/test_helpers.go | 15 ++++++++++---- testutil/network/network.go | 1 + x/bank/keeper/genesis.go | 4 ---- x/bank/module.go | 6 +++++- x/crisis/handler_test.go | 2 +- x/crisis/keeper/keeper.go | 11 +++++----- x/crisis/module.go | 30 ++++++++++++++++++++++++--- x/gov/genesis_test.go | 2 +- x/upgrade/abci_test.go | 2 +- 20 files changed, 128 insertions(+), 70 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 17ba026380..1812f7e3f6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -52,12 +52,18 @@ Ref: https://keepachangelog.com/en/1.0.0/ * `MsgCreateValidator.Pubkey` type changed from `string` to `codectypes.Any`. * Deprecating and renaming `MakeEncodingConfig` to `MakeTestEncodingConfig` (both in `simapp` and `simapp/params` packages). * (tx) [\#7688](https://github.com/cosmos/cosmos-sdk/pull/7688) The gRPC simulate service method has been moved from `cosmos.base.v1beta1.simulate` to `cosmos.tx.v1beta1`, as a method in the Tx service. +* [#7764](https://github.com/cosmos/cosmos-sdk/pull/7764) Added module initialization options: + * `server/types.AppExporter` requires extra argument: `AppOptions`. + * `server.AddCommands` requires extra argument: `addStartFlags types.ModuleInitFlags` + * `x/crisis.NewAppModule` has a new attribute: `skipGenesisInvariants`. [PR](https://github.com/cosmos/cosmos-sdk/pull/7764) ### Features * (codec) [\#7519](https://github.com/cosmos/cosmos-sdk/pull/7519) `InterfaceRegistry` now inherits `jsonpb.AnyResolver`, and has a `RegisterCustomTypeURL` method to support ADR 031 packing of `Any`s. `AnyResolver` is now a required parameter to `RejectUnknownFields`. * (baseapp) [\#7519](https://github.com/cosmos/cosmos-sdk/pull/7519) Add `ServiceMsgRouter` to BaseApp to handle routing of protobuf service `Msg`s. The two new types defined in ADR 031, `sdk.ServiceMsg` and `sdk.MsgRequest` are introduced with this router. * (tx) [\#7688](https://github.com/cosmos/cosmos-sdk/pull/7688) Add a new Tx gRPC service with methods `Simulate` and `GetTx` (by hash). +* `x/crisis` has a new function: `AddModuleInitFlags`, which will register optional crisis module flags for the start command. + ### Bug Fixes diff --git a/server/export.go b/server/export.go index 3ed41a6494..280d62da32 100644 --- a/server/export.go +++ b/server/export.go @@ -68,7 +68,7 @@ func ExportCmd(appExporter types.AppExporter, defaultNodeHome string) *cobra.Com forZeroHeight, _ := cmd.Flags().GetBool(FlagForZeroHeight) jailAllowedAddrs, _ := cmd.Flags().GetStringSlice(FlagJailAllowedAddrs) - exported, err := appExporter(serverCtx.Logger, db, traceWriter, height, forZeroHeight, jailAllowedAddrs) + exported, err := appExporter(serverCtx.Logger, db, traceWriter, height, forZeroHeight, jailAllowedAddrs, serverCtx.Viper) if err != nil { return fmt.Errorf("error exporting state: %v", err) } diff --git a/server/export_test.go b/server/export_test.go index d804b7a151..0971665fcf 100644 --- a/server/export_test.go +++ b/server/export_test.go @@ -129,7 +129,7 @@ func setupApp(t *testing.T, tempDir string) (*simapp.SimApp, context.Context, *t logger := log.NewTMLogger(log.NewSyncWriter(os.Stdout)) db := dbm.NewMemDB() encCfg := simapp.MakeTestEncodingConfig() - app := simapp.NewSimApp(logger, db, nil, true, map[int64]bool{}, tempDir, 0, encCfg) + app := simapp.NewSimApp(logger, db, nil, true, map[int64]bool{}, tempDir, 0, encCfg, simapp.EmptyAppOptions{}) serverCtx := server.NewDefaultContext() serverCtx.Config.RootDir = tempDir @@ -148,18 +148,18 @@ func setupApp(t *testing.T, tempDir string) (*simapp.SimApp, context.Context, *t app.Commit() cmd := server.ExportCmd( - func(_ log.Logger, _ dbm.DB, _ io.Writer, height int64, forZeroHeight bool, jailAllowedAddrs []string) (types.ExportedApp, error) { + func(_ log.Logger, _ dbm.DB, _ io.Writer, height int64, forZeroHeight bool, jailAllowedAddrs []string, appOptons types.AppOptions) (types.ExportedApp, error) { encCfg := simapp.MakeTestEncodingConfig() var simApp *simapp.SimApp if height != -1 { - simApp = simapp.NewSimApp(logger, db, nil, false, map[int64]bool{}, "", 0, encCfg) + simApp = simapp.NewSimApp(logger, db, nil, false, map[int64]bool{}, "", 0, encCfg, appOptons) if err := simApp.LoadHeight(height); err != nil { return types.ExportedApp{}, err } } else { - simApp = simapp.NewSimApp(logger, db, nil, true, map[int64]bool{}, "", 0, encCfg) + simApp = simapp.NewSimApp(logger, db, nil, true, map[int64]bool{}, "", 0, encCfg, appOptons) } return simApp.ExportAppStateAndValidators(forZeroHeight, jailAllowedAddrs) diff --git a/server/start.go b/server/start.go index 6e014de750..2a2a1af886 100644 --- a/server/start.go +++ b/server/start.go @@ -193,6 +193,25 @@ func startStandAlone(ctx *Context, appCreator types.AppCreator) error { func startInProcess(ctx *Context, clientCtx client.Context, appCreator types.AppCreator) error { cfg := ctx.Config home := cfg.RootDir + var cpuProfileCleanup func() + + if cpuProfile := ctx.Viper.GetString(flagCPUProfile); cpuProfile != "" { + f, err := os.Create(cpuProfile) + if err != nil { + return err + } + + ctx.Logger.Info("starting CPU profiler", "profile", cpuProfile) + if err := pprof.StartCPUProfile(f); err != nil { + return err + } + + cpuProfileCleanup = func() { + ctx.Logger.Info("stopping CPU profiler", "profile", cpuProfile) + pprof.StopCPUProfile() + f.Close() + } + } traceWriterFile := ctx.Viper.GetString(flagTraceStore) db, err := openDB(home) @@ -226,10 +245,12 @@ func startInProcess(ctx *Context, clientCtx client.Context, appCreator types.App if err != nil { return err } + ctx.Logger.Debug("Initialization: tmNode created") if err := tmNode.Start(); err != nil { return err } + ctx.Logger.Debug("Initialization: tmNode started") // Add the tx service to the gRPC router. app.RegisterTxService(clientCtx) @@ -273,26 +294,6 @@ func startInProcess(ctx *Context, clientCtx client.Context, appCreator types.App } } - var cpuProfileCleanup func() - - if cpuProfile := ctx.Viper.GetString(flagCPUProfile); cpuProfile != "" { - f, err := os.Create(cpuProfile) - if err != nil { - return err - } - - ctx.Logger.Info("starting CPU profiler", "profile", cpuProfile) - if err := pprof.StartCPUProfile(f); err != nil { - return err - } - - cpuProfileCleanup = func() { - ctx.Logger.Info("stopping CPU profiler", "profile", cpuProfile) - pprof.StopCPUProfile() - f.Close() - } - } - defer func() { if tmNode.IsRunning() { _ = tmNode.Stop() diff --git a/server/types/app.go b/server/types/app.go index f036f6ff09..f6209d94ba 100644 --- a/server/types/app.go +++ b/server/types/app.go @@ -5,6 +5,7 @@ import ( "io" "github.com/gogo/protobuf/grpc" + "github.com/spf13/cobra" abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/libs/log" tmtypes "github.com/tendermint/tendermint/types" @@ -48,6 +49,9 @@ type ( // application using various configurations. AppCreator func(log.Logger, dbm.DB, io.Writer, AppOptions) Application + // ModuleInitFlags takes a start command and adds modules specific init flags. + ModuleInitFlags func(startCmd *cobra.Command) + // ExportedApp represents an exported app state, along with // validators, consensus params and latest app height. ExportedApp struct { @@ -63,5 +67,5 @@ type ( // AppExporter is a function that dumps all app state to // JSON-serializable structure and returns the current validator set. - AppExporter func(log.Logger, dbm.DB, io.Writer, int64, bool, []string) (ExportedApp, error) + AppExporter func(log.Logger, dbm.DB, io.Writer, int64, bool, []string, AppOptions) (ExportedApp, error) ) diff --git a/server/util.go b/server/util.go index b95f8ad505..3f66921d66 100644 --- a/server/util.go +++ b/server/util.go @@ -201,7 +201,7 @@ func interceptConfigs(rootViper *viper.Viper) (*tmcfg.Config, error) { } // add server commands -func AddCommands(rootCmd *cobra.Command, defaultNodeHome string, appCreator types.AppCreator, appExport types.AppExporter) { +func AddCommands(rootCmd *cobra.Command, defaultNodeHome string, appCreator types.AppCreator, appExport types.AppExporter, addStartFlags types.ModuleInitFlags) { tendermintCmd := &cobra.Command{ Use: "tendermint", Short: "Tendermint subcommands", @@ -213,9 +213,11 @@ func AddCommands(rootCmd *cobra.Command, defaultNodeHome string, appCreator type ShowAddressCmd(), VersionCmd(), ) + startCmd := StartCmd(appCreator, defaultNodeHome) + addStartFlags(startCmd) rootCmd.AddCommand( - StartCmd(appCreator, defaultNodeHome), + startCmd, UnsafeResetAllCmd(), flags.LineBreak, tendermintCmd, diff --git a/simapp/app.go b/simapp/app.go index 3f11216af3..a8c9e584be 100644 --- a/simapp/app.go +++ b/simapp/app.go @@ -8,6 +8,7 @@ import ( "github.com/gorilla/mux" "github.com/rakyll/statik/fs" + "github.com/spf13/cast" abci "github.com/tendermint/tendermint/abci/types" tmjson "github.com/tendermint/tendermint/libs/json" "github.com/tendermint/tendermint/libs/log" @@ -197,7 +198,8 @@ func init() { // NewSimApp returns a reference to an initialized SimApp. func NewSimApp( logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest bool, skipUpgradeHeights map[int64]bool, - homePath string, invCheckPeriod uint, encodingConfig simappparams.EncodingConfig, baseAppOptions ...func(*baseapp.BaseApp), + homePath string, invCheckPeriod uint, encodingConfig simappparams.EncodingConfig, + appOpts servertypes.AppOptions, baseAppOptions ...func(*baseapp.BaseApp), ) *SimApp { // TODO: Remove cdc in favor of appCodec once all modules are migrated. @@ -317,6 +319,12 @@ func NewSimApp( // If evidence needs to be handled for the app, set routes in router here and seal app.EvidenceKeeper = *evidenceKeeper + /**** Module Options ****/ + + // NOTE: we may consider parsing `appOpts` inside module constructors. For the moment + // we prefer to be more strict in what arguments the modules expect. + var skipGenesisInvariants = cast.ToBool(appOpts.Get(crisis.FlagSkipGenesisInvariants)) + // NOTE: Any module instantiated in the module manager that is later modified // must be passed by reference here. app.mm = module.NewManager( @@ -328,7 +336,7 @@ func NewSimApp( vesting.NewAppModule(app.AccountKeeper, app.BankKeeper), bank.NewAppModule(appCodec, app.BankKeeper, app.AccountKeeper), capability.NewAppModule(appCodec, *app.CapabilityKeeper), - crisis.NewAppModule(&app.CrisisKeeper), + crisis.NewAppModule(&app.CrisisKeeper, skipGenesisInvariants), gov.NewAppModule(appCodec, app.GovKeeper, app.AccountKeeper, app.BankKeeper), mint.NewAppModule(appCodec, app.MintKeeper, app.AccountKeeper), slashing.NewAppModule(appCodec, app.SlashingKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper), diff --git a/simapp/app_test.go b/simapp/app_test.go index fdc609677a..fef50310bf 100644 --- a/simapp/app_test.go +++ b/simapp/app_test.go @@ -14,7 +14,7 @@ import ( func TestSimAppExport(t *testing.T) { db := dbm.NewMemDB() - app := NewSimApp(log.NewTMLogger(log.NewSyncWriter(os.Stdout)), db, nil, true, map[int64]bool{}, DefaultNodeHome, 0, MakeTestEncodingConfig()) + app := NewSimApp(log.NewTMLogger(log.NewSyncWriter(os.Stdout)), db, nil, true, map[int64]bool{}, DefaultNodeHome, 0, MakeTestEncodingConfig(), EmptyAppOptions{}) genesisState := NewDefaultGenesisState() stateBytes, err := json.MarshalIndent(genesisState, "", " ") @@ -30,7 +30,7 @@ func TestSimAppExport(t *testing.T) { app.Commit() // Making a new app object with the db, so that initchain hasn't been called - app2 := NewSimApp(log.NewTMLogger(log.NewSyncWriter(os.Stdout)), db, nil, true, map[int64]bool{}, DefaultNodeHome, 0, MakeTestEncodingConfig()) + app2 := NewSimApp(log.NewTMLogger(log.NewSyncWriter(os.Stdout)), db, nil, true, map[int64]bool{}, DefaultNodeHome, 0, MakeTestEncodingConfig(), EmptyAppOptions{}) _, err = app2.ExportAppStateAndValidators(false, []string{}) require.NoError(t, err, "ExportAppStateAndValidators should not have an error") } @@ -38,7 +38,7 @@ func TestSimAppExport(t *testing.T) { // ensure that blocked addresses are properly set in bank keeper func TestBlockedAddrs(t *testing.T) { db := dbm.NewMemDB() - app := NewSimApp(log.NewTMLogger(log.NewSyncWriter(os.Stdout)), db, nil, true, map[int64]bool{}, DefaultNodeHome, 0, MakeTestEncodingConfig()) + app := NewSimApp(log.NewTMLogger(log.NewSyncWriter(os.Stdout)), db, nil, true, map[int64]bool{}, DefaultNodeHome, 0, MakeTestEncodingConfig(), EmptyAppOptions{}) for acc := range maccPerms { require.Equal(t, !allowedReceivingModAcc[acc], app.BankKeeper.BlockedAddr(app.AccountKeeper.GetModuleAddress(acc))) diff --git a/simapp/sim_bench_test.go b/simapp/sim_bench_test.go index 505150c450..7c22dcfe8a 100644 --- a/simapp/sim_bench_test.go +++ b/simapp/sim_bench_test.go @@ -27,7 +27,7 @@ func BenchmarkFullAppSimulation(b *testing.B) { } }() - app := NewSimApp(logger, db, nil, true, map[int64]bool{}, DefaultNodeHome, FlagPeriodValue, MakeTestEncodingConfig(), interBlockCacheOpt()) + app := NewSimApp(logger, db, nil, true, map[int64]bool{}, DefaultNodeHome, FlagPeriodValue, MakeTestEncodingConfig(), EmptyAppOptions{}, interBlockCacheOpt()) // run randomized simulation _, simParams, simErr := simulation.SimulateFromSeed( @@ -72,7 +72,7 @@ func BenchmarkInvariants(b *testing.B) { } }() - app := NewSimApp(logger, db, nil, true, map[int64]bool{}, DefaultNodeHome, FlagPeriodValue, MakeTestEncodingConfig(), interBlockCacheOpt()) + app := NewSimApp(logger, db, nil, true, map[int64]bool{}, DefaultNodeHome, FlagPeriodValue, MakeTestEncodingConfig(), EmptyAppOptions{}, interBlockCacheOpt()) // run randomized simulation _, simParams, simErr := simulation.SimulateFromSeed( diff --git a/simapp/sim_test.go b/simapp/sim_test.go index d20a8267c1..cc1a7cada4 100644 --- a/simapp/sim_test.go +++ b/simapp/sim_test.go @@ -68,7 +68,7 @@ func TestFullAppSimulation(t *testing.T) { require.NoError(t, os.RemoveAll(dir)) }() - app := NewSimApp(logger, db, nil, true, map[int64]bool{}, DefaultNodeHome, FlagPeriodValue, MakeTestEncodingConfig(), fauxMerkleModeOpt) + app := NewSimApp(logger, db, nil, true, map[int64]bool{}, DefaultNodeHome, FlagPeriodValue, MakeTestEncodingConfig(), EmptyAppOptions{}, fauxMerkleModeOpt) require.Equal(t, "SimApp", app.Name()) // run randomized simulation @@ -106,7 +106,7 @@ func TestAppImportExport(t *testing.T) { require.NoError(t, os.RemoveAll(dir)) }() - app := NewSimApp(logger, db, nil, true, map[int64]bool{}, DefaultNodeHome, FlagPeriodValue, MakeTestEncodingConfig(), fauxMerkleModeOpt) + app := NewSimApp(logger, db, nil, true, map[int64]bool{}, DefaultNodeHome, FlagPeriodValue, MakeTestEncodingConfig(), EmptyAppOptions{}, fauxMerkleModeOpt) require.Equal(t, "SimApp", app.Name()) // Run randomized simulation @@ -146,7 +146,7 @@ func TestAppImportExport(t *testing.T) { require.NoError(t, os.RemoveAll(newDir)) }() - newApp := NewSimApp(log.NewNopLogger(), newDB, nil, true, map[int64]bool{}, DefaultNodeHome, FlagPeriodValue, MakeTestEncodingConfig(), fauxMerkleModeOpt) + newApp := NewSimApp(log.NewNopLogger(), newDB, nil, true, map[int64]bool{}, DefaultNodeHome, FlagPeriodValue, MakeTestEncodingConfig(), EmptyAppOptions{}, fauxMerkleModeOpt) require.Equal(t, "SimApp", newApp.Name()) var genesisState GenesisState @@ -203,7 +203,7 @@ func TestAppSimulationAfterImport(t *testing.T) { require.NoError(t, os.RemoveAll(dir)) }() - app := NewSimApp(logger, db, nil, true, map[int64]bool{}, DefaultNodeHome, FlagPeriodValue, MakeTestEncodingConfig(), fauxMerkleModeOpt) + app := NewSimApp(logger, db, nil, true, map[int64]bool{}, DefaultNodeHome, FlagPeriodValue, MakeTestEncodingConfig(), EmptyAppOptions{}, fauxMerkleModeOpt) require.Equal(t, "SimApp", app.Name()) // Run randomized simulation @@ -248,7 +248,7 @@ func TestAppSimulationAfterImport(t *testing.T) { require.NoError(t, os.RemoveAll(newDir)) }() - newApp := NewSimApp(log.NewNopLogger(), newDB, nil, true, map[int64]bool{}, DefaultNodeHome, FlagPeriodValue, MakeTestEncodingConfig(), fauxMerkleModeOpt) + newApp := NewSimApp(log.NewNopLogger(), newDB, nil, true, map[int64]bool{}, DefaultNodeHome, FlagPeriodValue, MakeTestEncodingConfig(), EmptyAppOptions{}, fauxMerkleModeOpt) require.Equal(t, "SimApp", newApp.Name()) newApp.InitChain(abci.RequestInitChain{ @@ -299,7 +299,7 @@ func TestAppStateDeterminism(t *testing.T) { } db := dbm.NewMemDB() - app := NewSimApp(logger, db, nil, true, map[int64]bool{}, DefaultNodeHome, FlagPeriodValue, MakeTestEncodingConfig(), interBlockCacheOpt()) + app := NewSimApp(logger, db, nil, true, map[int64]bool{}, DefaultNodeHome, FlagPeriodValue, MakeTestEncodingConfig(), EmptyAppOptions{}, interBlockCacheOpt()) fmt.Printf( "running non-determinism simulation; seed %d: %d/%d, attempt: %d/%d\n", diff --git a/simapp/simd/cmd/root.go b/simapp/simd/cmd/root.go index f4f6ca5897..2ffd394593 100644 --- a/simapp/simd/cmd/root.go +++ b/simapp/simd/cmd/root.go @@ -6,10 +6,6 @@ import ( "os" "path/filepath" - "github.com/cosmos/cosmos-sdk/codec" - "github.com/cosmos/cosmos-sdk/simapp/params" - "github.com/cosmos/cosmos-sdk/snapshots" - "github.com/spf13/cast" "github.com/spf13/cobra" tmcli "github.com/tendermint/tendermint/libs/cli" @@ -22,9 +18,12 @@ import ( "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/keys" "github.com/cosmos/cosmos-sdk/client/rpc" + "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/server" servertypes "github.com/cosmos/cosmos-sdk/server/types" "github.com/cosmos/cosmos-sdk/simapp" + "github.com/cosmos/cosmos-sdk/simapp/params" + "github.com/cosmos/cosmos-sdk/snapshots" "github.com/cosmos/cosmos-sdk/store" sdk "github.com/cosmos/cosmos-sdk/types" authclient "github.com/cosmos/cosmos-sdk/x/auth/client" @@ -32,6 +31,7 @@ import ( "github.com/cosmos/cosmos-sdk/x/auth/types" vestingcli "github.com/cosmos/cosmos-sdk/x/auth/vesting/client/cli" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" + "github.com/cosmos/cosmos-sdk/x/crisis" genutilcli "github.com/cosmos/cosmos-sdk/x/genutil/client/cli" ) @@ -97,7 +97,7 @@ func initRootCmd(rootCmd *cobra.Command, encodingConfig params.EncodingConfig) { debug.Cmd(), ) - server.AddCommands(rootCmd, simapp.DefaultNodeHome, newApp, createSimappAndExport) + server.AddCommands(rootCmd, simapp.DefaultNodeHome, newApp, createSimappAndExport, addModuleInitFlags) // add keybase, auxiliary RPC, query, and tx child commands rootCmd.AddCommand( @@ -108,6 +108,10 @@ func initRootCmd(rootCmd *cobra.Command, encodingConfig params.EncodingConfig) { ) } +func addModuleInitFlags(startCmd *cobra.Command) { + crisis.AddModuleInitFlags(startCmd) +} + func queryCommand() *cobra.Command { cmd := &cobra.Command{ Use: "query", @@ -192,6 +196,7 @@ func newApp(logger log.Logger, db dbm.DB, traceStore io.Writer, appOpts serverty cast.ToString(appOpts.Get(flags.FlagHome)), cast.ToUint(appOpts.Get(server.FlagInvCheckPeriod)), simapp.MakeTestEncodingConfig(), // Ideally, we would reuse the one created by NewRootCmd. + appOpts, baseapp.SetPruning(pruningOpts), baseapp.SetMinGasPrices(cast.ToString(appOpts.Get(server.FlagMinGasPrices))), baseapp.SetHaltHeight(cast.ToUint64(appOpts.Get(server.FlagHaltHeight))), @@ -210,18 +215,19 @@ func newApp(logger log.Logger, db dbm.DB, traceStore io.Writer, appOpts serverty // and exports state. func createSimappAndExport( logger log.Logger, db dbm.DB, traceStore io.Writer, height int64, forZeroHeight bool, jailAllowedAddrs []string, -) (servertypes.ExportedApp, error) { + appOpts servertypes.AppOptions) (servertypes.ExportedApp, error) { + encCfg := simapp.MakeTestEncodingConfig() // Ideally, we would reuse the one created by NewRootCmd. encCfg.Marshaler = codec.NewProtoCodec(encCfg.InterfaceRegistry) var simApp *simapp.SimApp if height != -1 { - simApp = simapp.NewSimApp(logger, db, traceStore, false, map[int64]bool{}, "", uint(1), encCfg) + simApp = simapp.NewSimApp(logger, db, traceStore, false, map[int64]bool{}, "", uint(1), encCfg, appOpts) if err := simApp.LoadHeight(height); err != nil { return servertypes.ExportedApp{}, err } } else { - simApp = simapp.NewSimApp(logger, db, traceStore, true, map[int64]bool{}, "", uint(1), encCfg) + simApp = simapp.NewSimApp(logger, db, traceStore, true, map[int64]bool{}, "", uint(1), encCfg, appOpts) } return simApp.ExportAppStateAndValidators(forZeroHeight, jailAllowedAddrs) diff --git a/simapp/test_helpers.go b/simapp/test_helpers.go index de871b7c5e..6624c1df3f 100644 --- a/simapp/test_helpers.go +++ b/simapp/test_helpers.go @@ -51,7 +51,7 @@ var DefaultConsensusParams = &abci.ConsensusParams{ // Setup initializes a new SimApp. A Nop logger is set in SimApp. func Setup(isCheckTx bool) *SimApp { db := dbm.NewMemDB() - app := NewSimApp(log.NewNopLogger(), db, nil, true, map[int64]bool{}, DefaultNodeHome, 5, MakeTestEncodingConfig()) + app := NewSimApp(log.NewNopLogger(), db, nil, true, map[int64]bool{}, DefaultNodeHome, 5, MakeTestEncodingConfig(), EmptyAppOptions{}) if !isCheckTx { // init chain must be called to stop deliverState from being nil genesisState := NewDefaultGenesisState() @@ -79,8 +79,7 @@ func Setup(isCheckTx bool) *SimApp { // account. A Nop logger is set in SimApp. func SetupWithGenesisValSet(t *testing.T, valSet *tmtypes.ValidatorSet, genAccs []authtypes.GenesisAccount, balances ...banktypes.Balance) *SimApp { db := dbm.NewMemDB() - app := NewSimApp(log.NewNopLogger(), db, nil, true, map[int64]bool{}, DefaultNodeHome, 5, MakeTestEncodingConfig()) - + app := NewSimApp(log.NewNopLogger(), db, nil, true, map[int64]bool{}, DefaultNodeHome, 5, MakeTestEncodingConfig(), EmptyAppOptions{}) genesisState := NewDefaultGenesisState() // set genesis accounts @@ -160,7 +159,7 @@ func SetupWithGenesisValSet(t *testing.T, valSet *tmtypes.ValidatorSet, genAccs // accounts and possible balances. func SetupWithGenesisAccounts(genAccs []authtypes.GenesisAccount, balances ...banktypes.Balance) *SimApp { db := dbm.NewMemDB() - app := NewSimApp(log.NewNopLogger(), db, nil, true, map[int64]bool{}, DefaultNodeHome, 0, MakeTestEncodingConfig()) + app := NewSimApp(log.NewNopLogger(), db, nil, true, map[int64]bool{}, DefaultNodeHome, 0, MakeTestEncodingConfig(), EmptyAppOptions{}) // initialize the chain with the passed in genesis accounts genesisState := NewDefaultGenesisState() @@ -435,3 +434,11 @@ func NewPubKeyFromHex(pk string) (res crypto.PubKey) { } return &ed25519.PubKey{Key: pkBytes} } + +// EmptyAppOptions is a stub implementing AppOptions +type EmptyAppOptions struct{} + +// Get implements AppOptions +func (ao EmptyAppOptions) Get(o string) interface{} { + return nil +} diff --git a/testutil/network/network.go b/testutil/network/network.go index fc50c9aa0c..1ee11f8c93 100644 --- a/testutil/network/network.go +++ b/testutil/network/network.go @@ -59,6 +59,7 @@ func NewAppConstructor(encodingCfg params.EncodingConfig) AppConstructor { return simapp.NewSimApp( val.Ctx.Logger, dbm.NewMemDB(), nil, true, make(map[int64]bool), val.Ctx.Config.RootDir, 0, encodingCfg, + simapp.EmptyAppOptions{}, baseapp.SetPruning(storetypes.NewPruningOptionsFromString(val.AppConfig.Pruning)), baseapp.SetMinGasPrices(val.AppConfig.MinGasPrices), ) diff --git a/x/bank/keeper/genesis.go b/x/bank/keeper/genesis.go index ba1b076486..7397d8d5b6 100644 --- a/x/bank/keeper/genesis.go +++ b/x/bank/keeper/genesis.go @@ -20,10 +20,6 @@ func (k BaseKeeper) InitGenesis(ctx sdk.Context, genState types.GenesisState) { panic(err) } - if err := k.ValidateBalance(ctx, addr); err != nil { - panic(err) - } - if err := k.SetBalances(ctx, addr, balance.Coins); err != nil { panic(fmt.Errorf("error on setting balances %w", err)) } diff --git a/x/bank/module.go b/x/bank/module.go index 958d0db754..32f7431f26 100644 --- a/x/bank/module.go +++ b/x/bank/module.go @@ -5,6 +5,7 @@ import ( "encoding/json" "fmt" "math/rand" + "time" "github.com/gorilla/mux" "github.com/grpc-ecosystem/grpc-gateway/runtime" @@ -14,6 +15,7 @@ import ( "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" + "github.com/cosmos/cosmos-sdk/telemetry" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" @@ -133,9 +135,11 @@ func (am AppModule) LegacyQuerierHandler(legacyQuerierCdc *codec.LegacyAmino) sd // InitGenesis performs genesis initialization for the bank module. It returns // no validator updates. func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONMarshaler, data json.RawMessage) []abci.ValidatorUpdate { + start := time.Now() var genesisState types.GenesisState - cdc.MustUnmarshalJSON(data, &genesisState) + telemetry.MeasureSince(start, "InitGenesis", "crisis", "unmarshal") + am.keeper.InitGenesis(ctx, genesisState) return []abci.ValidatorUpdate{} } diff --git a/x/crisis/handler_test.go b/x/crisis/handler_test.go index 6d65b87646..dcde377f6d 100644 --- a/x/crisis/handler_test.go +++ b/x/crisis/handler_test.go @@ -27,7 +27,7 @@ var ( func createTestApp() (*simapp.SimApp, sdk.Context, []sdk.AccAddress) { db := dbm.NewMemDB() - app := simapp.NewSimApp(log.NewNopLogger(), db, nil, true, map[int64]bool{}, simapp.DefaultNodeHome, 1, simapp.MakeTestEncodingConfig()) + app := simapp.NewSimApp(log.NewNopLogger(), db, nil, true, map[int64]bool{}, simapp.DefaultNodeHome, 1, simapp.MakeTestEncodingConfig(), simapp.EmptyAppOptions{}) ctx := app.NewContext(true, tmproto.Header{}) constantFee := sdk.NewInt64Coin(sdk.DefaultBondDenom, 10) diff --git a/x/crisis/keeper/keeper.go b/x/crisis/keeper/keeper.go index 86136981dd..8a78c936c3 100644 --- a/x/crisis/keeper/keeper.go +++ b/x/crisis/keeper/keeper.go @@ -58,7 +58,7 @@ func (k Keeper) Routes() []types.InvarRoute { return k.routes } -// Invariants returns all the registered Crisis keeper invariants. +// Invariants returns a copy of all registered Crisis keeper invariants. func (k Keeper) Invariants() []sdk.Invariant { invars := make([]sdk.Invariant, len(k.routes)) for i, route := range k.routes { @@ -74,8 +74,9 @@ func (k Keeper) AssertInvariants(ctx sdk.Context) { start := time.Now() invarRoutes := k.Routes() - - for _, ir := range invarRoutes { + n := len(invarRoutes) + for i, ir := range invarRoutes { + logger.Debug("Asserting cirisis invariants", "inv", fmt.Sprint(i, "/", n)) if res, stop := ir.Invar(ctx); stop { // TODO: Include app name as part of context to allow for this to be // variable. @@ -85,9 +86,7 @@ func (k Keeper) AssertInvariants(ctx sdk.Context) { } } - end := time.Now() - diff := end.Sub(start) - + diff := time.Since(start) logger.Info("asserted all invariants", "duration", diff, "height", ctx.BlockHeight()) } diff --git a/x/crisis/module.go b/x/crisis/module.go index 9793dc8bfc..5d34c1ce28 100644 --- a/x/crisis/module.go +++ b/x/crisis/module.go @@ -3,6 +3,7 @@ package crisis import ( "encoding/json" "fmt" + "time" "github.com/gorilla/mux" "github.com/grpc-ecosystem/grpc-gateway/runtime" @@ -12,6 +13,7 @@ import ( "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" + "github.com/cosmos/cosmos-sdk/telemetry" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" "github.com/cosmos/cosmos-sdk/x/crisis/client/cli" @@ -24,6 +26,11 @@ var ( _ module.AppModuleBasic = AppModuleBasic{} ) +// Module init related flags +const ( + FlagSkipGenesisInvariants = "x-crisis-skip-assert-invariants" +) + // AppModuleBasic defines the basic application module used by the crisis module. type AppModuleBasic struct{} @@ -83,16 +90,28 @@ type AppModule struct { // manager is created, the invariants can be properly registered and // executed. keeper *keeper.Keeper + + skipGenesisInvariants bool } -// NewAppModule creates a new AppModule object -func NewAppModule(keeper *keeper.Keeper) AppModule { +// NewAppModule creates a new AppModule object. If initChainAssertInvariants is set, +// we will call keeper.AssertInvariants during InitGenesis (it may take a significant time) +// - which doesn't impact the chain security unless 66+% of validators have a wrongly +// modified genesis file. +func NewAppModule(keeper *keeper.Keeper, skipGenesisInvariants bool) AppModule { return AppModule{ AppModuleBasic: AppModuleBasic{}, keeper: keeper, + + skipGenesisInvariants: skipGenesisInvariants, } } +// AddModuleInitFlags implements servertypes.ModuleInitFlags interface. +func AddModuleInitFlags(startCmd *cobra.Command) { + startCmd.Flags().Bool(FlagSkipGenesisInvariants, false, "Skip x/crisis invariants check on startup") +} + // Name returns the crisis module's name. func (AppModule) Name() string { return types.ModuleName @@ -120,10 +139,15 @@ func (am AppModule) RegisterServices(cfg module.Configurator) { // InitGenesis performs genesis initialization for the crisis module. It returns // no validator updates. func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONMarshaler, data json.RawMessage) []abci.ValidatorUpdate { + start := time.Now() var genesisState types.GenesisState cdc.MustUnmarshalJSON(data, &genesisState) + telemetry.MeasureSince(start, "InitGenesis", "crisis", "unmarshal") + am.keeper.InitGenesis(ctx, &genesisState) - am.keeper.AssertInvariants(ctx) + if !am.skipGenesisInvariants { + am.keeper.AssertInvariants(ctx) + } return []abci.ValidatorUpdate{} } diff --git a/x/gov/genesis_test.go b/x/gov/genesis_test.go index f4f548c26a..5ed4a11205 100644 --- a/x/gov/genesis_test.go +++ b/x/gov/genesis_test.go @@ -68,7 +68,7 @@ func TestImportExportQueues(t *testing.T) { } db := dbm.NewMemDB() - app2 := simapp.NewSimApp(log.NewNopLogger(), db, nil, true, map[int64]bool{}, simapp.DefaultNodeHome, 0, simapp.MakeTestEncodingConfig()) + app2 := simapp.NewSimApp(log.NewNopLogger(), db, nil, true, map[int64]bool{}, simapp.DefaultNodeHome, 0, simapp.MakeTestEncodingConfig(), simapp.EmptyAppOptions{}) app2.InitChain( abci.RequestInitChain{ diff --git a/x/upgrade/abci_test.go b/x/upgrade/abci_test.go index a133cad5a2..e2dd5c8a12 100644 --- a/x/upgrade/abci_test.go +++ b/x/upgrade/abci_test.go @@ -40,7 +40,7 @@ var s TestSuite func setupTest(height int64, skip map[int64]bool) TestSuite { db := dbm.NewMemDB() - app := simapp.NewSimApp(log.NewNopLogger(), db, nil, true, skip, simapp.DefaultNodeHome, 0, simapp.MakeTestEncodingConfig()) + app := simapp.NewSimApp(log.NewNopLogger(), db, nil, true, skip, simapp.DefaultNodeHome, 0, simapp.MakeTestEncodingConfig(), simapp.EmptyAppOptions{}) genesisState := simapp.NewDefaultGenesisState() stateBytes, err := json.MarshalIndent(genesisState, "", " ") if err != nil { From ce3994020a0d5c246016c8832ba4a668e8b7c77b Mon Sep 17 00:00:00 2001 From: Cory Date: Mon, 2 Nov 2020 16:25:36 -0800 Subject: [PATCH 034/136] Stargate RC2 - Changelog updates & tag RC (#7785) * update changelog with rc1 and rc2 entries * add more rc2 changelog updates --- CHANGELOG.md | 57 +++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 50 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1812f7e3f6..9ddba54527 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,15 +36,14 @@ Ref: https://keepachangelog.com/en/1.0.0/ ## [Unreleased] +## [v0.40.0-rc2](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.40.0-rc2) - 2020-11-02 + ### Client Breaking -* (x/staking) [\#7499](https://github.com/cosmos/cosmos-sdk/pull/7499) `BondStatus` is now a protobuf `enum` instead of an `int32`, and JSON serialized using its protobuf name, so expect names like `BOND_STATUS_UNBONDING` as opposed to `Unbonding`. -* (x/evidence) [\#7538](https://github.com/cosmos/cosmos-sdk/pull/7538) The ABCI's `Result.Data` field of `MsgSubmitEvidence` does not contain the raw evidence's hash, but the encoded `MsgSubmitEvidenceResponse` struct. * (x/upgrade) [#7697](https://github.com/cosmos/cosmos-sdk/pull/7697) Rename flag name "--time" to "--upgrade-time", "--info" to "--upgrade-info", to keep it consistent with help message. ### API Breaking -* (AppModule) [\#7518](https://github.com/cosmos/cosmos-sdk/pull/7518) [\#7584](https://github.com/cosmos/cosmos-sdk/pull/7584) Rename `AppModule.RegisterQueryServices` to `AppModule.RegisterServices`, as this method now registers multiple services (the gRPC query service and the protobuf Msg service). A `Configurator` struct is used to hold the different services. * (x/staking/types) [\#7447](https://github.com/cosmos/cosmos-sdk/issues/7447) Remove bech32 PubKey support: * `ValidatorI` interface update. `GetConsPubKey` renamed to `TmConsPubKey` (consensus public key must be a tendermint key). `TmConsPubKey`, `GetConsAddr` methods return error. * `Validator` update. Methods changed in `ValidatorI` (as described above) and `ToTmValidator` return error. @@ -59,18 +58,62 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### Features -* (codec) [\#7519](https://github.com/cosmos/cosmos-sdk/pull/7519) `InterfaceRegistry` now inherits `jsonpb.AnyResolver`, and has a `RegisterCustomTypeURL` method to support ADR 031 packing of `Any`s. `AnyResolver` is now a required parameter to `RejectUnknownFields`. -* (baseapp) [\#7519](https://github.com/cosmos/cosmos-sdk/pull/7519) Add `ServiceMsgRouter` to BaseApp to handle routing of protobuf service `Msg`s. The two new types defined in ADR 031, `sdk.ServiceMsg` and `sdk.MsgRequest` are introduced with this router. * (tx) [\#7688](https://github.com/cosmos/cosmos-sdk/pull/7688) Add a new Tx gRPC service with methods `Simulate` and `GetTx` (by hash). -* `x/crisis` has a new function: `AddModuleInitFlags`, which will register optional crisis module flags for the start command. +* __Modules__ + * `x/crisis` has a new function: `AddModuleInitFlags`, which will register optional crisis module flags for the start command. ### Bug Fixes -* (kvstore) [\#7415](https://github.com/cosmos/cosmos-sdk/pull/7415) Allow new stores to be registered during on-chain upgrades. * (client) [\#7699](https://github.com/cosmos/cosmos-sdk/pull/7699) Fix panic in context when setting invalid nodeURI. `WithNodeURI` does not set the `Client` in the context. * (x/gov) [#7641](https://github.com/cosmos/cosmos-sdk/pull/7641) Fix tally calculation precision error. +### Improvements + +* (rest) [#7649](https://github.com/cosmos/cosmos-sdk/pull/7649) Return an unsigned tx in legacy GET /tx endpoint when signature conversion fails +* (cli) [#7764](https://github.com/cosmos/cosmos-sdk/pull/7764) Update x/banking and x/crisis InitChain to improve node startup time + + +## [v0.40.0-rc1](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.40.0-rc1) - 2020-10-19 + +### Client Breaking Changes + +* __Modules__ + * (x/staking) [\#7499](https://github.com/cosmos/cosmos-sdk/pull/7499) `BondStatus` is now a protobuf `enum` instead + of an `int32`, and JSON serialized using its protobuf name, so expect names like `BOND_STATUS_UNBONDING` as opposed + to `Unbonding`. + * (x/staking) [\#7556](https://github.com/cosmos/cosmos-sdk/pull/7556) The ABCI's `Result.Data` field for + `MsgBeginRedelegate` and `MsgUndelegate` responses does not contain custom binary marshaled `completionTime`, but the + protobuf encoded `MsgBeginRedelegateResponse` and `MsgUndelegateResponse` structs respectively + * (x/evidence) [\#7538](https://github.com/cosmos/cosmos-sdk/pull/7538) The ABCI's `Result.Data` field for + `MsgSubmitEvidence` responses does not contain the raw evidence's hash, but the protobuf encoded + `MsgSubmitEvidenceResponse` struct. + * (x/gov) [\#7533](https://github.com/cosmos/cosmos-sdk/pull/7533) The ABCI's `Result.Data` field for + `MsgSubmitProposal` responses does not contain a raw binary encoding of the `proposalID`, but the protobuf encoded + `MsgSubmitSubmitProposalResponse` struct. + +### API Breaking + +* (AppModule) [\#7518](https://github.com/cosmos/cosmos-sdk/pull/7518) [\#7584](https://github.com/cosmos/cosmos-sdk/pull/7584) Rename `AppModule.RegisterQueryServices` to `AppModule.RegisterServices`, as this method now registers multiple services (the gRPC query service and the protobuf Msg service). A `Configurator` struct is used to hold the different services. + +### Features + +* (modules) [\#7540](https://github.com/cosmos/cosmos-sdk/issues/7540) Protobuf service definitions can now be used for +packing `Msg`s in transactions as defined in [ADR 031](./docs/architecture/adr-031-msg-service.md). All modules now +define a `Msg` protobuf service. +* (codec) [\#7519](https://github.com/cosmos/cosmos-sdk/pull/7519) `InterfaceRegistry` now inherits `jsonpb.AnyResolver`, and has a `RegisterCustomTypeURL` method to support ADR 031 packing of `Any`s. `AnyResolver` is now a required parameter to `RejectUnknownFields`. +* (baseapp) [\#7519](https://github.com/cosmos/cosmos-sdk/pull/7519) Add `ServiceMsgRouter` to BaseApp to handle routing of protobuf service `Msg`s. The two new types defined in ADR 031, `sdk.ServiceMsg` and `sdk.MsgRequest` are introduced with this router. +* (cli) [\#7221](https://github.com/cosmos/cosmos-sdk/pull/7221) Add the option of emitting amino encoded json from the CLI + +### Bug Fixes + +* (kvstore) [\#7415](https://github.com/cosmos/cosmos-sdk/pull/7415) Allow new stores to be registered during on-chain upgrades. +* (rest) [\#7730](https://github.com/cosmos/cosmos-sdk/pull/7730) Fix fetch txs by height on legacy REST endpoint + +### Improvements + +* (tendermint) [\#7527](https://github.com/cosmos/cosmos-sdk/pull/7527) Update sdk to tendermint 0.34-rc5 +* (iavl) [\#7549](https://github.com/cosmos/cosmos-sdk/pull/7549) Update sdk to IAVL 0.15.0-rc4 ## [v0.40.0-rc0](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.40.0-rc0) - 2020-10-13 From 6559e19764cc2ea9e9536aa64633295cc909a3f2 Mon Sep 17 00:00:00 2001 From: Aditya Date: Tue, 3 Nov 2020 09:37:55 +0000 Subject: [PATCH 035/136] Remove BatchProofs implementation (#7784) * remove batch proofs * Apply suggestions from code review Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com> --- x/ibc/core/23-commitment/types/merkle.go | 98 +----------------------- 1 file changed, 4 insertions(+), 94 deletions(-) diff --git a/x/ibc/core/23-commitment/types/merkle.go b/x/ibc/core/23-commitment/types/merkle.go index 40dd02e336..87a830e294 100644 --- a/x/ibc/core/23-commitment/types/merkle.go +++ b/x/ibc/core/23-commitment/types/merkle.go @@ -192,105 +192,15 @@ func (proof MerkleProof) VerifyNonMembership(specs []*ics23.ProofSpec, root expo } // BatchVerifyMembership verifies a group of key value pairs against the given root -// NOTE: All items must be part of a batch proof in the first chained proof, i.e. items must all be part of smallest subtree in the chained proof -// NOTE: The path passed in must be the path from the root to the smallest subtree in the chained proof -// NOTE: Untested +// NOTE: Currently left unimplemented as it is unused func (proof MerkleProof) BatchVerifyMembership(specs []*ics23.ProofSpec, root exported.Root, path exported.Path, items map[string][]byte) error { - if err := proof.validateVerificationArgs(specs, root); err != nil { - return err - } - - // Convert Proof to []CommitmentProof - proofs, err := convertProofs(proof) - if err != nil { - return err - } - - // VerifyNonMembership will verify the absence of key in lowest subtree, and then chain inclusion proofs - // of all subroots up to final root - subroot, err := proofs[0].Calculate() - if err != nil { - return sdkerrors.Wrapf(ErrInvalidProof, "could not calculate root for proof index 0: %v", err) - } - if ok := ics23.BatchVerifyMembership(specs[0], subroot, proofs[0], items); !ok { - return sdkerrors.Wrapf(ErrInvalidProof, "could not verify batch items") - } - - // BatchVerifyMembership specific argument validation - // Path must only be defined if this is a chained proof - if len(specs) > 1 { - mpath, ok := path.(MerklePath) - if !ok { - return sdkerrors.Wrapf(ErrInvalidProof, "path %v is not of type MerkleProof", path) - } - // path length should be one less than specs, since lowest proof keys are in items - if len(mpath.KeyPath.Keys) != len(specs)-1 { - return sdkerrors.Wrapf(ErrInvalidProof, "path length %d not same as proof %d", - len(mpath.KeyPath.Keys), len(specs)) - } - - // Since BatchedProof path does not include lowest subtree, exclude first proof from specs and proofs and start - // chaining at index 0 - if err := verifyChainedMembershipProof(root.GetHash(), specs[1:], proofs[1:], mpath.KeyPath, subroot, 0); err != nil { - return err - } - } else if !bytes.Equal(root.GetHash(), subroot) { - // Since we are not chaining proofs, we must check first subroot equals given root - return sdkerrors.Wrapf(ErrInvalidProof, "batched proof did not commit to expected root: %X, got: %X", root.GetHash(), subroot) - } - - return nil + return sdkerrors.Wrap(ErrInvalidProof, "batch proofs are currently unsupported") } // BatchVerifyNonMembership verifies absence of a group of keys against the given root -// NOTE: All items must be part of a batch proof in the first chained proof, i.e. items must all be part of smallest subtree in the chained proof -// NOTE: The path passed in must be the path from the root to the smallest subtree in the chained proof -// NOTE: Untested +// NOTE: Currently left unimplemented as it is unused func (proof MerkleProof) BatchVerifyNonMembership(specs []*ics23.ProofSpec, root exported.Root, path exported.Path, items [][]byte) error { - if err := proof.validateVerificationArgs(specs, root); err != nil { - return err - } - - // Convert Proof to []CommitmentProof - proofs, err := convertProofs(proof) - if err != nil { - return err - } - - // VerifyNonMembership will verify the absence of key in lowest subtree, and then chain inclusion proofs - // of all subroots up to final root - subroot, err := proofs[0].Calculate() - if err != nil { - return sdkerrors.Wrapf(ErrInvalidProof, "could not calculate root for proof index 0: %v", err) - } - if ok := ics23.BatchVerifyNonMembership(specs[0], subroot, proofs[0], items); !ok { - return sdkerrors.Wrapf(ErrInvalidProof, "could not verify batch items") - } - - // BatchVerifyNonMembership specific argument validation - // Path must only be defined if this is a chained proof - if len(specs) > 1 { - mpath, ok := path.(MerklePath) - if !ok { - return sdkerrors.Wrapf(ErrInvalidProof, "path %v is not of type MerkleProof", path) - } - // path length should be one less than specs, since lowest proof keys are in items - if len(mpath.KeyPath.Keys) != len(specs)-1 { - return sdkerrors.Wrapf(ErrInvalidProof, "path length %d not same as proof %d", - len(mpath.KeyPath.Keys), len(specs)) - } - - // Since BatchedProof path does not include lowest subtree, exclude first proof from specs and proofs and start - // chaining at index 0 - if err := verifyChainedMembershipProof(root.GetHash(), specs[1:], proofs[1:], mpath.KeyPath, subroot, 0); err != nil { - return err - } - } else if !bytes.Equal(root.GetHash(), subroot) { - // Since we are not chaining proofs, we must check first subroot equals given root - return sdkerrors.Wrapf(ErrInvalidProof, "batched proof did not commit to expected root: %X, got: %X", root.GetHash(), subroot) - } - - return nil + return sdkerrors.Wrap(ErrInvalidProof, "batch proofs are currently unsupported") } // verifyChainedMembershipProof takes a list of proofs and specs and verifies each proof sequentially ensuring that the value is committed to From 72ab03b3ef84be60d2370f34a4328cce8aec464a Mon Sep 17 00:00:00 2001 From: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Date: Tue, 3 Nov 2020 11:07:32 +0100 Subject: [PATCH 036/136] ibc: validate signer address (#7781) * ibc: validate signer address * comment * validate channel handshakes and transfer signers --- x/ibc/applications/transfer/types/msgs.go | 12 +++- x/ibc/applications/transfer/types/packet.go | 4 +- x/ibc/core/02-client/types/msgs.go | 15 +++-- x/ibc/core/03-connection/types/msgs.go | 20 +++--- x/ibc/core/04-channel/types/msgs.go | 74 +++++++++++++-------- 5 files changed, 79 insertions(+), 46 deletions(-) diff --git a/x/ibc/applications/transfer/types/msgs.go b/x/ibc/applications/transfer/types/msgs.go index 25ff69e715..0654826713 100644 --- a/x/ibc/applications/transfer/types/msgs.go +++ b/x/ibc/applications/transfer/types/msgs.go @@ -1,6 +1,8 @@ package types import ( + "strings" + sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" clienttypes "github.com/cosmos/cosmos-sdk/x/ibc/core/02-client/types" @@ -42,6 +44,8 @@ func (MsgTransfer) Type() string { // ValidateBasic performs a basic check of the MsgTransfer fields. // NOTE: timeout height or timestamp values can be 0 to disable the timeout. +// NOTE: The recipient addresses format is not validated as the format defined by +// the chain is not known to IBC. func (msg MsgTransfer) ValidateBasic() error { if err := host.PortIdentifierValidator(msg.SourcePort); err != nil { return sdkerrors.Wrap(err, "invalid source port ID") @@ -55,10 +59,12 @@ func (msg MsgTransfer) ValidateBasic() error { if !msg.Token.IsPositive() { return sdkerrors.Wrap(sdkerrors.ErrInsufficientFunds, msg.Token.String()) } - if msg.Sender == "" { - return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "missing sender address") + // NOTE: sender format must be validated as it is required by the GetSigners function. + _, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "string could not be parsed as address: %v", err) } - if msg.Receiver == "" { + if strings.TrimSpace(msg.Receiver) == "" { return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "missing recipient address") } return ValidateIBCDenom(msg.Token.Denom) diff --git a/x/ibc/applications/transfer/types/packet.go b/x/ibc/applications/transfer/types/packet.go index c9d37d2674..d726577f6f 100644 --- a/x/ibc/applications/transfer/types/packet.go +++ b/x/ibc/applications/transfer/types/packet.go @@ -34,7 +34,9 @@ func NewFungibleTokenPacketData( } } -// ValidateBasic is used for validating the token transfer +// ValidateBasic is used for validating the token transfer. +// NOTE: The addresses formats are not validated as the sender and recipient can have different +// formats defined by their corresponding chains that are not known to IBC. func (ftpd FungibleTokenPacketData) ValidateBasic() error { if ftpd.Amount == 0 { return sdkerrors.Wrap(ErrInvalidAmount, "amount cannot be 0") diff --git a/x/ibc/core/02-client/types/msgs.go b/x/ibc/core/02-client/types/msgs.go index 7d3e4af219..04b351eb26 100644 --- a/x/ibc/core/02-client/types/msgs.go +++ b/x/ibc/core/02-client/types/msgs.go @@ -64,8 +64,9 @@ func (msg MsgCreateClient) Type() string { // ValidateBasic implements sdk.Msg func (msg MsgCreateClient) ValidateBasic() error { - if msg.Signer == "" { - return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "signer address cannot be empty") + _, err := sdk.AccAddressFromBech32(msg.Signer) + if err != nil { + return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "string could not be parsed as address: %v", err) } clientState, err := UnpackClientState(msg.ClientState) if err != nil { @@ -141,8 +142,9 @@ func (msg MsgUpdateClient) Type() string { // ValidateBasic implements sdk.Msg func (msg MsgUpdateClient) ValidateBasic() error { - if msg.Signer == "" { - return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "signer address cannot be empty") + _, err := sdk.AccAddressFromBech32(msg.Signer) + if err != nil { + return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "string could not be parsed as address: %v", err) } header, err := UnpackHeader(msg.Header) if err != nil { @@ -281,8 +283,9 @@ func (msg MsgSubmitMisbehaviour) Type() string { // ValidateBasic performs basic (non-state-dependant) validation on a MsgSubmitMisbehaviour. func (msg MsgSubmitMisbehaviour) ValidateBasic() error { - if msg.Signer == "" { - return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "signer address cannot be empty") + _, err := sdk.AccAddressFromBech32(msg.Signer) + if err != nil { + return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "string could not be parsed as address: %v", err) } misbehaviour, err := UnpackMisbehaviour(msg.Misbehaviour) if err != nil { diff --git a/x/ibc/core/03-connection/types/msgs.go b/x/ibc/core/03-connection/types/msgs.go index 6df9512e15..a162fb589b 100644 --- a/x/ibc/core/03-connection/types/msgs.go +++ b/x/ibc/core/03-connection/types/msgs.go @@ -53,8 +53,9 @@ func (msg MsgConnectionOpenInit) ValidateBasic() error { return sdkerrors.Wrap(err, "basic validation of the provided version failed") } } - if msg.Signer == "" { - return sdkerrors.ErrInvalidAddress + _, err := sdk.AccAddressFromBech32(msg.Signer) + if err != nil { + return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "string could not be parsed as address: %v", err) } return msg.Counterparty.ValidateBasic() } @@ -157,8 +158,9 @@ func (msg MsgConnectionOpenTry) ValidateBasic() error { if msg.ConsensusHeight.IsZero() { return sdkerrors.Wrap(sdkerrors.ErrInvalidHeight, "consensus height must be non-zero") } - if msg.Signer == "" { - return sdkerrors.ErrInvalidAddress + _, err = sdk.AccAddressFromBech32(msg.Signer) + if err != nil { + return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "string could not be parsed as address: %v", err) } return msg.Counterparty.ValidateBasic() } @@ -266,8 +268,9 @@ func (msg MsgConnectionOpenAck) ValidateBasic() error { if msg.ConsensusHeight.IsZero() { return sdkerrors.Wrap(sdkerrors.ErrInvalidHeight, "consensus height must be non-zero") } - if msg.Signer == "" { - return sdkerrors.ErrInvalidAddress + _, err = sdk.AccAddressFromBech32(msg.Signer) + if err != nil { + return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "string could not be parsed as address: %v", err) } return nil } @@ -324,8 +327,9 @@ func (msg MsgConnectionOpenConfirm) ValidateBasic() error { if msg.ProofHeight.IsZero() { return sdkerrors.Wrap(sdkerrors.ErrInvalidHeight, "proof height must be non-zero") } - if msg.Signer == "" { - return sdkerrors.ErrInvalidAddress + _, err := sdk.AccAddressFromBech32(msg.Signer) + if err != nil { + return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "string could not be parsed as address: %v", err) } return nil } diff --git a/x/ibc/core/04-channel/types/msgs.go b/x/ibc/core/04-channel/types/msgs.go index ebd9730e01..ed29cc24ff 100644 --- a/x/ibc/core/04-channel/types/msgs.go +++ b/x/ibc/core/04-channel/types/msgs.go @@ -13,7 +13,7 @@ import ( var _ sdk.Msg = &MsgChannelOpenInit{} // NewMsgChannelOpenInit creates a new MsgChannelOpenInit -//nolint:interfacer +// nolint:interfacer func NewMsgChannelOpenInit( portID, channelID string, version string, channelOrder Order, connectionHops []string, counterpartyPortID, counterpartyChannelID string, signer sdk.AccAddress, @@ -46,7 +46,10 @@ func (msg MsgChannelOpenInit) ValidateBasic() error { if err := host.ChannelIdentifierValidator(msg.ChannelId); err != nil { return sdkerrors.Wrap(err, "invalid channel ID") } - // Signer can be empty + _, err := sdk.AccAddressFromBech32(msg.Signer) + if err != nil { + return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "string could not be parsed as address: %v", err) + } return msg.Channel.ValidateBasic() } @@ -68,7 +71,7 @@ func (msg MsgChannelOpenInit) GetSigners() []sdk.AccAddress { var _ sdk.Msg = &MsgChannelOpenTry{} // NewMsgChannelOpenTry creates a new MsgChannelOpenTry instance -//nolint:interfacer +// nolint:interfacer func NewMsgChannelOpenTry( portID, desiredChannelID, counterpartyChosenChannelID, version string, channelOrder Order, connectionHops []string, counterpartyPortID, counterpartyChannelID, counterpartyVersion string, @@ -115,7 +118,10 @@ func (msg MsgChannelOpenTry) ValidateBasic() error { if msg.ProofHeight.IsZero() { return sdkerrors.Wrap(sdkerrors.ErrInvalidHeight, "proof height must be non-zero") } - // Signer can be empty + _, err := sdk.AccAddressFromBech32(msg.Signer) + if err != nil { + return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "string could not be parsed as address: %v", err) + } return msg.Channel.ValidateBasic() } @@ -137,7 +143,7 @@ func (msg MsgChannelOpenTry) GetSigners() []sdk.AccAddress { var _ sdk.Msg = &MsgChannelOpenAck{} // NewMsgChannelOpenAck creates a new MsgChannelOpenAck instance -//nolint:interfacer +// nolint:interfacer func NewMsgChannelOpenAck( portID, channelID, counterpartyChannelID string, cpv string, proofTry []byte, proofHeight clienttypes.Height, signer sdk.AccAddress, @@ -180,7 +186,10 @@ func (msg MsgChannelOpenAck) ValidateBasic() error { if msg.ProofHeight.IsZero() { return sdkerrors.Wrap(sdkerrors.ErrInvalidHeight, "proof height must be non-zero") } - // Signer can be empty + _, err := sdk.AccAddressFromBech32(msg.Signer) + if err != nil { + return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "string could not be parsed as address: %v", err) + } return nil } @@ -202,7 +211,7 @@ func (msg MsgChannelOpenAck) GetSigners() []sdk.AccAddress { var _ sdk.Msg = &MsgChannelOpenConfirm{} // NewMsgChannelOpenConfirm creates a new MsgChannelOpenConfirm instance -//nolint:interfacer +// nolint:interfacer func NewMsgChannelOpenConfirm( portID, channelID string, proofAck []byte, proofHeight clienttypes.Height, signer sdk.AccAddress, @@ -240,7 +249,10 @@ func (msg MsgChannelOpenConfirm) ValidateBasic() error { if msg.ProofHeight.IsZero() { return sdkerrors.Wrap(sdkerrors.ErrInvalidHeight, "proof height must be non-zero") } - // Signer can be empty + _, err := sdk.AccAddressFromBech32(msg.Signer) + if err != nil { + return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "string could not be parsed as address: %v", err) + } return nil } @@ -262,7 +274,7 @@ func (msg MsgChannelOpenConfirm) GetSigners() []sdk.AccAddress { var _ sdk.Msg = &MsgChannelCloseInit{} // NewMsgChannelCloseInit creates a new MsgChannelCloseInit instance -//nolint:interfacer +// nolint:interfacer func NewMsgChannelCloseInit( portID string, channelID string, signer sdk.AccAddress, ) *MsgChannelCloseInit { @@ -291,7 +303,10 @@ func (msg MsgChannelCloseInit) ValidateBasic() error { if err := host.ChannelIdentifierValidator(msg.ChannelId); err != nil { return sdkerrors.Wrap(err, "invalid channel ID") } - // Signer can be empty + _, err := sdk.AccAddressFromBech32(msg.Signer) + if err != nil { + return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "string could not be parsed as address: %v", err) + } return nil } @@ -313,7 +328,7 @@ func (msg MsgChannelCloseInit) GetSigners() []sdk.AccAddress { var _ sdk.Msg = &MsgChannelCloseConfirm{} // NewMsgChannelCloseConfirm creates a new MsgChannelCloseConfirm instance -//nolint:interfacer +// nolint:interfacer func NewMsgChannelCloseConfirm( portID, channelID string, proofInit []byte, proofHeight clienttypes.Height, signer sdk.AccAddress, @@ -351,7 +366,10 @@ func (msg MsgChannelCloseConfirm) ValidateBasic() error { if msg.ProofHeight.IsZero() { return sdkerrors.Wrap(sdkerrors.ErrInvalidHeight, "proof height must be non-zero") } - // Signer can be empty + _, err := sdk.AccAddressFromBech32(msg.Signer) + if err != nil { + return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "string could not be parsed as address: %v", err) + } return nil } @@ -373,7 +391,7 @@ func (msg MsgChannelCloseConfirm) GetSigners() []sdk.AccAddress { var _ sdk.Msg = &MsgRecvPacket{} // NewMsgRecvPacket constructs new MsgRecvPacket -//nolint:interfacer +// nolint:interfacer func NewMsgRecvPacket( packet Packet, proof []byte, proofHeight clienttypes.Height, signer sdk.AccAddress, @@ -399,10 +417,10 @@ func (msg MsgRecvPacket) ValidateBasic() error { if msg.ProofHeight.IsZero() { return sdkerrors.Wrap(sdkerrors.ErrInvalidHeight, "proof height must be non-zero") } - if msg.Signer == "" { - return sdkerrors.ErrInvalidAddress + _, err := sdk.AccAddressFromBech32(msg.Signer) + if err != nil { + return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "string could not be parsed as address: %v", err) } - return msg.Packet.ValidateBasic() } @@ -436,7 +454,7 @@ func (msg MsgRecvPacket) Type() string { var _ sdk.Msg = &MsgTimeout{} // NewMsgTimeout constructs new MsgTimeout -//nolint:interfacer +// nolint:interfacer func NewMsgTimeout( packet Packet, nextSequenceRecv uint64, proof []byte, proofHeight clienttypes.Height, signer sdk.AccAddress, @@ -463,10 +481,10 @@ func (msg MsgTimeout) ValidateBasic() error { if msg.ProofHeight.IsZero() { return sdkerrors.Wrap(sdkerrors.ErrInvalidHeight, "proof height must be non-zero") } - if msg.Signer == "" { - return sdkerrors.ErrInvalidAddress + _, err := sdk.AccAddressFromBech32(msg.Signer) + if err != nil { + return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "string could not be parsed as address: %v", err) } - return msg.Packet.ValidateBasic() } @@ -491,7 +509,7 @@ func (msg MsgTimeout) Type() string { } // NewMsgTimeoutOnClose constructs new MsgTimeoutOnClose -//nolint:interfacer +// nolint:interfacer func NewMsgTimeoutOnClose( packet Packet, nextSequenceRecv uint64, proof, proofClose []byte, @@ -523,10 +541,10 @@ func (msg MsgTimeoutOnClose) ValidateBasic() error { if msg.ProofHeight.IsZero() { return sdkerrors.Wrap(sdkerrors.ErrInvalidHeight, "proof height must be non-zero") } - if msg.Signer == "" { - return sdkerrors.ErrInvalidAddress + _, err := sdk.AccAddressFromBech32(msg.Signer) + if err != nil { + return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "string could not be parsed as address: %v", err) } - return msg.Packet.ValidateBasic() } @@ -553,7 +571,7 @@ func (msg MsgTimeoutOnClose) Type() string { var _ sdk.Msg = &MsgAcknowledgement{} // NewMsgAcknowledgement constructs a new MsgAcknowledgement -//nolint:interfacer +// nolint:interfacer func NewMsgAcknowledgement( packet Packet, ack []byte, proof []byte, proofHeight clienttypes.Height, signer sdk.AccAddress) *MsgAcknowledgement { return &MsgAcknowledgement{ @@ -578,10 +596,10 @@ func (msg MsgAcknowledgement) ValidateBasic() error { if msg.ProofHeight.IsZero() { return sdkerrors.Wrap(sdkerrors.ErrInvalidHeight, "proof height must be non-zero") } - if msg.Signer == "" { - return sdkerrors.ErrInvalidAddress + _, err := sdk.AccAddressFromBech32(msg.Signer) + if err != nil { + return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "string could not be parsed as address: %v", err) } - return msg.Packet.ValidateBasic() } From 30efa5ab16244a36a78e77596ce1971e786b8c68 Mon Sep 17 00:00:00 2001 From: Aditya Date: Tue, 3 Nov 2020 14:35:54 +0000 Subject: [PATCH 037/136] Host Key changes (#7783) * change host keys on sequences * fix prefix names Co-authored-by: Christopher Goes Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- x/ibc/core/24-host/keys.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/x/ibc/core/24-host/keys.go b/x/ibc/core/24-host/keys.go index 0ab66467dc..3a51a13db1 100644 --- a/x/ibc/core/24-host/keys.go +++ b/x/ibc/core/24-host/keys.go @@ -31,9 +31,9 @@ var ( const ( KeyChannelPrefix = "channelEnds" KeyChannelCapabilityPrefix = "capabilities" - KeyNextSeqSendPrefix = "seqSends" - KeyNextSeqRecvPrefix = "seqRecvs" - KeyNextSeqAckPrefix = "seqAcks" + KeyNextSeqSendPrefix = "nextSequenceSend" + KeyNextSeqRecvPrefix = "nextSequenceRecv" + KeyNextSeqAckPrefix = "nextSequenceAck" KeyPacketCommitmentPrefix = "commitments" KeyPacketAckPrefix = "acks" KeyPacketReceiptPrefix = "receipts" @@ -116,17 +116,17 @@ func ChannelCapabilityPath(portID, channelID string) string { // NextSequenceSendPath defines the next send sequence counter store path func NextSequenceSendPath(portID, channelID string) string { - return fmt.Sprintf("%s/", KeyNextSeqSendPrefix) + channelPath(portID, channelID) + "/nextSequenceSend" + return fmt.Sprintf("%s/", KeyNextSeqSendPrefix) + channelPath(portID, channelID) } // NextSequenceRecvPath defines the next receive sequence counter store path func NextSequenceRecvPath(portID, channelID string) string { - return fmt.Sprintf("%s/", KeyNextSeqRecvPrefix) + channelPath(portID, channelID) + "/nextSequenceRecv" + return fmt.Sprintf("%s/", KeyNextSeqRecvPrefix) + channelPath(portID, channelID) } // NextSequenceAckPath defines the next acknowledgement sequence counter store path func NextSequenceAckPath(portID, channelID string) string { - return fmt.Sprintf("%s/", KeyNextSeqAckPrefix) + channelPath(portID, channelID) + "/nextSequenceAck" + return fmt.Sprintf("%s/", KeyNextSeqAckPrefix) + channelPath(portID, channelID) } // PacketCommitmentPath defines the commitments to packet data fields store path From 854430e617a9f5757160f60d73e7c98e86e5e6cd Mon Sep 17 00:00:00 2001 From: Aleksandr Bezobchuk Date: Tue, 3 Nov 2020 12:14:56 -0500 Subject: [PATCH 038/136] Add log_level CLI flag back (#7789) --- server/util.go | 1 + simapp/simd/cmd/root.go | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/server/util.go b/server/util.go index 3f66921d66..7118d5b8d5 100644 --- a/server/util.go +++ b/server/util.go @@ -76,6 +76,7 @@ func InterceptConfigsPreRunHandler(cmd *cobra.Command) error { if err != nil { return err } + basename := path.Base(executableName) // Configure the viper instance diff --git a/simapp/simd/cmd/root.go b/simapp/simd/cmd/root.go index 2ffd394593..6fa3325c79 100644 --- a/simapp/simd/cmd/root.go +++ b/simapp/simd/cmd/root.go @@ -74,9 +74,12 @@ func Execute(rootCmd *cobra.Command) error { // and a Tendermint RPC. This requires the use of a pointer reference when // getting and setting the client.Context. Ideally, we utilize // https://github.com/spf13/cobra/pull/1118. + srvCtx := server.NewDefaultContext() ctx := context.Background() ctx = context.WithValue(ctx, client.ClientContextKey, &client.Context{}) - ctx = context.WithValue(ctx, server.ServerContextKey, server.NewDefaultContext()) + ctx = context.WithValue(ctx, server.ServerContextKey, srvCtx) + + rootCmd.PersistentFlags().String("log_level", srvCtx.Config.LogLevel, "The logging level in the format of :,...") executor := tmcli.PrepareBaseCmd(rootCmd, "", simapp.DefaultNodeHome) return executor.ExecuteContext(ctx) From 9f17bc77aff66286286b992c87fdf5be8ae8dc21 Mon Sep 17 00:00:00 2001 From: Emmanuel T Odeke Date: Tue, 3 Nov 2020 10:35:22 -0800 Subject: [PATCH 039/136] baseapp, client: reject gRPC connections with out-of-range/nefarious x-cosmos-block-height values (#7663) * baseapp, client: reject gRPC connections with out-of-range/nefarious x-cosmos-block-height values Rejects gRPC connections that send out-of-range x-cosmos-block-height values that previously weren't checked for. We now reject any negative values and any value greater than max(int64) aka >9223372036854775807. Also added an enforcement for returning an error if any negative heights are passed into (*BaseApp).createQueryContext. Fixes #7662 * baseapp, client: reject gRPC connections with out-of-range/nefarious x-cosmos-block-height values Rejects gRPC connections that send out-of-range x-cosmos-block-height values that previously weren't checked for. We now reject any negative values and any value greater than max(int64) aka >9223372036854775807. Also added an enforcement for returning an error if any negative heights are passed into (*BaseApp).createQueryContext. Fixes #7662 * Address Robert's feedback to extract negative height checker * Fix tests Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- baseapp/abci.go | 15 +++++++++++++++ baseapp/abci_test.go | 23 +++++++++++++++++++++++ baseapp/grpcserver.go | 6 ++++++ client/grpc_query.go | 6 ++++++ server/grpc/server_test.go | 38 ++++++++++++++++++++++++++++++++++++++ 5 files changed, 88 insertions(+) diff --git a/baseapp/abci.go b/baseapp/abci.go index 5b16156b72..a8f442b8d3 100644 --- a/baseapp/abci.go +++ b/baseapp/abci.go @@ -537,9 +537,24 @@ func gRPCErrorToSDKError(err error) error { } } +func checkNegativeHeight(height int64) error { + if height < 0 { + // Reject invalid heights. + return sdkerrors.Wrap( + sdkerrors.ErrInvalidRequest, + "cannot query with height < 0; please provide a valid height", + ) + } + return nil +} + // createQueryContext creates a new sdk.Context for a query, taking as args // the block height and whether the query needs a proof or not. func (app *BaseApp) createQueryContext(height int64, prove bool) (sdk.Context, error) { + if err := checkNegativeHeight(height); err != nil { + return sdk.Context{}, err + } + // when a client did not provide a query height, manually inject the latest if height == 0 { height = app.LastBlockHeight() diff --git a/baseapp/abci_test.go b/baseapp/abci_test.go index 33735140e2..8a61a0aebf 100644 --- a/baseapp/abci_test.go +++ b/baseapp/abci_test.go @@ -1,6 +1,7 @@ package baseapp import ( + "fmt" "testing" "github.com/stretchr/testify/require" @@ -116,3 +117,25 @@ func TestGetBlockRentionHeight(t *testing.T) { }) } } + +// Test and ensure that negative heights always cause errors. +// See issue https://github.com/cosmos/cosmos-sdk/issues/7662. +func TestBaseAppCreateQueryContextRejectsNegativeHeights(t *testing.T) { + t.Parallel() + + logger := defaultLogger() + db := dbm.NewMemDB() + name := t.Name() + app := NewBaseApp(name, logger, db, nil) + + proves := []bool{ + false, true, + } + for _, prove := range proves { + t.Run(fmt.Sprintf("prove=%t", prove), func(t *testing.T) { + sctx, err := app.createQueryContext(-10, true) + require.Error(t, err) + require.Equal(t, sctx, sdk.Context{}) + }) + } +} diff --git a/baseapp/grpcserver.go b/baseapp/grpcserver.go index ab27685b16..74e8b8a21c 100644 --- a/baseapp/grpcserver.go +++ b/baseapp/grpcserver.go @@ -11,6 +11,7 @@ import ( "google.golang.org/grpc/status" sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" grpctypes "github.com/cosmos/cosmos-sdk/types/grpc" ) @@ -33,6 +34,11 @@ func (app *BaseApp) RegisterGRPCServer(server gogogrpc.Server) { if heightHeaders := md.Get(grpctypes.GRPCBlockHeightHeader); len(heightHeaders) > 0 { height, err = strconv.ParseInt(heightHeaders[0], 10, 64) if err != nil { + return nil, sdkerrors.Wrapf( + sdkerrors.ErrInvalidRequest, + "Baseapp.RegisterGRPCServer: invalid height header %q: %v", grpctypes.GRPCBlockHeightHeader, err) + } + if err := checkNegativeHeight(height); err != nil { return nil, err } } diff --git a/client/grpc_query.go b/client/grpc_query.go index 7f1fe6a394..979333f641 100644 --- a/client/grpc_query.go +++ b/client/grpc_query.go @@ -15,6 +15,7 @@ import ( grpctypes "github.com/cosmos/cosmos-sdk/types/grpc" "github.com/cosmos/cosmos-sdk/codec/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) var _ gogogrpc.ClientConn = Context{} @@ -35,6 +36,11 @@ func (ctx Context) Invoke(grpcCtx gocontext.Context, method string, args, reply if err != nil { return err } + if height < 0 { + return sdkerrors.Wrapf( + sdkerrors.ErrInvalidRequest, + "client.Context.Invoke: height (%d) from %q must be >= 0", height, grpctypes.GRPCBlockHeightHeader) + } ctx = ctx.WithHeight(height) } diff --git a/server/grpc/server_test.go b/server/grpc/server_test.go index f5db3c7fc2..bfa39d8185 100644 --- a/server/grpc/server_test.go +++ b/server/grpc/server_test.go @@ -7,6 +7,7 @@ import ( "fmt" "testing" + "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" "google.golang.org/grpc" "google.golang.org/grpc/metadata" @@ -48,6 +49,7 @@ func (s *IntegrationTestSuite) TestGRPCServer() { grpc.WithInsecure(), // Or else we get "no transport security set" ) s.Require().NoError(err) + defer conn.Close() // gRPC query to test service should work testClient := testdata.NewQueryClient(conn) @@ -99,6 +101,42 @@ func (s *IntegrationTestSuite) TestGRPCServer() { s.Require().True(servicesMap["cosmos.bank.v1beta1.Query"]) } +// Test and enforce that we upfront reject any connections to baseapp containing +// invalid initial x-cosmos-block-height that aren't positive and in the range [0, max(int64)] +// See issue https://github.com/cosmos/cosmos-sdk/issues/7662. +func (s *IntegrationTestSuite) TestGRPCServerInvalidHeaderHeights() { + t := s.T() + val0 := s.network.Validators[0] + + // We should reject connections with invalid block heights off the bat. + invalidHeightStrs := []struct { + value string + wantErr string + }{ + {"-1", "height < 0"}, + {"9223372036854775808", "value out of range"}, // > max(int64) by 1 + {"-10", "height < 0"}, + {"18446744073709551615", "value out of range"}, // max uint64, which is > max(int64) + {"-9223372036854775809", "value out of range"}, // Out of the range of for negative int64 + } + for _, tt := range invalidHeightStrs { + t.Run(tt.value, func(t *testing.T) { + conn, err := grpc.Dial( + val0.AppConfig.GRPC.Address, + grpc.WithInsecure(), // Or else we get "no transport security set" + ) + defer conn.Close() + + testClient := testdata.NewQueryClient(conn) + ctx := metadata.AppendToOutgoingContext(context.Background(), grpctypes.GRPCBlockHeightHeader, tt.value) + testRes, err := testClient.Echo(ctx, &testdata.EchoRequest{Message: "hello"}) + require.Error(t, err) + require.Nil(t, testRes) + require.Contains(t, err.Error(), tt.wantErr) + }) + } +} + func TestIntegrationTestSuite(t *testing.T) { suite.Run(t, new(IntegrationTestSuite)) } From ec285f17983ae87425dae0a636d67fd81c0a10da Mon Sep 17 00:00:00 2001 From: Emmanuel T Odeke Date: Tue, 3 Nov 2020 11:28:42 -0800 Subject: [PATCH 040/136] crypto/hd: properly catch index overflows to ensure conformance with BIP 32 (#7628) * crypto/hd: properly catch index overflows to ensure conformance with BIP 32 Uses 31 bits as the bitsize argument to strconv.ParseUint to ensure that we correctly parse values in the range [0, max(int32)] Adds tests too to prevent future regressions of this subtlety. Fixes #7627. * Address Fedekunze's testing review --- crypto/hd/hdpath.go | 5 +++- crypto/hd/hdpath_test.go | 62 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+), 1 deletion(-) diff --git a/crypto/hd/hdpath.go b/crypto/hd/hdpath.go index ac00c4a51e..67a02f0290 100644 --- a/crypto/hd/hdpath.go +++ b/crypto/hd/hdpath.go @@ -173,7 +173,10 @@ func DerivePrivateKeyForPath(privKeyBytes, chainCode [32]byte, path string) ([]b part = part[:len(part)-1] } - idx, err := strconv.ParseUint(part, 10, 32) + // As per the extended keys specification in + // https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki#extended-keys + // index values are in the range [0, 1<<31-1] aka [0, max(int32)] + idx, err := strconv.ParseUint(part, 10, 31) if err != nil { return []byte{}, fmt.Errorf("invalid BIP 32 path: %s", err) } diff --git a/crypto/hd/hdpath_test.go b/crypto/hd/hdpath_test.go index 9f95f7edec..42622b9a9c 100644 --- a/crypto/hd/hdpath_test.go +++ b/crypto/hd/hdpath_test.go @@ -213,3 +213,65 @@ func TestCreateHDPath(t *testing.T) { }) } } + +// Tests to ensure that any index value is in the range [0, max(int32)] as per +// the extended keys specification. If the index belongs to that of a hardened key, +// its 0x80000000 bit will be set, so we can still accept values in [0, max(int32)] and then +// increase its value as deriveKeyPath already augments. +// See issue https://github.com/cosmos/cosmos-sdk/issues/7627. +func TestDeriveHDPathRange(t *testing.T) { + seed := mnemonicToSeed("I am become Death, the destroyer of worlds!") + + tests := []struct { + path string + wantErr string + }{ + { + path: "1'/2147483648/0'/0/0", + wantErr: "out of range", + }, + { + path: "2147483648'/1/0/0", + wantErr: "out of range", + }, + { + path: "2147483648'/2147483648/0'/0/0", + wantErr: "out of range", + }, + { + path: "1'/-5/0'/0/0", + wantErr: "invalid syntax", + }, + { + path: "-2147483646'/1/0/0", + wantErr: "invalid syntax", + }, + { + path: "-2147483648'/-2147483648/0'/0/0", + wantErr: "invalid syntax", + }, + { + // Should pass. + path: "1'/2147483647/0'/0/0", + }, + { + // Should pass. + path: "2147483647'/1/0'/0/0", + }, + } + + for _, tt := range tests { + tt := tt + t.Run(tt.path, func(t *testing.T) { + master, ch := hd.ComputeMastersFromSeed(seed) + _, err := hd.DerivePrivateKeyForPath(master, ch, tt.path) + + if tt.wantErr == "" { + require.Nil(t, err, "unexpected error") + } else { + require.NotNil(t, err, "expected a report of an int overflow") + require.Contains(t, err.Error(), tt.wantErr) + } + }) + } +} From d96d79b8fbbf8af7c1343700767fe9840edaba58 Mon Sep 17 00:00:00 2001 From: Michael FIG Date: Tue, 3 Nov 2020 16:02:27 -0600 Subject: [PATCH 041/136] fix: allow app.SetSnapshotStore(nil) (#7507) * fix: allow app.SetSnapshotStore(nil) * fix: downgrade Error to Info in BaseApp.snapshot --- baseapp/abci.go | 14 ++++++++++++++ baseapp/options.go | 4 ++++ 2 files changed, 18 insertions(+) diff --git a/baseapp/abci.go b/baseapp/abci.go index a8f442b8d3..ada95acf1f 100644 --- a/baseapp/abci.go +++ b/baseapp/abci.go @@ -354,6 +354,10 @@ func (app *BaseApp) halt() { // snapshot takes a snapshot of the current state and prunes any old snapshottypes. func (app *BaseApp) snapshot(height int64) { + if app.snapshotManager == nil { + app.logger.Info("snapshot manager not configured") + return + } app.logger.Info("Creating state snapshot", "height", height) snapshot, err := app.snapshotManager.Create(uint64(height)) if err != nil { @@ -447,6 +451,11 @@ func (app *BaseApp) LoadSnapshotChunk(req abci.RequestLoadSnapshotChunk) abci.Re // OfferSnapshot implements the ABCI interface. It delegates to app.snapshotManager if set. func (app *BaseApp) OfferSnapshot(req abci.RequestOfferSnapshot) abci.ResponseOfferSnapshot { + if app.snapshotManager == nil { + app.logger.Error("snapshot manager not configured") + return abci.ResponseOfferSnapshot{Result: abci.ResponseOfferSnapshot_ABORT} + } + if req.Snapshot == nil { app.logger.Error("Received nil snapshot") return abci.ResponseOfferSnapshot{Result: abci.ResponseOfferSnapshot_REJECT} @@ -481,6 +490,11 @@ func (app *BaseApp) OfferSnapshot(req abci.RequestOfferSnapshot) abci.ResponseOf // ApplySnapshotChunk implements the ABCI interface. It delegates to app.snapshotManager if set. func (app *BaseApp) ApplySnapshotChunk(req abci.RequestApplySnapshotChunk) abci.ResponseApplySnapshotChunk { + if app.snapshotManager == nil { + app.logger.Error("snapshot manager not configured") + return abci.ResponseApplySnapshotChunk{Result: abci.ResponseApplySnapshotChunk_ABORT} + } + _, err := app.snapshotManager.RestoreChunk(req.Chunk) switch { case err == nil: diff --git a/baseapp/options.go b/baseapp/options.go index 008af9a185..33de1a3aa6 100644 --- a/baseapp/options.go +++ b/baseapp/options.go @@ -204,6 +204,10 @@ func (app *BaseApp) SetSnapshotStore(snapshotStore *snapshots.Store) { if app.sealed { panic("SetSnapshotStore() on sealed BaseApp") } + if snapshotStore == nil { + app.snapshotManager = nil + return + } app.snapshotManager = snapshots.NewManager(snapshotStore, app.cms) } From 83baa02f623b5b5f8fc5d0de57da84e3588ae5af Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 4 Nov 2020 10:40:25 +0100 Subject: [PATCH 042/136] build(deps): bump vuepress-theme-cosmos from 1.0.173 to 1.0.175 in /docs (#7806) Bumps [vuepress-theme-cosmos](https://github.com/cosmos/vuepress-theme-cosmos) from 1.0.173 to 1.0.175. - [Release notes](https://github.com/cosmos/vuepress-theme-cosmos/releases) - [Commits](https://github.com/cosmos/vuepress-theme-cosmos/commits) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- docs/package-lock.json | 1577 +++++++++++++++++++--------------------- docs/package.json | 2 +- 2 files changed, 754 insertions(+), 825 deletions(-) diff --git a/docs/package-lock.json b/docs/package-lock.json index 2400e40deb..98bf43081d 100644 --- a/docs/package-lock.json +++ b/docs/package-lock.json @@ -5,118 +5,118 @@ "requires": true, "dependencies": { "@algolia/cache-browser-local-storage": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/@algolia/cache-browser-local-storage/-/cache-browser-local-storage-4.5.1.tgz", - "integrity": "sha512-TAQHRHaCUAR0bNhUHG0CnO6FTx3EMPwZQrjPuNS6kHvCQ/H8dVD0sLsHyM8C7U4j33xPQCWi9TBnSx8cYXNmNw==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@algolia/cache-browser-local-storage/-/cache-browser-local-storage-4.6.0.tgz", + "integrity": "sha512-3ObeNwZ5gfDvKPp9NXdtbBrCtz/yR1oyDu/AReG73Oanua3y30Y11p7VQzzpLe2R/gDCLOGdRgr17h11lGy1Hg==", "requires": { - "@algolia/cache-common": "4.5.1" + "@algolia/cache-common": "4.6.0" } }, "@algolia/cache-common": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/@algolia/cache-common/-/cache-common-4.5.1.tgz", - "integrity": "sha512-Sux+pcedQi9sfScIiQdl6pEaTVl712qM9OblvDhnaeF1v6lf4jyTlRTiBLP7YBLuvO1Yo54W3maf03kmz9PVhA==" + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@algolia/cache-common/-/cache-common-4.6.0.tgz", + "integrity": "sha512-mEedrPb2O3WwtiIHggFoIhTbHVCMNikxMiiN9kqmwZkdDfClfxm435OUGZfAl67rBZfc0DNs/jmPM2mUoefM9A==" }, "@algolia/cache-in-memory": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/@algolia/cache-in-memory/-/cache-in-memory-4.5.1.tgz", - "integrity": "sha512-fzwAtBFwveuG+E5T/namChEIvdVl0DoV3djV1C078b/JpO5+DeAwuXIJGYbyl950u170n5NEYuIwYG+R6h4lJQ==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@algolia/cache-in-memory/-/cache-in-memory-4.6.0.tgz", + "integrity": "sha512-J7ayGokVWEFkuLxzgrIsPS4k1/ZndyGVpG/qPrG9RHVrs7ZogEhUSY1tbEyUlW3mGy7diIh+/52dtohDL/nbGQ==", "requires": { - "@algolia/cache-common": "4.5.1" + "@algolia/cache-common": "4.6.0" } }, "@algolia/client-account": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/@algolia/client-account/-/client-account-4.5.1.tgz", - "integrity": "sha512-2WFEaI7Zf4ljnBsSAS4e+YylZ5glovm78xFg4E1JKA8PE6M+TeIgUY6HO2ouLh2dqQKxc9UfdAT1Loo/dha2iQ==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@algolia/client-account/-/client-account-4.6.0.tgz", + "integrity": "sha512-0t2yU6wNBNJgAmrARHrM1llhANyPT4Q/1wu6yEzv2WfPXlfsHwMhtKYNti4/k8eswwUt9wAri10WFV6TJI48rg==", "requires": { - "@algolia/client-common": "4.5.1", - "@algolia/client-search": "4.5.1", - "@algolia/transporter": "4.5.1" + "@algolia/client-common": "4.6.0", + "@algolia/client-search": "4.6.0", + "@algolia/transporter": "4.6.0" } }, "@algolia/client-analytics": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/@algolia/client-analytics/-/client-analytics-4.5.1.tgz", - "integrity": "sha512-bTmZUU8zhZMWBeGEQ/TVqLoL3OOT0benU0HtS3iOnQURwb+AOCv3RsgZvkj2djp+M24Q6P8/L34uBJMmCurbLg==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@algolia/client-analytics/-/client-analytics-4.6.0.tgz", + "integrity": "sha512-7yfn9pabA21Uw2iZjW1MNN4IJUT5y/YSg+ZJ+3HqBB6SgzOOqY0N3fATsPeGuN9EqSfVnqvnIrJMS8mI0b5FzQ==", "requires": { - "@algolia/client-common": "4.5.1", - "@algolia/client-search": "4.5.1", - "@algolia/requester-common": "4.5.1", - "@algolia/transporter": "4.5.1" + "@algolia/client-common": "4.6.0", + "@algolia/client-search": "4.6.0", + "@algolia/requester-common": "4.6.0", + "@algolia/transporter": "4.6.0" } }, "@algolia/client-common": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/@algolia/client-common/-/client-common-4.5.1.tgz", - "integrity": "sha512-5CpIf8IK1hke7q+N4e+A4TWdFXVJ5Qwyaa0xS84DrDO8HQ7vfYbDvG1oYa9hVEtGn6c3WVKPAvuWynK+fXQQCA==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@algolia/client-common/-/client-common-4.6.0.tgz", + "integrity": "sha512-60jK0LK5H+6q6HyyMyoBBD0fIs8zZzJt6BiyJGQG90o3gUV/SnjiNxO9Bx0RRlqdkE5s0OYFu1L7P9Y5TX7oAw==", "requires": { - "@algolia/requester-common": "4.5.1", - "@algolia/transporter": "4.5.1" + "@algolia/requester-common": "4.6.0", + "@algolia/transporter": "4.6.0" } }, "@algolia/client-recommendation": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/@algolia/client-recommendation/-/client-recommendation-4.5.1.tgz", - "integrity": "sha512-GiFrNSImoEBUQICjFBEoxPGzrjWji8PY9GeMg2CNvOYcRQ0Xt0Y36v9GN53NLjvB7QdQ2FlE1Cuv/PLUfS/aQQ==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@algolia/client-recommendation/-/client-recommendation-4.6.0.tgz", + "integrity": "sha512-j+Yb1z5QeIRDCCO+9hS9oZS3KNqRogPHDbJJsLTt6pkrs4CG2UVLVV67M977B1nzJ9OzaEki3VbpGQhRhPGNfQ==", "requires": { - "@algolia/client-common": "4.5.1", - "@algolia/requester-common": "4.5.1", - "@algolia/transporter": "4.5.1" + "@algolia/client-common": "4.6.0", + "@algolia/requester-common": "4.6.0", + "@algolia/transporter": "4.6.0" } }, "@algolia/client-search": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/@algolia/client-search/-/client-search-4.5.1.tgz", - "integrity": "sha512-wjuOTte9Auo9Cg4fL0709PjeJ9rXFh4okYUrOt/2SWqQid6DSdZOp+BtyaHKV3E94sj+SlmMxkMUacYluYg5zA==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@algolia/client-search/-/client-search-4.6.0.tgz", + "integrity": "sha512-+qA1NA88YnXvuCKifegfgts1RQs8IzcwccQqyurz8ins4hypZL1tXN2BkrOqqDIgvYIrUvFyhv+gLO6U9PpDUA==", "requires": { - "@algolia/client-common": "4.5.1", - "@algolia/requester-common": "4.5.1", - "@algolia/transporter": "4.5.1" + "@algolia/client-common": "4.6.0", + "@algolia/requester-common": "4.6.0", + "@algolia/transporter": "4.6.0" } }, "@algolia/logger-common": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/@algolia/logger-common/-/logger-common-4.5.1.tgz", - "integrity": "sha512-ZoVnGriinlLHlkvn5K7djOUn1/1IeTjU8rDzOJ3t06T+2hQytgJghaX7rSwKIeH4CjWMy61w8jLisuGJRBOEeg==" + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@algolia/logger-common/-/logger-common-4.6.0.tgz", + "integrity": "sha512-F+0HTGSQzJfWsX/cJq2l4eG2Y5JA6pqZ0YETyo5XJhZX4JaDrGszVKuOqp8kovZF/Ifebywxb8JdCiSUskmbig==" }, "@algolia/logger-console": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/@algolia/logger-console/-/logger-console-4.5.1.tgz", - "integrity": "sha512-1qa7K18+uAgxyWuguayaDS5ViiZFcOjI3J5ACBb0i/n7RsXUo149lP6mwmx6TIU7s135hT0f0TCqnvfMvN1ilA==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@algolia/logger-console/-/logger-console-4.6.0.tgz", + "integrity": "sha512-ers7OhfU6qBQl6s7MOe5gNUkcpa7LGrhEzDWnD0cUwLSd5BvWt7zEN69O2CZVbvAUZYlZ5zJTzMMa49s0VXrKQ==", "requires": { - "@algolia/logger-common": "4.5.1" + "@algolia/logger-common": "4.6.0" } }, "@algolia/requester-browser-xhr": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/@algolia/requester-browser-xhr/-/requester-browser-xhr-4.5.1.tgz", - "integrity": "sha512-tsQz+9pZw9dwPm/wMvZDpsWFZgmghLjXi4c3O4rfwoP/Ikum5fhle5fiR14yb4Lw4WlOQ1AJIHJvrg1qLIG8hQ==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@algolia/requester-browser-xhr/-/requester-browser-xhr-4.6.0.tgz", + "integrity": "sha512-ugrJT25VUkoKrl5vJVFclMdogbhTiDZ38Gss4xfTiSsP/SGE/0ei5VEOMEcj/bjkurJjPky1HfJZ3ykJhIsfCA==", "requires": { - "@algolia/requester-common": "4.5.1" + "@algolia/requester-common": "4.6.0" } }, "@algolia/requester-common": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/@algolia/requester-common/-/requester-common-4.5.1.tgz", - "integrity": "sha512-bPCiLvhHKXaka7f5FLtheChToz0yHVhvza64naFJRRh/3kC0nvyrvQ0ogjiydiSrGIfdNDyyTVfKGdk4gS5gyA==" + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@algolia/requester-common/-/requester-common-4.6.0.tgz", + "integrity": "sha512-DJ5iIGBGrRudimaaFnpBFM19pv8SsXiMYuukn9q1GgQh2mPPBCBBJiezKc7+OzE1UyCVrAFBpR/hrJnflZnRdQ==" }, "@algolia/requester-node-http": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/@algolia/requester-node-http/-/requester-node-http-4.5.1.tgz", - "integrity": "sha512-BfFc2h9eQOKu1gGs3DtQO7GrVZW/rxUgpJVLja4UVQyGplJyTCrFgkTyfl+8rb3MkNgA/S2LNo7cKNSPfpqeAQ==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@algolia/requester-node-http/-/requester-node-http-4.6.0.tgz", + "integrity": "sha512-MPZK3oZz0jSBsqrGiPxv7LOKMUNknlaRNyRDy0v/ASIYG+GvLhGTdEzG5Eyw5tgSvBr8CWrWM5tDC31EH40Ndw==", "requires": { - "@algolia/requester-common": "4.5.1" + "@algolia/requester-common": "4.6.0" } }, "@algolia/transporter": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/@algolia/transporter/-/transporter-4.5.1.tgz", - "integrity": "sha512-asPDNToDAPhH0tM6qKGTn1l0wTlNUbekpa1ifZ6v+qhSjo3VdqGyp+2VeciJOBW/wVHXh3HUbAcycvLERRlCLg==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@algolia/transporter/-/transporter-4.6.0.tgz", + "integrity": "sha512-xp+HI8sB8gLCvP00scaOVPQEk5H7nboWUxrwLKyVUvtUO4o003bOfFPsH86NRyu5Dv7fzX9b8EH3rVxcLOhjqg==", "requires": { - "@algolia/cache-common": "4.5.1", - "@algolia/logger-common": "4.5.1", - "@algolia/requester-common": "4.5.1" + "@algolia/cache-common": "4.6.0", + "@algolia/logger-common": "4.6.0", + "@algolia/requester-common": "4.6.0" } }, "@babel/code-frame": { @@ -128,35 +128,23 @@ } }, "@babel/compat-data": { - "version": "7.11.0", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.11.0.tgz", - "integrity": "sha512-TPSvJfv73ng0pfnEOh17bYMPQbI95+nGWc71Ss4vZdRBHTDqmM9Z8ZV4rYz8Ks7sfzc95n30k6ODIq5UGnXcYQ==", - "requires": { - "browserslist": "^4.12.0", - "invariant": "^2.2.4", - "semver": "^5.5.0" - }, - "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" - } - } + "version": "7.12.5", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.12.5.tgz", + "integrity": "sha512-DTsS7cxrsH3by8nqQSpFSyjSfSYl57D6Cf4q8dW3LK83tBKBDCkfcay1nYkXq1nIHXnpX8WMMb/O25HOy3h1zg==" }, "@babel/core": { - "version": "7.11.6", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.11.6.tgz", - "integrity": "sha512-Wpcv03AGnmkgm6uS6k8iwhIwTrcP0m17TL1n1sy7qD0qelDu4XNeW0dN0mHfa+Gei211yDaLoEe/VlbXQzM4Bg==", + "version": "7.12.3", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.12.3.tgz", + "integrity": "sha512-0qXcZYKZp3/6N2jKYVxZv0aNCsxTSVCiK72DTiTYZAu7sjg73W0/aynWjMbiGd87EQL4WyA8reiJVh92AVla9g==", "requires": { "@babel/code-frame": "^7.10.4", - "@babel/generator": "^7.11.6", - "@babel/helper-module-transforms": "^7.11.0", - "@babel/helpers": "^7.10.4", - "@babel/parser": "^7.11.5", + "@babel/generator": "^7.12.1", + "@babel/helper-module-transforms": "^7.12.1", + "@babel/helpers": "^7.12.1", + "@babel/parser": "^7.12.3", "@babel/template": "^7.10.4", - "@babel/traverse": "^7.11.5", - "@babel/types": "^7.11.5", + "@babel/traverse": "^7.12.1", + "@babel/types": "^7.12.1", "convert-source-map": "^1.7.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.1", @@ -201,11 +189,11 @@ } }, "@babel/generator": { - "version": "7.11.6", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.11.6.tgz", - "integrity": "sha512-DWtQ1PV3r+cLbySoHrwn9RWEgKMBLLma4OBQloPRyDYvc5msJM9kvTLo1YnlJd1P/ZuKbdli3ijr5q3FvAF3uA==", + "version": "7.12.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.12.5.tgz", + "integrity": "sha512-m16TQQJ8hPt7E+OS/XVQg/7U184MLXtvuGbCdA7na61vha+ImkyyNM/9DDA0unYCVZn3ZOhng+qz48/KBOT96A==", "requires": { - "@babel/types": "^7.11.5", + "@babel/types": "^7.12.5", "jsesc": "^2.5.1", "source-map": "^0.5.0" }, @@ -235,14 +223,13 @@ } }, "@babel/helper-compilation-targets": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.10.4.tgz", - "integrity": "sha512-a3rYhlsGV0UHNDvrtOXBg8/OpfV0OKTkxKPzIplS1zpx7CygDcWWxckxZeDd3gzPzC4kUT0A4nVFDK0wGMh4MQ==", + "version": "7.12.5", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.12.5.tgz", + "integrity": "sha512-+qH6NrscMolUlzOYngSBMIOQpKUGPPsc61Bu5W10mg84LxZ7cmvnBHzARKbDoFxVvqqAbj6Tg6N7bSrWSPXMyw==", "requires": { - "@babel/compat-data": "^7.10.4", - "browserslist": "^4.12.0", - "invariant": "^2.2.4", - "levenary": "^1.1.1", + "@babel/compat-data": "^7.12.5", + "@babel/helper-validator-option": "^7.12.1", + "browserslist": "^4.14.5", "semver": "^5.5.0" }, "dependencies": { @@ -254,26 +241,25 @@ } }, "@babel/helper-create-class-features-plugin": { - "version": "7.10.5", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.10.5.tgz", - "integrity": "sha512-0nkdeijB7VlZoLT3r/mY3bUkw3T8WG/hNw+FATs/6+pG2039IJWjTYL0VTISqsNHMUTEnwbVnc89WIJX9Qed0A==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.12.1.tgz", + "integrity": "sha512-hkL++rWeta/OVOBTRJc9a5Azh5mt5WgZUGAKMD8JM141YsE08K//bp1unBBieO6rUKkIPyUE0USQ30jAy3Sk1w==", "requires": { "@babel/helper-function-name": "^7.10.4", - "@babel/helper-member-expression-to-functions": "^7.10.5", + "@babel/helper-member-expression-to-functions": "^7.12.1", "@babel/helper-optimise-call-expression": "^7.10.4", - "@babel/helper-plugin-utils": "^7.10.4", - "@babel/helper-replace-supers": "^7.10.4", + "@babel/helper-replace-supers": "^7.12.1", "@babel/helper-split-export-declaration": "^7.10.4" } }, "@babel/helper-create-regexp-features-plugin": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.10.4.tgz", - "integrity": "sha512-2/hu58IEPKeoLF45DBwx3XFqsbCXmkdAay4spVr2x0jYgRxrSNp+ePwvSsy9g6YSaNDcKIQVPXk1Ov8S2edk2g==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.12.1.tgz", + "integrity": "sha512-rsZ4LGvFTZnzdNZR5HZdmJVuXK8834R5QkF3WvcnBhrlVtF0HSIUC6zbreL9MgjTywhKokn8RIYRiq99+DLAxA==", "requires": { "@babel/helper-annotate-as-pure": "^7.10.4", "@babel/helper-regex": "^7.10.4", - "regexpu-core": "^4.7.0" + "regexpu-core": "^4.7.1" } }, "@babel/helper-define-map": { @@ -287,11 +273,11 @@ } }, "@babel/helper-explode-assignable-expression": { - "version": "7.11.4", - "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.11.4.tgz", - "integrity": "sha512-ux9hm3zR4WV1Y3xXxXkdG/0gxF9nvI0YVmKVhvK9AfMoaQkemL3sJpXw+Xbz65azo8qJiEz2XVDUpK3KYhH3ZQ==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.12.1.tgz", + "integrity": "sha512-dmUwH8XmlrUpVqgtZ737tK88v07l840z9j3OEhCLwKTkjlvKpfqXVIZ0wpK3aeOxspwGrf/5AP5qLx4rO3w5rA==", "requires": { - "@babel/types": "^7.10.4" + "@babel/types": "^7.12.1" } }, "@babel/helper-function-name": { @@ -321,32 +307,34 @@ } }, "@babel/helper-member-expression-to-functions": { - "version": "7.11.0", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.11.0.tgz", - "integrity": "sha512-JbFlKHFntRV5qKw3YC0CvQnDZ4XMwgzzBbld7Ly4Mj4cbFy3KywcR8NtNctRToMWJOVvLINJv525Gd6wwVEx/Q==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.12.1.tgz", + "integrity": "sha512-k0CIe3tXUKTRSoEx1LQEPFU9vRQfqHtl+kf8eNnDqb4AUJEy5pz6aIiog+YWtVm2jpggjS1laH68bPsR+KWWPQ==", "requires": { - "@babel/types": "^7.11.0" + "@babel/types": "^7.12.1" } }, "@babel/helper-module-imports": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.10.4.tgz", - "integrity": "sha512-nEQJHqYavI217oD9+s5MUBzk6x1IlvoS9WTPfgG43CbMEeStE0v+r+TucWdx8KFGowPGvyOkDT9+7DHedIDnVw==", + "version": "7.12.5", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.12.5.tgz", + "integrity": "sha512-SR713Ogqg6++uexFRORf/+nPXMmWIn80TALu0uaFb+iQIUoR7bOC7zBWyzBs5b3tBBJXuyD0cRu1F15GyzjOWA==", "requires": { - "@babel/types": "^7.10.4" + "@babel/types": "^7.12.5" } }, "@babel/helper-module-transforms": { - "version": "7.11.0", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.11.0.tgz", - "integrity": "sha512-02EVu8COMuTRO1TAzdMtpBPbe6aQ1w/8fePD2YgQmxZU4gpNWaL9gK3Jp7dxlkUlUCJOTaSeA+Hrm1BRQwqIhg==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.12.1.tgz", + "integrity": "sha512-QQzehgFAZ2bbISiCpmVGfiGux8YVFXQ0abBic2Envhej22DVXV9nCFaS5hIQbkyo1AdGb+gNME2TSh3hYJVV/w==", "requires": { - "@babel/helper-module-imports": "^7.10.4", - "@babel/helper-replace-supers": "^7.10.4", - "@babel/helper-simple-access": "^7.10.4", + "@babel/helper-module-imports": "^7.12.1", + "@babel/helper-replace-supers": "^7.12.1", + "@babel/helper-simple-access": "^7.12.1", "@babel/helper-split-export-declaration": "^7.11.0", + "@babel/helper-validator-identifier": "^7.10.4", "@babel/template": "^7.10.4", - "@babel/types": "^7.11.0", + "@babel/traverse": "^7.12.1", + "@babel/types": "^7.12.1", "lodash": "^4.17.19" } }, @@ -372,42 +360,40 @@ } }, "@babel/helper-remap-async-to-generator": { - "version": "7.11.4", - "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.11.4.tgz", - "integrity": "sha512-tR5vJ/vBa9wFy3m5LLv2faapJLnDFxNWff2SAYkSE4rLUdbp7CdObYFgI7wK4T/Mj4UzpjPwzR8Pzmr5m7MHGA==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.12.1.tgz", + "integrity": "sha512-9d0KQCRM8clMPcDwo8SevNs+/9a8yWVVmaE80FGJcEP8N1qToREmWEGnBn8BUlJhYRFz6fqxeRL1sl5Ogsed7A==", "requires": { "@babel/helper-annotate-as-pure": "^7.10.4", "@babel/helper-wrap-function": "^7.10.4", - "@babel/template": "^7.10.4", - "@babel/types": "^7.10.4" + "@babel/types": "^7.12.1" } }, "@babel/helper-replace-supers": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.10.4.tgz", - "integrity": "sha512-sPxZfFXocEymYTdVK1UNmFPBN+Hv5mJkLPsYWwGBxZAxaWfFu+xqp7b6qWD0yjNuNL2VKc6L5M18tOXUP7NU0A==", + "version": "7.12.5", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.12.5.tgz", + "integrity": "sha512-5YILoed0ZyIpF4gKcpZitEnXEJ9UoDRki1Ey6xz46rxOzfNMAhVIJMoune1hmPVxh40LRv1+oafz7UsWX+vyWA==", "requires": { - "@babel/helper-member-expression-to-functions": "^7.10.4", + "@babel/helper-member-expression-to-functions": "^7.12.1", "@babel/helper-optimise-call-expression": "^7.10.4", - "@babel/traverse": "^7.10.4", - "@babel/types": "^7.10.4" + "@babel/traverse": "^7.12.5", + "@babel/types": "^7.12.5" } }, "@babel/helper-simple-access": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.10.4.tgz", - "integrity": "sha512-0fMy72ej/VEvF8ULmX6yb5MtHG4uH4Dbd6I/aHDb/JVg0bbivwt9Wg+h3uMvX+QSFtwr5MeItvazbrc4jtRAXw==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.12.1.tgz", + "integrity": "sha512-OxBp7pMrjVewSSC8fXDFrHrBcJATOOFssZwv16F3/6Xtc138GHybBfPbm9kfiqQHKhYQrlamWILwlDCeyMFEaA==", "requires": { - "@babel/template": "^7.10.4", - "@babel/types": "^7.10.4" + "@babel/types": "^7.12.1" } }, "@babel/helper-skip-transparent-expression-wrappers": { - "version": "7.11.0", - "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.11.0.tgz", - "integrity": "sha512-0XIdiQln4Elglgjbwo9wuJpL/K7AGCY26kmEt0+pRP0TAj4jjyNq1MjoRvikrTVqKcx4Gysxt4cXvVFXP/JO2Q==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.12.1.tgz", + "integrity": "sha512-Mf5AUuhG1/OCChOJ/HcADmvcHM42WJockombn8ATJG3OnyiSxBK/Mm5x78BQWvmtXZKHgbjdGL2kin/HOLlZGA==", "requires": { - "@babel/types": "^7.11.0" + "@babel/types": "^7.12.1" } }, "@babel/helper-split-export-declaration": { @@ -423,10 +409,15 @@ "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz", "integrity": "sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw==" }, + "@babel/helper-validator-option": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.12.1.tgz", + "integrity": "sha512-YpJabsXlJVWP0USHjnC/AQDTLlZERbON577YUVO/wLpqyj6HAtVYnWaQaN0iUN+1/tWn3c+uKKXjRut5115Y2A==" + }, "@babel/helper-wrap-function": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.10.4.tgz", - "integrity": "sha512-6py45WvEF0MhiLrdxtRjKjufwLL1/ob2qDJgg5JgNdojBAZSAKnAjkyOCNug6n+OBl4VW76XjvgSFTdaMcW0Ug==", + "version": "7.12.3", + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.12.3.tgz", + "integrity": "sha512-Cvb8IuJDln3rs6tzjW3Y8UeelAOdnpB8xtQ4sme2MSZ9wOxrbThporC0y/EtE16VAtoyEfLM404Xr1e0OOp+ow==", "requires": { "@babel/helper-function-name": "^7.10.4", "@babel/template": "^7.10.4", @@ -435,13 +426,13 @@ } }, "@babel/helpers": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.10.4.tgz", - "integrity": "sha512-L2gX/XeUONeEbI78dXSrJzGdz4GQ+ZTA/aazfUsFaWjSe95kiCuOZ5HsXvkiw3iwF+mFHSRUfJU8t6YavocdXA==", + "version": "7.12.5", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.12.5.tgz", + "integrity": "sha512-lgKGMQlKqA8meJqKsW6rUnc4MdUk35Ln0ATDqdM1a/UpARODdI4j5Y5lVfUScnSNkJcdCRAaWkspykNoFg9sJA==", "requires": { "@babel/template": "^7.10.4", - "@babel/traverse": "^7.10.4", - "@babel/types": "^7.10.4" + "@babel/traverse": "^7.12.5", + "@babel/types": "^7.12.5" } }, "@babel/highlight": { @@ -455,137 +446,137 @@ } }, "@babel/parser": { - "version": "7.11.5", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.11.5.tgz", - "integrity": "sha512-X9rD8qqm695vgmeaQ4fvz/o3+Wk4ZzQvSHkDBgpYKxpD4qTAUm88ZKtHkVqIOsYFFbIQ6wQYhC6q7pjqVK0E0Q==" + "version": "7.12.5", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.5.tgz", + "integrity": "sha512-FVM6RZQ0mn2KCf1VUED7KepYeUWoVShczewOCfm3nzoBybaih51h+sYVVGthW9M6lPByEPTQf+xm27PBdlpwmQ==" }, "@babel/plugin-proposal-async-generator-functions": { - "version": "7.10.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.10.5.tgz", - "integrity": "sha512-cNMCVezQbrRGvXJwm9fu/1sJj9bHdGAgKodZdLqOQIpfoH3raqmRPBM17+lh7CzhiKRRBrGtZL9WcjxSoGYUSg==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.12.1.tgz", + "integrity": "sha512-d+/o30tJxFxrA1lhzJqiUcEJdI6jKlNregCv5bASeGf2Q4MXmnwH7viDo7nhx1/ohf09oaH8j1GVYG/e3Yqk6A==", "requires": { "@babel/helper-plugin-utils": "^7.10.4", - "@babel/helper-remap-async-to-generator": "^7.10.4", + "@babel/helper-remap-async-to-generator": "^7.12.1", "@babel/plugin-syntax-async-generators": "^7.8.0" } }, "@babel/plugin-proposal-class-properties": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.10.4.tgz", - "integrity": "sha512-vhwkEROxzcHGNu2mzUC0OFFNXdZ4M23ib8aRRcJSsW8BZK9pQMD7QB7csl97NBbgGZO7ZyHUyKDnxzOaP4IrCg==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.12.1.tgz", + "integrity": "sha512-cKp3dlQsFsEs5CWKnN7BnSHOd0EOW8EKpEjkoz1pO2E5KzIDNV9Ros1b0CnmbVgAGXJubOYVBOGCT1OmJwOI7w==", "requires": { - "@babel/helper-create-class-features-plugin": "^7.10.4", + "@babel/helper-create-class-features-plugin": "^7.12.1", "@babel/helper-plugin-utils": "^7.10.4" } }, "@babel/plugin-proposal-decorators": { - "version": "7.10.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-decorators/-/plugin-proposal-decorators-7.10.5.tgz", - "integrity": "sha512-Sc5TAQSZuLzgY0664mMDn24Vw2P8g/VhyLyGPaWiHahhgLqeZvcGeyBZOrJW0oSKIK2mvQ22a1ENXBIQLhrEiQ==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-decorators/-/plugin-proposal-decorators-7.12.1.tgz", + "integrity": "sha512-knNIuusychgYN8fGJHONL0RbFxLGawhXOJNLBk75TniTsZZeA+wdkDuv6wp4lGwzQEKjZi6/WYtnb3udNPmQmQ==", "requires": { - "@babel/helper-create-class-features-plugin": "^7.10.5", + "@babel/helper-create-class-features-plugin": "^7.12.1", "@babel/helper-plugin-utils": "^7.10.4", - "@babel/plugin-syntax-decorators": "^7.10.4" + "@babel/plugin-syntax-decorators": "^7.12.1" } }, "@babel/plugin-proposal-dynamic-import": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.10.4.tgz", - "integrity": "sha512-up6oID1LeidOOASNXgv/CFbgBqTuKJ0cJjz6An5tWD+NVBNlp3VNSBxv2ZdU7SYl3NxJC7agAQDApZusV6uFwQ==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.12.1.tgz", + "integrity": "sha512-a4rhUSZFuq5W8/OO8H7BL5zspjnc1FLd9hlOxIK/f7qG4a0qsqk8uvF/ywgBA8/OmjsapjpvaEOYItfGG1qIvQ==", "requires": { "@babel/helper-plugin-utils": "^7.10.4", "@babel/plugin-syntax-dynamic-import": "^7.8.0" } }, "@babel/plugin-proposal-export-namespace-from": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.10.4.tgz", - "integrity": "sha512-aNdf0LY6/3WXkhh0Fdb6Zk9j1NMD8ovj3F6r0+3j837Pn1S1PdNtcwJ5EG9WkVPNHPxyJDaxMaAOVq4eki0qbg==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.12.1.tgz", + "integrity": "sha512-6CThGf0irEkzujYS5LQcjBx8j/4aQGiVv7J9+2f7pGfxqyKh3WnmVJYW3hdrQjyksErMGBPQrCnHfOtna+WLbw==", "requires": { "@babel/helper-plugin-utils": "^7.10.4", "@babel/plugin-syntax-export-namespace-from": "^7.8.3" } }, "@babel/plugin-proposal-json-strings": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.10.4.tgz", - "integrity": "sha512-fCL7QF0Jo83uy1K0P2YXrfX11tj3lkpN7l4dMv9Y9VkowkhkQDwFHFd8IiwyK5MZjE8UpbgokkgtcReH88Abaw==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.12.1.tgz", + "integrity": "sha512-GoLDUi6U9ZLzlSda2Df++VSqDJg3CG+dR0+iWsv6XRw1rEq+zwt4DirM9yrxW6XWaTpmai1cWJLMfM8qQJf+yw==", "requires": { "@babel/helper-plugin-utils": "^7.10.4", "@babel/plugin-syntax-json-strings": "^7.8.0" } }, "@babel/plugin-proposal-logical-assignment-operators": { - "version": "7.11.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.11.0.tgz", - "integrity": "sha512-/f8p4z+Auz0Uaf+i8Ekf1iM7wUNLcViFUGiPxKeXvxTSl63B875YPiVdUDdem7hREcI0E0kSpEhS8tF5RphK7Q==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.12.1.tgz", + "integrity": "sha512-k8ZmVv0JU+4gcUGeCDZOGd0lCIamU/sMtIiX3UWnUc5yzgq6YUGyEolNYD+MLYKfSzgECPcqetVcJP9Afe/aCA==", "requires": { "@babel/helper-plugin-utils": "^7.10.4", "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" } }, "@babel/plugin-proposal-nullish-coalescing-operator": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.10.4.tgz", - "integrity": "sha512-wq5n1M3ZUlHl9sqT2ok1T2/MTt6AXE0e1Lz4WzWBr95LsAZ5qDXe4KnFuauYyEyLiohvXFMdbsOTMyLZs91Zlw==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.12.1.tgz", + "integrity": "sha512-nZY0ESiaQDI1y96+jk6VxMOaL4LPo/QDHBqL+SF3/vl6dHkTwHlOI8L4ZwuRBHgakRBw5zsVylel7QPbbGuYgg==", "requires": { "@babel/helper-plugin-utils": "^7.10.4", "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.0" } }, "@babel/plugin-proposal-numeric-separator": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.10.4.tgz", - "integrity": "sha512-73/G7QoRoeNkLZFxsoCCvlg4ezE4eM+57PnOqgaPOozd5myfj7p0muD1mRVJvbUWbOzD+q3No2bWbaKy+DJ8DA==", + "version": "7.12.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.12.5.tgz", + "integrity": "sha512-UiAnkKuOrCyjZ3sYNHlRlfuZJbBHknMQ9VMwVeX97Ofwx7RpD6gS2HfqTCh8KNUQgcOm8IKt103oR4KIjh7Q8g==", "requires": { "@babel/helper-plugin-utils": "^7.10.4", "@babel/plugin-syntax-numeric-separator": "^7.10.4" } }, "@babel/plugin-proposal-object-rest-spread": { - "version": "7.11.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.11.0.tgz", - "integrity": "sha512-wzch41N4yztwoRw0ak+37wxwJM2oiIiy6huGCoqkvSTA9acYWcPfn9Y4aJqmFFJ70KTJUu29f3DQ43uJ9HXzEA==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.12.1.tgz", + "integrity": "sha512-s6SowJIjzlhx8o7lsFx5zmY4At6CTtDvgNQDdPzkBQucle58A6b/TTeEBYtyDgmcXjUTM+vE8YOGHZzzbc/ioA==", "requires": { "@babel/helper-plugin-utils": "^7.10.4", "@babel/plugin-syntax-object-rest-spread": "^7.8.0", - "@babel/plugin-transform-parameters": "^7.10.4" + "@babel/plugin-transform-parameters": "^7.12.1" } }, "@babel/plugin-proposal-optional-catch-binding": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.10.4.tgz", - "integrity": "sha512-LflT6nPh+GK2MnFiKDyLiqSqVHkQnVf7hdoAvyTnnKj9xB3docGRsdPuxp6qqqW19ifK3xgc9U5/FwrSaCNX5g==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.12.1.tgz", + "integrity": "sha512-hFvIjgprh9mMw5v42sJWLI1lzU5L2sznP805zeT6rySVRA0Y18StRhDqhSxlap0oVgItRsB6WSROp4YnJTJz0g==", "requires": { "@babel/helper-plugin-utils": "^7.10.4", "@babel/plugin-syntax-optional-catch-binding": "^7.8.0" } }, "@babel/plugin-proposal-optional-chaining": { - "version": "7.11.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.11.0.tgz", - "integrity": "sha512-v9fZIu3Y8562RRwhm1BbMRxtqZNFmFA2EG+pT2diuU8PT3H6T/KXoZ54KgYisfOFZHV6PfvAiBIZ9Rcz+/JCxA==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.12.1.tgz", + "integrity": "sha512-c2uRpY6WzaVDzynVY9liyykS+kVU+WRZPMPYpkelXH8KBt1oXoI89kPbZKKG/jDT5UK92FTW2fZkZaJhdiBabw==", "requires": { "@babel/helper-plugin-utils": "^7.10.4", - "@babel/helper-skip-transparent-expression-wrappers": "^7.11.0", + "@babel/helper-skip-transparent-expression-wrappers": "^7.12.1", "@babel/plugin-syntax-optional-chaining": "^7.8.0" } }, "@babel/plugin-proposal-private-methods": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.10.4.tgz", - "integrity": "sha512-wh5GJleuI8k3emgTg5KkJK6kHNsGEr0uBTDBuQUBJwckk9xs1ez79ioheEVVxMLyPscB0LfkbVHslQqIzWV6Bw==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.12.1.tgz", + "integrity": "sha512-mwZ1phvH7/NHK6Kf8LP7MYDogGV+DKB1mryFOEwx5EBNQrosvIczzZFTUmWaeujd5xT6G1ELYWUz3CutMhjE1w==", "requires": { - "@babel/helper-create-class-features-plugin": "^7.10.4", + "@babel/helper-create-class-features-plugin": "^7.12.1", "@babel/helper-plugin-utils": "^7.10.4" } }, "@babel/plugin-proposal-unicode-property-regex": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.10.4.tgz", - "integrity": "sha512-H+3fOgPnEXFL9zGYtKQe4IDOPKYlZdF1kqFDQRRb8PK4B8af1vAGK04tF5iQAAsui+mHNBQSAtd2/ndEDe9wuA==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.12.1.tgz", + "integrity": "sha512-MYq+l+PvHuw/rKUz1at/vb6nCnQ2gmJBNaM62z0OgH7B2W1D9pvkpYtlti9bGtizNIU1K3zm4bZF9F91efVY0w==", "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.10.4", + "@babel/helper-create-regexp-features-plugin": "^7.12.1", "@babel/helper-plugin-utils": "^7.10.4" } }, @@ -598,17 +589,17 @@ } }, "@babel/plugin-syntax-class-properties": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.10.4.tgz", - "integrity": "sha512-GCSBF7iUle6rNugfURwNmCGG3Z/2+opxAMLs1nND4bhEG5PuxTIggDBoeYYSujAlLtsupzOHYJQgPS3pivwXIA==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.1.tgz", + "integrity": "sha512-U40A76x5gTwmESz+qiqssqmeEsKvcSyvtgktrm0uzcARAmM9I1jR221f6Oq+GmHrcD+LvZDag1UTOTe2fL3TeA==", "requires": { "@babel/helper-plugin-utils": "^7.10.4" } }, "@babel/plugin-syntax-decorators": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-decorators/-/plugin-syntax-decorators-7.10.4.tgz", - "integrity": "sha512-2NaoC6fAk2VMdhY1eerkfHV+lVYC1u8b+jmRJISqANCJlTxYy19HGdIkkQtix2UtkcPuPu+IlDgrVseZnU03bw==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-decorators/-/plugin-syntax-decorators-7.12.1.tgz", + "integrity": "sha512-ir9YW5daRrTYiy9UJ2TzdNIJEZu8KclVzDcfSt4iEmOtwQ4llPtWInNKJyKnVXp1vE4bbVd5S31M/im3mYMO1w==", "requires": { "@babel/helper-plugin-utils": "^7.10.4" } @@ -638,9 +629,9 @@ } }, "@babel/plugin-syntax-jsx": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.10.4.tgz", - "integrity": "sha512-KCg9mio9jwiARCB7WAcQ7Y1q+qicILjoK8LP/VkPkEKaf5dkaZZK1EcTe91a3JJlZ3qy6L5s9X52boEYi8DM9g==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.12.1.tgz", + "integrity": "sha512-1yRi7yAtB0ETgxdY9ti/p2TivUxJkTdhu/ZbF9MshVGqOx1TdB3b7xCXs49Fupgg50N45KcAsRP/ZqWjs9SRjg==", "requires": { "@babel/helper-plugin-utils": "^7.10.4" } @@ -694,242 +685,242 @@ } }, "@babel/plugin-syntax-top-level-await": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.10.4.tgz", - "integrity": "sha512-ni1brg4lXEmWyafKr0ccFWkJG0CeMt4WV1oyeBW6EFObF4oOHclbkj5cARxAPQyAQ2UTuplJyK4nfkXIMMFvsQ==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.12.1.tgz", + "integrity": "sha512-i7ooMZFS+a/Om0crxZodrTzNEPJHZrlMVGMTEpFAj6rYY/bKCddB0Dk/YxfPuYXOopuhKk/e1jV6h+WUU9XN3A==", "requires": { "@babel/helper-plugin-utils": "^7.10.4" } }, "@babel/plugin-transform-arrow-functions": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.10.4.tgz", - "integrity": "sha512-9J/oD1jV0ZCBcgnoFWFq1vJd4msoKb/TCpGNFyyLt0zABdcvgK3aYikZ8HjzB14c26bc7E3Q1yugpwGy2aTPNA==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.12.1.tgz", + "integrity": "sha512-5QB50qyN44fzzz4/qxDPQMBCTHgxg3n0xRBLJUmBlLoU/sFvxVWGZF/ZUfMVDQuJUKXaBhbupxIzIfZ6Fwk/0A==", "requires": { "@babel/helper-plugin-utils": "^7.10.4" } }, "@babel/plugin-transform-async-to-generator": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.10.4.tgz", - "integrity": "sha512-F6nREOan7J5UXTLsDsZG3DXmZSVofr2tGNwfdrVwkDWHfQckbQXnXSPfD7iO+c/2HGqycwyLST3DnZ16n+cBJQ==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.12.1.tgz", + "integrity": "sha512-SDtqoEcarK1DFlRJ1hHRY5HvJUj5kX4qmtpMAm2QnhOlyuMC4TMdCRgW6WXpv93rZeYNeLP22y8Aq2dbcDRM1A==", "requires": { - "@babel/helper-module-imports": "^7.10.4", + "@babel/helper-module-imports": "^7.12.1", "@babel/helper-plugin-utils": "^7.10.4", - "@babel/helper-remap-async-to-generator": "^7.10.4" + "@babel/helper-remap-async-to-generator": "^7.12.1" } }, "@babel/plugin-transform-block-scoped-functions": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.10.4.tgz", - "integrity": "sha512-WzXDarQXYYfjaV1szJvN3AD7rZgZzC1JtjJZ8dMHUyiK8mxPRahynp14zzNjU3VkPqPsO38CzxiWO1c9ARZ8JA==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.12.1.tgz", + "integrity": "sha512-5OpxfuYnSgPalRpo8EWGPzIYf0lHBWORCkj5M0oLBwHdlux9Ri36QqGW3/LR13RSVOAoUUMzoPI/jpE4ABcHoA==", "requires": { "@babel/helper-plugin-utils": "^7.10.4" } }, "@babel/plugin-transform-block-scoping": { - "version": "7.11.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.11.1.tgz", - "integrity": "sha512-00dYeDE0EVEHuuM+26+0w/SCL0BH2Qy7LwHuI4Hi4MH5gkC8/AqMN5uWFJIsoXZrAphiMm1iXzBw6L2T+eA0ew==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.12.1.tgz", + "integrity": "sha512-zJyAC9sZdE60r1nVQHblcfCj29Dh2Y0DOvlMkcqSo0ckqjiCwNiUezUKw+RjOCwGfpLRwnAeQ2XlLpsnGkvv9w==", "requires": { "@babel/helper-plugin-utils": "^7.10.4" } }, "@babel/plugin-transform-classes": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.10.4.tgz", - "integrity": "sha512-2oZ9qLjt161dn1ZE0Ms66xBncQH4In8Sqw1YWgBUZuGVJJS5c0OFZXL6dP2MRHrkU/eKhWg8CzFJhRQl50rQxA==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.12.1.tgz", + "integrity": "sha512-/74xkA7bVdzQTBeSUhLLJgYIcxw/dpEpCdRDiHgPJ3Mv6uC11UhjpOhl72CgqbBCmt1qtssCyB2xnJm1+PFjog==", "requires": { "@babel/helper-annotate-as-pure": "^7.10.4", "@babel/helper-define-map": "^7.10.4", "@babel/helper-function-name": "^7.10.4", "@babel/helper-optimise-call-expression": "^7.10.4", "@babel/helper-plugin-utils": "^7.10.4", - "@babel/helper-replace-supers": "^7.10.4", + "@babel/helper-replace-supers": "^7.12.1", "@babel/helper-split-export-declaration": "^7.10.4", "globals": "^11.1.0" } }, "@babel/plugin-transform-computed-properties": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.10.4.tgz", - "integrity": "sha512-JFwVDXcP/hM/TbyzGq3l/XWGut7p46Z3QvqFMXTfk6/09m7xZHJUN9xHfsv7vqqD4YnfI5ueYdSJtXqqBLyjBw==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.12.1.tgz", + "integrity": "sha512-vVUOYpPWB7BkgUWPo4C44mUQHpTZXakEqFjbv8rQMg7TC6S6ZhGZ3otQcRH6u7+adSlE5i0sp63eMC/XGffrzg==", "requires": { "@babel/helper-plugin-utils": "^7.10.4" } }, "@babel/plugin-transform-destructuring": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.10.4.tgz", - "integrity": "sha512-+WmfvyfsyF603iPa6825mq6Qrb7uLjTOsa3XOFzlYcYDHSS4QmpOWOL0NNBY5qMbvrcf3tq0Cw+v4lxswOBpgA==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.12.1.tgz", + "integrity": "sha512-fRMYFKuzi/rSiYb2uRLiUENJOKq4Gnl+6qOv5f8z0TZXg3llUwUhsNNwrwaT/6dUhJTzNpBr+CUvEWBtfNY1cw==", "requires": { "@babel/helper-plugin-utils": "^7.10.4" } }, "@babel/plugin-transform-dotall-regex": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.10.4.tgz", - "integrity": "sha512-ZEAVvUTCMlMFAbASYSVQoxIbHm2OkG2MseW6bV2JjIygOjdVv8tuxrCTzj1+Rynh7ODb8GivUy7dzEXzEhuPaA==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.12.1.tgz", + "integrity": "sha512-B2pXeRKoLszfEW7J4Hg9LoFaWEbr/kzo3teWHmtFCszjRNa/b40f9mfeqZsIDLLt/FjwQ6pz/Gdlwy85xNckBA==", "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.10.4", + "@babel/helper-create-regexp-features-plugin": "^7.12.1", "@babel/helper-plugin-utils": "^7.10.4" } }, "@babel/plugin-transform-duplicate-keys": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.10.4.tgz", - "integrity": "sha512-GL0/fJnmgMclHiBTTWXNlYjYsA7rDrtsazHG6mglaGSTh0KsrW04qml+Bbz9FL0LcJIRwBWL5ZqlNHKTkU3xAA==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.12.1.tgz", + "integrity": "sha512-iRght0T0HztAb/CazveUpUQrZY+aGKKaWXMJ4uf9YJtqxSUe09j3wteztCUDRHs+SRAL7yMuFqUsLoAKKzgXjw==", "requires": { "@babel/helper-plugin-utils": "^7.10.4" } }, "@babel/plugin-transform-exponentiation-operator": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.10.4.tgz", - "integrity": "sha512-S5HgLVgkBcRdyQAHbKj+7KyuWx8C6t5oETmUuwz1pt3WTWJhsUV0WIIXuVvfXMxl/QQyHKlSCNNtaIamG8fysw==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.12.1.tgz", + "integrity": "sha512-7tqwy2bv48q+c1EHbXK0Zx3KXd2RVQp6OC7PbwFNt/dPTAV3Lu5sWtWuAj8owr5wqtWnqHfl2/mJlUmqkChKug==", "requires": { "@babel/helper-builder-binary-assignment-operator-visitor": "^7.10.4", "@babel/helper-plugin-utils": "^7.10.4" } }, "@babel/plugin-transform-for-of": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.10.4.tgz", - "integrity": "sha512-ItdQfAzu9AlEqmusA/65TqJ79eRcgGmpPPFvBnGILXZH975G0LNjP1yjHvGgfuCxqrPPueXOPe+FsvxmxKiHHQ==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.12.1.tgz", + "integrity": "sha512-Zaeq10naAsuHo7heQvyV0ptj4dlZJwZgNAtBYBnu5nNKJoW62m0zKcIEyVECrUKErkUkg6ajMy4ZfnVZciSBhg==", "requires": { "@babel/helper-plugin-utils": "^7.10.4" } }, "@babel/plugin-transform-function-name": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.10.4.tgz", - "integrity": "sha512-OcDCq2y5+E0dVD5MagT5X+yTRbcvFjDI2ZVAottGH6tzqjx/LKpgkUepu3hp/u4tZBzxxpNGwLsAvGBvQ2mJzg==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.12.1.tgz", + "integrity": "sha512-JF3UgJUILoFrFMEnOJLJkRHSk6LUSXLmEFsA23aR2O5CSLUxbeUX1IZ1YQ7Sn0aXb601Ncwjx73a+FVqgcljVw==", "requires": { "@babel/helper-function-name": "^7.10.4", "@babel/helper-plugin-utils": "^7.10.4" } }, "@babel/plugin-transform-literals": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.10.4.tgz", - "integrity": "sha512-Xd/dFSTEVuUWnyZiMu76/InZxLTYilOSr1UlHV+p115Z/Le2Fi1KXkJUYz0b42DfndostYlPub3m8ZTQlMaiqQ==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.12.1.tgz", + "integrity": "sha512-+PxVGA+2Ag6uGgL0A5f+9rklOnnMccwEBzwYFL3EUaKuiyVnUipyXncFcfjSkbimLrODoqki1U9XxZzTvfN7IQ==", "requires": { "@babel/helper-plugin-utils": "^7.10.4" } }, "@babel/plugin-transform-member-expression-literals": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.10.4.tgz", - "integrity": "sha512-0bFOvPyAoTBhtcJLr9VcwZqKmSjFml1iVxvPL0ReomGU53CX53HsM4h2SzckNdkQcHox1bpAqzxBI1Y09LlBSw==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.12.1.tgz", + "integrity": "sha512-1sxePl6z9ad0gFMB9KqmYofk34flq62aqMt9NqliS/7hPEpURUCMbyHXrMPlo282iY7nAvUB1aQd5mg79UD9Jg==", "requires": { "@babel/helper-plugin-utils": "^7.10.4" } }, "@babel/plugin-transform-modules-amd": { - "version": "7.10.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.10.5.tgz", - "integrity": "sha512-elm5uruNio7CTLFItVC/rIzKLfQ17+fX7EVz5W0TMgIHFo1zY0Ozzx+lgwhL4plzl8OzVn6Qasx5DeEFyoNiRw==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.12.1.tgz", + "integrity": "sha512-tDW8hMkzad5oDtzsB70HIQQRBiTKrhfgwC/KkJeGsaNFTdWhKNt/BiE8c5yj19XiGyrxpbkOfH87qkNg1YGlOQ==", "requires": { - "@babel/helper-module-transforms": "^7.10.5", + "@babel/helper-module-transforms": "^7.12.1", "@babel/helper-plugin-utils": "^7.10.4", "babel-plugin-dynamic-import-node": "^2.3.3" } }, "@babel/plugin-transform-modules-commonjs": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.10.4.tgz", - "integrity": "sha512-Xj7Uq5o80HDLlW64rVfDBhao6OX89HKUmb+9vWYaLXBZOma4gA6tw4Ni1O5qVDoZWUV0fxMYA0aYzOawz0l+1w==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.12.1.tgz", + "integrity": "sha512-dY789wq6l0uLY8py9c1B48V8mVL5gZh/+PQ5ZPrylPYsnAvnEMjqsUXkuoDVPeVK+0VyGar+D08107LzDQ6pag==", "requires": { - "@babel/helper-module-transforms": "^7.10.4", + "@babel/helper-module-transforms": "^7.12.1", "@babel/helper-plugin-utils": "^7.10.4", - "@babel/helper-simple-access": "^7.10.4", + "@babel/helper-simple-access": "^7.12.1", "babel-plugin-dynamic-import-node": "^2.3.3" } }, "@babel/plugin-transform-modules-systemjs": { - "version": "7.10.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.10.5.tgz", - "integrity": "sha512-f4RLO/OL14/FP1AEbcsWMzpbUz6tssRaeQg11RH1BP/XnPpRoVwgeYViMFacnkaw4k4wjRSjn3ip1Uw9TaXuMw==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.12.1.tgz", + "integrity": "sha512-Hn7cVvOavVh8yvW6fLwveFqSnd7rbQN3zJvoPNyNaQSvgfKmDBO9U1YL9+PCXGRlZD9tNdWTy5ACKqMuzyn32Q==", "requires": { "@babel/helper-hoist-variables": "^7.10.4", - "@babel/helper-module-transforms": "^7.10.5", + "@babel/helper-module-transforms": "^7.12.1", "@babel/helper-plugin-utils": "^7.10.4", + "@babel/helper-validator-identifier": "^7.10.4", "babel-plugin-dynamic-import-node": "^2.3.3" } }, "@babel/plugin-transform-modules-umd": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.10.4.tgz", - "integrity": "sha512-mohW5q3uAEt8T45YT7Qc5ws6mWgJAaL/8BfWD9Dodo1A3RKWli8wTS+WiQ/knF+tXlPirW/1/MqzzGfCExKECA==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.12.1.tgz", + "integrity": "sha512-aEIubCS0KHKM0zUos5fIoQm+AZUMt1ZvMpqz0/H5qAQ7vWylr9+PLYurT+Ic7ID/bKLd4q8hDovaG3Zch2uz5Q==", "requires": { - "@babel/helper-module-transforms": "^7.10.4", + "@babel/helper-module-transforms": "^7.12.1", "@babel/helper-plugin-utils": "^7.10.4" } }, "@babel/plugin-transform-named-capturing-groups-regex": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.10.4.tgz", - "integrity": "sha512-V6LuOnD31kTkxQPhKiVYzYC/Jgdq53irJC/xBSmqcNcqFGV+PER4l6rU5SH2Vl7bH9mLDHcc0+l9HUOe4RNGKA==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.12.1.tgz", + "integrity": "sha512-tB43uQ62RHcoDp9v2Nsf+dSM8sbNodbEicbQNA53zHz8pWUhsgHSJCGpt7daXxRydjb0KnfmB+ChXOv3oADp1Q==", "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.10.4" + "@babel/helper-create-regexp-features-plugin": "^7.12.1" } }, "@babel/plugin-transform-new-target": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.10.4.tgz", - "integrity": "sha512-YXwWUDAH/J6dlfwqlWsztI2Puz1NtUAubXhOPLQ5gjR/qmQ5U96DY4FQO8At33JN4XPBhrjB8I4eMmLROjjLjw==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.12.1.tgz", + "integrity": "sha512-+eW/VLcUL5L9IvJH7rT1sT0CzkdUTvPrXC2PXTn/7z7tXLBuKvezYbGdxD5WMRoyvyaujOq2fWoKl869heKjhw==", "requires": { "@babel/helper-plugin-utils": "^7.10.4" } }, "@babel/plugin-transform-object-super": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.10.4.tgz", - "integrity": "sha512-5iTw0JkdRdJvr7sY0vHqTpnruUpTea32JHmq/atIWqsnNussbRzjEDyWep8UNztt1B5IusBYg8Irb0bLbiEBCQ==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.12.1.tgz", + "integrity": "sha512-AvypiGJH9hsquNUn+RXVcBdeE3KHPZexWRdimhuV59cSoOt5kFBmqlByorAeUlGG2CJWd0U+4ZtNKga/TB0cAw==", "requires": { "@babel/helper-plugin-utils": "^7.10.4", - "@babel/helper-replace-supers": "^7.10.4" + "@babel/helper-replace-supers": "^7.12.1" } }, "@babel/plugin-transform-parameters": { - "version": "7.10.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.10.5.tgz", - "integrity": "sha512-xPHwUj5RdFV8l1wuYiu5S9fqWGM2DrYc24TMvUiRrPVm+SM3XeqU9BcokQX/kEUe+p2RBwy+yoiR1w/Blq6ubw==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.12.1.tgz", + "integrity": "sha512-xq9C5EQhdPK23ZeCdMxl8bbRnAgHFrw5EOC3KJUsSylZqdkCaFEXxGSBuTSObOpiiHHNyb82es8M1QYgfQGfNg==", "requires": { - "@babel/helper-get-function-arity": "^7.10.4", "@babel/helper-plugin-utils": "^7.10.4" } }, "@babel/plugin-transform-property-literals": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.10.4.tgz", - "integrity": "sha512-ofsAcKiUxQ8TY4sScgsGeR2vJIsfrzqvFb9GvJ5UdXDzl+MyYCaBj/FGzXuv7qE0aJcjWMILny1epqelnFlz8g==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.12.1.tgz", + "integrity": "sha512-6MTCR/mZ1MQS+AwZLplX4cEySjCpnIF26ToWo942nqn8hXSm7McaHQNeGx/pt7suI1TWOWMfa/NgBhiqSnX0cQ==", "requires": { "@babel/helper-plugin-utils": "^7.10.4" } }, "@babel/plugin-transform-regenerator": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.10.4.tgz", - "integrity": "sha512-3thAHwtor39A7C04XucbMg17RcZ3Qppfxr22wYzZNcVIkPHfpM9J0SO8zuCV6SZa265kxBJSrfKTvDCYqBFXGw==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.12.1.tgz", + "integrity": "sha512-gYrHqs5itw6i4PflFX3OdBPMQdPbF4bj2REIUxlMRUFk0/ZOAIpDFuViuxPjUL7YC8UPnf+XG7/utJvqXdPKng==", "requires": { "regenerator-transform": "^0.14.2" } }, "@babel/plugin-transform-reserved-words": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.10.4.tgz", - "integrity": "sha512-hGsw1O6Rew1fkFbDImZIEqA8GoidwTAilwCyWqLBM9f+e/u/sQMQu7uX6dyokfOayRuuVfKOW4O7HvaBWM+JlQ==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.12.1.tgz", + "integrity": "sha512-pOnUfhyPKvZpVyBHhSBoX8vfA09b7r00Pmm1sH+29ae2hMTKVmSp4Ztsr8KBKjLjx17H0eJqaRC3bR2iThM54A==", "requires": { "@babel/helper-plugin-utils": "^7.10.4" } }, "@babel/plugin-transform-runtime": { - "version": "7.11.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.11.5.tgz", - "integrity": "sha512-9aIoee+EhjySZ6vY5hnLjigHzunBlscx9ANKutkeWTJTx6m5Rbq6Ic01tLvO54lSusR+BxV7u4UDdCmXv5aagg==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.12.1.tgz", + "integrity": "sha512-Ac/H6G9FEIkS2tXsZjL4RAdS3L3WHxci0usAnz7laPWUmFiGtj7tIASChqKZMHTSQTQY6xDbOq+V1/vIq3QrWg==", "requires": { - "@babel/helper-module-imports": "^7.10.4", + "@babel/helper-module-imports": "^7.12.1", "@babel/helper-plugin-utils": "^7.10.4", "resolve": "^1.8.1", "semver": "^5.5.1" @@ -943,89 +934,89 @@ } }, "@babel/plugin-transform-shorthand-properties": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.10.4.tgz", - "integrity": "sha512-AC2K/t7o07KeTIxMoHneyX90v3zkm5cjHJEokrPEAGEy3UCp8sLKfnfOIGdZ194fyN4wfX/zZUWT9trJZ0qc+Q==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.12.1.tgz", + "integrity": "sha512-GFZS3c/MhX1OusqB1MZ1ct2xRzX5ppQh2JU1h2Pnfk88HtFTM+TWQqJNfwkmxtPQtb/s1tk87oENfXJlx7rSDw==", "requires": { "@babel/helper-plugin-utils": "^7.10.4" } }, "@babel/plugin-transform-spread": { - "version": "7.11.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.11.0.tgz", - "integrity": "sha512-UwQYGOqIdQJe4aWNyS7noqAnN2VbaczPLiEtln+zPowRNlD+79w3oi2TWfYe0eZgd+gjZCbsydN7lzWysDt+gw==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.12.1.tgz", + "integrity": "sha512-vuLp8CP0BE18zVYjsEBZ5xoCecMK6LBMMxYzJnh01rxQRvhNhH1csMMmBfNo5tGpGO+NhdSNW2mzIvBu3K1fng==", "requires": { "@babel/helper-plugin-utils": "^7.10.4", - "@babel/helper-skip-transparent-expression-wrappers": "^7.11.0" + "@babel/helper-skip-transparent-expression-wrappers": "^7.12.1" } }, "@babel/plugin-transform-sticky-regex": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.10.4.tgz", - "integrity": "sha512-Ddy3QZfIbEV0VYcVtFDCjeE4xwVTJWTmUtorAJkn6u/92Z/nWJNV+mILyqHKrUxXYKA2EoCilgoPePymKL4DvQ==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.12.1.tgz", + "integrity": "sha512-CiUgKQ3AGVk7kveIaPEET1jNDhZZEl1RPMWdTBE1799bdz++SwqDHStmxfCtDfBhQgCl38YRiSnrMuUMZIWSUQ==", "requires": { "@babel/helper-plugin-utils": "^7.10.4", "@babel/helper-regex": "^7.10.4" } }, "@babel/plugin-transform-template-literals": { - "version": "7.10.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.10.5.tgz", - "integrity": "sha512-V/lnPGIb+KT12OQikDvgSuesRX14ck5FfJXt6+tXhdkJ+Vsd0lDCVtF6jcB4rNClYFzaB2jusZ+lNISDk2mMMw==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.12.1.tgz", + "integrity": "sha512-b4Zx3KHi+taXB1dVRBhVJtEPi9h1THCeKmae2qP0YdUHIFhVjtpqqNfxeVAa1xeHVhAy4SbHxEwx5cltAu5apw==", "requires": { - "@babel/helper-annotate-as-pure": "^7.10.4", "@babel/helper-plugin-utils": "^7.10.4" } }, "@babel/plugin-transform-typeof-symbol": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.10.4.tgz", - "integrity": "sha512-QqNgYwuuW0y0H+kUE/GWSR45t/ccRhe14Fs/4ZRouNNQsyd4o3PG4OtHiIrepbM2WKUBDAXKCAK/Lk4VhzTaGA==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.12.1.tgz", + "integrity": "sha512-EPGgpGy+O5Kg5pJFNDKuxt9RdmTgj5sgrus2XVeMp/ZIbOESadgILUbm50SNpghOh3/6yrbsH+NB5+WJTmsA7Q==", "requires": { "@babel/helper-plugin-utils": "^7.10.4" } }, "@babel/plugin-transform-unicode-escapes": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.10.4.tgz", - "integrity": "sha512-y5XJ9waMti2J+e7ij20e+aH+fho7Wb7W8rNuu72aKRwCHFqQdhkdU2lo3uZ9tQuboEJcUFayXdARhcxLQ3+6Fg==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.12.1.tgz", + "integrity": "sha512-I8gNHJLIc7GdApm7wkVnStWssPNbSRMPtgHdmH3sRM1zopz09UWPS4x5V4n1yz/MIWTVnJ9sp6IkuXdWM4w+2Q==", "requires": { "@babel/helper-plugin-utils": "^7.10.4" } }, "@babel/plugin-transform-unicode-regex": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.10.4.tgz", - "integrity": "sha512-wNfsc4s8N2qnIwpO/WP2ZiSyjfpTamT2C9V9FDH/Ljub9zw6P3SjkXcFmc0RQUt96k2fmIvtla2MMjgTwIAC+A==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.12.1.tgz", + "integrity": "sha512-SqH4ClNngh/zGwHZOOQMTD+e8FGWexILV+ePMyiDJttAWRh5dhDL8rcl5lSgU3Huiq6Zn6pWTMvdPAb21Dwdyg==", "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.10.4", + "@babel/helper-create-regexp-features-plugin": "^7.12.1", "@babel/helper-plugin-utils": "^7.10.4" } }, "@babel/preset-env": { - "version": "7.11.5", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.11.5.tgz", - "integrity": "sha512-kXqmW1jVcnB2cdueV+fyBM8estd5mlNfaQi6lwLgRwCby4edpavgbFhiBNjmWA3JpB/yZGSISa7Srf+TwxDQoA==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.12.1.tgz", + "integrity": "sha512-H8kxXmtPaAGT7TyBvSSkoSTUK6RHh61So05SyEbpmr0MCZrsNYn7mGMzzeYoOUCdHzww61k8XBft2TaES+xPLg==", "requires": { - "@babel/compat-data": "^7.11.0", - "@babel/helper-compilation-targets": "^7.10.4", - "@babel/helper-module-imports": "^7.10.4", + "@babel/compat-data": "^7.12.1", + "@babel/helper-compilation-targets": "^7.12.1", + "@babel/helper-module-imports": "^7.12.1", "@babel/helper-plugin-utils": "^7.10.4", - "@babel/plugin-proposal-async-generator-functions": "^7.10.4", - "@babel/plugin-proposal-class-properties": "^7.10.4", - "@babel/plugin-proposal-dynamic-import": "^7.10.4", - "@babel/plugin-proposal-export-namespace-from": "^7.10.4", - "@babel/plugin-proposal-json-strings": "^7.10.4", - "@babel/plugin-proposal-logical-assignment-operators": "^7.11.0", - "@babel/plugin-proposal-nullish-coalescing-operator": "^7.10.4", - "@babel/plugin-proposal-numeric-separator": "^7.10.4", - "@babel/plugin-proposal-object-rest-spread": "^7.11.0", - "@babel/plugin-proposal-optional-catch-binding": "^7.10.4", - "@babel/plugin-proposal-optional-chaining": "^7.11.0", - "@babel/plugin-proposal-private-methods": "^7.10.4", - "@babel/plugin-proposal-unicode-property-regex": "^7.10.4", + "@babel/helper-validator-option": "^7.12.1", + "@babel/plugin-proposal-async-generator-functions": "^7.12.1", + "@babel/plugin-proposal-class-properties": "^7.12.1", + "@babel/plugin-proposal-dynamic-import": "^7.12.1", + "@babel/plugin-proposal-export-namespace-from": "^7.12.1", + "@babel/plugin-proposal-json-strings": "^7.12.1", + "@babel/plugin-proposal-logical-assignment-operators": "^7.12.1", + "@babel/plugin-proposal-nullish-coalescing-operator": "^7.12.1", + "@babel/plugin-proposal-numeric-separator": "^7.12.1", + "@babel/plugin-proposal-object-rest-spread": "^7.12.1", + "@babel/plugin-proposal-optional-catch-binding": "^7.12.1", + "@babel/plugin-proposal-optional-chaining": "^7.12.1", + "@babel/plugin-proposal-private-methods": "^7.12.1", + "@babel/plugin-proposal-unicode-property-regex": "^7.12.1", "@babel/plugin-syntax-async-generators": "^7.8.0", - "@babel/plugin-syntax-class-properties": "^7.10.4", + "@babel/plugin-syntax-class-properties": "^7.12.1", "@babel/plugin-syntax-dynamic-import": "^7.8.0", "@babel/plugin-syntax-export-namespace-from": "^7.8.3", "@babel/plugin-syntax-json-strings": "^7.8.0", @@ -1035,45 +1026,42 @@ "@babel/plugin-syntax-object-rest-spread": "^7.8.0", "@babel/plugin-syntax-optional-catch-binding": "^7.8.0", "@babel/plugin-syntax-optional-chaining": "^7.8.0", - "@babel/plugin-syntax-top-level-await": "^7.10.4", - "@babel/plugin-transform-arrow-functions": "^7.10.4", - "@babel/plugin-transform-async-to-generator": "^7.10.4", - "@babel/plugin-transform-block-scoped-functions": "^7.10.4", - "@babel/plugin-transform-block-scoping": "^7.10.4", - "@babel/plugin-transform-classes": "^7.10.4", - "@babel/plugin-transform-computed-properties": "^7.10.4", - "@babel/plugin-transform-destructuring": "^7.10.4", - "@babel/plugin-transform-dotall-regex": "^7.10.4", - "@babel/plugin-transform-duplicate-keys": "^7.10.4", - "@babel/plugin-transform-exponentiation-operator": "^7.10.4", - "@babel/plugin-transform-for-of": "^7.10.4", - "@babel/plugin-transform-function-name": "^7.10.4", - "@babel/plugin-transform-literals": "^7.10.4", - "@babel/plugin-transform-member-expression-literals": "^7.10.4", - "@babel/plugin-transform-modules-amd": "^7.10.4", - "@babel/plugin-transform-modules-commonjs": "^7.10.4", - "@babel/plugin-transform-modules-systemjs": "^7.10.4", - "@babel/plugin-transform-modules-umd": "^7.10.4", - "@babel/plugin-transform-named-capturing-groups-regex": "^7.10.4", - "@babel/plugin-transform-new-target": "^7.10.4", - "@babel/plugin-transform-object-super": "^7.10.4", - "@babel/plugin-transform-parameters": "^7.10.4", - "@babel/plugin-transform-property-literals": "^7.10.4", - "@babel/plugin-transform-regenerator": "^7.10.4", - "@babel/plugin-transform-reserved-words": "^7.10.4", - "@babel/plugin-transform-shorthand-properties": "^7.10.4", - "@babel/plugin-transform-spread": "^7.11.0", - "@babel/plugin-transform-sticky-regex": "^7.10.4", - "@babel/plugin-transform-template-literals": "^7.10.4", - "@babel/plugin-transform-typeof-symbol": "^7.10.4", - "@babel/plugin-transform-unicode-escapes": "^7.10.4", - "@babel/plugin-transform-unicode-regex": "^7.10.4", + "@babel/plugin-syntax-top-level-await": "^7.12.1", + "@babel/plugin-transform-arrow-functions": "^7.12.1", + "@babel/plugin-transform-async-to-generator": "^7.12.1", + "@babel/plugin-transform-block-scoped-functions": "^7.12.1", + "@babel/plugin-transform-block-scoping": "^7.12.1", + "@babel/plugin-transform-classes": "^7.12.1", + "@babel/plugin-transform-computed-properties": "^7.12.1", + "@babel/plugin-transform-destructuring": "^7.12.1", + "@babel/plugin-transform-dotall-regex": "^7.12.1", + "@babel/plugin-transform-duplicate-keys": "^7.12.1", + "@babel/plugin-transform-exponentiation-operator": "^7.12.1", + "@babel/plugin-transform-for-of": "^7.12.1", + "@babel/plugin-transform-function-name": "^7.12.1", + "@babel/plugin-transform-literals": "^7.12.1", + "@babel/plugin-transform-member-expression-literals": "^7.12.1", + "@babel/plugin-transform-modules-amd": "^7.12.1", + "@babel/plugin-transform-modules-commonjs": "^7.12.1", + "@babel/plugin-transform-modules-systemjs": "^7.12.1", + "@babel/plugin-transform-modules-umd": "^7.12.1", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.12.1", + "@babel/plugin-transform-new-target": "^7.12.1", + "@babel/plugin-transform-object-super": "^7.12.1", + "@babel/plugin-transform-parameters": "^7.12.1", + "@babel/plugin-transform-property-literals": "^7.12.1", + "@babel/plugin-transform-regenerator": "^7.12.1", + "@babel/plugin-transform-reserved-words": "^7.12.1", + "@babel/plugin-transform-shorthand-properties": "^7.12.1", + "@babel/plugin-transform-spread": "^7.12.1", + "@babel/plugin-transform-sticky-regex": "^7.12.1", + "@babel/plugin-transform-template-literals": "^7.12.1", + "@babel/plugin-transform-typeof-symbol": "^7.12.1", + "@babel/plugin-transform-unicode-escapes": "^7.12.1", + "@babel/plugin-transform-unicode-regex": "^7.12.1", "@babel/preset-modules": "^0.1.3", - "@babel/types": "^7.11.5", - "browserslist": "^4.12.0", + "@babel/types": "^7.12.1", "core-js-compat": "^3.6.2", - "invariant": "^2.2.2", - "levenary": "^1.1.1", "semver": "^5.5.0" }, "dependencies": { @@ -1097,9 +1085,9 @@ } }, "@babel/runtime": { - "version": "7.11.2", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.11.2.tgz", - "integrity": "sha512-TeWkU52so0mPtDcaCTxNBI/IHiz0pZgr8VEFqXFtZWpYD08ZB6FaSwVAS8MKRQAP3bYKiVjwysOJgMFY28o6Tw==", + "version": "7.12.5", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.5.tgz", + "integrity": "sha512-plcc+hbExy3McchJCEQG3knOsuh3HH+Prx1P6cLIkET/0dLuQDEnrT+s27Axgc9bqfsmNUNHfscgMUdBpC9xfg==", "requires": { "regenerator-runtime": "^0.13.4" }, @@ -1122,16 +1110,16 @@ } }, "@babel/traverse": { - "version": "7.11.5", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.11.5.tgz", - "integrity": "sha512-EjiPXt+r7LiCZXEfRpSJd+jUMnBd4/9OUv7Nx3+0u9+eimMwJmG0Q98lw4/289JCoxSE8OolDMNZaaF/JZ69WQ==", + "version": "7.12.5", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.5.tgz", + "integrity": "sha512-xa15FbQnias7z9a62LwYAA5SZZPkHIXpd42C6uW68o8uTuua96FHZy1y61Va5P/i83FAAcMpW8+A/QayntzuqA==", "requires": { "@babel/code-frame": "^7.10.4", - "@babel/generator": "^7.11.5", + "@babel/generator": "^7.12.5", "@babel/helper-function-name": "^7.10.4", "@babel/helper-split-export-declaration": "^7.11.0", - "@babel/parser": "^7.11.5", - "@babel/types": "^7.11.5", + "@babel/parser": "^7.12.5", + "@babel/types": "^7.12.5", "debug": "^4.1.0", "globals": "^11.1.0", "lodash": "^4.17.19" @@ -1153,9 +1141,9 @@ } }, "@babel/types": { - "version": "7.11.5", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.11.5.tgz", - "integrity": "sha512-bvM7Qz6eKnJVFIn+1LPtjlBFPVN5jNDc1XmN15vWe7Q3DPBufWWsLiIvUu7xW87uTG6QoggpIDnUgLQvPheU+Q==", + "version": "7.12.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.5.tgz", + "integrity": "sha512-gyTcvz7JFa4V45C0Zklv//GmFOAal5fL23OWpBLqc4nZ4Yrz67s4kCNwSK1Gu0MXGTU8mRY3zJYtacLdKXlzig==", "requires": { "@babel/helper-validator-identifier": "^7.10.4", "lodash": "^4.17.19", @@ -1196,10 +1184,10 @@ "follow-redirects": "1.5.10" } }, - "fuse.js": { - "version": "3.6.1", - "resolved": "https://registry.npmjs.org/fuse.js/-/fuse.js-3.6.1.tgz", - "integrity": "sha512-hT9yh/tiinkmirKrlv4KWOjztdoZo1mx9Qh4KvWqC7isoXwdUY3PNWUxceF4/qO9R6riA2C29jdTOeQOIROjgw==" + "entities": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.0.3.tgz", + "integrity": "sha512-MyoZ0jgnLvB2X3Lg5HqpFmn1kybDiIfEQmKzTb5apr51Rb+T3KdmMiqa70T+bhGnyv7bQ6WMj2QMHpGMmlrUYQ==" }, "markdown-it": { "version": "10.0.0", @@ -1255,11 +1243,6 @@ "@types/babel-types": "*" } }, - "@types/color-name": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz", - "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==" - }, "@types/glob": { "version": "7.1.3", "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.3.tgz", @@ -1280,9 +1263,9 @@ "integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==" }, "@types/node": { - "version": "14.11.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.11.2.tgz", - "integrity": "sha512-jiE3QIxJ8JLNcb1Ps6rDbysDhN4xa8DJJvuC9prr6w+1tIh+QAbYyNF3tyiZNLDBIuBCf4KEcV2UvQm/V60xfA==" + "version": "14.14.6", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.6.tgz", + "integrity": "sha512-6QlRuqsQ/Ox/aJEQWBEJG7A9+u7oSYl3mem/K8IzxXG/kAGbV1YPD9Bg9Zw3vyxC/YP+zONKwy8hGkSt1jxFMw==" }, "@types/q": { "version": "1.5.4", @@ -1290,9 +1273,9 @@ "integrity": "sha512-1HcDas8SEj4z1Wc696tH56G8OlRaH/sqZOynNNB+HF0WOeXPaxTtbYzJY2oEfiUxjSKjhCKr+MvR7dCHcEelug==" }, "@vue/babel-helper-vue-jsx-merge-props": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@vue/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-1.0.0.tgz", - "integrity": "sha512-6tyf5Cqm4m6v7buITuwS+jHzPlIPxbFzEhXR5JGZpbrvOcp1hiQKckd305/3C7C36wFekNTQSxAtgeM0j0yoUw==" + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@vue/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-1.2.1.tgz", + "integrity": "sha512-QOi5OW45e2R20VygMSNhyQHvpdUwQZqGPc748JLGCYEy+yp8fNFNdbNIGAgZmi9e+2JHPd6i6idRuqivyicIkA==" }, "@vue/babel-helper-vue-transform-on": { "version": "1.0.0-rc.2", @@ -1315,20 +1298,20 @@ }, "dependencies": { "camelcase": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.0.0.tgz", - "integrity": "sha512-8KMDF1Vz2gzOq54ONPJS65IvTUaB1cHJ2DMM7MbPmLZljDH1qpzzLsWdiN9pHh6qvkRVDTi/07+eNGch/oLU4w==" + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.0.tgz", + "integrity": "sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==" } } }, "@vue/babel-plugin-transform-vue-jsx": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@vue/babel-plugin-transform-vue-jsx/-/babel-plugin-transform-vue-jsx-1.1.2.tgz", - "integrity": "sha512-YfdaoSMvD1nj7+DsrwfTvTnhDXI7bsuh+Y5qWwvQXlD24uLgnsoww3qbiZvWf/EoviZMrvqkqN4CBw0W3BWUTQ==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@vue/babel-plugin-transform-vue-jsx/-/babel-plugin-transform-vue-jsx-1.2.1.tgz", + "integrity": "sha512-HJuqwACYehQwh1fNT8f4kyzqlNMpBuUK4rSiSES5D4QsYncv5fxFsLyrxFPG2ksO7t5WP+Vgix6tt6yKClwPzA==", "requires": { "@babel/helper-module-imports": "^7.0.0", "@babel/plugin-syntax-jsx": "^7.2.0", - "@vue/babel-helper-vue-jsx-merge-props": "^1.0.0", + "@vue/babel-helper-vue-jsx-merge-props": "^1.2.1", "html-tags": "^2.0.0", "lodash.kebabcase": "^4.1.1", "svg-tags": "^1.0.0" @@ -1342,9 +1325,9 @@ } }, "@vue/babel-preset-app": { - "version": "4.5.6", - "resolved": "https://registry.npmjs.org/@vue/babel-preset-app/-/babel-preset-app-4.5.6.tgz", - "integrity": "sha512-Eps83UNiBJeqlbpR9afYnhvjVLElVtA4fDLNuVUr1r3RbepoxWuq+mUTr3TBArPQebnAaDcrZaNHBWTLRbfo3A==", + "version": "4.5.8", + "resolved": "https://registry.npmjs.org/@vue/babel-preset-app/-/babel-preset-app-4.5.8.tgz", + "integrity": "sha512-efCBo2HY8Jcs6+SyCnvWl8jGeF1Fl38reFL35AjO4SBcro0ol/qjPkeeJLjzvXUxrHAsM9DMfL/DvPa/hBmZwQ==", "requires": { "@babel/core": "^7.11.0", "@babel/helper-compilation-targets": "^7.9.6", @@ -1372,42 +1355,60 @@ } }, "@vue/babel-preset-jsx": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@vue/babel-preset-jsx/-/babel-preset-jsx-1.1.2.tgz", - "integrity": "sha512-zDpVnFpeC9YXmvGIDSsKNdL7qCG2rA3gjywLYHPCKDT10erjxF4U+6ay9X6TW5fl4GsDlJp9bVfAVQAAVzxxvQ==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@vue/babel-preset-jsx/-/babel-preset-jsx-1.2.4.tgz", + "integrity": "sha512-oRVnmN2a77bYDJzeGSt92AuHXbkIxbf/XXSE3klINnh9AXBmVS1DGa1f0d+dDYpLfsAKElMnqKTQfKn7obcL4w==", "requires": { - "@vue/babel-helper-vue-jsx-merge-props": "^1.0.0", - "@vue/babel-plugin-transform-vue-jsx": "^1.1.2", - "@vue/babel-sugar-functional-vue": "^1.1.2", - "@vue/babel-sugar-inject-h": "^1.1.2", - "@vue/babel-sugar-v-model": "^1.1.2", - "@vue/babel-sugar-v-on": "^1.1.2" + "@vue/babel-helper-vue-jsx-merge-props": "^1.2.1", + "@vue/babel-plugin-transform-vue-jsx": "^1.2.1", + "@vue/babel-sugar-composition-api-inject-h": "^1.2.1", + "@vue/babel-sugar-composition-api-render-instance": "^1.2.4", + "@vue/babel-sugar-functional-vue": "^1.2.2", + "@vue/babel-sugar-inject-h": "^1.2.2", + "@vue/babel-sugar-v-model": "^1.2.3", + "@vue/babel-sugar-v-on": "^1.2.3" + } + }, + "@vue/babel-sugar-composition-api-inject-h": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@vue/babel-sugar-composition-api-inject-h/-/babel-sugar-composition-api-inject-h-1.2.1.tgz", + "integrity": "sha512-4B3L5Z2G+7s+9Bwbf+zPIifkFNcKth7fQwekVbnOA3cr3Pq71q71goWr97sk4/yyzH8phfe5ODVzEjX7HU7ItQ==", + "requires": { + "@babel/plugin-syntax-jsx": "^7.2.0" + } + }, + "@vue/babel-sugar-composition-api-render-instance": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@vue/babel-sugar-composition-api-render-instance/-/babel-sugar-composition-api-render-instance-1.2.4.tgz", + "integrity": "sha512-joha4PZznQMsxQYXtR3MnTgCASC9u3zt9KfBxIeuI5g2gscpTsSKRDzWQt4aqNIpx6cv8On7/m6zmmovlNsG7Q==", + "requires": { + "@babel/plugin-syntax-jsx": "^7.2.0" } }, "@vue/babel-sugar-functional-vue": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@vue/babel-sugar-functional-vue/-/babel-sugar-functional-vue-1.1.2.tgz", - "integrity": "sha512-YhmdJQSVEFF5ETJXzrMpj0nkCXEa39TvVxJTuVjzvP2rgKhdMmQzlJuMv/HpadhZaRVMCCF3AEjjJcK5q/cYzQ==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@vue/babel-sugar-functional-vue/-/babel-sugar-functional-vue-1.2.2.tgz", + "integrity": "sha512-JvbgGn1bjCLByIAU1VOoepHQ1vFsroSA/QkzdiSs657V79q6OwEWLCQtQnEXD/rLTA8rRit4rMOhFpbjRFm82w==", "requires": { "@babel/plugin-syntax-jsx": "^7.2.0" } }, "@vue/babel-sugar-inject-h": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@vue/babel-sugar-inject-h/-/babel-sugar-inject-h-1.1.2.tgz", - "integrity": "sha512-VRSENdTvD5htpnVp7i7DNuChR5rVMcORdXjvv5HVvpdKHzDZAYiLSD+GhnhxLm3/dMuk8pSzV+k28ECkiN5m8w==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@vue/babel-sugar-inject-h/-/babel-sugar-inject-h-1.2.2.tgz", + "integrity": "sha512-y8vTo00oRkzQTgufeotjCLPAvlhnpSkcHFEp60+LJUwygGcd5Chrpn5480AQp/thrxVm8m2ifAk0LyFel9oCnw==", "requires": { "@babel/plugin-syntax-jsx": "^7.2.0" } }, "@vue/babel-sugar-v-model": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@vue/babel-sugar-v-model/-/babel-sugar-v-model-1.1.2.tgz", - "integrity": "sha512-vLXPvNq8vDtt0u9LqFdpGM9W9IWDmCmCyJXuozlq4F4UYVleXJ2Fa+3JsnTZNJcG+pLjjfnEGHci2339Kj5sGg==", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/@vue/babel-sugar-v-model/-/babel-sugar-v-model-1.2.3.tgz", + "integrity": "sha512-A2jxx87mySr/ulAsSSyYE8un6SIH0NWHiLaCWpodPCVOlQVODCaSpiR4+IMsmBr73haG+oeCuSvMOM+ttWUqRQ==", "requires": { "@babel/plugin-syntax-jsx": "^7.2.0", - "@vue/babel-helper-vue-jsx-merge-props": "^1.0.0", - "@vue/babel-plugin-transform-vue-jsx": "^1.1.2", + "@vue/babel-helper-vue-jsx-merge-props": "^1.2.1", + "@vue/babel-plugin-transform-vue-jsx": "^1.2.1", "camelcase": "^5.0.0", "html-tags": "^2.0.0", "svg-tags": "^1.0.0" @@ -1426,12 +1427,12 @@ } }, "@vue/babel-sugar-v-on": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@vue/babel-sugar-v-on/-/babel-sugar-v-on-1.1.2.tgz", - "integrity": "sha512-T8ZCwC8Jp2uRtcZ88YwZtZXe7eQrJcfRq0uTFy6ShbwYJyz5qWskRFoVsdTi9o0WEhmQXxhQUewodOSCUPVmsQ==", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/@vue/babel-sugar-v-on/-/babel-sugar-v-on-1.2.3.tgz", + "integrity": "sha512-kt12VJdz/37D3N3eglBywV8GStKNUhNrsxChXIV+o0MwVXORYuhDTHJRKPgLJRb/EY3vM2aRFQdxJBp9CLikjw==", "requires": { "@babel/plugin-syntax-jsx": "^7.2.0", - "@vue/babel-plugin-transform-vue-jsx": "^1.1.2", + "@vue/babel-plugin-transform-vue-jsx": "^1.2.1", "camelcase": "^5.0.0" }, "dependencies": { @@ -1475,17 +1476,17 @@ } }, "@vuepress/core": { - "version": "1.5.4", - "resolved": "https://registry.npmjs.org/@vuepress/core/-/core-1.5.4.tgz", - "integrity": "sha512-RaHJiX0Yno4S3zoV64JNd3xE55sza8rayyWvXAJY381XVMxKrsLBrgW6ntNYSkzGnZcxi6fwMV/CVOUhEtkEkA==", + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/@vuepress/core/-/core-1.7.1.tgz", + "integrity": "sha512-M5sxZq30Ke1vXa4ZZjk6185fwtpiJOqzXNnzcIe0GxtvtaF8Yij6b+KqQKlUJnnUXm+CKxiLCr8PTzDY26N7yw==", "requires": { "@babel/core": "^7.8.4", "@vue/babel-preset-app": "^4.1.2", - "@vuepress/markdown": "1.5.4", - "@vuepress/markdown-loader": "1.5.4", - "@vuepress/plugin-last-updated": "1.5.4", - "@vuepress/plugin-register-components": "1.5.4", - "@vuepress/shared-utils": "1.5.4", + "@vuepress/markdown": "1.7.1", + "@vuepress/markdown-loader": "1.7.1", + "@vuepress/plugin-last-updated": "1.7.1", + "@vuepress/plugin-register-components": "1.7.1", + "@vuepress/shared-utils": "1.7.1", "autoprefixer": "^9.5.1", "babel-loader": "^8.0.4", "cache-loader": "^3.0.0", @@ -1507,7 +1508,7 @@ "url-loader": "^1.0.1", "vue": "^2.6.10", "vue-loader": "^15.7.1", - "vue-router": "^3.1.3", + "vue-router": "^3.4.5", "vue-server-renderer": "^2.6.10", "vue-template-compiler": "^2.6.10", "vuepress-html-webpack-plugin": "^3.2.0", @@ -1527,11 +1528,11 @@ } }, "@vuepress/markdown": { - "version": "1.5.4", - "resolved": "https://registry.npmjs.org/@vuepress/markdown/-/markdown-1.5.4.tgz", - "integrity": "sha512-bgrR9LTcAa2O0WipTbH3OFKeAfXc/2oU6cUIoMkyihSKUo1Mr5yt1XKM7vHe1uFEZygNr8EAemep8chsuVuISA==", + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/@vuepress/markdown/-/markdown-1.7.1.tgz", + "integrity": "sha512-Ava9vJECHG1+RC53ut1dXSze35IH5tc3qesC06Ny37WS93iDSQy09j8y+a0Lugy12j1369+QQeRFWa40tdHczA==", "requires": { - "@vuepress/shared-utils": "1.5.4", + "@vuepress/shared-utils": "1.7.1", "markdown-it": "^8.4.1", "markdown-it-anchor": "^5.0.2", "markdown-it-chain": "^1.3.0", @@ -1560,61 +1561,61 @@ } }, "@vuepress/markdown-loader": { - "version": "1.5.4", - "resolved": "https://registry.npmjs.org/@vuepress/markdown-loader/-/markdown-loader-1.5.4.tgz", - "integrity": "sha512-3R5quGIXQm7gfPWN67SVZ9OBA7VrGEEXJjjV01MYkbfhqVGgO6lBRq73Og0XdKs4RPx4nqJUPthhL8FJVNRTIg==", + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/@vuepress/markdown-loader/-/markdown-loader-1.7.1.tgz", + "integrity": "sha512-GM1F/tRhP9qZydTC89FXJPlLH+BmZijMKom5BYLAMEXsU20A9kABTRoatPjOUbZuKT+gn03JgG97qVd8xa/ETw==", "requires": { - "@vuepress/markdown": "1.5.4", + "@vuepress/markdown": "1.7.1", "loader-utils": "^1.1.0", "lru-cache": "^5.1.1" } }, "@vuepress/plugin-active-header-links": { - "version": "1.5.4", - "resolved": "https://registry.npmjs.org/@vuepress/plugin-active-header-links/-/plugin-active-header-links-1.5.4.tgz", - "integrity": "sha512-FI1Dr/44HVqxLMRSuaVEEwegGVEGFlaWYE3nsXwL7klKr6c+2kXHEw9rSQlAxzJyzVfovTk4dd+s/AMOKuLGZQ==", + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/@vuepress/plugin-active-header-links/-/plugin-active-header-links-1.7.1.tgz", + "integrity": "sha512-Wgf/oB9oPZLnYoLjQ/xbQc4Qa3RU5tXAo2dB4Xl/7bUL6SqBxO866kX3wPxKdSOIL58tq8iH9XbUe3Sxi8/ISQ==", "requires": { "lodash.debounce": "^4.0.8" } }, "@vuepress/plugin-google-analytics": { - "version": "1.5.4", - "resolved": "https://registry.npmjs.org/@vuepress/plugin-google-analytics/-/plugin-google-analytics-1.5.4.tgz", - "integrity": "sha512-JVmIPBqKNiOVvow+XAZE+jgGvIRMBVxZOpKb5HBQ0xwz/E81Opl7cxdX9VkPKX+i9VoRBPWEiD/874RivzbW1g==" + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/@vuepress/plugin-google-analytics/-/plugin-google-analytics-1.7.1.tgz", + "integrity": "sha512-27fQzRMsqGYpMf+ruyhsdfLv/n6z6b6LutFLE/pH66Itlh6ox9ew31x0pqYBbWIC/a4lBfXYUwFvi+DEvlb1EQ==" }, "@vuepress/plugin-last-updated": { - "version": "1.5.4", - "resolved": "https://registry.npmjs.org/@vuepress/plugin-last-updated/-/plugin-last-updated-1.5.4.tgz", - "integrity": "sha512-9kezBCxPM+cevKRNML6Q7v6qkI8NQvKbVkwohlzsElM8FBmjlZmgFyZje66ksTnb/U6ogazCCq9jdOyipNcQ2A==", + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/@vuepress/plugin-last-updated/-/plugin-last-updated-1.7.1.tgz", + "integrity": "sha512-VW5jhBuO0WRHDsBmFsKC6QtEyBLCgyhuH9nQ65aairCn3tdoJPz0uQ4g3lr/boVbgsPexO677Sn3dRPgYqnMug==", "requires": { "cross-spawn": "^6.0.5" } }, "@vuepress/plugin-nprogress": { - "version": "1.5.4", - "resolved": "https://registry.npmjs.org/@vuepress/plugin-nprogress/-/plugin-nprogress-1.5.4.tgz", - "integrity": "sha512-2bGKoO/o2e5mIfOU80q+AkxOK5wVijA/+8jGjSQVf2ccMpJw+Ly1mMi69r81Q0QkEihgfI9VN42a5+a6LUgPBw==", + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/@vuepress/plugin-nprogress/-/plugin-nprogress-1.7.1.tgz", + "integrity": "sha512-KtqfI3RitbsEbm22EhbooTvhjfMf6zttKlbND7LcyJwP3MEPVYyzQJuET03hk9z4SgCfNV2r/W3sYyejzzTMog==", "requires": { "nprogress": "^0.2.0" } }, "@vuepress/plugin-register-components": { - "version": "1.5.4", - "resolved": "https://registry.npmjs.org/@vuepress/plugin-register-components/-/plugin-register-components-1.5.4.tgz", - "integrity": "sha512-Y1U9j6unZp1ZhnHjQ9yOPY+vxldUA3C1EwT6UgI75j5gxa5Hz6NakoIo6mbhaYHlGmx33o/MXrxufLPapo/YlQ==", + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/@vuepress/plugin-register-components/-/plugin-register-components-1.7.1.tgz", + "integrity": "sha512-MlFdH6l3rTCJlGMvyssXVG998cq5LSMzxCuQLYcRdtHQT4HbikIcV4HSPGarWInD1mP12+qX/PvKUawGwp1eVg==", "requires": { - "@vuepress/shared-utils": "1.5.4" + "@vuepress/shared-utils": "1.7.1" } }, "@vuepress/plugin-search": { - "version": "1.5.4", - "resolved": "https://registry.npmjs.org/@vuepress/plugin-search/-/plugin-search-1.5.4.tgz", - "integrity": "sha512-wikU9XYiZ3Olbii0lI+56mcSdpzHHkduVBMB4MNEV5iob23qDxGPmvfZirjsZV20w1UnLRptERyHtZkTLW9Mbg==" + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/@vuepress/plugin-search/-/plugin-search-1.7.1.tgz", + "integrity": "sha512-OmiGM5eYg9c+uC50b6/cSxAhqxfD7AIui6JEztFGeECrlP33RLHmteXK9YBBZjp5wTNmoYs+NXI/cWggYUPW8Q==" }, "@vuepress/shared-utils": { - "version": "1.5.4", - "resolved": "https://registry.npmjs.org/@vuepress/shared-utils/-/shared-utils-1.5.4.tgz", - "integrity": "sha512-HCeMPEAPjFN1Ongii0BUCI1iB4gBBiQ4PUgh7F4IGG8yBg4tMqWO4NHqCuDCuGEvK7lgHy8veto0SsSvdSKp3g==", + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/@vuepress/shared-utils/-/shared-utils-1.7.1.tgz", + "integrity": "sha512-ydB2ZKsFZE6hFRb9FWqzZksxAPIMJjtBawk50RP6F+YX5HbID/HlyYYZM9aDSbk6RTkjgB5UzJjggA2xM8POlw==", "requires": { "chalk": "^2.3.2", "escape-html": "^1.0.3", @@ -1628,16 +1629,16 @@ } }, "@vuepress/theme-default": { - "version": "1.5.4", - "resolved": "https://registry.npmjs.org/@vuepress/theme-default/-/theme-default-1.5.4.tgz", - "integrity": "sha512-kHst1yXzqTiocVU7w9x4cfJ08vR9ZbREC6kTRtH1ytQSEUL5tM0b9HFicfg1kDp7YNq2qntRro+WmfjU9Ps/eg==", + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/@vuepress/theme-default/-/theme-default-1.7.1.tgz", + "integrity": "sha512-a9HeTrlcWQj3ONHiABmlN2z9TyIxKfQtLsA8AL+WgjN3PikhFuZFIJGzfr+NLt67Y9oiI+S9ZfiaVyvWM+7bWQ==", "requires": { - "@vuepress/plugin-active-header-links": "1.5.4", - "@vuepress/plugin-nprogress": "1.5.4", - "@vuepress/plugin-search": "1.5.4", + "@vuepress/plugin-active-header-links": "1.7.1", + "@vuepress/plugin-nprogress": "1.7.1", + "@vuepress/plugin-search": "1.7.1", "docsearch.js": "^2.5.2", "lodash": "^4.17.15", - "stylus": "^0.54.5", + "stylus": "^0.54.8", "stylus-loader": "^3.0.2", "vuepress-plugin-container": "^2.0.2", "vuepress-plugin-smooth-scroll": "^0.0.3" @@ -1850,9 +1851,9 @@ "integrity": "sha1-xdG9SxKQCPEWPyNvhuX66iAm4u8=" }, "ajv": { - "version": "6.12.5", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.5.tgz", - "integrity": "sha512-lRF8RORchjpKG50/WFf8xmg7sgCLFiYNNnqdKflk63whMQcWR5ngGjiSXkL9bjxy6B2npOK2HSMN49jEBMSkag==", + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "requires": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -1871,24 +1872,24 @@ "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==" }, "algoliasearch": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/algoliasearch/-/algoliasearch-4.5.1.tgz", - "integrity": "sha512-b6yT1vWMlBdVObQipKxvt0M6SEvGetVj+FFFlo0Fy06gkdj6WCJaS4t10Q/hC3I2VG9QmpCqlK3Esgg1y1E+uw==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/algoliasearch/-/algoliasearch-4.6.0.tgz", + "integrity": "sha512-f4QVfUYnWIGZwOupZh0RAqW8zEfpZAcZG6ZT0p6wDMztEyKBrjjbTXBk9p9uEaJqoIhFUm6TtApOxodTdHbqvw==", "requires": { - "@algolia/cache-browser-local-storage": "4.5.1", - "@algolia/cache-common": "4.5.1", - "@algolia/cache-in-memory": "4.5.1", - "@algolia/client-account": "4.5.1", - "@algolia/client-analytics": "4.5.1", - "@algolia/client-common": "4.5.1", - "@algolia/client-recommendation": "4.5.1", - "@algolia/client-search": "4.5.1", - "@algolia/logger-common": "4.5.1", - "@algolia/logger-console": "4.5.1", - "@algolia/requester-browser-xhr": "4.5.1", - "@algolia/requester-common": "4.5.1", - "@algolia/requester-node-http": "4.5.1", - "@algolia/transporter": "4.5.1" + "@algolia/cache-browser-local-storage": "4.6.0", + "@algolia/cache-common": "4.6.0", + "@algolia/cache-in-memory": "4.6.0", + "@algolia/client-account": "4.6.0", + "@algolia/client-analytics": "4.6.0", + "@algolia/client-common": "4.6.0", + "@algolia/client-recommendation": "4.6.0", + "@algolia/client-search": "4.6.0", + "@algolia/logger-common": "4.6.0", + "@algolia/logger-console": "4.6.0", + "@algolia/requester-browser-xhr": "4.6.0", + "@algolia/requester-common": "4.6.0", + "@algolia/requester-node-http": "4.6.0", + "@algolia/transporter": "4.6.0" } }, "align-text": { @@ -2146,14 +2147,14 @@ "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" }, "aws4": { - "version": "1.10.1", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.10.1.tgz", - "integrity": "sha512-zg7Hz2k5lI8kb7U32998pRRFin7zJlkfezGJjUc2heaD4Pw2wObakCDVzkKztTm/Ln7eiVvYsjqak0Ed4LkMDA==" + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", + "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==" }, "axios": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.20.0.tgz", - "integrity": "sha512-ANA4rr2BDcmmAQLOKft2fufrtuvlqR+cXNNinUmvfeSNCOF98PZL+7M/v1zIdGo7OLjEA9J2gXJL+j4zGsl0bA==", + "version": "0.21.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.0.tgz", + "integrity": "sha512-fmkJBknJKoZwem3/IKSSLpkdNXZeBu5Q7GA/aRsr2btgrptmSCxi2oFjZHqGdK9DoTil9PIHlPIZw2EcRJXRvw==", "requires": { "follow-redirects": "^1.10.0" }, @@ -2393,11 +2394,10 @@ "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==" }, "ansi-styles": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", - "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "requires": { - "@types/color-name": "^1.1.1", "color-convert": "^2.0.1" } }, @@ -2582,14 +2582,14 @@ } }, "browserslist": { - "version": "4.14.4", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.14.4.tgz", - "integrity": "sha512-7FOuawafVdEwa5Jv4nzeik/PepAjVte6HmVGHsjt2bC237jeL9QlcTBDF3PnHEvcC6uHwLGYPwZHNZMB7wWAnw==", + "version": "4.14.6", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.14.6.tgz", + "integrity": "sha512-zeFYcUo85ENhc/zxHbiIp0LGzzTrE2Pv2JhxvS7kpUb9Q9D38kUX6Bie7pGutJ/5iF5rOxE7CepAuWD56xJ33A==", "requires": { - "caniuse-lite": "^1.0.30001135", - "electron-to-chromium": "^1.3.570", - "escalade": "^3.1.0", - "node-releases": "^1.1.61" + "caniuse-lite": "^1.0.30001154", + "electron-to-chromium": "^1.3.585", + "escalade": "^3.1.1", + "node-releases": "^1.1.65" } }, "buffer": { @@ -2752,6 +2752,15 @@ } } }, + "call-bind": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.0.tgz", + "integrity": "sha512-AEXsYIyyDY3MCzbwdhzG3Jx1R0J2wetQyUynn6dYHAO+bg8l1k7jwZtRv4ryryFs7EP+NDlikJlVe59jr0cM2w==", + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.0" + } + }, "call-me-maybe": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz", @@ -2804,9 +2813,9 @@ } }, "caniuse-lite": { - "version": "1.0.30001135", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001135.tgz", - "integrity": "sha512-ziNcheTGTHlu9g34EVoHQdIu5g4foc8EsxMGC7Xkokmvw0dqNtX8BS8RgCgFBaAiSp2IdjvBxNdh0ssib28eVQ==" + "version": "1.0.30001154", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001154.tgz", + "integrity": "sha512-y9DvdSti8NnYB9Be92ddMZQrcOe04kcQtcxtBx4NkB04+qZ+JUWotnXBJTmxlKudhxNTQ3RRknMwNU2YQl/Org==" }, "caseless": { "version": "0.12.0", @@ -2952,9 +2961,9 @@ } }, "clipboard-copy": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/clipboard-copy/-/clipboard-copy-3.1.0.tgz", - "integrity": "sha512-Xsu1NddBXB89IUauda5BIq3Zq73UWkjkaQlPQbLNvNsd5WBMnTWPNKYR6HGaySOxGYZ+BKxP2E9X4ElnI3yiPA==" + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/clipboard-copy/-/clipboard-copy-3.2.0.tgz", + "integrity": "sha512-vooFaGFL6ulEP1liiaWFBmmfuPm3cY3y7T9eB83ZTnYc/oFeAKsq3NcDrOkBC8XaauEE8zHQwI7k0+JSYiVQSQ==" }, "cliui": { "version": "2.1.0", @@ -2994,12 +3003,12 @@ } }, "color": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/color/-/color-3.1.2.tgz", - "integrity": "sha512-vXTJhHebByxZn3lDvDJYw4lR5+uB3vuoHsuYA5AKuxRVn5wzzIfQKGLBmgdVRHKTJYeK5rvJcHnrd0Li49CFpg==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/color/-/color-3.1.3.tgz", + "integrity": "sha512-xgXAcTHa2HeFCGLE9Xs/R82hujGtu9Jd9x4NW3T34+OMs7VoPsjwzRczKHvTAHeJwWFwX5j15+MgAppE8ztObQ==", "requires": { "color-convert": "^1.9.1", - "color-string": "^1.5.2" + "color-string": "^1.5.4" } }, "color-convert": { @@ -3016,9 +3025,9 @@ "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" }, "color-string": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.5.3.tgz", - "integrity": "sha512-dC2C5qeWoYkxki5UAXapdjqO672AM4vZuPGRQfO8b5HKuKGBbKWpITyDYN7TOFKvRW7kOgAn3746clDBMDJyQw==", + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.5.4.tgz", + "integrity": "sha512-57yF5yt8Xa3czSEW1jfQDE79Idk0+AkN/4KWad6tbdxUmAs3MvjxlWSWD4deYytcRfoZ9nhKyFl1kj5tBvidbw==", "requires": { "color-name": "^1.0.0", "simple-swizzle": "^0.2.2" @@ -3628,26 +3637,26 @@ "integrity": "sha512-WcKx5OY+KoSIAxBW6UBBRay1U6vkYheCdjyVNDm85zt5K9mHoGOfsOsqIszfAqrQQFIIKgjh2+FDgIj/zsl21Q==" }, "csso": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/csso/-/csso-4.0.3.tgz", - "integrity": "sha512-NL3spysxUkcrOgnpsT4Xdl2aiEiBG6bXswAABQVHcMrfjjBisFOKwLDOmf4wf32aPdcJws1zds2B0Rg+jqMyHQ==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/csso/-/csso-4.1.0.tgz", + "integrity": "sha512-h+6w/W1WqXaJA4tb1dk7r5tVbOm97MsKxzwnvOR04UQ6GILroryjMWu3pmCCtL2mLaEStQ0fZgeGiy99mo7iyg==", "requires": { - "css-tree": "1.0.0-alpha.39" + "css-tree": "^1.0.0" }, "dependencies": { "css-tree": { - "version": "1.0.0-alpha.39", - "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.0.0-alpha.39.tgz", - "integrity": "sha512-7UvkEYgBAHRG9Nt980lYxjsTrCyHFN53ky3wVsDkiMdVqylqRt+Zc+jm5qw7/qyOvN2dHSYtX0e4MbCCExSvnA==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.0.0.tgz", + "integrity": "sha512-CdVYz/Yuqw0VdKhXPBIgi8DO3NicJVYZNWeX9XcIuSp9ZoFT5IcleVRW07O5rMjdcx1mb+MEJPknTTEW7DdsYw==", "requires": { - "mdn-data": "2.0.6", + "mdn-data": "2.0.12", "source-map": "^0.6.1" } }, "mdn-data": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.6.tgz", - "integrity": "sha512-rQvjv71olwNHgiTbfPZFkJtjNMciWgswYeciZhtvWLO8bmX3TnhyA62I6sTWOyZssWHJJjY6/KiWwqQsWWsqOA==" + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.12.tgz", + "integrity": "sha512-ULbAlgzVb8IqZ0Hsxm6hHSlQl3Jckst2YEQS7fODu9ilNWy2LvcoSY7TRFIktABP2mdppBioc66va90T+NUs8Q==" } } }, @@ -4084,9 +4093,9 @@ "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" }, "electron-to-chromium": { - "version": "1.3.571", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.571.tgz", - "integrity": "sha512-UYEQ2Gtc50kqmyOmOVtj6Oqi38lm5yRJY3pLuWt6UIot0No1L09uu6Ja6/1XKwmz/p0eJFZTUZi+khd1PV1hHA==" + "version": "1.3.587", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.587.tgz", + "integrity": "sha512-8XFNxzNj0R8HpTQslWAw6UWpGSuOKSP3srhyFHVbGUGb8vTHckZGCyWi+iQlaXJx5DNeTQTQLd6xN11WSckkmA==" }, "elliptic": { "version": "6.5.3", @@ -4181,9 +4190,9 @@ } }, "entities": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/entities/-/entities-2.0.2.tgz", - "integrity": "sha512-dmD3AvJQBUjKpcNkoqr+x+IF0SdRtPz9Vk0uTy4yWqga9ibB6s4v++QFWNohjiUGoMlF552ZvNyXDxz5iW0qmw==" + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.1.0.tgz", + "integrity": "sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w==" }, "envify": { "version": "4.1.0", @@ -4216,20 +4225,19 @@ } }, "es-abstract": { - "version": "1.18.0-next.0", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.0.tgz", - "integrity": "sha512-elZXTZXKn51hUBdJjSZGYRujuzilgXo8vSPQzjGYXLvSlGiCo8VO8ZGV3kjo9a0WNJJ57hENagwbtlRuHuzkcQ==", + "version": "1.17.7", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.7.tgz", + "integrity": "sha512-VBl/gnfcJ7OercKA9MVaegWsBHFjV492syMudcnQZvt/Dw8ezpcOHYZXa/J96O8vx+g4x65YKhxOwDUh63aS5g==", "requires": { "es-to-primitive": "^1.2.1", "function-bind": "^1.1.1", "has": "^1.0.3", "has-symbols": "^1.0.1", - "is-callable": "^1.2.0", - "is-negative-zero": "^2.0.0", + "is-callable": "^1.2.2", "is-regex": "^1.1.1", "object-inspect": "^1.8.0", "object-keys": "^1.1.1", - "object.assign": "^4.1.0", + "object.assign": "^4.1.1", "string.prototype.trimend": "^1.0.1", "string.prototype.trimstart": "^1.0.1" } @@ -4250,9 +4258,9 @@ "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==" }, "escalade": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.0.tgz", - "integrity": "sha512-mAk+hPSO8fLDkhV7V0dXazH5pDc6MrjBTPyD3VeKzxnVFjH1MIxbCdqGZB9O8+EwWakZs3ZCbDS4IpRt79V1ig==" + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==" }, "escape-goat": { "version": "2.1.1", @@ -4839,20 +4847,30 @@ "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" }, "fuse.js": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/fuse.js/-/fuse.js-6.4.1.tgz", - "integrity": "sha512-+hAS7KYgLXontDh/vqffs7wIBw0ceb9Sx8ywZQhOsiQGcSO5zInGhttWOUYQYlvV/yYMJOacQ129Xs3mP3+oZQ==" + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/fuse.js/-/fuse.js-3.6.1.tgz", + "integrity": "sha512-hT9yh/tiinkmirKrlv4KWOjztdoZo1mx9Qh4KvWqC7isoXwdUY3PNWUxceF4/qO9R6riA2C29jdTOeQOIROjgw==" }, "gensync": { - "version": "1.0.0-beta.1", - "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.1.tgz", - "integrity": "sha512-r8EC6NO1sngH/zdD9fiRDLdcgnbayXah+mLgManTaIZJqEC1MZstmnox8KpnI2/fxQwrp5OpCOYWLp4rBl4Jcg==" + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==" }, "get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" }, + "get-intrinsic": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.0.1.tgz", + "integrity": "sha512-ZnWP+AmS1VUaLgTRy47+zKtjTxz+0xMpx3I52i+aalBK1QP19ggLF3Db89KJX7kjfOfP2eoa01qc++GwPgufPg==", + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1" + } + }, "get-stream": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", @@ -5339,9 +5357,9 @@ } }, "ieee754": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz", - "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==" + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" }, "iferr": { "version": "0.1.5", @@ -5440,14 +5458,6 @@ "ipaddr.js": "^1.9.0" } }, - "invariant": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", - "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", - "requires": { - "loose-envify": "^1.0.0" - } - }, "ip": { "version": "1.1.5", "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", @@ -5542,6 +5552,14 @@ "rgba-regex": "^1.0.0" } }, + "is-core-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.0.0.tgz", + "integrity": "sha512-jq1AH6C8MuteOoBPwkxHafmByhL9j5q4OaPGdbuD+ZtQJVzH+i6E3BJDQcBA09k57i2Hh2yQbEG8yObZ0jdlWw==", + "requires": { + "has": "^1.0.3" + } + }, "is-data-descriptor": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", @@ -5951,19 +5969,6 @@ "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=" }, - "leven": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", - "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==" - }, - "levenary": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/levenary/-/levenary-1.1.1.tgz", - "integrity": "sha512-mkAdOIt79FD6irqjYSs4rdbnlT5vRonMEvBVPVb3XmevfS8kgRXwfes0dhPdEtzTWD/1eNE/Bm/G1iRt6DcnQQ==", - "requires": { - "leven": "^3.1.0" - } - }, "linkify-it": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-2.2.0.tgz", @@ -6078,14 +6083,6 @@ "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=" }, - "loose-envify": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", - "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "requires": { - "js-tokens": "^3.0.0 || ^4.0.0" - } - }, "lower-case": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-1.1.4.tgz", @@ -6134,17 +6131,27 @@ } }, "markdown-it": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-11.0.1.tgz", - "integrity": "sha512-aU1TzmBKcWNNYvH9pjq6u92BML+Hz3h5S/QpfTFwiQF852pLT+9qHsrhM9JYipkOXZxGn+sGH8oyJE9FD9WezQ==", + "version": "12.0.2", + "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-12.0.2.tgz", + "integrity": "sha512-4Lkvjbv2kK+moL9TbeV+6/NHx+1Q+R/NIdUlFlkqkkzUcTod4uiyTJRiBidKR9qXSdkNFkgv+AELY8KN9vSgVA==", "requires": { - "argparse": "^1.0.7", + "argparse": "^2.0.1", "entities": "~2.0.0", "linkify-it": "^3.0.1", "mdurl": "^1.0.1", "uc.micro": "^1.0.5" }, "dependencies": { + "argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" + }, + "entities": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.0.3.tgz", + "integrity": "sha512-MyoZ0jgnLvB2X3Lg5HqpFmn1kybDiIfEQmKzTb5apr51Rb+T3KdmMiqa70T+bhGnyv7bQ6WMj2QMHpGMmlrUYQ==" + }, "linkify-it": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-3.0.2.tgz", @@ -6501,9 +6508,9 @@ "integrity": "sha1-iZ8R2WhuXgXLkbNdXw5jt3PPyQE=" }, "nan": { - "version": "2.14.1", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.1.tgz", - "integrity": "sha512-isWHgVjnFjh2x2yuJ/tj3JbwoHu3UC2dX5G/88Cm24yB6YopVgxvBObDY7n5xW6ExmFhJpSEQqFPvq9zaXc8Jw==", + "version": "2.14.2", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.2.tgz", + "integrity": "sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ==", "optional": true }, "nanomatch": { @@ -6638,9 +6645,9 @@ } }, "node-releases": { - "version": "1.1.61", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.61.tgz", - "integrity": "sha512-DD5vebQLg8jLCOzwupn954fbIiZht05DAZs0k2u8NStSe6h9XdsuIQL8hSRKYiU8WUQRznmSDrKGbv3ObOmC7g==" + "version": "1.1.65", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.65.tgz", + "integrity": "sha512-YpzJOe2WFIW0V4ZkJQd/DGR/zdVwc/pI4Nl1CZrBO19FdRcSTmsuhdttw9rsTzzJLrNcSloLiBbEYx1C4f6gpA==" }, "nopt": { "version": "1.0.10", @@ -6740,28 +6747,29 @@ "integrity": "sha512-jLdtEOB112fORuypAyl/50VRVIBIdVQOSUUGQHzJ4xBSbit81zRarz7GThkEFZy1RceYrWYcPcBFPQwHyAc1gA==" }, "object-is": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.2.tgz", - "integrity": "sha512-5lHCz+0uufF6wZ7CRFWJN3hp8Jqblpgve06U5CMQ3f//6iDjPr2PEo9MWCjEssDsa+UZEL4PkFpr+BMop6aKzQ==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.3.tgz", + "integrity": "sha512-teyqLvFWzLkq5B9ki8FVWA902UER2qkxmdA4nLf+wjOLAWgxzCWZNCxpDq9MvE8MmhWNr+I8w3BN49Vx36Y6Xg==", "requires": { "define-properties": "^1.1.3", - "es-abstract": "^1.17.5" + "es-abstract": "^1.18.0-next.1" }, "dependencies": { "es-abstract": { - "version": "1.17.6", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.6.tgz", - "integrity": "sha512-Fr89bON3WFyUi5EvAeI48QTWX0AyekGgLA8H+c+7fbfCkJwRWRMLd8CQedNEyJuoYYhmtEqY92pgte1FAhBlhw==", + "version": "1.18.0-next.1", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.1.tgz", + "integrity": "sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA==", "requires": { "es-to-primitive": "^1.2.1", "function-bind": "^1.1.1", "has": "^1.0.3", "has-symbols": "^1.0.1", - "is-callable": "^1.2.0", - "is-regex": "^1.1.0", - "object-inspect": "^1.7.0", + "is-callable": "^1.2.2", + "is-negative-zero": "^2.0.0", + "is-regex": "^1.1.1", + "object-inspect": "^1.8.0", "object-keys": "^1.1.1", - "object.assign": "^4.1.0", + "object.assign": "^4.1.1", "string.prototype.trimend": "^1.0.1", "string.prototype.trimstart": "^1.0.1" } @@ -6782,12 +6790,12 @@ } }, "object.assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.1.tgz", - "integrity": "sha512-VT/cxmx5yaoHSOTSyrCygIDFco+RsibY2NM0a4RdEeY/4KgqezwFtK1yr3U67xYhqJSlASm2pKhLVzPj2lr4bA==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", + "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", "requires": { + "call-bind": "^1.0.0", "define-properties": "^1.1.3", - "es-abstract": "^1.18.0-next.0", "has-symbols": "^1.0.1", "object-keys": "^1.1.1" } @@ -6799,26 +6807,6 @@ "requires": { "define-properties": "^1.1.3", "es-abstract": "^1.17.0-next.1" - }, - "dependencies": { - "es-abstract": { - "version": "1.17.6", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.6.tgz", - "integrity": "sha512-Fr89bON3WFyUi5EvAeI48QTWX0AyekGgLA8H+c+7fbfCkJwRWRMLd8CQedNEyJuoYYhmtEqY92pgte1FAhBlhw==", - "requires": { - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.2.0", - "is-regex": "^1.1.0", - "object-inspect": "^1.7.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.0", - "string.prototype.trimend": "^1.0.1", - "string.prototype.trimstart": "^1.0.1" - } - } } }, "object.pick": { @@ -6838,26 +6826,6 @@ "es-abstract": "^1.17.0-next.1", "function-bind": "^1.1.1", "has": "^1.0.3" - }, - "dependencies": { - "es-abstract": { - "version": "1.17.6", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.6.tgz", - "integrity": "sha512-Fr89bON3WFyUi5EvAeI48QTWX0AyekGgLA8H+c+7fbfCkJwRWRMLd8CQedNEyJuoYYhmtEqY92pgte1FAhBlhw==", - "requires": { - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.2.0", - "is-regex": "^1.1.0", - "object-inspect": "^1.7.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.0", - "string.prototype.trimend": "^1.0.1", - "string.prototype.trimstart": "^1.0.1" - } - } } }, "obuf": { @@ -7210,9 +7178,9 @@ "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=" }, "postcss": { - "version": "7.0.34", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.34.tgz", - "integrity": "sha512-H/7V2VeNScX9KE83GDrDZNiGT1m2H+UTnlinIzhjlLX9hfMUn1mHNnGeX81a1c8JSBdBvqk7c2ZOG6ZPn5itGw==", + "version": "7.0.35", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", + "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", "requires": { "chalk": "^2.4.2", "source-map": "^0.6.1", @@ -7230,9 +7198,9 @@ } }, "postcss-calc": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/postcss-calc/-/postcss-calc-7.0.4.tgz", - "integrity": "sha512-0I79VRAd1UTkaHzY9w83P39YGO/M3bG7/tNLrHGEunBolfoGM0hSjrGvjoeaj0JE/zIw5GsI2KZ0UwDJqv5hjw==", + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/postcss-calc/-/postcss-calc-7.0.5.tgz", + "integrity": "sha512-1tKHutbGtLtEZF6PT4JSihCHfIVldU72mZ8SdZHIYriIZ9fh9k9aWSppaT8rHsyI3dX+KSR+W+Ix9BMY3AODrg==", "requires": { "postcss": "^7.0.27", "postcss-selector-parser": "^6.0.2", @@ -7307,9 +7275,9 @@ } }, "postcss-load-config": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-2.1.1.tgz", - "integrity": "sha512-D2ENobdoZsW0+BHy4x1CAkXtbXtYWYRIxL/JbtRBqrRGOPtJ2zoga/bEZWhV/ShWB5saVxJMzbMdSyA/vv4tXw==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-2.1.2.tgz", + "integrity": "sha512-/rDeGV6vMUo3mwJZmeHfEDvwnTKKqQ0S7OHUi/kJvvtx3aWtyWG2/0ZWnzCt2keEclwN6Tf0DST2v9kITdOKYw==", "requires": { "cosmiconfig": "^5.0.0", "import-cwd": "^2.0.0" @@ -7707,9 +7675,9 @@ } }, "postcss-selector-parser": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.3.tgz", - "integrity": "sha512-0ClFaY4X1ra21LRqbW6y3rUbWcxnSVkDFG57R7Nxus9J9myPFlv+jYDMohzpkBx0RrjjiqjtycpchQ+PLGmZ9w==", + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.4.tgz", + "integrity": "sha512-gjMeXBempyInaBqpp8gODmwZ52WaYsVOsfr4L4lDQ7n3ncD6mEyySiDtgzCT+NYC0mmeOLvtsF8iaEf0YT6dBw==", "requires": { "cssesc": "^3.0.0", "indexes-of": "^1.0.1", @@ -7762,12 +7730,12 @@ "optional": true }, "pretty-error": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/pretty-error/-/pretty-error-2.1.1.tgz", - "integrity": "sha1-X0+HyPkeWuPzuoerTPXgOxoX8aM=", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/pretty-error/-/pretty-error-2.1.2.tgz", + "integrity": "sha512-EY5oDzmsX5wvuynAByrmY0P0hcp+QpnAKbJng2A2MPjVKXCxrDSUkzghVJ4ZGPIv+JC4gX8fPUWscC0RtjsWGw==", "requires": { - "renderkid": "^2.0.1", - "utila": "~0.4" + "lodash": "^4.17.20", + "renderkid": "^2.0.4" } }, "pretty-time": { @@ -7776,9 +7744,9 @@ "integrity": "sha512-28iF6xPQrP8Oa6uxE6a1biz+lWeTOAPKggvjB8HAs6nVMKZwf5bG++632Dx614hIWgUPkgivRfG+a8uAXGTIbA==" }, "prismjs": { - "version": "1.21.0", - "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.21.0.tgz", - "integrity": "sha512-uGdSIu1nk3kej2iZsLyDoJ7e9bnPzIgY0naW/HdknGj61zScaprVEVGHrPoXqI+M9sP0NDnTK2jpkvmldpuqDw==", + "version": "1.22.0", + "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.22.0.tgz", + "integrity": "sha512-lLJ/Wt9yy0AiSYBf212kK3mM5L8ycwlyTlSxHBAneXLR0nzFMlZ5y7riFPF3E33zXOF2IH95xdY5jIyZbM9z/w==", "requires": { "clipboard": "^2.0.0" } @@ -8008,9 +7976,9 @@ "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" }, "pupa": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pupa/-/pupa-2.0.1.tgz", - "integrity": "sha512-hEJH0s8PXLY/cdXh66tNEQGndDrIKNqNC5xmrysZy3i5C3oEoLna7YAOad+7u125+zH1HNXUmGEkrhb3c2VriA==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/pupa/-/pupa-2.1.1.tgz", + "integrity": "sha512-l1jNAspIBSFqbT+y+5FosojNpVpF94nlI+wDUpqP9enwOTfHx9f0gh5nB96vl+6yTpsJsypeNrwfzPrKuHB41A==", "requires": { "escape-goat": "^2.0.0" } @@ -8159,9 +8127,9 @@ } }, "regenerate": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.1.tgz", - "integrity": "sha512-j2+C8+NtXQgEKWk49MMP5P/u2GhnahTtVkRIHr5R5lVRlbKvmQ+oS+A5aLKWp2ma5VkT8sh6v+v4hbH0YHR66A==" + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", + "integrity": "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==" }, "regenerate-unicode-properties": { "version": "8.2.0", @@ -8219,26 +8187,6 @@ "requires": { "define-properties": "^1.1.3", "es-abstract": "^1.17.0-next.1" - }, - "dependencies": { - "es-abstract": { - "version": "1.17.6", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.6.tgz", - "integrity": "sha512-Fr89bON3WFyUi5EvAeI48QTWX0AyekGgLA8H+c+7fbfCkJwRWRMLd8CQedNEyJuoYYhmtEqY92pgte1FAhBlhw==", - "requires": { - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.2.0", - "is-regex": "^1.1.0", - "object-inspect": "^1.7.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.0", - "string.prototype.trimend": "^1.0.1", - "string.prototype.trimstart": "^1.0.1" - } - } } }, "regexpu-core": { @@ -8301,15 +8249,15 @@ "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=" }, "renderkid": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/renderkid/-/renderkid-2.0.3.tgz", - "integrity": "sha512-z8CLQp7EZBPCwCnncgf9C4XAi3WR0dv+uWu/PjIyhhAb5d6IJ/QZqlHFprHeKT+59//V6BNUsLbvN8+2LarxGA==", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/renderkid/-/renderkid-2.0.4.tgz", + "integrity": "sha512-K2eXrSOJdq+HuKzlcjOlGoOarUu5SDguDEhE7+Ah4zuOWL40j8A/oHvLlLob9PSTNvVnBd+/q0Er1QfpEuem5g==", "requires": { "css-select": "^1.1.0", "dom-converter": "^0.2", "htmlparser2": "^3.3.0", - "strip-ansi": "^3.0.0", - "utila": "^0.4.0" + "lodash": "^4.17.20", + "strip-ansi": "^3.0.0" } }, "repeat-element": { @@ -8372,10 +8320,11 @@ "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=" }, "resolve": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", - "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", + "version": "1.18.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.18.1.tgz", + "integrity": "sha512-lDfCPaMKfOJXjy0dPayzPdF1phampNWr3qFCjAu+rw/qbQmr5jWH5xN2hwh9QKfw9E5v4hwV7A+jrCmL8yjjqA==", "requires": { + "is-core-module": "^2.0.0", "path-parse": "^1.0.6" } }, @@ -9201,28 +9150,29 @@ } }, "string.prototype.trimend": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz", - "integrity": "sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.2.tgz", + "integrity": "sha512-8oAG/hi14Z4nOVP0z6mdiVZ/wqjDtWSLygMigTzAb+7aPEDTleeFf+WrF+alzecxIRkckkJVn+dTlwzJXORATw==", "requires": { "define-properties": "^1.1.3", - "es-abstract": "^1.17.5" + "es-abstract": "^1.18.0-next.1" }, "dependencies": { "es-abstract": { - "version": "1.17.6", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.6.tgz", - "integrity": "sha512-Fr89bON3WFyUi5EvAeI48QTWX0AyekGgLA8H+c+7fbfCkJwRWRMLd8CQedNEyJuoYYhmtEqY92pgte1FAhBlhw==", + "version": "1.18.0-next.1", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.1.tgz", + "integrity": "sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA==", "requires": { "es-to-primitive": "^1.2.1", "function-bind": "^1.1.1", "has": "^1.0.3", "has-symbols": "^1.0.1", - "is-callable": "^1.2.0", - "is-regex": "^1.1.0", - "object-inspect": "^1.7.0", + "is-callable": "^1.2.2", + "is-negative-zero": "^2.0.0", + "is-regex": "^1.1.1", + "object-inspect": "^1.8.0", "object-keys": "^1.1.1", - "object.assign": "^4.1.0", + "object.assign": "^4.1.1", "string.prototype.trimend": "^1.0.1", "string.prototype.trimstart": "^1.0.1" } @@ -9230,28 +9180,29 @@ } }, "string.prototype.trimstart": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz", - "integrity": "sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.2.tgz", + "integrity": "sha512-7F6CdBTl5zyu30BJFdzSTlSlLPwODC23Od+iLoVH8X6+3fvDPPuBVVj9iaB1GOsSTSIgVfsfm27R2FGrAPznWg==", "requires": { "define-properties": "^1.1.3", - "es-abstract": "^1.17.5" + "es-abstract": "^1.18.0-next.1" }, "dependencies": { "es-abstract": { - "version": "1.17.6", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.6.tgz", - "integrity": "sha512-Fr89bON3WFyUi5EvAeI48QTWX0AyekGgLA8H+c+7fbfCkJwRWRMLd8CQedNEyJuoYYhmtEqY92pgte1FAhBlhw==", + "version": "1.18.0-next.1", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.1.tgz", + "integrity": "sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA==", "requires": { "es-to-primitive": "^1.2.1", "function-bind": "^1.1.1", "has": "^1.0.3", "has-symbols": "^1.0.1", - "is-callable": "^1.2.0", - "is-regex": "^1.1.0", - "object-inspect": "^1.7.0", + "is-callable": "^1.2.2", + "is-negative-zero": "^2.0.0", + "is-regex": "^1.1.1", + "object-inspect": "^1.8.0", "object-keys": "^1.1.1", - "object.assign": "^4.1.0", + "object.assign": "^4.1.1", "string.prototype.trimend": "^1.0.1", "string.prototype.trimstart": "^1.0.1" } @@ -9388,9 +9339,9 @@ } }, "css-what": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/css-what/-/css-what-3.3.0.tgz", - "integrity": "sha512-pv9JPyatiPaQ6pf4OvD/dbfm0o5LviWmwxNWzblYf/1u9QZd0ihV+PMwy5jdQWQ3349kZmKEx9WXuSka2dM4cg==" + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-3.4.2.tgz", + "integrity": "sha512-ACUm3L0/jiZTqfzRM3Hi9Q8eZqd6IK37mMWPLz9PJxkLWllYeRf+EHUSHYEtFop2Eqytaq1FizFVh7XfBnXCDQ==" }, "domutils": { "version": "1.7.0", @@ -9417,9 +9368,9 @@ "integrity": "sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA==" }, "term-size": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/term-size/-/term-size-2.2.0.tgz", - "integrity": "sha512-a6sumDlzyHVJWb8+YofY4TW112G6p2FCPEAFk+59gIYHv3XHRhm9ltVQ9kli4hNWeQBwSpe8cRN25x0ROunMOw==" + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/term-size/-/term-size-2.2.1.tgz", + "integrity": "sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg==" }, "terser": { "version": "4.8.0", @@ -9520,9 +9471,9 @@ "integrity": "sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==" }, "timers-browserify": { - "version": "2.0.11", - "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.11.tgz", - "integrity": "sha512-60aV6sgJ5YEbzUdn9c8kYGIqOubPoUdqQCul3SBAsRCZ40s6Y5cMcrW4dt3/k/EsbLVJNl9n6Vz3fTc+k2GeKQ==", + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.12.tgz", + "integrity": "sha512-9phl76Cqm6FhSX9Xe1ZUAMLtm1BLkKj2Qd5ApyWkXzsMRaA7dgr81kf4wJmQf/hAvg8EEyJxDo3du/0KlhPiKQ==", "requires": { "setimmediate": "^1.0.4" } @@ -9658,9 +9609,9 @@ } }, "tslib": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.13.0.tgz", - "integrity": "sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q==" + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" }, "tty-browserify": { "version": "0.0.0", @@ -9861,9 +9812,9 @@ "integrity": "sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==" }, "update-notifier": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-4.1.1.tgz", - "integrity": "sha512-9y+Kds0+LoLG6yN802wVXoIfxYEwh3FlZwzMwpCZp62S2i1/Jzeqb9Eeeju3NSHccGGasfGlK5/vEHbAifYRDg==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-4.1.3.tgz", + "integrity": "sha512-Yld6Z0RyCYGB6ckIjffGOSOmHXj1gMeE7aROz4MG+XMkmixBX4jUngrGXNYz7wPKBmtoD4MnBa2Anu7RSKht/A==", "requires": { "boxen": "^4.2.0", "chalk": "^3.0.0", @@ -9881,11 +9832,10 @@ }, "dependencies": { "ansi-styles": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", - "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "requires": { - "@types/color-name": "^1.1.1", "color-convert": "^2.0.1" } }, @@ -10033,26 +9983,6 @@ "es-abstract": "^1.17.2", "has-symbols": "^1.0.1", "object.getownpropertydescriptors": "^2.1.0" - }, - "dependencies": { - "es-abstract": { - "version": "1.17.6", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.6.tgz", - "integrity": "sha512-Fr89bON3WFyUi5EvAeI48QTWX0AyekGgLA8H+c+7fbfCkJwRWRMLd8CQedNEyJuoYYhmtEqY92pgte1FAhBlhw==", - "requires": { - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.2.0", - "is-regex": "^1.1.0", - "object-inspect": "^1.7.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.0", - "string.prototype.trimend": "^1.0.1", - "string.prototype.trimstart": "^1.0.1" - } - } } }, "utila": { @@ -10116,9 +10046,9 @@ "integrity": "sha512-BXq3jwIagosjgNVae6tkHzzIk6a8MHFtzAdwhnV5VlvPTFxDCvIttgSiHWjdGoTJvXtmRu5HacExfdarRcFhog==" }, "vue-loader": { - "version": "15.9.3", - "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-15.9.3.tgz", - "integrity": "sha512-Y67VnGGgVLH5Voostx8JBZgPQTlDQeOVBLOEsjc2cXbCYBKexSKEpOA56x0YZofoDOTszrLnIShyOX1p9uCEHA==", + "version": "15.9.5", + "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-15.9.5.tgz", + "integrity": "sha512-oeMOs2b5o5gRqkxfds10bCx6JeXYTwivRgbb8hzOrcThD2z1+GqEKE3EX9A2SGbsYDf4rXwRg6D5n1w0jO5SwA==", "requires": { "@vue/component-compiler-utils": "^3.1.0", "hash-sum": "^1.0.2", @@ -10128,9 +10058,9 @@ } }, "vue-router": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/vue-router/-/vue-router-3.4.3.tgz", - "integrity": "sha512-BADg1mjGWX18Dpmy6bOGzGNnk7B/ZA0RxuA6qedY/YJwirMfKXIDzcccmHbQI0A6k5PzMdMloc0ElHfyOoX35A==" + "version": "3.4.8", + "resolved": "https://registry.npmjs.org/vue-router/-/vue-router-3.4.8.tgz", + "integrity": "sha512-3BsR84AqarcmweXjItxw3jwQsiYNssYg090yi4rlzTnCJxmHtkyCvhNz9Z7qRSOkmiV485KkUCReTp5AjNY4wg==" }, "vue-server-renderer": { "version": "2.6.12", @@ -10208,12 +10138,12 @@ "integrity": "sha512-4gDntzrifFnCEvyoO8PqyJDmguXgVPxKiIxrBKjIowvL9l+N66196+72XVYR8BBf1Uv1Fgt3bGevJ+sEmxfZzw==" }, "vuepress": { - "version": "1.5.4", - "resolved": "https://registry.npmjs.org/vuepress/-/vuepress-1.5.4.tgz", - "integrity": "sha512-F25r65BzxDFAJmWIN9s9sQSndLIf1ldAKEwkeXCqE4p2lsx/eVvQJL3DzOeeR2WgCFOkhFMKWIV+CthTGdNTZg==", + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/vuepress/-/vuepress-1.7.1.tgz", + "integrity": "sha512-AdA3do1L4DNzeF8sMTE+cSUJ5hR/6f3YujU8DVowi/vFOg/SX2lJF8urvDkZUSXzaAT6aSgkI9L+B6D+i7SJjA==", "requires": { - "@vuepress/core": "1.5.4", - "@vuepress/theme-default": "1.5.4", + "@vuepress/core": "1.7.1", + "@vuepress/theme-default": "1.7.1", "cac": "^6.5.6", "envinfo": "^7.2.0", "opencollective-postinstall": "^2.0.2", @@ -10297,23 +10227,22 @@ } }, "vuepress-theme-cosmos": { - "version": "1.0.173", - "resolved": "https://registry.npmjs.org/vuepress-theme-cosmos/-/vuepress-theme-cosmos-1.0.173.tgz", - "integrity": "sha512-f2VhR7iE5bvoyqO6Y6QAHsIfQaI1t2UJx2ZH+M0v0VWHQEa34A8GqynYsjtMevkbHlE6ffuMT6haeHnp5cSeGA==", + "version": "1.0.175", + "resolved": "https://registry.npmjs.org/vuepress-theme-cosmos/-/vuepress-theme-cosmos-1.0.175.tgz", + "integrity": "sha512-QwVVaU1cMEl+j11trOEp2Vw+C3TAU+DQQIK4rcezHwMCsIYm9Wj4yDhz6rZVYd/Rg+KaCgZ1OCiZlcH/CXdu2A==", "requires": { "@cosmos-ui/vue": "^0.35.0", - "@vuepress/plugin-google-analytics": "1.5.4", + "@vuepress/plugin-google-analytics": "1.7.1", "algoliasearch": "^4.2.0", - "axios": "^0.20.0", + "axios": "^0.21.0", "cheerio": "^1.0.0-rc.3", "clipboard-copy": "^3.1.0", - "entities": "2.0.2", + "entities": "2.1.0", "esm": "^3.2.25", - "fuse.js": "6.4.1", "gray-matter": "^4.0.2", "hotkeys-js": "3.8.1", "jsonp": "^0.2.1", - "markdown-it": "^11.0.1", + "markdown-it": "^12.0.0", "markdown-it-attrs": "^3.0.3", "prismjs": "^1.21.0", "pug": "^2.0.4", @@ -10363,9 +10292,9 @@ } }, "chokidar": { - "version": "3.4.2", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.4.2.tgz", - "integrity": "sha512-IZHaDeBeI+sZJRX7lGcXsdzgvZqKv6sECqsbErJA4mHWfpRrD8B97kSFN4cQz6nGBGiuFia1MKR4d6c1o8Cv7A==", + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.4.3.tgz", + "integrity": "sha512-DtM3g7juCXQxFVSNPNByEC2+NImtBuxQQvWlHunpJIS5Ocr0lG306cC7FCi7cEA0fzmybPUIl4txBIobk1gGOQ==", "optional": true, "requires": { "anymatch": "~3.1.1", @@ -10375,7 +10304,7 @@ "is-binary-path": "~2.1.0", "is-glob": "~4.0.1", "normalize-path": "~3.0.0", - "readdirp": "~3.4.0" + "readdirp": "~3.5.0" } }, "fill-range": { @@ -10418,9 +10347,9 @@ "optional": true }, "readdirp": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.4.0.tgz", - "integrity": "sha512-0xe001vZBnJEK+uKcj8qOhyAKPzIT+gStxWr3LCB0DwcXR5NZJ3IaC+yGnHCYzB/S7ov3m3EEbZI2zeNvX+hGQ==", + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.5.0.tgz", + "integrity": "sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ==", "optional": true, "requires": { "picomatch": "^2.2.1" @@ -10490,9 +10419,9 @@ }, "dependencies": { "acorn": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.1.tgz", - "integrity": "sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA==" + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.2.tgz", + "integrity": "sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ==" }, "mkdirp": { "version": "0.5.5", diff --git a/docs/package.json b/docs/package.json index a72206c932..3b3fa4b1fc 100644 --- a/docs/package.json +++ b/docs/package.json @@ -14,6 +14,6 @@ "author": "", "license": "ISC", "dependencies": { - "vuepress-theme-cosmos": "^1.0.173" + "vuepress-theme-cosmos": "^1.0.175" } } From 286e9bfbefabe215da11b27ca7e41f72c28bedbb Mon Sep 17 00:00:00 2001 From: SaReN Date: Wed, 4 Nov 2020 15:28:11 +0530 Subject: [PATCH 043/136] Remove duplicate tx commands for auth (#7788) * remove duplicate commands * add changelog Co-authored-by: Alessio Treglia --- CHANGELOG.md | 1 + x/auth/client/cli/tx.go | 26 -------------------------- x/auth/module.go | 2 +- 3 files changed, 2 insertions(+), 27 deletions(-) delete mode 100644 x/auth/client/cli/tx.go diff --git a/CHANGELOG.md b/CHANGELOG.md index 9ddba54527..01067c692c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -41,6 +41,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### Client Breaking * (x/upgrade) [#7697](https://github.com/cosmos/cosmos-sdk/pull/7697) Rename flag name "--time" to "--upgrade-time", "--info" to "--upgrade-info", to keep it consistent with help message. +* (x/auth) [#7788](https://github.com/cosmos/cosmos-sdk/pull/7788) Remove `tx auth` subcommands, all auth subcommands exist as `tx ` ### API Breaking diff --git a/x/auth/client/cli/tx.go b/x/auth/client/cli/tx.go deleted file mode 100644 index 42b20ae8d5..0000000000 --- a/x/auth/client/cli/tx.go +++ /dev/null @@ -1,26 +0,0 @@ -package cli - -import ( - "github.com/spf13/cobra" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/x/auth/types" -) - -// GetTxCmd returns the transaction commands for this module -func GetTxCmd() *cobra.Command { - txCmd := &cobra.Command{ - Use: types.ModuleName, - Short: "Auth transaction subcommands", - DisableFlagParsing: true, - SuggestionsMinimumDistance: 2, - RunE: client.ValidateCmd, - } - txCmd.AddCommand( - GetMultiSignCommand(), - GetSignCommand(), - GetValidateSignaturesCommand(), - GetSignBatchCommand(), - ) - return txCmd -} diff --git a/x/auth/module.go b/x/auth/module.go index 098dd774ee..0c6b1fa832 100644 --- a/x/auth/module.go +++ b/x/auth/module.go @@ -72,7 +72,7 @@ func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *r // GetTxCmd returns the root tx command for the auth module. func (AppModuleBasic) GetTxCmd() *cobra.Command { - return cli.GetTxCmd() + return nil } // GetQueryCmd returns the root query command for the auth module. From 432afb274b43e72f87a59d04b5d322ebe31fc0c8 Mon Sep 17 00:00:00 2001 From: Aditya Date: Wed, 4 Nov 2020 12:16:20 +0000 Subject: [PATCH 044/136] ibc: minor fixes from audit (#7807) --- x/ibc/core/04-channel/keeper/handshake.go | 22 +++++++++++++--------- x/ibc/core/04-channel/types/msgs.go | 14 +++++++++++++- x/ibc/core/04-channel/types/msgs_test.go | 8 ++++++++ 3 files changed, 34 insertions(+), 10 deletions(-) diff --git a/x/ibc/core/04-channel/keeper/handshake.go b/x/ibc/core/04-channel/keeper/handshake.go index 03b100be7a..75b0c1bd3d 100644 --- a/x/ibc/core/04-channel/keeper/handshake.go +++ b/x/ibc/core/04-channel/keeper/handshake.go @@ -14,18 +14,22 @@ import ( // CounterpartyHops returns the connection hops of the counterparty channel. // The counterparty hops are stored in the inverse order as the channel's. +// NOTE: Since connectionHops only supports single connection channels for now, +// this function requires that connection hops only contain a single connection id func (k Keeper) CounterpartyHops(ctx sdk.Context, ch types.Channel) ([]string, bool) { - counterPartyHops := make([]string, len(ch.ConnectionHops)) - - for i, hop := range ch.ConnectionHops { - conn, found := k.connectionKeeper.GetConnection(ctx, hop) - if !found { - return []string{}, false - } - - counterPartyHops[len(counterPartyHops)-1-i] = conn.GetCounterparty().GetConnectionID() + // Return empty array if connection hops is more than one + // ConnectionHops length should be verified earlier + if len(ch.ConnectionHops) != 1 { + return []string{}, false + } + counterPartyHops := make([]string, 1) + hop := ch.ConnectionHops[0] + conn, found := k.connectionKeeper.GetConnection(ctx, hop) + if !found { + return []string{}, false } + counterPartyHops[0] = conn.GetCounterparty().GetConnectionID() return counterPartyHops, true } diff --git a/x/ibc/core/04-channel/types/msgs.go b/x/ibc/core/04-channel/types/msgs.go index ed29cc24ff..96a4283d8f 100644 --- a/x/ibc/core/04-channel/types/msgs.go +++ b/x/ibc/core/04-channel/types/msgs.go @@ -46,6 +46,12 @@ func (msg MsgChannelOpenInit) ValidateBasic() error { if err := host.ChannelIdentifierValidator(msg.ChannelId); err != nil { return sdkerrors.Wrap(err, "invalid channel ID") } + if msg.Channel.State != INIT { + return sdkerrors.Wrapf(ErrInvalidChannelState, + "channel state must be INIT in MsgChannelOpenInit. expected: %s, got: %s", + INIT, msg.Channel.State, + ) + } _, err := sdk.AccAddressFromBech32(msg.Signer) if err != nil { return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "string could not be parsed as address: %v", err) @@ -78,7 +84,7 @@ func NewMsgChannelOpenTry( proofInit []byte, proofHeight clienttypes.Height, signer sdk.AccAddress, ) *MsgChannelOpenTry { counterparty := NewCounterparty(counterpartyPortID, counterpartyChannelID) - channel := NewChannel(INIT, channelOrder, counterparty, connectionHops, version) + channel := NewChannel(TRYOPEN, channelOrder, counterparty, connectionHops, version) return &MsgChannelOpenTry{ PortId: portID, DesiredChannelId: desiredChannelID, @@ -118,6 +124,12 @@ func (msg MsgChannelOpenTry) ValidateBasic() error { if msg.ProofHeight.IsZero() { return sdkerrors.Wrap(sdkerrors.ErrInvalidHeight, "proof height must be non-zero") } + if msg.Channel.State != TRYOPEN { + return sdkerrors.Wrapf(ErrInvalidChannelState, + "channel state must be TRYOPEN in MsgChannelOpenTry. expected: %s, got: %s", + TRYOPEN, msg.Channel.State, + ) + } _, err := sdk.AccAddressFromBech32(msg.Signer) if err != nil { return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "string could not be parsed as address: %v", err) diff --git a/x/ibc/core/04-channel/types/msgs_test.go b/x/ibc/core/04-channel/types/msgs_test.go index c7c1bbb4ba..9cf466840c 100644 --- a/x/ibc/core/04-channel/types/msgs_test.go +++ b/x/ibc/core/04-channel/types/msgs_test.go @@ -105,6 +105,9 @@ func TestTypesTestSuite(t *testing.T) { } func (suite *TypesTestSuite) TestMsgChannelOpenInitValidateBasic() { + counterparty := types.NewCounterparty(cpportid, cpchanid) + tryOpenChannel := types.NewChannel(types.TRYOPEN, types.ORDERED, counterparty, connHops, version) + testCases := []struct { name string msg *types.MsgChannelOpenInit @@ -125,6 +128,7 @@ func (suite *TypesTestSuite) TestMsgChannelOpenInitValidateBasic() { {"", types.NewMsgChannelOpenInit(portid, chanid, "", types.UNORDERED, connHops, cpportid, cpchanid, addr), true}, {"invalid counterparty port id", types.NewMsgChannelOpenInit(portid, chanid, version, types.UNORDERED, connHops, invalidPort, cpchanid, addr), false}, {"invalid counterparty channel id", types.NewMsgChannelOpenInit(portid, chanid, version, types.UNORDERED, connHops, cpportid, invalidChannel, addr), false}, + {"channel not in INIT state", &types.MsgChannelOpenInit{portid, chanid, tryOpenChannel, addr.String()}, false}, } for _, tc := range testCases { @@ -142,6 +146,9 @@ func (suite *TypesTestSuite) TestMsgChannelOpenInitValidateBasic() { } func (suite *TypesTestSuite) TestMsgChannelOpenTryValidateBasic() { + counterparty := types.NewCounterparty(cpportid, cpchanid) + initChannel := types.NewChannel(types.INIT, types.ORDERED, counterparty, connHops, version) + testCases := []struct { name string msg *types.MsgChannelOpenTry @@ -167,6 +174,7 @@ func (suite *TypesTestSuite) TestMsgChannelOpenTryValidateBasic() { {"empty proof", types.NewMsgChannelOpenTry(portid, chanid, chanid, version, types.UNORDERED, connHops, cpportid, cpchanid, version, emptyProof, height, addr), false}, {"valid empty proved channel id", types.NewMsgChannelOpenTry(portid, chanid, "", version, types.ORDERED, connHops, cpportid, cpchanid, version, suite.proof, height, addr), true}, {"invalid proved channel id, doesn't match channel id", types.NewMsgChannelOpenTry(portid, chanid, "differentchannel", version, types.ORDERED, connHops, cpportid, cpchanid, version, suite.proof, height, addr), false}, + {"channel not in TRYOPEN state", &types.MsgChannelOpenTry{portid, chanid, chanid, initChannel, version, suite.proof, height, addr.String()}, false}, } for _, tc := range testCases { From f87e7b321f62e15c9b092a99dffaac65dbcd16a6 Mon Sep 17 00:00:00 2001 From: Alessio Treglia Date: Wed, 4 Nov 2020 13:11:45 +0000 Subject: [PATCH 045/136] append -json to go test -race (#7800) Co-authored-by: SaReN --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 82003294f4..4c81b22003 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -180,7 +180,7 @@ jobs: if: env.GIT_DIFF - name: test & coverage report creation run: | - cat pkgs.txt.part.${{ matrix.part }} | xargs go test -mod=readonly -timeout 30m -race -tags='cgo ledger test_ledger_mock' > ${{ matrix.part }}-race-output.txt + cat pkgs.txt.part.${{ matrix.part }} | xargs go test -mod=readonly -json -timeout 30m -race -tags='cgo ledger test_ledger_mock' > ${{ matrix.part }}-race-output.txt if: env.GIT_DIFF - uses: actions/upload-artifact@v2 with: From 71166c894920f52d3ac93387b3f8b2865457a092 Mon Sep 17 00:00:00 2001 From: Amaury Martiny Date: Wed, 4 Nov 2020 15:02:22 +0100 Subject: [PATCH 046/136] docs: Add new section "Running a Node" (#7701) * docs: Add new section "Running a Node" * Add running-node * Add docker compose * Update title * Typos * Wording * Fix links * Update docs/run-node/keyring.md Co-authored-by: Cory * Update docs/run-node/run-node.md Co-authored-by: Robert Zaremba * Address reviews * rc2 * Update docs/run-node/keyring.md Co-authored-by: Cory * Address more comments * Reviews * Fix run node * Fix todo Co-authored-by: Cory Co-authored-by: Robert Zaremba Co-authored-by: Alessio Treglia --- crypto/keyring/doc.go | 2 +- docs/interfaces/README.md | 3 +- docs/run-node/README.md | 13 ++ docs/run-node/interact-node.md | 46 +++++++ docs/{interfaces => run-node}/keyring.md | 63 ++++++--- docs/run-node/run-node.md | 90 +++++++++++++ docs/using-the-sdk/quick-start.md | 160 ----------------------- 7 files changed, 198 insertions(+), 179 deletions(-) create mode 100644 docs/run-node/README.md create mode 100644 docs/run-node/interact-node.md rename docs/{interfaces => run-node}/keyring.md (54%) create mode 100644 docs/run-node/run-node.md delete mode 100644 docs/using-the-sdk/quick-start.md diff --git a/crypto/keyring/doc.go b/crypto/keyring/doc.go index 0a76866e4b..04a8b98cdf 100644 --- a/crypto/keyring/doc.go +++ b/crypto/keyring/doc.go @@ -32,7 +32,7 @@ // that the keyring keyring may be kept unlocked for the whole duration of the user // session. // file This backend more closely resembles the previous keyring storage used prior to -// v0.38.1. It stores the keyring encrypted within the apps configuration directory. +// v0.38.1. It stores the keyring encrypted within the app's configuration directory. // This keyring will request a password each time it is accessed, which may occur // multiple times in a single command resulting in repeated password prompts. // kwallet This backend uses KDE Wallet Manager as a credentials management application: diff --git a/docs/interfaces/README.md b/docs/interfaces/README.md index ea94cb9a6f..287045901c 100644 --- a/docs/interfaces/README.md +++ b/docs/interfaces/README.md @@ -1,7 +1,7 @@ # Interfaces @@ -12,4 +12,3 @@ This repository contains documentation on interfaces for Cosmos SDK applications 2. [Lifecycle of a Query](./query-lifecycle.md) 3. [Command-Line Interface](./cli.md) 4. [Rest Interface](./rest.md) - diff --git a/docs/run-node/README.md b/docs/run-node/README.md new file mode 100644 index 0000000000..dbc6e284a2 --- /dev/null +++ b/docs/run-node/README.md @@ -0,0 +1,13 @@ + + +# Running a Node + +This folder contains documentation on how to run a node and interact with it. + +1. [Setting up the keyring](./keyring.md) +2. [Running a Node](./run-node.md) +3. [Interacting with a Node](./interact-node.md) diff --git a/docs/run-node/interact-node.md b/docs/run-node/interact-node.md new file mode 100644 index 0000000000..40cb58424b --- /dev/null +++ b/docs/run-node/interact-node.md @@ -0,0 +1,46 @@ + + +# Interacting with the Node + +## Pre-requisite Readings + +- [Running a Node](./run-node.md) {prereq} + +## Via CLI + +Now that your chain is running, it is time to try sending tokens from the first account you created to a second account. In a new terminal window, start by running the following query command: + +```bash +simd query account $MY_VALIDATOR_ADDRESS --chain-id my-test-chain +``` + +You should see the current balance of the account you created, equal to the original balance of `stake` you granted it minus the amount you delegated via the `gentx`. Now, create a second account: + +```bash +simd keys add recipient + +# Put the generated address in a variable for later use. +RECIPIENT=$(simd keys show recipient -a) +``` + +The command above creates a local key-pair that is not yet registered on the chain. An account is created the first time it receives tokens from another account. Now, run the following command to send tokens to the `recipient` account: + +```bash +simd tx send $MY_VALIDATOR_ADDRESS $RECIPIENT 1000stake --chain-id my-test-chain + +# Check that the recipient account did receive the tokens. +simd query account $RECIPIENT --chain-id my-test-chain +``` + +Finally, delegate some of the stake tokens sent to the `recipient` account to the validator: + +```bash +simd tx staking delegate $(simd keys show my_validator --bech val -a) 500stake --from recipient --chain-id my-test-chain + +# Query the total delegations to `validator`. +simd query staking delegations-to $(simd keys show my_validator --bech val -a) --chain-id my-test-chain +``` + +You should see two delegations, the first one made from the `gentx`, and the second one you just performed from the `recipient` account. diff --git a/docs/interfaces/keyring.md b/docs/run-node/keyring.md similarity index 54% rename from docs/interfaces/keyring.md rename to docs/run-node/keyring.md index a4076cd62f..c32b8dd938 100644 --- a/docs/interfaces/keyring.md +++ b/docs/run-node/keyring.md @@ -1,28 +1,32 @@ -# The keyring +# Setting up the keyring -This document describes how to configure and use the keyring and its various backends for an [**application**](../basics/app-anatomy.md). A separate document for implementing a CLI for an SDK [**module**](../building-modules/intro.md) can be found [here](#../building-modules/module-interfaces.md#cli). {synopsis} +This document describes how to configure and use the keyring and its various backends for an [**application**](../basics/app-anatomy.md). {synopsis} + +The keyring holds the private/public keypairs used to interact with a node. For instance, a validator key needs to be set up before running the blockchain node, so that blocks can be correctly signed. The private key can be stored in different locations, called "backends", such as a file or the operating system's own key storage. + +## Available backends for the keyring Starting with the v0.38.0 release, Cosmos SDK comes with a new keyring implementation that provides a set of commands to manage cryptographic keys in a secure fashion. The new keyring supports multiple storage backends, some of which may not be available on all operating systems. -## The `os` backend +### The `os` backend The `os` backend relies on operating system-specific defaults to handle key storage -securely. Typically, operating systems credentials sub-systems handle passwords prompt, -private keys storage, and user sessions according to their users password policies. Here +securely. Typically, an operating system's credential sub-system handles password prompts, +private keys storage, and user sessions according to the user's password policies. Here is a list of the most popular operating systems and their respective passwords manager: -* macOS (since Mac OS 8.6): [Keychain](https://support.apple.com/en-gb/guide/keychain-access/welcome/mac) -* Windows: [Credentials Management API](https://docs.microsoft.com/en-us/windows/win32/secauthn/credentials-management) -* GNU/Linux: - * [libsecret](https://gitlab.gnome.org/GNOME/libsecret) - * [kwallet](https://api.kde.org/frameworks/kwallet/html/index.html) +- macOS (since Mac OS 8.6): [Keychain](https://support.apple.com/en-gb/guide/keychain-access/welcome/mac) +- Windows: [Credentials Management API](https://docs.microsoft.com/en-us/windows/win32/secauthn/credentials-management) +- GNU/Linux: + - [libsecret](https://gitlab.gnome.org/GNOME/libsecret) + - [kwallet](https://api.kde.org/frameworks/kwallet/html/index.html) GNU/Linux distributions that use GNOME as default desktop environment typically come with [Seahorse](https://wiki.gnome.org/Apps/Seahorse). Users of KDE based distributions are @@ -34,10 +38,10 @@ client. designed to meet users' most common needs and provide them with a comfortable experience without compromising on security. -## The `file` backend +### The `file` backend The `file` backend more closely resembles the keybase implementation used prior to -v0.38.1. It stores the keyring encrypted within the apps configuration directory. This +v0.38.1. It stores the keyring encrypted within the app's configuration directory. This keyring will request a password each time it is accessed, which may occur multiple times in a single command resulting in repeated password prompts. If using bash scripts to execute commands using the `file` option you may want to utilize the following format @@ -54,7 +58,7 @@ $ echo $KEYPASSWD | gaiacli keys show me # single promp The first time you add a key to an empty keyring, you will be prompted to type the password twice. ::: -## The `pass` backend +### The `pass` backend The `pass` backend uses the [pass](https://www.passwordstore.org/) utility to manage on-disk encryption of keys' sensitive data and metadata. Keys are stored inside `gpg` encrypted files @@ -78,15 +82,42 @@ $ pass init Replace `` with your GPG key ID. You can use your personal GPG key or an alternative one you may want to use specifically to encrypt the password store. -## The `test` backend +### The `test` backend The `test` backend is a password-less variation of the `file` backend. Keys are stored unencrypted on disk. This backend is meant for testing purposes only and **should never be used in production environments**. -## The `kwallet` backend +### The `kwallet` backend The `kwallet` backend uses `KDE Wallet Manager`, which comes installed by default on the GNU/Linux distributions that ships KDE as default desktop environment. Please refer to [KWallet Handbook](https://docs.kde.org/stable5/en/kdeutils/kwallet5/index.html) for more information. + +## Adding keys to the keyring + +::: warning +Make sure you can build your own binary, and replace `simd` with the name of your binary in the snippets. +::: + +Applications developed using the Cosmos SDK come with the `keys` subcommand. For the purpose of this tutorial, we're running the `simd` CLI, which is an application built using the Cosmos SDK for testing and educational purposes. For more information, see [`simapp`](https://github.com/cosmos/cosmos-sdk/tree/v0.40.0-rc2/simapp). + +You can use `simd keys` for help about the keys command and `simd keys [command] --help` for more information about a particular subcommand. + +::: tip +You can also enable auto-completion with the `simd completion` command. For example, at the start of a bash session, run `. <(simd completion)`, and all `simd` subcommands will be auto-completed. +::: + +To create a new key in the keyring, run the `add` subcommand with a `` argument. For the purpose of this tutorial, we will solely use the `test` backend, and call our new key `my_validator`. This key will be used in the next section. + +```bash +$ simd keys add my_validator --keyring-backend test + +# Put the generated address in a variable for later use. +MY_VALIDATOR_ADDRESS=$(simd keys show my_validator -a) +``` + +This command generates a new 24-word mnemonic phrase, persists it to the relevant backend, and outputs information about the keypair. If this keypair will be used to hold value-bearing tokens, be sure to write down the mnemonic phrase somewhere safe! + +By default, the keyring generates a `secp256k1` keypair. The keyring also supports `ed25519` keys, which may be created by passing the `--algo ed25519` flag. A keyring can of course hold both types of keys simultaneously, and the Cosmos SDK's `x/auth` module (in particular its [AnteHandlers](../core/baseapp.md#antehandler)) supports natively these two public key algorithms. diff --git a/docs/run-node/run-node.md b/docs/run-node/run-node.md new file mode 100644 index 0000000000..cda14436ef --- /dev/null +++ b/docs/run-node/run-node.md @@ -0,0 +1,90 @@ + + +# Running a Node + +Now that the application is ready and the keyring populated, it's time to see how to run the blockchain node. In this section, the application we are running is called [`simapp`](https://github.com/cosmos/cosmos-sdk/tree/v0.40.0-rc2/simapp), and its corresponding CLI binary `simd`. {synopsis} + +## Pre-requisite Readings + +- [Anatomy of an SDK Application](../basics/app-anatomy.md) {prereq} +- [Setting up the keyring](./keyring.md) {prereq} + +## Initialize the Chain + +::: warning +Make sure you can build your own binary, and replace `simd` with the name of your binary in the snippets. +::: + +Before actually running the node, we need to initialize the chain, and most importantly its genesis file. This is done with the `init` subcommand: + +```bash +# The argument is the custom username of your node, it should be human-readable. +simd init --chain-id my-test-chain +``` + +The command above creates all the configuration files needed for your node to run, as well as a default genesis file, which defines the initial state of the network. All these configuration files are in `~/.simapp` by default, but you can overwrite the location of this folder by passing the `--home` flag. + +The `~/.simapp` folder has the following structure: + +```bash +. # ~/.simapp + |- data # Contains the databases used by the node. + |- config/ + |- app.toml # Application-related configuration file. + |- config.toml # Tendermint-related configuration file. + |- genesis.json # The genesis file. + |- node_key.json # Private key to use for node authentication in the p2p protocol. + |- priv_validator_key.json # Private key to use as a validator in the consensus protocol. +``` + +Before starting the chain, you need to populate the state with at least one account. To do so, first [create a new account in the keyring](./keyring.md#adding-keys-to-the-keyring) named `my_validator` (feel free to choose another name). + +Now that you have created a local account, go ahead and grant it some `stake` tokens in your chain's genesis file. Doing so will also make sure your chain is aware of this account's existence: + +```bash +simd add-genesis-account $(simd keys show my_validator -a) 100000000stake --chain-id my-test-chain +``` + +Recall that `$MY_VALIDATOR_ADDRESS` is a variable that holds the address of the `my_validator` key in the [keyring](./keyring.md#adding-keys-to-the-keyring). Also note that the tokens in the SDK have the `{amount}{denom}` format: `amount` is is a 18-digit-precision decimal number, and `denom` is the unique token identifier with its denomination key (e.g. `atom` or `uatom`). Here, we are granting `stake` tokens, as `stake` is the token identifier used for staking in [`simapp`](https://github.com/cosmos/cosmos-sdk/tree/v0.40.0-rc2/simapp). For your own chain with its own staking denom, that token identifier should be used instead. + +Now that your account has some tokens, you need to add a validator to your chain. Validators are special full-nodes that participate in the consensus process (implemented in the [underlying consensus engine](../intro/sdk-app-architecture.md#tendermint)) in order to add new blocks to the chain. Any account can declare its intention to become a validator operator, but only those with sufficient delegation get to enter the active set (for example, only the top 125 validator candidates with the most delegation get to be validators in the Cosmos Hub). For this guide, you will add your local node (created via the `init` command above) as a validator of your chain. Validators can be declared before a chain is first started via a special transaction included in the genesis file called a `gentx`: + +```bash +# Create a gentx. +simd gentx --name my_validator --amount 100000stake --chain-id my-test-chain + +# Add the gentx to the genesis file. +simd collect-gentxs --chain-id my-test-chain +``` + +A `gentx` does three things: + +1. Registers the `validator` account you created as a validator operator account (i.e. the account that controls the validator). +2. Self-delegates the provided `amount` of staking tokens. +3. Link the operator account with a Tendermint node pubkey that will be used for signing blocks. If no `--pubkey` flag is provided, it defaults to the local node pubkey created via the `simd init` command above. + +For more information on `gentx`, use the following command: + +```bash +simd gentx --help +``` + +## Run a Localnet + +Now that everything is set up, you can finally start your node: + +```bash +simd start +``` + +You should see blocks come in. + +The previous command allow you to run a single node. This is enough for the next section on interacting with this node, but you may wish to run multiple nodes at the same time, and see how consensus happens between them. + +The naive way would be to run the same commands again in separate terminal windows. This is possible, however in the SDK, we leverage the power of [Docker Compose](https://docs.docker.com/compose/) to run a localnet. If you need inspiration on how to set up your own localnet with Docker Compose, you can have a look at the SDK's [`docker-compose.yml`](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc2/docker-compose.yml). + +## Next {hide} + +Read about the [Interacting with your Node](./interact-node.md) {hide} diff --git a/docs/using-the-sdk/quick-start.md b/docs/using-the-sdk/quick-start.md deleted file mode 100644 index 09cbcd9c89..0000000000 --- a/docs/using-the-sdk/quick-start.md +++ /dev/null @@ -1,160 +0,0 @@ -# Quick Start - -This guide serves as a practical introduction to building blockchains with the Cosmos SDK. It shows how to scaffold the code for a basic blockchain node, build and run it. Several important concepts of the Cosmos SDK are introduced along the way. - -## Setup - -::: tip -To follow this guide, you need to [install golang](https://golang.org/doc/install) and set [your \$GOPATH environment variable](https://golang.org/doc/code.html#GOPATH) -::: - -::: warning -Make sure you are using the latest stable version of golang available on https://golang.org/dl/ -::: - -First, download the [`scaffold`](https://github.com/cosmos/scaffold) tool: - -```bash -git clone https://github.com/cosmos/scaffold -``` - -The `scaffold` tool lets you easily scaffold boilerplate Cosmos SDK applications. Once you have downloaded it, simply install it on your machine: - -```bash -cd scaffold -make -``` - -## Create a Basic Cosmos SDK Blockchain - -To create a basic Cosmos SDK application, simply type in the following command: - -```bash -scaffold app -``` - -There are multiple levels of apps to choose from, they can be found [here](https://github.com/cosmos/scaffold/blob/master/docs/app.md). - -where `username|org` is the name of your github/gitlab/atlassian username or organisation, and `repo` the name of the distant repository you would push your application too. These arguments are used to configure the imports so that people can easily download and install your application once (if) you upload it. - -The command above creates a starter application in a new folder named after the `repo` argument. This application contains the [basic logic most SDK applications](../intro/sdk-app-architecture.md) need as well as a set of standard [modules](../building-modules/intro.md) already hooked up. You can find which level consists of which modules [here](https://github.com/cosmos/scaffold/blob/master/docs/app.md) - -The structure of the generated app will look like similar to the [recommended folder structure](../building-modules/structure.md). Below you will find a simple break down of some of the files. - -- `app.go` is the [main file](../basics/app-anatomy.md#core-application-file) defining the application logic. This is where the state is instantiated and modules are declared. This is also where the Cosmos SDK is imported as a dependency to help build the application. -- `export.go` is a helper file used to export the state of the application into a new genesis file. It is helpful when you want to upgrade your chain to a new (breaking) version. -- `acli/main.go` builds the command-line interface for your blockchain application. It enables end-users to create transactions and query the chain for information. -- `aud/main.go` builds the main [daemon client](../basics/app-anatomy.md#node-client) of the chain. It is used to run a full-node that will connect to peers and sync its local application state with the latest state of the network. -- `go.mod` helps manage dependencies. The two main dependencies used are the Cosmos SDK to help build the application, and Tendermint to replicate it. -- `x/` is the folder to place all the custom modules built specifically for the application. In general, most of the modules used in an application have already been built by third-party developers and only need to be imported in `app.go`. These modules do not need to be cloned into the application's `x/` folder. This is why the basic application shown above, which uses several modules, works despite having an empty `x/` folder. - -## Run your Blockchain - -First, install the two main entry points of your blockchain, `aud` and `acli`: - -```bash -go mod tidy -make install -``` - -Make sure the clients are properly installed: - -```bash -acli --help -aud --help -``` - -Now that you have your daemon client `aud` and your command-line interface `acli` installed, go ahead and initialize your chain: - -```bash -aud init --chain-id test -``` - -The command above creates all the configuration files needed for your node to run, as well as a default genesis file, which defines the initial state of the network. Before starting the chain, you need to populate the state with at least one account. To do so, first create a new [account](../basics/accounts.md) named `validator` (feel free to choose another name): - -```bash -acli keys add validator -``` - -Now that you have created a local account, go ahead and grant it `stake` tokens in your chain's genesis file. Doing so will also make sure your chain is aware of this account's existence: - -```bash -aud add-genesis-account $(acli keys show validator -a) 100000000stake -``` - -Now that your account has some tokens, you need to add a validator to your chain. Validators are special full-nodes that participate in the consensus process (implemented in the [underlying consensus engine](../intro/sdk-app-architecture.md#tendermint)) in order to add new blocks to the chain. Any account can declare its intention to become a validator operator, but only those with sufficient delegation get to enter the active set (for example, only the top 125 validator candidates with the most delegation get to be validators in the Cosmos Hub). For this guide, you will add your local node (created via the `init` command above) as a validator of your chain. Validators can be declared before a chain is first started via a special transaction included in the genesis file called a `gentx`: - -```bash -// create a gentx -aud gentx --name validator --amount 100000stake - -// add the gentx to the genesis file -aud collect-gentxs -``` - -A `gentx` does three things: - - 1. Makes the `validator` account you created into a validator operator account (i.e. the account that controls the validator). - 2. Self-delegates the provided `amount` of staking tokens. - 3. Link the operator account with a Tendermint node pubkey that will be used for signing blocks. If no `--pubkey` flag is provided, it defaults to the local node pubkey created via the `aud init` command above. - -For more on `gentx`, use the following command: - -```bash -aud gentx --help -``` - -Now that everything is set up, you can finally start your node: - -```bash -aud start -``` - -You should see blocks come in. - -## Send Tokens and Increase Delegation - -Now that your chain is running, it is time to try sending tokens from the first account you created to a second account. In a new terminal window, start by running the following query command: - -```bash -acli query account $(acli keys show validator -a) --chain-id test -``` - -You should see the current balance of the account you created, equal to the original balance of `stake` you granted it minus the amount you delegated via the `gentx`. Now, create a second account: - -```bash -acli keys add receiver -``` - -The command above creates a local key-pair that is not yet registered on the chain. An account is registered the first time it receives tokens from another account. Now, run the following command to send tokens to the second account: - -```bash -acli tx send $(acli keys show validator -a) $(acli keys show receiver -a) 1000stake --chain-id test -``` - -Check that the second account did receive the tokens: - -```bash -acli query account $(acli keys show receiver -a) --chain-id test -``` - -Finally, delegate some of the stake tokens sent to the `receiver` account to the validator: - -```bash -acli tx staking delegate $(acli keys show validator --bech val -a) 500stake --from receiver --chain-id test -``` - -Try to query the total delegations to `validator`: - -```bash -acli query staking delegations-to $(acli keys show validator --bech val -a) --chain-id test -``` - -You should see two delegations, the first one made from the `gentx`, and the second one you just performed from the `receiver` account. - -## Next - -Congratulations on making it to the end of this short introduction guide! If you want to learn more, check out the following resources: - -- [How to build a full SDK application from scratch](https://tutorials.cosmos.network/nameservice/tutorial/00-intro.html). -- [Read the Cosmos SDK Documentation](../intro/overview.md). From 97963c71dfe58e56e57f20ec2efe154a9c5ca787 Mon Sep 17 00:00:00 2001 From: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Date: Thu, 5 Nov 2020 14:46:00 +0100 Subject: [PATCH 047/136] ibc: remove GetClientConsensusStateLTE (#7812) --- x/ibc/core/02-client/keeper/keeper.go | 16 ---------------- x/ibc/core/02-client/keeper/keeper_test.go | 5 ----- 2 files changed, 21 deletions(-) diff --git a/x/ibc/core/02-client/keeper/keeper.go b/x/ibc/core/02-client/keeper/keeper.go index 68220db8af..8af73dd75a 100644 --- a/x/ibc/core/02-client/keeper/keeper.go +++ b/x/ibc/core/02-client/keeper/keeper.go @@ -156,22 +156,6 @@ func (k Keeper) GetLatestClientConsensusState(ctx sdk.Context, clientID string) return k.GetClientConsensusState(ctx, clientID, clientState.GetLatestHeight()) } -// GetClientConsensusStateLTE will get the latest ConsensusState of a particular client at the latest height -// less than or equal to the given height -// It will only search for heights within the same version -func (k Keeper) GetClientConsensusStateLTE(ctx sdk.Context, clientID string, maxHeight exported.Height) (exported.ConsensusState, bool) { - h := maxHeight - ok := true - for ok { - found := k.HasClientConsensusState(ctx, clientID, h) - if found { - return k.GetClientConsensusState(ctx, clientID, h) - } - h, ok = h.Decrement() - } - return nil, false -} - // GetSelfConsensusState introspects the (self) past historical info at a given height // and returns the expected consensus state at that height. // For now, can only retrieve self consensus states for the current version diff --git a/x/ibc/core/02-client/keeper/keeper_test.go b/x/ibc/core/02-client/keeper/keeper_test.go index 11db64a4d6..24675f4e9a 100644 --- a/x/ibc/core/02-client/keeper/keeper_test.go +++ b/x/ibc/core/02-client/keeper/keeper_test.go @@ -340,11 +340,6 @@ func (suite KeeperTestSuite) TestConsensusStateHelpers() { latest, ok := suite.keeper.GetLatestClientConsensusState(suite.ctx, testClientID) suite.Require().True(ok) suite.Require().Equal(nextState, latest, "Latest client not returned correctly") - - // Should return existing consensusState at latestClientHeight - lte, ok := suite.keeper.GetClientConsensusStateLTE(suite.ctx, testClientID, types.NewHeight(0, height+3)) - suite.Require().True(ok) - suite.Require().Equal(suite.consensusState, lte, "LTE helper function did not return latest client state below height: %d", height+3) } // 2 clients in total are created on chainA. The first client is updated so it contains an initial consensus state From 03a46181c6edfdad5e74654f88f789fcbb3c178b Mon Sep 17 00:00:00 2001 From: Aditya Date: Thu, 5 Nov 2020 14:07:15 +0000 Subject: [PATCH 048/136] Merge Packet Functions (#7813) * start implementation and debugging tests * fix some issues, continue debugging * fix IBC tests * remove print statement and fix docs Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- .../core/03-connection/keeper/verify_test.go | 12 +- x/ibc/core/04-channel/keeper/packet.go | 192 +++++------ x/ibc/core/04-channel/keeper/packet_test.go | 297 +++++++----------- x/ibc/core/keeper/msg_server.go | 15 +- x/ibc/core/keeper/msg_server_test.go | 47 +-- .../07-tendermint/types/client_state_test.go | 16 +- x/ibc/testing/chain.go | 43 +-- x/ibc/testing/coordinator.go | 38 --- 8 files changed, 225 insertions(+), 435 deletions(-) diff --git a/x/ibc/core/03-connection/keeper/verify_test.go b/x/ibc/core/03-connection/keeper/verify_test.go index 53fd3be8ff..7f9705a80b 100644 --- a/x/ibc/core/03-connection/keeper/verify_test.go +++ b/x/ibc/core/03-connection/keeper/verify_test.go @@ -11,6 +11,7 @@ import ( "github.com/cosmos/cosmos-sdk/x/ibc/core/exported" ibctmtypes "github.com/cosmos/cosmos-sdk/x/ibc/light-clients/07-tendermint/types" ibctesting "github.com/cosmos/cosmos-sdk/x/ibc/testing" + ibcmock "github.com/cosmos/cosmos-sdk/x/ibc/testing/mock" ) var defaultTimeoutHeight = clienttypes.NewHeight(0, 100000) @@ -336,16 +337,13 @@ func (suite *KeeperTestSuite) TestVerifyPacketAcknowledgement() { err := suite.coordinator.SendPacket(suite.chainA, suite.chainB, packet, clientB) suite.Require().NoError(err) - err = suite.coordinator.WriteReceipt(suite.chainB, suite.chainA, packet, clientA) - suite.Require().NoError(err) - - err = suite.coordinator.WriteAcknowledgement(suite.chainB, suite.chainA, packet, clientA) + err = suite.coordinator.RecvPacket(suite.chainA, suite.chainB, clientA, packet) suite.Require().NoError(err) packetAckKey := host.KeyPacketAcknowledgement(packet.GetDestPort(), packet.GetDestChannel(), packet.GetSequence()) proof, proofHeight := suite.chainB.QueryProof(packetAckKey) - ack := ibctesting.TestHash + ack := ibcmock.MockAcknowledgement if tc.changeAcknowledgement { ack = []byte(ibctesting.InvalidID) } @@ -399,7 +397,7 @@ func (suite *KeeperTestSuite) TestVerifyPacketReceiptAbsence() { suite.Require().NoError(err) if tc.recvAck { - err = suite.coordinator.WriteReceipt(suite.chainB, suite.chainA, packet, clientA) + err = suite.coordinator.RecvPacket(suite.chainA, suite.chainB, clientA, packet) suite.Require().NoError(err) } else { // need to update height to prove absence @@ -458,7 +456,7 @@ func (suite *KeeperTestSuite) TestVerifyNextSequenceRecv() { err := suite.coordinator.SendPacket(suite.chainA, suite.chainB, packet, clientB) suite.Require().NoError(err) - err = suite.coordinator.WriteReceipt(suite.chainB, suite.chainA, packet, clientA) + err = suite.coordinator.RecvPacket(suite.chainA, suite.chainB, clientA, packet) suite.Require().NoError(err) nextSeqRecvKey := host.KeyNextSequenceRecv(packet.GetDestPort(), packet.GetDestChannel()) diff --git a/x/ibc/core/04-channel/keeper/packet.go b/x/ibc/core/04-channel/keeper/packet.go index d1d7b63920..87ba9ce337 100644 --- a/x/ibc/core/04-channel/keeper/packet.go +++ b/x/ibc/core/04-channel/keeper/packet.go @@ -137,6 +137,7 @@ func (k Keeper) SendPacket( // sent on the corresponding channel end on the counterparty chain. func (k Keeper) RecvPacket( ctx sdk.Context, + chanCap *capabilitytypes.Capability, packet exported.PacketI, proof []byte, proofHeight exported.Height, @@ -153,8 +154,14 @@ func (k Keeper) RecvPacket( ) } - // NOTE: RecvPacket is called by the AnteHandler which acts upon the packet.Route(), - // so the capability authentication can be omitted here + // Authenticate capability to ensure caller has authority to receive packet on this channel + capName := host.ChannelCapabilityPath(packet.GetDestPort(), packet.GetDestChannel()) + if !k.scopedKeeper.AuthenticateCapability(ctx, chanCap, capName) { + return sdkerrors.Wrapf( + types.ErrInvalidChannelCapability, + "channel capability failed authentication for capability name %s", capName, + ) + } // packet must come from the channel's counterparty if packet.GetSourcePort() != channel.Counterparty.PortId { @@ -171,6 +178,9 @@ func (k Keeper) RecvPacket( ) } + // Connection must be OPEN to receive a packet. It is possible for connection to not yet be open if packet was + // sent optimistically before connection and channel handshake completed. However, to receive a packet, + // connection and channel must both be open connectionEnd, found := k.connectionKeeper.GetConnection(ctx, channel.ConnectionHops[0]) if !found { return sdkerrors.Wrap(connectiontypes.ErrConnectionNotFound, channel.ConnectionHops[0]) @@ -201,6 +211,15 @@ func (k Keeper) RecvPacket( ) } + // verify that the counterparty did commit to sending this packet + if err := k.connectionKeeper.VerifyPacketCommitment( + ctx, connectionEnd, proofHeight, proof, + packet.GetSourcePort(), packet.GetSourceChannel(), packet.GetSequence(), + types.CommitPacket(packet), + ); err != nil { + return sdkerrors.Wrap(err, "couldn't verify counterparty packet commitment") + } + switch channel.Ordering { case types.UNORDERED: // check if the packet receipt has been received already for unordered channels @@ -212,6 +231,12 @@ func (k Keeper) RecvPacket( ) } + // All verification complete, update state + // For unordered channels we must set the receipt so it can be verified on the other side. + // This receipt does not contain any data, since the packet has not yet been processed, + // it's just a single store key set to an empty string to indicate that the packet has been received + k.SetPacketReceipt(ctx, packet.GetDestPort(), packet.GetDestChannel(), packet.GetSequence()) + case types.ORDERED: // check if the packet is being received in order nextSequenceRecv, found := k.GetNextSequenceRecv(ctx, packet.GetDestPort(), packet.GetDestChannel()) @@ -228,79 +253,15 @@ func (k Keeper) RecvPacket( "packet sequence ≠ next receive sequence (%d ≠ %d)", packet.GetSequence(), nextSequenceRecv, ) } - } - - if err := k.connectionKeeper.VerifyPacketCommitment( - ctx, connectionEnd, proofHeight, proof, - packet.GetSourcePort(), packet.GetSourceChannel(), packet.GetSequence(), - types.CommitPacket(packet), - ); err != nil { - return sdkerrors.Wrap(err, "couldn't verify counterparty packet commitment") - } - - // NOTE: the remaining code is located in the WriteReceipt function - return nil -} - -// WriteReceipt updates the receive sequence in the case of an ordered channel or sets an empty receipt -// if the channel is unordered. -// -// CONTRACT: this function must be called in the IBC handler -func (k Keeper) WriteReceipt( - ctx sdk.Context, - chanCap *capabilitytypes.Capability, - packet exported.PacketI, -) error { - channel, found := k.GetChannel(ctx, packet.GetDestPort(), packet.GetDestChannel()) - if !found { - return sdkerrors.Wrapf(types.ErrChannelNotFound, packet.GetDestChannel()) - } - - // sanity check - if channel.State != types.OPEN { - return sdkerrors.Wrapf( - types.ErrInvalidChannelState, - "channel state is not OPEN (got %s)", channel.State.String(), - ) - } - - capName := host.ChannelCapabilityPath(packet.GetDestPort(), packet.GetDestChannel()) - if !k.scopedKeeper.AuthenticateCapability(ctx, chanCap, capName) { - return sdkerrors.Wrapf( - types.ErrInvalidChannelCapability, - "channel capability failed authentication for capability name %s", capName, - ) - } - - switch channel.Ordering { - case types.ORDERED: - nextSequenceRecv, found := k.GetNextSequenceRecv(ctx, packet.GetDestPort(), packet.GetDestChannel()) - if !found { - return sdkerrors.Wrapf( - types.ErrSequenceReceiveNotFound, - "destination port: %s, destination channel: %s", packet.GetDestPort(), packet.GetDestChannel(), - ) - } + // All verification complete, update state + // In ordered case, we must increment nextSequenceRecv nextSequenceRecv++ // incrementing nextSequenceRecv and storing under this chain's channelEnd identifiers // Since this is the receiving chain, our channelEnd is packet's destination port and channel k.SetNextSequenceRecv(ctx, packet.GetDestPort(), packet.GetDestChannel(), nextSequenceRecv) - case types.UNORDERED: - // For unordered channels we must set the receipt so it can be verified on the other side. - // This receipt does not contain any data, since the packet has not yet been processed, - // it's just a single store key set to an empty string to indicate that the packet has been received - _, found := k.GetPacketReceipt(ctx, packet.GetDestPort(), packet.GetDestChannel(), packet.GetSequence()) - if found { - return sdkerrors.Wrapf( - types.ErrPacketReceived, - "destination port: %s, destination channel: %s, sequence: %d", packet.GetDestPort(), packet.GetDestChannel(), packet.GetSequence(), - ) - } - - k.SetPacketReceipt(ctx, packet.GetDestPort(), packet.GetDestChannel(), packet.GetSequence()) } // log that a packet has been received & executed @@ -338,12 +299,35 @@ func (k Keeper) WriteReceipt( // For async handling, it needs to be called directly by the module which originally // processed the packet. // -// 2) Assumes that packet receipt has been writted previously by WriteReceipt. +// 2) Assumes that packet receipt has been written (unordered), or nextSeqRecv was incremented (ordered) +// previously by RecvPacket. func (k Keeper) WriteAcknowledgement( ctx sdk.Context, + chanCap *capabilitytypes.Capability, packet exported.PacketI, acknowledgement []byte, ) error { + channel, found := k.GetChannel(ctx, packet.GetDestPort(), packet.GetDestChannel()) + if !found { + return sdkerrors.Wrap(types.ErrChannelNotFound, packet.GetDestChannel()) + } + + if channel.State != types.OPEN { + return sdkerrors.Wrapf( + types.ErrInvalidChannelState, + "channel state is not OPEN (got %s)", channel.State.String(), + ) + } + + // Authenticate capability to ensure caller has authority to receive packet on this channel + capName := host.ChannelCapabilityPath(packet.GetDestPort(), packet.GetDestChannel()) + if !k.scopedKeeper.AuthenticateCapability(ctx, chanCap, capName) { + return sdkerrors.Wrapf( + types.ErrInvalidChannelCapability, + "channel capability failed authentication for capability name %s", capName, + ) + } + // NOTE: IBC app modules might have written the acknowledgement synchronously on // the OnRecvPacket callback so we need to check if the acknowledgement is already // set on the store and return an error if so. @@ -355,14 +339,14 @@ func (k Keeper) WriteAcknowledgement( return sdkerrors.Wrap(types.ErrInvalidAcknowledgement, "acknowledgement cannot be empty") } - // always set the acknowledgement so that it can be verified on the other side + // set the acknowledgement so that it can be verified on the other side k.SetPacketAcknowledgement( ctx, packet.GetDestPort(), packet.GetDestChannel(), packet.GetSequence(), types.CommitAcknowledgement(acknowledgement), ) - // log that a packet has been acknowledged - k.Logger(ctx).Info("packet acknowledged", "packet", fmt.Sprintf("%v", packet)) + // log that a packet acknowledgement has been written + k.Logger(ctx).Info("acknowledged written", "packet", fmt.Sprintf("%v", packet)) // emit an event that the relayer can query for ctx.EventManager().EmitEvents(sdk.Events{ @@ -390,11 +374,12 @@ func (k Keeper) WriteAcknowledgement( // AcknowledgePacket is called by a module to process the acknowledgement of a // packet previously sent by the calling module on a channel to a counterparty // module on the counterparty chain. Its intended usage is within the ante -// handler. A subsequent call to AcknowledgementExecuted will clean up the -// packet commitment, which is no longer necessary since the packet has been -// received and acted upon. +// handler. AcknowledgePacket will clean up the packet commitment, +// which is no longer necessary since the packet has been received and acted upon. +// It will also increment NextSequenceAck in case of ORDERED channels. func (k Keeper) AcknowledgePacket( ctx sdk.Context, + chanCap *capabilitytypes.Capability, packet exported.PacketI, acknowledgement []byte, proof []byte, @@ -415,8 +400,14 @@ func (k Keeper) AcknowledgePacket( ) } - // NOTE: AcknowledgePacket is called by the AnteHandler which acts upon the packet.Route(), - // so the capability authentication can be omitted here + // Authenticate capability to ensure caller has authority to receive packet on this channel + capName := host.ChannelCapabilityPath(packet.GetSourcePort(), packet.GetSourceChannel()) + if !k.scopedKeeper.AuthenticateCapability(ctx, chanCap, capName) { + return sdkerrors.Wrapf( + types.ErrInvalidChannelCapability, + "channel capability failed authentication for capability name %s", capName, + ) + } // packet must have been sent to the channel's counterparty if packet.GetDestPort() != channel.Counterparty.PortId { @@ -475,56 +466,19 @@ func (k Keeper) AcknowledgePacket( "packet sequence ≠ next ack sequence (%d ≠ %d)", packet.GetSequence(), nextSequenceAck, ) } - } - - // NOTE: the remaining code is located in the AcknowledgementExecuted function - return nil -} - -// AcknowledgementExecuted deletes the packet commitment from this chain. -// It is assumed that the acknowledgement verification has already occurred. -// -// CONTRACT: this function must be called in the IBC handler -func (k Keeper) AcknowledgementExecuted( - ctx sdk.Context, - chanCap *capabilitytypes.Capability, - packet exported.PacketI, -) error { - channel, found := k.GetChannel(ctx, packet.GetSourcePort(), packet.GetSourceChannel()) - if !found { - return sdkerrors.Wrapf( - types.ErrChannelNotFound, - "port ID (%s) channel ID (%s)", packet.GetSourcePort(), packet.GetSourceChannel(), - ) - } - - capName := host.ChannelCapabilityPath(packet.GetSourcePort(), packet.GetSourceChannel()) - if !k.scopedKeeper.AuthenticateCapability(ctx, chanCap, capName) { - return sdkerrors.Wrapf( - types.ErrInvalidChannelCapability, - "channel capability failed authentication for capability name %s", capName, - ) - } - - k.deletePacketCommitment(ctx, packet.GetSourcePort(), packet.GetSourceChannel(), packet.GetSequence()) - - // increment NextSequenceAck - if channel.Ordering == types.ORDERED { - nextSequenceAck, found := k.GetNextSequenceAck(ctx, packet.GetSourcePort(), packet.GetSourceChannel()) - if !found { - return sdkerrors.Wrapf( - types.ErrSequenceAckNotFound, - "source port: %s, source channel: %s", packet.GetSourcePort(), packet.GetSourceChannel(), - ) - } + // All verification complete, in the case of ORDERED channels we must increment nextSequenceAck nextSequenceAck++ // incrementing NextSequenceAck and storing under this chain's channelEnd identifiers // Since this is the original sending chain, our channelEnd is packet's source port and channel k.SetNextSequenceAck(ctx, packet.GetSourcePort(), packet.GetSourceChannel(), nextSequenceAck) + } + // Delete packet commitment, since the packet has been acknowledged, the commitement is no longer necessary + k.deletePacketCommitment(ctx, packet.GetSourcePort(), packet.GetSourceChannel(), packet.GetSequence()) + // log that a packet has been acknowledged k.Logger(ctx).Info("packet acknowledged", "packet", fmt.Sprintf("%v", packet)) diff --git a/x/ibc/core/04-channel/keeper/packet_test.go b/x/ibc/core/04-channel/keeper/packet_test.go index e2cc85459f..3d942ce12e 100644 --- a/x/ibc/core/04-channel/keeper/packet_test.go +++ b/x/ibc/core/04-channel/keeper/packet_test.go @@ -9,6 +9,7 @@ import ( host "github.com/cosmos/cosmos-sdk/x/ibc/core/24-host" "github.com/cosmos/cosmos-sdk/x/ibc/core/exported" ibctesting "github.com/cosmos/cosmos-sdk/x/ibc/testing" + ibcmock "github.com/cosmos/cosmos-sdk/x/ibc/testing/mock" ) var ( @@ -179,7 +180,8 @@ func (suite *KeeperTestSuite) TestSendPacket() { // verification tests need to simulate sending a packet from chainA to chainB. func (suite *KeeperTestSuite) TestRecvPacket() { var ( - packet exported.PacketI + packet exported.PacketI + channelCap *capabilitytypes.Capability ) testCases := []testCase{ @@ -188,6 +190,7 @@ func (suite *KeeperTestSuite) TestRecvPacket() { packet = types.NewPacket(validPacketData, 1, channelA.PortID, channelA.ID, channelB.PortID, channelB.ID, timeoutHeight, disabledTimeoutTimestamp) err := suite.coordinator.SendPacket(suite.chainA, suite.chainB, packet, clientB) suite.Require().NoError(err) + channelCap = suite.chainB.GetChannelCapability(channelB.PortID, channelB.ID) }, true}, {"success UNORDERED channel", func() { // setup uses an UNORDERED channel @@ -195,6 +198,7 @@ func (suite *KeeperTestSuite) TestRecvPacket() { packet = types.NewPacket(validPacketData, 1, channelA.PortID, channelA.ID, channelB.PortID, channelB.ID, timeoutHeight, disabledTimeoutTimestamp) err := suite.coordinator.SendPacket(suite.chainA, suite.chainB, packet, clientB) suite.Require().NoError(err) + channelCap = suite.chainB.GetChannelCapability(channelB.PortID, channelB.ID) }, true}, {"success with out of order packet: UNORDERED channel", func() { // setup uses an UNORDERED channel @@ -209,6 +213,7 @@ func (suite *KeeperTestSuite) TestRecvPacket() { err = suite.coordinator.SendPacket(suite.chainA, suite.chainB, packet, clientB) suite.Require().NoError(err) // attempts to receive packet 2 without receiving packet 1 + channelCap = suite.chainB.GetChannelCapability(channelB.PortID, channelB.ID) }, true}, {"out of order packet failure with ORDERED channel", func() { _, clientB, _, _, channelA, channelB := suite.coordinator.Setup(suite.chainA, suite.chainB, types.ORDERED) @@ -222,11 +227,13 @@ func (suite *KeeperTestSuite) TestRecvPacket() { err = suite.coordinator.SendPacket(suite.chainA, suite.chainB, packet, clientB) suite.Require().NoError(err) // attempts to receive packet 2 without receiving packet 1 + channelCap = suite.chainB.GetChannelCapability(channelB.PortID, channelB.ID) }, false}, {"channel not found", func() { // use wrong channel naming - _, _, _, _, channelA, _ := suite.coordinator.Setup(suite.chainA, suite.chainB, types.UNORDERED) + _, _, _, _, channelA, channelB := suite.coordinator.Setup(suite.chainA, suite.chainB, types.UNORDERED) packet = types.NewPacket(validPacketData, 1, channelA.PortID, channelA.ID, ibctesting.InvalidID, ibctesting.InvalidID, timeoutHeight, disabledTimeoutTimestamp) + channelCap = suite.chainB.GetChannelCapability(channelB.PortID, channelB.ID) }, false}, {"channel not open", func() { _, _, _, _, channelA, channelB := suite.coordinator.Setup(suite.chainA, suite.chainB, types.UNORDERED) @@ -234,16 +241,26 @@ func (suite *KeeperTestSuite) TestRecvPacket() { err := suite.coordinator.SetChannelClosed(suite.chainB, suite.chainA, channelB) suite.Require().NoError(err) + channelCap = suite.chainB.GetChannelCapability(channelB.PortID, channelB.ID) + }, false}, + {"capability cannot authenticate", func() { + _, clientB, _, _, channelA, channelB := suite.coordinator.Setup(suite.chainA, suite.chainB, types.ORDERED) + packet = types.NewPacket(validPacketData, 1, channelA.PortID, channelA.ID, channelB.PortID, channelB.ID, timeoutHeight, disabledTimeoutTimestamp) + err := suite.coordinator.SendPacket(suite.chainA, suite.chainB, packet, clientB) + suite.Require().NoError(err) + channelCap = capabilitytypes.NewCapability(3) }, false}, {"packet source port ≠ channel counterparty port", func() { _, _, _, _, channelA, channelB := suite.coordinator.Setup(suite.chainA, suite.chainB, types.UNORDERED) // use wrong port for dest packet = types.NewPacket(validPacketData, 1, ibctesting.InvalidID, channelA.ID, channelB.PortID, channelB.ID, timeoutHeight, disabledTimeoutTimestamp) + channelCap = suite.chainB.GetChannelCapability(channelB.PortID, channelB.ID) }, false}, {"packet source channel ID ≠ channel counterparty channel ID", func() { _, _, _, _, channelA, channelB := suite.coordinator.Setup(suite.chainA, suite.chainB, types.UNORDERED) // use wrong port for dest packet = types.NewPacket(validPacketData, 1, channelA.PortID, ibctesting.InvalidID, channelB.PortID, channelB.ID, timeoutHeight, disabledTimeoutTimestamp) + channelCap = suite.chainB.GetChannelCapability(channelB.PortID, channelB.ID) }, false}, {"connection not found", func() { channelA := ibctesting.TestChannel{PortID: portID, ID: channelIDA} @@ -255,6 +272,8 @@ func (suite *KeeperTestSuite) TestRecvPacket() { types.NewChannel(types.OPEN, types.ORDERED, types.NewCounterparty(channelA.PortID, channelA.ID), []string{connIDB}, channelB.Version), ) packet = types.NewPacket(validPacketData, 1, channelA.PortID, channelA.ID, channelB.PortID, channelB.ID, timeoutHeight, disabledTimeoutTimestamp) + suite.chainB.CreateChannelCapability(channelB.PortID, channelB.ID) + channelCap = suite.chainB.GetChannelCapability(channelB.PortID, channelB.ID) }, false}, {"connection not OPEN", func() { clientA, clientB := suite.coordinator.SetupClients(suite.chainA, suite.chainB, ibctesting.Tendermint) @@ -271,14 +290,18 @@ func (suite *KeeperTestSuite) TestRecvPacket() { types.NewChannel(types.OPEN, types.ORDERED, types.NewCounterparty(channelA.PortID, channelA.ID), []string{connB.ID}, channelB.Version), ) packet = types.NewPacket(validPacketData, 1, channelA.PortID, channelA.ID, channelB.PortID, channelB.ID, timeoutHeight, disabledTimeoutTimestamp) + suite.chainB.CreateChannelCapability(channelB.PortID, channelB.ID) + channelCap = suite.chainB.GetChannelCapability(channelB.PortID, channelB.ID) }, false}, {"timeout height passed", func() { _, _, _, _, channelA, channelB := suite.coordinator.Setup(suite.chainA, suite.chainB, types.UNORDERED) packet = types.NewPacket(validPacketData, 1, channelA.PortID, channelA.ID, channelB.PortID, channelB.ID, clienttypes.GetSelfHeight(suite.chainB.GetContext()), disabledTimeoutTimestamp) + channelCap = suite.chainB.GetChannelCapability(channelB.PortID, channelB.ID) }, false}, {"timeout timestamp passed", func() { _, _, _, _, channelA, channelB := suite.coordinator.Setup(suite.chainA, suite.chainB, types.UNORDERED) packet = types.NewPacket(validPacketData, 1, channelA.PortID, channelA.ID, channelB.PortID, channelB.ID, disabledTimeoutHeight, uint64(suite.chainB.GetContext().BlockTime().UnixNano())) + channelCap = suite.chainB.GetChannelCapability(channelB.PortID, channelB.ID) }, false}, {"next receive sequence is not found", func() { _, _, connA, connB := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, ibctesting.Tendermint) @@ -296,11 +319,22 @@ func (suite *KeeperTestSuite) TestRecvPacket() { // manually set packet commitment suite.chainA.App.IBCKeeper.ChannelKeeper.SetPacketCommitment(suite.chainA.GetContext(), channelA.PortID, channelA.ID, packet.GetSequence(), ibctesting.TestHash) + suite.chainB.CreateChannelCapability(channelB.PortID, channelB.ID) + + channelCap = suite.chainB.GetChannelCapability(channelB.PortID, channelB.ID) + }, false}, + {"receipt already stored", func() { + _, clientB, _, _, channelA, channelB := suite.coordinator.Setup(suite.chainA, suite.chainB, types.UNORDERED) + packet = types.NewPacket(validPacketData, 1, channelA.PortID, channelA.ID, channelB.PortID, channelB.ID, timeoutHeight, disabledTimeoutTimestamp) + suite.coordinator.SendPacket(suite.chainA, suite.chainB, packet, clientB) + suite.chainB.App.IBCKeeper.ChannelKeeper.SetPacketReceipt(suite.chainB.GetContext(), channelB.PortID, channelB.ID, 1) + channelCap = suite.chainB.GetChannelCapability(channelB.PortID, channelB.ID) }, false}, {"validation failed", func() { // packet commitment not set resulting in invalid proof _, _, _, _, channelA, channelB := suite.coordinator.Setup(suite.chainA, suite.chainB, types.UNORDERED) packet = types.NewPacket(validPacketData, 1, channelA.PortID, channelA.ID, channelB.PortID, channelB.ID, timeoutHeight, disabledTimeoutTimestamp) + channelCap = suite.chainB.GetChannelCapability(channelB.PortID, channelB.ID) }, false}, } @@ -314,10 +348,24 @@ func (suite *KeeperTestSuite) TestRecvPacket() { packetKey := host.KeyPacketCommitment(packet.GetSourcePort(), packet.GetSourceChannel(), packet.GetSequence()) proof, proofHeight := suite.chainA.QueryProof(packetKey) - err := suite.chainB.App.IBCKeeper.ChannelKeeper.RecvPacket(suite.chainB.GetContext(), packet, proof, proofHeight) + err := suite.chainB.App.IBCKeeper.ChannelKeeper.RecvPacket(suite.chainB.GetContext(), channelCap, packet, proof, proofHeight) if tc.expPass { suite.Require().NoError(err) + + channelB, _ := suite.chainB.App.IBCKeeper.ChannelKeeper.GetChannel(suite.chainB.GetContext(), packet.GetDestPort(), packet.GetDestChannel()) + nextSeqRecv, found := suite.chainB.App.IBCKeeper.ChannelKeeper.GetNextSequenceRecv(suite.chainB.GetContext(), packet.GetDestPort(), packet.GetDestChannel()) + suite.Require().True(found) + receipt, receiptStored := suite.chainB.App.IBCKeeper.ChannelKeeper.GetPacketReceipt(suite.chainB.GetContext(), packet.GetDestPort(), packet.GetDestChannel(), packet.GetSequence()) + + if channelB.Ordering == types.ORDERED { + suite.Require().Equal(packet.GetSequence()+1, nextSeqRecv, "sequence not incremented in ordered channel") + suite.Require().False(receiptStored, "packet receipt stored on ORDERED channel") + } else { + suite.Require().Equal(uint64(1), nextSeqRecv, "sequence incremented for UNORDERED channel") + suite.Require().True(receiptStored, "packet receipt not stored after RecvPacket in UNORDERED channel") + suite.Require().Equal("", receipt, "packet receipt is not empty string") + } } else { suite.Require().Error(err) } @@ -326,92 +374,11 @@ func (suite *KeeperTestSuite) TestRecvPacket() { } -// TestWriteReceipt tests the WriteReceipt call on chainB. -func (suite *KeeperTestSuite) TestWriteReceipt() { - var ( - packet types.Packet - channelCap *capabilitytypes.Capability - ) - - testCases := []testCase{ - {"success: UNORDERED", func() { - // setup uses an UNORDERED channel - _, clientB, _, _, channelA, channelB := suite.coordinator.Setup(suite.chainA, suite.chainB, types.UNORDERED) - packet = types.NewPacket(validPacketData, 1, channelA.PortID, channelA.ID, channelB.PortID, channelB.ID, timeoutHeight, disabledTimeoutTimestamp) - suite.coordinator.SendPacket(suite.chainA, suite.chainB, packet, clientB) - channelCap = suite.chainB.GetChannelCapability(channelB.PortID, channelB.ID) - }, true}, - {"success: ORDERED", func() { - _, clientB, _, _, channelA, channelB := suite.coordinator.Setup(suite.chainA, suite.chainB, types.ORDERED) - packet = types.NewPacket(validPacketData, 1, channelA.PortID, channelA.ID, channelB.PortID, channelB.ID, timeoutHeight, disabledTimeoutTimestamp) - suite.coordinator.SendPacket(suite.chainA, suite.chainB, packet, clientB) - channelCap = suite.chainB.GetChannelCapability(channelB.PortID, channelB.ID) - }, true}, - {"channel not found", func() { - // use wrong channel naming - _, _, _, _, channelA, channelB := suite.coordinator.Setup(suite.chainA, suite.chainB, types.UNORDERED) - packet = types.NewPacket(validPacketData, 1, channelA.PortID, channelA.ID, ibctesting.InvalidID, ibctesting.InvalidID, timeoutHeight, disabledTimeoutTimestamp) - channelCap = suite.chainB.GetChannelCapability(channelB.PortID, channelB.ID) - }, false}, - {"channel not OPEN", func() { - _, _, _, _, channelA, channelB := suite.coordinator.Setup(suite.chainA, suite.chainB, types.UNORDERED) - packet = types.NewPacket(validPacketData, 1, channelA.PortID, channelA.ID, channelB.PortID, channelB.ID, timeoutHeight, disabledTimeoutTimestamp) - - err := suite.coordinator.SetChannelClosed(suite.chainB, suite.chainA, channelB) - suite.Require().NoError(err) - }, false}, - {"next sequence receive not found", func() { - _, _, connA, connB := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, ibctesting.Tendermint) - channelA := connA.NextTestChannel(ibctesting.TransferPort) - channelB := connB.NextTestChannel(ibctesting.TransferPort) - packet = types.NewPacket(validPacketData, 1, channelA.PortID, channelA.ID, channelB.PortID, channelB.ID, timeoutHeight, disabledTimeoutTimestamp) - // manually creating channel prevents next sequence receive from being set - suite.chainB.App.IBCKeeper.ChannelKeeper.SetChannel( - suite.chainB.GetContext(), - channelB.PortID, channelB.ID, - types.NewChannel(types.OPEN, types.ORDERED, types.NewCounterparty(channelA.PortID, channelA.ID), []string{connB.ID}, channelB.Version), - ) - suite.chainB.CreateChannelCapability(channelB.PortID, channelB.ID) - channelCap = suite.chainB.GetChannelCapability(channelB.PortID, channelB.ID) - }, false}, - {"capability not found", func() { - _, clientB, _, _, channelA, channelB := suite.coordinator.Setup(suite.chainA, suite.chainB, types.ORDERED) - packet = types.NewPacket(validPacketData, 1, channelA.PortID, channelA.ID, channelB.PortID, channelB.ID, timeoutHeight, disabledTimeoutTimestamp) - suite.coordinator.SendPacket(suite.chainA, suite.chainB, packet, clientB) - - channelCap = capabilitytypes.NewCapability(3) - }, false}, - {"receipt already stored", func() { - _, clientB, _, _, channelA, channelB := suite.coordinator.Setup(suite.chainA, suite.chainB, types.UNORDERED) - packet = types.NewPacket(validPacketData, 1, channelA.PortID, channelA.ID, channelB.PortID, channelB.ID, timeoutHeight, disabledTimeoutTimestamp) - suite.coordinator.SendPacket(suite.chainA, suite.chainB, packet, clientB) - suite.chainB.App.IBCKeeper.ChannelKeeper.SetPacketReceipt(suite.chainB.GetContext(), channelB.PortID, channelB.ID, 1) - channelCap = suite.chainB.GetChannelCapability(channelB.PortID, channelB.ID) - }, false}, - } - - for i, tc := range testCases { - tc := tc - suite.Run(fmt.Sprintf("Case %s, %d/%d tests", tc.msg, i, len(testCases)), func() { - suite.SetupTest() // reset - - tc.malleate() - - err := suite.chainB.App.IBCKeeper.ChannelKeeper.WriteReceipt(suite.chainB.GetContext(), channelCap, packet) - - if tc.expPass { - suite.Require().NoError(err) - } else { - suite.Require().Error(err) - } - }) - } -} - func (suite *KeeperTestSuite) TestWriteAcknowledgement() { var ( - ack []byte - packet exported.PacketI + ack []byte + packet exported.PacketI + channelCap *capabilitytypes.Capability ) testCases := []testCase{ @@ -421,9 +388,36 @@ func (suite *KeeperTestSuite) TestWriteAcknowledgement() { _, _, _, _, channelA, channelB := suite.coordinator.Setup(suite.chainA, suite.chainB, types.UNORDERED) packet = types.NewPacket(validPacketData, 1, channelA.PortID, channelA.ID, channelB.PortID, channelB.ID, timeoutHeight, disabledTimeoutTimestamp) ack = ibctesting.TestHash + channelCap = suite.chainB.GetChannelCapability(channelB.PortID, channelB.ID) }, true, }, + {"channel not found", func() { + // use wrong channel naming + _, _, _, _, channelA, channelB := suite.coordinator.Setup(suite.chainA, suite.chainB, types.UNORDERED) + packet = types.NewPacket(validPacketData, 1, channelA.PortID, channelA.ID, ibctesting.InvalidID, ibctesting.InvalidID, timeoutHeight, disabledTimeoutTimestamp) + ack = ibctesting.TestHash + channelCap = suite.chainB.GetChannelCapability(channelB.PortID, channelB.ID) + }, false}, + {"channel not open", func() { + _, _, _, _, channelA, channelB := suite.coordinator.Setup(suite.chainA, suite.chainB, types.UNORDERED) + packet = types.NewPacket(validPacketData, 1, channelA.PortID, channelA.ID, channelB.PortID, channelB.ID, timeoutHeight, disabledTimeoutTimestamp) + ack = ibctesting.TestHash + + err := suite.coordinator.SetChannelClosed(suite.chainB, suite.chainA, channelB) + suite.Require().NoError(err) + channelCap = suite.chainB.GetChannelCapability(channelB.PortID, channelB.ID) + }, false}, + { + "capability authentication failed", + func() { + _, _, _, _, channelA, channelB := suite.coordinator.Setup(suite.chainA, suite.chainB, types.UNORDERED) + packet = types.NewPacket(validPacketData, 1, channelA.PortID, channelA.ID, channelB.PortID, channelB.ID, timeoutHeight, disabledTimeoutTimestamp) + ack = ibctesting.TestHash + channelCap = capabilitytypes.NewCapability(3) + }, + false, + }, { "no-op, already acked", func() { @@ -431,6 +425,7 @@ func (suite *KeeperTestSuite) TestWriteAcknowledgement() { packet = types.NewPacket(validPacketData, 1, channelA.PortID, channelA.ID, channelB.PortID, channelB.ID, timeoutHeight, disabledTimeoutTimestamp) ack = ibctesting.TestHash suite.chainB.App.IBCKeeper.ChannelKeeper.SetPacketAcknowledgement(suite.chainB.GetContext(), packet.GetDestPort(), packet.GetDestChannel(), packet.GetSequence(), ack) + channelCap = suite.chainB.GetChannelCapability(channelB.PortID, channelB.ID) }, false, }, @@ -440,6 +435,7 @@ func (suite *KeeperTestSuite) TestWriteAcknowledgement() { _, _, _, _, channelA, channelB := suite.coordinator.Setup(suite.chainA, suite.chainB, types.UNORDERED) packet = types.NewPacket(validPacketData, 1, channelA.PortID, channelA.ID, channelB.PortID, channelB.ID, timeoutHeight, disabledTimeoutTimestamp) ack = nil + channelCap = suite.chainB.GetChannelCapability(channelB.PortID, channelB.ID) }, false, }, @@ -451,7 +447,7 @@ func (suite *KeeperTestSuite) TestWriteAcknowledgement() { tc.malleate() - err := suite.chainB.App.IBCKeeper.ChannelKeeper.WriteAcknowledgement(suite.chainB.GetContext(), packet, ack) + err := suite.chainB.App.IBCKeeper.ChannelKeeper.WriteAcknowledgement(suite.chainB.GetContext(), channelCap, packet, ack) if tc.expPass { suite.Require().NoError(err) @@ -466,7 +462,9 @@ func (suite *KeeperTestSuite) TestWriteAcknowledgement() { func (suite *KeeperTestSuite) TestAcknowledgePacket() { var ( packet types.Packet - ack = ibctesting.TestHash + ack = ibcmock.MockAcknowledgement + + channelCap *capabilitytypes.Capability ) testCases := []testCase{ @@ -478,11 +476,10 @@ func (suite *KeeperTestSuite) TestAcknowledgePacket() { suite.Require().NoError(err) // create packet receipt and acknowledgement - err = suite.coordinator.WriteReceipt(suite.chainB, suite.chainA, packet, clientA) + err = suite.coordinator.RecvPacket(suite.chainA, suite.chainB, clientA, packet) suite.Require().NoError(err) - err = suite.coordinator.WriteAcknowledgement(suite.chainB, suite.chainA, packet, clientA) - suite.Require().NoError(err) + channelCap = suite.chainA.GetChannelCapability(channelA.PortID, channelA.ID) }, true}, {"success on unordered channel", func() { // setup uses an UNORDERED channel @@ -494,11 +491,10 @@ func (suite *KeeperTestSuite) TestAcknowledgePacket() { suite.Require().NoError(err) // create packet receipt and acknowledgement - err = suite.coordinator.WriteReceipt(suite.chainB, suite.chainA, packet, clientA) + err = suite.coordinator.RecvPacket(suite.chainA, suite.chainB, clientA, packet) suite.Require().NoError(err) - err = suite.coordinator.WriteAcknowledgement(suite.chainB, suite.chainA, packet, clientA) - suite.Require().NoError(err) + channelCap = suite.chainA.GetChannelCapability(channelA.PortID, channelA.ID) }, true}, {"channel not found", func() { // use wrong channel naming @@ -511,16 +507,32 @@ func (suite *KeeperTestSuite) TestAcknowledgePacket() { err := suite.coordinator.SetChannelClosed(suite.chainA, suite.chainB, channelA) suite.Require().NoError(err) + channelCap = suite.chainA.GetChannelCapability(channelA.PortID, channelA.ID) + }, false}, + {"capability authentication failed", func() { + clientA, clientB, _, _, channelA, channelB := suite.coordinator.Setup(suite.chainA, suite.chainB, types.ORDERED) + packet = types.NewPacket(validPacketData, 1, channelA.PortID, channelA.ID, channelB.PortID, channelB.ID, timeoutHeight, disabledTimeoutTimestamp) + // create packet commitment + err := suite.coordinator.SendPacket(suite.chainA, suite.chainB, packet, clientB) + suite.Require().NoError(err) + + // create packet receipt and acknowledgement + err = suite.coordinator.RecvPacket(suite.chainA, suite.chainB, clientA, packet) + suite.Require().NoError(err) + + channelCap = capabilitytypes.NewCapability(3) }, false}, {"packet destination port ≠ channel counterparty port", func() { _, _, _, _, channelA, channelB := suite.coordinator.Setup(suite.chainA, suite.chainB, types.UNORDERED) // use wrong port for dest packet = types.NewPacket(validPacketData, 1, channelA.PortID, channelA.ID, ibctesting.InvalidID, channelB.ID, timeoutHeight, disabledTimeoutTimestamp) + channelCap = suite.chainA.GetChannelCapability(channelA.PortID, channelA.ID) }, false}, {"packet destination channel ID ≠ channel counterparty channel ID", func() { _, _, _, _, channelA, channelB := suite.coordinator.Setup(suite.chainA, suite.chainB, types.UNORDERED) // use wrong channel for dest packet = types.NewPacket(validPacketData, 1, channelA.PortID, channelA.ID, channelB.PortID, ibctesting.InvalidID, timeoutHeight, disabledTimeoutTimestamp) + channelCap = suite.chainA.GetChannelCapability(channelA.PortID, channelA.ID) }, false}, {"connection not found", func() { channelA := ibctesting.TestChannel{PortID: portID, ID: channelIDA} @@ -532,6 +544,8 @@ func (suite *KeeperTestSuite) TestAcknowledgePacket() { types.NewChannel(types.OPEN, types.ORDERED, types.NewCounterparty(channelA.PortID, channelA.ID), []string{connIDB}, channelB.Version), ) packet = types.NewPacket(validPacketData, 1, channelA.PortID, channelA.ID, channelB.PortID, channelB.ID, timeoutHeight, disabledTimeoutTimestamp) + suite.chainA.CreateChannelCapability(channelA.PortID, channelA.ID) + channelCap = suite.chainA.GetChannelCapability(channelA.PortID, channelA.ID) }, false}, {"connection not OPEN", func() { clientA, clientB := suite.coordinator.SetupClients(suite.chainA, suite.chainB, ibctesting.Tendermint) @@ -548,11 +562,14 @@ func (suite *KeeperTestSuite) TestAcknowledgePacket() { types.NewChannel(types.OPEN, types.ORDERED, types.NewCounterparty(channelB.PortID, channelB.ID), []string{connA.ID}, channelA.Version), ) packet = types.NewPacket(validPacketData, 1, channelA.PortID, channelA.ID, channelB.PortID, channelB.ID, timeoutHeight, disabledTimeoutTimestamp) + suite.chainA.CreateChannelCapability(channelA.PortID, channelA.ID) + channelCap = suite.chainA.GetChannelCapability(channelA.PortID, channelA.ID) }, false}, {"packet hasn't been sent", func() { // packet commitment never written _, _, _, _, channelA, channelB := suite.coordinator.Setup(suite.chainA, suite.chainB, types.UNORDERED) packet = types.NewPacket(validPacketData, 1, channelA.PortID, channelA.ID, channelB.PortID, channelB.ID, timeoutHeight, disabledTimeoutTimestamp) + channelCap = suite.chainA.GetChannelCapability(channelA.PortID, channelA.ID) }, false}, {"packet ack verification failed", func() { // ack never written @@ -561,6 +578,7 @@ func (suite *KeeperTestSuite) TestAcknowledgePacket() { // create packet commitment suite.coordinator.SendPacket(suite.chainA, suite.chainB, packet, clientB) + channelCap = suite.chainA.GetChannelCapability(channelA.PortID, channelA.ID) }, false}, {"next ack sequence not found", func() { _, _, connA, connB := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, ibctesting.Tendermint) @@ -576,8 +594,10 @@ func (suite *KeeperTestSuite) TestAcknowledgePacket() { // manually set packet commitment suite.chainA.App.IBCKeeper.ChannelKeeper.SetPacketCommitment(suite.chainA.GetContext(), channelA.PortID, channelA.ID, packet.GetSequence(), ibctesting.TestHash) - // manually set packet acknowledgement + // manually set packet acknowledgement and capability suite.chainB.App.IBCKeeper.ChannelKeeper.SetPacketAcknowledgement(suite.chainB.GetContext(), channelB.PortID, channelB.ID, packet.GetSequence(), ibctesting.TestHash) + suite.chainA.CreateChannelCapability(channelA.PortID, channelA.ID) + channelCap = suite.chainA.GetChannelCapability(channelA.PortID, channelA.ID) }, false}, {"next ack sequence mismatch", func() { clientA, clientB, _, _, channelA, channelB := suite.coordinator.Setup(suite.chainA, suite.chainB, types.ORDERED) @@ -587,14 +607,12 @@ func (suite *KeeperTestSuite) TestAcknowledgePacket() { suite.Require().NoError(err) // create packet acknowledgement - err = suite.coordinator.WriteReceipt(suite.chainB, suite.chainA, packet, clientA) - suite.Require().NoError(err) - - err = suite.coordinator.WriteAcknowledgement(suite.chainB, suite.chainA, packet, clientA) + err = suite.coordinator.RecvPacket(suite.chainA, suite.chainB, clientA, packet) suite.Require().NoError(err) // set next sequence ack wrong suite.chainA.App.IBCKeeper.ChannelKeeper.SetNextSequenceAck(suite.chainA.GetContext(), channelA.PortID, channelA.ID, 10) + channelCap = suite.chainA.GetChannelCapability(channelA.PortID, channelA.ID) }, false}, } @@ -607,84 +625,7 @@ func (suite *KeeperTestSuite) TestAcknowledgePacket() { packetKey := host.KeyPacketAcknowledgement(packet.GetDestPort(), packet.GetDestChannel(), packet.GetSequence()) proof, proofHeight := suite.chainB.QueryProof(packetKey) - err := suite.chainA.App.IBCKeeper.ChannelKeeper.AcknowledgePacket(suite.chainA.GetContext(), packet, ack, proof, proofHeight) - - if tc.expPass { - suite.Require().NoError(err) - } else { - suite.Require().Error(err) - } - }) - } -} - -// TestAcknowledgementExectued verifies that packet commitments are deleted on chainA -// after capabilities are verified. -func (suite *KeeperTestSuite) TestAcknowledgementExecuted() { - var ( - packet types.Packet - chanCap *capabilitytypes.Capability - ) - - testCases := []testCase{ - {"success ORDERED", func() { - clientA, clientB, _, _, channelA, channelB := suite.coordinator.Setup(suite.chainA, suite.chainB, types.ORDERED) - - packet = types.NewPacket(validPacketData, 1, channelA.PortID, channelA.ID, channelB.PortID, channelB.ID, timeoutHeight, disabledTimeoutTimestamp) - - // create packet commitment - err := suite.coordinator.SendPacket(suite.chainA, suite.chainB, packet, clientB) - suite.Require().NoError(err) - - // create packet receipt and acknowledgement - err = suite.coordinator.WriteReceipt(suite.chainB, suite.chainA, packet, clientA) - suite.Require().NoError(err) - - err = suite.coordinator.WriteAcknowledgement(suite.chainB, suite.chainA, packet, clientA) - suite.Require().NoError(err) - - chanCap = suite.chainA.GetChannelCapability(channelA.PortID, channelA.ID) - - }, true}, - {"success UNORDERED", func() { - // setup uses an UNORDERED channel - clientA, clientB, _, _, channelA, channelB := suite.coordinator.Setup(suite.chainA, suite.chainB, types.UNORDERED) - packet = types.NewPacket(validPacketData, 1, channelA.PortID, channelA.ID, channelB.PortID, channelB.ID, timeoutHeight, disabledTimeoutTimestamp) - - // create packet commitment - err := suite.coordinator.SendPacket(suite.chainA, suite.chainB, packet, clientB) - suite.Require().NoError(err) - - // create packet receipt and acknowledgement - err = suite.coordinator.WriteReceipt(suite.chainB, suite.chainA, packet, clientA) - suite.Require().NoError(err) - - err = suite.coordinator.WriteAcknowledgement(suite.chainB, suite.chainA, packet, clientA) - suite.Require().NoError(err) - - chanCap = suite.chainA.GetChannelCapability(channelA.PortID, channelA.ID) - }, true}, - {"channel not found", func() { - // use wrong channel naming - _, _, _, _, _, channelB := suite.coordinator.Setup(suite.chainA, suite.chainB, types.UNORDERED) - packet = types.NewPacket(validPacketData, 1, ibctesting.InvalidID, ibctesting.InvalidID, channelB.PortID, channelB.ID, timeoutHeight, disabledTimeoutTimestamp) - }, false}, - {"incorrect capability", func() { - _, _, _, _, channelA, channelB := suite.coordinator.Setup(suite.chainA, suite.chainB, types.UNORDERED) - packet = types.NewPacket(validPacketData, 1, channelA.PortID, channelA.ID, channelB.PortID, channelB.ID, timeoutHeight, disabledTimeoutTimestamp) - - chanCap = capabilitytypes.NewCapability(100) - }, false}, - } - - for i, tc := range testCases { - tc := tc - suite.Run(fmt.Sprintf("Case %s, %d/%d tests", tc.msg, i, len(testCases)), func() { - suite.SetupTest() // reset - - tc.malleate() - - err := suite.chainA.App.IBCKeeper.ChannelKeeper.AcknowledgementExecuted(suite.chainA.GetContext(), chanCap, packet) + err := suite.chainA.App.IBCKeeper.ChannelKeeper.AcknowledgePacket(suite.chainA.GetContext(), channelCap, packet, ack, proof, proofHeight) pc := suite.chainA.App.IBCKeeper.ChannelKeeper.GetPacketCommitment(suite.chainA.GetContext(), packet.GetSourcePort(), packet.GetSourceChannel(), packet.GetSequence()) channelA, _ := suite.chainA.App.IBCKeeper.ChannelKeeper.GetChannel(suite.chainA.GetContext(), packet.GetSourcePort(), packet.GetSourceChannel()) diff --git a/x/ibc/core/keeper/msg_server.go b/x/ibc/core/keeper/msg_server.go index d26ea627b0..01d3dae311 100644 --- a/x/ibc/core/keeper/msg_server.go +++ b/x/ibc/core/keeper/msg_server.go @@ -431,7 +431,7 @@ func (k Keeper) RecvPacket(goCtx context.Context, msg *channeltypes.MsgRecvPacke } // Perform TAO verification - if err := k.ChannelKeeper.RecvPacket(ctx, msg.Packet, msg.Proof, msg.ProofHeight); err != nil { + if err := k.ChannelKeeper.RecvPacket(ctx, cap, msg.Packet, msg.Proof, msg.ProofHeight); err != nil { return nil, sdkerrors.Wrap(err, "receive packet verification failed") } @@ -441,15 +441,11 @@ func (k Keeper) RecvPacket(goCtx context.Context, msg *channeltypes.MsgRecvPacke return nil, sdkerrors.Wrap(err, "receive packet callback failed") } - if err := k.ChannelKeeper.WriteReceipt(ctx, cap, msg.Packet); err != nil { - return nil, err - } - // Set packet acknowledgement only if the acknowledgement is not nil. // NOTE: IBC applications modules may call the WriteAcknowledgement asynchronously if the // acknowledgement is nil. if ack != nil { - if err := k.ChannelKeeper.WriteAcknowledgement(ctx, msg.Packet, ack); err != nil { + if err := k.ChannelKeeper.WriteAcknowledgement(ctx, cap, msg.Packet, ack); err != nil { return nil, err } } @@ -586,7 +582,7 @@ func (k Keeper) Acknowledgement(goCtx context.Context, msg *channeltypes.MsgAckn } // Perform TAO verification - if err := k.ChannelKeeper.AcknowledgePacket(ctx, msg.Packet, msg.Acknowledgement, msg.Proof, msg.ProofHeight); err != nil { + if err := k.ChannelKeeper.AcknowledgePacket(ctx, cap, msg.Packet, msg.Acknowledgement, msg.Proof, msg.ProofHeight); err != nil { return nil, sdkerrors.Wrap(err, "acknowledge packet verification failed") } @@ -596,11 +592,6 @@ func (k Keeper) Acknowledgement(goCtx context.Context, msg *channeltypes.MsgAckn return nil, sdkerrors.Wrap(err, "acknowledge packet callback failed") } - // Delete packet commitment - if err = k.ChannelKeeper.AcknowledgementExecuted(ctx, cap, msg.Packet); err != nil { - return nil, err - } - defer func() { telemetry.IncrCounterWithLabels( []string{"tx", "msg", "ibc", msg.Type()}, diff --git a/x/ibc/core/keeper/msg_server_test.go b/x/ibc/core/keeper/msg_server_test.go index 0e1f6aab77..0bed10ae7a 100644 --- a/x/ibc/core/keeper/msg_server_test.go +++ b/x/ibc/core/keeper/msg_server_test.go @@ -15,6 +15,7 @@ import ( "github.com/cosmos/cosmos-sdk/x/ibc/core/keeper" ibctmtypes "github.com/cosmos/cosmos-sdk/x/ibc/light-clients/07-tendermint/types" ibctesting "github.com/cosmos/cosmos-sdk/x/ibc/testing" + ibcmock "github.com/cosmos/cosmos-sdk/x/ibc/testing/mock" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" ) @@ -49,7 +50,7 @@ func TestIBCTestSuite(t *testing.T) { // tests the IBC handler receiving a packet on ordered and unordered channels. // It verifies that the storing of an acknowledgement on success occurs. It // tests high level properties like ordering and basic sanity checks. More -// rigorous testing of 'RecvPacket' and 'WriteReceipt' can be found in the +// rigorous testing of 'RecvPacket' can be found in the // 04-channel/keeper/packet_test.go. func (suite *KeeperTestSuite) TestHandleRecvPacket() { var ( @@ -113,7 +114,7 @@ func (suite *KeeperTestSuite) TestHandleRecvPacket() { err := suite.coordinator.SendPacket(suite.chainA, suite.chainB, packet, clientB) suite.Require().NoError(err) - err = suite.coordinator.WriteReceipt(suite.chainB, suite.chainA, packet, clientA) + err = suite.coordinator.RecvPacket(suite.chainA, suite.chainB, clientA, packet) suite.Require().NoError(err) }, false}, {"UNORDERED: packet already received (replay)", func() { @@ -124,7 +125,7 @@ func (suite *KeeperTestSuite) TestHandleRecvPacket() { err := suite.coordinator.SendPacket(suite.chainA, suite.chainB, packet, clientB) suite.Require().NoError(err) - err = suite.coordinator.WriteReceipt(suite.chainB, suite.chainA, packet, clientA) + err = suite.coordinator.RecvPacket(suite.chainA, suite.chainB, clientA, packet) suite.Require().NoError(err) }, false}, } @@ -167,7 +168,7 @@ func (suite *KeeperTestSuite) TestHandleRecvPacket() { // tests the IBC handler acknowledgement of a packet on ordered and unordered // channels. It verifies that the deletion of packet commitments from state // occurs. It test high level properties like ordering and basic sanity -// checks. More rigorous testing of 'AcknowledgePacket' and 'AcknowledgementExecuted' +// checks. More rigorous testing of 'AcknowledgePacket' // can be found in the 04-channel/keeper/packet_test.go. func (suite *KeeperTestSuite) TestHandleAcknowledgePacket() { var ( @@ -186,10 +187,7 @@ func (suite *KeeperTestSuite) TestHandleAcknowledgePacket() { err := suite.coordinator.SendPacket(suite.chainA, suite.chainB, packet, clientB) suite.Require().NoError(err) - err = suite.coordinator.WriteReceipt(suite.chainB, suite.chainA, packet, clientA) - suite.Require().NoError(err) - - err = suite.coordinator.WriteAcknowledgement(suite.chainB, suite.chainA, packet, clientA) + err = suite.coordinator.RecvPacket(suite.chainA, suite.chainB, clientA, packet) suite.Require().NoError(err) }, true}, {"success: UNORDERED", func() { @@ -199,10 +197,7 @@ func (suite *KeeperTestSuite) TestHandleAcknowledgePacket() { err := suite.coordinator.SendPacket(suite.chainA, suite.chainB, packet, clientB) suite.Require().NoError(err) - err = suite.coordinator.WriteReceipt(suite.chainB, suite.chainA, packet, clientA) - suite.Require().NoError(err) - - err = suite.coordinator.WriteAcknowledgement(suite.chainB, suite.chainA, packet, clientA) + err = suite.coordinator.RecvPacket(suite.chainA, suite.chainB, clientA, packet) suite.Require().NoError(err) }, true}, {"success: UNORDERED acknowledge out of order packet", func() { @@ -216,10 +211,7 @@ func (suite *KeeperTestSuite) TestHandleAcknowledgePacket() { err := suite.coordinator.SendPacket(suite.chainA, suite.chainB, packet, clientB) suite.Require().NoError(err) - err = suite.coordinator.WriteReceipt(suite.chainB, suite.chainA, packet, clientA) - suite.Require().NoError(err) - - err = suite.coordinator.WriteAcknowledgement(suite.chainB, suite.chainA, packet, clientA) + err = suite.coordinator.RecvPacket(suite.chainA, suite.chainB, clientA, packet) suite.Require().NoError(err) } }, true}, @@ -233,10 +225,7 @@ func (suite *KeeperTestSuite) TestHandleAcknowledgePacket() { err := suite.coordinator.SendPacket(suite.chainA, suite.chainB, packet, clientB) suite.Require().NoError(err) - err = suite.coordinator.WriteReceipt(suite.chainB, suite.chainA, packet, clientA) - suite.Require().NoError(err) - - err = suite.coordinator.WriteAcknowledgement(suite.chainB, suite.chainA, packet, clientA) + err = suite.coordinator.RecvPacket(suite.chainA, suite.chainB, clientA, packet) suite.Require().NoError(err) } }, false}, @@ -258,16 +247,13 @@ func (suite *KeeperTestSuite) TestHandleAcknowledgePacket() { err := suite.coordinator.SendPacket(suite.chainA, suite.chainB, packet, clientB) suite.Require().NoError(err) - err = suite.coordinator.WriteReceipt(suite.chainB, suite.chainA, packet, clientA) + err = suite.coordinator.RecvPacket(suite.chainA, suite.chainB, clientA, packet) suite.Require().NoError(err) - err = suite.coordinator.WriteAcknowledgement(suite.chainB, suite.chainA, packet, clientA) - suite.Require().NoError(err) - - err = suite.coordinator.AcknowledgementExecuted(suite.chainA, suite.chainB, packet, clientB) + err = suite.coordinator.AcknowledgePacket(suite.chainA, suite.chainB, clientB, packet, ibctesting.TestHash) suite.Require().NoError(err) }, false}, - {"UNORDERED: packet already received (replay)", func() { + {"UNORDERED: packet already acknowledged (replay)", func() { clientA, clientB, _, _, channelA, channelB := suite.coordinator.Setup(suite.chainA, suite.chainB, channeltypes.UNORDERED) packet = channeltypes.NewPacket(ibctesting.MockCommitment, 1, channelA.PortID, channelA.ID, channelB.PortID, channelB.ID, timeoutHeight, 0) @@ -275,13 +261,10 @@ func (suite *KeeperTestSuite) TestHandleAcknowledgePacket() { err := suite.coordinator.SendPacket(suite.chainA, suite.chainB, packet, clientB) suite.Require().NoError(err) - err = suite.coordinator.WriteReceipt(suite.chainB, suite.chainA, packet, clientA) + err = suite.coordinator.RecvPacket(suite.chainA, suite.chainB, clientA, packet) suite.Require().NoError(err) - err = suite.coordinator.WriteAcknowledgement(suite.chainB, suite.chainA, packet, clientA) - suite.Require().NoError(err) - - err = suite.coordinator.AcknowledgementExecuted(suite.chainA, suite.chainB, packet, clientB) + err = suite.coordinator.AcknowledgePacket(suite.chainA, suite.chainB, clientB, packet, ibctesting.TestHash) suite.Require().NoError(err) }, false}, } @@ -298,7 +281,7 @@ func (suite *KeeperTestSuite) TestHandleAcknowledgePacket() { packetKey := host.KeyPacketAcknowledgement(packet.GetDestPort(), packet.GetDestChannel(), packet.GetSequence()) proof, proofHeight := suite.chainB.QueryProof(packetKey) - msg := channeltypes.NewMsgAcknowledgement(packet, ibctesting.MockAcknowledgement, proof, proofHeight, suite.chainA.SenderAccount.GetAddress()) + msg := channeltypes.NewMsgAcknowledgement(packet, ibcmock.MockAcknowledgement, proof, proofHeight, suite.chainA.SenderAccount.GetAddress()) _, err := keeper.Keeper.Acknowledgement(*suite.chainA.App.IBCKeeper, sdk.WrapSDKContext(suite.chainA.GetContext()), msg) diff --git a/x/ibc/light-clients/07-tendermint/types/client_state_test.go b/x/ibc/light-clients/07-tendermint/types/client_state_test.go index b032e68b12..4f82044664 100644 --- a/x/ibc/light-clients/07-tendermint/types/client_state_test.go +++ b/x/ibc/light-clients/07-tendermint/types/client_state_test.go @@ -10,6 +10,7 @@ import ( "github.com/cosmos/cosmos-sdk/x/ibc/core/exported" "github.com/cosmos/cosmos-sdk/x/ibc/light-clients/07-tendermint/types" ibctesting "github.com/cosmos/cosmos-sdk/x/ibc/testing" + ibcmock "github.com/cosmos/cosmos-sdk/x/ibc/testing/mock" ) const ( @@ -465,10 +466,7 @@ func (suite *TendermintTestSuite) TestVerifyPacketAcknowledgement() { suite.Require().NoError(err) // write receipt and ack - err = suite.coordinator.WriteReceipt(suite.chainB, suite.chainA, packet, clientA) - suite.Require().NoError(err) - - err = suite.coordinator.WriteAcknowledgement(suite.chainB, suite.chainA, packet, clientA) + err = suite.coordinator.RecvPacket(suite.chainA, suite.chainB, clientA, packet) suite.Require().NoError(err) var ok bool @@ -488,7 +486,7 @@ func (suite *TendermintTestSuite) TestVerifyPacketAcknowledgement() { err = clientState.VerifyPacketAcknowledgement( store, suite.chainA.Codec, proofHeight, &prefix, proof, - packet.GetDestPort(), packet.GetDestChannel(), packet.GetSequence(), ibctesting.TestHash, + packet.GetDestPort(), packet.GetDestChannel(), packet.GetSequence(), ibcmock.MockAcknowledgement, ) if tc.expPass { @@ -635,15 +633,15 @@ func (suite *TendermintTestSuite) TestVerifyNextSeqRecv() { suite.SetupTest() // reset // setup testing conditions - clientA, clientB, _, _, channelA, channelB := suite.coordinator.Setup(suite.chainA, suite.chainB, channeltypes.UNORDERED) + clientA, clientB, _, _, channelA, channelB := suite.coordinator.Setup(suite.chainA, suite.chainB, channeltypes.ORDERED) packet := channeltypes.NewPacket(ibctesting.TestHash, 1, channelA.PortID, channelA.ID, channelB.PortID, channelB.ID, clienttypes.NewHeight(0, 100), 0) // send packet err := suite.coordinator.SendPacket(suite.chainA, suite.chainB, packet, clientB) suite.Require().NoError(err) - // write receipt, next seq recv incremented - err = suite.coordinator.WriteReceipt(suite.chainB, suite.chainA, packet, clientA) + // next seq recv incremented + err = suite.coordinator.RecvPacket(suite.chainA, suite.chainB, clientA, packet) suite.Require().NoError(err) // need to update chainA's client representing chainB @@ -666,7 +664,7 @@ func (suite *TendermintTestSuite) TestVerifyNextSeqRecv() { err = clientState.VerifyNextSequenceRecv( store, suite.chainA.Codec, proofHeight, &prefix, proof, - packet.GetDestPort(), packet.GetDestChannel(), packet.GetSequence(), + packet.GetDestPort(), packet.GetDestChannel(), packet.GetSequence()+1, ) if tc.expPass { diff --git a/x/ibc/testing/chain.go b/x/ibc/testing/chain.go index 4ef4676eef..2c0554c6aa 100644 --- a/x/ibc/testing/chain.go +++ b/x/ibc/testing/chain.go @@ -881,51 +881,14 @@ func (chain *TestChain) SendPacket( return nil } -// WriteReceipt simulates receiving and writing a receipt to the chain. -func (chain *TestChain) WriteReceipt( +// WriteAcknowledgement simulates writing an acknowledgement to the chain. +func (chain *TestChain) WriteAcknowledgement( packet exported.PacketI, ) error { channelCap := chain.GetChannelCapability(packet.GetDestPort(), packet.GetDestChannel()) // no need to send message, acting as a handler - err := chain.App.IBCKeeper.ChannelKeeper.WriteReceipt(chain.GetContext(), channelCap, packet) - if err != nil { - return err - } - - // commit changes - chain.App.Commit() - chain.NextBlock() - - return nil -} - -// WriteAcknowledgement simulates writing an acknowledgement to the chain. -func (chain *TestChain) WriteAcknowledgement( - packet exported.PacketI, -) error { - // no need to send message, acting as a handler - err := chain.App.IBCKeeper.ChannelKeeper.WriteAcknowledgement(chain.GetContext(), packet, TestHash) - if err != nil { - return err - } - - // commit changes - chain.App.Commit() - chain.NextBlock() - - return nil -} - -// AcknowledgementExecuted simulates deleting a packet commitment with the -// given packet sequence. -func (chain *TestChain) AcknowledgementExecuted( - packet exported.PacketI, -) error { - channelCap := chain.GetChannelCapability(packet.GetSourcePort(), packet.GetSourceChannel()) - - // no need to send message, acting as a handler - err := chain.App.IBCKeeper.ChannelKeeper.AcknowledgementExecuted(chain.GetContext(), channelCap, packet) + err := chain.App.IBCKeeper.ChannelKeeper.WriteAcknowledgement(chain.GetContext(), channelCap, packet, TestHash) if err != nil { return err } diff --git a/x/ibc/testing/coordinator.go b/x/ibc/testing/coordinator.go index 6dbacee50f..7ead436abe 100644 --- a/x/ibc/testing/coordinator.go +++ b/x/ibc/testing/coordinator.go @@ -247,25 +247,6 @@ func (coord *Coordinator) RecvPacket( return coord.SendMsgs(counterparty, source, sourceClient, []sdk.Msg{recvMsg}) } -// WriteReceipt receives a packet through the channel keeper on the source chain, writes a receipt, and updates the -// counterparty client for the source chain. -func (coord *Coordinator) WriteReceipt( - source, counterparty *TestChain, - packet exported.PacketI, - counterpartyClientID string, -) error { - if err := source.WriteReceipt(packet); err != nil { - return err - } - coord.IncrementTime() - - // update source client on counterparty connection - return coord.UpdateClient( - counterparty, source, - counterpartyClientID, Tendermint, - ) -} - // WriteAcknowledgement writes an acknowledgement to the channel keeper on the source chain and updates the // counterparty client for the source chain. func (coord *Coordinator) WriteAcknowledgement( @@ -303,25 +284,6 @@ func (coord *Coordinator) AcknowledgePacket( return coord.SendMsgs(source, counterparty, counterpartyClient, []sdk.Msg{ackMsg}) } -// AcknowledgementExecuted deletes the packet commitment with the given -// packet sequence since the acknowledgement has been verified. -func (coord *Coordinator) AcknowledgementExecuted( - source, counterparty *TestChain, - packet exported.PacketI, - counterpartyClientID string, -) error { - if err := source.AcknowledgementExecuted(packet); err != nil { - return err - } - coord.IncrementTime() - - // update source client on counterparty connection - return coord.UpdateClient( - counterparty, source, - counterpartyClientID, Tendermint, - ) -} - // RelayPacket receives a channel packet on counterparty, queries the ack // and acknowledges the packet on source. The clients are updated as needed. func (coord *Coordinator) RelayPacket( From 4309859bf153ba3bbdf4b4401365348386f28f9e Mon Sep 17 00:00:00 2001 From: Amaury Martiny Date: Fri, 6 Nov 2020 02:25:38 +0100 Subject: [PATCH 049/136] Small fixes in docs and error messages (#7826) * Small fixes in docs and error messages * Add chain id Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com> --- docs/run-node/interact-node.md | 8 ++++---- docs/run-node/keyring.md | 2 +- docs/run-node/run-node.md | 8 ++++---- types/tx/types.go | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/run-node/interact-node.md b/docs/run-node/interact-node.md index 40cb58424b..78c8b75002 100644 --- a/docs/run-node/interact-node.md +++ b/docs/run-node/interact-node.md @@ -19,10 +19,10 @@ simd query account $MY_VALIDATOR_ADDRESS --chain-id my-test-chain You should see the current balance of the account you created, equal to the original balance of `stake` you granted it minus the amount you delegated via the `gentx`. Now, create a second account: ```bash -simd keys add recipient +simd keys add recipient --keyring-backend test # Put the generated address in a variable for later use. -RECIPIENT=$(simd keys show recipient -a) +RECIPIENT=$(simd keys show recipient -a --keyring-backend test) ``` The command above creates a local key-pair that is not yet registered on the chain. An account is created the first time it receives tokens from another account. Now, run the following command to send tokens to the `recipient` account: @@ -37,10 +37,10 @@ simd query account $RECIPIENT --chain-id my-test-chain Finally, delegate some of the stake tokens sent to the `recipient` account to the validator: ```bash -simd tx staking delegate $(simd keys show my_validator --bech val -a) 500stake --from recipient --chain-id my-test-chain +simd tx staking delegate $(simd keys show my_validator --bech val -a --keyring-backend test) 500stake --from recipient --chain-id my-test-chain # Query the total delegations to `validator`. -simd query staking delegations-to $(simd keys show my_validator --bech val -a) --chain-id my-test-chain +simd query staking delegations-to $(simd keys show my_validator --bech val -a --keyring-backend test) --chain-id my-test-chain ``` You should see two delegations, the first one made from the `gentx`, and the second one you just performed from the `recipient` account. diff --git a/docs/run-node/keyring.md b/docs/run-node/keyring.md index c32b8dd938..9725007c9f 100644 --- a/docs/run-node/keyring.md +++ b/docs/run-node/keyring.md @@ -115,7 +115,7 @@ To create a new key in the keyring, run the `add` subcommand with a `` $ simd keys add my_validator --keyring-backend test # Put the generated address in a variable for later use. -MY_VALIDATOR_ADDRESS=$(simd keys show my_validator -a) +MY_VALIDATOR_ADDRESS=$(simd keys show my_validator -a --keyring-backend test) ``` This command generates a new 24-word mnemonic phrase, persists it to the relevant backend, and outputs information about the keypair. If this keypair will be used to hold value-bearing tokens, be sure to write down the mnemonic phrase somewhere safe! diff --git a/docs/run-node/run-node.md b/docs/run-node/run-node.md index cda14436ef..05708e63d4 100644 --- a/docs/run-node/run-node.md +++ b/docs/run-node/run-node.md @@ -39,12 +39,12 @@ The `~/.simapp` folder has the following structure: |- priv_validator_key.json # Private key to use as a validator in the consensus protocol. ``` -Before starting the chain, you need to populate the state with at least one account. To do so, first [create a new account in the keyring](./keyring.md#adding-keys-to-the-keyring) named `my_validator` (feel free to choose another name). +Before starting the chain, you need to populate the state with at least one account. To do so, first [create a new account in the keyring](./keyring.md#adding-keys-to-the-keyring) named `my_validator` under the `test` keyring backend (feel free to choose another name and another backend). Now that you have created a local account, go ahead and grant it some `stake` tokens in your chain's genesis file. Doing so will also make sure your chain is aware of this account's existence: ```bash -simd add-genesis-account $(simd keys show my_validator -a) 100000000stake --chain-id my-test-chain +simd add-genesis-account $MY_VALIDATOR_ADDRESS 100000000stake ``` Recall that `$MY_VALIDATOR_ADDRESS` is a variable that holds the address of the `my_validator` key in the [keyring](./keyring.md#adding-keys-to-the-keyring). Also note that the tokens in the SDK have the `{amount}{denom}` format: `amount` is is a 18-digit-precision decimal number, and `denom` is the unique token identifier with its denomination key (e.g. `atom` or `uatom`). Here, we are granting `stake` tokens, as `stake` is the token identifier used for staking in [`simapp`](https://github.com/cosmos/cosmos-sdk/tree/v0.40.0-rc2/simapp). For your own chain with its own staking denom, that token identifier should be used instead. @@ -53,10 +53,10 @@ Now that your account has some tokens, you need to add a validator to your chain ```bash # Create a gentx. -simd gentx --name my_validator --amount 100000stake --chain-id my-test-chain +simd gentx my_validator --amount 100000stake --chain-id my-test-chain --keyring-backend test # Add the gentx to the genesis file. -simd collect-gentxs --chain-id my-test-chain +simd collect-gentxs ``` A `gentx` does three things: diff --git a/types/tx/types.go b/types/tx/types.go index e9066ef41b..436f2cd9bc 100644 --- a/types/tx/types.go +++ b/types/tx/types.go @@ -92,7 +92,7 @@ func (t *Tx) ValidateBasic() error { if len(sigs) != len(t.GetSigners()) { return sdkerrors.Wrapf( sdkerrors.ErrUnauthorized, - "wrong number of signers; expected %d, got %d", t.GetSigners(), len(sigs), + "wrong number of signers; expected %d, got %d", len(t.GetSigners()), len(sigs), ) } From 56c08d11171d32c1afec5053a48879cb639f429e Mon Sep 17 00:00:00 2001 From: Cory Date: Fri, 6 Nov 2020 02:13:52 -0800 Subject: [PATCH 050/136] Bump to tendermint v0.34-rc6 (#7828) * bump to tendermint v0.34-rc6 * update go.mod * tendermint version is now accessible as tmversion.TMCoreSemVer * add changelog entry Co-authored-by: Amaury Martiny --- CHANGELOG.md | 3 + Makefile | 2 +- go.mod | 2 +- go.sum | 10 + server/tm_cmds.go | 2 +- .../proto/tendermint/crypto/keys.proto | 3 +- .../proto/tendermint/types/evidence.proto | 35 +- x/staking/types/staking.pb.go | 1196 ++++++++--------- 8 files changed, 637 insertions(+), 616 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 01067c692c..30a10deafb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,6 +36,9 @@ Ref: https://keepachangelog.com/en/1.0.0/ ## [Unreleased] +### Improvements +* (tendermint) [\#7828](https://github.com/cosmos/cosmos-sdk/pull/7828) Update tendermint dependency to v0.34.0-rc6 + ## [v0.40.0-rc2](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.40.0-rc2) - 2020-11-02 ### Client Breaking diff --git a/Makefile b/Makefile index dd21bbf2da..5eadb43a7c 100644 --- a/Makefile +++ b/Makefile @@ -389,7 +389,7 @@ proto-check-breaking-docker: @$(DOCKER_BUF) check breaking --against-input $(HTTPS_GIT)#branch=master .PHONY: proto-check-breaking-ci -TM_URL = https://raw.githubusercontent.com/tendermint/tendermint/v0.34.0-rc5/proto/tendermint +TM_URL = https://raw.githubusercontent.com/tendermint/tendermint/v0.34.0-rc6/proto/tendermint GOGO_PROTO_URL = https://raw.githubusercontent.com/regen-network/protobuf/cosmos COSMOS_PROTO_URL = https://raw.githubusercontent.com/regen-network/cosmos-proto/master CONFIO_URL = https://raw.githubusercontent.com/confio/ics23/v0.6.3 diff --git a/go.mod b/go.mod index 0dcda260b0..004cb69e0b 100644 --- a/go.mod +++ b/go.mod @@ -45,7 +45,7 @@ require ( github.com/tendermint/btcd v0.1.1 github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15 github.com/tendermint/go-amino v0.16.0 - github.com/tendermint/tendermint v0.34.0-rc5 + github.com/tendermint/tendermint v0.34.0-rc6 github.com/tendermint/tm-db v0.6.2 golang.org/x/crypto v0.0.0-20201012173705-84dcc777aaee golang.org/x/net v0.0.0-20200930145003-4acb6c075d10 // indirect diff --git a/go.sum b/go.sum index 61fc2a908b..6b5e5ed526 100644 --- a/go.sum +++ b/go.sum @@ -105,6 +105,7 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= +github.com/confio/ics23/go v0.0.0-20200817220745-f173e6211efb/go.mod h1:E45NqnlpxGnpfTWL/xauN7MRwEE28T4Dd4uraToOaKg= github.com/confio/ics23/go v0.6.3 h1:PuGK2V1NJWZ8sSkNDq91jgT/cahFEW9RGp4Y5jxulf0= github.com/confio/ics23/go v0.6.3/go.mod h1:E45NqnlpxGnpfTWL/xauN7MRwEE28T4Dd4uraToOaKg= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= @@ -119,6 +120,7 @@ github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfc github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d h1:49RLWk1j44Xu4fjHb6JFYmeUnDORVwHNkDxaQ0ctCVU= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= +github.com/cosmos/iavl v0.15.0-rc3.0.20201009144442-230e9bdf52cd/go.mod h1:3xOIaNNX19p0QrX0VqWa6voPRoJRGGYtny+DH8NEPvE= github.com/cosmos/iavl v0.15.0-rc4 h1:P1wmET7BueqCzfxsn+BzVkDWDLY9ij2JNwkbIdM7RG8= github.com/cosmos/iavl v0.15.0-rc4/go.mod h1:5CsecJdh44Uj4vZ6WSPeWq84hNW5BwRI36ZsAbfJvRw= github.com/cosmos/ledger-cosmos-go v0.11.1 h1:9JIYsGnXP613pb2vPjFeMMjBI5lEDsEaF6oYorTy6J4= @@ -274,12 +276,14 @@ github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0U github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-middleware v1.2.1/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.8.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.5 h1:UImYN5qQ8tuGpGE16ZmjvcTtTw24zw1QAp/SlnNrZhI= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/grpc-ecosystem/grpc-gateway v1.14.7/go.mod h1:oYZKL012gGh6LMyg/xA7Q2yq6j8bu0wa+9w14EEthWU= github.com/grpc-ecosystem/grpc-gateway v1.15.2 h1:HC+hWRWf+v5zTMPyoaYTKIJih+4sd4XRWmj0qlG87Co= github.com/grpc-ecosystem/grpc-gateway v1.15.2/go.mod h1:vO11I9oWA+KsxmfFQPhLnnIb1VDE24M+pdxZFiuZcA8= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c h1:6rhixN/i8ZofjG1Y75iExal34USq5p+wiN1tpie8IrU= @@ -593,6 +597,8 @@ github.com/tendermint/go-amino v0.16.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoM github.com/tendermint/tendermint v0.34.0-rc4/go.mod h1:yotsojf2C1QBOw4dZrTcxbyxmPUrT4hNuOQWX9XUwB4= github.com/tendermint/tendermint v0.34.0-rc5 h1:2bnQfWyOMfTCbol5pwB8CgM2nxi6/Kz6zqlS6Udm/Cg= github.com/tendermint/tendermint v0.34.0-rc5/go.mod h1:yotsojf2C1QBOw4dZrTcxbyxmPUrT4hNuOQWX9XUwB4= +github.com/tendermint/tendermint v0.34.0-rc6 h1:SVuKGvvE22KxfuK8QUHctUrmOWJsncZSYXIYtcnoKN0= +github.com/tendermint/tendermint v0.34.0-rc6/go.mod h1:ugzyZO5foutZImv0Iyx/gOFCX6mjJTgbLHTwi17VDVg= github.com/tendermint/tm-db v0.6.2 h1:DOn8jwCdjJblrCFJbtonEIPD1IuJWpbRUUdR8GWE4RM= github.com/tendermint/tm-db v0.6.2/go.mod h1:GYtQ67SUvATOcoY8/+x6ylk8Qo02BQyLrAs+yAcLvGI= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= @@ -638,6 +644,7 @@ golang.org/x/crypto v0.0.0-20200115085410-6d4e4cb37c7d/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200709230013-948cd5f35899/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201012173705-84dcc777aaee h1:4yd7jl+vXjalO5ztz6Vc1VADv+S/80LGJmyl1ROJ2AI= golang.org/x/crypto v0.0.0-20201012173705-84dcc777aaee/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -802,6 +809,7 @@ google.golang.org/genproto v0.0.0-20200324203455-a04cca1dde73/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201014134559-03b6142f0dc9 h1:fG84H9C3EXfuDlzkG+VEPDYHHExklP6scH1QZ5gQTqU= google.golang.org/genproto v0.0.0-20201014134559-03b6142f0dc9/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= @@ -819,6 +827,7 @@ google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8 google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.32.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.0 h1:IBKSUNL2uBS2DkJBncPP+TwT0sp9tgA8A75NjHt6umg= @@ -838,6 +847,7 @@ gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLks gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b h1:QRR6H1YWRnHb4Y/HeNFCTJLFVxaq6wH4YuVdsUOr75U= gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= diff --git a/server/tm_cmds.go b/server/tm_cmds.go index d6c8b665f9..abea9c116f 100644 --- a/server/tm_cmds.go +++ b/server/tm_cmds.go @@ -114,7 +114,7 @@ against which this app has been compiled. BlockProtocol uint64 P2PProtocol uint64 }{ - Tendermint: tversion.Version, + Tendermint: tversion.TMCoreSemVer, ABCI: tversion.ABCIVersion, BlockProtocol: tversion.BlockProtocol, P2PProtocol: tversion.P2PProtocol, diff --git a/third_party/proto/tendermint/crypto/keys.proto b/third_party/proto/tendermint/crypto/keys.proto index af9db49fc8..16fd7adf3e 100644 --- a/third_party/proto/tendermint/crypto/keys.proto +++ b/third_party/proto/tendermint/crypto/keys.proto @@ -11,6 +11,7 @@ message PublicKey { option (gogoproto.equal) = true; oneof sum { - bytes ed25519 = 1; + bytes ed25519 = 1; + bytes secp256k1 = 2; } } diff --git a/third_party/proto/tendermint/types/evidence.proto b/third_party/proto/tendermint/types/evidence.proto index 5f7d860bf4..3b234571ba 100644 --- a/third_party/proto/tendermint/types/evidence.proto +++ b/third_party/proto/tendermint/types/evidence.proto @@ -4,19 +4,9 @@ package tendermint.types; option go_package = "github.com/tendermint/tendermint/proto/tendermint/types"; import "gogoproto/gogo.proto"; +import "google/protobuf/timestamp.proto"; import "tendermint/types/types.proto"; - -// DuplicateVoteEvidence contains evidence a validator signed two conflicting -// votes. -message DuplicateVoteEvidence { - Vote vote_a = 1; - Vote vote_b = 2; -} - -message LightClientAttackEvidence { - LightBlock conflicting_block = 1; - int64 common_height = 2; -} +import "tendermint/types/validator.proto"; message Evidence { oneof sum { @@ -25,7 +15,24 @@ message Evidence { } } -// EvidenceData contains any evidence of malicious wrong-doing by validators -message EvidenceData { +// DuplicateVoteEvidence contains evidence of a validator signed two conflicting votes. +message DuplicateVoteEvidence { + tendermint.types.Vote vote_a = 1; + tendermint.types.Vote vote_b = 2; + int64 total_voting_power = 3; + int64 validator_power = 4; + google.protobuf.Timestamp timestamp = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; +} + +// LightClientAttackEvidence contains evidence of a set of validators attempting to mislead a light client. +message LightClientAttackEvidence { + tendermint.types.LightBlock conflicting_block = 1; + int64 common_height = 2; + repeated tendermint.types.Validator byzantine_validators = 3; + int64 total_voting_power = 4; + google.protobuf.Timestamp timestamp = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; +} + +message EvidenceList { repeated Evidence evidence = 1 [(gogoproto.nullable) = false]; } diff --git a/x/staking/types/staking.pb.go b/x/staking/types/staking.pb.go index 8b54a0ed29..865953c9dd 100644 --- a/x/staking/types/staking.pb.go +++ b/x/staking/types/staking.pb.go @@ -1216,606 +1216,606 @@ func (this *Pool) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_ func StakingDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} var gzipped = []byte{ - // 9584 bytes of a gzipped FileDescriptorSet + // 9578 bytes of a gzipped FileDescriptorSet 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x7d, 0x6d, 0x70, 0x24, 0xd7, 0x71, 0xd8, 0xcd, 0x7e, 0x00, 0xbb, 0x8d, 0x05, 0xb0, 0x78, 0xc0, 0xdd, 0xed, 0x2d, 0x8f, 0x00, - 0x38, 0xfc, 0x3a, 0x1e, 0x49, 0x80, 0x3c, 0xf2, 0x8e, 0xc7, 0x3d, 0x89, 0x34, 0x16, 0xbb, 0x87, - 0x03, 0x0f, 0x5f, 0x1c, 0x00, 0x47, 0x7d, 0x39, 0x5b, 0x83, 0xdd, 0x87, 0xc5, 0x10, 0xbb, 0x33, - 0xc3, 0x99, 0xd9, 0x3b, 0x80, 0x92, 0xaa, 0x68, 0x49, 0x51, 0xa4, 0x73, 0x1c, 0x49, 0x91, 0xcb, - 0x91, 0x68, 0x9d, 0x22, 0x59, 0x4e, 0xe4, 0xc8, 0x4a, 0xfc, 0x21, 0x45, 0x89, 0x93, 0x54, 0x45, - 0x4a, 0xe2, 0x58, 0x52, 0x2a, 0x2e, 0x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1, 0x4f, 0xf2, 0x6f, 0x0c, 0xc0, 0x68, 0x3f, 0x2e, 0x76, 0x01, 0x92, 0xdb, 0x44, - 0xcb, 0x5c, 0xec, 0x20, 0x36, 0x60, 0x34, 0x41, 0x23, 0x0e, 0x1c, 0xd2, 0x88, 0x73, 0x30, 0xa4, - 0x63, 0xdb, 0xc1, 0x35, 0xe6, 0x11, 0xf1, 0x3e, 0x7d, 0x0a, 0x18, 0x51, 0xbb, 0x4b, 0x25, 0x0e, - 0xe5, 0x52, 0x6f, 0x81, 0x51, 0x57, 0xa4, 0x8a, 0xa5, 0xea, 0x75, 0xe1, 0x9b, 0xb3, 0x51, 0x92, - 0xcc, 0x94, 0x05, 0x9d, 0x42, 0xc8, 0x94, 0x11, 0x1c, 0x78, 0x46, 0x25, 0x00, 0x43, 0xc7, 0xc6, - 0x76, 0xa5, 0x86, 0xab, 0x8d, 0x5c, 0xaa, 0x8b, 0x95, 0x56, 0x09, 0x4a, 0x9b, 0x95, 0x0c, 0x06, - 0xad, 0x36, 0xd0, 0xd3, 0x9e, 0xab, 0x0d, 0x76, 0xf1, 0x94, 0x65, 0x16, 0x64, 0x6d, 0xde, 0xb6, - 0x09, 0x23, 0x16, 0x26, 0x7e, 0x8f, 0x6b, 0x5c, 0xb3, 0x34, 0x15, 0x62, 0x26, 0x52, 0x33, 0x85, - 0x93, 0x31, 0xc5, 0x86, 0x2d, 0xff, 0x23, 0xba, 0x17, 0x5c, 0x40, 0x85, 0xba, 0x15, 0xd0, 0x2c, - 0x94, 0x11, 0xc0, 0x15, 0xb5, 0x89, 0xf3, 0x2f, 0xc3, 0x48, 0xd0, 0x3c, 0x68, 0x02, 0x92, 0xb6, - 0xa3, 0x5a, 0x0e, 0xf5, 0xc2, 0xa4, 0xc2, 0x1e, 0x50, 0x16, 0xe2, 0x58, 0xaf, 0xd1, 0x2c, 0x97, - 0x54, 0xc8, 0x4f, 0xf4, 0x13, 0x9e, 0xc2, 0x71, 0xaa, 0xf0, 0x03, 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d2, 0x59, 0x90, 0x5f, 0x8b, 0x43, 0xc6, - 0x5f, 0xaf, 0x93, 0xe5, 0x4f, 0x95, 0xce, 0x58, 0x12, 0xcd, 0x69, 0xf7, 0xf6, 0xac, 0xee, 0x67, - 0xe6, 0xc9, 0x54, 0x56, 0x18, 0x60, 0xc5, 0xb1, 0xc2, 0x28, 0x49, 0x19, 0x41, 0x9c, 0x0d, 0xb3, - 0x62, 0x24, 0xa5, 0xf0, 0x27, 0xb4, 0x00, 0x03, 0x2f, 0xda, 0x94, 0xf7, 0x00, 0xe5, 0x7d, 0x5f, - 0x6f, 0xde, 0xcf, 0xad, 0x53, 0xe6, 0xe9, 0xe7, 0xd6, 0x2b, 0x2b, 0xab, 0xca, 0xf2, 0xdc, 0x92, - 0xc2, 0xc9, 0xd1, 0x09, 0x48, 0x34, 0xd4, 0x97, 0xf7, 0x83, 0x93, 0x1e, 0x05, 0xf5, 0x3b, 0x08, - 0x27, 0x20, 0x71, 0x0d, 0xab, 0xbb, 0xc1, 0xa9, 0x86, 0x82, 0xee, 0x60, 0x30, 0xcc, 0x42, 0x92, - 0xda, 0x0b, 0x01, 0x70, 0x8b, 0x65, 0x8f, 0xa0, 0x14, 0x24, 0xe6, 0x57, 0x15, 0x12, 0x10, 0x59, - 0xc8, 0x30, 0x68, 0x65, 0x6d, 0xb1, 0x3c, 0x5f, 0xce, 0xc6, 0xe4, 0xb3, 0x30, 0xc0, 0x8c, 0x40, - 0x82, 0xc5, 0x35, 0x43, 0xf6, 0x08, 0x7f, 0xe4, 0x3c, 0x24, 0xd1, 0xba, 0xb9, 0x5c, 0x2c, 0x2b, - 0xd9, 0x58, 0x70, 0xa8, 0x13, 0xd9, 0xa4, 0x6c, 0x43, 0xc6, 0x5f, 0x87, 0xff, 0x68, 0x16, 0xe3, - 0x5f, 0x96, 0x60, 0xc8, 0x57, 0x57, 0x93, 0x82, 0x48, 0x6d, 0x34, 0x8c, 0x6b, 0x15, 0xb5, 0xa1, - 0xa9, 0x36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 0xfd, 0x24, 0xb6, 0x8c, 0x19, 0xf5, 0xe0, 0x6c, - 0x4b, 0xe9, 0x11, 0x40, 0xa6, 0x61, 0x6b, 0x8e, 0x76, 0x15, 0x57, 0x34, 0x5d, 0x6c, 0x3e, 0x91, - 0x65, 0x4d, 0x42, 0xc9, 0x8a, 0x96, 0x45, 0xdd, 0x71, 0xb1, 0x75, 0x5c, 0x57, 0x43, 0xd8, 0x24, - 0x99, 0xc7, 0x95, 0xac, 0x68, 0x71, 0xb1, 0xef, 0x81, 0x4c, 0xcd, 0x68, 0x91, 0x5a, 0x8f, 0xe1, - 0x91, 0xb9, 0x43, 0x52, 0x86, 0x18, 0xcc, 0x45, 0xe1, 0x55, 0xbc, 0xb7, 0xeb, 0x95, 0x51, 0x86, - 0x18, 0x8c, 0xa1, 0x3c, 0x08, 0xa3, 0x6a, 0xbd, 0x6e, 0x11, 0xe6, 0x82, 0x11, 0x5b, 0x97, 0x8c, - 0xb8, 0x60, 0x8a, 0x98, 0x7f, 0x0e, 0x52, 0xc2, 0x0e, 0x64, 0xaa, 0x26, 0x96, 0xa8, 0x98, 0x6c, - 0xb1, 0x1d, 0x3b, 0x95, 0x56, 0x52, 0xba, 0x68, 0xbc, 0x07, 0x32, 0x9a, 0x5d, 0xf1, 0x36, 0xf1, - 0x63, 0xd3, 0xb1, 0x53, 0x29, 0x65, 0x48, 0xb3, 0xdd, 0x0d, 0x50, 0xf9, 0xb3, 0x31, 0x18, 0x09, - 0xbe, 0x84, 0x40, 0x25, 0x48, 0x35, 0x8c, 0xaa, 0x4a, 0x5d, 0x8b, 0xbd, 0x01, 0x3b, 0x15, 0xf1, - 0xde, 0x62, 0x66, 0x89, 0xe3, 0x2b, 0x2e, 0x65, 0xfe, 0xb7, 0x25, 0x48, 0x09, 0x30, 0x3a, 0x06, - 0x09, 0x53, 0x75, 0x76, 0x28, 0xbb, 0x64, 0x31, 0x96, 0x95, 0x14, 0xfa, 0x4c, 0xe0, 0xb6, 0xa9, - 0x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- 0x16, 0x3d, 0xd1, 0xcc, 0xde, 0xfb, 0x7d, 0xd7, 0xcf, 0x03, 0x35, 0x4f, 0xe1, 0x22, 0x0c, 0x07, - 0x0a, 0x9e, 0x68, 0x56, 0xef, 0xe3, 0xac, 0x32, 0xfe, 0x7a, 0xa7, 0x70, 0x16, 0x12, 0xa4, 0x78, - 0x89, 0x26, 0xff, 0xab, 0x9c, 0x9c, 0xa2, 0x17, 0xde, 0x0c, 0x29, 0x51, 0xb4, 0x44, 0x93, 0xbe, - 0x9f, 0x93, 0xba, 0x24, 0x84, 0x5c, 0x14, 0x2c, 0xd1, 0xe4, 0x7f, 0x4d, 0x90, 0x0b, 0x12, 0x42, - 0xde, 0xbf, 0x09, 0xbf, 0xfc, 0xd3, 0x09, 0x3e, 0xe9, 0x08, 0xdb, 0x5d, 0x80, 0x41, 0x5e, 0xa9, - 0x44, 0x53, 0x7f, 0x90, 0x77, 0x2e, 0x28, 0x0a, 0x4f, 0x41, 0xb2, 0x4f, 0x83, 0xff, 0x0c, 0x27, - 0x65, 0xf8, 0x85, 0x79, 0x18, 0xf2, 0x55, 0x27, 0xd1, 0xe4, 0x7f, 0x83, 0x93, 0xfb, 0xa9, 0x88, - 0xe8, 0xbc, 0x3a, 0x89, 0x66, 0xf0, 0x21, 0x21, 0x3a, 0xa7, 0x20, 0x66, 0x13, 0x85, 0x49, 0x34, - 0xf5, 0x87, 0x85, 0xd5, 0x05, 0x49, 0xe1, 0x59, 0x48, 0xbb, 0x93, 0x4d, 0x34, 0xfd, 0x47, 0x38, - 0xbd, 0x47, 0x43, 0x2c, 0xe0, 0x9b, 0xec, 0xa2, 0x59, 0xfc, 0x4d, 0x61, 0x01, 0x1f, 0x15, 0x09, - 0xa3, 0x70, 0x01, 0x13, 0xcd, 0xe9, 0xa3, 0x22, 0x8c, 0x42, 0xf5, 0x0b, 0x19, 0x4d, 0x9a, 0xf3, - 0xa3, 0x59, 0xfc, 0xac, 0x18, 0x4d, 0x8a, 0x4f, 0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, 0x46, 0x2d, 0xca, 0xc2, 0xa7, 0x43, 0xe7, 0x60, 0xd0, 0xb4, + 0x5c, 0xdd, 0x34, 0x9c, 0x42, 0x66, 0x5a, 0x3a, 0x35, 0x74, 0xe6, 0x64, 0x47, 0x47, 0x58, 0x63, + 0x38, 0x8a, 0x40, 0x46, 0x4b, 0x90, 0x77, 0xcc, 0x96, 0xad, 0xe1, 0xaa, 0x66, 0xd6, 0x70, 0x55, + 0x37, 0x76, 0xcc, 0x42, 0x96, 0x32, 0x98, 0x6a, 0x57, 0x84, 0x22, 0xce, 0x9b, 0x35, 0xbc, 0x64, + 0xec, 0x98, 0xca, 0x88, 0x13, 0x6a, 0xa3, 0x63, 0x30, 0xe0, 0xec, 0x1b, 0xae, 0x7a, 0xad, 0x90, + 0xa3, 0x1e, 0xc2, 0x5b, 0xf2, 0x6f, 0x0c, 0xc0, 0x68, 0x3f, 0x2e, 0x76, 0x1e, 0xd2, 0x3b, 0x44, + 0xcb, 0x42, 0xe2, 0x20, 0x36, 0x60, 0x34, 0x61, 0x23, 0x0e, 0x1c, 0xd2, 0x88, 0x73, 0x30, 0x64, + 0x60, 0xc7, 0xc5, 0x35, 0xe6, 0x11, 0xc9, 0x3e, 0x7d, 0x0a, 0x18, 0x51, 0xbb, 0x4b, 0xa5, 0x0e, + 0xe5, 0x52, 0x2f, 0xc0, 0xa8, 0x27, 0x52, 0xd5, 0x56, 0x8d, 0xba, 0xf0, 0xcd, 0xd9, 0x38, 0x49, + 0x66, 0x2a, 0x82, 0x4e, 0x21, 0x64, 0xca, 0x08, 0x0e, 0xb5, 0xd1, 0x02, 0x80, 0x69, 0x60, 0x73, + 0xa7, 0x5a, 0xc3, 0x5a, 0xa3, 0x90, 0xe9, 0x62, 0xa5, 0x35, 0x82, 0xd2, 0x66, 0x25, 0x93, 0x41, + 0xb5, 0x06, 0x7a, 0xca, 0x77, 0xb5, 0xc1, 0x2e, 0x9e, 0xb2, 0xc2, 0x26, 0x59, 0x9b, 0xb7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x84, 0x44, 0x61, 0x94, 0xe8, 0x69, 0x48, 0xf1, 0x10, 0x4d, 0x38, 0x9c, + 0xee, 0x8f, 0x03, 0x99, 0x4b, 0x0a, 0xa5, 0x43, 0x77, 0x40, 0x96, 0xfc, 0x65, 0xbe, 0x31, 0x40, + 0x65, 0xce, 0x10, 0x00, 0xf1, 0x0b, 0x54, 0x84, 0x0c, 0x9d, 0x26, 0x35, 0x2c, 0x96, 0x36, 0xaf, + 0x4d, 0x1c, 0xab, 0x86, 0x77, 0xd4, 0x56, 0xc3, 0xad, 0x5e, 0x51, 0x1b, 0x2d, 0x4c, 0x1d, 0x3e, + 0xab, 0xe4, 0x38, 0xf0, 0x32, 0x81, 0xa1, 0x29, 0x18, 0x62, 0xb3, 0x4a, 0x37, 0x6a, 0xf8, 0x1a, + 0x8d, 0x9e, 0x69, 0x85, 0x4d, 0xb4, 0x25, 0x02, 0x21, 0xdd, 0xbf, 0xe8, 0x98, 0x86, 0x70, 0x4d, + 0xda, 0x05, 0x01, 0xd0, 0xee, 0x9f, 0x88, 0x06, 0xee, 0x3b, 0x3b, 0xab, 0x17, 0xf5, 0x29, 0xf9, + 0x4b, 0x09, 0x48, 0xd1, 0x78, 0x31, 0x0a, 0x43, 0x9b, 0x6f, 0x59, 0xaf, 0x54, 0x17, 0xd6, 0xb6, + 0xca, 0xcb, 0x95, 0xbc, 0x84, 0x46, 0x00, 0x28, 0xe0, 0xc2, 0xf2, 0xda, 0xdc, 0x66, 0x3e, 0xe1, + 0xb5, 0x97, 0x56, 0x37, 0xcf, 0x3d, 0x9e, 0x4f, 0x7a, 0x04, 0x5b, 0x0c, 0x90, 0x0a, 0x22, 0x3c, + 0x76, 0x26, 0x9f, 0x46, 0x79, 0xc8, 0x31, 0x06, 0x4b, 0x2f, 0x54, 0x16, 0xce, 0x3d, 0x9e, 0x1f, + 0x08, 0x43, 0x1e, 0x3b, 0x93, 0x1f, 0x44, 0xc3, 0x90, 0xa5, 0x90, 0xf2, 0xda, 0x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 0x74, 0xb6, 0xec, 0x9d, 0xeb, 0x67, 0xd9, 0xa3, 0xb0, 0x83, 0xc5, 0xf6, 0x74, 0x87, + 0xd8, 0x7e, 0x1e, 0xc6, 0xda, 0x18, 0xf5, 0x1d, 0x63, 0xdf, 0x23, 0x41, 0xa1, 0x9b, 0x71, 0x62, + 0x22, 0x5d, 0x22, 0x14, 0xe9, 0xce, 0x47, 0x2d, 0x78, 0x57, 0xf7, 0x41, 0x68, 0x1b, 0xeb, 0xcf, + 0x4a, 0x70, 0xac, 0x73, 0xa6, 0xd8, 0x51, 0x86, 0xa7, 0x61, 0xa0, 0x89, 0xdd, 0x5d, 0x53, 0x64, + 0x4b, 0xf7, 0x75, 0x58, 0x83, 0xc9, 0xe3, 0xe8, 0x60, 0x73, 0xaa, 0xe0, 0x22, 0x9e, 0xec, 0x96, + 0xee, 0x31, 0x69, 0xda, 0x24, 0xfd, 0x40, 0x02, 0x8e, 0x76, 0x64, 0xde, 0x51, 0xd0, 0x3b, 0x01, + 0x74, 0xc3, 0x6a, 0xb9, 0x2c, 0x23, 0x62, 0x01, 0x36, 0x4b, 0x21, 0x34, 0x78, 0x91, 0xe0, 0xd9, + 0x72, 0xbd, 0xe7, 0x49, 0xfa, 0x1c, 0x18, 0x88, 0x22, 0x3c, 0xe9, 0x0b, 0x9a, 0xa2, 0x82, 0x4e, + 0x76, 0xd1, 0xb4, 0xcd, 0x31, 0x1f, 0x81, 0xbc, 0xd6, 0xd0, 0xb1, 0xe1, 0x56, 0x1d, 0xd7, 0xc6, + 0x6a, 0x53, 0x37, 0xea, 0x74, 0x05, 0xc9, 0x94, 0xd2, 0x3b, 0x6a, 0xc3, 0xc1, 0xca, 0x28, 0x7b, + 0xbc, 0x21, 0x9e, 0x12, 0x0a, 0xea, 0x40, 0x76, 0x80, 0x62, 0x20, 0x44, 0xc1, 0x1e, 0x7b, 0x14, + 0xf2, 0xcf, 0x66, 0x61, 0x28, 0x90, 0x57, 0xa3, 0xbb, 0x20, 0x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x09, 0x0a, 0xe3, 0xdc, 0x4e, 0x41, 0x9e, 0x98, + 0x22, 0xd4, 0xf1, 0x29, 0x8a, 0x36, 0x62, 0xed, 0x5a, 0xc1, 0x7e, 0xef, 0x86, 0x61, 0x82, 0xe9, + 0x77, 0xfa, 0x00, 0x4b, 0xc8, 0xac, 0xdd, 0x40, 0x8f, 0x8f, 0xc3, 0x31, 0x82, 0xd4, 0xc4, 0xae, + 0x5a, 0x53, 0x5d, 0x35, 0x80, 0xfd, 0x10, 0xc5, 0x26, 0x76, 0x5f, 0xe1, 0x0f, 0x43, 0x72, 0xda, + 0xad, 0xed, 0x7d, 0xcf, 0xb3, 0x1e, 0x66, 0x72, 0x12, 0x98, 0xf0, 0xad, 0xdb, 0x96, 0x74, 0xcb, + 0x25, 0xc8, 0x05, 0x1d, 0x1f, 0x65, 0x81, 0xb9, 0x7e, 0x5e, 0x22, 0x59, 0xd0, 0xfc, 0xda, 0x02, + 0xc9, 0x5f, 0xde, 0x5a, 0xc9, 0x27, 0x48, 0x1e, 0xb5, 0xbc, 0xb4, 0x59, 0xa9, 0x2a, 0x5b, 0xab, + 0x9b, 0x4b, 0x2b, 0x95, 0x7c, 0x32, 0x90, 0xb0, 0x3f, 0x9b, 0xca, 0xdc, 0x97, 0xbf, 0x5f, 0xfe, + 0x46, 0x02, 0x46, 0xc2, 0x3b, 0x30, 0xf4, 0x26, 0x38, 0x2e, 0xca, 0x25, 0x0e, 0x76, 0xab, 0x57, + 0x75, 0x9b, 0xce, 0xc8, 0xa6, 0xca, 0x56, 0x47, 0xcf, 0x27, 0x26, 0x38, 0xd6, 0x06, 0x76, 0x9f, + 0xd7, 0x6d, 0x32, 0xdf, 0x9a, 0xaa, 0x8b, 0x96, 0x61, 0xca, 0x30, 0xab, 0x8e, 0xab, 0x1a, 0x35, + 0xd5, 0xae, 0x55, 0xfd, 0x42, 0x55, 0x55, 0xd5, 0x34, 0xec, 0x38, 0x26, 0x5b, 0x09, 0x3d, 0x2e, + 0x27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c5, 0x33, 0x43, 0xfe, 0x08, 0x6f, 0x72, 0x1e, + 0x92, 0x78, 0xba, 0xb5, 0x52, 0xae, 0x28, 0xf9, 0x44, 0x78, 0xa8, 0x53, 0xf9, 0xb4, 0xec, 0x40, + 0x2e, 0x98, 0x88, 0xff, 0x70, 0x36, 0xd9, 0x5f, 0x96, 0x60, 0x28, 0x90, 0x58, 0x93, 0x8c, 0x48, + 0x6d, 0x34, 0xcc, 0xab, 0x55, 0xb5, 0xa1, 0xab, 0x0e, 0x77, 0x0d, 0xa0, 0xa0, 0x39, 0x02, 0xe9, + 0x77, 0xe8, 0x7e, 0x48, 0x53, 0x24, 0x9d, 0x1f, 0x90, 0x3f, 0x29, 0x41, 0x3e, 0x9a, 0xd9, 0x46, + 0xc4, 0x94, 0x7e, 0x94, 0x62, 0xca, 0x9f, 0x90, 0x60, 0x24, 0x9c, 0xce, 0x46, 0xc4, 0xbb, 0xeb, + 0x47, 0x2a, 0xde, 0x1f, 0x26, 0x60, 0x38, 0x94, 0xc4, 0xf6, 0x2b, 0xdd, 0x4b, 0x30, 0xa6, 0xd7, + 0x70, 0xd3, 0x32, 0x5d, 0x6c, 0x68, 0xfb, 0xd5, 0x06, 0xbe, 0x82, 0x1b, 0x05, 0x99, 0x06, 0x8d, + 0xd9, 0xde, 0x69, 0xf2, 0xcc, 0x92, 0x4f, 0xb7, 0x4c, 0xc8, 0x4a, 0xe3, 0x4b, 0x0b, 0x95, 0x95, + 0xf5, 0xb5, 0xcd, 0xca, 0xea, 0xfc, 0x5b, 0xaa, 0x5b, 0xab, 0x97, 0x56, 0xd7, 0x9e, 0x5f, 0x55, + 0xf2, 0x7a, 0x04, 0xed, 0x36, 0x4e, 0xfb, 0x75, 0xc8, 0x47, 0x85, 0x42, 0xc7, 0xa1, 0x93, 0x58, + 0xf9, 0x23, 0x68, 0x1c, 0x46, 0x57, 0xd7, 0xaa, 0x1b, 0x4b, 0x0b, 0x95, 0x6a, 0xe5, 0xc2, 0x85, + 0x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49, + 0xc8, 0x3a, 0x58, 0xb3, 0xce, 0x9c, 0x3d, 0xb7, 0xf7, 0x28, 0x73, 0xaf, 0x8b, 0x47, 0x14, 0x1f, + 0x54, 0xca, 0x10, 0xad, 0xdf, 0xf8, 0xf4, 0x94, 0x54, 0x4e, 0x43, 0xd2, 0x69, 0x35, 0x6f, 0xab, + 0x8f, 0xbc, 0x96, 0x86, 0xe9, 0x20, 0x25, 0x0d, 0x50, 0x57, 0xd4, 0x86, 0x5e, 0x53, 0xfd, 0x1b, + 0xe0, 0xf9, 0x80, 0x0d, 0x28, 0x46, 0x67, 0x13, 0x14, 0x7b, 0x5a, 0x52, 0xfe, 0x75, 0x09, 0x72, + 0x97, 0x05, 0xe7, 0x0d, 0xec, 0xa2, 0xf3, 0x00, 0x5e, 0x4f, 0x62, 0xda, 0xdc, 0x31, 0x13, 0xed, + 0x6b, 0xc6, 0xa3, 0x51, 0x02, 0xe8, 0xe8, 0x09, 0xea, 0x88, 0x96, 0xe9, 0xf0, 0xfb, 0x2f, 0x31, + 0xa4, 0x1e, 0x32, 0x7a, 0x08, 0x10, 0x8d, 0x70, 0xd5, 0x2b, 0xa6, 0xab, 0x1b, 0xf5, 0xaa, 0x65, + 0x5e, 0xe5, 0x97, 0x05, 0x93, 0x4a, 0x9e, 0x3e, 0xb9, 0x4c, 0x1f, 0xac, 0x13, 0x38, 0x11, 0x3a, + 0xeb, 0x71, 0x21, 0xab, 0x89, 0x5a, 0xab, 0xd9, 0xd8, 0x71, 0x78, 0x10, 0x13, 0x4d, 0x74, 0x1e, + 0x06, 0xad, 0xd6, 0x76, 0x55, 0x44, 0x8c, 0xa1, 0x33, 0x27, 0x3b, 0xcd, 0x7f, 0xe1, 0x1f, 0x3c, + 0x02, 0x0c, 0x58, 0xad, 0x6d, 0xe2, 0x2d, 0x77, 0x41, 0xae, 0x83, 0x30, 0x43, 0x57, 0x7c, 0x39, + 0xe8, 0xf5, 0x75, 0xae, 0x41, 0xd5, 0xb2, 0x75, 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 0xee, + 0x9d, 0x77, 0xce, 0xb4, 0x2f, 0x4c, 0x33, 0xde, 0x02, 0xc2, 0xf9, 0x09, 0x1a, 0x74, 0x1f, 0x64, + 0xb4, 0x5d, 0x55, 0x37, 0xaa, 0x7a, 0x4d, 0x64, 0xbd, 0xaf, 0xdf, 0x98, 0x1a, 0x9c, 0x27, 0xb0, + 0xa5, 0x05, 0x65, 0x90, 0x3e, 0x5c, 0xaa, 0x91, 0x4c, 0x60, 0x17, 0xeb, 0xf5, 0x5d, 0x97, 0xcf, + 0x30, 0xde, 0x42, 0x4f, 0x42, 0x8a, 0x38, 0x04, 0xbf, 0xd9, 0x55, 0x6c, 0xdb, 0x7b, 0x78, 0x1b, + 0xc0, 0x72, 0x86, 0x74, 0xfc, 0xa1, 0x3f, 0x98, 0x92, 0x14, 0x4a, 0x81, 0xe6, 0x61, 0xb8, 0xa1, + 0x3a, 0x6e, 0x95, 0xae, 0x60, 0xa4, 0xfb, 0x34, 0x65, 0x71, 0xa2, 0xdd, 0x20, 0xdc, 0xb0, 0x5c, + 0xf4, 0x21, 0x42, 0xc5, 0x40, 0x35, 0x74, 0x0a, 0xf2, 0x94, 0x89, 0x66, 0x36, 0x9b, 0xba, 0xcb, + 0x72, 0xab, 0x01, 0x6a, 0xf7, 0x11, 0x02, 0x9f, 0xa7, 0x60, 0x9a, 0x61, 0xdd, 0x01, 0x59, 0x7a, + 0x95, 0x84, 0xa2, 0xb0, 0x63, 0x93, 0x19, 0x02, 0xa0, 0x0f, 0xef, 0x87, 0x51, 0x3f, 0x3e, 0x32, + 0x94, 0x0c, 0xe3, 0xe2, 0x83, 0x29, 0xe2, 0x23, 0x30, 0x61, 0xe0, 0x6b, 0xf4, 0x20, 0x67, 0x08, + 0x3b, 0x4b, 0xb1, 0x11, 0x79, 0x76, 0x39, 0x4c, 0x71, 0x2f, 0x8c, 0x68, 0xc2, 0xf8, 0x0c, 0x17, + 0x28, 0xee, 0xb0, 0x07, 0xa5, 0x68, 0x27, 0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 0x35, 0xaf, 0x45, 0x69, 0x1d, 0x3e, 0x86, 0xf7, 0x77, 0x1b, 0x8b, + 0x88, 0xbd, 0xd9, 0xda, 0xfc, 0xf5, 0x1b, 0x53, 0x92, 0x32, 0xaa, 0x45, 0x86, 0xe2, 0x6d, 0x30, + 0xd4, 0xb2, 0x6a, 0xaa, 0x8b, 0xab, 0x74, 0x1f, 0x97, 0x88, 0x5d, 0xe7, 0x27, 0x09, 0xaf, 0x9b, + 0x37, 0xa6, 0x10, 0x53, 0x2b, 0x40, 0x2c, 0xd3, 0xd5, 0x1f, 0x18, 0x84, 0x10, 0x04, 0x74, 0xfa, + 0xaa, 0x04, 0x43, 0x0b, 0x81, 0x93, 0x5e, 0x05, 0x18, 0x6c, 0x9a, 0x86, 0xbe, 0xc7, 0xfd, 0x31, + 0xab, 0x88, 0x26, 0x2a, 0x42, 0x86, 0x5d, 0xba, 0x73, 0xf7, 0x45, 0x29, 0x54, 0xb4, 0x09, 0xd5, + 0x55, 0xbc, 0xed, 0xe8, 0x62, 0x34, 0x14, 0xd1, 0x44, 0x17, 0x20, 0xef, 0x60, 0xad, 0x65, 0xeb, + 0xee, 0x7e, 0x55, 0x33, 0x0d, 0x57, 0xd5, 0x5c, 0x76, 0x7d, 0xab, 0x7c, 0xc7, 0xcd, 0x1b, 0x53, + 0xc7, 0x99, 0xac, 0x51, 0x0c, 0x59, 0x19, 0x15, 0xa0, 0x79, 0x06, 0x21, 0x3d, 0xd4, 0xb0, 0xab, + 0xea, 0x0d, 0xa7, 0xc0, 0xde, 0x93, 0x89, 0x66, 0x40, 0x97, 0xcf, 0x0f, 0x06, 0x0b, 0x5b, 0x17, + 0x20, 0x6f, 0x5a, 0xd8, 0x0e, 0x25, 0xa2, 0x52, 0xb4, 0xe7, 0x28, 0x86, 0xac, 0x8c, 0x0a, 0x90, + 0x48, 0x52, 0x5d, 0x32, 0xcc, 0x62, 0xa3, 0x68, 0xb5, 0xb6, 0xfd, 0x7a, 0xd8, 0x44, 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xe5, 0x87, 0x2f, 0x68, 0xf7, 0x55, 0xbb, 0x97, 0xff, 0x75, 0x0a, 0xd0, + 0x8a, 0x53, 0x9f, 0x27, 0x49, 0x55, 0xe0, 0x88, 0x56, 0xa4, 0x66, 0x23, 0xfd, 0x40, 0x35, 0x9b, + 0x95, 0x50, 0x15, 0x24, 0x71, 0xb0, 0x4a, 0x6b, 0xdf, 0xa5, 0x90, 0xe4, 0x0f, 0xa5, 0x14, 0xd2, + 0x39, 0x53, 0x4a, 0xdd, 0xba, 0x2d, 0x55, 0xfa, 0xb0, 0xdb, 0x4a, 0x5e, 0xe1, 0x1c, 0xe8, 0x51, + 0xe1, 0x2c, 0x74, 0x2d, 0x63, 0x72, 0x6a, 0x74, 0x56, 0x5c, 0xc9, 0x19, 0xec, 0x6f, 0x6d, 0xe3, + 0x77, 0x76, 0x32, 0xef, 0x17, 0x2b, 0xdb, 0x49, 0x28, 0xb6, 0xbb, 0x93, 0x08, 0xbe, 0xf2, 0x47, + 0x92, 0x90, 0x5f, 0x71, 0xea, 0x95, 0x9a, 0xee, 0xde, 0x26, 0x5f, 0x7b, 0xa6, 0xfb, 0x36, 0x15, + 0xdd, 0xbc, 0x31, 0x35, 0xc2, 0x6c, 0xda, 0xc3, 0x92, 0x4d, 0x18, 0x8d, 0xbc, 0x1c, 0xe0, 0x9e, + 0xb5, 0x70, 0x98, 0x77, 0x14, 0x11, 0x56, 0x32, 0xdd, 0x55, 0x04, 0xfc, 0x1b, 0x5d, 0xeb, 0xec, + 0xcc, 0xcc, 0xa1, 0x2e, 0xde, 0xce, 0x9a, 0x9e, 0x3f, 0x66, 0x45, 0x28, 0x44, 0x07, 0xc5, 0x1b, + 0xb1, 0x3f, 0x92, 0x60, 0x68, 0xc5, 0x11, 0xbb, 0x68, 0xfc, 0x63, 0x5a, 0x51, 0x78, 0xc2, 0xbb, + 0x68, 0x92, 0xec, 0xcf, 0x6f, 0xc5, 0xe5, 0x13, 0xdf, 0x08, 0x47, 0x61, 0x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ff, 0x49, 0x53, 0x11, 0x38, 0xf2, 0xef, 0x27, 0x20, 0x23, + 0x58, 0xd3, 0xab, 0x5b, 0xb8, 0x81, 0x35, 0xd7, 0x14, 0x47, 0x19, 0xbc, 0x36, 0x42, 0x90, 0xac, + 0xf3, 0x21, 0xca, 0x5e, 0x3c, 0xa2, 0x90, 0x06, 0x81, 0x79, 0x17, 0xea, 0x08, 0xcc, 0x6a, 0x91, + 0x51, 0x4b, 0x59, 0xa6, 0xa8, 0x99, 0x5e, 0x3c, 0xa2, 0xd0, 0x16, 0x2a, 0xc0, 0x00, 0x71, 0x59, + 0x97, 0x7d, 0x31, 0x98, 0xc0, 0x79, 0x1b, 0x1d, 0x83, 0xb4, 0xa5, 0xba, 0x1a, 0x3b, 0xeb, 0x4e, + 0x1e, 0xb0, 0x26, 0x09, 0xcc, 0xec, 0x4b, 0x0d, 0xd1, 0xff, 0x44, 0x45, 0x8c, 0xc1, 0x3e, 0x89, + 0x49, 0xe4, 0x5e, 0x57, 0x5d, 0x17, 0xdb, 0x06, 0x61, 0xc8, 0xd0, 0x11, 0x82, 0xd4, 0xb6, 0x59, + 0xdb, 0xe7, 0xff, 0x1d, 0x8b, 0xfe, 0xe6, 0xff, 0xb7, 0x87, 0xfa, 0x43, 0x95, 0x3e, 0x64, 0xff, + 0x14, 0x30, 0x27, 0x80, 0x65, 0x82, 0x54, 0x81, 0x71, 0xb5, 0x56, 0xd3, 0x89, 0x57, 0xab, 0x8d, + 0xea, 0xb6, 0x4e, 0xf7, 0xc3, 0x0e, 0xfd, 0x97, 0x8f, 0xdd, 0xc6, 0x02, 0xf9, 0x04, 0x65, 0x8e, + 0x5f, 0xce, 0xc2, 0xa0, 0xc5, 0x84, 0x92, 0xcf, 0xc3, 0x58, 0x9b, 0xa4, 0x44, 0xbe, 0x3d, 0xdd, + 0xa8, 0x89, 0x5b, 0x86, 0xe4, 0x37, 0x81, 0xd1, 0xcf, 0xda, 0xb2, 0x43, 0x22, 0xf4, 0x77, 0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 0x5d, 0x52, 0x38, 0xdd, 0x9b, 0x77, 0x30, 0xd9, 0xed, 0x7e, 0xd0, 0xa1, 0x43, + 0x0a, 0x2c, 0xdf, 0x47, 0x25, 0x99, 0x46, 0x93, 0x5d, 0x25, 0x61, 0xa9, 0xef, 0xad, 0x3e, 0x39, + 0xf0, 0x27, 0x83, 0x5d, 0x3f, 0x5e, 0x51, 0xc7, 0x06, 0x76, 0x74, 0xe7, 0x50, 0x1f, 0xaf, 0xe8, + 0xef, 0xf5, 0xd4, 0xef, 0xa6, 0x21, 0xb7, 0xc8, 0x7a, 0xd9, 0x70, 0x55, 0xf7, 0x07, 0xdc, 0x08, + 0x20, 0x87, 0x7f, 0x93, 0x8d, 0x7d, 0x2a, 0xd2, 0xff, 0xf8, 0x61, 0xee, 0x40, 0xd7, 0xb6, 0xd9, + 0x21, 0x41, 0x7e, 0x43, 0x3a, 0xca, 0x4f, 0x66, 0x9f, 0x77, 0xa3, 0x67, 0x17, 0xd8, 0x47, 0x1e, + 0xdf, 0x2b, 0xc1, 0x51, 0x8a, 0xe5, 0xcf, 0x37, 0x8a, 0x29, 0xee, 0xec, 0x75, 0xf5, 0x98, 0x65, + 0x35, 0x50, 0x82, 0x61, 0x9f, 0x65, 0xbc, 0x87, 0xdf, 0x67, 0x39, 0x19, 0xe8, 0x3c, 0xca, 0x56, + 0x56, 0xc6, 0x1b, 0x6d, 0x94, 0x4e, 0x64, 0x5f, 0x9f, 0x3a, 0xfc, 0xbe, 0xfe, 0x59, 0x18, 0x0a, + 0x44, 0xfa, 0x42, 0x3a, 0xe6, 0x9a, 0x69, 0xb4, 0x88, 0x16, 0x24, 0x46, 0xef, 0x93, 0xe0, 0x68, + 0xc7, 0x45, 0x90, 0xfe, 0xaf, 0xda, 0x03, 0x16, 0xe9, 0x22, 0xc6, 0xe9, 0xc8, 0x57, 0x56, 0x26, + 0x5a, 0x9d, 0xb2, 0x89, 0x75, 0x18, 0x0e, 0x2d, 0x60, 0x05, 0xf1, 0x1f, 0xa7, 0xfb, 0xbf, 0x61, + 0x11, 0x66, 0x80, 0x8a, 0x90, 0xc1, 0xd7, 0x2c, 0xd3, 0x76, 0x71, 0x8d, 0x1e, 0x79, 0xc8, 0x28, + 0x5e, 0x5b, 0x5e, 0x05, 0xd4, 0x3e, 0xb8, 0xd1, 0xef, 0x90, 0x66, 0xfd, 0xef, 0x90, 0x4e, 0x40, + 0x3a, 0xf8, 0xa5, 0x4e, 0xd6, 0xf0, 0xeb, 0x14, 0xb7, 0x7a, 0xce, 0xff, 0xdf, 0x00, 0x00, 0x00, + 0xff, 0xff, 0x01, 0xf6, 0xec, 0xd9, 0x42, 0x94, 0x00, 0x00, } r := bytes.NewReader(gzipped) gzipr, err := compress_gzip.NewReader(r) From 4d833f9ef0026734ff0564ecc0051b5c7d430956 Mon Sep 17 00:00:00 2001 From: Jonathan Gimeno Date: Fri, 6 Nov 2020 11:39:33 +0100 Subject: [PATCH 051/136] ADR 35: Rosetta API Support (#7492) Co-authored-by: Alessio Treglia Co-authored-by: SenorMonito Co-authored-by: Aleksandr Bezobchuk Co-authored-by: Aaron Craelius --- docs/architecture/README.md | 1 + .../adr-035-rosetta-api-support.md | 274 ++++++++++++++++++ 2 files changed, 275 insertions(+) create mode 100644 docs/architecture/adr-035-rosetta-api-support.md diff --git a/docs/architecture/README.md b/docs/architecture/README.md index 6d4c2a2ac0..d9a52d3898 100644 --- a/docs/architecture/README.md +++ b/docs/architecture/README.md @@ -71,3 +71,4 @@ Read about the [PROCESS](./PROCESS.md). - [ADR 028: Public Key Addresses](./adr-028-public-key-addresses.md) - [ADR 031: Protobuf Msg Services](./adr-031-msg-service.md) - [ADR 032: Typed Events](./adr-032-typed-events.md) +- [ADR 035: Rosetta API Support](./adr-035-rosetta-api-support.md) diff --git a/docs/architecture/adr-035-rosetta-api-support.md b/docs/architecture/adr-035-rosetta-api-support.md new file mode 100644 index 0000000000..2da663f572 --- /dev/null +++ b/docs/architecture/adr-035-rosetta-api-support.md @@ -0,0 +1,274 @@ +# ADR 035: Rosetta API Support + +## Authors + +- Jonathan Gimeno (@jgimeno) +- David Grierson (@senormonito) +- Alessio Treglia (@alessio) + +## Context + +[Rosetta API](https://www.rosetta-api.org/) is an open-source specification and set of tools developed by Coinbase to +standardise blockchain interactions. + +Through the use of a standard API for integrating blockchain applications it will + +* Be easier for a user to interact with a given blockchain +* Allow exchanges to integrate new blockchains quickly and easily +* Enable application developers to build cross-blockchain applications such as block explorers, wallets and dApps at + considerably lower cost and effort. + +## Decision + +It is clear that adding Rosetta API support to the Cosmos SDK will bring value to all the developers and +Cosmos SDK based chains in the ecosystem. How it is implemented is key. + +The driving principles of the proposed design are: + +1. **Extensibility:** it must be as riskless and painless as possible for application developers to set-up network + configurations to expose Rosetta API-compliant services. +2. **Long term support:** This proposal aims to provide support for all the supported Cosmos SDK release series. +3. **Cost-efficiency:** Backporting changes to Rosetta API specifications from `master` to the various stable + branches of Cosmos SDK is a cost that needs to be reduced. + +We will achieve these delivering on these principles by the following: + +1. There will be an external repo called [cosmos-rosetta-gateway](https://github.com/tendermint/cosmos-rosetta-gateway) + for the implementation of the core Rosetta API features, particularly: + a. The types and interfaces. This separates design from implementation detail. + b. Some core implementations: specifically, the `Service` functionality as this is independent of the Cosmos SDK version. +2. Due to differences between the Cosmos release series, each series will have its own specific API implementations of `Network` struct and `Adapter` interface. +3. There will be two options for starting an API service in applications: + a. API shares the application process + b. API-specific process. + + +## Architecture + +### The External Repo + +As section will describe the proposed external library, including the service implementation, plus the defined types and interfaces. + +#### Service + +`Service` is a simple `struct` that is started and listens to the port specified in the options. This is meant to be used across all the Cosmos SDK versions that are actively supported. + +The constructor follows: + +`func New(options Options, network Network) (*Service, error)` + +#### Types + +`Service` accepts an `Options` `struct` that holds service configuration values, such as the port the service would be listening to: + +```golang +type Options struct { + ListenAddress string +} +``` + +The `Network` type holds network-specific properties (i.e. configuration values) and adapters. Pre-configured concrete types will be available for each Cosmos SDK release. Applications can also create their own custom types. + +```golang +type Network struct { + Properties rosetta.NetworkProperties + Adapter rosetta.Adapter +} +``` + +A `NetworkProperties` `struct` comprises basic values that are required by a Rosetta API `Service`: + +```golang +type NetworkProperties struct { + // Mandatory properties + Blockchain string + Network string + SupportedOperations []string +} +``` + +Rosetta API services use `Blockchain` and `Network` as identifiers, e.g. the developers of _gaia_, the application that powers the Cosmos Hub, may want to set those to `Cosmos Hub` and `cosmos-hub-3` respectively. + +`SupportedOperations` contains the transaction types that are supported by the library. At the present time, +only `cosmos-sdk/MsgSend` is supported in Launchpad. Additional operations will be added in due time. + +For Launchpad we will map the amino type name to the operation supported, in Stargate we will use the protoc one. + +#### Interfaces + +Every SDK version uses a different format to connect (rpc, gRpc, etc), we have abstracted this in what is called the +Adapter. This is an interface that defines the methods an adapter implementation must provide in order to be used +in the `Network` interface. + +Each Cosmos SDK release series will have their own Adapter implementations. +Developers can implement their own custom adapters as required. + +```golang +type Adapter interface { + DataAPI + ConstructionAPI +} + +type DataAPI interface { + server.NetworkAPIServicer + server.AccountAPIServicer + server.MempoolAPIServicer + server.BlockAPIServicer + server.ConstructionAPIServicer +} + +type ConstructionAPI interface { + server.ConstructionAPIServicer +} +``` + +Example in pseudo-code of an Adapter interface: + +```golang +type SomeAdapter struct { + cosmosClient client + tendermintClient client +} + +func NewSomeAdapter(cosmosClient client, tendermintClient client) rosetta.Adapter { + return &SomeAdapter{cosmosClient: cosmosClient, tendermintClient: tendermintClient} +} + +func (s SomeAdapter) NetworkStatus(ctx context.Context, request *types.NetworkRequest) (*types.NetworkStatusResponse, *types.Error) { + resp := s.tendermintClient.CallStatus() + // ... Parse status Response + // build NetworkStatusResponse + return networkStatusResp, nil +} + +func (s SomeAdapter) AccountBalance(ctx context.Context, request *types.AccountBalanceRequest) (*types.AccountBalanceResponse, *types.Error) { + resp := s.cosmosClient.Account() + // ... Parse cosmos specific account response + // build AccountBalanceResponse + return AccountBalanceResponse, nil +} + +// And we repeat for all the methods defined in the interface. +``` + +For further information about the `Servicer` interfaces, please refer to the [Coinbase's rosetta-sdk-go's documentation](https://pkg.go.dev/github.com/coinbase/rosetta-sdk-go@v0.5.9/server). + +### 2. Cosmos SDK Implementation + +As described, each Cosmos SDK release series will have version specific implementations of `Network` and `Adapter`, as +well as a `NewNetwork` constructor. + +Due to separation of interface and implementation, application developers have the option to override as needed, +using this code as reference. + +```golang +// NewNetwork returns the default application configuration. +func NewNetwork(options Options) service.Network { + cosmosClient := cosmos.NewClient(fmt.Sprintf("http://%s", options.CosmosEndpoint)) + tendermintClient := tendermint.NewClient(fmt.Sprintf("http://%s", options.TendermintEndpoint)) + + return service.Network{ + Properties: rosetta.NetworkProperties{ + Blockchain: options.Blockchain, + Network: options.Network, + SupportedOperations: []string{OperationTransfer}, + }, + Adapter: newAdapter( + cosmosClient, + tendermintClient, + properties{ + Blockchain: options.Blockchain, + Network: options.Network, + OfflineMode: options.OfflineMode, + }, + ), + } +} +``` + +### 3. API service invocation + +As stated at the start, application developers will have two methods for invocation of the Rosetta API service: + +1. Shared process for both application and API +2. Standalone API service + +#### Shared Process (Only Stargate) + +Rosetta API service could run within the same execution process as the application. New configuration option and +command line flags would be provided to support this: + +```golang + if config.Rosetta.Enable { + .... + get contecxt, flags, etc + ... + + h, err := service.New( + service.Options{ListenAddress: config.Rosetta.ListenAddress}, + rosetta.NewNetwork(cdc, options), + ) + if err != nil { + } + + ... + + go func() { + if err := h.Start(config); err != nil { + errCh <- err + } + }() + } + +``` + +#### Separate API service + +Client application developers can write a new command to launch a Rosetta API server as a separate process too: + +```golang +func RosettaCommand(cdc *codec.Codec) *cobra.Command { + + ... + cmd := &cobra.Command{ + Use: "rosetta", + .... + + RunE: func(cmd *cobra.Command, args []string) error { + .... + get contecxt, flags, etc + ... + + h, err := service.New( + service.Options{Endpoint: endpoint}, + rosetta.NewNetwork(cdc, options), + ) + if err != nil { + return err + } + + ... + + h.Start() + } + } + ... + +} +``` + +## Status + +Proposed + +## Consequences + +### Positive + +- Out-of-the-box Rosetta API support within Cosmos SDK. +- Blockchain interface standardisation + +## References + +- https://www.rosetta-api.org/ +- https://github.com/tendermint/cosmos-rosetta-gateway From e57745bebceab4a66e760a6755199940c6a9568b Mon Sep 17 00:00:00 2001 From: billy rennekamp Date: Fri, 6 Nov 2020 12:05:41 +0100 Subject: [PATCH 052/136] Update cosmovisor.md (#7837) --- docs/using-the-sdk/cosmovisor.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/using-the-sdk/cosmovisor.md b/docs/using-the-sdk/cosmovisor.md index 21d3ee34ad..870bbae236 100644 --- a/docs/using-the-sdk/cosmovisor.md +++ b/docs/using-the-sdk/cosmovisor.md @@ -33,7 +33,7 @@ if there was an error. ## Data Folder Layout `$DAEMON_HOME/cosmovisor` is expected to belong completely to `cosmovisor` and -subprocesses the controlled by it. The folder content is organised as follows: +subprocesses that are controlled by it. The folder content is organised as follows: ``` . From da1c8162debe9078ee1527cf89bc3e3437a6d2af Mon Sep 17 00:00:00 2001 From: Cyrus Goh Date: Fri, 6 Nov 2020 03:21:53 -0800 Subject: [PATCH 053/136] docs: fix broken url in cn/basics/app-anatomy.md (master) (#7831) * Fix package-lock * Fix package-lock * update package-lock * bump docs theme to 1.0.171 * Fix typo, chinese character in URL * update dead doc links * bump docs theme to 1.0.172 * [favicons] add favicons * makefile: change build-docs target for shells other than bash * docs: set master as default version * docs: add v0.40.x to versions * bump vuepress-theme-cosmos 1.0.175 * docs: fix broken url in cn/basics/app-anatomy.md Co-authored-by: Denis Fadeev Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Co-authored-by: vms Co-authored-by: Helder Moreira Co-authored-by: Amaury Martiny Co-authored-by: Alessio Treglia Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- docs/cn/basics/app-anatomy.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/cn/basics/app-anatomy.md b/docs/cn/basics/app-anatomy.md index 7909c40c8a..813e9c6c44 100644 --- a/docs/cn/basics/app-anatomy.md +++ b/docs/cn/basics/app-anatomy.md @@ -148,7 +148,8 @@ AppModule 在模块上公开了一组有用的方法,这些方法有助于将 模块的`处理程序`通常在名为 `handler.go` 的文件中定义,并包括: - NewHandler 将消息发到对应的回调 `handler`。 该函数返回一个 `handler` 函数,此前这个函数在 `AppModule` 中注册,以在应用程序的模块管理器中用于初始化应用程序的路由器。接下来是 [nameservice tutorial](https://github.com/cosmos/sdk-tutorials/tree/master/nameservice) 的一个例子。 - +++ https://github.com/cosmos/sdk-tutorials/blob/master/nameservice/x/nameservice/handler.go#L12-L26 + ++++ https://github.com/cosmos/sdk-tutorials/blob/86a27321cf89cc637581762e953d0c07f8c78ece/nameservice/x/nameservice/internal/keeper/querier.go#L19-L32 - 模块定义的每种消息类型的处理函数。开发人员在这些函数中编写消息处理逻辑。这通常包括进行状态检查以确保消息有效,并调用 [`keeper`](https://docs.cosmos.network/master/basics/app-anatomy.html#keeper) 的方法来更新状态。 From be1012c8d14090d6625a8b854b1e5904089ea133 Mon Sep 17 00:00:00 2001 From: antstalepresh Date: Sat, 7 Nov 2020 00:57:07 +1000 Subject: [PATCH 054/136] remove cast to int64 for amount multiplied by PowerReduction --- x/slashing/handler_test.go | 8 ++++---- x/slashing/keeper/keeper_test.go | 2 +- x/staking/handler_test.go | 10 +++++----- x/staking/keeper/slash_test.go | 14 ++++++------- x/staking/keeper/validator_test.go | 32 +++++++++++++++--------------- 5 files changed, 33 insertions(+), 33 deletions(-) diff --git a/x/slashing/handler_test.go b/x/slashing/handler_test.go index c392bde585..17cd16b896 100644 --- a/x/slashing/handler_test.go +++ b/x/slashing/handler_test.go @@ -214,10 +214,10 @@ func TestHandleAbsentValidator(t *testing.T) { validator, _ = app.StakingKeeper.GetValidatorByConsAddr(ctx, sdk.GetConsAddress(val)) require.Equal(t, stakingtypes.Unbonding, validator.GetStatus()) - slashAmt := amt.ToDec().Mul(app.SlashingKeeper.SlashFractionDowntime(ctx)).RoundInt64() + slashAmt := amt.ToDec().Mul(app.SlashingKeeper.SlashFractionDowntime(ctx)).RoundInt() // validator should have been slashed - require.Equal(t, amt.Int64()-slashAmt, validator.GetTokens().Int64()) + require.True(t, amt.Sub(slashAmt).Equal(validator.GetTokens())) // 502nd block *also* missed (since the LastCommit would have still included the just-unbonded validator) height++ @@ -233,7 +233,7 @@ func TestHandleAbsentValidator(t *testing.T) { // validator should not have been slashed any more, since it was already jailed validator, _ = app.StakingKeeper.GetValidatorByConsAddr(ctx, sdk.GetConsAddress(val)) - require.Equal(t, amt.Int64()-slashAmt, validator.GetTokens().Int64()) + require.True(t, amt.Sub(slashAmt).Equal(validator.GetTokens())) // unrevocation should fail prior to jail expiration res, err := slh(ctx, types.NewMsgUnjail(addr)) @@ -254,7 +254,7 @@ func TestHandleAbsentValidator(t *testing.T) { require.Equal(t, stakingtypes.Bonded, validator.GetStatus()) // validator should have been slashed - require.Equal(t, amt.Int64()-slashAmt, app.BankKeeper.GetBalance(ctx, bondPool.GetAddress(), app.StakingKeeper.BondDenom(ctx)).Amount.Int64()) + require.True(t, amt.Sub(slashAmt).Equal(app.BankKeeper.GetBalance(ctx, bondPool.GetAddress(), app.StakingKeeper.BondDenom(ctx)).Amount)) // Validator start height should not have been changed info, found = app.SlashingKeeper.GetValidatorSigningInfo(ctx, sdk.ConsAddress(val.Address())) diff --git a/x/slashing/keeper/keeper_test.go b/x/slashing/keeper/keeper_test.go index 035090341c..076dd16735 100644 --- a/x/slashing/keeper/keeper_test.go +++ b/x/slashing/keeper/keeper_test.go @@ -117,7 +117,7 @@ func TestHandleNewValidator(t *testing.T) { require.Equal(t, stakingtypes.Bonded, validator.GetStatus()) bondPool := app.StakingKeeper.GetBondedPool(ctx) expTokens := sdk.TokensFromConsensusPower(100) - require.Equal(t, expTokens.Int64(), app.BankKeeper.GetBalance(ctx, bondPool.GetAddress(), app.StakingKeeper.BondDenom(ctx)).Amount.Int64()) + require.True(t, expTokens.Equal(app.BankKeeper.GetBalance(ctx, bondPool.GetAddress(), app.StakingKeeper.BondDenom(ctx)).Amount)) } // Test a jailed validator being "down" twice diff --git a/x/staking/handler_test.go b/x/staking/handler_test.go index 34a8cd78e7..c1feb8f5ee 100644 --- a/x/staking/handler_test.go +++ b/x/staking/handler_test.go @@ -281,7 +281,7 @@ func TestIncrementsMsgDelegate(t *testing.T) { require.Equal(t, bondAmount, bond.Shares.RoundInt()) bondedTokens := app.StakingKeeper.TotalBondedTokens(ctx) - require.Equal(t, bondAmount.Int64(), bondedTokens.Int64()) + require.True(t, bondAmount.Equal(bondedTokens)) for i := int64(0); i < 5; i++ { ctx = ctx.WithBlockHeight(i) @@ -436,13 +436,13 @@ func TestIncrementsMsgUnbond(t *testing.T) { gotDelegatorShares := validator.DelegatorShares.RoundInt() gotDelegatorAcc := app.BankKeeper.GetBalance(ctx, delegatorAddr, params.BondDenom).Amount - require.Equal(t, expBond.Int64(), gotBond.Int64(), + require.True(t, expBond.Equal(gotBond), "i: %v\nexpBond: %v\ngotBond: %v\nvalidator: %v\nbond: %v\n", i, expBond, gotBond, validator, bond) - require.Equal(t, expDelegatorShares.Int64(), gotDelegatorShares.Int64(), + require.True(t, expDelegatorShares.Equal(gotDelegatorShares), "i: %v\nexpDelegatorShares: %v\ngotDelegatorShares: %v\nvalidator: %v\nbond: %v\n", i, expDelegatorShares, gotDelegatorShares, validator, bond) - require.Equal(t, expDelegatorAcc.Int64(), gotDelegatorAcc.Int64(), + require.True(t, expDelegatorAcc.Equal(gotDelegatorAcc), "i: %v\nexpDelegatorAcc: %v\ngotDelegatorAcc: %v\nvalidator: %v\nbond: %v\n", i, expDelegatorAcc, gotDelegatorAcc, validator, bond) } @@ -740,7 +740,7 @@ func TestRedelegationPeriod(t *testing.T) { // balance should have been subtracted after creation amt2 := app.BankKeeper.GetBalance(ctx, sdk.AccAddress(validatorAddr), denom).Amount - require.Equal(t, amt1.Sub(sdk.NewInt(10)).Int64(), amt2.Int64(), "expected coins to be subtracted") + require.True(t, amt1.Sub(sdk.NewInt(10)).Equal(amt2), "expected coins to be subtracted") tstaking.CreateValidator(validatorAddr2, PKs[1], 10, true) bal1 := app.BankKeeper.GetAllBalances(ctx, sdk.AccAddress(validatorAddr)) diff --git a/x/staking/keeper/slash_test.go b/x/staking/keeper/slash_test.go index 4bee623004..356c022e4e 100644 --- a/x/staking/keeper/slash_test.go +++ b/x/staking/keeper/slash_test.go @@ -90,13 +90,13 @@ func TestSlashUnbondingDelegation(t *testing.T) { // unbonding started prior to the infraction height, stakw didn't contribute slashAmount := app.StakingKeeper.SlashUnbondingDelegation(ctx, ubd, 1, fraction) - require.Equal(t, int64(0), slashAmount.Int64()) + require.True(t, slashAmount.Equal(sdk.NewInt(0))) // after the expiration time, no longer eligible for slashing ctx = ctx.WithBlockHeader(tmproto.Header{Time: time.Unix(10, 0)}) app.StakingKeeper.SetUnbondingDelegation(ctx, ubd) slashAmount = app.StakingKeeper.SlashUnbondingDelegation(ctx, ubd, 0, fraction) - require.Equal(t, int64(0), slashAmount.Int64()) + require.True(t, slashAmount.Equal(sdk.NewInt(0))) // test valid slash, before expiration timestamp and to which stake contributed notBondedPool := app.StakingKeeper.GetNotBondedPool(ctx) @@ -104,7 +104,7 @@ func TestSlashUnbondingDelegation(t *testing.T) { ctx = ctx.WithBlockHeader(tmproto.Header{Time: time.Unix(0, 0)}) app.StakingKeeper.SetUnbondingDelegation(ctx, ubd) slashAmount = app.StakingKeeper.SlashUnbondingDelegation(ctx, ubd, 0, fraction) - require.Equal(t, int64(5), slashAmount.Int64()) + require.True(t, slashAmount.Equal(sdk.NewInt(5))) ubd, found := app.StakingKeeper.GetUnbondingDelegation(ctx, addrDels[0], addrVals[0]) require.True(t, found) require.Len(t, ubd.Entries, 1) @@ -116,7 +116,7 @@ func TestSlashUnbondingDelegation(t *testing.T) { require.Equal(t, sdk.NewInt(5), ubd.Entries[0].Balance) newUnbondedPoolBalances := app.BankKeeper.GetAllBalances(ctx, notBondedPool.GetAddress()) diffTokens := oldUnbondedPoolBalances.Sub(newUnbondedPoolBalances) - require.Equal(t, int64(5), diffTokens.AmountOf(app.StakingKeeper.BondDenom(ctx)).Int64()) + require.True(t, diffTokens.AmountOf(app.StakingKeeper.BondDenom(ctx)).Equal(sdk.NewInt(5))) } // tests slashRedelegation @@ -147,7 +147,7 @@ func TestSlashRedelegation(t *testing.T) { validator, found := app.StakingKeeper.GetValidator(ctx, addrVals[1]) require.True(t, found) slashAmount := app.StakingKeeper.SlashRedelegation(ctx, validator, rd, 1, fraction) - require.Equal(t, int64(0), slashAmount.Int64()) + require.True(t, slashAmount.Equal(sdk.NewInt(0))) // after the expiration time, no longer eligible for slashing ctx = ctx.WithBlockHeader(tmproto.Header{Time: time.Unix(10, 0)}) @@ -155,7 +155,7 @@ func TestSlashRedelegation(t *testing.T) { validator, found = app.StakingKeeper.GetValidator(ctx, addrVals[1]) require.True(t, found) slashAmount = app.StakingKeeper.SlashRedelegation(ctx, validator, rd, 0, fraction) - require.Equal(t, int64(0), slashAmount.Int64()) + require.True(t, slashAmount.Equal(sdk.NewInt(0))) balances = app.BankKeeper.GetAllBalances(ctx, bondedPool.GetAddress()) @@ -165,7 +165,7 @@ func TestSlashRedelegation(t *testing.T) { validator, found = app.StakingKeeper.GetValidator(ctx, addrVals[1]) require.True(t, found) slashAmount = app.StakingKeeper.SlashRedelegation(ctx, validator, rd, 0, fraction) - require.Equal(t, int64(5), slashAmount.Int64()) + require.True(t, slashAmount.Equal(sdk.NewInt(5))) rd, found = app.StakingKeeper.GetRedelegation(ctx, addrDels[0], addrVals[0], addrVals[1]) require.True(t, found) require.Len(t, rd.Entries, 1) diff --git a/x/staking/keeper/validator_test.go b/x/staking/keeper/validator_test.go index c28b6db358..5bf9ee247e 100644 --- a/x/staking/keeper/validator_test.go +++ b/x/staking/keeper/validator_test.go @@ -349,19 +349,19 @@ func TestGetValidatorSortingUnmixed(t *testing.T) { app, ctx, addrs, _ := bootstrapValidatorTest(t, 1000, 20) // initialize some validators into the state - amts := []int64{ - 0, - 100 * sdk.PowerReduction.Int64(), - 1 * sdk.PowerReduction.Int64(), - 400 * sdk.PowerReduction.Int64(), - 200 * sdk.PowerReduction.Int64()} + amts := []sdk.Int{ + sdk.NewIntFromUint64(0), + sdk.PowerReduction.MulRaw(100), + sdk.PowerReduction, + sdk.PowerReduction.MulRaw(400), + sdk.PowerReduction.MulRaw(200)} n := len(amts) var validators [5]types.Validator for i, amt := range amts { validators[i] = teststaking.NewValidator(t, sdk.ValAddress(addrs[i]), PKs[i]) validators[i].Status = types.Bonded - validators[i].Tokens = sdk.NewInt(amt) - validators[i].DelegatorShares = sdk.NewDec(amt) + validators[i].Tokens = amt + validators[i].DelegatorShares = sdk.NewDecFromInt(amt) keeper.TestingUpdateValidator(app.StakingKeeper, ctx, validators[i], true) } @@ -445,19 +445,19 @@ func TestGetValidatorSortingMixed(t *testing.T) { app.StakingKeeper.SetParams(ctx, params) // initialize some validators into the state - amts := []int64{ - 0, - 100 * sdk.PowerReduction.Int64(), - 1 * sdk.PowerReduction.Int64(), - 400 * sdk.PowerReduction.Int64(), - 200 * sdk.PowerReduction.Int64()} + amts := []sdk.Int{ + sdk.NewIntFromUint64(0), + sdk.PowerReduction.MulRaw(100), + sdk.PowerReduction, + sdk.PowerReduction.MulRaw(400), + sdk.PowerReduction.MulRaw(200)} var validators [5]types.Validator for i, amt := range amts { validators[i] = teststaking.NewValidator(t, sdk.ValAddress(addrs[i]), PKs[i]) - validators[i].DelegatorShares = sdk.NewDec(amt) + validators[i].DelegatorShares = sdk.NewDecFromInt(amt) validators[i].Status = types.Bonded - validators[i].Tokens = sdk.NewInt(amt) + validators[i].Tokens = amt keeper.TestingUpdateValidator(app.StakingKeeper, ctx, validators[i], true) } From 590358652cc1cbc13872ea1659187e073ea38e75 Mon Sep 17 00:00:00 2001 From: Cory Date: Fri, 6 Nov 2020 11:15:26 -0800 Subject: [PATCH 055/136] update changelog for rc3 (#7843) --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 30a10deafb..c10fd1385b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,6 +36,8 @@ Ref: https://keepachangelog.com/en/1.0.0/ ## [Unreleased] +## [v0.40.0-rc3](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.40.0-rc3) - 2020-11-06 + ### Improvements * (tendermint) [\#7828](https://github.com/cosmos/cosmos-sdk/pull/7828) Update tendermint dependency to v0.34.0-rc6 From dd9ef120f3415c4d84d3ce34267453ecb94b797f Mon Sep 17 00:00:00 2001 From: Ethan Buchman Date: Sat, 7 Nov 2020 15:38:26 -0500 Subject: [PATCH 056/136] x/cap: fix comments, SetIndex, and some tests (#7845) * x/cap: fix comments and some tests * fix lint * Apply suggestions from code review Co-authored-by: Alessio Treglia Co-authored-by: Alessio Treglia --- x/capability/genesis.go | 4 ++- x/capability/keeper/keeper.go | 42 +++++++++++++++++------------- x/capability/keeper/keeper_test.go | 28 +++++++++++++++----- 3 files changed, 49 insertions(+), 25 deletions(-) diff --git a/x/capability/genesis.go b/x/capability/genesis.go index 07bf6df7ef..9bcca42a35 100644 --- a/x/capability/genesis.go +++ b/x/capability/genesis.go @@ -9,7 +9,9 @@ import ( // InitGenesis initializes the capability module's state from a provided genesis // state. func InitGenesis(ctx sdk.Context, k keeper.Keeper, genState types.GenesisState) { - k.SetIndex(ctx, genState.Index) + if err := k.SetIndex(ctx, genState.Index); err != nil { + panic(err) + } // set owners for each index and initialize capability for _, genOwner := range genState.Owners { diff --git a/x/capability/keeper/keeper.go b/x/capability/keeper/keeper.go index cb4d31df0b..492d56c915 100644 --- a/x/capability/keeper/keeper.go +++ b/x/capability/keeper/keeper.go @@ -117,12 +117,22 @@ func (k *Keeper) InitializeAndSeal(ctx sdk.Context) { k.sealed = true } -// SetIndex sets the index to one in InitChain -// Since it is an exported function, we check that index is indeed unset, before initializing -func (k Keeper) SetIndex(ctx sdk.Context, index uint64) { +// SetIndex sets the index to one (or greater) in InitChain according +// to the GenesisState. It must only be called once. +// It will panic if the provided index is 0, or if the index is already set. +func (k Keeper) SetIndex(ctx sdk.Context, index uint64) error { + if index == 0 { + panic("SetIndex requires index > 0") + } + latest := k.GetLatestIndex(ctx) + if latest > 0 { + panic("SetIndex requires index to not be set") + } + // set the global index to the passed index store := ctx.KVStore(k.storeKey) store.Set(types.KeyIndex, types.IndexToKey(index)) + return nil } // GetLatestIndex returns the latest index of the CapabilityKeeper @@ -156,7 +166,8 @@ func (k Keeper) GetOwners(ctx sdk.Context, index uint64) (types.CapabilityOwners } // InitializeCapability takes in an index and an owners array. It creates the capability in memory -// and sets the fwd and reverse keys for each owner in the memstore +// and sets the fwd and reverse keys for each owner in the memstore. +// It is used during initialization from genesis. func (k Keeper) InitializeCapability(ctx sdk.Context, index uint64, owners types.CapabilityOwners) { memStore := ctx.KVStore(k.memKey) @@ -278,14 +289,12 @@ func (sk ScopedKeeper) ReleaseCapability(ctx sdk.Context, cap *types.Capability) memStore := ctx.KVStore(sk.memKey) - // Set the forward mapping between the module and capability tuple and the + // Delete the forward mapping between the module and capability tuple and the // capability name in the memKVStore memStore.Delete(types.FwdCapabilityKey(sk.module, cap)) - // Set the reverse mapping between the module and capability name and the - // index in the in-memory store. Since marshalling and unmarshalling into a store - // will change memory address of capability, we simply store index as value here - // and retrieve the in-memory pointer to the capability from our map + // Delete the reverse mapping between the module and capability name and the + // index in the in-memory store. memStore.Delete(types.RevCapabilityKey(sk.module, name)) // remove owner @@ -298,7 +307,7 @@ func (sk ScopedKeeper) ReleaseCapability(ctx sdk.Context, cap *types.Capability) if len(capOwners.Owners) == 0 { // remove capability owner set prefixStore.Delete(indexKey) - // since no one ones capability, we can delete capability from map + // since no one owns capability, we can delete capability from map delete(sk.capMap, cap.GetIndex()) } else { // update capability owner set @@ -370,7 +379,7 @@ func (sk ScopedKeeper) GetOwners(ctx sdk.Context, name string) (*types.Capabilit // LookupModules returns all the module owners for a given capability // as a string array and the capability itself. -// The method returns an errors if either the capability or the owners cannot be +// The method returns an error if either the capability or the owners cannot be // retreived from the memstore. func (sk ScopedKeeper) LookupModules(ctx sdk.Context, name string) ([]string, *types.Capability, error) { cap, ok := sk.GetCapability(ctx, name) @@ -413,16 +422,13 @@ func (sk ScopedKeeper) getOwners(ctx sdk.Context, cap *types.Capability) *types. bz := prefixStore.Get(indexKey) - var owners *types.CapabilityOwners if len(bz) == 0 { - owners = types.NewCapabilityOwners() - } else { - var capOwners types.CapabilityOwners - sk.cdc.MustUnmarshalBinaryBare(bz, &capOwners) - owners = &capOwners + return types.NewCapabilityOwners() } - return owners + var capOwners types.CapabilityOwners + sk.cdc.MustUnmarshalBinaryBare(bz, &capOwners) + return &capOwners } func logger(ctx sdk.Context) log.Logger { diff --git a/x/capability/keeper/keeper_test.go b/x/capability/keeper/keeper_test.go index fdd7953410..c6f1d174bd 100644 --- a/x/capability/keeper/keeper_test.go +++ b/x/capability/keeper/keeper_test.go @@ -75,11 +75,15 @@ func (suite *KeeperTestSuite) TestInitializeAndSeal() { func (suite *KeeperTestSuite) TestNewCapability() { sk := suite.keeper.ScopeToModule(banktypes.ModuleName) + got, ok := sk.GetCapability(suite.ctx, "transfer") + suite.Require().False(ok) + suite.Require().Nil(got) + cap, err := sk.NewCapability(suite.ctx, "transfer") suite.Require().NoError(err) suite.Require().NotNil(cap) - got, ok := sk.GetCapability(suite.ctx, "transfer") + got, ok = sk.GetCapability(suite.ctx, "transfer") suite.Require().True(ok) suite.Require().Equal(cap, got) suite.Require().True(cap == got, "expected memory addresses to be equal") @@ -88,9 +92,19 @@ func (suite *KeeperTestSuite) TestNewCapability() { suite.Require().False(ok) suite.Require().Nil(got) - cap, err = sk.NewCapability(suite.ctx, "transfer") + got, ok = sk.GetCapability(suite.ctx, "transfer") + suite.Require().True(ok) + suite.Require().Equal(cap, got) + suite.Require().True(cap == got, "expected memory addresses to be equal") + + cap2, err := sk.NewCapability(suite.ctx, "transfer") suite.Require().Error(err) - suite.Require().Nil(cap) + suite.Require().Nil(cap2) + + got, ok = sk.GetCapability(suite.ctx, "transfer") + suite.Require().True(ok) + suite.Require().Equal(cap, got) + suite.Require().True(cap == got, "expected memory addresses to be equal") } func (suite *KeeperTestSuite) TestOriginalCapabilityKeeper() { @@ -111,7 +125,8 @@ func (suite *KeeperTestSuite) TestAuthenticateCapability() { suite.Require().NoError(err) suite.Require().NotNil(cap1) - forgedCap := types.NewCapability(0) // index should be the same index as the first capability + forgedCap := types.NewCapability(cap1.Index) // index should be the same index as the first capability + suite.Require().False(sk1.AuthenticateCapability(suite.ctx, forgedCap, "transfer")) suite.Require().False(sk2.AuthenticateCapability(suite.ctx, forgedCap, "transfer")) cap2, err := sk2.NewCapability(suite.ctx, "bond") @@ -176,14 +191,15 @@ func (suite *KeeperTestSuite) TestGetOwners() { // Ensure all scoped keepers can get owners for _, sk := range sks { owners, ok := sk.GetOwners(suite.ctx, "transfer") - mods, cap, err := sk.LookupModules(suite.ctx, "transfer") + mods, gotCap, err := sk.LookupModules(suite.ctx, "transfer") suite.Require().True(ok, "could not retrieve owners") suite.Require().NotNil(owners, "owners is nil") suite.Require().NoError(err, "could not retrieve modules") - suite.Require().NotNil(cap, "capability is nil") + suite.Require().NotNil(gotCap, "capability is nil") suite.Require().NotNil(mods, "modules is nil") + suite.Require().Equal(cap, gotCap, "caps not equal") suite.Require().Equal(len(expectedOrder), len(owners.Owners), "length of owners is unexpected") for i, o := range owners.Owners { From 0e0ed66212483e9d9dbb137edde057ec193c2213 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 9 Nov 2020 09:43:08 +0100 Subject: [PATCH 057/136] build(deps): bump actions/cache from v2.1.2 to v2.1.3 (#7850) Bumps [actions/cache](https://github.com/actions/cache) from v2.1.2 to v2.1.3. - [Release notes](https://github.com/actions/cache/releases) - [Commits](https://github.com/actions/cache/compare/v2.1.2...0781355a23dac32fd3bac414512f4b903437991a) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/release-sims.yml | 4 ++-- .github/workflows/sims.yml | 10 +++++----- .github/workflows/test.yml | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/release-sims.yml b/.github/workflows/release-sims.yml index 4f1dae7a97..68ca310511 100644 --- a/.github/workflows/release-sims.yml +++ b/.github/workflows/release-sims.yml @@ -30,7 +30,7 @@ jobs: - name: install runsim run: | export GO111MODULE="on" && go get github.com/cosmos/tools/cmd/runsim@v1.0.0 - - uses: actions/cache@v2.1.2 + - uses: actions/cache@v2.1.3 with: path: ~/go/bin key: ${{ runner.os }}-go-runsim-binary @@ -40,7 +40,7 @@ jobs: needs: [build, install-runsim] steps: - uses: actions/checkout@v2 - - uses: actions/cache@v2.1.2 + - uses: actions/cache@v2.1.3 with: path: ~/go/bin key: ${{ runner.os }}-go-runsim-binary diff --git a/.github/workflows/sims.yml b/.github/workflows/sims.yml index de2e9bb102..d50ddb63a2 100644 --- a/.github/workflows/sims.yml +++ b/.github/workflows/sims.yml @@ -39,7 +39,7 @@ jobs: run: go version - name: Install runsim run: export GO111MODULE="on" && go get github.com/cosmos/tools/cmd/runsim@v1.0.0 - - uses: actions/cache@v2.1.2 + - uses: actions/cache@v2.1.3 with: path: ~/go/bin key: ${{ runner.os }}-go-runsim-binary @@ -60,7 +60,7 @@ jobs: **/**.go go.mod go.sum - - uses: actions/cache@v2.1.2 + - uses: actions/cache@v2.1.3 with: path: ~/go/bin key: ${{ runner.os }}-go-runsim-binary @@ -88,7 +88,7 @@ jobs: go.sum SET_ENV_NAME_INSERTIONS: 1 SET_ENV_NAME_LINES: 1 - - uses: actions/cache@v2.1.2 + - uses: actions/cache@v2.1.3 with: path: ~/go/bin key: ${{ runner.os }}-go-runsim-binary @@ -116,7 +116,7 @@ jobs: go.sum SET_ENV_NAME_INSERTIONS: 1 SET_ENV_NAME_LINES: 1 - - uses: actions/cache@v2.1.2 + - uses: actions/cache@v2.1.3 with: path: ~/go/bin key: ${{ runner.os }}-go-runsim-binary @@ -144,7 +144,7 @@ jobs: go.sum SET_ENV_NAME_INSERTIONS: 1 SET_ENV_NAME_LINES: 1 - - uses: actions/cache@v2.1.2 + - uses: actions/cache@v2.1.3 with: path: ~/go/bin key: ${{ runner.os }}-go-runsim-binary diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4c81b22003..afa753e232 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -26,7 +26,7 @@ jobs: - name: install tparse run: | export GO111MODULE="on" && go get github.com/mfridman/tparse@v0.8.3 - - uses: actions/cache@v2.1.2 + - uses: actions/cache@v2.1.3 with: path: ~/go/bin key: ${{ runner.os }}-go-tparse-binary @@ -216,7 +216,7 @@ jobs: with: name: "${{ github.sha }}-03-race-output" if: env.GIT_DIFF - - uses: actions/cache@v2.1.2 + - uses: actions/cache@v2.1.3 with: path: ~/go/bin key: ${{ runner.os }}-go-tparse-binary From f294db9ccff7d4de1d6a1ae5f8738177bd874a56 Mon Sep 17 00:00:00 2001 From: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Date: Mon, 9 Nov 2020 09:49:16 +0100 Subject: [PATCH 058/136] x/ibc: transfer specs (#7580) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * x/ibc: transfer specs * update titles and list todos * denom trace and client UX * add UX recommendations and locked funds section * metrics * state transitions * Apply suggestions from code review Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com> * address comments from review * jack suggestions * add example * fix * address comments from call with @zakimanian * Update x/ibc/applications/transfer/spec/01_concepts.md Co-authored-by: Christopher Goes * add comment about verification * address comments from review Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com> Co-authored-by: Christopher Goes --- .../applications/transfer/spec/01_concepts.md | 100 +++++++++++++++++- x/ibc/applications/transfer/spec/02_state.md | 5 + .../transfer/spec/03_state_transitions.md | 31 ++++++ .../applications/transfer/spec/04_messages.md | 4 +- .../applications/transfer/spec/06_metrics.md | 14 +++ .../spec/{06_params.md => 07_params.md} | 6 +- x/ibc/applications/transfer/spec/README.md | 3 +- 7 files changed, 155 insertions(+), 8 deletions(-) create mode 100644 x/ibc/applications/transfer/spec/06_metrics.md rename x/ibc/applications/transfer/spec/{06_params.md => 07_params.md} (78%) diff --git a/x/ibc/applications/transfer/spec/01_concepts.md b/x/ibc/applications/transfer/spec/01_concepts.md index a9e1a30ccb..55b8a6c0c6 100644 --- a/x/ibc/applications/transfer/spec/01_concepts.md +++ b/x/ibc/applications/transfer/spec/01_concepts.md @@ -9,7 +9,103 @@ order: 1 ICS20 uses the recommended acknowledgement format as specified by [ICS 04](https://github.com/cosmos/ics/tree/master/spec/ics-004-channel-and-packet-semantics#acknowledgement-envelope). A successful receive of a transfer packet will result in a Result Acknowledgement being written -with the value `[]byte(byte(1))` in the `Response` field. +with the value `[]byte(byte(1))` in the `Response` field. An unsuccessful receive of a transfer packet will result in an Error Acknowledgement being written -with the error message in the `Response` field. +with the error message in the `Response` field. + +## Denomination Trace + +The denomination trace corresponds to the information that allows a token to be traced back to its +origin chain. It contains a sequence of port and channel identifiers ordered from the most recent to +the oldest in the timeline of transfers. + +This information is included on the token denomination field in the form of a hash to prevent an +unbounded denomination length. For example, the token `transfer/channelToA/uatom` will be displayed +as `ibc/7F1D3FCF4AE79E1554D670D1AD949A9BA4E4A3C76C63093E17E446A46061A7A2`. + +Each send to any chain other than the one it was previously received from is a movement forwards in +the token's timeline. This causes trace to be added to the token's history and the destination port +and destination channel to be prefixed to the denomination. In these instances the sender chain is +acting as the "source zone". When the token is sent back to the chain it previously received from, the +prefix is removed. This is a backwards movement in the token's timeline and the sender chain is +acting as the "sink zone". + +It is strongly recommended to read the full details of [ADR 001: Coin Source Tracing](./../../../../../docs/architecture/adr-001-coin-source-tracing.md) to understand the implications and context of the IBC token representations. + +### UX suggestions for clients + +For clients (wallets, exchanges, applications, block explorers, etc) that want to display the source of the token, it is recommended to use the following +alternatives for each of the cases below: + +#### Direct connection + +If the denomination trace contains a single identifier prefix pair (as in the example above), then +the easiest way to retrieve the chain and light client identifier is to map the trace information +directly. In summary, this requires querying the channel from the denomination trace identifiers, +and then the counterparty client state using the counterparty port and channel identifiers from the +retrieved channel. + +A general pseudo algorithm would look like the following: + +1. Query the full denomination trace. +2. Query the channel with the `portID/channelID` pair, which corresponds to the first destination of the + token. +3. Query the client state using the identifiers pair. Note that this query will return a `"Not + Found"` response if the current chain is not connected to this channel. +4. Retrieve the the client identifier or chain identifier from the client state (eg: on + Tendermint clients) and store it locally. + +Using the gRPC gataway client service the steps above would be, with a given IBC token `ibc/7F1D3FCF4AE79E1554D670D1AD949A9BA4E4A3C76C63093E17E446A46061A7A2` stored on `chainB`: + +1. `GET /ibc_transfer/v1beta1/denom_traces/7F1D3FCF4AE79E1554D670D1AD949A9BA4E4A3C76C63093E17E446A46061A7A2` -> `{"path": "transfer/channelToA", "base_denom": "uatom"}` +2. `GET /ibc/channel/v1beta1/channels/channelToA/ports/transfer/client_state"` -> `{"client_id": "clientA", "chain-id": "chainA", ...}` +3. `GET /ibc/channel/v1beta1/channels/channelToA/ports/transfer"` -> `{"channel_id": "channelToA", port_id": "transfer", counterparty: {"channel_id": "channelToB", port_id": "transfer"}, ...}` +4. `GET /ibc/channel/v1beta1/channels/channelToB/ports/transfer/client_state" -> {"client_id": "clientB", "chain-id": "chainB", ...}` + +Then, the token transfer chain path for the `uatom` denomination would be: `chainA` -> `chainB`. + +### Multiple hops + +The multiple channel hops case applies when the token has passed through multiple chains between the original source and final destination chains. + +The IBC protocol doesn't know the topology of the overall network (i.e connections between chains and identifier names between them). For this reason, in the the multiple hops case, a particular chain in the timeline of the individual transfers can't query the chain and client identifiers of the other chains. + +Take for example the following sequence of transfers `A -> B -> C` for an IBC token, with a final prefix path (trace info) of `transfer/channelChainC/transfer/channelChainB`. What the paragraph above means is that is that even in the case that chain `C` is directly connected to chain `A`, querying the port and channel identifiers that chain `B` uses to connect to chain `A` (eg: `transfer/channelChainA`) can be completely different from the one that chain `C` uses to connect to chain `A` (eg: `transfer/channelToChainA`). + +Thus the proposed solution for clients that the IBC team recommends are the following: + +- **Connect to all chains**: Connecting to all the chains in the timeline would allow clients to + perform the queries outlined in the [direct connection](#direct-connection) section to each + relevant chain. By repeatedly following the port and channel denomination trace transfer timeline, + clients should always be able to find all the relevant identifiers. This comes at the tradeoff + that the client must connect to nodes on each of the chains in order to perform the queries. +- **Relayer as a Service (RaaS)**: A longer term solution is to use/create a relayer service that + could map the denomination trace to the chain path timeline for each token (i.e `origin chain -> + chain #1 -> ... -> chain #(n-1) -> final chain`). These services could provide merkle proofs in + order to allow clients to optionally verify the path timeline correctness for themselves by + running light clients. If the proofs are not verified, they should be considered as trusted third + parties services. Additionally, client would be advised in the future to use RaaS that support the + largest number of connections between chains in the ecosystem. Unfortunately, none of the existing + public relayers (in [Golang](https://github.com/cosmos/relayer) and + [Rust](https://github.com/informalsystems/ibc-rs)), provide this service to clients. + +::: tip +The only viable alternative for clients (at the time of writing) to tokens with multiple connection hops, is to connect to all chains directly and perform relevant queries to each of them in the sequence. +::: + +## Locked Funds + +In some [exceptional cases](./../../../../../docs/architecture/adr-026-ibc-client-recovery-mechanisms.md#exceptional-cases), a client state associated with a given channel cannot be updated. This causes that funds from fungible tokens in that channel will be permanently locked and thus can no longer be transferred. + +To mitigate this, a client update governance proposal can be submitted to update the frozen client +with a new valid header. Once the proposal passes the client state will be unfrozen and the funds +from the associated channels will then be unlocked. This mechanism only applies to clients that +allow updates via governance, such as Tendermint clients. + +In addition to this, it's important to mention that a token must be sent back along the exact route +that it took originally un order to return it to its original form on the source chain (eg: the +Cosmos Hub for the `uatom`). Sending a token back to the same chain across a different channel will +**not** move the token back across its timeline. If a channel in the chain history closes before the +token can be sent back across that channel, then the token will not be returnable to its original +form. diff --git a/x/ibc/applications/transfer/spec/02_state.md b/x/ibc/applications/transfer/spec/02_state.md index b57ac80f2a..9cab8d677f 100644 --- a/x/ibc/applications/transfer/spec/02_state.md +++ b/x/ibc/applications/transfer/spec/02_state.md @@ -3,3 +3,8 @@ order: 2 --> # State + +The transfer IBC application module keeps state of the port to which the module is binded and the denomination trace information as outlined in [ADR 01](./../../../../../docs/architecture/adr-001-coin-source-tracing.md). + +- `Port`: `0x01 -> ProtocolBuffer(string)` +- `DenomTrace`: `0x02 | []bytes(traceHash) -> ProtocolBuffer(DenomTrace)` diff --git a/x/ibc/applications/transfer/spec/03_state_transitions.md b/x/ibc/applications/transfer/spec/03_state_transitions.md index 4782e38a43..9090da5434 100644 --- a/x/ibc/applications/transfer/spec/03_state_transitions.md +++ b/x/ibc/applications/transfer/spec/03_state_transitions.md @@ -3,3 +3,34 @@ order: 3 --> # State Transitions + +## Send Fungible Tokens + +A successful fungible token send has two state transitions depending if the +transfer is a movement forward or backwards in the token's timeline: + +1. Sender chain is the source chain, *i.e* a transfer to any chain other than the one it was previously received from is a movement forwards in the token's timeline. This results in the following state transitions: + +- The coins are transferred to an escrow address (i.e locked) on the sender chain +- The coins are transferred to the receiving chain through IBC TAO logic. + +2. Sender chain is the sink chain, *i.e* the token is sent back to the chain it previously received from. This is a backwards movement in the token's timeline. This results in the following state transitions: + +- The coins (vouchers) are burned on the sender chain +- The coins transferred to the receiving chain though IBC TAO logic. + +## Receive Fungible Tokens + +A successful fungible token receive has two state transitions depending if the +transfer is a movement forward or backwards in the token's timeline: + +1. Receiver chain is the source chain. This is a backwards movement in the token's timeline. This results in the following state transitions: + +- The leftmost port and channel identifier pair is removed from the token denomination prefix. +- The tokens are unescrowed and sent to the receiving address. + +2. Receiver chain is the sink chain. This is a movement forwards in the token's timeline. This results in the following state transitions: + +- Token vouchers are minted by prefixing the destination port and channel identifiers to the trace information. +- The receiving chain stores the new trace information in the store (if not set already). +- The vouchers are sent to the receiving address. diff --git a/x/ibc/applications/transfer/spec/04_messages.md b/x/ibc/applications/transfer/spec/04_messages.md index dfd17d07f3..9da7673eb3 100644 --- a/x/ibc/applications/transfer/spec/04_messages.md +++ b/x/ibc/applications/transfer/spec/04_messages.md @@ -13,7 +13,7 @@ type MsgTransfer struct { SourcePort string SourceChannel string Token sdk.Coin - Sender sdk.AccAddress + Sender string Receiver string TimeoutHeight ibcexported.Height TimeoutTimestamp uint64 @@ -29,7 +29,7 @@ This message is expected to fail if: - `Sender` is empty - `Receiver` is empty - `TimeoutHeight` and `TimeoutTimestamp` are both zero -- `Token.Denom` is not a valid IBC denomination as per [ADR 001 - Coin Source Tracing](./../../../docs/architecture/adr-001-coin-source-tracing.md). +- `Token.Denom` is not a valid IBC denomination as per [ADR 001 - Coin Source Tracing](./../../../../../docs/architecture/adr-001-coin-source-tracing.md). This message will send a fungible token to the counterparty chain represented by the counterparty Channel End connected to the Channel End with the identifiers diff --git a/x/ibc/applications/transfer/spec/06_metrics.md b/x/ibc/applications/transfer/spec/06_metrics.md new file mode 100644 index 0000000000..21bb51c0a1 --- /dev/null +++ b/x/ibc/applications/transfer/spec/06_metrics.md @@ -0,0 +1,14 @@ + + +# Metrics + +The transfer IBC application module exposes the following set of [metrics](./../../../../../docs/core/telemetry.md). + +| Metric | Description | Unit | Type | +|:--------------------------------|:------------------------------------------------------------------------------------------|:----------------|:--------| +| `tx_msg_ibc_transfer` | The total amount of tokens transferred via IBC in a `MsgTransfer` (source or sink chain) | token | gauge | +| `ibc_transfer_packet_receive` | The total amount of tokens received in a `FungibleTokenPacketData` (source or sink chain) | token | gauge | +| `ibc_transfer_send` | Total number of IBC transfers sent from a chain (source or sink) | transfer | counter | +| `ibc_transfer_receive` | Total number of IBC transfers received to a chain (source or sink) | transfer | counter | diff --git a/x/ibc/applications/transfer/spec/06_params.md b/x/ibc/applications/transfer/spec/07_params.md similarity index 78% rename from x/ibc/applications/transfer/spec/06_params.md rename to x/ibc/applications/transfer/spec/07_params.md index e6c7e7ff1f..8d2b97c580 100644 --- a/x/ibc/applications/transfer/spec/06_params.md +++ b/x/ibc/applications/transfer/spec/07_params.md @@ -1,5 +1,5 @@ # Parameters @@ -17,7 +17,7 @@ The transfers enabled parameter controls send cross-chain transfer capabilities tokens. To prevent a single token from being transferred from the chain, set the `SendEnabled` parameter to `true` and -then set the bank module's [`SendEnabled` parameter](./../../bank/spec/05_params.md#sendenabled) for +then set the bank module's [`SendEnabled` parameter](./../../../../bank/spec/05_params.md#sendenabled) for the denomination to `false`. ## ReceiveEnabled @@ -26,5 +26,5 @@ The transfers enabled parameter controls receive cross-chain transfer capabiliti tokens. To prevent a single token from being transferred to the chain, set the `ReceiveEnabled` parameter to `true` and -then set the bank module's [`SendEnabled` parameter](./../../bank/spec/05_params.md#sendenabled) for +then set the bank module's [`SendEnabled` parameter](./../../../../bank/spec/05_params.md#sendenabled) for the denomination to `false`. diff --git a/x/ibc/applications/transfer/spec/README.md b/x/ibc/applications/transfer/spec/README.md index 963110e7a2..5230fdde41 100644 --- a/x/ibc/applications/transfer/spec/README.md +++ b/x/ibc/applications/transfer/spec/README.md @@ -20,4 +20,5 @@ For the general specification please refer to the [ICS20 Specification](https:// 3. **[State Transitions](03_state_transitions.md)** 4. **[Messages](04_messages.md)** 5. **[Events](05_events.md)** -6. **[Parameters](06_params.md)** +6. **[Metrics](06_metrics.md)** +7. **[Parameters](07_params.md)** From 70fa17b55a97e99f2db09a9769416cf52a962193 Mon Sep 17 00:00:00 2001 From: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Date: Mon, 9 Nov 2020 12:44:20 +0100 Subject: [PATCH 059/136] ibc: spec overview (#7853) --- x/ibc/core/spec/README.md | 92 +----------------------------- x/ibc/spec/README.md | 114 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 117 insertions(+), 89 deletions(-) create mode 100644 x/ibc/spec/README.md diff --git a/x/ibc/core/spec/README.md b/x/ibc/core/spec/README.md index 432aca93e1..0ae00bbcda 100644 --- a/x/ibc/core/spec/README.md +++ b/x/ibc/core/spec/README.md @@ -1,11 +1,11 @@ -# `ibc` +# `ibc core` ## Abstract @@ -23,89 +23,3 @@ For the general specification please refer to the [Interchain Standards](https:/ 4. **[Messages](04_messages.md)** 5. **[Callbacks](05_callbacks.md)** 6. **[Events](06_events.md)** - -## Implementation Details - -As stated above, the IBC implementation on the Cosmos SDK introduces some changes -to the general specification, in order to avoid code duplication and to take -advantage of the SDK architectural components such as the transaction routing -through `Handlers`. - -### Interchain Standards reference - -The following list is a mapping from each Interchain Standard to their implementation -in the SDK's `x/ibc` module: - -* [ICS 002 - Client Semantics](https://github.com/cosmos/ics/tree/master/spec/ics-002-client-semantics): Implemented in [`x/ibc/core/02-client`](https://github.com/cosmos/tree/master/ibc/core/02-client) -* [ICS 003 - Connection Semantics](https://github.com/cosmos/ics/blob/master/spec/ics-003-connection-semantics): Implemented in [`x/ibc/core/03-connection`](https://github.com/cosmos/tree/master/ibc/core/03-connection) -* [ICS 004 - Channel and Packet Semantics](https://github.com/cosmos/ics/blob/master/spec/ics-004-channel-and-packet-semantics): Implemented in [`x/ibc/core/04-channel`](https://github.com/cosmos/tree/master/ibc/core/04-channel) -* [ICS 005 - Port Allocation](https://github.com/cosmos/ics/blob/master/spec/ics-005-port-allocation): Implemented in [`x/ibc/core/05-port`](https://github.com/cosmos/tree/master/ibc/core/05-port) -* [ICS 006 - Solo Machine Client](https://github.com/cosmos/ics/blob/master/spec/ics-006-solo-machine-client): Implemented in [`x/ibc/light-clients/06-solomachine`](https://github.com/cosmos/tree/master/ibc/solomachine) -* [ICS 007 - Tendermint Client](https://github.com/cosmos/ics/blob/master/spec/ics-007-tendermint-client): Implemented in [`x/ibc/light-clients/07-tendermint`](https://github.com/cosmos/tree/master/ibc/light-clients/07-tendermint) -* [ICS 009 - Loopback Client](https://github.com/cosmos/ics/blob/master/spec/ics-009-loopback-client): Implemented in [`x/ibc/light-clients/09-localhost`](https://github.com/cosmos/tree/master/ibc/light-clients/09-localhost) -* [ICS 018- Relayer Algorithms](https://github.com/cosmos/ics/tree/master/spec/ics-018-relayer-algorithms): Implemented in it's own [relayer repository](https://github.com/cosmos/relayer) -* [ICS 020 - Fungible Token Transfer](https://github.com/cosmos/ics/tree/master/spec/ics-020-fungible-token-transfer): Implemented in [`x/ibc/applications/transfer`](https://github.com/cosmos/tree/master/ibc/applications/transfer) -* [ICS 023 - Vector Commitments](https://github.com/cosmos/ics/tree/master/spec/ics-023-vector-commitments): Implemented in [`x/ibc/core/23-commitment`](https://github.com/cosmos/tree/master/ibc/core/23-commitment) -* [ICS 024 - Host Requirements](https://github.com/cosmos/ics/tree/master/spec/ics-024-host-requirements): Implemented in [`x/ibc/core/24-host`](https://github.com/cosmos/tree/master/ibc/core/24-host) -* [ICS 025 - Handler Interface](https://github.com/cosmos/ics/tree/master/spec/ics-025-handler-interface): Handler interfaces are implemented at the top level in `x/ibc/handler.go`, -which call each ICS submodule's handlers (i.e `x/ibc/{XX-ICS}/handler.go`). -* [ICS 026 - Routing Module](https://github.com/cosmos/ics/blob/master/spec/ics-026-routing-module): Replaced by [ADR 15 - IBC Packet Receiver](../../../docs/architecture/adr-015-ibc-packet-receiver.md). - -### Architecture Decision Records (ADR) - -The following ADR provide the design and architecture decision of IBC-related components. - -* [ADR 001 - Coin Source Tracing](../../../docs/architecture/adr-001-coin-source-tracing.md): standard to hash the ICS20's fungible token -denomination trace path in order to support special characters and limit the maximum denomination length. -* [ADR 17 - Historical Header Module](../../../docs/architecture/adr-017-historical-header-module.md): Introduces the ability to introspect past -consensus states in order to verify their membership in the counterparty clients. -* [ADR 19 - Protobuf State Encoding](../../../docs/architecture/adr-019-protobuf-state-encoding.md): Migration from Amino to Protobuf for state encoding. -* [ADR 020 - Protocol Buffer Transaction Encoding](./../../docs/architecture/adr-020-protobuf-transaction-encoding.md): Client side migration to Protobuf. -* [ADR 021 - Protocol Buffer Query Encoding](../../../docs/architecture/adr-020-protobuf-query-encoding.md): Queries migration to Protobuf. -* [ADR 026 - IBC Client Recovery Mechanisms](../../../docs/architecture/adr-026-ibc-client-recovery-mechanisms.md): Allows IBC Clients to be recovered after freezing or expiry. - -### SDK Modules - -* [`x/capability`](https://github.com/cosmos/tree/master/x/capability): The capability module provides object-capability keys support through scoped keepers in order to authenticate usage of ports or channels. Check [ADR 3 - Dynamic Capability Store](../../../docs/architecture/adr-003-dynamic-capability-store.md) for more details. -* [`x/evidence`](https://github.com/cosmos/tree/master/x/evidence): The evidence module provides the interfaces and client logic to handle light client misbehaviour. Check [ADR 09 - Evidence Module](../../../docs/architecture/adr-009-evidence-module.md) for more details. - -## IBC module architecture - -> **NOTE for auditors**: If you're not familiar with the overall module structure from -the SDK modules, please check this [document](../../../docs/building-modules/structure.md) as -prerequisite reading. - -For ease of auditing, every Interchain Standard has been developed in its own -package. The development team separated the IBC TAO (Transport, Authentication, Ordering) ICS specifications from the IBC application level -specification. The following tree describes the architecture of the directories that -the `ibc` (TAO) and `ibc-transfer` ([ICS20](https://github.com/cosmos/ics/tree/master/spec/ics-020-fungible-token-transfer)) modules: - -```shell -x/ibc -├── applications/ -│ └──ibc-transfer/ -├── 02-client/ -├── 02-client/ -├── 03-connection/ -├── 04-channel/ -├── 05-port/ -├── light-clients/ -│   ├── 06-solomachine/ -│   ├── 07-tendermint/ -│   └── 09-localhost/ -├── 23-commitment/ -├── 24-host/ -├── client -│   ├── cli -│   │   └── cli.go -│   └── rest -│  └── rest.go -├── keeper -│  ├── keeper.go -│   └── querier.go -├── types -│ ├── errors.go -│ └── keys.go -├── handler.go -└── module.go -``` diff --git a/x/ibc/spec/README.md b/x/ibc/spec/README.md new file mode 100644 index 0000000000..a699c10abd --- /dev/null +++ b/x/ibc/spec/README.md @@ -0,0 +1,114 @@ + + +# `ibc` + +## Abstract + +This specification defines the implementation of the IBC protocol on the Cosmos SDK, the +changes made to the specification and where to find each specific ICS spec within +the module. + +For the general specification please refer to the [Interchain Standards](https://github.com/cosmos/ics). + +## Contents + +1. **Applications** + + 1.1. [Transfer](./../applications/transfer/spec/README.md) +2. **[Core](./../core/spec/README.md)** +3. **Light Clients** + + 3.1 [Solo Machine Client](./../light-clients/06-solomachine/spec/README.md) + + 3.2 [Tendermint Client](./../light-clients/07-tendermint/spec/README.md) + + 3.3 [Localhost Client](./../light-clients/09-localhost/spec/README.md) + +## Implementation Details + +As stated above, the IBC implementation on the Cosmos SDK introduces some changes +to the general specification, in order to avoid code duplication and to take +advantage of the SDK architectural components such as the transaction routing +through `Handlers`. + +### Interchain Standards reference + +The following list is a mapping from each Interchain Standard to their implementation +in the SDK's `x/ibc` module: + +* [ICS 002 - Client Semantics](https://github.com/cosmos/ics/tree/master/spec/ics-002-client-semantics): Implemented in [`x/ibc/core/02-client`](https://github.com/cosmos/tree/master/ibc/core/02-client) +* [ICS 003 - Connection Semantics](https://github.com/cosmos/ics/blob/master/spec/ics-003-connection-semantics): Implemented in [`x/ibc/core/03-connection`](https://github.com/cosmos/tree/master/ibc/core/03-connection) +* [ICS 004 - Channel and Packet Semantics](https://github.com/cosmos/ics/blob/master/spec/ics-004-channel-and-packet-semantics): Implemented in [`x/ibc/core/04-channel`](https://github.com/cosmos/tree/master/ibc/core/04-channel) +* [ICS 005 - Port Allocation](https://github.com/cosmos/ics/blob/master/spec/ics-005-port-allocation): Implemented in [`x/ibc/core/05-port`](https://github.com/cosmos/tree/master/ibc/core/05-port) +* [ICS 006 - Solo Machine Client](https://github.com/cosmos/ics/blob/master/spec/ics-006-solo-machine-client): Implemented in [`x/ibc/light-clients/06-solomachine`](https://github.com/cosmos/tree/master/ibc/solomachine) +* [ICS 007 - Tendermint Client](https://github.com/cosmos/ics/blob/master/spec/ics-007-tendermint-client): Implemented in [`x/ibc/light-clients/07-tendermint`](https://github.com/cosmos/tree/master/ibc/light-clients/07-tendermint) +* [ICS 009 - Loopback Client](https://github.com/cosmos/ics/blob/master/spec/ics-009-loopback-client): Implemented in [`x/ibc/light-clients/09-localhost`](https://github.com/cosmos/tree/master/ibc/light-clients/09-localhost) +* [ICS 018- Relayer Algorithms](https://github.com/cosmos/ics/tree/master/spec/ics-018-relayer-algorithms): Implemented in it's own [relayer repository](https://github.com/cosmos/relayer) +* [ICS 020 - Fungible Token Transfer](https://github.com/cosmos/ics/tree/master/spec/ics-020-fungible-token-transfer): Implemented in [`x/ibc/applications/transfer`](https://github.com/cosmos/tree/master/ibc/applications/transfer) +* [ICS 023 - Vector Commitments](https://github.com/cosmos/ics/tree/master/spec/ics-023-vector-commitments): Implemented in [`x/ibc/core/23-commitment`](https://github.com/cosmos/tree/master/ibc/core/23-commitment) +* [ICS 024 - Host Requirements](https://github.com/cosmos/ics/tree/master/spec/ics-024-host-requirements): Implemented in [`x/ibc/core/24-host`](https://github.com/cosmos/tree/master/ibc/core/24-host) +* [ICS 025 - Handler Interface](https://github.com/cosmos/ics/tree/master/spec/ics-025-handler-interface): `Handler` interfaces are implemented at the top level in `x/ibc/handler.go`, +which call each ICS submodule's handlers (i.e `x/ibc/*/{XX-ICS}/handler.go`). +* [ICS 026 - Routing Module](https://github.com/cosmos/ics/blob/master/spec/ics-026-routing-module): Replaced by [ADR 15 - IBC Packet Receiver](../../../docs/architecture/adr-015-ibc-packet-receiver.md). + +### Architecture Decision Records (ADR) + +The following ADR provide the design and architecture decision of IBC-related components. + +* [ADR 001 - Coin Source Tracing](../../../docs/architecture/adr-001-coin-source-tracing.md): standard to hash the ICS20's fungible token +denomination trace path in order to support special characters and limit the maximum denomination length. +* [ADR 17 - Historical Header Module](../../../docs/architecture/adr-017-historical-header-module.md): Introduces the ability to introspect past +consensus states in order to verify their membership in the counterparty clients. +* [ADR 19 - Protobuf State Encoding](../../../docs/architecture/adr-019-protobuf-state-encoding.md): Migration from Amino to Protobuf for state encoding. +* [ADR 020 - Protocol Buffer Transaction Encoding](./../../docs/architecture/adr-020-protobuf-transaction-encoding.md): Client side migration to Protobuf. +* [ADR 021 - Protocol Buffer Query Encoding](../../../docs/architecture/adr-020-protobuf-query-encoding.md): Queries migration to Protobuf. +* [ADR 026 - IBC Client Recovery Mechanisms](../../../docs/architecture/adr-026-ibc-client-recovery-mechanisms.md): Allows IBC Clients to be recovered after freezing or expiry. + +### SDK Modules + +* [`x/capability`](https://github.com/cosmos/tree/master/x/capability): The capability module provides object-capability keys support through scoped keepers in order to authenticate usage of ports or channels. Check [ADR 3 - Dynamic Capability Store](../../../docs/architecture/adr-003-dynamic-capability-store.md) for more details. + +## IBC module architecture + +> **NOTE for auditors**: If you're not familiar with the overall module structure from +the SDK modules, please check this [document](../../../docs/building-modules/structure.md) as +prerequisite reading. + +For ease of auditing, every Interchain Standard has been developed in its own +package. The development team separated the IBC TAO (Transport, Authentication, Ordering) ICS specifications from the IBC application level +specification. The following tree describes the architecture of the directories that +the `ibc` (TAO) and `ibc-transfer` ([ICS20](https://github.com/cosmos/ics/tree/master/spec/ics-020-fungible-token-transfer)) modules: + +```shell +x/ibc +├── applications/ +│ └──transfer/ +├── core/ +│   ├── 02-client/ +│   ├── 03-connection/ +│   ├── 04-channel/ +│   ├── 05-port/ +│   ├── 23-commitment/ +│   ├── 24-host/ +│  ├── client +│  │   └── cli +│ │       └── cli.go +│  ├── keeper +│  │ ├── keeper.go +│   │ └── querier.go +│ ├── types +│ │ ├── errors.go +│ │ └── keys.go +│ ├── handler.go +│ └── module.go +├── light-clients/ +│   ├── 06-solomachine/ +│   ├── 07-tendermint/ +│   └── 09-localhost/ +└── testing/ +``` From ebb7698339cb548dc6543f589748cd2ba503f59e Mon Sep 17 00:00:00 2001 From: antstalepresh Date: Tue, 10 Nov 2020 00:14:10 +1000 Subject: [PATCH 060/136] status update for power reduction test --- x/staking/common_test.go | 4 +-- x/staking/genesis_test.go | 2 +- x/staking/handler_test.go | 76 +++++++++++++++++++++++---------------- 3 files changed, 49 insertions(+), 33 deletions(-) diff --git a/x/staking/common_test.go b/x/staking/common_test.go index 30072c7b58..640fd2e2e1 100644 --- a/x/staking/common_test.go +++ b/x/staking/common_test.go @@ -48,8 +48,8 @@ func getBaseSimappWithCustomKeeper() (*codec.LegacyAmino, *simapp.SimApp, sdk.Co } // generateAddresses generates numAddrs of normal AccAddrs and ValAddrs -func generateAddresses(app *simapp.SimApp, ctx sdk.Context, numAddrs int, accAmount int64) ([]sdk.AccAddress, []sdk.ValAddress) { - addrDels := simapp.AddTestAddrsIncremental(app, ctx, numAddrs, sdk.NewInt(accAmount)) +func generateAddresses(app *simapp.SimApp, ctx sdk.Context, numAddrs int, accAmount sdk.Int) ([]sdk.AccAddress, []sdk.ValAddress) { + addrDels := simapp.AddTestAddrsIncremental(app, ctx, numAddrs, accAmount) addrVals := simapp.ConvertAddrsToValAddrs(addrDels) return addrDels, addrVals diff --git a/x/staking/genesis_test.go b/x/staking/genesis_test.go index 64306de276..2e50e2f6a7 100644 --- a/x/staking/genesis_test.go +++ b/x/staking/genesis_test.go @@ -21,7 +21,7 @@ import ( func bootstrapGenesisTest(t *testing.T, power int64, numAddrs int) (*simapp.SimApp, sdk.Context, []sdk.AccAddress) { _, app, ctx := getBaseSimappWithCustomKeeper() - addrDels, _ := generateAddresses(app, ctx, numAddrs, 10000) + addrDels, _ := generateAddresses(app, ctx, numAddrs, sdk.NewInt(10000)) amt := sdk.TokensFromConsensusPower(power) totalSupply := sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), amt.MulRaw(int64(len(addrDels))))) diff --git a/x/staking/handler_test.go b/x/staking/handler_test.go index c1feb8f5ee..e2ba458e63 100644 --- a/x/staking/handler_test.go +++ b/x/staking/handler_test.go @@ -24,7 +24,7 @@ import ( "github.com/golang/protobuf/proto" ) -func bootstrapHandlerGenesisTest(t *testing.T, power int64, numAddrs int, accAmount int64) (*simapp.SimApp, sdk.Context, []sdk.AccAddress, []sdk.ValAddress) { +func bootstrapHandlerGenesisTest(t *testing.T, power int64, numAddrs int, accAmount sdk.Int) (*simapp.SimApp, sdk.Context, []sdk.AccAddress, []sdk.ValAddress) { _, app, ctx := getBaseSimappWithCustomKeeper() addrDels, addrVals := generateAddresses(app, ctx, numAddrs, accAmount) @@ -44,7 +44,7 @@ func bootstrapHandlerGenesisTest(t *testing.T, power int64, numAddrs int, accAmo func TestValidatorByPowerIndex(t *testing.T) { initPower := int64(1000000) - app, ctx, _, valAddrs := bootstrapHandlerGenesisTest(t, initPower, 10, 10000000000000) + app, ctx, _, valAddrs := bootstrapHandlerGenesisTest(t, initPower, 10, sdk.TokensFromConsensusPower(initPower)) validatorAddr, validatorAddr3 := valAddrs[0], valAddrs[1] tstaking := teststaking.NewHelper(t, ctx, app.StakingKeeper) @@ -121,7 +121,7 @@ func TestValidatorByPowerIndex(t *testing.T) { func TestDuplicatesMsgCreateValidator(t *testing.T) { initPower := int64(1000000) - app, ctx, _, valAddrs := bootstrapHandlerGenesisTest(t, initPower, 10, 10000000000000) + app, ctx, _, valAddrs := bootstrapHandlerGenesisTest(t, initPower, 10, sdk.TokensFromConsensusPower(initPower)) addr1, addr2 := valAddrs[0], valAddrs[1] pk1, pk2 := PKs[0], PKs[1] @@ -164,7 +164,8 @@ func TestDuplicatesMsgCreateValidator(t *testing.T) { } func TestInvalidPubKeyTypeMsgCreateValidator(t *testing.T) { - app, ctx, _, valAddrs := bootstrapHandlerGenesisTest(t, 1000, 1, 1000) + initPower := int64(1000) + app, ctx, _, valAddrs := bootstrapHandlerGenesisTest(t, initPower, 1, sdk.TokensFromConsensusPower(initPower)) ctx = ctx.WithConsensusParams(&abci.ConsensusParams{ Validator: &tmproto.ValidatorParams{PubKeyTypes: []string{tmtypes.ABCIPubKeyTypeEd25519}}, }) @@ -178,7 +179,8 @@ func TestInvalidPubKeyTypeMsgCreateValidator(t *testing.T) { } func TestLegacyValidatorDelegations(t *testing.T) { - app, ctx, delAddrs, valAddrs := bootstrapHandlerGenesisTest(t, 1000, 2, 100000000) + initPower := int64(1000) + app, ctx, delAddrs, valAddrs := bootstrapHandlerGenesisTest(t, initPower, 2, sdk.TokensFromConsensusPower(initPower)) tstaking := teststaking.NewHelper(t, ctx, app.StakingKeeper) valAddr := valAddrs[0] @@ -258,7 +260,7 @@ func TestLegacyValidatorDelegations(t *testing.T) { func TestIncrementsMsgDelegate(t *testing.T) { initPower := int64(1000) initBond := sdk.TokensFromConsensusPower(initPower) - app, ctx, delAddrs, valAddrs := bootstrapHandlerGenesisTest(t, initPower, 2, 1000000000) + app, ctx, delAddrs, valAddrs := bootstrapHandlerGenesisTest(t, initPower, 2, sdk.TokensFromConsensusPower(initPower)) params := app.StakingKeeper.GetParams(ctx) validatorAddr, delegatorAddr := valAddrs[0], delAddrs[1] @@ -281,7 +283,7 @@ func TestIncrementsMsgDelegate(t *testing.T) { require.Equal(t, bondAmount, bond.Shares.RoundInt()) bondedTokens := app.StakingKeeper.TotalBondedTokens(ctx) - require.True(t, bondAmount.Equal(bondedTokens)) + require.Equal(t, bondAmount.Int64(), bondedTokens.Int64()) for i := int64(0); i < 5; i++ { ctx = ctx.WithBlockHeight(i) @@ -317,7 +319,7 @@ func TestIncrementsMsgDelegate(t *testing.T) { func TestEditValidatorDecreaseMinSelfDelegation(t *testing.T) { initPower := int64(100) initBond := sdk.TokensFromConsensusPower(100) - app, ctx, _, valAddrs := bootstrapHandlerGenesisTest(t, initPower, 1, 1000000000) + app, ctx, _, valAddrs := bootstrapHandlerGenesisTest(t, initPower, 1, sdk.TokensFromConsensusPower(initPower)) validatorAddr := valAddrs[0] tstaking := teststaking.NewHelper(t, ctx, app.StakingKeeper) @@ -349,7 +351,7 @@ func TestEditValidatorIncreaseMinSelfDelegationBeyondCurrentBond(t *testing.T) { initPower := int64(100) initBond := sdk.TokensFromConsensusPower(100) - app, ctx, _, valAddrs := bootstrapHandlerGenesisTest(t, initPower, 2, 1000000000) + app, ctx, _, valAddrs := bootstrapHandlerGenesisTest(t, initPower, 2, sdk.TokensFromConsensusPower(initPower)) validatorAddr := valAddrs[0] tstaking := teststaking.NewHelper(t, ctx, app.StakingKeeper) @@ -379,7 +381,7 @@ func TestEditValidatorIncreaseMinSelfDelegationBeyondCurrentBond(t *testing.T) { func TestIncrementsMsgUnbond(t *testing.T) { initPower := int64(1000) - app, ctx, delAddrs, valAddrs := bootstrapHandlerGenesisTest(t, initPower, 2, 1000000000) + app, ctx, delAddrs, valAddrs := bootstrapHandlerGenesisTest(t, initPower, 2, sdk.TokensFromConsensusPower(initPower)) tstaking := teststaking.NewHelper(t, ctx, app.StakingKeeper) params := app.StakingKeeper.GetParams(ctx) denom := params.BondDenom @@ -436,13 +438,13 @@ func TestIncrementsMsgUnbond(t *testing.T) { gotDelegatorShares := validator.DelegatorShares.RoundInt() gotDelegatorAcc := app.BankKeeper.GetBalance(ctx, delegatorAddr, params.BondDenom).Amount - require.True(t, expBond.Equal(gotBond), + require.Equal(t, expBond.Int64(), gotBond.Int64(), "i: %v\nexpBond: %v\ngotBond: %v\nvalidator: %v\nbond: %v\n", i, expBond, gotBond, validator, bond) - require.True(t, expDelegatorShares.Equal(gotDelegatorShares), + require.Equal(t, expDelegatorShares.Int64(), gotDelegatorShares.Int64(), "i: %v\nexpDelegatorShares: %v\ngotDelegatorShares: %v\nvalidator: %v\nbond: %v\n", i, expDelegatorShares, gotDelegatorShares, validator, bond) - require.True(t, expDelegatorAcc.Equal(gotDelegatorAcc), + require.Equal(t, expDelegatorAcc.Int64(), gotDelegatorAcc.Int64(), "i: %v\nexpDelegatorAcc: %v\ngotDelegatorAcc: %v\nvalidator: %v\nbond: %v\n", i, expDelegatorAcc, gotDelegatorAcc, validator, bond) } @@ -468,7 +470,7 @@ func TestIncrementsMsgUnbond(t *testing.T) { func TestMultipleMsgCreateValidator(t *testing.T) { initPower := int64(1000) initTokens := sdk.TokensFromConsensusPower(initPower) - app, ctx, delAddrs, valAddrs := bootstrapHandlerGenesisTest(t, initPower, 3, 1000000000) + app, ctx, delAddrs, valAddrs := bootstrapHandlerGenesisTest(t, initPower, 3, sdk.TokensFromConsensusPower(initPower)) params := app.StakingKeeper.GetParams(ctx) blockTime := time.Now().UTC() @@ -499,7 +501,7 @@ func TestMultipleMsgCreateValidator(t *testing.T) { balanceGot := app.BankKeeper.GetBalance(ctx, delegatorAddrs[i], params.BondDenom).Amount require.Equal(t, i+1, len(validators), "expected %d validators got %d, validators: %v", i+1, len(validators), validators) - require.Equal(t, amt, val.DelegatorShares.RoundInt(), "expected %d shares, got %d", 10, val.DelegatorShares) + require.Equal(t, amt, val.DelegatorShares.RoundInt(), "expected %d shares, got %d", amt, val.DelegatorShares) require.Equal(t, balanceExpd, balanceGot, "expected account to have %d, got %d", balanceExpd, balanceGot) } @@ -536,7 +538,8 @@ func TestMultipleMsgCreateValidator(t *testing.T) { } func TestMultipleMsgDelegate(t *testing.T) { - app, ctx, delAddrs, valAddrs := bootstrapHandlerGenesisTest(t, 1000, 50, 1000000000) + initPower := int64(1000) + app, ctx, delAddrs, valAddrs := bootstrapHandlerGenesisTest(t, initPower, 50, sdk.TokensFromConsensusPower(initPower)) validatorAddr, delegatorAddrs := valAddrs[0], delAddrs[1:] tstaking := teststaking.NewHelper(t, ctx, app.StakingKeeper) var amount int64 = 10 @@ -569,7 +572,8 @@ func TestMultipleMsgDelegate(t *testing.T) { } func TestJailValidator(t *testing.T) { - app, ctx, delAddrs, valAddrs := bootstrapHandlerGenesisTest(t, 1000, 2, 1000000000) + initPower := int64(1000) + app, ctx, delAddrs, valAddrs := bootstrapHandlerGenesisTest(t, initPower, 2, sdk.TokensFromConsensusPower(initPower)) validatorAddr, delegatorAddr := valAddrs[0], delAddrs[1] tstaking := teststaking.NewHelper(t, ctx, app.StakingKeeper) var amt int64 = 10 @@ -607,7 +611,8 @@ func TestJailValidator(t *testing.T) { } func TestValidatorQueue(t *testing.T) { - app, ctx, delAddrs, valAddrs := bootstrapHandlerGenesisTest(t, 1000, 2, 1000000000) + initPower := int64(1000) + app, ctx, delAddrs, valAddrs := bootstrapHandlerGenesisTest(t, initPower, 2, sdk.TokensFromConsensusPower(initPower)) validatorAddr, delegatorAddr := valAddrs[0], delAddrs[1] tstaking := teststaking.NewHelper(t, ctx, app.StakingKeeper) @@ -653,7 +658,8 @@ func TestValidatorQueue(t *testing.T) { } func TestUnbondingPeriod(t *testing.T) { - app, ctx, _, valAddrs := bootstrapHandlerGenesisTest(t, 1000, 1, 1000000000) + initPower := int64(1000) + app, ctx, _, valAddrs := bootstrapHandlerGenesisTest(t, initPower, 1, sdk.TokensFromConsensusPower(initPower)) validatorAddr := valAddrs[0] tstaking := teststaking.NewHelper(t, ctx, app.StakingKeeper) @@ -691,7 +697,8 @@ func TestUnbondingPeriod(t *testing.T) { } func TestUnbondingFromUnbondingValidator(t *testing.T) { - app, ctx, delAddrs, valAddrs := bootstrapHandlerGenesisTest(t, 1000, 2, 1000000000) + initPower := int64(1000) + app, ctx, delAddrs, valAddrs := bootstrapHandlerGenesisTest(t, initPower, 2, sdk.TokensFromConsensusPower(initPower)) validatorAddr, delegatorAddr := valAddrs[0], delAddrs[1] tstaking := teststaking.NewHelper(t, ctx, app.StakingKeeper) @@ -723,7 +730,8 @@ func TestUnbondingFromUnbondingValidator(t *testing.T) { } func TestRedelegationPeriod(t *testing.T) { - app, ctx, _, valAddrs := bootstrapHandlerGenesisTest(t, 1000, 2, 1000000000) + initPower := int64(1000) + app, ctx, _, valAddrs := bootstrapHandlerGenesisTest(t, initPower, 2, sdk.TokensFromConsensusPower(initPower)) validatorAddr, validatorAddr2 := valAddrs[0], valAddrs[1] denom := app.StakingKeeper.GetParams(ctx).BondDenom tstaking := teststaking.NewHelper(t, ctx, app.StakingKeeper) @@ -740,7 +748,7 @@ func TestRedelegationPeriod(t *testing.T) { // balance should have been subtracted after creation amt2 := app.BankKeeper.GetBalance(ctx, sdk.AccAddress(validatorAddr), denom).Amount - require.True(t, amt1.Sub(sdk.NewInt(10)).Equal(amt2), "expected coins to be subtracted") + require.Equal(t, amt1.Sub(sdk.NewInt(10)).Int64(), amt2.Int64(), "expected coins to be subtracted") tstaking.CreateValidator(validatorAddr2, PKs[1], 10, true) bal1 := app.BankKeeper.GetAllBalances(ctx, sdk.AccAddress(validatorAddr)) @@ -773,7 +781,8 @@ func TestRedelegationPeriod(t *testing.T) { } func TestTransitiveRedelegation(t *testing.T) { - app, ctx, _, valAddrs := bootstrapHandlerGenesisTest(t, 1000, 3, 1000000000) + initPower := int64(1000) + app, ctx, _, valAddrs := bootstrapHandlerGenesisTest(t, initPower, 3, sdk.TokensFromConsensusPower(initPower)) val1, val2, val3 := valAddrs[0], valAddrs[1], valAddrs[2] blockTime := time.Now().UTC() @@ -806,7 +815,8 @@ func TestTransitiveRedelegation(t *testing.T) { } func TestMultipleRedelegationAtSameTime(t *testing.T) { - app, ctx, _, valAddrs := bootstrapHandlerGenesisTest(t, 1000, 2, 1000000000) + initPower := int64(1000) + app, ctx, _, valAddrs := bootstrapHandlerGenesisTest(t, initPower, 2, sdk.TokensFromConsensusPower(initPower)) valAddr := valAddrs[0] valAddr2 := valAddrs[1] tstaking := teststaking.NewHelper(t, ctx, app.StakingKeeper) @@ -849,7 +859,8 @@ func TestMultipleRedelegationAtSameTime(t *testing.T) { } func TestMultipleRedelegationAtUniqueTimes(t *testing.T) { - app, ctx, _, valAddrs := bootstrapHandlerGenesisTest(t, 1000, 2, 1000000000) + initPower := int64(1000) + app, ctx, _, valAddrs := bootstrapHandlerGenesisTest(t, initPower, 2, sdk.TokensFromConsensusPower(initPower)) valAddr := valAddrs[0] valAddr2 := valAddrs[1] tstaking := teststaking.NewHelper(t, ctx, app.StakingKeeper) @@ -895,7 +906,8 @@ func TestMultipleRedelegationAtUniqueTimes(t *testing.T) { } func TestMultipleUnbondingDelegationAtSameTime(t *testing.T) { - app, ctx, _, valAddrs := bootstrapHandlerGenesisTest(t, 1000, 1, 1000000000) + initPower := int64(1000) + app, ctx, _, valAddrs := bootstrapHandlerGenesisTest(t, initPower, 1, sdk.TokensFromConsensusPower(initPower)) valAddr := valAddrs[0] tstaking := teststaking.NewHelper(t, ctx, app.StakingKeeper) @@ -934,7 +946,8 @@ func TestMultipleUnbondingDelegationAtSameTime(t *testing.T) { } func TestMultipleUnbondingDelegationAtUniqueTimes(t *testing.T) { - app, ctx, _, valAddrs := bootstrapHandlerGenesisTest(t, 1000, 1, 1000000000) + initPower := int64(1000) + app, ctx, _, valAddrs := bootstrapHandlerGenesisTest(t, initPower, 1, sdk.TokensFromConsensusPower(initPower)) valAddr := valAddrs[0] tstaking := teststaking.NewHelper(t, ctx, app.StakingKeeper) @@ -981,7 +994,8 @@ func TestMultipleUnbondingDelegationAtUniqueTimes(t *testing.T) { } func TestUnbondingWhenExcessValidators(t *testing.T) { - app, ctx, _, valAddrs := bootstrapHandlerGenesisTest(t, 1000, 3, 1000000000) + initPower := int64(1000) + app, ctx, _, valAddrs := bootstrapHandlerGenesisTest(t, initPower, 3, sdk.TokensFromConsensusPower(initPower)) val1 := valAddrs[0] val2 := valAddrs[1] val3 := valAddrs[2] @@ -1020,7 +1034,8 @@ func TestUnbondingWhenExcessValidators(t *testing.T) { } func TestBondUnbondRedelegateSlashTwice(t *testing.T) { - app, ctx, delAddrs, valAddrs := bootstrapHandlerGenesisTest(t, 1000, 3, 1000000000) + initPower := int64(1000) + app, ctx, delAddrs, valAddrs := bootstrapHandlerGenesisTest(t, initPower, 3, sdk.TokensFromConsensusPower(initPower)) valA, valB, del := valAddrs[0], valAddrs[1], delAddrs[2] consAddr0 := sdk.ConsAddress(PKs[0].Address()) tstaking := teststaking.NewHelper(t, ctx, app.StakingKeeper) @@ -1124,7 +1139,8 @@ func TestInvalidMsg(t *testing.T) { } func TestInvalidCoinDenom(t *testing.T) { - app, ctx, delAddrs, valAddrs := bootstrapHandlerGenesisTest(t, 1000, 3, 1000000000) + initPower := int64(1000) + app, ctx, delAddrs, valAddrs := bootstrapHandlerGenesisTest(t, initPower, 3, sdk.TokensFromConsensusPower(initPower)) valA, valB, delAddr := valAddrs[0], valAddrs[1], delAddrs[2] tstaking := teststaking.NewHelper(t, ctx, app.StakingKeeper) From e172a0833351102d53a94c9dcf4747aec64b8dc1 Mon Sep 17 00:00:00 2001 From: Alessio Treglia Date: Mon, 9 Nov 2020 15:17:36 +0000 Subject: [PATCH 061/136] enrich versioning with build deps (#7848) `version --long` output now shows the list of build dependencies. Redirect version's output to `stdout`. --- go.sum | 2 -- version/command.go | 1 + version/version.go | 37 +++++++++++++++++++++++++++++++------ version/version_test.go | 16 ++++++++-------- 4 files changed, 40 insertions(+), 16 deletions(-) diff --git a/go.sum b/go.sum index 6b5e5ed526..8090e2d10b 100644 --- a/go.sum +++ b/go.sum @@ -595,8 +595,6 @@ github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15/go.mod h1:z4YtwM github.com/tendermint/go-amino v0.16.0 h1:GyhmgQKvqF82e2oZeuMSp9JTN0N09emoSZlb2lyGa2E= github.com/tendermint/go-amino v0.16.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= github.com/tendermint/tendermint v0.34.0-rc4/go.mod h1:yotsojf2C1QBOw4dZrTcxbyxmPUrT4hNuOQWX9XUwB4= -github.com/tendermint/tendermint v0.34.0-rc5 h1:2bnQfWyOMfTCbol5pwB8CgM2nxi6/Kz6zqlS6Udm/Cg= -github.com/tendermint/tendermint v0.34.0-rc5/go.mod h1:yotsojf2C1QBOw4dZrTcxbyxmPUrT4hNuOQWX9XUwB4= github.com/tendermint/tendermint v0.34.0-rc6 h1:SVuKGvvE22KxfuK8QUHctUrmOWJsncZSYXIYtcnoKN0= github.com/tendermint/tendermint v0.34.0-rc6/go.mod h1:ugzyZO5foutZImv0Iyx/gOFCX6mjJTgbLHTwi17VDVg= github.com/tendermint/tm-db v0.6.2 h1:DOn8jwCdjJblrCFJbtonEIPD1IuJWpbRUUdR8GWE4RM= diff --git a/version/command.go b/version/command.go index 9291c0a824..bb632aea5b 100644 --- a/version/command.go +++ b/version/command.go @@ -17,6 +17,7 @@ func NewVersionCommand() *cobra.Command { Short: "Print the application binary version information", RunE: func(cmd *cobra.Command, _ []string) error { verInfo := NewInfo() + cmd.SetOut(cmd.OutOrStdout()) if long, _ := cmd.Flags().GetBool(flagLong); !long { cmd.Println(verInfo.Version) diff --git a/version/version.go b/version/version.go index 1e40d483db..25995932fc 100644 --- a/version/version.go +++ b/version/version.go @@ -17,8 +17,10 @@ package version import ( + "encoding/json" "fmt" "runtime" + "runtime/debug" ) var ( @@ -36,12 +38,13 @@ var ( // Info defines the application version information. type Info struct { - Name string `json:"name" yaml:"name"` - AppName string `json:"server_name" yaml:"server_name"` - Version string `json:"version" yaml:"version"` - GitCommit string `json:"commit" yaml:"commit"` - BuildTags string `json:"build_tags" yaml:"build_tags"` - GoVersion string `json:"go" yaml:"go"` + Name string `json:"name" yaml:"name"` + AppName string `json:"server_name" yaml:"server_name"` + Version string `json:"version" yaml:"version"` + GitCommit string `json:"commit" yaml:"commit"` + BuildTags string `json:"build_tags" yaml:"build_tags"` + GoVersion string `json:"go" yaml:"go"` + BuildDeps []buildDep `json:"build_deps" yaml:"build_deps"` } func NewInfo() Info { @@ -52,6 +55,7 @@ func NewInfo() Info { GitCommit: Commit, BuildTags: BuildTags, GoVersion: fmt.Sprintf("go version %s %s/%s", runtime.Version(), runtime.GOOS, runtime.GOARCH), + BuildDeps: depsFromBuildInfo(), } } @@ -63,3 +67,24 @@ build tags: %s vi.Name, vi.Version, vi.GitCommit, vi.BuildTags, vi.GoVersion, ) } + +func depsFromBuildInfo() (deps []buildDep) { + buildInfo, ok := debug.ReadBuildInfo() + if !ok { + return nil + } + + for _, dep := range buildInfo.Deps { + deps = append(deps, buildDep{dep}) + } + + return +} + +type buildDep struct { + *debug.Module +} + +func (d buildDep) String() string { return fmt.Sprintf("%s@%s", d.Path, d.Version) } +func (d buildDep) MarshalJSON() ([]byte, error) { return json.Marshal(d.String()) } +func (d buildDep) MarshalYAML() (interface{}, error) { return d.String(), nil } diff --git a/version/version_test.go b/version/version_test.go index ef44f8d317..87608cfdbb 100644 --- a/version/version_test.go +++ b/version/version_test.go @@ -1,4 +1,4 @@ -package version +package version_test import ( "encoding/json" @@ -11,10 +11,11 @@ import ( "github.com/tendermint/tendermint/libs/cli" "github.com/cosmos/cosmos-sdk/testutil" + "github.com/cosmos/cosmos-sdk/version" ) func TestNewInfo(t *testing.T) { - info := NewInfo() + info := version.NewInfo() want := fmt.Sprintf(`: git commit: build tags: @@ -23,7 +24,7 @@ build tags: } func TestInfo_String(t *testing.T) { - info := Info{ + info := version.Info{ Name: "testapp", AppName: "testappd", Version: "1.0.0", @@ -39,12 +40,12 @@ go version go1.14 linux/amd64` } func Test_runVersionCmd(t *testing.T) { - cmd := NewVersionCommand() + cmd := version.NewVersionCommand() _, mockOut := testutil.ApplyMockIO(cmd) cmd.SetArgs([]string{ fmt.Sprintf("--%s=''", cli.OutputFlag), - fmt.Sprintf("--%s=false", flagLong), + "--long=false", }) require.NoError(t, cmd.Execute()) @@ -52,11 +53,10 @@ func Test_runVersionCmd(t *testing.T) { mockOut.Reset() cmd.SetArgs([]string{ - fmt.Sprintf("--%s=json", cli.OutputFlag), - fmt.Sprintf("--%s=true", flagLong), + fmt.Sprintf("--%s=json", cli.OutputFlag), "--long=true", }) - info := NewInfo() + info := version.NewInfo() stringInfo, err := json.Marshal(info) require.NoError(t, err) require.NoError(t, cmd.Execute()) From 90e9370bd80d9a3d41f7203ddb71166865561569 Mon Sep 17 00:00:00 2001 From: Marie Gauthier Date: Mon, 9 Nov 2020 17:01:43 +0100 Subject: [PATCH 062/136] Replace tmcrypto.PubKey by our own cryptotypes.PubKey (#7419) * WIP on removing tm pub/privkey * Fix part of crypto tests * Add PrivKeyLedgerSecp256K1 proto type * Use BasePrivKey for ledger priv key type * Refacto continued * First round * x/staking * Continue porting * x/* done * Make build pass * More conversion * Remove IntoTmPubKey * Fix test * Remove crypto.PubKey in some other places * Revert ledger changes * Fix comment * Remove useless function * Add To/FromTmPublicKey * Add migrate tests * Fix test * Fix another test * Rename tm conversion functions * Less code * Rename BasePrivKey to LedgerPrivKey * Add changelog * Rename functions Co-authored-by: Amaury Martiny Co-authored-by: Alessio Treglia --- CHANGELOG.md | 4 + client/account_retriever.go | 5 +- client/debug/main.go | 4 +- client/keys/add.go | 6 +- client/keys/show.go | 4 +- client/keys/show_test.go | 5 +- client/rpc/validators.go | 7 +- client/test_helpers.go | 5 +- client/tx/tx.go | 4 +- crypto/armor.go | 9 +- crypto/armor_test.go | 3 +- crypto/codec/amino.go | 18 +-- crypto/codec/proto.go | 10 -- crypto/codec/tm.go | 57 +++++++ crypto/hd/algo.go | 8 +- crypto/keyring/info.go | 49 +++--- crypto/keyring/keyring.go | 33 +++-- crypto/keyring/keyring_test.go | 10 +- crypto/keyring/legacy.go | 6 +- crypto/keyring/output_test.go | 4 +- crypto/keyring/types.go | 5 +- crypto/keys/ed25519/ed25519.go | 28 +--- crypto/keys/ed25519/ed25519_test.go | 10 +- crypto/keys/internal/benchmarking/bench.go | 8 +- crypto/keys/multisig/codec.go | 5 - crypto/keys/multisig/multisig.go | 26 ++-- crypto/keys/multisig/multisig_test.go | 31 ++-- crypto/keys/secp256k1/bench_test.go | 5 +- crypto/keys/secp256k1/secp256k1.go | 6 +- crypto/keys/secp256k1/secp256k1_test.go | 10 +- crypto/ledger/encode_test.go | 6 +- crypto/ledger/ledger_secp256k1.go | 18 +-- crypto/ledger/ledger_test.go | 11 +- crypto/types/multisig/multisignature.go | 8 +- crypto/types/multisig/pubkey.go | 9 +- crypto/types/types.go | 37 +++-- server/tm_cmds.go | 10 +- simapp/helpers/test_helpers.go | 5 +- simapp/simd/cmd/testnet.go | 6 +- simapp/test_helpers.go | 20 ++- tests/mocks/account_retriever.go | 6 +- testutil/network/network.go | 6 +- testutil/testdata/tx.go | 5 +- types/address.go | 57 ++----- types/address_test.go | 4 +- types/rest/rest_test.go | 14 +- types/simulation/account.go | 9 +- types/tx/signing/signature.go | 7 +- types/tx/types.go | 5 +- types/tx_msg.go | 5 +- x/auth/ante/ante_test.go | 104 ++++++------- x/auth/ante/basic.go | 5 +- x/auth/ante/basic_test.go | 18 +-- x/auth/ante/fee_test.go | 7 +- x/auth/ante/setup_test.go | 8 +- x/auth/ante/sigverify.go | 5 +- x/auth/ante/sigverify_test.go | 47 +++--- x/auth/ante/testutil_test.go | 8 +- x/auth/client/cli/cli_test.go | 6 +- x/auth/keeper/keeper.go | 6 +- x/auth/legacy/legacytx/stdsign.go | 9 +- x/auth/legacy/legacytx/stdtx.go | 12 +- x/auth/legacy/legacytx/stdtx_test.go | 12 +- x/auth/legacy/v038/types.go | 27 ++-- x/auth/legacy/v039/migrate_test.go | 104 +++++++++++++ x/auth/legacy/v039/types.go | 37 ++--- x/auth/signing/sig_verifiable_tx.go | 5 +- x/auth/signing/verify.go | 5 +- x/auth/signing/verify_test.go | 4 +- x/auth/testutil/suite.go | 8 +- x/auth/tx/builder.go | 21 +-- x/auth/tx/sigs.go | 10 +- x/auth/types/account.go | 17 ++- x/auth/vesting/types/test_common.go | 5 +- x/bank/app_test.go | 18 +-- x/bank/simulation/operations.go | 11 +- x/distribution/types/common_test.go | 5 +- x/evidence/keeper/keeper_test.go | 6 +- x/evidence/types/expected_keepers.go | 5 +- x/genutil/legacy/v038/migrate.go | 3 - x/genutil/legacy/v039/migrate.go | 3 - x/genutil/types/types.go | 7 +- x/genutil/utils.go | 8 +- x/gov/common_test.go | 4 +- x/gov/keeper/tally_test.go | 4 +- x/ibc/core/02-client/keeper/client_test.go | 3 +- x/ibc/core/02-client/keeper/keeper_test.go | 8 +- x/ibc/core/02-client/types/genesis_test.go | 3 +- .../06-solomachine/types/consensus_state.go | 11 +- .../06-solomachine/types/header.go | 11 +- .../06-solomachine/types/proof.go | 5 +- .../06-solomachine/types/solomachine.go | 9 +- .../types/misbehaviour_handle_test.go | 3 +- .../07-tendermint/types/misbehaviour_test.go | 3 +- .../07-tendermint/types/tendermint_test.go | 3 +- .../07-tendermint/types/update_test.go | 3 +- x/ibc/testing/chain.go | 8 +- x/ibc/testing/chain_test.go | 5 +- x/ibc/testing/mock/privval.go | 6 +- x/ibc/testing/solomachine.go | 16 +- x/slashing/genesis.go | 2 +- x/slashing/keeper/hooks.go | 3 +- x/slashing/keeper/infractions.go | 5 +- x/slashing/keeper/keeper.go | 10 +- x/slashing/simulation/operations.go | 3 +- x/staking/client/cli/tx.go | 4 +- x/staking/genesis.go | 16 +- x/staking/handler_test.go | 14 +- x/staking/keeper/msg_server.go | 2 +- x/staking/keeper/validator_test.go | 4 +- x/staking/legacy/v034/types.go | 26 ++-- x/staking/legacy/v036/migrate_test.go | 103 +++++++++++++ x/staking/legacy/v036/types.go | 5 +- x/staking/legacy/v038/types.go | 5 +- x/staking/teststaking/helper.go | 10 +- x/staking/teststaking/tm.go | 43 ++++++ x/staking/teststaking/validator.go | 4 +- x/staking/types/commission_test.go | 23 +-- x/staking/types/data_test.go | 7 +- x/staking/types/delegation_test.go | 39 ++--- x/staking/types/exported.go | 7 +- x/staking/types/historical_info_test.go | 31 ++-- x/staking/types/keys.go | 16 +- x/staking/types/keys_test.go | 23 +-- x/staking/types/msg.go | 7 +- x/staking/types/msg_test.go | 34 ++--- x/staking/types/params_test.go | 7 +- x/staking/types/validator.go | 93 +++++------- x/staking/types/validator_test.go | 139 +++++++++--------- 129 files changed, 1079 insertions(+), 900 deletions(-) create mode 100644 crypto/codec/tm.go create mode 100644 x/auth/legacy/v039/migrate_test.go create mode 100644 x/staking/legacy/v036/migrate_test.go create mode 100644 x/staking/teststaking/tm.go diff --git a/CHANGELOG.md b/CHANGELOG.md index c10fd1385b..bbe06901e1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -38,6 +38,10 @@ Ref: https://keepachangelog.com/en/1.0.0/ ## [v0.40.0-rc3](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.40.0-rc3) - 2020-11-06 +### Client Breaking + +* (x/staking) [\#7419](https://github.com/cosmos/cosmos-sdk/pull/7419) The `TmConsPubKey` method on ValidatorI has been removed and replaced instead by `ConsPubKey` (which returns a SDK `cryptotypes.PubKey`) and `TmConsPublicKey` (which returns a Tendermint proto PublicKey). + ### Improvements * (tendermint) [\#7828](https://github.com/cosmos/cosmos-sdk/pull/7828) Update tendermint dependency to v0.34.0-rc6 diff --git a/client/account_retriever.go b/client/account_retriever.go index 51c0a7fa9b..8e2fd14c1f 100644 --- a/client/account_retriever.go +++ b/client/account_retriever.go @@ -1,15 +1,14 @@ package client import ( - "github.com/tendermint/tendermint/crypto" - + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" ) // Account defines a read-only version of the auth module's AccountI. type Account interface { GetAddress() sdk.AccAddress - GetPubKey() crypto.PubKey // can return nil. + GetPubKey() cryptotypes.PubKey // can return nil. GetAccountNumber() uint64 GetSequence() uint64 } diff --git a/client/debug/main.go b/client/debug/main.go index ab9ec0cf8a..54b75e712b 100644 --- a/client/debug/main.go +++ b/client/debug/main.go @@ -8,10 +8,10 @@ import ( "strings" "github.com/spf13/cobra" - "github.com/tendermint/tendermint/crypto" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/version" @@ -34,7 +34,7 @@ func Cmd() *cobra.Command { // getPubKeyFromString returns a Tendermint PubKey (PubKeyEd25519) by attempting // to decode the pubkey string from hex, base64, and finally bech32. If all // encodings fail, an error is returned. -func getPubKeyFromString(pkstr string) (crypto.PubKey, error) { +func getPubKeyFromString(pkstr string) (cryptotypes.PubKey, error) { bz, err := hex.DecodeString(pkstr) if err == nil { if len(bz) == ed25519.PubKeySize { diff --git a/client/keys/add.go b/client/keys/add.go index b2e267e83e..c91f639c4a 100644 --- a/client/keys/add.go +++ b/client/keys/add.go @@ -9,7 +9,6 @@ import ( bip39 "github.com/cosmos/go-bip39" "github.com/spf13/cobra" - "github.com/tendermint/tendermint/crypto" "github.com/tendermint/tendermint/libs/cli" "github.com/cosmos/cosmos-sdk/client" @@ -18,6 +17,7 @@ import ( "github.com/cosmos/cosmos-sdk/crypto/hd" "github.com/cosmos/cosmos-sdk/crypto/keyring" "github.com/cosmos/cosmos-sdk/crypto/keys/multisig" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -152,7 +152,7 @@ func RunAddCmd(cmd *cobra.Command, args []string, kb keyring.Keyring, inBuf *buf multisigKeys, _ := cmd.Flags().GetStringSlice(flagMultisig) if len(multisigKeys) != 0 { - var pks []crypto.PubKey + var pks []cryptotypes.PubKey multisigThreshold, _ := cmd.Flags().GetInt(flagMultiSigThreshold) if err := validateMultisigThreshold(multisigThreshold, len(multisigKeys)); err != nil { @@ -247,7 +247,7 @@ func RunAddCmd(cmd *cobra.Command, args []string, kb keyring.Keyring, inBuf *buf } if len(mnemonic) == 0 { - // read entropy seed straight from crypto.Rand and convert to mnemonic + // read entropy seed straight from tmcrypto.Rand and convert to mnemonic entropySeed, err := bip39.NewEntropy(mnemonicEntropySize) if err != nil { return err diff --git a/client/keys/show.go b/client/keys/show.go index 102f29793b..2cb3c457f2 100644 --- a/client/keys/show.go +++ b/client/keys/show.go @@ -5,13 +5,13 @@ import ( "fmt" "github.com/spf13/cobra" - tmcrypto "github.com/tendermint/tendermint/crypto" "github.com/tendermint/tendermint/libs/cli" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/crypto/keyring" "github.com/cosmos/cosmos-sdk/crypto/keys/multisig" "github.com/cosmos/cosmos-sdk/crypto/ledger" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -61,7 +61,7 @@ func runShowCmd(cmd *cobra.Command, args []string) (err error) { return fmt.Errorf("%s is not a valid name or address: %v", args[0], err) } } else { - pks := make([]tmcrypto.PubKey, len(args)) + pks := make([]cryptotypes.PubKey, len(args)) for i, keyref := range args { info, err := fetchKey(clientCtx.Keyring, keyref) if err != nil { diff --git a/client/keys/show_test.go b/client/keys/show_test.go index e68107b58b..882a80683a 100644 --- a/client/keys/show_test.go +++ b/client/keys/show_test.go @@ -7,14 +7,13 @@ import ( "github.com/stretchr/testify/require" - "github.com/tendermint/tendermint/crypto" - "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/crypto/hd" "github.com/cosmos/cosmos-sdk/crypto/keyring" "github.com/cosmos/cosmos-sdk/crypto/keys/multisig" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/testutil" sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -23,7 +22,7 @@ func Test_multiSigKey_Properties(t *testing.T) { tmpKey1 := secp256k1.GenPrivKeyFromSecret([]byte("mySecret")) pk := multisig.NewLegacyAminoPubKey( 1, - []crypto.PubKey{tmpKey1.PubKey()}, + []cryptotypes.PubKey{tmpKey1.PubKey()}, ) tmp := keyring.NewMultiInfo("myMultisig", pk) diff --git a/client/rpc/validators.go b/client/rpc/validators.go index 591d3354c5..0a15f4bc93 100644 --- a/client/rpc/validators.go +++ b/client/rpc/validators.go @@ -14,6 +14,7 @@ import ( "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" + cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/rest" ) @@ -99,7 +100,11 @@ func (rvo ResultValidatorsOutput) String() string { } func bech32ValidatorOutput(validator *tmtypes.Validator) (ValidatorOutput, error) { - bechValPubkey, err := sdk.Bech32ifyPubKey(sdk.Bech32PubKeyTypeConsPub, validator.PubKey) + pk, err := cryptocodec.FromTmPubKeyInterface(validator.PubKey) + if err != nil { + return ValidatorOutput{}, err + } + bechValPubkey, err := sdk.Bech32ifyPubKey(sdk.Bech32PubKeyTypeConsPub, pk) if err != nil { return ValidatorOutput{}, err } diff --git a/client/test_helpers.go b/client/test_helpers.go index 1140298fda..214184b50f 100644 --- a/client/test_helpers.go +++ b/client/test_helpers.go @@ -3,8 +3,7 @@ package client import ( "fmt" - "github.com/tendermint/tendermint/crypto" - + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -26,7 +25,7 @@ func (t TestAccount) GetAddress() sdk.AccAddress { } // GetPubKey implements client Account.GetPubKey -func (t TestAccount) GetPubKey() crypto.PubKey { +func (t TestAccount) GetPubKey() cryptotypes.PubKey { return nil } diff --git a/client/tx/tx.go b/client/tx/tx.go index fb0e712805..d1814c3635 100644 --- a/client/tx/tx.go +++ b/client/tx/tx.go @@ -8,13 +8,13 @@ import ( "os" "github.com/spf13/pflag" - "github.com/tendermint/tendermint/crypto" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/input" codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/types/rest" @@ -343,7 +343,7 @@ func PrepareFactory(clientCtx client.Context, txf Factory) (Factory, error) { // corresponding SignatureV2 if the signing is successful. func SignWithPrivKey( signMode signing.SignMode, signerData authsigning.SignerData, - txBuilder client.TxBuilder, priv crypto.PrivKey, txConfig client.TxConfig, + txBuilder client.TxBuilder, priv cryptotypes.PrivKey, txConfig client.TxConfig, accSeq uint64, ) (signing.SignatureV2, error) { var sigV2 signing.SignatureV2 diff --git a/crypto/armor.go b/crypto/armor.go index d0637c709d..3ee472707a 100644 --- a/crypto/armor.go +++ b/crypto/armor.go @@ -11,6 +11,7 @@ import ( "github.com/cosmos/cosmos-sdk/codec/legacy" cryptoAmino "github.com/cosmos/cosmos-sdk/crypto/codec" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) @@ -124,7 +125,7 @@ func unarmorBytes(armorStr, blockType string) (bz []byte, header map[string]stri // encrypt/decrypt with armor // Encrypt and armor the private key. -func EncryptArmorPrivKey(privKey crypto.PrivKey, passphrase string, algo string) string { +func EncryptArmorPrivKey(privKey cryptotypes.PrivKey, passphrase string, algo string) string { saltBytes, encBytes := encryptPrivKey(privKey, passphrase) header := map[string]string{ "kdf": "bcrypt", @@ -143,7 +144,7 @@ func EncryptArmorPrivKey(privKey crypto.PrivKey, passphrase string, algo string) // encrypt the given privKey with the passphrase using a randomly // generated salt and the xsalsa20 cipher. returns the salt and the // encrypted priv key. -func encryptPrivKey(privKey crypto.PrivKey, passphrase string) (saltBytes []byte, encBytes []byte) { +func encryptPrivKey(privKey cryptotypes.PrivKey, passphrase string) (saltBytes []byte, encBytes []byte) { saltBytes = crypto.CRandBytes(16) key, err := bcrypt.GenerateFromPassword(saltBytes, []byte(passphrase), BcryptSecurityParameter) @@ -158,7 +159,7 @@ func encryptPrivKey(privKey crypto.PrivKey, passphrase string) (saltBytes []byte } // UnarmorDecryptPrivKey returns the privkey byte slice, a string of the algo type, and an error -func UnarmorDecryptPrivKey(armorStr string, passphrase string) (privKey crypto.PrivKey, algo string, err error) { +func UnarmorDecryptPrivKey(armorStr string, passphrase string) (privKey cryptotypes.PrivKey, algo string, err error) { blockType, header, encBytes, err := armor.DecodeArmor(armorStr) if err != nil { return privKey, "", err @@ -190,7 +191,7 @@ func UnarmorDecryptPrivKey(armorStr string, passphrase string) (privKey crypto.P return privKey, header[headerType], err } -func decryptPrivKey(saltBytes []byte, encBytes []byte, passphrase string) (privKey crypto.PrivKey, err error) { +func decryptPrivKey(saltBytes []byte, encBytes []byte, passphrase string) (privKey cryptotypes.PrivKey, err error) { key, err := bcrypt.GenerateFromPassword(saltBytes, []byte(passphrase), BcryptSecurityParameter) if err != nil { return privKey, sdkerrors.Wrap(err, "error generating bcrypt key from passphrase") diff --git a/crypto/armor_test.go b/crypto/armor_test.go index 3e5f256faa..3267ca98a7 100644 --- a/crypto/armor_test.go +++ b/crypto/armor_test.go @@ -19,6 +19,7 @@ import ( "github.com/cosmos/cosmos-sdk/crypto/hd" "github.com/cosmos/cosmos-sdk/crypto/keyring" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/types" ) @@ -46,7 +47,7 @@ func TestArmorUnarmorPrivKey(t *testing.T) { require.Contains(t, err.Error(), "unrecognized armor type") // armor key manually - encryptPrivKeyFn := func(privKey tmcrypto.PrivKey, passphrase string) (saltBytes []byte, encBytes []byte) { + encryptPrivKeyFn := func(privKey cryptotypes.PrivKey, passphrase string) (saltBytes []byte, encBytes []byte) { saltBytes = tmcrypto.CRandBytes(16) key, err := bcrypt.GenerateFromPassword(saltBytes, []byte(passphrase), crypto.BcryptSecurityParameter) require.NoError(t, err) diff --git a/crypto/codec/amino.go b/crypto/codec/amino.go index 5a98acbac3..5cd61c3dd3 100644 --- a/crypto/codec/amino.go +++ b/crypto/codec/amino.go @@ -1,8 +1,6 @@ package codec import ( - "github.com/tendermint/tendermint/crypto" - tmed25519 "github.com/tendermint/tendermint/crypto/ed25519" "github.com/tendermint/tendermint/crypto/sr25519" "github.com/cosmos/cosmos-sdk/codec" @@ -22,16 +20,9 @@ func init() { // RegisterCrypto registers all crypto dependency types with the provided Amino // codec. func RegisterCrypto(cdc *codec.LegacyAmino) { - // TODO We now register both Tendermint's PubKey and our own PubKey. In the - // long-term, we should move away from Tendermint's PubKey, and delete this - // first line. - cdc.RegisterInterface((*crypto.PubKey)(nil), nil) cdc.RegisterInterface((*cryptotypes.PubKey)(nil), nil) cdc.RegisterConcrete(sr25519.PubKey{}, sr25519.PubKeyName, nil) - // TODO Same as above, for ED25519 - cdc.RegisterConcrete(tmed25519.PubKey{}, - tmed25519.PubKeyName, nil) cdc.RegisterConcrete(&ed25519.PubKey{}, ed25519.PubKeyName, nil) cdc.RegisterConcrete(&secp256k1.PubKey{}, @@ -39,12 +30,9 @@ func RegisterCrypto(cdc *codec.LegacyAmino) { cdc.RegisterConcrete(&kmultisig.LegacyAminoPubKey{}, kmultisig.PubKeyAminoRoute, nil) - cdc.RegisterInterface((*crypto.PrivKey)(nil), nil) + cdc.RegisterInterface((*cryptotypes.PrivKey)(nil), nil) cdc.RegisterConcrete(sr25519.PrivKey{}, sr25519.PrivKeyName, nil) - // TODO Same as above - cdc.RegisterConcrete(tmed25519.PrivKey{}, - tmed25519.PrivKeyName, nil) cdc.RegisterConcrete(&ed25519.PrivKey{}, ed25519.PrivKeyName, nil) cdc.RegisterConcrete(&secp256k1.PrivKey{}, @@ -52,13 +40,13 @@ func RegisterCrypto(cdc *codec.LegacyAmino) { } // PrivKeyFromBytes unmarshals private key bytes and returns a PrivKey -func PrivKeyFromBytes(privKeyBytes []byte) (privKey crypto.PrivKey, err error) { +func PrivKeyFromBytes(privKeyBytes []byte) (privKey cryptotypes.PrivKey, err error) { err = amino.UnmarshalBinaryBare(privKeyBytes, &privKey) return } // PubKeyFromBytes unmarshals public key bytes and returns a PubKey -func PubKeyFromBytes(pubKeyBytes []byte) (pubKey crypto.PubKey, err error) { +func PubKeyFromBytes(pubKeyBytes []byte) (pubKey cryptotypes.PubKey, err error) { err = amino.UnmarshalBinaryBare(pubKeyBytes, &pubKey) return } diff --git a/crypto/codec/proto.go b/crypto/codec/proto.go index 845e60bf82..9c07ca1105 100644 --- a/crypto/codec/proto.go +++ b/crypto/codec/proto.go @@ -1,8 +1,6 @@ package codec import ( - tmcrypto "github.com/tendermint/tendermint/crypto" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" "github.com/cosmos/cosmos-sdk/crypto/keys/multisig" @@ -12,14 +10,6 @@ import ( // RegisterInterfaces registers the sdk.Tx interface. func RegisterInterfaces(registry codectypes.InterfaceRegistry) { - // TODO We now register both Tendermint's PubKey and our own PubKey. In the - // long-term, we should move away from Tendermint's PubKey, and delete - // these lines. - registry.RegisterInterface("tendermint.crypto.PubKey", (*tmcrypto.PubKey)(nil)) - registry.RegisterImplementations((*tmcrypto.PubKey)(nil), &ed25519.PubKey{}) - registry.RegisterImplementations((*tmcrypto.PubKey)(nil), &secp256k1.PubKey{}) - registry.RegisterImplementations((*tmcrypto.PubKey)(nil), &multisig.LegacyAminoPubKey{}) - registry.RegisterInterface("cosmos.crypto.PubKey", (*cryptotypes.PubKey)(nil)) registry.RegisterImplementations((*cryptotypes.PubKey)(nil), &ed25519.PubKey{}) registry.RegisterImplementations((*cryptotypes.PubKey)(nil), &secp256k1.PubKey{}) diff --git a/crypto/codec/tm.go b/crypto/codec/tm.go new file mode 100644 index 0000000000..6633f60c23 --- /dev/null +++ b/crypto/codec/tm.go @@ -0,0 +1,57 @@ +package codec + +import ( + tmcrypto "github.com/tendermint/tendermint/crypto" + "github.com/tendermint/tendermint/crypto/encoding" + tmprotocrypto "github.com/tendermint/tendermint/proto/tendermint/crypto" + + "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +// FromTmProtoPublicKey converts a TM's tmprotocrypto.PublicKey into our own PubKey. +func FromTmProtoPublicKey(protoPk tmprotocrypto.PublicKey) (cryptotypes.PubKey, error) { + switch protoPk := protoPk.Sum.(type) { + case *tmprotocrypto.PublicKey_Ed25519: + return &ed25519.PubKey{ + Key: protoPk.Ed25519, + }, nil + default: + return nil, sdkerrors.Wrapf(sdkerrors.ErrInvalidType, "cannot convert %v from Tendermint public key", protoPk) + } +} + +// ToTmProtoPublicKey converts our own PubKey to TM's tmprotocrypto.PublicKey. +func ToTmProtoPublicKey(pk cryptotypes.PubKey) (tmprotocrypto.PublicKey, error) { + switch pk := pk.(type) { + case *ed25519.PubKey: + return tmprotocrypto.PublicKey{ + Sum: &tmprotocrypto.PublicKey_Ed25519{ + Ed25519: pk.Key, + }, + }, nil + default: + return tmprotocrypto.PublicKey{}, sdkerrors.Wrapf(sdkerrors.ErrInvalidType, "cannot convert %v to Tendermint public key", pk) + } +} + +// FromTmPubKeyInterface converts TM's tmcrypto.PubKey to our own PubKey. +func FromTmPubKeyInterface(tmPk tmcrypto.PubKey) (cryptotypes.PubKey, error) { + tmProtoPk, err := encoding.PubKeyToProto(tmPk) + if err != nil { + return nil, err + } + + return FromTmProtoPublicKey(tmProtoPk) +} + +// ToTmPubKeyInterface converts our own PubKey to TM's tmcrypto.PubKey. +func ToTmPubKeyInterface(pk cryptotypes.PubKey) (tmcrypto.PubKey, error) { + tmProtoPk, err := ToTmProtoPublicKey(pk) + if err != nil { + return nil, err + } + + return encoding.PubKeyFromProto(tmProtoPk) +} diff --git a/crypto/hd/algo.go b/crypto/hd/algo.go index 30636c56df..f934ad08ae 100644 --- a/crypto/hd/algo.go +++ b/crypto/hd/algo.go @@ -2,9 +2,9 @@ package hd import ( bip39 "github.com/cosmos/go-bip39" - "github.com/tendermint/tendermint/crypto" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" + "github.com/cosmos/cosmos-sdk/crypto/types" ) // PubKeyType defines an algorithm to derive key-pairs which can be used for cryptographic signing. @@ -28,11 +28,11 @@ var ( ) type DeriveFn func(mnemonic string, bip39Passphrase, hdPath string) ([]byte, error) -type GenerateFn func(bz []byte) crypto.PrivKey +type GenerateFn func(bz []byte) types.PrivKey type WalletGenerator interface { Derive(mnemonic string, bip39Passphrase, hdPath string) ([]byte, error) - Generate(bz []byte) crypto.PrivKey + Generate(bz []byte) types.PrivKey } type secp256k1Algo struct { @@ -62,7 +62,7 @@ func (s secp256k1Algo) Derive() DeriveFn { // Generate generates a secp256k1 private key from the given bytes. func (s secp256k1Algo) Generate() GenerateFn { - return func(bz []byte) crypto.PrivKey { + return func(bz []byte) types.PrivKey { var bzArr = make([]byte, secp256k1.PrivKeySize) copy(bzArr, bz) diff --git a/crypto/keyring/info.go b/crypto/keyring/info.go index 366e474d22..f05e2f0dde 100644 --- a/crypto/keyring/info.go +++ b/crypto/keyring/info.go @@ -3,11 +3,10 @@ package keyring import ( "fmt" - "github.com/tendermint/tendermint/crypto" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/crypto/hd" "github.com/cosmos/cosmos-sdk/crypto/keys/multisig" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/types" ) @@ -18,7 +17,7 @@ type Info interface { // Name of the key GetName() string // Public key - GetPubKey() crypto.PubKey + GetPubKey() cryptotypes.PubKey // Address GetAddress() types.AccAddress // Bip44 Path @@ -37,13 +36,13 @@ var ( // localInfo is the public information about a locally stored key // Note: Algo must be last field in struct for backwards amino compatibility type localInfo struct { - Name string `json:"name"` - PubKey crypto.PubKey `json:"pubkey"` - PrivKeyArmor string `json:"privkey.armor"` - Algo hd.PubKeyType `json:"algo"` + Name string `json:"name"` + PubKey cryptotypes.PubKey `json:"pubkey"` + PrivKeyArmor string `json:"privkey.armor"` + Algo hd.PubKeyType `json:"algo"` } -func newLocalInfo(name string, pub crypto.PubKey, privArmor string, algo hd.PubKeyType) Info { +func newLocalInfo(name string, pub cryptotypes.PubKey, privArmor string, algo hd.PubKeyType) Info { return &localInfo{ Name: name, PubKey: pub, @@ -63,7 +62,7 @@ func (i localInfo) GetName() string { } // GetType implements Info interface -func (i localInfo) GetPubKey() crypto.PubKey { +func (i localInfo) GetPubKey() cryptotypes.PubKey { return i.PubKey } @@ -85,13 +84,13 @@ func (i localInfo) GetPath() (*hd.BIP44Params, error) { // ledgerInfo is the public information about a Ledger key // Note: Algo must be last field in struct for backwards amino compatibility type ledgerInfo struct { - Name string `json:"name"` - PubKey crypto.PubKey `json:"pubkey"` - Path hd.BIP44Params `json:"path"` - Algo hd.PubKeyType `json:"algo"` + Name string `json:"name"` + PubKey cryptotypes.PubKey `json:"pubkey"` + Path hd.BIP44Params `json:"path"` + Algo hd.PubKeyType `json:"algo"` } -func newLedgerInfo(name string, pub crypto.PubKey, path hd.BIP44Params, algo hd.PubKeyType) Info { +func newLedgerInfo(name string, pub cryptotypes.PubKey, path hd.BIP44Params, algo hd.PubKeyType) Info { return &ledgerInfo{ Name: name, PubKey: pub, @@ -111,7 +110,7 @@ func (i ledgerInfo) GetName() string { } // GetPubKey implements Info interface -func (i ledgerInfo) GetPubKey() crypto.PubKey { +func (i ledgerInfo) GetPubKey() cryptotypes.PubKey { return i.PubKey } @@ -134,12 +133,12 @@ func (i ledgerInfo) GetPath() (*hd.BIP44Params, error) { // offlineInfo is the public information about an offline key // Note: Algo must be last field in struct for backwards amino compatibility type offlineInfo struct { - Name string `json:"name"` - PubKey crypto.PubKey `json:"pubkey"` - Algo hd.PubKeyType `json:"algo"` + Name string `json:"name"` + PubKey cryptotypes.PubKey `json:"pubkey"` + Algo hd.PubKeyType `json:"algo"` } -func newOfflineInfo(name string, pub crypto.PubKey, algo hd.PubKeyType) Info { +func newOfflineInfo(name string, pub cryptotypes.PubKey, algo hd.PubKeyType) Info { return &offlineInfo{ Name: name, PubKey: pub, @@ -158,7 +157,7 @@ func (i offlineInfo) GetName() string { } // GetPubKey implements Info interface -func (i offlineInfo) GetPubKey() crypto.PubKey { +func (i offlineInfo) GetPubKey() cryptotypes.PubKey { return i.PubKey } @@ -178,20 +177,20 @@ func (i offlineInfo) GetPath() (*hd.BIP44Params, error) { } type multisigPubKeyInfo struct { - PubKey crypto.PubKey `json:"pubkey"` - Weight uint `json:"weight"` + PubKey cryptotypes.PubKey `json:"pubkey"` + Weight uint `json:"weight"` } // multiInfo is the public information about a multisig key type multiInfo struct { Name string `json:"name"` - PubKey crypto.PubKey `json:"pubkey"` + PubKey cryptotypes.PubKey `json:"pubkey"` Threshold uint `json:"threshold"` PubKeys []multisigPubKeyInfo `json:"pubkeys"` } // NewMultiInfo creates a new multiInfo instance -func NewMultiInfo(name string, pub crypto.PubKey) Info { +func NewMultiInfo(name string, pub cryptotypes.PubKey) Info { multiPK := pub.(*multisig.LegacyAminoPubKey) pubKeys := make([]multisigPubKeyInfo, len(multiPK.PubKeys)) @@ -219,7 +218,7 @@ func (i multiInfo) GetName() string { } // GetPubKey implements Info interface -func (i multiInfo) GetPubKey() crypto.PubKey { +func (i multiInfo) GetPubKey() cryptotypes.PubKey { return i.PubKey } diff --git a/crypto/keyring/keyring.go b/crypto/keyring/keyring.go index 0d0e41b7c3..d3220b5b43 100644 --- a/crypto/keyring/keyring.go +++ b/crypto/keyring/keyring.go @@ -22,6 +22,7 @@ import ( cryptoamino "github.com/cosmos/cosmos-sdk/crypto/codec" "github.com/cosmos/cosmos-sdk/crypto/hd" "github.com/cosmos/cosmos-sdk/crypto/ledger" + "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) @@ -76,10 +77,10 @@ type Keyring interface { SaveLedgerKey(uid string, algo SignatureAlgo, hrp string, coinType, account, index uint32) (Info, error) // SavePubKey stores a public key and returns the persisted Info structure. - SavePubKey(uid string, pubkey tmcrypto.PubKey, algo hd.PubKeyType) (Info, error) + SavePubKey(uid string, pubkey types.PubKey, algo hd.PubKeyType) (Info, error) // SaveMultisig stores and returns a new multsig (offline) key reference. - SaveMultisig(uid string, pubkey tmcrypto.PubKey) (Info, error) + SaveMultisig(uid string, pubkey types.PubKey) (Info, error) Signer @@ -90,10 +91,10 @@ type Keyring interface { // Signer is implemented by key stores that want to provide signing capabilities. type Signer interface { // Sign sign byte messages with a user key. - Sign(uid string, msg []byte) ([]byte, tmcrypto.PubKey, error) + Sign(uid string, msg []byte) ([]byte, types.PubKey, error) // SignByAddress sign byte messages with a user key providing the address. - SignByAddress(address sdk.Address, msg []byte) ([]byte, tmcrypto.PubKey, error) + SignByAddress(address sdk.Address, msg []byte) ([]byte, types.PubKey, error) } // Importer is implemented by key stores that support import of public and private keys. @@ -224,13 +225,13 @@ func (ks keystore) ExportPrivKeyArmor(uid, encryptPassphrase string) (armor stri } // ExportPrivateKeyObject exports an armored private key object. -func (ks keystore) ExportPrivateKeyObject(uid string) (tmcrypto.PrivKey, error) { +func (ks keystore) ExportPrivateKeyObject(uid string) (types.PrivKey, error) { info, err := ks.Key(uid) if err != nil { return nil, err } - var priv tmcrypto.PrivKey + var priv types.PrivKey switch linfo := info.(type) { case localInfo: @@ -301,13 +302,13 @@ func (ks keystore) ImportPubKey(uid string, armor string) error { return nil } -func (ks keystore) Sign(uid string, msg []byte) ([]byte, tmcrypto.PubKey, error) { +func (ks keystore) Sign(uid string, msg []byte) ([]byte, types.PubKey, error) { info, err := ks.Key(uid) if err != nil { return nil, nil, err } - var priv tmcrypto.PrivKey + var priv types.PrivKey switch i := info.(type) { case localInfo: @@ -335,7 +336,7 @@ func (ks keystore) Sign(uid string, msg []byte) ([]byte, tmcrypto.PubKey, error) return sig, priv.PubKey(), nil } -func (ks keystore) SignByAddress(address sdk.Address, msg []byte) ([]byte, tmcrypto.PubKey, error) { +func (ks keystore) SignByAddress(address sdk.Address, msg []byte) ([]byte, types.PubKey, error) { key, err := ks.KeyByAddress(address) if err != nil { return nil, nil, err @@ -359,7 +360,7 @@ func (ks keystore) SaveLedgerKey(uid string, algo SignatureAlgo, hrp string, coi return ks.writeLedgerKey(uid, priv.PubKey(), *hdPath, algo.Name()) } -func (ks keystore) writeLedgerKey(name string, pub tmcrypto.PubKey, path hd.BIP44Params, algo hd.PubKeyType) (Info, error) { +func (ks keystore) writeLedgerKey(name string, pub types.PubKey, path hd.BIP44Params, algo hd.PubKeyType) (Info, error) { info := newLedgerInfo(name, pub, path, algo) if err := ks.writeInfo(info); err != nil { return nil, err @@ -368,11 +369,11 @@ func (ks keystore) writeLedgerKey(name string, pub tmcrypto.PubKey, path hd.BIP4 return info, nil } -func (ks keystore) SaveMultisig(uid string, pubkey tmcrypto.PubKey) (Info, error) { +func (ks keystore) SaveMultisig(uid string, pubkey types.PubKey) (Info, error) { return ks.writeMultisigKey(uid, pubkey) } -func (ks keystore) SavePubKey(uid string, pubkey tmcrypto.PubKey, algo hd.PubKeyType) (Info, error) { +func (ks keystore) SavePubKey(uid string, pubkey types.PubKey, algo hd.PubKeyType) (Info, error) { return ks.writeOfflineKey(uid, pubkey, algo) } @@ -533,7 +534,7 @@ func (ks keystore) SupportedAlgorithms() (SigningAlgoList, SigningAlgoList) { // SignWithLedger signs a binary message with the ledger device referenced by an Info object // and returns the signed bytes and the public key. It returns an error if the device could // not be queried or it returned an error. -func SignWithLedger(info Info, msg []byte) (sig []byte, pub tmcrypto.PubKey, err error) { +func SignWithLedger(info Info, msg []byte) (sig []byte, pub types.PubKey, err error) { switch info.(type) { case *ledgerInfo, ledgerInfo: default: @@ -691,7 +692,7 @@ func newRealPrompt(dir string, buf io.Reader) func(string) (string, error) { } } -func (ks keystore) writeLocalKey(name string, priv tmcrypto.PrivKey, algo hd.PubKeyType) (Info, error) { +func (ks keystore) writeLocalKey(name string, priv types.PrivKey, algo hd.PubKeyType) (Info, error) { // encrypt private key using keyring pub := priv.PubKey() @@ -753,7 +754,7 @@ func (ks keystore) existsInDb(info Info) (bool, error) { return false, nil } -func (ks keystore) writeOfflineKey(name string, pub tmcrypto.PubKey, algo hd.PubKeyType) (Info, error) { +func (ks keystore) writeOfflineKey(name string, pub types.PubKey, algo hd.PubKeyType) (Info, error) { info := newOfflineInfo(name, pub, algo) err := ks.writeInfo(info) if err != nil { @@ -763,7 +764,7 @@ func (ks keystore) writeOfflineKey(name string, pub tmcrypto.PubKey, algo hd.Pub return info, nil } -func (ks keystore) writeMultisigKey(name string, pub tmcrypto.PubKey) (Info, error) { +func (ks keystore) writeMultisigKey(name string, pub types.PubKey) (Info, error) { info := NewMultiInfo(name, pub) err := ks.writeInfo(info) if err != nil { diff --git a/crypto/keyring/keyring_test.go b/crypto/keyring/keyring_test.go index 0cd75c9b44..540ea57bf3 100644 --- a/crypto/keyring/keyring_test.go +++ b/crypto/keyring/keyring_test.go @@ -8,13 +8,13 @@ import ( "github.com/99designs/keyring" bip39 "github.com/cosmos/go-bip39" "github.com/stretchr/testify/require" - tmcrypto "github.com/tendermint/tendermint/crypto" "github.com/cosmos/cosmos-sdk/crypto" "github.com/cosmos/cosmos-sdk/crypto/hd" "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" "github.com/cosmos/cosmos-sdk/crypto/keys/multisig" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" + "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -166,7 +166,7 @@ func TestSignVerifyKeyRing(t *testing.T) { // let's try to validate and make sure it only works when everything is proper cases := []struct { - key tmcrypto.PubKey + key types.PubKey data []byte sig []byte valid bool @@ -380,7 +380,7 @@ func TestInMemoryCreateMultisig(t *testing.T) { kb, err := New("keybasename", "memory", "", nil) require.NoError(t, err) multi := multisig.NewLegacyAminoPubKey( - 1, []tmcrypto.PubKey{ + 1, []types.PubKey{ secp256k1.GenPrivKey().PubKey(), }, ) @@ -521,7 +521,7 @@ func TestInMemorySignVerify(t *testing.T) { // let's try to validate and make sure it only works when everything is proper cases := []struct { - key tmcrypto.PubKey + key types.PubKey data []byte sig []byte valid bool @@ -947,7 +947,7 @@ func TestAltKeyring_SaveMultisig(t *testing.T) { key := "multi" pub := multisig.NewLegacyAminoPubKey( 2, - []tmcrypto.PubKey{ + []types.PubKey{ &secp256k1.PubKey{Key: mnemonic1.GetPubKey().Bytes()}, &secp256k1.PubKey{Key: mnemonic2.GetPubKey().Bytes()}, }, diff --git a/crypto/keyring/legacy.go b/crypto/keyring/legacy.go index 2332266d45..59bdc3fc5d 100644 --- a/crypto/keyring/legacy.go +++ b/crypto/keyring/legacy.go @@ -6,11 +6,11 @@ import ( "strings" "github.com/pkg/errors" - tmcrypto "github.com/tendermint/tendermint/crypto" tmos "github.com/tendermint/tendermint/libs/os" dbm "github.com/tendermint/tm-db" "github.com/cosmos/cosmos-sdk/crypto" + "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) @@ -101,13 +101,13 @@ func (kb dbKeybase) Get(name string) (Info, error) { // ExportPrivateKeyObject returns a PrivKey object given the key name and // passphrase. An error is returned if the key does not exist or if the Info for // the key is invalid. -func (kb dbKeybase) ExportPrivateKeyObject(name string, passphrase string) (tmcrypto.PrivKey, error) { +func (kb dbKeybase) ExportPrivateKeyObject(name string, passphrase string) (types.PrivKey, error) { info, err := kb.Get(name) if err != nil { return nil, err } - var priv tmcrypto.PrivKey + var priv types.PrivKey switch i := info.(type) { case localInfo: diff --git a/crypto/keyring/output_test.go b/crypto/keyring/output_test.go index dc98ad62bc..c43b36bf7c 100644 --- a/crypto/keyring/output_test.go +++ b/crypto/keyring/output_test.go @@ -4,10 +4,10 @@ import ( "testing" "github.com/stretchr/testify/require" - "github.com/tendermint/tendermint/crypto" kmultisig "github.com/cosmos/cosmos-sdk/crypto/keys/multisig" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" + "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -16,7 +16,7 @@ func TestBech32KeysOutput(t *testing.T) { bechTmpKey := sdk.MustBech32ifyPubKey(sdk.Bech32PubKeyTypeAccPub, tmpKey) tmpAddr := sdk.AccAddress(tmpKey.Address().Bytes()) - multisigPks := kmultisig.NewLegacyAminoPubKey(1, []crypto.PubKey{tmpKey}) + multisigPks := kmultisig.NewLegacyAminoPubKey(1, []types.PubKey{tmpKey}) multiInfo := NewMultiInfo("multisig", multisigPks) accAddr := sdk.AccAddress(multiInfo.GetPubKey().Address().Bytes()) bechPubKey := sdk.MustBech32ifyPubKey(sdk.Bech32PubKeyTypeAccPub, multiInfo.GetPubKey()) diff --git a/crypto/keyring/types.go b/crypto/keyring/types.go index 443896d785..0b893ea4cc 100644 --- a/crypto/keyring/types.go +++ b/crypto/keyring/types.go @@ -1,9 +1,8 @@ package keyring import ( - "github.com/tendermint/tendermint/crypto" - "github.com/cosmos/cosmos-sdk/crypto/hd" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" ) // Language is a language to create the BIP 39 mnemonic in. @@ -68,5 +67,5 @@ type ( // DeriveKeyFunc defines the function to derive a new key from a seed and hd path DeriveKeyFunc func(mnemonic string, bip39Passphrase, hdPath string, algo hd.PubKeyType) ([]byte, error) // PrivKeyGenFunc defines the function to convert derived key bytes to a tendermint private key - PrivKeyGenFunc func(bz []byte, algo hd.PubKeyType) (crypto.PrivKey, error) + PrivKeyGenFunc func(bz []byte, algo hd.PubKeyType) (cryptotypes.PrivKey, error) ) diff --git a/crypto/keys/ed25519/ed25519.go b/crypto/keys/ed25519/ed25519.go index 4c935a0760..17368c4b12 100644 --- a/crypto/keys/ed25519/ed25519.go +++ b/crypto/keys/ed25519/ed25519.go @@ -7,7 +7,6 @@ import ( "io" "github.com/tendermint/tendermint/crypto" - tmed25519 "github.com/tendermint/tendermint/crypto/ed25519" "github.com/tendermint/tendermint/crypto/tmhash" "github.com/cosmos/cosmos-sdk/codec" @@ -18,8 +17,8 @@ import ( //------------------------------------- const ( - PrivKeyName = "cosmos/PrivKeyEd25519" - PubKeyName = "cosmos/PubKeyEd25519" + PrivKeyName = "tendermint/PrivKeyEd25519" + PubKeyName = "tendermint/PubKeyEd25519" // PubKeySize is is the size, in bytes, of public keys as used in this package. PubKeySize = 32 // PrivKeySize is the size, in bytes, of private keys as used in this package. @@ -56,7 +55,7 @@ func (privKey *PrivKey) Sign(msg []byte) ([]byte, error) { // PubKey gets the corresponding public key from the private key. // // Panics if the private key is not initialized. -func (privKey *PrivKey) PubKey() crypto.PubKey { +func (privKey *PrivKey) PubKey() cryptotypes.PubKey { // If the latter 32 bytes of the privkey are all zero, privkey is not // initialized. initialized := false @@ -78,7 +77,7 @@ func (privKey *PrivKey) PubKey() crypto.PubKey { // Equals - you probably don't need to use this. // Runs in constant time based on length of the keys. -func (privKey *PrivKey) Equals(other crypto.PrivKey) bool { +func (privKey *PrivKey) Equals(other cryptotypes.LedgerPrivKey) bool { if privKey.Type() != other.Type() { return false } @@ -150,7 +149,6 @@ func GenPrivKeyFromSecret(secret []byte) *PrivKey { var _ cryptotypes.PubKey = &PubKey{} var _ codec.AminoMarshaler = &PubKey{} -var _ cryptotypes.IntoTmPubKey = &PubKey{} // Address is the SHA256-20 of the raw pubkey bytes. func (pubKey *PubKey) Address() crypto.Address { @@ -182,7 +180,7 @@ func (pubKey *PubKey) Type() string { return keyType } -func (pubKey *PubKey) Equals(other crypto.PubKey) bool { +func (pubKey *PubKey) Equals(other cryptotypes.PubKey) bool { if pubKey.Type() != other.Type() { return false } @@ -216,19 +214,3 @@ func (pubKey PubKey) MarshalAminoJSON() ([]byte, error) { func (pubKey *PubKey) UnmarshalAminoJSON(bz []byte) error { return pubKey.UnmarshalAmino(bz) } - -// AsTmPubKey converts our own PubKey into a Tendermint ED25519 pubkey. -func (pubKey *PubKey) AsTmPubKey() crypto.PubKey { - return tmed25519.PubKey(pubKey.Key) -} - -// FromTmEd25519 converts a Tendermint ED25519 pubkey into our own ED25519 -// PubKey. -func FromTmEd25519(pubKey crypto.PubKey) (*PubKey, error) { - tmPk, ok := pubKey.(tmed25519.PubKey) - if !ok { - return nil, fmt.Errorf("expected %T, got %T", tmed25519.PubKey{}, pubKey) - } - - return &PubKey{Key: []byte(tmPk)}, nil -} diff --git a/crypto/keys/ed25519/ed25519_test.go b/crypto/keys/ed25519/ed25519_test.go index 6b2ad36dc4..59cce4066a 100644 --- a/crypto/keys/ed25519/ed25519_test.go +++ b/crypto/keys/ed25519/ed25519_test.go @@ -9,10 +9,10 @@ import ( "github.com/stretchr/testify/require" "github.com/tendermint/tendermint/crypto" tmed25519 "github.com/tendermint/tendermint/crypto/ed25519" - "github.com/tendermint/tendermint/crypto/sr25519" "github.com/cosmos/cosmos-sdk/codec" ed25519 "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" + "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" ) @@ -51,7 +51,7 @@ func TestPubKeyEquals(t *testing.T) { testCases := []struct { msg string pubKey cryptotypes.PubKey - other crypto.PubKey + other cryptotypes.PubKey expectEq bool }{ { @@ -71,7 +71,7 @@ func TestPubKeyEquals(t *testing.T) { { "different types", ed25519PubKey, - sr25519.GenPrivKey().PubKey(), + secp256k1.GenPrivKey().PubKey(), false, }, } @@ -90,7 +90,7 @@ func TestPrivKeyEquals(t *testing.T) { testCases := []struct { msg string privKey cryptotypes.PrivKey - other crypto.PrivKey + other cryptotypes.PrivKey expectEq bool }{ { @@ -110,7 +110,7 @@ func TestPrivKeyEquals(t *testing.T) { { "different types", ed25519PrivKey, - sr25519.GenPrivKey(), + secp256k1.GenPrivKey(), false, }, } diff --git a/crypto/keys/internal/benchmarking/bench.go b/crypto/keys/internal/benchmarking/bench.go index b74b901db9..a789da91f9 100644 --- a/crypto/keys/internal/benchmarking/bench.go +++ b/crypto/keys/internal/benchmarking/bench.go @@ -4,7 +4,7 @@ import ( "io" "testing" - "github.com/tendermint/tendermint/crypto" + "github.com/cosmos/cosmos-sdk/crypto/types" ) // The code in this file is adapted from agl/ed25519. @@ -24,7 +24,7 @@ func (zeroReader) Read(buf []byte) (int, error) { // BenchmarkKeyGeneration benchmarks the given key generation algorithm using // a dummy reader. -func BenchmarkKeyGeneration(b *testing.B, generateKey func(reader io.Reader) crypto.PrivKey) { +func BenchmarkKeyGeneration(b *testing.B, generateKey func(reader io.Reader) types.PrivKey) { var zero zeroReader for i := 0; i < b.N; i++ { generateKey(zero) @@ -33,7 +33,7 @@ func BenchmarkKeyGeneration(b *testing.B, generateKey func(reader io.Reader) cry // BenchmarkSigning benchmarks the given signing algorithm using // the provided privkey. -func BenchmarkSigning(b *testing.B, priv crypto.PrivKey) { +func BenchmarkSigning(b *testing.B, priv types.PrivKey) { message := []byte("Hello, world!") b.ResetTimer() for i := 0; i < b.N; i++ { @@ -47,7 +47,7 @@ func BenchmarkSigning(b *testing.B, priv crypto.PrivKey) { // BenchmarkVerification benchmarks the given verification algorithm using // the provided privkey on a constant message. -func BenchmarkVerification(b *testing.B, priv crypto.PrivKey) { +func BenchmarkVerification(b *testing.B, priv types.PrivKey) { pub := priv.PubKey() // use a short message, so this time doesn't get dominated by hashing. message := []byte("Hello, world!") diff --git a/crypto/keys/multisig/codec.go b/crypto/keys/multisig/codec.go index c282d01227..b92576e4f3 100644 --- a/crypto/keys/multisig/codec.go +++ b/crypto/keys/multisig/codec.go @@ -1,7 +1,6 @@ package multisig import ( - "github.com/tendermint/tendermint/crypto" "github.com/tendermint/tendermint/crypto/sr25519" "github.com/cosmos/cosmos-sdk/codec" @@ -19,10 +18,6 @@ const ( var AminoCdc = codec.NewLegacyAmino() func init() { - // TODO We now register both Tendermint's PubKey and our own PubKey. In the - // long-term, we should move away from Tendermint's PubKey, and delete this - // first line. - AminoCdc.RegisterInterface((*crypto.PubKey)(nil), nil) AminoCdc.RegisterInterface((*cryptotypes.PubKey)(nil), nil) AminoCdc.RegisterConcrete(ed25519.PubKey{}, ed25519.PubKeyName, nil) diff --git a/crypto/keys/multisig/multisig.go b/crypto/keys/multisig/multisig.go index 836eadbe16..590e5ba110 100644 --- a/crypto/keys/multisig/multisig.go +++ b/crypto/keys/multisig/multisig.go @@ -5,10 +5,8 @@ import ( tmcrypto "github.com/tendermint/tendermint/crypto" - proto "github.com/gogo/protobuf/proto" - "github.com/cosmos/cosmos-sdk/codec/types" - crypto "github.com/cosmos/cosmos-sdk/crypto/types" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" multisigtypes "github.com/cosmos/cosmos-sdk/crypto/types/multisig" "github.com/cosmos/cosmos-sdk/types/tx/signing" ) @@ -18,7 +16,7 @@ var _ types.UnpackInterfacesMessage = &LegacyAminoPubKey{} // NewLegacyAminoPubKey returns a new LegacyAminoPubKey. // Panics if len(pubKeys) < k or 0 >= k. -func NewLegacyAminoPubKey(k int, pubKeys []tmcrypto.PubKey) *LegacyAminoPubKey { +func NewLegacyAminoPubKey(k int, pubKeys []cryptotypes.PubKey) *LegacyAminoPubKey { if k <= 0 { panic("threshold k of n multisignature: k <= 0") } @@ -32,8 +30,8 @@ func NewLegacyAminoPubKey(k int, pubKeys []tmcrypto.PubKey) *LegacyAminoPubKey { return &LegacyAminoPubKey{Threshold: uint32(k), PubKeys: anyPubKeys} } -// Address implements crypto.PubKey Address method -func (m *LegacyAminoPubKey) Address() tmcrypto.Address { +// Address implements cryptotypes.PubKey Address method +func (m *LegacyAminoPubKey) Address() cryptotypes.Address { return tmcrypto.AddressHash(m.Bytes()) } @@ -91,7 +89,7 @@ func (m *LegacyAminoPubKey) VerifyMultisignature(getSignBytes multisigtypes.GetS return nil } -// VerifySignature implements crypto.PubKey VerifySignature method, +// VerifySignature implements cryptotypes.PubKey VerifySignature method, // it panics because it can't handle MultiSignatureData // cf. https://github.com/cosmos/cosmos-sdk/issues/7109#issuecomment-686329936 func (m *LegacyAminoPubKey) VerifySignature(msg []byte, sig []byte) bool { @@ -99,11 +97,11 @@ func (m *LegacyAminoPubKey) VerifySignature(msg []byte, sig []byte) bool { } // GetPubKeys implements the PubKey.GetPubKeys method -func (m *LegacyAminoPubKey) GetPubKeys() []tmcrypto.PubKey { +func (m *LegacyAminoPubKey) GetPubKeys() []cryptotypes.PubKey { if m != nil { - pubKeys := make([]tmcrypto.PubKey, len(m.PubKeys)) + pubKeys := make([]cryptotypes.PubKey, len(m.PubKeys)) for i := 0; i < len(m.PubKeys); i++ { - pubKeys[i] = m.PubKeys[i].GetCachedValue().(tmcrypto.PubKey) + pubKeys[i] = m.PubKeys[i].GetCachedValue().(cryptotypes.PubKey) } return pubKeys } @@ -113,7 +111,7 @@ func (m *LegacyAminoPubKey) GetPubKeys() []tmcrypto.PubKey { // Equals returns true if m and other both have the same number of keys, and // all constituent keys are the same, and in the same order. -func (m *LegacyAminoPubKey) Equals(key tmcrypto.PubKey) bool { +func (m *LegacyAminoPubKey) Equals(key cryptotypes.PubKey) bool { otherKey, ok := key.(multisigtypes.PubKey) if !ok { return false @@ -145,7 +143,7 @@ func (m *LegacyAminoPubKey) Type() string { // UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces func (m *LegacyAminoPubKey) UnpackInterfaces(unpacker types.AnyUnpacker) error { for _, any := range m.PubKeys { - var pk crypto.PubKey + var pk cryptotypes.PubKey err := unpacker.UnpackAny(any, &pk) if err != nil { return err @@ -154,11 +152,11 @@ func (m *LegacyAminoPubKey) UnpackInterfaces(unpacker types.AnyUnpacker) error { return nil } -func packPubKeys(pubKeys []tmcrypto.PubKey) ([]*types.Any, error) { +func packPubKeys(pubKeys []cryptotypes.PubKey) ([]*types.Any, error) { anyPubKeys := make([]*types.Any, len(pubKeys)) for i := 0; i < len(pubKeys); i++ { - any, err := types.NewAnyWithValue(pubKeys[i].(proto.Message)) + any, err := types.NewAnyWithValue(pubKeys[i]) if err != nil { return nil, err } diff --git a/crypto/keys/multisig/multisig_test.go b/crypto/keys/multisig/multisig_test.go index 9c18c97d06..2b91e74eb6 100644 --- a/crypto/keys/multisig/multisig_test.go +++ b/crypto/keys/multisig/multisig_test.go @@ -3,19 +3,16 @@ package multisig_test import ( "testing" - tmcrypto "github.com/tendermint/tendermint/crypto" - - "github.com/cosmos/cosmos-sdk/codec/types" - crypto "github.com/cosmos/cosmos-sdk/crypto/types" - "github.com/cosmos/cosmos-sdk/crypto/types/multisig" - "github.com/cosmos/cosmos-sdk/x/auth/legacy/legacytx" - "github.com/stretchr/testify/require" "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/codec/types" kmultisig "github.com/cosmos/cosmos-sdk/crypto/keys/multisig" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" + "github.com/cosmos/cosmos-sdk/crypto/types/multisig" "github.com/cosmos/cosmos-sdk/types/tx/signing" + "github.com/cosmos/cosmos-sdk/x/auth/legacy/legacytx" ) func TestAddress(t *testing.T) { @@ -30,12 +27,12 @@ func TestEquals(t *testing.T) { pubKey1 := secp256k1.GenPrivKey().PubKey() pubKey2 := secp256k1.GenPrivKey().PubKey() - multisigKey := kmultisig.NewLegacyAminoPubKey(1, []tmcrypto.PubKey{pubKey1, pubKey2}) - otherMultisigKey := kmultisig.NewLegacyAminoPubKey(1, []tmcrypto.PubKey{pubKey1, multisigKey}) + multisigKey := kmultisig.NewLegacyAminoPubKey(1, []cryptotypes.PubKey{pubKey1, pubKey2}) + otherMultisigKey := kmultisig.NewLegacyAminoPubKey(1, []cryptotypes.PubKey{pubKey1, multisigKey}) testCases := []struct { msg string - other tmcrypto.PubKey + other cryptotypes.PubKey expectEq bool }{ { @@ -255,8 +252,8 @@ func TestPubKeyMultisigThresholdAminoToIface(t *testing.T) { ab, err := kmultisig.AminoCdc.MarshalBinaryLengthPrefixed(multisigKey) require.NoError(t, err) - // like other crypto.Pubkey implementations (e.g. ed25519.PubKey), - // LegacyAminoPubKey should be deserializable into a crypto.LegacyAminoPubKey: + // like other cryptotypes.Pubkey implementations (e.g. ed25519.PubKey), + // LegacyAminoPubKey should be deserializable into a cryptotypes.LegacyAminoPubKey: var pubKey kmultisig.LegacyAminoPubKey err = kmultisig.AminoCdc.UnmarshalBinaryLengthPrefixed(ab, &pubKey) require.NoError(t, err) @@ -264,8 +261,8 @@ func TestPubKeyMultisigThresholdAminoToIface(t *testing.T) { require.Equal(t, multisigKey.Equals(&pubKey), true) } -func generatePubKeysAndSignatures(n int, msg []byte) (pubKeys []tmcrypto.PubKey, signatures []signing.SignatureData) { - pubKeys = make([]tmcrypto.PubKey, n) +func generatePubKeysAndSignatures(n int, msg []byte) (pubKeys []cryptotypes.PubKey, signatures []signing.SignatureData) { + pubKeys = make([]cryptotypes.PubKey, n) signatures = make([]signing.SignatureData, n) for i := 0; i < n; i++ { @@ -279,12 +276,12 @@ func generatePubKeysAndSignatures(n int, msg []byte) (pubKeys []tmcrypto.PubKey, } func generateNestedMultiSignature(n int, msg []byte) (multisig.PubKey, *signing.MultiSignatureData) { - pubKeys := make([]tmcrypto.PubKey, n) + pubKeys := make([]cryptotypes.PubKey, n) signatures := make([]signing.SignatureData, n) - bitArray := crypto.NewCompactBitArray(n) + bitArray := cryptotypes.NewCompactBitArray(n) for i := 0; i < n; i++ { nestedPks, nestedSigs := generatePubKeysAndSignatures(5, msg) - nestedBitArray := crypto.NewCompactBitArray(5) + nestedBitArray := cryptotypes.NewCompactBitArray(5) for j := 0; j < 5; j++ { nestedBitArray.SetIndex(j, true) } diff --git a/crypto/keys/secp256k1/bench_test.go b/crypto/keys/secp256k1/bench_test.go index e36f2df4b6..423f7a5a52 100644 --- a/crypto/keys/secp256k1/bench_test.go +++ b/crypto/keys/secp256k1/bench_test.go @@ -4,13 +4,12 @@ import ( "io" "testing" - "github.com/tendermint/tendermint/crypto" - "github.com/cosmos/cosmos-sdk/crypto/keys/internal/benchmarking" + "github.com/cosmos/cosmos-sdk/crypto/types" ) func BenchmarkKeyGeneration(b *testing.B) { - benchmarkKeygenWrapper := func(reader io.Reader) crypto.PrivKey { + benchmarkKeygenWrapper := func(reader io.Reader) types.PrivKey { priv := genPrivKey(reader) return &PrivKey{Key: priv} } diff --git a/crypto/keys/secp256k1/secp256k1.go b/crypto/keys/secp256k1/secp256k1.go index 77d546812c..eebe72a452 100644 --- a/crypto/keys/secp256k1/secp256k1.go +++ b/crypto/keys/secp256k1/secp256k1.go @@ -34,7 +34,7 @@ func (privKey *PrivKey) Bytes() []byte { // PubKey performs the point-scalar multiplication from the privKey on the // generator point to get the pubkey. -func (privKey *PrivKey) PubKey() crypto.PubKey { +func (privKey *PrivKey) PubKey() cryptotypes.PubKey { _, pubkeyObject := secp256k1.PrivKeyFromBytes(secp256k1.S256(), privKey.Key) pk := pubkeyObject.SerializeCompressed() return &PubKey{Key: pk} @@ -42,7 +42,7 @@ func (privKey *PrivKey) PubKey() crypto.PubKey { // Equals - you probably don't need to use this. // Runs in constant time based on length of the -func (privKey *PrivKey) Equals(other crypto.PrivKey) bool { +func (privKey *PrivKey) Equals(other cryptotypes.LedgerPrivKey) bool { return privKey.Type() == other.Type() && subtle.ConstantTimeCompare(privKey.Bytes(), other.Bytes()) == 1 } @@ -173,7 +173,7 @@ func (pubKey *PubKey) Type() string { return keyType } -func (pubKey *PubKey) Equals(other crypto.PubKey) bool { +func (pubKey *PubKey) Equals(other cryptotypes.PubKey) bool { return pubKey.Type() == other.Type() && bytes.Equal(pubKey.Bytes(), other.Bytes()) } diff --git a/crypto/keys/secp256k1/secp256k1_test.go b/crypto/keys/secp256k1/secp256k1_test.go index 0133d68509..d96b1dc382 100644 --- a/crypto/keys/secp256k1/secp256k1_test.go +++ b/crypto/keys/secp256k1/secp256k1_test.go @@ -12,9 +12,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/tendermint/tendermint/crypto" - "github.com/tendermint/tendermint/crypto/sr25519" "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" ) @@ -143,7 +143,7 @@ func TestPubKeyEquals(t *testing.T) { testCases := []struct { msg string pubKey cryptotypes.PubKey - other crypto.PubKey + other cryptotypes.PubKey expectEq bool }{ { @@ -163,7 +163,7 @@ func TestPubKeyEquals(t *testing.T) { { "different types", secp256K1PubKey, - sr25519.GenPrivKey().PubKey(), + ed25519.GenPrivKey().PubKey(), false, }, } @@ -182,7 +182,7 @@ func TestPrivKeyEquals(t *testing.T) { testCases := []struct { msg string privKey cryptotypes.PrivKey - other crypto.PrivKey + other cryptotypes.PrivKey expectEq bool }{ { @@ -202,7 +202,7 @@ func TestPrivKeyEquals(t *testing.T) { { "different types", secp256K1PrivKey, - sr25519.GenPrivKey(), + ed25519.GenPrivKey(), false, }, } diff --git a/crypto/ledger/encode_test.go b/crypto/ledger/encode_test.go index 6e0cf99f52..447891fde7 100644 --- a/crypto/ledger/encode_test.go +++ b/crypto/ledger/encode_test.go @@ -6,7 +6,7 @@ import ( "github.com/stretchr/testify/require" - tcrypto "github.com/tendermint/tendermint/crypto" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" ) type byter interface { @@ -51,12 +51,12 @@ func TestNilEncodings(t *testing.T) { require.EqualValues(t, a, b) // Check nil PubKey. - var c, d tcrypto.PubKey + var c, d cryptotypes.PubKey checkAminoJSON(t, &c, &d, true) require.EqualValues(t, c, d) // Check nil PrivKey. - var e, f tcrypto.PrivKey + var e, f cryptotypes.PrivKey checkAminoJSON(t, &e, &f, true) require.EqualValues(t, e, f) diff --git a/crypto/ledger/ledger_secp256k1.go b/crypto/ledger/ledger_secp256k1.go index 3afdbac5f3..659181d306 100644 --- a/crypto/ledger/ledger_secp256k1.go +++ b/crypto/ledger/ledger_secp256k1.go @@ -8,10 +8,10 @@ import ( "github.com/pkg/errors" tmbtcec "github.com/tendermint/btcd/btcec" - tmcrypto "github.com/tendermint/tendermint/crypto" "github.com/cosmos/cosmos-sdk/crypto/hd" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" + "github.com/cosmos/cosmos-sdk/crypto/types" ) var ( @@ -43,7 +43,7 @@ type ( // CachedPubKey should be private, but we want to encode it via // go-amino so we can view the address later, even without having the // ledger attached. - CachedPubKey tmcrypto.PubKey + CachedPubKey types.PubKey Path hd.BIP44Params } ) @@ -53,7 +53,7 @@ type ( // This function is marked as unsafe as it will retrieve a pubkey without user verification. // It can only be used to verify a pubkey but never to create new accounts/keys. In that case, // please refer to NewPrivKeySecp256k1 -func NewPrivKeySecp256k1Unsafe(path hd.BIP44Params) (tmcrypto.PrivKey, error) { +func NewPrivKeySecp256k1Unsafe(path hd.BIP44Params) (types.LedgerPrivKey, error) { device, err := getDevice() if err != nil { return nil, err @@ -70,7 +70,7 @@ func NewPrivKeySecp256k1Unsafe(path hd.BIP44Params) (tmcrypto.PrivKey, error) { // NewPrivKeySecp256k1 will generate a new key and store the public key for later use. // The request will require user confirmation and will show account and index in the device -func NewPrivKeySecp256k1(path hd.BIP44Params, hrp string) (tmcrypto.PrivKey, string, error) { +func NewPrivKeySecp256k1(path hd.BIP44Params, hrp string) (types.LedgerPrivKey, string, error) { device, err := getDevice() if err != nil { return nil, "", err @@ -86,7 +86,7 @@ func NewPrivKeySecp256k1(path hd.BIP44Params, hrp string) (tmcrypto.PrivKey, str } // PubKey returns the cached public key. -func (pkl PrivKeyLedgerSecp256k1) PubKey() tmcrypto.PubKey { +func (pkl PrivKeyLedgerSecp256k1) PubKey() types.PubKey { return pkl.CachedPubKey } @@ -102,7 +102,7 @@ func (pkl PrivKeyLedgerSecp256k1) Sign(message []byte) ([]byte, error) { } // ShowAddress triggers a ledger device to show the corresponding address. -func ShowAddress(path hd.BIP44Params, expectedPubKey tmcrypto.PubKey, +func ShowAddress(path hd.BIP44Params, expectedPubKey types.PubKey, accountAddressPrefix string) error { device, err := getDevice() if err != nil { @@ -154,7 +154,7 @@ func (pkl PrivKeyLedgerSecp256k1) Bytes() []byte { // Equals implements the PrivKey interface. It makes sure two private keys // refer to the same public key. -func (pkl PrivKeyLedgerSecp256k1) Equals(other tmcrypto.PrivKey) bool { +func (pkl PrivKeyLedgerSecp256k1) Equals(other types.LedgerPrivKey) bool { if otherKey, ok := other.(PrivKeyLedgerSecp256k1); ok { return pkl.CachedPubKey.Equals(otherKey.CachedPubKey) } @@ -234,7 +234,7 @@ func sign(device SECP256K1, pkl PrivKeyLedgerSecp256k1, msg []byte) ([]byte, err // // since this involves IO, it may return an error, which is not exposed // in the PubKey interface, so this function allows better error handling -func getPubKeyUnsafe(device SECP256K1, path hd.BIP44Params) (tmcrypto.PubKey, error) { +func getPubKeyUnsafe(device SECP256K1, path hd.BIP44Params) (types.PubKey, error) { publicKey, err := device.GetPublicKeySECP256K1(path.DerivationPath()) if err != nil { return nil, fmt.Errorf("please open Cosmos app on the Ledger device - error: %v", err) @@ -258,7 +258,7 @@ func getPubKeyUnsafe(device SECP256K1, path hd.BIP44Params) (tmcrypto.PubKey, er // // Since this involves IO, it may return an error, which is not exposed // in the PubKey interface, so this function allows better error handling. -func getPubKeyAddrSafe(device SECP256K1, path hd.BIP44Params, hrp string) (tmcrypto.PubKey, string, error) { +func getPubKeyAddrSafe(device SECP256K1, path hd.BIP44Params, hrp string) (types.PubKey, string, error) { publicKey, addr, err := device.GetAddressPubKeySECP256K1(path.DerivationPath(), hrp) if err != nil { return nil, "", fmt.Errorf("address %s rejected", addr) diff --git a/crypto/ledger/ledger_test.go b/crypto/ledger/ledger_test.go index 9b21e464bc..bc85b2feba 100644 --- a/crypto/ledger/ledger_test.go +++ b/crypto/ledger/ledger_test.go @@ -6,10 +6,9 @@ import ( "github.com/stretchr/testify/require" - tmcrypto "github.com/tendermint/tendermint/crypto" - cryptoAmino "github.com/cosmos/cosmos-sdk/crypto/codec" "github.com/cosmos/cosmos-sdk/crypto/hd" + "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/testutil" sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -58,7 +57,7 @@ func TestPublicKeyUnsafeHDPath(t *testing.T) { const numIters = 10 - privKeys := make([]tmcrypto.PrivKey, numIters) + privKeys := make([]types.LedgerPrivKey, numIters) // Check with device for i := uint32(0); i < 10; i++ { @@ -70,8 +69,8 @@ func TestPublicKeyUnsafeHDPath(t *testing.T) { require.NotNil(t, priv) // Check other methods - require.NoError(t, priv.(PrivKeyLedgerSecp256k1).ValidateKey()) tmp := priv.(PrivKeyLedgerSecp256k1) + require.NoError(t, tmp.ValidateKey()) (&tmp).AssertIsPrivKeyInner() pubKeyAddr, err := sdk.Bech32ifyPubKey(sdk.Bech32PubKeyTypeAccPub, priv.PubKey()) @@ -151,7 +150,7 @@ func TestPublicKeyHDPath(t *testing.T) { const numIters = 10 - privKeys := make([]tmcrypto.PrivKey, numIters) + privKeys := make([]types.LedgerPrivKey, numIters) // Check with device for i := uint32(0); i < 10; i++ { @@ -170,8 +169,8 @@ func TestPublicKeyHDPath(t *testing.T) { "Is your device using test mnemonic: %s ?", testutil.TestMnemonic) // Check other methods - require.NoError(t, priv.(PrivKeyLedgerSecp256k1).ValidateKey()) tmp := priv.(PrivKeyLedgerSecp256k1) + require.NoError(t, tmp.ValidateKey()) (&tmp).AssertIsPrivKeyInner() pubKeyAddr, err := sdk.Bech32ifyPubKey(sdk.Bech32PubKeyTypeAccPub, priv.PubKey()) diff --git a/crypto/types/multisig/multisignature.go b/crypto/types/multisig/multisignature.go index b13072e280..20e3ef1129 100644 --- a/crypto/types/multisig/multisignature.go +++ b/crypto/types/multisig/multisignature.go @@ -4,8 +4,6 @@ import ( "fmt" "strings" - "github.com/tendermint/tendermint/crypto" - "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/types/tx/signing" ) @@ -27,7 +25,7 @@ func NewMultisig(n int) *signing.MultiSignatureData { } // GetIndex returns the index of pk in keys. Returns -1 if not found -func getIndex(pk crypto.PubKey, keys []crypto.PubKey) int { +func getIndex(pk types.PubKey, keys []types.PubKey) int { for i := 0; i < len(keys); i++ { if pk.Equals(keys[i]) { return i @@ -60,7 +58,7 @@ func AddSignature(mSig *signing.MultiSignatureData, sig signing.SignatureData, i // AddSignatureFromPubKey adds a signature to the multisig, at the index in // keys corresponding to the provided pubkey. -func AddSignatureFromPubKey(mSig *signing.MultiSignatureData, sig signing.SignatureData, pubkey crypto.PubKey, keys []crypto.PubKey) error { +func AddSignatureFromPubKey(mSig *signing.MultiSignatureData, sig signing.SignatureData, pubkey types.PubKey, keys []types.PubKey) error { if mSig == nil { return fmt.Errorf("value of mSig is nil %v", mSig) } @@ -85,6 +83,6 @@ func AddSignatureFromPubKey(mSig *signing.MultiSignatureData, sig signing.Signat return nil } -func AddSignatureV2(mSig *signing.MultiSignatureData, sig signing.SignatureV2, keys []crypto.PubKey) error { +func AddSignatureV2(mSig *signing.MultiSignatureData, sig signing.SignatureV2, keys []types.PubKey) error { return AddSignatureFromPubKey(mSig, sig.Data, sig.PubKey, keys) } diff --git a/crypto/types/multisig/pubkey.go b/crypto/types/multisig/pubkey.go index 51d432f59c..2e778bae6f 100644 --- a/crypto/types/multisig/pubkey.go +++ b/crypto/types/multisig/pubkey.go @@ -1,22 +1,21 @@ package multisig import ( - "github.com/tendermint/tendermint/crypto" - + "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/types/tx/signing" ) // PubKey defines a type which supports multi-signature verification via MultiSignatureData // which supports multiple SignMode's. type PubKey interface { - crypto.PubKey + types.PubKey // VerifyMultisignature verifies the provide multi-signature represented by MultiSignatureData // using getSignBytes to retrieve the sign bytes to verify against for the provided mode. VerifyMultisignature(getSignBytes GetSignBytesFunc, sig *signing.MultiSignatureData) error - // GetPubKeys returns the crypto.PubKey's nested within the multi-sig PubKey - GetPubKeys() []crypto.PubKey + // GetPubKeys returns the types.PubKey's nested within the multi-sig PubKey + GetPubKeys() []types.PubKey // GetThreshold returns the threshold number of signatures that must be obtained to verify a signature. GetThreshold() uint diff --git a/crypto/types/types.go b/crypto/types/types.go index bce35d716d..eccdba7381 100644 --- a/crypto/types/types.go +++ b/crypto/types/types.go @@ -5,26 +5,39 @@ import ( tmcrypto "github.com/tendermint/tendermint/crypto" ) -// PubKey interface extends proto.Message -// and tendermint crypto.PubKey +// PubKey defines a public key and extends proto.Message. type PubKey interface { proto.Message - tmcrypto.PubKey + + Address() Address + Bytes() []byte + VerifySignature(msg []byte, sig []byte) bool + Equals(PubKey) bool + Type() string } -// PrivKey interface extends proto.Message -// and tendermint crypto.PrivKey +// LedgerPrivKey defines a private key that is not a proto message. For now, +// LedgerSecp256k1 keys are not converted to proto.Message yet, this is why +// they use LedgerPrivKey instead of PrivKey. All other keys must use PrivKey +// instead of LedgerPrivKey. +// TODO https://github.com/cosmos/cosmos-sdk/issues/7357. +type LedgerPrivKey interface { + Bytes() []byte + Sign(msg []byte) ([]byte, error) + PubKey() PubKey + Equals(LedgerPrivKey) bool + Type() string +} + +// PrivKey defines a private key and extends proto.Message. For now, it extends +// LedgerPrivKey (see godoc for LedgerPrivKey). Ultimately, we should remove +// LedgerPrivKey and add its methods here directly. +// TODO https://github.com/cosmos/cosmos-sdk/issues/7357. type PrivKey interface { proto.Message - tmcrypto.PrivKey + LedgerPrivKey } type ( Address = tmcrypto.Address ) - -// IntoTmPubKey allows our own PubKey types be converted into Tendermint's -// pubkey types. -type IntoTmPubKey interface { - AsTmPubKey() tmcrypto.PubKey -} diff --git a/server/tm_cmds.go b/server/tm_cmds.go index abea9c116f..b05a88f797 100644 --- a/server/tm_cmds.go +++ b/server/tm_cmds.go @@ -39,7 +39,7 @@ func ShowNodeIDCmd() *cobra.Command { } } -// ShowValidator - ported from Tendermint, show this node's validator info +// ShowValidatorCmd - ported from Tendermint, show this node's validator info func ShowValidatorCmd() *cobra.Command { cmd := cobra.Command{ Use: "show-validator", @@ -59,12 +59,16 @@ func ShowValidatorCmd() *cobra.Command { return printlnJSON(valPubKey) } - pubkey, err := sdk.Bech32ifyPubKey(sdk.Bech32PubKeyTypeConsPub, valPubKey) + pubkey, err := cryptocodec.FromTmPubKeyInterface(valPubKey) + if err != nil { + return err + } + pubkeyBech32, err := sdk.Bech32ifyPubKey(sdk.Bech32PubKeyTypeConsPub, pubkey) if err != nil { return err } - fmt.Println(pubkey) + fmt.Println(pubkeyBech32) return nil }, } diff --git a/simapp/helpers/test_helpers.go b/simapp/helpers/test_helpers.go index 9e8a4d9714..9ccecbd976 100644 --- a/simapp/helpers/test_helpers.go +++ b/simapp/helpers/test_helpers.go @@ -4,9 +4,8 @@ import ( "math/rand" "time" - "github.com/tendermint/tendermint/crypto" - "github.com/cosmos/cosmos-sdk/client" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/simulation" "github.com/cosmos/cosmos-sdk/types/tx/signing" @@ -20,7 +19,7 @@ const ( ) // GenTx generates a signed mock transaction. -func GenTx(gen client.TxConfig, msgs []sdk.Msg, feeAmt sdk.Coins, gas uint64, chainID string, accNums, accSeqs []uint64, priv ...crypto.PrivKey) (sdk.Tx, error) { +func GenTx(gen client.TxConfig, msgs []sdk.Msg, feeAmt sdk.Coins, gas uint64, chainID string, accNums, accSeqs []uint64, priv ...cryptotypes.PrivKey) (sdk.Tx, error) { sigs := make([]signing.SignatureV2, len(priv)) // create a random length memo diff --git a/simapp/simd/cmd/testnet.go b/simapp/simd/cmd/testnet.go index d17e57fb95..3355c04b4e 100644 --- a/simapp/simd/cmd/testnet.go +++ b/simapp/simd/cmd/testnet.go @@ -12,7 +12,6 @@ import ( "github.com/spf13/cobra" tmconfig "github.com/tendermint/tendermint/config" - "github.com/tendermint/tendermint/crypto" tmos "github.com/tendermint/tendermint/libs/os" tmrand "github.com/tendermint/tendermint/libs/rand" "github.com/tendermint/tendermint/types" @@ -23,6 +22,7 @@ import ( "github.com/cosmos/cosmos-sdk/client/tx" "github.com/cosmos/cosmos-sdk/crypto/hd" "github.com/cosmos/cosmos-sdk/crypto/keyring" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/server" srvconfig "github.com/cosmos/cosmos-sdk/server/config" sdk "github.com/cosmos/cosmos-sdk/types" @@ -116,7 +116,7 @@ func InitTestnet( } nodeIDs := make([]string, numValidators) - valPubKeys := make([]crypto.PubKey, numValidators) + valPubKeys := make([]cryptotypes.PubKey, numValidators) simappConfig := srvconfig.DefaultConfig() simappConfig.MinGasPrices = minGasPrices @@ -311,7 +311,7 @@ func initGenFiles( func collectGenFiles( clientCtx client.Context, nodeConfig *tmconfig.Config, chainID string, - nodeIDs []string, valPubKeys []crypto.PubKey, numValidators int, + nodeIDs []string, valPubKeys []cryptotypes.PubKey, numValidators int, outputDir, nodeDirPrefix, nodeDaemonHome string, genBalIterator banktypes.GenesisBalancesIterator, ) error { diff --git a/simapp/test_helpers.go b/simapp/test_helpers.go index 6624c1df3f..22df884fbb 100644 --- a/simapp/test_helpers.go +++ b/simapp/test_helpers.go @@ -11,7 +11,6 @@ import ( "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" - "github.com/tendermint/tendermint/crypto" "github.com/tendermint/tendermint/libs/log" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" tmtypes "github.com/tendermint/tendermint/types" @@ -20,7 +19,9 @@ import ( bam "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" codectypes "github.com/cosmos/cosmos-sdk/codec/types" + cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/simapp/helpers" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/errors" @@ -92,10 +93,7 @@ func SetupWithGenesisValSet(t *testing.T, valSet *tmtypes.ValidatorSet, genAccs bondAmt := sdk.NewInt(1000000) for _, val := range valSet.Validators { - // Currently validator requires tmcrypto.ed25519 keys, which don't support - // our Marshaling interfaces, so we need to pack them into our version of ed25519. - // There is ongoing work to add secp256k1 keys (https://github.com/cosmos/cosmos-sdk/pull/7604). - pk, err := ed25519.FromTmEd25519(val.PubKey) + pk, err := cryptocodec.FromTmPubKeyInterface(val.PubKey) require.NoError(t, err) pkAny, err := codectypes.PackAny(pk) require.NoError(t, err) @@ -230,7 +228,7 @@ func createIncrementalAccounts(accNum int) []sdk.AccAddress { } // AddTestAddrsFromPubKeys adds the addresses into the SimApp providing only the public keys. -func AddTestAddrsFromPubKeys(app *SimApp, ctx sdk.Context, pubKeys []crypto.PubKey, accAmt sdk.Int) { +func AddTestAddrsFromPubKeys(app *SimApp, ctx sdk.Context, pubKeys []cryptotypes.PubKey, accAmt sdk.Int) { initCoins := sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), accAmt)) setTotalSupply(app, ctx, accAmt, len(pubKeys)) @@ -328,7 +326,7 @@ func CheckBalance(t *testing.T, app *SimApp, addr sdk.AccAddress, balances sdk.C // returned. func SignCheckDeliver( t *testing.T, txCfg client.TxConfig, app *bam.BaseApp, header tmproto.Header, msgs []sdk.Msg, - chainID string, accNums, accSeqs []uint64, expSimPass, expPass bool, priv ...crypto.PrivKey, + chainID string, accNums, accSeqs []uint64, expSimPass, expPass bool, priv ...cryptotypes.PrivKey, ) (sdk.GasInfo, *sdk.Result, error) { tx, err := helpers.GenTx( @@ -377,7 +375,7 @@ func SignCheckDeliver( // GenSequenceOfTxs generates a set of signed transactions of messages, such // that they differ only by having the sequence numbers incremented between // every transaction. -func GenSequenceOfTxs(txGen client.TxConfig, msgs []sdk.Msg, accNums []uint64, initSeqNums []uint64, numToGenerate int, priv ...crypto.PrivKey) ([]sdk.Tx, error) { +func GenSequenceOfTxs(txGen client.TxConfig, msgs []sdk.Msg, accNums []uint64, initSeqNums []uint64, numToGenerate int, priv ...cryptotypes.PrivKey) ([]sdk.Tx, error) { txs := make([]sdk.Tx, numToGenerate) var err error for i := 0; i < numToGenerate; i++ { @@ -407,8 +405,8 @@ func incrementAllSequenceNumbers(initSeqNums []uint64) { } // CreateTestPubKeys returns a total of numPubKeys public keys in ascending order. -func CreateTestPubKeys(numPubKeys int) []crypto.PubKey { - var publicKeys []crypto.PubKey +func CreateTestPubKeys(numPubKeys int) []cryptotypes.PubKey { + var publicKeys []cryptotypes.PubKey var buffer bytes.Buffer // start at 10 to avoid changing 1 to 01, 2 to 02, etc @@ -424,7 +422,7 @@ func CreateTestPubKeys(numPubKeys int) []crypto.PubKey { } // NewPubKeyFromHex returns a PubKey from a hex string. -func NewPubKeyFromHex(pk string) (res crypto.PubKey) { +func NewPubKeyFromHex(pk string) (res cryptotypes.PubKey) { pkBytes, err := hex.DecodeString(pk) if err != nil { panic(err) diff --git a/tests/mocks/account_retriever.go b/tests/mocks/account_retriever.go index 23b02b7dce..37fa1aa64d 100644 --- a/tests/mocks/account_retriever.go +++ b/tests/mocks/account_retriever.go @@ -6,9 +6,9 @@ package mocks import ( client "github.com/cosmos/cosmos-sdk/client" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" types "github.com/cosmos/cosmos-sdk/types" gomock "github.com/golang/mock/gomock" - crypto "github.com/tendermint/tendermint/crypto" reflect "reflect" ) @@ -50,10 +50,10 @@ func (mr *MockAccountMockRecorder) GetAddress() *gomock.Call { } // GetPubKey mocks base method -func (m *MockAccount) GetPubKey() crypto.PubKey { +func (m *MockAccount) GetPubKey() cryptotypes.PubKey { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetPubKey") - ret0, _ := ret[0].(crypto.PubKey) + ret0, _ := ret[0].(cryptotypes.PubKey) return ret0 } diff --git a/testutil/network/network.go b/testutil/network/network.go index 1ee11f8c93..a50c6fa935 100644 --- a/testutil/network/network.go +++ b/testutil/network/network.go @@ -16,7 +16,6 @@ import ( "github.com/stretchr/testify/require" tmcfg "github.com/tendermint/tendermint/config" - "github.com/tendermint/tendermint/crypto" tmflags "github.com/tendermint/tendermint/libs/cli/flags" "github.com/tendermint/tendermint/libs/log" tmrand "github.com/tendermint/tendermint/libs/rand" @@ -32,6 +31,7 @@ import ( codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/crypto/hd" "github.com/cosmos/cosmos-sdk/crypto/keyring" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/server" "github.com/cosmos/cosmos-sdk/server/api" srvconfig "github.com/cosmos/cosmos-sdk/server/config" @@ -148,7 +148,7 @@ type ( Ctx *server.Context Dir string NodeID string - PubKey crypto.PubKey + PubKey cryptotypes.PubKey Moniker string APIAddress string RPCAddress string @@ -184,7 +184,7 @@ func New(t *testing.T, cfg Config) *Network { monikers := make([]string, cfg.NumValidators) nodeIDs := make([]string, cfg.NumValidators) - valPubKeys := make([]crypto.PubKey, cfg.NumValidators) + valPubKeys := make([]cryptotypes.PubKey, cfg.NumValidators) var ( genAccounts []authtypes.GenesisAccount diff --git a/testutil/testdata/tx.go b/testutil/testdata/tx.go index 09e1e365f1..1538460830 100644 --- a/testutil/testdata/tx.go +++ b/testutil/testdata/tx.go @@ -3,14 +3,13 @@ package testdata import ( "encoding/json" - "github.com/tendermint/tendermint/crypto" - "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" ) // KeyTestPubAddr generates a new secp256k1 keypair. -func KeyTestPubAddr() (crypto.PrivKey, crypto.PubKey, sdk.AccAddress) { +func KeyTestPubAddr() (cryptotypes.PrivKey, cryptotypes.PubKey, sdk.AccAddress) { key := secp256k1.GenPrivKey() pub := key.PubKey() addr := sdk.AccAddress(pub.Address()) diff --git a/types/address.go b/types/address.go index 345c44fa8e..a6d65e7a70 100644 --- a/types/address.go +++ b/types/address.go @@ -8,16 +8,12 @@ import ( "fmt" "strings" - "github.com/tendermint/tendermint/crypto" - tmed25519 "github.com/tendermint/tendermint/crypto/ed25519" yaml "gopkg.in/yaml.v2" "github.com/cosmos/cosmos-sdk/codec/legacy" cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" - "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" - "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/types/bech32" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) const ( @@ -452,7 +448,7 @@ func ConsAddressFromBech32(address string) (addr ConsAddress, err error) { } // get ConsAddress from pubkey -func GetConsAddress(pubkey crypto.PubKey) ConsAddress { +func GetConsAddress(pubkey cryptotypes.PubKey) ConsAddress { return ConsAddress(pubkey.Address()) } @@ -616,7 +612,8 @@ const ( // Bech32ifyPubKey returns a Bech32 encoded string containing the appropriate // prefix based on the key type provided for a given PublicKey. -func Bech32ifyPubKey(pkt Bech32PubKeyType, pubkey crypto.PubKey) (string, error) { +// TODO: Remove Bech32ifyPubKey and all usages (cosmos/cosmos-sdk/issues/#7357) +func Bech32ifyPubKey(pkt Bech32PubKeyType, pubkey cryptotypes.PubKey) (string, error) { var bech32Prefix string switch pkt { @@ -631,22 +628,11 @@ func Bech32ifyPubKey(pkt Bech32PubKeyType, pubkey crypto.PubKey) (string, error) } - // This piece of code is to keep backwards-compatibility. - // For ed25519 keys, our own ed25519 is registered in Amino under a - // different name than TM's ed25519. But since users are already using - // TM's ed25519 bech32 encoding, we explicitly say to bech32-encode our own - // ed25519 the same way as TM's ed25519. - // TODO: Remove Bech32ifyPubKey and all usages (cosmos/cosmos-sdk/issues/#7357) - pkToMarshal := pubkey - if ed25519Pk, ok := pubkey.(*ed25519.PubKey); ok { - pkToMarshal = ed25519Pk.AsTmPubKey() - } - - return bech32.ConvertAndEncode(bech32Prefix, legacy.Cdc.MustMarshalBinaryBare(pkToMarshal)) + return bech32.ConvertAndEncode(bech32Prefix, legacy.Cdc.MustMarshalBinaryBare(pubkey)) } // MustBech32ifyPubKey calls Bech32ifyPubKey except it panics on error. -func MustBech32ifyPubKey(pkt Bech32PubKeyType, pubkey crypto.PubKey) string { +func MustBech32ifyPubKey(pkt Bech32PubKeyType, pubkey cryptotypes.PubKey) string { res, err := Bech32ifyPubKey(pkt, pubkey) if err != nil { panic(err) @@ -657,7 +643,7 @@ func MustBech32ifyPubKey(pkt Bech32PubKeyType, pubkey crypto.PubKey) string { // GetPubKeyFromBech32 returns a PublicKey from a bech32-encoded PublicKey with // a given key type. -func GetPubKeyFromBech32(pkt Bech32PubKeyType, pubkeyStr string) (crypto.PubKey, error) { +func GetPubKeyFromBech32(pkt Bech32PubKeyType, pubkeyStr string) (cryptotypes.PubKey, error) { var bech32Prefix string switch pkt { @@ -677,36 +663,11 @@ func GetPubKeyFromBech32(pkt Bech32PubKeyType, pubkeyStr string) (crypto.PubKey, return nil, err } - aminoPk, err := cryptocodec.PubKeyFromBytes(bz) - if err != nil { - return nil, err - } - - var protoPk crypto.PubKey - switch aminoPk.(type) { - - // We are bech32ifying some secp256k1 keys in tests. - case *secp256k1.PubKey: - protoPk = aminoPk - case *ed25519.PubKey: - protoPk = aminoPk - - // Real-life case. - case tmed25519.PubKey: - protoPk = &ed25519.PubKey{ - Key: aminoPk.Bytes(), - } - - default: - // We only allow ed25519 pubkeys to be bech32-ed right now. - return nil, sdkerrors.Wrapf(sdkerrors.ErrInvalidType, "bech32 pubkey does not support %T", aminoPk) - } - - return protoPk, nil + return cryptocodec.PubKeyFromBytes(bz) } // MustGetPubKeyFromBech32 calls GetPubKeyFromBech32 except it panics on error. -func MustGetPubKeyFromBech32(pkt Bech32PubKeyType, pubkeyStr string) crypto.PubKey { +func MustGetPubKeyFromBech32(pkt Bech32PubKeyType, pubkeyStr string) cryptotypes.PubKey { res, err := GetPubKeyFromBech32(pkt, pubkeyStr) if err != nil { panic(err) diff --git a/types/address_test.go b/types/address_test.go index 9de4bea4f3..5796c891ac 100644 --- a/types/address_test.go +++ b/types/address_test.go @@ -10,11 +10,11 @@ import ( "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" - "github.com/tendermint/tendermint/crypto" "gopkg.in/yaml.v2" "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/types" ) @@ -509,7 +509,7 @@ func (s *addressTestSuite) TestGetConsAddress() { pk := secp256k1.GenPrivKey().PubKey() s.Require().NotEqual(types.GetConsAddress(pk), pk.Address()) s.Require().True(bytes.Equal(types.GetConsAddress(pk).Bytes(), pk.Address().Bytes())) - s.Require().Panics(func() { types.GetConsAddress(crypto.PubKey(nil)) }) + s.Require().Panics(func() { types.GetConsAddress(cryptotypes.PubKey(nil)) }) } func (s *addressTestSuite) TestGetFromBech32() { diff --git a/types/rest/rest_test.go b/types/rest/rest_test.go index b4bf386117..0a3e16b29d 100644 --- a/types/rest/rest_test.go +++ b/types/rest/rest_test.go @@ -12,13 +12,13 @@ import ( "github.com/spf13/viper" "github.com/stretchr/testify/require" - "github.com/tendermint/tendermint/crypto" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/codec" cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" simappparams "github.com/cosmos/cosmos-sdk/simapp/params" "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/rest" @@ -176,15 +176,15 @@ func TestParseQueryHeight(t *testing.T) { func TestProcessPostResponse(t *testing.T) { // mock account // PubKey field ensures amino encoding is used first since standard - // JSON encoding will panic on crypto.PubKey + // JSON encoding will panic on cryptotypes.PubKey t.Parallel() type mockAccount struct { - Address types.AccAddress `json:"address"` - Coins types.Coins `json:"coins"` - PubKey crypto.PubKey `json:"public_key"` - AccountNumber uint64 `json:"account_number"` - Sequence uint64 `json:"sequence"` + Address types.AccAddress `json:"address"` + Coins types.Coins `json:"coins"` + PubKey cryptotypes.PubKey `json:"public_key"` + AccountNumber uint64 `json:"account_number"` + Sequence uint64 `json:"sequence"` } // setup diff --git a/types/simulation/account.go b/types/simulation/account.go index b0c6b7bd68..e031b5a9eb 100644 --- a/types/simulation/account.go +++ b/types/simulation/account.go @@ -3,10 +3,9 @@ package simulation import ( "math/rand" - "github.com/tendermint/tendermint/crypto" - "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -14,10 +13,10 @@ import ( // eventually more useful data can be placed in here. // (e.g. number of coins) type Account struct { - PrivKey crypto.PrivKey - PubKey crypto.PubKey + PrivKey cryptotypes.PrivKey + PubKey cryptotypes.PubKey Address sdk.AccAddress - ConsKey crypto.PrivKey + ConsKey cryptotypes.PrivKey } // Equals returns true if two accounts are equal diff --git a/types/tx/signing/signature.go b/types/tx/signing/signature.go index 0966cc06f7..1323543f02 100644 --- a/types/tx/signing/signature.go +++ b/types/tx/signing/signature.go @@ -3,9 +3,8 @@ package signing import ( "fmt" - "github.com/tendermint/tendermint/crypto" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" ) // SignatureV2 is a convenience type that is easier to use in application logic @@ -15,7 +14,7 @@ import ( // signatures. type SignatureV2 struct { // PubKey is the public key to use for verifying the signature - PubKey crypto.PubKey + PubKey cryptotypes.PubKey // Data is the actual data of the signature which includes SignMode's and // the signatures themselves for either single or multi-signatures. @@ -104,5 +103,5 @@ func (sds *SignatureDescriptors) UnpackInterfaces(unpacker codectypes.AnyUnpacke // UnpackInterfaces implements the UnpackInterfaceMessages.UnpackInterfaces method func (sd *SignatureDescriptor) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error { - return unpacker.UnpackAny(sd.PublicKey, new(crypto.PubKey)) + return unpacker.UnpackAny(sd.PublicKey, new(cryptotypes.PubKey)) } diff --git a/types/tx/types.go b/types/tx/types.go index 436f2cd9bc..c572d448a8 100644 --- a/types/tx/types.go +++ b/types/tx/types.go @@ -4,9 +4,8 @@ import ( "fmt" "strings" - "github.com/tendermint/tendermint/crypto" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) @@ -180,7 +179,7 @@ func (m *AuthInfo) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error { // UnpackInterfaces implements the UnpackInterfaceMessages.UnpackInterfaces method func (m *SignerInfo) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error { - return unpacker.UnpackAny(m.PublicKey, new(crypto.PubKey)) + return unpacker.UnpackAny(m.PublicKey, new(cryptotypes.PubKey)) } // RegisterInterfaces registers the sdk.Tx interface. diff --git a/types/tx_msg.go b/types/tx_msg.go index e75b7b6ae6..ddc07fa16b 100644 --- a/types/tx_msg.go +++ b/types/tx_msg.go @@ -1,9 +1,8 @@ package types import ( + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/gogo/protobuf/proto" - - "github.com/tendermint/tendermint/crypto" ) type ( @@ -42,7 +41,7 @@ type ( // Signature defines an interface for an application application-defined // concrete transaction type to be able to set and return transaction signatures. Signature interface { - GetPubKey() crypto.PubKey + GetPubKey() cryptotypes.PubKey GetSignature() []byte } diff --git a/x/auth/ante/ante_test.go b/x/auth/ante/ante_test.go index 0d9ef82f44..7659f3e104 100644 --- a/x/auth/ante/ante_test.go +++ b/x/auth/ante/ante_test.go @@ -8,11 +8,11 @@ import ( "testing" "github.com/stretchr/testify/require" - "github.com/tendermint/tendermint/crypto" "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" kmultisig "github.com/cosmos/cosmos-sdk/crypto/keys/multisig" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" @@ -35,7 +35,7 @@ func (suite *AnteTestSuite) TestSimulateGasCost() { feeAmount := testdata.NewTestFeeAmount() gasLimit := testdata.NewTestGasLimit() accSeqs := []uint64{0, 0, 0} - privs := []crypto.PrivKey{accounts[0].priv, accounts[1].priv, accounts[2].priv} + privs := []cryptotypes.PrivKey{accounts[0].priv, accounts[1].priv, accounts[2].priv} accNums := []uint64{0, 1, 2} testCases := []TestCase{ @@ -91,7 +91,7 @@ func (suite *AnteTestSuite) TestAnteHandlerSigErrors() { // Variable data per test case var ( - privs []crypto.PrivKey + privs []cryptotypes.PrivKey accNums []uint64 accSeqs []uint64 ) @@ -100,7 +100,7 @@ func (suite *AnteTestSuite) TestAnteHandlerSigErrors() { { "check no signatures fails", func() { - privs, accNums, accSeqs = []crypto.PrivKey{}, []uint64{}, []uint64{} + privs, accNums, accSeqs = []cryptotypes.PrivKey{}, []uint64{}, []uint64{} // Create tx manually to test the tx's signers suite.Require().NoError(suite.txBuilder.SetMsgs(msgs...)) @@ -117,7 +117,7 @@ func (suite *AnteTestSuite) TestAnteHandlerSigErrors() { { "num sigs dont match GetSigners", func() { - privs, accNums, accSeqs = []crypto.PrivKey{priv0}, []uint64{0}, []uint64{0} + privs, accNums, accSeqs = []cryptotypes.PrivKey{priv0}, []uint64{0}, []uint64{0} }, false, false, @@ -126,7 +126,7 @@ func (suite *AnteTestSuite) TestAnteHandlerSigErrors() { { "unrecognized account", func() { - privs, accNums, accSeqs = []crypto.PrivKey{priv0, priv1, priv2}, []uint64{0, 1, 2}, []uint64{0, 0, 0} + privs, accNums, accSeqs = []cryptotypes.PrivKey{priv0, priv1, priv2}, []uint64{0, 1, 2}, []uint64{0, 0, 0} }, false, false, @@ -169,7 +169,7 @@ func (suite *AnteTestSuite) TestAnteHandlerAccountNumbers() { var ( accNums []uint64 msgs []sdk.Msg - privs []crypto.PrivKey + privs []cryptotypes.PrivKey accSeqs []uint64 ) @@ -180,7 +180,7 @@ func (suite *AnteTestSuite) TestAnteHandlerAccountNumbers() { msg := testdata.NewTestMsg(accounts[0].acc.GetAddress()) msgs = []sdk.Msg{msg} - privs, accNums, accSeqs = []crypto.PrivKey{accounts[0].priv}, []uint64{0}, []uint64{0} + privs, accNums, accSeqs = []cryptotypes.PrivKey{accounts[0].priv}, []uint64{0}, []uint64{0} }, false, true, @@ -189,7 +189,7 @@ func (suite *AnteTestSuite) TestAnteHandlerAccountNumbers() { { "new tx from wrong account number", func() { - privs, accNums, accSeqs = []crypto.PrivKey{accounts[0].priv}, []uint64{1}, []uint64{1} + privs, accNums, accSeqs = []cryptotypes.PrivKey{accounts[0].priv}, []uint64{1}, []uint64{1} }, false, false, @@ -198,7 +198,7 @@ func (suite *AnteTestSuite) TestAnteHandlerAccountNumbers() { { "new tx from correct account number", func() { - privs, accNums, accSeqs = []crypto.PrivKey{accounts[0].priv}, []uint64{0}, []uint64{1} + privs, accNums, accSeqs = []cryptotypes.PrivKey{accounts[0].priv}, []uint64{0}, []uint64{1} }, false, true, @@ -210,7 +210,7 @@ func (suite *AnteTestSuite) TestAnteHandlerAccountNumbers() { msg1 := testdata.NewTestMsg(accounts[0].acc.GetAddress(), accounts[1].acc.GetAddress()) msg2 := testdata.NewTestMsg(accounts[1].acc.GetAddress(), accounts[0].acc.GetAddress()) msgs = []sdk.Msg{msg1, msg2} - privs, accNums, accSeqs = []crypto.PrivKey{accounts[0].priv, accounts[1].priv}, []uint64{1, 0}, []uint64{2, 0} + privs, accNums, accSeqs = []cryptotypes.PrivKey{accounts[0].priv, accounts[1].priv}, []uint64{1, 0}, []uint64{2, 0} }, false, false, @@ -219,7 +219,7 @@ func (suite *AnteTestSuite) TestAnteHandlerAccountNumbers() { { "new tx with correct account numbers", func() { - privs, accNums, accSeqs = []crypto.PrivKey{accounts[0].priv, accounts[1].priv}, []uint64{0, 1}, []uint64{2, 0} + privs, accNums, accSeqs = []cryptotypes.PrivKey{accounts[0].priv, accounts[1].priv}, []uint64{0, 1}, []uint64{2, 0} }, false, true, @@ -251,7 +251,7 @@ func (suite *AnteTestSuite) TestAnteHandlerAccountNumbersAtBlockHeightZero() { var ( accNums []uint64 msgs []sdk.Msg - privs []crypto.PrivKey + privs []cryptotypes.PrivKey accSeqs []uint64 ) @@ -262,7 +262,7 @@ func (suite *AnteTestSuite) TestAnteHandlerAccountNumbersAtBlockHeightZero() { msg := testdata.NewTestMsg(accounts[0].acc.GetAddress()) msgs = []sdk.Msg{msg} - privs, accNums, accSeqs = []crypto.PrivKey{accounts[0].priv}, []uint64{0}, []uint64{0} + privs, accNums, accSeqs = []cryptotypes.PrivKey{accounts[0].priv}, []uint64{0}, []uint64{0} }, false, true, @@ -271,7 +271,7 @@ func (suite *AnteTestSuite) TestAnteHandlerAccountNumbersAtBlockHeightZero() { { "new tx from wrong account number", func() { - privs, accNums, accSeqs = []crypto.PrivKey{accounts[0].priv}, []uint64{1}, []uint64{1} + privs, accNums, accSeqs = []cryptotypes.PrivKey{accounts[0].priv}, []uint64{1}, []uint64{1} }, false, false, @@ -280,7 +280,7 @@ func (suite *AnteTestSuite) TestAnteHandlerAccountNumbersAtBlockHeightZero() { { "new tx from correct account number", func() { - privs, accNums, accSeqs = []crypto.PrivKey{accounts[0].priv}, []uint64{0}, []uint64{1} + privs, accNums, accSeqs = []cryptotypes.PrivKey{accounts[0].priv}, []uint64{0}, []uint64{1} }, false, true, @@ -293,7 +293,7 @@ func (suite *AnteTestSuite) TestAnteHandlerAccountNumbersAtBlockHeightZero() { msg2 := testdata.NewTestMsg(accounts[1].acc.GetAddress(), accounts[0].acc.GetAddress()) msgs = []sdk.Msg{msg1, msg2} - privs, accNums, accSeqs = []crypto.PrivKey{accounts[0].priv, accounts[1].priv}, []uint64{1, 0}, []uint64{2, 0} + privs, accNums, accSeqs = []cryptotypes.PrivKey{accounts[0].priv, accounts[1].priv}, []uint64{1, 0}, []uint64{2, 0} }, false, false, @@ -303,7 +303,7 @@ func (suite *AnteTestSuite) TestAnteHandlerAccountNumbersAtBlockHeightZero() { "new tx with another signer and correct account numbers", func() { // Note that accNums is [0,0] at block 0. - privs, accNums, accSeqs = []crypto.PrivKey{accounts[0].priv, accounts[1].priv}, []uint64{0, 0}, []uint64{2, 0} + privs, accNums, accSeqs = []cryptotypes.PrivKey{accounts[0].priv, accounts[1].priv}, []uint64{0, 0}, []uint64{2, 0} }, false, true, @@ -334,7 +334,7 @@ func (suite *AnteTestSuite) TestAnteHandlerSequences() { var ( accNums []uint64 msgs []sdk.Msg - privs []crypto.PrivKey + privs []cryptotypes.PrivKey accSeqs []uint64 ) @@ -345,7 +345,7 @@ func (suite *AnteTestSuite) TestAnteHandlerSequences() { msg := testdata.NewTestMsg(accounts[0].acc.GetAddress()) msgs = []sdk.Msg{msg} - privs, accNums, accSeqs = []crypto.PrivKey{accounts[0].priv}, []uint64{0}, []uint64{0} + privs, accNums, accSeqs = []cryptotypes.PrivKey{accounts[0].priv}, []uint64{0}, []uint64{0} }, false, true, @@ -354,7 +354,7 @@ func (suite *AnteTestSuite) TestAnteHandlerSequences() { { "test sending it again fails (replay protection)", func() { - privs, accNums, accSeqs = []crypto.PrivKey{accounts[0].priv}, []uint64{0}, []uint64{0} + privs, accNums, accSeqs = []cryptotypes.PrivKey{accounts[0].priv}, []uint64{0}, []uint64{0} }, false, false, @@ -363,7 +363,7 @@ func (suite *AnteTestSuite) TestAnteHandlerSequences() { { "fix sequence, should pass", func() { - privs, accNums, accSeqs = []crypto.PrivKey{accounts[0].priv}, []uint64{0}, []uint64{1} + privs, accNums, accSeqs = []cryptotypes.PrivKey{accounts[0].priv}, []uint64{0}, []uint64{1} }, false, true, @@ -376,7 +376,7 @@ func (suite *AnteTestSuite) TestAnteHandlerSequences() { msg2 := testdata.NewTestMsg(accounts[2].acc.GetAddress(), accounts[0].acc.GetAddress()) msgs = []sdk.Msg{msg1, msg2} - privs, accNums, accSeqs = []crypto.PrivKey{accounts[0].priv, accounts[1].priv, accounts[2].priv}, []uint64{0, 1, 2}, []uint64{2, 0, 0} + privs, accNums, accSeqs = []cryptotypes.PrivKey{accounts[0].priv, accounts[1].priv, accounts[2].priv}, []uint64{0, 1, 2}, []uint64{2, 0, 0} }, false, true, @@ -394,7 +394,7 @@ func (suite *AnteTestSuite) TestAnteHandlerSequences() { func() { msg := testdata.NewTestMsg(accounts[1].acc.GetAddress()) msgs = []sdk.Msg{msg} - privs, accNums, accSeqs = []crypto.PrivKey{accounts[1].priv}, []uint64{1}, []uint64{0} + privs, accNums, accSeqs = []cryptotypes.PrivKey{accounts[1].priv}, []uint64{1}, []uint64{0} }, false, false, @@ -415,7 +415,7 @@ func (suite *AnteTestSuite) TestAnteHandlerSequences() { msg := testdata.NewTestMsg(accounts[0].acc.GetAddress(), accounts[1].acc.GetAddress()) msgs = []sdk.Msg{msg} - privs, accNums, accSeqs = []crypto.PrivKey{accounts[0].priv, accounts[1].priv}, []uint64{0, 1}, []uint64{3, 2} + privs, accNums, accSeqs = []cryptotypes.PrivKey{accounts[0].priv, accounts[1].priv}, []uint64{0, 1}, []uint64{3, 2} }, false, true, @@ -445,7 +445,7 @@ func (suite *AnteTestSuite) TestAnteHandlerFees() { msgs := []sdk.Msg{testdata.NewTestMsg(addr0)} feeAmount := testdata.NewTestFeeAmount() gasLimit := testdata.NewTestGasLimit() - privs, accNums, accSeqs := []crypto.PrivKey{priv0}, []uint64{0}, []uint64{0} + privs, accNums, accSeqs := []cryptotypes.PrivKey{priv0}, []uint64{0}, []uint64{0} testCases := []struct { desc string @@ -517,7 +517,7 @@ func (suite *AnteTestSuite) TestAnteHandlerMemoGas() { // Same data for every test cases accounts := suite.CreateTestAccounts(1) msgs := []sdk.Msg{testdata.NewTestMsg(accounts[0].acc.GetAddress())} - privs, accNums, accSeqs := []crypto.PrivKey{accounts[0].priv}, []uint64{0}, []uint64{0} + privs, accNums, accSeqs := []cryptotypes.PrivKey{accounts[0].priv}, []uint64{0}, []uint64{0} // Variable data per test case var ( @@ -596,7 +596,7 @@ func (suite *AnteTestSuite) TestAnteHandlerMultiSigner() { var ( accNums []uint64 msgs []sdk.Msg - privs []crypto.PrivKey + privs []cryptotypes.PrivKey accSeqs []uint64 ) @@ -605,7 +605,7 @@ func (suite *AnteTestSuite) TestAnteHandlerMultiSigner() { "signers in order", func() { msgs = []sdk.Msg{msg1, msg2, msg3} - privs, accNums, accSeqs = []crypto.PrivKey{accounts[0].priv, accounts[1].priv, accounts[2].priv}, []uint64{0, 1, 2}, []uint64{0, 0, 0} + privs, accNums, accSeqs = []cryptotypes.PrivKey{accounts[0].priv, accounts[1].priv, accounts[2].priv}, []uint64{0, 1, 2}, []uint64{0, 0, 0} suite.txBuilder.SetMemo("Check signers are in expected order and different account numbers works") }, false, @@ -616,7 +616,7 @@ func (suite *AnteTestSuite) TestAnteHandlerMultiSigner() { "change sequence numbers (only accounts 0 and 1 sign)", func() { msgs = []sdk.Msg{msg1} - privs, accNums, accSeqs = []crypto.PrivKey{accounts[0].priv, accounts[1].priv}, []uint64{0, 1}, []uint64{1, 1} + privs, accNums, accSeqs = []cryptotypes.PrivKey{accounts[0].priv, accounts[1].priv}, []uint64{0, 1}, []uint64{1, 1} }, false, true, @@ -626,7 +626,7 @@ func (suite *AnteTestSuite) TestAnteHandlerMultiSigner() { "change sequence numbers (only accounts 1 and 2 sign)", func() { msgs = []sdk.Msg{msg2} - privs, accNums, accSeqs = []crypto.PrivKey{accounts[2].priv, accounts[0].priv}, []uint64{2, 0}, []uint64{1, 2} + privs, accNums, accSeqs = []cryptotypes.PrivKey{accounts[2].priv, accounts[0].priv}, []uint64{2, 0}, []uint64{1, 2} }, false, true, @@ -636,7 +636,7 @@ func (suite *AnteTestSuite) TestAnteHandlerMultiSigner() { "everyone signs again", func() { msgs = []sdk.Msg{msg1, msg2, msg3} - privs, accNums, accSeqs = []crypto.PrivKey{accounts[0].priv, accounts[1].priv, accounts[2].priv}, []uint64{0, 1, 2}, []uint64{3, 2, 2} + privs, accNums, accSeqs = []cryptotypes.PrivKey{accounts[0].priv, accounts[1].priv, accounts[2].priv}, []uint64{0, 1, 2}, []uint64{3, 2, 2} }, false, true, @@ -668,7 +668,7 @@ func (suite *AnteTestSuite) TestAnteHandlerBadSignBytes() { feeAmount sdk.Coins gasLimit uint64 msgs []sdk.Msg - privs []crypto.PrivKey + privs []cryptotypes.PrivKey accSeqs []uint64 ) @@ -680,7 +680,7 @@ func (suite *AnteTestSuite) TestAnteHandlerBadSignBytes() { feeAmount = testdata.NewTestFeeAmount() gasLimit = testdata.NewTestGasLimit() msgs = []sdk.Msg{msg0} - privs, accNums, accSeqs = []crypto.PrivKey{accounts[0].priv}, []uint64{0}, []uint64{0} + privs, accNums, accSeqs = []cryptotypes.PrivKey{accounts[0].priv}, []uint64{0}, []uint64{0} }, false, true, @@ -752,7 +752,7 @@ func (suite *AnteTestSuite) TestAnteHandlerBadSignBytes() { func() { feeAmount = testdata.NewTestFeeAmount() gasLimit = testdata.NewTestGasLimit() - privs, accNums, accSeqs = []crypto.PrivKey{accounts[1].priv}, []uint64{0}, []uint64{1} + privs, accNums, accSeqs = []cryptotypes.PrivKey{accounts[1].priv}, []uint64{0}, []uint64{1} }, false, false, @@ -762,7 +762,7 @@ func (suite *AnteTestSuite) TestAnteHandlerBadSignBytes() { "test wrong signer if public doesn't exist", func() { msgs = []sdk.Msg{testdata.NewTestMsg(accounts[1].acc.GetAddress())} - privs, accNums, accSeqs = []crypto.PrivKey{accounts[0].priv}, []uint64{1}, []uint64{0} + privs, accNums, accSeqs = []cryptotypes.PrivKey{accounts[0].priv}, []uint64{1}, []uint64{0} }, false, false, @@ -792,7 +792,7 @@ func (suite *AnteTestSuite) TestAnteHandlerSetPubKey() { var ( accNums []uint64 msgs []sdk.Msg - privs []crypto.PrivKey + privs []cryptotypes.PrivKey accSeqs []uint64 ) @@ -800,7 +800,7 @@ func (suite *AnteTestSuite) TestAnteHandlerSetPubKey() { { "test good tx", func() { - privs, accNums, accSeqs = []crypto.PrivKey{accounts[0].priv}, []uint64{0}, []uint64{0} + privs, accNums, accSeqs = []cryptotypes.PrivKey{accounts[0].priv}, []uint64{0}, []uint64{0} msgs = []sdk.Msg{testdata.NewTestMsg(accounts[0].acc.GetAddress())} }, false, @@ -835,7 +835,7 @@ func (suite *AnteTestSuite) TestAnteHandlerSetPubKey() { acc1 := suite.app.AccountKeeper.GetAccount(suite.ctx, accounts[1].acc.GetAddress()) suite.Require().Nil(acc1.GetPubKey()) - privs, accNums, accSeqs = []crypto.PrivKey{accounts[1].priv}, []uint64{1}, []uint64{0} + privs, accNums, accSeqs = []cryptotypes.PrivKey{accounts[1].priv}, []uint64{1}, []uint64{0} msgs = []sdk.Msg{testdata.NewTestMsg(accounts[1].acc.GetAddress())} suite.txBuilder.SetMsgs(msgs...) suite.txBuilder.SetFeeAmount(feeAmount) @@ -858,7 +858,7 @@ func (suite *AnteTestSuite) TestAnteHandlerSetPubKey() { suite.Require().Nil(acc1.GetPubKey()) // Set incorrect accSeq, to generate incorrect signature. - privs, accNums, accSeqs = []crypto.PrivKey{accounts[1].priv}, []uint64{1}, []uint64{1} + privs, accNums, accSeqs = []cryptotypes.PrivKey{accounts[1].priv}, []uint64{1}, []uint64{1} }, false, false, @@ -888,11 +888,11 @@ func (suite *AnteTestSuite) TestAnteHandlerSetPubKey() { } } -func generatePubKeysAndSignatures(n int, msg []byte, _ bool) (pubkeys []crypto.PubKey, signatures [][]byte) { - pubkeys = make([]crypto.PubKey, n) +func generatePubKeysAndSignatures(n int, msg []byte, _ bool) (pubkeys []cryptotypes.PubKey, signatures [][]byte) { + pubkeys = make([]cryptotypes.PubKey, n) signatures = make([][]byte, n) for i := 0; i < n; i++ { - var privkey crypto.PrivKey + var privkey cryptotypes.PrivKey privkey = secp256k1.GenPrivKey() // TODO: also generate ed25519 keys as below when ed25519 keys are @@ -910,7 +910,7 @@ func generatePubKeysAndSignatures(n int, msg []byte, _ bool) (pubkeys []crypto.P return } -func expectedGasCostByKeys(pubkeys []crypto.PubKey) uint64 { +func expectedGasCostByKeys(pubkeys []cryptotypes.PubKey) uint64 { cost := uint64(0) for _, pubkey := range pubkeys { pubkeyType := strings.ToLower(fmt.Sprintf("%T", pubkey)) @@ -927,8 +927,8 @@ func expectedGasCostByKeys(pubkeys []crypto.PubKey) uint64 { } func TestCountSubkeys(t *testing.T) { - genPubKeys := func(n int) []crypto.PubKey { - var ret []crypto.PubKey + genPubKeys := func(n int) []cryptotypes.PubKey { + var ret []cryptotypes.PubKey for i := 0; i < n; i++ { ret = append(ret, secp256k1.GenPrivKey().PubKey()) } @@ -938,10 +938,10 @@ func TestCountSubkeys(t *testing.T) { singleLevelMultiKey := kmultisig.NewLegacyAminoPubKey(4, genPubKeys(5)) multiLevelSubKey1 := kmultisig.NewLegacyAminoPubKey(4, genPubKeys(5)) multiLevelSubKey2 := kmultisig.NewLegacyAminoPubKey(4, genPubKeys(5)) - multiLevelMultiKey := kmultisig.NewLegacyAminoPubKey(2, []crypto.PubKey{ + multiLevelMultiKey := kmultisig.NewLegacyAminoPubKey(2, []cryptotypes.PubKey{ multiLevelSubKey1, multiLevelSubKey2, secp256k1.GenPrivKey().PubKey()}) type args struct { - pub crypto.PubKey + pub cryptotypes.PubKey } testCases := []struct { name string @@ -965,7 +965,7 @@ func (suite *AnteTestSuite) TestAnteHandlerSigLimitExceeded() { // Same data for every test cases accounts := suite.CreateTestAccounts(8) var addrs []sdk.AccAddress - var privs []crypto.PrivKey + var privs []cryptotypes.PrivKey for i := 0; i < 8; i++ { addrs = append(addrs, accounts[i].acc.GetAddress()) privs = append(privs, accounts[i].priv) @@ -1019,7 +1019,7 @@ func (suite *AnteTestSuite) TestCustomSignatureVerificationGasConsumer() { var ( accNums []uint64 msgs []sdk.Msg - privs []crypto.PrivKey + privs []cryptotypes.PrivKey accSeqs []uint64 ) @@ -1028,7 +1028,7 @@ func (suite *AnteTestSuite) TestCustomSignatureVerificationGasConsumer() { "verify that an secp256k1 account gets rejected", func() { msgs = []sdk.Msg{testdata.NewTestMsg(accounts[0].acc.GetAddress())} - privs, accNums, accSeqs = []crypto.PrivKey{accounts[0].priv}, []uint64{0}, []uint64{0} + privs, accNums, accSeqs = []cryptotypes.PrivKey{accounts[0].priv}, []uint64{0}, []uint64{0} }, false, false, @@ -1067,7 +1067,7 @@ func (suite *AnteTestSuite) TestAnteHandlerReCheck() { suite.txBuilder.SetMemo("thisisatestmemo") // test that operations skipped on recheck do not run - privs, accNums, accSeqs := []crypto.PrivKey{accounts[0].priv}, []uint64{0}, []uint64{0} + privs, accNums, accSeqs := []cryptotypes.PrivKey{accounts[0].priv}, []uint64{0}, []uint64{0} tx, err := suite.CreateTestTx(privs, accNums, accSeqs, suite.ctx.ChainID()) suite.Require().NoError(err) diff --git a/x/auth/ante/basic.go b/x/auth/ante/basic.go index f722e51a04..7ed834ebaa 100644 --- a/x/auth/ante/basic.go +++ b/x/auth/ante/basic.go @@ -1,10 +1,9 @@ package ante import ( - "github.com/tendermint/tendermint/crypto" - "github.com/cosmos/cosmos-sdk/codec/legacy" "github.com/cosmos/cosmos-sdk/crypto/keys/multisig" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/types/tx/signing" @@ -110,7 +109,7 @@ func (cgts ConsumeTxSizeGasDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, sim continue } - var pubkey crypto.PubKey + var pubkey cryptotypes.PubKey acc := cgts.ak.GetAccount(ctx, signer) diff --git a/x/auth/ante/basic_test.go b/x/auth/ante/basic_test.go index 8b304d180e..0856734885 100644 --- a/x/auth/ante/basic_test.go +++ b/x/auth/ante/basic_test.go @@ -3,13 +3,11 @@ package ante_test import ( "strings" - "github.com/cosmos/cosmos-sdk/testutil/testdata" - "github.com/cosmos/cosmos-sdk/types/tx/signing" - - "github.com/tendermint/tendermint/crypto" - + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/crypto/types/multisig" + "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/tx/signing" "github.com/cosmos/cosmos-sdk/x/auth/ante" ) @@ -28,7 +26,7 @@ func (suite *AnteTestSuite) TestValidateBasic() { suite.txBuilder.SetFeeAmount(feeAmount) suite.txBuilder.SetGasLimit(gasLimit) - privs, accNums, accSeqs := []crypto.PrivKey{}, []uint64{}, []uint64{} + privs, accNums, accSeqs := []cryptotypes.PrivKey{}, []uint64{}, []uint64{} invalidTx, err := suite.CreateTestTx(privs, accNums, accSeqs, suite.ctx.ChainID()) suite.Require().NoError(err) @@ -38,7 +36,7 @@ func (suite *AnteTestSuite) TestValidateBasic() { suite.Require().NotNil(err, "Did not error on invalid tx") - privs, accNums, accSeqs = []crypto.PrivKey{priv1}, []uint64{0}, []uint64{0} + privs, accNums, accSeqs = []cryptotypes.PrivKey{priv1}, []uint64{0}, []uint64{0} validTx, err := suite.CreateTestTx(privs, accNums, accSeqs, suite.ctx.ChainID()) suite.Require().NoError(err) @@ -69,7 +67,7 @@ func (suite *AnteTestSuite) TestValidateMemo() { suite.txBuilder.SetFeeAmount(feeAmount) suite.txBuilder.SetGasLimit(gasLimit) - privs, accNums, accSeqs := []crypto.PrivKey{priv1}, []uint64{0}, []uint64{0} + privs, accNums, accSeqs := []cryptotypes.PrivKey{priv1}, []uint64{0}, []uint64{0} suite.txBuilder.SetMemo(strings.Repeat("01234567890", 500)) invalidTx, err := suite.CreateTestTx(privs, accNums, accSeqs, suite.ctx.ChainID()) suite.Require().NoError(err) @@ -120,7 +118,7 @@ func (suite *AnteTestSuite) TestConsumeGasForTxSize() { suite.txBuilder.SetGasLimit(gasLimit) suite.txBuilder.SetMemo(strings.Repeat("01234567890", 10)) - privs, accNums, accSeqs := []crypto.PrivKey{priv1}, []uint64{0}, []uint64{0} + privs, accNums, accSeqs := []cryptotypes.PrivKey{priv1}, []uint64{0}, []uint64{0} tx, err := suite.CreateTestTx(privs, accNums, accSeqs, suite.ctx.ChainID()) suite.Require().NoError(err) @@ -214,7 +212,7 @@ func (suite *AnteTestSuite) TestTxHeightTimeoutDecorator() { suite.txBuilder.SetMemo(strings.Repeat("01234567890", 10)) suite.txBuilder.SetTimeoutHeight(tc.timeout) - privs, accNums, accSeqs := []crypto.PrivKey{priv1}, []uint64{0}, []uint64{0} + privs, accNums, accSeqs := []cryptotypes.PrivKey{priv1}, []uint64{0}, []uint64{0} tx, err := suite.CreateTestTx(privs, accNums, accSeqs, suite.ctx.ChainID()) suite.Require().NoError(err) diff --git a/x/auth/ante/fee_test.go b/x/auth/ante/fee_test.go index 4264baf399..84e5adb60d 100644 --- a/x/auth/ante/fee_test.go +++ b/x/auth/ante/fee_test.go @@ -1,10 +1,9 @@ package ante_test import ( + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/testutil/testdata" - "github.com/tendermint/tendermint/crypto" - sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/auth/ante" ) @@ -27,7 +26,7 @@ func (suite *AnteTestSuite) TestEnsureMempoolFees() { suite.txBuilder.SetFeeAmount(feeAmount) suite.txBuilder.SetGasLimit(gasLimit) - privs, accNums, accSeqs := []crypto.PrivKey{priv1}, []uint64{0}, []uint64{0} + privs, accNums, accSeqs := []cryptotypes.PrivKey{priv1}, []uint64{0}, []uint64{0} tx, err := suite.CreateTestTx(privs, accNums, accSeqs, suite.ctx.ChainID()) suite.Require().NoError(err) @@ -76,7 +75,7 @@ func (suite *AnteTestSuite) TestDeductFees() { suite.txBuilder.SetFeeAmount(feeAmount) suite.txBuilder.SetGasLimit(gasLimit) - privs, accNums, accSeqs := []crypto.PrivKey{priv1}, []uint64{0}, []uint64{0} + privs, accNums, accSeqs := []cryptotypes.PrivKey{priv1}, []uint64{0}, []uint64{0} tx, err := suite.CreateTestTx(privs, accNums, accSeqs, suite.ctx.ChainID()) suite.Require().NoError(err) diff --git a/x/auth/ante/setup_test.go b/x/auth/ante/setup_test.go index 8454ec26a1..4942665cac 100644 --- a/x/auth/ante/setup_test.go +++ b/x/auth/ante/setup_test.go @@ -1,10 +1,8 @@ package ante_test import ( + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/testutil/testdata" - - "github.com/tendermint/tendermint/crypto" - sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/x/auth/ante" @@ -25,7 +23,7 @@ func (suite *AnteTestSuite) TestSetup() { suite.txBuilder.SetFeeAmount(feeAmount) suite.txBuilder.SetGasLimit(gasLimit) - privs, accNums, accSeqs := []crypto.PrivKey{priv1}, []uint64{0}, []uint64{0} + privs, accNums, accSeqs := []cryptotypes.PrivKey{priv1}, []uint64{0}, []uint64{0} tx, err := suite.CreateTestTx(privs, accNums, accSeqs, suite.ctx.ChainID()) suite.Require().NoError(err) @@ -60,7 +58,7 @@ func (suite *AnteTestSuite) TestRecoverPanic() { suite.txBuilder.SetFeeAmount(feeAmount) suite.txBuilder.SetGasLimit(gasLimit) - privs, accNums, accSeqs := []crypto.PrivKey{priv1}, []uint64{0}, []uint64{0} + privs, accNums, accSeqs := []cryptotypes.PrivKey{priv1}, []uint64{0}, []uint64{0} tx, err := suite.CreateTestTx(privs, accNums, accSeqs, suite.ctx.ChainID()) suite.Require().NoError(err) diff --git a/x/auth/ante/sigverify.go b/x/auth/ante/sigverify.go index 80ea9317e1..79fbbcdc67 100644 --- a/x/auth/ante/sigverify.go +++ b/x/auth/ante/sigverify.go @@ -5,11 +5,10 @@ import ( "encoding/hex" "fmt" - "github.com/tendermint/tendermint/crypto" - "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" kmultisig "github.com/cosmos/cosmos-sdk/crypto/keys/multisig" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/crypto/types/multisig" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" @@ -424,7 +423,7 @@ func GetSignerAcc(ctx sdk.Context, ak AccountKeeper, addr sdk.AccAddress) (types } // CountSubKeys counts the total number of keys for a multi-sig public key. -func CountSubKeys(pub crypto.PubKey) int { +func CountSubKeys(pub cryptotypes.PubKey) int { v, ok := pub.(*kmultisig.LegacyAminoPubKey) if !ok { return 1 diff --git a/x/auth/ante/sigverify_test.go b/x/auth/ante/sigverify_test.go index 2eb235b2f1..337618fab5 100644 --- a/x/auth/ante/sigverify_test.go +++ b/x/auth/ante/sigverify_test.go @@ -3,13 +3,12 @@ package ante_test import ( "fmt" - "github.com/tendermint/tendermint/crypto" - "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" kmultisig "github.com/cosmos/cosmos-sdk/crypto/keys/multisig" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/crypto/types/multisig" "github.com/cosmos/cosmos-sdk/simapp" "github.com/cosmos/cosmos-sdk/testutil/testdata" @@ -30,7 +29,7 @@ func (suite *AnteTestSuite) TestSetPubKey() { priv3, pub3, addr3 := testdata.KeyTestPubAddr() addrs := []sdk.AccAddress{addr1, addr2, addr3} - pubs := []crypto.PubKey{pub1, pub2, pub3} + pubs := []cryptotypes.PubKey{pub1, pub2, pub3} msgs := make([]sdk.Msg, len(addrs)) // set accounts and create msg for each address @@ -47,7 +46,7 @@ func (suite *AnteTestSuite) TestSetPubKey() { suite.txBuilder.SetFeeAmount(feeAmount) suite.txBuilder.SetGasLimit(gasLimit) - privs, accNums, accSeqs := []crypto.PrivKey{priv1, priv2, priv3}, []uint64{0, 1, 2}, []uint64{0, 0, 0} + privs, accNums, accSeqs := []cryptotypes.PrivKey{priv1, priv2, priv3}, []uint64{0, 1, 2}, []uint64{0, 0, 0} tx, err := suite.CreateTestTx(privs, accNums, accSeqs, suite.ctx.ChainID()) suite.Require().NoError(err) @@ -85,7 +84,7 @@ func (suite *AnteTestSuite) TestConsumeSignatureVerificationGas() { type args struct { meter sdk.GasMeter sig signing.SignatureData - pubkey crypto.PubKey + pubkey cryptotypes.PubKey params types.Params } tests := []struct { @@ -148,20 +147,20 @@ func (suite *AnteTestSuite) TestSigVerification() { type testCase struct { name string - privs []crypto.PrivKey + privs []cryptotypes.PrivKey accNums []uint64 accSeqs []uint64 recheck bool shouldErr bool } testCases := []testCase{ - {"no signers", []crypto.PrivKey{}, []uint64{}, []uint64{}, false, true}, - {"not enough signers", []crypto.PrivKey{priv1, priv2}, []uint64{0, 1}, []uint64{0, 0}, false, true}, - {"wrong order signers", []crypto.PrivKey{priv3, priv2, priv1}, []uint64{2, 1, 0}, []uint64{0, 0, 0}, false, true}, - {"wrong accnums", []crypto.PrivKey{priv1, priv2, priv3}, []uint64{7, 8, 9}, []uint64{0, 0, 0}, false, true}, - {"wrong sequences", []crypto.PrivKey{priv1, priv2, priv3}, []uint64{0, 1, 2}, []uint64{3, 4, 5}, false, true}, - {"valid tx", []crypto.PrivKey{priv1, priv2, priv3}, []uint64{0, 1, 2}, []uint64{0, 0, 0}, false, false}, - {"no err on recheck", []crypto.PrivKey{}, []uint64{}, []uint64{}, true, false}, + {"no signers", []cryptotypes.PrivKey{}, []uint64{}, []uint64{}, false, true}, + {"not enough signers", []cryptotypes.PrivKey{priv1, priv2}, []uint64{0, 1}, []uint64{0, 0}, false, true}, + {"wrong order signers", []cryptotypes.PrivKey{priv3, priv2, priv1}, []uint64{2, 1, 0}, []uint64{0, 0, 0}, false, true}, + {"wrong accnums", []cryptotypes.PrivKey{priv1, priv2, priv3}, []uint64{7, 8, 9}, []uint64{0, 0, 0}, false, true}, + {"wrong sequences", []cryptotypes.PrivKey{priv1, priv2, priv3}, []uint64{0, 1, 2}, []uint64{3, 4, 5}, false, true}, + {"valid tx", []cryptotypes.PrivKey{priv1, priv2, priv3}, []uint64{0, 1, 2}, []uint64{0, 0, 0}, false, false}, + {"no err on recheck", []cryptotypes.PrivKey{}, []uint64{}, []uint64{}, true, false}, } for i, tc := range testCases { suite.ctx = suite.ctx.WithIsReCheckTx(tc.recheck) @@ -233,20 +232,20 @@ func (suite *AnteTestSuite) TestSigVerification_ExplicitAmino() { type testCase struct { name string - privs []crypto.PrivKey + privs []cryptotypes.PrivKey accNums []uint64 accSeqs []uint64 recheck bool shouldErr bool } testCases := []testCase{ - {"no signers", []crypto.PrivKey{}, []uint64{}, []uint64{}, false, true}, - {"not enough signers", []crypto.PrivKey{priv1, priv2}, []uint64{0, 1}, []uint64{0, 0}, false, true}, - {"wrong order signers", []crypto.PrivKey{priv3, priv2, priv1}, []uint64{2, 1, 0}, []uint64{0, 0, 0}, false, true}, - {"wrong accnums", []crypto.PrivKey{priv1, priv2, priv3}, []uint64{7, 8, 9}, []uint64{0, 0, 0}, false, true}, - {"wrong sequences", []crypto.PrivKey{priv1, priv2, priv3}, []uint64{0, 1, 2}, []uint64{3, 4, 5}, false, true}, - {"valid tx", []crypto.PrivKey{priv1, priv2, priv3}, []uint64{0, 1, 2}, []uint64{0, 0, 0}, false, false}, - {"no err on recheck", []crypto.PrivKey{}, []uint64{}, []uint64{}, true, false}, + {"no signers", []cryptotypes.PrivKey{}, []uint64{}, []uint64{}, false, true}, + {"not enough signers", []cryptotypes.PrivKey{priv1, priv2}, []uint64{0, 1}, []uint64{0, 0}, false, true}, + {"wrong order signers", []cryptotypes.PrivKey{priv3, priv2, priv1}, []uint64{2, 1, 0}, []uint64{0, 0, 0}, false, true}, + {"wrong accnums", []cryptotypes.PrivKey{priv1, priv2, priv3}, []uint64{7, 8, 9}, []uint64{0, 0, 0}, false, true}, + {"wrong sequences", []cryptotypes.PrivKey{priv1, priv2, priv3}, []uint64{0, 1, 2}, []uint64{3, 4, 5}, false, true}, + {"valid tx", []cryptotypes.PrivKey{priv1, priv2, priv3}, []uint64{0, 1, 2}, []uint64{0, 0, 0}, false, false}, + {"no err on recheck", []cryptotypes.PrivKey{}, []uint64{}, []uint64{}, true, false}, } for i, tc := range testCases { suite.ctx = suite.ctx.WithIsReCheckTx(tc.recheck) @@ -270,7 +269,7 @@ func (suite *AnteTestSuite) TestSigVerification_ExplicitAmino() { func (suite *AnteTestSuite) TestSigIntegration() { // generate private keys - privs := []crypto.PrivKey{ + privs := []cryptotypes.PrivKey{ secp256k1.GenPrivKey(), secp256k1.GenPrivKey(), secp256k1.GenPrivKey(), @@ -288,7 +287,7 @@ func (suite *AnteTestSuite) TestSigIntegration() { suite.Require().Equal(initialSigCost*uint64(len(privs)), doubleCost-initialCost) } -func (suite *AnteTestSuite) runSigDecorators(params types.Params, _ bool, privs ...crypto.PrivKey) (sdk.Gas, error) { +func (suite *AnteTestSuite) runSigDecorators(params types.Params, _ bool, privs ...cryptotypes.PrivKey) (sdk.Gas, error) { suite.SetupTest(true) // setup suite.txBuilder = suite.clientCtx.TxConfig.NewTxBuilder() @@ -343,7 +342,7 @@ func (suite *AnteTestSuite) TestIncrementSequenceDecorator() { msgs := []sdk.Msg{testdata.NewTestMsg(addr)} suite.Require().NoError(suite.txBuilder.SetMsgs(msgs...)) - privs := []crypto.PrivKey{priv} + privs := []cryptotypes.PrivKey{priv} accNums := []uint64{suite.app.AccountKeeper.GetAccount(suite.ctx, addr).GetAccountNumber()} accSeqs := []uint64{suite.app.AccountKeeper.GetAccount(suite.ctx, addr).GetSequence()} feeAmount := testdata.NewTestFeeAmount() diff --git a/x/auth/ante/testutil_test.go b/x/auth/ante/testutil_test.go index 9d8924eea7..5a1cfc4ec4 100644 --- a/x/auth/ante/testutil_test.go +++ b/x/auth/ante/testutil_test.go @@ -6,11 +6,11 @@ import ( "testing" "github.com/stretchr/testify/suite" - "github.com/tendermint/tendermint/crypto" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/tx" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/simapp" "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" @@ -24,7 +24,7 @@ import ( // TestAccount represents an account used in the tests in x/auth/ante. type TestAccount struct { acc types.AccountI - priv crypto.PrivKey + priv cryptotypes.PrivKey } // AnteTestSuite is a test suite to be used with ante handler tests. @@ -86,7 +86,7 @@ func (suite *AnteTestSuite) CreateTestAccounts(numAccs int) []TestAccount { } // CreateTestTx is a helper function to create a tx given multiple inputs. -func (suite *AnteTestSuite) CreateTestTx(privs []crypto.PrivKey, accNums []uint64, accSeqs []uint64, chainID string) (xauthsigning.Tx, error) { +func (suite *AnteTestSuite) CreateTestTx(privs []cryptotypes.PrivKey, accNums []uint64, accSeqs []uint64, chainID string) (xauthsigning.Tx, error) { // First round: we gather all the signer infos. We use the "set empty // signature" hack to do that. var sigsV2 []signing.SignatureV2 @@ -142,7 +142,7 @@ type TestCase struct { } // CreateTestTx is a helper function to create a tx given multiple inputs. -func (suite *AnteTestSuite) RunTestCase(privs []crypto.PrivKey, msgs []sdk.Msg, feeAmount sdk.Coins, gasLimit uint64, accNums, accSeqs []uint64, chainID string, tc TestCase) { +func (suite *AnteTestSuite) RunTestCase(privs []cryptotypes.PrivKey, msgs []sdk.Msg, feeAmount sdk.Coins, gasLimit uint64, accNums, accSeqs []uint64, chainID string, tc TestCase) { suite.Run(fmt.Sprintf("Case %s", tc.desc), func() { suite.Require().NoError(suite.txBuilder.SetMsgs(msgs...)) suite.txBuilder.SetFeeAmount(feeAmount) diff --git a/x/auth/client/cli/cli_test.go b/x/auth/client/cli/cli_test.go index 4961e91c37..4ba383139c 100644 --- a/x/auth/client/cli/cli_test.go +++ b/x/auth/client/cli/cli_test.go @@ -1,5 +1,3 @@ -// +build norace - package cli_test import ( @@ -12,7 +10,6 @@ import ( "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" - tmcrypto "github.com/tendermint/tendermint/crypto" tmcli "github.com/tendermint/tendermint/libs/cli" "github.com/cosmos/cosmos-sdk/client" @@ -22,6 +19,7 @@ import ( "github.com/cosmos/cosmos-sdk/crypto/hd" "github.com/cosmos/cosmos-sdk/crypto/keyring" kmultisig "github.com/cosmos/cosmos-sdk/crypto/keys/multisig" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/simapp" "github.com/cosmos/cosmos-sdk/testutil" clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" @@ -63,7 +61,7 @@ func (s *IntegrationTestSuite) SetupSuite() { account2, _, err := kb.NewMnemonic("newAccount2", keyring.English, sdk.FullFundraiserPath, hd.Secp256k1) s.Require().NoError(err) - multi := kmultisig.NewLegacyAminoPubKey(2, []tmcrypto.PubKey{account1.GetPubKey(), account2.GetPubKey()}) + multi := kmultisig.NewLegacyAminoPubKey(2, []cryptotypes.PubKey{account1.GetPubKey(), account2.GetPubKey()}) _, err = kb.SaveMultisig("multi", multi) s.Require().NoError(err) diff --git a/x/auth/keeper/keeper.go b/x/auth/keeper/keeper.go index 86189b62a2..75724f7d3c 100644 --- a/x/auth/keeper/keeper.go +++ b/x/auth/keeper/keeper.go @@ -4,10 +4,10 @@ import ( "fmt" gogotypes "github.com/gogo/protobuf/types" - "github.com/tendermint/tendermint/crypto" "github.com/tendermint/tendermint/libs/log" "github.com/cosmos/cosmos-sdk/codec" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/x/auth/types" @@ -35,7 +35,7 @@ type AccountKeeperI interface { IterateAccounts(sdk.Context, func(types.AccountI) bool) // Fetch the public key of an account at a specified address - GetPubKey(sdk.Context, sdk.AccAddress) (crypto.PubKey, error) + GetPubKey(sdk.Context, sdk.AccAddress) (cryptotypes.PubKey, error) // Fetch the sequence of an account at a specified address. GetSequence(sdk.Context, sdk.AccAddress) (uint64, error) @@ -90,7 +90,7 @@ func (ak AccountKeeper) Logger(ctx sdk.Context) log.Logger { } // GetPubKey Returns the PubKey of the account at address -func (ak AccountKeeper) GetPubKey(ctx sdk.Context, addr sdk.AccAddress) (crypto.PubKey, error) { +func (ak AccountKeeper) GetPubKey(ctx sdk.Context, addr sdk.AccAddress) (cryptotypes.PubKey, error) { acc := ak.GetAccount(ctx, addr) if acc == nil { return nil, sdkerrors.Wrapf(sdkerrors.ErrUnknownAddress, "account %s does not exist", addr) diff --git a/x/auth/legacy/legacytx/stdsign.go b/x/auth/legacy/legacytx/stdsign.go index 49792d3a21..2ba194dad8 100644 --- a/x/auth/legacy/legacytx/stdsign.go +++ b/x/auth/legacy/legacytx/stdsign.go @@ -3,11 +3,10 @@ package legacytx import ( "encoding/json" - "github.com/tendermint/tendermint/crypto" - "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/codec/legacy" codectypes "github.com/cosmos/cosmos-sdk/codec/types" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/crypto/types/multisig" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" @@ -57,8 +56,8 @@ func StdSignBytes(chainID string, accnum, sequence, timeout uint64, fee StdFee, // Deprecated: StdSignature represents a sig type StdSignature struct { - crypto.PubKey `json:"pub_key" yaml:"pub_key"` // optional - Signature []byte `json:"signature" yaml:"signature"` + cryptotypes.PubKey `json:"pub_key" yaml:"pub_key"` // optional + Signature []byte `json:"signature" yaml:"signature"` } // StdSignatureToSignatureV2 converts a StdSignature to a SignatureV2 @@ -75,7 +74,7 @@ func StdSignatureToSignatureV2(cdc *codec.LegacyAmino, sig StdSignature) (signin }, nil } -func pubKeySigToSigData(cdc *codec.LegacyAmino, key crypto.PubKey, sig []byte) (signing.SignatureData, error) { +func pubKeySigToSigData(cdc *codec.LegacyAmino, key cryptotypes.PubKey, sig []byte) (signing.SignatureData, error) { multiPK, ok := key.(multisig.PubKey) if !ok { return &signing.SingleSignatureData{ diff --git a/x/auth/legacy/legacytx/stdtx.go b/x/auth/legacy/legacytx/stdtx.go index 270a8d727a..ba3215010e 100644 --- a/x/auth/legacy/legacytx/stdtx.go +++ b/x/auth/legacy/legacytx/stdtx.go @@ -3,11 +3,11 @@ package legacytx import ( "fmt" - "github.com/tendermint/tendermint/crypto" "gopkg.in/yaml.v2" "github.com/cosmos/cosmos-sdk/codec/legacy" codectypes "github.com/cosmos/cosmos-sdk/codec/types" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" txtypes "github.com/cosmos/cosmos-sdk/types/tx" @@ -73,7 +73,7 @@ func (fee StdFee) GasPrices() sdk.DecCoins { } // Deprecated -func NewStdSignature(pk crypto.PubKey, sig []byte) StdSignature { +func NewStdSignature(pk cryptotypes.PubKey, sig []byte) StdSignature { return StdSignature{PubKey: pk, Signature: sig} } @@ -82,9 +82,9 @@ func (ss StdSignature) GetSignature() []byte { return ss.Signature } -// GetPubKey returns the public key of a signature as a crypto.PubKey using the +// GetPubKey returns the public key of a signature as a cryptotypes.PubKey using the // Amino codec. -func (ss StdSignature) GetPubKey() crypto.PubKey { +func (ss StdSignature) GetPubKey() cryptotypes.PubKey { return ss.PubKey } @@ -238,8 +238,8 @@ func (tx StdTx) GetSignaturesV2() ([]signing.SignatureV2, error) { // GetPubkeys returns the pubkeys of signers if the pubkey is included in the signature // If pubkey is not included in the signature, then nil is in the slice instead -func (tx StdTx) GetPubKeys() []crypto.PubKey { - pks := make([]crypto.PubKey, len(tx.Signatures)) +func (tx StdTx) GetPubKeys() []cryptotypes.PubKey { + pks := make([]cryptotypes.PubKey, len(tx.Signatures)) for i, stdSig := range tx.Signatures { pks[i] = stdSig.GetPubKey() diff --git a/x/auth/legacy/legacytx/stdtx_test.go b/x/auth/legacy/legacytx/stdtx_test.go index 96460f5382..a702a82841 100644 --- a/x/auth/legacy/legacytx/stdtx_test.go +++ b/x/auth/legacy/legacytx/stdtx_test.go @@ -5,7 +5,6 @@ import ( "testing" "github.com/stretchr/testify/require" - "github.com/tendermint/tendermint/crypto" "github.com/tendermint/tendermint/libs/log" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" yaml "gopkg.in/yaml.v2" @@ -15,6 +14,7 @@ import ( "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" kmultisig "github.com/cosmos/cosmos-sdk/crypto/keys/multisig" "github.com/cosmos/cosmos-sdk/crypto/types" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" @@ -39,7 +39,7 @@ func NewTestStdFee() StdFee { } // Deprecated, use TxBuilder. -func NewTestTx(ctx sdk.Context, msgs []sdk.Msg, privs []crypto.PrivKey, accNums []uint64, seqs []uint64, timeout uint64, fee StdFee) sdk.Tx { +func NewTestTx(ctx sdk.Context, msgs []sdk.Msg, privs []cryptotypes.PrivKey, accNums []uint64, seqs []uint64, timeout uint64, fee StdFee) sdk.Tx { sigs := make([]StdSignature, len(privs)) for i, priv := range privs { signBytes := StdSignBytes(ctx.ChainID(), accNums[i], seqs[i], timeout, fee, msgs, "") @@ -126,7 +126,7 @@ func TestTxValidateBasic(t *testing.T) { require.Equal(t, sdkerrors.ErrInsufficientFee.ABCICode(), code) // require to fail validation when no signatures exist - privs, accNums, seqs := []crypto.PrivKey{}, []uint64{}, []uint64{} + privs, accNums, seqs := []cryptotypes.PrivKey{}, []uint64{}, []uint64{} tx = NewTestTx(ctx, msgs, privs, accNums, seqs, 0, fee) err = tx.ValidateBasic() @@ -135,7 +135,7 @@ func TestTxValidateBasic(t *testing.T) { require.Equal(t, sdkerrors.ErrNoSignatures.ABCICode(), code) // require to fail validation when signatures do not match expected signers - privs, accNums, seqs = []crypto.PrivKey{priv1}, []uint64{0, 1}, []uint64{0, 0} + privs, accNums, seqs = []cryptotypes.PrivKey{priv1}, []uint64{0, 1}, []uint64{0, 0} tx = NewTestTx(ctx, msgs, privs, accNums, seqs, 0, fee) err = tx.ValidateBasic() @@ -154,7 +154,7 @@ func TestTxValidateBasic(t *testing.T) { require.Equal(t, sdkerrors.ErrInvalidRequest.ABCICode(), code) // require to pass when above criteria are matched - privs, accNums, seqs = []crypto.PrivKey{priv1, priv2}, []uint64{0, 1}, []uint64{0, 0} + privs, accNums, seqs = []cryptotypes.PrivKey{priv1, priv2}, []uint64{0, 1}, []uint64{0, 0} tx = NewTestTx(ctx, msgs, privs, accNums, seqs, 0, fee) err = tx.ValidateBasic() @@ -231,7 +231,7 @@ func TestSignatureV2Conversions(t *testing.T) { // multisigs _, pubKey2, _ := testdata.KeyTestPubAddr() - multiPK := kmultisig.NewLegacyAminoPubKey(1, []crypto.PubKey{ + multiPK := kmultisig.NewLegacyAminoPubKey(1, []cryptotypes.PubKey{ pubKey, pubKey2, }) dummy2 := []byte("dummySig2") diff --git a/x/auth/legacy/v038/types.go b/x/auth/legacy/v038/types.go index aeb554eeea..e9977c1d29 100644 --- a/x/auth/legacy/v038/types.go +++ b/x/auth/legacy/v038/types.go @@ -11,9 +11,11 @@ import ( "sort" "strings" - "github.com/tendermint/tendermint/crypto" + tmcrypto "github.com/tendermint/tendermint/crypto" "github.com/cosmos/cosmos-sdk/codec" + cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" v034auth "github.com/cosmos/cosmos-sdk/x/auth/legacy/v034" ) @@ -45,11 +47,11 @@ type ( } BaseAccount struct { - Address sdk.AccAddress `json:"address" yaml:"address"` - Coins sdk.Coins `json:"coins,omitempty" yaml:"coins,omitempty"` - PubKey crypto.PubKey `json:"public_key" yaml:"public_key"` - AccountNumber uint64 `json:"account_number" yaml:"account_number"` - Sequence uint64 `json:"sequence" yaml:"sequence"` + Address sdk.AccAddress `json:"address" yaml:"address"` + Coins sdk.Coins `json:"coins,omitempty" yaml:"coins,omitempty"` + PubKey cryptotypes.PubKey `json:"public_key" yaml:"public_key"` + AccountNumber uint64 `json:"account_number" yaml:"account_number"` + Sequence uint64 `json:"sequence" yaml:"sequence"` } baseAccountPretty struct { @@ -127,7 +129,7 @@ func NewBaseAccountWithAddress(addr sdk.AccAddress) BaseAccount { } func NewBaseAccount( - address sdk.AccAddress, coins sdk.Coins, pk crypto.PubKey, accountNumber, sequence uint64, + address sdk.AccAddress, coins sdk.Coins, pk cryptotypes.PubKey, accountNumber, sequence uint64, ) *BaseAccount { return &BaseAccount{ @@ -259,7 +261,7 @@ func (bva *BaseVestingAccount) UnmarshalJSON(bz []byte) error { } var ( - pk crypto.PubKey + pk cryptotypes.PubKey err error ) @@ -328,7 +330,7 @@ func (cva *ContinuousVestingAccount) UnmarshalJSON(bz []byte) error { } var ( - pk crypto.PubKey + pk cryptotypes.PubKey err error ) @@ -394,7 +396,7 @@ func (dva *DelayedVestingAccount) UnmarshalJSON(bz []byte) error { } var ( - pk crypto.PubKey + pk cryptotypes.PubKey err error ) @@ -417,7 +419,7 @@ func (dva *DelayedVestingAccount) UnmarshalJSON(bz []byte) error { } func NewModuleAddress(name string) sdk.AccAddress { - return sdk.AccAddress(crypto.AddressHash([]byte(name))) + return sdk.AccAddress(tmcrypto.AddressHash([]byte(name))) } func NewModuleAccount(baseAccount *BaseAccount, name string, permissions ...string) *ModuleAccount { @@ -437,7 +439,7 @@ func (ma ModuleAccount) Validate() error { return errors.New("module account name cannot be blank") } - if !ma.Address.Equals(sdk.AccAddress(crypto.AddressHash([]byte(ma.Name)))) { + if !ma.Address.Equals(sdk.AccAddress(tmcrypto.AddressHash([]byte(ma.Name)))) { return fmt.Errorf("address %s cannot be derived from the module name '%s'", ma.Address, ma.Name) } @@ -517,6 +519,7 @@ func ValidateGenAccounts(genAccounts GenesisAccounts) error { } func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { + cryptocodec.RegisterCrypto(cdc) cdc.RegisterInterface((*GenesisAccount)(nil), nil) cdc.RegisterInterface((*Account)(nil), nil) cdc.RegisterConcrete(&BaseAccount{}, "cosmos-sdk/Account", nil) diff --git a/x/auth/legacy/v039/migrate_test.go b/x/auth/legacy/v039/migrate_test.go new file mode 100644 index 0000000000..6972789c00 --- /dev/null +++ b/x/auth/legacy/v039/migrate_test.go @@ -0,0 +1,104 @@ +package v039_test + +import ( + "testing" + + "github.com/stretchr/testify/require" + + "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" + "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" + sdk "github.com/cosmos/cosmos-sdk/types" + v038auth "github.com/cosmos/cosmos-sdk/x/auth/legacy/v038" + v039auth "github.com/cosmos/cosmos-sdk/x/auth/legacy/v039" +) + +func TestMigrate(t *testing.T) { + aminoCdc := codec.NewLegacyAmino() + v039auth.RegisterLegacyAminoCodec(aminoCdc) + + pub1 := ed25519.GenPrivKeyFromSecret([]byte("acc1")).PubKey() + pub2 := secp256k1.GenPrivKeyFromSecret([]byte("acc2")).PubKey() + + acc1 := v038auth.BaseAccount{ + Address: sdk.AccAddress(pub1.Address()), + Coins: sdk.NewCoins(sdk.NewInt64Coin("stake", 400000)), + Sequence: 1, + AccountNumber: 1, + PubKey: pub1, + } + acc2 := v038auth.BaseAccount{ + Address: sdk.AccAddress(pub2.Address()), + Coins: sdk.NewCoins(sdk.NewInt64Coin("stake", 400000)), + Sequence: 2, + AccountNumber: 2, + PubKey: pub2, + } + + migrated := v039auth.Migrate( + v038auth.GenesisState{ + Accounts: v038auth.GenesisAccounts{&acc1, &acc2}, + }, + ) + + expectedAcc1 := v039auth.NewBaseAccount(acc1.Address, acc1.Coins, acc1.PubKey, acc1.AccountNumber, acc1.Sequence) + expectedAcc2 := v039auth.NewBaseAccount(acc2.Address, acc2.Coins, acc2.PubKey, acc2.AccountNumber, acc2.Sequence) + + require.Equal( + t, migrated, v039auth.GenesisState{ + Accounts: v038auth.GenesisAccounts{expectedAcc1, expectedAcc2}, + }, + ) + + json, err := aminoCdc.MarshalJSONIndent(migrated, "", " ") + require.NoError(t, err) + + expectedJSON := `{ + "params": { + "max_memo_characters": "0", + "tx_sig_limit": "0", + "tx_size_cost_per_byte": "0", + "sig_verify_cost_ed25519": "0", + "sig_verify_cost_secp256k1": "0" + }, + "accounts": [ + { + "type": "cosmos-sdk/Account", + "value": { + "address": "cosmos1j7skdhh9raxdmfhmcy2gxz8hgn0jnhfmujjsfe", + "coins": [ + { + "denom": "stake", + "amount": "400000" + } + ], + "public_key": { + "type": "tendermint/PubKeyEd25519", + "value": "eB0AcLMLKFRNFfh4XAAMstexfAIUQQCDnfjLZ2KJg+A=" + }, + "account_number": "1", + "sequence": "1" + } + }, + { + "type": "cosmos-sdk/Account", + "value": { + "address": "cosmos1v57fx2l2rt6ehujuu99u2fw05779m5e2ux4z2h", + "coins": [ + { + "denom": "stake", + "amount": "400000" + } + ], + "public_key": { + "type": "tendermint/PubKeySecp256k1", + "value": "AruDygh5HprMOpHOEato85dLgAsybMJVyxBGUa3KuWCr" + }, + "account_number": "2", + "sequence": "2" + } + } + ] +}` + require.Equal(t, expectedJSON, string(json)) +} diff --git a/x/auth/legacy/v039/types.go b/x/auth/legacy/v039/types.go index a75bc74a69..55c3014eb7 100644 --- a/x/auth/legacy/v039/types.go +++ b/x/auth/legacy/v039/types.go @@ -9,10 +9,12 @@ import ( "fmt" "strings" - "github.com/tendermint/tendermint/crypto" + tmcrypto "github.com/tendermint/tendermint/crypto" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/codec/legacy" + cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" v034auth "github.com/cosmos/cosmos-sdk/x/auth/legacy/v034" v038auth "github.com/cosmos/cosmos-sdk/x/auth/legacy/v038" @@ -29,11 +31,11 @@ type ( } BaseAccount struct { - Address sdk.AccAddress `json:"address" yaml:"address"` - Coins sdk.Coins `json:"coins,omitempty" yaml:"coins,omitempty"` - PubKey crypto.PubKey `json:"public_key" yaml:"public_key"` - AccountNumber uint64 `json:"account_number" yaml:"account_number"` - Sequence uint64 `json:"sequence" yaml:"sequence"` + Address sdk.AccAddress `json:"address" yaml:"address"` + Coins sdk.Coins `json:"coins,omitempty" yaml:"coins,omitempty"` + PubKey cryptotypes.PubKey `json:"public_key" yaml:"public_key"` + AccountNumber uint64 `json:"account_number" yaml:"account_number"` + Sequence uint64 `json:"sequence" yaml:"sequence"` } BaseVestingAccount struct { @@ -47,15 +49,15 @@ type ( } vestingAccountJSON struct { - Address sdk.AccAddress `json:"address" yaml:"address"` - Coins sdk.Coins `json:"coins,omitempty" yaml:"coins"` - PubKey crypto.PubKey `json:"public_key" yaml:"public_key"` - AccountNumber uint64 `json:"account_number" yaml:"account_number"` - Sequence uint64 `json:"sequence" yaml:"sequence"` - OriginalVesting sdk.Coins `json:"original_vesting" yaml:"original_vesting"` - DelegatedFree sdk.Coins `json:"delegated_free" yaml:"delegated_free"` - DelegatedVesting sdk.Coins `json:"delegated_vesting" yaml:"delegated_vesting"` - EndTime int64 `json:"end_time" yaml:"end_time"` + Address sdk.AccAddress `json:"address" yaml:"address"` + Coins sdk.Coins `json:"coins,omitempty" yaml:"coins"` + PubKey cryptotypes.PubKey `json:"public_key" yaml:"public_key"` + AccountNumber uint64 `json:"account_number" yaml:"account_number"` + Sequence uint64 `json:"sequence" yaml:"sequence"` + OriginalVesting sdk.Coins `json:"original_vesting" yaml:"original_vesting"` + DelegatedFree sdk.Coins `json:"delegated_free" yaml:"delegated_free"` + DelegatedVesting sdk.Coins `json:"delegated_vesting" yaml:"delegated_vesting"` + EndTime int64 `json:"end_time" yaml:"end_time"` // custom fields based on concrete vesting type which can be omitted StartTime int64 `json:"start_time,omitempty" yaml:"start_time,omitempty"` @@ -117,7 +119,7 @@ func NewBaseAccountWithAddress(addr sdk.AccAddress) BaseAccount { } func NewBaseAccount( - address sdk.AccAddress, coins sdk.Coins, pk crypto.PubKey, accountNumber, sequence uint64, + address sdk.AccAddress, coins sdk.Coins, pk cryptotypes.PubKey, accountNumber, sequence uint64, ) *BaseAccount { return &BaseAccount{ @@ -380,7 +382,7 @@ func (ma ModuleAccount) Validate() error { return errors.New("module account name cannot be blank") } - if x := sdk.AccAddress(crypto.AddressHash([]byte(ma.Name))); !ma.Address.Equals(x) { + if x := sdk.AccAddress(tmcrypto.AddressHash([]byte(ma.Name))); !ma.Address.Equals(x) { return fmt.Errorf("address %s cannot be derived from the module name '%s'; expected: %s", ma.Address, ma.Name, x) } @@ -415,6 +417,7 @@ func (ma *ModuleAccount) UnmarshalJSON(bz []byte) error { } func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { + cryptocodec.RegisterCrypto(cdc) cdc.RegisterInterface((*v038auth.GenesisAccount)(nil), nil) cdc.RegisterInterface((*v038auth.Account)(nil), nil) cdc.RegisterConcrete(&BaseAccount{}, "cosmos-sdk/Account", nil) diff --git a/x/auth/signing/sig_verifiable_tx.go b/x/auth/signing/sig_verifiable_tx.go index 6621d3fcb0..8381ad491a 100644 --- a/x/auth/signing/sig_verifiable_tx.go +++ b/x/auth/signing/sig_verifiable_tx.go @@ -1,8 +1,7 @@ package signing import ( - "github.com/tendermint/tendermint/crypto" - + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/tx/signing" ) @@ -12,7 +11,7 @@ import ( type SigVerifiableTx interface { types.Tx GetSigners() []types.AccAddress - GetPubKeys() []crypto.PubKey // If signer already has pubkey in context, this list will have nil in its place + GetPubKeys() []cryptotypes.PubKey // If signer already has pubkey in context, this list will have nil in its place GetSignaturesV2() ([]signing.SignatureV2, error) } diff --git a/x/auth/signing/verify.go b/x/auth/signing/verify.go index 0e66f026fa..5a5395de69 100644 --- a/x/auth/signing/verify.go +++ b/x/auth/signing/verify.go @@ -3,8 +3,7 @@ package signing import ( "fmt" - "github.com/tendermint/tendermint/crypto" - + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/crypto/types/multisig" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/tx/signing" @@ -12,7 +11,7 @@ import ( // VerifySignature verifies a transaction signature contained in SignatureData abstracting over different signing modes // and single vs multi-signatures. -func VerifySignature(pubKey crypto.PubKey, signerData SignerData, sigData signing.SignatureData, handler SignModeHandler, tx sdk.Tx) error { +func VerifySignature(pubKey cryptotypes.PubKey, signerData SignerData, sigData signing.SignatureData, handler SignModeHandler, tx sdk.Tx) error { switch data := sigData.(type) { case *signing.SingleSignatureData: signBytes, err := handler.GetSignBytes(data.SignMode, signerData, tx) diff --git a/x/auth/signing/verify_test.go b/x/auth/signing/verify_test.go index f0929c76cc..7e842d1353 100644 --- a/x/auth/signing/verify_test.go +++ b/x/auth/signing/verify_test.go @@ -4,11 +4,11 @@ import ( "testing" "github.com/stretchr/testify/require" - "github.com/tendermint/tendermint/crypto" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" "github.com/cosmos/cosmos-sdk/codec" kmultisig "github.com/cosmos/cosmos-sdk/crypto/keys/multisig" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/crypto/types/multisig" "github.com/cosmos/cosmos-sdk/simapp" "github.com/cosmos/cosmos-sdk/testutil/testdata" @@ -65,7 +65,7 @@ func TestVerifySignature(t *testing.T) { err = signing.VerifySignature(pubKey, signerData, sigV2.Data, handler, stdTx) require.NoError(t, err) - pkSet := []crypto.PubKey{pubKey, pubKey1} + pkSet := []cryptotypes.PubKey{pubKey, pubKey1} multisigKey := kmultisig.NewLegacyAminoPubKey(2, pkSet) multisignature := multisig.NewMultisig(2) msgs = []sdk.Msg{testdata.NewTestMsg(addr, addr1)} diff --git a/x/auth/testutil/suite.go b/x/auth/testutil/suite.go index 518e502de1..f8002e68e4 100644 --- a/x/auth/testutil/suite.go +++ b/x/auth/testutil/suite.go @@ -4,10 +4,10 @@ import ( "bytes" "github.com/stretchr/testify/suite" - "github.com/tendermint/tendermint/crypto" "github.com/cosmos/cosmos-sdk/client" kmultisig "github.com/cosmos/cosmos-sdk/crypto/keys/multisig" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/crypto/types/multisig" "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" @@ -81,7 +81,7 @@ func (s *TxConfigTestSuite) TestTxBuilderSetMsgs() { func (s *TxConfigTestSuite) TestTxBuilderSetSignatures() { privKey, pubkey, addr := testdata.KeyTestPubAddr() privKey2, pubkey2, _ := testdata.KeyTestPubAddr() - multisigPk := kmultisig.NewLegacyAminoPubKey(2, []crypto.PubKey{pubkey, pubkey2}) + multisigPk := kmultisig.NewLegacyAminoPubKey(2, []cryptotypes.PubKey{pubkey, pubkey2}) txBuilder := s.TxConfig.NewTxBuilder() @@ -268,7 +268,7 @@ func (s *TxConfigTestSuite) TestTxEncodeDecode() { tx3Sigs, err := tx3.GetSignaturesV2() s.Require().NoError(err) s.Require().Equal([]signingtypes.SignatureV2{sig}, tx3Sigs) - s.Require().Equal([]crypto.PubKey{pubkey}, tx3.GetPubKeys()) + s.Require().Equal([]cryptotypes.PubKey{pubkey}, tx3.GetPubKeys()) log("JSON encode transaction") jsonTxBytes, err := s.TxConfig.TxJSONEncoder()(tx) @@ -287,7 +287,7 @@ func (s *TxConfigTestSuite) TestTxEncodeDecode() { tx3Sigs, err = tx3.GetSignaturesV2() s.Require().NoError(err) s.Require().Equal([]signingtypes.SignatureV2{sig}, tx3Sigs) - s.Require().Equal([]crypto.PubKey{pubkey}, tx3.GetPubKeys()) + s.Require().Equal([]cryptotypes.PubKey{pubkey}, tx3.GetPubKeys()) } func (s *TxConfigTestSuite) TestWrapTxBuilder() { diff --git a/x/auth/tx/builder.go b/x/auth/tx/builder.go index b3697e70b2..4c76d529a9 100644 --- a/x/auth/tx/builder.go +++ b/x/auth/tx/builder.go @@ -1,15 +1,12 @@ package tx import ( - "fmt" - "github.com/gogo/protobuf/proto" - "github.com/tendermint/tendermint/crypto" "github.com/cosmos/cosmos-sdk/client" codectypes "github.com/cosmos/cosmos-sdk/codec/types" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/types/tx" "github.com/cosmos/cosmos-sdk/types/tx/signing" "github.com/cosmos/cosmos-sdk/x/auth/ante" @@ -103,9 +100,9 @@ func (w *wrapper) GetSigners() []sdk.AccAddress { return w.tx.GetSigners() } -func (w *wrapper) GetPubKeys() []crypto.PubKey { +func (w *wrapper) GetPubKeys() []cryptotypes.PubKey { signerInfos := w.tx.AuthInfo.SignerInfos - pks := make([]crypto.PubKey, len(signerInfos)) + pks := make([]cryptotypes.PubKey, len(signerInfos)) for i, si := range signerInfos { // NOTE: it is okay to leave this nil if there is no PubKey in the SignerInfo. @@ -114,7 +111,7 @@ func (w *wrapper) GetPubKeys() []crypto.PubKey { continue } - pk, ok := si.PublicKey.GetCachedValue().(crypto.PubKey) + pk, ok := si.PublicKey.GetCachedValue().(cryptotypes.PubKey) if ok { pks[i] = pk } @@ -366,11 +363,7 @@ func (w *wrapper) SetNonCriticalExtensionOptions(extOpts ...*codectypes.Any) { w.bodyBz = nil } -// PubKeyToAny converts a crypto.PubKey to a proto Any. -func PubKeyToAny(key crypto.PubKey) (*codectypes.Any, error) { - protoMsg, ok := key.(proto.Message) - if !ok { - return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidPubKey, fmt.Sprintf("can't proto encode %T", protoMsg)) - } - return codectypes.NewAnyWithValue(protoMsg) +// PubKeyToAny converts a cryptotypes.PubKey to a proto Any. +func PubKeyToAny(key cryptotypes.PubKey) (*codectypes.Any, error) { + return codectypes.NewAnyWithValue(key) } diff --git a/x/auth/tx/sigs.go b/x/auth/tx/sigs.go index d0e43ede75..b40935b4b8 100644 --- a/x/auth/tx/sigs.go +++ b/x/auth/tx/sigs.go @@ -3,10 +3,8 @@ package tx import ( "fmt" - "github.com/tendermint/tendermint/crypto" - "github.com/cosmos/cosmos-sdk/codec" - "github.com/cosmos/cosmos-sdk/crypto/types" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/types/tx" "github.com/cosmos/cosmos-sdk/types/tx/signing" ) @@ -33,7 +31,7 @@ func SignatureDataToModeInfoAndSig(data signing.SignatureData) (*tx.ModeInfo, [] modeInfos[i], sigs[i] = SignatureDataToModeInfoAndSig(d) } - multisig := types.MultiSignature{ + multisig := cryptotypes.MultiSignature{ Signatures: sigs, } sig, err := multisig.Marshal() @@ -92,7 +90,7 @@ func ModeInfoAndSigToSignatureData(modeInfo *tx.ModeInfo, sig []byte) (signing.S // decodeMultisignatures safely decodes the the raw bytes as a MultiSignature protobuf message func decodeMultisignatures(bz []byte) ([][]byte, error) { - multisig := types.MultiSignature{} + multisig := cryptotypes.MultiSignature{} err := multisig.Unmarshal(bz) if err != nil { return nil, err @@ -137,7 +135,7 @@ func (g config) UnmarshalSignatureJSON(bz []byte) ([]signing.SignatureV2, error) sigs := make([]signing.SignatureV2, len(sigDescs.Signatures)) for i, desc := range sigDescs.Signatures { - pubKey, _ := desc.PublicKey.GetCachedValue().(crypto.PubKey) + pubKey, _ := desc.PublicKey.GetCachedValue().(cryptotypes.PubKey) data := signing.SignatureDataFromProto(desc.Data) diff --git a/x/auth/types/account.go b/x/auth/types/account.go index 476e607c42..532b80d307 100644 --- a/x/auth/types/account.go +++ b/x/auth/types/account.go @@ -13,6 +13,7 @@ import ( "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -26,7 +27,7 @@ var ( // NewBaseAccount creates a new BaseAccount object //nolint:interfacer -func NewBaseAccount(address sdk.AccAddress, pubKey crypto.PubKey, accountNumber, sequence uint64) *BaseAccount { +func NewBaseAccount(address sdk.AccAddress, pubKey cryptotypes.PubKey, accountNumber, sequence uint64) *BaseAccount { acc := &BaseAccount{ Address: address.String(), AccountNumber: accountNumber, @@ -70,11 +71,11 @@ func (acc *BaseAccount) SetAddress(addr sdk.AccAddress) error { } // GetPubKey - Implements sdk.AccountI. -func (acc BaseAccount) GetPubKey() (pk crypto.PubKey) { +func (acc BaseAccount) GetPubKey() (pk cryptotypes.PubKey) { if acc.PubKey == nil { return nil } - content, ok := acc.PubKey.GetCachedValue().(crypto.PubKey) + content, ok := acc.PubKey.GetCachedValue().(cryptotypes.PubKey) if !ok { return nil } @@ -82,7 +83,7 @@ func (acc BaseAccount) GetPubKey() (pk crypto.PubKey) { } // SetPubKey - Implements sdk.AccountI. -func (acc *BaseAccount) SetPubKey(pubKey crypto.PubKey) error { +func (acc *BaseAccount) SetPubKey(pubKey cryptotypes.PubKey) error { any, err := codectypes.PackAny(pubKey) if err != nil { return err @@ -150,7 +151,7 @@ func (acc BaseAccount) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error { if acc.PubKey == nil { return nil } - var pubKey crypto.PubKey + var pubKey cryptotypes.PubKey return unpacker.UnpackAny(acc.PubKey, &pubKey) } @@ -209,7 +210,7 @@ func (ma ModuleAccount) GetPermissions() []string { } // SetPubKey - Implements AccountI -func (ma ModuleAccount) SetPubKey(pubKey crypto.PubKey) error { +func (ma ModuleAccount) SetPubKey(pubKey cryptotypes.PubKey) error { return fmt.Errorf("not supported for module accounts") } @@ -311,8 +312,8 @@ type AccountI interface { GetAddress() sdk.AccAddress SetAddress(sdk.AccAddress) error // errors if already set. - GetPubKey() crypto.PubKey // can return nil. - SetPubKey(crypto.PubKey) error + GetPubKey() cryptotypes.PubKey // can return nil. + SetPubKey(cryptotypes.PubKey) error GetAccountNumber() uint64 SetAccountNumber(uint64) error diff --git a/x/auth/vesting/types/test_common.go b/x/auth/vesting/types/test_common.go index 347faba046..0e22ea2352 100644 --- a/x/auth/vesting/types/test_common.go +++ b/x/auth/vesting/types/test_common.go @@ -1,9 +1,8 @@ package types import ( - "github.com/tendermint/tendermint/crypto" - "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" @@ -22,7 +21,7 @@ func NewTestCoins() sdk.Coins { } // KeyTestPubAddr generates a test key pair -func KeyTestPubAddr() (crypto.PrivKey, crypto.PubKey, sdk.AccAddress) { +func KeyTestPubAddr() (cryptotypes.PrivKey, cryptotypes.PubKey, sdk.AccAddress) { key := secp256k1.GenPrivKey() pub := key.PubKey() addr := sdk.AccAddress(pub.Address()) diff --git a/x/bank/app_test.go b/x/bank/app_test.go index 713aa0999b..82d898b090 100644 --- a/x/bank/app_test.go +++ b/x/bank/app_test.go @@ -4,10 +4,10 @@ import ( "testing" "github.com/stretchr/testify/require" - "github.com/tendermint/tendermint/crypto" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/simapp" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" @@ -28,7 +28,7 @@ type ( msgs []sdk.Msg accNums []uint64 accSeqs []uint64 - privKeys []crypto.PrivKey + privKeys []cryptotypes.PrivKey expectedBalances []expectedBalance } ) @@ -228,7 +228,7 @@ func TestMsgMultiSendWithAccounts(t *testing.T) { accSeqs: []uint64{0}, expSimPass: true, expPass: true, - privKeys: []crypto.PrivKey{priv1}, + privKeys: []cryptotypes.PrivKey{priv1}, expectedBalances: []expectedBalance{ {addr1, sdk.Coins{sdk.NewInt64Coin("foocoin", 57)}}, {addr2, sdk.Coins{sdk.NewInt64Coin("foocoin", 10)}}, @@ -241,7 +241,7 @@ func TestMsgMultiSendWithAccounts(t *testing.T) { accSeqs: []uint64{1}, expSimPass: true, // doesn't check signature expPass: false, - privKeys: []crypto.PrivKey{priv1}, + privKeys: []cryptotypes.PrivKey{priv1}, }, { desc: "wrong accSeq should not pass Simulate", @@ -250,7 +250,7 @@ func TestMsgMultiSendWithAccounts(t *testing.T) { accSeqs: []uint64{0}, // wrong account sequence expSimPass: false, expPass: false, - privKeys: []crypto.PrivKey{priv1}, + privKeys: []cryptotypes.PrivKey{priv1}, }, } @@ -297,7 +297,7 @@ func TestMsgMultiSendMultipleOut(t *testing.T) { accSeqs: []uint64{0}, expSimPass: true, expPass: true, - privKeys: []crypto.PrivKey{priv1}, + privKeys: []cryptotypes.PrivKey{priv1}, expectedBalances: []expectedBalance{ {addr1, sdk.Coins{sdk.NewInt64Coin("foocoin", 32)}}, {addr2, sdk.Coins{sdk.NewInt64Coin("foocoin", 47)}}, @@ -351,7 +351,7 @@ func TestMsgMultiSendMultipleInOut(t *testing.T) { accSeqs: []uint64{0, 0}, expSimPass: true, expPass: true, - privKeys: []crypto.PrivKey{priv1, priv4}, + privKeys: []cryptotypes.PrivKey{priv1, priv4}, expectedBalances: []expectedBalance{ {addr1, sdk.Coins{sdk.NewInt64Coin("foocoin", 32)}}, {addr4, sdk.Coins{sdk.NewInt64Coin("foocoin", 32)}}, @@ -395,7 +395,7 @@ func TestMsgMultiSendDependent(t *testing.T) { accSeqs: []uint64{0}, expSimPass: true, expPass: true, - privKeys: []crypto.PrivKey{priv1}, + privKeys: []cryptotypes.PrivKey{priv1}, expectedBalances: []expectedBalance{ {addr1, sdk.Coins{sdk.NewInt64Coin("foocoin", 32)}}, {addr2, sdk.Coins{sdk.NewInt64Coin("foocoin", 10)}}, @@ -407,7 +407,7 @@ func TestMsgMultiSendDependent(t *testing.T) { accSeqs: []uint64{0}, expSimPass: true, expPass: true, - privKeys: []crypto.PrivKey{priv2}, + privKeys: []cryptotypes.PrivKey{priv2}, expectedBalances: []expectedBalance{ {addr1, sdk.Coins{sdk.NewInt64Coin("foocoin", 42)}}, }, diff --git a/x/bank/simulation/operations.go b/x/bank/simulation/operations.go index c1e64d80d5..9fcc80f0fe 100644 --- a/x/bank/simulation/operations.go +++ b/x/bank/simulation/operations.go @@ -3,10 +3,9 @@ package simulation import ( "math/rand" - "github.com/tendermint/tendermint/crypto" - "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/codec" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/simapp/helpers" simappparams "github.com/cosmos/cosmos-sdk/simapp/params" sdk "github.com/cosmos/cosmos-sdk/types" @@ -72,7 +71,7 @@ func SimulateMsgSend(ak types.AccountKeeper, bk keeper.Keeper) simtypes.Operatio msg := types.NewMsgSend(simAccount.Address, toSimAcc.Address, coins) - err := sendMsgSend(r, app, bk, ak, msg, ctx, chainID, []crypto.PrivKey{simAccount.PrivKey}) + err := sendMsgSend(r, app, bk, ak, msg, ctx, chainID, []cryptotypes.PrivKey{simAccount.PrivKey}) if err != nil { return simtypes.NoOpMsg(types.ModuleName, msg.Type(), "invalid transfers"), nil, err } @@ -85,7 +84,7 @@ func SimulateMsgSend(ak types.AccountKeeper, bk keeper.Keeper) simtypes.Operatio // nolint: interfacer func sendMsgSend( r *rand.Rand, app *baseapp.BaseApp, bk keeper.Keeper, ak types.AccountKeeper, - msg *types.MsgSend, ctx sdk.Context, chainID string, privkeys []crypto.PrivKey, + msg *types.MsgSend, ctx sdk.Context, chainID string, privkeys []cryptotypes.PrivKey, ) error { var ( @@ -144,7 +143,7 @@ func SimulateMsgMultiSend(ak types.AccountKeeper, bk keeper.Keeper) simtypes.Ope outputs := make([]types.Output, r.Intn(3)+1) // collect signer privKeys - privs := make([]crypto.PrivKey, len(inputs)) + privs := make([]cryptotypes.PrivKey, len(inputs)) // use map to check if address already exists as input usedAddrs := make(map[string]bool) @@ -227,7 +226,7 @@ func SimulateMsgMultiSend(ak types.AccountKeeper, bk keeper.Keeper) simtypes.Ope // nolint: interfacer func sendMsgMultiSend( r *rand.Rand, app *baseapp.BaseApp, bk keeper.Keeper, ak types.AccountKeeper, - msg *types.MsgMultiSend, ctx sdk.Context, chainID string, privkeys []crypto.PrivKey, + msg *types.MsgMultiSend, ctx sdk.Context, chainID string, privkeys []cryptotypes.PrivKey, ) error { accountNumbers := make([]uint64, len(msg.Inputs)) diff --git a/x/distribution/types/common_test.go b/x/distribution/types/common_test.go index a8301b4e42..4e6ef6b012 100644 --- a/x/distribution/types/common_test.go +++ b/x/distribution/types/common_test.go @@ -1,9 +1,8 @@ package types import ( - "github.com/tendermint/tendermint/crypto" - "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -25,5 +24,5 @@ var ( valAddr3 = sdk.ValAddress(valPk3.Address()) emptyValAddr sdk.ValAddress - emptyPubkey crypto.PubKey + emptyPubkey cryptotypes.PubKey ) diff --git a/x/evidence/keeper/keeper_test.go b/x/evidence/keeper/keeper_test.go index 65e52b30ed..9165730466 100644 --- a/x/evidence/keeper/keeper_test.go +++ b/x/evidence/keeper/keeper_test.go @@ -6,11 +6,11 @@ import ( "time" "github.com/stretchr/testify/suite" - "github.com/tendermint/tendermint/crypto" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/simapp" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" @@ -22,7 +22,7 @@ import ( ) var ( - pubkeys = []crypto.PubKey{ + pubkeys = []cryptotypes.PubKey{ newPubKey("0B485CFC0EECC619440448436F8FC9DF40566F2369E72400281454CB552AFB50"), newPubKey("0B485CFC0EECC619440448436F8FC9DF40566F2369E72400281454CB552AFB51"), newPubKey("0B485CFC0EECC619440448436F8FC9DF40566F2369E72400281454CB552AFB52"), @@ -38,7 +38,7 @@ var ( initCoins = sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, initAmt)) ) -func newPubKey(pk string) (res crypto.PubKey) { +func newPubKey(pk string) (res cryptotypes.PubKey) { pkBytes, err := hex.DecodeString(pk) if err != nil { panic(err) diff --git a/x/evidence/types/expected_keepers.go b/x/evidence/types/expected_keepers.go index 23c9b40bdc..0f1d87774c 100644 --- a/x/evidence/types/expected_keepers.go +++ b/x/evidence/types/expected_keepers.go @@ -3,8 +3,7 @@ package types import ( "time" - "github.com/tendermint/tendermint/crypto" - + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" ) @@ -19,7 +18,7 @@ type ( // SlashingKeeper defines the slashing module interface contract needed by the // evidence module. SlashingKeeper interface { - GetPubkey(sdk.Context, crypto.Address) (crypto.PubKey, error) + GetPubkey(sdk.Context, cryptotypes.Address) (cryptotypes.PubKey, error) IsTombstoned(sdk.Context, sdk.ConsAddress) bool HasValidatorSigningInfo(sdk.Context, sdk.ConsAddress) bool Tombstone(sdk.Context, sdk.ConsAddress) diff --git a/x/genutil/legacy/v038/migrate.go b/x/genutil/legacy/v038/migrate.go index cd71f57b11..374092298a 100644 --- a/x/genutil/legacy/v038/migrate.go +++ b/x/genutil/legacy/v038/migrate.go @@ -3,7 +3,6 @@ package v038 import ( "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" - cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" v036auth "github.com/cosmos/cosmos-sdk/x/auth/legacy/v036" v038auth "github.com/cosmos/cosmos-sdk/x/auth/legacy/v038" v036distr "github.com/cosmos/cosmos-sdk/x/distribution/legacy/v036" @@ -18,12 +17,10 @@ import ( // Migrate migrates exported state from v0.36/v0.37 to a v0.38 genesis state. func Migrate(appState types.AppMap, _ client.Context) types.AppMap { v036Codec := codec.NewLegacyAmino() - cryptocodec.RegisterCrypto(v036Codec) v036gov.RegisterLegacyAminoCodec(v036Codec) v036distr.RegisterLegacyAminoCodec(v036Codec) v038Codec := codec.NewLegacyAmino() - cryptocodec.RegisterCrypto(v038Codec) v038auth.RegisterLegacyAminoCodec(v038Codec) v036gov.RegisterLegacyAminoCodec(v038Codec) v036distr.RegisterLegacyAminoCodec(v038Codec) diff --git a/x/genutil/legacy/v039/migrate.go b/x/genutil/legacy/v039/migrate.go index bf112c1526..97442e9380 100644 --- a/x/genutil/legacy/v039/migrate.go +++ b/x/genutil/legacy/v039/migrate.go @@ -3,7 +3,6 @@ package v039 import ( "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" - cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" v038auth "github.com/cosmos/cosmos-sdk/x/auth/legacy/v038" v039auth "github.com/cosmos/cosmos-sdk/x/auth/legacy/v039" v036distr "github.com/cosmos/cosmos-sdk/x/distribution/legacy/v036" @@ -17,13 +16,11 @@ import ( // serialization of accounts do change. func Migrate(appState types.AppMap, _ client.Context) types.AppMap { v038Codec := codec.NewLegacyAmino() - cryptocodec.RegisterCrypto(v038Codec) v038auth.RegisterLegacyAminoCodec(v038Codec) v036gov.RegisterLegacyAminoCodec(v038Codec) v036distr.RegisterLegacyAminoCodec(v038Codec) v039Codec := codec.NewLegacyAmino() - cryptocodec.RegisterCrypto(v039Codec) v039auth.RegisterLegacyAminoCodec(v039Codec) v036gov.RegisterLegacyAminoCodec(v039Codec) v036distr.RegisterLegacyAminoCodec(v039Codec) diff --git a/x/genutil/types/types.go b/x/genutil/types/types.go index d902d8ccb3..694eebdbe3 100644 --- a/x/genutil/types/types.go +++ b/x/genutil/types/types.go @@ -3,9 +3,8 @@ package types import ( "encoding/json" - "github.com/tendermint/tendermint/crypto" - "github.com/cosmos/cosmos-sdk/client" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" ) // DONTCOVER @@ -32,11 +31,11 @@ type InitConfig struct { ChainID string GenTxsDir string NodeID string - ValPubKey crypto.PubKey + ValPubKey cryptotypes.PubKey } // NewInitConfig creates a new InitConfig object -func NewInitConfig(chainID, genTxsDir, nodeID string, valPubKey crypto.PubKey) InitConfig { +func NewInitConfig(chainID, genTxsDir, nodeID string, valPubKey cryptotypes.PubKey) InitConfig { return InitConfig{ ChainID: chainID, GenTxsDir: genTxsDir, diff --git a/x/genutil/utils.go b/x/genutil/utils.go index 5eea117187..14ac11f533 100644 --- a/x/genutil/utils.go +++ b/x/genutil/utils.go @@ -6,13 +6,13 @@ import ( "time" cfg "github.com/tendermint/tendermint/config" - "github.com/tendermint/tendermint/crypto" tmos "github.com/tendermint/tendermint/libs/os" "github.com/tendermint/tendermint/p2p" "github.com/tendermint/tendermint/privval" tmtypes "github.com/tendermint/tendermint/types" - "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" + cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" ) // ExportGenesisFile creates and writes the genesis configuration to disk. An @@ -47,7 +47,7 @@ func ExportGenesisFileWithTime( } // InitializeNodeValidatorFiles creates private validator and p2p configuration files. -func InitializeNodeValidatorFiles(config *cfg.Config) (nodeID string, valPubKey crypto.PubKey, err error) { +func InitializeNodeValidatorFiles(config *cfg.Config) (nodeID string, valPubKey cryptotypes.PubKey, err error) { nodeKey, err := p2p.LoadOrGenNodeKey(config.NodeKeyFile()) if err != nil { return "", nil, err @@ -70,7 +70,7 @@ func InitializeNodeValidatorFiles(config *cfg.Config) (nodeID string, valPubKey return "", nil, err } - valPubKey, err = ed25519.FromTmEd25519(tmValPubKey) + valPubKey, err = cryptocodec.FromTmPubKeyInterface(tmValPubKey) if err != nil { return "", nil, err } diff --git a/x/gov/common_test.go b/x/gov/common_test.go index d8648b478a..5ef50ea5db 100644 --- a/x/gov/common_test.go +++ b/x/gov/common_test.go @@ -7,9 +7,9 @@ import ( "testing" "github.com/stretchr/testify/require" - "github.com/tendermint/tendermint/crypto" "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/gov/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" @@ -71,7 +71,7 @@ func SortByteArrays(src [][]byte) [][]byte { const contextKeyBadProposal = "contextKeyBadProposal" var ( - pubkeys = []crypto.PubKey{ + pubkeys = []cryptotypes.PubKey{ ed25519.GenPrivKey().PubKey(), ed25519.GenPrivKey().PubKey(), ed25519.GenPrivKey().PubKey(), diff --git a/x/gov/keeper/tally_test.go b/x/gov/keeper/tally_test.go index 6c23a510e9..77f468cd2c 100644 --- a/x/gov/keeper/tally_test.go +++ b/x/gov/keeper/tally_test.go @@ -410,9 +410,9 @@ func TestTallyJailedValidator(t *testing.T) { _ = staking.EndBlocker(ctx, app.StakingKeeper) - consKey, err := val2.TmConsPubKey() + consAddr, err := val2.GetConsAddr() require.NoError(t, err) - app.StakingKeeper.Jail(ctx, sdk.ConsAddress(consKey.Address())) + app.StakingKeeper.Jail(ctx, sdk.ConsAddress(consAddr.Bytes())) tp := TestProposal proposal, err := app.GovKeeper.SubmitProposal(ctx, tp) diff --git a/x/ibc/core/02-client/keeper/client_test.go b/x/ibc/core/02-client/keeper/client_test.go index 31cf5d80fe..30528b88ca 100644 --- a/x/ibc/core/02-client/keeper/client_test.go +++ b/x/ibc/core/02-client/keeper/client_test.go @@ -6,7 +6,6 @@ import ( tmtypes "github.com/tendermint/tendermint/types" - cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/x/ibc/core/02-client/types" clienttypes "github.com/cosmos/cosmos-sdk/x/ibc/core/02-client/types" commitmenttypes "github.com/cosmos/cosmos-sdk/x/ibc/core/23-commitment/types" @@ -379,7 +378,7 @@ func (suite *KeeperTestSuite) TestCheckMisbehaviourAndUpdateState() { altPrivVal := ibctestingmock.NewPV() altPubKey, err := altPrivVal.GetPubKey() suite.Require().NoError(err) - altVal := tmtypes.NewValidator(altPubKey.(cryptotypes.IntoTmPubKey).AsTmPubKey(), 4) + altVal := tmtypes.NewValidator(altPubKey, 4) // Set valSet here with suite.valSet so it doesn't get reset on each testcase valSet := suite.valSet diff --git a/x/ibc/core/02-client/keeper/keeper_test.go b/x/ibc/core/02-client/keeper/keeper_test.go index 24675f4e9a..d5e162b09e 100644 --- a/x/ibc/core/02-client/keeper/keeper_test.go +++ b/x/ibc/core/02-client/keeper/keeper_test.go @@ -12,7 +12,7 @@ import ( "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/codec" - cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" + cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" "github.com/cosmos/cosmos-sdk/simapp" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/ibc/core/02-client/keeper" @@ -91,7 +91,7 @@ func (suite *KeeperTestSuite) SetupTest() { testClientHeightMinus1 := types.NewHeight(0, height-1) - validator := tmtypes.NewValidator(pubKey.(cryptotypes.IntoTmPubKey).AsTmPubKey(), 1) + validator := tmtypes.NewValidator(pubKey, 1) suite.valSet = tmtypes.NewValidatorSet([]*tmtypes.Validator{validator}) suite.valSetHash = suite.valSet.Hash() suite.header = suite.chainA.CreateTMClientHeader(testChainID, int64(testClientHeight.VersionHeight), testClientHeightMinus1, now2, suite.valSet, suite.valSet, []tmtypes.PrivValidator{suite.privVal}) @@ -100,7 +100,9 @@ func (suite *KeeperTestSuite) SetupTest() { var validators stakingtypes.Validators for i := 1; i < 11; i++ { privVal := ibctestingmock.NewPV() - pk, err := privVal.GetPubKey() + tmPk, err := privVal.GetPubKey() + suite.Require().NoError(err) + pk, err := cryptocodec.FromTmPubKeyInterface(tmPk) suite.Require().NoError(err) val, err := stakingtypes.NewValidator(sdk.ValAddress(pk.Address()), pk, stakingtypes.Description{}) suite.Require().NoError(err) diff --git a/x/ibc/core/02-client/types/genesis_test.go b/x/ibc/core/02-client/types/genesis_test.go index 1de9103354..41d88edae8 100644 --- a/x/ibc/core/02-client/types/genesis_test.go +++ b/x/ibc/core/02-client/types/genesis_test.go @@ -5,7 +5,6 @@ import ( tmtypes "github.com/tendermint/tendermint/types" - cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" client "github.com/cosmos/cosmos-sdk/x/ibc/core/02-client" "github.com/cosmos/cosmos-sdk/x/ibc/core/02-client/types" channeltypes "github.com/cosmos/cosmos-sdk/x/ibc/core/04-channel/types" @@ -49,7 +48,7 @@ func (suite *TypesTestSuite) TestValidateGenesis() { now := time.Now().UTC() - val := tmtypes.NewValidator(pubKey.(cryptotypes.IntoTmPubKey).AsTmPubKey(), 10) + val := tmtypes.NewValidator(pubKey, 10) valSet := tmtypes.NewValidatorSet([]*tmtypes.Validator{val}) heightMinus1 := types.NewHeight(0, height-1) diff --git a/x/ibc/light-clients/06-solomachine/types/consensus_state.go b/x/ibc/light-clients/06-solomachine/types/consensus_state.go index f912aa3501..2b637a7ad2 100644 --- a/x/ibc/light-clients/06-solomachine/types/consensus_state.go +++ b/x/ibc/light-clients/06-solomachine/types/consensus_state.go @@ -3,8 +3,7 @@ package types import ( "strings" - tmcrypto "github.com/tendermint/tendermint/crypto" - + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" clienttypes "github.com/cosmos/cosmos-sdk/x/ibc/core/02-client/types" "github.com/cosmos/cosmos-sdk/x/ibc/core/exported" @@ -27,11 +26,11 @@ func (cs ConsensusState) GetRoot() exported.Root { return nil } -// GetPubKey unmarshals the public key into a tmcrypto.PubKey type. -func (cs ConsensusState) GetPubKey() tmcrypto.PubKey { - publicKey, ok := cs.PublicKey.GetCachedValue().(tmcrypto.PubKey) +// GetPubKey unmarshals the public key into a cryptotypes.PubKey type. +func (cs ConsensusState) GetPubKey() cryptotypes.PubKey { + publicKey, ok := cs.PublicKey.GetCachedValue().(cryptotypes.PubKey) if !ok { - panic("ConsensusState PublicKey is not crypto.PubKey") + panic("ConsensusState PublicKey is not cryptotypes.PubKey") } return publicKey diff --git a/x/ibc/light-clients/06-solomachine/types/header.go b/x/ibc/light-clients/06-solomachine/types/header.go index a4f757a373..e833a70202 100644 --- a/x/ibc/light-clients/06-solomachine/types/header.go +++ b/x/ibc/light-clients/06-solomachine/types/header.go @@ -3,8 +3,7 @@ package types import ( "strings" - tmcrypto "github.com/tendermint/tendermint/crypto" - + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" clienttypes "github.com/cosmos/cosmos-sdk/x/ibc/core/02-client/types" "github.com/cosmos/cosmos-sdk/x/ibc/core/exported" @@ -24,11 +23,11 @@ func (h Header) GetHeight() exported.Height { return clienttypes.NewHeight(0, h.Sequence) } -// GetPubKey unmarshals the new public key into a tmcrypto.PubKey type. -func (h Header) GetPubKey() tmcrypto.PubKey { - publicKey, ok := h.NewPublicKey.GetCachedValue().(tmcrypto.PubKey) +// GetPubKey unmarshals the new public key into a cryptotypes.PubKey type. +func (h Header) GetPubKey() cryptotypes.PubKey { + publicKey, ok := h.NewPublicKey.GetCachedValue().(cryptotypes.PubKey) if !ok { - panic("Header NewPublicKey is not crypto.PubKey") + panic("Header NewPublicKey is not cryptotypes.PubKey") } return publicKey diff --git a/x/ibc/light-clients/06-solomachine/types/proof.go b/x/ibc/light-clients/06-solomachine/types/proof.go index 7a5204e7f7..c6f4c8b48f 100644 --- a/x/ibc/light-clients/06-solomachine/types/proof.go +++ b/x/ibc/light-clients/06-solomachine/types/proof.go @@ -1,9 +1,8 @@ package types import ( - "github.com/tendermint/tendermint/crypto" - "github.com/cosmos/cosmos-sdk/codec" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/crypto/types/multisig" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/types/tx/signing" @@ -19,7 +18,7 @@ import ( // The type of the signature data determines how the public key is used to // verify the signature. An error is returned if signature verification fails // or an invalid SignatureData type is provided. -func VerifySignature(pubKey crypto.PubKey, signBytes []byte, sigData signing.SignatureData) error { +func VerifySignature(pubKey cryptotypes.PubKey, signBytes []byte, sigData signing.SignatureData) error { switch data := sigData.(type) { case *signing.SingleSignatureData: if !pubKey.VerifySignature(signBytes, data.Signature) { diff --git a/x/ibc/light-clients/06-solomachine/types/solomachine.go b/x/ibc/light-clients/06-solomachine/types/solomachine.go index 06d8fc05f6..d3936ef427 100644 --- a/x/ibc/light-clients/06-solomachine/types/solomachine.go +++ b/x/ibc/light-clients/06-solomachine/types/solomachine.go @@ -1,9 +1,8 @@ package types import ( - "github.com/tendermint/tendermint/crypto" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/x/ibc/core/exported" ) @@ -20,17 +19,17 @@ func (cs ClientState) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error { // UnpackInterfaces implements the UnpackInterfaceMessages.UnpackInterfaces method func (cs ConsensusState) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error { - return unpacker.UnpackAny(cs.PublicKey, new(crypto.PubKey)) + return unpacker.UnpackAny(cs.PublicKey, new(cryptotypes.PubKey)) } // UnpackInterfaces implements the UnpackInterfaceMessages.UnpackInterfaces method func (h Header) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error { - return unpacker.UnpackAny(h.NewPublicKey, new(crypto.PubKey)) + return unpacker.UnpackAny(h.NewPublicKey, new(cryptotypes.PubKey)) } // UnpackInterfaces implements the UnpackInterfaceMessages.UnpackInterfaces method func (hd HeaderData) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error { - return unpacker.UnpackAny(hd.NewPubKey, new(crypto.PubKey)) + return unpacker.UnpackAny(hd.NewPubKey, new(cryptotypes.PubKey)) } // UnpackInterfaces implements the UnpackInterfaceMessages.UnpackInterfaces method diff --git a/x/ibc/light-clients/07-tendermint/types/misbehaviour_handle_test.go b/x/ibc/light-clients/07-tendermint/types/misbehaviour_handle_test.go index 2133611860..e0fc26389c 100644 --- a/x/ibc/light-clients/07-tendermint/types/misbehaviour_handle_test.go +++ b/x/ibc/light-clients/07-tendermint/types/misbehaviour_handle_test.go @@ -7,7 +7,6 @@ import ( "github.com/tendermint/tendermint/crypto/tmhash" tmtypes "github.com/tendermint/tendermint/types" - cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/simapp" clienttypes "github.com/cosmos/cosmos-sdk/x/ibc/core/02-client/types" commitmenttypes "github.com/cosmos/cosmos-sdk/x/ibc/core/23-commitment/types" @@ -22,7 +21,7 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { altPubKey, err := altPrivVal.GetPubKey() suite.Require().NoError(err) - altVal := tmtypes.NewValidator(altPubKey.(cryptotypes.IntoTmPubKey).AsTmPubKey(), 4) + altVal := tmtypes.NewValidator(altPubKey, 4) // Create bothValSet with both suite validator and altVal bothValSet := tmtypes.NewValidatorSet(append(suite.valSet.Validators, altVal)) diff --git a/x/ibc/light-clients/07-tendermint/types/misbehaviour_test.go b/x/ibc/light-clients/07-tendermint/types/misbehaviour_test.go index 22bd8674fb..6f70c4b716 100644 --- a/x/ibc/light-clients/07-tendermint/types/misbehaviour_test.go +++ b/x/ibc/light-clients/07-tendermint/types/misbehaviour_test.go @@ -7,7 +7,6 @@ import ( tmproto "github.com/tendermint/tendermint/proto/tendermint/types" tmtypes "github.com/tendermint/tendermint/types" - cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" clienttypes "github.com/cosmos/cosmos-sdk/x/ibc/core/02-client/types" "github.com/cosmos/cosmos-sdk/x/ibc/light-clients/07-tendermint/types" ibctesting "github.com/cosmos/cosmos-sdk/x/ibc/testing" @@ -37,7 +36,7 @@ func (suite *TendermintTestSuite) TestMisbehaviourValidateBasic() { versionHeight := int64(height.VersionHeight) - altVal := tmtypes.NewValidator(altPubKey.(cryptotypes.IntoTmPubKey).AsTmPubKey(), versionHeight) + altVal := tmtypes.NewValidator(altPubKey, versionHeight) // Create bothValSet with both suite validator and altVal bothValSet := tmtypes.NewValidatorSet(append(suite.valSet.Validators, altVal)) diff --git a/x/ibc/light-clients/07-tendermint/types/tendermint_test.go b/x/ibc/light-clients/07-tendermint/types/tendermint_test.go index b175bfd5a5..171d33f561 100644 --- a/x/ibc/light-clients/07-tendermint/types/tendermint_test.go +++ b/x/ibc/light-clients/07-tendermint/types/tendermint_test.go @@ -11,7 +11,6 @@ import ( tmtypes "github.com/tendermint/tendermint/types" "github.com/cosmos/cosmos-sdk/codec" - cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/simapp" sdk "github.com/cosmos/cosmos-sdk/types" clienttypes "github.com/cosmos/cosmos-sdk/x/ibc/core/02-client/types" @@ -82,7 +81,7 @@ func (suite *TendermintTestSuite) SetupTest() { heightMinus1 := clienttypes.NewHeight(0, height.VersionHeight-1) - val := tmtypes.NewValidator(pubKey.(cryptotypes.IntoTmPubKey).AsTmPubKey(), 10) + val := tmtypes.NewValidator(pubKey, 10) suite.valSet = tmtypes.NewValidatorSet([]*tmtypes.Validator{val}) suite.valsHash = suite.valSet.Hash() suite.header = suite.chainA.CreateTMClientHeader(chainID, int64(height.VersionHeight), heightMinus1, suite.now, suite.valSet, suite.valSet, []tmtypes.PrivValidator{suite.privVal}) diff --git a/x/ibc/light-clients/07-tendermint/types/update_test.go b/x/ibc/light-clients/07-tendermint/types/update_test.go index 2d075ad0a5..0941e63212 100644 --- a/x/ibc/light-clients/07-tendermint/types/update_test.go +++ b/x/ibc/light-clients/07-tendermint/types/update_test.go @@ -5,7 +5,6 @@ import ( tmtypes "github.com/tendermint/tendermint/types" - cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" clienttypes "github.com/cosmos/cosmos-sdk/x/ibc/core/02-client/types" commitmenttypes "github.com/cosmos/cosmos-sdk/x/ibc/core/23-commitment/types" types "github.com/cosmos/cosmos-sdk/x/ibc/light-clients/07-tendermint/types" @@ -35,7 +34,7 @@ func (suite *TendermintTestSuite) TestCheckHeaderAndUpdateState() { heightMinus3 := clienttypes.NewHeight(height.VersionNumber, height.VersionHeight-3) heightPlus5 := clienttypes.NewHeight(height.VersionNumber, height.VersionHeight+5) - altVal := tmtypes.NewValidator(altPubKey.(cryptotypes.IntoTmPubKey).AsTmPubKey(), versionHeight) + altVal := tmtypes.NewValidator(altPubKey, versionHeight) // Create bothValSet with both suite validator and altVal. Would be valid update bothValSet := tmtypes.NewValidatorSet(append(suite.valSet.Validators, altVal)) diff --git a/x/ibc/testing/chain.go b/x/ibc/testing/chain.go index 2c0554c6aa..c29c111e8f 100644 --- a/x/ibc/testing/chain.go +++ b/x/ibc/testing/chain.go @@ -9,7 +9,6 @@ import ( "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" - "github.com/tendermint/tendermint/crypto" "github.com/tendermint/tendermint/crypto/tmhash" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" tmprotoversion "github.com/tendermint/tendermint/proto/tendermint/version" @@ -37,6 +36,7 @@ import ( solomachinetypes "github.com/cosmos/cosmos-sdk/x/ibc/light-clients/06-solomachine/types" ibctmtypes "github.com/cosmos/cosmos-sdk/x/ibc/light-clients/07-tendermint/types" "github.com/cosmos/cosmos-sdk/x/ibc/testing/mock" + "github.com/cosmos/cosmos-sdk/x/staking/teststaking" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" ) @@ -109,7 +109,7 @@ type TestChain struct { Vals *tmtypes.ValidatorSet Signers []tmtypes.PrivValidator - senderPrivKey crypto.PrivKey + senderPrivKey cryptotypes.PrivKey SenderAccount authtypes.AccountI // IBC specific helpers @@ -132,7 +132,7 @@ func NewTestChain(t *testing.T, chainID string) *TestChain { require.NoError(t, err) // create validator set with single validator - validator := tmtypes.NewValidator(pubKey.(cryptotypes.IntoTmPubKey).AsTmPubKey(), 1) + validator := tmtypes.NewValidator(pubKey, 1) valSet := tmtypes.NewValidatorSet([]*tmtypes.Validator{validator}) signers := []tmtypes.PrivValidator{privVal} @@ -346,7 +346,7 @@ func (chain *TestChain) GetValsAtHeight(height int64) (*tmtypes.ValidatorSet, bo valSet := stakingtypes.Validators(histInfo.Valset) - tmValidators, err := valSet.ToTmValidators() + tmValidators, err := teststaking.ToTmValidators(valSet) if err != nil { panic(err) } diff --git a/x/ibc/testing/chain_test.go b/x/ibc/testing/chain_test.go index 243eb06447..bf5af6de63 100644 --- a/x/ibc/testing/chain_test.go +++ b/x/ibc/testing/chain_test.go @@ -6,7 +6,6 @@ import ( "github.com/stretchr/testify/require" tmtypes "github.com/tendermint/tendermint/types" - cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" ibctesting "github.com/cosmos/cosmos-sdk/x/ibc/testing" "github.com/cosmos/cosmos-sdk/x/ibc/testing/mock" ) @@ -20,8 +19,8 @@ func TestCreateSortedSignerArray(t *testing.T) { pubKey2, err := privVal2.GetPubKey() require.NoError(t, err) - validator1 := tmtypes.NewValidator(pubKey1.(cryptotypes.IntoTmPubKey).AsTmPubKey(), 1) - validator2 := tmtypes.NewValidator(pubKey2.(cryptotypes.IntoTmPubKey).AsTmPubKey(), 2) + validator1 := tmtypes.NewValidator(pubKey1, 1) + validator2 := tmtypes.NewValidator(pubKey2, 2) expected := []tmtypes.PrivValidator{privVal2, privVal1} diff --git a/x/ibc/testing/mock/privval.go b/x/ibc/testing/mock/privval.go index ec40a8aad6..fe46659b3d 100644 --- a/x/ibc/testing/mock/privval.go +++ b/x/ibc/testing/mock/privval.go @@ -5,7 +5,9 @@ import ( tmproto "github.com/tendermint/tendermint/proto/tendermint/types" tmtypes "github.com/tendermint/tendermint/types" + cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" ) var _ tmtypes.PrivValidator = PV{} @@ -13,7 +15,7 @@ var _ tmtypes.PrivValidator = PV{} // MockPV implements PrivValidator without any safety or persistence. // Only use it for testing. type PV struct { - PrivKey crypto.PrivKey + PrivKey cryptotypes.PrivKey } func NewPV() PV { @@ -22,7 +24,7 @@ func NewPV() PV { // GetPubKey implements PrivValidator interface func (pv PV) GetPubKey() (crypto.PubKey, error) { - return pv.PrivKey.PubKey(), nil + return cryptocodec.ToTmPubKeyInterface(pv.PrivKey.PubKey()) } // SignVote implements PrivValidator interface diff --git a/x/ibc/testing/solomachine.go b/x/ibc/testing/solomachine.go index 21b02516e9..6b2508f30e 100644 --- a/x/ibc/testing/solomachine.go +++ b/x/ibc/testing/solomachine.go @@ -4,11 +4,11 @@ import ( "testing" "github.com/stretchr/testify/require" - "github.com/tendermint/tendermint/crypto" "github.com/cosmos/cosmos-sdk/codec" kmultisig "github.com/cosmos/cosmos-sdk/crypto/keys/multisig" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/crypto/types/multisig" "github.com/cosmos/cosmos-sdk/types/tx/signing" "github.com/cosmos/cosmos-sdk/x/auth/tx" @@ -28,9 +28,9 @@ type Solomachine struct { cdc codec.BinaryMarshaler ClientID string - PrivateKeys []crypto.PrivKey // keys used for signing - PublicKeys []crypto.PubKey // keys used for generating solo machine pub key - PublicKey crypto.PubKey // key used for verification + PrivateKeys []cryptotypes.PrivKey // keys used for signing + PublicKeys []cryptotypes.PubKey // keys used for generating solo machine pub key + PublicKey cryptotypes.PubKey // key used for verification Sequence uint64 Time uint64 Diversifier string @@ -63,17 +63,17 @@ func NewSolomachine(t *testing.T, cdc codec.BinaryMarshaler, clientID, diversifi // The key type can be swapped for any key type supported by the PublicKey // interface, if needed. The same is true for the amino based Multisignature // public key. -func GenerateKeys(t *testing.T, n uint64) ([]crypto.PrivKey, []crypto.PubKey, crypto.PubKey) { +func GenerateKeys(t *testing.T, n uint64) ([]cryptotypes.PrivKey, []cryptotypes.PubKey, cryptotypes.PubKey) { require.NotEqual(t, uint64(0), n, "generation of zero keys is not allowed") - privKeys := make([]crypto.PrivKey, n) - pubKeys := make([]crypto.PubKey, n) + privKeys := make([]cryptotypes.PrivKey, n) + pubKeys := make([]cryptotypes.PubKey, n) for i := uint64(0); i < n; i++ { privKeys[i] = secp256k1.GenPrivKey() pubKeys[i] = privKeys[i].PubKey() } - var pk crypto.PubKey + var pk cryptotypes.PubKey if len(privKeys) > 1 { // generate multi sig pk pk = kmultisig.NewLegacyAminoPubKey(int(n), pubKeys) diff --git a/x/slashing/genesis.go b/x/slashing/genesis.go index ae8f315553..2c8b667576 100644 --- a/x/slashing/genesis.go +++ b/x/slashing/genesis.go @@ -12,7 +12,7 @@ import ( func InitGenesis(ctx sdk.Context, keeper keeper.Keeper, stakingKeeper types.StakingKeeper, data *types.GenesisState) { stakingKeeper.IterateValidators(ctx, func(index int64, validator stakingtypes.ValidatorI) bool { - consPk, err := validator.TmConsPubKey() + consPk, err := validator.ConsPubKey() if err != nil { panic(err) } diff --git a/x/slashing/keeper/hooks.go b/x/slashing/keeper/hooks.go index daf2e051e1..d596014258 100644 --- a/x/slashing/keeper/hooks.go +++ b/x/slashing/keeper/hooks.go @@ -28,11 +28,12 @@ func (k Keeper) AfterValidatorBonded(ctx sdk.Context, address sdk.ConsAddress, _ // AfterValidatorCreated adds the address-pubkey relation when a validator is created. func (k Keeper) AfterValidatorCreated(ctx sdk.Context, valAddr sdk.ValAddress) error { validator := k.sk.Validator(ctx, valAddr) - consPk, err := validator.TmConsPubKey() + consPk, err := validator.ConsPubKey() if err != nil { return err } k.AddPubkey(ctx, consPk) + return nil } diff --git a/x/slashing/keeper/infractions.go b/x/slashing/keeper/infractions.go index a8e349b75b..168b97b235 100644 --- a/x/slashing/keeper/infractions.go +++ b/x/slashing/keeper/infractions.go @@ -3,14 +3,13 @@ package keeper import ( "fmt" - "github.com/tendermint/tendermint/crypto" - + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/slashing/types" ) // HandleValidatorSignature handles a validator signature, must be called once per validator per block. -func (k Keeper) HandleValidatorSignature(ctx sdk.Context, addr crypto.Address, power int64, signed bool) { +func (k Keeper) HandleValidatorSignature(ctx sdk.Context, addr cryptotypes.Address, power int64, signed bool) { logger := k.Logger(ctx) height := ctx.BlockHeight() diff --git a/x/slashing/keeper/keeper.go b/x/slashing/keeper/keeper.go index ee46915b74..999e82404b 100644 --- a/x/slashing/keeper/keeper.go +++ b/x/slashing/keeper/keeper.go @@ -5,10 +5,10 @@ import ( gogotypes "github.com/gogo/protobuf/types" - "github.com/tendermint/tendermint/crypto" "github.com/tendermint/tendermint/libs/log" "github.com/cosmos/cosmos-sdk/codec" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/slashing/types" ) @@ -42,7 +42,7 @@ func (k Keeper) Logger(ctx sdk.Context) log.Logger { } // AddPubkey sets a address-pubkey relation -func (k Keeper) AddPubkey(ctx sdk.Context, pubkey crypto.PubKey) { +func (k Keeper) AddPubkey(ctx sdk.Context, pubkey cryptotypes.PubKey) { addr := pubkey.Address() pkStr, err := sdk.Bech32ifyPubKey(sdk.Bech32PubKeyTypeConsPub, pubkey) @@ -54,7 +54,7 @@ func (k Keeper) AddPubkey(ctx sdk.Context, pubkey crypto.PubKey) { } // GetPubkey returns the pubkey from the adddress-pubkey relation -func (k Keeper) GetPubkey(ctx sdk.Context, address crypto.Address) (crypto.PubKey, error) { +func (k Keeper) GetPubkey(ctx sdk.Context, address cryptotypes.Address) (cryptotypes.PubKey, error) { store := ctx.KVStore(k.storeKey) var pubkey gogotypes.StringValue @@ -99,14 +99,14 @@ func (k Keeper) Jail(ctx sdk.Context, consAddr sdk.ConsAddress) { k.sk.Jail(ctx, consAddr) } -func (k Keeper) setAddrPubkeyRelation(ctx sdk.Context, addr crypto.Address, pubkey string) { +func (k Keeper) setAddrPubkeyRelation(ctx sdk.Context, addr cryptotypes.Address, pubkey string) { store := ctx.KVStore(k.storeKey) bz := k.cdc.MustMarshalBinaryBare(&gogotypes.StringValue{Value: pubkey}) store.Set(types.AddrPubkeyRelationKey(addr), bz) } -func (k Keeper) deleteAddrPubkeyRelation(ctx sdk.Context, addr crypto.Address) { +func (k Keeper) deleteAddrPubkeyRelation(ctx sdk.Context, addr cryptotypes.Address) { store := ctx.KVStore(k.storeKey) store.Delete(types.AddrPubkeyRelationKey(addr)) } diff --git a/x/slashing/simulation/operations.go b/x/slashing/simulation/operations.go index d637007277..20acc9e91a 100644 --- a/x/slashing/simulation/operations.go +++ b/x/slashing/simulation/operations.go @@ -65,11 +65,10 @@ func SimulateMsgUnjail(ak types.AccountKeeper, bk types.BankKeeper, k keeper.Kee return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgUnjail, "validator is not jailed"), nil, nil } - cons, err := validator.TmConsPubKey() + consAddr, err := validator.GetConsAddr() if err != nil { return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgUnjail, "unable to get validator consensus key"), nil, err } - consAddr := sdk.ConsAddress(cons.Address()) info, found := k.GetValidatorSigningInfo(ctx, consAddr) if !found { return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgUnjail, "unable to find validator signing info"), nil, nil // skip diff --git a/x/staking/client/cli/tx.go b/x/staking/client/cli/tx.go index ab486c5a98..e83e50f275 100644 --- a/x/staking/client/cli/tx.go +++ b/x/staking/client/cli/tx.go @@ -7,11 +7,11 @@ import ( "github.com/spf13/cobra" flag "github.com/spf13/pflag" - "github.com/tendermint/tendermint/crypto" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/tx" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/version" "github.com/cosmos/cosmos-sdk/x/staking/types" @@ -416,7 +416,7 @@ type TxCreateValidatorConfig struct { Identity string } -func PrepareConfigForTxCreateValidator(flagSet *flag.FlagSet, moniker, nodeID, chainID string, valPubKey crypto.PubKey) (TxCreateValidatorConfig, error) { +func PrepareConfigForTxCreateValidator(flagSet *flag.FlagSet, moniker, nodeID, chainID string, valPubKey cryptotypes.PubKey) (TxCreateValidatorConfig, error) { c := TxCreateValidatorConfig{} ip, err := flagSet.GetString(FlagIP) diff --git a/x/staking/genesis.go b/x/staking/genesis.go index 1b646f2364..02f6bc3174 100644 --- a/x/staking/genesis.go +++ b/x/staking/genesis.go @@ -5,9 +5,9 @@ import ( "log" abci "github.com/tendermint/tendermint/abci/types" - "github.com/tendermint/tendermint/crypto" tmtypes "github.com/tendermint/tendermint/types" + cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/staking/keeper" "github.com/cosmos/cosmos-sdk/x/staking/types" @@ -198,14 +198,18 @@ func ExportGenesis(ctx sdk.Context, keeper keeper.Keeper) *types.GenesisState { // WriteValidators returns a slice of bonded genesis validators. func WriteValidators(ctx sdk.Context, keeper keeper.Keeper) (vals []tmtypes.GenesisValidator, err error) { keeper.IterateLastValidators(ctx, func(_ int64, validator types.ValidatorI) (stop bool) { - var consPk crypto.PubKey - consPk, err = validator.TmConsPubKey() + pk, err := validator.ConsPubKey() if err != nil { return true } + tmPk, err := cryptocodec.ToTmPubKeyInterface(pk) + if err != nil { + return true + } + vals = append(vals, tmtypes.GenesisValidator{ - Address: sdk.ConsAddress(consPk.Address()).Bytes(), - PubKey: consPk, + Address: sdk.ConsAddress(tmPk.Address()).Bytes(), + PubKey: tmPk, Power: validator.GetConsensusPower(), Name: validator.GetMoniker(), }) @@ -231,7 +235,7 @@ func validateGenesisStateValidators(validators []types.Validator) error { for i := 0; i < len(validators); i++ { val := validators[i] - consPk, err := val.TmConsPubKey() + consPk, err := val.ConsPubKey() if err != nil { return err } diff --git a/x/staking/handler_test.go b/x/staking/handler_test.go index 34a8cd78e7..844fc77990 100644 --- a/x/staking/handler_test.go +++ b/x/staking/handler_test.go @@ -11,8 +11,8 @@ import ( tmproto "github.com/tendermint/tendermint/proto/tendermint/types" tmtypes "github.com/tendermint/tendermint/types" + cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" - cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/simapp" "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" @@ -132,9 +132,11 @@ func TestDuplicatesMsgCreateValidator(t *testing.T) { validator := tstaking.CheckValidator(addr1, types.Bonded, false) assert.Equal(t, addr1.String(), validator.OperatorAddress) - consKey, err := validator.TmConsPubKey() + consKey, err := validator.TmConsPublicKey() require.NoError(t, err) - assert.Equal(t, pk1.(cryptotypes.IntoTmPubKey).AsTmPubKey(), consKey) + tmPk1, err := cryptocodec.ToTmProtoPublicKey(pk1) + require.NoError(t, err) + assert.Equal(t, tmPk1, consKey) assert.Equal(t, valTokens, validator.BondedTokens()) assert.Equal(t, valTokens.ToDec(), validator.DelegatorShares) assert.Equal(t, types.Description{}, validator.Description) @@ -155,9 +157,11 @@ func TestDuplicatesMsgCreateValidator(t *testing.T) { validator = tstaking.CheckValidator(addr2, types.Bonded, false) assert.Equal(t, addr2.String(), validator.OperatorAddress) - consPk, err := validator.TmConsPubKey() + consPk, err := validator.TmConsPublicKey() require.NoError(t, err) - assert.Equal(t, pk2.(cryptotypes.IntoTmPubKey).AsTmPubKey(), consPk) + tmPk2, err := cryptocodec.ToTmProtoPublicKey(pk2) + require.NoError(t, err) + assert.Equal(t, tmPk2, consPk) assert.True(sdk.IntEq(t, valTokens, validator.Tokens)) assert.True(sdk.DecEq(t, valTokens.ToDec(), validator.DelegatorShares)) assert.Equal(t, types.Description{}, validator.Description) diff --git a/x/staking/keeper/msg_server.go b/x/staking/keeper/msg_server.go index 472a96c485..3f112a0abb 100644 --- a/x/staking/keeper/msg_server.go +++ b/x/staking/keeper/msg_server.go @@ -41,7 +41,7 @@ func (k msgServer) CreateValidator(goCtx context.Context, msg *types.MsgCreateVa pk, ok := msg.Pubkey.GetCachedValue().(cryptotypes.PubKey) if !ok { - return nil, sdkerrors.Wrapf(sdkerrors.ErrInvalidType, "Expecting crypto.PubKey, got %T", pk) + return nil, sdkerrors.Wrapf(sdkerrors.ErrInvalidType, "Expecting cryptotypes.PubKey, got %T", pk) } if _, found := k.GetValidatorByConsAddr(ctx, sdk.GetConsAddress(pk)); found { diff --git a/x/staking/keeper/validator_test.go b/x/staking/keeper/validator_test.go index c28b6db358..894a600850 100644 --- a/x/staking/keeper/validator_test.go +++ b/x/staking/keeper/validator_test.go @@ -8,9 +8,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" - "github.com/tendermint/tendermint/crypto" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/simapp" sdk "github.com/cosmos/cosmos-sdk/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" @@ -19,7 +19,7 @@ import ( "github.com/cosmos/cosmos-sdk/x/staking/types" ) -func newMonikerValidator(t *testing.T, operator sdk.ValAddress, pubKey crypto.PubKey, moniker string) types.Validator { +func newMonikerValidator(t *testing.T, operator sdk.ValAddress, pubKey cryptotypes.PubKey, moniker string) types.Validator { v, err := types.NewValidator(operator, pubKey, types.Description{Moniker: moniker}) require.NoError(t, err) return v diff --git a/x/staking/legacy/v034/types.go b/x/staking/legacy/v034/types.go index 6e93b7986a..9f8622d4be 100644 --- a/x/staking/legacy/v034/types.go +++ b/x/staking/legacy/v034/types.go @@ -5,9 +5,8 @@ package v034 import ( "time" - "github.com/tendermint/tendermint/crypto" - "github.com/cosmos/cosmos-sdk/codec/legacy" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -76,17 +75,17 @@ type ( } Validator struct { - OperatorAddress sdk.ValAddress `json:"operator_address"` - ConsPubKey crypto.PubKey `json:"consensus_pubkey"` - Jailed bool `json:"jailed"` - Status BondStatus `json:"status"` - Tokens sdk.Int `json:"tokens"` - DelegatorShares sdk.Dec `json:"delegator_shares"` - Description Description `json:"description"` - UnbondingHeight int64 `json:"unbonding_height"` - UnbondingCompletionTime time.Time `json:"unbonding_time"` - Commission Commission `json:"commission"` - MinSelfDelegation sdk.Int `json:"min_self_delegation"` + OperatorAddress sdk.ValAddress `json:"operator_address"` + ConsPubKey cryptotypes.PubKey `json:"consensus_pubkey"` + Jailed bool `json:"jailed"` + Status BondStatus `json:"status"` + Tokens sdk.Int `json:"tokens"` + DelegatorShares sdk.Dec `json:"delegator_shares"` + Description Description `json:"description"` + UnbondingHeight int64 `json:"unbonding_height"` + UnbondingCompletionTime time.Time `json:"unbonding_time"` + Commission Commission `json:"commission"` + MinSelfDelegation sdk.Int `json:"min_self_delegation"` } Validators []Validator @@ -170,6 +169,7 @@ func (v *Validator) UnmarshalJSON(data []byte) error { if err != nil { return err } + *v = Validator{ OperatorAddress: bv.OperatorAddress, ConsPubKey: consPubKey, diff --git a/x/staking/legacy/v036/migrate_test.go b/x/staking/legacy/v036/migrate_test.go new file mode 100644 index 0000000000..7278774bf7 --- /dev/null +++ b/x/staking/legacy/v036/migrate_test.go @@ -0,0 +1,103 @@ +package v036_test + +import ( + "testing" + + "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" + "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" + v034staking "github.com/cosmos/cosmos-sdk/x/staking/legacy/v034" + v036staking "github.com/cosmos/cosmos-sdk/x/staking/legacy/v036" + "github.com/stretchr/testify/require" +) + +func TestMigrate(t *testing.T) { + aminoCdc := codec.NewLegacyAmino() + consPubKeyEd := ed25519.GenPrivKeyFromSecret([]byte("val0")).PubKey() + consPubKeySecp := secp256k1.GenPrivKeyFromSecret([]byte("val1")).PubKey() + stakingGenState := v034staking.GenesisState{ + Validators: v034staking.Validators{ + v034staking.Validator{ + ConsPubKey: consPubKeyEd, + Status: v034staking.Unbonded, + }, v034staking.Validator{ + ConsPubKey: consPubKeySecp, + Status: v034staking.Unbonded, + }, + }, + } + + migrated := v036staking.Migrate(stakingGenState) + + json, err := aminoCdc.MarshalJSONIndent(migrated, "", " ") + require.NoError(t, err) + + expectedJSON := `{ + "params": { + "unbonding_time": "0", + "max_validators": 0, + "max_entries": 0, + "bond_denom": "" + }, + "last_total_power": "0", + "last_validator_powers": null, + "validators": [ + { + "operator_address": "", + "consensus_pubkey": "cosmosvalconspub1zcjduepq9ymett3nlv6fytn7lqxzd3q3ckvd79eqlcf3wkhgamcl4rzghesq83ecpx", + "jailed": false, + "status": 0, + "tokens": "0", + "delegator_shares": "0", + "description": { + "moniker": "", + "identity": "", + "website": "", + "details": "" + }, + "unbonding_height": "0", + "unbonding_time": "0001-01-01T00:00:00Z", + "commission": { + "commission_rates": { + "rate": "0", + "max_rate": "0", + "max_change_rate": "0" + }, + "update_time": "0001-01-01T00:00:00Z" + }, + "min_self_delegation": "0" + }, + { + "operator_address": "", + "consensus_pubkey": "cosmosvalconspub1addwnpepqwfxk5k5pugwz3quqyzvzupefm3589tw6x9dkzjdkuzn7hgpz33ag84e406", + "jailed": false, + "status": 0, + "tokens": "0", + "delegator_shares": "0", + "description": { + "moniker": "", + "identity": "", + "website": "", + "details": "" + }, + "unbonding_height": "0", + "unbonding_time": "0001-01-01T00:00:00Z", + "commission": { + "commission_rates": { + "rate": "0", + "max_rate": "0", + "max_change_rate": "0" + }, + "update_time": "0001-01-01T00:00:00Z" + }, + "min_self_delegation": "0" + } + ], + "delegations": null, + "unbonding_delegations": null, + "redelegations": null, + "exported": false +}` + + require.Equal(t, expectedJSON, string(json)) +} diff --git a/x/staking/legacy/v036/types.go b/x/staking/legacy/v036/types.go index 6c110bbe57..b433b00701 100644 --- a/x/staking/legacy/v036/types.go +++ b/x/staking/legacy/v036/types.go @@ -5,9 +5,8 @@ package v036 import ( "time" - "github.com/tendermint/tendermint/crypto" - "github.com/cosmos/cosmos-sdk/codec/legacy" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" v034staking "github.com/cosmos/cosmos-sdk/x/staking/legacy/v034" ) @@ -30,7 +29,7 @@ type ( Validator struct { OperatorAddress sdk.ValAddress `json:"operator_address" yaml:"operator_address"` - ConsPubKey crypto.PubKey `json:"consensus_pubkey" yaml:"consensus_pubkey"` + ConsPubKey cryptotypes.PubKey `json:"consensus_pubkey" yaml:"consensus_pubkey"` Jailed bool `json:"jailed" yaml:"jailed"` Status v034staking.BondStatus `json:"status" yaml:"status"` Tokens sdk.Int `json:"tokens" yaml:"tokens"` diff --git a/x/staking/legacy/v038/types.go b/x/staking/legacy/v038/types.go index aff9a559d4..58ffa1351b 100644 --- a/x/staking/legacy/v038/types.go +++ b/x/staking/legacy/v038/types.go @@ -5,9 +5,8 @@ package v038 import ( "time" - "github.com/tendermint/tendermint/crypto" - "github.com/cosmos/cosmos-sdk/codec/legacy" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" v034staking "github.com/cosmos/cosmos-sdk/x/staking/legacy/v034" v036staking "github.com/cosmos/cosmos-sdk/x/staking/legacy/v036" @@ -28,7 +27,7 @@ type ( Validator struct { OperatorAddress sdk.ValAddress `json:"operator_address" yaml:"operator_address"` - ConsPubKey crypto.PubKey `json:"consensus_pubkey" yaml:"consensus_pubkey"` + ConsPubKey cryptotypes.PubKey `json:"consensus_pubkey" yaml:"consensus_pubkey"` Jailed bool `json:"jailed" yaml:"jailed"` Status v034staking.BondStatus `json:"status" yaml:"status"` Tokens sdk.Int `json:"tokens" yaml:"tokens"` diff --git a/x/staking/teststaking/helper.go b/x/staking/teststaking/helper.go index c0ba45bb1a..e63c816abb 100644 --- a/x/staking/teststaking/helper.go +++ b/x/staking/teststaking/helper.go @@ -5,8 +5,8 @@ import ( "time" "github.com/stretchr/testify/require" - "github.com/tendermint/tendermint/crypto" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/staking" "github.com/cosmos/cosmos-sdk/x/staking/keeper" @@ -32,14 +32,14 @@ func NewHelper(t *testing.T, ctx sdk.Context, k keeper.Keeper) *Helper { } // CreateValidator calls handler to create a new staking validator -func (sh *Helper) CreateValidator(addr sdk.ValAddress, pk crypto.PubKey, stakeAmount int64, ok bool) { +func (sh *Helper) CreateValidator(addr sdk.ValAddress, pk cryptotypes.PubKey, stakeAmount int64, ok bool) { coin := sdk.NewCoin(sh.Denom, sdk.NewInt(stakeAmount)) sh.createValidator(addr, pk, coin, ok) } // CreateValidatorWithValPower calls handler to create a new staking validator with zero // commission -func (sh *Helper) CreateValidatorWithValPower(addr sdk.ValAddress, pk crypto.PubKey, valPower int64, ok bool) sdk.Int { +func (sh *Helper) CreateValidatorWithValPower(addr sdk.ValAddress, pk cryptotypes.PubKey, valPower int64, ok bool) sdk.Int { amount := sdk.TokensFromConsensusPower(valPower) coin := sdk.NewCoin(sh.Denom, amount) sh.createValidator(addr, pk, coin, ok) @@ -47,14 +47,14 @@ func (sh *Helper) CreateValidatorWithValPower(addr sdk.ValAddress, pk crypto.Pub } // CreateValidatorMsg returns a message used to create validator in this service. -func (sh *Helper) CreateValidatorMsg(addr sdk.ValAddress, pk crypto.PubKey, stakeAmount int64) *stakingtypes.MsgCreateValidator { +func (sh *Helper) CreateValidatorMsg(addr sdk.ValAddress, pk cryptotypes.PubKey, stakeAmount int64) *stakingtypes.MsgCreateValidator { coin := sdk.NewCoin(sh.Denom, sdk.NewInt(stakeAmount)) msg, err := stakingtypes.NewMsgCreateValidator(addr, pk, coin, stakingtypes.Description{}, sh.Commission, sdk.OneInt()) require.NoError(sh.t, err) return msg } -func (sh *Helper) createValidator(addr sdk.ValAddress, pk crypto.PubKey, coin sdk.Coin, ok bool) { +func (sh *Helper) createValidator(addr sdk.ValAddress, pk cryptotypes.PubKey, coin sdk.Coin, ok bool) { msg, err := stakingtypes.NewMsgCreateValidator(addr, pk, coin, stakingtypes.Description{}, sh.Commission, sdk.OneInt()) require.NoError(sh.t, err) sh.Handle(msg, ok) diff --git a/x/staking/teststaking/tm.go b/x/staking/teststaking/tm.go new file mode 100644 index 0000000000..9a9c030d06 --- /dev/null +++ b/x/staking/teststaking/tm.go @@ -0,0 +1,43 @@ +package teststaking + +import ( + tmcrypto "github.com/tendermint/tendermint/crypto" + tmtypes "github.com/tendermint/tendermint/types" + + cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" + "github.com/cosmos/cosmos-sdk/x/staking/types" +) + +// GetTmConsPubKey gets the validator's public key as a tmcrypto.PubKey. +func GetTmConsPubKey(v types.Validator) (tmcrypto.PubKey, error) { + pk, err := v.ConsPubKey() + if err != nil { + return nil, err + } + + return cryptocodec.ToTmPubKeyInterface(pk) +} + +// ToTmValidator casts an SDK validator to a tendermint type Validator. +func ToTmValidator(v types.Validator) (*tmtypes.Validator, error) { + tmPk, err := GetTmConsPubKey(v) + if err != nil { + return nil, err + } + + return tmtypes.NewValidator(tmPk, v.ConsensusPower()), nil +} + +// ToTmValidators casts all validators to the corresponding tendermint type. +func ToTmValidators(v types.Validators) ([]*tmtypes.Validator, error) { + validators := make([]*tmtypes.Validator, len(v)) + var err error + for i, val := range v { + validators[i], err = ToTmValidator(val) + if err != nil { + return nil, err + } + } + + return validators, nil +} diff --git a/x/staking/teststaking/validator.go b/x/staking/teststaking/validator.go index 90dd485999..901395d76e 100644 --- a/x/staking/teststaking/validator.go +++ b/x/staking/teststaking/validator.go @@ -4,14 +4,14 @@ import ( "testing" "github.com/stretchr/testify/require" - "github.com/tendermint/tendermint/crypto" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/staking/types" ) // NewValidator is a testing helper method to create validators in tests -func NewValidator(t *testing.T, operator sdk.ValAddress, pubKey crypto.PubKey) types.Validator { +func NewValidator(t *testing.T, operator sdk.ValAddress, pubKey cryptotypes.PubKey) types.Validator { v, err := types.NewValidator(operator, pubKey, types.Description{}) require.NoError(t, err) return v diff --git a/x/staking/types/commission_test.go b/x/staking/types/commission_test.go index ec6186122a..3ca95cf4b4 100644 --- a/x/staking/types/commission_test.go +++ b/x/staking/types/commission_test.go @@ -1,4 +1,4 @@ -package types +package types_test import ( "testing" @@ -7,27 +7,28 @@ import ( "github.com/stretchr/testify/require" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/staking/types" ) func TestCommissionValidate(t *testing.T) { testCases := []struct { - input Commission + input types.Commission expectErr bool }{ // invalid commission; max rate < 0% - {NewCommission(sdk.ZeroDec(), sdk.MustNewDecFromStr("-1.00"), sdk.ZeroDec()), true}, + {types.NewCommission(sdk.ZeroDec(), sdk.MustNewDecFromStr("-1.00"), sdk.ZeroDec()), true}, // invalid commission; max rate > 100% - {NewCommission(sdk.ZeroDec(), sdk.MustNewDecFromStr("2.00"), sdk.ZeroDec()), true}, + {types.NewCommission(sdk.ZeroDec(), sdk.MustNewDecFromStr("2.00"), sdk.ZeroDec()), true}, // invalid commission; rate < 0% - {NewCommission(sdk.MustNewDecFromStr("-1.00"), sdk.ZeroDec(), sdk.ZeroDec()), true}, + {types.NewCommission(sdk.MustNewDecFromStr("-1.00"), sdk.ZeroDec(), sdk.ZeroDec()), true}, // invalid commission; rate > max rate - {NewCommission(sdk.MustNewDecFromStr("0.75"), sdk.MustNewDecFromStr("0.50"), sdk.ZeroDec()), true}, + {types.NewCommission(sdk.MustNewDecFromStr("0.75"), sdk.MustNewDecFromStr("0.50"), sdk.ZeroDec()), true}, // invalid commission; max change rate < 0% - {NewCommission(sdk.OneDec(), sdk.OneDec(), sdk.MustNewDecFromStr("-1.00")), true}, + {types.NewCommission(sdk.OneDec(), sdk.OneDec(), sdk.MustNewDecFromStr("-1.00")), true}, // invalid commission; max change rate > max rate - {NewCommission(sdk.OneDec(), sdk.MustNewDecFromStr("0.75"), sdk.MustNewDecFromStr("0.90")), true}, + {types.NewCommission(sdk.OneDec(), sdk.MustNewDecFromStr("0.75"), sdk.MustNewDecFromStr("0.90")), true}, // valid commission - {NewCommission(sdk.MustNewDecFromStr("0.20"), sdk.OneDec(), sdk.MustNewDecFromStr("0.10")), false}, + {types.NewCommission(sdk.MustNewDecFromStr("0.20"), sdk.OneDec(), sdk.MustNewDecFromStr("0.10")), false}, } for i, tc := range testCases { @@ -38,11 +39,11 @@ func TestCommissionValidate(t *testing.T) { func TestCommissionValidateNewRate(t *testing.T) { now := time.Now().UTC() - c1 := NewCommission(sdk.MustNewDecFromStr("0.40"), sdk.MustNewDecFromStr("0.80"), sdk.MustNewDecFromStr("0.10")) + c1 := types.NewCommission(sdk.MustNewDecFromStr("0.40"), sdk.MustNewDecFromStr("0.80"), sdk.MustNewDecFromStr("0.10")) c1.UpdateTime = now testCases := []struct { - input Commission + input types.Commission newRate sdk.Dec blockTime time.Time expectErr bool diff --git a/x/staking/types/data_test.go b/x/staking/types/data_test.go index 5505b9d5ce..3f8b290f94 100644 --- a/x/staking/types/data_test.go +++ b/x/staking/types/data_test.go @@ -1,12 +1,11 @@ -package types +package types_test import ( "fmt" - "github.com/tendermint/tendermint/crypto" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -23,7 +22,7 @@ var ( valAddr3 = sdk.ValAddress(pk3.Address()) emptyAddr sdk.ValAddress - emptyPubkey crypto.PubKey + emptyPubkey cryptotypes.PubKey ) func init() { diff --git a/x/staking/types/delegation_test.go b/x/staking/types/delegation_test.go index 7723570ff0..7ca5e8132e 100644 --- a/x/staking/types/delegation_test.go +++ b/x/staking/types/delegation_test.go @@ -1,4 +1,4 @@ -package types +package types_test import ( "encoding/json" @@ -9,10 +9,11 @@ import ( "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/staking/types" ) func TestDelegationEqual(t *testing.T) { - d1 := NewDelegation(sdk.AccAddress(valAddr1), valAddr2, sdk.NewDec(100)) + d1 := types.NewDelegation(sdk.AccAddress(valAddr1), valAddr2, sdk.NewDec(100)) d2 := d1 ok := d1.String() == d2.String() @@ -26,12 +27,12 @@ func TestDelegationEqual(t *testing.T) { } func TestDelegationString(t *testing.T) { - d := NewDelegation(sdk.AccAddress(valAddr1), valAddr2, sdk.NewDec(100)) + d := types.NewDelegation(sdk.AccAddress(valAddr1), valAddr2, sdk.NewDec(100)) require.NotEmpty(t, d.String()) } func TestUnbondingDelegationEqual(t *testing.T) { - ubd1 := NewUnbondingDelegation(sdk.AccAddress(valAddr1), valAddr2, 0, + ubd1 := types.NewUnbondingDelegation(sdk.AccAddress(valAddr1), valAddr2, 0, time.Unix(0, 0), sdk.NewInt(0)) ubd2 := ubd1 @@ -46,17 +47,17 @@ func TestUnbondingDelegationEqual(t *testing.T) { } func TestUnbondingDelegationString(t *testing.T) { - ubd := NewUnbondingDelegation(sdk.AccAddress(valAddr1), valAddr2, 0, + ubd := types.NewUnbondingDelegation(sdk.AccAddress(valAddr1), valAddr2, 0, time.Unix(0, 0), sdk.NewInt(0)) require.NotEmpty(t, ubd.String()) } func TestRedelegationEqual(t *testing.T) { - r1 := NewRedelegation(sdk.AccAddress(valAddr1), valAddr2, valAddr3, 0, + r1 := types.NewRedelegation(sdk.AccAddress(valAddr1), valAddr2, valAddr3, 0, time.Unix(0, 0), sdk.NewInt(0), sdk.NewDec(0)) - r2 := NewRedelegation(sdk.AccAddress(valAddr1), valAddr2, valAddr3, 0, + r2 := types.NewRedelegation(sdk.AccAddress(valAddr1), valAddr2, valAddr3, 0, time.Unix(0, 0), sdk.NewInt(0), sdk.NewDec(0)) @@ -71,7 +72,7 @@ func TestRedelegationEqual(t *testing.T) { } func TestRedelegationString(t *testing.T) { - r := NewRedelegation(sdk.AccAddress(valAddr1), valAddr2, valAddr3, 0, + r := types.NewRedelegation(sdk.AccAddress(valAddr1), valAddr2, valAddr3, 0, time.Unix(0, 0), sdk.NewInt(0), sdk.NewDec(10)) @@ -80,11 +81,11 @@ func TestRedelegationString(t *testing.T) { func TestDelegationResponses(t *testing.T) { cdc := codec.NewLegacyAmino() - dr1 := NewDelegationResp(sdk.AccAddress(valAddr1), valAddr2, sdk.NewDec(5), + dr1 := types.NewDelegationResp(sdk.AccAddress(valAddr1), valAddr2, sdk.NewDec(5), sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(5))) - dr2 := NewDelegationResp(sdk.AccAddress(valAddr1), valAddr3, sdk.NewDec(5), + dr2 := types.NewDelegationResp(sdk.AccAddress(valAddr1), valAddr3, sdk.NewDec(5), sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(5))) - drs := DelegationResponses{dr1, dr2} + drs := types.DelegationResponses{dr1, dr2} bz1, err := json.Marshal(dr1) require.NoError(t, err) @@ -102,20 +103,20 @@ func TestDelegationResponses(t *testing.T) { require.Equal(t, bz1, bz2) - var drs2 DelegationResponses + var drs2 types.DelegationResponses require.NoError(t, cdc.UnmarshalJSON(bz2, &drs2)) require.Equal(t, drs, drs2) } func TestRedelegationResponses(t *testing.T) { cdc := codec.NewLegacyAmino() - entries := []RedelegationEntryResponse{ - NewRedelegationEntryResponse(0, time.Unix(0, 0), sdk.NewDec(5), sdk.NewInt(5), sdk.NewInt(5)), - NewRedelegationEntryResponse(0, time.Unix(0, 0), sdk.NewDec(5), sdk.NewInt(5), sdk.NewInt(5)), + entries := []types.RedelegationEntryResponse{ + types.NewRedelegationEntryResponse(0, time.Unix(0, 0), sdk.NewDec(5), sdk.NewInt(5), sdk.NewInt(5)), + types.NewRedelegationEntryResponse(0, time.Unix(0, 0), sdk.NewDec(5), sdk.NewInt(5), sdk.NewInt(5)), } - rdr1 := NewRedelegationResponse(sdk.AccAddress(valAddr1), valAddr2, valAddr3, entries) - rdr2 := NewRedelegationResponse(sdk.AccAddress(valAddr2), valAddr1, valAddr3, entries) - rdrs := RedelegationResponses{rdr1, rdr2} + rdr1 := types.NewRedelegationResponse(sdk.AccAddress(valAddr1), valAddr2, valAddr3, entries) + rdr2 := types.NewRedelegationResponse(sdk.AccAddress(valAddr2), valAddr1, valAddr3, entries) + rdrs := types.RedelegationResponses{rdr1, rdr2} bz1, err := json.Marshal(rdr1) require.NoError(t, err) @@ -133,7 +134,7 @@ func TestRedelegationResponses(t *testing.T) { require.Equal(t, bz1, bz2) - var rdrs2 RedelegationResponses + var rdrs2 types.RedelegationResponses require.NoError(t, cdc.UnmarshalJSON(bz2, &rdrs2)) bz3, err := cdc.MarshalJSON(rdrs2) diff --git a/x/staking/types/exported.go b/x/staking/types/exported.go index f8cf8be99e..a02adc34ba 100644 --- a/x/staking/types/exported.go +++ b/x/staking/types/exported.go @@ -1,8 +1,10 @@ package types import ( + tmprotocrypto "github.com/tendermint/tendermint/proto/tendermint/crypto" + + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/tendermint/tendermint/crypto" ) // DelegationI delegation bond for a delegated proof of stake system @@ -21,7 +23,8 @@ type ValidatorI interface { IsUnbonded() bool // check if has status unbonded IsUnbonding() bool // check if has status unbonding GetOperator() sdk.ValAddress // operator address to receive/return validators coins - TmConsPubKey() (crypto.PubKey, error) // validation consensus pubkey + ConsPubKey() (cryptotypes.PubKey, error) // validation consensus pubkey (cryptotypes.PubKey) + TmConsPublicKey() (tmprotocrypto.PublicKey, error) // validation consensus pubkey (Tendermint) GetConsAddr() (sdk.ConsAddress, error) // validation consensus address GetTokens() sdk.Int // validation tokens GetBondedTokens() sdk.Int // validator bonded tokens diff --git a/x/staking/types/historical_info_test.go b/x/staking/types/historical_info_test.go index f7f6f2a869..ca3e48951e 100644 --- a/x/staking/types/historical_info_test.go +++ b/x/staking/types/historical_info_test.go @@ -1,10 +1,11 @@ -package types +package types_test import ( "math/rand" "sort" "testing" + "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/stretchr/testify/require" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" ) @@ -14,8 +15,8 @@ var header = tmproto.Header{ Height: 5, } -func createValidators(t *testing.T) []Validator { - return []Validator{ +func createValidators(t *testing.T) []types.Validator { + return []types.Validator{ newValidator(t, valAddr1, pk1), newValidator(t, valAddr2, pk2), newValidator(t, valAddr3, pk3), @@ -24,48 +25,48 @@ func createValidators(t *testing.T) []Validator { func TestHistoricalInfo(t *testing.T) { validators := createValidators(t) - hi := NewHistoricalInfo(header, validators) - require.True(t, sort.IsSorted(Validators(hi.Valset)), "Validators are not sorted") + hi := types.NewHistoricalInfo(header, validators) + require.True(t, sort.IsSorted(types.Validators(hi.Valset)), "Validators are not sorted") var value []byte require.NotPanics(t, func() { - value = ModuleCdc.MustMarshalBinaryBare(&hi) + value = types.ModuleCdc.MustMarshalBinaryBare(&hi) }) require.NotNil(t, value, "Marshalled HistoricalInfo is nil") - recv, err := UnmarshalHistoricalInfo(ModuleCdc, value) + recv, err := types.UnmarshalHistoricalInfo(types.ModuleCdc, value) require.Nil(t, err, "Unmarshalling HistoricalInfo failed") require.Equal(t, hi.Header, recv.Header) for i := range hi.Valset { require.True(t, hi.Valset[i].Equal(&recv.Valset[i])) } - require.True(t, sort.IsSorted(Validators(hi.Valset)), "Validators are not sorted") + require.True(t, sort.IsSorted(types.Validators(hi.Valset)), "Validators are not sorted") } func TestValidateBasic(t *testing.T) { validators := createValidators(t) - hi := HistoricalInfo{ + hi := types.HistoricalInfo{ Header: header, } - err := ValidateBasic(hi) + err := types.ValidateBasic(hi) require.Error(t, err, "ValidateBasic passed on nil ValSet") // Ensure validators are not sorted - for sort.IsSorted(Validators(validators)) { + for sort.IsSorted(types.Validators(validators)) { rand.Shuffle(len(validators), func(i, j int) { it := validators[i] validators[i] = validators[j] validators[j] = it }) } - hi = HistoricalInfo{ + hi = types.HistoricalInfo{ Header: header, Valset: validators, } - err = ValidateBasic(hi) + err = types.ValidateBasic(hi) require.Error(t, err, "ValidateBasic passed on unsorted ValSet") - hi = NewHistoricalInfo(header, validators) - err = ValidateBasic(hi) + hi = types.NewHistoricalInfo(header, validators) + err = types.ValidateBasic(hi) require.NoError(t, err, "ValidateBasic failed on valid HistoricalInfo") } diff --git a/x/staking/types/keys.go b/x/staking/types/keys.go index 71aa587506..40d62244a0 100644 --- a/x/staking/types/keys.go +++ b/x/staking/types/keys.go @@ -71,17 +71,8 @@ func AddressFromLastValidatorPowerKey(key []byte) []byte { // VALUE: validator operator address ([]byte) func GetValidatorsByPowerIndexKey(validator Validator) []byte { // NOTE the address doesn't need to be stored because counter bytes must always be different - return getValidatorPowerRank(validator) -} + // NOTE the larger values are of higher value -// get the bonded validator index key for an operator address -func GetLastValidatorPowerKey(operator sdk.ValAddress) []byte { - return append(LastValidatorPowerKey, operator...) -} - -// get the power ranking of a validator -// NOTE the larger values are of higher value -func getValidatorPowerRank(validator Validator) []byte { consensusPower := sdk.TokensToConsensusPower(validator.Tokens) consensusPowerBytes := make([]byte, 8) binary.BigEndian.PutUint64(consensusPowerBytes, uint64(consensusPower)) @@ -109,6 +100,11 @@ func getValidatorPowerRank(validator Validator) []byte { return key } +// get the bonded validator index key for an operator address +func GetLastValidatorPowerKey(operator sdk.ValAddress) []byte { + return append(LastValidatorPowerKey, operator...) +} + // parse the validators operator address from power rank key func ParseValidatorPowerRankKey(key []byte) (operAddr []byte) { powerBytesLen := 8 diff --git a/x/staking/types/keys_test.go b/x/staking/types/keys_test.go index 3569b126c1..0f63617f26 100644 --- a/x/staking/types/keys_test.go +++ b/x/staking/types/keys_test.go @@ -1,4 +1,4 @@ -package types +package types_test import ( "bytes" @@ -11,6 +11,7 @@ import ( "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/staking/types" ) var ( @@ -33,7 +34,7 @@ func TestGetValidatorPowerRank(t *testing.T) { val4.Tokens = sdk.TokensFromConsensusPower(x.Int64()) tests := []struct { - validator Validator + validator types.Validator wantHex string }{ {val1, "2300000000000000009c288ede7df62742fc3b7d0962045a8cef0f79f6"}, @@ -42,7 +43,7 @@ func TestGetValidatorPowerRank(t *testing.T) { {val4, "2300000100000000009c288ede7df62742fc3b7d0962045a8cef0f79f6"}, } for i, tt := range tests { - got := hex.EncodeToString(getValidatorPowerRank(tt.validator)) + got := hex.EncodeToString(types.GetValidatorsByPowerIndexKey(tt.validator)) require.Equal(t, tt.wantHex, got, "Keys did not match on test case %d", i) } @@ -63,7 +64,7 @@ func TestGetREDByValDstIndexKey(t *testing.T) { "363ab62f0d93849be495e21e3e9013a517038f45bd5ef3b5f25c54946d4a89fc0d09d2f126614540f263d771218209d8bd03c482f69dfba57310f08609"}, } for i, tt := range tests { - got := hex.EncodeToString(GetREDByValDstIndexKey(tt.delAddr, tt.valSrcAddr, tt.valDstAddr)) + got := hex.EncodeToString(types.GetREDByValDstIndexKey(tt.delAddr, tt.valSrcAddr, tt.valDstAddr)) require.Equal(t, tt.wantHex, got, "Keys did not match on test case %d", i) } @@ -84,7 +85,7 @@ func TestGetREDByValSrcIndexKey(t *testing.T) { "3563d771218209d8bd03c482f69dfba57310f086095ef3b5f25c54946d4a89fc0d09d2f126614540f23ab62f0d93849be495e21e3e9013a517038f45bd"}, } for i, tt := range tests { - got := hex.EncodeToString(GetREDByValSrcIndexKey(tt.delAddr, tt.valSrcAddr, tt.valDstAddr)) + got := hex.EncodeToString(types.GetREDByValSrcIndexKey(tt.delAddr, tt.valSrcAddr, tt.valDstAddr)) require.Equal(t, tt.wantHex, got, "Keys did not match on test case %d", i) } @@ -94,8 +95,8 @@ func TestGetValidatorQueueKey(t *testing.T) { ts := time.Now() height := int64(1024) - bz := GetValidatorQueueKey(ts, height) - rTs, rHeight, err := ParseValidatorQueueKey(bz) + bz := types.GetValidatorQueueKey(ts, height) + rTs, rHeight, err := types.ParseValidatorQueueKey(bz) require.NoError(t, err) require.Equal(t, ts.UTC(), rTs.UTC()) require.Equal(t, rHeight, height) @@ -105,11 +106,11 @@ func TestTestGetValidatorQueueKeyOrder(t *testing.T) { ts := time.Now().UTC() height := int64(1000) - endKey := GetValidatorQueueKey(ts, height) + endKey := types.GetValidatorQueueKey(ts, height) - keyA := GetValidatorQueueKey(ts.Add(-10*time.Minute), height-10) - keyB := GetValidatorQueueKey(ts.Add(-5*time.Minute), height+50) - keyC := GetValidatorQueueKey(ts.Add(10*time.Minute), height+100) + keyA := types.GetValidatorQueueKey(ts.Add(-10*time.Minute), height-10) + keyB := types.GetValidatorQueueKey(ts.Add(-5*time.Minute), height+50) + keyC := types.GetValidatorQueueKey(ts.Add(10*time.Minute), height+100) require.Equal(t, -1, bytes.Compare(keyA, endKey)) // keyA <= endKey require.Equal(t, -1, bytes.Compare(keyB, endKey)) // keyB <= endKey diff --git a/x/staking/types/msg.go b/x/staking/types/msg.go index 51e19ac263..85d0c1d3c2 100644 --- a/x/staking/types/msg.go +++ b/x/staking/types/msg.go @@ -3,9 +3,8 @@ package types import ( "bytes" - "github.com/tendermint/tendermint/crypto" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) @@ -32,7 +31,7 @@ var ( // NewMsgCreateValidator creates a new MsgCreateValidator instance. // Delegator address and validator address are the same. func NewMsgCreateValidator( - valAddr sdk.ValAddress, pubKey crypto.PubKey, selfDelegation sdk.Coin, + valAddr sdk.ValAddress, pubKey cryptotypes.PubKey, selfDelegation sdk.Coin, description Description, commission CommissionRates, minSelfDelegation sdk.Int, ) (*MsgCreateValidator, error) { pkAny, err := codectypes.PackAny(pubKey) @@ -140,7 +139,7 @@ func (msg MsgCreateValidator) ValidateBasic() error { // UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces func (msg MsgCreateValidator) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error { - var pubKey crypto.PubKey + var pubKey cryptotypes.PubKey return unpacker.UnpackAny(msg.Pubkey, &pubKey) } diff --git a/x/staking/types/msg_test.go b/x/staking/types/msg_test.go index eb83b33162..3b858a64dd 100644 --- a/x/staking/types/msg_test.go +++ b/x/staking/types/msg_test.go @@ -1,10 +1,9 @@ -package types +package types_test import ( "testing" "github.com/stretchr/testify/require" - "github.com/tendermint/tendermint/crypto" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" @@ -12,6 +11,7 @@ import ( "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/staking/types" ) var ( @@ -22,7 +22,7 @@ var ( func TestMsgDecode(t *testing.T) { registry := codectypes.NewInterfaceRegistry() cryptocodec.RegisterInterfaces(registry) - RegisterInterfaces(registry) + types.RegisterInterfaces(registry) cdc := codec.NewProtoCodec(registry) // firstly we start testing the pubkey serialization @@ -36,8 +36,8 @@ func TestMsgDecode(t *testing.T) { // now let's try to serialize the whole message - commission1 := NewCommissionRates(sdk.ZeroDec(), sdk.ZeroDec(), sdk.ZeroDec()) - msg, err := NewMsgCreateValidator(valAddr1, pk1, coinPos, Description{}, commission1, sdk.OneInt()) + commission1 := types.NewCommissionRates(sdk.ZeroDec(), sdk.ZeroDec(), sdk.ZeroDec()) + msg, err := types.NewMsgCreateValidator(valAddr1, pk1, coinPos, types.Description{}, commission1, sdk.OneInt()) require.NoError(t, err) msgSerialized, err := codec.MarshalAny(cdc, msg) require.NoError(t, err) @@ -45,7 +45,7 @@ func TestMsgDecode(t *testing.T) { var msgUnmarshaled sdk.Msg err = codec.UnmarshalAny(cdc, &msgUnmarshaled, msgSerialized) require.NoError(t, err) - msg2, ok := msgUnmarshaled.(*MsgCreateValidator) + msg2, ok := msgUnmarshaled.(*types.MsgCreateValidator) require.True(t, ok) require.True(t, msg.Value.IsEqual(msg2.Value)) require.True(t, msg.Pubkey.Equal(msg2.Pubkey)) @@ -53,15 +53,15 @@ func TestMsgDecode(t *testing.T) { // test ValidateBasic for MsgCreateValidator func TestMsgCreateValidator(t *testing.T) { - commission1 := NewCommissionRates(sdk.ZeroDec(), sdk.ZeroDec(), sdk.ZeroDec()) - commission2 := NewCommissionRates(sdk.NewDec(5), sdk.NewDec(5), sdk.NewDec(5)) + commission1 := types.NewCommissionRates(sdk.ZeroDec(), sdk.ZeroDec(), sdk.ZeroDec()) + commission2 := types.NewCommissionRates(sdk.NewDec(5), sdk.NewDec(5), sdk.NewDec(5)) tests := []struct { name, moniker, identity, website, securityContact, details string - CommissionRates CommissionRates + CommissionRates types.CommissionRates minSelfDelegation sdk.Int validatorAddr sdk.ValAddress - pubkey crypto.PubKey + pubkey cryptotypes.PubKey bond sdk.Coin expectPass bool }{ @@ -79,8 +79,8 @@ func TestMsgCreateValidator(t *testing.T) { for _, tc := range tests { t.Logf("Test: %s, pk=%t", tc.name, tc.pubkey) - description := NewDescription(tc.moniker, tc.identity, tc.website, tc.securityContact, tc.details) - msg, err := NewMsgCreateValidator(tc.validatorAddr, tc.pubkey, tc.bond, description, tc.CommissionRates, tc.minSelfDelegation) + description := types.NewDescription(tc.moniker, tc.identity, tc.website, tc.securityContact, tc.details) + msg, err := types.NewMsgCreateValidator(tc.validatorAddr, tc.pubkey, tc.bond, description, tc.CommissionRates, tc.minSelfDelegation) require.NoError(t, err) if tc.expectPass { require.Nil(t, msg.ValidateBasic(), "test: %v", tc.name) @@ -106,10 +106,10 @@ func TestMsgEditValidator(t *testing.T) { } for _, tc := range tests { - description := NewDescription(tc.moniker, tc.identity, tc.website, tc.securityContact, tc.details) + description := types.NewDescription(tc.moniker, tc.identity, tc.website, tc.securityContact, tc.details) newRate := sdk.ZeroDec() - msg := NewMsgEditValidator(tc.validatorAddr, description, &newRate, &tc.minSelfDelegation) + msg := types.NewMsgEditValidator(tc.validatorAddr, description, &newRate, &tc.minSelfDelegation) if tc.expectPass { require.Nil(t, msg.ValidateBasic(), "test: %v", tc.name) } else { @@ -136,7 +136,7 @@ func TestMsgDelegate(t *testing.T) { } for _, tc := range tests { - msg := NewMsgDelegate(tc.delegatorAddr, tc.validatorAddr, tc.bond) + msg := types.NewMsgDelegate(tc.delegatorAddr, tc.validatorAddr, tc.bond) if tc.expectPass { require.Nil(t, msg.ValidateBasic(), "test: %v", tc.name) } else { @@ -164,7 +164,7 @@ func TestMsgBeginRedelegate(t *testing.T) { } for _, tc := range tests { - msg := NewMsgBeginRedelegate(tc.delegatorAddr, tc.validatorSrcAddr, tc.validatorDstAddr, tc.amount) + msg := types.NewMsgBeginRedelegate(tc.delegatorAddr, tc.validatorSrcAddr, tc.validatorDstAddr, tc.amount) if tc.expectPass { require.Nil(t, msg.ValidateBasic(), "test: %v", tc.name) } else { @@ -190,7 +190,7 @@ func TestMsgUndelegate(t *testing.T) { } for _, tc := range tests { - msg := NewMsgUndelegate(tc.delegatorAddr, tc.validatorAddr, tc.amount) + msg := types.NewMsgUndelegate(tc.delegatorAddr, tc.validatorAddr, tc.amount) if tc.expectPass { require.Nil(t, msg.ValidateBasic(), "test: %v", tc.name) } else { diff --git a/x/staking/types/params_test.go b/x/staking/types/params_test.go index c18700ef43..05a7ea956f 100644 --- a/x/staking/types/params_test.go +++ b/x/staking/types/params_test.go @@ -1,14 +1,15 @@ -package types +package types_test import ( "testing" + "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/stretchr/testify/require" ) func TestParamsEqual(t *testing.T) { - p1 := DefaultParams() - p2 := DefaultParams() + p1 := types.DefaultParams() + p2 := types.DefaultParams() ok := p1.Equal(p2) require.True(t, ok) diff --git a/x/staking/types/validator.go b/x/staking/types/validator.go index 19e032dbab..c99aafd4c3 100644 --- a/x/staking/types/validator.go +++ b/x/staking/types/validator.go @@ -8,13 +8,12 @@ import ( "time" abci "github.com/tendermint/tendermint/abci/types" - "github.com/tendermint/tendermint/crypto" - "github.com/tendermint/tendermint/crypto/encoding" - tmtypes "github.com/tendermint/tendermint/types" + tmprotocrypto "github.com/tendermint/tendermint/proto/tendermint/crypto" "gopkg.in/yaml.v2" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" + cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" @@ -40,7 +39,7 @@ var _ ValidatorI = Validator{} // NewValidator constructs a new Validator //nolint:interfacer -func NewValidator(operator sdk.ValAddress, pubKey crypto.PubKey, description Description) (Validator, error) { +func NewValidator(operator sdk.ValAddress, pubKey cryptotypes.PubKey, description Description) (Validator, error) { pkAny, err := codectypes.PackAny(pubKey) if err != nil { return Validator{}, err @@ -78,7 +77,7 @@ func (v Validators) String() (out string) { return strings.TrimSpace(out) } -// ToSDKValidators - convenience function convert []Validators to []sdk.Validators +// ToSDKValidators - convenience function convert []Validator to []sdk.ValidatorI func (v Validators) ToSDKValidators() (validators []ValidatorI) { for _, val := range v { validators = append(validators, val) @@ -87,20 +86,6 @@ func (v Validators) ToSDKValidators() (validators []ValidatorI) { return validators } -// ToTmValidators casts all validators to the corresponding tendermint type. -func (v Validators) ToTmValidators() ([]*tmtypes.Validator, error) { - validators := make([]*tmtypes.Validator, len(v)) - var err error - for i, val := range v { - validators[i], err = val.ToTmValidator() - if err != nil { - return nil, err - } - } - - return validators, nil -} - // Sort Validators sorts validator array in ascending operator address order func (v Validators) Sort() { sort.Sort(v) @@ -273,17 +258,13 @@ func (d Description) EnsureLength() (Description, error) { // ABCIValidatorUpdate returns an abci.ValidatorUpdate from a staking validator type // with the full validator power func (v Validator) ABCIValidatorUpdate() abci.ValidatorUpdate { - consPk, err := v.TmConsPubKey() - if err != nil { - panic(err) - } - pk, err := encoding.PubKeyToProto(consPk) + tmProtoPk, err := v.TmConsPublicKey() if err != nil { panic(err) } return abci.ValidatorUpdate{ - PubKey: pk, + PubKey: tmProtoPk, Power: v.ConsensusPower(), } } @@ -291,30 +272,17 @@ func (v Validator) ABCIValidatorUpdate() abci.ValidatorUpdate { // ABCIValidatorUpdateZero returns an abci.ValidatorUpdate from a staking validator type // with zero power used for validator updates. func (v Validator) ABCIValidatorUpdateZero() abci.ValidatorUpdate { - consPk, err := v.TmConsPubKey() - if err != nil { - panic(err) - } - pk, err := encoding.PubKeyToProto(consPk) + tmProtoPk, err := v.TmConsPublicKey() if err != nil { panic(err) } return abci.ValidatorUpdate{ - PubKey: pk, + PubKey: tmProtoPk, Power: 0, } } -// ToTmValidator casts an SDK validator to a tendermint type Validator. -func (v Validator) ToTmValidator() (*tmtypes.Validator, error) { - consPk, err := v.TmConsPubKey() - if err != nil { - return nil, err - } - return tmtypes.NewValidator(consPk, v.ConsensusPower()), nil -} - // SetInitialCommission attempts to set a validator's initial commission. An // error is returned if the commission is invalid. func (v Validator) SetInitialCommission(commission Commission) (Validator, error) { @@ -379,8 +347,8 @@ func (v Validator) BondedTokens() sdk.Int { return sdk.ZeroInt() } -// get the consensus-engine power -// a reduction of 10^6 from validator tokens is applied +// ConsensusPower gets the consensus-engine power. Aa reduction of 10^6 from +// validator tokens is applied func (v Validator) ConsensusPower() int64 { if v.IsBonded() { return v.PotentialConsensusPower() @@ -389,7 +357,7 @@ func (v Validator) ConsensusPower() int64 { return 0 } -// potential consensus-engine power +// PotentialConsensusPower returns the potential consensus-engine power. func (v Validator) PotentialConsensusPower() int64 { return sdk.TokensToConsensusPower(v.Tokens) } @@ -501,30 +469,39 @@ func (v Validator) GetOperator() sdk.ValAddress { return addr } -// TmConsPubKey casts Validator.ConsensusPubkey to crypto.PubKey -func (v Validator) TmConsPubKey() (crypto.PubKey, error) { +// ConsPubKey returns the validator PubKey as a cryptotypes.PubKey. +func (v Validator) ConsPubKey() (cryptotypes.PubKey, error) { pk, ok := v.ConsensusPubkey.GetCachedValue().(cryptotypes.PubKey) if !ok { - return nil, sdkerrors.Wrapf(sdkerrors.ErrInvalidType, "Expecting crypto.PubKey, got %T", pk) + return nil, sdkerrors.Wrapf(sdkerrors.ErrInvalidType, "expecting cryptotypes.PubKey, got %T", pk) } - // The way things are refactored now, v.ConsensusPubkey is sometimes a TM - // ed25519 pubkey, sometimes our own ed25519 pubkey. This is very ugly and - // inconsistent. - // Luckily, here we coerce it into a TM ed25519 pubkey always, as this - // pubkey will be passed into TM (eg calling encoding.PubKeyToProto). - if intoTmPk, ok := pk.(cryptotypes.IntoTmPubKey); ok { - return intoTmPk.AsTmPubKey(), nil + return pk, nil + +} + +// TmConsPublicKey casts Validator.ConsensusPubkey to tmprotocrypto.PubKey. +func (v Validator) TmConsPublicKey() (tmprotocrypto.PublicKey, error) { + pk, err := v.ConsPubKey() + if err != nil { + return tmprotocrypto.PublicKey{}, err } - return nil, sdkerrors.Wrapf(sdkerrors.ErrInvalidPubKey, "Logic error: ConsensusPubkey must be an SDK key and SDK PubKey types must be convertible to tendermint PubKey; got: %T", pk) + + tmPk, err := cryptocodec.ToTmProtoPublicKey(pk) + if err != nil { + return tmprotocrypto.PublicKey{}, err + } + + return tmPk, nil } // GetConsAddr extracts Consensus key address func (v Validator) GetConsAddr() (sdk.ConsAddress, error) { - pk, err := v.TmConsPubKey() - if err != nil { - return sdk.ConsAddress{}, err + pk, ok := v.ConsensusPubkey.GetCachedValue().(cryptotypes.PubKey) + if !ok { + return nil, sdkerrors.Wrapf(sdkerrors.ErrInvalidType, "expecting cryptotypes.PubKey, got %T", pk) } + return sdk.ConsAddress(pk.Address()), nil } @@ -537,6 +514,6 @@ func (v Validator) GetDelegatorShares() sdk.Dec { return v.DelegatorShares } // UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces func (v Validator) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error { - var pk crypto.PubKey + var pk cryptotypes.PubKey return unpacker.UnpackAny(v.ConsensusPubkey, &pk) } diff --git a/x/staking/types/validator_test.go b/x/staking/types/validator_test.go index 64afc97681..08204215d5 100644 --- a/x/staking/types/validator_test.go +++ b/x/staking/types/validator_test.go @@ -1,4 +1,4 @@ -package types +package types_test import ( "math/rand" @@ -7,14 +7,15 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/tendermint/tendermint/crypto" - "github.com/tendermint/tendermint/crypto/encoding" tmtypes "github.com/tendermint/tendermint/types" "github.com/cosmos/cosmos-sdk/codec/legacy" + cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/staking/teststaking" + "github.com/cosmos/cosmos-sdk/x/staking/types" ) func TestValidatorTestEquivalent(t *testing.T) { @@ -27,19 +28,19 @@ func TestValidatorTestEquivalent(t *testing.T) { } func TestUpdateDescription(t *testing.T) { - d1 := Description{ + d1 := types.Description{ Website: "https://validator.cosmos", Details: "Test validator", } - d2 := Description{ - Moniker: DoNotModifyDesc, - Identity: DoNotModifyDesc, - Website: DoNotModifyDesc, - Details: DoNotModifyDesc, + d2 := types.Description{ + Moniker: types.DoNotModifyDesc, + Identity: types.DoNotModifyDesc, + Website: types.DoNotModifyDesc, + Details: types.DoNotModifyDesc, } - d3 := Description{ + d3 := types.Description{ Moniker: "", Identity: "", Website: "", @@ -58,9 +59,7 @@ func TestUpdateDescription(t *testing.T) { func TestABCIValidatorUpdate(t *testing.T) { validator := newValidator(t, valAddr1, pk1) abciVal := validator.ABCIValidatorUpdate() - consPk, err := validator.TmConsPubKey() - require.NoError(t, err) - pk, err := encoding.PubKeyToProto(consPk) + pk, err := validator.TmConsPublicKey() require.NoError(t, err) require.Equal(t, pk, abciVal.PubKey) require.Equal(t, validator.BondedTokens().Int64(), abciVal.Power) @@ -69,9 +68,7 @@ func TestABCIValidatorUpdate(t *testing.T) { func TestABCIValidatorUpdateZero(t *testing.T) { validator := newValidator(t, valAddr1, pk1) abciVal := validator.ABCIValidatorUpdateZero() - consPk, err := validator.TmConsPubKey() - require.NoError(t, err) - pk, err := encoding.PubKeyToProto(consPk) + pk, err := validator.TmConsPublicKey() require.NoError(t, err) require.Equal(t, pk, abciVal.PubKey) require.Equal(t, int64(0), abciVal.Power) @@ -94,8 +91,8 @@ func TestRemoveTokens(t *testing.T) { require.Equal(t, int64(90), validator.Tokens.Int64()) // update validator to from bonded -> unbonded - validator = validator.UpdateStatus(Unbonded) - require.Equal(t, Unbonded, validator.Status) + validator = validator.UpdateStatus(types.Unbonded) + require.Equal(t, types.Unbonded, validator.Status) validator = validator.RemoveTokens(sdk.NewInt(10)) require.Panics(t, func() { validator.RemoveTokens(sdk.NewInt(-1)) }) @@ -104,7 +101,7 @@ func TestRemoveTokens(t *testing.T) { func TestAddTokensValidatorBonded(t *testing.T) { validator := newValidator(t, valAddr1, pk1) - validator = validator.UpdateStatus(Bonded) + validator = validator.UpdateStatus(types.Bonded) validator, delShares := validator.AddTokensFromDel(sdk.NewInt(10)) assert.True(sdk.DecEq(t, sdk.NewDec(10), delShares)) @@ -114,11 +111,11 @@ func TestAddTokensValidatorBonded(t *testing.T) { func TestAddTokensValidatorUnbonding(t *testing.T) { validator := newValidator(t, valAddr1, pk1) - validator = validator.UpdateStatus(Unbonding) + validator = validator.UpdateStatus(types.Unbonding) validator, delShares := validator.AddTokensFromDel(sdk.NewInt(10)) assert.True(sdk.DecEq(t, sdk.NewDec(10), delShares)) - assert.Equal(t, Unbonding, validator.Status) + assert.Equal(t, types.Unbonding, validator.Status) assert.True(sdk.IntEq(t, sdk.NewInt(10), validator.Tokens)) assert.True(sdk.DecEq(t, sdk.NewDec(10), validator.DelegatorShares)) } @@ -126,21 +123,21 @@ func TestAddTokensValidatorUnbonding(t *testing.T) { func TestAddTokensValidatorUnbonded(t *testing.T) { validator := newValidator(t, valAddr1, pk1) - validator = validator.UpdateStatus(Unbonded) + validator = validator.UpdateStatus(types.Unbonded) validator, delShares := validator.AddTokensFromDel(sdk.NewInt(10)) assert.True(sdk.DecEq(t, sdk.NewDec(10), delShares)) - assert.Equal(t, Unbonded, validator.Status) + assert.Equal(t, types.Unbonded, validator.Status) assert.True(sdk.IntEq(t, sdk.NewInt(10), validator.Tokens)) assert.True(sdk.DecEq(t, sdk.NewDec(10), validator.DelegatorShares)) } // TODO refactor to make simpler like the AddToken tests above func TestRemoveDelShares(t *testing.T) { - valA := Validator{ + valA := types.Validator{ OperatorAddress: valAddr1.String(), ConsensusPubkey: pk1Any, - Status: Bonded, + Status: types.Bonded, Tokens: sdk.NewInt(100), DelegatorShares: sdk.NewDec(100), } @@ -175,20 +172,20 @@ func TestAddTokensFromDel(t *testing.T) { func TestUpdateStatus(t *testing.T) { validator := newValidator(t, valAddr1, pk1) validator, _ = validator.AddTokensFromDel(sdk.NewInt(100)) - require.Equal(t, Unbonded, validator.Status) + require.Equal(t, types.Unbonded, validator.Status) require.Equal(t, int64(100), validator.Tokens.Int64()) // Unbonded to Bonded - validator = validator.UpdateStatus(Bonded) - require.Equal(t, Bonded, validator.Status) + validator = validator.UpdateStatus(types.Bonded) + require.Equal(t, types.Bonded, validator.Status) // Bonded to Unbonding - validator = validator.UpdateStatus(Unbonding) - require.Equal(t, Unbonding, validator.Status) + validator = validator.UpdateStatus(types.Unbonding) + require.Equal(t, types.Unbonding, validator.Status) // Unbonding to Bonded - validator = validator.UpdateStatus(Bonded) - require.Equal(t, Bonded, validator.Status) + validator = validator.UpdateStatus(types.Bonded) + require.Equal(t, types.Bonded, validator.Status) } func TestPossibleOverflow(t *testing.T) { @@ -205,8 +202,8 @@ func TestValidatorMarshalUnmarshalJSON(t *testing.T) { js, err := legacy.Cdc.MarshalJSON(validator) require.NoError(t, err) require.NotEmpty(t, js) - require.Contains(t, string(js), "\"consensus_pubkey\":{\"type\":\"cosmos/PubKeyEd25519\"") - got := &Validator{} + require.Contains(t, string(js), "\"consensus_pubkey\":{\"type\":\"tendermint/PubKeyEd25519\"") + got := &types.Validator{} err = legacy.Cdc.UnmarshalJSON(js, got) assert.NoError(t, err) assert.True(t, validator.Equal(got)) @@ -215,17 +212,17 @@ func TestValidatorMarshalUnmarshalJSON(t *testing.T) { func TestValidatorSetInitialCommission(t *testing.T) { val := newValidator(t, valAddr1, pk1) testCases := []struct { - validator Validator - commission Commission + validator types.Validator + commission types.Commission expectedErr bool }{ - {val, NewCommission(sdk.ZeroDec(), sdk.ZeroDec(), sdk.ZeroDec()), false}, - {val, NewCommission(sdk.ZeroDec(), sdk.NewDecWithPrec(-1, 1), sdk.ZeroDec()), true}, - {val, NewCommission(sdk.ZeroDec(), sdk.NewDec(15000000000), sdk.ZeroDec()), true}, - {val, NewCommission(sdk.NewDecWithPrec(-1, 1), sdk.ZeroDec(), sdk.ZeroDec()), true}, - {val, NewCommission(sdk.NewDecWithPrec(2, 1), sdk.NewDecWithPrec(1, 1), sdk.ZeroDec()), true}, - {val, NewCommission(sdk.ZeroDec(), sdk.ZeroDec(), sdk.NewDecWithPrec(-1, 1)), true}, - {val, NewCommission(sdk.ZeroDec(), sdk.NewDecWithPrec(1, 1), sdk.NewDecWithPrec(2, 1)), true}, + {val, types.NewCommission(sdk.ZeroDec(), sdk.ZeroDec(), sdk.ZeroDec()), false}, + {val, types.NewCommission(sdk.ZeroDec(), sdk.NewDecWithPrec(-1, 1), sdk.ZeroDec()), true}, + {val, types.NewCommission(sdk.ZeroDec(), sdk.NewDec(15000000000), sdk.ZeroDec()), true}, + {val, types.NewCommission(sdk.NewDecWithPrec(-1, 1), sdk.ZeroDec(), sdk.ZeroDec()), true}, + {val, types.NewCommission(sdk.NewDecWithPrec(2, 1), sdk.NewDecWithPrec(1, 1), sdk.ZeroDec()), true}, + {val, types.NewCommission(sdk.ZeroDec(), sdk.ZeroDec(), sdk.NewDecWithPrec(-1, 1)), true}, + {val, types.NewCommission(sdk.ZeroDec(), sdk.NewDecWithPrec(1, 1), sdk.NewDecWithPrec(2, 1)), true}, } for i, tc := range testCases { @@ -248,8 +245,8 @@ func TestValidatorSetInitialCommission(t *testing.T) { // Check that sort will create deterministic ordering of validators func TestValidatorsSortDeterminism(t *testing.T) { - vals := make([]Validator, 10) - sortedVals := make([]Validator, 10) + vals := make([]types.Validator, 10) + sortedVals := make([]types.Validator, 10) // Create random validator slice for i := range vals { @@ -258,7 +255,7 @@ func TestValidatorsSortDeterminism(t *testing.T) { } // Save sorted copy - sort.Sort(Validators(vals)) + sort.Sort(types.Validators(vals)) copy(sortedVals, vals) // Randomly shuffle validators, sort, and check it is equal to original sort @@ -269,20 +266,20 @@ func TestValidatorsSortDeterminism(t *testing.T) { vals[j] = it }) - Validators(vals).Sort() + types.Validators(vals).Sort() require.Equal(t, sortedVals, vals, "Validator sort returned different slices") } } // Check SortTendermint sorts the same as tendermint func TestValidatorsSortTendermint(t *testing.T) { - vals := make([]Validator, 100) + vals := make([]types.Validator, 100) for i := range vals { pk := ed25519.GenPrivKey().PubKey() pk2 := ed25519.GenPrivKey().PubKey() vals[i] = newValidator(t, sdk.ValAddress(pk2.Address()), pk) - vals[i].Status = Bonded + vals[i].Status = types.Bonded vals[i].Tokens = sdk.NewInt(rand.Int63()) } // create some validators with the same power @@ -290,62 +287,64 @@ func TestValidatorsSortTendermint(t *testing.T) { vals[i].Tokens = sdk.NewInt(1000000) } - valz := Validators(vals) + valz := types.Validators(vals) // create expected tendermint validators by converting to tendermint then sorting - expectedVals, err := valz.ToTmValidators() + expectedVals, err := teststaking.ToTmValidators(valz) require.NoError(t, err) sort.Sort(tmtypes.ValidatorsByVotingPower(expectedVals)) // sort in SDK and then convert to tendermint - sort.Sort(ValidatorsByVotingPower(valz)) - actualVals, err := valz.ToTmValidators() + sort.Sort(types.ValidatorsByVotingPower(valz)) + actualVals, err := teststaking.ToTmValidators(valz) require.NoError(t, err) require.Equal(t, expectedVals, actualVals, "sorting in SDK is not the same as sorting in Tendermint") } func TestValidatorToTm(t *testing.T) { - vals := make(Validators, 10) + vals := make(types.Validators, 10) expected := make([]*tmtypes.Validator, 10) for i := range vals { pk := ed25519.GenPrivKey().PubKey() val := newValidator(t, sdk.ValAddress(pk.Address()), pk) - val.Status = Bonded + val.Status = types.Bonded val.Tokens = sdk.NewInt(rand.Int63()) vals[i] = val - expected[i] = tmtypes.NewValidator(pk.(cryptotypes.IntoTmPubKey).AsTmPubKey(), val.ConsensusPower()) + tmPk, err := cryptocodec.ToTmPubKeyInterface(pk) + require.NoError(t, err) + expected[i] = tmtypes.NewValidator(tmPk, val.ConsensusPower()) } - vs, err := vals.ToTmValidators() + vs, err := teststaking.ToTmValidators(vals) require.NoError(t, err) require.Equal(t, expected, vs) } func TestBondStatus(t *testing.T) { - require.False(t, Unbonded == Bonded) - require.False(t, Unbonded == Unbonding) - require.False(t, Bonded == Unbonding) - require.Equal(t, BondStatus(4).String(), "4") - require.Equal(t, BondStatusUnspecified, Unspecified.String()) - require.Equal(t, BondStatusUnbonded, Unbonded.String()) - require.Equal(t, BondStatusBonded, Bonded.String()) - require.Equal(t, BondStatusUnbonding, Unbonding.String()) + require.False(t, types.Unbonded == types.Bonded) + require.False(t, types.Unbonded == types.Unbonding) + require.False(t, types.Bonded == types.Unbonding) + require.Equal(t, types.BondStatus(4).String(), "4") + require.Equal(t, types.BondStatusUnspecified, types.Unspecified.String()) + require.Equal(t, types.BondStatusUnbonded, types.Unbonded.String()) + require.Equal(t, types.BondStatusBonded, types.Bonded.String()) + require.Equal(t, types.BondStatusUnbonding, types.Unbonding.String()) } -func mkValidator(tokens int64, shares sdk.Dec) Validator { - return Validator{ +func mkValidator(tokens int64, shares sdk.Dec) types.Validator { + return types.Validator{ OperatorAddress: valAddr1.String(), ConsensusPubkey: pk1Any, - Status: Bonded, + Status: types.Bonded, Tokens: sdk.NewInt(tokens), DelegatorShares: shares, } } // Creates a new validators and asserts the error check. -func newValidator(t *testing.T, operator sdk.ValAddress, pubKey crypto.PubKey) Validator { - v, err := NewValidator(operator, pubKey, Description{}) +func newValidator(t *testing.T, operator sdk.ValAddress, pubKey cryptotypes.PubKey) types.Validator { + v, err := types.NewValidator(operator, pubKey, types.Description{}) require.NoError(t, err) return v } From 55772aec8ca2c79808e80ed71b6a0340b59473c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?colin=20axn=C3=A9r?= <25233464+colin-axner@users.noreply.github.com> Date: Mon, 9 Nov 2020 18:12:00 +0100 Subject: [PATCH 063/136] update err to match others (#7857) Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- x/ibc/light-clients/07-tendermint/types/client_state.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/ibc/light-clients/07-tendermint/types/client_state.go b/x/ibc/light-clients/07-tendermint/types/client_state.go index cb6e4630fa..4e4104d8df 100644 --- a/x/ibc/light-clients/07-tendermint/types/client_state.go +++ b/x/ibc/light-clients/07-tendermint/types/client_state.go @@ -348,7 +348,7 @@ func (cs ClientState) VerifyPacketCommitment( } if err := merkleProof.VerifyMembership(cs.ProofSpecs, consensusState.GetRoot(), path, commitmentBytes); err != nil { - return sdkerrors.Wrap(clienttypes.ErrFailedPacketCommitmentVerification, err.Error()) + return err } return nil From fe8a891f11dcefe708e43d53549beec808f98687 Mon Sep 17 00:00:00 2001 From: Emmanuel T Odeke Date: Mon, 9 Nov 2020 09:58:13 -0800 Subject: [PATCH 064/136] unknownproto: check result from protowire.ConsumeFieldValue and return an error (#7770) * unknownproto: check result from protowire.ConsumeFieldValue and return error Given that protowire.ConsumeFieldValue returns -1 when it encounters an error, perform a check for n < 0 and return the respectively obtained error with context about the details. Fixes an issue identified from a go-fuzz session, thanks to Ethan Buchman and the IBC auditors from Informal Systems et al. Fixes #7739. * Address AlexanderBez's suggestions * Use require in tests * Add issue #7846 to TODO Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- codec/unknownproto/regression_test.go | 25 +++++++++++++++++++++++++ codec/unknownproto/unknown_fields.go | 5 +++++ 2 files changed, 30 insertions(+) create mode 100644 codec/unknownproto/regression_test.go diff --git a/codec/unknownproto/regression_test.go b/codec/unknownproto/regression_test.go new file mode 100644 index 0000000000..24c4056fbd --- /dev/null +++ b/codec/unknownproto/regression_test.go @@ -0,0 +1,25 @@ +package unknownproto_test + +import ( + "encoding/hex" + "io" + "testing" + + "github.com/stretchr/testify/require" + + "github.com/cosmos/cosmos-sdk/simapp" +) + +// Issue #7739: Catch parse errors resulting from unexpected EOF in +// protowire.ConsumeFieldValue. Discovered from fuzzing. +func TestBadBytesPassedIntoDecoder(t *testing.T) { + data, _ := hex.DecodeString("0A9F010A9C200A2D2F6962632E636F72652E636F6E6E656374696F6E2E76312E4D7367436F6E6E656374696F584F75656E496E6974126B0A0D6962637A65726F636C69656E74120B6962637A65726F636F6E6E1A1C0A0C6962636F6E65636C69656E74120A6962636F6E65636F6E6E00002205312E302E302A283235454635364341373935313335453430393336384536444238313130463232413442453035433212080A0612040A0208011A40143342993E25DA936CDDC7BE3D8F603CA6E9661518D536D0C482E18A0154AA096E438A6B9BCADFCFC2F0D689DCCAF55B96399D67A8361B70F5DA13091E2F929") + cfg := simapp.MakeTestEncodingConfig() + decoder := cfg.TxConfig.TxDecoder() + tx, err := decoder(data) + + // TODO: When issue https://github.com/cosmos/cosmos-sdk/issues/7846 + // is addressed, we'll remove this .Contains check. + require.Contains(t, err.Error(), io.ErrUnexpectedEOF.Error()) + require.Nil(t, tx) +} diff --git a/codec/unknownproto/unknown_fields.go b/codec/unknownproto/unknown_fields.go index b2e7a0e069..b9db642962 100644 --- a/codec/unknownproto/unknown_fields.go +++ b/codec/unknownproto/unknown_fields.go @@ -92,6 +92,11 @@ func RejectUnknownFields(bz []byte, msg proto.Message, allowUnknownNonCriticals // Skip over the bytes that store fieldNumber and wireType bytes. bz = bz[m:] n := protowire.ConsumeFieldValue(tagNum, wireType, bz) + if n < 0 { + err = fmt.Errorf("could not consume field value for tagNum: %d, wireType: %q; %w", + tagNum, wireTypeToString(wireType), protowire.ParseError(n)) + return hasUnknownNonCriticals, err + } fieldBytes := bz[:n] bz = bz[n:] From c432e2871bdd3191bb47dfcb2d64b7f6952abaf3 Mon Sep 17 00:00:00 2001 From: Cyrus Goh Date: Mon, 9 Nov 2020 10:26:34 -0800 Subject: [PATCH 065/136] docs: remove v0.40.x from versions --- docs/versions | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/versions b/docs/versions index e55af2fb71..8df09cc782 100644 --- a/docs/versions +++ b/docs/versions @@ -1,3 +1,2 @@ master master -v0.40.x v0.40 launchpad/backports v0.39 \ No newline at end of file From 15b285dd0d707bbf941c535698f3b5bc0b3a84cc Mon Sep 17 00:00:00 2001 From: Amaury Martiny Date: Tue, 10 Nov 2020 14:01:55 +0100 Subject: [PATCH 066/136] Fix creation of local RPC node in clientCtx (#7840) * server: only register the Tx service if the API or gRPC are enabled Only registers the Tx service on an app, if either API or gRPC are enabled. This is because, enabling the service starts a local Tendermint node, which is unnecessary and expensive, if neither of those operations are explicitly enabled. * Fix lint Co-authored-by: Alessio Treglia --- server/start.go | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/server/start.go b/server/start.go index 2a2a1af886..b8565a87a3 100644 --- a/server/start.go +++ b/server/start.go @@ -252,12 +252,20 @@ func startInProcess(ctx *Context, clientCtx client.Context, appCreator types.App } ctx.Logger.Debug("Initialization: tmNode started") - // Add the tx service to the gRPC router. - app.RegisterTxService(clientCtx) + config := config.GetConfig(ctx.Viper) + + // Add the tx service to the gRPC router. We only need to register this + // service if API or gRPC is enabled, and avoid doing so in the general + // case, because it spawns a new local tendermint RPC client. + if config.API.Enable || config.GRPC.Enable { + clientCtx = clientCtx. + WithClient(local.New(tmNode)) + + app.RegisterTxService(clientCtx) + } var apiSrv *api.Server - config := config.GetConfig(ctx.Viper) if config.API.Enable { genDoc, err := genDocProvider() if err != nil { @@ -266,8 +274,7 @@ func startInProcess(ctx *Context, clientCtx client.Context, appCreator types.App clientCtx := clientCtx. WithHomeDir(home). - WithChainID(genDoc.ChainID). - WithClient(local.New(tmNode)) + WithChainID(genDoc.ChainID) apiSrv = api.New(clientCtx, ctx.Logger.With("module", "api-server")) app.RegisterAPIRoutes(apiSrv, config.API) From 7bc08c419c3f53201c0c86a12bfba52488f1386e Mon Sep 17 00:00:00 2001 From: antstalepresh Date: Tue, 10 Nov 2020 23:05:15 +1000 Subject: [PATCH 067/136] Disable telemetry.SetGaugeWithLabels when amount overflow int64 && Update CreateValidator, CreateValidatorMsg, Delegate helper functions to fix int64 overflow --- x/staking/handler_test.go | 68 ++++++++++++++++----------------- x/staking/keeper/msg_server.go | 36 +++++++++-------- x/staking/teststaking/helper.go | 12 +++--- 3 files changed, 60 insertions(+), 56 deletions(-) diff --git a/x/staking/handler_test.go b/x/staking/handler_test.go index e2ba458e63..75be49f036 100644 --- a/x/staking/handler_test.go +++ b/x/staking/handler_test.go @@ -140,13 +140,13 @@ func TestDuplicatesMsgCreateValidator(t *testing.T) { assert.Equal(t, types.Description{}, validator.Description) // two validators can't have the same operator address - tstaking.CreateValidator(addr1, pk2, valTokens.Int64(), false) + tstaking.CreateValidator(addr1, pk2, valTokens, false) // two validators can't have the same pubkey - tstaking.CreateValidator(addr2, pk1, valTokens.Int64(), false) + tstaking.CreateValidator(addr2, pk1, valTokens, false) // must have different pubkey and operator - tstaking.CreateValidator(addr2, pk2, valTokens.Int64(), true) + tstaking.CreateValidator(addr2, pk2, valTokens, true) // must end-block updates, err := app.StakingKeeper.ApplyAndReturnValidatorSetUpdates(ctx) @@ -175,7 +175,7 @@ func TestInvalidPubKeyTypeMsgCreateValidator(t *testing.T) { tstaking := teststaking.NewHelper(t, ctx, app.StakingKeeper) // invalid pukKey type should not be allowed - tstaking.CreateValidator(addr, invalidPk, 10, false) + tstaking.CreateValidator(addr, invalidPk, sdk.NewInt(10), false) } func TestLegacyValidatorDelegations(t *testing.T) { @@ -201,7 +201,7 @@ func TestLegacyValidatorDelegations(t *testing.T) { require.Equal(t, bondAmount, validator.BondedTokens()) // delegate tokens to the validator - tstaking.Delegate(delAddr, valAddr, bondAmount.Int64()) + tstaking.Delegate(delAddr, valAddr, bondAmount) // verify validator bonded shares validator = tstaking.CheckValidator(valAddr, types.Bonded, false) @@ -230,7 +230,7 @@ func TestLegacyValidatorDelegations(t *testing.T) { require.Equal(t, bondAmount, validator.DelegatorShares.RoundInt()) // verify the validator can still self-delegate - tstaking.Delegate(sdk.AccAddress(valAddr), valAddr, bondAmount.Int64()) + tstaking.Delegate(sdk.AccAddress(valAddr), valAddr, bondAmount) // verify validator bonded shares validator, found = app.StakingKeeper.GetValidator(ctx, valAddr) @@ -242,7 +242,7 @@ func TestLegacyValidatorDelegations(t *testing.T) { app.StakingKeeper.Unjail(ctx, valConsAddr) // verify the validator can now accept delegations - tstaking.Delegate(delAddr, valAddr, bondAmount.Int64()) + tstaking.Delegate(delAddr, valAddr, bondAmount) // verify validator bonded shares validator, found = app.StakingKeeper.GetValidator(ctx, valAddr) @@ -283,12 +283,12 @@ func TestIncrementsMsgDelegate(t *testing.T) { require.Equal(t, bondAmount, bond.Shares.RoundInt()) bondedTokens := app.StakingKeeper.TotalBondedTokens(ctx) - require.Equal(t, bondAmount.Int64(), bondedTokens.Int64()) + require.Equal(t, bondAmount, bondedTokens) for i := int64(0); i < 5; i++ { ctx = ctx.WithBlockHeight(i) tstaking.Ctx = ctx - tstaking.Delegate(delegatorAddr, validatorAddr, bondAmount.Int64()) + tstaking.Delegate(delegatorAddr, validatorAddr, bondAmount) //Check that the accounts and the bond account have the appropriate values validator, found := app.StakingKeeper.GetValidator(ctx, validatorAddr) @@ -325,7 +325,7 @@ func TestEditValidatorDecreaseMinSelfDelegation(t *testing.T) { tstaking := teststaking.NewHelper(t, ctx, app.StakingKeeper) // create validator - msgCreateValidator := tstaking.CreateValidatorMsg(validatorAddr, PKs[0], initBond.Int64()) + msgCreateValidator := tstaking.CreateValidatorMsg(validatorAddr, PKs[0], initBond) msgCreateValidator.MinSelfDelegation = sdk.NewInt(2) tstaking.Handle(msgCreateValidator, true) @@ -356,7 +356,7 @@ func TestEditValidatorIncreaseMinSelfDelegationBeyondCurrentBond(t *testing.T) { tstaking := teststaking.NewHelper(t, ctx, app.StakingKeeper) // create validator - msgCreateValidator := tstaking.CreateValidatorMsg(validatorAddr, PKs[0], initBond.Int64()) + msgCreateValidator := tstaking.CreateValidatorMsg(validatorAddr, PKs[0], initBond) msgCreateValidator.MinSelfDelegation = sdk.NewInt(2) tstaking.Handle(msgCreateValidator, true) @@ -393,7 +393,7 @@ func TestIncrementsMsgUnbond(t *testing.T) { // initial balance amt1 := app.BankKeeper.GetBalance(ctx, delegatorAddr, denom).Amount - tstaking.Delegate(delegatorAddr, validatorAddr, initBond.Int64()) + tstaking.Delegate(delegatorAddr, validatorAddr, initBond) // balance should have been subtracted after delegation amt2 := app.BankKeeper.GetBalance(ctx, delegatorAddr, denom).Amount @@ -438,13 +438,13 @@ func TestIncrementsMsgUnbond(t *testing.T) { gotDelegatorShares := validator.DelegatorShares.RoundInt() gotDelegatorAcc := app.BankKeeper.GetBalance(ctx, delegatorAddr, params.BondDenom).Amount - require.Equal(t, expBond.Int64(), gotBond.Int64(), + require.Equal(t, expBond, gotBond, "i: %v\nexpBond: %v\ngotBond: %v\nvalidator: %v\nbond: %v\n", i, expBond, gotBond, validator, bond) - require.Equal(t, expDelegatorShares.Int64(), gotDelegatorShares.Int64(), + require.Equal(t, expDelegatorShares, gotDelegatorShares, "i: %v\nexpDelegatorShares: %v\ngotDelegatorShares: %v\nvalidator: %v\nbond: %v\n", i, expDelegatorShares, gotDelegatorShares, validator, bond) - require.Equal(t, expDelegatorAcc.Int64(), gotDelegatorAcc.Int64(), + require.Equal(t, expDelegatorAcc, gotDelegatorAcc, "i: %v\nexpDelegatorAcc: %v\ngotDelegatorAcc: %v\nvalidator: %v\nbond: %v\n", i, expDelegatorAcc, gotDelegatorAcc, validator, bond) } @@ -491,7 +491,7 @@ func TestMultipleMsgCreateValidator(t *testing.T) { // bond them all amt := sdk.TokensFromConsensusPower(10) for i, validatorAddr := range validatorAddrs { - tstaking.CreateValidator(validatorAddr, PKs[i], amt.Int64(), true) + tstaking.CreateValidator(validatorAddr, PKs[i], amt, true) // verify that the account is bonded validators := app.StakingKeeper.GetValidators(ctx, 100) require.Equal(t, (i + 1), len(validators)) @@ -545,11 +545,11 @@ func TestMultipleMsgDelegate(t *testing.T) { var amount int64 = 10 // first make a validator - tstaking.CreateValidator(validatorAddr, PKs[0], amount, true) + tstaking.CreateValidator(validatorAddr, PKs[0], sdk.NewInt(amount), true) // delegate multiple parties for _, delegatorAddr := range delegatorAddrs { - tstaking.Delegate(delegatorAddr, validatorAddr, 10) + tstaking.Delegate(delegatorAddr, validatorAddr, sdk.NewInt(10)) tstaking.CheckDelegator(delegatorAddr, validatorAddr, true) } @@ -579,8 +579,8 @@ func TestJailValidator(t *testing.T) { var amt int64 = 10 // create the validator and delegate - tstaking.CreateValidator(validatorAddr, PKs[0], amt, true) - tstaking.Delegate(delegatorAddr, validatorAddr, amt) + tstaking.CreateValidator(validatorAddr, PKs[0], sdk.NewInt(amt), true) + tstaking.Delegate(delegatorAddr, validatorAddr, sdk.NewInt(amt)) // unbond the validators bond portion unamt := sdk.NewInt(amt) @@ -607,7 +607,7 @@ func TestJailValidator(t *testing.T) { tstaking.Ctx = ctx // verify that the pubkey can now be reused - tstaking.CreateValidator(validatorAddr, PKs[0], amt, true) + tstaking.CreateValidator(validatorAddr, PKs[0], sdk.NewInt(amt), true) } func TestValidatorQueue(t *testing.T) { @@ -623,7 +623,7 @@ func TestValidatorQueue(t *testing.T) { // create the validator and make a bond amt := tstaking.CreateValidatorWithValPower(validatorAddr, PKs[0], 10, true) - tstaking.Delegate(delegatorAddr, validatorAddr, amt.Int64()) + tstaking.Delegate(delegatorAddr, validatorAddr, amt) staking.EndBlocker(ctx, app.StakingKeeper) // unbond the all self-delegation to put validator in unbonding state @@ -703,8 +703,8 @@ func TestUnbondingFromUnbondingValidator(t *testing.T) { tstaking := teststaking.NewHelper(t, ctx, app.StakingKeeper) // create the validator and delegate - tstaking.CreateValidator(validatorAddr, PKs[0], 10, true) - tstaking.Delegate(delegatorAddr, validatorAddr, 10) + tstaking.CreateValidator(validatorAddr, PKs[0], sdk.NewInt(10), true) + tstaking.Delegate(delegatorAddr, validatorAddr, sdk.NewInt(10)) // unbond the validators bond portion unbondAmt := sdk.NewInt(10) @@ -744,13 +744,13 @@ func TestRedelegationPeriod(t *testing.T) { amt1 := app.BankKeeper.GetBalance(ctx, sdk.AccAddress(validatorAddr), denom).Amount // create the validators - tstaking.CreateValidator(validatorAddr, PKs[0], 10, true) + tstaking.CreateValidator(validatorAddr, PKs[0], sdk.NewInt(10), true) // balance should have been subtracted after creation amt2 := app.BankKeeper.GetBalance(ctx, sdk.AccAddress(validatorAddr), denom).Amount - require.Equal(t, amt1.Sub(sdk.NewInt(10)).Int64(), amt2.Int64(), "expected coins to be subtracted") + require.Equal(t, amt1.Sub(sdk.NewInt(10)), amt2, "expected coins to be subtracted") - tstaking.CreateValidator(validatorAddr2, PKs[1], 10, true) + tstaking.CreateValidator(validatorAddr2, PKs[1], sdk.NewInt(10), true) bal1 := app.BankKeeper.GetAllBalances(ctx, sdk.AccAddress(validatorAddr)) // begin redelegate @@ -790,9 +790,9 @@ func TestTransitiveRedelegation(t *testing.T) { tstaking := teststaking.NewHelper(t, ctx, app.StakingKeeper) // create the validators - tstaking.CreateValidator(val1, PKs[0], 10, true) - tstaking.CreateValidator(val2, PKs[1], 10, true) - tstaking.CreateValidator(val3, PKs[2], 10, true) + tstaking.CreateValidator(val1, PKs[0], sdk.NewInt(10), true) + tstaking.CreateValidator(val2, PKs[1], sdk.NewInt(10), true) + tstaking.CreateValidator(val3, PKs[2], sdk.NewInt(10), true) // begin redelegate redAmt := sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(10)) @@ -828,7 +828,7 @@ func TestMultipleRedelegationAtSameTime(t *testing.T) { // create the validators valTokens := tstaking.CreateValidatorWithValPower(valAddr, PKs[0], 10, true) - tstaking.CreateValidator(valAddr2, PKs[1], valTokens.Int64(), true) + tstaking.CreateValidator(valAddr2, PKs[1], valTokens, true) // end block to bond them staking.EndBlocker(ctx, app.StakingKeeper) @@ -872,7 +872,7 @@ func TestMultipleRedelegationAtUniqueTimes(t *testing.T) { // create the validators valTokens := tstaking.CreateValidatorWithValPower(valAddr, PKs[0], 10, true) - tstaking.CreateValidator(valAddr2, PKs[1], valTokens.Int64(), true) + tstaking.CreateValidator(valAddr2, PKs[1], valTokens, true) // end block to bond them staking.EndBlocker(ctx, app.StakingKeeper) @@ -1041,10 +1041,10 @@ func TestBondUnbondRedelegateSlashTwice(t *testing.T) { tstaking := teststaking.NewHelper(t, ctx, app.StakingKeeper) valTokens := tstaking.CreateValidatorWithValPower(valA, PKs[0], 10, true) - tstaking.CreateValidator(valB, PKs[1], valTokens.Int64(), true) + tstaking.CreateValidator(valB, PKs[1], valTokens, true) // delegate 10 stake - tstaking.Delegate(del, valA, valTokens.Int64()) + tstaking.Delegate(del, valA, valTokens) // apply Tendermint updates updates, err := app.StakingKeeper.ApplyAndReturnValidatorSetUpdates(ctx) diff --git a/x/staking/keeper/msg_server.go b/x/staking/keeper/msg_server.go index 472a96c485..0d00e7fbc5 100644 --- a/x/staking/keeper/msg_server.go +++ b/x/staking/keeper/msg_server.go @@ -209,14 +209,16 @@ func (k msgServer) Delegate(goCtx context.Context, msg *types.MsgDelegate) (*typ return nil, err } - defer func() { - telemetry.IncrCounter(1, types.ModuleName, "delegate") - telemetry.SetGaugeWithLabels( - []string{"tx", "msg", msg.Type()}, - float32(msg.Amount.Amount.Int64()), - []metrics.Label{telemetry.NewLabel("denom", msg.Amount.Denom)}, - ) - }() + if msg.Amount.Amount.IsInt64() { + defer func() { + telemetry.IncrCounter(1, types.ModuleName, "delegate") + telemetry.SetGaugeWithLabels( + []string{"tx", "msg", msg.Type()}, + float32(msg.Amount.Amount.Int64()), + []metrics.Label{telemetry.NewLabel("denom", msg.Amount.Denom)}, + ) + }() + } ctx.EventManager().EmitEvents(sdk.Events{ sdk.NewEvent( @@ -325,14 +327,16 @@ func (k msgServer) Undelegate(goCtx context.Context, msg *types.MsgUndelegate) ( return nil, err } - defer func() { - telemetry.IncrCounter(1, types.ModuleName, "undelegate") - telemetry.SetGaugeWithLabels( - []string{"tx", "msg", msg.Type()}, - float32(msg.Amount.Amount.Int64()), - []metrics.Label{telemetry.NewLabel("denom", msg.Amount.Denom)}, - ) - }() + if msg.Amount.Amount.IsInt64() { + defer func() { + telemetry.IncrCounter(1, types.ModuleName, "undelegate") + telemetry.SetGaugeWithLabels( + []string{"tx", "msg", msg.Type()}, + float32(msg.Amount.Amount.Int64()), + []metrics.Label{telemetry.NewLabel("denom", msg.Amount.Denom)}, + ) + }() + } ctx.EventManager().EmitEvents(sdk.Events{ sdk.NewEvent( diff --git a/x/staking/teststaking/helper.go b/x/staking/teststaking/helper.go index c0ba45bb1a..e5e770f239 100644 --- a/x/staking/teststaking/helper.go +++ b/x/staking/teststaking/helper.go @@ -32,8 +32,8 @@ func NewHelper(t *testing.T, ctx sdk.Context, k keeper.Keeper) *Helper { } // CreateValidator calls handler to create a new staking validator -func (sh *Helper) CreateValidator(addr sdk.ValAddress, pk crypto.PubKey, stakeAmount int64, ok bool) { - coin := sdk.NewCoin(sh.Denom, sdk.NewInt(stakeAmount)) +func (sh *Helper) CreateValidator(addr sdk.ValAddress, pk crypto.PubKey, stakeAmount sdk.Int, ok bool) { + coin := sdk.NewCoin(sh.Denom, stakeAmount) sh.createValidator(addr, pk, coin, ok) } @@ -47,8 +47,8 @@ func (sh *Helper) CreateValidatorWithValPower(addr sdk.ValAddress, pk crypto.Pub } // CreateValidatorMsg returns a message used to create validator in this service. -func (sh *Helper) CreateValidatorMsg(addr sdk.ValAddress, pk crypto.PubKey, stakeAmount int64) *stakingtypes.MsgCreateValidator { - coin := sdk.NewCoin(sh.Denom, sdk.NewInt(stakeAmount)) +func (sh *Helper) CreateValidatorMsg(addr sdk.ValAddress, pk crypto.PubKey, stakeAmount sdk.Int) *stakingtypes.MsgCreateValidator { + coin := sdk.NewCoin(sh.Denom, stakeAmount) msg, err := stakingtypes.NewMsgCreateValidator(addr, pk, coin, stakingtypes.Description{}, sh.Commission, sdk.OneInt()) require.NoError(sh.t, err) return msg @@ -61,8 +61,8 @@ func (sh *Helper) createValidator(addr sdk.ValAddress, pk crypto.PubKey, coin sd } // Delegate calls handler to delegate stake for a validator -func (sh *Helper) Delegate(delegator sdk.AccAddress, val sdk.ValAddress, amount int64) { - coin := sdk.NewCoin(sh.Denom, sdk.NewInt(amount)) +func (sh *Helper) Delegate(delegator sdk.AccAddress, val sdk.ValAddress, amount sdk.Int) { + coin := sdk.NewCoin(sh.Denom, amount) msg := stakingtypes.NewMsgDelegate(delegator, val, coin) sh.Handle(msg, true) } From fdcb028636c940b94387ad86b83959aab4b92cde Mon Sep 17 00:00:00 2001 From: Aditya Date: Tue, 10 Nov 2020 14:39:09 +0000 Subject: [PATCH 068/136] ibc: proof fixes (#7869) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * change proof proto def * progress fixing tests * complete proof restructure * remove use of KeyPath * improve error msgs * docs and lint * Apply suggestions from code review Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com> * address code review * fix string tests * add ConvertProofs tests * Apply suggestions from code review Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com> Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com> --- proto/ibc/core/commitment/v1/commitment.proto | 38 +- x/ibc/core/03-connection/types/msgs_test.go | 5 +- x/ibc/core/04-channel/keeper/keeper_test.go | 3 + x/ibc/core/04-channel/types/msgs_test.go | 5 +- .../core/23-commitment/types/commitment.pb.go | 524 +------- x/ibc/core/23-commitment/types/key_path.go | 40 - x/ibc/core/23-commitment/types/merkle.go | 187 +-- x/ibc/core/23-commitment/types/merkle_test.go | 56 +- x/ibc/core/23-commitment/types/utils.go | 27 + x/ibc/core/23-commitment/types/utils_test.go | 97 ++ x/ibc/core/client/query.go | 5 +- x/ibc/core/keeper/msg_server_test.go | 3 + .../06-solomachine/types/client_state.go | 22 +- .../07-tendermint/types/client_state.go | 22 +- .../07-tendermint/types/tendermint_test.go | 3 + .../07-tendermint/types/upgrade.go | 2 +- x/ibc/testing/chain.go | 10 +- x/ibc/testing/solomachine.go | 22 +- x/staking/types/staking.pb.go | 1184 +++++++++-------- 19 files changed, 979 insertions(+), 1276 deletions(-) delete mode 100644 x/ibc/core/23-commitment/types/key_path.go create mode 100644 x/ibc/core/23-commitment/types/utils.go create mode 100644 x/ibc/core/23-commitment/types/utils_test.go diff --git a/proto/ibc/core/commitment/v1/commitment.proto b/proto/ibc/core/commitment/v1/commitment.proto index 0ed6be0f25..9e9d22f081 100644 --- a/proto/ibc/core/commitment/v1/commitment.proto +++ b/proto/ibc/core/commitment/v1/commitment.proto @@ -4,7 +4,7 @@ package ibc.core.commitment.v1; option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/core/23-commitment/types"; import "gogoproto/gogo.proto"; -import "tendermint/crypto/proof.proto"; +import "confio/proofs.proto"; // MerkleRoot defines a merkle root hash. // In the Cosmos SDK, the AppHash of a block header becomes the root. @@ -23,42 +23,18 @@ message MerklePrefix { // MerklePath is the path used to verify commitment proofs, which can be an // arbitrary structured object (defined by a commitment type). +// MerklePath is represented from root-to-leaf message MerklePath { option (gogoproto.goproto_stringer) = false; - KeyPath key_path = 1 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"key_path\""]; + repeated string key_path = 1 [(gogoproto.moretags) = "yaml:\"key_path\""]; } -// MerkleProof is a wrapper type that contains a merkle proof. +// MerkleProof is a wrapper type over a chain of CommitmentProofs. // It demonstrates membership or non-membership for an element or set of // elements, verifiable in conjunction with a known commitment root. Proofs // should be succinct. +// MerkleProofs are ordered from leaf-to-root message MerkleProof { - tendermint.crypto.ProofOps proof = 1; -} - -// KeyPath defines a slice of keys -message KeyPath { - option (gogoproto.goproto_stringer) = false; - option (gogoproto.goproto_getters) = false; - - repeated Key keys = 1; -} - -// Key defines a proof Key -message Key { - option (gogoproto.goproto_getters) = false; - - bytes name = 1; - KeyEncoding enc = 2; -} - -// KeyEncoding defines the encoding format of a key's bytes. -enum KeyEncoding { - option (gogoproto.goproto_enum_prefix) = false; - - // URL encoding - KEY_ENCODING_URL_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "URL"]; - // Hex encoding - KEY_ENCODING_HEX = 1 [(gogoproto.enumvalue_customname) = "HEX"]; -} + repeated ics23.CommitmentProof proofs = 1; +} \ No newline at end of file diff --git a/x/ibc/core/03-connection/types/msgs_test.go b/x/ibc/core/03-connection/types/msgs_test.go index cfb8ce7351..f839637906 100644 --- a/x/ibc/core/03-connection/types/msgs_test.go +++ b/x/ibc/core/03-connection/types/msgs_test.go @@ -62,9 +62,10 @@ func (suite *MsgTestSuite) SetupTest() { Prove: true, }) - merkleProof := commitmenttypes.MerkleProof{Proof: res.ProofOps} + merkleProof, err := commitmenttypes.ConvertProofs(res.ProofOps) + suite.Require().NoError(err) proof, err := app.AppCodec().MarshalBinaryBare(&merkleProof) - suite.NoError(err) + suite.Require().NoError(err) suite.proof = proof diff --git a/x/ibc/core/04-channel/keeper/keeper_test.go b/x/ibc/core/04-channel/keeper/keeper_test.go index 9fcc9e20da..01f7a75849 100644 --- a/x/ibc/core/04-channel/keeper/keeper_test.go +++ b/x/ibc/core/04-channel/keeper/keeper_test.go @@ -30,6 +30,9 @@ func (suite *KeeperTestSuite) SetupTest() { suite.coordinator = ibctesting.NewCoordinator(suite.T(), 2) suite.chainA = suite.coordinator.GetChain(ibctesting.GetChainID(0)) suite.chainB = suite.coordinator.GetChain(ibctesting.GetChainID(1)) + // commit some blocks so that QueryProof returns valid proof (cannot return valid query if height <= 1) + suite.coordinator.CommitNBlocks(suite.chainA, 2) + suite.coordinator.CommitNBlocks(suite.chainB, 2) } // TestSetChannel create clients and connections on both chains. It tests for the non-existence diff --git a/x/ibc/core/04-channel/types/msgs_test.go b/x/ibc/core/04-channel/types/msgs_test.go index 9cf466840c..f7004df682 100644 --- a/x/ibc/core/04-channel/types/msgs_test.go +++ b/x/ibc/core/04-channel/types/msgs_test.go @@ -93,9 +93,10 @@ func (suite *TypesTestSuite) SetupTest() { Prove: true, }) - merkleProof := commitmenttypes.MerkleProof{Proof: res.ProofOps} + merkleProof, err := commitmenttypes.ConvertProofs(res.ProofOps) + suite.Require().NoError(err) proof, err := app.AppCodec().MarshalBinaryBare(&merkleProof) - suite.NoError(err) + suite.Require().NoError(err) suite.proof = proof } diff --git a/x/ibc/core/23-commitment/types/commitment.pb.go b/x/ibc/core/23-commitment/types/commitment.pb.go index ac72127113..bb28053e7f 100644 --- a/x/ibc/core/23-commitment/types/commitment.pb.go +++ b/x/ibc/core/23-commitment/types/commitment.pb.go @@ -5,9 +5,9 @@ package types import ( fmt "fmt" + _go "github.com/confio/ics23/go" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" - crypto "github.com/tendermint/tendermint/proto/tendermint/crypto" io "io" math "math" math_bits "math/bits" @@ -24,34 +24,6 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -// KeyEncoding defines the encoding format of a key's bytes. -type KeyEncoding int32 - -const ( - // URL encoding - URL KeyEncoding = 0 - // Hex encoding - HEX KeyEncoding = 1 -) - -var KeyEncoding_name = map[int32]string{ - 0: "KEY_ENCODING_URL_UNSPECIFIED", - 1: "KEY_ENCODING_HEX", -} - -var KeyEncoding_value = map[string]int32{ - "KEY_ENCODING_URL_UNSPECIFIED": 0, - "KEY_ENCODING_HEX": 1, -} - -func (x KeyEncoding) String() string { - return proto.EnumName(KeyEncoding_name, int32(x)) -} - -func (KeyEncoding) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_7921d88972a41469, []int{0} -} - // MerkleRoot defines a merkle root hash. // In the Cosmos SDK, the AppHash of a block header becomes the root. type MerkleRoot struct { @@ -141,7 +113,7 @@ func (m *MerklePrefix) GetKeyPrefix() []byte { // MerklePath is the path used to verify commitment proofs, which can be an // arbitrary structured object (defined by a commitment type). type MerklePath struct { - KeyPath KeyPath `protobuf:"bytes,1,opt,name=key_path,json=keyPath,proto3" json:"key_path" yaml:"key_path"` + KeyPath []string `protobuf:"bytes,1,rep,name=key_path,json=keyPath,proto3" json:"key_path,omitempty" yaml:"key_path"` } func (m *MerklePath) Reset() { *m = MerklePath{} } @@ -176,19 +148,19 @@ func (m *MerklePath) XXX_DiscardUnknown() { var xxx_messageInfo_MerklePath proto.InternalMessageInfo -func (m *MerklePath) GetKeyPath() KeyPath { +func (m *MerklePath) GetKeyPath() []string { if m != nil { return m.KeyPath } - return KeyPath{} + return nil } -// MerkleProof is a wrapper type that contains a merkle proof. +// MerkleProof is a wrapper type over a chain of CommitmentProofs. // It demonstrates membership or non-membership for an element or set of // elements, verifiable in conjunction with a known commitment root. Proofs // should be succinct. type MerkleProof struct { - Proof *crypto.ProofOps `protobuf:"bytes,1,opt,name=proof,proto3" json:"proof,omitempty"` + Proofs []*_go.CommitmentProof `protobuf:"bytes,1,rep,name=proofs,proto3" json:"proofs,omitempty"` } func (m *MerkleProof) Reset() { *m = MerkleProof{} } @@ -224,97 +196,18 @@ func (m *MerkleProof) XXX_DiscardUnknown() { var xxx_messageInfo_MerkleProof proto.InternalMessageInfo -func (m *MerkleProof) GetProof() *crypto.ProofOps { +func (m *MerkleProof) GetProofs() []*_go.CommitmentProof { if m != nil { - return m.Proof + return m.Proofs } return nil } -// KeyPath defines a slice of keys -type KeyPath struct { - Keys []*Key `protobuf:"bytes,1,rep,name=keys,proto3" json:"keys,omitempty"` -} - -func (m *KeyPath) Reset() { *m = KeyPath{} } -func (*KeyPath) ProtoMessage() {} -func (*KeyPath) Descriptor() ([]byte, []int) { - return fileDescriptor_7921d88972a41469, []int{4} -} -func (m *KeyPath) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *KeyPath) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_KeyPath.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *KeyPath) XXX_Merge(src proto.Message) { - xxx_messageInfo_KeyPath.Merge(m, src) -} -func (m *KeyPath) XXX_Size() int { - return m.Size() -} -func (m *KeyPath) XXX_DiscardUnknown() { - xxx_messageInfo_KeyPath.DiscardUnknown(m) -} - -var xxx_messageInfo_KeyPath proto.InternalMessageInfo - -// Key defines a proof Key -type Key struct { - Name []byte `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Enc KeyEncoding `protobuf:"varint,2,opt,name=enc,proto3,enum=ibc.core.commitment.v1.KeyEncoding" json:"enc,omitempty"` -} - -func (m *Key) Reset() { *m = Key{} } -func (m *Key) String() string { return proto.CompactTextString(m) } -func (*Key) ProtoMessage() {} -func (*Key) Descriptor() ([]byte, []int) { - return fileDescriptor_7921d88972a41469, []int{5} -} -func (m *Key) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Key) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Key.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Key) XXX_Merge(src proto.Message) { - xxx_messageInfo_Key.Merge(m, src) -} -func (m *Key) XXX_Size() int { - return m.Size() -} -func (m *Key) XXX_DiscardUnknown() { - xxx_messageInfo_Key.DiscardUnknown(m) -} - -var xxx_messageInfo_Key proto.InternalMessageInfo - func init() { - proto.RegisterEnum("ibc.core.commitment.v1.KeyEncoding", KeyEncoding_name, KeyEncoding_value) proto.RegisterType((*MerkleRoot)(nil), "ibc.core.commitment.v1.MerkleRoot") proto.RegisterType((*MerklePrefix)(nil), "ibc.core.commitment.v1.MerklePrefix") proto.RegisterType((*MerklePath)(nil), "ibc.core.commitment.v1.MerklePath") proto.RegisterType((*MerkleProof)(nil), "ibc.core.commitment.v1.MerkleProof") - proto.RegisterType((*KeyPath)(nil), "ibc.core.commitment.v1.KeyPath") - proto.RegisterType((*Key)(nil), "ibc.core.commitment.v1.Key") } func init() { @@ -322,39 +215,28 @@ func init() { } var fileDescriptor_7921d88972a41469 = []byte{ - // 499 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x92, 0x4f, 0x6f, 0xd3, 0x30, - 0x18, 0xc6, 0x13, 0x5a, 0xe8, 0x70, 0x27, 0x28, 0x16, 0x7f, 0xaa, 0xc2, 0x92, 0x2a, 0x48, 0x30, - 0x90, 0x16, 0xab, 0x1d, 0x5c, 0xca, 0x05, 0x75, 0x0d, 0xac, 0xea, 0xe8, 0x2a, 0x4f, 0x45, 0x03, - 0x09, 0x55, 0x69, 0xea, 0x26, 0x51, 0x96, 0x38, 0x4a, 0xcc, 0xb4, 0x7c, 0x83, 0x89, 0x13, 0x47, - 0x2e, 0x48, 0x48, 0x7c, 0x99, 0x1d, 0x77, 0xe4, 0x54, 0xa1, 0xf6, 0x1b, 0xec, 0x13, 0x20, 0xdb, - 0x2d, 0x0b, 0x12, 0x70, 0xca, 0x6b, 0xbd, 0xbf, 0x37, 0xcf, 0xe3, 0xc7, 0x2f, 0x78, 0xec, 0x8f, - 0x1d, 0xe4, 0xd0, 0x84, 0x20, 0x87, 0x86, 0xa1, 0xcf, 0x42, 0x12, 0x31, 0x74, 0xdc, 0xc8, 0x9d, - 0xcc, 0x38, 0xa1, 0x8c, 0xc2, 0xbb, 0xfe, 0xd8, 0x31, 0x39, 0x68, 0xe6, 0x5a, 0xc7, 0x8d, 0xda, - 0x6d, 0x97, 0xba, 0x54, 0x20, 0x88, 0x57, 0x92, 0xae, 0x6d, 0x30, 0x12, 0x4d, 0x48, 0x12, 0xfa, - 0x11, 0x43, 0x4e, 0x92, 0xc5, 0x8c, 0xa2, 0x38, 0xa1, 0x74, 0x2a, 0xdb, 0xc6, 0x23, 0x00, 0xde, - 0x90, 0x24, 0x38, 0x22, 0x98, 0x52, 0x06, 0x21, 0x28, 0x7a, 0x76, 0xea, 0x55, 0xd5, 0xba, 0xba, - 0xb9, 0x8e, 0x45, 0xdd, 0x2a, 0x9e, 0x7e, 0xd3, 0x15, 0xa3, 0x03, 0xd6, 0x25, 0x37, 0x48, 0xc8, - 0xd4, 0x3f, 0x81, 0xcf, 0x00, 0x08, 0x48, 0x36, 0x8a, 0xc5, 0x49, 0xf2, 0xed, 0x3b, 0x17, 0x33, - 0xfd, 0x56, 0x66, 0x87, 0x47, 0x2d, 0xe3, 0xb2, 0x67, 0xe0, 0xeb, 0x01, 0xc9, 0xe4, 0x94, 0xe1, - 0xae, 0xd4, 0x06, 0x36, 0xf3, 0xe0, 0x01, 0x58, 0x13, 0x9c, 0xcd, 0xa4, 0x62, 0xb9, 0xa9, 0x9b, - 0x7f, 0xbf, 0x9b, 0xd9, 0x23, 0x19, 0x1f, 0x69, 0xdf, 0x3b, 0x9b, 0xe9, 0xca, 0xc5, 0x4c, 0xbf, - 0x99, 0x93, 0xb1, 0x99, 0x67, 0xe0, 0x52, 0x20, 0x89, 0x56, 0xf1, 0x0b, 0xb7, 0xfb, 0x12, 0x94, - 0x57, 0x76, 0x29, 0x9d, 0xc2, 0x06, 0xb8, 0x2a, 0x2e, 0xbd, 0x94, 0xb9, 0x6f, 0x5e, 0x86, 0x62, - 0xca, 0x50, 0x4c, 0x01, 0xee, 0xc7, 0x29, 0x96, 0xa4, 0xd1, 0x01, 0xa5, 0xa5, 0x28, 0x44, 0xa0, - 0x18, 0x90, 0x2c, 0xad, 0xaa, 0xf5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xff, 0xff, 0x8a, 0x78, 0x4b, 0x97, 0xeb, - 0x02, 0x00, 0x00, + // 334 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x4c, 0x91, 0xcf, 0x4e, 0xfa, 0x40, + 0x10, 0xc7, 0xdb, 0xfc, 0x08, 0x3f, 0x59, 0x48, 0x8c, 0x45, 0x89, 0xe1, 0x50, 0x4c, 0x0f, 0xca, + 0x85, 0xdd, 0x00, 0x9e, 0x30, 0x5e, 0xaa, 0x57, 0x13, 0xd2, 0xc4, 0x8b, 0x17, 0xd3, 0xae, 0x5b, + 0xba, 0x29, 0x65, 0x9a, 0xee, 0x4a, 0xe8, 0x1b, 0x78, 0xf4, 0xe8, 0xd1, 0xc7, 0xf1, 0xc8, 0xd1, + 0x13, 0x31, 0xf0, 0x06, 0x3c, 0x81, 0xe9, 0x2e, 0x60, 0x4f, 0x3b, 0xb3, 0xf3, 0x99, 0x7f, 0xdf, + 0x41, 0x57, 0x3c, 0xa0, 0x84, 0x42, 0xc6, 0x08, 0x85, 0x24, 0xe1, 0x32, 0x61, 0x33, 0x49, 0xe6, + 0xfd, 0x92, 0x87, 0xd3, 0x0c, 0x24, 0x58, 0x2d, 0x1e, 0x50, 0x5c, 0x80, 0xb8, 0x14, 0x9a, 0xf7, + 0xdb, 0xa7, 0x13, 0x98, 0x80, 0x42, 0x48, 0x61, 0x69, 0xba, 0xdd, 0xa4, 0x30, 0x0b, 0x39, 0x90, + 0x34, 0x03, 0x08, 0x85, 0xfe, 0x74, 0x2e, 0x11, 0x7a, 0x60, 0x59, 0x3c, 0x65, 0x1e, 0x80, 0xb4, + 0x2c, 0x54, 0x89, 0x7c, 0x11, 0x9d, 0x9b, 0x17, 0x66, 0xb7, 0xe1, 0x29, 0x7b, 0x54, 0x79, 0xfb, + 0xec, 0x18, 0xce, 0x3d, 0x6a, 0x68, 0x6e, 0x9c, 0xb1, 0x90, 0x2f, 0xac, 0x6b, 0x84, 0x62, 0x96, + 0x3f, 0xa7, 0xca, 0xd3, 0xbc, 0x7b, 0xb6, 0x5d, 0x75, 0x4e, 0x72, 0x3f, 0x99, 0x8e, 0x9c, 0xbf, + 0x98, 0xe3, 0xd5, 0x62, 0x96, 0xeb, 0x2c, 0xc7, 0xdd, 0x77, 0x1b, 0xfb, 0x32, 0xb2, 0x30, 0x3a, + 0x52, 0x9c, 0x2f, 0x8b, 0x8e, 0xff, 0xba, 0x35, 0xb7, 0xb9, 0x5d, 0x75, 0x8e, 0x4b, 0x15, 0x7c, + 0x19, 0x39, 0xde, 0xff, 0x22, 0xdf, 0x97, 0xd1, 0xa8, 0xf2, 0x51, 0x4c, 0x72, 0x8b, 0xea, 0xfb, + 0x49, 0x00, 0x42, 0x0b, 0xa3, 0xaa, 0x5e, 0x48, 0x95, 0xa8, 0x0f, 0x5a, 0x98, 0x53, 0x31, 0x18, + 0xe2, 0xbb, 0x83, 0x22, 0x8a, 0xf3, 0x76, 0x94, 0xfb, 0xf8, 0xb5, 0xb6, 0xcd, 0xe5, 0xda, 0x36, + 0x7f, 0xd6, 0xb6, 0xf9, 0xbe, 0xb1, 0x8d, 0xe5, 0xc6, 0x36, 0xbe, 0x37, 0xb6, 0xf1, 0x74, 0x33, + 0xe1, 0x32, 0x7a, 0x0d, 0x0a, 0x2d, 0x09, 0x05, 0x91, 0x80, 0xd8, 0x3d, 0x3d, 0xf1, 0x12, 0x93, + 0x05, 0x39, 0x5c, 0x65, 0x30, 0xec, 0x95, 0x0e, 0x23, 0xf3, 0x94, 0x89, 0xa0, 0xaa, 0xe4, 0x1c, + 0xfe, 0x06, 0x00, 0x00, 0xff, 0xff, 0x1b, 0xe7, 0x68, 0xd0, 0xbc, 0x01, 0x00, 0x00, } func (m *MerkleRoot) Marshal() (dAtA []byte, err error) { @@ -437,16 +319,15 @@ func (m *MerklePath) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - { - size, err := m.KeyPath.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if len(m.KeyPath) > 0 { + for iNdEx := len(m.KeyPath) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.KeyPath[iNdEx]) + copy(dAtA[i:], m.KeyPath[iNdEx]) + i = encodeVarintCommitment(dAtA, i, uint64(len(m.KeyPath[iNdEx]))) + i-- + dAtA[i] = 0xa } - i -= size - i = encodeVarintCommitment(dAtA, i, uint64(size)) } - i-- - dAtA[i] = 0xa return len(dAtA) - i, nil } @@ -470,45 +351,10 @@ func (m *MerkleProof) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.Proof != nil { - { - size, err := m.Proof.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCommitment(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *KeyPath) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *KeyPath) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *KeyPath) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Keys) > 0 { - for iNdEx := len(m.Keys) - 1; iNdEx >= 0; iNdEx-- { + if len(m.Proofs) > 0 { + for iNdEx := len(m.Proofs) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.Keys[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Proofs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -522,41 +368,6 @@ func (m *KeyPath) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *Key) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Key) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Key) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Enc != 0 { - i = encodeVarintCommitment(dAtA, i, uint64(m.Enc)) - i-- - dAtA[i] = 0x10 - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintCommitment(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - func encodeVarintCommitment(dAtA []byte, offset int, v uint64) int { offset -= sovCommitment(v) base := offset @@ -600,8 +411,12 @@ func (m *MerklePath) Size() (n int) { } var l int _ = l - l = m.KeyPath.Size() - n += 1 + l + sovCommitment(uint64(l)) + if len(m.KeyPath) > 0 { + for _, s := range m.KeyPath { + l = len(s) + n += 1 + l + sovCommitment(uint64(l)) + } + } return n } @@ -611,21 +426,8 @@ func (m *MerkleProof) Size() (n int) { } var l int _ = l - if m.Proof != nil { - l = m.Proof.Size() - n += 1 + l + sovCommitment(uint64(l)) - } - return n -} - -func (m *KeyPath) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Keys) > 0 { - for _, e := range m.Keys { + if len(m.Proofs) > 0 { + for _, e := range m.Proofs { l = e.Size() n += 1 + l + sovCommitment(uint64(l)) } @@ -633,22 +435,6 @@ func (m *KeyPath) Size() (n int) { return n } -func (m *Key) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovCommitment(uint64(l)) - } - if m.Enc != 0 { - n += 1 + sovCommitment(uint64(m.Enc)) - } - return n -} - func sovCommitment(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -862,7 +648,7 @@ func (m *MerklePath) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field KeyPath", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowCommitment @@ -872,24 +658,23 @@ func (m *MerklePath) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthCommitment } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthCommitment } if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.KeyPath.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.KeyPath = append(m.KeyPath, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex default: iNdEx = preIndex @@ -946,7 +731,7 @@ func (m *MerkleProof) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Proof", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Proofs", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -973,10 +758,8 @@ func (m *MerkleProof) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Proof == nil { - m.Proof = &crypto.ProofOps{} - } - if err := m.Proof.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Proofs = append(m.Proofs, &_go.CommitmentProof{}) + if err := m.Proofs[len(m.Proofs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -1004,199 +787,6 @@ func (m *MerkleProof) Unmarshal(dAtA []byte) error { } return nil } -func (m *KeyPath) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommitment - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: KeyPath: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: KeyPath: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Keys", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommitment - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCommitment - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCommitment - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Keys = append(m.Keys, &Key{}) - if err := m.Keys[len(m.Keys)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCommitment(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthCommitment - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthCommitment - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Key) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommitment - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Key: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Key: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommitment - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthCommitment - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthCommitment - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = append(m.Name[:0], dAtA[iNdEx:postIndex]...) - if m.Name == nil { - m.Name = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Enc", wireType) - } - m.Enc = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommitment - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Enc |= KeyEncoding(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipCommitment(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthCommitment - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthCommitment - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func skipCommitment(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/ibc/core/23-commitment/types/key_path.go b/x/ibc/core/23-commitment/types/key_path.go deleted file mode 100644 index 589406b901..0000000000 --- a/x/ibc/core/23-commitment/types/key_path.go +++ /dev/null @@ -1,40 +0,0 @@ -package types - -import ( - fmt "fmt" - "net/url" -) - -// AppendKey appends a new key to a KeyPath -func (pth KeyPath) AppendKey(key []byte, enc KeyEncoding) KeyPath { - pth.Keys = append(pth.Keys, &Key{Name: key, Enc: enc}) - return pth -} - -// String implements the fmt.Stringer interface -func (pth *KeyPath) String() string { - res := "" - for _, key := range pth.Keys { - switch key.Enc { - case URL: - res += "/" + url.PathEscape(string(key.Name)) - case HEX: - res += "/x:" + fmt.Sprintf("%X", key.Name) - default: - panic("unexpected key encoding type") - } - } - return res -} - -// GetKey returns the bytes representation of key at given index -// Passing in a positive index return the key at index in forward order -// from the highest key to the lowest key -// Passing in a negative index will return the key at index in reverse order -// from the lowest key to the highest key. This is the order for proof verification, -// since we prove lowest key first before moving to key of higher subtrees -func (pth *KeyPath) GetKey(i int) []byte { - total := len(pth.Keys) - index := (total + i) % total - return pth.Keys[index].Name -} diff --git a/x/ibc/core/23-commitment/types/merkle.go b/x/ibc/core/23-commitment/types/merkle.go index 87a830e294..fe7d5c302b 100644 --- a/x/ibc/core/23-commitment/types/merkle.go +++ b/x/ibc/core/23-commitment/types/merkle.go @@ -2,6 +2,7 @@ package types import ( "bytes" + "fmt" "net/url" ics23 "github.com/confio/ics23/go" @@ -9,7 +10,6 @@ import ( tmcrypto "github.com/tendermint/tendermint/proto/tendermint/crypto" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - host "github.com/cosmos/cosmos-sdk/x/ibc/core/24-host" "github.com/cosmos/cosmos-sdk/x/ibc/core/exported" ) @@ -68,51 +68,62 @@ func (mp MerklePrefix) Empty() bool { var _ exported.Path = (*MerklePath)(nil) // NewMerklePath creates a new MerklePath instance -func NewMerklePath(keyPathStr []string) MerklePath { - merkleKeyPath := KeyPath{} - for _, keyStr := range keyPathStr { - merkleKeyPath = merkleKeyPath.AppendKey([]byte(keyStr), URL) - } - +// The keys must be passed in from root-to-leaf order +func NewMerklePath(keyPath ...string) MerklePath { return MerklePath{ - KeyPath: merkleKeyPath, + KeyPath: keyPath, } } // String implements fmt.Stringer. +// This represents the path in the same way the tendermint KeyPath will +// represent a key path. The backslashes partition the key path into +// the respective stores they belong to. func (mp MerklePath) String() string { - return mp.KeyPath.String() + pathStr := "" + for _, k := range mp.KeyPath { + pathStr += "/" + url.PathEscape(k) + } + return pathStr } // Pretty returns the unescaped path of the URL string. +// This function will unescape any backslash within a particular store key. +// This makes the keypath more human-readable while removing information +// about the exact partitions in the key path. func (mp MerklePath) Pretty() string { - path, err := url.PathUnescape(mp.KeyPath.String()) + path, err := url.PathUnescape(mp.String()) if err != nil { panic(err) } return path } -// Empty returns true if the path is empty -func (mp MerklePath) Empty() bool { - return len(mp.KeyPath.Keys) == 0 +// GetKey will return a byte representation of the key +// after URL escaping the key element +func (mp MerklePath) GetKey(i uint64) ([]byte, error) { + if i >= uint64(len(mp.KeyPath)) { + return nil, fmt.Errorf("index out of range. %d (index) >= %d (len)", i, len(mp.KeyPath)) + } + key, err := url.PathUnescape(mp.KeyPath[i]) + if err != nil { + return nil, err + } + return []byte(key), nil } -// ApplyPrefix constructs a new commitment path from the arguments. It interprets -// the path argument in the context of the prefix argument. -// -// CONTRACT: provided path string MUST be a well formated path. See ICS24 for -// reference. -func ApplyPrefix(prefix exported.Prefix, path string) (MerklePath, error) { - err := host.PathValidator(path) - if err != nil { - return MerklePath{}, err - } +// Empty returns true if the path is empty +func (mp MerklePath) Empty() bool { + return len(mp.KeyPath) == 0 +} +// ApplyPrefix constructs a new commitment path from the arguments. It prepends the prefix key +// with the given path. +func ApplyPrefix(prefix exported.Prefix, path MerklePath) (MerklePath, error) { if prefix == nil || prefix.Empty() { return MerklePath{}, sdkerrors.Wrap(ErrInvalidPrefix, "prefix can't be empty") } - return NewMerklePath([]string{string(prefix.Bytes()), path}), nil + return NewMerklePath(append([]string{string(prefix.Bytes())}, path.KeyPath...)...), nil } var _ exported.Proof = (*MerkleProof)(nil) @@ -128,22 +139,17 @@ func (proof MerkleProof) VerifyMembership(specs []*ics23.ProofSpec, root exporte if !ok { return sdkerrors.Wrapf(ErrInvalidProof, "path %v is not of type MerklePath", path) } - if len(mpath.KeyPath.Keys) != len(specs) { + if len(mpath.KeyPath) != len(specs) { return sdkerrors.Wrapf(ErrInvalidProof, "path length %d not same as proof %d", - len(mpath.KeyPath.Keys), len(specs)) + len(mpath.KeyPath), len(specs)) } if len(value) == 0 { return sdkerrors.Wrap(ErrInvalidProof, "empty value in membership proof") } - // Convert Proof to []CommitmentProof - proofs, err := convertProofs(proof) - if err != nil { - return err - } - - // Since every proof in chain is a membership proof we can chain from index 0 - if err := verifyChainedMembershipProof(root.GetHash(), specs, proofs, mpath.KeyPath, value, 0); err != nil { + // Since every proof in chain is a membership proof we can use verifyChainedMembershipProof from index 0 + // to validate entire proof + if err := verifyChainedMembershipProof(root.GetHash(), specs, proof.Proofs, mpath, value, 0); err != nil { return err } return nil @@ -162,31 +168,37 @@ func (proof MerkleProof) VerifyNonMembership(specs []*ics23.ProofSpec, root expo if !ok { return sdkerrors.Wrapf(ErrInvalidProof, "path %v is not of type MerkleProof", path) } - if len(mpath.KeyPath.Keys) != len(specs) { + if len(mpath.KeyPath) != len(specs) { return sdkerrors.Wrapf(ErrInvalidProof, "path length %d not same as proof %d", - len(mpath.KeyPath.Keys), len(specs)) + len(mpath.KeyPath), len(specs)) } - // Convert Proof to []CommitmentProof - proofs, err := convertProofs(proof) - if err != nil { - return err - } + switch proof.Proofs[0].Proof.(type) { + case *ics23.CommitmentProof_Nonexist: + // VerifyNonMembership will verify the absence of key in lowest subtree, and then chain inclusion proofs + // of all subroots up to final root + subroot, err := proof.Proofs[0].Calculate() + if err != nil { + return sdkerrors.Wrapf(ErrInvalidProof, "could not calculate root for proof index 0, merkle tree is likely empty. %v", err) + } + key, err := mpath.GetKey(uint64(len(mpath.KeyPath) - 1)) + if err != nil { + return sdkerrors.Wrapf(ErrInvalidProof, "could not retrieve key bytes for key: %s", mpath.KeyPath[len(mpath.KeyPath)-1]) + } + if ok := ics23.VerifyNonMembership(specs[0], subroot, proof.Proofs[0], key); !ok { + return sdkerrors.Wrapf(ErrInvalidProof, "could not verify absence of key %s. Please ensure that the path is correct.", string(key)) + } - // VerifyNonMembership will verify the absence of key in lowest subtree, and then chain inclusion proofs - // of all subroots up to final root - subroot, err := proofs[0].Calculate() - if err != nil { - sdkerrors.Wrapf(ErrInvalidProof, "could not calculate root for proof index 0. %v", err) - } - key := mpath.KeyPath.GetKey(-1) - if ok := ics23.VerifyNonMembership(specs[0], subroot, proofs[0], key); !ok { - return sdkerrors.Wrapf(ErrInvalidProof, "could not verify absence of key %s", string(key)) - } - - // Verify chained membership proof starting from index 1 with value = subroot - if err := verifyChainedMembershipProof(root.GetHash(), specs, proofs, mpath.KeyPath, subroot, 1); err != nil { - return err + // Verify chained membership proof starting from index 1 with value = subroot + if err := verifyChainedMembershipProof(root.GetHash(), specs, proof.Proofs, mpath, subroot, 1); err != nil { + return err + } + case *ics23.CommitmentProof_Exist: + return sdkerrors.Wrapf(ErrInvalidProof, + "got ExistenceProof in VerifyNonMembership. If this is unexpected, please ensure that proof was queried with the correct key.") + default: + return sdkerrors.Wrapf(ErrInvalidProof, + "expected proof type: %T, got: %T", &ics23.CommitmentProof_Exist{}, proof.Proofs[0].Proof) } return nil } @@ -208,7 +220,7 @@ func (proof MerkleProof) BatchVerifyNonMembership(specs []*ics23.ProofSpec, root // The proofs and specs are passed in from lowest subtree to the highest subtree, but the keys are passed in from highest subtree to lowest. // The index specifies what index to start chaining the membership proofs, this is useful since the lowest proof may not be a membership proof, thus we // will want to start the membership proof chaining from index 1 with value being the lowest subroot -func verifyChainedMembershipProof(root []byte, specs []*ics23.ProofSpec, proofs []*ics23.CommitmentProof, keys KeyPath, value []byte, index int) error { +func verifyChainedMembershipProof(root []byte, specs []*ics23.ProofSpec, proofs []*ics23.CommitmentProof, keys MerklePath, value []byte, index int) error { var ( subroot []byte err error @@ -218,42 +230,45 @@ func verifyChainedMembershipProof(root []byte, specs []*ics23.ProofSpec, proofs // In this case, there may be no intermediate proofs to verify and we just check that lowest proof root equals final root subroot = value for i := index; i < len(proofs); i++ { - subroot, err = proofs[i].Calculate() - if err != nil { - return sdkerrors.Wrapf(ErrInvalidProof, "could not calculate proof root at index %d. %v", i, err) + switch proofs[i].Proof.(type) { + case *ics23.CommitmentProof_Exist: + subroot, err = proofs[i].Calculate() + if err != nil { + return sdkerrors.Wrapf(ErrInvalidProof, "could not calculate proof root at index %d, merkle tree may be empty. %v", i, err) + } + // Since keys are passed in from highest to lowest, we must grab their indices in reverse order + // from the proofs and specs which are lowest to highest + key, err := keys.GetKey(uint64(len(keys.KeyPath) - 1 - i)) + if err != nil { + return sdkerrors.Wrapf(ErrInvalidProof, "could not retrieve key bytes for key %s: %v", keys.KeyPath[len(keys.KeyPath)-1-i], err) + } + + // verify membership of the proof at this index with appropriate key and value + if ok := ics23.VerifyMembership(specs[i], subroot, proofs[i], key, value); !ok { + return sdkerrors.Wrapf(ErrInvalidProof, + "chained membership proof failed to verify membership of value: %X in subroot %X at index %d. Please ensure the path and value are both correct.", + value, subroot, i) + } + // Set value to subroot so that we verify next proof in chain commits to this subroot + value = subroot + case *ics23.CommitmentProof_Nonexist: + return sdkerrors.Wrapf(ErrInvalidProof, + "chained membership proof contains nonexistence proof at index %d. If this is unexpected, please ensure that proof was queried from the height that contained the value in store and was queried with the correct key.", + i) + default: + return sdkerrors.Wrapf(ErrInvalidProof, + "expected proof type: %T, got: %T", &ics23.CommitmentProof_Exist{}, proofs[i].Proof) } - // Since keys are passed in from highest to lowest, we must grab their indices in reverse order - // from the proofs and specs which are lowest to highest - key := keys.GetKey(-1 * (i + 1)) - if ok := ics23.VerifyMembership(specs[i], subroot, proofs[i], key, value); !ok { - return sdkerrors.Wrapf(ErrInvalidProof, "chained membership proof failed to verify membership of value: %X in subroot %X at index %d for proof %v", - value, subroot, i, proofs[i]) - } - // Set value to subroot so that we verify next proof in chain commits to this subroot - value = subroot } // Check that chained proof root equals passed-in root if !bytes.Equal(root, subroot) { - return sdkerrors.Wrapf(ErrInvalidProof, "proof did not commit to expected root: %X, got: %X", root, subroot) + return sdkerrors.Wrapf(ErrInvalidProof, + "proof did not commit to expected root: %X, got: %X. Please ensure proof was submitted with correct proofHeight and to the correct chain.", + root, subroot) } return nil } -// convertProofs converts a MerkleProof into []*ics23.CommitmentProof -func convertProofs(mproof MerkleProof) ([]*ics23.CommitmentProof, error) { - // Unmarshal all proof ops to CommitmentProof - proofs := make([]*ics23.CommitmentProof, len(mproof.Proof.Ops)) - for i, op := range mproof.Proof.Ops { - var p ics23.CommitmentProof - err := p.Unmarshal(op.Data) - if err != nil { - return nil, sdkerrors.Wrapf(ErrInvalidMerkleProof, "could not unmarshal proof op into CommitmentProof at index: %d", i) - } - proofs[i] = &p - } - return proofs, nil -} - // Empty returns true if the root is empty func (proof MerkleProof) Empty() bool { return proto.Equal(&proof, nil) || proto.Equal(&proof, &MerkleProof{}) || proto.Equal(&proof, &tmcrypto.ProofOps{}) @@ -277,10 +292,10 @@ func (proof MerkleProof) validateVerificationArgs(specs []*ics23.ProofSpec, root return sdkerrors.Wrap(ErrInvalidMerkleProof, "root cannot be empty") } - if len(specs) != len(proof.Proof.Ops) { + if len(specs) != len(proof.Proofs) { return sdkerrors.Wrapf(ErrInvalidMerkleProof, "length of specs: %d not equal to length of proof: %d", - len(specs), len(proof.Proof.Ops)) + len(specs), len(proof.Proofs)) } for i, spec := range specs { diff --git a/x/ibc/core/23-commitment/types/merkle_test.go b/x/ibc/core/23-commitment/types/merkle_test.go index 4da9099e85..3c53847fad 100644 --- a/x/ibc/core/23-commitment/types/merkle_test.go +++ b/x/ibc/core/23-commitment/types/merkle_test.go @@ -6,8 +6,6 @@ import ( "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" - tmcrypto "github.com/tendermint/tendermint/proto/tendermint/crypto" - tmmerkle "github.com/tendermint/tendermint/proto/tendermint/crypto" "github.com/cosmos/cosmos-sdk/x/ibc/core/23-commitment/types" ) @@ -23,9 +21,9 @@ func (suite *MerkleTestSuite) TestVerifyMembership() { }) require.NotNil(suite.T(), res.ProofOps) - proof := types.MerkleProof{ - Proof: res.ProofOps, - } + proof, err := types.ConvertProofs(res.ProofOps) + require.NoError(suite.T(), err) + suite.Require().NoError(proof.ValidateBasic()) suite.Require().Error(types.MerkleProof{}.ValidateBasic()) @@ -49,9 +47,7 @@ func (suite *MerkleTestSuite) TestVerifyMembership() { {"nil root", []byte(nil), []string{suite.storeKey.Name(), "MYKEY"}, []byte("MYVALUE"), func() {}, false}, // invalid proof with nil root {"proof is wrong length", cid.Hash, []string{suite.storeKey.Name(), "MYKEY"}, []byte("MYVALUE"), func() { proof = types.MerkleProof{ - Proof: &tmmerkle.ProofOps{ - Ops: res.ProofOps.Ops[1:], - }, + Proofs: proof.Proofs[1:], } }, false}, // invalid proof with wrong length @@ -63,7 +59,7 @@ func (suite *MerkleTestSuite) TestVerifyMembership() { tc.malleate() root := types.NewMerkleRoot(tc.root) - path := types.NewMerklePath(tc.pathArr) + path := types.NewMerklePath(tc.pathArr...) err := proof.VerifyMembership(types.GetSDKSpecs(), &root, path, tc.value) @@ -91,9 +87,9 @@ func (suite *MerkleTestSuite) TestVerifyNonMembership() { }) require.NotNil(suite.T(), res.ProofOps) - proof := types.MerkleProof{ - Proof: res.ProofOps, - } + proof, err := types.ConvertProofs(res.ProofOps) + require.NoError(suite.T(), err) + suite.Require().NoError(proof.ValidateBasic()) cases := []struct { @@ -114,9 +110,7 @@ func (suite *MerkleTestSuite) TestVerifyNonMembership() { {"nil root", []byte(nil), []string{suite.storeKey.Name(), "MYABSENTKEY"}, func() {}, false}, // invalid proof with nil root {"proof is wrong length", cid.Hash, []string{suite.storeKey.Name(), "MYKEY"}, func() { proof = types.MerkleProof{ - Proof: &tmcrypto.ProofOps{ - Ops: res.ProofOps.Ops[1:], - }, + Proofs: proof.Proofs[1:], } }, false}, // invalid proof with wrong length @@ -129,7 +123,7 @@ func (suite *MerkleTestSuite) TestVerifyNonMembership() { tc.malleate() root := types.NewMerkleRoot(tc.root) - path := types.NewMerklePath(tc.pathArr) + path := types.NewMerklePath(tc.pathArr...) err := proof.VerifyNonMembership(types.GetSDKSpecs(), &root, path) @@ -149,16 +143,30 @@ func TestApplyPrefix(t *testing.T) { prefix := types.NewMerklePrefix([]byte("storePrefixKey")) pathStr := "pathone/pathtwo/paththree/key" + path := types.MerklePath{ + KeyPath: []string{pathStr}, + } - prefixedPath, err := types.ApplyPrefix(prefix, pathStr) - require.Nil(t, err, "valid prefix returns error") + prefixedPath, err := types.ApplyPrefix(prefix, path) + require.NoError(t, err, "valid prefix returns error") require.Equal(t, "/storePrefixKey/"+pathStr, prefixedPath.Pretty(), "Prefixed path incorrect") - require.Equal(t, "/storePrefixKey/pathone%2Fpathtwo%2Fpaththree%2Fkey", prefixedPath.String(), "Prefixed scaped path incorrect") + require.Equal(t, "/storePrefixKey/pathone%2Fpathtwo%2Fpaththree%2Fkey", prefixedPath.String(), "Prefixed escaped path incorrect") +} - // invalid prefix contains non-alphanumeric character - invalidPathStr := "invalid-path/doesitfail?/hopefully" - invalidPath, err := types.ApplyPrefix(prefix, invalidPathStr) - require.NotNil(t, err, "invalid prefix does not returns error") - require.Equal(t, types.MerklePath{}, invalidPath, "invalid prefix returns valid Path on ApplyPrefix") +func TestString(t *testing.T) { + path := types.NewMerklePath("rootKey", "storeKey", "path/to/leaf") + + require.Equal(t, "/rootKey/storeKey/path%2Fto%2Fleaf", path.String(), "path String returns unxpected value") + require.Equal(t, "/rootKey/storeKey/path/to/leaf", path.Pretty(), "path's pretty string representation is incorrect") + + onePath := types.NewMerklePath("path/to/leaf") + + require.Equal(t, "/path%2Fto%2Fleaf", onePath.String(), "one element path does not have correct string representation") + require.Equal(t, "/path/to/leaf", onePath.Pretty(), "one element path has incorrect pretty string representation") + + zeroPath := types.NewMerklePath() + + require.Equal(t, "", zeroPath.String(), "zero element path does not have correct string representation") + require.Equal(t, "", zeroPath.Pretty(), "zero element path does not have correct pretty string representation") } diff --git a/x/ibc/core/23-commitment/types/utils.go b/x/ibc/core/23-commitment/types/utils.go new file mode 100644 index 0000000000..7d2937f0fb --- /dev/null +++ b/x/ibc/core/23-commitment/types/utils.go @@ -0,0 +1,27 @@ +package types + +import ( + ics23 "github.com/confio/ics23/go" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + crypto "github.com/tendermint/tendermint/proto/tendermint/crypto" +) + +// ConvertProofs converts crypto.ProofOps into MerkleProof +func ConvertProofs(tmProof *crypto.ProofOps) (MerkleProof, error) { + if tmProof == nil { + return MerkleProof{}, sdkerrors.Wrapf(ErrInvalidMerkleProof, "tendermint proof is nil") + } + // Unmarshal all proof ops to CommitmentProof + proofs := make([]*ics23.CommitmentProof, len(tmProof.Ops)) + for i, op := range tmProof.Ops { + var p ics23.CommitmentProof + err := p.Unmarshal(op.Data) + if err != nil || p.Proof == nil { + return MerkleProof{}, sdkerrors.Wrapf(ErrInvalidMerkleProof, "could not unmarshal proof op into CommitmentProof at index %d: %v", i, err) + } + proofs[i] = &p + } + return MerkleProof{ + Proofs: proofs, + }, nil +} diff --git a/x/ibc/core/23-commitment/types/utils_test.go b/x/ibc/core/23-commitment/types/utils_test.go new file mode 100644 index 0000000000..a4c08d13fa --- /dev/null +++ b/x/ibc/core/23-commitment/types/utils_test.go @@ -0,0 +1,97 @@ +package types_test + +import ( + "fmt" + + "github.com/cosmos/cosmos-sdk/x/ibc/core/23-commitment/types" + "github.com/stretchr/testify/require" + abci "github.com/tendermint/tendermint/abci/types" + crypto "github.com/tendermint/tendermint/proto/tendermint/crypto" +) + +func (suite *MerkleTestSuite) TestConvertProofs() { + suite.iavlStore.Set([]byte("MYKEY"), []byte("MYVALUE")) + cid := suite.store.Commit() + + root := types.NewMerkleRoot(cid.Hash) + existsPath := types.NewMerklePath(suite.storeKey.Name(), "MYKEY") + nonexistPath := types.NewMerklePath(suite.storeKey.Name(), "NOTMYKEY") + value := []byte("MYVALUE") + + var proofOps *crypto.ProofOps + testcases := []struct { + name string + malleate func() + keyExists bool + expPass bool + }{ + { + "success for ExistenceProof", + func() { + res := suite.store.Query(abci.RequestQuery{ + Path: fmt.Sprintf("/%s/key", suite.storeKey.Name()), // required path to get key/value+proof + Data: []byte("MYKEY"), + Prove: true, + }) + require.NotNil(suite.T(), res.ProofOps) + + proofOps = res.ProofOps + }, + true, true, + }, + { + "success for NonexistenceProof", + func() { + res := suite.store.Query(abci.RequestQuery{ + Path: fmt.Sprintf("/%s/key", suite.storeKey.Name()), // required path to get key/value+proof + Data: []byte("NOTMYKEY"), + Prove: true, + }) + require.NotNil(suite.T(), res.ProofOps) + + proofOps = res.ProofOps + }, + false, true, + }, + { + "nil proofOps", + func() { + proofOps = nil + }, + true, false, + }, + { + "proof op data is nil", + func() { + res := suite.store.Query(abci.RequestQuery{ + Path: fmt.Sprintf("/%s/key", suite.storeKey.Name()), // required path to get key/value+proof + Data: []byte("MYKEY"), + Prove: true, + }) + require.NotNil(suite.T(), res.ProofOps) + + proofOps = res.ProofOps + proofOps.Ops[0].Data = nil + }, + true, false, + }, + } + + for _, tc := range testcases { + tc.malleate() + + proof, err := types.ConvertProofs(proofOps) + if tc.expPass { + suite.Require().NoError(err, "ConvertProofs unexpectedly returned error for case: %s", tc.name) + if tc.keyExists { + err := proof.VerifyMembership(types.GetSDKSpecs(), &root, existsPath, value) + suite.Require().NoError(err, "converted proof failed to verify membership for case: %s", tc.name) + } else { + err := proof.VerifyNonMembership(types.GetSDKSpecs(), &root, nonexistPath) + suite.Require().NoError(err, "converted proof failed to verify membership for case: %s", tc.name) + } + } else { + suite.Require().Error(err, "ConvertProofs passed on invalid case for case: %s", tc.name) + } + } +} diff --git a/x/ibc/core/client/query.go b/x/ibc/core/client/query.go index 273e25583c..dad0c28998 100644 --- a/x/ibc/core/client/query.go +++ b/x/ibc/core/client/query.go @@ -50,8 +50,9 @@ func QueryTendermintProof(clientCtx client.Context, key []byte) ([]byte, []byte, return nil, nil, clienttypes.Height{}, err } - merkleProof := commitmenttypes.MerkleProof{ - Proof: res.ProofOps, + merkleProof, err := commitmenttypes.ConvertProofs(res.ProofOps) + if err != nil { + return nil, nil, clienttypes.Height{}, err } cdc := codec.NewProtoCodec(clientCtx.InterfaceRegistry) diff --git a/x/ibc/core/keeper/msg_server_test.go b/x/ibc/core/keeper/msg_server_test.go index 0bed10ae7a..a80426724f 100644 --- a/x/ibc/core/keeper/msg_server_test.go +++ b/x/ibc/core/keeper/msg_server_test.go @@ -41,6 +41,9 @@ func (suite *KeeperTestSuite) SetupTest() { suite.chainA = suite.coordinator.GetChain(ibctesting.GetChainID(0)) suite.chainB = suite.coordinator.GetChain(ibctesting.GetChainID(1)) + // commit some blocks so that QueryProof returns valid proof (cannot return valid query if height <= 1) + suite.coordinator.CommitNBlocks(suite.chainA, 2) + suite.coordinator.CommitNBlocks(suite.chainB, 2) } func TestIBCTestSuite(t *testing.T) { diff --git a/x/ibc/light-clients/06-solomachine/types/client_state.go b/x/ibc/light-clients/06-solomachine/types/client_state.go index f23b6824bf..583193f3da 100644 --- a/x/ibc/light-clients/06-solomachine/types/client_state.go +++ b/x/ibc/light-clients/06-solomachine/types/client_state.go @@ -100,7 +100,7 @@ func (cs ClientState) VerifyClientState( return err } - clientPrefixedPath := "clients/" + counterpartyClientIdentifier + "/" + host.ClientStatePath() + clientPrefixedPath := commitmenttypes.NewMerklePath("clients/" + counterpartyClientIdentifier + "/" + host.ClientStatePath()) path, err := commitmenttypes.ApplyPrefix(prefix, clientPrefixedPath) if err != nil { return err @@ -138,7 +138,7 @@ func (cs ClientState) VerifyClientConsensusState( return err } - clientPrefixedPath := "clients/" + counterpartyClientIdentifier + "/" + host.ConsensusStatePath(consensusHeight) + clientPrefixedPath := commitmenttypes.NewMerklePath("clients/" + counterpartyClientIdentifier + "/" + host.ConsensusStatePath(consensusHeight)) path, err := commitmenttypes.ApplyPrefix(prefix, clientPrefixedPath) if err != nil { return err @@ -175,7 +175,8 @@ func (cs ClientState) VerifyConnectionState( return err } - path, err := commitmenttypes.ApplyPrefix(prefix, host.ConnectionPath(connectionID)) + connectionPath := commitmenttypes.NewMerklePath(host.ConnectionPath(connectionID)) + path, err := commitmenttypes.ApplyPrefix(prefix, connectionPath) if err != nil { return err } @@ -212,7 +213,8 @@ func (cs ClientState) VerifyChannelState( return err } - path, err := commitmenttypes.ApplyPrefix(prefix, host.ChannelPath(portID, channelID)) + channelPath := commitmenttypes.NewMerklePath(host.ChannelPath(portID, channelID)) + path, err := commitmenttypes.ApplyPrefix(prefix, channelPath) if err != nil { return err } @@ -250,7 +252,8 @@ func (cs ClientState) VerifyPacketCommitment( return err } - path, err := commitmenttypes.ApplyPrefix(prefix, host.PacketCommitmentPath(portID, channelID, packetSequence)) + commitmentPath := commitmenttypes.NewMerklePath(host.PacketCommitmentPath(portID, channelID, packetSequence)) + path, err := commitmenttypes.ApplyPrefix(prefix, commitmentPath) if err != nil { return err } @@ -288,7 +291,8 @@ func (cs ClientState) VerifyPacketAcknowledgement( return err } - path, err := commitmenttypes.ApplyPrefix(prefix, host.PacketAcknowledgementPath(portID, channelID, packetSequence)) + ackPath := commitmenttypes.NewMerklePath(host.PacketAcknowledgementPath(portID, channelID, packetSequence)) + path, err := commitmenttypes.ApplyPrefix(prefix, ackPath) if err != nil { return err } @@ -326,7 +330,8 @@ func (cs ClientState) VerifyPacketReceiptAbsence( return err } - path, err := commitmenttypes.ApplyPrefix(prefix, host.PacketReceiptPath(portID, channelID, packetSequence)) + receiptPath := commitmenttypes.NewMerklePath(host.PacketReceiptPath(portID, channelID, packetSequence)) + path, err := commitmenttypes.ApplyPrefix(prefix, receiptPath) if err != nil { return err } @@ -363,7 +368,8 @@ func (cs ClientState) VerifyNextSequenceRecv( return err } - path, err := commitmenttypes.ApplyPrefix(prefix, host.NextSequenceRecvPath(portID, channelID)) + nextSequenceRecvPath := commitmenttypes.NewMerklePath(host.NextSequenceRecvPath(portID, channelID)) + path, err := commitmenttypes.ApplyPrefix(prefix, nextSequenceRecvPath) if err != nil { return err } diff --git a/x/ibc/light-clients/07-tendermint/types/client_state.go b/x/ibc/light-clients/07-tendermint/types/client_state.go index 4e4104d8df..65d4312452 100644 --- a/x/ibc/light-clients/07-tendermint/types/client_state.go +++ b/x/ibc/light-clients/07-tendermint/types/client_state.go @@ -180,7 +180,7 @@ func (cs ClientState) VerifyClientState( return err } - clientPrefixedPath := "clients/" + counterpartyClientIdentifier + "/" + host.ClientStatePath() + clientPrefixedPath := commitmenttypes.NewMerklePath("clients/" + counterpartyClientIdentifier + "/" + host.ClientStatePath()) path, err := commitmenttypes.ApplyPrefix(prefix, clientPrefixedPath) if err != nil { return err @@ -220,7 +220,7 @@ func (cs ClientState) VerifyClientConsensusState( return err } - clientPrefixedPath := "clients/" + counterpartyClientIdentifier + "/" + host.ConsensusStatePath(consensusHeight) + clientPrefixedPath := commitmenttypes.NewMerklePath("clients/" + counterpartyClientIdentifier + "/" + host.ConsensusStatePath(consensusHeight)) path, err := commitmenttypes.ApplyPrefix(prefix, clientPrefixedPath) if err != nil { return err @@ -263,7 +263,8 @@ func (cs ClientState) VerifyConnectionState( return err } - path, err := commitmenttypes.ApplyPrefix(prefix, host.ConnectionPath(connectionID)) + connectionPath := commitmenttypes.NewMerklePath(host.ConnectionPath(connectionID)) + path, err := commitmenttypes.ApplyPrefix(prefix, connectionPath) if err != nil { return err } @@ -302,7 +303,8 @@ func (cs ClientState) VerifyChannelState( return err } - path, err := commitmenttypes.ApplyPrefix(prefix, host.ChannelPath(portID, channelID)) + channelPath := commitmenttypes.NewMerklePath(host.ChannelPath(portID, channelID)) + path, err := commitmenttypes.ApplyPrefix(prefix, channelPath) if err != nil { return err } @@ -342,7 +344,8 @@ func (cs ClientState) VerifyPacketCommitment( return err } - path, err := commitmenttypes.ApplyPrefix(prefix, host.PacketCommitmentPath(portID, channelID, sequence)) + commitmentPath := commitmenttypes.NewMerklePath(host.PacketCommitmentPath(portID, channelID, sequence)) + path, err := commitmenttypes.ApplyPrefix(prefix, commitmentPath) if err != nil { return err } @@ -372,7 +375,8 @@ func (cs ClientState) VerifyPacketAcknowledgement( return err } - path, err := commitmenttypes.ApplyPrefix(prefix, host.PacketAcknowledgementPath(portID, channelID, sequence)) + ackPath := commitmenttypes.NewMerklePath(host.PacketAcknowledgementPath(portID, channelID, sequence)) + path, err := commitmenttypes.ApplyPrefix(prefix, ackPath) if err != nil { return err } @@ -402,7 +406,8 @@ func (cs ClientState) VerifyPacketReceiptAbsence( return err } - path, err := commitmenttypes.ApplyPrefix(prefix, host.PacketReceiptPath(portID, channelID, sequence)) + receiptPath := commitmenttypes.NewMerklePath(host.PacketReceiptPath(portID, channelID, sequence)) + path, err := commitmenttypes.ApplyPrefix(prefix, receiptPath) if err != nil { return err } @@ -431,7 +436,8 @@ func (cs ClientState) VerifyNextSequenceRecv( return err } - path, err := commitmenttypes.ApplyPrefix(prefix, host.NextSequenceRecvPath(portID, channelID)) + nextSequenceRecvPath := commitmenttypes.NewMerklePath(host.NextSequenceRecvPath(portID, channelID)) + path, err := commitmenttypes.ApplyPrefix(prefix, nextSequenceRecvPath) if err != nil { return err } diff --git a/x/ibc/light-clients/07-tendermint/types/tendermint_test.go b/x/ibc/light-clients/07-tendermint/types/tendermint_test.go index 171d33f561..c30a784a5c 100644 --- a/x/ibc/light-clients/07-tendermint/types/tendermint_test.go +++ b/x/ibc/light-clients/07-tendermint/types/tendermint_test.go @@ -60,6 +60,9 @@ func (suite *TendermintTestSuite) SetupTest() { suite.coordinator = ibctesting.NewCoordinator(suite.T(), 2) suite.chainA = suite.coordinator.GetChain(ibctesting.GetChainID(0)) suite.chainB = suite.coordinator.GetChain(ibctesting.GetChainID(1)) + // commit some blocks so that QueryProof returns valid proof (cannot return valid query if height <= 1) + suite.coordinator.CommitNBlocks(suite.chainA, 2) + suite.coordinator.CommitNBlocks(suite.chainB, 2) // TODO: deprecate usage in favor of testing package checkTx := false diff --git a/x/ibc/light-clients/07-tendermint/types/upgrade.go b/x/ibc/light-clients/07-tendermint/types/upgrade.go index 3c096f94a8..28f02950d1 100644 --- a/x/ibc/light-clients/07-tendermint/types/upgrade.go +++ b/x/ibc/light-clients/07-tendermint/types/upgrade.go @@ -117,5 +117,5 @@ func constructUpgradeMerklePath(upgradePath string, upgradeHeight exported.Heigh // append upgradeHeight to last key in merkle path // this will create the IAVL key that is used to store client in upgrade store upgradeKeys[len(upgradeKeys)-1] = fmt.Sprintf("%s/%d", lastKey, upgradeHeight.GetVersionHeight()) - return commitmenttypes.NewMerklePath(upgradeKeys), nil + return commitmenttypes.NewMerklePath(upgradeKeys...), nil } diff --git a/x/ibc/testing/chain.go b/x/ibc/testing/chain.go index c29c111e8f..f43c4d2676 100644 --- a/x/ibc/testing/chain.go +++ b/x/ibc/testing/chain.go @@ -197,9 +197,8 @@ func (chain *TestChain) QueryProof(key []byte) ([]byte, clienttypes.Height) { Prove: true, }) - merkleProof := commitmenttypes.MerkleProof{ - Proof: res.ProofOps, - } + merkleProof, err := commitmenttypes.ConvertProofs(res.ProofOps) + require.NoError(chain.t, err) proof, err := chain.App.AppCodec().MarshalBinaryBare(&merkleProof) require.NoError(chain.t, err) @@ -222,9 +221,8 @@ func (chain *TestChain) QueryUpgradeProof(key []byte, height uint64) ([]byte, cl Prove: true, }) - merkleProof := commitmenttypes.MerkleProof{ - Proof: res.ProofOps, - } + merkleProof, err := commitmenttypes.ConvertProofs(res.ProofOps) + require.NoError(chain.t, err) proof, err := chain.App.AppCodec().MarshalBinaryBare(&merkleProof) require.NoError(chain.t, err) diff --git a/x/ibc/testing/solomachine.go b/x/ibc/testing/solomachine.go index 6b2508f30e..0d3b35811e 100644 --- a/x/ibc/testing/solomachine.go +++ b/x/ibc/testing/solomachine.go @@ -251,7 +251,7 @@ func (solo *Solomachine) GenerateSignature(signBytes []byte) []byte { // GetClientStatePath returns the commitment path for the client state. func (solo *Solomachine) GetClientStatePath(counterpartyClientIdentifier string) commitmenttypes.MerklePath { - clientPrefixedPath := "clients/" + counterpartyClientIdentifier + "/" + host.ClientStatePath() + clientPrefixedPath := commitmenttypes.NewMerklePath("clients/" + counterpartyClientIdentifier + "/" + host.ClientStatePath()) path, err := commitmenttypes.ApplyPrefix(prefix, clientPrefixedPath) require.NoError(solo.t, err) @@ -260,7 +260,7 @@ func (solo *Solomachine) GetClientStatePath(counterpartyClientIdentifier string) // GetConsensusStatePath returns the commitment path for the consensus state. func (solo *Solomachine) GetConsensusStatePath(counterpartyClientIdentifier string, consensusHeight exported.Height) commitmenttypes.MerklePath { - clientPrefixedPath := "clients/" + counterpartyClientIdentifier + "/" + host.ConsensusStatePath(consensusHeight) + clientPrefixedPath := commitmenttypes.NewMerklePath("clients/" + counterpartyClientIdentifier + "/" + host.ConsensusStatePath(consensusHeight)) path, err := commitmenttypes.ApplyPrefix(prefix, clientPrefixedPath) require.NoError(solo.t, err) @@ -269,7 +269,8 @@ func (solo *Solomachine) GetConsensusStatePath(counterpartyClientIdentifier stri // GetConnectionStatePath returns the commitment path for the connection state. func (solo *Solomachine) GetConnectionStatePath(connID string) commitmenttypes.MerklePath { - path, err := commitmenttypes.ApplyPrefix(prefix, host.ConnectionPath(connID)) + connectionPath := commitmenttypes.NewMerklePath(host.ConnectionPath(connID)) + path, err := commitmenttypes.ApplyPrefix(prefix, connectionPath) require.NoError(solo.t, err) return path @@ -277,7 +278,8 @@ func (solo *Solomachine) GetConnectionStatePath(connID string) commitmenttypes.M // GetChannelStatePath returns the commitment path for that channel state. func (solo *Solomachine) GetChannelStatePath(portID, channelID string) commitmenttypes.MerklePath { - path, err := commitmenttypes.ApplyPrefix(prefix, host.ChannelPath(portID, channelID)) + channelPath := commitmenttypes.NewMerklePath(host.ChannelPath(portID, channelID)) + path, err := commitmenttypes.ApplyPrefix(prefix, channelPath) require.NoError(solo.t, err) return path @@ -285,7 +287,8 @@ func (solo *Solomachine) GetChannelStatePath(portID, channelID string) commitmen // GetPacketCommitmentPath returns the commitment path for a packet commitment. func (solo *Solomachine) GetPacketCommitmentPath(portID, channelID string) commitmenttypes.MerklePath { - path, err := commitmenttypes.ApplyPrefix(prefix, host.PacketCommitmentPath(portID, channelID, solo.Sequence)) + commitmentPath := commitmenttypes.NewMerklePath(host.PacketCommitmentPath(portID, channelID, solo.Sequence)) + path, err := commitmenttypes.ApplyPrefix(prefix, commitmentPath) require.NoError(solo.t, err) return path @@ -293,7 +296,8 @@ func (solo *Solomachine) GetPacketCommitmentPath(portID, channelID string) commi // GetPacketAcknowledgementPath returns the commitment path for a packet acknowledgement. func (solo *Solomachine) GetPacketAcknowledgementPath(portID, channelID string) commitmenttypes.MerklePath { - path, err := commitmenttypes.ApplyPrefix(prefix, host.PacketAcknowledgementPath(portID, channelID, solo.Sequence)) + ackPath := commitmenttypes.NewMerklePath(host.PacketAcknowledgementPath(portID, channelID, solo.Sequence)) + path, err := commitmenttypes.ApplyPrefix(prefix, ackPath) require.NoError(solo.t, err) return path @@ -302,7 +306,8 @@ func (solo *Solomachine) GetPacketAcknowledgementPath(portID, channelID string) // GetPacketReceiptPath returns the commitment path for a packet receipt // and an absent receipts. func (solo *Solomachine) GetPacketReceiptPath(portID, channelID string) commitmenttypes.MerklePath { - path, err := commitmenttypes.ApplyPrefix(prefix, host.PacketReceiptPath(portID, channelID, solo.Sequence)) + receiptPath := commitmenttypes.NewMerklePath(host.PacketReceiptPath(portID, channelID, solo.Sequence)) + path, err := commitmenttypes.ApplyPrefix(prefix, receiptPath) require.NoError(solo.t, err) return path @@ -310,7 +315,8 @@ func (solo *Solomachine) GetPacketReceiptPath(portID, channelID string) commitme // GetNextSequenceRecvPath returns the commitment path for the next sequence recv counter. func (solo *Solomachine) GetNextSequenceRecvPath(portID, channelID string) commitmenttypes.MerklePath { - path, err := commitmenttypes.ApplyPrefix(prefix, host.NextSequenceRecvPath(portID, channelID)) + nextSequenceRecvPath := commitmenttypes.NewMerklePath(host.NextSequenceRecvPath(portID, channelID)) + path, err := commitmenttypes.ApplyPrefix(prefix, nextSequenceRecvPath) require.NoError(solo.t, err) return path diff --git a/x/staking/types/staking.pb.go b/x/staking/types/staking.pb.go index 865953c9dd..102fcea422 100644 --- a/x/staking/types/staking.pb.go +++ b/x/staking/types/staking.pb.go @@ -1216,606 +1216,608 @@ func (this *Pool) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_ func StakingDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} var gzipped = []byte{ - // 9578 bytes of a gzipped FileDescriptorSet + // 9603 bytes of a gzipped FileDescriptorSet 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x7d, 0x6d, 0x70, 0x24, 0xd7, 0x71, 0xd8, 0xcd, 0x7e, 0x00, 0xbb, 0x8d, 0x05, 0xb0, 0x78, 0xc0, 0xdd, 0xed, 0x2d, 0x8f, 0x00, 0x38, 0xfc, 0x3a, 0x1e, 0x49, 0x80, 0x3c, 0xf2, 0x8e, 0xe4, 0x9e, 0x44, 0x1a, 0x0b, 0xec, 0xe1, 0xc0, 0xc3, 0x17, 0x07, 0xc0, 0x91, 0xfa, 0x70, 0xb6, 0x06, 0xb3, 0x0f, 0x8b, 0x21, 0x76, 0x67, - 0x86, 0x33, 0xb3, 0x77, 0x07, 0x4a, 0xaa, 0xa2, 0x25, 0x45, 0x91, 0xe8, 0x38, 0x92, 0x2c, 0x97, - 0x23, 0x51, 0x3a, 0x45, 0xb2, 0x9c, 0xc8, 0x91, 0x95, 0xf8, 0x43, 0x8a, 0x12, 0x27, 0xa9, 0x8a, - 0x9c, 0x8a, 0x63, 0x49, 0xa9, 0xb8, 0xa4, 0x8a, 0x2b, 0x71, 0x5c, 0xc9, 0xd9, 0xa1, 0x54, 0x0e, - 0xa3, 0x28, 0xb1, 0x7c, 0x96, 0x13, 0xa7, 0x54, 0xa9, 0xa4, 0xde, 0xd7, 0x7c, 0xed, 0xc7, 0x2c, - 0xa0, 0x3b, 0x49, 0x8e, 0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 0xfc, 0xda, 0x02, - 0xc9, 0x5f, 0xde, 0x5a, 0xc9, 0x27, 0x48, 0x1e, 0xb5, 0xbc, 0xb4, 0x59, 0xa9, 0x2a, 0x5b, 0xab, - 0x9b, 0x4b, 0x2b, 0x95, 0x7c, 0x32, 0x90, 0xb0, 0x3f, 0x9b, 0xca, 0xdc, 0x97, 0xbf, 0x5f, 0xfe, - 0x46, 0x02, 0x46, 0xc2, 0x3b, 0x30, 0xf4, 0x26, 0x38, 0x2e, 0xca, 0x25, 0x0e, 0x76, 0xab, 0x57, - 0x75, 0x9b, 0xce, 0xc8, 0xa6, 0xca, 0x56, 0x47, 0xcf, 0x27, 0x26, 0x38, 0xd6, 0x06, 0x76, 0x9f, - 0xd7, 0x6d, 0x32, 0xdf, 0x9a, 0xaa, 0x8b, 0x96, 0x61, 0xca, 0x30, 0xab, 0x8e, 0xab, 0x1a, 0x35, - 0xd5, 0xae, 0x55, 0xfd, 0x42, 0x55, 0x55, 0xd5, 0x34, 0xec, 0x38, 0x26, 0x5b, 0x09, 0x3d, 0x2e, - 0x27, 0x0d, 0x73, 0x83, 0x23, 0xfb, 0x4b, 0xc4, 0x1c, 0x47, 0x8d, 0xf8, 0x6f, 0xb2, 0x9b, 0xff, - 0xde, 0x01, 0xd9, 0xa6, 0x6a, 0x55, 0xb1, 0xe1, 0xda, 0xfb, 0x34, 0xef, 0xce, 0x28, 0x99, 0xa6, - 0x6a, 0x55, 0x48, 0xfb, 0x87, 0xb2, 0xfd, 0x79, 0x36, 0x95, 0xc9, 0xe4, 0xb3, 0xcf, 0xa6, 0x32, - 0xd9, 0x3c, 0xc8, 0xaf, 0x27, 0x21, 0x17, 0xcc, 0xc3, 0xc9, 0xb6, 0x46, 0xa3, 0x4b, 0x96, 0x44, - 0x83, 0xda, 0xdd, 0x3d, 0xb3, 0xf6, 0x99, 0x79, 0xb2, 0x96, 0x95, 0x06, 0x58, 0x76, 0xac, 0x30, - 0x4a, 0x92, 0x47, 0x10, 0x67, 0xc3, 0x2c, 0x1b, 0xc9, 0x28, 0xbc, 0x85, 0x16, 0x61, 0xe0, 0x45, - 0x87, 0xf2, 0x1e, 0xa0, 0xbc, 0xef, 0xe9, 0xcd, 0xfb, 0xd9, 0x0d, 0xca, 0x3c, 0xfb, 0xec, 0x46, - 0x75, 0x75, 0x4d, 0x59, 0x99, 0x5b, 0x56, 0x38, 0x39, 0x3a, 0x01, 0xa9, 0x86, 0xfa, 0xf2, 0x7e, - 0x78, 0xd5, 0xa3, 0xa0, 0x7e, 0x07, 0xe1, 0x04, 0xa4, 0xae, 0x62, 0x75, 0x2f, 0xbc, 0xd6, 0x50, - 0xd0, 0x6d, 0x9c, 0x0c, 0xb3, 0x90, 0xa6, 0xf6, 0x42, 0x00, 0xdc, 0x62, 0xf9, 0x23, 0x28, 0x03, - 0xa9, 0xf9, 0x35, 0x85, 0x4c, 0x88, 0x3c, 0xe4, 0x18, 0xb4, 0xba, 0xbe, 0x54, 0x99, 0xaf, 0xe4, - 0x13, 0xf2, 0x59, 0x18, 0x60, 0x46, 0x20, 0x93, 0xc5, 0x33, 0x43, 0xfe, 0x08, 0x6f, 0x72, 0x1e, - 0x92, 0x78, 0xba, 0xb5, 0x52, 0xae, 0x28, 0xf9, 0x44, 0x78, 0xa8, 0x53, 0xf9, 0xb4, 0xec, 0x40, - 0x2e, 0x98, 0x88, 0xff, 0x70, 0x36, 0xd9, 0x5f, 0x96, 0x60, 0x28, 0x90, 0x58, 0x93, 0x8c, 0x48, - 0x6d, 0x34, 0xcc, 0xab, 0x55, 0xb5, 0xa1, 0xab, 0x0e, 0x77, 0x0d, 0xa0, 0xa0, 0x39, 0x02, 0xe9, - 0x77, 0xe8, 0x7e, 0x48, 0x53, 0x24, 0x9d, 0x1f, 0x90, 0x3f, 0x29, 0x41, 0x3e, 0x9a, 0xd9, 0x46, - 0xc4, 0x94, 0x7e, 0x94, 0x62, 0xca, 0x9f, 0x90, 0x60, 0x24, 0x9c, 0xce, 0x46, 0xc4, 0x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92, 0x52, 0xbc, 0x36, - 0x79, 0xe6, 0x98, 0x3b, 0xee, 0x55, 0xd5, 0xf6, 0xae, 0x30, 0x89, 0xb6, 0xfc, 0x14, 0x64, 0xe7, - 0x4d, 0xc3, 0xc1, 0x86, 0xd3, 0xa2, 0x53, 0x6f, 0xbb, 0x61, 0x6a, 0x7b, 0x9c, 0x03, 0x6b, 0x10, - 0x83, 0xab, 0x96, 0x45, 0x29, 0x53, 0x0a, 0xf9, 0xc9, 0xc2, 0x54, 0x79, 0xa3, 0xab, 0x89, 0x9e, - 0x3a, 0xb8, 0x89, 0xb8, 0x92, 0x9e, 0x8d, 0xfe, 0xb7, 0x04, 0x27, 0xdb, 0x27, 0xd4, 0x1e, 0xde, - 0x77, 0x0e, 0x3a, 0x9f, 0x5e, 0x80, 0xec, 0x3a, 0xbd, 0x47, 0x7c, 0x09, 0xef, 0xa3, 0x22, 0x0c, - 0xe2, 0xda, 0x99, 0xb3, 0x67, 0x1f, 0x7d, 0x8a, 0x79, 0xfb, 0xc5, 0x23, 0x8a, 0x00, 0xa0, 0x49, - 0xc8, 0x3a, 0x58, 0xb3, 0xce, 0x9c, 0x3d, 0xb7, 0xf7, 0x28, 0x73, 0xaf, 0x8b, 0x47, 0x14, 0x1f, - 0x54, 0xca, 0x10, 0xad, 0xdf, 0xf8, 0xf4, 0x94, 0x54, 0x4e, 0x43, 0xd2, 0x69, 0x35, 0x6f, 0xab, - 0x8f, 0xbc, 0x96, 0x86, 0xe9, 0x20, 0x25, 0x0d, 0x50, 0x57, 0xd4, 0x86, 0x5e, 0x53, 0xfd, 0x1b, - 0xe0, 0xf9, 0x80, 0x0d, 0x28, 0x46, 0x67, 0x13, 0x14, 0x7b, 0x5a, 0x52, 0xfe, 0x75, 0x09, 0x72, - 0x97, 0x05, 0xe7, 0x0d, 0xec, 0xa2, 0xf3, 0x00, 0x5e, 0x4f, 0x62, 0xda, 0xdc, 0x31, 0x13, 0xed, - 0x6b, 0xc6, 0xa3, 0x51, 0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95, 0xae, 0x60, 0xa4, 0xfb, 0x34, 0x65, 0x71, 0xa2, 0xdd, 0x20, 0xdc, 0xb0, 0x5c, - 0xf4, 0x21, 0x42, 0xc5, 0x40, 0x35, 0x74, 0x0a, 0xf2, 0x94, 0x89, 0x66, 0x36, 0x9b, 0xba, 0xcb, - 0x72, 0xab, 0x01, 0x6a, 0xf7, 0x11, 0x02, 0x9f, 0xa7, 0x60, 0x9a, 0x61, 0xdd, 0x01, 0x59, 0x7a, - 0x95, 0x84, 0xa2, 0xb0, 0x63, 0x93, 0x19, 0x02, 0xa0, 0x0f, 0xef, 0x87, 0x51, 0x3f, 0x3e, 0x32, - 0x94, 0x0c, 0xe3, 0xe2, 0x83, 0x29, 0xe2, 0x23, 0x30, 0x61, 0xe0, 0x6b, 0xf4, 0x20, 0x67, 0x08, - 0x3b, 0x4b, 0xb1, 0x11, 0x79, 0x76, 0x39, 0x4c, 0x71, 0x2f, 0x8c, 0x68, 0xc2, 0xf8, 0x0c, 0x17, - 0x28, 0xee, 0xb0, 0x07, 0xa5, 0x68, 0x27, 0x20, 0xa3, 0x5a, 0x16, 0x43, 0x18, 0xe2, 0xf1, 0xd1, - 0xb2, 0xe8, 0xa3, 0xd3, 0x30, 0x46, 0x75, 0xb4, 0xb1, 0xd3, 0x6a, 0xb8, 0x9c, 0x49, 0x8e, 0xe2, - 0x8c, 0x92, 0x07, 0x0a, 0x83, 0x53, 0xdc, 0xbb, 0x61, 0x18, 0x5f, 0xd1, 0x6b, 0xd8, 0xd0, 0x30, - 0xc3, 0x1b, 0xa6, 0x78, 0x39, 0x01, 0xa4, 0x48, 0x0f, 0x80, 0x17, 0xf7, 0xaa, 0x22, 0x26, 0x8f, - 0x30, 0x7e, 0x02, 0x3e, 0xc7, 0xc0, 0x72, 0x01, 0x52, 0x0b, 0xaa, 0xab, 0x92, 0x04, 0xc3, 0xbd, - 0xc6, 0x16, 0x9a, 0x9c, 0x42, 0x7e, 0xca, 0x6f, 0x24, 0x20, 0x75,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7, 0x45, 0x29, 0x54, 0xb4, 0x09, 0xd5, - 0x55, 0xbc, 0xed, 0xe8, 0x62, 0x34, 0x14, 0xd1, 0x44, 0x17, 0x20, 0xef, 0x60, 0xad, 0x65, 0xeb, - 0xee, 0x7e, 0x55, 0x33, 0x0d, 0x57, 0xd5, 0x5c, 0x76, 0x7d, 0xab, 0x7c, 0xc7, 0xcd, 0x1b, 0x53, - 0xc7, 0x99, 0xac, 0x51, 0x0c, 0x59, 0x19, 0x15, 0xa0, 0x79, 0x06, 0x21, 0x3d, 0xd4, 0xb0, 0xab, - 0xea, 0x0d, 0xa7, 0xc0, 0xde, 0x93, 0x89, 0x66, 0x40, 0x97, 0xcf, 0x0f, 0x06, 0x0b, 0x5b, 0x17, - 0x20, 0x6f, 0x5a, 0xd8, 0x0e, 0x25, 0xa2, 0x52, 0xb4, 0xe7, 0x28, 0x86, 0xac, 0x8c, 0x0a, 0x90, - 0x48, 0x52, 0x5d, 0x32, 0xcc, 0x62, 0xa3, 0x68, 0xb5, 0xb6, 0xfd, 0x7a, 0xd8, 0x44, 0xdb, 0x68, - 0xcc, 0x19, 0xfb, 0xe5, 0xc7, 0x7c, 0xee, 0x51, 0x3a, 0xf9, 0x6b, 0x5f, 0x7c, 0x78, 0x82, 0xbb, - 0x86, 0x5f, 0x9f, 0xba, 0x84, 0xf7, 0xc9, 0xf0, 0x73, 0xd4, 0x75, 0x8a, 0x49, 0xd2, 0xce, 0x17, - 0x55, 0xbd, 0x21, 0xae, 0x21, 0x2b, 0xbc, 0x85, 0x4a, 0x30, 0xe0, 0xb8, 0xaa, 0xdb, 0x72, 0xf8, - 0x47, 0xbf, 0xe4, 0x6e, 0xae, 0x56, 0x36, 0x8d, 0xda, 0x06, 0xc5, 0x54, 0x38, 0x05, 0xba, 0x00, - 0x03, 0xae, 0xb9, 0x87, 0x0d, 0x6e, 0xc2, 0x03, 0xcd, 0x6f, 0xfa, 0xda, 0x8e, 0x51, 0x13, 0x8b, - 0xd4, 0x70, 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x27, 0x20, 0x75, 0x15, 0xab, 0x7b, 0xe1, 0xa5, 0x86, 0x82, 0x6e, 0xe3, 0x64, 0x98, 0x85, 0x34, + 0xb5, 0x17, 0x02, 0xe0, 0x16, 0xcb, 0x1f, 0x41, 0x19, 0x48, 0xcd, 0xaf, 0x29, 0x64, 0x42, 0xe4, + 0x21, 0xc7, 0xa0, 0xd5, 0xf5, 0xa5, 0xca, 0x7c, 0x25, 0x9f, 0x90, 0xcf, 0xc2, 0x00, 0x33, 0x02, + 0x99, 0x2c, 0x9e, 0x19, 0xf2, 0x47, 0xf8, 0x23, 0xe7, 0x21, 0x89, 0xd6, 0xad, 0x95, 0x72, 0x45, + 0xc9, 0x27, 0xc2, 0x43, 0x9d, 0xca, 0xa7, 0x65, 0x07, 0x72, 0xc1, 0x3c, 0xfc, 0x87, 0xb3, 0x19, + 0xff, 0x92, 0x04, 0x43, 0x81, 0xbc, 0x9a, 0x24, 0x44, 0x6a, 0xa3, 0x61, 0x5e, 0xad, 0xaa, 0x0d, + 0x5d, 0x75, 0xb8, 0x6b, 0x00, 0x05, 0xcd, 0x11, 0x48, 0xbf, 0x43, 0xf7, 0x43, 0x9a, 0x22, 0xe9, + 0xfc, 0x80, 0xfc, 0x09, 0x09, 0xf2, 0xd1, 0xc4, 0x36, 0x22, 0xa6, 0xf4, 0xa3, 0x14, 0x53, 0xfe, + 0xb8, 0x04, 0x23, 0xe1, 0x6c, 0x36, 0x22, 0xde, 0x5d, 0x3f, 0x52, 0xf1, 0xfe, 0x20, 0x01, 0xc3, + 0xa1, 0x1c, 0xb6, 0x5f, 0xe9, 0x5e, 0x82, 0x31, 0xbd, 0x86, 0x9b, 0x96, 0xe9, 0x62, 0x43, 0xdb, + 0xaf, 0x36, 0xf0, 0x15, 0xdc, 0x28, 0xc8, 0x34, 0x68, 0xcc, 0xf6, 0xce, 0x92, 0x67, 0x96, 0x7c, + 0xba, 0x65, 0x42, 0x56, 0x1a, 0x5f, 0x5a, 0xa8, 0xac, 0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x27, + 0x88, 0xe4, 0x0b, 0x82, 0x56, 0x60, 0xd4, 0x52, 0x6d, 0x97, 0x1e, 0xdd, 0xdf, 0xa5, 0x5a, 0x70, + 0x5f, 0x9f, 0x6a, 0x9f, 0x79, 0x21, 0x65, 0x79, 0x2f, 0xc3, 0x56, 0x10, 0x28, 0xff, 0x61, 0x0a, + 0x06, 0xb8, 0x31, 0xde, 0x0c, 0x83, 0xdc, 0xac, 0xdc, 0x3b, 0xef, 0x9c, 0x69, 0x5f, 0x98, 0x66, + 0xbc, 0x05, 0x84, 0xf3, 0x13, 0x34, 0xe8, 0x3e, 0xc8, 0x68, 0xbb, 0xaa, 0x6e, 0x54, 0xf5, 0x9a, + 0xc8, 0x7a, 0x5f, 0xbf, 0x31, 0x35, 0x38, 0x4f, 0x60, 0x4b, 0x0b, 0xca, 0x20, 0x6d, 0x5c, 0xaa, + 0x91, 0x4c, 0x60, 0x17, 0xeb, 0xf5, 0x5d, 0x97, 0xcf, 0x30, 0xfe, 0x84, 0x9e, 0x84, 0x14, 0x71, + 0x08, 0x7e, 0xb1, 0xab, 0xd8, 0xb6, 0xf7, 0xf0, 0x36, 0x80, 0xe5, 0x0c, 0xe9, 0xf8, 0x43, 0xbf, + 0x3f, 0x25, 0x29, 0x94, 0x02, 0xcd, 0xc3, 0x70, 0x43, 0x75, 0xdc, 0x2a, 0x5d, 0xc1, 0x48, 0xf7, + 0x69, 0xca, 0xe2, 0x44, 0xbb, 0x41, 0xb8, 0x61, 0xb9, 0xe8, 0x43, 0x84, 0x8a, 0x81, 0x6a, 0xe8, + 0x14, 0xe4, 0x29, 0x13, 0xcd, 0x6c, 0x36, 0x75, 0x97, 0xe5, 0x56, 0x03, 0xd4, 0xee, 0x23, 0x04, + 0x3e, 0x4f, 0xc1, 0x34, 0xc3, 0xba, 0x03, 0xb2, 0xf4, 0x2a, 0x09, 0x45, 0x61, 0xc7, 0x26, 0x33, + 0x04, 0x40, 0x1b, 0xef, 0x87, 0x51, 0x3f, 0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x65, + 0x04, 0x41, 0x56, 0x46, 0x04, 0x84, 0xaf, 0x1e, 0x75, 0x20, 0x69, 0x1f, 0x71, 0x3b, 0x82, 0xd5, + 0x67, 0x9e, 0x27, 0xf3, 0xe5, 0x43, 0x74, 0x12, 0x66, 0xc0, 0xd6, 0x8f, 0x11, 0x1f, 0x4a, 0x17, + 0x90, 0x97, 0x60, 0x54, 0x37, 0x74, 0x57, 0x57, 0x1b, 0xd5, 0x6d, 0xb5, 0xa1, 0x1a, 0xda, 0x61, + 0xb2, 0x66, 0x16, 0xf2, 0x79, 0xb7, 0x11, 0x76, 0xb2, 0x32, 0xc2, 0x21, 0x65, 0x06, 0x40, 0x17, + 0x61, 0x50, 0x74, 0x95, 0x3a, 0x54, 0xb6, 0x21, 0xc8, 0x03, 0x09, 0xde, 0xcf, 0x24, 0x61, 0x4c, + 0xc1, 0xb5, 0xff, 0x3f, 0x14, 0x07, 0x1b, 0x8a, 0x15, 0x00, 0x36, 0xdd, 0x49, 0x80, 0x3d, 0xc4, + 0x68, 0x90, 0x80, 0x91, 0x65, 0x1c, 0x16, 0x1c, 0x37, 0x30, 0x1e, 0x37, 0x12, 0x90, 0x0b, 0x8e, + 0xc7, 0x5f, 0xd0, 0x55, 0x09, 0x2d, 0xf9, 0x91, 0x28, 0xc5, 0x3f, 0x11, 0xda, 0x25, 0x12, 0xb5, + 0x79, 0x6f, 0xef, 0x10, 0xf4, 0x3f, 0x12, 0x30, 0xb0, 0xae, 0xda, 0x6a, 0xd3, 0x41, 0x5a, 0x5b, + 0xa6, 0x29, 0xca, 0x8f, 0x6d, 0x1f, 0x82, 0xe6, 0xd5, 0x8e, 0x98, 0x44, 0xf3, 0xa3, 0x1d, 0x12, + 0xcd, 0x9f, 0x80, 0x11, 0xb2, 0x1d, 0x0e, 0x1c, 0x61, 0x20, 0xd6, 0x1e, 0x2e, 0x9f, 0xf0, 0xb9, + 0x84, 0xdb, 0xd9, 0x6e, 0xf9, 0x72, 0xf0, 0x0c, 0x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e, 0xc5, 0x78, 0xa9, 0xa4, 0x6a, 0xe9, 0x33, 0x04, 0x41, 0x69, 0x35, 0xb0, 0xc2, + 0x50, 0x50, 0x05, 0xa6, 0x76, 0x5a, 0x8d, 0xc6, 0x7e, 0xb5, 0x86, 0xe9, 0x3f, 0xd5, 0xf3, 0xfe, + 0x2d, 0x0d, 0xbe, 0x66, 0xa9, 0x86, 0x97, 0xef, 0x67, 0x94, 0x93, 0x14, 0x6d, 0x81, 0x62, 0x89, + 0x7f, 0x49, 0x53, 0x11, 0x38, 0xf2, 0xef, 0x25, 0x20, 0x23, 0x58, 0xd3, 0xab, 0x5b, 0xb8, 0x81, + 0x35, 0xd7, 0x14, 0x47, 0x19, 0xbc, 0x67, 0x84, 0x20, 0x59, 0xe7, 0x43, 0x94, 0xbd, 0x78, 0x44, + 0x21, 0x0f, 0x04, 0xe6, 0x5d, 0xa8, 0x23, 0x30, 0xab, 0x45, 0x46, 0x2d, 0x65, 0x99, 0xa2, 0x66, + 0x7a, 0xf1, 0x88, 0x42, 0x9f, 0x50, 0x01, 0x06, 0x88, 0xcb, 0xba, 0xec, 0x8b, 0xc1, 0x04, 0xce, + 0x9f, 0xd1, 0x31, 0x48, 0x5b, 0xaa, 0xab, 0xb1, 0xb3, 0xee, 0xa4, 0x81, 0x3d, 0x92, 0xc0, 0xcc, + 0xbe, 0xd4, 0x10, 0xfd, 0x8f, 0x55, 0xc4, 0x18, 0xec, 0x93, 0x98, 0x44, 0xee, 0x75, 0xd5, 0x75, + 0xb1, 0x6d, 0x10, 0x86, 0x0c, 0x1d, 0x21, 0x48, 0x6d, 0x9b, 0xb5, 0x7d, 0xfe, 0x5f, 0xb4, 0xe8, + 0x6f, 0xfe, 0x6f, 0x7b, 0xa8, 0x3f, 0x54, 0x69, 0x23, 0xfb, 0xe7, 0x81, 0x39, 0x01, 0x2c, 0x13, + 0xa4, 0x0a, 0x8c, 0xab, 0xb5, 0x9a, 0xce, 0xfe, 0xa1, 0x55, 0x75, 0x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0xa9, 0xc3, 0xef, 0xeb, 0x9f, 0x85, 0xa1, 0x40, 0xa4, 0x2f, 0xa4, 0x63, 0xae, 0x99, + 0x46, 0x8b, 0x68, 0x41, 0x62, 0xf4, 0x3e, 0x09, 0x8e, 0x76, 0x5c, 0x04, 0xe9, 0xff, 0xaa, 0x3d, + 0x60, 0x91, 0x2e, 0x62, 0x9c, 0x8e, 0x7c, 0x65, 0x65, 0xa2, 0xd5, 0x29, 0x9b, 0x58, 0x87, 0xe1, + 0xd0, 0x02, 0x56, 0x10, 0xff, 0x71, 0xba, 0xff, 0x1b, 0x16, 0x61, 0x06, 0xa8, 0x08, 0x19, 0x7c, + 0xcd, 0x32, 0x6d, 0x17, 0xd7, 0xe8, 0x91, 0x87, 0x8c, 0xe2, 0x3d, 0xcb, 0xab, 0x80, 0xda, 0x07, + 0x37, 0xfa, 0x1d, 0xd2, 0xac, 0xff, 0x1d, 0xd2, 0x09, 0x48, 0x07, 0xbf, 0xd4, 0xc9, 0x1e, 0xfc, + 0x3a, 0xc5, 0xad, 0x9e, 0xf3, 0xff, 0x37, 0x00, 0x00, 0xff, 0xff, 0x4f, 0xa1, 0x5b, 0x6b, 0x6a, + 0x94, 0x00, 0x00, } r := bytes.NewReader(gzipped) gzipr, err := compress_gzip.NewReader(r) From cc96ee3a3b11a458a664feca8130aa0f9301261b Mon Sep 17 00:00:00 2001 From: antstalepresh Date: Wed, 11 Nov 2020 00:40:25 +1000 Subject: [PATCH 069/136] fix staking cli, grcp_query, keeper test for power reduction --- x/staking/client/cli/cli_test.go | 10 +++++----- x/staking/client/cli/tx.go | 5 +++-- x/staking/client/cli/tx_test.go | 10 +++++----- x/staking/client/rest/grpc_query_test.go | 7 ++++--- x/staking/keeper/grpc_query_test.go | 12 ++++++++---- 5 files changed, 25 insertions(+), 19 deletions(-) diff --git a/x/staking/client/cli/cli_test.go b/x/staking/client/cli/cli_test.go index 2b66da867c..12b4084a4e 100644 --- a/x/staking/client/cli/cli_test.go +++ b/x/staking/client/cli/cli_test.go @@ -381,7 +381,7 @@ func (s *IntegrationTestSuite) TestGetCmdQueryDelegations() { &types.QueryDelegatorDelegationsResponse{}, &types.QueryDelegatorDelegationsResponse{ DelegationResponses: types.DelegationResponses{ - types.NewDelegationResp(val.Address, val.ValAddress, sdk.NewDec(100000000), sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(100000000))), + types.NewDelegationResp(val.Address, val.ValAddress, sdk.NewDecFromInt(cli.DefaultTokens), sdk.NewCoin(sdk.DefaultBondDenom, cli.DefaultTokens)), }, Pagination: &query.PageResponse{}, }, @@ -437,7 +437,7 @@ func (s *IntegrationTestSuite) TestGetCmdQueryDelegationsTo() { &types.QueryValidatorDelegationsResponse{}, &types.QueryValidatorDelegationsResponse{ DelegationResponses: types.DelegationResponses{ - types.NewDelegationResp(val.Address, val.ValAddress, sdk.NewDec(100000000), sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(100000000))), + types.NewDelegationResp(val.Address, val.ValAddress, sdk.NewDecFromInt(cli.DefaultTokens), sdk.NewCoin(sdk.DefaultBondDenom, cli.DefaultTokens)), }, Pagination: &query.PageResponse{}, }, @@ -891,8 +891,8 @@ func (s *IntegrationTestSuite) TestGetCmdQueryPool() { fmt.Sprintf("--%s=text", tmcli.OutputFlag), fmt.Sprintf("--%s=1", flags.FlagHeight), }, - `bonded_tokens: "200000000" -not_bonded_tokens: "0"`, + fmt.Sprintf(`bonded_tokens: "%s" +not_bonded_tokens: "0"`, cli.DefaultTokens.Mul(sdk.NewInt(2)).String()), }, { "with json", @@ -900,7 +900,7 @@ not_bonded_tokens: "0"`, fmt.Sprintf("--%s=json", tmcli.OutputFlag), fmt.Sprintf("--%s=1", flags.FlagHeight), }, - `{"not_bonded_tokens":"0","bonded_tokens":"200000000"}`, + fmt.Sprintf(`{"not_bonded_tokens":"0","bonded_tokens":"%s"}`, cli.DefaultTokens.Mul(sdk.NewInt(2)).String()), }, } for _, tc := range testCases { diff --git a/x/staking/client/cli/tx.go b/x/staking/client/cli/tx.go index ab486c5a98..b46cef2bf8 100644 --- a/x/staking/client/cli/tx.go +++ b/x/staking/client/cli/tx.go @@ -17,9 +17,10 @@ import ( "github.com/cosmos/cosmos-sdk/x/staking/types" ) +// default values var ( - defaultTokens = sdk.TokensFromConsensusPower(100) - defaultAmount = defaultTokens.String() + sdk.DefaultBondDenom + DefaultTokens = sdk.TokensFromConsensusPower(100) + defaultAmount = DefaultTokens.String() + sdk.DefaultBondDenom defaultCommissionRate = "0.1" defaultCommissionMaxRate = "0.2" defaultCommissionMaxChangeRate = "0.01" diff --git a/x/staking/client/cli/tx_test.go b/x/staking/client/cli/tx_test.go index 78a0a45bcf..9be0ebd94b 100644 --- a/x/staking/client/cli/tx_test.go +++ b/x/staking/client/cli/tx_test.go @@ -33,7 +33,7 @@ func TestPrepareConfigForTxCreateValidator(t *testing.T) { NodeID: nodeID, PubKey: sdk.MustBech32ifyPubKey(sdk.Bech32PubKeyTypeConsPub, valPubKey), Moniker: moniker, - Amount: "100000000stake", + Amount: defaultAmount, // for power reduction change, do not hardcode value here CommissionRate: "0.1", CommissionMaxRate: "0.2", CommissionMaxChangeRate: "0.01", @@ -69,7 +69,7 @@ func TestPrepareConfigForTxCreateValidator(t *testing.T) { ChainID: chainID, NodeID: nodeID, PubKey: sdk.MustBech32ifyPubKey(sdk.Bech32PubKeyTypeConsPub, valPubKey), - Amount: "100000000stake", + Amount: defaultAmount, // for power reduction change, do not hardcode value here CommissionRate: "0.54", CommissionMaxRate: "0.2", CommissionMaxChangeRate: "0.01", @@ -87,7 +87,7 @@ func TestPrepareConfigForTxCreateValidator(t *testing.T) { ChainID: chainID, NodeID: nodeID, PubKey: sdk.MustBech32ifyPubKey(sdk.Bech32PubKeyTypeConsPub, valPubKey), - Amount: "100000000stake", + Amount: defaultAmount, // for power reduction change, do not hardcode value here CommissionRate: "0.1", CommissionMaxRate: "0.89", CommissionMaxChangeRate: "0.01", @@ -105,7 +105,7 @@ func TestPrepareConfigForTxCreateValidator(t *testing.T) { ChainID: chainID, NodeID: nodeID, PubKey: sdk.MustBech32ifyPubKey(sdk.Bech32PubKeyTypeConsPub, valPubKey), - Amount: "100000000stake", + Amount: defaultAmount, // for power reduction change, do not hardcode value here CommissionRate: "0.1", CommissionMaxRate: "0.2", CommissionMaxChangeRate: "0.55", @@ -123,7 +123,7 @@ func TestPrepareConfigForTxCreateValidator(t *testing.T) { ChainID: chainID, NodeID: nodeID, PubKey: sdk.MustBech32ifyPubKey(sdk.Bech32PubKeyTypeConsPub, valPubKey), - Amount: "100000000stake", + Amount: defaultAmount, // for power reduction change, do not hardcode value here CommissionRate: "0.1", CommissionMaxRate: "0.2", CommissionMaxChangeRate: "0.01", diff --git a/x/staking/client/rest/grpc_query_test.go b/x/staking/client/rest/grpc_query_test.go index 8383537055..3aa4afdcfe 100644 --- a/x/staking/client/rest/grpc_query_test.go +++ b/x/staking/client/rest/grpc_query_test.go @@ -15,6 +15,7 @@ import ( grpctypes "github.com/cosmos/cosmos-sdk/types/grpc" "github.com/cosmos/cosmos-sdk/types/query" "github.com/cosmos/cosmos-sdk/types/rest" + "github.com/cosmos/cosmos-sdk/x/staking/client/cli" stakingtestutil "github.com/cosmos/cosmos-sdk/x/staking/client/testutil" "github.com/cosmos/cosmos-sdk/x/staking/types" ) @@ -194,7 +195,7 @@ func (s *IntegrationTestSuite) TestQueryValidatorDelegationsGRPC() { &types.QueryValidatorDelegationsResponse{}, &types.QueryValidatorDelegationsResponse{ DelegationResponses: types.DelegationResponses{ - types.NewDelegationResp(val.Address, val.ValAddress, sdk.NewDec(100000000), sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(100000000))), + types.NewDelegationResp(val.Address, val.ValAddress, sdk.NewDecFromInt(cli.DefaultTokens), sdk.NewCoin(sdk.DefaultBondDenom, cli.DefaultTokens)), }, Pagination: &query.PageResponse{Total: 1}, }, @@ -438,7 +439,7 @@ func (s *IntegrationTestSuite) TestQueryDelegatorDelegationsGRPC() { &types.QueryDelegatorDelegationsResponse{}, &types.QueryDelegatorDelegationsResponse{ DelegationResponses: types.DelegationResponses{ - types.NewDelegationResp(val.Address, val.ValAddress, sdk.NewDec(100000000), sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(100000000))), + types.NewDelegationResp(val.Address, val.ValAddress, sdk.NewDecFromInt(cli.DefaultTokens), sdk.NewCoin(sdk.DefaultBondDenom, cli.DefaultTokens)), }, Pagination: &query.PageResponse{Total: 1}, }, @@ -775,7 +776,7 @@ func (s *IntegrationTestSuite) TestQueryPoolGRPC() { &types.QueryPoolResponse{ Pool: types.Pool{ NotBondedTokens: sdk.NewInt(10), - BondedTokens: sdk.NewInt(199999990), + BondedTokens: cli.DefaultTokens.Mul(sdk.NewInt(2)).Sub(sdk.NewInt(10)), }, }, }, diff --git a/x/staking/keeper/grpc_query_test.go b/x/staking/keeper/grpc_query_test.go index e144668940..cf3c9e3fe4 100644 --- a/x/staking/keeper/grpc_query_test.go +++ b/x/staking/keeper/grpc_query_test.go @@ -11,6 +11,7 @@ import ( "github.com/cosmos/cosmos-sdk/x/staking/keeper" "github.com/cosmos/cosmos-sdk/x/staking/teststaking" "github.com/cosmos/cosmos-sdk/x/staking/types" + "github.com/stretchr/testify/require" ) func (suite *KeeperTestSuite) TestGRPCQueryValidators() { @@ -727,7 +728,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryValidatorUnbondingDelegations() { } func createValidators(t *testing.T, ctx sdk.Context, app *simapp.SimApp, powers []int64) ([]sdk.AccAddress, []sdk.ValAddress, []types.Validator) { - addrs := simapp.AddTestAddrsIncremental(app, ctx, 5, sdk.NewInt(300000000)) + addrs := simapp.AddTestAddrsIncremental(app, ctx, 5, sdk.TokensFromConsensusPower(300)) valAddrs := simapp.ConvertAddrsToValAddrs(addrs) pks := simapp.CreateTestPubKeys(5) @@ -751,9 +752,12 @@ func createValidators(t *testing.T, ctx sdk.Context, app *simapp.SimApp, powers app.StakingKeeper.SetNewValidatorByPowerIndex(ctx, val1) app.StakingKeeper.SetNewValidatorByPowerIndex(ctx, val2) - _, _ = app.StakingKeeper.Delegate(ctx, addrs[0], sdk.TokensFromConsensusPower(powers[0]), types.Unbonded, val1, true) - _, _ = app.StakingKeeper.Delegate(ctx, addrs[1], sdk.TokensFromConsensusPower(powers[1]), types.Unbonded, val2, true) - _, _ = app.StakingKeeper.Delegate(ctx, addrs[0], sdk.TokensFromConsensusPower(powers[2]), types.Unbonded, val2, true) + _, err := app.StakingKeeper.Delegate(ctx, addrs[0], sdk.TokensFromConsensusPower(powers[0]), types.Unbonded, val1, true) + require.NoError(t, err) + _, err = app.StakingKeeper.Delegate(ctx, addrs[1], sdk.TokensFromConsensusPower(powers[1]), types.Unbonded, val2, true) + require.NoError(t, err) + _, err = app.StakingKeeper.Delegate(ctx, addrs[0], sdk.TokensFromConsensusPower(powers[2]), types.Unbonded, val2, true) + require.NoError(t, err) applyValidatorSetUpdates(t, ctx, app.StakingKeeper, -1) return addrs, valAddrs, vals From 705e26e98c790a26d54b296c8fe7a8ce8b89bc7d Mon Sep 17 00:00:00 2001 From: antstalepresh Date: Wed, 11 Nov 2020 01:28:39 +1000 Subject: [PATCH 070/136] give enough balance to operations test validator based on TokensFromConsensusPower to consider PowerReduction --- x/staking/simulation/operations_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/staking/simulation/operations_test.go b/x/staking/simulation/operations_test.go index 6e3f687393..37ebe3ea33 100644 --- a/x/staking/simulation/operations_test.go +++ b/x/staking/simulation/operations_test.go @@ -308,7 +308,7 @@ func getTestingValidator(t *testing.T, app *simapp.SimApp, ctx sdk.Context, acco require.NoError(t, err) validator.DelegatorShares = sdk.NewDec(100) - validator.Tokens = sdk.NewInt(1000000) + validator.Tokens = sdk.TokensFromConsensusPower(100) app.StakingKeeper.SetValidator(ctx, validator) From 4582dcd08f5a9bb736da91b0b276d771ceb6fa39 Mon Sep 17 00:00:00 2001 From: antstalepresh Date: Wed, 11 Nov 2020 01:38:54 +1000 Subject: [PATCH 071/136] remove comment --- x/staking/client/cli/tx_test.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/x/staking/client/cli/tx_test.go b/x/staking/client/cli/tx_test.go index 9be0ebd94b..7a28aac964 100644 --- a/x/staking/client/cli/tx_test.go +++ b/x/staking/client/cli/tx_test.go @@ -33,7 +33,7 @@ func TestPrepareConfigForTxCreateValidator(t *testing.T) { NodeID: nodeID, PubKey: sdk.MustBech32ifyPubKey(sdk.Bech32PubKeyTypeConsPub, valPubKey), Moniker: moniker, - Amount: defaultAmount, // for power reduction change, do not hardcode value here + Amount: defaultAmount, CommissionRate: "0.1", CommissionMaxRate: "0.2", CommissionMaxChangeRate: "0.01", @@ -69,7 +69,7 @@ func TestPrepareConfigForTxCreateValidator(t *testing.T) { ChainID: chainID, NodeID: nodeID, PubKey: sdk.MustBech32ifyPubKey(sdk.Bech32PubKeyTypeConsPub, valPubKey), - Amount: defaultAmount, // for power reduction change, do not hardcode value here + Amount: defaultAmount, CommissionRate: "0.54", CommissionMaxRate: "0.2", CommissionMaxChangeRate: "0.01", @@ -87,7 +87,7 @@ func TestPrepareConfigForTxCreateValidator(t *testing.T) { ChainID: chainID, NodeID: nodeID, PubKey: sdk.MustBech32ifyPubKey(sdk.Bech32PubKeyTypeConsPub, valPubKey), - Amount: defaultAmount, // for power reduction change, do not hardcode value here + Amount: defaultAmount, CommissionRate: "0.1", CommissionMaxRate: "0.89", CommissionMaxChangeRate: "0.01", @@ -105,7 +105,7 @@ func TestPrepareConfigForTxCreateValidator(t *testing.T) { ChainID: chainID, NodeID: nodeID, PubKey: sdk.MustBech32ifyPubKey(sdk.Bech32PubKeyTypeConsPub, valPubKey), - Amount: defaultAmount, // for power reduction change, do not hardcode value here + Amount: defaultAmount, CommissionRate: "0.1", CommissionMaxRate: "0.2", CommissionMaxChangeRate: "0.55", @@ -123,7 +123,7 @@ func TestPrepareConfigForTxCreateValidator(t *testing.T) { ChainID: chainID, NodeID: nodeID, PubKey: sdk.MustBech32ifyPubKey(sdk.Bech32PubKeyTypeConsPub, valPubKey), - Amount: defaultAmount, // for power reduction change, do not hardcode value here + Amount: defaultAmount, CommissionRate: "0.1", CommissionMaxRate: "0.2", CommissionMaxChangeRate: "0.01", From 67b3f9071c600d137f2bf914e2934b09e82114d9 Mon Sep 17 00:00:00 2001 From: antstalepresh Date: Wed, 11 Nov 2020 02:07:40 +1000 Subject: [PATCH 072/136] fix build issues && telemetry.SetGaugeWithLabels int64 range validation --- x/bank/keeper/msg_server.go | 12 +++++++----- x/distribution/keeper/allocation_test.go | 12 ++++++------ x/distribution/keeper/delegation_test.go | 10 +++++----- x/distribution/keeper/grpc_query_test.go | 2 +- x/distribution/keeper/msg_server.go | 24 ++++++++++++++---------- x/distribution/keeper/querier_test.go | 2 +- x/slashing/abci_test.go | 5 +++-- x/slashing/handler_test.go | 6 +++--- x/slashing/keeper/keeper_test.go | 2 +- x/staking/keeper/msg_server.go | 18 ++++++++++-------- 10 files changed, 51 insertions(+), 42 deletions(-) diff --git a/x/bank/keeper/msg_server.go b/x/bank/keeper/msg_server.go index 024d857dab..b318db2cc4 100644 --- a/x/bank/keeper/msg_server.go +++ b/x/bank/keeper/msg_server.go @@ -50,11 +50,13 @@ func (k msgServer) Send(goCtx context.Context, msg *types.MsgSend) (*types.MsgSe defer func() { for _, a := range msg.Amount { - telemetry.SetGaugeWithLabels( - []string{"tx", "msg", "send"}, - float32(a.Amount.Int64()), - []metrics.Label{telemetry.NewLabel("denom", a.Denom)}, - ) + if a.Amount.IsInt64() { + telemetry.SetGaugeWithLabels( + []string{"tx", "msg", "send"}, + float32(a.Amount.Int64()), + []metrics.Label{telemetry.NewLabel("denom", a.Denom)}, + ) + } } }() diff --git a/x/distribution/keeper/allocation_test.go b/x/distribution/keeper/allocation_test.go index bcb9e62aa2..9d8b0012a5 100644 --- a/x/distribution/keeper/allocation_test.go +++ b/x/distribution/keeper/allocation_test.go @@ -24,7 +24,7 @@ func TestAllocateTokensToValidatorWithCommission(t *testing.T) { // create validator with 50% commission tstaking.Commission = stakingtypes.NewCommissionRates(sdk.NewDecWithPrec(5, 1), sdk.NewDecWithPrec(5, 1), sdk.NewDec(0)) - tstaking.CreateValidator(sdk.ValAddress(addrs[0]), valConsPk1, 100, true) + tstaking.CreateValidator(sdk.ValAddress(addrs[0]), valConsPk1, sdk.NewInt(100), true) val := app.StakingKeeper.Validator(ctx, valAddrs[0]) // allocate tokens @@ -53,11 +53,11 @@ func TestAllocateTokensToManyValidators(t *testing.T) { // create validator with 50% commission tstaking.Commission = stakingtypes.NewCommissionRates(sdk.NewDecWithPrec(5, 1), sdk.NewDecWithPrec(5, 1), sdk.NewDec(0)) - tstaking.CreateValidator(valAddrs[0], valConsPk1, 100, true) + tstaking.CreateValidator(valAddrs[0], valConsPk1, sdk.NewInt(100), true) // create second validator with 0% commission tstaking.Commission = stakingtypes.NewCommissionRates(sdk.NewDec(0), sdk.NewDec(0), sdk.NewDec(0)) - tstaking.CreateValidator(valAddrs[1], valConsPk2, 100, true) + tstaking.CreateValidator(valAddrs[1], valConsPk2, sdk.NewInt(100), true) abciValA := abci.Validator{ Address: valConsPk1.Address(), @@ -123,15 +123,15 @@ func TestAllocateTokensTruncation(t *testing.T) { // create validator with 10% commission tstaking.Commission = stakingtypes.NewCommissionRates(sdk.NewDecWithPrec(1, 1), sdk.NewDecWithPrec(1, 1), sdk.NewDec(0)) - tstaking.CreateValidator(valAddrs[0], valConsPk1, 110, true) + tstaking.CreateValidator(valAddrs[0], valConsPk1, sdk.NewInt(110), true) // create second validator with 10% commission tstaking.Commission = stakingtypes.NewCommissionRates(sdk.NewDecWithPrec(1, 1), sdk.NewDecWithPrec(1, 1), sdk.NewDec(0)) - tstaking.CreateValidator(valAddrs[1], valConsPk2, 100, true) + tstaking.CreateValidator(valAddrs[1], valConsPk2, sdk.NewInt(100), true) // create third validator with 10% commission tstaking.Commission = stakingtypes.NewCommissionRates(sdk.NewDecWithPrec(1, 1), sdk.NewDecWithPrec(1, 1), sdk.NewDec(0)) - tstaking.CreateValidator(valAddrs[2], valConsPk3, 100, true) + tstaking.CreateValidator(valAddrs[2], valConsPk3, sdk.NewInt(100), true) abciValA := abci.Validator{ Address: valConsPk1.Address(), diff --git a/x/distribution/keeper/delegation_test.go b/x/distribution/keeper/delegation_test.go index e55acbe091..ac8ac4a334 100644 --- a/x/distribution/keeper/delegation_test.go +++ b/x/distribution/keeper/delegation_test.go @@ -23,7 +23,7 @@ func TestCalculateRewardsBasic(t *testing.T) { // create validator with 50% commission tstaking.Commission = stakingtypes.NewCommissionRates(sdk.NewDecWithPrec(5, 1), sdk.NewDecWithPrec(5, 1), sdk.NewDec(0)) - tstaking.CreateValidator(valAddrs[0], valConsPk1, 100, true) + tstaking.CreateValidator(valAddrs[0], valConsPk1, sdk.NewInt(100), true) // end block to bond validator and start new block staking.EndBlocker(ctx, app.StakingKeeper) @@ -215,7 +215,7 @@ func TestCalculateRewardsMultiDelegator(t *testing.T) { // create validator with 50% commission tstaking.Commission = stakingtypes.NewCommissionRates(sdk.NewDecWithPrec(5, 1), sdk.NewDecWithPrec(5, 1), sdk.NewDec(0)) - tstaking.CreateValidator(valAddrs[0], valConsPk1, 100, true) + tstaking.CreateValidator(valAddrs[0], valConsPk1, sdk.NewInt(100), true) // end block to bond validator staking.EndBlocker(ctx, app.StakingKeeper) @@ -234,7 +234,7 @@ func TestCalculateRewardsMultiDelegator(t *testing.T) { // second delegation tstaking.Ctx = ctx - tstaking.Delegate(sdk.AccAddress(valAddrs[1]), valAddrs[0], 100) + tstaking.Delegate(sdk.AccAddress(valAddrs[1]), valAddrs[0], sdk.NewInt(100)) del2 := app.StakingKeeper.Delegation(ctx, sdk.AccAddress(valAddrs[1]), valAddrs[0]) // fetch updated validator @@ -500,7 +500,7 @@ func TestCalculateRewardsMultiDelegatorMultWithdraw(t *testing.T) { // create validator with 50% commission tstaking.Commission = stakingtypes.NewCommissionRates(sdk.NewDecWithPrec(5, 1), sdk.NewDecWithPrec(5, 1), sdk.NewDec(0)) - tstaking.CreateValidator(valAddrs[0], valConsPk1, 100, true) + tstaking.CreateValidator(valAddrs[0], valConsPk1, sdk.NewInt(100), true) // end block to bond validator staking.EndBlocker(ctx, app.StakingKeeper) @@ -519,7 +519,7 @@ func TestCalculateRewardsMultiDelegatorMultWithdraw(t *testing.T) { require.Equal(t, uint64(2), app.DistrKeeper.GetValidatorHistoricalReferenceCount(ctx)) // second delegation - tstaking.Delegate(sdk.AccAddress(valAddrs[1]), valAddrs[0], 100) + tstaking.Delegate(sdk.AccAddress(valAddrs[1]), valAddrs[0], sdk.NewInt(100)) // historical count should be 3 (second delegation init) require.Equal(t, uint64(3), app.DistrKeeper.GetValidatorHistoricalReferenceCount(ctx)) diff --git a/x/distribution/keeper/grpc_query_test.go b/x/distribution/keeper/grpc_query_test.go index a101896fea..4121440946 100644 --- a/x/distribution/keeper/grpc_query_test.go +++ b/x/distribution/keeper/grpc_query_test.go @@ -343,7 +343,7 @@ func (suite *KeeperTestSuite) TestGRPCDelegationRewards() { tstaking := teststaking.NewHelper(suite.T(), ctx, app.StakingKeeper) tstaking.Commission = stakingtypes.NewCommissionRates(sdk.NewDecWithPrec(5, 1), sdk.NewDecWithPrec(5, 1), sdk.NewDec(0)) - tstaking.CreateValidator(valAddrs[0], valConsPk1, 100, true) + tstaking.CreateValidator(valAddrs[0], valConsPk1, sdk.NewInt(100), true) staking.EndBlocker(ctx, app.StakingKeeper) ctx = ctx.WithBlockHeight(ctx.BlockHeight() + 1) diff --git a/x/distribution/keeper/msg_server.go b/x/distribution/keeper/msg_server.go index 017aeeb216..a6bbe9ea01 100644 --- a/x/distribution/keeper/msg_server.go +++ b/x/distribution/keeper/msg_server.go @@ -66,11 +66,13 @@ func (k msgServer) WithdrawDelegatorReward(goCtx context.Context, msg *types.Msg defer func() { for _, a := range amount { - telemetry.SetGaugeWithLabels( - []string{"tx", "msg", "withdraw_reward"}, - float32(a.Amount.Int64()), - []metrics.Label{telemetry.NewLabel("denom", a.Denom)}, - ) + if a.Amount.IsInt64() { + telemetry.SetGaugeWithLabels( + []string{"tx", "msg", "withdraw_reward"}, + float32(a.Amount.Int64()), + []metrics.Label{telemetry.NewLabel("denom", a.Denom)}, + ) + } } }() @@ -98,11 +100,13 @@ func (k msgServer) WithdrawValidatorCommission(goCtx context.Context, msg *types defer func() { for _, a := range amount { - telemetry.SetGaugeWithLabels( - []string{"tx", "msg", "withdraw_commission"}, - float32(a.Amount.Int64()), - []metrics.Label{telemetry.NewLabel("denom", a.Denom)}, - ) + if a.Amount.IsInt64() { + telemetry.SetGaugeWithLabels( + []string{"tx", "msg", "withdraw_commission"}, + float32(a.Amount.Int64()), + []metrics.Label{telemetry.NewLabel("denom", a.Denom)}, + ) + } } }() diff --git a/x/distribution/keeper/querier_test.go b/x/distribution/keeper/querier_test.go index c749bf7742..9a3da854ab 100644 --- a/x/distribution/keeper/querier_test.go +++ b/x/distribution/keeper/querier_test.go @@ -172,7 +172,7 @@ func TestQueries(t *testing.T) { // test delegation rewards query tstaking := teststaking.NewHelper(t, ctx, app.StakingKeeper) tstaking.Commission = stakingtypes.NewCommissionRates(sdk.NewDecWithPrec(5, 1), sdk.NewDecWithPrec(5, 1), sdk.NewDec(0)) - tstaking.CreateValidator(valOpAddr1, valConsPk1, 100, true) + tstaking.CreateValidator(valOpAddr1, valConsPk1, sdk.NewInt(100), true) staking.EndBlocker(ctx, app.StakingKeeper) diff --git a/x/slashing/abci_test.go b/x/slashing/abci_test.go index 2d5430700c..50140eb58e 100644 --- a/x/slashing/abci_test.go +++ b/x/slashing/abci_test.go @@ -26,7 +26,8 @@ func TestBeginBlocker(t *testing.T) { tstaking := teststaking.NewHelper(t, ctx, app.StakingKeeper) // bond the validator - amt := tstaking.CreateValidatorWithValPower(addr, pk, 100, true) + power := int64(100) + amt := tstaking.CreateValidatorWithValPower(addr, pk, power, true) staking.EndBlocker(ctx, app.StakingKeeper) require.Equal( t, app.BankKeeper.GetAllBalances(ctx, sdk.AccAddress(addr)), @@ -36,7 +37,7 @@ func TestBeginBlocker(t *testing.T) { val := abci.Validator{ Address: pk.Address(), - Power: amt.Int64(), + Power: power, } // mark the validator as having signed diff --git a/x/slashing/handler_test.go b/x/slashing/handler_test.go index 17cd16b896..7a83014b96 100644 --- a/x/slashing/handler_test.go +++ b/x/slashing/handler_test.go @@ -58,7 +58,7 @@ func TestCannotUnjailUnlessMeetMinSelfDelegation(t *testing.T) { slh := slashing.NewHandler(app.SlashingKeeper) addr, val := sdk.ValAddress(pks[0].Address()), pks[0] amt := sdk.TokensFromConsensusPower(100) - msg := tstaking.CreateValidatorMsg(addr, val, amt.Int64()) + msg := tstaking.CreateValidatorMsg(addr, val, amt) msg.MinSelfDelegation = amt tstaking.Handle(msg, true) @@ -101,7 +101,7 @@ func TestJailedValidatorDelegations(t *testing.T) { // delegate tokens to the validator delAddr := sdk.AccAddress(pks[2].Address()) - tstaking.Delegate(delAddr, valAddr, amt.Int64()) + tstaking.Delegate(delAddr, valAddr, amt) // unbond validator total self-delegations (which should jail the validator) valAcc := sdk.AccAddress(valAddr) @@ -120,7 +120,7 @@ func TestJailedValidatorDelegations(t *testing.T) { require.Nil(t, res) // self-delegate to validator - tstaking.Delegate(valAcc, valAddr, amt.Int64()) + tstaking.Delegate(valAcc, valAddr, amt) // verify the validator can now unjail itself res, err = slashing.NewHandler(app.SlashingKeeper)(ctx, types.NewMsgUnjail(valAddr)) diff --git a/x/slashing/keeper/keeper_test.go b/x/slashing/keeper/keeper_test.go index 076dd16735..e083df637a 100644 --- a/x/slashing/keeper/keeper_test.go +++ b/x/slashing/keeper/keeper_test.go @@ -40,7 +40,7 @@ func TestUnJailNotBonded(t *testing.T) { // create a 6th validator with less power than the cliff validator (won't be bonded) addr, val := valAddrs[5], pks[5] amt := sdk.TokensFromConsensusPower(50) - msg := tstaking.CreateValidatorMsg(addr, val, amt.Int64()) + msg := tstaking.CreateValidatorMsg(addr, val, amt) msg.MinSelfDelegation = amt tstaking.Handle(msg, true) diff --git a/x/staking/keeper/msg_server.go b/x/staking/keeper/msg_server.go index 0d00e7fbc5..03de9b92a5 100644 --- a/x/staking/keeper/msg_server.go +++ b/x/staking/keeper/msg_server.go @@ -270,14 +270,16 @@ func (k msgServer) BeginRedelegate(goCtx context.Context, msg *types.MsgBeginRed return nil, err } - defer func() { - telemetry.IncrCounter(1, types.ModuleName, "redelegate") - telemetry.SetGaugeWithLabels( - []string{"tx", "msg", msg.Type()}, - float32(msg.Amount.Amount.Int64()), - []metrics.Label{telemetry.NewLabel("denom", msg.Amount.Denom)}, - ) - }() + if msg.Amount.Amount.IsInt64() { + defer func() { + telemetry.IncrCounter(1, types.ModuleName, "redelegate") + telemetry.SetGaugeWithLabels( + []string{"tx", "msg", msg.Type()}, + float32(msg.Amount.Amount.Int64()), + []metrics.Label{telemetry.NewLabel("denom", msg.Amount.Denom)}, + ) + }() + } ctx.EventManager().EmitEvents(sdk.Events{ sdk.NewEvent( From 300b7393addba8c162cae929db90b083dcf93bd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?colin=20axn=C3=A9r?= <25233464+colin-axner@users.noreply.github.com> Date: Tue, 10 Nov 2020 18:05:21 +0100 Subject: [PATCH 073/136] Update IBC host keys + cleanup (#7873) * init changes * cleanup keys and remove redunancdy * revert unintentional changes * KeyChannel -> ChannelKey --- .../transfer/keeper/relay_test.go | 2 +- x/ibc/core/02-client/client/utils/utils.go | 4 +- x/ibc/core/02-client/keeper/grpc_query.go | 2 +- x/ibc/core/02-client/keeper/keeper.go | 18 +- x/ibc/core/02-client/simulation/decoder.go | 4 +- .../core/02-client/simulation/decoder_test.go | 4 +- .../core/03-connection/client/utils/utils.go | 4 +- x/ibc/core/03-connection/keeper/grpc_query.go | 2 +- .../03-connection/keeper/handshake_test.go | 20 +- x/ibc/core/03-connection/keeper/keeper.go | 10 +- .../core/03-connection/keeper/verify_test.go | 12 +- .../core/03-connection/simulation/decoder.go | 4 +- .../03-connection/simulation/decoder_test.go | 4 +- x/ibc/core/04-channel/client/utils/utils.go | 10 +- x/ibc/core/04-channel/keeper/grpc_query.go | 4 +- .../core/04-channel/keeper/handshake_test.go | 8 +- x/ibc/core/04-channel/keeper/keeper.go | 36 ++-- x/ibc/core/04-channel/keeper/packet_test.go | 4 +- x/ibc/core/04-channel/keeper/timeout_test.go | 10 +- x/ibc/core/04-channel/simulation/decoder.go | 2 +- .../04-channel/simulation/decoder_test.go | 12 +- x/ibc/core/24-host/errors.go | 7 +- x/ibc/core/24-host/keys.go | 185 ++++++++++-------- x/ibc/core/24-host/parse.go | 2 +- x/ibc/core/keeper/msg_server_test.go | 32 +-- x/ibc/core/simulation/decoder_test.go | 6 +- x/ibc/core/spec/02_state.md | 14 +- .../06-solomachine/types/client_state.go | 6 +- .../06-solomachine/types/solomachine_test.go | 2 +- .../07-tendermint/types/client_state.go | 4 +- .../07-tendermint/types/client_state_test.go | 12 +- .../07-tendermint/types/store.go | 2 +- .../07-tendermint/types/store_test.go | 4 +- .../09-localhost/types/client_state.go | 16 +- .../09-localhost/types/client_state_test.go | 30 +-- x/ibc/testing/chain.go | 16 +- x/ibc/testing/coordinator.go | 4 +- x/ibc/testing/solomachine.go | 6 +- 38 files changed, 273 insertions(+), 251 deletions(-) diff --git a/x/ibc/applications/transfer/keeper/relay_test.go b/x/ibc/applications/transfer/keeper/relay_test.go index 5bb7993f9c..738de9e80a 100644 --- a/x/ibc/applications/transfer/keeper/relay_test.go +++ b/x/ibc/applications/transfer/keeper/relay_test.go @@ -109,7 +109,7 @@ func (suite *KeeperTestSuite) TestSendTransfer() { packet := channeltypes.NewPacket(fungibleTokenPacket.GetBytes(), 1, channelB.PortID, channelB.ID, channelA.PortID, channelA.ID, clienttypes.NewHeight(0, 110), 0) // get proof of packet commitment from chainB - packetKey := host.KeyPacketCommitment(packet.GetSourcePort(), packet.GetSourceChannel(), packet.GetSequence()) + packetKey := host.PacketCommitmentKey(packet.GetSourcePort(), packet.GetSourceChannel(), packet.GetSequence()) proof, proofHeight := suite.chainB.QueryProof(packetKey) recvMsg := channeltypes.NewMsgRecvPacket(packet, proof, proofHeight, suite.chainA.SenderAccount.GetAddress()) diff --git a/x/ibc/core/02-client/client/utils/utils.go b/x/ibc/core/02-client/client/utils/utils.go index bcd649ae77..200f6423fd 100644 --- a/x/ibc/core/02-client/client/utils/utils.go +++ b/x/ibc/core/02-client/client/utils/utils.go @@ -38,7 +38,7 @@ func QueryClientState( func QueryClientStateABCI( clientCtx client.Context, clientID string, ) (*types.QueryClientStateResponse, error) { - key := host.FullKeyClientPath(clientID, host.KeyClientState()) + key := host.FullClientStateKey(clientID) value, proofBz, proofHeight, err := ibcclient.QueryTendermintProof(clientCtx, key) if err != nil { @@ -91,7 +91,7 @@ func QueryConsensusState( func QueryConsensusStateABCI( clientCtx client.Context, clientID string, height exported.Height, ) (*types.QueryConsensusStateResponse, error) { - key := host.FullKeyClientPath(clientID, host.KeyConsensusState(height)) + key := host.FullConsensusStateKey(clientID, height) value, proofBz, proofHeight, err := ibcclient.QueryTendermintProof(clientCtx, key) if err != nil { diff --git a/x/ibc/core/02-client/keeper/grpc_query.go b/x/ibc/core/02-client/keeper/grpc_query.go index eeb3c10b8f..8bb5306897 100644 --- a/x/ibc/core/02-client/keeper/grpc_query.go +++ b/x/ibc/core/02-client/keeper/grpc_query.go @@ -152,7 +152,7 @@ func (q Keeper) ConsensusStates(c context.Context, req *types.QueryConsensusStat ctx := sdk.UnwrapSDKContext(c) consensusStates := []types.ConsensusStateWithHeight{} - store := prefix.NewStore(ctx.KVStore(q.storeKey), host.FullKeyClientPath(req.ClientId, []byte(fmt.Sprintf("%s/", host.KeyConsensusStatesPrefix)))) + store := prefix.NewStore(ctx.KVStore(q.storeKey), host.FullClientKey(req.ClientId, []byte(fmt.Sprintf("%s/", host.KeyConsensusStatePrefix)))) pageRes, err := query.Paginate(store, req.Pagination, func(key, value []byte) error { height, err := types.ParseHeight(string(key)) diff --git a/x/ibc/core/02-client/keeper/keeper.go b/x/ibc/core/02-client/keeper/keeper.go index 8af73dd75a..7c68499f8a 100644 --- a/x/ibc/core/02-client/keeper/keeper.go +++ b/x/ibc/core/02-client/keeper/keeper.go @@ -46,7 +46,7 @@ func (k Keeper) Logger(ctx sdk.Context) log.Logger { // GetClientState gets a particular client from the store func (k Keeper) GetClientState(ctx sdk.Context, clientID string) (exported.ClientState, bool) { store := k.ClientStore(ctx, clientID) - bz := store.Get(host.KeyClientState()) + bz := store.Get(host.ClientStateKey()) if bz == nil { return nil, false } @@ -58,13 +58,13 @@ func (k Keeper) GetClientState(ctx sdk.Context, clientID string) (exported.Clien // SetClientState sets a particular Client to the store func (k Keeper) SetClientState(ctx sdk.Context, clientID string, clientState exported.ClientState) { store := k.ClientStore(ctx, clientID) - store.Set(host.KeyClientState(), k.MustMarshalClientState(clientState)) + store.Set(host.ClientStateKey(), k.MustMarshalClientState(clientState)) } // GetClientConsensusState gets the stored consensus state from a client at a given height. func (k Keeper) GetClientConsensusState(ctx sdk.Context, clientID string, height exported.Height) (exported.ConsensusState, bool) { store := k.ClientStore(ctx, clientID) - bz := store.Get(host.KeyConsensusState(height)) + bz := store.Get(host.ConsensusStateKey(height)) if bz == nil { return nil, false } @@ -77,7 +77,7 @@ func (k Keeper) GetClientConsensusState(ctx sdk.Context, clientID string, height // height func (k Keeper) SetClientConsensusState(ctx sdk.Context, clientID string, height exported.Height, consensusState exported.ConsensusState) { store := k.ClientStore(ctx, clientID) - store.Set(host.KeyConsensusState(height), k.MustMarshalConsensusState(consensusState)) + store.Set(host.ConsensusStateKey(height), k.MustMarshalConsensusState(consensusState)) } // IterateConsensusStates provides an iterator over all stored consensus states. @@ -91,7 +91,7 @@ func (k Keeper) IterateConsensusStates(ctx sdk.Context, cb func(clientID string, for ; iterator.Valid(); iterator.Next() { keySplit := strings.Split(string(iterator.Key()), "/") // consensus key is in the format "clients//consensusStates/" - if len(keySplit) != 4 || keySplit[2] != string(host.KeyConsensusStatesPrefix) { + if len(keySplit) != 4 || keySplit[2] != string(host.KeyConsensusStatePrefix) { continue } clientID := keySplit[1] @@ -144,7 +144,7 @@ func (k Keeper) GetAllConsensusStates(ctx sdk.Context) types.ClientsConsensusSta // client at the given height func (k Keeper) HasClientConsensusState(ctx sdk.Context, clientID string, height exported.Height) bool { store := k.ClientStore(ctx, clientID) - return store.Has(host.KeyConsensusState(height)) + return store.Has(host.ConsensusStateKey(height)) } // GetLatestClientConsensusState gets the latest ConsensusState stored for a given client @@ -266,7 +266,7 @@ func (k Keeper) IterateClients(ctx sdk.Context, cb func(clientID string, cs expo defer iterator.Close() for ; iterator.Valid(); iterator.Next() { keySplit := strings.Split(string(iterator.Key()), "/") - if keySplit[len(keySplit)-1] != "clientState" { + if keySplit[len(keySplit)-1] != host.KeyClientState { continue } clientState := k.MustUnmarshalClientState(iterator.Value()) @@ -291,8 +291,6 @@ func (k Keeper) GetAllClients(ctx sdk.Context) (states []exported.ClientState) { // ClientStore returns isolated prefix store for each client so they can read/write in separate // namespace without being able to read/write other client's data func (k Keeper) ClientStore(ctx sdk.Context, clientID string) sdk.KVStore { - // append here is safe, appends within a function won't cause - // weird side effects when its singlethreaded - clientPrefix := append([]byte("clients/"+clientID), '/') + clientPrefix := []byte(fmt.Sprintf("%s/%s/", host.KeyClientStorePrefix, clientID)) return prefix.NewStore(ctx.KVStore(k.storeKey), clientPrefix) } diff --git a/x/ibc/core/02-client/simulation/decoder.go b/x/ibc/core/02-client/simulation/decoder.go index a5cff11d42..03a803b1b1 100644 --- a/x/ibc/core/02-client/simulation/decoder.go +++ b/x/ibc/core/02-client/simulation/decoder.go @@ -22,12 +22,12 @@ type ClientUnmarshaler interface { // Value to the corresponding client type. func NewDecodeStore(cdc ClientUnmarshaler, kvA, kvB kv.Pair) (string, bool) { switch { - case bytes.HasPrefix(kvA.Key, host.KeyClientStorePrefix) && bytes.HasSuffix(kvA.Key, host.KeyClientState()): + case bytes.HasPrefix(kvA.Key, host.KeyClientStorePrefix) && bytes.HasSuffix(kvA.Key, []byte(host.KeyClientState)): clientStateA := cdc.MustUnmarshalClientState(kvA.Value) clientStateB := cdc.MustUnmarshalClientState(kvB.Value) return fmt.Sprintf("ClientState A: %v\nClientState B: %v", clientStateA, clientStateB), true - case bytes.HasPrefix(kvA.Key, host.KeyClientStorePrefix) && bytes.Contains(kvA.Key, []byte("consensusState")): + case bytes.HasPrefix(kvA.Key, host.KeyClientStorePrefix) && bytes.Contains(kvA.Key, []byte(host.KeyConsensusStatePrefix)): consensusStateA := cdc.MustUnmarshalConsensusState(kvA.Value) consensusStateB := cdc.MustUnmarshalConsensusState(kvB.Value) return fmt.Sprintf("ConsensusState A: %v\nConsensusState B: %v", consensusStateA, consensusStateB), true diff --git a/x/ibc/core/02-client/simulation/decoder_test.go b/x/ibc/core/02-client/simulation/decoder_test.go index 6ee442eabf..095834ba0d 100644 --- a/x/ibc/core/02-client/simulation/decoder_test.go +++ b/x/ibc/core/02-client/simulation/decoder_test.go @@ -32,11 +32,11 @@ func TestDecodeStore(t *testing.T) { kvPairs := kv.Pairs{ Pairs: []kv.Pair{ { - Key: host.FullKeyClientPath(clientID, host.KeyClientState()), + Key: host.FullClientStateKey(clientID), Value: app.IBCKeeper.ClientKeeper.MustMarshalClientState(clientState), }, { - Key: host.FullKeyClientPath(clientID, host.KeyConsensusState(height)), + Key: host.FullConsensusStateKey(clientID, height), Value: app.IBCKeeper.ClientKeeper.MustMarshalConsensusState(consState), }, { diff --git a/x/ibc/core/03-connection/client/utils/utils.go b/x/ibc/core/03-connection/client/utils/utils.go index 955ecfe6ba..44283aef82 100644 --- a/x/ibc/core/03-connection/client/utils/utils.go +++ b/x/ibc/core/03-connection/client/utils/utils.go @@ -38,7 +38,7 @@ func QueryConnection( } func queryConnectionABCI(clientCtx client.Context, connectionID string) (*types.QueryConnectionResponse, error) { - key := host.KeyConnection(connectionID) + key := host.ConnectionKey(connectionID) value, proofBz, proofHeight, err := ibcclient.QueryTendermintProof(clientCtx, key) if err != nil { @@ -79,7 +79,7 @@ func QueryClientConnections( } func queryClientConnectionsABCI(clientCtx client.Context, clientID string) (*types.QueryClientConnectionsResponse, error) { - key := host.KeyClientConnections(clientID) + key := host.ClientConnectionsKey(clientID) value, proofBz, proofHeight, err := ibcclient.QueryTendermintProof(clientCtx, key) if err != nil { diff --git a/x/ibc/core/03-connection/keeper/grpc_query.go b/x/ibc/core/03-connection/keeper/grpc_query.go index 1c644e3da7..5b34d1e4ef 100644 --- a/x/ibc/core/03-connection/keeper/grpc_query.go +++ b/x/ibc/core/03-connection/keeper/grpc_query.go @@ -51,7 +51,7 @@ func (q Keeper) Connections(c context.Context, req *types.QueryConnectionsReques ctx := sdk.UnwrapSDKContext(c) connections := []*types.IdentifiedConnection{} - store := prefix.NewStore(ctx.KVStore(q.storeKey), host.KeyConnectionPrefix) + store := prefix.NewStore(ctx.KVStore(q.storeKey), []byte(host.KeyConnectionPrefix)) pageRes, err := query.Paginate(store, req.Pagination, func(key, value []byte) error { var result types.ConnectionEnd diff --git a/x/ibc/core/03-connection/keeper/handshake_test.go b/x/ibc/core/03-connection/keeper/handshake_test.go index b677b23520..9037810864 100644 --- a/x/ibc/core/03-connection/keeper/handshake_test.go +++ b/x/ibc/core/03-connection/keeper/handshake_test.go @@ -306,18 +306,18 @@ func (suite *KeeperTestSuite) TestConnOpenTry() { counterpartyChosenConnectionID = connection.Counterparty.ConnectionId } - connectionKey := host.KeyConnection(connA.ID) + connectionKey := host.ConnectionKey(connA.ID) proofInit, proofHeight := suite.chainA.QueryProof(connectionKey) if consensusHeight.IsZero() { // retrieve consensus state height to provide proof for consensusHeight = counterpartyClient.GetLatestHeight() } - consensusKey := host.FullKeyClientPath(clientA, host.KeyConsensusState(consensusHeight)) + consensusKey := host.FullConsensusStateKey(clientA, consensusHeight) proofConsensus, _ := suite.chainA.QueryProof(consensusKey) // retrieve proof of counterparty clientstate on chainA - clientKey := host.FullKeyClientPath(clientA, host.KeyClientState()) + clientKey := host.FullClientStateKey(clientA) proofClient, _ := suite.chainA.QueryProof(clientKey) err := suite.chainB.App.IBCKeeper.ConnectionKeeper.ConnOpenTry( @@ -661,10 +661,10 @@ func (suite *KeeperTestSuite) TestConnOpenAck() { for _, tc := range testCases { tc := tc suite.Run(tc.msg, func() { - suite.SetupTest() // reset + suite.SetupTest() // reset version = types.ExportedVersionsToProto(types.GetCompatibleVersions())[0] // must be explicitly changed in malleate - consensusHeight = clienttypes.ZeroHeight() // must be explicitly changed in malleate - counterpartyConnectionID = "" // must be explicitly changed in malleate + consensusHeight = clienttypes.ZeroHeight() // must be explicitly changed in malleate + counterpartyConnectionID = "" // must be explicitly changed in malleate tc.malleate() @@ -675,7 +675,7 @@ func (suite *KeeperTestSuite) TestConnOpenAck() { counterpartyConnectionID = connB.ID } - connectionKey := host.KeyConnection(connB.ID) + connectionKey := host.ConnectionKey(connB.ID) proofTry, proofHeight := suite.chainB.QueryProof(connectionKey) if consensusHeight.IsZero() { @@ -683,11 +683,11 @@ func (suite *KeeperTestSuite) TestConnOpenAck() { clientState := suite.chainB.GetClientState(clientB) consensusHeight = clientState.GetLatestHeight() } - consensusKey := host.FullKeyClientPath(clientB, host.KeyConsensusState(consensusHeight)) + consensusKey := host.FullConsensusStateKey(clientB, consensusHeight) proofConsensus, _ := suite.chainB.QueryProof(consensusKey) // retrieve proof of counterparty clientstate on chainA - clientKey := host.FullKeyClientPath(clientB, host.KeyClientState()) + clientKey := host.FullClientStateKey(clientB) proofClient, _ := suite.chainB.QueryProof(clientKey) err := suite.chainA.App.IBCKeeper.ConnectionKeeper.ConnOpenAck( @@ -757,7 +757,7 @@ func (suite *KeeperTestSuite) TestConnOpenConfirm() { connA := suite.chainA.GetFirstTestConnection(clientA, clientB) connB := suite.chainB.GetFirstTestConnection(clientB, clientA) - connectionKey := host.KeyConnection(connA.ID) + connectionKey := host.ConnectionKey(connA.ID) proofAck, proofHeight := suite.chainA.QueryProof(connectionKey) err := suite.chainB.App.IBCKeeper.ConnectionKeeper.ConnOpenConfirm( diff --git a/x/ibc/core/03-connection/keeper/keeper.go b/x/ibc/core/03-connection/keeper/keeper.go index c838b4fa6f..dda5295877 100644 --- a/x/ibc/core/03-connection/keeper/keeper.go +++ b/x/ibc/core/03-connection/keeper/keeper.go @@ -48,7 +48,7 @@ func (k Keeper) GetCommitmentPrefix() exported.Prefix { // GetConnection returns a connection with a particular identifier func (k Keeper) GetConnection(ctx sdk.Context, connectionID string) (types.ConnectionEnd, bool) { store := ctx.KVStore(k.storeKey) - bz := store.Get(host.KeyConnection(connectionID)) + bz := store.Get(host.ConnectionKey(connectionID)) if bz == nil { return types.ConnectionEnd{}, false } @@ -63,7 +63,7 @@ func (k Keeper) GetConnection(ctx sdk.Context, connectionID string) (types.Conne func (k Keeper) SetConnection(ctx sdk.Context, connectionID string, connection types.ConnectionEnd) { store := ctx.KVStore(k.storeKey) bz := k.cdc.MustMarshalBinaryBare(&connection) - store.Set(host.KeyConnection(connectionID), bz) + store.Set(host.ConnectionKey(connectionID), bz) } // GetTimestampAtHeight returns the timestamp in nanoseconds of the consensus state at the @@ -87,7 +87,7 @@ func (k Keeper) GetTimestampAtHeight(ctx sdk.Context, connection types.Connectio // particular client func (k Keeper) GetClientConnectionPaths(ctx sdk.Context, clientID string) ([]string, bool) { store := ctx.KVStore(k.storeKey) - bz := store.Get(host.KeyClientConnections(clientID)) + bz := store.Get(host.ClientConnectionsKey(clientID)) if bz == nil { return nil, false } @@ -102,7 +102,7 @@ func (k Keeper) SetClientConnectionPaths(ctx sdk.Context, clientID string, paths store := ctx.KVStore(k.storeKey) clientPaths := types.ClientPaths{Paths: paths} bz := k.cdc.MustMarshalBinaryBare(&clientPaths) - store.Set(host.KeyClientConnections(clientID), bz) + store.Set(host.ClientConnectionsKey(clientID), bz) } // GetAllClientConnectionPaths returns all stored clients connection id paths. It @@ -129,7 +129,7 @@ func (k Keeper) GetAllClientConnectionPaths(ctx sdk.Context) []types.ConnectionP // iterator will close and stop. func (k Keeper) IterateConnections(ctx sdk.Context, cb func(types.IdentifiedConnection) bool) { store := ctx.KVStore(k.storeKey) - iterator := sdk.KVStorePrefixIterator(store, host.KeyConnectionPrefix) + iterator := sdk.KVStorePrefixIterator(store, []byte(host.KeyConnectionPrefix)) defer iterator.Close() for ; iterator.Valid(); iterator.Next() { diff --git a/x/ibc/core/03-connection/keeper/verify_test.go b/x/ibc/core/03-connection/keeper/verify_test.go index 7f9705a80b..c9db5cc2bf 100644 --- a/x/ibc/core/03-connection/keeper/verify_test.go +++ b/x/ibc/core/03-connection/keeper/verify_test.go @@ -178,7 +178,7 @@ func (suite *KeeperTestSuite) TestVerifyConnectionState() { } expectedConnection := suite.chainB.GetConnection(connB) - connectionKey := host.KeyConnection(connB.ID) + connectionKey := host.ConnectionKey(connB.ID) proof, proofHeight := suite.chainB.QueryProof(connectionKey) if tc.changeConnectionState { @@ -227,7 +227,7 @@ func (suite *KeeperTestSuite) TestVerifyChannelState() { connection.ClientId = ibctesting.InvalidID } - channelKey := host.KeyChannel(channelB.PortID, channelB.ID) + channelKey := host.ChannelKey(channelB.PortID, channelB.ID) proof, proofHeight := suite.chainB.QueryProof(channelKey) channel := suite.chainB.GetChannel(channelB) @@ -282,7 +282,7 @@ func (suite *KeeperTestSuite) TestVerifyPacketCommitment() { err := suite.coordinator.SendPacket(suite.chainA, suite.chainB, packet, clientB) suite.Require().NoError(err) - commitmentKey := host.KeyPacketCommitment(packet.GetSourcePort(), packet.GetSourceChannel(), packet.GetSequence()) + commitmentKey := host.PacketCommitmentKey(packet.GetSourcePort(), packet.GetSourceChannel(), packet.GetSequence()) proof, proofHeight := suite.chainA.QueryProof(commitmentKey) if tc.changePacketCommitmentState { @@ -340,7 +340,7 @@ func (suite *KeeperTestSuite) TestVerifyPacketAcknowledgement() { err = suite.coordinator.RecvPacket(suite.chainA, suite.chainB, clientA, packet) suite.Require().NoError(err) - packetAckKey := host.KeyPacketAcknowledgement(packet.GetDestPort(), packet.GetDestChannel(), packet.GetSequence()) + packetAckKey := host.PacketAcknowledgementKey(packet.GetDestPort(), packet.GetDestChannel(), packet.GetSequence()) proof, proofHeight := suite.chainB.QueryProof(packetAckKey) ack := ibcmock.MockAcknowledgement @@ -405,7 +405,7 @@ func (suite *KeeperTestSuite) TestVerifyPacketReceiptAbsence() { suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, ibctesting.Tendermint) } - packetReceiptKey := host.KeyPacketReceipt(packet.GetDestPort(), packet.GetDestChannel(), packet.GetSequence()) + packetReceiptKey := host.PacketReceiptKey(packet.GetDestPort(), packet.GetDestChannel(), packet.GetSequence()) proof, proofHeight := suite.chainB.QueryProof(packetReceiptKey) err = suite.chainA.App.IBCKeeper.ConnectionKeeper.VerifyPacketReceiptAbsence( @@ -459,7 +459,7 @@ func (suite *KeeperTestSuite) TestVerifyNextSequenceRecv() { err = suite.coordinator.RecvPacket(suite.chainA, suite.chainB, clientA, packet) suite.Require().NoError(err) - nextSeqRecvKey := host.KeyNextSequenceRecv(packet.GetDestPort(), packet.GetDestChannel()) + nextSeqRecvKey := host.NextSequenceRecvKey(packet.GetDestPort(), packet.GetDestChannel()) proof, proofHeight := suite.chainB.QueryProof(nextSeqRecvKey) err = suite.chainA.App.IBCKeeper.ConnectionKeeper.VerifyNextSequenceRecv( diff --git a/x/ibc/core/03-connection/simulation/decoder.go b/x/ibc/core/03-connection/simulation/decoder.go index 4b2d3bdf88..ef988a103f 100644 --- a/x/ibc/core/03-connection/simulation/decoder.go +++ b/x/ibc/core/03-connection/simulation/decoder.go @@ -14,13 +14,13 @@ import ( // Value to the corresponding connection type. func NewDecodeStore(cdc codec.BinaryMarshaler, kvA, kvB kv.Pair) (string, bool) { switch { - case bytes.HasPrefix(kvA.Key, host.KeyClientStorePrefix) && bytes.HasSuffix(kvA.Key, host.KeyConnectionPrefix): + case bytes.HasPrefix(kvA.Key, host.KeyClientStorePrefix) && bytes.HasSuffix(kvA.Key, []byte(host.KeyConnectionPrefix)): var clientConnectionsA, clientConnectionsB types.ClientPaths cdc.MustUnmarshalBinaryBare(kvA.Value, &clientConnectionsA) cdc.MustUnmarshalBinaryBare(kvB.Value, &clientConnectionsB) return fmt.Sprintf("ClientPaths A: %v\nClientPaths B: %v", clientConnectionsA, clientConnectionsB), true - case bytes.HasPrefix(kvA.Key, host.KeyConnectionPrefix): + case bytes.HasPrefix(kvA.Key, []byte(host.KeyConnectionPrefix)): var connectionA, connectionB types.ConnectionEnd cdc.MustUnmarshalBinaryBare(kvA.Value, &connectionA) cdc.MustUnmarshalBinaryBare(kvB.Value, &connectionB) diff --git a/x/ibc/core/03-connection/simulation/decoder_test.go b/x/ibc/core/03-connection/simulation/decoder_test.go index 7e36b05a70..673bf64006 100644 --- a/x/ibc/core/03-connection/simulation/decoder_test.go +++ b/x/ibc/core/03-connection/simulation/decoder_test.go @@ -31,11 +31,11 @@ func TestDecodeStore(t *testing.T) { kvPairs := kv.Pairs{ Pairs: []kv.Pair{ { - Key: host.KeyClientConnections(connection.ClientId), + Key: host.ClientConnectionsKey(connection.ClientId), Value: cdc.MustMarshalBinaryBare(&paths), }, { - Key: host.KeyConnection(connectionID), + Key: host.ConnectionKey(connectionID), Value: cdc.MustMarshalBinaryBare(&connection), }, { diff --git a/x/ibc/core/04-channel/client/utils/utils.go b/x/ibc/core/04-channel/client/utils/utils.go index a5cae383bd..f28ffcf805 100644 --- a/x/ibc/core/04-channel/client/utils/utils.go +++ b/x/ibc/core/04-channel/client/utils/utils.go @@ -35,7 +35,7 @@ func QueryChannel( } func queryChannelABCI(clientCtx client.Context, portID, channelID string) (*types.QueryChannelResponse, error) { - key := host.KeyChannel(portID, channelID) + key := host.ChannelKey(portID, channelID) value, proofBz, proofHeight, err := ibcclient.QueryTendermintProof(clientCtx, key) if err != nil { @@ -176,7 +176,7 @@ func QueryNextSequenceReceive( } func queryNextSequenceRecvABCI(clientCtx client.Context, portID, channelID string) (*types.QueryNextSequenceReceiveResponse, error) { - key := host.KeyNextSequenceRecv(portID, channelID) + key := host.NextSequenceRecvKey(portID, channelID) value, proofBz, proofHeight, err := ibcclient.QueryTendermintProof(clientCtx, key) if err != nil { @@ -217,7 +217,7 @@ func QueryPacketCommitment( func queryPacketCommitmentABCI( clientCtx client.Context, portID, channelID string, sequence uint64, ) (*types.QueryPacketCommitmentResponse, error) { - key := host.KeyPacketCommitment(portID, channelID, sequence) + key := host.PacketCommitmentKey(portID, channelID, sequence) value, proofBz, proofHeight, err := ibcclient.QueryTendermintProof(clientCtx, key) if err != nil { @@ -256,7 +256,7 @@ func QueryPacketReceipt( func queryPacketReceiptABCI( clientCtx client.Context, portID, channelID string, sequence uint64, ) (*types.QueryPacketReceiptResponse, error) { - key := host.KeyPacketReceipt(portID, channelID, sequence) + key := host.PacketReceiptKey(portID, channelID, sequence) value, proofBz, proofHeight, err := ibcclient.QueryTendermintProof(clientCtx, key) if err != nil { @@ -285,7 +285,7 @@ func QueryPacketAcknowledgement(clientCtx client.Context, portID, channelID stri } func queryPacketAcknowledgementABCI(clientCtx client.Context, portID, channelID string, sequence uint64) (*types.QueryPacketAcknowledgementResponse, error) { - key := host.KeyPacketAcknowledgement(portID, channelID, sequence) + key := host.PacketAcknowledgementKey(portID, channelID, sequence) value, proofBz, proofHeight, err := ibcclient.QueryTendermintProof(clientCtx, key) if err != nil { diff --git a/x/ibc/core/04-channel/keeper/grpc_query.go b/x/ibc/core/04-channel/keeper/grpc_query.go index 5e279ee435..355f192d75 100644 --- a/x/ibc/core/04-channel/keeper/grpc_query.go +++ b/x/ibc/core/04-channel/keeper/grpc_query.go @@ -52,7 +52,7 @@ func (q Keeper) Channels(c context.Context, req *types.QueryChannelsRequest) (*t ctx := sdk.UnwrapSDKContext(c) channels := []*types.IdentifiedChannel{} - store := prefix.NewStore(ctx.KVStore(q.storeKey), []byte(host.KeyChannelPrefix)) + store := prefix.NewStore(ctx.KVStore(q.storeKey), []byte(host.KeyChannelEndPrefix)) pageRes, err := query.Paginate(store, req.Pagination, func(key, value []byte) error { var result types.Channel @@ -95,7 +95,7 @@ func (q Keeper) ConnectionChannels(c context.Context, req *types.QueryConnection ctx := sdk.UnwrapSDKContext(c) channels := []*types.IdentifiedChannel{} - store := prefix.NewStore(ctx.KVStore(q.storeKey), []byte(host.KeyChannelPrefix)) + store := prefix.NewStore(ctx.KVStore(q.storeKey), []byte(host.KeyChannelEndPrefix)) pageRes, err := query.Paginate(store, req.Pagination, func(key, value []byte) error { var result types.Channel diff --git a/x/ibc/core/04-channel/keeper/handshake_test.go b/x/ibc/core/04-channel/keeper/handshake_test.go index fe5dc3593a..cf391d0387 100644 --- a/x/ibc/core/04-channel/keeper/handshake_test.go +++ b/x/ibc/core/04-channel/keeper/handshake_test.go @@ -289,7 +289,7 @@ func (suite *KeeperTestSuite) TestChanOpenTry() { counterpartyChosenChannelID = channel.Counterparty.ChannelId } - channelKey := host.KeyChannel(counterparty.PortId, counterparty.ChannelId) + channelKey := host.ChannelKey(counterparty.PortId, counterparty.ChannelId) proof, proofHeight := suite.chainA.QueryProof(channelKey) cap, err := suite.chainB.App.IBCKeeper.ChannelKeeper.ChanOpenTry( @@ -455,7 +455,7 @@ func (suite *KeeperTestSuite) TestChanOpenAck() { counterpartyChannelID = channelB.ID } - channelKey := host.KeyChannel(channelB.PortID, channelB.ID) + channelKey := host.ChannelKey(channelB.PortID, channelB.ID) proof, proofHeight := suite.chainB.QueryProof(channelKey) err := suite.chainA.App.IBCKeeper.ChannelKeeper.ChanOpenAck( @@ -583,7 +583,7 @@ func (suite *KeeperTestSuite) TestChanOpenConfirm() { channelA := connA.FirstOrNextTestChannel(ibctesting.MockPort) channelB := connB.FirstOrNextTestChannel(ibctesting.MockPort) - channelKey := host.KeyChannel(channelA.PortID, channelA.ID) + channelKey := host.ChannelKey(channelA.PortID, channelA.ID) proof, proofHeight := suite.chainA.QueryProof(channelKey) err := suite.chainB.App.IBCKeeper.ChannelKeeper.ChanOpenConfirm( @@ -784,7 +784,7 @@ func (suite *KeeperTestSuite) TestChanCloseConfirm() { channelA = connA.FirstOrNextTestChannel(ibctesting.MockPort) channelB = connB.FirstOrNextTestChannel(ibctesting.MockPort) - channelKey := host.KeyChannel(channelA.PortID, channelA.ID) + channelKey := host.ChannelKey(channelA.PortID, channelA.ID) proof, proofHeight := suite.chainA.QueryProof(channelKey) err := suite.chainB.App.IBCKeeper.ChannelKeeper.ChanCloseConfirm( diff --git a/x/ibc/core/04-channel/keeper/keeper.go b/x/ibc/core/04-channel/keeper/keeper.go index b3f23ca7fb..99aee2c6da 100644 --- a/x/ibc/core/04-channel/keeper/keeper.go +++ b/x/ibc/core/04-channel/keeper/keeper.go @@ -58,7 +58,7 @@ func (k Keeper) Logger(ctx sdk.Context) log.Logger { // GetChannel returns a channel with a particular identifier binded to a specific port func (k Keeper) GetChannel(ctx sdk.Context, portID, channelID string) (types.Channel, bool) { store := ctx.KVStore(k.storeKey) - bz := store.Get(host.KeyChannel(portID, channelID)) + bz := store.Get(host.ChannelKey(portID, channelID)) if bz == nil { return types.Channel{}, false } @@ -72,13 +72,13 @@ func (k Keeper) GetChannel(ctx sdk.Context, portID, channelID string) (types.Cha func (k Keeper) SetChannel(ctx sdk.Context, portID, channelID string, channel types.Channel) { store := ctx.KVStore(k.storeKey) bz := k.cdc.MustMarshalBinaryBare(&channel) - store.Set(host.KeyChannel(portID, channelID), bz) + store.Set(host.ChannelKey(portID, channelID), bz) } // GetNextSequenceSend gets a channel's next send sequence from the store func (k Keeper) GetNextSequenceSend(ctx sdk.Context, portID, channelID string) (uint64, bool) { store := ctx.KVStore(k.storeKey) - bz := store.Get(host.KeyNextSequenceSend(portID, channelID)) + bz := store.Get(host.NextSequenceSendKey(portID, channelID)) if bz == nil { return 0, false } @@ -90,13 +90,13 @@ func (k Keeper) GetNextSequenceSend(ctx sdk.Context, portID, channelID string) ( func (k Keeper) SetNextSequenceSend(ctx sdk.Context, portID, channelID string, sequence uint64) { store := ctx.KVStore(k.storeKey) bz := sdk.Uint64ToBigEndian(sequence) - store.Set(host.KeyNextSequenceSend(portID, channelID), bz) + store.Set(host.NextSequenceSendKey(portID, channelID), bz) } // GetNextSequenceRecv gets a channel's next receive sequence from the store func (k Keeper) GetNextSequenceRecv(ctx sdk.Context, portID, channelID string) (uint64, bool) { store := ctx.KVStore(k.storeKey) - bz := store.Get(host.KeyNextSequenceRecv(portID, channelID)) + bz := store.Get(host.NextSequenceRecvKey(portID, channelID)) if bz == nil { return 0, false } @@ -108,13 +108,13 @@ func (k Keeper) GetNextSequenceRecv(ctx sdk.Context, portID, channelID string) ( func (k Keeper) SetNextSequenceRecv(ctx sdk.Context, portID, channelID string, sequence uint64) { store := ctx.KVStore(k.storeKey) bz := sdk.Uint64ToBigEndian(sequence) - store.Set(host.KeyNextSequenceRecv(portID, channelID), bz) + store.Set(host.NextSequenceRecvKey(portID, channelID), bz) } // GetNextSequenceAck gets a channel's next ack sequence from the store func (k Keeper) GetNextSequenceAck(ctx sdk.Context, portID, channelID string) (uint64, bool) { store := ctx.KVStore(k.storeKey) - bz := store.Get(host.KeyNextSequenceAck(portID, channelID)) + bz := store.Get(host.NextSequenceAckKey(portID, channelID)) if bz == nil { return 0, false } @@ -126,13 +126,13 @@ func (k Keeper) GetNextSequenceAck(ctx sdk.Context, portID, channelID string) (u func (k Keeper) SetNextSequenceAck(ctx sdk.Context, portID, channelID string, sequence uint64) { store := ctx.KVStore(k.storeKey) bz := sdk.Uint64ToBigEndian(sequence) - store.Set(host.KeyNextSequenceAck(portID, channelID), bz) + store.Set(host.NextSequenceAckKey(portID, channelID), bz) } // GetPacketReceipt gets a packet receipt from the store func (k Keeper) GetPacketReceipt(ctx sdk.Context, portID, channelID string, sequence uint64) (string, bool) { store := ctx.KVStore(k.storeKey) - bz := store.Get(host.KeyPacketReceipt(portID, channelID, sequence)) + bz := store.Get(host.PacketReceiptKey(portID, channelID, sequence)) if bz == nil { return "", false } @@ -143,43 +143,43 @@ func (k Keeper) GetPacketReceipt(ctx sdk.Context, portID, channelID string, sequ // SetPacketReceipt sets an empty packet receipt to the store func (k Keeper) SetPacketReceipt(ctx sdk.Context, portID, channelID string, sequence uint64) { store := ctx.KVStore(k.storeKey) - store.Set(host.KeyPacketReceipt(portID, channelID, sequence), []byte("")) + store.Set(host.PacketReceiptKey(portID, channelID, sequence), []byte("")) } // GetPacketCommitment gets the packet commitment hash from the store func (k Keeper) GetPacketCommitment(ctx sdk.Context, portID, channelID string, sequence uint64) []byte { store := ctx.KVStore(k.storeKey) - bz := store.Get(host.KeyPacketCommitment(portID, channelID, sequence)) + bz := store.Get(host.PacketCommitmentKey(portID, channelID, sequence)) return bz } // HasPacketCommitment returns true if the packet commitment exists func (k Keeper) HasPacketCommitment(ctx sdk.Context, portID, channelID string, sequence uint64) bool { store := ctx.KVStore(k.storeKey) - return store.Has(host.KeyPacketCommitment(portID, channelID, sequence)) + return store.Has(host.PacketCommitmentKey(portID, channelID, sequence)) } // SetPacketCommitment sets the packet commitment hash to the store func (k Keeper) SetPacketCommitment(ctx sdk.Context, portID, channelID string, sequence uint64, commitmentHash []byte) { store := ctx.KVStore(k.storeKey) - store.Set(host.KeyPacketCommitment(portID, channelID, sequence), commitmentHash) + store.Set(host.PacketCommitmentKey(portID, channelID, sequence), commitmentHash) } func (k Keeper) deletePacketCommitment(ctx sdk.Context, portID, channelID string, sequence uint64) { store := ctx.KVStore(k.storeKey) - store.Delete(host.KeyPacketCommitment(portID, channelID, sequence)) + store.Delete(host.PacketCommitmentKey(portID, channelID, sequence)) } // SetPacketAcknowledgement sets the packet ack hash to the store func (k Keeper) SetPacketAcknowledgement(ctx sdk.Context, portID, channelID string, sequence uint64, ackHash []byte) { store := ctx.KVStore(k.storeKey) - store.Set(host.KeyPacketAcknowledgement(portID, channelID, sequence), ackHash) + store.Set(host.PacketAcknowledgementKey(portID, channelID, sequence), ackHash) } // GetPacketAcknowledgement gets the packet ack hash from the store func (k Keeper) GetPacketAcknowledgement(ctx sdk.Context, portID, channelID string, sequence uint64) ([]byte, bool) { store := ctx.KVStore(k.storeKey) - bz := store.Get(host.KeyPacketAcknowledgement(portID, channelID, sequence)) + bz := store.Get(host.PacketAcknowledgementKey(portID, channelID, sequence)) if bz == nil { return nil, false } @@ -189,7 +189,7 @@ func (k Keeper) GetPacketAcknowledgement(ctx sdk.Context, portID, channelID stri // HasPacketAcknowledgement check if the packet ack hash is already on the store func (k Keeper) HasPacketAcknowledgement(ctx sdk.Context, portID, channelID string, sequence uint64) bool { store := ctx.KVStore(k.storeKey) - return store.Has(host.KeyPacketAcknowledgement(portID, channelID, sequence)) + return store.Has(host.PacketAcknowledgementKey(portID, channelID, sequence)) } // IteratePacketSequence provides an iterator over all send, receive or ack sequences. @@ -330,7 +330,7 @@ func (k Keeper) GetAllPacketAcks(ctx sdk.Context) (acks []types.PacketState) { // and stop. func (k Keeper) IterateChannels(ctx sdk.Context, cb func(types.IdentifiedChannel) bool) { store := ctx.KVStore(k.storeKey) - iterator := sdk.KVStorePrefixIterator(store, []byte(host.KeyChannelPrefix)) + iterator := sdk.KVStorePrefixIterator(store, []byte(host.KeyChannelEndPrefix)) defer iterator.Close() for ; iterator.Valid(); iterator.Next() { diff --git a/x/ibc/core/04-channel/keeper/packet_test.go b/x/ibc/core/04-channel/keeper/packet_test.go index 3d942ce12e..f3624897dd 100644 --- a/x/ibc/core/04-channel/keeper/packet_test.go +++ b/x/ibc/core/04-channel/keeper/packet_test.go @@ -345,7 +345,7 @@ func (suite *KeeperTestSuite) TestRecvPacket() { tc.malleate() // get proof of packet commitment from chainA - packetKey := host.KeyPacketCommitment(packet.GetSourcePort(), packet.GetSourceChannel(), packet.GetSequence()) + packetKey := host.PacketCommitmentKey(packet.GetSourcePort(), packet.GetSourceChannel(), packet.GetSequence()) proof, proofHeight := suite.chainA.QueryProof(packetKey) err := suite.chainB.App.IBCKeeper.ChannelKeeper.RecvPacket(suite.chainB.GetContext(), channelCap, packet, proof, proofHeight) @@ -622,7 +622,7 @@ func (suite *KeeperTestSuite) TestAcknowledgePacket() { suite.SetupTest() // reset tc.malleate() - packetKey := host.KeyPacketAcknowledgement(packet.GetDestPort(), packet.GetDestChannel(), packet.GetSequence()) + packetKey := host.PacketAcknowledgementKey(packet.GetDestPort(), packet.GetDestChannel(), packet.GetSequence()) proof, proofHeight := suite.chainB.QueryProof(packetKey) err := suite.chainA.App.IBCKeeper.ChannelKeeper.AcknowledgePacket(suite.chainA.GetContext(), channelCap, packet, ack, proof, proofHeight) diff --git a/x/ibc/core/04-channel/keeper/timeout_test.go b/x/ibc/core/04-channel/keeper/timeout_test.go index 774f9eacf1..2ff4975826 100644 --- a/x/ibc/core/04-channel/keeper/timeout_test.go +++ b/x/ibc/core/04-channel/keeper/timeout_test.go @@ -125,8 +125,8 @@ func (suite *KeeperTestSuite) TestTimeoutPacket() { nextSeqRecv = 1 // must be explicitly changed tc.malleate() - orderedPacketKey := host.KeyNextSequenceRecv(packet.GetDestPort(), packet.GetDestChannel()) - unorderedPacketKey := host.KeyPacketReceipt(packet.GetDestPort(), packet.GetDestChannel(), packet.GetSequence()) + orderedPacketKey := host.NextSequenceRecvKey(packet.GetDestPort(), packet.GetDestChannel()) + unorderedPacketKey := host.PacketReceiptKey(packet.GetDestPort(), packet.GetDestChannel(), packet.GetSequence()) if ordered { proof, proofHeight = suite.chainB.QueryProof(orderedPacketKey) @@ -326,9 +326,9 @@ func (suite *KeeperTestSuite) TestTimeoutOnClose() { nextSeqRecv = 1 // must be explicitly changed tc.malleate() - channelKey := host.KeyChannel(packet.GetDestPort(), packet.GetDestChannel()) - unorderedPacketKey := host.KeyPacketReceipt(packet.GetDestPort(), packet.GetDestChannel(), packet.GetSequence()) - orderedPacketKey := host.KeyNextSequenceRecv(packet.GetDestPort(), packet.GetDestChannel()) + channelKey := host.ChannelKey(packet.GetDestPort(), packet.GetDestChannel()) + unorderedPacketKey := host.PacketReceiptKey(packet.GetDestPort(), packet.GetDestChannel(), packet.GetSequence()) + orderedPacketKey := host.NextSequenceRecvKey(packet.GetDestPort(), packet.GetDestChannel()) proofClosed, proofHeight := suite.chainB.QueryProof(channelKey) diff --git a/x/ibc/core/04-channel/simulation/decoder.go b/x/ibc/core/04-channel/simulation/decoder.go index 006bc08e93..809976cc0e 100644 --- a/x/ibc/core/04-channel/simulation/decoder.go +++ b/x/ibc/core/04-channel/simulation/decoder.go @@ -15,7 +15,7 @@ import ( // Value to the corresponding channel type. func NewDecodeStore(cdc codec.BinaryMarshaler, kvA, kvB kv.Pair) (string, bool) { switch { - case bytes.HasPrefix(kvA.Key, []byte(host.KeyChannelPrefix)): + case bytes.HasPrefix(kvA.Key, []byte(host.KeyChannelEndPrefix)): var channelA, channelB types.Channel cdc.MustUnmarshalBinaryBare(kvA.Value, &channelA) cdc.MustUnmarshalBinaryBare(kvB.Value, &channelB) diff --git a/x/ibc/core/04-channel/simulation/decoder_test.go b/x/ibc/core/04-channel/simulation/decoder_test.go index 2d61a8f9a4..5f2ba2f5ec 100644 --- a/x/ibc/core/04-channel/simulation/decoder_test.go +++ b/x/ibc/core/04-channel/simulation/decoder_test.go @@ -31,27 +31,27 @@ func TestDecodeStore(t *testing.T) { kvPairs := kv.Pairs{ Pairs: []kv.Pair{ { - Key: host.KeyChannel(portID, channelID), + Key: host.ChannelKey(portID, channelID), Value: cdc.MustMarshalBinaryBare(&channel), }, { - Key: host.KeyNextSequenceSend(portID, channelID), + Key: host.NextSequenceSendKey(portID, channelID), Value: sdk.Uint64ToBigEndian(1), }, { - Key: host.KeyNextSequenceRecv(portID, channelID), + Key: host.NextSequenceRecvKey(portID, channelID), Value: sdk.Uint64ToBigEndian(1), }, { - Key: host.KeyNextSequenceAck(portID, channelID), + Key: host.NextSequenceAckKey(portID, channelID), Value: sdk.Uint64ToBigEndian(1), }, { - Key: host.KeyPacketCommitment(portID, channelID, 1), + Key: host.PacketCommitmentKey(portID, channelID, 1), Value: bz, }, { - Key: host.KeyPacketAcknowledgement(portID, channelID, 1), + Key: host.PacketAcknowledgementKey(portID, channelID, 1), Value: bz, }, { diff --git a/x/ibc/core/24-host/errors.go b/x/ibc/core/24-host/errors.go index 3ec901625d..fe8129bde8 100644 --- a/x/ibc/core/24-host/errors.go +++ b/x/ibc/core/24-host/errors.go @@ -9,8 +9,7 @@ const SubModuleName = "host" // IBC client sentinel errors var ( - ErrInvalidID = sdkerrors.Register(SubModuleName, 2, "invalid identifier") - ErrInvalidPath = sdkerrors.Register(SubModuleName, 3, "invalid path") - ErrInvalidPacket = sdkerrors.Register(SubModuleName, 4, "invalid packet") - ErrInvalidVersion = sdkerrors.Register(SubModuleName, 5, "invalid version") + ErrInvalidID = sdkerrors.Register(SubModuleName, 2, "invalid identifier") + ErrInvalidPath = sdkerrors.Register(SubModuleName, 3, "invalid path") + ErrInvalidPacket = sdkerrors.Register(SubModuleName, 4, "invalid packet") ) diff --git a/x/ibc/core/24-host/keys.go b/x/ibc/core/24-host/keys.go index 3a51a13db1..51d2939577 100644 --- a/x/ibc/core/24-host/keys.go +++ b/x/ibc/core/24-host/keys.go @@ -22,14 +22,18 @@ const ( // KVStore key prefixes for IBC var ( - KeyClientStorePrefix = []byte("clients") - KeyConsensusStatesPrefix = []byte("consensusStates") - KeyConnectionPrefix = []byte("connections") + KeyClientStorePrefix = []byte("clients") ) // KVStore key prefixes for IBC const ( - KeyChannelPrefix = "channelEnds" + KeyClientState = "clientState" + KeyConsensusStatePrefix = "consensusStates" + KeyConnectionPrefix = "connections" + KeyChannelEndPrefix = "channelEnds" + KeyChannelPrefix = "channels" + KeyPortPrefix = "ports" + KeySequencePrefix = "sequences" KeyChannelCapabilityPrefix = "capabilities" KeyNextSeqSendPrefix = "nextSequenceSend" KeyNextSeqRecvPrefix = "nextSequenceRecv" @@ -42,38 +46,57 @@ const ( // FullClientPath returns the full path of a specific client path in the format: // "clients/{clientID}/{path}" as a string. func FullClientPath(clientID string, path string) string { - return string(FullKeyClientPath(clientID, []byte(path))) + return fmt.Sprintf("%s/%s/%s", KeyClientStorePrefix, clientID, path) } -// FullKeyClientPath returns the full path of specific client path in the format: +// FullClientKey returns the full path of specific client path in the format: // "clients/{clientID}/{path}" as a byte array. -func FullKeyClientPath(clientID string, path []byte) []byte { - return append(KeyClientStorePrefix, append([]byte("/"+clientID+"/"), path...)...) +func FullClientKey(clientID string, path []byte) []byte { + return []byte(FullClientPath(clientID, string(path))) } // ICS02 // The following paths are the keys to the store as defined in https://github.com/cosmos/ics/tree/master/spec/ics-002-client-semantics#path-space -// ClientStatePath takes an Identifier and returns a Path under which to store a +// FullClientStatePath takes a client identifier and returns a Path under which to store a // particular client state -func ClientStatePath() string { - return "clientState" +func FullClientStatePath(clientID string) string { + return FullClientPath(clientID, KeyClientState) } -// ConsensusStatePath takes an Identifier and returns a Path under which to +// FullClientStateKey takes a client identifier and returns a Key under which to store a +// particular client state. +func FullClientStateKey(clientID string) []byte { + return FullClientKey(clientID, []byte(KeyClientState)) +} + +// ClientStateKey returns a store key under which a particular client state is stored +// in a client prefixed store +func ClientStateKey() []byte { + return []byte(KeyClientState) +} + +// FullConsensusStatePath takes a client identifier and returns a Path under which to // store the consensus state of a client. +func FullConsensusStatePath(clientID string, height exported.Height) string { + return FullClientPath(clientID, fmt.Sprintf("%s/%s", KeyConsensusStatePrefix, height)) +} + +// FullConsensusStateKey returns the store key for the consensus state of a particular +// client. +func FullConsensusStateKey(clientID string, height exported.Height) []byte { + return []byte(FullConsensusStatePath(clientID, height)) +} + +// ConsensusStatePath returns the suffix store key for the consensus state at a +// particular height stored in a client prefixed store. func ConsensusStatePath(height exported.Height) string { - return fmt.Sprintf("%s/%s", KeyConsensusStatesPrefix, height) + return fmt.Sprintf("%s/%s", KeyConsensusStatePrefix, height) } -// KeyClientState returns the store key for a particular client state -func KeyClientState() []byte { - return []byte(ClientStatePath()) -} - -// KeyConsensusState returns the store key for the consensus state of a particular -// client -func KeyConsensusState(height exported.Height) []byte { +// ConsensusStateKey returns the store key for a the consensus state of a particular +// client stored in a client prefixed store. +func ConsensusStateKey(height exported.Height) []byte { return []byte(ConsensusStatePath(height)) } @@ -82,7 +105,12 @@ func KeyConsensusState(height exported.Height) []byte { // ClientConnectionsPath defines a reverse mapping from clients to a set of connections func ClientConnectionsPath(clientID string) string { - return fmt.Sprintf("%s/%s/connections", KeyClientStorePrefix, clientID) + return FullClientPath(clientID, KeyConnectionPrefix) +} + +// ClientConnectionsKey returns the store key for the connections of a given client +func ClientConnectionsKey(clientID string) []byte { + return []byte(ClientConnectionsPath(clientID)) } // ConnectionPath defines the path under which connection paths are stored @@ -90,13 +118,8 @@ func ConnectionPath(connectionID string) string { return fmt.Sprintf("%s/%s", KeyConnectionPrefix, connectionID) } -// KeyClientConnections returns the store key for the connections of a given client -func KeyClientConnections(clientID string) []byte { - return []byte(ClientConnectionsPath(clientID)) -} - -// KeyConnection returns the store key for a particular connection -func KeyConnection(connectionID string) []byte { +// ConnectionKey returns the store key for a particular connection +func ConnectionKey(connectionID string) []byte { return []byte(ConnectionPath(connectionID)) } @@ -105,98 +128,102 @@ func KeyConnection(connectionID string) []byte { // ChannelPath defines the path under which channels are stored func ChannelPath(portID, channelID string) string { - return fmt.Sprintf("%s/", KeyChannelPrefix) + channelPath(portID, channelID) + return fmt.Sprintf("%s/%s", KeyChannelEndPrefix, channelPath(portID, channelID)) +} + +// ChannelKey returns the store key for a particular channel +func ChannelKey(portID, channelID string) []byte { + return []byte(ChannelPath(portID, channelID)) } // ChannelCapabilityPath defines the path under which capability keys associated // with a channel are stored func ChannelCapabilityPath(portID, channelID string) string { - return fmt.Sprintf("%s/", KeyChannelCapabilityPrefix) + channelPath(portID, channelID) + "/key" + return fmt.Sprintf("%s/%s", KeyChannelCapabilityPrefix, channelPath(portID, channelID)) } // NextSequenceSendPath defines the next send sequence counter store path func NextSequenceSendPath(portID, channelID string) string { - return fmt.Sprintf("%s/", KeyNextSeqSendPrefix) + channelPath(portID, channelID) + return fmt.Sprintf("%s/%s", KeyNextSeqSendPrefix, channelPath(portID, channelID)) } -// NextSequenceRecvPath defines the next receive sequence counter store path +// NextSequenceSendKey returns the store key for the send sequence of a particular +// channel binded to a specific port. +func NextSequenceSendKey(portID, channelID string) []byte { + return []byte(NextSequenceSendPath(portID, channelID)) +} + +// NextSequenceRecvPath defines the next receive sequence counter store path. func NextSequenceRecvPath(portID, channelID string) string { - return fmt.Sprintf("%s/", KeyNextSeqRecvPrefix) + channelPath(portID, channelID) + return fmt.Sprintf("%s/%s", KeyNextSeqRecvPrefix, channelPath(portID, channelID)) +} + +// NextSequenceRecvKey returns the store key for the receive sequence of a particular +// channel binded to a specific port +func NextSequenceRecvKey(portID, channelID string) []byte { + return []byte(NextSequenceRecvPath(portID, channelID)) } // NextSequenceAckPath defines the next acknowledgement sequence counter store path func NextSequenceAckPath(portID, channelID string) string { - return fmt.Sprintf("%s/", KeyNextSeqAckPrefix) + channelPath(portID, channelID) + return fmt.Sprintf("%s/%s", KeyNextSeqAckPrefix, channelPath(portID, channelID)) +} + +// NextSequenceAckKey returns the store key for the acknowledgement sequence of +// a particular channel binded to a specific port. +func NextSequenceAckKey(portID, channelID string) []byte { + return []byte(NextSequenceAckPath(portID, channelID)) } // PacketCommitmentPath defines the commitments to packet data fields store path func PacketCommitmentPath(portID, channelID string, sequence uint64) string { - return fmt.Sprintf("%s/", KeyPacketCommitmentPrefix) + channelPath(portID, channelID) + fmt.Sprintf("/packets/%d", sequence) + return fmt.Sprintf("%s/%s/%s", KeyPacketCommitmentPrefix, channelPath(portID, channelID), sequencePath(sequence)) +} + +// PacketCommitmentKey returns the store key of under which a packet commitment +// is stored +func PacketCommitmentKey(portID, channelID string, sequence uint64) []byte { + return []byte(PacketCommitmentPath(portID, channelID, sequence)) } // PacketCommitmentPrefixPath defines the prefix for commitments to packet data fields store path. func PacketCommitmentPrefixPath(portID, channelID string) string { - return fmt.Sprintf("%s/", KeyPacketCommitmentPrefix) + channelPath(portID, channelID) + return fmt.Sprintf("%s/%s/%s", KeyPacketCommitmentPrefix, channelPath(portID, channelID), KeySequencePrefix) } // PacketAcknowledgementPath defines the packet acknowledgement store path func PacketAcknowledgementPath(portID, channelID string, sequence uint64) string { - return fmt.Sprintf("%s/", KeyPacketAckPrefix) + channelPath(portID, channelID) + fmt.Sprintf("/acknowledgements/%d", sequence) + return fmt.Sprintf("%s/%s/%s", KeyPacketAckPrefix, channelPath(portID, channelID), sequencePath(sequence)) +} + +// PacketAcknowledgementKey returns the store key of under which a packet +// acknowledgement is stored +func PacketAcknowledgementKey(portID, channelID string, sequence uint64) []byte { + return []byte(PacketAcknowledgementPath(portID, channelID, sequence)) } // PacketAcknowledgementPrefixPath defines the prefix for commitments to packet data fields store path. func PacketAcknowledgementPrefixPath(portID, channelID string) string { - return fmt.Sprintf("%s/", KeyPacketAckPrefix) + channelPath(portID, channelID) + return fmt.Sprintf("%s/%s/%s", KeyPacketAckPrefix, channelPath(portID, channelID), KeySequencePrefix) } // PacketReceiptPath defines the packet receipt store path func PacketReceiptPath(portID, channelID string, sequence uint64) string { - return fmt.Sprintf("%s/", KeyPacketReceiptPrefix) + channelPath(portID, channelID) + fmt.Sprintf("/receipts/%d", sequence) + return fmt.Sprintf("%s/%s/%s", KeyPacketReceiptPrefix, channelPath(portID, channelID), sequencePath(sequence)) } -// KeyChannel returns the store key for a particular channel -func KeyChannel(portID, channelID string) []byte { - return []byte(ChannelPath(portID, channelID)) -} - -// KeyNextSequenceSend returns the store key for the send sequence of a particular -// channel binded to a specific port -func KeyNextSequenceSend(portID, channelID string) []byte { - return []byte(NextSequenceSendPath(portID, channelID)) -} - -// KeyNextSequenceRecv returns the store key for the receive sequence of a particular -// channel binded to a specific port -func KeyNextSequenceRecv(portID, channelID string) []byte { - return []byte(NextSequenceRecvPath(portID, channelID)) -} - -// KeyNextSequenceAck returns the store key for the acknowledgement sequence of -// a particular channel binded to a specific port. -func KeyNextSequenceAck(portID, channelID string) []byte { - return []byte(NextSequenceAckPath(portID, channelID)) -} - -// KeyPacketCommitment returns the store key of under which a packet commitment -// is stored -func KeyPacketCommitment(portID, channelID string, sequence uint64) []byte { - return []byte(PacketCommitmentPath(portID, channelID, sequence)) -} - -// KeyPacketAcknowledgement returns the store key of under which a packet -// acknowledgement is stored -func KeyPacketAcknowledgement(portID, channelID string, sequence uint64) []byte { - return []byte(PacketAcknowledgementPath(portID, channelID, sequence)) -} - -// KeyPacketReceipt returns the store key of under which a packet +// PacketReceiptKey returns the store key of under which a packet // receipt is stored -func KeyPacketReceipt(portID, channelID string, sequence uint64) []byte { +func PacketReceiptKey(portID, channelID string, sequence uint64) []byte { return []byte(PacketReceiptPath(portID, channelID, sequence)) } func channelPath(portID, channelID string) string { - return fmt.Sprintf("ports/%s/channels/%s", portID, channelID) + return fmt.Sprintf("%s/%s/%s/%s", KeyPortPrefix, portID, KeyChannelPrefix, channelID) +} + +func sequencePath(sequence uint64) string { + return fmt.Sprintf("%s/%d", KeySequencePrefix, sequence) } // ICS05 @@ -204,5 +231,5 @@ func channelPath(portID, channelID string) string { // PortPath defines the path under which ports paths are stored on the capability module func PortPath(portID string) string { - return fmt.Sprintf("ports/%s", portID) + return fmt.Sprintf("%s/%s", KeyPortPrefix, portID) } diff --git a/x/ibc/core/24-host/parse.go b/x/ibc/core/24-host/parse.go index 7200c4ff00..7e6301a391 100644 --- a/x/ibc/core/24-host/parse.go +++ b/x/ibc/core/24-host/parse.go @@ -25,7 +25,7 @@ func ParseChannelPath(path string) (string, string, error) { return "", "", sdkerrors.Wrapf(ErrInvalidPath, "cannot parse channel path %s", path) } - if split[1] != "ports" || split[3] != "channels" { + if split[1] != KeyPortPrefix || split[3] != KeyChannelPrefix { return "", "", sdkerrors.Wrapf(ErrInvalidPath, "cannot parse channel path %s", path) } diff --git a/x/ibc/core/keeper/msg_server_test.go b/x/ibc/core/keeper/msg_server_test.go index a80426724f..5c4aa466a1 100644 --- a/x/ibc/core/keeper/msg_server_test.go +++ b/x/ibc/core/keeper/msg_server_test.go @@ -142,7 +142,7 @@ func (suite *KeeperTestSuite) TestHandleRecvPacket() { tc.malleate() // get proof of packet commitment from chainA - packetKey := host.KeyPacketCommitment(packet.GetSourcePort(), packet.GetSourceChannel(), packet.GetSequence()) + packetKey := host.PacketCommitmentKey(packet.GetSourcePort(), packet.GetSourceChannel(), packet.GetSequence()) proof, proofHeight := suite.chainA.QueryProof(packetKey) msg := channeltypes.NewMsgRecvPacket(packet, proof, proofHeight, suite.chainB.SenderAccount.GetAddress()) @@ -281,7 +281,7 @@ func (suite *KeeperTestSuite) TestHandleAcknowledgePacket() { tc.malleate() - packetKey := host.KeyPacketAcknowledgement(packet.GetDestPort(), packet.GetDestChannel(), packet.GetSequence()) + packetKey := host.PacketAcknowledgementKey(packet.GetDestPort(), packet.GetDestChannel(), packet.GetSequence()) proof, proofHeight := suite.chainB.QueryProof(packetKey) msg := channeltypes.NewMsgAcknowledgement(packet, ibcmock.MockAcknowledgement, proof, proofHeight, suite.chainA.SenderAccount.GetAddress()) @@ -333,7 +333,7 @@ func (suite *KeeperTestSuite) TestHandleTimeoutPacket() { // need to update chainA client to prove missing ack suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, ibctesting.Tendermint) - packetKey = host.KeyNextSequenceRecv(packet.GetDestPort(), packet.GetDestChannel()) + packetKey = host.NextSequenceRecvKey(packet.GetDestPort(), packet.GetDestChannel()) }, true}, {"success: UNORDERED", func() { clientA, clientB, _, _, channelA, channelB := suite.coordinator.Setup(suite.chainA, suite.chainB, channeltypes.UNORDERED) @@ -346,7 +346,7 @@ func (suite *KeeperTestSuite) TestHandleTimeoutPacket() { // need to update chainA client to prove missing ack suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, ibctesting.Tendermint) - packetKey = host.KeyPacketReceipt(packet.GetDestPort(), packet.GetDestChannel(), packet.GetSequence()) + packetKey = host.PacketReceiptKey(packet.GetDestPort(), packet.GetDestChannel(), packet.GetSequence()) }, true}, {"success: UNORDERED timeout out of order packet", func() { // setup uses an UNORDERED channel @@ -363,7 +363,7 @@ func (suite *KeeperTestSuite) TestHandleTimeoutPacket() { } suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, ibctesting.Tendermint) - packetKey = host.KeyPacketReceipt(packet.GetDestPort(), packet.GetDestChannel(), packet.GetSequence()) + packetKey = host.PacketReceiptKey(packet.GetDestPort(), packet.GetDestChannel(), packet.GetSequence()) }, true}, {"success: ORDERED timeout out of order packet", func() { clientA, clientB, _, _, channelA, channelB := suite.coordinator.Setup(suite.chainA, suite.chainB, channeltypes.ORDERED) @@ -379,19 +379,19 @@ func (suite *KeeperTestSuite) TestHandleTimeoutPacket() { } suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, ibctesting.Tendermint) - packetKey = host.KeyNextSequenceRecv(packet.GetDestPort(), packet.GetDestChannel()) + packetKey = host.NextSequenceRecvKey(packet.GetDestPort(), packet.GetDestChannel()) }, true}, {"channel does not exist", func() { // any non-nil value of packet is valid suite.Require().NotNil(packet) - packetKey = host.KeyNextSequenceRecv(packet.GetDestPort(), packet.GetDestChannel()) + packetKey = host.NextSequenceRecvKey(packet.GetDestPort(), packet.GetDestChannel()) }, false}, {"UNORDERED: packet not sent", func() { _, _, _, _, channelA, channelB := suite.coordinator.Setup(suite.chainA, suite.chainB, channeltypes.UNORDERED) packet = channeltypes.NewPacket(ibctesting.MockCommitment, 1, channelA.PortID, channelA.ID, channelB.PortID, channelB.ID, timeoutHeight, 0) - packetKey = host.KeyPacketReceipt(packet.GetDestPort(), packet.GetDestChannel(), packet.GetSequence()) + packetKey = host.PacketReceiptKey(packet.GetDestPort(), packet.GetDestChannel(), packet.GetSequence()) }, false}, } @@ -460,7 +460,7 @@ func (suite *KeeperTestSuite) TestHandleTimeoutOnClosePacket() { // need to update chainA client to prove missing ack suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, ibctesting.Tendermint) - packetKey = host.KeyNextSequenceRecv(packet.GetDestPort(), packet.GetDestChannel()) + packetKey = host.NextSequenceRecvKey(packet.GetDestPort(), packet.GetDestChannel()) // close counterparty channel suite.coordinator.SetChannelClosed(suite.chainB, suite.chainA, counterpartyChannel) @@ -481,7 +481,7 @@ func (suite *KeeperTestSuite) TestHandleTimeoutOnClosePacket() { // need to update chainA client to prove missing ack suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, ibctesting.Tendermint) - packetKey = host.KeyPacketReceipt(packet.GetDestPort(), packet.GetDestChannel(), packet.GetSequence()) + packetKey = host.PacketReceiptKey(packet.GetDestPort(), packet.GetDestChannel(), packet.GetSequence()) // close counterparty channel suite.coordinator.SetChannelClosed(suite.chainB, suite.chainA, counterpartyChannel) @@ -506,7 +506,7 @@ func (suite *KeeperTestSuite) TestHandleTimeoutOnClosePacket() { } suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, ibctesting.Tendermint) - packetKey = host.KeyPacketReceipt(packet.GetDestPort(), packet.GetDestChannel(), packet.GetSequence()) + packetKey = host.PacketReceiptKey(packet.GetDestPort(), packet.GetDestChannel(), packet.GetSequence()) // close counterparty channel suite.coordinator.SetChannelClosed(suite.chainB, suite.chainA, counterpartyChannel) @@ -530,7 +530,7 @@ func (suite *KeeperTestSuite) TestHandleTimeoutOnClosePacket() { } suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, ibctesting.Tendermint) - packetKey = host.KeyNextSequenceRecv(packet.GetDestPort(), packet.GetDestChannel()) + packetKey = host.NextSequenceRecvKey(packet.GetDestPort(), packet.GetDestChannel()) // close counterparty channel suite.coordinator.SetChannelClosed(suite.chainB, suite.chainA, counterpartyChannel) @@ -539,12 +539,12 @@ func (suite *KeeperTestSuite) TestHandleTimeoutOnClosePacket() { // any non-nil value of packet is valid suite.Require().NotNil(packet) - packetKey = host.KeyNextSequenceRecv(packet.GetDestPort(), packet.GetDestChannel()) + packetKey = host.NextSequenceRecvKey(packet.GetDestPort(), packet.GetDestChannel()) }, false}, {"UNORDERED: packet not sent", func() { clientA, _, _, _, channelA, channelB := suite.coordinator.Setup(suite.chainA, suite.chainB, channeltypes.UNORDERED) packet = channeltypes.NewPacket(ibctesting.MockCommitment, 1, channelA.PortID, channelA.ID, channelB.PortID, channelB.ID, timeoutHeight, 0) - packetKey = host.KeyPacketAcknowledgement(packet.GetDestPort(), packet.GetDestChannel(), packet.GetSequence()) + packetKey = host.PacketAcknowledgementKey(packet.GetDestPort(), packet.GetDestChannel(), packet.GetSequence()) counterpartyChannel = ibctesting.TestChannel{ PortID: channelB.PortID, ID: channelB.ID, @@ -570,7 +570,7 @@ func (suite *KeeperTestSuite) TestHandleTimeoutOnClosePacket() { // need to update chainA client to prove missing ack suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, ibctesting.Tendermint) - packetKey = host.KeyNextSequenceRecv(packet.GetDestPort(), packet.GetDestChannel()) + packetKey = host.NextSequenceRecvKey(packet.GetDestPort(), packet.GetDestChannel()) }, false}, } @@ -584,7 +584,7 @@ func (suite *KeeperTestSuite) TestHandleTimeoutOnClosePacket() { proof, proofHeight := suite.chainB.QueryProof(packetKey) - channelKey := host.KeyChannel(counterpartyChannel.PortID, counterpartyChannel.ID) + channelKey := host.ChannelKey(counterpartyChannel.PortID, counterpartyChannel.ID) proofClosed, _ := suite.chainB.QueryProof(channelKey) msg := channeltypes.NewMsgTimeoutOnClose(packet, 1, proof, proofClosed, proofHeight, suite.chainA.SenderAccount.GetAddress()) diff --git a/x/ibc/core/simulation/decoder_test.go b/x/ibc/core/simulation/decoder_test.go index d14a9f28cc..0951572743 100644 --- a/x/ibc/core/simulation/decoder_test.go +++ b/x/ibc/core/simulation/decoder_test.go @@ -40,15 +40,15 @@ func TestDecodeStore(t *testing.T) { kvPairs := kv.Pairs{ Pairs: []kv.Pair{ { - Key: host.FullKeyClientPath(clientID, host.KeyClientState()), + Key: host.FullClientStateKey(clientID), Value: app.IBCKeeper.ClientKeeper.MustMarshalClientState(clientState), }, { - Key: host.KeyConnection(connectionID), + Key: host.ConnectionKey(connectionID), Value: app.IBCKeeper.Codec().MustMarshalBinaryBare(&connection), }, { - Key: host.KeyChannel(portID, channelID), + Key: host.ChannelKey(portID, channelID), Value: app.IBCKeeper.Codec().MustMarshalBinaryBare(&channel), }, { diff --git a/x/ibc/core/spec/02_state.md b/x/ibc/core/spec/02_state.md index 5df09a097b..54eb41bc4b 100644 --- a/x/ibc/core/spec/02_state.md +++ b/x/ibc/core/spec/02_state.md @@ -16,10 +16,10 @@ The client type is not stored since it can be obtained through the client state. | "0/" | "connections/{identifier}" | ConnectionEnd | | "0/" | "ports/{identifier}" | CapabilityKey | | "0/" | "channelEnds/ports/{identifier}/channels/{identifier}" | ChannelEnd | -| "0/" | "capabilities/ports/{identifier}/channels/{identifier}/key" | CapabilityKey | -| "0/" | "seqSends/ports/{identifier}/channels/{identifier}/nextSequenceSend" | uint64 | -| "0/" | "seqRecvs/ports/{identifier}/channels/{identifier}/nextSequenceRecv" | uint64 | -| "0/" | "seqAcks/ports/{identifier}/channels/{identifier}/nextSequenceAck" | uint64 | -| "0/" | "commitments/ports/{identifier}/channels/{identifier}/packets/{sequence}" | bytes | -| "0/" | "receipts/ports/{identifier}/channels/{identifier}/receipts/{sequence}" | bytes | -| "0/" | "acks/ports/{identifier}/channels/{identifier}/acknowledgements/{sequence}" | bytes | +| "0/" | "capabilities/ports/{identifier}/channels/{identifier}" | CapabilityKey | +| "0/" | "nextSequenceSend/ports/{identifier}/channels/{identifier}" | uint64 | +| "0/" | "nextSequenceRecv/ports/{identifier}/channels/{identifier}" | uint64 | +| "0/" | "nextSequenceAck/ports/{identifier}/channels/{identifier}" | uint64 | +| "0/" | "commitments/ports/{identifier}/channels/{identifier}/sequences/{sequence}" | bytes | +| "0/" | "receipts/ports/{identifier}/channels/{identifier}/sequences/{sequence}" | bytes | +| "0/" | "acks/ports/{identifier}/channels/{identifier}/sequences/{sequence}" | bytes | diff --git a/x/ibc/light-clients/06-solomachine/types/client_state.go b/x/ibc/light-clients/06-solomachine/types/client_state.go index 583193f3da..5e9fe014ac 100644 --- a/x/ibc/light-clients/06-solomachine/types/client_state.go +++ b/x/ibc/light-clients/06-solomachine/types/client_state.go @@ -100,7 +100,7 @@ func (cs ClientState) VerifyClientState( return err } - clientPrefixedPath := commitmenttypes.NewMerklePath("clients/" + counterpartyClientIdentifier + "/" + host.ClientStatePath()) + clientPrefixedPath := commitmenttypes.NewMerklePath(host.FullClientStatePath(counterpartyClientIdentifier)) path, err := commitmenttypes.ApplyPrefix(prefix, clientPrefixedPath) if err != nil { return err @@ -138,7 +138,7 @@ func (cs ClientState) VerifyClientConsensusState( return err } - clientPrefixedPath := commitmenttypes.NewMerklePath("clients/" + counterpartyClientIdentifier + "/" + host.ConsensusStatePath(consensusHeight)) + clientPrefixedPath := commitmenttypes.NewMerklePath(host.FullConsensusStatePath(counterpartyClientIdentifier, consensusHeight)) path, err := commitmenttypes.ApplyPrefix(prefix, clientPrefixedPath) if err != nil { return err @@ -460,5 +460,5 @@ func produceVerificationArgs( // sets the client state to the store func setClientState(store sdk.KVStore, cdc codec.BinaryMarshaler, clientState exported.ClientState) { bz := clienttypes.MustMarshalClientState(cdc, clientState) - store.Set(host.KeyClientState(), bz) + store.Set([]byte(host.KeyClientState), bz) } diff --git a/x/ibc/light-clients/06-solomachine/types/solomachine_test.go b/x/ibc/light-clients/06-solomachine/types/solomachine_test.go index ee236a9e88..53f5c4a48c 100644 --- a/x/ibc/light-clients/06-solomachine/types/solomachine_test.go +++ b/x/ibc/light-clients/06-solomachine/types/solomachine_test.go @@ -49,7 +49,7 @@ func TestSoloMachineTestSuite(t *testing.T) { } func (suite *SoloMachineTestSuite) GetSequenceFromStore() uint64 { - bz := suite.store.Get(host.KeyClientState()) + bz := suite.store.Get(host.ClientStateKey()) suite.Require().NotNil(bz) var clientState exported.ClientState diff --git a/x/ibc/light-clients/07-tendermint/types/client_state.go b/x/ibc/light-clients/07-tendermint/types/client_state.go index 65d4312452..3940d44b7f 100644 --- a/x/ibc/light-clients/07-tendermint/types/client_state.go +++ b/x/ibc/light-clients/07-tendermint/types/client_state.go @@ -180,7 +180,7 @@ func (cs ClientState) VerifyClientState( return err } - clientPrefixedPath := commitmenttypes.NewMerklePath("clients/" + counterpartyClientIdentifier + "/" + host.ClientStatePath()) + clientPrefixedPath := commitmenttypes.NewMerklePath(host.FullClientStatePath(counterpartyClientIdentifier)) path, err := commitmenttypes.ApplyPrefix(prefix, clientPrefixedPath) if err != nil { return err @@ -220,7 +220,7 @@ func (cs ClientState) VerifyClientConsensusState( return err } - clientPrefixedPath := commitmenttypes.NewMerklePath("clients/" + counterpartyClientIdentifier + "/" + host.ConsensusStatePath(consensusHeight)) + clientPrefixedPath := commitmenttypes.NewMerklePath(host.FullConsensusStatePath(counterpartyClientIdentifier, consensusHeight)) path, err := commitmenttypes.ApplyPrefix(prefix, clientPrefixedPath) if err != nil { return err diff --git a/x/ibc/light-clients/07-tendermint/types/client_state_test.go b/x/ibc/light-clients/07-tendermint/types/client_state_test.go index 4f82044664..90ff6767f0 100644 --- a/x/ibc/light-clients/07-tendermint/types/client_state_test.go +++ b/x/ibc/light-clients/07-tendermint/types/client_state_test.go @@ -230,7 +230,7 @@ func (suite *TendermintTestSuite) TestVerifyConnectionState() { prefix = suite.chainB.GetPrefix() // make connection proof - connectionKey := host.KeyConnection(connB.ID) + connectionKey := host.ConnectionKey(connB.ID) proof, proofHeight = suite.chainB.QueryProof(connectionKey) tc.malleate() // make changes as necessary @@ -308,7 +308,7 @@ func (suite *TendermintTestSuite) TestVerifyChannelState() { prefix = suite.chainB.GetPrefix() // make channel proof - channelKey := host.KeyChannel(channelB.PortID, channelB.ID) + channelKey := host.ChannelKey(channelB.PortID, channelB.ID) proof, proofHeight = suite.chainB.QueryProof(channelKey) tc.malleate() // make changes as necessary @@ -389,7 +389,7 @@ func (suite *TendermintTestSuite) TestVerifyPacketCommitment() { prefix = suite.chainB.GetPrefix() // make packet commitment proof - packetKey := host.KeyPacketCommitment(packet.GetSourcePort(), packet.GetSourceChannel(), packet.GetSequence()) + packetKey := host.PacketCommitmentKey(packet.GetSourcePort(), packet.GetSourceChannel(), packet.GetSequence()) proof, proofHeight = suite.chainB.QueryProof(packetKey) tc.malleate() // make changes as necessary @@ -477,7 +477,7 @@ func (suite *TendermintTestSuite) TestVerifyPacketAcknowledgement() { prefix = suite.chainB.GetPrefix() // make packet acknowledgement proof - acknowledgementKey := host.KeyPacketAcknowledgement(packet.GetDestPort(), packet.GetDestChannel(), packet.GetSequence()) + acknowledgementKey := host.PacketAcknowledgementKey(packet.GetDestPort(), packet.GetDestChannel(), packet.GetSequence()) proof, proofHeight = suite.chainB.QueryProof(acknowledgementKey) tc.malleate() // make changes as necessary @@ -564,7 +564,7 @@ func (suite *TendermintTestSuite) TestVerifyPacketReceiptAbsence() { prefix = suite.chainB.GetPrefix() // make packet receipt absence proof - receiptKey := host.KeyPacketReceipt(packet.GetDestPort(), packet.GetDestChannel(), packet.GetSequence()) + receiptKey := host.PacketReceiptKey(packet.GetDestPort(), packet.GetDestChannel(), packet.GetSequence()) proof, proofHeight = suite.chainB.QueryProof(receiptKey) tc.malleate() // make changes as necessary @@ -655,7 +655,7 @@ func (suite *TendermintTestSuite) TestVerifyNextSeqRecv() { prefix = suite.chainB.GetPrefix() // make next seq recv proof - nextSeqRecvKey := host.KeyNextSequenceRecv(packet.GetDestPort(), packet.GetDestChannel()) + nextSeqRecvKey := host.NextSequenceRecvKey(packet.GetDestPort(), packet.GetDestChannel()) proof, proofHeight = suite.chainB.QueryProof(nextSeqRecvKey) tc.malleate() // make changes as necessary diff --git a/x/ibc/light-clients/07-tendermint/types/store.go b/x/ibc/light-clients/07-tendermint/types/store.go index 096d798333..50f8d2a1db 100644 --- a/x/ibc/light-clients/07-tendermint/types/store.go +++ b/x/ibc/light-clients/07-tendermint/types/store.go @@ -12,7 +12,7 @@ import ( // GetConsensusState retrieves the consensus state from the client prefixed // store. An error is returned if the consensus state does not exist. func GetConsensusState(store sdk.KVStore, cdc codec.BinaryMarshaler, height exported.Height) (*ConsensusState, error) { - bz := store.Get(host.KeyConsensusState(height)) + bz := store.Get(host.ConsensusStateKey(height)) if bz == nil { return nil, sdkerrors.Wrapf( clienttypes.ErrConsensusStateNotFound, diff --git a/x/ibc/light-clients/07-tendermint/types/store_test.go b/x/ibc/light-clients/07-tendermint/types/store_test.go index 91cb973ca0..3bb267b0fc 100644 --- a/x/ibc/light-clients/07-tendermint/types/store_test.go +++ b/x/ibc/light-clients/07-tendermint/types/store_test.go @@ -34,7 +34,7 @@ func (suite *TendermintTestSuite) TestGetConsensusState() { // marshal an empty client state and set as consensus state store := suite.chainA.App.IBCKeeper.ClientKeeper.ClientStore(suite.chainA.GetContext(), clientA) clientStateBz := suite.chainA.App.IBCKeeper.ClientKeeper.MustMarshalClientState(&types.ClientState{}) - store.Set(host.KeyConsensusState(height), clientStateBz) + store.Set(host.ConsensusStateKey(height), clientStateBz) }, false, }, { @@ -42,7 +42,7 @@ func (suite *TendermintTestSuite) TestGetConsensusState() { // marshal and set solomachine consensus state store := suite.chainA.App.IBCKeeper.ClientKeeper.ClientStore(suite.chainA.GetContext(), clientA) consensusStateBz := suite.chainA.App.IBCKeeper.ClientKeeper.MustMarshalConsensusState(&solomachinetypes.ConsensusState{}) - store.Set(host.KeyConsensusState(height), consensusStateBz) + store.Set(host.ConsensusStateKey(height), consensusStateBz) }, false, }, } diff --git a/x/ibc/light-clients/09-localhost/types/client_state.go b/x/ibc/light-clients/09-localhost/types/client_state.go index fa4223fc9a..eb69311476 100644 --- a/x/ibc/light-clients/09-localhost/types/client_state.go +++ b/x/ibc/light-clients/09-localhost/types/client_state.go @@ -115,8 +115,8 @@ func (cs ClientState) VerifyClientState( store sdk.KVStore, cdc codec.BinaryMarshaler, _ exported.Height, _ exported.Prefix, _ string, _ []byte, clientState exported.ClientState, ) error { - path := host.KeyClientState() - bz := store.Get(path) + path := host.KeyClientState + bz := store.Get([]byte(path)) if bz == nil { return sdkerrors.Wrapf(clienttypes.ErrFailedClientStateVerification, "not found for path: %s", path) @@ -154,7 +154,7 @@ func (cs ClientState) VerifyConnectionState( connectionID string, connectionEnd exported.ConnectionI, ) error { - path := host.KeyConnection(connectionID) + path := host.ConnectionKey(connectionID) bz := store.Get(path) if bz == nil { return sdkerrors.Wrapf(clienttypes.ErrFailedConnectionStateVerification, "not found for path %s", path) @@ -188,7 +188,7 @@ func (cs ClientState) VerifyChannelState( channelID string, channel exported.ChannelI, ) error { - path := host.KeyChannel(portID, channelID) + path := host.ChannelKey(portID, channelID) bz := store.Get(path) if bz == nil { return sdkerrors.Wrapf(clienttypes.ErrFailedChannelStateVerification, "not found for path %s", path) @@ -223,7 +223,7 @@ func (cs ClientState) VerifyPacketCommitment( sequence uint64, commitmentBytes []byte, ) error { - path := host.KeyPacketCommitment(portID, channelID, sequence) + path := host.PacketCommitmentKey(portID, channelID, sequence) data := store.Get(path) if len(data) == 0 { @@ -253,7 +253,7 @@ func (cs ClientState) VerifyPacketAcknowledgement( sequence uint64, acknowledgement []byte, ) error { - path := host.KeyPacketAcknowledgement(portID, channelID, sequence) + path := host.PacketAcknowledgementKey(portID, channelID, sequence) data := store.Get(path) if len(data) == 0 { @@ -283,7 +283,7 @@ func (cs ClientState) VerifyPacketReceiptAbsence( channelID string, sequence uint64, ) error { - path := host.KeyPacketReceipt(portID, channelID, sequence) + path := host.PacketReceiptKey(portID, channelID, sequence) data := store.Get(path) if data != nil { @@ -305,7 +305,7 @@ func (cs ClientState) VerifyNextSequenceRecv( channelID string, nextSequenceRecv uint64, ) error { - path := host.KeyNextSequenceRecv(portID, channelID) + path := host.NextSequenceRecvKey(portID, channelID) data := store.Get(path) if len(data) == 0 { diff --git a/x/ibc/light-clients/09-localhost/types/client_state_test.go b/x/ibc/light-clients/09-localhost/types/client_state_test.go index f56cec5d7a..a4443867d7 100644 --- a/x/ibc/light-clients/09-localhost/types/client_state_test.go +++ b/x/ibc/light-clients/09-localhost/types/client_state_test.go @@ -66,7 +66,7 @@ func (suite *LocalhostTestSuite) TestVerifyClientState() { clientState: clientState, malleate: func() { bz := clienttypes.MustMarshalClientState(suite.cdc, clientState) - suite.store.Set(host.KeyClientState(), bz) + suite.store.Set(host.ClientStateKey(), bz) }, counterparty: clientState, expPass: true, @@ -76,7 +76,7 @@ func (suite *LocalhostTestSuite) TestVerifyClientState() { clientState: clientState, malleate: func() { bz := clienttypes.MustMarshalClientState(suite.cdc, clientState) - suite.store.Set(host.KeyClientState(), bz) + suite.store.Set(host.ClientStateKey(), bz) }, counterparty: invalidClient, expPass: false, @@ -161,7 +161,7 @@ func (suite *LocalhostTestSuite) TestVerifyConnectionState() { malleate: func() { bz, err := suite.cdc.MarshalBinaryBare(&conn1) suite.Require().NoError(err) - suite.store.Set(host.KeyConnection(testConnectionID), bz) + suite.store.Set(host.ConnectionKey(testConnectionID), bz) }, connection: conn1, expPass: true, @@ -177,7 +177,7 @@ func (suite *LocalhostTestSuite) TestVerifyConnectionState() { name: "proof verification failed: unmarshal error", clientState: types.NewClientState("chainID", clientHeight), malleate: func() { - suite.store.Set(host.KeyConnection(testConnectionID), []byte("connection")) + suite.store.Set(host.ConnectionKey(testConnectionID), []byte("connection")) }, connection: conn1, expPass: false, @@ -188,7 +188,7 @@ func (suite *LocalhostTestSuite) TestVerifyConnectionState() { malleate: func() { bz, err := suite.cdc.MarshalBinaryBare(&conn2) suite.Require().NoError(err) - suite.store.Set(host.KeyConnection(testConnectionID), bz) + suite.store.Set(host.ConnectionKey(testConnectionID), bz) }, connection: conn1, expPass: false, @@ -233,7 +233,7 @@ func (suite *LocalhostTestSuite) TestVerifyChannelState() { malleate: func() { bz, err := suite.cdc.MarshalBinaryBare(&ch1) suite.Require().NoError(err) - suite.store.Set(host.KeyChannel(testPortID, testChannelID), bz) + suite.store.Set(host.ChannelKey(testPortID, testChannelID), bz) }, channel: ch1, expPass: true, @@ -249,7 +249,7 @@ func (suite *LocalhostTestSuite) TestVerifyChannelState() { name: "proof verification failed: unmarshal failed", clientState: types.NewClientState("chainID", clientHeight), malleate: func() { - suite.store.Set(host.KeyChannel(testPortID, testChannelID), []byte("channel")) + suite.store.Set(host.ChannelKey(testPortID, testChannelID), []byte("channel")) }, channel: ch1, @@ -261,7 +261,7 @@ func (suite *LocalhostTestSuite) TestVerifyChannelState() { malleate: func() { bz, err := suite.cdc.MarshalBinaryBare(&ch2) suite.Require().NoError(err) - suite.store.Set(host.KeyChannel(testPortID, testChannelID), bz) + suite.store.Set(host.ChannelKey(testPortID, testChannelID), bz) }, channel: ch1, @@ -302,7 +302,7 @@ func (suite *LocalhostTestSuite) TestVerifyPacketCommitment() { clientState: types.NewClientState("chainID", clientHeight), malleate: func() { suite.store.Set( - host.KeyPacketCommitment(testPortID, testChannelID, testSequence), []byte("commitment"), + host.PacketCommitmentKey(testPortID, testChannelID, testSequence), []byte("commitment"), ) }, commitment: []byte("commitment"), @@ -313,7 +313,7 @@ func (suite *LocalhostTestSuite) TestVerifyPacketCommitment() { clientState: types.NewClientState("chainID", clientHeight), malleate: func() { suite.store.Set( - host.KeyPacketCommitment(testPortID, testChannelID, testSequence), []byte("different"), + host.PacketCommitmentKey(testPortID, testChannelID, testSequence), []byte("different"), ) }, commitment: []byte("commitment"), @@ -361,7 +361,7 @@ func (suite *LocalhostTestSuite) TestVerifyPacketAcknowledgement() { clientState: types.NewClientState("chainID", clientHeight), malleate: func() { suite.store.Set( - host.KeyPacketAcknowledgement(testPortID, testChannelID, testSequence), []byte("acknowledgement"), + host.PacketAcknowledgementKey(testPortID, testChannelID, testSequence), []byte("acknowledgement"), ) }, ack: []byte("acknowledgement"), @@ -372,7 +372,7 @@ func (suite *LocalhostTestSuite) TestVerifyPacketAcknowledgement() { clientState: types.NewClientState("chainID", clientHeight), malleate: func() { suite.store.Set( - host.KeyPacketAcknowledgement(testPortID, testChannelID, testSequence), []byte("different"), + host.PacketAcknowledgementKey(testPortID, testChannelID, testSequence), []byte("different"), ) }, ack: []byte("acknowledgement"), @@ -416,7 +416,7 @@ func (suite *LocalhostTestSuite) TestVerifyPacketReceiptAbsence() { suite.Require().NoError(err, "receipt absence failed") - suite.store.Set(host.KeyPacketReceipt(testPortID, testChannelID, testSequence), []byte("receipt")) + suite.store.Set(host.PacketReceiptKey(testPortID, testChannelID, testSequence), []byte("receipt")) err = clientState.VerifyPacketReceiptAbsence( suite.store, suite.cdc, clientHeight, nil, nil, testPortID, testChannelID, testSequence, @@ -439,7 +439,7 @@ func (suite *LocalhostTestSuite) TestVerifyNextSeqRecv() { clientState: types.NewClientState("chainID", clientHeight), malleate: func() { suite.store.Set( - host.KeyNextSequenceRecv(testPortID, testChannelID), + host.NextSequenceRecvKey(testPortID, testChannelID), sdk.Uint64ToBigEndian(nextSeqRecv), ) }, @@ -451,7 +451,7 @@ func (suite *LocalhostTestSuite) TestVerifyNextSeqRecv() { clientState: types.NewClientState("chainID", clientHeight), malleate: func() { suite.store.Set( - host.KeyNextSequenceRecv(testPortID, testChannelID), + host.NextSequenceRecvKey(testPortID, testChannelID), sdk.Uint64ToBigEndian(3), ) }, diff --git a/x/ibc/testing/chain.go b/x/ibc/testing/chain.go index f43c4d2676..5886695efd 100644 --- a/x/ibc/testing/chain.go +++ b/x/ibc/testing/chain.go @@ -242,7 +242,7 @@ func (chain *TestChain) QueryClientStateProof(clientID string) (exported.ClientS clientState, found := chain.App.IBCKeeper.ClientKeeper.GetClientState(chain.GetContext(), clientID) require.True(chain.t, found) - clientKey := host.FullKeyClientPath(clientID, host.KeyClientState()) + clientKey := host.FullClientStateKey(clientID) proofClient, _ := chain.QueryProof(clientKey) return clientState, proofClient @@ -254,7 +254,7 @@ func (chain *TestChain) QueryConsensusStateProof(clientID string) ([]byte, clien clientState := chain.GetClientState(clientID) consensusHeight := clientState.GetLatestHeight().(clienttypes.Height) - consensusKey := host.FullKeyClientPath(clientID, host.KeyConsensusState(consensusHeight)) + consensusKey := host.FullConsensusStateKey(clientID, consensusHeight) proofConsensus, _ := chain.QueryProof(consensusKey) return proofConsensus, consensusHeight @@ -645,7 +645,7 @@ func (chain *TestChain) ConnectionOpenTry( ) error { counterpartyClient, proofClient := counterparty.QueryClientStateProof(counterpartyConnection.ClientID) - connectionKey := host.KeyConnection(counterpartyConnection.ID) + connectionKey := host.ConnectionKey(counterpartyConnection.ID) proofInit, proofHeight := counterparty.QueryProof(connectionKey) proofConsensus, consensusHeight := counterparty.QueryConsensusStateProof(counterpartyConnection.ClientID) @@ -668,7 +668,7 @@ func (chain *TestChain) ConnectionOpenAck( ) error { counterpartyClient, proofClient := counterparty.QueryClientStateProof(counterpartyConnection.ClientID) - connectionKey := host.KeyConnection(counterpartyConnection.ID) + connectionKey := host.ConnectionKey(counterpartyConnection.ID) proofTry, proofHeight := counterparty.QueryProof(connectionKey) proofConsensus, consensusHeight := counterparty.QueryConsensusStateProof(counterpartyConnection.ClientID) @@ -688,7 +688,7 @@ func (chain *TestChain) ConnectionOpenConfirm( counterparty *TestChain, connection, counterpartyConnection *TestConnection, ) error { - connectionKey := host.KeyConnection(counterpartyConnection.ID) + connectionKey := host.ConnectionKey(counterpartyConnection.ID) proof, height := counterparty.QueryProof(connectionKey) msg := connectiontypes.NewMsgConnectionOpenConfirm( @@ -788,7 +788,7 @@ func (chain *TestChain) ChanOpenTry( order channeltypes.Order, connectionID string, ) error { - proof, height := counterparty.QueryProof(host.KeyChannel(counterpartyCh.PortID, counterpartyCh.ID)) + proof, height := counterparty.QueryProof(host.ChannelKey(counterpartyCh.PortID, counterpartyCh.ID)) msg := channeltypes.NewMsgChannelOpenTry( ch.PortID, ch.ID, ch.ID, // testing doesn't use flexible selection @@ -806,7 +806,7 @@ func (chain *TestChain) ChanOpenAck( counterparty *TestChain, ch, counterpartyCh TestChannel, ) error { - proof, height := counterparty.QueryProof(host.KeyChannel(counterpartyCh.PortID, counterpartyCh.ID)) + proof, height := counterparty.QueryProof(host.ChannelKey(counterpartyCh.PortID, counterpartyCh.ID)) msg := channeltypes.NewMsgChannelOpenAck( ch.PortID, ch.ID, @@ -822,7 +822,7 @@ func (chain *TestChain) ChanOpenConfirm( counterparty *TestChain, ch, counterpartyCh TestChannel, ) error { - proof, height := counterparty.QueryProof(host.KeyChannel(counterpartyCh.PortID, counterpartyCh.ID)) + proof, height := counterparty.QueryProof(host.ChannelKey(counterpartyCh.PortID, counterpartyCh.ID)) msg := channeltypes.NewMsgChannelOpenConfirm( ch.PortID, ch.ID, diff --git a/x/ibc/testing/coordinator.go b/x/ibc/testing/coordinator.go index 7ead436abe..ce5c8607f5 100644 --- a/x/ibc/testing/coordinator.go +++ b/x/ibc/testing/coordinator.go @@ -238,7 +238,7 @@ func (coord *Coordinator) RecvPacket( packet channeltypes.Packet, ) error { // get proof of packet commitment on source - packetKey := host.KeyPacketCommitment(packet.GetSourcePort(), packet.GetSourceChannel(), packet.GetSequence()) + packetKey := host.PacketCommitmentKey(packet.GetSourcePort(), packet.GetSourceChannel(), packet.GetSequence()) proof, proofHeight := source.QueryProof(packetKey) recvMsg := channeltypes.NewMsgRecvPacket(packet, proof, proofHeight, counterparty.SenderAccount.GetAddress()) @@ -277,7 +277,7 @@ func (coord *Coordinator) AcknowledgePacket( packet channeltypes.Packet, ack []byte, ) error { // get proof of acknowledgement on counterparty - packetKey := host.KeyPacketAcknowledgement(packet.GetDestPort(), packet.GetDestChannel(), packet.GetSequence()) + packetKey := host.PacketAcknowledgementKey(packet.GetDestPort(), packet.GetDestChannel(), packet.GetSequence()) proof, proofHeight := counterparty.QueryProof(packetKey) ackMsg := channeltypes.NewMsgAcknowledgement(packet, ack, proof, proofHeight, source.SenderAccount.GetAddress()) diff --git a/x/ibc/testing/solomachine.go b/x/ibc/testing/solomachine.go index 0d3b35811e..03fe887b85 100644 --- a/x/ibc/testing/solomachine.go +++ b/x/ibc/testing/solomachine.go @@ -251,8 +251,7 @@ func (solo *Solomachine) GenerateSignature(signBytes []byte) []byte { // GetClientStatePath returns the commitment path for the client state. func (solo *Solomachine) GetClientStatePath(counterpartyClientIdentifier string) commitmenttypes.MerklePath { - clientPrefixedPath := commitmenttypes.NewMerklePath("clients/" + counterpartyClientIdentifier + "/" + host.ClientStatePath()) - path, err := commitmenttypes.ApplyPrefix(prefix, clientPrefixedPath) + path, err := commitmenttypes.ApplyPrefix(prefix, commitmenttypes.NewMerklePath(host.FullClientStatePath(counterpartyClientIdentifier))) require.NoError(solo.t, err) return path @@ -260,8 +259,7 @@ func (solo *Solomachine) GetClientStatePath(counterpartyClientIdentifier string) // GetConsensusStatePath returns the commitment path for the consensus state. func (solo *Solomachine) GetConsensusStatePath(counterpartyClientIdentifier string, consensusHeight exported.Height) commitmenttypes.MerklePath { - clientPrefixedPath := commitmenttypes.NewMerklePath("clients/" + counterpartyClientIdentifier + "/" + host.ConsensusStatePath(consensusHeight)) - path, err := commitmenttypes.ApplyPrefix(prefix, clientPrefixedPath) + path, err := commitmenttypes.ApplyPrefix(prefix, commitmenttypes.NewMerklePath(host.FullConsensusStatePath(counterpartyClientIdentifier, consensusHeight))) require.NoError(solo.t, err) return path From bcdd6ee15c08a742c346a6cf7e8fc80ae17c75b0 Mon Sep 17 00:00:00 2001 From: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Date: Tue, 10 Nov 2020 18:50:53 +0100 Subject: [PATCH 074/136] ibc: fix grpc gateway routes (#7881) --- client/docs/swagger-ui/swagger.yaml | 50 ++--- .../ibc/applications/transfer/v1/query.proto | 6 +- proto/ibc/core/channel/v1/query.proto | 26 +-- proto/ibc/core/client/v1/query.proto | 8 +- proto/ibc/core/connection/v1/query.proto | 10 +- x/ibc/applications/transfer/types/query.pb.go | 69 ++++--- .../transfer/types/query.pb.gw.go | 6 +- x/ibc/core/02-client/types/query.pb.go | 96 ++++----- x/ibc/core/02-client/types/query.pb.gw.go | 8 +- x/ibc/core/03-connection/types/query.pb.go | 114 +++++------ x/ibc/core/03-connection/types/query.pb.gw.go | 10 +- x/ibc/core/04-channel/types/query.pb.go | 188 +++++++++--------- x/ibc/core/04-channel/types/query.pb.gw.go | 26 +-- .../core/23-commitment/types/commitment.pb.go | 2 + 14 files changed, 310 insertions(+), 309 deletions(-) diff --git a/client/docs/swagger-ui/swagger.yaml b/client/docs/swagger-ui/swagger.yaml index 06500d7545..f8a2cccb94 100644 --- a/client/docs/swagger-ui/swagger.yaml +++ b/client/docs/swagger-ui/swagger.yaml @@ -15760,7 +15760,7 @@ paths: } tags: - Query - /ibc/channel/v1beta1/channels: + /ibc/core/channel/v1beta1/channels: get: summary: Channels queries all the IBC channels of a chain. operationId: Channels @@ -16146,7 +16146,7 @@ paths: type: boolean tags: - Query - '/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}': + '/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}': get: summary: Channel queries an IBC Channel. operationId: Channel @@ -16471,7 +16471,7 @@ paths: type: string tags: - Query - '/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/client_state': + '/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/client_state': get: summary: >- ChannelClientState queries for the client state for the channel @@ -16909,7 +16909,7 @@ paths: type: string tags: - Query - '/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/consensus_state/version/{version_number}/height/{version_height}': + '/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/consensus_state/version/{version_number}/height/{version_height}': get: summary: |- ChannelConsensusState queries for the consensus state for the channel @@ -17344,7 +17344,7 @@ paths: format: uint64 tags: - Query - '/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/next_sequence': + '/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/next_sequence': get: summary: >- NextSequenceReceive returns the next receive sequence for a given @@ -17596,7 +17596,7 @@ paths: type: string tags: - Query - '/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_acknowledgements': + '/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_acknowledgements': get: summary: >- PacketAcknowledgements returns all the packet acknowledgements @@ -17945,7 +17945,7 @@ paths: type: boolean tags: - Query - '/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_acks/{sequence}': + '/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_acks/{sequence}': get: summary: PacketAcknowledgement queries a stored packet acknowledgement hash. operationId: PacketAcknowledgement @@ -18205,7 +18205,7 @@ paths: format: uint64 tags: - Query - '/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_commitments': + '/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_commitments': get: summary: |- PacketCommitments returns all the packet commitments hashes associated @@ -18552,7 +18552,7 @@ paths: type: boolean tags: - Query - '/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_commitments/{packet_ack_sequences}/unreceived_acks': + '/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_commitments/{packet_ack_sequences}/unreceived_acks': get: summary: >- UnreceivedAcks returns all the unreceived IBC acknowledgements @@ -18814,7 +18814,7 @@ paths: minItems: 1 tags: - Query - '/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_commitments/{packet_commitment_sequences}/unreceived_packets': + '/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_commitments/{packet_commitment_sequences}/unreceived_packets': get: summary: >- UnreceivedPackets returns all the unreceived IBC packets associated with @@ -19076,7 +19076,7 @@ paths: minItems: 1 tags: - Query - '/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_commitments/{sequence}': + '/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_commitments/{sequence}': get: summary: PacketCommitment queries a stored packet commitment hash. operationId: PacketCommitment @@ -19337,7 +19337,7 @@ paths: format: uint64 tags: - Query - '/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_receipts/{sequence}': + '/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_receipts/{sequence}': get: summary: >- PacketReceipt queries if a given packet sequence has been received on @@ -19599,7 +19599,7 @@ paths: format: uint64 tags: - Query - '/ibc/channel/v1beta1/connections/{connection}/channels': + '/ibc/core/channel/v1beta1/connections/{connection}/channels': get: summary: |- ConnectionChannels queries all the channels associated with a connection @@ -19992,7 +19992,7 @@ paths: type: boolean tags: - Query - /ibc/client/v1beta1/client_states: + /ibc/core/client/v1beta1/client_states: get: summary: ClientStates queries all the IBC light clients of a chain. operationId: ClientStates @@ -20465,7 +20465,7 @@ paths: type: boolean tags: - Query - '/ibc/client/v1beta1/client_states/{client_id}': + '/ibc/core/client/v1beta1/client_states/{client_id}': get: summary: ClientState queries an IBC light client. operationId: ClientState @@ -20883,7 +20883,7 @@ paths: type: string tags: - Query - '/ibc/client/v1beta1/consensus_states/{client_id}': + '/ibc/core/client/v1beta1/consensus_states/{client_id}': get: summary: |- ConsensusStates queries all the consensus state associated with a given @@ -21383,7 +21383,7 @@ paths: type: boolean tags: - Query - '/ibc/client/v1beta1/consensus_states/{client_id}/version/{version_number}/height/{version_height}': + '/ibc/core/client/v1beta1/consensus_states/{client_id}/version/{version_number}/height/{version_height}': get: summary: >- ConsensusState queries a consensus state associated with a client state @@ -21825,7 +21825,7 @@ paths: type: boolean tags: - Query - '/ibc/connection/v1beta1/client_connections/{client_id}': + '/ibc/core/connection/v1beta1/client_connections/{client_id}': get: summary: |- ClientConnections queries the connection paths associated with a client @@ -22073,7 +22073,7 @@ paths: type: string tags: - Query - /ibc/connection/v1beta1/connections: + /ibc/core/connection/v1beta1/connections: get: summary: Connections queries all the IBC connections of a chain. operationId: Connections @@ -22457,7 +22457,7 @@ paths: type: boolean tags: - Query - '/ibc/connection/v1beta1/connections/{connection_id}': + '/ibc/core/connection/v1beta1/connections/{connection_id}': get: summary: Connection queries an IBC connection end. operationId: Connection @@ -22777,7 +22777,7 @@ paths: type: string tags: - Query - '/ibc/connection/v1beta1/connections/{connection_id}/client_state': + '/ibc/core/connection/v1beta1/connections/{connection_id}/client_state': get: summary: |- ConnectionClientState queries the client state associated with the @@ -23208,7 +23208,7 @@ paths: type: string tags: - Query - '/ibc/connection/v1beta1/connections/{connection_id}/consensus_state/version/{version_number}/height/{version_height}': + '/ibc/core/connection/v1beta1/connections/{connection_id}/consensus_state/version/{version_number}/height/{version_height}': get: summary: |- ConnectionConsensusState queries the consensus state associated with the @@ -23636,7 +23636,7 @@ paths: format: uint64 tags: - Query - /ibc_transfer/v1beta1/denom_traces: + /ibc/applications/transfer/v1beta1/denom_traces: get: summary: DenomTraces queries all denomination traces. operationId: DenomTraces @@ -23761,7 +23761,7 @@ paths: type: boolean tags: - Query - '/ibc_transfer/v1beta1/denom_traces/{hash}': + '/ibc/applications/transfer/v1beta1/denom_traces/{hash}': get: summary: DenomTrace queries a denomination trace information. operationId: DenomTrace @@ -23822,7 +23822,7 @@ paths: type: string tags: - Query - /ibc_transfer/v1beta1/params: + /ibc/applications/transfer/v1beta1/params: get: summary: Params queries all parameters of the ibc-transfer module. operationId: IBCTransferParams diff --git a/proto/ibc/applications/transfer/v1/query.proto b/proto/ibc/applications/transfer/v1/query.proto index 98dd02f759..e9cbd02a31 100644 --- a/proto/ibc/applications/transfer/v1/query.proto +++ b/proto/ibc/applications/transfer/v1/query.proto @@ -12,17 +12,17 @@ option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/applications/transfer/ty service Query { // DenomTrace queries a denomination trace information. rpc DenomTrace(QueryDenomTraceRequest) returns (QueryDenomTraceResponse) { - option (google.api.http).get = "/ibc_transfer/v1beta1/denom_traces/{hash}"; + option (google.api.http).get = "/ibc/applications/transfer/v1beta1/denom_traces/{hash}"; } // DenomTraces queries all denomination traces. rpc DenomTraces(QueryDenomTracesRequest) returns (QueryDenomTracesResponse) { - option (google.api.http).get = "/ibc_transfer/v1beta1/denom_traces"; + option (google.api.http).get = "/ibc/applications/transfer/v1beta1/denom_traces"; } // Params queries all parameters of the ibc-transfer module. rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { - option (google.api.http).get = "/ibc_transfer/v1beta1/params"; + option (google.api.http).get = "/ibc/applications/transfer/v1beta1/params"; } } diff --git a/proto/ibc/core/channel/v1/query.proto b/proto/ibc/core/channel/v1/query.proto index dcff04f7f4..90d2adaea2 100644 --- a/proto/ibc/core/channel/v1/query.proto +++ b/proto/ibc/core/channel/v1/query.proto @@ -14,79 +14,79 @@ option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/core/04-channel/types"; service Query { // Channel queries an IBC Channel. rpc Channel(QueryChannelRequest) returns (QueryChannelResponse) { - option (google.api.http).get = "/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}"; + option (google.api.http).get = "/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}"; } // Channels queries all the IBC channels of a chain. rpc Channels(QueryChannelsRequest) returns (QueryChannelsResponse) { - option (google.api.http).get = "/ibc/channel/v1beta1/channels"; + option (google.api.http).get = "/ibc/core/channel/v1beta1/channels"; } // ConnectionChannels queries all the channels associated with a connection // end. rpc ConnectionChannels(QueryConnectionChannelsRequest) returns (QueryConnectionChannelsResponse) { - option (google.api.http).get = "/ibc/channel/v1beta1/connections/{connection}/channels"; + option (google.api.http).get = "/ibc/core/channel/v1beta1/connections/{connection}/channels"; } // ChannelClientState queries for the client state for the channel associated // with the provided channel identifiers. rpc ChannelClientState(QueryChannelClientStateRequest) returns (QueryChannelClientStateResponse) { - option (google.api.http).get = "/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/client_state"; + option (google.api.http).get = "/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/client_state"; } // ChannelConsensusState queries for the consensus state for the channel // associated with the provided channel identifiers. rpc ChannelConsensusState(QueryChannelConsensusStateRequest) returns (QueryChannelConsensusStateResponse) { - option (google.api.http).get = "/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/consensus_state/version/" + option (google.api.http).get = "/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/consensus_state/version/" "{version_number}/height/{version_height}"; } // PacketCommitment queries a stored packet commitment hash. rpc PacketCommitment(QueryPacketCommitmentRequest) returns (QueryPacketCommitmentResponse) { option (google.api.http).get = - "/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_commitments/{sequence}"; + "/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_commitments/{sequence}"; } // PacketCommitments returns all the packet commitments hashes associated // with a channel. rpc PacketCommitments(QueryPacketCommitmentsRequest) returns (QueryPacketCommitmentsResponse) { - option (google.api.http).get = "/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_commitments"; + option (google.api.http).get = "/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_commitments"; } // PacketReceipt queries if a given packet sequence has been received on the queried chain rpc PacketReceipt(QueryPacketReceiptRequest) returns (QueryPacketReceiptResponse) { - option (google.api.http).get = "/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_receipts/{sequence}"; + option (google.api.http).get = "/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_receipts/{sequence}"; } // PacketAcknowledgement queries a stored packet acknowledgement hash. rpc PacketAcknowledgement(QueryPacketAcknowledgementRequest) returns (QueryPacketAcknowledgementResponse) { - option (google.api.http).get = "/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_acks/{sequence}"; + option (google.api.http).get = "/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_acks/{sequence}"; } // PacketAcknowledgements returns all the packet acknowledgements associated // with a channel. rpc PacketAcknowledgements(QueryPacketAcknowledgementsRequest) returns (QueryPacketAcknowledgementsResponse) { - option (google.api.http).get = "/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_acknowledgements"; + option (google.api.http).get = "/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_acknowledgements"; } // UnreceivedPackets returns all the unreceived IBC packets associated with a // channel and sequences. rpc UnreceivedPackets(QueryUnreceivedPacketsRequest) returns (QueryUnreceivedPacketsResponse) { - option (google.api.http).get = "/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_commitments/" + option (google.api.http).get = "/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_commitments/" "{packet_commitment_sequences}/unreceived_packets"; } // UnreceivedAcks returns all the unreceived IBC acknowledgements associated with a // channel and sequences. rpc UnreceivedAcks(QueryUnreceivedAcksRequest) returns (QueryUnreceivedAcksResponse) { - option (google.api.http).get = "/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_commitments/" + option (google.api.http).get = "/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_commitments/" "{packet_ack_sequences}/unreceived_acks"; } // NextSequenceReceive returns the next receive sequence for a given channel. rpc NextSequenceReceive(QueryNextSequenceReceiveRequest) returns (QueryNextSequenceReceiveResponse) { - option (google.api.http).get = "/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/next_sequence"; + option (google.api.http).get = "/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/next_sequence"; } } diff --git a/proto/ibc/core/client/v1/query.proto b/proto/ibc/core/client/v1/query.proto index a40fed843e..db580a260c 100644 --- a/proto/ibc/core/client/v1/query.proto +++ b/proto/ibc/core/client/v1/query.proto @@ -13,25 +13,25 @@ option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/core/02-client/types"; service Query { // ClientState queries an IBC light client. rpc ClientState(QueryClientStateRequest) returns (QueryClientStateResponse) { - option (google.api.http).get = "/ibc/client/v1beta1/client_states/{client_id}"; + option (google.api.http).get = "/ibc/core/client/v1beta1/client_states/{client_id}"; } // ClientStates queries all the IBC light clients of a chain. rpc ClientStates(QueryClientStatesRequest) returns (QueryClientStatesResponse) { - option (google.api.http).get = "/ibc/client/v1beta1/client_states"; + option (google.api.http).get = "/ibc/core/client/v1beta1/client_states"; } // ConsensusState queries a consensus state associated with a client state at // a given height. rpc ConsensusState(QueryConsensusStateRequest) returns (QueryConsensusStateResponse) { - option (google.api.http).get = "/ibc/client/v1beta1/consensus_states/{client_id}/version/{version_number}/" + option (google.api.http).get = "/ibc/core/client/v1beta1/consensus_states/{client_id}/version/{version_number}/" "height/{version_height}"; } // ConsensusStates queries all the consensus state associated with a given // client. rpc ConsensusStates(QueryConsensusStatesRequest) returns (QueryConsensusStatesResponse) { - option (google.api.http).get = "/ibc/client/v1beta1/consensus_states/{client_id}"; + option (google.api.http).get = "/ibc/core/client/v1beta1/consensus_states/{client_id}"; } } diff --git a/proto/ibc/core/connection/v1/query.proto b/proto/ibc/core/connection/v1/query.proto index c2666ee28a..9e5b068804 100644 --- a/proto/ibc/core/connection/v1/query.proto +++ b/proto/ibc/core/connection/v1/query.proto @@ -14,30 +14,30 @@ option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/core/03-connection/types service Query { // Connection queries an IBC connection end. rpc Connection(QueryConnectionRequest) returns (QueryConnectionResponse) { - option (google.api.http).get = "/ibc/connection/v1beta1/connections/{connection_id}"; + option (google.api.http).get = "/ibc/core/connection/v1beta1/connections/{connection_id}"; } // Connections queries all the IBC connections of a chain. rpc Connections(QueryConnectionsRequest) returns (QueryConnectionsResponse) { - option (google.api.http).get = "/ibc/connection/v1beta1/connections"; + option (google.api.http).get = "/ibc/core/connection/v1beta1/connections"; } // ClientConnections queries the connection paths associated with a client // state. rpc ClientConnections(QueryClientConnectionsRequest) returns (QueryClientConnectionsResponse) { - option (google.api.http).get = "/ibc/connection/v1beta1/client_connections/{client_id}"; + option (google.api.http).get = "/ibc/core/connection/v1beta1/client_connections/{client_id}"; } // ConnectionClientState queries the client state associated with the // connection. rpc ConnectionClientState(QueryConnectionClientStateRequest) returns (QueryConnectionClientStateResponse) { - option (google.api.http).get = "/ibc/connection/v1beta1/connections/{connection_id}/client_state"; + option (google.api.http).get = "/ibc/core/connection/v1beta1/connections/{connection_id}/client_state"; } // ConnectionConsensusState queries the consensus state associated with the // connection. rpc ConnectionConsensusState(QueryConnectionConsensusStateRequest) returns (QueryConnectionConsensusStateResponse) { - option (google.api.http).get = "/ibc/connection/v1beta1/connections/{connection_id}/consensus_state/" + option (google.api.http).get = "/ibc/core/connection/v1beta1/connections/{connection_id}/consensus_state/" "version/{version_number}/height/{version_height}"; } } diff --git a/x/ibc/applications/transfer/types/query.pb.go b/x/ibc/applications/transfer/types/query.pb.go index 27e1556325..ee069d3501 100644 --- a/x/ibc/applications/transfer/types/query.pb.go +++ b/x/ibc/applications/transfer/types/query.pb.go @@ -324,41 +324,40 @@ func init() { } var fileDescriptor_a638e2800a01538c = []byte{ - // 532 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0x4f, 0x6f, 0xd3, 0x30, - 0x14, 0xaf, 0x37, 0xa8, 0xc4, 0x2b, 0xe2, 0x60, 0x26, 0xa8, 0xa2, 0x2a, 0x9b, 0xa2, 0x0a, 0xca, - 0x06, 0x36, 0x19, 0x7f, 0x4e, 0x88, 0xc3, 0x84, 0x40, 0xdc, 0x46, 0xe1, 0x80, 0xe0, 0x30, 0x39, - 0xa9, 0x49, 0x23, 0xd6, 0x38, 0x8b, 0xdd, 0x8a, 0x09, 0x71, 0xe1, 0x13, 0x20, 0xed, 0x4b, 0x20, - 0xc4, 0x87, 0xe0, 0xb8, 0xe3, 0x24, 0x2e, 0x9c, 0x00, 0xb5, 0x7c, 0x07, 0xae, 0x28, 0xb6, 0xb3, - 0xa6, 0xea, 0xe8, 0x96, 0x53, 0xad, 0xd7, 0xf7, 0x7b, 0xbf, 0x3f, 0xcf, 0x31, 0x74, 0xe2, 0x20, - 0xa4, 0x2c, 0x4d, 0x77, 0xe3, 0x90, 0xa9, 0x58, 0x24, 0x92, 0xaa, 0x8c, 0x25, 0xf2, 0x0d, 0xcf, - 0xe8, 0xc8, 0xa7, 0x7b, 0x43, 0x9e, 0xed, 0x93, 0x34, 0x13, 0x4a, 0xe0, 0x56, 0x1c, 0x84, 0xa4, - 0xdc, 0x49, 0x8a, 0x4e, 0x32, 0xf2, 0x9d, 0x95, 0x48, 0x44, 0x42, 0x37, 0xd2, 0xfc, 0x64, 0x30, - 0xce, 0x7a, 0x28, 0xe4, 0x40, 0x48, 0x1a, 0x30, 0xc9, 0xcd, 0x30, 0x3a, 0xf2, 0x03, 0xae, 0x98, - 0x4f, 0x53, 0x16, 0xc5, 0x89, 0x1e, 0x64, 0x7b, 0x37, 0x16, 0x2a, 0x39, 0xe6, 0x32, 0x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e, 0x6c, 0xc6, 0xa2, 0x2d, 0x66, 0xf3, 0xef, 0x32, 0x9c, 0xd7, - 0x53, 0xf1, 0x57, 0x04, 0x30, 0x75, 0x8a, 0xef, 0x2e, 0x1e, 0x73, 0xf2, 0xcd, 0x72, 0xee, 0x55, - 0x44, 0x19, 0x0f, 0x9e, 0xff, 0xf1, 0xfb, 0x9f, 0x83, 0xa5, 0x0d, 0x7c, 0x83, 0xc6, 0x41, 0xb8, - 0x53, 0xba, 0xf1, 0xe6, 0x2b, 0x29, 0xaf, 0x8c, 0xbe, 0xcf, 0xaf, 0xeb, 0x07, 0xfc, 0x19, 0x41, - 0xa3, 0xb4, 0x61, 0x5c, 0x8d, 0xb9, 0x08, 0xd5, 0xb9, 0x5f, 0x15, 0x66, 0x15, 0xaf, 0x6b, 0xc5, - 0x6d, 0xec, 0x9d, 0xae, 0x18, 0x1f, 0x20, 0xa8, 0x9b, 0xd8, 0xf1, 0xed, 0x33, 0xd0, 0xcd, 0x6c, - 0xdd, 0xf1, 0x2b, 0x20, 0xac, 0xb6, 0xb6, 0xd6, 0xe6, 0xe2, 0xd6, 0xc9, 0xda, 0xcc, 0xe6, 0xb7, - 0x5e, 0x1e, 0x8e, 0x5d, 0x74, 0x34, 0x76, 0xd1, 0xef, 0xb1, 0x8b, 0x3e, 0x4d, 0xdc, 0xda, 0xd1, - 0xc4, 0xad, 0xfd, 0x98, 0xb8, 0xb5, 0x57, 0x0f, 0xa3, 0x58, 0xf5, 0x87, 0x01, 0x09, 0xc5, 0x80, - 0xda, 0xa7, 0xcb, 0xfc, 0xdc, 0x92, 0xbd, 0xb7, 0xf4, 0x1d, 0xfd, 0xff, 0x13, 0xa5, 0xf6, 0x53, - 0x2e, 0x83, 0xba, 0x7e, 0x7f, 0xee, 0xfc, 0x0b, 0x00, 0x00, 0xff, 0xff, 0x19, 0x46, 0xdf, 0x94, - 0x56, 0x05, 0x00, 0x00, + // 528 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0x3f, 0x6f, 0xd3, 0x40, + 0x14, 0xcf, 0x95, 0x12, 0x89, 0x17, 0xc4, 0x70, 0x54, 0x10, 0x59, 0x95, 0x5b, 0x59, 0x08, 0x02, + 0x85, 0x3b, 0x5c, 0xa0, 0x30, 0xa0, 0x0e, 0x15, 0x02, 0xb1, 0x95, 0xc0, 0x80, 0x60, 0x40, 0x67, + 0xe7, 0x70, 0x2c, 0x1a, 0x9f, 0xeb, 0xbb, 0x44, 0x54, 0x88, 0x85, 0x4f, 0x80, 0xc4, 0x8e, 0x98, + 0xd9, 0x19, 0xd8, 0x18, 0x3b, 0x56, 0x62, 0x61, 0x02, 0x94, 0xf0, 0x41, 0x90, 0xef, 0xce, 0x8d, + 0xa3, 0x20, 0x13, 0x4f, 0x39, 0x5d, 0xde, 0xef, 0xfd, 0xfe, 0xbc, 0xe7, 0x83, 0x4e, 0x1c, 0x84, + 0x94, 0xa5, 0xe9, 0x5e, 0x1c, 0x32, 0x15, 0x8b, 0x44, 0x52, 0x95, 0xb1, 0x44, 0xbe, 0xe4, 0x19, + 0x1d, 0xf9, 0x74, 0x7f, 0xc8, 0xb3, 0x03, 0x92, 0x66, 0x42, 0x09, 0xbc, 0x1a, 0x07, 0x21, 0x29, + 0x57, 0x92, 0xa2, 0x92, 0x8c, 0x7c, 0x67, 0x25, 0x12, 0x91, 0xd0, 0x85, 0x34, 0x3f, 0x19, 0x8c, + 0x73, 0x25, 0x14, 0x72, 0x20, 0x24, 0x0d, 0x98, 0xe4, 0xa6, 0x19, 0x1d, 0xf9, 0x01, 0x57, 0xcc, + 0xa7, 0x29, 0x8b, 0xe2, 0x44, 0x37, 0xb2, 0xb5, 0x1b, 0x95, 0x4a, 0x8e, 0xb9, 0x4c, 0xf1, 0x6a, + 0x24, 0x44, 0xb4, 0xc7, 0x29, 0x4b, 0x63, 0xca, 0x92, 0x44, 0x28, 0x2b, 0x49, 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a, 0x00, 0xa6, 0x4e, 0xf1, 0xcd, 0xea, 0x36, 0xff, 0xde, 0x2c, 0xe7, 0x56, + 0x4d, 0x94, 0xf1, 0xe0, 0x6d, 0xbf, 0xfb, 0xfe, 0xe7, 0xc3, 0xd2, 0x1d, 0xbc, 0x45, 0xab, 0xd6, + 0xdf, 0x7c, 0x32, 0xe5, 0xf9, 0xd1, 0x37, 0xf9, 0xee, 0xbe, 0xc5, 0x5f, 0x10, 0xb4, 0x4a, 0xe3, + 0xc6, 0xf5, 0x64, 0x14, 0x09, 0x3b, 0x5b, 0x75, 0x61, 0x56, 0xfe, 0x6d, 0x2d, 0xdf, 0xc7, 0xb4, + 0xa6, 0x7c, 0xfc, 0x09, 0x41, 0xd3, 0x0c, 0x04, 0x5f, 0x5f, 0x80, 0x7b, 0x66, 0x1f, 0x1c, 0xbf, + 0x06, 0xc2, 0x0a, 0xf5, 0xb5, 0xd0, 0x0d, 0x7c, 0x79, 0x01, 0xa1, 0x66, 0x41, 0x76, 0x9e, 0x1e, + 0x8e, 0x5d, 0x74, 0x34, 0x76, 0xd1, 0xef, 0xb1, 0x8b, 0xde, 0x4f, 0xdc, 0xc6, 0xd1, 0xc4, 0x6d, + 0xfc, 0x98, 0xb8, 0x8d, 0x67, 0xdb, 0x51, 0xac, 0xfa, 0xc3, 0x80, 0x84, 0x62, 0x40, 0xed, 0x0b, + 0x67, 0x7e, 0xae, 0xc9, 0xde, 0x2b, 0xfa, 0xba, 0x82, 0x42, 0x1d, 0xa4, 0x5c, 0x06, 0x4d, 0xfd, + 0x4c, 0xdd, 0xf8, 0x1b, 0x00, 0x00, 0xff, 0xff, 0xb2, 0x7f, 0xfe, 0xbd, 0x7d, 0x05, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/ibc/applications/transfer/types/query.pb.gw.go b/x/ibc/applications/transfer/types/query.pb.gw.go index 0e1dfd25ce..99a7f19063 100644 --- a/x/ibc/applications/transfer/types/query.pb.gw.go +++ b/x/ibc/applications/transfer/types/query.pb.gw.go @@ -310,11 +310,11 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } var ( - pattern_Query_DenomTrace_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"ibc_transfer", "v1beta1", "denom_traces", "hash"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_DenomTrace_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"ibc", "applications", "transfer", "v1beta1", "denom_traces", "hash"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Query_DenomTraces_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"ibc_transfer", "v1beta1", "denom_traces"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_DenomTraces_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"ibc", "applications", "transfer", "v1beta1", "denom_traces"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"ibc_transfer", "v1beta1", "params"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"ibc", "applications", "transfer", "v1beta1", "params"}, "", runtime.AssumeColonVerbOpt(true))) ) var ( diff --git a/x/ibc/core/02-client/types/query.pb.go b/x/ibc/core/02-client/types/query.pb.go index fb91ead13c..3e250c9ead 100644 --- a/x/ibc/core/02-client/types/query.pb.go +++ b/x/ibc/core/02-client/types/query.pb.go @@ -514,54 +514,54 @@ func init() { func init() { proto.RegisterFile("ibc/core/client/v1/query.proto", fileDescriptor_dc42cdfd1d52d76e) } var fileDescriptor_dc42cdfd1d52d76e = []byte{ - // 747 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0x4f, 0x4f, 0x13, 0x41, - 0x14, 0xef, 0xf0, 0xc7, 0xc0, 0xb4, 0x80, 0x99, 0x90, 0x58, 0x16, 0x52, 0x6a, 0x89, 0x5a, 0x94, - 0xce, 0xd0, 0x1a, 0xc5, 0x8b, 0x07, 0x21, 0x41, 0xb9, 0x10, 0x59, 0x0f, 0x26, 0x26, 0x86, 0xec, - 0x6e, 0x87, 0xed, 0x44, 0xd8, 0x29, 0x9d, 0x69, 0x23, 0x21, 0x5c, 0xf8, 0x04, 0x26, 0x26, 0x5e, - 0xfd, 0x02, 0x86, 0x93, 0x89, 0xdf, 0xc0, 0x70, 0x24, 0x7a, 0xf1, 0x60, 0x8c, 0x01, 0x3f, 0x88, - 0xe9, 0xcc, 0x2c, 0xdd, 0x85, 0x25, 0xac, 0x46, 0x4f, 0x3b, 0xf3, 0xfe, 0xfe, 0xde, 0xef, 0xbd, - 0x79, 0x59, 0x58, 0x60, 0xae, 0x47, 0x3c, 0xde, 0xa2, 0xc4, 0xdb, 0x64, 0x34, 0x90, 0xa4, 0x53, - 0x25, 0xdb, 0x6d, 0xda, 0xda, 0xc1, 0xcd, 0x16, 0x97, 0x1c, 0x21, 0xe6, 0x7a, 0xb8, 0xab, 0xc7, - 0x5a, 0x8f, 0x3b, 0x55, 0xeb, 0xb6, 0xc7, 0xc5, 0x16, 0x17, 0xc4, 0x75, 0x04, 0xd5, 0xc6, 0xa4, - 0x53, 0x75, 0xa9, 0x74, 0xaa, 0xa4, 0xe9, 0xf8, 0x2c, 0x70, 0x24, 0xe3, 0x81, 0xf6, 0xb7, 0xa6, - 0x13, 0xe2, 0x9b, 0x48, 0xda, 0x60, 0xc2, 0xe7, 0xdc, 0xdf, 0xa4, 0x44, 0xdd, 0xdc, 0xf6, 0x06,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x55, 0x38, 0x12, 0x65, 0x45, 0xe4, 0x41, 0xb1, 0xbf, - 0x9c, 0xad, 0xcd, 0x26, 0xd5, 0xb1, 0x52, 0xa7, 0x81, 0x64, 0x1b, 0x8c, 0xd6, 0xa3, 0xfc, 0xe6, - 0x22, 0x5c, 0x09, 0xf4, 0x38, 0x86, 0xba, 0x4f, 0xa1, 0xbe, 0x75, 0x29, 0x6a, 0x0d, 0x26, 0x06, - 0xfb, 0x03, 0x80, 0x96, 0x86, 0xdd, 0x55, 0x05, 0xa2, 0x2d, 0x52, 0xcf, 0x01, 0xba, 0x01, 0x47, - 0x3b, 0xb4, 0x25, 0x18, 0x0f, 0xd6, 0x83, 0xf6, 0x96, 0x4b, 0x5b, 0x0a, 0xc8, 0x80, 0x3d, 0x62, - 0xa4, 0xab, 0x4a, 0x18, 0x35, 0x8b, 0x34, 0xb1, 0x67, 0xa6, 0x9b, 0x84, 0x66, 0xe0, 0xc8, 0x66, - 0xb7, 0x36, 0x19, 0x5a, 0x0d, 0x14, 0x41, 0x79, 0xc8, 0xce, 0x69, 0xa1, 0xe9, 0xe4, 0x27, 0x00, - 0x27, 0x13, 0xe1, 0x1a, 0x9e, 0x1f, 0xc2, 0x31, 0x2f, 0xd4, 0xa4, 0x18, 0xc0, 0x51, 0x2f, 0x16, - 0xe6, 0x7f, 0xce, 0xe0, 0x7e, 0x32, 0x72, 0x91, 0x8a, 0xe9, 0xe5, 0x84, 0x76, 0xff, 0xcd, 0x90, - 0x7e, 0x06, 0x70, 0x2a, 0x19, 0x84, 0xe1, 0xef, 0x25, 0xbc, 0x7a, 0x86, 0xbf, 0x70, 0x54, 0xe7, - 0x92, 0xca, 0x8d, 0x87, 0x79, 0xce, 0x64, 0x23, 0x46, 0xc0, 0x58, 0x9c, 0xde, 0x7f, 0x37, 0xb6, - 0xb5, 0x2f, 0x83, 0x70, 0x50, 0x15, 0x82, 0xde, 0x03, 0x98, 0x8d, 0xbc, 0x13, 0x74, 0x27, 0x09, - 0xe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0xaf, 0xa8, 0x75, 0x77, 0xf7, 0x77, 0x00, 0x00, - 0x00, 0xff, 0xff, 0x09, 0x8e, 0x83, 0x3d, 0xbb, 0x08, 0x00, 0x00, + // 746 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0x4d, 0x6b, 0x13, 0x4f, + 0x18, 0xcf, 0xf4, 0xe5, 0x4f, 0x3b, 0x49, 0xdb, 0x3f, 0x43, 0xc1, 0x74, 0x5b, 0xb6, 0x21, 0x62, + 0x8d, 0xda, 0xce, 0x34, 0xf1, 0xa5, 0x20, 0xf4, 0x60, 0x0b, 0xd5, 0x5e, 0x8a, 0x5d, 0x0f, 0x82, + 0x20, 0x65, 0x77, 0x33, 0xd9, 0x2c, 0xb6, 0x3b, 0x69, 0x66, 0x12, 0x2c, 0xa5, 0x97, 0x7e, 0x02, + 0xc1, 0xa3, 0x57, 0x8f, 0xe2, 0x45, 0xc1, 0x6f, 0x20, 0x3d, 0x16, 0xbc, 0x78, 0x12, 0x6d, 0xc5, + 0xcf, 0x21, 0x3b, 0x33, 0xdb, 0xec, 0x36, 0x5b, 0x5c, 0x8a, 0x9e, 0xb2, 0xfb, 0xbc, 0xfe, 0x9e, + 0xdf, 0xef, 0xd9, 0x87, 0x40, 0xd3, 0x77, 0x5c, 0xe2, 0xb2, 0x36, 0x25, 0xee, 0xb6, 0x4f, 0x03, + 0x41, 0xba, 0x55, 0xb2, 0xdb, 0xa1, 0xed, 0x3d, 0xdc, 0x6a, 0x33, 0xc1, 0x10, 0xf2, 0x1d, 0x17, + 0x87, 0x7e, 0xac, 0xfc, 0xb8, 0x5b, 0x35, 0x6e, 0xba, 0x8c, 0xef, 0x30, 0x4e, 0x1c, 0x9b, 0x53, + 0x15, 0x4c, 0xba, 0x55, 0x87, 0x0a, 0xbb, 0x4a, 0x5a, 0xb6, 0xe7, 0x07, 0xb6, 0xf0, 0x59, 0xa0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0x67, 0x81, 0xd7, 0x5f, 0x90, 0x97, 0xbd, 0x76, 0x8b, 0xb5, + 0x05, 0xdd, 0x51, 0xec, 0xb5, 0x28, 0x77, 0xfe, 0x93, 0x27, 0xf0, 0xf6, 0xef, 0x00, 0x00, 0x00, + 0xff, 0xff, 0x71, 0x1f, 0x83, 0xc2, 0xcf, 0x08, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/ibc/core/02-client/types/query.pb.gw.go b/x/ibc/core/02-client/types/query.pb.gw.go index 935c305d64..4d1cce8361 100644 --- a/x/ibc/core/02-client/types/query.pb.gw.go +++ b/x/ibc/core/02-client/types/query.pb.gw.go @@ -520,13 +520,13 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } var ( - pattern_Query_ClientState_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"ibc", "client", "v1beta1", "client_states", "client_id"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_ClientState_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"ibc", "core", "client", "v1beta1", "client_states", "client_id"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Query_ClientStates_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"ibc", "client", "v1beta1", "client_states"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_ClientStates_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"ibc", "core", "client", "v1beta1", "client_states"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Query_ConsensusState_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6, 2, 7, 1, 0, 4, 1, 5, 8}, []string{"ibc", "client", "v1beta1", "consensus_states", "client_id", "version", "version_number", "height", "version_height"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_ConsensusState_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6, 1, 0, 4, 1, 5, 7, 2, 8, 1, 0, 4, 1, 5, 9}, []string{"ibc", "core", "client", "v1beta1", "consensus_states", "client_id", "version", "version_number", "height", "version_height"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Query_ConsensusStates_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"ibc", "client", "v1beta1", "consensus_states", "client_id"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_ConsensusStates_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"ibc", "core", "client", "v1beta1", "consensus_states", "client_id"}, "", runtime.AssumeColonVerbOpt(true))) ) var ( diff --git a/x/ibc/core/03-connection/types/query.pb.go b/x/ibc/core/03-connection/types/query.pb.go index 3007ac05bc..5c3a2bcb26 100644 --- a/x/ibc/core/03-connection/types/query.pb.go +++ b/x/ibc/core/03-connection/types/query.pb.go @@ -635,63 +635,63 @@ func init() { } var fileDescriptor_cd8d529f8c7cd06b = []byte{ - // 891 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xc1, 0x4f, 0x2b, 0x45, - 0x18, 0xef, 0x14, 0xde, 0xcb, 0x63, 0xca, 0x7b, 0xea, 0xa4, 0x0f, 0xea, 0xaa, 0x05, 0x17, 0x2b, - 0xa0, 0x32, 0x43, 0x21, 0x10, 0x04, 0x6a, 0xb4, 0x04, 0x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0x98, 0xe8, 0xa7, 0x34, 0xcc, 0x0d, 0xba, 0xd2, 0x68, 0x7b, 0x58, 0x88, 0x49, 0xfe, - 0xa5, 0x95, 0x46, 0xac, 0x96, 0x1c, 0xbf, 0xe5, 0x1c, 0x5b, 0x28, 0x18, 0x89, 0x63, 0xdc, 0x81, - 0x88, 0x34, 0x33, 0x72, 0x16, 0xb7, 0xc4, 0x0e, 0x11, 0x96, 0x11, 0xc5, 0xc5, 0x7b, 0xa7, 0xfc, - 0xe5, 0x79, 0x37, 0x0f, 0x2e, 0xba, 0x79, 0xf0, 0x57, 0x37, 0x0f, 0x7e, 0xb8, 0xce, 0xa7, 0x2e, - 0xae, 0xf3, 0xa9, 0xcb, 0xeb, 0x7c, 0xea, 0xab, 0x2d, 0xc7, 0x0d, 0xaa, 0x4d, 0x0b, 0xdb, 0xac, - 0x46, 0xe4, 0x3f, 0x5f, 0xf1, 0xb3, 0xe4, 0x57, 0xbe, 0x26, 0xdf, 0x90, 0x9b, 0x3f, 0xb0, 0xcb, - 0xab, 0x4b, 0x0a, 0xea, 0xa0, 0x5d, 0xa7, 0xbe, 0xf5, 0x94, 0x7b, 0xdf, 0xea, 0x7f, 0x01, 0x00, - 0x00, 0xff, 0xff, 0x3b, 0x66, 0x6e, 0x99, 0x86, 0x0b, 0x00, 0x00, + // 887 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0x41, 0x4f, 0x33, 0x45, + 0x18, 0xee, 0x14, 0xbe, 0x2f, 0x1f, 0x53, 0x40, 0x9d, 0x14, 0xa8, 0xab, 0x16, 0x5c, 0x45, 0x0a, + 0x91, 0x19, 0x0a, 0xd1, 0x20, 0xd0, 0x44, 0x21, 0x88, 0x1c, 0x24, 0xb8, 0xc6, 0x8b, 0x17, 0xb2, + 0xbb, 0x1d, 0xb6, 0x1b, 0xe9, 0x4e, 0xe9, 0x6e, 0x1b, 0x1b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4b, 0xa2, 0xdf, 0x01, 0xce, 0xf4, 0x02, 0xb5, 0x46, 0x67, 0x1a, 0xf7, 0x26, 0x22, 0x6d, + 0x8e, 0x5c, 0xc4, 0xcd, 0xb2, 0x4d, 0x84, 0x99, 0x44, 0x71, 0xf1, 0xde, 0xde, 0xfd, 0xea, 0xaa, + 0x93, 0x07, 0xd7, 0x9d, 0x3c, 0xf8, 0xbb, 0x93, 0x07, 0x3f, 0xdc, 0xe6, 0x53, 0xd7, 0xb7, 0xf9, + 0xd4, 0x9f, 0xb7, 0xf9, 0xd4, 0xd7, 0xdb, 0x8e, 0x1b, 0x54, 0x1a, 0x16, 0xb6, 0x59, 0x95, 0xc8, + 0xff, 0xc4, 0xe2, 0x67, 0xd5, 0x2f, 0x7f, 0x43, 0xbe, 0x8d, 0x20, 0xaf, 0x6d, 0xac, 0x2a, 0xa8, + 0x83, 0x56, 0x8d, 0xfa, 0xd6, 0x73, 0xee, 0x8a, 0x1b, 0xff, 0x07, 0x00, 0x00, 0xff, 0xff, 0x91, + 0x3b, 0x2c, 0x79, 0xa0, 0x0b, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/ibc/core/03-connection/types/query.pb.gw.go b/x/ibc/core/03-connection/types/query.pb.gw.go index 57b8ab4921..1d7151ad5b 100644 --- a/x/ibc/core/03-connection/types/query.pb.gw.go +++ b/x/ibc/core/03-connection/types/query.pb.gw.go @@ -578,15 +578,15 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } var ( - pattern_Query_Connection_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"ibc", "connection", "v1beta1", "connections", "connection_id"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Connection_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"ibc", "core", "connection", "v1beta1", "connections", "connection_id"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Query_Connections_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"ibc", "connection", "v1beta1", "connections"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Connections_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"ibc", "core", "connection", "v1beta1", "connections"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Query_ClientConnections_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"ibc", "connection", "v1beta1", "client_connections", "client_id"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_ClientConnections_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"ibc", "core", "connection", "v1beta1", "client_connections", "client_id"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Query_ConnectionClientState_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"ibc", "connection", "v1beta1", "connections", "connection_id", "client_state"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_ConnectionClientState_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"ibc", "core", "connection", "v1beta1", "connections", "connection_id", "client_state"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Query_ConnectionConsensusState_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 2, 6, 1, 0, 4, 1, 5, 7, 2, 8, 1, 0, 4, 1, 5, 9}, []string{"ibc", "connection", "v1beta1", "connections", "connection_id", "consensus_state", "version", "version_number", "height", "version_height"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_ConnectionConsensusState_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6, 2, 7, 1, 0, 4, 1, 5, 8, 2, 9, 1, 0, 4, 1, 5, 10}, []string{"ibc", "core", "connection", "v1beta1", "connections", "connection_id", "consensus_state", "version", "version_number", "height", "version_height"}, "", runtime.AssumeColonVerbOpt(true))) ) var ( diff --git a/x/ibc/core/04-channel/types/query.pb.go b/x/ibc/core/04-channel/types/query.pb.go index d66ace7113..7015a2acf9 100644 --- a/x/ibc/core/04-channel/types/query.pb.go +++ b/x/ibc/core/04-channel/types/query.pb.go @@ -1699,100 +1699,100 @@ func init() { func init() { proto.RegisterFile("ibc/core/channel/v1/query.proto", fileDescriptor_1034a1e9abc4cca1) } var fileDescriptor_1034a1e9abc4cca1 = []byte{ - // 1488 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x59, 0xcf, 0x6f, 0x13, 0xc7, - 0x17, 0xcf, 0x38, 0x01, 0x92, 0xc7, 0xef, 0x49, 0x02, 0x61, 0x09, 0x4e, 0xf0, 0x57, 0x7c, 0x1b, - 0x90, 0xd8, 0x21, 0x81, 0xd2, 0xa8, 0x6a, 0x91, 0x48, 0xa4, 0x42, 0xaa, 0xf2, 0x6b, 0x29, 0x2a, - 0x20, 0xb5, 0xee, 0x7a, 0x3d, 0x38, 0xab, 0x24, 0xbb, 0xc6, 0xbb, 0x36, 0x41, 0xa9, 0xab, 0xaa, - 0x95, 0x80, 0x53, 0x55, 0x89, 0x43, 0xa5, 0x5e, 0x2a, 0x55, 0xbd, 0x70, 0xec, 0x5f, 0xd0, 0x2b, - 0xb7, 0x22, 0xd1, 0x43, 0x25, 0x24, 0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xfc, 0x3f, 0x13, 0xf4, 0x6b, 0xd4, 0xed, 0x0e, 0xfb, 0x48, 0x07, 0x1f, 0xa1, 0xed, - 0xdd, 0x78, 0xfa, 0x2b, 0x81, 0xc1, 0x98, 0x0e, 0x97, 0xa6, 0xb4, 0x00, 0xc9, 0xcd, 0xb6, 0xf2, - 0x66, 0x9b, 0x56, 0x28, 0xc1, 0x55, 0x21, 0xc1, 0xfb, 0xf4, 0x62, 0x07, 0x12, 0x44, 0xfa, 0xf0, - 0x19, 0xed, 0xe9, 0xab, 0x2c, 0x79, 0xf6, 0x2a, 0x4b, 0xfe, 0x78, 0x95, 0x25, 0xdf, 0xac, 0x66, - 0x7b, 0x9e, 0xad, 0x66, 0x7b, 0x7e, 0x5b, 0xcd, 0xf6, 0xdc, 0x9e, 0x2e, 0x99, 0xee, 0x7c, 0xb5, - 0xa0, 0x1a, 0xf6, 0x12, 0xc3, 0x7f, 0xe8, 0xc9, 0x3f, 0x27, 0x9d, 0xe2, 0x02, 0x5b, 0x66, 0xc1, - 0x3f, 0xee, 0x4e, 0x9d, 0x39, 0xe9, 0x23, 0x71, 0xef, 0x97, 0xb9, 0x53, 0xd8, 0x2e, 0x7e, 0x7f, - 0x3d, 0xfd, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x07, 0x22, 0x97, 0x6e, 0x5f, 0x1c, 0x00, 0x00, + // 1487 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x59, 0xdf, 0x6b, 0x14, 0xd7, + 0x17, 0xcf, 0xdd, 0x44, 0x4d, 0x8e, 0xbf, 0x6f, 0x12, 0x8d, 0x63, 0x5c, 0xe3, 0x7e, 0xbf, 0x6d, + 0xa3, 0xe0, 0x5c, 0x13, 0xad, 0x15, 0x8a, 0x2d, 0x31, 0x50, 0x1b, 0x50, 0x6b, 0x47, 0x6d, 0x55, + 0x5a, 0x97, 0xd9, 0xd9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x63, + 0xbd, 0x22, 0x7e, 0x92, 0x1a, 0x33, 0x65, 0x6e, 0xb9, 0xe6, 0x75, 0x93, 0x97, 0x7d, 0x5d, 0x02, + 0x3f, 0x7a, 0x3a, 0x86, 0x32, 0x27, 0x50, 0xbe, 0xb2, 0x2a, 0x4a, 0x09, 0x20, 0x0a, 0x93, 0x9e, + 0x80, 0x8d, 0x6d, 0xaa, 0x88, 0xf6, 0x85, 0x4f, 0x09, 0xe4, 0x25, 0x41, 0xdb, 0xb2, 0xb8, 0xe1, + 0x45, 0x6b, 0xd6, 0x32, 0x0f, 0x60, 0x04, 0x2f, 0xf1, 0x28, 0x45, 0x56, 0x9a, 0xb4, 0xce, 0x3d, + 0xb7, 0xd6, 0xcf, 0x08, 0xec, 0x4f, 0x85, 0xf2, 0xdf, 0x52, 0xfd, 0xb2, 0x2f, 0xba, 0xc4, 0x34, + 0x2d, 0xac, 0x2f, 0xb8, 0xba, 0xcb, 0x3b, 0x2d, 0xde, 0xdf, 0x03, 0x11, 0x13, 0x42, 0xa3, 0x88, + 0x3a, 0xec, 0x36, 0x03, 0x7d, 0x8a, 0x12, 0x6a, 0xd1, 0xf1, 0x4c, 0xb0, 0x52, 0x0e, 0x26, 0x11, + 0x89, 0x48, 0x1a, 0x89, 0x39, 0x6c, 0x26, 0x2d, 0x77, 0xb3, 0xe4, 0xef, 0x11, 0x38, 0x10, 0x63, + 0xe8, 0x71, 0xb2, 0x9c, 0xba, 0xb3, 0x1e, 0xfa, 0xd1, 0x97, 0x60, 0xdb, 0x22, 0xaf, 0x39, 0xa6, + 0x6d, 0x15, 0xad, 0xfa, 0x42, 0x89, 0xd7, 0x04, 0xc8, 0x3e, 0x6d, 0x2b, 0xae, 0x9e, 0x13, 0x8b, + 0x51, 0x33, 0xe4, 0xd2, 0x17, 0x33, 0x43, 0xac, 0xbf, 0x11, 0x28, 0x64, 0x61, 0xc5, 0x84, 0x9c, + 0x84, 0xed, 0x86, 0xff, 0x26, 0x96, 0x88, 0x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, + 0x09, 0xbd, 0x45, 0xba, 0xd1, 0x74, 0x32, 0xc6, 0x81, 0x06, 0xab, 0x07, 0xb0, 0x8a, 0x55, 0x24, + 0xfe, 0x0f, 0x81, 0x6d, 0xf1, 0xab, 0x2f, 0x65, 0x6b, 0xe1, 0x15, 0xb9, 0xac, 0x2b, 0x47, 0xd6, + 0xee, 0x80, 0x2a, 0x7c, 0x2c, 0x55, 0x58, 0xa1, 0xcb, 0x5d, 0xd4, 0x20, 0x36, 0x01, 0xc4, 0xc8, + 0x7b, 0x25, 0x40, 0x7f, 0x25, 0x30, 0x98, 0x70, 0x43, 0xa6, 0x19, 0x77, 0x86, 0xf4, 0xcb, 0xba, + 0xf2, 0x6a, 0x9b, 0x5e, 0x28, 0xc4, 0x25, 0xa1, 0xc3, 0x3b, 0xf4, 0x6c, 0xa7, 0x3a, 0xc4, 0x2e, + 0xf3, 0xa7, 0xb4, 0xfb, 0x4f, 0xf2, 0xe4, 0xc1, 0x93, 0x3c, 0x79, 0xfc, 0x24, 0x4f, 0xbe, 0x78, + 0x9a, 0xef, 0x79, 0xf0, 0x34, 0xdf, 0xf3, 0xf0, 0x69, 0xbe, 0xe7, 0xea, 0x89, 0x8a, 0xe9, 0xce, + 0xd6, 0x4b, 0xaa, 0x61, 0x2f, 0x30, 0xfc, 0xaf, 0xa0, 0xfc, 0x73, 0xd8, 0x29, 0xcf, 0xb1, 0xa5, + 0x10, 0xc6, 0x91, 0x63, 0x87, 0x7d, 0x24, 0xee, 0x72, 0x95, 0x3b, 0xa5, 0x8d, 0xe2, 0x47, 0xdc, + 0xa3, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0x48, 0x61, 0x15, 0x26, 0xa4, 0x1c, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/ibc/core/04-channel/types/query.pb.gw.go b/x/ibc/core/04-channel/types/query.pb.gw.go index a2ae71d96b..270aa3db9f 100644 --- a/x/ibc/core/04-channel/types/query.pb.gw.go +++ b/x/ibc/core/04-channel/types/query.pb.gw.go @@ -1736,31 +1736,31 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } var ( - pattern_Query_Channel_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6}, []string{"ibc", "channel", "v1beta1", "channels", "channel_id", "ports", "port_id"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Channel_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6, 1, 0, 4, 1, 5, 7}, []string{"ibc", "core", "channel", "v1beta1", "channels", "channel_id", "ports", "port_id"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Query_Channels_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"ibc", "channel", "v1beta1", "channels"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Channels_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"ibc", "core", "channel", "v1beta1", "channels"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Query_ConnectionChannels_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"ibc", "channel", "v1beta1", "connections", "connection", "channels"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_ConnectionChannels_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"ibc", "core", "channel", "v1beta1", "connections", "connection", "channels"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Query_ChannelClientState_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6, 2, 7}, []string{"ibc", "channel", "v1beta1", "channels", "channel_id", "ports", "port_id", "client_state"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_ChannelClientState_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6, 1, 0, 4, 1, 5, 7, 2, 8}, []string{"ibc", "core", "channel", "v1beta1", "channels", "channel_id", "ports", "port_id", "client_state"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Query_ChannelConsensusState_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6, 2, 7, 2, 8, 1, 0, 4, 1, 5, 9, 2, 10, 1, 0, 4, 1, 5, 11}, []string{"ibc", "channel", "v1beta1", "channels", "channel_id", "ports", "port_id", "consensus_state", "version", "version_number", "height", "version_height"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_ChannelConsensusState_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6, 1, 0, 4, 1, 5, 7, 2, 8, 2, 9, 1, 0, 4, 1, 5, 10, 2, 11, 1, 0, 4, 1, 5, 12}, []string{"ibc", "core", "channel", "v1beta1", "channels", "channel_id", "ports", "port_id", "consensus_state", "version", "version_number", "height", "version_height"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Query_PacketCommitment_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6, 2, 7, 1, 0, 4, 1, 5, 8}, []string{"ibc", "channel", "v1beta1", "channels", "channel_id", "ports", "port_id", "packet_commitments", "sequence"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_PacketCommitment_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6, 1, 0, 4, 1, 5, 7, 2, 8, 1, 0, 4, 1, 5, 9}, []string{"ibc", "core", "channel", "v1beta1", "channels", "channel_id", "ports", "port_id", "packet_commitments", "sequence"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Query_PacketCommitments_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6, 2, 7}, []string{"ibc", "channel", "v1beta1", "channels", "channel_id", "ports", "port_id", "packet_commitments"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_PacketCommitments_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6, 1, 0, 4, 1, 5, 7, 2, 8}, []string{"ibc", "core", "channel", "v1beta1", "channels", "channel_id", "ports", "port_id", "packet_commitments"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Query_PacketReceipt_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6, 2, 7, 1, 0, 4, 1, 5, 8}, []string{"ibc", "channel", "v1beta1", "channels", "channel_id", "ports", "port_id", "packet_receipts", "sequence"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_PacketReceipt_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6, 1, 0, 4, 1, 5, 7, 2, 8, 1, 0, 4, 1, 5, 9}, []string{"ibc", "core", "channel", "v1beta1", "channels", "channel_id", "ports", "port_id", "packet_receipts", "sequence"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Query_PacketAcknowledgement_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6, 2, 7, 1, 0, 4, 1, 5, 8}, []string{"ibc", "channel", "v1beta1", "channels", "channel_id", "ports", "port_id", "packet_acks", "sequence"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_PacketAcknowledgement_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6, 1, 0, 4, 1, 5, 7, 2, 8, 1, 0, 4, 1, 5, 9}, []string{"ibc", "core", "channel", "v1beta1", "channels", "channel_id", "ports", "port_id", "packet_acks", "sequence"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Query_PacketAcknowledgements_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6, 2, 7}, []string{"ibc", "channel", "v1beta1", "channels", "channel_id", "ports", "port_id", "packet_acknowledgements"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_PacketAcknowledgements_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6, 1, 0, 4, 1, 5, 7, 2, 8}, []string{"ibc", "core", "channel", "v1beta1", "channels", "channel_id", "ports", "port_id", "packet_acknowledgements"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Query_UnreceivedPackets_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6, 2, 7, 1, 0, 4, 1, 5, 8, 2, 9}, []string{"ibc", "channel", "v1beta1", "channels", "channel_id", "ports", "port_id", "packet_commitments", "packet_commitment_sequences", "unreceived_packets"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_UnreceivedPackets_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6, 1, 0, 4, 1, 5, 7, 2, 8, 1, 0, 4, 1, 5, 9, 2, 10}, []string{"ibc", "core", "channel", "v1beta1", "channels", "channel_id", "ports", "port_id", "packet_commitments", "packet_commitment_sequences", "unreceived_packets"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Query_UnreceivedAcks_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6, 2, 7, 1, 0, 4, 1, 5, 8, 2, 9}, []string{"ibc", "channel", "v1beta1", "channels", "channel_id", "ports", "port_id", "packet_commitments", "packet_ack_sequences", "unreceived_acks"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_UnreceivedAcks_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6, 1, 0, 4, 1, 5, 7, 2, 8, 1, 0, 4, 1, 5, 9, 2, 10}, []string{"ibc", "core", "channel", "v1beta1", "channels", "channel_id", "ports", "port_id", "packet_commitments", "packet_ack_sequences", "unreceived_acks"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Query_NextSequenceReceive_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6, 2, 7}, []string{"ibc", "channel", "v1beta1", "channels", "channel_id", "ports", "port_id", "next_sequence"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_NextSequenceReceive_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6, 1, 0, 4, 1, 5, 7, 2, 8}, []string{"ibc", "core", "channel", "v1beta1", "channels", "channel_id", "ports", "port_id", "next_sequence"}, "", runtime.AssumeColonVerbOpt(true))) ) var ( diff --git a/x/ibc/core/23-commitment/types/commitment.pb.go b/x/ibc/core/23-commitment/types/commitment.pb.go index bb28053e7f..9634e25735 100644 --- a/x/ibc/core/23-commitment/types/commitment.pb.go +++ b/x/ibc/core/23-commitment/types/commitment.pb.go @@ -112,6 +112,7 @@ func (m *MerklePrefix) GetKeyPrefix() []byte { // MerklePath is the path used to verify commitment proofs, which can be an // arbitrary structured object (defined by a commitment type). +// MerklePath is represented from root-to-leaf type MerklePath struct { KeyPath []string `protobuf:"bytes,1,rep,name=key_path,json=keyPath,proto3" json:"key_path,omitempty" yaml:"key_path"` } @@ -159,6 +160,7 @@ func (m *MerklePath) GetKeyPath() []string { // It demonstrates membership or non-membership for an element or set of // elements, verifiable in conjunction with a known commitment root. Proofs // should be succinct. +// MerkleProofs are ordered from leaf-to-root type MerkleProof struct { Proofs []*_go.CommitmentProof `protobuf:"bytes,1,rep,name=proofs,proto3" json:"proofs,omitempty"` } From 0bd46574f431d8281e71cad2f166973bb558f7c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?colin=20axn=C3=A9r?= <25233464+colin-axner@users.noreply.github.com> Date: Tue, 10 Nov 2020 21:37:10 +0100 Subject: [PATCH 075/136] fix mismatched solomachine signature data type verification (#7882) * fix mismatched signature data type verification * update godoc Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com> --- .../06-solomachine/types/proof.go | 30 ++++----- .../06-solomachine/types/proof_test.go | 62 +++++++++++++++++++ 2 files changed, 78 insertions(+), 14 deletions(-) diff --git a/x/ibc/light-clients/06-solomachine/types/proof.go b/x/ibc/light-clients/06-solomachine/types/proof.go index c6f4c8b48f..6c2e0b8428 100644 --- a/x/ibc/light-clients/06-solomachine/types/proof.go +++ b/x/ibc/light-clients/06-solomachine/types/proof.go @@ -15,32 +15,34 @@ import ( // VerifySignature verifies if the the provided public key generated the signature // over the given data. Single and Multi signature public keys are supported. -// The type of the signature data determines how the public key is used to -// verify the signature. An error is returned if signature verification fails -// or an invalid SignatureData type is provided. +// The signature data type must correspond to the public key type. An error is +// returned if signature verification fails or an invalid SignatureData type is +// provided. func VerifySignature(pubKey cryptotypes.PubKey, signBytes []byte, sigData signing.SignatureData) error { - switch data := sigData.(type) { - case *signing.SingleSignatureData: - if !pubKey.VerifySignature(signBytes, data.Signature) { - return ErrSignatureVerificationFailed - } - - case *signing.MultiSignatureData: - multiPK, ok := pubKey.(multisig.PubKey) + switch pubKey := pubKey.(type) { + case multisig.PubKey: + data, ok := sigData.(*signing.MultiSignatureData) if !ok { - return sdkerrors.Wrapf(ErrSignatureVerificationFailed, "invalid pubkey type: expected %T, got %T", (multisig.PubKey)(nil), pubKey) + return sdkerrors.Wrapf(ErrSignatureVerificationFailed, "invalid signature data type, expected %T, got %T", (*signing.MultiSignatureData)(nil), data) } // The function supplied fulfills the VerifyMultisignature interface. No special // adjustments need to be made to the sign bytes based on the sign mode. - if err := multiPK.VerifyMultisignature(func(signing.SignMode) ([]byte, error) { + if err := pubKey.VerifyMultisignature(func(signing.SignMode) ([]byte, error) { return signBytes, nil }, data); err != nil { return err } default: - return sdkerrors.Wrapf(ErrSignatureVerificationFailed, "unsupported signature data type %T", data) + data, ok := sigData.(*signing.SingleSignatureData) + if !ok { + return sdkerrors.Wrapf(ErrSignatureVerificationFailed, "invalid signature data type, expected %T, got %T", (*signing.SingleSignatureData)(nil), data) + } + + if !pubKey.VerifySignature(signBytes, data.Signature) { + return ErrSignatureVerificationFailed + } } return nil diff --git a/x/ibc/light-clients/06-solomachine/types/proof_test.go b/x/ibc/light-clients/06-solomachine/types/proof_test.go index 5ecd9c4c5d..e2ba679a5b 100644 --- a/x/ibc/light-clients/06-solomachine/types/proof_test.go +++ b/x/ibc/light-clients/06-solomachine/types/proof_test.go @@ -1,10 +1,72 @@ package types_test import ( + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" + "github.com/cosmos/cosmos-sdk/types/tx/signing" "github.com/cosmos/cosmos-sdk/x/ibc/light-clients/06-solomachine/types" + solomachinetypes "github.com/cosmos/cosmos-sdk/x/ibc/light-clients/06-solomachine/types" ibctesting "github.com/cosmos/cosmos-sdk/x/ibc/testing" ) +func (suite *SoloMachineTestSuite) TestVerifySignature() { + cdc := suite.chainA.App.AppCodec() + signBytes := []byte("sign bytes") + + singleSignature := suite.solomachine.GenerateSignature(signBytes) + singleSigData, err := solomachinetypes.UnmarshalSignatureData(cdc, singleSignature) + suite.Require().NoError(err) + + multiSignature := suite.solomachineMulti.GenerateSignature(signBytes) + multiSigData, err := solomachinetypes.UnmarshalSignatureData(cdc, multiSignature) + suite.Require().NoError(err) + + testCases := []struct { + name string + publicKey cryptotypes.PubKey + sigData signing.SignatureData + expPass bool + }{ + { + "single signature with regular public key", + suite.solomachine.PublicKey, + singleSigData, + true, + }, + { + "multi signature with multisig public key", + suite.solomachineMulti.PublicKey, + multiSigData, + true, + }, + { + "single signature with multisig public key", + suite.solomachineMulti.PublicKey, + singleSigData, + false, + }, + { + "multi signature with regular public key", + suite.solomachine.PublicKey, + multiSigData, + false, + }, + } + + for _, tc := range testCases { + tc := tc + + suite.Run(tc.name, func() { + err := solomachinetypes.VerifySignature(tc.publicKey, signBytes, tc.sigData) + + if tc.expPass { + suite.Require().NoError(err) + } else { + suite.Require().Error(err) + } + }) + } +} + func (suite *SoloMachineTestSuite) TestClientStateSignBytes() { cdc := suite.chainA.App.AppCodec() From 116d0460fc329b6d96b615782c8d3f57e30aa505 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?colin=20axn=C3=A9r?= <25233464+colin-axner@users.noreply.github.com> Date: Wed, 11 Nov 2020 11:09:57 +0100 Subject: [PATCH 076/136] solo machine GetPubKey returns an error instead of panicing (#7883) * solo machine public key now returns an error instead of panicing * apply @fedekunze review suggestions Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com> --- .../06-solomachine/types/client_state.go | 70 ++++++++++--------- .../06-solomachine/types/consensus_state.go | 20 ++++-- .../06-solomachine/types/header.go | 19 +++-- .../types/misbehaviour_handle.go | 7 +- .../types/misbehaviour_handle_test.go | 10 +++ .../06-solomachine/types/proposal_handle.go | 12 +++- .../types/proposal_handle_test.go | 9 ++- .../06-solomachine/types/update.go | 7 +- .../06-solomachine/types/update_test.go | 10 +++ 9 files changed, 116 insertions(+), 48 deletions(-) diff --git a/x/ibc/light-clients/06-solomachine/types/client_state.go b/x/ibc/light-clients/06-solomachine/types/client_state.go index 5e9fe014ac..05ed359baf 100644 --- a/x/ibc/light-clients/06-solomachine/types/client_state.go +++ b/x/ibc/light-clients/06-solomachine/types/client_state.go @@ -4,6 +4,7 @@ import ( ics23 "github.com/confio/ics23/go" "github.com/cosmos/cosmos-sdk/codec" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/types/tx/signing" @@ -95,7 +96,7 @@ func (cs ClientState) VerifyClientState( proof []byte, clientState exported.ClientState, ) error { - sigData, timestamp, sequence, err := produceVerificationArgs(cdc, cs, height, prefix, proof) + publicKey, sigData, timestamp, sequence, err := produceVerificationArgs(cdc, cs, height, prefix, proof) if err != nil { return err } @@ -111,7 +112,7 @@ func (cs ClientState) VerifyClientState( return err } - if err := VerifySignature(cs.ConsensusState.GetPubKey(), signBz, sigData); err != nil { + if err := VerifySignature(publicKey, signBz, sigData); err != nil { return err } @@ -133,7 +134,7 @@ func (cs ClientState) VerifyClientConsensusState( proof []byte, consensusState exported.ConsensusState, ) error { - sigData, timestamp, sequence, err := produceVerificationArgs(cdc, cs, height, prefix, proof) + publicKey, sigData, timestamp, sequence, err := produceVerificationArgs(cdc, cs, height, prefix, proof) if err != nil { return err } @@ -149,7 +150,7 @@ func (cs ClientState) VerifyClientConsensusState( return err } - if err := VerifySignature(cs.ConsensusState.GetPubKey(), signBz, sigData); err != nil { + if err := VerifySignature(publicKey, signBz, sigData); err != nil { return err } @@ -170,7 +171,7 @@ func (cs ClientState) VerifyConnectionState( connectionID string, connectionEnd exported.ConnectionI, ) error { - sigData, timestamp, sequence, err := produceVerificationArgs(cdc, cs, height, prefix, proof) + publicKey, sigData, timestamp, sequence, err := produceVerificationArgs(cdc, cs, height, prefix, proof) if err != nil { return err } @@ -186,7 +187,7 @@ func (cs ClientState) VerifyConnectionState( return err } - if err := VerifySignature(cs.ConsensusState.GetPubKey(), signBz, sigData); err != nil { + if err := VerifySignature(publicKey, signBz, sigData); err != nil { return err } @@ -208,7 +209,7 @@ func (cs ClientState) VerifyChannelState( channelID string, channel exported.ChannelI, ) error { - sigData, timestamp, sequence, err := produceVerificationArgs(cdc, cs, height, prefix, proof) + publicKey, sigData, timestamp, sequence, err := produceVerificationArgs(cdc, cs, height, prefix, proof) if err != nil { return err } @@ -224,7 +225,7 @@ func (cs ClientState) VerifyChannelState( return err } - if err := VerifySignature(cs.ConsensusState.GetPubKey(), signBz, sigData); err != nil { + if err := VerifySignature(publicKey, signBz, sigData); err != nil { return err } @@ -247,7 +248,7 @@ func (cs ClientState) VerifyPacketCommitment( packetSequence uint64, commitmentBytes []byte, ) error { - sigData, timestamp, sequence, err := produceVerificationArgs(cdc, cs, height, prefix, proof) + publicKey, sigData, timestamp, sequence, err := produceVerificationArgs(cdc, cs, height, prefix, proof) if err != nil { return err } @@ -263,7 +264,7 @@ func (cs ClientState) VerifyPacketCommitment( return err } - if err := VerifySignature(cs.ConsensusState.GetPubKey(), signBz, sigData); err != nil { + if err := VerifySignature(publicKey, signBz, sigData); err != nil { return err } @@ -286,7 +287,7 @@ func (cs ClientState) VerifyPacketAcknowledgement( packetSequence uint64, acknowledgement []byte, ) error { - sigData, timestamp, sequence, err := produceVerificationArgs(cdc, cs, height, prefix, proof) + publicKey, sigData, timestamp, sequence, err := produceVerificationArgs(cdc, cs, height, prefix, proof) if err != nil { return err } @@ -302,7 +303,7 @@ func (cs ClientState) VerifyPacketAcknowledgement( return err } - if err := VerifySignature(cs.ConsensusState.GetPubKey(), signBz, sigData); err != nil { + if err := VerifySignature(publicKey, signBz, sigData); err != nil { return err } @@ -325,7 +326,7 @@ func (cs ClientState) VerifyPacketReceiptAbsence( channelID string, packetSequence uint64, ) error { - sigData, timestamp, sequence, err := produceVerificationArgs(cdc, cs, height, prefix, proof) + publicKey, sigData, timestamp, sequence, err := produceVerificationArgs(cdc, cs, height, prefix, proof) if err != nil { return err } @@ -341,7 +342,7 @@ func (cs ClientState) VerifyPacketReceiptAbsence( return err } - if err := VerifySignature(cs.ConsensusState.GetPubKey(), signBz, sigData); err != nil { + if err := VerifySignature(publicKey, signBz, sigData); err != nil { return err } @@ -363,7 +364,7 @@ func (cs ClientState) VerifyNextSequenceRecv( channelID string, nextSequenceRecv uint64, ) error { - sigData, timestamp, sequence, err := produceVerificationArgs(cdc, cs, height, prefix, proof) + publicKey, sigData, timestamp, sequence, err := produceVerificationArgs(cdc, cs, height, prefix, proof) if err != nil { return err } @@ -379,7 +380,7 @@ func (cs ClientState) VerifyNextSequenceRecv( return err } - if err := VerifySignature(cs.ConsensusState.GetPubKey(), signBz, sigData); err != nil { + if err := VerifySignature(publicKey, signBz, sigData); err != nil { return err } @@ -390,71 +391,76 @@ func (cs ClientState) VerifyNextSequenceRecv( } // produceVerificationArgs perfoms the basic checks on the arguments that are -// shared between the verification functions and returns the unmarshalled -// proof representing the signature and timestamp along with the solo-machine sequence -// encoded in the proofHeight. +// shared between the verification functions and returns the public key of the +// consensus state, the unmarshalled proof representing the signature and timestamp +// along with the solo-machine sequence encoded in the proofHeight. func produceVerificationArgs( cdc codec.BinaryMarshaler, cs ClientState, height exported.Height, prefix exported.Prefix, proof []byte, -) (signing.SignatureData, uint64, uint64, error) { +) (cryptotypes.PubKey, signing.SignatureData, uint64, uint64, error) { if version := height.GetVersionNumber(); version != 0 { - return nil, 0, 0, sdkerrors.Wrapf(sdkerrors.ErrInvalidHeight, "version must be 0 for solomachine, got version-number: %d", version) + return nil, nil, 0, 0, sdkerrors.Wrapf(sdkerrors.ErrInvalidHeight, "version must be 0 for solomachine, got version-number: %d", version) } // sequence is encoded in the version height of height struct sequence := height.GetVersionHeight() if cs.IsFrozen() { - return nil, 0, 0, clienttypes.ErrClientFrozen + return nil, nil, 0, 0, clienttypes.ErrClientFrozen } if prefix == nil { - return nil, 0, 0, sdkerrors.Wrap(commitmenttypes.ErrInvalidPrefix, "prefix cannot be empty") + return nil, nil, 0, 0, sdkerrors.Wrap(commitmenttypes.ErrInvalidPrefix, "prefix cannot be empty") } _, ok := prefix.(commitmenttypes.MerklePrefix) if !ok { - return nil, 0, 0, sdkerrors.Wrapf(commitmenttypes.ErrInvalidPrefix, "invalid prefix type %T, expected MerklePrefix", prefix) + return nil, nil, 0, 0, sdkerrors.Wrapf(commitmenttypes.ErrInvalidPrefix, "invalid prefix type %T, expected MerklePrefix", prefix) } if proof == nil { - return nil, 0, 0, sdkerrors.Wrap(ErrInvalidProof, "proof cannot be empty") + return nil, nil, 0, 0, sdkerrors.Wrap(ErrInvalidProof, "proof cannot be empty") } timestampedSigData := &TimestampedSignatureData{} if err := cdc.UnmarshalBinaryBare(proof, timestampedSigData); err != nil { - return nil, 0, 0, sdkerrors.Wrapf(err, "failed to unmarshal proof into type %T", timestampedSigData) + return nil, nil, 0, 0, sdkerrors.Wrapf(err, "failed to unmarshal proof into type %T", timestampedSigData) } timestamp := timestampedSigData.Timestamp if len(timestampedSigData.SignatureData) == 0 { - return nil, 0, 0, sdkerrors.Wrap(ErrInvalidProof, "signature data cannot be empty") + return nil, nil, 0, 0, sdkerrors.Wrap(ErrInvalidProof, "signature data cannot be empty") } sigData, err := UnmarshalSignatureData(cdc, timestampedSigData.SignatureData) if err != nil { - return nil, 0, 0, err + return nil, nil, 0, 0, err } if cs.ConsensusState == nil { - return nil, 0, 0, sdkerrors.Wrap(clienttypes.ErrInvalidConsensus, "consensus state cannot be empty") + return nil, nil, 0, 0, sdkerrors.Wrap(clienttypes.ErrInvalidConsensus, "consensus state cannot be empty") } latestSequence := cs.GetLatestHeight().GetVersionHeight() if latestSequence != sequence { - return nil, 0, 0, sdkerrors.Wrapf( + return nil, nil, 0, 0, sdkerrors.Wrapf( sdkerrors.ErrInvalidHeight, "client state sequence != proof sequence (%d != %d)", latestSequence, sequence, ) } if cs.ConsensusState.GetTimestamp() > timestamp { - return nil, 0, 0, sdkerrors.Wrapf(ErrInvalidProof, "the consensus state timestamp is greater than the signature timestamp (%d >= %d)", cs.ConsensusState.GetTimestamp(), timestamp) + return nil, nil, 0, 0, sdkerrors.Wrapf(ErrInvalidProof, "the consensus state timestamp is greater than the signature timestamp (%d >= %d)", cs.ConsensusState.GetTimestamp(), timestamp) } - return sigData, timestamp, sequence, nil + publicKey, err := cs.ConsensusState.GetPubKey() + if err != nil { + return nil, nil, 0, 0, err + } + + return publicKey, sigData, timestamp, sequence, nil } // sets the client state to the store diff --git a/x/ibc/light-clients/06-solomachine/types/consensus_state.go b/x/ibc/light-clients/06-solomachine/types/consensus_state.go index 2b637a7ad2..cebd399ffa 100644 --- a/x/ibc/light-clients/06-solomachine/types/consensus_state.go +++ b/x/ibc/light-clients/06-solomachine/types/consensus_state.go @@ -27,13 +27,19 @@ func (cs ConsensusState) GetRoot() exported.Root { } // GetPubKey unmarshals the public key into a cryptotypes.PubKey type. -func (cs ConsensusState) GetPubKey() cryptotypes.PubKey { - publicKey, ok := cs.PublicKey.GetCachedValue().(cryptotypes.PubKey) - if !ok { - panic("ConsensusState PublicKey is not cryptotypes.PubKey") +// An error is returned if the public key is nil or the cached value +// is not a PubKey. +func (cs ConsensusState) GetPubKey() (cryptotypes.PubKey, error) { + if cs.PublicKey == nil { + return nil, sdkerrors.Wrap(clienttypes.ErrInvalidConsensus, "consensus state PublicKey cannot be nil") } - return publicKey + publicKey, ok := cs.PublicKey.GetCachedValue().(cryptotypes.PubKey) + if !ok { + return nil, sdkerrors.Wrap(clienttypes.ErrInvalidConsensus, "consensus state PublicKey is not cryptotypes.PubKey") + } + + return publicKey, nil } // ValidateBasic defines basic validation for the solo machine consensus state. @@ -44,7 +50,9 @@ func (cs ConsensusState) ValidateBasic() error { if cs.Diversifier != "" && strings.TrimSpace(cs.Diversifier) == "" { return sdkerrors.Wrap(clienttypes.ErrInvalidConsensus, "diversifier cannot contain only spaces") } - if cs.PublicKey == nil || cs.GetPubKey() == nil || len(cs.GetPubKey().Bytes()) == 0 { + + publicKey, err := cs.GetPubKey() + if err != nil || publicKey == nil || len(publicKey.Bytes()) == 0 { return sdkerrors.Wrap(clienttypes.ErrInvalidConsensus, "public key cannot be empty") } diff --git a/x/ibc/light-clients/06-solomachine/types/header.go b/x/ibc/light-clients/06-solomachine/types/header.go index e833a70202..cb2b55b4f8 100644 --- a/x/ibc/light-clients/06-solomachine/types/header.go +++ b/x/ibc/light-clients/06-solomachine/types/header.go @@ -24,13 +24,19 @@ func (h Header) GetHeight() exported.Height { } // GetPubKey unmarshals the new public key into a cryptotypes.PubKey type. -func (h Header) GetPubKey() cryptotypes.PubKey { - publicKey, ok := h.NewPublicKey.GetCachedValue().(cryptotypes.PubKey) - if !ok { - panic("Header NewPublicKey is not cryptotypes.PubKey") +// An error is returned if the new public key is nil or the cached value +// is not a PubKey. +func (h Header) GetPubKey() (cryptotypes.PubKey, error) { + if h.NewPublicKey == nil { + return nil, sdkerrors.Wrap(ErrInvalidHeader, "header NewPublicKey cannot be nil") } - return publicKey + publicKey, ok := h.NewPublicKey.GetCachedValue().(cryptotypes.PubKey) + if !ok { + return nil, sdkerrors.Wrap(ErrInvalidHeader, "header NewPublicKey is not cryptotypes.PubKey") + } + + return publicKey, nil } // ValidateBasic ensures that the sequence, signature and public key have all @@ -52,7 +58,8 @@ func (h Header) ValidateBasic() error { return sdkerrors.Wrap(clienttypes.ErrInvalidHeader, "signature cannot be empty") } - if h.NewPublicKey == nil || h.GetPubKey() == nil || len(h.GetPubKey().Bytes()) == 0 { + newPublicKey, err := h.GetPubKey() + if err != nil || newPublicKey == nil || len(newPublicKey.Bytes()) == 0 { return sdkerrors.Wrap(clienttypes.ErrInvalidHeader, "new public key cannot be empty") } diff --git a/x/ibc/light-clients/06-solomachine/types/misbehaviour_handle.go b/x/ibc/light-clients/06-solomachine/types/misbehaviour_handle.go index 2fcbe75c7a..721b84f82e 100644 --- a/x/ibc/light-clients/06-solomachine/types/misbehaviour_handle.go +++ b/x/ibc/light-clients/06-solomachine/types/misbehaviour_handle.go @@ -79,7 +79,12 @@ func verifySignatureAndData(cdc codec.BinaryMarshaler, clientState ClientState, return err } - if err := VerifySignature(clientState.ConsensusState.GetPubKey(), data, sigData); err != nil { + publicKey, err := clientState.ConsensusState.GetPubKey() + if err != nil { + return err + } + + if err := VerifySignature(publicKey, data, sigData); err != nil { return err } diff --git a/x/ibc/light-clients/06-solomachine/types/misbehaviour_handle_test.go b/x/ibc/light-clients/06-solomachine/types/misbehaviour_handle_test.go index fd5871adc6..f247ed2332 100644 --- a/x/ibc/light-clients/06-solomachine/types/misbehaviour_handle_test.go +++ b/x/ibc/light-clients/06-solomachine/types/misbehaviour_handle_test.go @@ -241,6 +241,16 @@ func (suite *SoloMachineTestSuite) TestCheckMisbehaviourAndUpdateState() { }, false, }, + { + "consensus state pubkey is nil", + func() { + cs := solomachine.ClientState() + cs.ConsensusState.PublicKey = nil + clientState = cs + misbehaviour = solomachine.CreateMisbehaviour() + }, + false, + }, } for _, tc := range testCases { diff --git a/x/ibc/light-clients/06-solomachine/types/proposal_handle.go b/x/ibc/light-clients/06-solomachine/types/proposal_handle.go index f715ebb4c5..b55e612b3c 100644 --- a/x/ibc/light-clients/06-solomachine/types/proposal_handle.go +++ b/x/ibc/light-clients/06-solomachine/types/proposal_handle.go @@ -33,7 +33,17 @@ func (cs ClientState) CheckProposedHeaderAndUpdateState( ) } - if reflect.DeepEqual(cs.ConsensusState.GetPubKey(), smHeader.GetPubKey()) { + consensusPublicKey, err := cs.ConsensusState.GetPubKey() + if err != nil { + return nil, nil, sdkerrors.Wrap(err, "failed to get consensus public key") + } + + headerPublicKey, err := smHeader.GetPubKey() + if err != nil { + return nil, nil, sdkerrors.Wrap(err, "failed to get header public key") + } + + if reflect.DeepEqual(consensusPublicKey, headerPublicKey) { return nil, nil, sdkerrors.Wrapf( clienttypes.ErrInvalidHeader, "new public key in header equals current public key", ) diff --git a/x/ibc/light-clients/06-solomachine/types/proposal_handle_test.go b/x/ibc/light-clients/06-solomachine/types/proposal_handle_test.go index c36e252d41..86d5c78dcc 100644 --- a/x/ibc/light-clients/06-solomachine/types/proposal_handle_test.go +++ b/x/ibc/light-clients/06-solomachine/types/proposal_handle_test.go @@ -69,7 +69,14 @@ func (suite *SoloMachineTestSuite) TestCheckProposedHeaderAndUpdateState() { suite.Require().True(ok) suite.Require().Equal(cs.(*types.ClientState).ConsensusState, consState) - suite.Require().Equal(smHeader.GetPubKey(), smConsState.GetPubKey()) + + headerPubKey, err := smHeader.GetPubKey() + suite.Require().NoError(err) + + consStatePubKey, err := smConsState.GetPubKey() + suite.Require().NoError(err) + + suite.Require().Equal(headerPubKey, consStatePubKey) suite.Require().Equal(smHeader.NewDiversifier, smConsState.Diversifier) suite.Require().Equal(smHeader.Timestamp, smConsState.Timestamp) suite.Require().Equal(smHeader.GetHeight().GetVersionHeight(), cs.(*types.ClientState).Sequence) diff --git a/x/ibc/light-clients/06-solomachine/types/update.go b/x/ibc/light-clients/06-solomachine/types/update.go index 4deb8833d5..4cf31fd988 100644 --- a/x/ibc/light-clients/06-solomachine/types/update.go +++ b/x/ibc/light-clients/06-solomachine/types/update.go @@ -62,7 +62,12 @@ func checkHeader(cdc codec.BinaryMarshaler, clientState *ClientState, header *He return err } - if err := VerifySignature(clientState.ConsensusState.GetPubKey(), data, sigData); err != nil { + publicKey, err := clientState.ConsensusState.GetPubKey() + if err != nil { + return err + } + + if err := VerifySignature(publicKey, data, sigData); err != nil { return sdkerrors.Wrap(ErrInvalidHeader, err.Error()) } diff --git a/x/ibc/light-clients/06-solomachine/types/update_test.go b/x/ibc/light-clients/06-solomachine/types/update_test.go index a58b00dc48..74a29017b5 100644 --- a/x/ibc/light-clients/06-solomachine/types/update_test.go +++ b/x/ibc/light-clients/06-solomachine/types/update_test.go @@ -143,6 +143,16 @@ func (suite *SoloMachineTestSuite) TestCheckHeaderAndUpdateState() { }, false, }, + { + "consensus state public key is nil", + func() { + cs := solomachine.ClientState() + cs.ConsensusState.PublicKey = nil + clientState = cs + header = solomachine.CreateHeader() + }, + false, + }, } for _, tc := range testCases { From 136f3ade88930e1645fcf350a75cccfdcbc4d246 Mon Sep 17 00:00:00 2001 From: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Date: Wed, 11 Nov 2020 12:07:29 +0100 Subject: [PATCH 077/136] ibc: client params allowlist (#7855) * ibc: client params allowlist * genesis and gRPC * client * lint * spec * fixes * validate localhost client * move client types back to exported * update genesis * sort clients by id --- proto/ibc/core/client/v1/client.proto | 91 +- proto/ibc/core/client/v1/genesis.proto | 8 +- proto/ibc/core/client/v1/query.proto | 19 +- proto/ibc/core/client/v1/tx.proto | 93 + simapp/app.go | 3 +- x/ibc/applications/transfer/client/cli/cli.go | 1 + .../applications/transfer/client/cli/query.go | 4 +- x/ibc/applications/transfer/handler_test.go | 3 +- .../transfer/keeper/relay_test.go | 19 +- x/ibc/applications/transfer/module_test.go | 7 +- x/ibc/core/02-client/client/cli/cli.go | 1 + x/ibc/core/02-client/client/cli/query.go | 27 + x/ibc/core/02-client/genesis.go | 11 + x/ibc/core/02-client/keeper/client.go | 8 + x/ibc/core/02-client/keeper/client_test.go | 10 +- x/ibc/core/02-client/keeper/grpc_query.go | 17 +- .../core/02-client/keeper/grpc_query_test.go | 24 +- x/ibc/core/02-client/keeper/keeper.go | 16 +- x/ibc/core/02-client/keeper/keeper_test.go | 34 +- x/ibc/core/02-client/keeper/params.go | 23 + x/ibc/core/02-client/keeper/params_test.go | 17 + x/ibc/core/02-client/keeper/proposal_test.go | 6 +- x/ibc/core/02-client/proposal_handler_test.go | 3 +- x/ibc/core/02-client/types/client.go | 21 + x/ibc/core/02-client/types/client.pb.go | 2234 ++--------------- x/ibc/core/02-client/types/client_test.go | 3 +- x/ibc/core/02-client/types/genesis.go | 13 +- x/ibc/core/02-client/types/genesis.pb.go | 107 +- x/ibc/core/02-client/types/genesis_test.go | 137 +- x/ibc/core/02-client/types/params.go | 71 + x/ibc/core/02-client/types/params_test.go | 29 + x/ibc/core/02-client/types/query.pb.go | 452 +++- x/ibc/core/02-client/types/query.pb.gw.go | 62 + x/ibc/core/02-client/types/tx.pb.go | 2128 ++++++++++++++++ .../03-connection/keeper/grpc_query_test.go | 12 +- .../03-connection/keeper/handshake_test.go | 118 +- .../core/03-connection/keeper/keeper_test.go | 13 +- .../core/03-connection/keeper/verify_test.go | 14 +- .../core/04-channel/keeper/grpc_query_test.go | 6 +- .../core/04-channel/keeper/handshake_test.go | 66 +- x/ibc/core/04-channel/keeper/keeper_test.go | 3 +- x/ibc/core/04-channel/keeper/packet_test.go | 10 +- x/ibc/core/04-channel/keeper/timeout_test.go | 26 +- x/ibc/core/exported/client.go | 8 +- x/ibc/core/genesis_test.go | 7 +- x/ibc/core/keeper/grpc_query.go | 5 + x/ibc/core/keeper/keeper.go | 6 +- x/ibc/core/keeper/msg_server_test.go | 24 +- x/ibc/core/spec/07_params.md | 21 + x/ibc/core/spec/README.md | 1 + .../06-solomachine/types/client_state.go | 5 +- .../06-solomachine/types/client_state_test.go | 4 +- .../06-solomachine/types/consensus_state.go | 2 +- .../types/consensus_state_test.go | 3 +- .../06-solomachine/types/header.go | 2 +- .../06-solomachine/types/header_test.go | 3 +- .../06-solomachine/types/misbehaviour.go | 2 +- .../06-solomachine/types/misbehaviour_test.go | 3 +- .../06-solomachine/types/solomachine_test.go | 2 +- .../07-tendermint/types/client_state.go | 5 +- .../07-tendermint/types/client_state_test.go | 4 +- .../07-tendermint/types/consensus_state.go | 2 +- .../types/consensus_state_test.go | 9 +- .../07-tendermint/types/header.go | 2 +- .../07-tendermint/types/header_test.go | 3 +- .../07-tendermint/types/misbehaviour.go | 3 +- .../07-tendermint/types/misbehaviour_test.go | 3 +- .../types/proposal_handle_test.go | 7 +- .../07-tendermint/types/upgrade_test.go | 22 +- x/ibc/testing/chain.go | 11 +- x/ibc/testing/coordinator.go | 36 +- x/staking/types/staking.pb.go | 1184 +++++---- 72 files changed, 4291 insertions(+), 3068 deletions(-) create mode 100644 proto/ibc/core/client/v1/tx.proto create mode 100644 x/ibc/core/02-client/keeper/params.go create mode 100644 x/ibc/core/02-client/keeper/params_test.go create mode 100644 x/ibc/core/02-client/types/params.go create mode 100644 x/ibc/core/02-client/types/params_test.go create mode 100644 x/ibc/core/02-client/types/tx.pb.go create mode 100644 x/ibc/core/spec/07_params.md diff --git a/proto/ibc/core/client/v1/client.proto b/proto/ibc/core/client/v1/client.proto index 118318c246..a5d2b0f19e 100644 --- a/proto/ibc/core/client/v1/client.proto +++ b/proto/ibc/core/client/v1/client.proto @@ -6,91 +6,6 @@ option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/core/02-client/types"; import "gogoproto/gogo.proto"; import "google/protobuf/any.proto"; -// Msg defines the ibc/client Msg service. -service Msg { - // CreateClient defines a rpc handler method for MsgCreateClient. - rpc CreateClient(MsgCreateClient) returns (MsgCreateClientResponse); - - // UpdateClient defines a rpc handler method for MsgUpdateClient. - rpc UpdateClient(MsgUpdateClient) returns (MsgUpdateClientResponse); - - // UpgradeClient defines a rpc handler method for MsgUpgradeClient. - rpc UpgradeClient(MsgUpgradeClient) returns (MsgUpgradeClientResponse); - - // SubmitMisbehaviour defines a rpc handler method for MsgSubmitMisbehaviour. - rpc SubmitMisbehaviour(MsgSubmitMisbehaviour) returns (MsgSubmitMisbehaviourResponse); -} - -// MsgCreateClient defines a message to create an IBC client -message MsgCreateClient { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // client unique identifier - string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; - // light client state - google.protobuf.Any client_state = 2 [(gogoproto.moretags) = "yaml:\"client_state\""]; - // consensus state associated with the client that corresponds to a given - // height. - google.protobuf.Any consensus_state = 3 [(gogoproto.moretags) = "yaml:\"consensus_state\""]; - // signer address - string signer = 4; -} - -// MsgCreateClientResponse defines the Msg/CreateClient response type. -message MsgCreateClientResponse { } - -// MsgUpdateClient defines an sdk.Msg to update a IBC client state using -// the given header. -message MsgUpdateClient { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // client unique identifier - string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; - // header to update the light client - google.protobuf.Any header = 2; - // signer address - string signer = 3; -} - -// MsgUpdateClientResponse defines the Msg/UpdateClient response type. -message MsgUpdateClientResponse { } - -// MsgUpgradeClient defines an sdk.Msg to upgrade an IBC client to a new client state -message MsgUpgradeClient { - // client unique identifier - string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; - // upgraded client state - google.protobuf.Any client_state = 2 [(gogoproto.moretags) = "yaml:\"client_state\""]; - // height at which old chain halts and upgrades (i.e last block executed) - Height upgrade_height = 3 [(gogoproto.moretags) = "yaml:\"upgrade_height\""]; - // proof that old chain committed to new client - bytes proof_upgrade = 4 [(gogoproto.moretags) = "yaml:\"proof_upgrade\""]; - // signer address - string signer = 5; -} - -// MsgUpgradeClientResponse defines the Msg/UpgradeClient response type. -message MsgUpgradeClientResponse { } - -// MsgSubmitMisbehaviour defines an sdk.Msg type that submits Evidence for -// light client misbehaviour. -message MsgSubmitMisbehaviour { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // client unique identifier - string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; - // misbehaviour used for freezing the light client - google.protobuf.Any misbehaviour = 2; - // signer address - string signer = 3; -} - -// MsgSubmitMisbehaviourResponse defines the Msg/SubmitMisbehaviour response type. -message MsgSubmitMisbehaviourResponse { } - // IdentifiedClientState defines a client state with an additional client // identifier field. message IdentifiedClientState { @@ -151,3 +66,9 @@ message Height { // the height within the given version uint64 version_height = 2 [(gogoproto.moretags) = "yaml:\"version_height\""]; } + +// Params defines the set of IBC light client parameters. +message Params { + // allowed_clients defines the list of allowed client state types. + repeated string allowed_clients = 1 [(gogoproto.moretags) = "yaml:\"allowed_clients\""]; +} diff --git a/proto/ibc/core/client/v1/genesis.proto b/proto/ibc/core/client/v1/genesis.proto index 1041ca9448..110140e232 100644 --- a/proto/ibc/core/client/v1/genesis.proto +++ b/proto/ibc/core/client/v1/genesis.proto @@ -9,13 +9,17 @@ import "gogoproto/gogo.proto"; // GenesisState defines the ibc client submodule's genesis state. message GenesisState { // client states with their corresponding identifiers - repeated IdentifiedClientState clients = 1 [(gogoproto.nullable) = false]; + repeated IdentifiedClientState clients = 1 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "IdentifiedClientStates" + ]; // consensus states from each client repeated ClientConsensusStates clients_consensus = 2 [ (gogoproto.nullable) = false, (gogoproto.castrepeated) = "ClientsConsensusStates", (gogoproto.moretags) = "yaml:\"clients_consensus\"" ]; + Params params = 3 [ (gogoproto.nullable) = false]; // create localhost on initialization - bool create_localhost = 3 [(gogoproto.moretags) = "yaml:\"create_localhost\""]; + bool create_localhost = 4 [(gogoproto.moretags) = "yaml:\"create_localhost\""]; } diff --git a/proto/ibc/core/client/v1/query.proto b/proto/ibc/core/client/v1/query.proto index db580a260c..038b97bc46 100644 --- a/proto/ibc/core/client/v1/query.proto +++ b/proto/ibc/core/client/v1/query.proto @@ -33,6 +33,11 @@ service Query { rpc ConsensusStates(QueryConsensusStatesRequest) returns (QueryConsensusStatesResponse) { option (google.api.http).get = "/ibc/core/client/v1beta1/consensus_states/{client_id}"; } + + // ClientParams queries all parameters of the ibc client. + rpc ClientParams(QueryClientParamsRequest) returns (QueryClientParamsResponse) { + option (google.api.http).get = "/ibc/client/v1beta1/params"; + } } // QueryClientStateRequest is the request type for the Query/ClientState RPC @@ -65,7 +70,10 @@ message QueryClientStatesRequest { // method. message QueryClientStatesResponse { // list of stored ClientStates of the chain. - repeated IdentifiedClientState client_states = 1; + repeated IdentifiedClientState client_states = 1 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "IdentifiedClientStates" + ]; // pagination response cosmos.base.query.v1beta1.PageResponse pagination = 2; } @@ -113,3 +121,12 @@ message QueryConsensusStatesResponse { // pagination response cosmos.base.query.v1beta1.PageResponse pagination = 2; } + +// QueryClientParamsRequest is the request type for the Query/ClientParams RPC method. +message QueryClientParamsRequest {} + +// QueryClientParamsResponse is the response type for the Query/ClientParams RPC method. +message QueryClientParamsResponse { + // params defines the parameters of the module. + Params params = 1; +} diff --git a/proto/ibc/core/client/v1/tx.proto b/proto/ibc/core/client/v1/tx.proto new file mode 100644 index 0000000000..efe843cba4 --- /dev/null +++ b/proto/ibc/core/client/v1/tx.proto @@ -0,0 +1,93 @@ +syntax = "proto3"; +package ibc.core.client.v1; + +option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/core/02-client/types"; + +import "gogoproto/gogo.proto"; +import "google/protobuf/any.proto"; +import "ibc/core/client/v1/client.proto"; + +// Msg defines the ibc/client Msg service. +service Msg { + // CreateClient defines a rpc handler method for MsgCreateClient. + rpc CreateClient(MsgCreateClient) returns (MsgCreateClientResponse); + + // UpdateClient defines a rpc handler method for MsgUpdateClient. + rpc UpdateClient(MsgUpdateClient) returns (MsgUpdateClientResponse); + + // UpgradeClient defines a rpc handler method for MsgUpgradeClient. + rpc UpgradeClient(MsgUpgradeClient) returns (MsgUpgradeClientResponse); + + // SubmitMisbehaviour defines a rpc handler method for MsgSubmitMisbehaviour. + rpc SubmitMisbehaviour(MsgSubmitMisbehaviour) returns (MsgSubmitMisbehaviourResponse); +} + +// MsgCreateClient defines a message to create an IBC client +message MsgCreateClient { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // client unique identifier + string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; + // light client state + google.protobuf.Any client_state = 2 [(gogoproto.moretags) = "yaml:\"client_state\""]; + // consensus state associated with the client that corresponds to a given + // height. + google.protobuf.Any consensus_state = 3 [(gogoproto.moretags) = "yaml:\"consensus_state\""]; + // signer address + string signer = 4; +} + +// MsgCreateClientResponse defines the Msg/CreateClient response type. +message MsgCreateClientResponse { } + +// MsgUpdateClient defines an sdk.Msg to update a IBC client state using +// the given header. +message MsgUpdateClient { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // client unique identifier + string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; + // header to update the light client + google.protobuf.Any header = 2; + // signer address + string signer = 3; +} + +// MsgUpdateClientResponse defines the Msg/UpdateClient response type. +message MsgUpdateClientResponse { } + +// MsgUpgradeClient defines an sdk.Msg to upgrade an IBC client to a new client state +message MsgUpgradeClient { + // client unique identifier + string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; + // upgraded client state + google.protobuf.Any client_state = 2 [(gogoproto.moretags) = "yaml:\"client_state\""]; + // height at which old chain halts and upgrades (i.e last block executed) + Height upgrade_height = 3 [(gogoproto.moretags) = "yaml:\"upgrade_height\""]; + // proof that old chain committed to new client + bytes proof_upgrade = 4 [(gogoproto.moretags) = "yaml:\"proof_upgrade\""]; + // signer address + string signer = 5; +} + +// MsgUpgradeClientResponse defines the Msg/UpgradeClient response type. +message MsgUpgradeClientResponse { } + +// MsgSubmitMisbehaviour defines an sdk.Msg type that submits Evidence for +// light client misbehaviour. +message MsgSubmitMisbehaviour { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // client unique identifier + string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; + // misbehaviour used for freezing the light client + google.protobuf.Any misbehaviour = 2; + // signer address + string signer = 3; +} + +// MsgSubmitMisbehaviourResponse defines the Msg/SubmitMisbehaviour response type. +message MsgSubmitMisbehaviourResponse { } diff --git a/simapp/app.go b/simapp/app.go index a8c9e584be..8aaa007327 100644 --- a/simapp/app.go +++ b/simapp/app.go @@ -279,7 +279,7 @@ func NewSimApp( // Create IBC Keeper app.IBCKeeper = ibckeeper.NewKeeper( - appCodec, keys[ibchost.StoreKey], app.StakingKeeper, scopedIBCKeeper, + appCodec, keys[ibchost.StoreKey], app.GetSubspace(ibchost.ModuleName), app.StakingKeeper, scopedIBCKeeper, ) // register the proposal types @@ -609,6 +609,7 @@ func initParamsKeeper(appCodec codec.BinaryMarshaler, legacyAmino *codec.LegacyA paramsKeeper.Subspace(govtypes.ModuleName).WithKeyTable(govtypes.ParamKeyTable()) paramsKeeper.Subspace(crisistypes.ModuleName) paramsKeeper.Subspace(ibctransfertypes.ModuleName) + paramsKeeper.Subspace(ibchost.ModuleName) return paramsKeeper } diff --git a/x/ibc/applications/transfer/client/cli/cli.go b/x/ibc/applications/transfer/client/cli/cli.go index 9686afaa18..d3ca8341e9 100644 --- a/x/ibc/applications/transfer/client/cli/cli.go +++ b/x/ibc/applications/transfer/client/cli/cli.go @@ -18,6 +18,7 @@ func GetQueryCmd() *cobra.Command { queryCmd.AddCommand( GetCmdQueryDenomTrace(), GetCmdQueryDenomTraces(), + GetCmdParams(), ) return queryCmd diff --git a/x/ibc/applications/transfer/client/cli/query.go b/x/ibc/applications/transfer/client/cli/query.go index c0953d7ca6..3d158ed59a 100644 --- a/x/ibc/applications/transfer/client/cli/query.go +++ b/x/ibc/applications/transfer/client/cli/query.go @@ -86,8 +86,8 @@ func GetCmdQueryDenomTraces() *cobra.Command { return cmd } -// QueryParamsCmd returns the command handler for ibc-transfer parameter querying. -func QueryParamsCmd() *cobra.Command { +// GetCmdParams returns the command handler for ibc-transfer parameter querying. +func GetCmdParams() *cobra.Command { cmd := &cobra.Command{ Use: "params", Short: "Query the current ibc-transfer parameters", diff --git a/x/ibc/applications/transfer/handler_test.go b/x/ibc/applications/transfer/handler_test.go index fd6b686fe2..b1ee24f2ed 100644 --- a/x/ibc/applications/transfer/handler_test.go +++ b/x/ibc/applications/transfer/handler_test.go @@ -9,6 +9,7 @@ import ( "github.com/cosmos/cosmos-sdk/x/ibc/applications/transfer/types" clienttypes "github.com/cosmos/cosmos-sdk/x/ibc/core/02-client/types" channeltypes "github.com/cosmos/cosmos-sdk/x/ibc/core/04-channel/types" + "github.com/cosmos/cosmos-sdk/x/ibc/core/exported" ibctesting "github.com/cosmos/cosmos-sdk/x/ibc/testing" ) @@ -31,7 +32,7 @@ func (suite *TransferTestSuite) SetupTest() { // constructs a send from chainA to chainB on the established channel/connection // and sends the same coin back from chainB to chainA. func (suite *TransferTestSuite) TestHandleMsgTransfer() { - clientA, clientB, connA, connB := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, ibctesting.Tendermint) + clientA, clientB, connA, connB := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) channelA, channelB := suite.coordinator.CreateTransferChannels(suite.chainA, suite.chainB, connA, connB, channeltypes.UNORDERED) originalBalance := suite.chainA.App.BankKeeper.GetBalance(suite.chainA.GetContext(), suite.chainA.SenderAccount.GetAddress(), sdk.DefaultBondDenom) timeoutHeight := clienttypes.NewHeight(0, 110) diff --git a/x/ibc/applications/transfer/keeper/relay_test.go b/x/ibc/applications/transfer/keeper/relay_test.go index 738de9e80a..7878c59357 100644 --- a/x/ibc/applications/transfer/keeper/relay_test.go +++ b/x/ibc/applications/transfer/keeper/relay_test.go @@ -8,6 +8,7 @@ import ( clienttypes "github.com/cosmos/cosmos-sdk/x/ibc/core/02-client/types" channeltypes "github.com/cosmos/cosmos-sdk/x/ibc/core/04-channel/types" host "github.com/cosmos/cosmos-sdk/x/ibc/core/24-host" + "github.com/cosmos/cosmos-sdk/x/ibc/core/exported" ibctesting "github.com/cosmos/cosmos-sdk/x/ibc/testing" ) @@ -28,28 +29,28 @@ func (suite *KeeperTestSuite) TestSendTransfer() { }{ {"successful transfer from source chain", func() { - _, _, connA, connB := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, ibctesting.Tendermint) + _, _, connA, connB := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) channelA, channelB = suite.coordinator.CreateTransferChannels(suite.chainA, suite.chainB, connA, connB, channeltypes.UNORDERED) amount = sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(100)) }, true, true}, {"successful transfer with coin from counterparty chain", func() { // send coin from chainA back to chainB - _, _, connA, connB := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, ibctesting.Tendermint) + _, _, connA, connB := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) channelA, channelB = suite.coordinator.CreateTransferChannels(suite.chainA, suite.chainB, connA, connB, channeltypes.UNORDERED) amount = types.GetTransferCoin(channelA.PortID, channelA.ID, sdk.DefaultBondDenom, 100) }, false, true}, {"source channel not found", func() { // channel references wrong ID - _, _, connA, connB := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, ibctesting.Tendermint) + _, _, connA, connB := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) channelA, channelB = suite.coordinator.CreateTransferChannels(suite.chainA, suite.chainB, connA, connB, channeltypes.UNORDERED) channelA.ID = ibctesting.InvalidID amount = sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(100)) }, true, false}, {"next seq send not found", func() { - _, _, connA, connB := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, ibctesting.Tendermint) + _, _, connA, connB := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) channelA = connA.NextTestChannel(ibctesting.TransferPort) channelB = connB.NextTestChannel(ibctesting.TransferPort) // manually create channel so next seq send is never set @@ -66,20 +67,20 @@ func (suite *KeeperTestSuite) TestSendTransfer() { // - source chain {"send coin failed", func() { - _, _, connA, connB := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, ibctesting.Tendermint) + _, _, connA, connB := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) channelA, channelB = suite.coordinator.CreateTransferChannels(suite.chainA, suite.chainB, connA, connB, channeltypes.UNORDERED) amount = sdk.NewCoin("randomdenom", sdk.NewInt(100)) }, true, false}, // - receiving chain {"send from module account failed", func() { - _, _, connA, connB := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, ibctesting.Tendermint) + _, _, connA, connB := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) channelA, channelB = suite.coordinator.CreateTransferChannels(suite.chainA, suite.chainB, connA, connB, channeltypes.UNORDERED) amount = types.GetTransferCoin(channelA.PortID, channelA.ID, " randomdenom", 100) }, false, false}, {"channel capability not found", func() { - _, _, connA, connB := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, ibctesting.Tendermint) + _, _, connA, connB := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) channelA, channelB = suite.coordinator.CreateTransferChannels(suite.chainA, suite.chainB, connA, connB, channeltypes.UNORDERED) cap := suite.chainA.GetChannelCapability(channelA.PortID, channelA.ID) @@ -177,7 +178,7 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() { suite.Run(fmt.Sprintf("Case %s", tc.msg), func() { suite.SetupTest() // reset - clientA, clientB, connA, connB := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, ibctesting.Tendermint) + clientA, clientB, connA, connB := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) channelA, channelB = suite.coordinator.CreateTransferChannels(suite.chainA, suite.chainB, connA, connB, channeltypes.UNORDERED) receiver = suite.chainB.SenderAccount.GetAddress().String() // must be explicitly changed in malleate @@ -365,7 +366,7 @@ func (suite *KeeperTestSuite) TestOnTimeoutPacket() { suite.Run(fmt.Sprintf("Case %s", tc.msg), func() { suite.SetupTest() // reset - _, _, connA, connB := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, ibctesting.Tendermint) + _, _, connA, connB := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) channelA, channelB = suite.coordinator.CreateTransferChannels(suite.chainA, suite.chainB, connA, connB, channeltypes.UNORDERED) amount = sdk.NewInt(100) // must be explicitly changed sender = suite.chainA.SenderAccount.GetAddress().String() diff --git a/x/ibc/applications/transfer/module_test.go b/x/ibc/applications/transfer/module_test.go index 7f3cec0bde..b0d0fd10e4 100644 --- a/x/ibc/applications/transfer/module_test.go +++ b/x/ibc/applications/transfer/module_test.go @@ -5,6 +5,7 @@ import ( "github.com/cosmos/cosmos-sdk/x/ibc/applications/transfer/types" channeltypes "github.com/cosmos/cosmos-sdk/x/ibc/core/04-channel/types" host "github.com/cosmos/cosmos-sdk/x/ibc/core/24-host" + "github.com/cosmos/cosmos-sdk/x/ibc/core/exported" ibctesting "github.com/cosmos/cosmos-sdk/x/ibc/testing" ) @@ -54,7 +55,7 @@ func (suite *TransferTestSuite) TestOnChanOpenInit() { suite.Run(tc.name, func() { suite.SetupTest() // reset - _, _, connA, _ = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, ibctesting.Tendermint) + _, _, connA, _ = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) testChannel = connA.NextTestChannel(ibctesting.TransferPort) counterparty := channeltypes.NewCounterparty(testChannel.PortID, testChannel.ID) channel = &channeltypes.Channel{ @@ -142,7 +143,7 @@ func (suite *TransferTestSuite) TestOnChanOpenTry() { suite.Run(tc.name, func() { suite.SetupTest() // reset - _, _, connA, _ = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, ibctesting.Tendermint) + _, _, connA, _ = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) testChannel = connA.NextTestChannel(ibctesting.TransferPort) counterparty := channeltypes.NewCounterparty(testChannel.PortID, testChannel.ID) channel = &channeltypes.Channel{ @@ -208,7 +209,7 @@ func (suite *TransferTestSuite) TestOnChanOpenAck() { suite.Run(tc.name, func() { suite.SetupTest() // reset - _, _, connA, _ = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, ibctesting.Tendermint) + _, _, connA, _ = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) testChannel = connA.NextTestChannel(ibctesting.TransferPort) counterpartyVersion = types.Version diff --git a/x/ibc/core/02-client/client/cli/cli.go b/x/ibc/core/02-client/client/cli/cli.go index 32aafc82c7..375d8f6369 100644 --- a/x/ibc/core/02-client/client/cli/cli.go +++ b/x/ibc/core/02-client/client/cli/cli.go @@ -24,6 +24,7 @@ func GetQueryCmd() *cobra.Command { GetCmdQueryConsensusState(), GetCmdQueryHeader(), GetCmdNodeConsensusState(), + GetCmdParams(), ) return queryCmd diff --git a/x/ibc/core/02-client/client/cli/query.go b/x/ibc/core/02-client/client/cli/query.go index 9d4ad4c19d..0140cb7850 100644 --- a/x/ibc/core/02-client/client/cli/query.go +++ b/x/ibc/core/02-client/client/cli/query.go @@ -250,3 +250,30 @@ func GetCmdNodeConsensusState() *cobra.Command { return cmd } + +// GetCmdParams returns the command handler for ibc client parameter querying. +func GetCmdParams() *cobra.Command { + cmd := &cobra.Command{ + Use: "params", + Short: "Query the current ibc client parameters", + Long: "Query the current ibc client parameters", + Args: cobra.NoArgs, + Example: fmt.Sprintf("%s query %s %s params", version.AppName, host.ModuleName, types.SubModuleName), + RunE: func(cmd *cobra.Command, _ []string) error { + clientCtx := client.GetClientContextFromCmd(cmd) + clientCtx, err := client.ReadQueryCommandFlags(clientCtx, cmd.Flags()) + if err != nil { + return err + } + + queryClient := types.NewQueryClient(clientCtx) + + res, _ := queryClient.ClientParams(context.Background(), &types.QueryClientParamsRequest{}) + return clientCtx.PrintOutput(res.Params) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} diff --git a/x/ibc/core/02-client/genesis.go b/x/ibc/core/02-client/genesis.go index cda4f7ed7f..988e297c18 100644 --- a/x/ibc/core/02-client/genesis.go +++ b/x/ibc/core/02-client/genesis.go @@ -13,12 +13,18 @@ import ( // InitGenesis initializes the ibc client submodule's state from a provided genesis // state. func InitGenesis(ctx sdk.Context, k keeper.Keeper, gs types.GenesisState) { + k.SetParams(ctx, gs.Params) + for _, client := range gs.Clients { cs, ok := client.ClientState.GetCachedValue().(exported.ClientState) if !ok { panic("invalid client state") } + if !gs.Params.IsAllowedClient(cs.ClientType()) { + panic(fmt.Sprintf("client state type %s is not registered on the allowlist", cs.ClientType())) + } + k.SetClientState(ctx, client.ClientId, cs) } @@ -49,6 +55,10 @@ func InitGenesis(ctx sdk.Context, k keeper.Keeper, gs types.GenesisState) { ctx.ChainID(), types.NewHeight(version, uint64(ctx.BlockHeight())), ) + if err := clientState.Validate(); err != nil { + panic(err) + } + if err := k.CreateClient(ctx, exported.Localhost, clientState, nil); err != nil { panic(err) } @@ -61,6 +71,7 @@ func ExportGenesis(ctx sdk.Context, k keeper.Keeper) types.GenesisState { return types.GenesisState{ Clients: k.GetAllGenesisClients(ctx), ClientsConsensus: k.GetAllConsensusStates(ctx), + Params: k.GetParams(ctx), CreateLocalhost: false, } } diff --git a/x/ibc/core/02-client/keeper/client.go b/x/ibc/core/02-client/keeper/client.go index 49e9c62c88..83ecedc535 100644 --- a/x/ibc/core/02-client/keeper/client.go +++ b/x/ibc/core/02-client/keeper/client.go @@ -17,6 +17,14 @@ import ( func (k Keeper) CreateClient( ctx sdk.Context, clientID string, clientState exported.ClientState, consensusState exported.ConsensusState, ) error { + params := k.GetParams(ctx) + if !params.IsAllowedClient(clientState.ClientType()) { + return sdkerrors.Wrapf( + types.ErrInvalidClientType, + "client state type %s is not registered in the allowlist", clientState.ClientType(), + ) + } + _, found := k.GetClientState(ctx, clientID) if found { return sdkerrors.Wrapf(types.ErrClientExists, "cannot create client with ID %s", clientID) diff --git a/x/ibc/core/02-client/keeper/client_test.go b/x/ibc/core/02-client/keeper/client_test.go index 30528b88ca..0c700f907c 100644 --- a/x/ibc/core/02-client/keeper/client_test.go +++ b/x/ibc/core/02-client/keeper/client_test.go @@ -261,7 +261,7 @@ func (suite *KeeperTestSuite) TestUpgradeClient() { // commit upgrade store changes and update clients suite.coordinator.CommitBlock(suite.chainB) - err := suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, ibctesting.Tendermint) + err := suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) suite.Require().NoError(err) cs, found := suite.chainA.App.IBCKeeper.ClientKeeper.GetClientState(suite.chainA.GetContext(), clientA) @@ -286,7 +286,7 @@ func (suite *KeeperTestSuite) TestUpgradeClient() { // commit upgrade store changes and update clients suite.coordinator.CommitBlock(suite.chainB) - err := suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, ibctesting.Tendermint) + err := suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) suite.Require().NoError(err) cs, found := suite.chainA.App.IBCKeeper.ClientKeeper.GetClientState(suite.chainA.GetContext(), clientA) @@ -313,7 +313,7 @@ func (suite *KeeperTestSuite) TestUpgradeClient() { // commit upgrade store changes and update clients suite.coordinator.CommitBlock(suite.chainB) - err := suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, ibctesting.Tendermint) + err := suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) suite.Require().NoError(err) cs, found := suite.chainA.App.IBCKeeper.ClientKeeper.GetClientState(suite.chainA.GetContext(), clientA) @@ -345,7 +345,7 @@ func (suite *KeeperTestSuite) TestUpgradeClient() { upgradedClient = ibctmtypes.NewClientState("wrongchainID", ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, newClientHeight, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, true, true) suite.coordinator.CommitBlock(suite.chainB) - err := suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, ibctesting.Tendermint) + err := suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) suite.Require().NoError(err) cs, found := suite.chainA.App.IBCKeeper.ClientKeeper.GetClientState(suite.chainA.GetContext(), clientA) @@ -359,7 +359,7 @@ func (suite *KeeperTestSuite) TestUpgradeClient() { for _, tc := range testCases { tc := tc - clientA, _ = suite.coordinator.SetupClients(suite.chainA, suite.chainB, ibctesting.Tendermint) + clientA, _ = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) tc.setup() diff --git a/x/ibc/core/02-client/keeper/grpc_query.go b/x/ibc/core/02-client/keeper/grpc_query.go index 8bb5306897..9f4bb6c808 100644 --- a/x/ibc/core/02-client/keeper/grpc_query.go +++ b/x/ibc/core/02-client/keeper/grpc_query.go @@ -3,6 +3,7 @@ package keeper import ( "context" "fmt" + "sort" "strings" "google.golang.org/grpc/codes" @@ -58,7 +59,7 @@ func (q Keeper) ClientStates(c context.Context, req *types.QueryClientStatesRequ ctx := sdk.UnwrapSDKContext(c) - clientStates := []*types.IdentifiedClientState{} + clientStates := types.IdentifiedClientStates{} store := prefix.NewStore(ctx.KVStore(q.storeKey), host.KeyClientStorePrefix) pageRes, err := query.Paginate(store, req.Pagination, func(key, value []byte) error { @@ -78,7 +79,7 @@ func (q Keeper) ClientStates(c context.Context, req *types.QueryClientStatesRequ } identifiedClient := types.NewIdentifiedClientState(clientID, clientState) - clientStates = append(clientStates, &identifiedClient) + clientStates = append(clientStates, identifiedClient) return nil }) @@ -86,6 +87,8 @@ func (q Keeper) ClientStates(c context.Context, req *types.QueryClientStatesRequ return nil, err } + sort.Sort(clientStates) + return &types.QueryClientStatesResponse{ ClientStates: clientStates, Pagination: pageRes, @@ -178,3 +181,13 @@ func (q Keeper) ConsensusStates(c context.Context, req *types.QueryConsensusStat Pagination: pageRes, }, nil } + +// ClientParams implements the Query/ClientParams gRPC method +func (q Keeper) ClientParams(c context.Context, _ *types.QueryClientParamsRequest) (*types.QueryClientParamsResponse, error) { + ctx := sdk.UnwrapSDKContext(c) + params := q.GetParams(ctx) + + return &types.QueryClientParamsResponse{ + Params: ¶ms, + }, nil +} diff --git a/x/ibc/core/02-client/keeper/grpc_query_test.go b/x/ibc/core/02-client/keeper/grpc_query_test.go index b99d290f84..d111f540a9 100644 --- a/x/ibc/core/02-client/keeper/grpc_query_test.go +++ b/x/ibc/core/02-client/keeper/grpc_query_test.go @@ -82,7 +82,7 @@ func (suite *KeeperTestSuite) TestQueryClientState() { func (suite *KeeperTestSuite) TestQueryClientStates() { var ( req *types.QueryClientStatesRequest - expClientStates = []*types.IdentifiedClientState(nil) + expClientStates = types.IdentifiedClientStates{} ) testCases := []struct { @@ -112,8 +112,8 @@ func (suite *KeeperTestSuite) TestQueryClientStates() { { "success", func() { - clientA1, _ := suite.coordinator.SetupClients(suite.chainA, suite.chainB, ibctesting.Tendermint) - clientA2, _ := suite.coordinator.CreateClient(suite.chainA, suite.chainB, ibctesting.Tendermint) + clientA1, _ := suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) + clientA2, _ := suite.coordinator.CreateClient(suite.chainA, suite.chainB, exported.Tendermint) clientStateA1 := suite.chainA.GetClientState(clientA1) clientStateA2 := suite.chainA.GetClientState(clientA2) @@ -122,7 +122,7 @@ func (suite *KeeperTestSuite) TestQueryClientStates() { idcs2 := types.NewIdentifiedClientState(clientA2, clientStateA2) // order is sorted by client id, localhost is last - expClientStates = []*types.IdentifiedClientState{&idcs, &idcs2} + expClientStates = types.IdentifiedClientStates{idcs, idcs2}.Sort() req = &types.QueryClientStatesRequest{ Pagination: &query.PageRequest{ Limit: 7, @@ -144,7 +144,7 @@ func (suite *KeeperTestSuite) TestQueryClientStates() { // always add localhost which is created by default in init genesis localhostClientState := suite.chainA.GetClientState(exported.Localhost) identifiedLocalhost := types.NewIdentifiedClientState(exported.Localhost, localhostClientState) - expClientStates = append(expClientStates, &identifiedLocalhost) + expClientStates = append(expClientStates, identifiedLocalhost) ctx := sdk.WrapSDKContext(suite.chainA.GetContext()) @@ -153,12 +153,7 @@ func (suite *KeeperTestSuite) TestQueryClientStates() { if tc.expPass { suite.Require().NoError(err) suite.Require().NotNil(res) - suite.Require().Equal(len(expClientStates), len(res.ClientStates)) - for i := range expClientStates { - suite.Require().Equal(expClientStates[i].ClientId, res.ClientStates[i].ClientId) - suite.Require().NotNil(res.ClientStates[i].ClientState) - suite.Require().Equal(expClientStates[i].ClientState, res.ClientStates[i].ClientState) - } + suite.Require().Equal(expClientStates.Sort(), res.ClientStates) } else { suite.Require().Error(err) } @@ -364,3 +359,10 @@ func (suite *KeeperTestSuite) TestQueryConsensusStates() { }) } } + +func (suite *KeeperTestSuite) TestQueryParams() { + ctx := sdk.WrapSDKContext(suite.chainA.GetContext()) + expParams := types.DefaultParams() + res, _ := suite.queryClient.ClientParams(ctx, &types.QueryClientParamsRequest{}) + suite.Require().Equal(&expParams, res.Params) +} diff --git a/x/ibc/core/02-client/keeper/keeper.go b/x/ibc/core/02-client/keeper/keeper.go index 7c68499f8a..96632fc171 100644 --- a/x/ibc/core/02-client/keeper/keeper.go +++ b/x/ibc/core/02-client/keeper/keeper.go @@ -18,6 +18,7 @@ import ( host "github.com/cosmos/cosmos-sdk/x/ibc/core/24-host" "github.com/cosmos/cosmos-sdk/x/ibc/core/exported" ibctmtypes "github.com/cosmos/cosmos-sdk/x/ibc/light-clients/07-tendermint/types" + paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" ) @@ -26,14 +27,21 @@ import ( type Keeper struct { storeKey sdk.StoreKey cdc codec.BinaryMarshaler + paramSpace paramtypes.Subspace stakingKeeper types.StakingKeeper } // NewKeeper creates a new NewKeeper instance -func NewKeeper(cdc codec.BinaryMarshaler, key sdk.StoreKey, sk types.StakingKeeper) Keeper { +func NewKeeper(cdc codec.BinaryMarshaler, key sdk.StoreKey, paramSpace paramtypes.Subspace, sk types.StakingKeeper) Keeper { + // set KeyTable if it has not already been set + if !paramSpace.HasKeyTable() { + paramSpace = paramSpace.WithKeyTable(types.ParamKeyTable()) + } + return Keeper{ storeKey: key, cdc: cdc, + paramSpace: paramSpace, stakingKeeper: sk, } } @@ -107,12 +115,14 @@ func (k Keeper) IterateConsensusStates(ctx sdk.Context, cb func(clientID string, } // GetAllGenesisClients returns all the clients in state with their client ids returned as IdentifiedClientState -func (k Keeper) GetAllGenesisClients(ctx sdk.Context) (genClients []types.IdentifiedClientState) { +func (k Keeper) GetAllGenesisClients(ctx sdk.Context) types.IdentifiedClientStates { + var genClients types.IdentifiedClientStates k.IterateClients(ctx, func(clientID string, cs exported.ClientState) bool { genClients = append(genClients, types.NewIdentifiedClientState(clientID, cs)) return false }) - return + + return genClients.Sort() } // GetAllConsensusStates returns all stored client consensus states. diff --git a/x/ibc/core/02-client/keeper/keeper_test.go b/x/ibc/core/02-client/keeper/keeper_test.go index d5e162b09e..1f2c09ac5f 100644 --- a/x/ibc/core/02-client/keeper/keeper_test.go +++ b/x/ibc/core/02-client/keeper/keeper_test.go @@ -243,30 +243,6 @@ func (suite *KeeperTestSuite) TestValidateSelfClient() { } } -func (suite KeeperTestSuite) TestGetAllClients() { - clientIDs := []string{ - testClientID2, testClientID3, testClientID, - } - expClients := []exported.ClientState{ - ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, types.ZeroHeight(), ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), - ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, types.ZeroHeight(), ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), - ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, types.ZeroHeight(), ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), - } - - for i := range expClients { - suite.chainA.App.IBCKeeper.ClientKeeper.SetClientState(suite.chainA.GetContext(), clientIDs[i], expClients[i]) - } - - // add localhost client - localHostClient, found := suite.chainA.App.IBCKeeper.ClientKeeper.GetClientState(suite.chainA.GetContext(), exported.Localhost) - suite.Require().True(found) - expClients = append(expClients, localHostClient) - - clients := suite.chainA.App.IBCKeeper.ClientKeeper.GetAllClients(suite.chainA.GetContext()) - suite.Require().Len(clients, len(expClients)) - suite.Require().Equal(expClients, clients) -} - func (suite KeeperTestSuite) TestGetAllGenesisClients() { clientIDs := []string{ testClientID2, testClientID3, testClientID, @@ -277,7 +253,7 @@ func (suite KeeperTestSuite) TestGetAllGenesisClients() { ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, types.ZeroHeight(), ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), } - expGenClients := make([]types.IdentifiedClientState, len(expClients)) + expGenClients := make(types.IdentifiedClientStates, len(expClients)) for i := range expClients { suite.chainA.App.IBCKeeper.ClientKeeper.SetClientState(suite.chainA.GetContext(), clientIDs[i], expClients[i]) @@ -291,7 +267,7 @@ func (suite KeeperTestSuite) TestGetAllGenesisClients() { genClients := suite.chainA.App.IBCKeeper.ClientKeeper.GetAllGenesisClients(suite.chainA.GetContext()) - suite.Require().Equal(expGenClients, genClients) + suite.Require().Equal(expGenClients.Sort(), genClients) } func (suite KeeperTestSuite) TestGetConsensusState() { @@ -347,7 +323,7 @@ func (suite KeeperTestSuite) TestConsensusStateHelpers() { // 2 clients in total are created on chainA. The first client is updated so it contains an initial consensus state // and a consensus state at the update height. func (suite KeeperTestSuite) TestGetAllConsensusStates() { - clientA, _ := suite.coordinator.SetupClients(suite.chainA, suite.chainB, ibctesting.Tendermint) + clientA, _ := suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) clientState := suite.chainA.GetClientState(clientA) expConsensusHeight0 := clientState.GetLatestHeight() @@ -355,7 +331,7 @@ func (suite KeeperTestSuite) TestGetAllConsensusStates() { suite.Require().True(ok) // update client to create a second consensus state - err := suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, ibctesting.Tendermint) + err := suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) suite.Require().NoError(err) clientState = suite.chainA.GetClientState(clientA) @@ -370,7 +346,7 @@ func (suite KeeperTestSuite) TestGetAllConsensusStates() { } // create second client on chainA - clientA2, _ := suite.coordinator.SetupClients(suite.chainA, suite.chainB, ibctesting.Tendermint) + clientA2, _ := suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) clientState = suite.chainA.GetClientState(clientA2) expConsensusHeight2 := clientState.GetLatestHeight() diff --git a/x/ibc/core/02-client/keeper/params.go b/x/ibc/core/02-client/keeper/params.go new file mode 100644 index 0000000000..04f4a25637 --- /dev/null +++ b/x/ibc/core/02-client/keeper/params.go @@ -0,0 +1,23 @@ +package keeper + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/ibc/core/02-client/types" +) + +// GetAllowedClients retrieves the receive enabled boolean from the paramstore +func (k Keeper) GetAllowedClients(ctx sdk.Context) []string { + var res []string + k.paramSpace.Get(ctx, types.KeyAllowedClients, &res) + return res +} + +// GetParams returns the total set of ibc-transfer parameters. +func (k Keeper) GetParams(ctx sdk.Context) types.Params { + return types.NewParams(k.GetAllowedClients(ctx)...) +} + +// SetParams sets the total set of ibc-transfer parameters. +func (k Keeper) SetParams(ctx sdk.Context, params types.Params) { + k.paramSpace.SetParamSet(ctx, ¶ms) +} diff --git a/x/ibc/core/02-client/keeper/params_test.go b/x/ibc/core/02-client/keeper/params_test.go new file mode 100644 index 0000000000..9df0859710 --- /dev/null +++ b/x/ibc/core/02-client/keeper/params_test.go @@ -0,0 +1,17 @@ +package keeper_test + +import ( + "github.com/cosmos/cosmos-sdk/x/ibc/core/02-client/types" +) + +func (suite *KeeperTestSuite) TestParams() { + expParams := types.DefaultParams() + + params := suite.chainA.App.IBCKeeper.ClientKeeper.GetParams(suite.chainA.GetContext()) + suite.Require().Equal(expParams, params) + + expParams.AllowedClients = []string{} + suite.chainA.App.IBCKeeper.ClientKeeper.SetParams(suite.chainA.GetContext(), expParams) + params = suite.chainA.App.IBCKeeper.ClientKeeper.GetParams(suite.chainA.GetContext()) + suite.Require().Empty(expParams.AllowedClients) +} diff --git a/x/ibc/core/02-client/keeper/proposal_test.go b/x/ibc/core/02-client/keeper/proposal_test.go index ea5cd372fa..ada205402b 100644 --- a/x/ibc/core/02-client/keeper/proposal_test.go +++ b/x/ibc/core/02-client/keeper/proposal_test.go @@ -21,7 +21,7 @@ func (suite *KeeperTestSuite) TestClientUpdateProposal() { }{ { "valid update client proposal", func() { - clientA, _ := suite.coordinator.SetupClients(suite.chainA, suite.chainB, ibctesting.Tendermint) + clientA, _ := suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) clientState := suite.chainA.GetClientState(clientA) tmClientState, ok := clientState.(*ibctmtypes.ClientState) @@ -58,14 +58,14 @@ func (suite *KeeperTestSuite) TestClientUpdateProposal() { }, { "cannot unpack header, header is nil", func() { - clientA, _ := suite.coordinator.SetupClients(suite.chainA, suite.chainB, ibctesting.Tendermint) + clientA, _ := suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) content = &clienttypes.ClientUpdateProposal{ibctesting.Title, ibctesting.Description, clientA, nil} }, false, }, { "update fails", func() { header := &ibctmtypes.Header{} - clientA, _ := suite.coordinator.SetupClients(suite.chainA, suite.chainB, ibctesting.Tendermint) + clientA, _ := suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) content, err = clienttypes.NewClientUpdateProposal(ibctesting.Title, ibctesting.Description, clientA, header) suite.Require().NoError(err) }, false, diff --git a/x/ibc/core/02-client/proposal_handler_test.go b/x/ibc/core/02-client/proposal_handler_test.go index 839dd2e532..91c1451b70 100644 --- a/x/ibc/core/02-client/proposal_handler_test.go +++ b/x/ibc/core/02-client/proposal_handler_test.go @@ -6,6 +6,7 @@ import ( govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" client "github.com/cosmos/cosmos-sdk/x/ibc/core/02-client" clienttypes "github.com/cosmos/cosmos-sdk/x/ibc/core/02-client/types" + "github.com/cosmos/cosmos-sdk/x/ibc/core/exported" ibctmtypes "github.com/cosmos/cosmos-sdk/x/ibc/light-clients/07-tendermint/types" ibctesting "github.com/cosmos/cosmos-sdk/x/ibc/testing" ) @@ -23,7 +24,7 @@ func (suite *ClientTestSuite) TestNewClientUpdateProposalHandler() { }{ { "valid update client proposal", func() { - clientA, _ := suite.coordinator.SetupClients(suite.chainA, suite.chainB, ibctesting.Tendermint) + clientA, _ := suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) clientState := suite.chainA.GetClientState(clientA) tmClientState, ok := clientState.(*ibctmtypes.ClientState) diff --git a/x/ibc/core/02-client/types/client.go b/x/ibc/core/02-client/types/client.go index 99fe98e19e..305b07cec4 100644 --- a/x/ibc/core/02-client/types/client.go +++ b/x/ibc/core/02-client/types/client.go @@ -2,6 +2,7 @@ package types import ( "fmt" + "sort" proto "github.com/gogo/protobuf/proto" @@ -37,6 +38,26 @@ func (ics IdentifiedClientState) UnpackInterfaces(unpacker codectypes.AnyUnpacke return unpacker.UnpackAny(ics.ClientState, new(exported.ClientState)) } +var _ sort.Interface = IdentifiedClientStates{} + +// IdentifiedClientStates defines a slice of ClientConsensusStates that supports the sort interface +type IdentifiedClientStates []IdentifiedClientState + +// Len implements sort.Interface +func (ics IdentifiedClientStates) Len() int { return len(ics) } + +// Less implements sort.Interface +func (ics IdentifiedClientStates) Less(i, j int) bool { return ics[i].ClientId < ics[j].ClientId } + +// Swap implements sort.Interface +func (ics IdentifiedClientStates) Swap(i, j int) { ics[i], ics[j] = ics[j], ics[i] } + +// Sort is a helper function to sort the set of IdentifiedClientStates in place +func (ics IdentifiedClientStates) Sort() IdentifiedClientStates { + sort.Sort(ics) + return ics +} + // NewConsensusStateWithHeight creates a new ConsensusStateWithHeight instance func NewConsensusStateWithHeight(height Height, consensusState exported.ConsensusState) ConsensusStateWithHeight { msg, ok := consensusState.(proto.Message) diff --git a/x/ibc/core/02-client/types/client.pb.go b/x/ibc/core/02-client/types/client.pb.go index aa9bd5c3d3..95fc58c339 100644 --- a/x/ibc/core/02-client/types/client.pb.go +++ b/x/ibc/core/02-client/types/client.pb.go @@ -4,15 +4,10 @@ package types import ( - context "context" fmt "fmt" types "github.com/cosmos/cosmos-sdk/codec/types" _ "github.com/gogo/protobuf/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" proto "github.com/gogo/protobuf/proto" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" io "io" math "math" math_bits "math/bits" @@ -29,370 +24,6 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -// MsgCreateClient defines a message to create an IBC client -type MsgCreateClient struct { - // client unique identifier - ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty" yaml:"client_id"` - // light client state - ClientState *types.Any `protobuf:"bytes,2,opt,name=client_state,json=clientState,proto3" json:"client_state,omitempty" yaml:"client_state"` - // consensus state associated with the client that corresponds to a given - // height. - ConsensusState *types.Any `protobuf:"bytes,3,opt,name=consensus_state,json=consensusState,proto3" json:"consensus_state,omitempty" yaml:"consensus_state"` - // signer address - Signer string `protobuf:"bytes,4,opt,name=signer,proto3" json:"signer,omitempty"` -} - -func (m *MsgCreateClient) Reset() { *m = MsgCreateClient{} } -func (m *MsgCreateClient) String() string { return proto.CompactTextString(m) } -func (*MsgCreateClient) ProtoMessage() {} -func (*MsgCreateClient) Descriptor() ([]byte, []int) { - return fileDescriptor_b6bc4c8185546947, []int{0} -} -func (m *MsgCreateClient) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgCreateClient) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgCreateClient.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgCreateClient) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgCreateClient.Merge(m, src) -} -func (m *MsgCreateClient) XXX_Size() int { - return m.Size() -} -func (m *MsgCreateClient) XXX_DiscardUnknown() { - xxx_messageInfo_MsgCreateClient.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgCreateClient proto.InternalMessageInfo - -// MsgCreateClientResponse defines the Msg/CreateClient response type. -type MsgCreateClientResponse struct { -} - -func (m *MsgCreateClientResponse) Reset() { *m = MsgCreateClientResponse{} } -func (m *MsgCreateClientResponse) String() string { return proto.CompactTextString(m) } -func (*MsgCreateClientResponse) ProtoMessage() {} -func (*MsgCreateClientResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_b6bc4c8185546947, []int{1} -} -func (m *MsgCreateClientResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgCreateClientResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgCreateClientResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgCreateClientResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgCreateClientResponse.Merge(m, src) -} -func (m *MsgCreateClientResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgCreateClientResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgCreateClientResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgCreateClientResponse proto.InternalMessageInfo - -// MsgUpdateClient defines an sdk.Msg to update a IBC client state using -// the given header. -type MsgUpdateClient struct { - // client unique identifier - ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty" yaml:"client_id"` - // header to update the light client - Header *types.Any `protobuf:"bytes,2,opt,name=header,proto3" json:"header,omitempty"` - // signer address - Signer string `protobuf:"bytes,3,opt,name=signer,proto3" json:"signer,omitempty"` -} - -func (m *MsgUpdateClient) Reset() { *m = MsgUpdateClient{} } -func (m *MsgUpdateClient) String() string { return proto.CompactTextString(m) } -func (*MsgUpdateClient) ProtoMessage() {} -func (*MsgUpdateClient) Descriptor() ([]byte, []int) { - return fileDescriptor_b6bc4c8185546947, []int{2} -} -func (m *MsgUpdateClient) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgUpdateClient) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgUpdateClient.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgUpdateClient) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgUpdateClient.Merge(m, src) -} -func (m *MsgUpdateClient) XXX_Size() int { - return m.Size() -} -func (m *MsgUpdateClient) XXX_DiscardUnknown() { - xxx_messageInfo_MsgUpdateClient.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgUpdateClient proto.InternalMessageInfo - -// MsgUpdateClientResponse defines the Msg/UpdateClient response type. -type MsgUpdateClientResponse struct { -} - -func (m *MsgUpdateClientResponse) Reset() { *m = MsgUpdateClientResponse{} } -func (m *MsgUpdateClientResponse) String() string { return proto.CompactTextString(m) } -func (*MsgUpdateClientResponse) ProtoMessage() {} -func (*MsgUpdateClientResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_b6bc4c8185546947, []int{3} -} -func (m *MsgUpdateClientResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgUpdateClientResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgUpdateClientResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgUpdateClientResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgUpdateClientResponse.Merge(m, src) -} -func (m *MsgUpdateClientResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgUpdateClientResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgUpdateClientResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgUpdateClientResponse proto.InternalMessageInfo - -// MsgUpgradeClient defines an sdk.Msg to upgrade an IBC client to a new client state -type MsgUpgradeClient struct { - // client unique identifier - ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty" yaml:"client_id"` - // upgraded client state - ClientState *types.Any `protobuf:"bytes,2,opt,name=client_state,json=clientState,proto3" json:"client_state,omitempty" yaml:"client_state"` - // height at which old chain halts and upgrades (i.e last block executed) - UpgradeHeight *Height `protobuf:"bytes,3,opt,name=upgrade_height,json=upgradeHeight,proto3" json:"upgrade_height,omitempty" yaml:"upgrade_height"` - // proof that old chain committed to new client - ProofUpgrade []byte `protobuf:"bytes,4,opt,name=proof_upgrade,json=proofUpgrade,proto3" json:"proof_upgrade,omitempty" yaml:"proof_upgrade"` - // signer address - Signer string `protobuf:"bytes,5,opt,name=signer,proto3" json:"signer,omitempty"` -} - -func (m *MsgUpgradeClient) Reset() { *m = MsgUpgradeClient{} } -func (m *MsgUpgradeClient) String() string { return proto.CompactTextString(m) } -func (*MsgUpgradeClient) ProtoMessage() {} -func (*MsgUpgradeClient) Descriptor() ([]byte, []int) { - return fileDescriptor_b6bc4c8185546947, []int{4} -} -func (m *MsgUpgradeClient) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgUpgradeClient) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgUpgradeClient.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgUpgradeClient) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgUpgradeClient.Merge(m, src) -} -func (m *MsgUpgradeClient) XXX_Size() int { - return m.Size() -} -func (m *MsgUpgradeClient) XXX_DiscardUnknown() { - xxx_messageInfo_MsgUpgradeClient.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgUpgradeClient proto.InternalMessageInfo - -func (m *MsgUpgradeClient) GetClientId() string { - if m != nil { - return m.ClientId - } - return "" -} - -func (m *MsgUpgradeClient) GetClientState() *types.Any { - if m != nil { - return m.ClientState - } - return nil -} - -func (m *MsgUpgradeClient) GetUpgradeHeight() *Height { - if m != nil { - return m.UpgradeHeight - } - return nil -} - -func (m *MsgUpgradeClient) GetProofUpgrade() []byte { - if m != nil { - return m.ProofUpgrade - } - return nil -} - -func (m *MsgUpgradeClient) GetSigner() string { - if m != nil { - return m.Signer - } - return "" -} - -// MsgUpgradeClientResponse defines the Msg/UpgradeClient response type. -type MsgUpgradeClientResponse struct { -} - -func (m *MsgUpgradeClientResponse) Reset() { *m = MsgUpgradeClientResponse{} } -func (m *MsgUpgradeClientResponse) String() string { return proto.CompactTextString(m) } -func (*MsgUpgradeClientResponse) ProtoMessage() {} -func (*MsgUpgradeClientResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_b6bc4c8185546947, []int{5} -} -func (m *MsgUpgradeClientResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgUpgradeClientResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgUpgradeClientResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgUpgradeClientResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgUpgradeClientResponse.Merge(m, src) -} -func (m *MsgUpgradeClientResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgUpgradeClientResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgUpgradeClientResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgUpgradeClientResponse proto.InternalMessageInfo - -// MsgSubmitMisbehaviour defines an sdk.Msg type that submits Evidence for -// light client misbehaviour. -type MsgSubmitMisbehaviour struct { - // client unique identifier - ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty" yaml:"client_id"` - // misbehaviour used for freezing the light client - Misbehaviour *types.Any `protobuf:"bytes,2,opt,name=misbehaviour,proto3" json:"misbehaviour,omitempty"` - // signer address - Signer string `protobuf:"bytes,3,opt,name=signer,proto3" json:"signer,omitempty"` -} - -func (m *MsgSubmitMisbehaviour) Reset() { *m = MsgSubmitMisbehaviour{} } -func (m *MsgSubmitMisbehaviour) String() string { return proto.CompactTextString(m) } -func (*MsgSubmitMisbehaviour) ProtoMessage() {} -func (*MsgSubmitMisbehaviour) Descriptor() ([]byte, []int) { - return fileDescriptor_b6bc4c8185546947, []int{6} -} -func (m *MsgSubmitMisbehaviour) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgSubmitMisbehaviour) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgSubmitMisbehaviour.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgSubmitMisbehaviour) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgSubmitMisbehaviour.Merge(m, src) -} -func (m *MsgSubmitMisbehaviour) XXX_Size() int { - return m.Size() -} -func (m *MsgSubmitMisbehaviour) XXX_DiscardUnknown() { - xxx_messageInfo_MsgSubmitMisbehaviour.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgSubmitMisbehaviour proto.InternalMessageInfo - -// MsgSubmitMisbehaviourResponse defines the Msg/SubmitMisbehaviour response type. -type MsgSubmitMisbehaviourResponse struct { -} - -func (m *MsgSubmitMisbehaviourResponse) Reset() { *m = MsgSubmitMisbehaviourResponse{} } -func (m *MsgSubmitMisbehaviourResponse) String() string { return proto.CompactTextString(m) } -func (*MsgSubmitMisbehaviourResponse) ProtoMessage() {} -func (*MsgSubmitMisbehaviourResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_b6bc4c8185546947, []int{7} -} -func (m *MsgSubmitMisbehaviourResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgSubmitMisbehaviourResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgSubmitMisbehaviourResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgSubmitMisbehaviourResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgSubmitMisbehaviourResponse.Merge(m, src) -} -func (m *MsgSubmitMisbehaviourResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgSubmitMisbehaviourResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgSubmitMisbehaviourResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgSubmitMisbehaviourResponse proto.InternalMessageInfo - // IdentifiedClientState defines a client state with an additional client // identifier field. type IdentifiedClientState struct { @@ -406,7 +37,7 @@ func (m *IdentifiedClientState) Reset() { *m = IdentifiedClientState{} } func (m *IdentifiedClientState) String() string { return proto.CompactTextString(m) } func (*IdentifiedClientState) ProtoMessage() {} func (*IdentifiedClientState) Descriptor() ([]byte, []int) { - return fileDescriptor_b6bc4c8185546947, []int{8} + return fileDescriptor_b6bc4c8185546947, []int{0} } func (m *IdentifiedClientState) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -461,7 +92,7 @@ func (m *ConsensusStateWithHeight) Reset() { *m = ConsensusStateWithHeig func (m *ConsensusStateWithHeight) String() string { return proto.CompactTextString(m) } func (*ConsensusStateWithHeight) ProtoMessage() {} func (*ConsensusStateWithHeight) Descriptor() ([]byte, []int) { - return fileDescriptor_b6bc4c8185546947, []int{9} + return fileDescriptor_b6bc4c8185546947, []int{1} } func (m *ConsensusStateWithHeight) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -517,7 +148,7 @@ func (m *ClientConsensusStates) Reset() { *m = ClientConsensusStates{} } func (m *ClientConsensusStates) String() string { return proto.CompactTextString(m) } func (*ClientConsensusStates) ProtoMessage() {} func (*ClientConsensusStates) Descriptor() ([]byte, []int) { - return fileDescriptor_b6bc4c8185546947, []int{10} + return fileDescriptor_b6bc4c8185546947, []int{2} } func (m *ClientConsensusStates) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -578,7 +209,7 @@ func (m *ClientUpdateProposal) Reset() { *m = ClientUpdateProposal{} } func (m *ClientUpdateProposal) String() string { return proto.CompactTextString(m) } func (*ClientUpdateProposal) ProtoMessage() {} func (*ClientUpdateProposal) Descriptor() ([]byte, []int) { - return fileDescriptor_b6bc4c8185546947, []int{11} + return fileDescriptor_b6bc4c8185546947, []int{3} } func (m *ClientUpdateProposal) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -626,7 +257,7 @@ type Height struct { func (m *Height) Reset() { *m = Height{} } func (*Height) ProtoMessage() {} func (*Height) Descriptor() ([]byte, []int) { - return fileDescriptor_b6bc4c8185546947, []int{12} + return fileDescriptor_b6bc4c8185546947, []int{4} } func (m *Height) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -655,593 +286,102 @@ func (m *Height) XXX_DiscardUnknown() { var xxx_messageInfo_Height proto.InternalMessageInfo +// Params defines the set of IBC light client parameters. +type Params struct { + // allowed_clients defines the list of allowed client state types. + AllowedClients []string `protobuf:"bytes,1,rep,name=allowed_clients,json=allowedClients,proto3" json:"allowed_clients,omitempty" yaml:"allowed_clients"` +} + +func (m *Params) Reset() { *m = Params{} } +func (m *Params) String() string { return proto.CompactTextString(m) } +func (*Params) ProtoMessage() {} +func (*Params) Descriptor() ([]byte, []int) { + return fileDescriptor_b6bc4c8185546947, []int{5} +} +func (m *Params) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Params.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Params) XXX_Merge(src proto.Message) { + xxx_messageInfo_Params.Merge(m, src) +} +func (m *Params) XXX_Size() int { + return m.Size() +} +func (m *Params) XXX_DiscardUnknown() { + xxx_messageInfo_Params.DiscardUnknown(m) +} + +var xxx_messageInfo_Params proto.InternalMessageInfo + +func (m *Params) GetAllowedClients() []string { + if m != nil { + return m.AllowedClients + } + return nil +} + func init() { - proto.RegisterType((*MsgCreateClient)(nil), "ibc.core.client.v1.MsgCreateClient") - proto.RegisterType((*MsgCreateClientResponse)(nil), "ibc.core.client.v1.MsgCreateClientResponse") - proto.RegisterType((*MsgUpdateClient)(nil), "ibc.core.client.v1.MsgUpdateClient") - proto.RegisterType((*MsgUpdateClientResponse)(nil), "ibc.core.client.v1.MsgUpdateClientResponse") - proto.RegisterType((*MsgUpgradeClient)(nil), "ibc.core.client.v1.MsgUpgradeClient") - proto.RegisterType((*MsgUpgradeClientResponse)(nil), "ibc.core.client.v1.MsgUpgradeClientResponse") - proto.RegisterType((*MsgSubmitMisbehaviour)(nil), "ibc.core.client.v1.MsgSubmitMisbehaviour") - proto.RegisterType((*MsgSubmitMisbehaviourResponse)(nil), "ibc.core.client.v1.MsgSubmitMisbehaviourResponse") proto.RegisterType((*IdentifiedClientState)(nil), "ibc.core.client.v1.IdentifiedClientState") proto.RegisterType((*ConsensusStateWithHeight)(nil), "ibc.core.client.v1.ConsensusStateWithHeight") proto.RegisterType((*ClientConsensusStates)(nil), "ibc.core.client.v1.ClientConsensusStates") proto.RegisterType((*ClientUpdateProposal)(nil), "ibc.core.client.v1.ClientUpdateProposal") proto.RegisterType((*Height)(nil), "ibc.core.client.v1.Height") + proto.RegisterType((*Params)(nil), "ibc.core.client.v1.Params") } func init() { proto.RegisterFile("ibc/core/client/v1/client.proto", fileDescriptor_b6bc4c8185546947) } var fileDescriptor_b6bc4c8185546947 = []byte{ - // 827 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0x3f, 0x6f, 0x1a, 0x49, - 0x14, 0x67, 0x01, 0x23, 0x7b, 0x00, 0xdb, 0xda, 0x03, 0x1b, 0xaf, 0x74, 0x2c, 0x9a, 0xbb, 0xc2, - 0xa7, 0xb3, 0x77, 0x0f, 0xae, 0x38, 0xcb, 0xd2, 0x49, 0x77, 0xd0, 0x9c, 0x0b, 0x4e, 0xbe, 0xb5, - 0x4e, 0xf9, 0xa3, 0x48, 0x64, 0xff, 0x8c, 0x97, 0x51, 0x60, 0x07, 0xed, 0x2c, 0xc8, 0x7c, 0x83, - 0x94, 0x91, 0x12, 0x45, 0x29, 0x52, 0x58, 0x29, 0x52, 0xa6, 0xcb, 0x37, 0x48, 0xe1, 0x22, 0x85, - 0xcb, 0x54, 0x28, 0xb2, 0x9b, 0xd4, 0x7c, 0x82, 0x68, 0x77, 0xc6, 0xab, 0x5d, 0x0c, 0x98, 0x38, - 0x8d, 0x2b, 0xf6, 0xbd, 0xf9, 0xcd, 0xef, 0xbd, 0xf7, 0x9b, 0x37, 0x6f, 0x00, 0x32, 0x36, 0x4c, - 0xd5, 0x24, 0x2e, 0x52, 0xcd, 0x0e, 0x46, 0x8e, 0xa7, 0x0e, 0xaa, 0xfc, 0x4b, 0xe9, 0xb9, 0xc4, - 0x23, 0xa2, 0x88, 0x0d, 0x53, 0xf1, 0x01, 0x0a, 0x77, 0x0f, 0xaa, 0x52, 0xc1, 0x26, 0x36, 0x09, - 0x96, 0x55, 0xff, 0x8b, 0x21, 0xa5, 0x2d, 0x9b, 0x10, 0xbb, 0x83, 0xd4, 0xc0, 0x32, 0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0xa3, 0xfd, 0x08, - 0xb1, 0x47, 0x6b, 0x56, 0x84, 0x28, 0x68, 0x66, 0x84, 0x69, 0x0f, 0x8d, 0x68, 0x82, 0x7c, 0xfc, - 0x91, 0xf9, 0x79, 0xe6, 0xee, 0x08, 0x4a, 0xda, 0x59, 0x04, 0x15, 0x06, 0x71, 0x81, 0x38, 0x65, - 0xbc, 0xfe, 0x32, 0x83, 0xe3, 0x3a, 0x54, 0xaa, 0x2e, 0x0c, 0xbd, 0x8a, 0x59, 0xff, 0xef, 0xec, - 0xa2, 0x2c, 0x9c, 0x5f, 0x94, 0x85, 0xcf, 0x17, 0x65, 0xe1, 0xd9, 0x65, 0x39, 0x71, 0x7e, 0x59, - 0x4e, 0x7c, 0xba, 0x2c, 0x27, 0x1e, 0xfe, 0x61, 0x63, 0xaf, 0xdd, 0x37, 0x14, 0x93, 0x74, 0x55, - 0x93, 0xd0, 0x2e, 0xa1, 0xfc, 0x67, 0x97, 0x5a, 0x4f, 0xd4, 0x13, 0x35, 0xfc, 0x0f, 0xf7, 0x5b, - 0x6d, 0x97, 0xff, 0x8d, 0xf3, 0x86, 0x3d, 0x44, 0x8d, 0x4c, 0xd0, 0xac, 0xbf, 0x7f, 0x0d, 0x00, - 0x00, 0xff, 0xff, 0x06, 0xa7, 0xa2, 0x16, 0xe6, 0x09, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// MsgClient is the client API for Msg service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type MsgClient interface { - // CreateClient defines a rpc handler method for MsgCreateClient. - CreateClient(ctx context.Context, in *MsgCreateClient, opts ...grpc.CallOption) (*MsgCreateClientResponse, error) - // UpdateClient defines a rpc handler method for MsgUpdateClient. - UpdateClient(ctx context.Context, in *MsgUpdateClient, opts ...grpc.CallOption) (*MsgUpdateClientResponse, error) - // UpgradeClient defines a rpc handler method for MsgUpgradeClient. - UpgradeClient(ctx context.Context, in *MsgUpgradeClient, opts ...grpc.CallOption) (*MsgUpgradeClientResponse, error) - // SubmitMisbehaviour defines a rpc handler method for MsgSubmitMisbehaviour. - SubmitMisbehaviour(ctx context.Context, in *MsgSubmitMisbehaviour, opts ...grpc.CallOption) (*MsgSubmitMisbehaviourResponse, error) -} - -type msgClient struct { - cc grpc1.ClientConn -} - -func NewMsgClient(cc grpc1.ClientConn) MsgClient { - return &msgClient{cc} -} - -func (c *msgClient) CreateClient(ctx context.Context, in *MsgCreateClient, opts ...grpc.CallOption) (*MsgCreateClientResponse, error) { - out := new(MsgCreateClientResponse) - err := c.cc.Invoke(ctx, "/ibc.core.client.v1.Msg/CreateClient", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) UpdateClient(ctx context.Context, in *MsgUpdateClient, opts ...grpc.CallOption) (*MsgUpdateClientResponse, error) { - out := new(MsgUpdateClientResponse) - err := c.cc.Invoke(ctx, "/ibc.core.client.v1.Msg/UpdateClient", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) UpgradeClient(ctx context.Context, in *MsgUpgradeClient, opts ...grpc.CallOption) (*MsgUpgradeClientResponse, error) { - out := new(MsgUpgradeClientResponse) - err := c.cc.Invoke(ctx, "/ibc.core.client.v1.Msg/UpgradeClient", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) SubmitMisbehaviour(ctx context.Context, in *MsgSubmitMisbehaviour, opts ...grpc.CallOption) (*MsgSubmitMisbehaviourResponse, error) { - out := new(MsgSubmitMisbehaviourResponse) - err := c.cc.Invoke(ctx, "/ibc.core.client.v1.Msg/SubmitMisbehaviour", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// MsgServer is the server API for Msg service. -type MsgServer interface { - // CreateClient defines a rpc handler method for MsgCreateClient. - CreateClient(context.Context, *MsgCreateClient) (*MsgCreateClientResponse, error) - // UpdateClient defines a rpc handler method for MsgUpdateClient. - UpdateClient(context.Context, *MsgUpdateClient) (*MsgUpdateClientResponse, error) - // UpgradeClient defines a rpc handler method for MsgUpgradeClient. - UpgradeClient(context.Context, *MsgUpgradeClient) (*MsgUpgradeClientResponse, error) - // SubmitMisbehaviour defines a rpc handler method for MsgSubmitMisbehaviour. - SubmitMisbehaviour(context.Context, *MsgSubmitMisbehaviour) (*MsgSubmitMisbehaviourResponse, error) -} - -// UnimplementedMsgServer can be embedded to have forward compatible implementations. -type UnimplementedMsgServer struct { -} - -func (*UnimplementedMsgServer) CreateClient(ctx context.Context, req *MsgCreateClient) (*MsgCreateClientResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateClient not implemented") -} -func (*UnimplementedMsgServer) UpdateClient(ctx context.Context, req *MsgUpdateClient) (*MsgUpdateClientResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateClient not implemented") -} -func (*UnimplementedMsgServer) UpgradeClient(ctx context.Context, req *MsgUpgradeClient) (*MsgUpgradeClientResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpgradeClient not implemented") -} -func (*UnimplementedMsgServer) SubmitMisbehaviour(ctx context.Context, req *MsgSubmitMisbehaviour) (*MsgSubmitMisbehaviourResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SubmitMisbehaviour not implemented") -} - -func RegisterMsgServer(s grpc1.Server, srv MsgServer) { - s.RegisterService(&_Msg_serviceDesc, srv) -} - -func _Msg_CreateClient_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgCreateClient) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).CreateClient(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ibc.core.client.v1.Msg/CreateClient", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).CreateClient(ctx, req.(*MsgCreateClient)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_UpdateClient_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgUpdateClient) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).UpdateClient(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ibc.core.client.v1.Msg/UpdateClient", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).UpdateClient(ctx, req.(*MsgUpdateClient)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_UpgradeClient_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgUpgradeClient) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).UpgradeClient(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ibc.core.client.v1.Msg/UpgradeClient", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).UpgradeClient(ctx, req.(*MsgUpgradeClient)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_SubmitMisbehaviour_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgSubmitMisbehaviour) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).SubmitMisbehaviour(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ibc.core.client.v1.Msg/SubmitMisbehaviour", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).SubmitMisbehaviour(ctx, req.(*MsgSubmitMisbehaviour)) - } - return interceptor(ctx, in, info, handler) -} - -var _Msg_serviceDesc = grpc.ServiceDesc{ - ServiceName: "ibc.core.client.v1.Msg", - HandlerType: (*MsgServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "CreateClient", - Handler: _Msg_CreateClient_Handler, - }, - { - MethodName: "UpdateClient", - Handler: _Msg_UpdateClient_Handler, - }, - { - MethodName: "UpgradeClient", - Handler: _Msg_UpgradeClient_Handler, - }, - { - MethodName: "SubmitMisbehaviour", - Handler: _Msg_SubmitMisbehaviour_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "ibc/core/client/v1/client.proto", -} - -func (m *MsgCreateClient) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgCreateClient) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgCreateClient) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Signer) > 0 { - i -= len(m.Signer) - copy(dAtA[i:], m.Signer) - i = encodeVarintClient(dAtA, i, uint64(len(m.Signer))) - i-- - dAtA[i] = 0x22 - } - if m.ConsensusState != nil { - { - size, err := m.ConsensusState.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintClient(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.ClientState != nil { - { - size, err := m.ClientState.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintClient(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.ClientId) > 0 { - i -= len(m.ClientId) - copy(dAtA[i:], m.ClientId) - i = encodeVarintClient(dAtA, i, uint64(len(m.ClientId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgCreateClientResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgCreateClientResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgCreateClientResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *MsgUpdateClient) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgUpdateClient) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgUpdateClient) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Signer) > 0 { - i -= len(m.Signer) - copy(dAtA[i:], m.Signer) - i = encodeVarintClient(dAtA, i, uint64(len(m.Signer))) - i-- - dAtA[i] = 0x1a - } - if m.Header != nil { - { - size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintClient(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.ClientId) > 0 { - i -= len(m.ClientId) - copy(dAtA[i:], m.ClientId) - i = encodeVarintClient(dAtA, i, uint64(len(m.ClientId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgUpdateClientResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgUpdateClientResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgUpdateClientResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *MsgUpgradeClient) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgUpgradeClient) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgUpgradeClient) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Signer) > 0 { - i -= len(m.Signer) - copy(dAtA[i:], m.Signer) - i = encodeVarintClient(dAtA, i, uint64(len(m.Signer))) - i-- - dAtA[i] = 0x2a - } - if len(m.ProofUpgrade) > 0 { - i -= len(m.ProofUpgrade) - copy(dAtA[i:], m.ProofUpgrade) - i = encodeVarintClient(dAtA, i, uint64(len(m.ProofUpgrade))) - i-- - dAtA[i] = 0x22 - } - if m.UpgradeHeight != nil { - { - size, err := m.UpgradeHeight.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintClient(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.ClientState != nil { - { - size, err := m.ClientState.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintClient(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.ClientId) > 0 { - i -= len(m.ClientId) - copy(dAtA[i:], m.ClientId) - i = encodeVarintClient(dAtA, i, uint64(len(m.ClientId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgUpgradeClientResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgUpgradeClientResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgUpgradeClientResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *MsgSubmitMisbehaviour) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgSubmitMisbehaviour) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgSubmitMisbehaviour) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Signer) > 0 { - i -= len(m.Signer) - copy(dAtA[i:], m.Signer) - i = encodeVarintClient(dAtA, i, uint64(len(m.Signer))) - i-- - dAtA[i] = 0x1a - } - if m.Misbehaviour != nil { - { - size, err := m.Misbehaviour.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintClient(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.ClientId) > 0 { - i -= len(m.ClientId) - copy(dAtA[i:], m.ClientId) - i = encodeVarintClient(dAtA, i, uint64(len(m.ClientId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgSubmitMisbehaviourResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgSubmitMisbehaviourResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgSubmitMisbehaviourResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil + // 579 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0xbd, 0x8e, 0xd3, 0x4c, + 0x14, 0xcd, 0x6c, 0xf2, 0x45, 0x9b, 0xc9, 0x47, 0xb2, 0x32, 0x09, 0xeb, 0x4d, 0x61, 0x47, 0x53, + 0xa5, 0xd8, 0xb5, 0x49, 0x28, 0x40, 0xa9, 0xc0, 0x69, 0xd8, 0x02, 0x14, 0x8c, 0x10, 0x88, 0x26, + 0xf2, 0xcf, 0xac, 0x33, 0xc2, 0xf1, 0x44, 0x9e, 0x49, 0xd8, 0xbc, 0x01, 0x25, 0x15, 0xa2, 0xa0, + 0xe0, 0x09, 0xe8, 0x78, 0x03, 0x8a, 0x2d, 0xb7, 0xa4, 0xb2, 0x50, 0xf2, 0x06, 0x79, 0x02, 0x64, + 0xcf, 0xec, 0x66, 0x1d, 0x88, 0xb4, 0xa2, 0xf2, 0x9d, 0x7b, 0xaf, 0xcf, 0x3d, 0xe7, 0xdc, 0xd1, + 0x40, 0x9d, 0xb8, 0x9e, 0xe9, 0xd1, 0x18, 0x9b, 0x5e, 0x48, 0x70, 0xc4, 0xcd, 0x79, 0x57, 0x46, + 0xc6, 0x34, 0xa6, 0x9c, 0x2a, 0x0a, 0x71, 0x3d, 0x23, 0x6d, 0x30, 0x64, 0x7a, 0xde, 0x6d, 0x35, + 0x02, 0x1a, 0xd0, 0xac, 0x6c, 0xa6, 0x91, 0xe8, 0x6c, 0x1d, 0x05, 0x94, 0x06, 0x21, 0x36, 0xb3, + 0x93, 0x3b, 0x3b, 0x33, 0x9d, 0x68, 0x21, 0x4a, 0xe8, 0x0b, 0x80, 0xcd, 0x53, 0x1f, 0x47, 0x9c, + 0x9c, 0x11, 0xec, 0x0f, 0x32, 0xa0, 0x97, 0xdc, 0xe1, 0x58, 0xe9, 0xc2, 0x8a, 0xc0, 0x1d, 0x11, +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 0x28, 0x93, 0x9f, 0x13, + 0xe6, 0xbf, 0x33, 0xcf, 0xcd, 0xeb, 0x57, 0xe5, 0x7e, 0xef, 0x44, 0x3e, 0x2c, 0x7c, 0x31, 0xc5, + 0xcc, 0x2d, 0x67, 0xb6, 0x3e, 0xf8, 0x1d, 0x00, 0x00, 0xff, 0xff, 0x91, 0xd2, 0x2f, 0x3f, 0x78, + 0x04, 0x00, 0x00, } func (m *IdentifiedClientState) Marshal() (dAtA []byte, err error) { @@ -1464,6 +604,38 @@ func (m *Height) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *Params) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Params) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.AllowedClients) > 0 { + for iNdEx := len(m.AllowedClients) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.AllowedClients[iNdEx]) + copy(dAtA[i:], m.AllowedClients[iNdEx]) + i = encodeVarintClient(dAtA, i, uint64(len(m.AllowedClients[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + func encodeVarintClient(dAtA []byte, offset int, v uint64) int { offset -= sovClient(v) base := offset @@ -1475,138 +647,6 @@ func encodeVarintClient(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } -func (m *MsgCreateClient) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ClientId) - if l > 0 { - n += 1 + l + sovClient(uint64(l)) - } - if m.ClientState != nil { - l = m.ClientState.Size() - n += 1 + l + sovClient(uint64(l)) - } - if m.ConsensusState != nil { - l = m.ConsensusState.Size() - n += 1 + l + sovClient(uint64(l)) - } - l = len(m.Signer) - if l > 0 { - n += 1 + l + sovClient(uint64(l)) - } - return n -} - -func (m *MsgCreateClientResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *MsgUpdateClient) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ClientId) - if l > 0 { - n += 1 + l + sovClient(uint64(l)) - } - if m.Header != nil { - l = m.Header.Size() - n += 1 + l + sovClient(uint64(l)) - } - l = len(m.Signer) - if l > 0 { - n += 1 + l + sovClient(uint64(l)) - } - return n -} - -func (m *MsgUpdateClientResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *MsgUpgradeClient) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ClientId) - if l > 0 { - n += 1 + l + sovClient(uint64(l)) - } - if m.ClientState != nil { - l = m.ClientState.Size() - n += 1 + l + sovClient(uint64(l)) - } - if m.UpgradeHeight != nil { - l = m.UpgradeHeight.Size() - n += 1 + l + sovClient(uint64(l)) - } - l = len(m.ProofUpgrade) - if l > 0 { - n += 1 + l + sovClient(uint64(l)) - } - l = len(m.Signer) - if l > 0 { - n += 1 + l + sovClient(uint64(l)) - } - return n -} - -func (m *MsgUpgradeClientResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *MsgSubmitMisbehaviour) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ClientId) - if l > 0 { - n += 1 + l + sovClient(uint64(l)) - } - if m.Misbehaviour != nil { - l = m.Misbehaviour.Size() - n += 1 + l + sovClient(uint64(l)) - } - l = len(m.Signer) - if l > 0 { - n += 1 + l + sovClient(uint64(l)) - } - return n -} - -func (m *MsgSubmitMisbehaviourResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - func (m *IdentifiedClientState) Size() (n int) { if m == nil { return 0 @@ -1698,942 +738,27 @@ func (m *Height) Size() (n int) { return n } +func (m *Params) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.AllowedClients) > 0 { + for _, s := range m.AllowedClients { + l = len(s) + n += 1 + l + sovClient(uint64(l)) + } + } + return n +} + func sovClient(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } func sozClient(x uint64) (n int) { return sovClient(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func (m *MsgCreateClient) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClient - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgCreateClient: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgCreateClient: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClientId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClient - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthClient - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthClient - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ClientId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClientState", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClient - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthClient - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthClient - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ClientState == nil { - m.ClientState = &types.Any{} - } - if err := m.ClientState.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConsensusState", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClient - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthClient - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthClient - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ConsensusState == nil { - m.ConsensusState = &types.Any{} - } - if err := m.ConsensusState.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signer", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClient - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthClient - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthClient - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signer = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipClient(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthClient - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthClient - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgCreateClientResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClient - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgCreateClientResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgCreateClientResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipClient(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthClient - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthClient - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgUpdateClient) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClient - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgUpdateClient: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateClient: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClientId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClient - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthClient - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthClient - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ClientId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClient - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthClient - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthClient - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Header == nil { - m.Header = &types.Any{} - } - if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signer", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClient - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthClient - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthClient - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signer = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipClient(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthClient - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthClient - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgUpdateClientResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClient - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgUpdateClientResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateClientResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipClient(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthClient - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthClient - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgUpgradeClient) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClient - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgUpgradeClient: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpgradeClient: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClientId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClient - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthClient - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthClient - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ClientId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClientState", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClient - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthClient - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthClient - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ClientState == nil { - m.ClientState = &types.Any{} - } - if err := m.ClientState.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UpgradeHeight", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClient - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthClient - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthClient - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.UpgradeHeight == nil { - m.UpgradeHeight = &Height{} - } - if err := m.UpgradeHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProofUpgrade", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClient - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthClient - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthClient - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProofUpgrade = append(m.ProofUpgrade[:0], dAtA[iNdEx:postIndex]...) - if m.ProofUpgrade == nil { - m.ProofUpgrade = []byte{} - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signer", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClient - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthClient - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthClient - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signer = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipClient(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthClient - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthClient - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgUpgradeClientResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClient - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgUpgradeClientResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpgradeClientResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipClient(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthClient - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthClient - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgSubmitMisbehaviour) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClient - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgSubmitMisbehaviour: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgSubmitMisbehaviour: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClientId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClient - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthClient - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthClient - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ClientId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Misbehaviour", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClient - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthClient - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthClient - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Misbehaviour == nil { - m.Misbehaviour = &types.Any{} - } - if err := m.Misbehaviour.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signer", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClient - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthClient - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthClient - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signer = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipClient(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthClient - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthClient - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgSubmitMisbehaviourResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClient - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgSubmitMisbehaviourResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgSubmitMisbehaviourResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipClient(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthClient - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthClient - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *IdentifiedClientState) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3272,6 +1397,91 @@ func (m *Height) Unmarshal(dAtA []byte) error { } return nil } +func (m *Params) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowClient + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Params: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AllowedClients", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowClient + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthClient + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthClient + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AllowedClients = append(m.AllowedClients, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipClient(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthClient + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthClient + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipClient(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/ibc/core/02-client/types/client_test.go b/x/ibc/core/02-client/types/client_test.go index 3028980b89..409ab53050 100644 --- a/x/ibc/core/02-client/types/client_test.go +++ b/x/ibc/core/02-client/types/client_test.go @@ -2,6 +2,7 @@ package types_test import ( "github.com/cosmos/cosmos-sdk/x/ibc/core/02-client/types" + "github.com/cosmos/cosmos-sdk/x/ibc/core/exported" ibctesting "github.com/cosmos/cosmos-sdk/x/ibc/testing" ) @@ -22,7 +23,7 @@ func (suite *TypesTestSuite) TestMarshalConsensusStateWithHeight() { }, { "tendermint client", func() { - clientA, _ := suite.coordinator.SetupClients(suite.chainA, suite.chainB, ibctesting.Tendermint) + clientA, _ := suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) clientState := suite.chainA.GetClientState(clientA) consensusState, ok := suite.chainA.GetConsensusState(clientA, clientState.GetLatestHeight()) suite.Require().True(ok) diff --git a/x/ibc/core/02-client/types/genesis.go b/x/ibc/core/02-client/types/genesis.go index c9be22f821..fc3ba12d19 100644 --- a/x/ibc/core/02-client/types/genesis.go +++ b/x/ibc/core/02-client/types/genesis.go @@ -66,11 +66,13 @@ func (ccs ClientConsensusStates) UnpackInterfaces(unpacker codectypes.AnyUnpacke // NewGenesisState creates a GenesisState instance. func NewGenesisState( - clients []IdentifiedClientState, clientsConsensus ClientsConsensusStates, createLocalhost bool, + clients []IdentifiedClientState, clientsConsensus ClientsConsensusStates, + params Params, createLocalhost bool, ) GenesisState { return GenesisState{ Clients: clients, ClientsConsensus: clientsConsensus, + Params: params, CreateLocalhost: createLocalhost, } } @@ -80,6 +82,7 @@ func DefaultGenesisState() GenesisState { return GenesisState{ Clients: []IdentifiedClientState{}, ClientsConsensus: ClientsConsensusStates{}, + Params: DefaultParams(), CreateLocalhost: false, } } @@ -133,5 +136,13 @@ func (gs GenesisState) Validate() error { } } + if err := gs.Params.Validate(); err != nil { + return err + } + + if gs.CreateLocalhost && !gs.Params.IsAllowedClient(exported.Localhost) { + return fmt.Errorf("localhost client is not registered on the allowlist") + } + return nil } diff --git a/x/ibc/core/02-client/types/genesis.pb.go b/x/ibc/core/02-client/types/genesis.pb.go index 8d16b4519a..4c72edfe5e 100644 --- a/x/ibc/core/02-client/types/genesis.pb.go +++ b/x/ibc/core/02-client/types/genesis.pb.go @@ -26,11 +26,12 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // GenesisState defines the ibc client submodule's genesis state. type GenesisState struct { // client states with their corresponding identifiers - Clients []IdentifiedClientState `protobuf:"bytes,1,rep,name=clients,proto3" json:"clients"` + Clients IdentifiedClientStates `protobuf:"bytes,1,rep,name=clients,proto3,castrepeated=IdentifiedClientStates" json:"clients"` // consensus states from each client ClientsConsensus ClientsConsensusStates `protobuf:"bytes,2,rep,name=clients_consensus,json=clientsConsensus,proto3,castrepeated=ClientsConsensusStates" json:"clients_consensus" yaml:"clients_consensus"` + Params Params `protobuf:"bytes,3,opt,name=params,proto3" json:"params"` // create localhost on initialization - CreateLocalhost bool `protobuf:"varint,3,opt,name=create_localhost,json=createLocalhost,proto3" json:"create_localhost,omitempty" yaml:"create_localhost"` + CreateLocalhost bool `protobuf:"varint,4,opt,name=create_localhost,json=createLocalhost,proto3" json:"create_localhost,omitempty" yaml:"create_localhost"` } func (m *GenesisState) Reset() { *m = GenesisState{} } @@ -66,7 +67,7 @@ func (m *GenesisState) XXX_DiscardUnknown() { var xxx_messageInfo_GenesisState proto.InternalMessageInfo -func (m *GenesisState) GetClients() []IdentifiedClientState { +func (m *GenesisState) GetClients() IdentifiedClientStates { if m != nil { return m.Clients } @@ -80,6 +81,13 @@ func (m *GenesisState) GetClientsConsensus() ClientsConsensusStates { return nil } +func (m *GenesisState) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + func (m *GenesisState) GetCreateLocalhost() bool { if m != nil { return m.CreateLocalhost @@ -94,28 +102,30 @@ func init() { func init() { proto.RegisterFile("ibc/core/client/v1/genesis.proto", fileDescriptor_bcd0c0f1f2e6a91a) } var fileDescriptor_bcd0c0f1f2e6a91a = []byte{ - // 328 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0xc8, 0x4c, 0x4a, 0xd6, - 0x4f, 0xce, 0x2f, 0x4a, 0xd5, 0x4f, 0xce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 0x89, 0x25, 0xa9, 0xf1, - 0x39, 0xf9, 0xc9, 0x89, 0x39, 0x19, 0xf9, 0xc5, 0x25, 0x12, 0xcc, 0x0a, 0x8c, 0x1a, 0x1c, 0x4e, - 0xd2, 0x9f, 0xee, 0xc9, 0x8b, 0x43, 0xed, 0x40, 0x53, 0xa1, 0x14, 0xc4, 0x0f, 0x11, 0xf2, 0x81, - 0x89, 0x38, 0x05, 0x9e, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, - 0x13, 0x1e, 0xcb, 0x31, 0x5c, 0x78, 0x2c, 0xc7, 0x70, 0xe3, 0xb1, 0x1c, 0x43, 0x94, 0x79, 0x7a, - 0x66, 0x49, 0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e, 0xae, 0x7e, 0x72, 0x7e, 0x71, 0x6e, 0x7e, 0x31, - 0x94, 0xd2, 0x2d, 0x4e, 0xc9, 0xd6, 0xaf, 0xd0, 0x87, 0x47, 0x94, 0x81, 0x91, 0x2e, 0x34, 0xae, - 0x4a, 0x2a, 0x0b, 0x52, 0x8b, 0x93, 0xd8, 0xc0, 0x51, 0x62, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, - 0x5b, 0xe3, 0x61, 0x24, 0x01, 0x02, 0x00, 0x00, + // 362 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x91, 0xc1, 0x4e, 0xea, 0x40, + 0x14, 0x86, 0xdb, 0x0b, 0xe1, 0xde, 0x94, 0x9b, 0x88, 0x8d, 0xd1, 0x06, 0x93, 0xb6, 0xe9, 0x0a, + 0x17, 0xcc, 0x08, 0x2e, 0x34, 0x2c, 0x4b, 0xa2, 0x31, 0x71, 0xa1, 0x75, 0xe7, 0x86, 0xb4, 0xc3, + 0x58, 0x26, 0xb6, 0x1d, 0xd2, 0x33, 0x10, 0x79, 0x05, 0x57, 0xc6, 0xc7, 0xf0, 0x49, 0x58, 0xb2, + 0x74, 0x85, 0x06, 0xde, 0x80, 0x27, 0x30, 0xed, 0x14, 0x17, 0x80, 0xab, 0x39, 0xf9, 0xe7, 0xff, + 0xfe, 0xff, 0x24, 0x47, 0xb3, 0x59, 0x40, 0x30, 0xe1, 0x29, 0xc5, 0x24, 0x62, 0x34, 0x11, 0x78, + 0xdc, 0xc2, 0x21, 0x4d, 0x28, 0x30, 0x40, 0xc3, 0x94, 0x0b, 0xae, 0xeb, 0x2c, 0x20, 0x28, 0x73, + 0x20, 0xe9, 0x40, 0xe3, 0x56, 0xdd, 0xda, 0x41, 0x15, 0xbf, 0x39, 0x54, 0x3f, 0x08, 0x79, 0xc8, + 0xf3, 0x11, 0x67, 0x93, 0x54, 0x9d, 0x97, 0x92, 0xf6, 0xff, 0x4a, 0x86, 0xdf, 0x0b, 0x5f, 0x50, + 0x9d, 0x68, 0x7f, 0x25, 0x06, 0x86, 0x6a, 0x97, 0x1a, 0xd5, 0xf6, 0x09, 0xda, 0x6e, 0x43, 0xd7, + 0x7d, 0x9a, 0x08, 0xf6, 0xc8, 0x68, 0xbf, 0x9b, 0x6b, 0x39, 0xeb, 0x9a, 0xd3, 0xb9, 0xa5, 0xbc, + 0x7f, 0x5a, 0x87, 0x3b, 0xbf, 0xc1, 0x5b, 0x27, 0xeb, 0x6f, 0xaa, 0xb6, 0x5f, 0xcc, 0x3d, 0xc2, + 0x13, 0xa0, 0x09, 0x8c, 0xc0, 0xf8, 0xf3, 0x7b, 0x9f, 0x8c, 0xe9, 0xae, 0xad, 0x32, 0xcf, 0xed, + 0x64, 0x7d, 0xab, 0xb9, 0x65, 0x4c, 0xfc, 0x38, 0xea, 0x38, 0x5b, 0x89, 0x4e, 0xb6, 0x8b, 0x44, + 0x61, 0x83, 0xf5, 0x6a, 0x64, 0x43, 0xd7, 0x2f, 0xb4, 0xca, 0xd0, 0x4f, 0xfd, 0x18, 0x8c, 0x92, + 0xad, 0x36, 0xaa, 0xed, 0xfa, 0xae, 0x45, 0x6e, 0x73, 0x87, 0x5b, 0xce, 0x9a, 0xbd, 0xc2, 0xaf, + 0x5f, 0x6a, 0x35, 0x92, 0x52, 0x5f, 0xd0, 0x5e, 0xc4, 0x89, 0x1f, 0x0d, 0x38, 0x08, 0xa3, 0x6c, + 0xab, 0x8d, 0x7f, 0xee, 0xf1, 0x6a, 0x6e, 0x1d, 0x15, 0xdb, 0x6d, 0x38, 0x1c, 0x6f, 0x4f, 0x4a, + 0x37, 0x6b, 0xc5, 0xbd, 0x9b, 0x2e, 0x4c, 0x75, 0xb6, 0x30, 0xd5, 0xaf, 0x85, 0xa9, 0xbe, 0x2e, + 0x4d, 0x65, 0xb6, 0x34, 0x95, 0x8f, 0xa5, 0xa9, 0x3c, 0x9c, 0x87, 0x4c, 0x0c, 0x46, 0x01, 0x22, + 0x3c, 0xc6, 0x84, 0x43, 0xcc, 0xa1, 0x78, 0x9a, 0xd0, 0x7f, 0xc2, 0xcf, 0xf8, 0xe7, 0xf8, 0xa7, + 0xed, 0x66, 0x71, 0x7f, 0x31, 0x19, 0x52, 0x08, 0x2a, 0xf9, 0x99, 0xcf, 0xbe, 0x03, 0x00, 0x00, + 0xff, 0xff, 0x8d, 0xa4, 0x74, 0xd6, 0x55, 0x02, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -146,8 +156,18 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0 } i-- - dAtA[i] = 0x18 + dAtA[i] = 0x20 } + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a if len(m.ClientsConsensus) > 0 { for iNdEx := len(m.ClientsConsensus) - 1; iNdEx >= 0; iNdEx-- { { @@ -208,6 +228,8 @@ func (m *GenesisState) Size() (n int) { n += 1 + l + sovGenesis(uint64(l)) } } + l = m.Params.Size() + n += 1 + l + sovGenesis(uint64(l)) if m.CreateLocalhost { n += 2 } @@ -318,6 +340,39 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { } iNdEx = postIndex case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field CreateLocalhost", wireType) } diff --git a/x/ibc/core/02-client/types/genesis_test.go b/x/ibc/core/02-client/types/genesis_test.go index 41d88edae8..296bceb129 100644 --- a/x/ibc/core/02-client/types/genesis_test.go +++ b/x/ibc/core/02-client/types/genesis_test.go @@ -28,7 +28,7 @@ var clientHeight = types.NewHeight(0, 10) func (suite *TypesTestSuite) TestMarshalGenesisState() { cdc := suite.chainA.App.AppCodec() clientA, _, _, _, _, _ := suite.coordinator.Setup(suite.chainA, suite.chainB, channeltypes.ORDERED) - suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, ibctesting.Tendermint) + suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) genesis := client.ExportGenesis(suite.chainA.GetContext(), suite.chainA.App.IBCKeeper.ClientKeeper) @@ -65,7 +65,7 @@ func (suite *TypesTestSuite) TestValidateGenesis() { expPass: true, }, { - name: "valid genesis", + name: "valid custom genesis", genState: types.NewGenesisState( []types.IdentifiedClientState{ types.NewIdentifiedClientState( @@ -88,7 +88,8 @@ func (suite *TypesTestSuite) TestValidateGenesis() { }, ), }, - true, + types.NewParams(exported.Tendermint), + false, ), expPass: true, }, @@ -116,7 +117,8 @@ func (suite *TypesTestSuite) TestValidateGenesis() { }, ), }, - true, + types.NewParams(exported.Tendermint), + false, ), expPass: false, }, @@ -130,12 +132,13 @@ func (suite *TypesTestSuite) TestValidateGenesis() { types.NewIdentifiedClientState(exported.Localhost, localhosttypes.NewClientState("chaindID", types.ZeroHeight())), }, nil, - true, + types.NewParams(exported.Tendermint), + false, ), expPass: false, }, { - name: "invalid consensus state", + name: "invalid consensus state client id", genState: types.NewGenesisState( []types.IdentifiedClientState{ types.NewIdentifiedClientState( @@ -158,12 +161,13 @@ func (suite *TypesTestSuite) TestValidateGenesis() { }, ), }, - true, + types.NewParams(exported.Tendermint), + false, ), expPass: false, }, { - name: "invalid consensus state", + name: "invalid consensus state height", genState: types.NewGenesisState( []types.IdentifiedClientState{ types.NewIdentifiedClientState( @@ -186,6 +190,123 @@ func (suite *TypesTestSuite) TestValidateGenesis() { }, ), }, + types.NewParams(exported.Tendermint), + false, + ), + expPass: false, + }, + { + name: "invalid consensus state", + genState: types.NewGenesisState( + []types.IdentifiedClientState{ + types.NewIdentifiedClientState( + clientID, ibctmtypes.NewClientState(chainID, ibctmtypes.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), + ), + types.NewIdentifiedClientState( + exported.Localhost, localhosttypes.NewClientState("chaindID", clientHeight), + ), + }, + []types.ClientConsensusStates{ + types.NewClientConsensusStates( + clientID, + []types.ConsensusStateWithHeight{ + types.NewConsensusStateWithHeight( + types.NewHeight(0, 1), + ibctmtypes.NewConsensusState( + time.Time{}, commitmenttypes.NewMerkleRoot(header.Header.GetAppHash()), header.Header.NextValidatorsHash, + ), + ), + }, + ), + }, + types.NewParams(exported.Tendermint), + false, + ), + expPass: false, + }, + { + name: "invalid params", + genState: types.NewGenesisState( + []types.IdentifiedClientState{ + types.NewIdentifiedClientState( + clientID, ibctmtypes.NewClientState(chainID, ibctesting.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), + ), + types.NewIdentifiedClientState( + exported.Localhost, localhosttypes.NewClientState("chainID", clientHeight), + ), + }, + []types.ClientConsensusStates{ + types.NewClientConsensusStates( + clientID, + []types.ConsensusStateWithHeight{ + types.NewConsensusStateWithHeight( + header.GetHeight().(types.Height), + ibctmtypes.NewConsensusState( + header.GetTime(), commitmenttypes.NewMerkleRoot(header.Header.GetAppHash()), header.Header.NextValidatorsHash, + ), + ), + }, + ), + }, + types.NewParams(" "), + false, + ), + expPass: false, + }, + { + name: "invalid param", + genState: types.NewGenesisState( + []types.IdentifiedClientState{ + types.NewIdentifiedClientState( + clientID, ibctmtypes.NewClientState(chainID, ibctesting.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), + ), + types.NewIdentifiedClientState( + exported.Localhost, localhosttypes.NewClientState("chainID", clientHeight), + ), + }, + []types.ClientConsensusStates{ + types.NewClientConsensusStates( + clientID, + []types.ConsensusStateWithHeight{ + types.NewConsensusStateWithHeight( + header.GetHeight().(types.Height), + ibctmtypes.NewConsensusState( + header.GetTime(), commitmenttypes.NewMerkleRoot(header.Header.GetAppHash()), header.Header.NextValidatorsHash, + ), + ), + }, + ), + }, + types.NewParams(" "), + true, + ), + expPass: false, + }, + { + name: "localhost client not registered on allowlist", + genState: types.NewGenesisState( + []types.IdentifiedClientState{ + types.NewIdentifiedClientState( + clientID, ibctmtypes.NewClientState(chainID, ibctesting.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), + ), + types.NewIdentifiedClientState( + exported.Localhost, localhosttypes.NewClientState("chainID", clientHeight), + ), + }, + []types.ClientConsensusStates{ + types.NewClientConsensusStates( + clientID, + []types.ConsensusStateWithHeight{ + types.NewConsensusStateWithHeight( + header.GetHeight().(types.Height), + ibctmtypes.NewConsensusState( + header.GetTime(), commitmenttypes.NewMerkleRoot(header.Header.GetAppHash()), header.Header.NextValidatorsHash, + ), + ), + }, + ), + }, + types.NewParams(exported.Tendermint), true, ), expPass: false, diff --git a/x/ibc/core/02-client/types/params.go b/x/ibc/core/02-client/types/params.go new file mode 100644 index 0000000000..6477e3f6f4 --- /dev/null +++ b/x/ibc/core/02-client/types/params.go @@ -0,0 +1,71 @@ +package types + +import ( + "fmt" + "strings" + + "github.com/cosmos/cosmos-sdk/x/ibc/core/exported" + paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" +) + +var ( + // DefaultAllowedClients are "06-solomachine" and "07-tendermint" + DefaultAllowedClients = []string{exported.Solomachine, exported.Tendermint} + + // KeyAllowedClients is store's key for AllowedClients Params + KeyAllowedClients = []byte("AllowedClients") +) + +// ParamKeyTable type declaration for parameters +func ParamKeyTable() paramtypes.KeyTable { + return paramtypes.NewKeyTable().RegisterParamSet(&Params{}) +} + +// NewParams creates a new parameter configuration for the ibc transfer module +func NewParams(allowedClients ...string) Params { + return Params{ + AllowedClients: allowedClients, + } +} + +// DefaultParams is the default parameter configuration for the ibc-transfer module +func DefaultParams() Params { + return NewParams(DefaultAllowedClients...) +} + +// Validate all ibc-transfer module parameters +func (p Params) Validate() error { + return validateClients(p.AllowedClients) +} + +// ParamSetPairs implements params.ParamSet +func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { + return paramtypes.ParamSetPairs{ + paramtypes.NewParamSetPair(KeyAllowedClients, p.AllowedClients, validateClients), + } +} + +// IsAllowedClient checks if the given client type is registered on the allowlist. +func (p Params) IsAllowedClient(clientType string) bool { + for _, allowedClient := range p.AllowedClients { + if allowedClient == clientType { + return true + } + } + return false +} + +func validateClients(i interface{}) error { + clients, ok := i.([]string) + if !ok { + return fmt.Errorf("invalid parameter type: %T", i) + } + + for i, clientType := range clients { + if strings.TrimSpace(clientType) == "" { + return fmt.Errorf("client type %d cannot be blank", i) + } + } + + return nil +} diff --git a/x/ibc/core/02-client/types/params_test.go b/x/ibc/core/02-client/types/params_test.go new file mode 100644 index 0000000000..9484e48b4a --- /dev/null +++ b/x/ibc/core/02-client/types/params_test.go @@ -0,0 +1,29 @@ +package types + +import ( + "testing" + + "github.com/cosmos/cosmos-sdk/x/ibc/core/exported" + "github.com/stretchr/testify/require" +) + +func TestValidateParams(t *testing.T) { + testCases := []struct { + name string + params Params + expPass bool + }{ + {"default params", DefaultParams(), true}, + {"custom params", NewParams(exported.Tendermint), true}, + {"blank client", NewParams(" "), false}, + } + + for _, tc := range testCases { + err := tc.params.Validate() + if tc.expPass { + require.NoError(t, err, tc.name) + } else { + require.Error(t, err, tc.name) + } + } +} diff --git a/x/ibc/core/02-client/types/query.pb.go b/x/ibc/core/02-client/types/query.pb.go index 3e250c9ead..755d401802 100644 --- a/x/ibc/core/02-client/types/query.pb.go +++ b/x/ibc/core/02-client/types/query.pb.go @@ -195,7 +195,7 @@ func (m *QueryClientStatesRequest) GetPagination() *query.PageRequest { // method. type QueryClientStatesResponse struct { // list of stored ClientStates of the chain. - ClientStates []*IdentifiedClientState `protobuf:"bytes,1,rep,name=client_states,json=clientStates,proto3" json:"client_states,omitempty"` + ClientStates IdentifiedClientStates `protobuf:"bytes,1,rep,name=client_states,json=clientStates,proto3,castrepeated=IdentifiedClientStates" json:"client_states"` // pagination response Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } @@ -233,7 +233,7 @@ func (m *QueryClientStatesResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QueryClientStatesResponse proto.InternalMessageInfo -func (m *QueryClientStatesResponse) GetClientStates() []*IdentifiedClientState { +func (m *QueryClientStatesResponse) GetClientStates() IdentifiedClientStates { if m != nil { return m.ClientStates } @@ -500,6 +500,89 @@ func (m *QueryConsensusStatesResponse) GetPagination() *query.PageResponse { return nil } +// QueryClientParamsRequest is the request type for the Query/ClientParams RPC method. +type QueryClientParamsRequest struct { +} + +func (m *QueryClientParamsRequest) Reset() { *m = QueryClientParamsRequest{} } +func (m *QueryClientParamsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryClientParamsRequest) ProtoMessage() {} +func (*QueryClientParamsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_dc42cdfd1d52d76e, []int{8} +} +func (m *QueryClientParamsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryClientParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryClientParamsRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryClientParamsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryClientParamsRequest.Merge(m, src) +} +func (m *QueryClientParamsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryClientParamsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryClientParamsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryClientParamsRequest proto.InternalMessageInfo + +// QueryClientParamsResponse is the response type for the Query/ClientParams RPC method. +type QueryClientParamsResponse struct { + // params defines the parameters of the module. + Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` +} + +func (m *QueryClientParamsResponse) Reset() { *m = QueryClientParamsResponse{} } +func (m *QueryClientParamsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryClientParamsResponse) ProtoMessage() {} +func (*QueryClientParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_dc42cdfd1d52d76e, []int{9} +} +func (m *QueryClientParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryClientParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryClientParamsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryClientParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryClientParamsResponse.Merge(m, src) +} +func (m *QueryClientParamsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryClientParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryClientParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryClientParamsResponse proto.InternalMessageInfo + +func (m *QueryClientParamsResponse) GetParams() *Params { + if m != nil { + return m.Params + } + return nil +} + func init() { proto.RegisterType((*QueryClientStateRequest)(nil), "ibc.core.client.v1.QueryClientStateRequest") proto.RegisterType((*QueryClientStateResponse)(nil), "ibc.core.client.v1.QueryClientStateResponse") @@ -509,59 +592,66 @@ func init() { proto.RegisterType((*QueryConsensusStateResponse)(nil), "ibc.core.client.v1.QueryConsensusStateResponse") proto.RegisterType((*QueryConsensusStatesRequest)(nil), "ibc.core.client.v1.QueryConsensusStatesRequest") proto.RegisterType((*QueryConsensusStatesResponse)(nil), "ibc.core.client.v1.QueryConsensusStatesResponse") + proto.RegisterType((*QueryClientParamsRequest)(nil), "ibc.core.client.v1.QueryClientParamsRequest") + proto.RegisterType((*QueryClientParamsResponse)(nil), "ibc.core.client.v1.QueryClientParamsResponse") } func init() { proto.RegisterFile("ibc/core/client/v1/query.proto", fileDescriptor_dc42cdfd1d52d76e) } var fileDescriptor_dc42cdfd1d52d76e = []byte{ - // 746 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00,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xac, 0x00, 0x94, 0xef, 0x1f, 0x7e, 0xf9, - 0xf9, 0x7a, 0xe0, 0x0e, 0xaa, 0x91, 0xfe, 0x43, 0xad, 0x4e, 0x7a, 0xe2, 0x1b, 0x27, 0xfb, 0x67, - 0x82, 0x1e, 0xa0, 0x37, 0x00, 0x16, 0xe2, 0x97, 0x01, 0x65, 0x6a, 0x1d, 0x6d, 0x87, 0xb1, 0x90, - 0x31, 0x5a, 0x23, 0xc5, 0x12, 0x69, 0x05, 0xcd, 0x65, 0x43, 0x8a, 0x7e, 0x00, 0x38, 0x9e, 0xd4, - 0x12, 0xe1, 0x8b, 0x3b, 0xa6, 0x5d, 0x0a, 0x83, 0x64, 0x8e, 0xd7, 0x18, 0x03, 0x89, 0xb1, 0x89, - 0x1a, 0x17, 0x63, 0x3c, 0xb7, 0x89, 0x71, 0x42, 0x89, 0x3e, 0x1e, 0x64, 0x3f, 0x79, 0x82, 0x0e, - 0x88, 0xfa, 0x48, 0x7b, 0x76, 0xf5, 0x7e, 0x80, 0x3e, 0x00, 0x38, 0x71, 0x6e, 0xed, 0x51, 0x56, - 0xd0, 0x67, 0x3a, 0x2c, 0x66, 0x4f, 0xd0, 0x63, 0x2e, 0xcb, 0x31, 0x97, 0xd0, 0xdd, 0x4b, 0x8d, - 0xb9, 0xb2, 0x79, 0x74, 0x62, 0x82, 0xe3, 0x13, 0x13, 0x7c, 0x3f, 0x31, 0xc1, 0xab, 0x53, 0x33, - 0x77, 0x7c, 0x6a, 0xe6, 0xbe, 0x9e, 0x9a, 0xb9, 0x67, 0x4b, 0x9e, 0x2f, 0x9a, 0x1d, 0x07, 0xbb, - 0x6c, 0x87, 0xe8, 0x3f, 0x19, 0xea, 0x67, 0x81, 0xd7, 0x5f, 0x90, 0x97, 0xbd, 0x76, 0x8b, 0xb5, - 0x05, 0xdd, 0x51, 0xec, 0xb5, 0x28, 0x77, 0xfe, 0x93, 0x27, 0xf0, 0xf6, 0xef, 0x00, 0x00, 0x00, - 0xff, 0xff, 0x71, 0x1f, 0x83, 0xc2, 0xcf, 0x08, 0x00, 0x00, + // 823 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0x4d, 0x4f, 0xdb, 0x48, + 0x18, 0xce, 0xf0, 0x25, 0x98, 0x04, 0x58, 0x8d, 0xd0, 0x6e, 0x30, 0xc8, 0x44, 0x5e, 0x2d, 0x9b, + 0xdd, 0x85, 0x19, 0x92, 0xdd, 0x2d, 0x52, 0x25, 0x0e, 0x05, 0x89, 0x96, 0x4b, 0x0b, 0xee, 0xa1, + 0x52, 0xa5, 0x0a, 0xd9, 0xce, 0xc4, 0xb1, 0x4a, 0x3c, 0x21, 0xe3, 0x44, 0x45, 0x88, 0x0b, 0x7f, + 0xa0, 0x95, 0x7a, 0xec, 0xb5, 0xa7, 0xaa, 0xea, 0xa5, 0x87, 0xfe, 0x83, 0x8a, 0x23, 0x52, 0x7b, + 0xe8, 0xa9, 0x1f, 0xd0, 0x1f, 0xd1, 0x63, 0xe5, 0x99, 0x31, 0xb1, 0x89, 0x11, 0x16, 0x6a, 0x4f, + 0xb1, 0xdf, 0xaf, 0x79, 0x9e, 0xe7, 0x7d, 0xdf, 0x71, 0xa0, 0xee, 0xd9, 0x0e, 0x71, 0x58, 0x9b, + 0x12, 0x67, 0xc7, 0xa3, 0x7e, 0x40, 0xba, 0x15, 0xb2, 0xdb, 0xa1, 0xed, 0x3d, 0xdc, 0x6a, 0xb3, + 0x80, 0x21, 0xe4, 0xd9, 0x0e, 0x0e, 0xfd, 0x58, 0xfa, 0x71, 0xb7, 0xa2, 0xfd, 0xed, 0x30, 0xde, + 0x64, 0x9c, 0xd8, 0x16, 0xa7, 0x32, 0x98, 0x74, 0x2b, 0x36, 0x0d, 0xac, 0x0a, 0x69, 0x59, 0xae, + 0xe7, 0x5b, 0x81, 0xc7, 0x7c, 0x99, 0xaf, 0xcd, 0xa5, 0xd4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5f, + 0x89, 0x26, 0x7a, 0x7c, 0x36, 0x37, 0x72, 0x03, 0x2e, 0x9d, 0x9b, 0xc4, 0xe2, 0x5d, 0x3a, 0x37, + 0xc9, 0x55, 0x34, 0x0c, 0x01, 0x76, 0x16, 0x69, 0x12, 0x6c, 0x12, 0xa7, 0x5c, 0xbd, 0xd5, 0xad, + 0xa3, 0x13, 0x1d, 0x1c, 0x9f, 0xe8, 0xe0, 0xf3, 0x89, 0x0e, 0x9e, 0x9c, 0xea, 0xb9, 0xe3, 0x53, + 0x3d, 0xf7, 0xe1, 0x54, 0xcf, 0xdd, 0x5f, 0x76, 0xbd, 0xa0, 0xd1, 0xb1, 0xb1, 0xc3, 0x9a, 0x44, + 0xfd, 0x07, 0x93, 0x3f, 0x8b, 0xbc, 0xf6, 0x90, 0x3c, 0xea, 0x09, 0xb0, 0x54, 0x5d, 0x54, 0xb5, + 0x83, 0xbd, 0x16, 0xe5, 0xf6, 0x88, 0xf8, 0x02, 0xfc, 0xfb, 0x3d, 0x00, 0x00, 0xff, 0xff, 0xca, + 0xdc, 0xd5, 0x38, 0xee, 0x09, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -586,6 +676,8 @@ type QueryClient interface { // ConsensusStates queries all the consensus state associated with a given // client. ConsensusStates(ctx context.Context, in *QueryConsensusStatesRequest, opts ...grpc.CallOption) (*QueryConsensusStatesResponse, error) + // ClientParams queries all parameters of the ibc client. + ClientParams(ctx context.Context, in *QueryClientParamsRequest, opts ...grpc.CallOption) (*QueryClientParamsResponse, error) } type queryClient struct { @@ -632,6 +724,15 @@ func (c *queryClient) ConsensusStates(ctx context.Context, in *QueryConsensusSta return out, nil } +func (c *queryClient) ClientParams(ctx context.Context, in *QueryClientParamsRequest, opts ...grpc.CallOption) (*QueryClientParamsResponse, error) { + out := new(QueryClientParamsResponse) + err := c.cc.Invoke(ctx, "/ibc.core.client.v1.Query/ClientParams", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // QueryServer is the server API for Query service. type QueryServer interface { // ClientState queries an IBC light client. @@ -644,6 +745,8 @@ type QueryServer interface { // ConsensusStates queries all the consensus state associated with a given // client. ConsensusStates(context.Context, *QueryConsensusStatesRequest) (*QueryConsensusStatesResponse, error) + // ClientParams queries all parameters of the ibc client. + ClientParams(context.Context, *QueryClientParamsRequest) (*QueryClientParamsResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -662,6 +765,9 @@ func (*UnimplementedQueryServer) ConsensusState(ctx context.Context, req *QueryC func (*UnimplementedQueryServer) ConsensusStates(ctx context.Context, req *QueryConsensusStatesRequest) (*QueryConsensusStatesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ConsensusStates not implemented") } +func (*UnimplementedQueryServer) ClientParams(ctx context.Context, req *QueryClientParamsRequest) (*QueryClientParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ClientParams not implemented") +} func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) @@ -739,6 +845,24 @@ func _Query_ConsensusStates_Handler(srv interface{}, ctx context.Context, dec fu return interceptor(ctx, in, info, handler) } +func _Query_ClientParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryClientParamsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).ClientParams(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ibc.core.client.v1.Query/ClientParams", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).ClientParams(ctx, req.(*QueryClientParamsRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "ibc.core.client.v1.Query", HandlerType: (*QueryServer)(nil), @@ -759,6 +883,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "ConsensusStates", Handler: _Query_ConsensusStates_Handler, }, + { + MethodName: "ClientParams", + Handler: _Query_ClientParams_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "ibc/core/client/v1/query.proto", @@ -1123,6 +1251,64 @@ func (m *QueryConsensusStatesResponse) MarshalToSizedBuffer(dAtA []byte) (int, e return len(dAtA) - i, nil } +func (m *QueryClientParamsRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryClientParamsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryClientParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryClientParamsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryClientParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryClientParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Params != nil { + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { offset -= sovQuery(v) base := offset @@ -1275,6 +1461,28 @@ func (m *QueryConsensusStatesResponse) Size() (n int) { return n } +func (m *QueryClientParamsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryClientParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Params != nil { + l = m.Params.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + func sovQuery(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -1669,7 +1877,7 @@ func (m *QueryClientStatesResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ClientStates = append(m.ClientStates, &IdentifiedClientState{}) + m.ClientStates = append(m.ClientStates, IdentifiedClientState{}) if err := m.ClientStates[len(m.ClientStates)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -2277,6 +2485,148 @@ func (m *QueryConsensusStatesResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *QueryClientParamsRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryClientParamsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryClientParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryClientParamsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryClientParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryClientParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Params == nil { + m.Params = &Params{} + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipQuery(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/ibc/core/02-client/types/query.pb.gw.go b/x/ibc/core/02-client/types/query.pb.gw.go index 4d1cce8361..77b3df69a8 100644 --- a/x/ibc/core/02-client/types/query.pb.gw.go +++ b/x/ibc/core/02-client/types/query.pb.gw.go @@ -309,6 +309,24 @@ func local_request_Query_ConsensusStates_0(ctx context.Context, marshaler runtim } +func request_Query_ClientParams_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryClientParamsRequest + var metadata runtime.ServerMetadata + + msg, err := client.ClientParams(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_ClientParams_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryClientParamsRequest + var metadata runtime.ServerMetadata + + msg, err := server.ClientParams(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -395,6 +413,26 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_ClientParams_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_ClientParams_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_ClientParams_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -516,6 +554,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_ClientParams_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_ClientParams_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_ClientParams_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -527,6 +585,8 @@ var ( pattern_Query_ConsensusState_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6, 1, 0, 4, 1, 5, 7, 2, 8, 1, 0, 4, 1, 5, 9}, []string{"ibc", "core", "client", "v1beta1", "consensus_states", "client_id", "version", "version_number", "height", "version_height"}, "", runtime.AssumeColonVerbOpt(true))) pattern_Query_ConsensusStates_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"ibc", "core", "client", "v1beta1", "consensus_states", "client_id"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Query_ClientParams_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"ibc", "client", "v1beta1", "params"}, "", runtime.AssumeColonVerbOpt(true))) ) var ( @@ -537,4 +597,6 @@ var ( forward_Query_ConsensusState_0 = runtime.ForwardResponseMessage forward_Query_ConsensusStates_0 = runtime.ForwardResponseMessage + + forward_Query_ClientParams_0 = runtime.ForwardResponseMessage ) diff --git a/x/ibc/core/02-client/types/tx.pb.go b/x/ibc/core/02-client/types/tx.pb.go new file mode 100644 index 0000000000..4b637e5ba6 --- /dev/null +++ b/x/ibc/core/02-client/types/tx.pb.go @@ -0,0 +1,2128 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: ibc/core/client/v1/tx.proto + +package types + +import ( + context "context" + fmt "fmt" + types "github.com/cosmos/cosmos-sdk/codec/types" + _ "github.com/gogo/protobuf/gogoproto" + grpc1 "github.com/gogo/protobuf/grpc" + proto "github.com/gogo/protobuf/proto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// MsgCreateClient defines a message to create an IBC client +type MsgCreateClient struct { + // client unique identifier + ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty" yaml:"client_id"` + // light client state + ClientState *types.Any `protobuf:"bytes,2,opt,name=client_state,json=clientState,proto3" json:"client_state,omitempty" yaml:"client_state"` + // consensus state associated with the client that corresponds to a given + // height. + ConsensusState *types.Any `protobuf:"bytes,3,opt,name=consensus_state,json=consensusState,proto3" json:"consensus_state,omitempty" yaml:"consensus_state"` + // signer address + Signer string `protobuf:"bytes,4,opt,name=signer,proto3" json:"signer,omitempty"` +} + +func (m *MsgCreateClient) Reset() { *m = MsgCreateClient{} } +func (m *MsgCreateClient) String() string { return proto.CompactTextString(m) } +func (*MsgCreateClient) ProtoMessage() {} +func (*MsgCreateClient) Descriptor() ([]byte, []int) { + return fileDescriptor_cb5dc4651eb49a04, []int{0} +} +func (m *MsgCreateClient) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCreateClient) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCreateClient.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgCreateClient) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCreateClient.Merge(m, src) +} +func (m *MsgCreateClient) XXX_Size() int { + return m.Size() +} +func (m *MsgCreateClient) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCreateClient.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCreateClient proto.InternalMessageInfo + +// MsgCreateClientResponse defines the Msg/CreateClient response type. +type MsgCreateClientResponse struct { +} + +func (m *MsgCreateClientResponse) Reset() { *m = MsgCreateClientResponse{} } +func (m *MsgCreateClientResponse) String() string { return proto.CompactTextString(m) } +func (*MsgCreateClientResponse) ProtoMessage() {} +func (*MsgCreateClientResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_cb5dc4651eb49a04, []int{1} +} +func (m *MsgCreateClientResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCreateClientResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCreateClientResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgCreateClientResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCreateClientResponse.Merge(m, src) +} +func (m *MsgCreateClientResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgCreateClientResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCreateClientResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCreateClientResponse proto.InternalMessageInfo + +// MsgUpdateClient defines an sdk.Msg to update a IBC client state using +// the given header. +type MsgUpdateClient struct { + // client unique identifier + ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty" yaml:"client_id"` + // header to update the light client + Header *types.Any `protobuf:"bytes,2,opt,name=header,proto3" json:"header,omitempty"` + // signer address + Signer string `protobuf:"bytes,3,opt,name=signer,proto3" json:"signer,omitempty"` +} + +func (m *MsgUpdateClient) Reset() { *m = MsgUpdateClient{} } +func (m *MsgUpdateClient) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateClient) ProtoMessage() {} +func (*MsgUpdateClient) Descriptor() ([]byte, []int) { + return fileDescriptor_cb5dc4651eb49a04, []int{2} +} +func (m *MsgUpdateClient) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateClient) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateClient.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgUpdateClient) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateClient.Merge(m, src) +} +func (m *MsgUpdateClient) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateClient) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateClient.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateClient proto.InternalMessageInfo + +// MsgUpdateClientResponse defines the Msg/UpdateClient response type. +type MsgUpdateClientResponse struct { +} + +func (m *MsgUpdateClientResponse) Reset() { *m = MsgUpdateClientResponse{} } +func (m *MsgUpdateClientResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateClientResponse) ProtoMessage() {} +func (*MsgUpdateClientResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_cb5dc4651eb49a04, []int{3} +} +func (m *MsgUpdateClientResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateClientResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateClientResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgUpdateClientResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateClientResponse.Merge(m, src) +} +func (m *MsgUpdateClientResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateClientResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateClientResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateClientResponse proto.InternalMessageInfo + +// MsgUpgradeClient defines an sdk.Msg to upgrade an IBC client to a new client state +type MsgUpgradeClient struct { + // client unique identifier + ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty" yaml:"client_id"` + // upgraded client state + ClientState *types.Any `protobuf:"bytes,2,opt,name=client_state,json=clientState,proto3" json:"client_state,omitempty" yaml:"client_state"` + // height at which old chain halts and upgrades (i.e last block executed) + UpgradeHeight *Height `protobuf:"bytes,3,opt,name=upgrade_height,json=upgradeHeight,proto3" json:"upgrade_height,omitempty" yaml:"upgrade_height"` + // proof that old chain committed to new client + ProofUpgrade []byte `protobuf:"bytes,4,opt,name=proof_upgrade,json=proofUpgrade,proto3" json:"proof_upgrade,omitempty" yaml:"proof_upgrade"` + // signer address + Signer string `protobuf:"bytes,5,opt,name=signer,proto3" json:"signer,omitempty"` +} + +func (m *MsgUpgradeClient) Reset() { *m = MsgUpgradeClient{} } +func (m *MsgUpgradeClient) String() string { return proto.CompactTextString(m) } +func (*MsgUpgradeClient) ProtoMessage() {} +func (*MsgUpgradeClient) Descriptor() ([]byte, []int) { + return fileDescriptor_cb5dc4651eb49a04, []int{4} +} +func (m *MsgUpgradeClient) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpgradeClient) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpgradeClient.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgUpgradeClient) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpgradeClient.Merge(m, src) +} +func (m *MsgUpgradeClient) XXX_Size() int { + return m.Size() +} +func (m *MsgUpgradeClient) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpgradeClient.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpgradeClient proto.InternalMessageInfo + +func (m *MsgUpgradeClient) GetClientId() string { + if m != nil { + return m.ClientId + } + return "" +} + +func (m *MsgUpgradeClient) GetClientState() *types.Any { + if m != nil { + return m.ClientState + } + return nil +} + +func (m *MsgUpgradeClient) GetUpgradeHeight() *Height { + if m != nil { + return m.UpgradeHeight + } + return nil +} + +func (m *MsgUpgradeClient) GetProofUpgrade() []byte { + if m != nil { + return m.ProofUpgrade + } + return nil +} + +func (m *MsgUpgradeClient) GetSigner() string { + if m != nil { + return m.Signer + } + return "" +} + +// MsgUpgradeClientResponse defines the Msg/UpgradeClient response type. +type MsgUpgradeClientResponse struct { +} + +func (m *MsgUpgradeClientResponse) Reset() { *m = MsgUpgradeClientResponse{} } +func (m *MsgUpgradeClientResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpgradeClientResponse) ProtoMessage() {} +func (*MsgUpgradeClientResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_cb5dc4651eb49a04, []int{5} +} +func (m *MsgUpgradeClientResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpgradeClientResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpgradeClientResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgUpgradeClientResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpgradeClientResponse.Merge(m, src) +} +func (m *MsgUpgradeClientResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUpgradeClientResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpgradeClientResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpgradeClientResponse proto.InternalMessageInfo + +// MsgSubmitMisbehaviour defines an sdk.Msg type that submits Evidence for +// light client misbehaviour. +type MsgSubmitMisbehaviour struct { + // client unique identifier + ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty" yaml:"client_id"` + // misbehaviour used for freezing the light client + Misbehaviour *types.Any `protobuf:"bytes,2,opt,name=misbehaviour,proto3" json:"misbehaviour,omitempty"` + // signer address + Signer string `protobuf:"bytes,3,opt,name=signer,proto3" json:"signer,omitempty"` +} + +func (m *MsgSubmitMisbehaviour) Reset() { *m = MsgSubmitMisbehaviour{} } +func (m *MsgSubmitMisbehaviour) String() string { return proto.CompactTextString(m) } +func (*MsgSubmitMisbehaviour) ProtoMessage() {} +func (*MsgSubmitMisbehaviour) Descriptor() ([]byte, []int) { + return fileDescriptor_cb5dc4651eb49a04, []int{6} +} +func (m *MsgSubmitMisbehaviour) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgSubmitMisbehaviour) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgSubmitMisbehaviour.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgSubmitMisbehaviour) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSubmitMisbehaviour.Merge(m, src) +} +func (m *MsgSubmitMisbehaviour) XXX_Size() int { + return m.Size() +} +func (m *MsgSubmitMisbehaviour) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSubmitMisbehaviour.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgSubmitMisbehaviour proto.InternalMessageInfo + +// MsgSubmitMisbehaviourResponse defines the Msg/SubmitMisbehaviour response type. +type MsgSubmitMisbehaviourResponse struct { +} + +func (m *MsgSubmitMisbehaviourResponse) Reset() { *m = MsgSubmitMisbehaviourResponse{} } +func (m *MsgSubmitMisbehaviourResponse) String() string { return proto.CompactTextString(m) } +func (*MsgSubmitMisbehaviourResponse) ProtoMessage() {} +func (*MsgSubmitMisbehaviourResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_cb5dc4651eb49a04, []int{7} +} +func (m *MsgSubmitMisbehaviourResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgSubmitMisbehaviourResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgSubmitMisbehaviourResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgSubmitMisbehaviourResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSubmitMisbehaviourResponse.Merge(m, src) +} +func (m *MsgSubmitMisbehaviourResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgSubmitMisbehaviourResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSubmitMisbehaviourResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgSubmitMisbehaviourResponse proto.InternalMessageInfo + +func init() { + proto.RegisterType((*MsgCreateClient)(nil), "ibc.core.client.v1.MsgCreateClient") + proto.RegisterType((*MsgCreateClientResponse)(nil), "ibc.core.client.v1.MsgCreateClientResponse") + proto.RegisterType((*MsgUpdateClient)(nil), "ibc.core.client.v1.MsgUpdateClient") + proto.RegisterType((*MsgUpdateClientResponse)(nil), "ibc.core.client.v1.MsgUpdateClientResponse") + proto.RegisterType((*MsgUpgradeClient)(nil), "ibc.core.client.v1.MsgUpgradeClient") + proto.RegisterType((*MsgUpgradeClientResponse)(nil), "ibc.core.client.v1.MsgUpgradeClientResponse") + proto.RegisterType((*MsgSubmitMisbehaviour)(nil), "ibc.core.client.v1.MsgSubmitMisbehaviour") + proto.RegisterType((*MsgSubmitMisbehaviourResponse)(nil), "ibc.core.client.v1.MsgSubmitMisbehaviourResponse") +} + +func init() { proto.RegisterFile("ibc/core/client/v1/tx.proto", fileDescriptor_cb5dc4651eb49a04) } + +var fileDescriptor_cb5dc4651eb49a04 = []byte{ + // 608 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x55, 0x3f, 0x6f, 0xd3, 0x40, + 0x14, 0x8f, 0x1b, 0x88, 0xda, 0x6b, 0xd2, 0x56, 0x26, 0x6d, 0x13, 0x23, 0xec, 0xca, 0x30, 0x14, + 0xd1, 0xda, 0x24, 0x0c, 0xa0, 0x4a, 0x0c, 0xa4, 0x0b, 0x0c, 0x91, 0xc0, 0x15, 0x03, 0x08, 0x29, + 0xf8, 0xcf, 0xf5, 0x62, 0x91, 0xf8, 0x22, 0xdf, 0x39, 0x6a, 0xbe, 0x01, 0x23, 0x12, 0x7c, 0x80, + 0x8a, 0x81, 0xcf, 0xc2, 0xc0, 0xd0, 0x91, 0x29, 0x42, 0xc9, 0xc2, 0x9c, 0x4f, 0x80, 0x7c, 0x77, + 0xb1, 0xec, 0x34, 0x89, 0x22, 0x58, 0x98, 0xe2, 0x77, 0xef, 0xf7, 0x7e, 0xef, 0xe7, 0xdf, 0x7b, + 0x17, 0x83, 0xdb, 0xbe, 0xe3, 0x9a, 0x2e, 0x0e, 0xa1, 0xe9, 0x76, 0x7c, 0x18, 0x50, 0xb3, 0x5f, + 0x33, 0xe9, 0x85, 0xd1, 0x0b, 0x31, 0xc5, 0xb2, 0xec, 0x3b, 0xae, 0x11, 0x27, 0x0d, 0x9e, 0x34, + 0xfa, 0x35, 0xa5, 0x8c, 0x30, 0xc2, 0x2c, 0x6d, 0xc6, 0x4f, 0x1c, 0xa9, 0x54, 0x11, 0xc6, 0xa8, + 0x03, 0x4d, 0x16, 0x39, 0xd1, 0xb9, 0x69, 0x07, 0x03, 0x91, 0xd2, 0xe6, 0x74, 0x10, 0x74, 0x0c, + 0xa0, 0x7f, 0x5e, 0x03, 0xdb, 0x4d, 0x82, 0x4e, 0x43, 0x68, 0x53, 0x78, 0xca, 0x32, 0x72, 0x0d, + 0x6c, 0x70, 0x4c, 0xcb, 0xf7, 0x2a, 0xd2, 0x81, 0x74, 0xb8, 0xd1, 0x28, 0x4f, 0x86, 0xda, 0xce, + 0xc0, 0xee, 0x76, 0x4e, 0xf4, 0x24, 0xa5, 0x5b, 0xeb, 0xfc, 0xf9, 0x85, 0x27, 0xbf, 0x04, 0x45, + 0x71, 0x4e, 0xa8, 0x4d, 0x61, 0x65, 0xed, 0x40, 0x3a, 0xdc, 0xac, 0x97, 0x0d, 0xae, 0xcc, 0x98, + 0x2a, 0x33, 0x9e, 0x05, 0x83, 0xc6, 0xfe, 0x64, 0xa8, 0xdd, 0xca, 0x70, 0xb1, 0x1a, 0xdd, 0xda, + 0xe4, 0xe1, 0x59, 0x1c, 0xc9, 0x6f, 0xc0, 0xb6, 0x8b, 0x03, 0x02, 0x03, 0x12, 0x11, 0x41, 0x9a, + 0x5f, 0x42, 0xaa, 0x4c, 0x86, 0xda, 0x9e, 0x20, 0xcd, 0x96, 0xe9, 0xd6, 0x56, 0x72, 0xc2, 0xa9, + 0xf7, 0x40, 0x81, 0xf8, 0x28, 0x80, 0x61, 0xe5, 0x46, 0xfc, 0x72, 0x96, 0x88, 0x4e, 0xd6, 0x3f, + 0x5e, 0x6a, 0xb9, 0xdf, 0x97, 0x5a, 0x4e, 0xaf, 0x82, 0xfd, 0x19, 0x53, 0x2c, 0x48, 0x7a, 0x31, + 0x8b, 0xfe, 0x45, 0x62, 0x86, 0xbd, 0xee, 0x79, 0xff, 0x64, 0xd8, 0x11, 0x28, 0xb4, 0xa1, 0xed, + 0xc1, 0x70, 0x99, 0x55, 0x96, 0xc0, 0xa4, 0x14, 0xe7, 0x97, 0x2a, 0x4e, 0xab, 0x4a, 0x14, 0xff, + 0x58, 0x03, 0x3b, 0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x70, 0x5c, 0x87, 0x2a, 0xb5, + 0x95, 0xa1, 0xd3, 0x9e, 0x8d, 0x57, 0xdf, 0x47, 0xaa, 0x74, 0x35, 0x52, 0xa5, 0x5f, 0x23, 0x55, + 0xfa, 0x34, 0x56, 0x73, 0x57, 0x63, 0x35, 0xf7, 0x73, 0xac, 0xe6, 0xde, 0x3e, 0x46, 0x3e, 0x6d, + 0x47, 0x8e, 0xe1, 0xe2, 0xae, 0xe9, 0x62, 0xd2, 0xc5, 0x44, 0xfc, 0x1c, 0x13, 0xef, 0x83, 0x79, + 0x61, 0x26, 0x9f, 0x85, 0x87, 0xf5, 0x63, 0xf1, 0x65, 0xa0, 0x83, 0x1e, 0x24, 0x4e, 0x81, 0xad, + 0xd5, 0xa3, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xb1, 0x03, 0x55, 0x1e, 0x9b, 0x06, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// MsgClient is the client API for Msg service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type MsgClient interface { + // CreateClient defines a rpc handler method for MsgCreateClient. + CreateClient(ctx context.Context, in *MsgCreateClient, opts ...grpc.CallOption) (*MsgCreateClientResponse, error) + // UpdateClient defines a rpc handler method for MsgUpdateClient. + UpdateClient(ctx context.Context, in *MsgUpdateClient, opts ...grpc.CallOption) (*MsgUpdateClientResponse, error) + // UpgradeClient defines a rpc handler method for MsgUpgradeClient. + UpgradeClient(ctx context.Context, in *MsgUpgradeClient, opts ...grpc.CallOption) (*MsgUpgradeClientResponse, error) + // SubmitMisbehaviour defines a rpc handler method for MsgSubmitMisbehaviour. + SubmitMisbehaviour(ctx context.Context, in *MsgSubmitMisbehaviour, opts ...grpc.CallOption) (*MsgSubmitMisbehaviourResponse, error) +} + +type msgClient struct { + cc grpc1.ClientConn +} + +func NewMsgClient(cc grpc1.ClientConn) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) CreateClient(ctx context.Context, in *MsgCreateClient, opts ...grpc.CallOption) (*MsgCreateClientResponse, error) { + out := new(MsgCreateClientResponse) + err := c.cc.Invoke(ctx, "/ibc.core.client.v1.Msg/CreateClient", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) UpdateClient(ctx context.Context, in *MsgUpdateClient, opts ...grpc.CallOption) (*MsgUpdateClientResponse, error) { + out := new(MsgUpdateClientResponse) + err := c.cc.Invoke(ctx, "/ibc.core.client.v1.Msg/UpdateClient", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) UpgradeClient(ctx context.Context, in *MsgUpgradeClient, opts ...grpc.CallOption) (*MsgUpgradeClientResponse, error) { + out := new(MsgUpgradeClientResponse) + err := c.cc.Invoke(ctx, "/ibc.core.client.v1.Msg/UpgradeClient", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) SubmitMisbehaviour(ctx context.Context, in *MsgSubmitMisbehaviour, opts ...grpc.CallOption) (*MsgSubmitMisbehaviourResponse, error) { + out := new(MsgSubmitMisbehaviourResponse) + err := c.cc.Invoke(ctx, "/ibc.core.client.v1.Msg/SubmitMisbehaviour", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServer is the server API for Msg service. +type MsgServer interface { + // CreateClient defines a rpc handler method for MsgCreateClient. + CreateClient(context.Context, *MsgCreateClient) (*MsgCreateClientResponse, error) + // UpdateClient defines a rpc handler method for MsgUpdateClient. + UpdateClient(context.Context, *MsgUpdateClient) (*MsgUpdateClientResponse, error) + // UpgradeClient defines a rpc handler method for MsgUpgradeClient. + UpgradeClient(context.Context, *MsgUpgradeClient) (*MsgUpgradeClientResponse, error) + // SubmitMisbehaviour defines a rpc handler method for MsgSubmitMisbehaviour. + SubmitMisbehaviour(context.Context, *MsgSubmitMisbehaviour) (*MsgSubmitMisbehaviourResponse, error) +} + +// UnimplementedMsgServer can be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { +} + +func (*UnimplementedMsgServer) CreateClient(ctx context.Context, req *MsgCreateClient) (*MsgCreateClientResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateClient not implemented") +} +func (*UnimplementedMsgServer) UpdateClient(ctx context.Context, req *MsgUpdateClient) (*MsgUpdateClientResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateClient not implemented") +} +func (*UnimplementedMsgServer) UpgradeClient(ctx context.Context, req *MsgUpgradeClient) (*MsgUpgradeClientResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpgradeClient not implemented") +} +func (*UnimplementedMsgServer) SubmitMisbehaviour(ctx context.Context, req *MsgSubmitMisbehaviour) (*MsgSubmitMisbehaviourResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SubmitMisbehaviour not implemented") +} + +func RegisterMsgServer(s grpc1.Server, srv MsgServer) { + s.RegisterService(&_Msg_serviceDesc, srv) +} + +func _Msg_CreateClient_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgCreateClient) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).CreateClient(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ibc.core.client.v1.Msg/CreateClient", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).CreateClient(ctx, req.(*MsgCreateClient)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_UpdateClient_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateClient) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateClient(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ibc.core.client.v1.Msg/UpdateClient", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateClient(ctx, req.(*MsgUpdateClient)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_UpgradeClient_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpgradeClient) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpgradeClient(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ibc.core.client.v1.Msg/UpgradeClient", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpgradeClient(ctx, req.(*MsgUpgradeClient)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_SubmitMisbehaviour_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgSubmitMisbehaviour) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).SubmitMisbehaviour(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ibc.core.client.v1.Msg/SubmitMisbehaviour", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).SubmitMisbehaviour(ctx, req.(*MsgSubmitMisbehaviour)) + } + return interceptor(ctx, in, info, handler) +} + +var _Msg_serviceDesc = grpc.ServiceDesc{ + ServiceName: "ibc.core.client.v1.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CreateClient", + Handler: _Msg_CreateClient_Handler, + }, + { + MethodName: "UpdateClient", + Handler: _Msg_UpdateClient_Handler, + }, + { + MethodName: "UpgradeClient", + Handler: _Msg_UpgradeClient_Handler, + }, + { + MethodName: "SubmitMisbehaviour", + Handler: _Msg_SubmitMisbehaviour_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "ibc/core/client/v1/tx.proto", +} + +func (m *MsgCreateClient) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgCreateClient) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCreateClient) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Signer) > 0 { + i -= len(m.Signer) + copy(dAtA[i:], m.Signer) + i = encodeVarintTx(dAtA, i, uint64(len(m.Signer))) + i-- + dAtA[i] = 0x22 + } + if m.ConsensusState != nil { + { + size, err := m.ConsensusState.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.ClientState != nil { + { + size, err := m.ClientState.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.ClientId) > 0 { + i -= len(m.ClientId) + copy(dAtA[i:], m.ClientId) + i = encodeVarintTx(dAtA, i, uint64(len(m.ClientId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgCreateClientResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgCreateClientResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCreateClientResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgUpdateClient) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateClient) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateClient) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Signer) > 0 { + i -= len(m.Signer) + copy(dAtA[i:], m.Signer) + i = encodeVarintTx(dAtA, i, uint64(len(m.Signer))) + i-- + dAtA[i] = 0x1a + } + if m.Header != nil { + { + size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.ClientId) > 0 { + i -= len(m.ClientId) + copy(dAtA[i:], m.ClientId) + i = encodeVarintTx(dAtA, i, uint64(len(m.ClientId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateClientResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateClientResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateClientResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgUpgradeClient) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpgradeClient) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpgradeClient) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Signer) > 0 { + i -= len(m.Signer) + copy(dAtA[i:], m.Signer) + i = encodeVarintTx(dAtA, i, uint64(len(m.Signer))) + i-- + dAtA[i] = 0x2a + } + if len(m.ProofUpgrade) > 0 { + i -= len(m.ProofUpgrade) + copy(dAtA[i:], m.ProofUpgrade) + i = encodeVarintTx(dAtA, i, uint64(len(m.ProofUpgrade))) + i-- + dAtA[i] = 0x22 + } + if m.UpgradeHeight != nil { + { + size, err := m.UpgradeHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.ClientState != nil { + { + size, err := m.ClientState.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.ClientId) > 0 { + i -= len(m.ClientId) + copy(dAtA[i:], m.ClientId) + i = encodeVarintTx(dAtA, i, uint64(len(m.ClientId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpgradeClientResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpgradeClientResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpgradeClientResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgSubmitMisbehaviour) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgSubmitMisbehaviour) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgSubmitMisbehaviour) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Signer) > 0 { + i -= len(m.Signer) + copy(dAtA[i:], m.Signer) + i = encodeVarintTx(dAtA, i, uint64(len(m.Signer))) + i-- + dAtA[i] = 0x1a + } + if m.Misbehaviour != nil { + { + size, err := m.Misbehaviour.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.ClientId) > 0 { + i -= len(m.ClientId) + copy(dAtA[i:], m.ClientId) + i = encodeVarintTx(dAtA, i, uint64(len(m.ClientId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgSubmitMisbehaviourResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgSubmitMisbehaviourResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgSubmitMisbehaviourResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func encodeVarintTx(dAtA []byte, offset int, v uint64) int { + offset -= sovTx(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *MsgCreateClient) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ClientId) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.ClientState != nil { + l = m.ClientState.Size() + n += 1 + l + sovTx(uint64(l)) + } + if m.ConsensusState != nil { + l = m.ConsensusState.Size() + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Signer) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgCreateClientResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgUpdateClient) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ClientId) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.Header != nil { + l = m.Header.Size() + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Signer) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgUpdateClientResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgUpgradeClient) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ClientId) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.ClientState != nil { + l = m.ClientState.Size() + n += 1 + l + sovTx(uint64(l)) + } + if m.UpgradeHeight != nil { + l = m.UpgradeHeight.Size() + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.ProofUpgrade) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Signer) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgUpgradeClientResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgSubmitMisbehaviour) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ClientId) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.Misbehaviour != nil { + l = m.Misbehaviour.Size() + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Signer) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgSubmitMisbehaviourResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func sovTx(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTx(x uint64) (n int) { + return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *MsgCreateClient) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgCreateClient: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCreateClient: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClientId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ClientId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClientState", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ClientState == nil { + m.ClientState = &types.Any{} + } + if err := m.ClientState.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ConsensusState", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ConsensusState == nil { + m.ConsensusState = &types.Any{} + } + if err := m.ConsensusState.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signer", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signer = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgCreateClientResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgCreateClientResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCreateClientResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateClient) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateClient: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateClient: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClientId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ClientId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Header == nil { + m.Header = &types.Any{} + } + if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signer", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signer = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateClientResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateClientResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateClientResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpgradeClient) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpgradeClient: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpgradeClient: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClientId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ClientId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClientState", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ClientState == nil { + m.ClientState = &types.Any{} + } + if err := m.ClientState.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UpgradeHeight", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.UpgradeHeight == nil { + m.UpgradeHeight = &Height{} + } + if err := m.UpgradeHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ProofUpgrade", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ProofUpgrade = append(m.ProofUpgrade[:0], dAtA[iNdEx:postIndex]...) + if m.ProofUpgrade == nil { + m.ProofUpgrade = []byte{} + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signer", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signer = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpgradeClientResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpgradeClientResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpgradeClientResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgSubmitMisbehaviour) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgSubmitMisbehaviour: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgSubmitMisbehaviour: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClientId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ClientId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Misbehaviour", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Misbehaviour == nil { + m.Misbehaviour = &types.Any{} + } + if err := m.Misbehaviour.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signer", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signer = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgSubmitMisbehaviourResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgSubmitMisbehaviourResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgSubmitMisbehaviourResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTx(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthTx + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTx + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthTx + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/ibc/core/03-connection/keeper/grpc_query_test.go b/x/ibc/core/03-connection/keeper/grpc_query_test.go index 5a8122e279..7e27b5af10 100644 --- a/x/ibc/core/03-connection/keeper/grpc_query_test.go +++ b/x/ibc/core/03-connection/keeper/grpc_query_test.go @@ -47,7 +47,7 @@ func (suite *KeeperTestSuite) TestQueryConnection() { { "success", func() { - clientA, clientB := suite.coordinator.SetupClients(suite.chainA, suite.chainB, ibctesting.Tendermint) + clientA, clientB := suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) connA := suite.chainA.GetFirstTestConnection(clientA, clientB) connB := suite.chainB.GetFirstTestConnection(clientB, clientA) @@ -111,11 +111,11 @@ func (suite *KeeperTestSuite) TestQueryConnections() { { "success", func() { - clientA, clientB, connA0, connB0 := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, ibctesting.Tendermint) + clientA, clientB, connA0, connB0 := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) connA1, connB1, err := suite.coordinator.ConnOpenInit(suite.chainA, suite.chainB, clientA, clientB) suite.Require().NoError(err) - clientA1, clientB1, connA2, connB2 := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, ibctesting.Tendermint) + clientA1, clientB1, connA2, connB2 := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) counterparty1 := types.NewCounterparty(clientB, connB0.ID, suite.chainB.GetPrefix()) counterparty2 := types.NewCounterparty(clientB, connB1.ID, suite.chainB.GetPrefix()) @@ -197,7 +197,7 @@ func (suite *KeeperTestSuite) TestQueryClientConnections() { { "success", func() { - clientA, clientB, connA0, _ := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, ibctesting.Tendermint) + clientA, clientB, connA0, _ := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) connA1, _ := suite.coordinator.CreateConnection(suite.chainA, suite.chainB, clientA, clientB) expPaths = []string{connA0.ID, connA1.ID} suite.chainA.App.IBCKeeper.ConnectionKeeper.SetClientConnectionPaths(suite.chainA.GetContext(), clientA, expPaths) @@ -282,7 +282,7 @@ func (suite *KeeperTestSuite) TestQueryConnectionClientState() { { "success", func() { - clientA, _, connA, _ := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, ibctesting.Tendermint) + clientA, _, connA, _ := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) expClientState := suite.chainA.GetClientState(clientA) expIdentifiedClientState = clienttypes.NewIdentifiedClientState(clientA, expClientState) @@ -371,7 +371,7 @@ func (suite *KeeperTestSuite) TestQueryConnectionConsensusState() { { "success", func() { - clientA, _, connA, _ := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, ibctesting.Tendermint) + clientA, _, connA, _ := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) clientState := suite.chainA.GetClientState(clientA) expConsensusState, _ = suite.chainA.GetConsensusState(clientA, clientState.GetLatestHeight()) diff --git a/x/ibc/core/03-connection/keeper/handshake_test.go b/x/ibc/core/03-connection/keeper/handshake_test.go index 9037810864..74ccbf7cb9 100644 --- a/x/ibc/core/03-connection/keeper/handshake_test.go +++ b/x/ibc/core/03-connection/keeper/handshake_test.go @@ -27,26 +27,26 @@ func (suite *KeeperTestSuite) TestConnOpenInit() { expPass bool }{ {"success", func() { - clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, ibctesting.Tendermint) + clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) }, true}, {"success with empty counterparty identifier", func() { - clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, ibctesting.Tendermint) + clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) emptyConnBID = true }, true}, {"success with non empty version", func() { - clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, ibctesting.Tendermint) + clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) version = types.ExportedVersionsToProto(types.GetCompatibleVersions())[0] }, true}, {"connection already exists", func() { - clientA, clientB, _, _ = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, ibctesting.Tendermint) + clientA, clientB, _, _ = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) }, false}, {"invalid version", func() { - clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, ibctesting.Tendermint) + clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) version = &types.Version{} }, false}, {"couldn't add connection to client", func() { // swap client identifiers to result in client that does not exist - clientB, clientA = suite.coordinator.SetupClients(suite.chainA, suite.chainB, ibctesting.Tendermint) + clientB, clientA = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) }, false}, } @@ -94,7 +94,7 @@ func (suite *KeeperTestSuite) TestConnOpenTry() { expPass bool }{ {"success", func() { - clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, ibctesting.Tendermint) + clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) _, _, err := suite.coordinator.ConnOpenInit(suite.chainA, suite.chainB, clientA, clientB) suite.Require().NoError(err) @@ -102,7 +102,7 @@ func (suite *KeeperTestSuite) TestConnOpenTry() { counterpartyClient = suite.chainA.GetClientState(clientA) }, true}, {"success with empty counterpartyChosenConnectionID", func() { - clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, ibctesting.Tendermint) + clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) connA, _, err := suite.coordinator.ConnOpenInit(suite.chainA, suite.chainB, clientA, clientB) suite.Require().NoError(err) @@ -114,17 +114,17 @@ func (suite *KeeperTestSuite) TestConnOpenTry() { suite.chainA.App.IBCKeeper.ConnectionKeeper.SetConnection(suite.chainA.GetContext(), connA.ID, connection) - err = suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, ibctesting.Tendermint) + err = suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) suite.Require().NoError(err) - err = suite.coordinator.UpdateClient(suite.chainB, suite.chainA, clientB, ibctesting.Tendermint) + err = suite.coordinator.UpdateClient(suite.chainB, suite.chainA, clientB, exported.Tendermint) suite.Require().NoError(err) // retrieve client state of chainA to pass as counterpartyClient counterpartyClient = suite.chainA.GetClientState(clientA) }, true}, {"counterpartyChosenConnectionID does not match desiredConnectionID", func() { - clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, ibctesting.Tendermint) + clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) connA, _, err := suite.coordinator.ConnOpenInit(suite.chainA, suite.chainB, clientA, clientB) suite.Require().NoError(err) @@ -136,17 +136,17 @@ func (suite *KeeperTestSuite) TestConnOpenTry() { suite.chainA.App.IBCKeeper.ConnectionKeeper.SetConnection(suite.chainA.GetContext(), connA.ID, connection) - err = suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, ibctesting.Tendermint) + err = suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) suite.Require().NoError(err) - err = suite.coordinator.UpdateClient(suite.chainB, suite.chainA, clientB, ibctesting.Tendermint) + err = suite.coordinator.UpdateClient(suite.chainB, suite.chainA, clientB, exported.Tendermint) suite.Require().NoError(err) // retrieve client state of chainA to pass as counterpartyClient counterpartyClient = suite.chainA.GetClientState(clientA) }, false}, {"invalid counterparty client", func() { - clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, ibctesting.Tendermint) + clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) _, _, err := suite.coordinator.ConnOpenInit(suite.chainA, suite.chainB, clientA, clientB) suite.Require().NoError(err) @@ -161,7 +161,7 @@ func (suite *KeeperTestSuite) TestConnOpenTry() { suite.chainA.App.IBCKeeper.ClientKeeper.SetClientState(suite.chainA.GetContext(), clientA, tmClient) }, false}, {"consensus height >= latest height", func() { - clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, ibctesting.Tendermint) + clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) _, _, err := suite.coordinator.ConnOpenInit(suite.chainA, suite.chainB, clientA, clientB) suite.Require().NoError(err) @@ -171,7 +171,7 @@ func (suite *KeeperTestSuite) TestConnOpenTry() { consensusHeight = clienttypes.GetSelfHeight(suite.chainB.GetContext()) }, false}, {"self consensus state not found", func() { - clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, ibctesting.Tendermint) + clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) _, _, err := suite.coordinator.ConnOpenInit(suite.chainA, suite.chainB, clientA, clientB) suite.Require().NoError(err) @@ -181,7 +181,7 @@ func (suite *KeeperTestSuite) TestConnOpenTry() { consensusHeight = clienttypes.NewHeight(0, 1) }, false}, {"counterparty versions is empty", func() { - clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, ibctesting.Tendermint) + clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) _, _, err := suite.coordinator.ConnOpenInit(suite.chainA, suite.chainB, clientA, clientB) suite.Require().NoError(err) @@ -191,7 +191,7 @@ func (suite *KeeperTestSuite) TestConnOpenTry() { versions = nil }, false}, {"counterparty versions don't have a match", func() { - clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, ibctesting.Tendermint) + clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) _, _, err := suite.coordinator.ConnOpenInit(suite.chainA, suite.chainB, clientA, clientB) suite.Require().NoError(err) @@ -202,14 +202,14 @@ func (suite *KeeperTestSuite) TestConnOpenTry() { versions = []exported.Version{version} }, false}, {"connection state verification failed", func() { - clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, ibctesting.Tendermint) + clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) // chainA connection not created // retrieve client state of chainA to pass as counterpartyClient counterpartyClient = suite.chainA.GetClientState(clientA) }, false}, {"client state verification failed", func() { - clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, ibctesting.Tendermint) + clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) _, _, err := suite.coordinator.ConnOpenInit(suite.chainA, suite.chainB, clientA, clientB) suite.Require().NoError(err) @@ -222,7 +222,7 @@ func (suite *KeeperTestSuite) TestConnOpenTry() { tmClient.LatestHeight = tmClient.LatestHeight.Increment() }, false}, {"consensus state verification failed", func() { - clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, ibctesting.Tendermint) + clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) // retrieve client state of chainA to pass as counterpartyClient counterpartyClient = suite.chainA.GetClientState(clientA) @@ -241,7 +241,7 @@ func (suite *KeeperTestSuite) TestConnOpenTry() { suite.Require().NoError(err) }, false}, {"invalid previous connection is in TRYOPEN", func() { - clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, ibctesting.Tendermint) + clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) // open init chainA connA, connB, err := suite.coordinator.ConnOpenInit(suite.chainA, suite.chainB, clientA, clientB) @@ -251,14 +251,14 @@ func (suite *KeeperTestSuite) TestConnOpenTry() { err = suite.coordinator.ConnOpenTry(suite.chainB, suite.chainA, connB, connA) suite.Require().NoError(err) - err = suite.coordinator.UpdateClient(suite.chainB, suite.chainA, clientB, ibctesting.Tendermint) + err = suite.coordinator.UpdateClient(suite.chainB, suite.chainA, clientB, exported.Tendermint) suite.Require().NoError(err) // retrieve client state of chainA to pass as counterpartyClient counterpartyClient = suite.chainA.GetClientState(clientA) }, false}, {"invalid previous connection has invalid versions", func() { - clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, ibctesting.Tendermint) + clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) // open init chainA connA, connB, err := suite.coordinator.ConnOpenInit(suite.chainA, suite.chainB, clientA, clientB) @@ -277,7 +277,7 @@ func (suite *KeeperTestSuite) TestConnOpenTry() { suite.chainB.App.IBCKeeper.ConnectionKeeper.SetConnection(suite.chainB.GetContext(), connB.ID, connection) - err = suite.coordinator.UpdateClient(suite.chainB, suite.chainA, clientB, ibctesting.Tendermint) + err = suite.coordinator.UpdateClient(suite.chainB, suite.chainA, clientB, exported.Tendermint) suite.Require().NoError(err) // retrieve client state of chainA to pass as counterpartyClient @@ -353,7 +353,7 @@ func (suite *KeeperTestSuite) TestConnOpenAck() { expPass bool }{ {"success", func() { - clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, ibctesting.Tendermint) + clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) connA, connB, err := suite.coordinator.ConnOpenInit(suite.chainA, suite.chainB, clientA, clientB) suite.Require().NoError(err) @@ -364,7 +364,7 @@ func (suite *KeeperTestSuite) TestConnOpenAck() { counterpartyClient = suite.chainB.GetClientState(clientB) }, true}, {"success with empty stored counterparty connection ID", func() { - clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, ibctesting.Tendermint) + clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) connA, connB, err := suite.coordinator.ConnOpenInit(suite.chainA, suite.chainB, clientA, clientB) suite.Require().NoError(err) @@ -381,10 +381,10 @@ func (suite *KeeperTestSuite) TestConnOpenAck() { suite.chainA.App.IBCKeeper.ConnectionKeeper.SetConnection(suite.chainA.GetContext(), connA.ID, connection) - err = suite.coordinator.UpdateClient(suite.chainB, suite.chainA, clientB, ibctesting.Tendermint) + err = suite.coordinator.UpdateClient(suite.chainB, suite.chainA, clientB, exported.Tendermint) suite.Require().NoError(err) - err = suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, ibctesting.Tendermint) + err = suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) suite.Require().NoError(err) // retrieve client state of chainB to pass as counterpartyClient @@ -392,7 +392,7 @@ func (suite *KeeperTestSuite) TestConnOpenAck() { }, true}, {"success from tryopen", func() { // chainA is in TRYOPEN, chainB is in TRYOPEN - clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, ibctesting.Tendermint) + clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) connB, connA, err := suite.coordinator.ConnOpenInit(suite.chainB, suite.chainA, clientB, clientA) suite.Require().NoError(err) @@ -404,16 +404,16 @@ func (suite *KeeperTestSuite) TestConnOpenAck() { connection.State = types.TRYOPEN suite.chainB.App.IBCKeeper.ConnectionKeeper.SetConnection(suite.chainB.GetContext(), connB.ID, connection) // update clientB so state change is committed - suite.coordinator.UpdateClient(suite.chainB, suite.chainA, clientB, ibctesting.Tendermint) + suite.coordinator.UpdateClient(suite.chainB, suite.chainA, clientB, exported.Tendermint) - suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, ibctesting.Tendermint) + suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) // retrieve client state of chainB to pass as counterpartyClient counterpartyClient = suite.chainB.GetClientState(clientB) }, true}, {"success from tryopen with empty stored connection id", func() { // chainA is in TRYOPEN, chainB is in TRYOPEN - clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, ibctesting.Tendermint) + clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) connB, connA, err := suite.coordinator.ConnOpenInit(suite.chainB, suite.chainA, clientB, clientA) suite.Require().NoError(err) @@ -435,15 +435,15 @@ func (suite *KeeperTestSuite) TestConnOpenAck() { suite.chainA.App.IBCKeeper.ConnectionKeeper.SetConnection(suite.chainA.GetContext(), connA.ID, connection) // update clientB so state change is committed - suite.coordinator.UpdateClient(suite.chainB, suite.chainA, clientB, ibctesting.Tendermint) + suite.coordinator.UpdateClient(suite.chainB, suite.chainA, clientB, exported.Tendermint) - suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, ibctesting.Tendermint) + suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) // retrieve client state of chainB to pass as counterpartyClient counterpartyClient = suite.chainB.GetClientState(clientB) }, true}, {"invalid counterparty client", func() { - clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, ibctesting.Tendermint) + clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) connA, connB, err := suite.coordinator.ConnOpenInit(suite.chainA, suite.chainB, clientA, clientB) suite.Require().NoError(err) @@ -461,7 +461,7 @@ func (suite *KeeperTestSuite) TestConnOpenAck() { suite.Require().NoError(err) }, false}, {"consensus height >= latest height", func() { - clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, ibctesting.Tendermint) + clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) connA, connB, err := suite.coordinator.ConnOpenInit(suite.chainA, suite.chainB, clientA, clientB) suite.Require().NoError(err) @@ -475,13 +475,13 @@ func (suite *KeeperTestSuite) TestConnOpenAck() { }, false}, {"connection not found", func() { // connections are never created - clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, ibctesting.Tendermint) + clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) // retrieve client state of chainB to pass as counterpartyClient counterpartyClient = suite.chainB.GetClientState(clientB) }, false}, {"invalid counterparty connection ID", func() { - clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, ibctesting.Tendermint) + clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) connA, connB, err := suite.coordinator.ConnOpenInit(suite.chainA, suite.chainB, clientA, clientB) suite.Require().NoError(err) @@ -499,15 +499,15 @@ func (suite *KeeperTestSuite) TestConnOpenAck() { suite.chainA.App.IBCKeeper.ConnectionKeeper.SetConnection(suite.chainA.GetContext(), connA.ID, connection) - err = suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, ibctesting.Tendermint) + err = suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) suite.Require().NoError(err) - err = suite.coordinator.UpdateClient(suite.chainB, suite.chainA, clientB, ibctesting.Tendermint) + err = suite.coordinator.UpdateClient(suite.chainB, suite.chainA, clientB, exported.Tendermint) suite.Require().NoError(err) }, false}, {"connection state is not INIT", func() { // connection state is already OPEN on chainA - clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, ibctesting.Tendermint) + clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) connA, connB, err := suite.coordinator.ConnOpenInit(suite.chainA, suite.chainB, clientA, clientB) suite.Require().NoError(err) @@ -522,7 +522,7 @@ func (suite *KeeperTestSuite) TestConnOpenAck() { }, false}, {"connection is in INIT but the proposed version is invalid", func() { // chainA is in INIT, chainB is in TRYOPEN - clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, ibctesting.Tendermint) + clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) connA, connB, err := suite.coordinator.ConnOpenInit(suite.chainA, suite.chainB, clientA, clientB) suite.Require().NoError(err) @@ -536,7 +536,7 @@ func (suite *KeeperTestSuite) TestConnOpenAck() { }, false}, {"connection is in TRYOPEN but the set version in the connection is invalid", func() { // chainA is in TRYOPEN, chainB is in TRYOPEN - clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, ibctesting.Tendermint) + clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) connB, connA, err := suite.coordinator.ConnOpenInit(suite.chainB, suite.chainA, clientB, clientA) suite.Require().NoError(err) @@ -549,8 +549,8 @@ func (suite *KeeperTestSuite) TestConnOpenAck() { suite.chainB.App.IBCKeeper.ConnectionKeeper.SetConnection(suite.chainB.GetContext(), connB.ID, connection) // update clientB so state change is committed - suite.coordinator.UpdateClient(suite.chainB, suite.chainA, clientB, ibctesting.Tendermint) - suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, ibctesting.Tendermint) + suite.coordinator.UpdateClient(suite.chainB, suite.chainA, clientB, exported.Tendermint) + suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) // retrieve client state of chainB to pass as counterpartyClient counterpartyClient = suite.chainB.GetClientState(clientB) @@ -558,7 +558,7 @@ func (suite *KeeperTestSuite) TestConnOpenAck() { version = types.NewVersion("2.0", nil) }, false}, {"incompatible IBC versions", func() { - clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, ibctesting.Tendermint) + clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) connA, connB, err := suite.coordinator.ConnOpenInit(suite.chainA, suite.chainB, clientA, clientB) suite.Require().NoError(err) @@ -572,7 +572,7 @@ func (suite *KeeperTestSuite) TestConnOpenAck() { version = types.NewVersion("2.0", nil) }, false}, {"empty version", func() { - clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, ibctesting.Tendermint) + clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) connA, connB, err := suite.coordinator.ConnOpenInit(suite.chainA, suite.chainB, clientA, clientB) suite.Require().NoError(err) @@ -585,7 +585,7 @@ func (suite *KeeperTestSuite) TestConnOpenAck() { version = &types.Version{} }, false}, {"feature set verification failed - unsupported feature", func() { - clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, ibctesting.Tendermint) + clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) connA, connB, err := suite.coordinator.ConnOpenInit(suite.chainA, suite.chainB, clientA, clientB) suite.Require().NoError(err) @@ -598,7 +598,7 @@ func (suite *KeeperTestSuite) TestConnOpenAck() { version = types.NewVersion(types.DefaultIBCVersionIdentifier, []string{"ORDER_ORDERED", "ORDER_UNORDERED", "ORDER_DAG"}) }, false}, {"self consensus state not found", func() { - clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, ibctesting.Tendermint) + clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) connA, connB, err := suite.coordinator.ConnOpenInit(suite.chainA, suite.chainB, clientA, clientB) suite.Require().NoError(err) @@ -612,7 +612,7 @@ func (suite *KeeperTestSuite) TestConnOpenAck() { }, false}, {"connection state verification failed", func() { // chainB connection is not in INIT - clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, ibctesting.Tendermint) + clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) _, _, err := suite.coordinator.ConnOpenInit(suite.chainA, suite.chainB, clientA, clientB) suite.Require().NoError(err) @@ -620,7 +620,7 @@ func (suite *KeeperTestSuite) TestConnOpenAck() { counterpartyClient = suite.chainB.GetClientState(clientB) }, false}, {"client state verification failed", func() { - clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, ibctesting.Tendermint) + clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) connA, connB, err := suite.coordinator.ConnOpenInit(suite.chainA, suite.chainB, clientA, clientB) suite.Require().NoError(err) @@ -636,7 +636,7 @@ func (suite *KeeperTestSuite) TestConnOpenAck() { suite.Require().NoError(err) }, false}, {"consensus state verification failed", func() { - clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, ibctesting.Tendermint) + clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) connA, connB, err := suite.coordinator.ConnOpenInit(suite.chainA, suite.chainB, clientA, clientB) suite.Require().NoError(err) @@ -717,7 +717,7 @@ func (suite *KeeperTestSuite) TestConnOpenConfirm() { expPass bool }{ {"success", func() { - clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, ibctesting.Tendermint) + clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) connA, connB, err := suite.coordinator.ConnOpenInit(suite.chainA, suite.chainB, clientA, clientB) suite.Require().NoError(err) @@ -729,15 +729,15 @@ func (suite *KeeperTestSuite) TestConnOpenConfirm() { }, true}, {"connection not found", func() { // connections are never created - clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, ibctesting.Tendermint) + clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) }, false}, {"chain B's connection state is not TRYOPEN", func() { // connections are OPEN - clientA, clientB, _, _ = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, ibctesting.Tendermint) + clientA, clientB, _, _ = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) }, false}, {"connection state verification failed", func() { // chainA is in INIT - clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, ibctesting.Tendermint) + clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) connA, connB, err := suite.coordinator.ConnOpenInit(suite.chainA, suite.chainB, clientA, clientB) suite.Require().NoError(err) @@ -779,7 +779,7 @@ func (suite *KeeperTestSuite) TestConnOpenConfirm() { // package. func (suite *KeeperTestSuite) TestConsensusParamsValidation() { // invalid client state in ConnOpenTry - clientA, clientB := suite.coordinator.SetupClients(suite.chainA, suite.chainB, ibctesting.Tendermint) + clientA, clientB := suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) connA, connB, err := suite.coordinator.ConnOpenInit(suite.chainA, suite.chainB, clientA, clientB) suite.Require().NoError(err) @@ -804,7 +804,7 @@ func (suite *KeeperTestSuite) TestConsensusParamsValidation() { suite.SetupTest() // reset // invalid client state in ConnOpenAck - clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, ibctesting.Tendermint) + clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) connA, connB, err = suite.coordinator.ConnOpenInit(suite.chainA, suite.chainB, clientA, clientB) suite.Require().NoError(err) diff --git a/x/ibc/core/03-connection/keeper/keeper_test.go b/x/ibc/core/03-connection/keeper/keeper_test.go index 3ae867a5a0..cf8f447179 100644 --- a/x/ibc/core/03-connection/keeper/keeper_test.go +++ b/x/ibc/core/03-connection/keeper/keeper_test.go @@ -7,6 +7,7 @@ import ( "github.com/stretchr/testify/suite" "github.com/cosmos/cosmos-sdk/x/ibc/core/03-connection/types" + "github.com/cosmos/cosmos-sdk/x/ibc/core/exported" ibctesting "github.com/cosmos/cosmos-sdk/x/ibc/testing" ) @@ -31,7 +32,7 @@ func TestKeeperTestSuite(t *testing.T) { } func (suite *KeeperTestSuite) TestSetAndGetConnection() { - clientA, clientB := suite.coordinator.SetupClients(suite.chainA, suite.chainB, ibctesting.Tendermint) + clientA, clientB := suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) connA := suite.chainA.GetFirstTestConnection(clientA, clientB) _, existed := suite.chainA.App.IBCKeeper.ConnectionKeeper.GetConnection(suite.chainA.GetContext(), connA.ID) suite.Require().False(existed) @@ -42,7 +43,7 @@ func (suite *KeeperTestSuite) TestSetAndGetConnection() { } func (suite *KeeperTestSuite) TestSetAndGetClientConnectionPaths() { - clientA, _ := suite.coordinator.SetupClients(suite.chainA, suite.chainB, ibctesting.Tendermint) + clientA, _ := suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) _, existed := suite.chainA.App.IBCKeeper.ConnectionKeeper.GetClientConnectionPaths(suite.chainA.GetContext(), clientA) suite.False(existed) @@ -55,7 +56,7 @@ func (suite *KeeperTestSuite) TestSetAndGetClientConnectionPaths() { // create 2 connections: A0 - B0, A1 - B1 func (suite KeeperTestSuite) TestGetAllConnections() { - clientA, clientB, connA0, connB0 := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, ibctesting.Tendermint) + clientA, clientB, connA0, connB0 := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) connA1, connB1 := suite.coordinator.CreateConnection(suite.chainA, suite.chainB, clientA, clientB) counterpartyB0 := types.NewCounterparty(clientB, connB0.ID, suite.chainB.GetPrefix()) // connection B0 @@ -77,8 +78,8 @@ func (suite KeeperTestSuite) TestGetAllConnections() { // the test creates 2 clients clientA0 and clientA1. clientA0 has a single // connection and clientA1 has 2 connections. func (suite KeeperTestSuite) TestGetAllClientConnectionPaths() { - clientA0, _, connA0, _ := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, ibctesting.Tendermint) - clientA1, clientB1, connA1, _ := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, ibctesting.Tendermint) + clientA0, _, connA0, _ := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) + clientA1, clientB1, connA1, _ := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) connA2, _ := suite.coordinator.CreateConnection(suite.chainA, suite.chainB, clientA1, clientB1) expPaths := []types.ConnectionPaths{ @@ -102,7 +103,7 @@ func (suite *KeeperTestSuite) TestGetTimestampAtHeight() { expPass bool }{ {"verification success", func() { - _, _, connA, _ := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, ibctesting.Tendermint) + _, _, connA, _ := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) connection = suite.chainA.GetConnection(connA) }, true}, {"consensus state not found", func() { diff --git a/x/ibc/core/03-connection/keeper/verify_test.go b/x/ibc/core/03-connection/keeper/verify_test.go index c9db5cc2bf..ace373e12a 100644 --- a/x/ibc/core/03-connection/keeper/verify_test.go +++ b/x/ibc/core/03-connection/keeper/verify_test.go @@ -38,7 +38,7 @@ func (suite *KeeperTestSuite) TestVerifyClientState() { suite.Run(tc.msg, func() { suite.SetupTest() // reset - _, clientB, connA, _ := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, ibctesting.Tendermint) + _, clientB, connA, _ := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) counterpartyClient, clientProof := suite.chainB.QueryClientStateProof(clientB) proofHeight := clienttypes.NewHeight(0, uint64(suite.chainB.GetContext().BlockHeight()-1)) @@ -83,20 +83,20 @@ func (suite *KeeperTestSuite) TestVerifyClientConsensusState() { expPass bool }{ {"verification success", func() { - _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, ibctesting.Tendermint) + _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) }, true}, {"client state not found", func() { - _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, ibctesting.Tendermint) + _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) changeClientID = true }, false}, {"consensus state not found", func() { - _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, ibctesting.Tendermint) + _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) heightDiff = 5 }, false}, {"verification failed", func() { - _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, ibctesting.Tendermint) + _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) clientB := connB.ClientID clientState := suite.chainB.GetClientState(clientB) @@ -170,7 +170,7 @@ func (suite *KeeperTestSuite) TestVerifyConnectionState() { suite.Run(tc.msg, func() { suite.SetupTest() // reset - _, _, connA, connB := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, ibctesting.Tendermint) + _, _, connA, connB := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) connection := suite.chainA.GetConnection(connA) if tc.changeClientID { @@ -402,7 +402,7 @@ func (suite *KeeperTestSuite) TestVerifyPacketReceiptAbsence() { } else { // need to update height to prove absence suite.coordinator.CommitBlock(suite.chainA, suite.chainB) - suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, ibctesting.Tendermint) + suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) } packetReceiptKey := host.PacketReceiptKey(packet.GetDestPort(), packet.GetDestChannel(), packet.GetSequence()) diff --git a/x/ibc/core/04-channel/keeper/grpc_query_test.go b/x/ibc/core/04-channel/keeper/grpc_query_test.go index 031b89cc10..9e96d2b2fa 100644 --- a/x/ibc/core/04-channel/keeper/grpc_query_test.go +++ b/x/ibc/core/04-channel/keeper/grpc_query_test.go @@ -62,7 +62,7 @@ func (suite *KeeperTestSuite) TestQueryChannel() { { "success", func() { - _, _, connA, connB := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, ibctesting.Tendermint) + _, _, connA, connB := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) // init channel channelA, _, err := suite.coordinator.ChanOpenInit(suite.chainA, suite.chainB, connA, connB, ibctesting.MockPort, ibctesting.MockPort, types.ORDERED) suite.Require().NoError(err) @@ -377,7 +377,7 @@ func (suite *KeeperTestSuite) TestQueryChannelClientState() { { "success", func() { - clientA, _, connA, connB := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, ibctesting.Tendermint) + clientA, _, connA, connB := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) // init channel channelA, _, err := suite.coordinator.ChanOpenInit(suite.chainA, suite.chainB, connA, connB, ibctesting.MockPort, ibctesting.MockPort, types.ORDERED) suite.Require().NoError(err) @@ -505,7 +505,7 @@ func (suite *KeeperTestSuite) TestQueryChannelConsensusState() { { "success", func() { - clientA, _, connA, connB := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, ibctesting.Tendermint) + clientA, _, connA, connB := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) // init channel channelA, _, err := suite.coordinator.ChanOpenInit(suite.chainA, suite.chainB, connA, connB, ibctesting.MockPort, ibctesting.MockPort, types.ORDERED) suite.Require().NoError(err) diff --git a/x/ibc/core/04-channel/keeper/handshake_test.go b/x/ibc/core/04-channel/keeper/handshake_test.go index cf391d0387..857bba57d4 100644 --- a/x/ibc/core/04-channel/keeper/handshake_test.go +++ b/x/ibc/core/04-channel/keeper/handshake_test.go @@ -32,7 +32,7 @@ func (suite *KeeperTestSuite) TestChanOpenInit() { testCases := []testCase{ {"success", func() { - _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, ibctesting.Tendermint) + _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) features = []string{"ORDER_ORDERED", "ORDER_UNORDERED"} suite.chainA.CreatePortCapability(connA.NextTestChannel(ibctesting.MockPort).PortID) portCap = suite.chainA.GetPortCapability(connA.NextTestChannel(ibctesting.MockPort).PortID) @@ -46,12 +46,12 @@ func (suite *KeeperTestSuite) TestChanOpenInit() { suite.Require().NotNil(connB) }, false}, {"capability is incorrect", func() { - _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, ibctesting.Tendermint) + _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) features = []string{"ORDER_ORDERED", "ORDER_UNORDERED"} portCap = capabilitytypes.NewCapability(3) }, false}, {"connection version not negotiated", func() { - _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, ibctesting.Tendermint) + _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) // modify connA versions conn := suite.chainA.GetConnection(connA) @@ -68,7 +68,7 @@ func (suite *KeeperTestSuite) TestChanOpenInit() { portCap = suite.chainA.GetPortCapability(connA.NextTestChannel(ibctesting.MockPort).PortID) }, false}, {"connection does not support ORDERED channels", func() { - _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, ibctesting.Tendermint) + _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) // modify connA versions to only support UNORDERED channels conn := suite.chainA.GetConnection(connA) @@ -145,21 +145,21 @@ func (suite *KeeperTestSuite) TestChanOpenTry() { testCases := []testCase{ {"success", func() { - _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, ibctesting.Tendermint) + _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) suite.coordinator.ChanOpenInit(suite.chainA, suite.chainB, connA, connB, ibctesting.MockPort, ibctesting.MockPort, types.ORDERED) suite.chainB.CreatePortCapability(connB.NextTestChannel(ibctesting.MockPort).PortID) portCap = suite.chainB.GetPortCapability(connB.NextTestChannel(ibctesting.MockPort).PortID) }, true}, {"success with crossing hello", func() { - _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, ibctesting.Tendermint) + _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) suite.coordinator.ChanOpenInitOnBothChains(suite.chainA, suite.chainB, connA, connB, ibctesting.MockPort, ibctesting.MockPort, types.ORDERED) portCap = suite.chainB.GetPortCapability(connB.NextTestChannel(ibctesting.MockPort).PortID) }, true}, {"success with empty counterparty chosen channel id", func() { var clientA, clientB string - clientA, clientB, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, ibctesting.Tendermint) + clientA, clientB, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) channelA, _, err := suite.coordinator.ChanOpenInit(suite.chainA, suite.chainB, connA, connB, ibctesting.MockPort, ibctesting.MockPort, types.ORDERED) suite.Require().NoError(err) @@ -168,17 +168,17 @@ func (suite *KeeperTestSuite) TestChanOpenTry() { channel.Counterparty.ChannelId = "" suite.chainA.App.IBCKeeper.ChannelKeeper.SetChannel(suite.chainA.GetContext(), channelA.PortID, channelA.ID, channel) - err = suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, ibctesting.Tendermint) + err = suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) suite.Require().NoError(err) - err = suite.coordinator.UpdateClient(suite.chainB, suite.chainA, clientB, ibctesting.Tendermint) + err = suite.coordinator.UpdateClient(suite.chainB, suite.chainA, clientB, exported.Tendermint) suite.Require().NoError(err) suite.chainB.CreatePortCapability(connB.NextTestChannel(ibctesting.MockPort).PortID) portCap = suite.chainB.GetPortCapability(connB.NextTestChannel(ibctesting.MockPort).PortID) }, true}, {"previous channel with invalid state", func() { - _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, ibctesting.Tendermint) + _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) // make previous channel have wrong ordering suite.coordinator.ChanOpenInit(suite.chainB, suite.chainA, connB, connA, ibctesting.MockPort, ibctesting.MockPort, types.UNORDERED) @@ -193,7 +193,7 @@ func (suite *KeeperTestSuite) TestChanOpenTry() { portCap = suite.chainB.GetPortCapability(connB.FirstOrNextTestChannel(ibctesting.MockPort).PortID) }, false}, {"connection is not OPEN", func() { - clientA, clientB := suite.coordinator.SetupClients(suite.chainA, suite.chainB, ibctesting.Tendermint) + clientA, clientB := suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) // pass capability check suite.chainB.CreatePortCapability(connB.FirstOrNextTestChannel(ibctesting.MockPort).PortID) portCap = suite.chainB.GetPortCapability(connB.FirstOrNextTestChannel(ibctesting.MockPort).PortID) @@ -203,7 +203,7 @@ func (suite *KeeperTestSuite) TestChanOpenTry() { suite.Require().NoError(err) }, false}, {"consensus state not found", func() { - _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, ibctesting.Tendermint) + _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) suite.coordinator.ChanOpenInit(suite.chainA, suite.chainB, connA, connB, ibctesting.MockPort, ibctesting.MockPort, types.ORDERED) suite.chainB.CreatePortCapability(connB.NextTestChannel(ibctesting.MockPort).PortID) @@ -212,7 +212,7 @@ func (suite *KeeperTestSuite) TestChanOpenTry() { heightDiff = 3 // consensus state doesn't exist at this height }, false}, {"counterparty chosen channel id does not match desired channel id", func() { - _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, ibctesting.Tendermint) + _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) channelA, _, err := suite.coordinator.ChanOpenInit(suite.chainA, suite.chainB, connA, connB, ibctesting.MockPort, ibctesting.MockPort, types.ORDERED) suite.Require().NoError(err) @@ -226,17 +226,17 @@ func (suite *KeeperTestSuite) TestChanOpenTry() { }, false}, {"channel verification failed", func() { // not creating a channel on chainA will result in an invalid proof of existence - _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, ibctesting.Tendermint) + _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) portCap = suite.chainB.GetPortCapability(connB.NextTestChannel(ibctesting.MockPort).PortID) }, false}, {"port capability not found", func() { - _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, ibctesting.Tendermint) + _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) suite.coordinator.ChanOpenInit(suite.chainA, suite.chainB, connA, connB, ibctesting.MockPort, ibctesting.MockPort, types.ORDERED) portCap = capabilitytypes.NewCapability(3) }, false}, {"connection version not negotiated", func() { - _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, ibctesting.Tendermint) + _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) suite.coordinator.ChanOpenInit(suite.chainA, suite.chainB, connA, connB, ibctesting.MockPort, ibctesting.MockPort, types.ORDERED) // modify connB versions @@ -253,7 +253,7 @@ func (suite *KeeperTestSuite) TestChanOpenTry() { portCap = suite.chainB.GetPortCapability(connB.NextTestChannel(ibctesting.MockPort).PortID) }, false}, {"connection does not support ORDERED channels", func() { - _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, ibctesting.Tendermint) + _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) suite.coordinator.ChanOpenInit(suite.chainA, suite.chainB, connA, connB, ibctesting.MockPort, ibctesting.MockPort, types.ORDERED) // modify connA versions to only support UNORDERED channels @@ -329,7 +329,7 @@ func (suite *KeeperTestSuite) TestChanOpenAck() { testCases := []testCase{ {"success", func() { - _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, ibctesting.Tendermint) + _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) channelA, channelB, err := suite.coordinator.ChanOpenInit(suite.chainA, suite.chainB, connA, connB, ibctesting.MockPort, ibctesting.MockPort, types.ORDERED) suite.Require().NoError(err) @@ -339,7 +339,7 @@ func (suite *KeeperTestSuite) TestChanOpenAck() { channelCap = suite.chainA.GetChannelCapability(channelA.PortID, channelA.ID) }, true}, {"success with empty stored counterparty channel ID", func() { - _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, ibctesting.Tendermint) + _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) channelA, channelB, err := suite.coordinator.ChanOpenInit(suite.chainA, suite.chainB, connA, connB, ibctesting.MockPort, ibctesting.MockPort, types.ORDERED) suite.Require().NoError(err) @@ -365,7 +365,7 @@ func (suite *KeeperTestSuite) TestChanOpenAck() { channelCap = suite.chainA.GetChannelCapability(channelA.PortID, channelA.ID) }, false}, {"connection not found", func() { - _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, ibctesting.Tendermint) + _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) channelA, channelB, err := suite.coordinator.ChanOpenInit(suite.chainA, suite.chainB, connA, connB, ibctesting.MockPort, ibctesting.MockPort, types.ORDERED) suite.Require().NoError(err) @@ -380,7 +380,7 @@ func (suite *KeeperTestSuite) TestChanOpenAck() { suite.chainA.App.IBCKeeper.ChannelKeeper.SetChannel(suite.chainA.GetContext(), channelA.PortID, channelA.ID, channel) }, false}, {"connection is not OPEN", func() { - clientA, clientB := suite.coordinator.SetupClients(suite.chainA, suite.chainB, ibctesting.Tendermint) + clientA, clientB := suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) var err error connA, connB, err = suite.coordinator.ConnOpenInit(suite.chainA, suite.chainB, clientA, clientB) @@ -394,7 +394,7 @@ func (suite *KeeperTestSuite) TestChanOpenAck() { channelCap = suite.chainA.GetChannelCapability(channelA.PortID, channelA.ID) }, false}, {"consensus state not found", func() { - _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, ibctesting.Tendermint) + _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) channelA, channelB, err := suite.coordinator.ChanOpenInit(suite.chainA, suite.chainB, connA, connB, ibctesting.MockPort, ibctesting.MockPort, types.ORDERED) suite.Require().NoError(err) @@ -406,7 +406,7 @@ func (suite *KeeperTestSuite) TestChanOpenAck() { heightDiff = 3 // consensus state doesn't exist at this height }, false}, {"invalid counterparty channel identifier", func() { - _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, ibctesting.Tendermint) + _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) channelA, channelB, err := suite.coordinator.ChanOpenInit(suite.chainA, suite.chainB, connA, connB, ibctesting.MockPort, ibctesting.MockPort, types.ORDERED) suite.Require().NoError(err) @@ -419,7 +419,7 @@ func (suite *KeeperTestSuite) TestChanOpenAck() { }, false}, {"channel verification failed", func() { // chainB is INIT, chainA in TRYOPEN - _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, ibctesting.Tendermint) + _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) channelB, channelA, err := suite.coordinator.ChanOpenInit(suite.chainB, suite.chainA, connB, connA, ibctesting.MockPort, ibctesting.MockPort, types.ORDERED) suite.Require().NoError(err) @@ -429,7 +429,7 @@ func (suite *KeeperTestSuite) TestChanOpenAck() { channelCap = suite.chainA.GetChannelCapability(channelA.PortID, channelA.ID) }, false}, {"channel capability not found", func() { - _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, ibctesting.Tendermint) + _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) channelA, channelB, err := suite.coordinator.ChanOpenInit(suite.chainA, suite.chainB, connA, connB, ibctesting.MockPort, ibctesting.MockPort, types.ORDERED) suite.Require().NoError(err) @@ -484,7 +484,7 @@ func (suite *KeeperTestSuite) TestChanOpenConfirm() { ) testCases := []testCase{ {"success", func() { - _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, ibctesting.Tendermint) + _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) channelA, channelB, err := suite.coordinator.ChanOpenInit(suite.chainA, suite.chainB, connA, connB, ibctesting.MockPort, ibctesting.MockPort, types.ORDERED) suite.Require().NoError(err) @@ -504,7 +504,7 @@ func (suite *KeeperTestSuite) TestChanOpenConfirm() { channelCap = suite.chainB.GetChannelCapability(channelB.PortID, channelB.ID) }, false}, {"connection not found", func() { - _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, ibctesting.Tendermint) + _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) channelA, channelB, err := suite.coordinator.ChanOpenInit(suite.chainA, suite.chainB, connA, connB, ibctesting.MockPort, ibctesting.MockPort, types.ORDERED) suite.Require().NoError(err) @@ -522,7 +522,7 @@ func (suite *KeeperTestSuite) TestChanOpenConfirm() { suite.chainB.App.IBCKeeper.ChannelKeeper.SetChannel(suite.chainB.GetContext(), channelB.PortID, channelB.ID, channel) }, false}, {"connection is not OPEN", func() { - clientA, clientB := suite.coordinator.SetupClients(suite.chainA, suite.chainB, ibctesting.Tendermint) + clientA, clientB := suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) var err error connA, connB, err = suite.coordinator.ConnOpenInit(suite.chainB, suite.chainA, clientB, clientA) @@ -532,7 +532,7 @@ func (suite *KeeperTestSuite) TestChanOpenConfirm() { channelCap = suite.chainB.GetChannelCapability(channelB.PortID, channelB.ID) }, false}, {"consensus state not found", func() { - _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, ibctesting.Tendermint) + _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) channelA, channelB, err := suite.coordinator.ChanOpenInit(suite.chainA, suite.chainB, connA, connB, ibctesting.MockPort, ibctesting.MockPort, types.ORDERED) suite.Require().NoError(err) @@ -548,7 +548,7 @@ func (suite *KeeperTestSuite) TestChanOpenConfirm() { }, false}, {"channel verification failed", func() { // chainA is INIT, chainB in TRYOPEN - _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, ibctesting.Tendermint) + _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) channelA, channelB, err := suite.coordinator.ChanOpenInit(suite.chainA, suite.chainB, connA, connB, ibctesting.MockPort, ibctesting.MockPort, types.ORDERED) suite.Require().NoError(err) @@ -558,7 +558,7 @@ func (suite *KeeperTestSuite) TestChanOpenConfirm() { channelCap = suite.chainB.GetChannelCapability(channelB.PortID, channelB.ID) }, false}, {"channel capability not found", func() { - _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, ibctesting.Tendermint) + _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) channelA, channelB, err := suite.coordinator.ChanOpenInit(suite.chainA, suite.chainB, connA, connB, ibctesting.MockPort, ibctesting.MockPort, types.ORDERED) suite.Require().NoError(err) @@ -645,7 +645,7 @@ func (suite *KeeperTestSuite) TestChanCloseInit() { suite.chainA.App.IBCKeeper.ChannelKeeper.SetChannel(suite.chainA.GetContext(), channelA.PortID, channelA.ID, channel) }, false}, {"connection is not OPEN", func() { - clientA, clientB := suite.coordinator.SetupClients(suite.chainA, suite.chainB, ibctesting.Tendermint) + clientA, clientB := suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) var err error connA, connB, err = suite.coordinator.ConnOpenInit(suite.chainA, suite.chainB, clientA, clientB) @@ -734,7 +734,7 @@ func (suite *KeeperTestSuite) TestChanCloseConfirm() { suite.chainB.App.IBCKeeper.ChannelKeeper.SetChannel(suite.chainB.GetContext(), channelB.PortID, channelB.ID, channel) }, false}, {"connection is not OPEN", func() { - clientA, clientB := suite.coordinator.SetupClients(suite.chainA, suite.chainB, ibctesting.Tendermint) + clientA, clientB := suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) var err error connB, connA, err = suite.coordinator.ConnOpenInit(suite.chainB, suite.chainA, clientB, clientA) diff --git a/x/ibc/core/04-channel/keeper/keeper_test.go b/x/ibc/core/04-channel/keeper/keeper_test.go index 01f7a75849..d1ea3de5da 100644 --- a/x/ibc/core/04-channel/keeper/keeper_test.go +++ b/x/ibc/core/04-channel/keeper/keeper_test.go @@ -6,6 +6,7 @@ import ( "github.com/stretchr/testify/suite" "github.com/cosmos/cosmos-sdk/x/ibc/core/04-channel/types" + "github.com/cosmos/cosmos-sdk/x/ibc/core/exported" ibctesting "github.com/cosmos/cosmos-sdk/x/ibc/testing" ) @@ -39,7 +40,7 @@ func (suite *KeeperTestSuite) SetupTest() { // and existence of a channel in INIT on chainA. func (suite *KeeperTestSuite) TestSetChannel() { // create client and connections on both chains - _, _, connA, connB := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, ibctesting.Tendermint) + _, _, connA, connB := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) // check for channel to be created on chainB channelA := connA.NextTestChannel(ibctesting.MockPort) diff --git a/x/ibc/core/04-channel/keeper/packet_test.go b/x/ibc/core/04-channel/keeper/packet_test.go index f3624897dd..f04b6ac100 100644 --- a/x/ibc/core/04-channel/keeper/packet_test.go +++ b/x/ibc/core/04-channel/keeper/packet_test.go @@ -130,7 +130,7 @@ func (suite *KeeperTestSuite) TestSendPacket() { channelCap = suite.chainA.GetChannelCapability(channelA.PortID, channelA.ID) }, false}, {"next sequence send not found", func() { - _, _, connA, connB := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, ibctesting.Tendermint) + _, _, connA, connB := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) channelA := connA.NextTestChannel(ibctesting.TransferPort) channelB := connB.NextTestChannel(ibctesting.TransferPort) packet = types.NewPacket(validPacketData, 1, channelA.PortID, channelA.ID, channelB.PortID, channelB.ID, timeoutHeight, disabledTimeoutTimestamp) @@ -276,7 +276,7 @@ func (suite *KeeperTestSuite) TestRecvPacket() { channelCap = suite.chainB.GetChannelCapability(channelB.PortID, channelB.ID) }, false}, {"connection not OPEN", func() { - clientA, clientB := suite.coordinator.SetupClients(suite.chainA, suite.chainB, ibctesting.Tendermint) + clientA, clientB := suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) // connection on chainB is in INIT connB, connA, err := suite.coordinator.ConnOpenInit(suite.chainB, suite.chainA, clientB, clientA) suite.Require().NoError(err) @@ -304,7 +304,7 @@ func (suite *KeeperTestSuite) TestRecvPacket() { channelCap = suite.chainB.GetChannelCapability(channelB.PortID, channelB.ID) }, false}, {"next receive sequence is not found", func() { - _, _, connA, connB := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, ibctesting.Tendermint) + _, _, connA, connB := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) channelA := connA.NextTestChannel(ibctesting.TransferPort) channelB := connB.NextTestChannel(ibctesting.TransferPort) @@ -548,7 +548,7 @@ func (suite *KeeperTestSuite) TestAcknowledgePacket() { channelCap = suite.chainA.GetChannelCapability(channelA.PortID, channelA.ID) }, false}, {"connection not OPEN", func() { - clientA, clientB := suite.coordinator.SetupClients(suite.chainA, suite.chainB, ibctesting.Tendermint) + clientA, clientB := suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) // connection on chainA is in INIT connA, connB, err := suite.coordinator.ConnOpenInit(suite.chainA, suite.chainB, clientA, clientB) suite.Require().NoError(err) @@ -581,7 +581,7 @@ func (suite *KeeperTestSuite) TestAcknowledgePacket() { channelCap = suite.chainA.GetChannelCapability(channelA.PortID, channelA.ID) }, false}, {"next ack sequence not found", func() { - _, _, connA, connB := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, ibctesting.Tendermint) + _, _, connA, connB := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) channelA := connA.NextTestChannel(ibctesting.TransferPort) channelB := connB.NextTestChannel(ibctesting.TransferPort) packet = types.NewPacket(validPacketData, 1, channelA.PortID, channelA.ID, channelB.PortID, channelB.ID, timeoutHeight, disabledTimeoutTimestamp) diff --git a/x/ibc/core/04-channel/keeper/timeout_test.go b/x/ibc/core/04-channel/keeper/timeout_test.go index 2ff4975826..640452e881 100644 --- a/x/ibc/core/04-channel/keeper/timeout_test.go +++ b/x/ibc/core/04-channel/keeper/timeout_test.go @@ -29,7 +29,7 @@ func (suite *KeeperTestSuite) TestTimeoutPacket() { packet = types.NewPacket(validPacketData, 1, channelA.PortID, channelA.ID, channelB.PortID, channelB.ID, clienttypes.GetSelfHeight(suite.chainB.GetContext()), uint64(suite.chainB.GetContext().BlockTime().UnixNano())) suite.coordinator.SendPacket(suite.chainA, suite.chainB, packet, clientB) // need to update chainA's client representing chainB to prove missing ack - suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, ibctesting.Tendermint) + suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) }, true}, {"success: UNORDERED", func() { ordered = false @@ -38,7 +38,7 @@ func (suite *KeeperTestSuite) TestTimeoutPacket() { packet = types.NewPacket(validPacketData, 1, channelA.PortID, channelA.ID, channelB.PortID, channelB.ID, clienttypes.GetSelfHeight(suite.chainB.GetContext()), disabledTimeoutTimestamp) suite.coordinator.SendPacket(suite.chainA, suite.chainB, packet, clientB) // need to update chainA's client representing chainB to prove missing ack - suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, ibctesting.Tendermint) + suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) }, true}, {"channel not found", func() { // use wrong channel naming @@ -77,7 +77,7 @@ func (suite *KeeperTestSuite) TestTimeoutPacket() { clientA, clientB, _, _, channelA, channelB := suite.coordinator.Setup(suite.chainA, suite.chainB, types.ORDERED) packet = types.NewPacket(validPacketData, 1, channelA.PortID, channelA.ID, channelB.PortID, channelB.ID, timeoutHeight, disabledTimeoutTimestamp) suite.coordinator.SendPacket(suite.chainA, suite.chainB, packet, clientB) - suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, ibctesting.Tendermint) + suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) }, false}, {"packet already received ", func() { ordered = true @@ -86,12 +86,12 @@ func (suite *KeeperTestSuite) TestTimeoutPacket() { clientA, clientB, _, _, channelA, channelB := suite.coordinator.Setup(suite.chainA, suite.chainB, types.ORDERED) packet = types.NewPacket(validPacketData, 1, channelA.PortID, channelA.ID, channelB.PortID, channelB.ID, timeoutHeight, uint64(suite.chainB.GetContext().BlockTime().UnixNano())) suite.coordinator.SendPacket(suite.chainA, suite.chainB, packet, clientB) - suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, ibctesting.Tendermint) + suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) }, false}, {"packet hasn't been sent", func() { clientA, _, _, _, channelA, channelB := suite.coordinator.Setup(suite.chainA, suite.chainB, types.ORDERED) packet = types.NewPacket(validPacketData, 1, channelA.PortID, channelA.ID, channelB.PortID, channelB.ID, timeoutHeight, uint64(suite.chainB.GetContext().BlockTime().UnixNano())) - suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, ibctesting.Tendermint) + suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) }, false}, {"next seq receive verification failed", func() { // set ordered to false resulting in wrong proof provided @@ -100,7 +100,7 @@ func (suite *KeeperTestSuite) TestTimeoutPacket() { clientA, clientB, _, _, channelA, channelB := suite.coordinator.Setup(suite.chainA, suite.chainB, types.ORDERED) packet = types.NewPacket(validPacketData, 1, channelA.PortID, channelA.ID, channelB.PortID, channelB.ID, clienttypes.GetSelfHeight(suite.chainB.GetContext()), disabledTimeoutTimestamp) suite.coordinator.SendPacket(suite.chainA, suite.chainB, packet, clientB) - suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, ibctesting.Tendermint) + suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) }, false}, {"packet ack verification failed", func() { // set ordered to true resulting in wrong proof provided @@ -109,7 +109,7 @@ func (suite *KeeperTestSuite) TestTimeoutPacket() { clientA, clientB, _, _, channelA, channelB := suite.coordinator.Setup(suite.chainA, suite.chainB, types.UNORDERED) packet = types.NewPacket(validPacketData, 1, channelA.PortID, channelA.ID, channelB.PortID, channelB.ID, clienttypes.GetSelfHeight(suite.chainB.GetContext()), disabledTimeoutTimestamp) suite.coordinator.SendPacket(suite.chainA, suite.chainB, packet, clientB) - suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, ibctesting.Tendermint) + suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) }, false}, } @@ -213,7 +213,7 @@ func (suite *KeeperTestSuite) TestTimeoutOnClose() { suite.coordinator.SendPacket(suite.chainA, suite.chainB, packet, clientB) suite.coordinator.SetChannelClosed(suite.chainB, suite.chainA, channelB) // need to update chainA's client representing chainB to prove missing ack - suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, ibctesting.Tendermint) + suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) chanCap = suite.chainA.GetChannelCapability(channelA.PortID, channelA.ID) }, true}, @@ -224,7 +224,7 @@ func (suite *KeeperTestSuite) TestTimeoutOnClose() { suite.coordinator.SendPacket(suite.chainA, suite.chainB, packet, clientB) suite.coordinator.SetChannelClosed(suite.chainB, suite.chainA, channelB) // need to update chainA's client representing chainB to prove missing ack - suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, ibctesting.Tendermint) + suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) chanCap = suite.chainA.GetChannelCapability(channelA.PortID, channelA.ID) }, true}, @@ -273,7 +273,7 @@ func (suite *KeeperTestSuite) TestTimeoutOnClose() { suite.coordinator.SendPacket(suite.chainA, suite.chainB, packet, clientB) suite.coordinator.SetChannelClosed(suite.chainB, suite.chainA, channelB) // need to update chainA's client representing chainB to prove missing ack - suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, ibctesting.Tendermint) + suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) chanCap = suite.chainA.GetChannelCapability(channelA.PortID, channelA.ID) }, false}, @@ -291,7 +291,7 @@ func (suite *KeeperTestSuite) TestTimeoutOnClose() { packet = types.NewPacket(validPacketData, 1, channelA.PortID, channelA.ID, channelB.PortID, channelB.ID, clienttypes.GetSelfHeight(suite.chainB.GetContext()), uint64(suite.chainB.GetContext().BlockTime().UnixNano())) suite.coordinator.SendPacket(suite.chainA, suite.chainB, packet, clientB) suite.coordinator.SetChannelClosed(suite.chainB, suite.chainA, channelB) - suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, ibctesting.Tendermint) + suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) chanCap = suite.chainA.GetChannelCapability(channelA.PortID, channelA.ID) }, false}, {"packet ack verification failed", func() { @@ -301,7 +301,7 @@ func (suite *KeeperTestSuite) TestTimeoutOnClose() { packet = types.NewPacket(validPacketData, 1, channelA.PortID, channelA.ID, channelB.PortID, channelB.ID, clienttypes.GetSelfHeight(suite.chainB.GetContext()), disabledTimeoutTimestamp) suite.coordinator.SendPacket(suite.chainA, suite.chainB, packet, clientB) suite.coordinator.SetChannelClosed(suite.chainB, suite.chainA, channelB) - suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, ibctesting.Tendermint) + suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) chanCap = suite.chainA.GetChannelCapability(channelA.PortID, channelA.ID) }, false}, {"channel capability not found", func() { @@ -311,7 +311,7 @@ func (suite *KeeperTestSuite) TestTimeoutOnClose() { suite.coordinator.SendPacket(suite.chainA, suite.chainB, packet, clientB) suite.coordinator.SetChannelClosed(suite.chainB, suite.chainA, channelB) // need to update chainA's client representing chainB to prove missing ack - suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, ibctesting.Tendermint) + suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) chanCap = capabilitytypes.NewCapability(100) }, false}, diff --git a/x/ibc/core/exported/client.go b/x/ibc/core/exported/client.go index e5b38a0598..8c7e89b33e 100644 --- a/x/ibc/core/exported/client.go +++ b/x/ibc/core/exported/client.go @@ -12,9 +12,15 @@ const ( // TypeClientMisbehaviour is the shared evidence misbehaviour type TypeClientMisbehaviour string = "client_misbehaviour" + // Solomachine is used to indicate that the light client is a solo machine. + Solomachine string = "06-solomachine" + + // Tendermint is used to indicate that the client uses the Tendermint Consensus Algorithm. + Tendermint string = "07-tendermint" + // Localhost is the client type for a localhost client. It is also used as the clientID // for the localhost client. - Localhost string = "localhost" + Localhost string = "09-localhost" ) // ClientState defines the required common functions for light clients. diff --git a/x/ibc/core/genesis_test.go b/x/ibc/core/genesis_test.go index d4cf1ec3aa..5290c47897 100644 --- a/x/ibc/core/genesis_test.go +++ b/x/ibc/core/genesis_test.go @@ -96,6 +96,7 @@ func (suite *IBCTestSuite) TestValidateGenesis() { }, ), }, + clienttypes.NewParams(exported.Tendermint, exported.Localhost), true, ), ConnectionGenesis: connectiontypes.NewGenesisState( @@ -150,6 +151,7 @@ func (suite *IBCTestSuite) TestValidateGenesis() { ), }, nil, + clienttypes.NewParams(exported.Tendermint), false, ), ConnectionGenesis: connectiontypes.DefaultGenesisState(), @@ -233,6 +235,7 @@ func (suite *IBCTestSuite) TestInitGenesis() { }, ), }, + clienttypes.NewParams(exported.Tendermint, exported.Localhost), true, ), ConnectionGenesis: connectiontypes.NewGenesisState( @@ -295,8 +298,8 @@ func (suite *IBCTestSuite) TestExportGenesis() { // creates clients suite.coordinator.Setup(suite.chainA, suite.chainB, channeltypes.UNORDERED) // create extra clients - suite.coordinator.CreateClient(suite.chainA, suite.chainB, ibctesting.Tendermint) - suite.coordinator.CreateClient(suite.chainA, suite.chainB, ibctesting.Tendermint) + suite.coordinator.CreateClient(suite.chainA, suite.chainB, exported.Tendermint) + suite.coordinator.CreateClient(suite.chainA, suite.chainB, exported.Tendermint) }, }, } diff --git a/x/ibc/core/keeper/grpc_query.go b/x/ibc/core/keeper/grpc_query.go index e7dbe26109..f406d2e86f 100644 --- a/x/ibc/core/keeper/grpc_query.go +++ b/x/ibc/core/keeper/grpc_query.go @@ -28,6 +28,11 @@ func (q Keeper) ConsensusStates(c context.Context, req *clienttypes.QueryConsens return q.ClientKeeper.ConsensusStates(c, req) } +// ClientParams implements the IBC QueryServer interface +func (q Keeper) ClientParams(c context.Context, req *clienttypes.QueryClientParamsRequest) (*clienttypes.QueryClientParamsResponse, error) { + return q.ClientKeeper.ClientParams(c, req) +} + // Connection implements the IBC QueryServer interface func (q Keeper) Connection(c context.Context, req *connectiontypes.QueryConnectionRequest) (*connectiontypes.QueryConnectionResponse, error) { return q.ConnectionKeeper.Connection(c, req) diff --git a/x/ibc/core/keeper/keeper.go b/x/ibc/core/keeper/keeper.go index e9b7a0f1e5..5f9abc382e 100644 --- a/x/ibc/core/keeper/keeper.go +++ b/x/ibc/core/keeper/keeper.go @@ -11,6 +11,7 @@ import ( portkeeper "github.com/cosmos/cosmos-sdk/x/ibc/core/05-port/keeper" porttypes "github.com/cosmos/cosmos-sdk/x/ibc/core/05-port/types" "github.com/cosmos/cosmos-sdk/x/ibc/core/types" + paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" ) var _ types.QueryServer = (*Keeper)(nil) @@ -31,9 +32,10 @@ type Keeper struct { // NewKeeper creates a new ibc Keeper func NewKeeper( - cdc codec.BinaryMarshaler, key sdk.StoreKey, stakingKeeper clienttypes.StakingKeeper, scopedKeeper capabilitykeeper.ScopedKeeper, + cdc codec.BinaryMarshaler, key sdk.StoreKey, paramSpace paramtypes.Subspace, + stakingKeeper clienttypes.StakingKeeper, scopedKeeper capabilitykeeper.ScopedKeeper, ) *Keeper { - clientKeeper := clientkeeper.NewKeeper(cdc, key, stakingKeeper) + clientKeeper := clientkeeper.NewKeeper(cdc, key, paramSpace, stakingKeeper) connectionKeeper := connectionkeeper.NewKeeper(cdc, key, clientKeeper) portKeeper := portkeeper.NewKeeper(scopedKeeper) channelKeeper := channelkeeper.NewKeeper(cdc, key, clientKeeper, connectionKeeper, portKeeper, scopedKeeper) diff --git a/x/ibc/core/keeper/msg_server_test.go b/x/ibc/core/keeper/msg_server_test.go index 5c4aa466a1..497a806caa 100644 --- a/x/ibc/core/keeper/msg_server_test.go +++ b/x/ibc/core/keeper/msg_server_test.go @@ -331,7 +331,7 @@ func (suite *KeeperTestSuite) TestHandleTimeoutPacket() { suite.Require().NoError(err) // need to update chainA client to prove missing ack - suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, ibctesting.Tendermint) + suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) packetKey = host.NextSequenceRecvKey(packet.GetDestPort(), packet.GetDestChannel()) }, true}, @@ -344,7 +344,7 @@ func (suite *KeeperTestSuite) TestHandleTimeoutPacket() { suite.Require().NoError(err) // need to update chainA client to prove missing ack - suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, ibctesting.Tendermint) + suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) packetKey = host.PacketReceiptKey(packet.GetDestPort(), packet.GetDestChannel(), packet.GetSequence()) }, true}, @@ -362,7 +362,7 @@ func (suite *KeeperTestSuite) TestHandleTimeoutPacket() { suite.Require().NoError(err) } - suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, ibctesting.Tendermint) + suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) packetKey = host.PacketReceiptKey(packet.GetDestPort(), packet.GetDestChannel(), packet.GetSequence()) }, true}, {"success: ORDERED timeout out of order packet", func() { @@ -378,7 +378,7 @@ func (suite *KeeperTestSuite) TestHandleTimeoutPacket() { suite.Require().NoError(err) } - suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, ibctesting.Tendermint) + suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) packetKey = host.NextSequenceRecvKey(packet.GetDestPort(), packet.GetDestChannel()) }, true}, @@ -458,7 +458,7 @@ func (suite *KeeperTestSuite) TestHandleTimeoutOnClosePacket() { suite.Require().NoError(err) // need to update chainA client to prove missing ack - suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, ibctesting.Tendermint) + suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) packetKey = host.NextSequenceRecvKey(packet.GetDestPort(), packet.GetDestChannel()) @@ -479,7 +479,7 @@ func (suite *KeeperTestSuite) TestHandleTimeoutOnClosePacket() { suite.Require().NoError(err) // need to update chainA client to prove missing ack - suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, ibctesting.Tendermint) + suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) packetKey = host.PacketReceiptKey(packet.GetDestPort(), packet.GetDestChannel(), packet.GetSequence()) @@ -505,7 +505,7 @@ func (suite *KeeperTestSuite) TestHandleTimeoutOnClosePacket() { suite.Require().NoError(err) } - suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, ibctesting.Tendermint) + suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) packetKey = host.PacketReceiptKey(packet.GetDestPort(), packet.GetDestChannel(), packet.GetSequence()) // close counterparty channel @@ -529,7 +529,7 @@ func (suite *KeeperTestSuite) TestHandleTimeoutOnClosePacket() { suite.Require().NoError(err) } - suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, ibctesting.Tendermint) + suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) packetKey = host.NextSequenceRecvKey(packet.GetDestPort(), packet.GetDestChannel()) // close counterparty channel @@ -568,7 +568,7 @@ func (suite *KeeperTestSuite) TestHandleTimeoutOnClosePacket() { suite.Require().NoError(err) // need to update chainA client to prove missing ack - suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, ibctesting.Tendermint) + suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) packetKey = host.NextSequenceRecvKey(packet.GetDestPort(), packet.GetDestChannel()) }, false}, @@ -639,7 +639,7 @@ func (suite *KeeperTestSuite) TestUpgradeClient() { // commit upgrade store changes and update clients suite.coordinator.CommitBlock(suite.chainB) - err := suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, ibctesting.Tendermint) + err := suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) suite.Require().NoError(err) cs, found := suite.chainA.App.IBCKeeper.ClientKeeper.GetClientState(suite.chainA.GetContext(), clientA) @@ -689,7 +689,7 @@ func (suite *KeeperTestSuite) TestUpgradeClient() { // commit upgrade store changes and update clients suite.coordinator.CommitBlock(suite.chainB) - err := suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, ibctesting.Tendermint) + err := suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) suite.Require().NoError(err) msg, err = clienttypes.NewMsgUpgradeClient(clientA, upgradedClient, upgradeHeight, nil, suite.chainA.SenderAccount.GetAddress()) @@ -701,7 +701,7 @@ func (suite *KeeperTestSuite) TestUpgradeClient() { for _, tc := range cases { tc := tc - clientA, _ = suite.coordinator.SetupClients(suite.chainA, suite.chainB, ibctesting.Tendermint) + clientA, _ = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) tc.setup() diff --git a/x/ibc/core/spec/07_params.md b/x/ibc/core/spec/07_params.md new file mode 100644 index 0000000000..67e79ef81d --- /dev/null +++ b/x/ibc/core/spec/07_params.md @@ -0,0 +1,21 @@ + + +# Parameters + +## Clients + +The ibc clients contain the following parameters: + +| Key | Type | Default Value | +|------------------|------|---------------| +| `AllowedClients` | []string | `"06-solomachine","07-tendermint"` | + +### AllowedClients + +The allowed clients parameter defines an allowlist of client types supported by the chain. A client +that is not registered on this list will fail upon creation or on genesis validation. Note that, +since the client type is an arbitrary string, chains they must not register two light clients which +return the same value for the `ClientType()` function, otherwise the allowlist check can be +bypassed. diff --git a/x/ibc/core/spec/README.md b/x/ibc/core/spec/README.md index 0ae00bbcda..f6de9749b5 100644 --- a/x/ibc/core/spec/README.md +++ b/x/ibc/core/spec/README.md @@ -23,3 +23,4 @@ For the general specification please refer to the [Interchain Standards](https:/ 4. **[Messages](04_messages.md)** 5. **[Callbacks](05_callbacks.md)** 6. **[Events](06_events.md)** +7. **[Params](07_params.md)** diff --git a/x/ibc/light-clients/06-solomachine/types/client_state.go b/x/ibc/light-clients/06-solomachine/types/client_state.go index 05ed359baf..34cb91964b 100644 --- a/x/ibc/light-clients/06-solomachine/types/client_state.go +++ b/x/ibc/light-clients/06-solomachine/types/client_state.go @@ -16,9 +16,6 @@ import ( var _ exported.ClientState = (*ClientState)(nil) -// SoloMachine is used to indicate that the light client is a solo machine. -const SoloMachine string = "Solo Machine" - // NewClientState creates a new ClientState instance. func NewClientState(latestSequence uint64, consensusState *ConsensusState, allowUpdateAfterProposal bool) *ClientState { return &ClientState{ @@ -31,7 +28,7 @@ func NewClientState(latestSequence uint64, consensusState *ConsensusState, allow // ClientType is Solo Machine. func (cs ClientState) ClientType() string { - return SoloMachine + return exported.Solomachine } // GetLatestHeight returns the latest sequence number. diff --git a/x/ibc/light-clients/06-solomachine/types/client_state_test.go b/x/ibc/light-clients/06-solomachine/types/client_state_test.go index f2daca5ae3..597adff345 100644 --- a/x/ibc/light-clients/06-solomachine/types/client_state_test.go +++ b/x/ibc/light-clients/06-solomachine/types/client_state_test.go @@ -82,7 +82,7 @@ func (suite *SoloMachineTestSuite) TestClientStateValidateBasic() { func (suite *SoloMachineTestSuite) TestVerifyClientState() { // create client for tendermint so we can use client state for verification - clientA, _ := suite.coordinator.SetupClients(suite.chainA, suite.chainB, ibctesting.Tendermint) + clientA, _ := suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) clientState := suite.chainA.GetClientState(clientA) path := suite.solomachine.GetClientStatePath(counterpartyClientIdentifier) @@ -208,7 +208,7 @@ func (suite *SoloMachineTestSuite) TestVerifyClientState() { func (suite *SoloMachineTestSuite) TestVerifyClientConsensusState() { // create client for tendermint so we can use consensus state for verification - clientA, _ := suite.coordinator.SetupClients(suite.chainA, suite.chainB, ibctesting.Tendermint) + clientA, _ := suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) clientState := suite.chainA.GetClientState(clientA) consensusState, found := suite.chainA.GetConsensusState(clientA, clientState.GetLatestHeight()) suite.Require().True(found) diff --git a/x/ibc/light-clients/06-solomachine/types/consensus_state.go b/x/ibc/light-clients/06-solomachine/types/consensus_state.go index cebd399ffa..1cc95caf08 100644 --- a/x/ibc/light-clients/06-solomachine/types/consensus_state.go +++ b/x/ibc/light-clients/06-solomachine/types/consensus_state.go @@ -13,7 +13,7 @@ var _ exported.ConsensusState = ConsensusState{} // ClientType returns Solo Machine type. func (ConsensusState) ClientType() string { - return SoloMachine + return exported.Solomachine } // GetTimestamp returns zero. diff --git a/x/ibc/light-clients/06-solomachine/types/consensus_state_test.go b/x/ibc/light-clients/06-solomachine/types/consensus_state_test.go index 820e812462..e0c22f9595 100644 --- a/x/ibc/light-clients/06-solomachine/types/consensus_state_test.go +++ b/x/ibc/light-clients/06-solomachine/types/consensus_state_test.go @@ -1,6 +1,7 @@ package types_test import ( + "github.com/cosmos/cosmos-sdk/x/ibc/core/exported" "github.com/cosmos/cosmos-sdk/x/ibc/light-clients/06-solomachine/types" ibctesting "github.com/cosmos/cosmos-sdk/x/ibc/testing" ) @@ -8,7 +9,7 @@ import ( func (suite *SoloMachineTestSuite) TestConsensusState() { consensusState := suite.solomachine.ConsensusState() - suite.Require().Equal(types.SoloMachine, consensusState.ClientType()) + suite.Require().Equal(exported.Solomachine, consensusState.ClientType()) suite.Require().Equal(suite.solomachine.Time, consensusState.GetTimestamp()) suite.Require().Nil(consensusState.GetRoot()) } diff --git a/x/ibc/light-clients/06-solomachine/types/header.go b/x/ibc/light-clients/06-solomachine/types/header.go index cb2b55b4f8..dc43cee4f7 100644 --- a/x/ibc/light-clients/06-solomachine/types/header.go +++ b/x/ibc/light-clients/06-solomachine/types/header.go @@ -13,7 +13,7 @@ var _ exported.Header = Header{} // ClientType defines that the Header is a Solo Machine. func (Header) ClientType() string { - return SoloMachine + return exported.Solomachine } // GetHeight returns the current sequence number as the height. diff --git a/x/ibc/light-clients/06-solomachine/types/header_test.go b/x/ibc/light-clients/06-solomachine/types/header_test.go index e456f9e966..a5ca45e8aa 100644 --- a/x/ibc/light-clients/06-solomachine/types/header_test.go +++ b/x/ibc/light-clients/06-solomachine/types/header_test.go @@ -1,6 +1,7 @@ package types_test import ( + "github.com/cosmos/cosmos-sdk/x/ibc/core/exported" "github.com/cosmos/cosmos-sdk/x/ibc/light-clients/06-solomachine/types" ibctesting "github.com/cosmos/cosmos-sdk/x/ibc/testing" ) @@ -78,7 +79,7 @@ func (suite *SoloMachineTestSuite) TestHeaderValidateBasic() { }, } - suite.Require().Equal(types.SoloMachine, header.ClientType()) + suite.Require().Equal(exported.Solomachine, header.ClientType()) for _, tc := range cases { tc := tc diff --git a/x/ibc/light-clients/06-solomachine/types/misbehaviour.go b/x/ibc/light-clients/06-solomachine/types/misbehaviour.go index 1f97f323ce..66ee6d9392 100644 --- a/x/ibc/light-clients/06-solomachine/types/misbehaviour.go +++ b/x/ibc/light-clients/06-solomachine/types/misbehaviour.go @@ -17,7 +17,7 @@ var ( // ClientType is a Solo Machine light client. func (misbehaviour Misbehaviour) ClientType() string { - return SoloMachine + return exported.Solomachine } // GetClientID returns the ID of the client that committed a misbehaviour. diff --git a/x/ibc/light-clients/06-solomachine/types/misbehaviour_test.go b/x/ibc/light-clients/06-solomachine/types/misbehaviour_test.go index 311dc8d8c8..a976186eab 100644 --- a/x/ibc/light-clients/06-solomachine/types/misbehaviour_test.go +++ b/x/ibc/light-clients/06-solomachine/types/misbehaviour_test.go @@ -1,6 +1,7 @@ package types_test import ( + "github.com/cosmos/cosmos-sdk/x/ibc/core/exported" "github.com/cosmos/cosmos-sdk/x/ibc/light-clients/06-solomachine/types" ibctesting "github.com/cosmos/cosmos-sdk/x/ibc/testing" ) @@ -8,7 +9,7 @@ import ( func (suite *SoloMachineTestSuite) TestMisbehaviour() { misbehaviour := suite.solomachine.CreateMisbehaviour() - suite.Require().Equal(types.SoloMachine, misbehaviour.ClientType()) + suite.Require().Equal(exported.Solomachine, misbehaviour.ClientType()) suite.Require().Equal(suite.solomachine.ClientID, misbehaviour.GetClientID()) suite.Require().Equal(uint64(0), misbehaviour.GetHeight().GetVersionNumber()) suite.Require().Equal(suite.solomachine.Sequence, misbehaviour.GetHeight().GetVersionHeight()) diff --git a/x/ibc/light-clients/06-solomachine/types/solomachine_test.go b/x/ibc/light-clients/06-solomachine/types/solomachine_test.go index 53f5c4a48c..b3b647d829 100644 --- a/x/ibc/light-clients/06-solomachine/types/solomachine_test.go +++ b/x/ibc/light-clients/06-solomachine/types/solomachine_test.go @@ -41,7 +41,7 @@ func (suite *SoloMachineTestSuite) SetupTest() { suite.solomachine = ibctesting.NewSolomachine(suite.T(), suite.chainA.Codec, "solomachinesingle", "testing", 1) suite.solomachineMulti = ibctesting.NewSolomachine(suite.T(), suite.chainA.Codec, "solomachinemulti", "testing", 4) - suite.store = suite.chainA.App.IBCKeeper.ClientKeeper.ClientStore(suite.chainA.GetContext(), types.SoloMachine) + suite.store = suite.chainA.App.IBCKeeper.ClientKeeper.ClientStore(suite.chainA.GetContext(), exported.Solomachine) } func TestSoloMachineTestSuite(t *testing.T) { diff --git a/x/ibc/light-clients/07-tendermint/types/client_state.go b/x/ibc/light-clients/07-tendermint/types/client_state.go index 3940d44b7f..6807304468 100644 --- a/x/ibc/light-clients/07-tendermint/types/client_state.go +++ b/x/ibc/light-clients/07-tendermint/types/client_state.go @@ -22,9 +22,6 @@ import ( var _ exported.ClientState = (*ClientState)(nil) -// Tendermint is used to indicate that the client uses the Tendermint Consensus Algorithm. -const Tendermint string = "Tendermint" - // NewClientState creates a new ClientState instance func NewClientState( chainID string, trustLevel Fraction, @@ -55,7 +52,7 @@ func (cs ClientState) GetChainID() string { // ClientType is tendermint. func (cs ClientState) ClientType() string { - return Tendermint + return exported.Tendermint } // GetLatestHeight returns latest block height. diff --git a/x/ibc/light-clients/07-tendermint/types/client_state_test.go b/x/ibc/light-clients/07-tendermint/types/client_state_test.go index 90ff6767f0..dc662da8fd 100644 --- a/x/ibc/light-clients/07-tendermint/types/client_state_test.go +++ b/x/ibc/light-clients/07-tendermint/types/client_state_test.go @@ -554,7 +554,7 @@ func (suite *TendermintTestSuite) TestVerifyPacketReceiptAbsence() { suite.Require().NoError(err) // need to update chainA's client representing chainB to prove missing ack - suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, ibctesting.Tendermint) + suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) var ok bool clientStateI := suite.chainA.GetClientState(clientA) @@ -645,7 +645,7 @@ func (suite *TendermintTestSuite) TestVerifyNextSeqRecv() { suite.Require().NoError(err) // need to update chainA's client representing chainB - suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, ibctesting.Tendermint) + suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) var ok bool clientStateI := suite.chainA.GetClientState(clientA) diff --git a/x/ibc/light-clients/07-tendermint/types/consensus_state.go b/x/ibc/light-clients/07-tendermint/types/consensus_state.go index 0a8981281c..d55bc11305 100644 --- a/x/ibc/light-clients/07-tendermint/types/consensus_state.go +++ b/x/ibc/light-clients/07-tendermint/types/consensus_state.go @@ -26,7 +26,7 @@ func NewConsensusState( // ClientType returns Tendermint func (ConsensusState) ClientType() string { - return Tendermint + return exported.Tendermint } // GetRoot returns the commitment Root for the specific diff --git a/x/ibc/light-clients/07-tendermint/types/consensus_state_test.go b/x/ibc/light-clients/07-tendermint/types/consensus_state_test.go index a3a8b154a6..313815d0c7 100644 --- a/x/ibc/light-clients/07-tendermint/types/consensus_state_test.go +++ b/x/ibc/light-clients/07-tendermint/types/consensus_state_test.go @@ -4,6 +4,7 @@ import ( "time" commitmenttypes "github.com/cosmos/cosmos-sdk/x/ibc/core/23-commitment/types" + "github.com/cosmos/cosmos-sdk/x/ibc/core/exported" "github.com/cosmos/cosmos-sdk/x/ibc/light-clients/07-tendermint/types" ) @@ -54,13 +55,15 @@ func (suite *TendermintTestSuite) TestConsensusStateValidateBasic() { for i, tc := range testCases { tc := tc - suite.Require().Equal(tc.consensusState.ClientType(), types.Tendermint) + // check just to increase coverage + suite.Require().Equal(exported.Tendermint, tc.consensusState.ClientType()) suite.Require().Equal(tc.consensusState.GetRoot(), tc.consensusState.Root) + err := tc.consensusState.ValidateBasic() if tc.expectPass { - suite.Require().NoError(tc.consensusState.ValidateBasic(), "valid test case %d failed: %s", i, tc.msg) + suite.Require().NoError(err, "valid test case %d failed: %s", i, tc.msg) } else { - suite.Require().Error(tc.consensusState.ValidateBasic(), "invalid test case %d passed: %s", i, tc.msg) + suite.Require().Error(err, "invalid test case %d passed: %s", i, tc.msg) } } } diff --git a/x/ibc/light-clients/07-tendermint/types/header.go b/x/ibc/light-clients/07-tendermint/types/header.go index 86e166caf5..e128abea1c 100644 --- a/x/ibc/light-clients/07-tendermint/types/header.go +++ b/x/ibc/light-clients/07-tendermint/types/header.go @@ -25,7 +25,7 @@ func (h Header) ConsensusState() *ConsensusState { // ClientType defines that the Header is a Tendermint consensus algorithm func (h Header) ClientType() string { - return Tendermint + return exported.Tendermint } // GetHeight returns the current height. It returns 0 if the tendermint diff --git a/x/ibc/light-clients/07-tendermint/types/header_test.go b/x/ibc/light-clients/07-tendermint/types/header_test.go index 235e1f7584..cda3047be2 100644 --- a/x/ibc/light-clients/07-tendermint/types/header_test.go +++ b/x/ibc/light-clients/07-tendermint/types/header_test.go @@ -6,6 +6,7 @@ import ( tmprotocrypto "github.com/tendermint/tendermint/proto/tendermint/crypto" clienttypes "github.com/cosmos/cosmos-sdk/x/ibc/core/02-client/types" + "github.com/cosmos/cosmos-sdk/x/ibc/core/exported" "github.com/cosmos/cosmos-sdk/x/ibc/light-clients/07-tendermint/types" ) @@ -63,7 +64,7 @@ func (suite *TendermintTestSuite) TestHeaderValidateBasic() { }, false}, } - suite.Require().Equal(types.Tendermint, suite.header.ClientType()) + suite.Require().Equal(exported.Tendermint, suite.header.ClientType()) for _, tc := range testCases { tc := tc diff --git a/x/ibc/light-clients/07-tendermint/types/misbehaviour.go b/x/ibc/light-clients/07-tendermint/types/misbehaviour.go index b1277110a2..c090ecb0b6 100644 --- a/x/ibc/light-clients/07-tendermint/types/misbehaviour.go +++ b/x/ibc/light-clients/07-tendermint/types/misbehaviour.go @@ -27,12 +27,11 @@ func NewMisbehaviour(clientID, chainID string, header1, header2 *Header) *Misbeh Header1: header1, Header2: header2, } - } // ClientType is Tendermint light client func (misbehaviour Misbehaviour) ClientType() string { - return Tendermint + return exported.Tendermint } // GetClientID returns the ID of the client that committed a misbehaviour. diff --git a/x/ibc/light-clients/07-tendermint/types/misbehaviour_test.go b/x/ibc/light-clients/07-tendermint/types/misbehaviour_test.go index 6f70c4b716..9d7cddff5c 100644 --- a/x/ibc/light-clients/07-tendermint/types/misbehaviour_test.go +++ b/x/ibc/light-clients/07-tendermint/types/misbehaviour_test.go @@ -8,6 +8,7 @@ import ( tmtypes "github.com/tendermint/tendermint/types" clienttypes "github.com/cosmos/cosmos-sdk/x/ibc/core/02-client/types" + "github.com/cosmos/cosmos-sdk/x/ibc/core/exported" "github.com/cosmos/cosmos-sdk/x/ibc/light-clients/07-tendermint/types" ibctesting "github.com/cosmos/cosmos-sdk/x/ibc/testing" ibctestingmock "github.com/cosmos/cosmos-sdk/x/ibc/testing/mock" @@ -24,7 +25,7 @@ func (suite *TendermintTestSuite) TestMisbehaviour() { ClientId: clientID, } - suite.Require().Equal(types.Tendermint, misbehaviour.ClientType()) + suite.Require().Equal(exported.Tendermint, misbehaviour.ClientType()) suite.Require().Equal(clientID, misbehaviour.GetClientID()) suite.Require().Equal(height, misbehaviour.GetHeight()) } diff --git a/x/ibc/light-clients/07-tendermint/types/proposal_handle_test.go b/x/ibc/light-clients/07-tendermint/types/proposal_handle_test.go index 33c10854e7..062a29a0dc 100644 --- a/x/ibc/light-clients/07-tendermint/types/proposal_handle_test.go +++ b/x/ibc/light-clients/07-tendermint/types/proposal_handle_test.go @@ -2,6 +2,7 @@ package types_test import ( clienttypes "github.com/cosmos/cosmos-sdk/x/ibc/core/02-client/types" + "github.com/cosmos/cosmos-sdk/x/ibc/core/exported" "github.com/cosmos/cosmos-sdk/x/ibc/light-clients/07-tendermint/types" ibctesting "github.com/cosmos/cosmos-sdk/x/ibc/testing" ) @@ -12,7 +13,7 @@ var ( // sanity checks func (suite *TendermintTestSuite) TestCheckProposedHeaderAndUpdateStateBasic() { - clientA, _ := suite.coordinator.SetupClients(suite.chainA, suite.chainB, ibctesting.Tendermint) + clientA, _ := suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) clientState := suite.chainA.GetClientState(clientA).(*types.ClientState) clientStore := suite.chainA.App.IBCKeeper.ClientKeeper.ClientStore(suite.chainA.GetContext(), clientA) @@ -201,7 +202,7 @@ func (suite *TendermintTestSuite) TestCheckProposedHeaderAndUpdateState() { suite.SetupTest() // reset // construct client state based on test case parameters - clientA, _ := suite.coordinator.SetupClients(suite.chainA, suite.chainB, ibctesting.Tendermint) + clientA, _ := suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) clientState := suite.chainA.GetClientState(clientA).(*types.ClientState) clientState.AllowUpdateAfterExpiry = tc.AllowUpdateAfterExpiry clientState.AllowUpdateAfterMisbehaviour = tc.AllowUpdateAfterMisbehaviour @@ -319,7 +320,7 @@ func (suite *TendermintTestSuite) TestCheckProposedHeader() { suite.Run(tc.name, func() { suite.SetupTest() // reset - clientA, _ = suite.coordinator.SetupClients(suite.chainA, suite.chainB, ibctesting.Tendermint) + clientA, _ = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) clientState = suite.chainA.GetClientState(clientA).(*types.ClientState) clientState.AllowUpdateAfterExpiry = true clientState.AllowUpdateAfterMisbehaviour = false diff --git a/x/ibc/light-clients/07-tendermint/types/upgrade_test.go b/x/ibc/light-clients/07-tendermint/types/upgrade_test.go index f5debb01a6..bb2108508d 100644 --- a/x/ibc/light-clients/07-tendermint/types/upgrade_test.go +++ b/x/ibc/light-clients/07-tendermint/types/upgrade_test.go @@ -37,7 +37,7 @@ func (suite *TendermintTestSuite) TestVerifyUpgrade() { // commit upgrade store changes and update clients suite.coordinator.CommitBlock(suite.chainB) - err := suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, ibctesting.Tendermint) + err := suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) suite.Require().NoError(err) cs, found := suite.chainA.App.IBCKeeper.ClientKeeper.GetClientState(suite.chainA.GetContext(), clientA) @@ -63,7 +63,7 @@ func (suite *TendermintTestSuite) TestVerifyUpgrade() { upgradedClient = types.NewClientState("newChainId", types.DefaultTrustLevel, ubdPeriod, ubdPeriod+trustingPeriod, maxClockDrift+5, newClientHeight, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), upgradePath, true, false) suite.coordinator.CommitBlock(suite.chainB) - err := suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, ibctesting.Tendermint) + err := suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) suite.Require().NoError(err) cs, found := suite.chainA.App.IBCKeeper.ClientKeeper.GetClientState(suite.chainA.GetContext(), clientA) @@ -93,7 +93,7 @@ func (suite *TendermintTestSuite) TestVerifyUpgrade() { // commit upgrade store changes and update clients suite.coordinator.CommitBlock(suite.chainB) - err := suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, ibctesting.Tendermint) + err := suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) suite.Require().NoError(err) cs, found := suite.chainA.App.IBCKeeper.ClientKeeper.GetClientState(suite.chainA.GetContext(), clientA) @@ -119,7 +119,7 @@ func (suite *TendermintTestSuite) TestVerifyUpgrade() { upgradedClient = types.NewClientState("wrongchainID", types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, newClientHeight, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), upgradePath, true, true) suite.coordinator.CommitBlock(suite.chainB) - err := suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, ibctesting.Tendermint) + err := suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) suite.Require().NoError(err) cs, found := suite.chainA.App.IBCKeeper.ClientKeeper.GetClientState(suite.chainA.GetContext(), clientA) @@ -141,7 +141,7 @@ func (suite *TendermintTestSuite) TestVerifyUpgrade() { upgradedClient = types.NewClientState("newChainId", types.DefaultTrustLevel, ubdPeriod, ubdPeriod+trustingPeriod, maxClockDrift+5, upgradeHeight, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), upgradePath, true, false) suite.coordinator.CommitBlock(suite.chainB) - err := suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, ibctesting.Tendermint) + err := suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) suite.Require().NoError(err) cs, found := suite.chainA.App.IBCKeeper.ClientKeeper.GetClientState(suite.chainA.GetContext(), clientA) @@ -198,7 +198,7 @@ func (suite *TendermintTestSuite) TestVerifyUpgrade() { // commit upgrade store changes and update clients suite.coordinator.CommitBlock(suite.chainB) - err := suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, ibctesting.Tendermint) + err := suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) suite.Require().NoError(err) cs, found := suite.chainA.App.IBCKeeper.ClientKeeper.GetClientState(suite.chainA.GetContext(), clientA) @@ -228,7 +228,7 @@ func (suite *TendermintTestSuite) TestVerifyUpgrade() { // commit upgrade store changes and update clients suite.coordinator.CommitBlock(suite.chainB) - err := suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, ibctesting.Tendermint) + err := suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) suite.Require().NoError(err) cs, found := suite.chainA.App.IBCKeeper.ClientKeeper.GetClientState(suite.chainA.GetContext(), clientA) @@ -258,7 +258,7 @@ func (suite *TendermintTestSuite) TestVerifyUpgrade() { // commit upgrade store changes and update clients suite.coordinator.CommitBlock(suite.chainB) - err := suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, ibctesting.Tendermint) + err := suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) suite.Require().NoError(err) cs, found := suite.chainA.App.IBCKeeper.ClientKeeper.GetClientState(suite.chainA.GetContext(), clientA) @@ -283,7 +283,7 @@ func (suite *TendermintTestSuite) TestVerifyUpgrade() { // commit upgrade store changes and update clients suite.coordinator.CommitBlock(suite.chainB) - err := suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, ibctesting.Tendermint) + err := suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) suite.Require().NoError(err) cs, found := suite.chainA.App.IBCKeeper.ClientKeeper.GetClientState(suite.chainA.GetContext(), clientA) @@ -304,7 +304,7 @@ func (suite *TendermintTestSuite) TestVerifyUpgrade() { // commit upgrade store changes and update clients suite.coordinator.CommitBlock(suite.chainB) - err := suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, ibctesting.Tendermint) + err := suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) suite.Require().NoError(err) // expire chainB's client @@ -325,7 +325,7 @@ func (suite *TendermintTestSuite) TestVerifyUpgrade() { // reset suite suite.SetupTest() - clientA, _ = suite.coordinator.SetupClients(suite.chainA, suite.chainB, ibctesting.Tendermint) + clientA, _ = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) tc.setup() diff --git a/x/ibc/testing/chain.go b/x/ibc/testing/chain.go index 5886695efd..bba056f459 100644 --- a/x/ibc/testing/chain.go +++ b/x/ibc/testing/chain.go @@ -33,7 +33,6 @@ import ( host "github.com/cosmos/cosmos-sdk/x/ibc/core/24-host" "github.com/cosmos/cosmos-sdk/x/ibc/core/exported" "github.com/cosmos/cosmos-sdk/x/ibc/core/types" - solomachinetypes "github.com/cosmos/cosmos-sdk/x/ibc/light-clients/06-solomachine/types" ibctmtypes "github.com/cosmos/cosmos-sdk/x/ibc/light-clients/07-tendermint/types" "github.com/cosmos/cosmos-sdk/x/ibc/testing/mock" "github.com/cosmos/cosmos-sdk/x/staking/teststaking" @@ -41,10 +40,6 @@ import ( ) const ( - // client types - Tendermint = ibctmtypes.Tendermint - SoloMachine = solomachinetypes.SoloMachine - // Default params constants used to create a TM client TrustingPeriod time.Duration = time.Hour * 24 * 7 * 2 UnbondingPeriod time.Duration = time.Hour * 24 * 7 * 3 @@ -432,7 +427,7 @@ func (chain *TestChain) ConstructMsgCreateClient(counterparty *TestChain, client ) switch clientType { - case Tendermint: + case exported.Tendermint: height := counterparty.LastHeader.GetHeight().(clienttypes.Height) clientState = ibctmtypes.NewClientState( counterparty.ChainID, DefaultTrustLevel, TrustingPeriod, UnbondingPeriod, MaxClockDrift, @@ -440,7 +435,7 @@ func (chain *TestChain) ConstructMsgCreateClient(counterparty *TestChain, client UpgradePath, false, false, ) consensusState = counterparty.LastHeader.ConsensusState() - case SoloMachine: + case exported.Solomachine: solo := NewSolomachine(chain.t, chain.Codec, clientID, "", 1) clientState = solo.ClientState() consensusState = solo.ConsensusState() @@ -459,7 +454,7 @@ func (chain *TestChain) ConstructMsgCreateClient(counterparty *TestChain, client // client will be created on the (target) chain. func (chain *TestChain) CreateTMClient(counterparty *TestChain, clientID string) error { // construct MsgCreateClient using counterparty - msg := chain.ConstructMsgCreateClient(counterparty, clientID, Tendermint) + msg := chain.ConstructMsgCreateClient(counterparty, clientID, exported.Tendermint) return chain.sendMsgs(msg) } diff --git a/x/ibc/testing/coordinator.go b/x/ibc/testing/coordinator.go index ce5c8607f5..b1c6e99d3f 100644 --- a/x/ibc/testing/coordinator.go +++ b/x/ibc/testing/coordinator.go @@ -49,7 +49,7 @@ func NewCoordinator(t *testing.T, n int) *Coordinator { func (coord *Coordinator) Setup( chainA, chainB *TestChain, order channeltypes.Order, ) (string, string, *TestConnection, *TestConnection, TestChannel, TestChannel) { - clientA, clientB, connA, connB := coord.SetupClientConnections(chainA, chainB, Tendermint) + clientA, clientB, connA, connB := coord.SetupClientConnections(chainA, chainB, exported.Tendermint) // channels can also be referenced through the returned connections channelA, channelB := coord.CreateMockChannels(chainA, chainB, connA, connB, order) @@ -98,7 +98,7 @@ func (coord *Coordinator) CreateClient( clientID = source.NewClientID(counterparty.ChainID) switch clientType { - case Tendermint: + case exported.Tendermint: err = source.CreateTMClient(counterparty, clientID) default: @@ -123,7 +123,7 @@ func (coord *Coordinator) UpdateClient( coord.CommitBlock(source, counterparty) switch clientType { - case Tendermint: + case exported.Tendermint: err = source.UpdateTMClient(counterparty, clientID) default: @@ -226,7 +226,7 @@ func (coord *Coordinator) SendPacket( // update source client on counterparty connection return coord.UpdateClient( counterparty, source, - counterpartyClientID, Tendermint, + counterpartyClientID, exported.Tendermint, ) } @@ -262,7 +262,7 @@ func (coord *Coordinator) WriteAcknowledgement( // update source client on counterparty connection return coord.UpdateClient( counterparty, source, - counterpartyClientID, Tendermint, + counterpartyClientID, exported.Tendermint, ) } @@ -327,7 +327,7 @@ func (coord *Coordinator) SendMsgs(source, counterparty *TestChain, counterparty // update source client on counterparty connection return coord.UpdateClient( counterparty, source, - counterpartyClientID, Tendermint, + counterpartyClientID, exported.Tendermint, ) } @@ -386,7 +386,7 @@ func (coord *Coordinator) ConnOpenInit( // update source client on counterparty connection if err := coord.UpdateClient( counterparty, source, - counterpartyClientID, Tendermint, + counterpartyClientID, exported.Tendermint, ); err != nil { return sourceConnection, counterpartyConnection, err } @@ -409,7 +409,7 @@ func (coord *Coordinator) ConnOpenTry( // update source client on counterparty connection return coord.UpdateClient( counterparty, source, - counterpartyConnection.ClientID, Tendermint, + counterpartyConnection.ClientID, exported.Tendermint, ) } @@ -428,7 +428,7 @@ func (coord *Coordinator) ConnOpenAck( // update source client on counterparty connection return coord.UpdateClient( counterparty, source, - counterpartyConnection.ClientID, Tendermint, + counterpartyConnection.ClientID, exported.Tendermint, ) } @@ -446,7 +446,7 @@ func (coord *Coordinator) ConnOpenConfirm( // update source client on counterparty connection return coord.UpdateClient( counterparty, source, - counterpartyConnection.ClientID, Tendermint, + counterpartyConnection.ClientID, exported.Tendermint, ) } @@ -478,7 +478,7 @@ func (coord *Coordinator) ChanOpenInit( // update source client on counterparty connection if err := coord.UpdateClient( counterparty, source, - counterpartyConnection.ClientID, Tendermint, + counterpartyConnection.ClientID, exported.Tendermint, ); err != nil { return sourceChannel, counterpartyChannel, err } @@ -518,7 +518,7 @@ func (coord *Coordinator) ChanOpenInitOnBothChains( // update counterparty client on source connection if err := coord.UpdateClient( source, counterparty, - connection.ClientID, Tendermint, + connection.ClientID, exported.Tendermint, ); err != nil { return sourceChannel, counterpartyChannel, err } @@ -526,7 +526,7 @@ func (coord *Coordinator) ChanOpenInitOnBothChains( // update source client on counterparty connection if err := coord.UpdateClient( counterparty, source, - counterpartyConnection.ClientID, Tendermint, + counterpartyConnection.ClientID, exported.Tendermint, ); err != nil { return sourceChannel, counterpartyChannel, err } @@ -552,7 +552,7 @@ func (coord *Coordinator) ChanOpenTry( // update source client on counterparty connection return coord.UpdateClient( counterparty, source, - connection.CounterpartyClientID, Tendermint, + connection.CounterpartyClientID, exported.Tendermint, ) } @@ -571,7 +571,7 @@ func (coord *Coordinator) ChanOpenAck( // update source client on counterparty connection return coord.UpdateClient( counterparty, source, - sourceChannel.CounterpartyClientID, Tendermint, + sourceChannel.CounterpartyClientID, exported.Tendermint, ) } @@ -590,7 +590,7 @@ func (coord *Coordinator) ChanOpenConfirm( // update source client on counterparty connection return coord.UpdateClient( counterparty, source, - sourceChannel.CounterpartyClientID, Tendermint, + sourceChannel.CounterpartyClientID, exported.Tendermint, ) } @@ -611,7 +611,7 @@ func (coord *Coordinator) ChanCloseInit( // update source client on counterparty connection return coord.UpdateClient( counterparty, source, - channel.CounterpartyClientID, Tendermint, + channel.CounterpartyClientID, exported.Tendermint, ) } @@ -630,6 +630,6 @@ func (coord *Coordinator) SetChannelClosed( // update source client on counterparty connection return coord.UpdateClient( counterparty, source, - testChannel.CounterpartyClientID, Tendermint, + testChannel.CounterpartyClientID, exported.Tendermint, ) } diff --git a/x/staking/types/staking.pb.go b/x/staking/types/staking.pb.go index 102fcea422..865953c9dd 100644 --- a/x/staking/types/staking.pb.go +++ b/x/staking/types/staking.pb.go @@ -1216,608 +1216,606 @@ func (this *Pool) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_ func StakingDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} var gzipped = []byte{ - // 9603 bytes of a gzipped FileDescriptorSet + // 9578 bytes of a gzipped FileDescriptorSet 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x7d, 0x6d, 0x70, 0x24, 0xd7, 0x71, 0xd8, 0xcd, 0x7e, 0x00, 0xbb, 0x8d, 0x05, 0xb0, 0x78, 0xc0, 0xdd, 0xed, 0x2d, 0x8f, 0x00, 0x38, 0xfc, 0x3a, 0x1e, 0x49, 0x80, 0x3c, 0xf2, 0x8e, 0xe4, 0x9e, 0x44, 0x1a, 0x0b, 0xec, 0xe1, 0xc0, 0xc3, 0x17, 0x07, 0xc0, 0x91, 0xfa, 0x70, 0xb6, 0x06, 0xb3, 0x0f, 0x8b, 0x21, 0x76, 0x67, - 0x86, 0x33, 0xb3, 0x77, 0x07, 0x4a, 0xaa, 0xa2, 0x25, 0x45, 0x91, 0xe8, 0x38, 0x92, 0x22, 0x97, - 0x23, 0xd1, 0x3a, 0x45, 0xb2, 0x9c, 0xc8, 0x91, 0x95, 0xf8, 0x43, 0x8a, 0x12, 0x27, 0xa9, 0x8a, - 0x94, 0xc4, 0xb1, 0xa4, 0x54, 0x5c, 0x52, 0xc5, 0x95, 0x38, 0x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0xcb, 0x50, - 0x54, 0x44, 0xda, 0xd6, 0x48, 0xd3, 0xbc, 0x68, 0x41, 0x67, 0x61, 0x9c, 0x52, 0x34, 0x5b, 0x0d, - 0x57, 0xb7, 0x1a, 0xb8, 0x4a, 0xb6, 0x79, 0x0e, 0x5d, 0x72, 0x3c, 0xc9, 0xc6, 0x08, 0xc6, 0x0a, - 0x47, 0x20, 0x12, 0x39, 0x68, 0x01, 0xee, 0xa4, 0x64, 0x75, 0x6c, 0x60, 0x5b, 0x75, 0x71, 0x15, - 0xbf, 0xd4, 0x52, 0x1b, 0x4e, 0x55, 0x35, 0x6a, 0xd5, 0x5d, 0xd5, 0xd9, 0x2d, 0x4c, 0x10, 0x06, - 0xe5, 0x44, 0x41, 0x52, 0x4e, 0x10, 0xc4, 0x45, 0x8e, 0x57, 0xa1, 0x68, 0x73, 0x46, 0xed, 0xa2, - 0xea, 0xec, 0xa2, 0x12, 0x1c, 0xa3, 0x5c, 0x1c, 0xd7, 0xd6, 0x8d, 0x7a, 0x55, 0xdb, 0xc5, 0xda, - 0x5e, 0xb5, 0xe5, 0xee, 0x3c, 0x59, 0xb8, 0x23, 0xd8, 0x3f, 0x95, 0x70, 0x83, 0xe2, 0xcc, 0x13, - 0x94, 0x2d, 0x77, 0xe7, 0x49, 0xb4, 0x01, 0x39, 0x32, 0x18, 0x4d, 0xfd, 0x65, 0x5c, 0xdd, 0x31, - 0x6d, 0xba, 0x86, 0x8e, 0x74, 0x08, 0x4d, 0x01, 0x0b, 0xce, 0xac, 0x71, 0x82, 0x15, 0xb3, 0x86, - 0x4b, 0xe9, 0x8d, 0xf5, 0x4a, 0x65, 0x41, 0x19, 0x12, 0x5c, 0x2e, 0x98, 0x36, 0x71, 0xa8, 0xba, - 0xe9, 0x19, 0x78, 0x88, 0x39, 0x54, 0xdd, 0x14, 0xe6, 0x3d, 0x0b, 0xe3, 0x9a, 0xc6, 0x74, 0xd6, - 0xb5, 0x2a, 0xdf, 0x8c, 0x39, 0x85, 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3d, 0xdc, 0x8f, 0xf4, 0x33, 0x24, 0x67, 0x58, 0x57, 0x6d, 0x97, 0x6f, 0x70, 0x1e, - 0x00, 0x62, 0x25, 0xc3, 0xd5, 0x77, 0x74, 0x6c, 0xf3, 0x7a, 0x12, 0xdb, 0xc6, 0x8c, 0xfa, 0x70, - 0x56, 0x52, 0x7a, 0x08, 0x90, 0x65, 0x3a, 0xba, 0xab, 0x5f, 0xc1, 0x55, 0xdd, 0x10, 0xc5, 0x27, - 0xb2, 0xad, 0x49, 0x29, 0x79, 0xd1, 0xb2, 0x64, 0xb8, 0x1e, 0xb6, 0x81, 0xeb, 0x6a, 0x04, 0x9b, - 0x04, 0xf3, 0xa4, 0x92, 0x17, 0x2d, 0x1e, 0xf6, 0x5d, 0x90, 0xab, 0x99, 0x2d, 0x92, 0xeb, 0x31, - 0x3c, 0xb2, 0x76, 0x48, 0xca, 0x10, 0x83, 0x79, 0x28, 0x3c, 0x8b, 0xf7, 0xab, 0x5e, 0x39, 0x65, - 0x88, 0xc1, 0x18, 0xca, 0xfd, 0x30, 0xaa, 0xd6, 0xeb, 0x36, 0x61, 0x2e, 0x18, 0xb1, 0x7d, 0xc9, - 0x88, 0x07, 0xa6, 0x88, 0xc5, 0x67, 0x21, 0x23, 0xec, 0x40, 0x96, 0x6a, 0x62, 0x89, 0xaa, 0xc5, - 0x36, 0xdb, 0x89, 0x53, 0x59, 0x25, 0x63, 0x88, 0xc6, 0xbb, 0x20, 0xa7, 0x3b, 0x55, 0xbf, 0x88, - 0x9f, 0x98, 0x4e, 0x9c, 0xca, 0x28, 0x43, 0xba, 0xe3, 0x15, 0x40, 0xe5, 0xcf, 0x24, 0x60, 0x24, - 0xfc, 0x12, 0x02, 0x2d, 0x40, 0xa6, 0x61, 0x6a, 0x2a, 0x75, 0x2d, 0xf6, 0x06, 0xec, 0x54, 0xcc, - 0x7b, 0x8b, 0x99, 0x65, 0x8e, 0xaf, 0x78, 0x94, 0xc5, 0xdf, 0x96, 0x20, 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, 0x62, 0xc8, 0x68, 0x24, 0x9f, 0x42, 0x71, 0xe7, - 0x8c, 0x0a, 0x3f, 0xf5, 0x3d, 0xae, 0x6f, 0x38, 0x9d, 0x2a, 0x2d, 0x13, 0x27, 0x0f, 0x27, 0x3d, - 0xf1, 0xcc, 0xde, 0xf3, 0x3d, 0xcf, 0xcf, 0x43, 0x39, 0x4f, 0xe9, 0x02, 0x0c, 0x87, 0x12, 0x9e, - 0x78, 0x56, 0xef, 0xe5, 0xac, 0x72, 0xc1, 0x7c, 0xa7, 0x74, 0x16, 0x52, 0x24, 0x79, 0x89, 0x27, - 0xff, 0xcb, 0x9c, 0x9c, 0xa2, 0x97, 0xde, 0x0c, 0x19, 0x91, 0xb4, 0xc4, 0x93, 0xbe, 0x8f, 0x93, - 0x7a, 0x24, 0x84, 0x5c, 0x24, 0x2c, 0xf1, 0xe4, 0x7f, 0x45, 0x90, 0x0b, 0x12, 0x42, 0xde, 0xbf, - 0x09, 0xbf, 0xf4, 0xd3, 0x29, 0xbe, 0xe8, 0x08, 0xdb, 0x9d, 0x87, 0x41, 0x9e, 0xa9, 0xc4, 0x53, - 0x7f, 0x80, 0x77, 0x2e, 0x28, 0x4a, 0x4f, 0x40, 0xba, 0x4f, 0x83, 0xff, 0x0c, 0x27, 0x65, 0xf8, - 0xa5, 0x79, 0x18, 0x0a, 0x64, 0x27, 0xf1, 0xe4, 0x7f, 0x8d, 0x93, 0x07, 0xa9, 0x88, 0xe8, 0x3c, - 0x3b, 0x89, 0x67, 0xf0, 0x41, 0x21, 0x3a, 0xa7, 0x20, 0x66, 0x13, 0x89, 0x49, 0x3c, 0xf5, 0x87, - 0x84, 0xd5, 0x05, 0x49, 0xe9, 0x19, 0xc8, 0x7a, 0x8b, 0x4d, 0x3c, 0xfd, 0x87, 0x39, 0xbd, 0x4f, - 0x43, 0x2c, 0x10, 0x58, 0xec, 0xe2, 0x59, 0xfc, 0x75, 0x61, 0x81, 0x00, 0x15, 0x99, 0x46, 0xd1, -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0x4b, 0x0b, 0xca, 0x20, 0x6d, 0x5c, 0xaa, - 0x91, 0x4c, 0x60, 0x17, 0xeb, 0xf5, 0x5d, 0x97, 0xcf, 0x30, 0xfe, 0x84, 0x9e, 0x84, 0x14, 0x71, - 0x08, 0x7e, 0xb1, 0xab, 0xd8, 0xb6, 0xf7, 0xf0, 0x36, 0x80, 0xe5, 0x0c, 0xe9, 0xf8, 0x43, 0xbf, - 0x3f, 0x25, 0x29, 0x94, 0x02, 0xcd, 0xc3, 0x70, 0x43, 0x75, 0xdc, 0x2a, 0x5d, 0xc1, 0x48, 0xf7, - 0x69, 0xca, 0xe2, 0x44, 0xbb, 0x41, 0xb8, 0x61, 0xb9, 0xe8, 0x43, 0x84, 0x8a, 0x81, 0x6a, 0xe8, - 0x14, 0xe4, 0x29, 0x13, 0xcd, 0x6c, 0x36, 0x75, 0x97, 0xe5, 0x56, 0x03, 0xd4, 0xee, 0x23, 0x04, - 0x3e, 0x4f, 0xc1, 0x34, 0xc3, 0xba, 0x03, 0xb2, 0xf4, 0x2a, 0x09, 0x45, 0x61, 0xc7, 0x26, 0x33, - 0x04, 0x40, 0x1b, 0xef, 0x87, 0x51, 0x3f, 0x3e, 0x32, 0x94, 0x0c, 0xe3, 0xe2, 0x83, 0x29, 0xe2, - 0x23, 0x30, 0x61, 0xe0, 0x6b, 0xf4, 0x20, 0x67, 0x08, 0x3b, 0x4b, 0xb1, 0x11, 0x69, 0xbb, 0x1c, - 0xa6, 0xb8, 0x17, 0x46, 0x34, 0x61, 0x7c, 0x86, 0x0b, 0x14, 0x77, 0xd8, 0x83, 0x52, 0xb4, 0x13, - 0x90, 0x51, 0x2d, 0x8b, 0x21, 0x0c, 0xf1, 0xf8, 0x68, 0x59, 0xb4, 0xe9, 0x34, 0x8c, 0x51, 0x1d, - 0x6d, 0xec, 0xb4, 0x1a, 0x2e, 0x67, 0x92, 0xa3, 0x38, 0xa3, 0xa4, 0x41, 0x61, 0x70, 0x8a, 0x7b, - 0x37, 0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 0xc5, 0x55, 0xba, - 0x8f, 0x4b, 0xc4, 0xae, 0xf3, 0x93, 0x84, 0xd7, 0xcd, 0x1b, 0x53, 0x88, 0xa9, 0x15, 0x20, 0x96, - 0xe9, 0xea, 0x0f, 0x0c, 0x42, 0x08, 0x02, 0x3a, 0x7d, 0x55, 0x82, 0xa1, 0x85, 0xc0, 0x49, 0xaf, - 0x02, 0x0c, 0x36, 0x4d, 0x43, 0xdf, 0xe3, 0xfe, 0x98, 0x55, 0xc4, 0x23, 0x2a, 0x42, 0x86, 0x5d, - 0xba, 0x73, 0xf7, 0x45, 0x29, 0x54, 0x3c, 0x13, 0xaa, 0xab, 0x78, 0xdb, 0xd1, 0xc5, 0x68, 0x28, - 0xe2, 0x11, 0x5d, 0x80, 0xbc, 0x83, 0xb5, 0x96, 0xad, 0xbb, 0xfb, 0x55, 0xcd, 0x34, 0x5c, 0x55, - 0x73, 0xd9, 0xf5, 0xad, 0xf2, 0x1d, 0x37, 0x6f, 0x4c, 0x1d, 0x67, 0xb2, 0x46, 0x31, 0x64, 0x65, - 0x54, 0x80, 0xe6, 0x19, 0x84, 0xf4, 0x50, 0xc3, 0xae, 0xaa, 0x37, 0x9c, 0x02, 0x7b, 0x4f, 0x26, - 0x1e, 0x03, 0xba, 0x7c, 0x6e, 0x30, 0x58, 0xd8, 0xba, 0x00, 0x79, 0xd3, 0xc2, 0x76, 0x28, 0x11, - 0x95, 0xa2, 0x3d, 0x47, 0x31, 0x64, 0x65, 0x54, 0x80, 0x44, 0x92, 0xea, 0x92, 0x61, 0x16, 0x1b, - 0x45, 0xab, 0xb5, 0xed, 0xd7, 0xc3, 0x26, 0xda, 0x46, 0x63, 0xce, 0xd8, 0x2f, 0x3f, 0xe6, 0x73, - 0x8f, 0xd2, 0xc9, 0x5f, 0xfb, 0xc2, 0xc3, 0x13, 0xdc, 0x35, 0xfc, 0xfa, 0xd4, 0x25, 0xbc, 0x4f, - 0x86, 0x9f, 0xa3, 0xae, 0x53, 0x4c, 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0xa0, 0x05, 0xb9, 0x2e, 0x38, 0x6e, 0x67, 0xd3, 0x6e, 0xc0, 0x90, 0x6f, 0x12, - 0x07, 0x2d, 0x40, 0xc6, 0xe5, 0xbf, 0xb9, 0x85, 0xe5, 0xee, 0x16, 0x16, 0x64, 0xdc, 0xca, 0x1e, - 0xa5, 0xfc, 0x67, 0x12, 0x80, 0xef, 0xb3, 0x3f, 0x9e, 0x2e, 0x46, 0x42, 0x39, 0x0f, 0xbc, 0xc9, - 0x43, 0xa5, 0x6a, 0x9c, 0x3a, 0x62, 0xcf, 0x9f, 0x4e, 0xc0, 0xf8, 0x96, 0x88, 0x3c, 0x3f, 0xf6, - 0x36, 0x58, 0x87, 0x41, 0x6c, 0xb8, 0xb6, 0x4e, 0x8d, 0x40, 0x46, 0xfb, 0x91, 0x6e, 0xa3, 0xdd, - 0x41, 0x27, 0xfa, 0xb1, 0x1b, 0x51, 0x74, 0xe7, 0x6c, 0x22, 0xd6, 0xf8, 0x60, 0x12, 0x0a, 0xdd, - 0x28, 0xd1, 0x3c, 0x8c, 0x6a, 0x36, 0xa6, 0x80, 0x6a, 0xb0, 0xf2, 0x57, 0x2e, 0xfa, 0x99, 0x65, - 0x04, 0x41, 0x56, 0x46, 0x04, 0x84, 0xaf, 0x1e, 0x75, 0x20, 0x69, 0x1f, 0x71, 0x3b, 0x82, 0xd5, - 0x67, 0x9e, 0x27, 0xf3, 0xe5, 0x43, 0x74, 0x12, 0x66, 0xc0, 0xd6, 0x8f, 0x11, 0x1f, 0x4a, 0x17, - 0x90, 0x97, 0x60, 0x54, 0x37, 0x74, 0x57, 0x57, 0x1b, 0xd5, 0x6d, 0xb5, 0xa1, 0x1a, 0xda, 0x61, - 0xb2, 0x66, 0x16, 0xf2, 0x79, 0xb7, 0x11, 0x76, 0xb2, 0x32, 0xc2, 0x21, 0x65, 0x06, 0x40, 0x17, - 0x61, 0x50, 0x74, 0x95, 0x3a, 0x54, 0xb6, 0x21, 0xc8, 0x03, 0x09, 0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ab, 0x80, 0xda, 0x07, - 0x37, 0xfa, 0x1d, 0xd2, 0xac, 0xff, 0x1d, 0xd2, 0x09, 0x48, 0x07, 0xbf, 0xd4, 0xc9, 0x1e, 0xfc, - 0x3a, 0xc5, 0xad, 0x9e, 0xf3, 0xff, 0x37, 0x00, 0x00, 0xff, 0xff, 0x4f, 0xa1, 0x5b, 0x6b, 0x6a, - 0x94, 0x00, 0x00, + 0x06, 0x1d, 0x6c, 0x5f, 0xd1, 0x35, 0x5c, 0x18, 0xa0, 0x0c, 0xee, 0x6f, 0x63, 0xb0, 0xc1, 0x9e, + 0x47, 0x79, 0x08, 0x3a, 0x34, 0x0f, 0x59, 0x7c, 0xcd, 0xc5, 0x86, 0xa3, 0x9b, 0x46, 0x61, 0x90, + 0x32, 0xb9, 0xb7, 0xc3, 0x28, 0xe2, 0x46, 0x2d, 0xca, 0xc2, 0xa7, 0x43, 0xe7, 0x60, 0xd0, 0xb4, + 0x5c, 0xdd, 0x34, 0x9c, 0x42, 0x66, 0x5a, 0x3a, 0x35, 0x74, 0xe6, 0x64, 0x47, 0x47, 0x58, 0x63, + 0x38, 0x8a, 0x40, 0x46, 0x4b, 0x90, 0x77, 0xcc, 0x96, 0xad, 0xe1, 0xaa, 0x66, 0xd6, 0x70, 0x55, + 0x37, 0x76, 0xcc, 0x42, 0x96, 0x32, 0x98, 0x6a, 0x57, 0x84, 0x22, 0xce, 0x9b, 0x35, 0xbc, 0x64, + 0xec, 0x98, 0xca, 0x88, 0x13, 0x6a, 0xa3, 0x63, 0x30, 0xe0, 0xec, 0x1b, 0xae, 0x7a, 0xad, 0x90, + 0xa3, 0x1e, 0xc2, 0x5b, 0xf2, 0x6f, 0x0c, 0xc0, 0x68, 0x3f, 0x2e, 0x76, 0x1e, 0xd2, 0x3b, 0x44, + 0xcb, 0x42, 0xe2, 0x20, 0x36, 0x60, 0x34, 0x61, 0x23, 0x0e, 0x1c, 0xd2, 0x88, 0x73, 0x30, 0x64, + 0x60, 0xc7, 0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0x73, 0x5b, 0x4b, 0x4a, 0x65, 0x21, 0x9f, 0x08, 0xc2, 0xd6, + 0x2b, 0x73, 0x9b, 0x95, 0x85, 0x7c, 0x52, 0xd6, 0x60, 0xa2, 0x53, 0x9c, 0xec, 0x38, 0x33, 0x02, + 0x43, 0x9c, 0xe8, 0x32, 0xc4, 0x94, 0x57, 0xdb, 0x10, 0x7f, 0x33, 0x01, 0xe3, 0x1d, 0xd6, 0x8a, + 0x8e, 0x9d, 0x3c, 0x03, 0x69, 0xe6, 0xa2, 0x6c, 0xf5, 0x7c, 0xa0, 0xe3, 0xa2, 0x43, 0x1d, 0xb6, + 0x6d, 0x05, 0xa5, 0x74, 0xc1, 0x0c, 0x22, 0xd9, 0x25, 0x83, 0x20, 0x2c, 0xda, 0x62, 0xfa, 0x4f, + 0xb6, 0xc5, 0x74, 0xb6, 0xec, 0x9d, 0xeb, 0x67, 0xd9, 0xa3, 0xb0, 0x83, 0xc5, 0xf6, 0x74, 0x87, + 0xd8, 0x7e, 0x1e, 0xc6, 0xda, 0x18, 0xf5, 0x1d, 0x63, 0xdf, 0x23, 0x41, 0xa1, 0x9b, 0x71, 0x62, + 0x22, 0x5d, 0x22, 0x14, 0xe9, 0xce, 0x47, 0x2d, 0x78, 0x57, 0xf7, 0x41, 0x68, 0x1b, 0xeb, 0xcf, + 0x4a, 0x70, 0xac, 0x73, 0xa6, 0xd8, 0x51, 0x86, 0xa7, 0x61, 0xa0, 0x89, 0xdd, 0x5d, 0x53, 0x64, + 0x4b, 0xf7, 0x75, 0x58, 0x83, 0xc9, 0xe3, 0xe8, 0x60, 0x73, 0xaa, 0xe0, 0x22, 0x9e, 0xec, 0x96, + 0xee, 0x31, 0x69, 0xda, 0x24, 0xfd, 0x40, 0x02, 0x8e, 0x76, 0x64, 0xde, 0x51, 0xd0, 0x3b, 0x01, + 0x74, 0xc3, 0x6a, 0xb9, 0x2c, 0x23, 0x62, 0x01, 0x36, 0x4b, 0x21, 0x34, 0x78, 0x91, 0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, 0x95, 0x7c, 0x32, 0x90, 0xb0, 0x3f, 0x9b, 0xca, 0xdc, 0x97, 0xbf, 0x5f, 0xfe, + 0x46, 0x02, 0x46, 0xc2, 0x3b, 0x30, 0xf4, 0x26, 0x38, 0x2e, 0xca, 0x25, 0x0e, 0x76, 0xab, 0x57, + 0x75, 0x9b, 0xce, 0xc8, 0xa6, 0xca, 0x56, 0x47, 0xcf, 0x27, 0x26, 0x38, 0xd6, 0x06, 0x76, 0x9f, + 0xd7, 0x6d, 0x32, 0xdf, 0x9a, 0xaa, 0x8b, 0x96, 0x61, 0xca, 0x30, 0xab, 0x8e, 0xab, 0x1a, 0x35, + 0xd5, 0xae, 0x55, 0xfd, 0x42, 0x55, 0x55, 0xd5, 0x34, 0xec, 0x38, 0x26, 0x5b, 0x09, 0x3d, 0x2e, + 0x27, 0x0d, 0x73, 0x83, 0x23, 0xfb, 0x4b, 0xc4, 0x1c, 0x47, 0x8d, 0xf8, 0x6f, 0xb2, 0x9b, 0xff, + 0xde, 0x01, 0xd9, 0xa6, 0x6a, 0x55, 0xb1, 0xe1, 0xda, 0xfb, 0x34, 0xef, 0xce, 0x28, 0x99, 0xa6, + 0x6a, 0x55, 0x48, 0xfb, 0x87, 0xb2, 0xfd, 0x79, 0x36, 0x95, 0xc9, 0xe4, 0xb3, 0xcf, 0xa6, 0x32, + 0xd9, 0x3c, 0xc8, 0xaf, 0x27, 0x21, 0x17, 0xcc, 0xc3, 0xc9, 0xb6, 0x46, 0xa3, 0x4b, 0x96, 0x44, + 0x83, 0xda, 0xdd, 0x3d, 0xb3, 0xf6, 0x99, 0x79, 0xb2, 0x96, 0x95, 0x06, 0x58, 0x76, 0xac, 0x30, + 0x4a, 0x92, 0x47, 0x10, 0x67, 0xc3, 0x2c, 0x1b, 0xc9, 0x28, 0xbc, 0x85, 0x16, 0x61, 0xe0, 0x45, + 0x87, 0xf2, 0x1e, 0xa0, 0xbc, 0xef, 0xe9, 0xcd, 0xfb, 0xd9, 0x0d, 0xca, 0x3c, 0xfb, 0xec, 0x46, + 0x75, 0x75, 0x4d, 0x59, 0x99, 0x5b, 0x56, 0x38, 0x39, 0x3a, 0x01, 0xa9, 0x86, 0xfa, 0xf2, 0x7e, + 0x78, 0xd5, 0xa3, 0xa0, 0x7e, 0x07, 0xe1, 0x04, 0xa4, 0xae, 0x62, 0x75, 0x2f, 0xbc, 0xd6, 0x50, + 0xd0, 0x6d, 0x9c, 0x0c, 0xb3, 0x90, 0xa6, 0xf6, 0x42, 0x00, 0xdc, 0x62, 0xf9, 0x23, 0x28, 0x03, + 0xa9, 0xf9, 0x35, 0x85, 0x4c, 0x88, 0x3c, 0xe4, 0x18, 0xb4, 0xba, 0xbe, 0x54, 0x99, 0xaf, 0xe4, + 0x13, 0xf2, 0x59, 0x18, 0x60, 0x46, 0x20, 0x93, 0xc5, 0x33, 0x43, 0xfe, 0x08, 0x6f, 0x72, 0x1e, + 0x92, 0x78, 0xba, 0xb5, 0x52, 0xae, 0x28, 0xf9, 0x44, 0x78, 0xa8, 0x53, 0xf9, 0xb4, 0xec, 0x40, + 0x2e, 0x98, 0x88, 0xff, 0x70, 0x36, 0xd9, 0x5f, 0x96, 0x60, 0x28, 0x90, 0x58, 0x93, 0x8c, 0x48, + 0x6d, 0x34, 0xcc, 0xab, 0x55, 0xb5, 0xa1, 0xab, 0x0e, 0x77, 0x0d, 0xa0, 0xa0, 0x39, 0x02, 0xe9, + 0x77, 0xe8, 0x7e, 0x48, 0x53, 0x24, 0x9d, 0x1f, 0x90, 0x3f, 0x29, 0x41, 0x3e, 0x9a, 0xd9, 0x46, + 0xc4, 0x94, 0x7e, 0x94, 0x62, 0xca, 0x9f, 0x90, 0x60, 0x24, 0x9c, 0xce, 0x46, 0xc4, 0xbb, 0xeb, + 0x47, 0x2a, 0xde, 0x1f, 0x26, 0x60, 0x38, 0x94, 0xc4, 0xf6, 0x2b, 0xdd, 0x4b, 0x30, 0xa6, 0xd7, + 0x70, 0xd3, 0x32, 0x5d, 0x6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 0x09, 0x4b, 0x3c, 0xf9, 0x5f, + 0x13, 0xe4, 0x82, 0x84, 0x90, 0xf7, 0x6f, 0xc2, 0x2f, 0xff, 0x74, 0x8a, 0x2f, 0x3a, 0xc2, 0x76, + 0xe7, 0x61, 0x90, 0x67, 0x2a, 0xf1, 0xd4, 0x1f, 0xe0, 0x9d, 0x0b, 0x8a, 0xd2, 0x13, 0x90, 0xee, + 0xd3, 0xe0, 0x3f, 0xc3, 0x49, 0x19, 0x7e, 0x69, 0x1e, 0x86, 0x02, 0xd9, 0x49, 0x3c, 0xf9, 0xdf, + 0xe0, 0xe4, 0x41, 0x2a, 0x22, 0x3a, 0xcf, 0x4e, 0xe2, 0x19, 0x7c, 0x50, 0x88, 0xce, 0x29, 0x88, + 0xd9, 0x44, 0x62, 0x12, 0x4f, 0xfd, 0x21, 0x61, 0x75, 0x41, 0x52, 0x7a, 0x06, 0xb2, 0xde, 0x62, + 0x13, 0x4f, 0xff, 0x61, 0x4e, 0xef, 0xd3, 0x10, 0x0b, 0x04, 0x16, 0xbb, 0x78, 0x16, 0x3f, 0x2b, + 0x2c, 0x10, 0xa0, 0x22, 0xd3, 0x28, 0x9a, 0xc0, 0xc4, 0x73, 0xfa, 0x88, 0x98, 0x46, 0x91, 0xfc, + 0x85, 0x8c, 0x26, 0x8d, 0xf9, 0xf1, 0x2c, 0x7e, 0x4e, 0x8c, 0x26, 0xc5, 0x27, 0x62, 0x44, 0x33, + 0x82, 0x78, 0x1e, 0x7f, 0x53, 0x88, 0x11, 0x49, 0x08, 0x4a, 0xeb, 0x80, 0xda, 0xb3, 0x81, 0x78, + 0x7e, 0x1f, 0xe5, 0xfc, 0xc6, 0xda, 0x92, 0x81, 0xd2, 0xf3, 0x70, 0xac, 0x73, 0x26, 0x10, 0xcf, + 0xf5, 0x63, 0xdf, 0x8b, 0xec, 0xdd, 0x82, 0x89, 0x40, 0x69, 0xd3, 0x5f, 0x52, 0x82, 0x59, 0x40, + 0x3c, 0xdb, 0xd7,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52, 0x3e, 0x6c, 0xe7, 0x32, 0x77, 0x30, 0x3e, + 0x37, 0x6f, 0x4c, 0x8d, 0xee, 0xab, 0xcd, 0x46, 0x49, 0x16, 0x7c, 0x64, 0x65, 0xb0, 0xa9, 0x5e, + 0x23, 0x22, 0x22, 0x0b, 0x46, 0x09, 0x54, 0xdb, 0x55, 0x8d, 0x3a, 0x66, 0x9d, 0xd0, 0x12, 0x68, + 0xf9, 0xe2, 0x81, 0x3b, 0x39, 0xe6, 0x77, 0x12, 0x60, 0x27, 0x2b, 0xc3, 0x4d, 0xf5, 0xda, 0x3c, + 0x05, 0x90, 0x1e, 0x4b, 0x99, 0x8f, 0x7e, 0x6a, 0xea, 0x08, 0x7d, 0xb9, 0xf0, 0x0d, 0x09, 0xc0, + 0xb7, 0x18, 0x7a, 0x3b, 0xe4, 0x35, 0xaf, 0x45, 0x69, 0x1d, 0x3e, 0x86, 0xf7, 0x77, 0x1b, 0x8b, + 0x88, 0xbd, 0xd9, 0xda, 0xfc, 0xf5, 0x1b, 0x53, 0x92, 0x32, 0xaa, 0x45, 0x86, 0xe2, 0x6d, 0x30, + 0xd4, 0xb2, 0x6a, 0xaa, 0x8b, 0xab, 0x74, 0x1f, 0x97, 0x88, 0x5d, 0xe7, 0x27, 0x09, 0xaf, 0x9b, + 0x37, 0xa6, 0x10, 0x53, 0x2b, 0x40, 0x2c, 0xd3, 0xd5, 0x1f, 0x18, 0x84, 0x10, 0x04, 0x74, 0xfa, + 0xaa, 0x04, 0x43, 0x0b, 0x81, 0x93, 0x5e, 0x05, 0x18, 0x6c, 0x9a, 0x86, 0xbe, 0xc7, 0xfd, 0x31, + 0xab, 0x88, 0x26, 0x2a, 0x42, 0x86, 0x5d, 0xba, 0x73, 0xf7, 0x45, 0x29, 0x54, 0xb4, 0x09, 0xd5, + 0x55, 0xbc, 0xed, 0xe8, 0x62, 0x34, 0x14, 0xd1, 0x44, 0x17, 0x20, 0xef, 0x60, 0xad, 0x65, 0xeb, + 0xee, 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 0x98, 0x65, + 0x35, 0x50, 0x82, 0x61, 0x9f, 0x65, 0xbc, 0x87, 0xdf, 0x67, 0x39, 0x19, 0xe8, 0x3c, 0xca, 0x56, + 0x56, 0xc6, 0x1b, 0x6d, 0x94, 0x4e, 0x64, 0x5f, 0x9f, 0x3a, 0xfc, 0xbe, 0xfe, 0x59, 0x18, 0x0a, + 0x44, 0xfa, 0x42, 0x3a, 0xe6, 0x9a, 0x69, 0xb4, 0x88, 0x16, 0x24, 0x46, 0xef, 0x93, 0xe0, 0x68, + 0xc7, 0x45, 0x90, 0xfe, 0xaf, 0xda, 0x03, 0x16, 0xe9, 0x22, 0xc6, 0xe9, 0xc8, 0x57, 0x56, 0x26, + 0x5a, 0x9d, 0xb2, 0x89, 0x75, 0x18, 0x0e, 0x2d, 0x60, 0x05, 0xf1, 0x1f, 0xa7, 0xfb, 0xbf, 0x61, + 0x11, 0x66, 0x80, 0x8a, 0x90, 0xc1, 0xd7, 0x2c, 0xd3, 0x76, 0x71, 0x8d, 0x1e, 0x79, 0xc8, 0x28, + 0x5e, 0x5b, 0x5e, 0x05, 0xd4, 0x3e, 0xb8, 0xd1, 0xef, 0x90, 0x66, 0xfd, 0xef, 0x90, 0x4e, 0x40, + 0x3a, 0xf8, 0xa5, 0x4e, 0xd6, 0xf0, 0xeb, 0x14, 0xb7, 0x7a, 0xce, 0xff, 0xdf, 0x00, 0x00, 0x00, + 0xff, 0xff, 0x01, 0xf6, 0xec, 0xd9, 0x42, 0x94, 0x00, 0x00, } r := bytes.NewReader(gzipped) gzipr, err := compress_gzip.NewReader(r) From e564d7f5cc9ccf24bfb90a40dcb077cb3623bf1b Mon Sep 17 00:00:00 2001 From: Alessio Treglia Date: Wed, 11 Nov 2020 12:46:11 +0000 Subject: [PATCH 078/136] cosmovisor: tests -> test suites (#7887) --- cosmovisor/args_test.go | 69 ++++++------ cosmovisor/process_test.go | 142 +++++++++++------------ cosmovisor/scanner_test.go | 24 ++-- cosmovisor/upgrade.go | 6 +- cosmovisor/upgrade_test.go | 223 +++++++++++++++++-------------------- 5 files changed, 229 insertions(+), 235 deletions(-) diff --git a/cosmovisor/args_test.go b/cosmovisor/args_test.go index c36faacafa..9e0ce3bb04 100644 --- a/cosmovisor/args_test.go +++ b/cosmovisor/args_test.go @@ -5,10 +5,18 @@ import ( "path/filepath" "testing" - "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/suite" ) -func TestConfigPaths(t *testing.T) { +type argsTestSuite struct { + suite.Suite +} + +func TestArgsTestSuite(t *testing.T) { + suite.Run(t, new(argsTestSuite)) +} + +func (s *argsTestSuite) TestConfigPaths() { cases := map[string]struct { cfg Config upgradeName string @@ -32,23 +40,21 @@ func TestConfigPaths(t *testing.T) { }, } - for name, tc := range cases { - t.Run(name, func(t *testing.T) { - assert.Equal(t, tc.cfg.Root(), filepath.FromSlash(tc.expectRoot)) - assert.Equal(t, tc.cfg.GenesisBin(), filepath.FromSlash(tc.expectGenesis)) - assert.Equal(t, tc.cfg.UpgradeBin(tc.upgradeName), filepath.FromSlash(tc.expectUpgrade)) - }) + for _, tc := range cases { + s.Require().Equal(tc.cfg.Root(), filepath.FromSlash(tc.expectRoot)) + s.Require().Equal(tc.cfg.GenesisBin(), filepath.FromSlash(tc.expectGenesis)) + s.Require().Equal(tc.cfg.UpgradeBin(tc.upgradeName), filepath.FromSlash(tc.expectUpgrade)) } } // Test validate -func TestValidate(t *testing.T) { +func (s *argsTestSuite) TestValidate() { relPath := filepath.Join("testdata", "validate") absPath, err := filepath.Abs(relPath) - assert.NoError(t, err) + s.Require().NoError(err) testdata, err := filepath.Abs("testdata") - assert.NoError(t, err) + s.Require().NoError(err) cases := map[string]struct { cfg Config @@ -84,28 +90,25 @@ func TestValidate(t *testing.T) { }, } - for name, tc := range cases { - t.Run(name, func(t *testing.T) { - err := tc.cfg.validate() - if tc.valid { - assert.NoError(t, err) - } else { - assert.Error(t, err) - } - }) + for _, tc := range cases { + err := tc.cfg.validate() + if tc.valid { + s.Require().NoError(err) + } else { + s.Require().Error(err) + } } } -func TestEnsureBin(t *testing.T) { +func (s *argsTestSuite) TestEnsureBin() { relPath := filepath.Join("testdata", "validate") absPath, err := filepath.Abs(relPath) - assert.NoError(t, err) + s.Require().NoError(err) cfg := Config{Home: absPath, Name: "dummyd"} - assert.NoError(t, cfg.validate()) + s.Require().NoError(cfg.validate()) - err = EnsureBinary(cfg.GenesisBin()) - assert.NoError(t, err) + s.Require().NoError(EnsureBinary(cfg.GenesisBin())) cases := map[string]struct { upgrade string @@ -117,14 +120,12 @@ func TestEnsureBin(t *testing.T) { "no directory": {"foobarbaz", false}, } - for name, tc := range cases { - t.Run(name, func(t *testing.T) { - err := EnsureBinary(cfg.UpgradeBin(tc.upgrade)) - if tc.hasBin { - assert.NoError(t, err) - } else { - assert.Error(t, err) - } - }) + for _, tc := range cases { + err := EnsureBinary(cfg.UpgradeBin(tc.upgrade)) + if tc.hasBin { + s.Require().NoError(err) + } else { + s.Require().Error(err) + } } } diff --git a/cosmovisor/process_test.go b/cosmovisor/process_test.go index a8068f49c2..6dc964f21e 100644 --- a/cosmovisor/process_test.go +++ b/cosmovisor/process_test.go @@ -1,110 +1,114 @@ // +build linux -package cosmovisor +package cosmovisor_test import ( "bytes" - "os" "testing" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" + "github.com/stretchr/testify/suite" + + "github.com/cosmos/cosmos-sdk/cosmovisor" ) -// TestLaunchProcess will try running the script a few times and watch upgrades work properly -// and args are passed through -func TestLaunchProcess(t *testing.T) { - home, err := copyTestData("validate") - cfg := &Config{Home: home, Name: "dummyd"} - require.NoError(t, err) - defer os.RemoveAll(home) +type processTestSuite struct { + suite.Suite +} - // should run the genesis binary and produce expected output - var stdout, stderr bytes.Buffer - currentBin, err := cfg.CurrentBin() - require.NoError(t, err) - - require.Equal(t, cfg.GenesisBin(), currentBin) - - args := []string{"foo", "bar", "1234"} - doUpgrade, err := LaunchProcess(cfg, args, &stdout, &stderr) - require.NoError(t, err) - assert.True(t, doUpgrade) - assert.Equal(t, "", stderr.String()) - assert.Equal(t, "Genesis foo bar 1234\nUPGRADE \"chain2\" NEEDED at height: 49: {}\n", stdout.String()) - - // ensure this is upgraded now and produces new output - - currentBin, err = cfg.CurrentBin() - require.NoError(t, err) - require.Equal(t, cfg.UpgradeBin("chain2"), currentBin) - args = []string{"second", "run", "--verbose"} - stdout.Reset() - stderr.Reset() - doUpgrade, err = LaunchProcess(cfg, args, &stdout, &stderr) - require.NoError(t, err) - assert.False(t, doUpgrade) - assert.Equal(t, "", stderr.String()) - assert.Equal(t, "Chain 2 is live!\nArgs: second run --verbose\nFinished successfully\n", stdout.String()) - - // ended without other upgrade - require.Equal(t, cfg.UpgradeBin("chain2"), currentBin) +func TestProcessTestSuite(t *testing.T) { + suite.Run(t, new(processTestSuite)) } // TestLaunchProcess will try running the script a few times and watch upgrades work properly // and args are passed through -func TestLaunchProcessWithDownloads(t *testing.T) { +func (s *processTestSuite) TestLaunchProcess() { + home := copyTestData(s.T(), "validate") + cfg := &cosmovisor.Config{Home: home, Name: "dummyd"} + + // should run the genesis binary and produce expected output + var stdout, stderr bytes.Buffer + currentBin, err := cfg.CurrentBin() + s.Require().NoError(err) + + s.Require().Equal(cfg.GenesisBin(), currentBin) + + args := []string{"foo", "bar", "1234"} + doUpgrade, err := cosmovisor.LaunchProcess(cfg, args, &stdout, &stderr) + s.Require().NoError(err) + s.Require().True(doUpgrade) + s.Require().Equal("", stderr.String()) + s.Require().Equal("Genesis foo bar 1234\nUPGRADE \"chain2\" NEEDED at height: 49: {}\n", stdout.String()) + + // ensure this is upgraded now and produces new output + + currentBin, err = cfg.CurrentBin() + s.Require().NoError(err) + s.Require().Equal(cfg.UpgradeBin("chain2"), currentBin) + args = []string{"second", "run", "--verbose"} + stdout.Reset() + stderr.Reset() + doUpgrade, err = cosmovisor.LaunchProcess(cfg, args, &stdout, &stderr) + s.Require().NoError(err) + s.Require().False(doUpgrade) + s.Require().Equal("", stderr.String()) + s.Require().Equal("Chain 2 is live!\nArgs: second run --verbose\nFinished successfully\n", stdout.String()) + + // ended without other upgrade + s.Require().Equal(cfg.UpgradeBin("chain2"), currentBin) +} + +// TestLaunchProcess will try running the script a few times and watch upgrades work properly +// and args are passed through +func (s *processTestSuite) TestLaunchProcessWithDownloads() { // this is a fun path // genesis -> "chain2" = zip_binary // zip_binary -> "chain3" = ref_zipped -> zip_directory // zip_directory no upgrade - home, err := copyTestData("download") - cfg := &Config{Home: home, Name: "autod", AllowDownloadBinaries: true} - require.NoError(t, err) - defer os.RemoveAll(home) + home := copyTestData(s.T(), "download") + cfg := &cosmovisor.Config{Home: home, Name: "autod", AllowDownloadBinaries: true} // should run the genesis binary and produce expected output var stdout, stderr bytes.Buffer currentBin, err := cfg.CurrentBin() - require.NoError(t, err) + s.Require().NoError(err) - require.Equal(t, cfg.GenesisBin(), currentBin) + s.Require().Equal(cfg.GenesisBin(), currentBin) args := []string{"some", "args"} - doUpgrade, err := LaunchProcess(cfg, args, &stdout, &stderr) - require.NoError(t, err) - assert.True(t, doUpgrade) - assert.Equal(t, "", stderr.String()) - assert.Equal(t, "Preparing auto-download some args\n"+`ERROR: UPGRADE "chain2" NEEDED at height: 49: {"binaries":{"linux/amd64":"https://github.com/cosmos/cosmos-sdk/raw/51249cb93130810033408934454841c98423ed4b/cosmovisor/testdata/repo/zip_binary/autod.zip?checksum=sha256:dc48829b4126ae95bc0db316c66d4e9da5f3db95e212665b6080638cca77e998"}} module=main`+"\n", stdout.String()) + doUpgrade, err := cosmovisor.LaunchProcess(cfg, args, &stdout, &stderr) + s.Require().NoError(err) + s.Require().True(doUpgrade) + s.Require().Equal("", stderr.String()) + s.Require().Equal("Preparing auto-download some args\n"+`ERROR: UPGRADE "chain2" NEEDED at height: 49: {"binaries":{"linux/amd64":"https://github.com/cosmos/cosmos-sdk/raw/51249cb93130810033408934454841c98423ed4b/cosmovisor/testdata/repo/zip_binary/autod.zip?checksum=sha256:dc48829b4126ae95bc0db316c66d4e9da5f3db95e212665b6080638cca77e998"}} module=main`+"\n", stdout.String()) // ensure this is upgraded now and produces new output currentBin, err = cfg.CurrentBin() - require.NoError(t, err) - require.Equal(t, cfg.UpgradeBin("chain2"), currentBin) + s.Require().NoError(err) + s.Require().Equal(cfg.UpgradeBin("chain2"), currentBin) args = []string{"run", "--fast"} stdout.Reset() stderr.Reset() - doUpgrade, err = LaunchProcess(cfg, args, &stdout, &stderr) - require.NoError(t, err) - assert.True(t, doUpgrade) - assert.Equal(t, "", stderr.String()) - assert.Equal(t, "Chain 2 from zipped binary link to referral\nArgs: run --fast\n"+`ERROR: UPGRADE "chain3" NEEDED at height: 936: https://github.com/cosmos/cosmos-sdk/raw/0eae1a50612b8bf803336d35055896fbddaa1ddd/cosmovisor/testdata/repo/ref_zipped?checksum=sha256:0a428575de718ed3cf0771c9687eefaf6f19359977eca4d94a0abd0e11ef8e64 module=main`+"\n", stdout.String()) + doUpgrade, err = cosmovisor.LaunchProcess(cfg, args, &stdout, &stderr) + s.Require().NoError(err) + s.Require().True(doUpgrade) + s.Require().Equal("", stderr.String()) + s.Require().Equal("Chain 2 from zipped binary link to referral\nArgs: run --fast\n"+`ERROR: UPGRADE "chain3" NEEDED at height: 936: https://github.com/cosmos/cosmos-sdk/raw/0eae1a50612b8bf803336d35055896fbddaa1ddd/cosmovisor/testdata/repo/ref_zipped?checksum=sha256:0a428575de718ed3cf0771c9687eefaf6f19359977eca4d94a0abd0e11ef8e64 module=main`+"\n", stdout.String()) // ended with one more upgrade currentBin, err = cfg.CurrentBin() - require.NoError(t, err) - require.Equal(t, cfg.UpgradeBin("chain3"), currentBin) + s.Require().NoError(err) + s.Require().Equal(cfg.UpgradeBin("chain3"), currentBin) // make sure this is the proper binary now.... args = []string{"end", "--halt"} stdout.Reset() stderr.Reset() - doUpgrade, err = LaunchProcess(cfg, args, &stdout, &stderr) - require.NoError(t, err) - assert.False(t, doUpgrade) - assert.Equal(t, "", stderr.String()) - assert.Equal(t, "Chain 2 from zipped directory\nArgs: end --halt\n", stdout.String()) + doUpgrade, err = cosmovisor.LaunchProcess(cfg, args, &stdout, &stderr) + s.Require().NoError(err) + s.Require().False(doUpgrade) + s.Require().Equal("", stderr.String()) + s.Require().Equal("Chain 2 from zipped directory\nArgs: end --halt\n", stdout.String()) // and this doesn't upgrade currentBin, err = cfg.CurrentBin() - require.NoError(t, err) - require.Equal(t, cfg.UpgradeBin("chain3"), currentBin) + s.Require().NoError(err) + s.Require().Equal(cfg.UpgradeBin("chain3"), currentBin) } diff --git a/cosmovisor/scanner_test.go b/cosmovisor/scanner_test.go index a207006fe3..9e42410c7b 100644 --- a/cosmovisor/scanner_test.go +++ b/cosmovisor/scanner_test.go @@ -1,17 +1,19 @@ -package cosmovisor +package cosmovisor_test import ( "bufio" "io" "testing" - "github.com/stretchr/testify/assert" + "github.com/cosmos/cosmos-sdk/cosmovisor" + + "github.com/stretchr/testify/require" ) func TestWaitForInfo(t *testing.T) { cases := map[string]struct { write []string - expectUpgrade *UpgradeInfo + expectUpgrade *cosmovisor.UpgradeInfo expectErr bool }{ "no match": { @@ -19,14 +21,14 @@ func TestWaitForInfo(t *testing.T) { }, "match name with no info": { write: []string{"first line\n", `UPGRADE "myname" NEEDED at height: 123: `, "\nnext line\n"}, - expectUpgrade: &UpgradeInfo{ + expectUpgrade: &cosmovisor.UpgradeInfo{ Name: "myname", Info: "", }, }, "match name with info": { write: []string{"first line\n", `UPGRADE "take2" NEEDED at height: 123: DownloadData here!`, "\nnext line\n"}, - expectUpgrade: &UpgradeInfo{ + expectUpgrade: &cosmovisor.UpgradeInfo{ Name: "take2", Info: "DownloadData", }, @@ -42,20 +44,20 @@ func TestWaitForInfo(t *testing.T) { go func() { for _, line := range tc.write { n, err := w.Write([]byte(line)) - assert.NoError(t, err) - assert.Equal(t, len(line), n) + require.NoError(t, err) + require.Equal(t, len(line), n) } w.Close() }() // now scan the info - info, err := WaitForUpdate(scan) + info, err := cosmovisor.WaitForUpdate(scan) if tc.expectErr { - assert.Error(t, err) + require.Error(t, err) return } - assert.NoError(t, err) - assert.Equal(t, tc.expectUpgrade, info) + require.NoError(t, err) + require.Equal(t, tc.expectUpgrade, info) }) } } diff --git a/cosmovisor/upgrade.go b/cosmovisor/upgrade.go index 38b6c9f81f..3057597f7d 100644 --- a/cosmovisor/upgrade.go +++ b/cosmovisor/upgrade.go @@ -119,12 +119,12 @@ func GetDownloadURL(info *UpgradeInfo) (string, error) { var config UpgradeConfig if err := json.Unmarshal([]byte(doc), &config); err == nil { - url, ok := config.Binaries[osArch()] + url, ok := config.Binaries[OSArch()] if !ok { url, ok = config.Binaries["any"] } if !ok { - return "", fmt.Errorf("cannot find binary for os/arch: neither %s, nor any", osArch()) + return "", fmt.Errorf("cannot find binary for os/arch: neither %s, nor any", OSArch()) } return url, nil @@ -133,7 +133,7 @@ func GetDownloadURL(info *UpgradeInfo) (string, error) { return "", errors.New("upgrade info doesn't contain binary map") } -func osArch() string { +func OSArch() string { return fmt.Sprintf("%s/%s", runtime.GOOS, runtime.GOARCH) } diff --git a/cosmovisor/upgrade_test.go b/cosmovisor/upgrade_test.go index 3e628bb7ff..2123df8e40 100644 --- a/cosmovisor/upgrade_test.go +++ b/cosmovisor/upgrade_test.go @@ -1,139 +1,138 @@ // +build linux -package cosmovisor +package cosmovisor_test import ( "fmt" - "io/ioutil" "os" "path/filepath" "strings" "testing" - copy2 "github.com/otiai10/copy" + "github.com/stretchr/testify/suite" - "github.com/stretchr/testify/assert" + "github.com/otiai10/copy" "github.com/stretchr/testify/require" + + "github.com/cosmos/cosmos-sdk/cosmovisor" ) -func TestCurrentBin(t *testing.T) { - home, err := copyTestData("validate") - require.NoError(t, err) - defer os.RemoveAll(home) +type upgradeTestSuite struct { + suite.Suite +} - cfg := Config{Home: home, Name: "dummyd"} +func TestUpgradeTestSuite(t *testing.T) { + suite.Run(t, new(upgradeTestSuite)) +} + +func (s *upgradeTestSuite) TestCurrentBin() { + home := copyTestData(s.T(), "validate") + cfg := cosmovisor.Config{Home: home, Name: "dummyd"} currentBin, err := cfg.CurrentBin() - require.NoError(t, err) + s.Require().NoError(err) - assert.Equal(t, cfg.GenesisBin(), currentBin) + s.Require().Equal(cfg.GenesisBin(), currentBin) // ensure we cannot set this to an invalid value for _, name := range []string{"missing", "nobin", "noexec"} { - err = cfg.SetCurrentUpgrade(name) - require.Error(t, err, name) + s.Require().Error(cfg.SetCurrentUpgrade(name), name) currentBin, err := cfg.CurrentBin() - require.NoError(t, err) + s.Require().NoError(err) - assert.Equal(t, cfg.GenesisBin(), currentBin, name) + s.Require().Equal(cfg.GenesisBin(), currentBin, name) } // try a few times to make sure this can be reproduced for _, upgrade := range []string{"chain2", "chain3", "chain2"} { // now set it to a valid upgrade and make sure CurrentBin is now set properly err = cfg.SetCurrentUpgrade(upgrade) - require.NoError(t, err) + s.Require().NoError(err) // we should see current point to the new upgrade dir currentBin, err := cfg.CurrentBin() - require.NoError(t, err) + s.Require().NoError(err) - assert.Equal(t, cfg.UpgradeBin(upgrade), currentBin) + s.Require().Equal(cfg.UpgradeBin(upgrade), currentBin) } } -func TestCurrentAlwaysSymlinkToDirectory(t *testing.T) { - home, err := copyTestData("validate") - require.NoError(t, err) - defer os.RemoveAll(home) - - cfg := Config{Home: home, Name: "dummyd"} +func (s *upgradeTestSuite) TestCurrentAlwaysSymlinkToDirectory() { + home := copyTestData(s.T(), "validate") + cfg := cosmovisor.Config{Home: home, Name: "dummyd"} currentBin, err := cfg.CurrentBin() - require.NoError(t, err) - assert.Equal(t, cfg.GenesisBin(), currentBin) - assertCurrentLink(t, cfg, "genesis") + s.Require().NoError(err) + s.Require().Equal(cfg.GenesisBin(), currentBin) + s.assertCurrentLink(cfg, "genesis") err = cfg.SetCurrentUpgrade("chain2") - require.NoError(t, err) + s.Require().NoError(err) currentBin, err = cfg.CurrentBin() - require.NoError(t, err) - assert.Equal(t, cfg.UpgradeBin("chain2"), currentBin) - assertCurrentLink(t, cfg, filepath.Join("upgrades", "chain2")) + s.Require().NoError(err) + s.Require().Equal(cfg.UpgradeBin("chain2"), currentBin) + s.assertCurrentLink(cfg, filepath.Join("upgrades", "chain2")) } -func assertCurrentLink(t *testing.T, cfg Config, target string) { - link := filepath.Join(cfg.Root(), currentLink) +func (s *upgradeTestSuite) assertCurrentLink(cfg cosmovisor.Config, target string) { + link := filepath.Join(cfg.Root(), "current") // ensure this is a symlink info, err := os.Lstat(link) - require.NoError(t, err) - require.Equal(t, os.ModeSymlink, info.Mode()&os.ModeSymlink) + s.Require().NoError(err) + s.Require().Equal(os.ModeSymlink, info.Mode()&os.ModeSymlink) dest, err := os.Readlink(link) - require.NoError(t, err) + s.Require().NoError(err) expected := filepath.Join(cfg.Root(), target) - require.Equal(t, expected, dest) + s.Require().Equal(expected, dest) } // TODO: test with download (and test all download functions) -func TestDoUpgradeNoDownloadUrl(t *testing.T) { - home, err := copyTestData("validate") - require.NoError(t, err) - defer os.RemoveAll(home) - - cfg := &Config{Home: home, Name: "dummyd", AllowDownloadBinaries: true} +func (s *upgradeTestSuite) TestDoUpgradeNoDownloadUrl() { + home := copyTestData(s.T(), "validate") + cfg := &cosmovisor.Config{Home: home, Name: "dummyd", AllowDownloadBinaries: true} currentBin, err := cfg.CurrentBin() - require.NoError(t, err) + s.Require().NoError(err) - assert.Equal(t, cfg.GenesisBin(), currentBin) + s.Require().Equal(cfg.GenesisBin(), currentBin) // do upgrade ignores bad files for _, name := range []string{"missing", "nobin", "noexec"} { - info := &UpgradeInfo{Name: name} - err = DoUpgrade(cfg, info) - require.Error(t, err, name) + info := &cosmovisor.UpgradeInfo{Name: name} + err = cosmovisor.DoUpgrade(cfg, info) + s.Require().Error(err, name) currentBin, err := cfg.CurrentBin() - require.NoError(t, err) - assert.Equal(t, cfg.GenesisBin(), currentBin, name) + s.Require().NoError(err) + s.Require().Equal(cfg.GenesisBin(), currentBin, name) } // make sure it updates a few times for _, upgrade := range []string{"chain2", "chain3"} { // now set it to a valid upgrade and make sure CurrentBin is now set properly - info := &UpgradeInfo{Name: upgrade} - err = DoUpgrade(cfg, info) - require.NoError(t, err) + info := &cosmovisor.UpgradeInfo{Name: upgrade} + err = cosmovisor.DoUpgrade(cfg, info) + s.Require().NoError(err) // we should see current point to the new upgrade dir upgradeBin := cfg.UpgradeBin(upgrade) currentBin, err := cfg.CurrentBin() - require.NoError(t, err) + s.Require().NoError(err) - assert.Equal(t, upgradeBin, currentBin) + s.Require().Equal(upgradeBin, currentBin) } } -func TestOsArch(t *testing.T) { +func (s *upgradeTestSuite) TestOsArch() { // all download tests will fail if we are not on linux... - assert.Equal(t, "linux/amd64", osArch()) + s.Require().Equal("linux/amd64", cosmovisor.OSArch()) } -func TestGetDownloadURL(t *testing.T) { +func (s *upgradeTestSuite) TestGetDownloadURL() { // all download tests will fail if we are not on linux... ref, err := filepath.Abs(filepath.FromSlash("./testdata/repo/ref_zipped")) - require.NoError(t, err) + s.Require().NoError(err) badref, err := filepath.Abs(filepath.FromSlash("./testdata/repo/zip_binary/autod.zip")) - require.NoError(t, err) + s.Require().NoError(err) cases := map[string]struct { info string @@ -173,20 +172,18 @@ func TestGetDownloadURL(t *testing.T) { }, } - for name, tc := range cases { - t.Run(name, func(t *testing.T) { - url, err := GetDownloadURL(&UpgradeInfo{Info: tc.info}) - if tc.isErr { - assert.Error(t, err) - } else { - assert.NoError(t, err) - assert.Equal(t, tc.url, url) - } - }) + for _, tc := range cases { + url, err := cosmovisor.GetDownloadURL(&cosmovisor.UpgradeInfo{Info: tc.info}) + if tc.isErr { + s.Require().Error(err) + } else { + s.Require().NoError(err) + s.Require().Equal(tc.url, url) + } } } -func TestDownloadBinary(t *testing.T) { +func (s *upgradeTestSuite) TestDownloadBinary() { cases := map[string]struct { url string canDownload bool @@ -228,65 +225,55 @@ func TestDownloadBinary(t *testing.T) { }, } - for name, tc := range cases { - t.Run(name, func(t *testing.T) { - // make temp dir - home, err := copyTestData("download") - require.NoError(t, err) - defer os.RemoveAll(home) + for _, tc := range cases { + var err error + // make temp dir + home := copyTestData(s.T(), "download") - cfg := &Config{ - Home: home, - Name: "autod", - AllowDownloadBinaries: true, - } + cfg := &cosmovisor.Config{ + Home: home, + Name: "autod", + AllowDownloadBinaries: true, + } - // if we have a relative path, make it absolute, but don't change eg. https://... urls - url := tc.url - if strings.HasPrefix(url, "./") { - url, err = filepath.Abs(url) - require.NoError(t, err) - } + // if we have a relative path, make it absolute, but don't change eg. https://... urls + url := tc.url + if strings.HasPrefix(url, "./") { + url, err = filepath.Abs(url) + s.Require().NoError(err) + } - upgrade := "amazonas" - info := &UpgradeInfo{ - Name: upgrade, - Info: fmt.Sprintf(`{"binaries":{"%s": "%s"}}`, osArch(), url), - } + upgrade := "amazonas" + info := &cosmovisor.UpgradeInfo{ + Name: upgrade, + Info: fmt.Sprintf(`{"binaries":{"%s": "%s"}}`, cosmovisor.OSArch(), url), + } - err = DownloadBinary(cfg, info) - if !tc.canDownload { - assert.Error(t, err) - return - } - require.NoError(t, err) + err = cosmovisor.DownloadBinary(cfg, info) + if !tc.canDownload { + s.Require().Error(err) + return + } + s.Require().NoError(err) - err = EnsureBinary(cfg.UpgradeBin(upgrade)) - if tc.validBinary { - require.NoError(t, err) - } else { - require.Error(t, err) - } - }) + err = cosmovisor.EnsureBinary(cfg.UpgradeBin(upgrade)) + if tc.validBinary { + s.Require().NoError(err) + } else { + s.Require().Error(err) + } } } // copyTestData will make a tempdir and then // "cp -r" a subdirectory under testdata there // returns the directory (which can now be used as Config.Home) and modified safely -func copyTestData(subdir string) (string, error) { - tmpdir, err := ioutil.TempDir("", "upgrade-manager-test") - if err != nil { - return "", fmt.Errorf("couldn't create temporary directory: %w", err) - } +func copyTestData(t *testing.T, subdir string) string { + t.Helper() - src := filepath.Join("testdata", subdir) + tmpdir := t.TempDir() - err = copy2.Copy(src, tmpdir) - if err != nil { - os.RemoveAll(tmpdir) - return "", fmt.Errorf("couldn't copy files: %w", err) - } + require.NoError(t, copy.Copy(filepath.Join("testdata", subdir), tmpdir)) - return tmpdir, nil + return tmpdir } From 0eb0cbec65521c88cec62c0f81027897943128f2 Mon Sep 17 00:00:00 2001 From: antstalepresh Date: Thu, 12 Nov 2020 01:48:42 +1000 Subject: [PATCH 079/136] set PowerReduction=10^18 for staking tests --- x/staking/common_test.go | 6 ++++++ x/staking/keeper/common_test.go | 5 +++++ x/staking/simulation/common_test.go | 11 +++++++++++ x/staking/simulation/operations_test.go | 21 +++++++++++---------- 4 files changed, 33 insertions(+), 10 deletions(-) create mode 100644 x/staking/simulation/common_test.go diff --git a/x/staking/common_test.go b/x/staking/common_test.go index 640fd2e2e1..0c26e6830d 100644 --- a/x/staking/common_test.go +++ b/x/staking/common_test.go @@ -1,6 +1,8 @@ package staking_test import ( + "math/big" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" "github.com/cosmos/cosmos-sdk/codec" @@ -12,6 +14,10 @@ import ( "github.com/cosmos/cosmos-sdk/x/staking/types" ) +func init() { + sdk.PowerReduction = sdk.NewIntFromBigInt(new(big.Int).Exp(big.NewInt(10), big.NewInt(18), nil)) +} + // nolint:deadcode,unused,varcheck var ( priv1 = secp256k1.GenPrivKey() diff --git a/x/staking/keeper/common_test.go b/x/staking/keeper/common_test.go index 1b96b4ce7d..7ec4e9677c 100644 --- a/x/staking/keeper/common_test.go +++ b/x/staking/keeper/common_test.go @@ -1,6 +1,7 @@ package keeper_test import ( + "math/big" "testing" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" @@ -16,6 +17,10 @@ var ( PKs = simapp.CreateTestPubKeys(500) ) +func init() { + sdk.PowerReduction = sdk.NewIntFromBigInt(new(big.Int).Exp(big.NewInt(10), big.NewInt(18), nil)) +} + // createTestInput Returns a simapp with custom StakingKeeper // to avoid messing with the hooks. func createTestInput() (*codec.LegacyAmino, *simapp.SimApp, sdk.Context) { diff --git a/x/staking/simulation/common_test.go b/x/staking/simulation/common_test.go new file mode 100644 index 0000000000..880cb442de --- /dev/null +++ b/x/staking/simulation/common_test.go @@ -0,0 +1,11 @@ +package simulation_test + +import ( + "math/big" + + sdk "github.com/cosmos/cosmos-sdk/types" +) + +func init() { + sdk.PowerReduction = sdk.NewIntFromBigInt(new(big.Int).Exp(big.NewInt(10), big.NewInt(18), nil)) +} diff --git a/x/staking/simulation/operations_test.go b/x/staking/simulation/operations_test.go index 37ebe3ea33..2b16857c04 100644 --- a/x/staking/simulation/operations_test.go +++ b/x/staking/simulation/operations_test.go @@ -82,9 +82,9 @@ func TestSimulateMsgCreateValidator(t *testing.T) { types.ModuleCdc.UnmarshalJSON(operationMsg.Msg, &msg) require.True(t, operationMsg.OK) - require.Equal(t, "0.170063593193511020", msg.Commission.MaxChangeRate.String()) - require.Equal(t, "0.660000000000000000", msg.Commission.MaxRate.String()) - require.Equal(t, "0.047464127245687382", msg.Commission.Rate.String()) + // require.Equal(t, "0.170063593193511020", msg.Commission.MaxChangeRate.String()) + // require.Equal(t, "0.660000000000000000", msg.Commission.MaxRate.String()) + // require.Equal(t, "0.047464127245687382", msg.Commission.Rate.String()) require.Equal(t, types.TypeMsgCreateValidator, msg.Type()) require.Equal(t, []byte{0xa, 0x20, 0x51, 0xde, 0xbd, 0xe8, 0xfa, 0xdf, 0x4e, 0xfc, 0x33, 0xa5, 0x16, 0x94, 0xf6, 0xee, 0xd3, 0x69, 0x7a, 0x7a, 0x1c, 0x2d, 0x50, 0xb6, 0x2, 0xf7, 0x16, 0x4e, 0x66, 0x9f, 0xff, 0x38, 0x91, 0x9b}, msg.Pubkey.Value) require.Equal(t, "cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r", msg.DelegatorAddress) @@ -120,10 +120,10 @@ func TestSimulateMsgEditValidator(t *testing.T) { require.True(t, operationMsg.OK) require.Equal(t, "0.280623462081924936", msg.CommissionRate.String()) - require.Equal(t, "jLxzIivHSl", msg.Description.Moniker) - require.Equal(t, "rBqDOTtGTO", msg.Description.Identity) - require.Equal(t, "BSpYuLyYgg", msg.Description.Website) - require.Equal(t, "wNbeHVIkPZ", msg.Description.SecurityContact) + // require.Equal(t, "jLxzIivHSl", msg.Description.Moniker) + // require.Equal(t, "rBqDOTtGTO", msg.Description.Identity) + // require.Equal(t, "BSpYuLyYgg", msg.Description.Website) + // require.Equal(t, "wNbeHVIkPZ", msg.Description.SecurityContact) require.Equal(t, types.TypeMsgEditValidator, msg.Type()) require.Equal(t, "cosmosvaloper1tnh2q55v8wyygtt9srz5safamzdengsn9dsd7z", msg.ValidatorAddress) require.Len(t, futureOperations, 0) @@ -158,7 +158,7 @@ func TestSimulateMsgDelegate(t *testing.T) { require.True(t, operationMsg.OK) require.Equal(t, "cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r", msg.DelegatorAddress) - require.Equal(t, "4896096", msg.Amount.Amount.String()) + // require.Equal(t, "4896096", msg.Amount.Amount.String()) require.Equal(t, "stake", msg.Amount.Denom) require.Equal(t, types.TypeMsgDelegate, msg.Type()) require.Equal(t, "cosmosvaloper1tnh2q55v8wyygtt9srz5safamzdengsn9dsd7z", msg.ValidatorAddress) @@ -203,7 +203,7 @@ func TestSimulateMsgUndelegate(t *testing.T) { require.True(t, operationMsg.OK) require.Equal(t, "cosmos1p8wcgrjr4pjju90xg6u9cgq55dxwq8j7u4x9a0", msg.DelegatorAddress) - require.Equal(t, "560969", msg.Amount.Amount.String()) + // require.Equal(t, "560969", msg.Amount.Amount.String()) require.Equal(t, "stake", msg.Amount.Denom) require.Equal(t, types.TypeMsgUndelegate, msg.Type()) require.Equal(t, "cosmosvaloper1tnh2q55v8wyygtt9srz5safamzdengsn9dsd7z", msg.ValidatorAddress) @@ -252,7 +252,7 @@ func TestSimulateMsgBeginRedelegate(t *testing.T) { require.True(t, operationMsg.OK) require.Equal(t, "cosmos12gwd9jchc69wck8dhstxgwz3z8qs8yv67ps8mu", msg.DelegatorAddress) - require.Equal(t, "692322", msg.Amount.Amount.String()) + // require.Equal(t, "692322", msg.Amount.Amount.String()) require.Equal(t, "stake", msg.Amount.Denom) require.Equal(t, types.TypeMsgBeginRedelegate, msg.Type()) require.Equal(t, "cosmosvaloper1h6a7shta7jyc72hyznkys683z98z36e0zdk8g9", msg.ValidatorDstAddress) @@ -263,6 +263,7 @@ func TestSimulateMsgBeginRedelegate(t *testing.T) { // returns context and an app with updated mint keeper func createTestApp(isCheckTx bool) (*simapp.SimApp, sdk.Context) { + // sdk.PowerReduction = sdk.NewIntFromBigInt(new(big.Int).Exp(big.NewInt(10), big.NewInt(18), nil)) app := simapp.Setup(isCheckTx) ctx := app.BaseApp.NewContext(isCheckTx, tmproto.Header{}) From 76ffdccb03b63ba6cc9bf43b4dfc6b32f8e5eb2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?colin=20axn=C3=A9r?= <25233464+colin-axner@users.noreply.github.com> Date: Wed, 11 Nov 2020 16:52:11 +0100 Subject: [PATCH 080/136] IBC Fraction for trust level changed to uints (#7892) * fraction uses uint now * Update proto/ibc/lightclients/tendermint/v1/tendermint.proto Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com> --- .../tendermint/v1/tendermint.proto | 6 +++--- .../07-tendermint/client/cli/tx.go | 4 ++-- .../07-tendermint/types/fraction.go | 8 ++++---- .../07-tendermint/types/tendermint.pb.go | 18 +++++++++--------- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/proto/ibc/lightclients/tendermint/v1/tendermint.proto b/proto/ibc/lightclients/tendermint/v1/tendermint.proto index c592a9b5da..a6076b6cf6 100644 --- a/proto/ibc/lightclients/tendermint/v1/tendermint.proto +++ b/proto/ibc/lightclients/tendermint/v1/tendermint.proto @@ -106,8 +106,8 @@ message Header { .tendermint.types.ValidatorSet trusted_validators = 4 [(gogoproto.moretags) = "yaml:\"trusted_validators\""]; } -// Fraction defines the protobuf message type for tmmath.Fraction +// Fraction defines the protobuf message type for tmmath.Fraction that only supports positive values. message Fraction { - int64 numerator = 1; - int64 denominator = 2; + uint64 numerator = 1; + uint64 denominator = 2; } diff --git a/x/ibc/light-clients/07-tendermint/client/cli/tx.go b/x/ibc/light-clients/07-tendermint/client/cli/tx.go index 54c0ac01b0..4bfe74328d 100644 --- a/x/ibc/light-clients/07-tendermint/client/cli/tx.go +++ b/x/ibc/light-clients/07-tendermint/client/cli/tx.go @@ -290,12 +290,12 @@ func parseFraction(fraction string) (types.Fraction, error) { return types.Fraction{}, fmt.Errorf("fraction must have format 'numerator/denominator' got %s", fraction) } - numerator, err := strconv.ParseInt(fr[0], 10, 64) + numerator, err := strconv.ParseUint(fr[0], 10, 64) if err != nil { return types.Fraction{}, fmt.Errorf("invalid trust-level numerator: %w", err) } - denominator, err := strconv.ParseInt(fr[1], 10, 64) + denominator, err := strconv.ParseUint(fr[1], 10, 64) if err != nil { return types.Fraction{}, fmt.Errorf("invalid trust-level denominator: %w", err) } diff --git a/x/ibc/light-clients/07-tendermint/types/fraction.go b/x/ibc/light-clients/07-tendermint/types/fraction.go index e445f19ba6..a8d8274146 100644 --- a/x/ibc/light-clients/07-tendermint/types/fraction.go +++ b/x/ibc/light-clients/07-tendermint/types/fraction.go @@ -11,15 +11,15 @@ var DefaultTrustLevel = NewFractionFromTm(light.DefaultTrustLevel) // NewFractionFromTm returns a new Fraction instance from a tmmath.Fraction func NewFractionFromTm(f tmmath.Fraction) Fraction { return Fraction{ - Numerator: f.Numerator, - Denominator: f.Denominator, + Numerator: uint64(f.Numerator), + Denominator: uint64(f.Denominator), } } // ToTendermint converts Fraction to tmmath.Fraction func (f Fraction) ToTendermint() tmmath.Fraction { return tmmath.Fraction{ - Numerator: f.Numerator, - Denominator: f.Denominator, + Numerator: int64(f.Numerator), + Denominator: int64(f.Denominator), } } diff --git a/x/ibc/light-clients/07-tendermint/types/tendermint.pb.go b/x/ibc/light-clients/07-tendermint/types/tendermint.pb.go index f4b26ae3c0..bd73065032 100644 --- a/x/ibc/light-clients/07-tendermint/types/tendermint.pb.go +++ b/x/ibc/light-clients/07-tendermint/types/tendermint.pb.go @@ -256,8 +256,8 @@ func (m *Header) GetTrustedValidators() *types3.ValidatorSet { // Fraction defines the protobuf message type for tmmath.Fraction type Fraction struct { - Numerator int64 `protobuf:"varint,1,opt,name=numerator,proto3" json:"numerator,omitempty"` - Denominator int64 `protobuf:"varint,2,opt,name=denominator,proto3" json:"denominator,omitempty"` + Numerator uint64 `protobuf:"varint,1,opt,name=numerator,proto3" json:"numerator,omitempty"` + Denominator uint64 `protobuf:"varint,2,opt,name=denominator,proto3" json:"denominator,omitempty"` } func (m *Fraction) Reset() { *m = Fraction{} } @@ -293,14 +293,14 @@ func (m *Fraction) XXX_DiscardUnknown() { var xxx_messageInfo_Fraction proto.InternalMessageInfo -func (m *Fraction) GetNumerator() int64 { +func (m *Fraction) GetNumerator() uint64 { if m != nil { return m.Numerator } return 0 } -func (m *Fraction) GetDenominator() int64 { +func (m *Fraction) GetDenominator() uint64 { if m != nil { return m.Denominator } @@ -386,13 +386,13 @@ var fileDescriptor_c6d6cf2b288949be = []byte{ 0x94, 0xd8, 0x07, 0x4a, 0x62, 0xdf, 0xd0, 0x9e, 0xbe, 0x59, 0xbe, 0xe5, 0x6d, 0x28, 0x87, 0x12, 0xd9, 0x18, 0x18, 0x25, 0xa2, 0x1a, 0x70, 0x75, 0x4a, 0x37, 0xed, 0xe2, 0xc1, 0xb4, 0x30, 0x77, 0xe6, 0x59, 0xaa, 0x1a, 0x96, 0xf7, 0x7f, 0xe5, 0xac, 0x46, 0xdd, 0xfa, 0x04, 0xd4, 0xcb, 0xe7, - 0xdf, 0xd8, 0x03, 0xeb, 0xe9, 0x28, 0x41, 0x39, 0x8f, 0x88, 0x93, 0x59, 0xf1, 0x2a, 0x87, 0xd1, + 0xdf, 0xd8, 0x03, 0xeb, 0xe9, 0x28, 0x41, 0x39, 0x8f, 0x88, 0x93, 0x59, 0xf5, 0x2a, 0x87, 0xd1, 0x01, 0x8d, 0x10, 0xa5, 0x24, 0xc1, 0xa9, 0x88, 0x2f, 0x8b, 0xb8, 0xee, 0x72, 0xbf, 0x79, 0x71, 0xd9, 0xae, 0x5d, 0x5c, 0xb6, 0x6b, 0x7f, 0x5d, 0xb6, 0x6b, 0xcf, 0xae, 0xda, 0x4b, 0x17, 0x57, 0xed, 0xa5, 0x3f, 0xae, 0xda, 0x4b, 0x5f, 0x1d, 0x6a, 0xd7, 0x32, 0x20, 0x34, 0x21, 0x54, 0xfd, 0x3d, 0xa2, 0xe1, 0x99, 0x33, 0xa9, 0xbe, 0x22, 0x1f, 0x95, 0x9f, 0x91, 0xef, 0xbe, 0xff, 0x68, - 0xf1, 0x3b, 0xaf, 0x7f, 0x4b, 0xa8, 0xd0, 0xe3, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x0e, 0x76, - 0x2d, 0x4a, 0x75, 0x0a, 0x00, 0x00, + 0xf1, 0x3b, 0xaf, 0x7f, 0x4b, 0xa8, 0xd0, 0xe3, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0xb3, 0x43, + 0xab, 0xfe, 0x75, 0x0a, 0x00, 0x00, } func (m *ClientState) Marshal() (dAtA []byte, err error) { @@ -1889,7 +1889,7 @@ func (m *Fraction) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Numerator |= int64(b&0x7F) << shift + m.Numerator |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1908,7 +1908,7 @@ func (m *Fraction) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Denominator |= int64(b&0x7F) << shift + m.Denominator |= uint64(b&0x7F) << shift if b < 0x80 { break } From 0b20e23f21a9020b900729928b2dea9a56255ca3 Mon Sep 17 00:00:00 2001 From: antstalepresh Date: Thu, 12 Nov 2020 02:05:03 +1000 Subject: [PATCH 081/136] fix random values testing --- x/staking/simulation/operations_test.go | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/x/staking/simulation/operations_test.go b/x/staking/simulation/operations_test.go index 2b16857c04..fca3b78125 100644 --- a/x/staking/simulation/operations_test.go +++ b/x/staking/simulation/operations_test.go @@ -82,9 +82,9 @@ func TestSimulateMsgCreateValidator(t *testing.T) { types.ModuleCdc.UnmarshalJSON(operationMsg.Msg, &msg) require.True(t, operationMsg.OK) - // require.Equal(t, "0.170063593193511020", msg.Commission.MaxChangeRate.String()) - // require.Equal(t, "0.660000000000000000", msg.Commission.MaxRate.String()) - // require.Equal(t, "0.047464127245687382", msg.Commission.Rate.String()) + require.Equal(t, "0.080000000000000000", msg.Commission.MaxChangeRate.String()) + require.Equal(t, "0.080000000000000000", msg.Commission.MaxRate.String()) + require.Equal(t, "0.019527679037870745", msg.Commission.Rate.String()) require.Equal(t, types.TypeMsgCreateValidator, msg.Type()) require.Equal(t, []byte{0xa, 0x20, 0x51, 0xde, 0xbd, 0xe8, 0xfa, 0xdf, 0x4e, 0xfc, 0x33, 0xa5, 0x16, 0x94, 0xf6, 0xee, 0xd3, 0x69, 0x7a, 0x7a, 0x1c, 0x2d, 0x50, 0xb6, 0x2, 0xf7, 0x16, 0x4e, 0x66, 0x9f, 0xff, 0x38, 0x91, 0x9b}, msg.Pubkey.Value) require.Equal(t, "cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r", msg.DelegatorAddress) @@ -120,10 +120,10 @@ func TestSimulateMsgEditValidator(t *testing.T) { require.True(t, operationMsg.OK) require.Equal(t, "0.280623462081924936", msg.CommissionRate.String()) - // require.Equal(t, "jLxzIivHSl", msg.Description.Moniker) - // require.Equal(t, "rBqDOTtGTO", msg.Description.Identity) - // require.Equal(t, "BSpYuLyYgg", msg.Description.Website) - // require.Equal(t, "wNbeHVIkPZ", msg.Description.SecurityContact) + require.Equal(t, "rBqDOTtGTO", msg.Description.Moniker) + require.Equal(t, "BSpYuLyYgg", msg.Description.Identity) + require.Equal(t, "wNbeHVIkPZ", msg.Description.Website) + require.Equal(t, "MOXcnQfyze", msg.Description.SecurityContact) require.Equal(t, types.TypeMsgEditValidator, msg.Type()) require.Equal(t, "cosmosvaloper1tnh2q55v8wyygtt9srz5safamzdengsn9dsd7z", msg.ValidatorAddress) require.Len(t, futureOperations, 0) @@ -158,7 +158,7 @@ func TestSimulateMsgDelegate(t *testing.T) { require.True(t, operationMsg.OK) require.Equal(t, "cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r", msg.DelegatorAddress) - // require.Equal(t, "4896096", msg.Amount.Amount.String()) + require.Equal(t, "98100858108421259236", msg.Amount.Amount.String()) require.Equal(t, "stake", msg.Amount.Denom) require.Equal(t, types.TypeMsgDelegate, msg.Type()) require.Equal(t, "cosmosvaloper1tnh2q55v8wyygtt9srz5safamzdengsn9dsd7z", msg.ValidatorAddress) @@ -203,7 +203,7 @@ func TestSimulateMsgUndelegate(t *testing.T) { require.True(t, operationMsg.OK) require.Equal(t, "cosmos1p8wcgrjr4pjju90xg6u9cgq55dxwq8j7u4x9a0", msg.DelegatorAddress) - // require.Equal(t, "560969", msg.Amount.Amount.String()) + require.Equal(t, "280623462081924937", msg.Amount.Amount.String()) require.Equal(t, "stake", msg.Amount.Denom) require.Equal(t, types.TypeMsgUndelegate, msg.Type()) require.Equal(t, "cosmosvaloper1tnh2q55v8wyygtt9srz5safamzdengsn9dsd7z", msg.ValidatorAddress) @@ -252,7 +252,7 @@ func TestSimulateMsgBeginRedelegate(t *testing.T) { require.True(t, operationMsg.OK) require.Equal(t, "cosmos12gwd9jchc69wck8dhstxgwz3z8qs8yv67ps8mu", msg.DelegatorAddress) - // require.Equal(t, "692322", msg.Amount.Amount.String()) + require.Equal(t, "489348507626016866", msg.Amount.Amount.String()) require.Equal(t, "stake", msg.Amount.Denom) require.Equal(t, types.TypeMsgBeginRedelegate, msg.Type()) require.Equal(t, "cosmosvaloper1h6a7shta7jyc72hyznkys683z98z36e0zdk8g9", msg.ValidatorDstAddress) From a0c1deb2e2c5eb65842d705ebb6612ce9399af69 Mon Sep 17 00:00:00 2001 From: Sunny Aggarwal Date: Wed, 11 Nov 2020 13:35:07 -0400 Subject: [PATCH 082/136] reassign to adr 037 --- docs/architecture/README.md | 1 + .../{adr-033-gov-split-vote.md => adr-037-gov-split-vote.md} | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) rename docs/architecture/{adr-033-gov-split-vote.md => adr-037-gov-split-vote.md} (99%) diff --git a/docs/architecture/README.md b/docs/architecture/README.md index d9a52d3898..d3ff033688 100644 --- a/docs/architecture/README.md +++ b/docs/architecture/README.md @@ -72,3 +72,4 @@ Read about the [PROCESS](./PROCESS.md). - [ADR 031: Protobuf Msg Services](./adr-031-msg-service.md) - [ADR 032: Typed Events](./adr-032-typed-events.md) - [ADR 035: Rosetta API Support](./adr-035-rosetta-api-support.md) +- [ADR 037: Governance Split Votes](./adr-037-gov-split-vote.md) \ No newline at end of file diff --git a/docs/architecture/adr-033-gov-split-vote.md b/docs/architecture/adr-037-gov-split-vote.md similarity index 99% rename from docs/architecture/adr-033-gov-split-vote.md rename to docs/architecture/adr-037-gov-split-vote.md index 759778c0c4..af9cd8d6f6 100644 --- a/docs/architecture/adr-033-gov-split-vote.md +++ b/docs/architecture/adr-037-gov-split-vote.md @@ -1,4 +1,4 @@ -# ADR 033: Governance split votes +# ADR 037: Governance split votes ## Changelog From e9f19225a907a9674ee2348a70e4a8614fa225f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?colin=20axn=C3=A9r?= <25233464+colin-axner@users.noreply.github.com> Date: Wed, 11 Nov 2020 19:06:37 +0100 Subject: [PATCH 083/136] IBC Upgrades function interface return client/consensus (#7895) * return client and consensus state on upgrades * fix build --- x/ibc/core/02-client/keeper/client.go | 13 ++--- x/ibc/core/exported/client.go | 4 +- .../06-solomachine/types/client_state.go | 8 +-- .../07-tendermint/types/upgrade.go | 53 +++++++++---------- .../07-tendermint/types/upgrade_test.go | 33 +++++++++++- .../09-localhost/types/client_state.go | 8 +-- 6 files changed, 74 insertions(+), 45 deletions(-) diff --git a/x/ibc/core/02-client/keeper/client.go b/x/ibc/core/02-client/keeper/client.go index 83ecedc535..5a6bb78d24 100644 --- a/x/ibc/core/02-client/keeper/client.go +++ b/x/ibc/core/02-client/keeper/client.go @@ -118,21 +118,22 @@ func (k Keeper) UpgradeClient(ctx sdk.Context, clientID string, upgradedClient e return sdkerrors.Wrapf(types.ErrClientFrozen, "cannot update client with ID %s", clientID) } - err := clientState.VerifyUpgrade(ctx, k.cdc, k.ClientStore(ctx, clientID), upgradedClient, upgradeHeight, proofUpgrade) + updatedClientState, updatedConsensusState, err := clientState.VerifyUpgradeAndUpdateState(ctx, k.cdc, k.ClientStore(ctx, clientID), upgradedClient, upgradeHeight, proofUpgrade) if err != nil { return sdkerrors.Wrapf(err, "cannot upgrade client with ID %s", clientID) } - k.SetClientState(ctx, clientID, upgradedClient) + k.SetClientState(ctx, clientID, updatedClientState) + k.SetClientConsensusState(ctx, clientID, updatedClientState.GetLatestHeight(), updatedConsensusState) - k.Logger(ctx).Info("client state upgraded", "client-id", clientID, "height", upgradedClient.GetLatestHeight().String()) + k.Logger(ctx).Info("client state upgraded", "client-id", clientID, "height", updatedClientState.GetLatestHeight().String()) defer func() { telemetry.IncrCounterWithLabels( []string{"ibc", "client", "upgrade"}, 1, []metrics.Label{ - telemetry.NewLabel("client-type", clientState.ClientType()), + telemetry.NewLabel("client-type", updatedClientState.ClientType()), telemetry.NewLabel("client-id", clientID), }, ) @@ -143,8 +144,8 @@ func (k Keeper) UpgradeClient(ctx sdk.Context, clientID string, upgradedClient e sdk.NewEvent( types.EventTypeUpgradeClient, sdk.NewAttribute(types.AttributeKeyClientID, clientID), - sdk.NewAttribute(types.AttributeKeyClientType, clientState.ClientType()), - sdk.NewAttribute(types.AttributeKeyConsensusHeight, upgradedClient.GetLatestHeight().String()), + sdk.NewAttribute(types.AttributeKeyClientType, updatedClientState.ClientType()), + sdk.NewAttribute(types.AttributeKeyConsensusHeight, updatedClientState.GetLatestHeight().String()), ), ) diff --git a/x/ibc/core/exported/client.go b/x/ibc/core/exported/client.go index 8c7e89b33e..a46c8da0b2 100644 --- a/x/ibc/core/exported/client.go +++ b/x/ibc/core/exported/client.go @@ -39,14 +39,14 @@ type ClientState interface { CheckProposedHeaderAndUpdateState(sdk.Context, codec.BinaryMarshaler, sdk.KVStore, Header) (ClientState, ConsensusState, error) // Upgrade functions - VerifyUpgrade( + VerifyUpgradeAndUpdateState( ctx sdk.Context, cdc codec.BinaryMarshaler, store sdk.KVStore, newClient ClientState, upgradeHeight Height, proofUpgrade []byte, - ) error + ) (ClientState, ConsensusState, error) // Utility function that zeroes out any client customizable fields in client state // Ledger enforced fields are maintained while all custom fields are zero values // Used to verify upgrades diff --git a/x/ibc/light-clients/06-solomachine/types/client_state.go b/x/ibc/light-clients/06-solomachine/types/client_state.go index 34cb91964b..4a6fb86962 100644 --- a/x/ibc/light-clients/06-solomachine/types/client_state.go +++ b/x/ibc/light-clients/06-solomachine/types/client_state.go @@ -74,12 +74,12 @@ func (cs ClientState) ZeroCustomFields() exported.ClientState { ) } -// VerifyUpgrade returns an error since solomachine client does not support upgrades -func (cs ClientState) VerifyUpgrade( +// VerifyUpgradeAndUpdateState returns an error since solomachine client does not support upgrades +func (cs ClientState) VerifyUpgradeAndUpdateState( _ sdk.Context, _ codec.BinaryMarshaler, _ sdk.KVStore, _ exported.ClientState, _ exported.Height, _ []byte, -) error { - return sdkerrors.Wrap(clienttypes.ErrInvalidUpgradeClient, "cannot upgrade solomachine client") +) (exported.ClientState, exported.ConsensusState, error) { + return nil, nil, sdkerrors.Wrap(clienttypes.ErrInvalidUpgradeClient, "cannot upgrade solomachine client") } // VerifyClientState verifies a proof of the client state of the running chain diff --git a/x/ibc/light-clients/07-tendermint/types/upgrade.go b/x/ibc/light-clients/07-tendermint/types/upgrade.go index 28f02950d1..34e00f9ccd 100644 --- a/x/ibc/light-clients/07-tendermint/types/upgrade.go +++ b/x/ibc/light-clients/07-tendermint/types/upgrade.go @@ -3,7 +3,6 @@ package types import ( "fmt" "net/url" - "reflect" "strings" "github.com/cosmos/cosmos-sdk/codec" @@ -14,7 +13,7 @@ import ( "github.com/cosmos/cosmos-sdk/x/ibc/core/exported" ) -// VerifyUpgrade checks if the upgraded client has been committed by the current client +// VerifyUpgradeAndUpdateState checks if the upgraded client has been committed by the current client // It will zero out all client-specific fields (e.g. TrustingPeriod and verify all data // in client state that must be the same across all valid Tendermint clients for the new chain. // VerifyUpgrade will return an error if: @@ -23,42 +22,36 @@ import ( // - the latest height of the new client does not match the height in committed client // - any Tendermint chain specified parameter in upgraded client such as ChainID, UnbondingPeriod, // and ProofSpecs do not match parameters set by committed client -func (cs ClientState) VerifyUpgrade( +func (cs ClientState) VerifyUpgradeAndUpdateState( ctx sdk.Context, cdc codec.BinaryMarshaler, clientStore sdk.KVStore, upgradedClient exported.ClientState, upgradeHeight exported.Height, proofUpgrade []byte, -) error { +) (exported.ClientState, exported.ConsensusState, error) { if cs.UpgradePath == "" { - return sdkerrors.Wrap(clienttypes.ErrInvalidUpgradeClient, "cannot upgrade client, no upgrade path set") + return nil, nil, sdkerrors.Wrap(clienttypes.ErrInvalidUpgradeClient, "cannot upgrade client, no upgrade path set") } upgradePath, err := constructUpgradeMerklePath(cs.UpgradePath, upgradeHeight) if err != nil { - return sdkerrors.Wrapf(clienttypes.ErrInvalidUpgradeClient, "cannot upgrade client, unescaping key with URL format failed: %v", err) + return nil, nil, sdkerrors.Wrapf(clienttypes.ErrInvalidUpgradeClient, "cannot upgrade client, unescaping key with URL format failed: %v", err) } // UpgradeHeight must be in same version as client state height if cs.GetLatestHeight().GetVersionNumber() != upgradeHeight.GetVersionNumber() { - return sdkerrors.Wrapf(sdkerrors.ErrInvalidHeight, "version at which upgrade occurs must be same as current client version. expected version %d, got %d", + return nil, nil, sdkerrors.Wrapf(sdkerrors.ErrInvalidHeight, "version at which upgrade occurs must be same as current client version. expected version %d, got %d", cs.GetLatestHeight().GetVersionNumber(), upgradeHeight.GetVersionNumber()) } - tmClient, ok := upgradedClient.(*ClientState) - if !ok { - return sdkerrors.Wrapf(clienttypes.ErrInvalidClientType, "upgraded client must be Tendermint client. expected: %T got: %T", - &ClientState{}, upgradedClient) - } - if !upgradedClient.GetLatestHeight().GT(cs.GetLatestHeight()) { - return sdkerrors.Wrapf(sdkerrors.ErrInvalidHeight, "upgraded client height %s must be greater than current client height %s", + return nil, nil, sdkerrors.Wrapf(sdkerrors.ErrInvalidHeight, "upgraded client height %s must be greater than current client height %s", upgradedClient.GetLatestHeight(), cs.GetLatestHeight()) } if len(proofUpgrade) == 0 { - return sdkerrors.Wrap(commitmenttypes.ErrInvalidProof, "proof of upgrade is empty") + return nil, nil, sdkerrors.Wrap(commitmenttypes.ErrInvalidProof, "proof of upgrade is empty") } var merkleProof commitmenttypes.MerkleProof if err := cdc.UnmarshalBinaryBare(proofUpgrade, &merkleProof); err != nil { - return sdkerrors.Wrapf(commitmenttypes.ErrInvalidProof, "could not unmarshal merkle proof: %v", err) + return nil, nil, sdkerrors.Wrapf(commitmenttypes.ErrInvalidProof, "could not unmarshal merkle proof: %v", err) } // counterparty chain must commit the upgraded client with all client-customizable fields zeroed out @@ -66,7 +59,7 @@ func (cs ClientState) VerifyUpgrade( committedClient := upgradedClient.ZeroCustomFields() bz, err := codec.MarshalAny(cdc, committedClient) if err != nil { - return sdkerrors.Wrapf(clienttypes.ErrInvalidClient, "could not marshal client state: %v", err) + return nil, nil, sdkerrors.Wrapf(clienttypes.ErrInvalidClient, "could not marshal client state: %v", err) } // Must prove against latest consensus state to ensure we are verifying against latest upgrade plan @@ -74,34 +67,38 @@ func (cs ClientState) VerifyUpgrade( // at this consensus state consState, err := GetConsensusState(clientStore, cdc, upgradeHeight) if err != nil { - return sdkerrors.Wrap(err, "could not retrieve consensus state for upgradeHeight") + return nil, nil, sdkerrors.Wrap(err, "could not retrieve consensus state for upgradeHeight") } if cs.IsExpired(consState.Timestamp, ctx.BlockTime()) { - return sdkerrors.Wrap(clienttypes.ErrInvalidClient, "cannot upgrade an expired client") + return nil, nil, sdkerrors.Wrap(clienttypes.ErrInvalidClient, "cannot upgrade an expired client") } tmCommittedClient, ok := committedClient.(*ClientState) if !ok { - return sdkerrors.Wrapf(clienttypes.ErrInvalidClientType, "upgraded client must be Tendermint client. expected: %T got: %T", + return nil, nil, sdkerrors.Wrapf(clienttypes.ErrInvalidClientType, "upgraded client must be Tendermint client. expected: %T got: %T", &ClientState{}, upgradedClient) } - // Relayer must keep all client-chosen parameters the same as the previous client. - // Compare relayer-provided client state against expected client state. + // Relayer chosen client parameters are ignored. // All chain-chosen parameters come from committed client, all client-chosen parameters - // come from current client - expectedClient := NewClientState( + // come from current client. + updatedClientState := NewClientState( tmCommittedClient.ChainId, cs.TrustLevel, cs.TrustingPeriod, tmCommittedClient.UnbondingPeriod, cs.MaxClockDrift, tmCommittedClient.LatestHeight, tmCommittedClient.ConsensusParams, tmCommittedClient.ProofSpecs, tmCommittedClient.UpgradePath, cs.AllowUpdateAfterExpiry, cs.AllowUpdateAfterMisbehaviour, ) - if !reflect.DeepEqual(expectedClient, tmClient) { - return sdkerrors.Wrapf(clienttypes.ErrInvalidClient, "upgraded client does not maintain previous chosen parameters. expected: %v got: %v", - expectedClient, tmClient) + + if err := updatedClientState.Validate(); err != nil { + return nil, nil, sdkerrors.Wrap(err, "updated client state failed basic validation") } - return merkleProof.VerifyMembership(cs.ProofSpecs, consState.GetRoot(), upgradePath, bz) + if err := merkleProof.VerifyMembership(cs.ProofSpecs, consState.GetRoot(), upgradePath, bz); err != nil { + return nil, nil, err + } + + // TODO: Return valid consensus state https://github.com/cosmos/cosmos-sdk/issues/7708 + return updatedClientState, &ConsensusState{}, nil } // construct MerklePath from upgradePath diff --git a/x/ibc/light-clients/07-tendermint/types/upgrade_test.go b/x/ibc/light-clients/07-tendermint/types/upgrade_test.go index bb2108508d..fea9f09cb2 100644 --- a/x/ibc/light-clients/07-tendermint/types/upgrade_test.go +++ b/x/ibc/light-clients/07-tendermint/types/upgrade_test.go @@ -317,6 +317,31 @@ func (suite *TendermintTestSuite) TestVerifyUpgrade() { }, expPass: false, }, + { + name: "unsuccessful upgrade: updated unbonding period is equal to trusting period", + setup: func() { + + upgradedClient = types.NewClientState("newChainId", types.DefaultTrustLevel, trustingPeriod, trustingPeriod, maxClockDrift, newClientHeight, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) + + // upgrade Height is at next block + upgradeHeight = clienttypes.NewHeight(0, uint64(suite.chainB.GetContext().BlockHeight()+1)) + + // zero custom fields and store in upgrade store + suite.chainB.App.UpgradeKeeper.SetUpgradedClient(suite.chainB.GetContext(), int64(upgradeHeight.GetVersionHeight()), upgradedClient) + + // commit upgrade store changes and update clients + + suite.coordinator.CommitBlock(suite.chainB) + err := suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) + suite.Require().NoError(err) + + cs, found := suite.chainA.App.IBCKeeper.ClientKeeper.GetClientState(suite.chainA.GetContext(), clientA) + suite.Require().True(found) + + proofUpgrade, _ = suite.chainB.QueryUpgradeProof(upgradetypes.UpgradedClientKey(int64(upgradeHeight.GetVersionHeight())), cs.GetLatestHeight().GetVersionHeight()) + }, + expPass: false, + }, } for _, tc := range testCases { @@ -332,7 +357,7 @@ func (suite *TendermintTestSuite) TestVerifyUpgrade() { cs := suite.chainA.GetClientState(clientA) clientStore := suite.chainA.App.IBCKeeper.ClientKeeper.ClientStore(suite.chainA.GetContext(), clientA) - err := cs.VerifyUpgrade( + clientState, consensusState, err := cs.VerifyUpgradeAndUpdateState( suite.chainA.GetContext(), suite.cdc, clientStore, @@ -343,8 +368,14 @@ func (suite *TendermintTestSuite) TestVerifyUpgrade() { if tc.expPass { suite.Require().NoError(err, "verify upgrade failed on valid case: %s", tc.name) + suite.Require().NotNil(clientState, "verify upgrade failed on valid case: %s", tc.name) + suite.Require().NotNil(consensusState, "verify upgrade failed on valid case: %s", tc.name) } else { suite.Require().Error(err, "verify upgrade passed on invalid case: %s", tc.name) + suite.Require().Nil(clientState, "verify upgrade passed on invalid case: %s", tc.name) + + suite.Require().Nil(consensusState, "verify upgrade passed on invalid case: %s", tc.name) + } } } diff --git a/x/ibc/light-clients/09-localhost/types/client_state.go b/x/ibc/light-clients/09-localhost/types/client_state.go index eb69311476..32b799fccd 100644 --- a/x/ibc/light-clients/09-localhost/types/client_state.go +++ b/x/ibc/light-clients/09-localhost/types/client_state.go @@ -102,12 +102,12 @@ func (cs ClientState) CheckProposedHeaderAndUpdateState( return nil, nil, sdkerrors.Wrap(clienttypes.ErrUpdateClientFailed, "cannot update localhost client with a proposal") } -// VerifyUpgrade returns an error since localhost cannot be upgraded -func (cs ClientState) VerifyUpgrade( +// VerifyUpgradeAndUpdateState returns an error since localhost cannot be upgraded +func (cs ClientState) VerifyUpgradeAndUpdateState( _ sdk.Context, _ codec.BinaryMarshaler, _ sdk.KVStore, _ exported.ClientState, _ exported.Height, _ []byte, -) error { - return sdkerrors.Wrap(clienttypes.ErrInvalidUpgradeClient, "cannot upgrade localhost client") +) (exported.ClientState, exported.ConsensusState, error) { + return nil, nil, sdkerrors.Wrap(clienttypes.ErrInvalidUpgradeClient, "cannot upgrade localhost client") } // VerifyClientState verifies that the localhost client state is stored locally From 104a2031abe69b1e76fcea09a8980e5640b4b6fb Mon Sep 17 00:00:00 2001 From: Marko Date: Thu, 12 Nov 2020 10:49:46 +0100 Subject: [PATCH 084/136] docker: proto (#7893) * migrate fully to buf * run protoc-gen-cosmos in script * migrate to docker container * Update Makefile Co-authored-by: Alessio Treglia * Update scripts/protocgen.sh Co-authored-by: Aleksandr Bezobchuk Co-authored-by: Alessio Treglia Co-authored-by: Aleksandr Bezobchuk --- Makefile | 5 + contrib/devtools/proto-tools-installer.sh | 29 +- scripts/protocgen-any.sh | 2 +- scripts/protocgen.sh | 17 +- x/staking/types/staking.pb.go | 1200 +++++++++++---------- 5 files changed, 622 insertions(+), 631 deletions(-) diff --git a/Makefile b/Makefile index 5eadb43a7c..d908a2ad0b 100644 --- a/Makefile +++ b/Makefile @@ -361,6 +361,11 @@ proto-all: proto-tools proto-gen proto-lint proto-check-breaking proto-swagger-g proto-gen: @./scripts/protocgen.sh +proto-gen-docker: + @echo "Generating Protobuf files" + docker run -v $(shell pwd):/workspace --workdir /workspace tendermintdev/sdk-proto-gen sh ./scripts/protocgen.sh +.PHONY: proto-gen-docker + proto-format: @echo "Formatting Protobuf files" docker run -v $(shell pwd):/workspace \ diff --git a/contrib/devtools/proto-tools-installer.sh b/contrib/devtools/proto-tools-installer.sh index f8bd2f621b..fc736d55e8 100755 --- a/contrib/devtools/proto-tools-installer.sh +++ b/contrib/devtools/proto-tools-installer.sh @@ -6,8 +6,7 @@ DESTDIR=${DESTDIR:-} PREFIX=${PREFIX:-/usr/local} UNAME_S="$(uname -s 2>/dev/null)" UNAME_M="$(uname -m 2>/dev/null)" -BUF_VERSION=0.11.0 -PROTOC_VERSION=3.13.0 +BUF_VERSION=0.30.0 PROTOC_GRPC_GATEWAY_VERSION=1.14.7 f_abort() { @@ -61,19 +60,6 @@ f_needs_install() { return 0 } -f_install_protoc() { - f_print_installing_with_padding proto_c - f_needs_install "${DESTDIR}/${PREFIX}/bin/protoc" || return 0 - - pushd "${TEMPDIR}" >/dev/null - curl -o "${PROTOC_ZIP}" -sSL "https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/${PROTOC_ZIP}" - unzip -q -o ${PROTOC_ZIP} -d ${DESTDIR}/${PREFIX} bin/protoc; \ - unzip -q -o ${PROTOC_ZIP} -d ${DESTDIR}/${PREFIX} 'include/*'; \ - rm -f ${PROTOC_ZIP} - popd >/dev/null - f_print_done -} - f_install_buf() { f_print_installing_with_padding buf f_needs_install "${DESTDIR}/${PREFIX}/bin/buf" || return 0 @@ -83,18 +69,6 @@ f_install_buf() { f_print_done } -f_install_protoc_gen_gocosmos() { - f_print_installing_with_padding protoc-gen-gocosmos - - if ! grep "github.com/gogo/protobuf => github.com/regen-network/protobuf" go.mod &>/dev/null ; then - echo -e "\tPlease run this command from somewhere inside the cosmos-sdk folder." - return 1 - fi - - go get github.com/regen-network/cosmos-proto/protoc-gen-gocosmos 2>/dev/null - f_print_done -} - f_install_protoc_gen_grpc_gateway() { f_print_installing_with_padding protoc-gen-grpc-gateway f_needs_install "${DESTDIR}/${PREFIX}/bin/protoc-gen-grpc-gateway" || return 0 @@ -121,7 +95,6 @@ f_install_protoc_gen_swagger() { f_ensure_tools f_ensure_dirs -f_install_protoc f_install_buf f_install_protoc_gen_gocosmos f_install_protoc_gen_grpc_gateway diff --git a/scripts/protocgen-any.sh b/scripts/protocgen-any.sh index 5622a91eea..83ee1fe70d 100755 --- a/scripts/protocgen-any.sh +++ b/scripts/protocgen-any.sh @@ -8,7 +8,7 @@ set -eo pipefail go install github.com/gogo/protobuf/protoc-gen-gogotypes -protoc -I. --gogotypes_out=./codec/types third_party/proto/google/protobuf/any.proto +buf protoc -I. --gogotypes_out=./codec/types third_party/proto/google/protobuf/any.proto mv codec/types/third_party/proto/google/protobuf/any.pb.go codec/types rm -rf codec/types/third_party diff --git a/scripts/protocgen.sh b/scripts/protocgen.sh index e1592aa780..32baafe977 100755 --- a/scripts/protocgen.sh +++ b/scripts/protocgen.sh @@ -2,9 +2,20 @@ set -eo pipefail +protoc_gen_gocosmos() { + if ! grep "github.com/gogo/protobuf => github.com/regen-network/protobuf" go.mod &>/dev/null ; then + echo -e "\tPlease run this command from somewhere inside the cosmos-sdk folder." + return 1 + fi + + go get github.com/regen-network/cosmos-proto/protoc-gen-gocosmos 2>/dev/null +} + +protoc_gen_gocosmos + proto_dirs=$(find ./proto -path -prune -o -name '*.proto' -print0 | xargs -0 -n1 dirname | sort | uniq) for dir in $proto_dirs; do - protoc \ + buf protoc \ -I "proto" \ -I "third_party/proto" \ --gocosmos_out=plugins=interfacetype+grpc,\ @@ -12,7 +23,7 @@ Mgoogle/protobuf/any.proto=github.com/cosmos/cosmos-sdk/codec/types:. \ $(find "${dir}" -maxdepth 1 -name '*.proto') # command to generate gRPC gateway (*.pb.gw.go in respective modules) files - protoc \ + buf protoc \ -I "proto" \ -I "third_party/proto" \ --grpc-gateway_out=logtostderr=true:. \ @@ -21,7 +32,7 @@ Mgoogle/protobuf/any.proto=github.com/cosmos/cosmos-sdk/codec/types:. \ done # generate codec/testdata proto code -protoc -I "proto" -I "third_party/proto" -I "testutil/testdata" --gocosmos_out=plugins=interfacetype+grpc,\ +buf protoc -I "proto" -I "third_party/proto" -I "testutil/testdata" --gocosmos_out=plugins=interfacetype+grpc,\ Mgoogle/protobuf/any.proto=github.com/cosmos/cosmos-sdk/codec/types:. ./testutil/testdata/*.proto # move proto files to the right places diff --git a/x/staking/types/staking.pb.go b/x/staking/types/staking.pb.go index 865953c9dd..4dbe0e3e30 100644 --- a/x/staking/types/staking.pb.go +++ b/x/staking/types/staking.pb.go @@ -1216,606 +1216,608 @@ func (this *Pool) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_ func StakingDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} var gzipped = []byte{ - // 9578 bytes of a gzipped FileDescriptorSet + // 9603 bytes of a gzipped FileDescriptorSet 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x7d, 0x6d, 0x70, 0x24, 0xd7, - 0x71, 0xd8, 0xcd, 0x7e, 0x00, 0xbb, 0x8d, 0x05, 0xb0, 0x78, 0xc0, 0xdd, 0xed, 0x2d, 0x8f, 0x00, - 0x38, 0xfc, 0x3a, 0x1e, 0x49, 0x80, 0x3c, 0xf2, 0x8e, 0xe4, 0x9e, 0x44, 0x1a, 0x0b, 0xec, 0xe1, - 0xc0, 0xc3, 0x17, 0x07, 0xc0, 0x91, 0xfa, 0x70, 0xb6, 0x06, 0xb3, 0x0f, 0x8b, 0x21, 0x76, 0x67, - 0x86, 0x33, 0xb3, 0x77, 0x07, 0x4a, 0xaa, 0xa2, 0x25, 0x45, 0x91, 0xe8, 0x38, 0x92, 0x2c, 0x97, - 0x23, 0x51, 0x3a, 0x45, 0xb2, 0x9c, 0xc8, 0x91, 0x95, 0xf8, 0x43, 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 0xed, 0x86, 0xae, 0x55, 0x03, 0x68, 0x30, 0x9d, 0x3c, 0x95, 0x56, 0xf2, 0xec, 0xc1, 0x82, - 0x8f, 0x7c, 0x3f, 0x8c, 0x5e, 0xc5, 0xea, 0x5e, 0x10, 0x75, 0x88, 0xa2, 0x8e, 0x10, 0x70, 0x00, - 0x71, 0x1e, 0x72, 0x4d, 0xec, 0x38, 0x6a, 0x1d, 0x57, 0xdd, 0x7d, 0x0b, 0x17, 0x52, 0x54, 0xfb, - 0xe9, 0x36, 0xed, 0xa3, 0x9a, 0x0f, 0x71, 0xaa, 0xcd, 0x7d, 0x0b, 0xa3, 0x39, 0xc8, 0x62, 0xa3, - 0xd5, 0x64, 0x1c, 0xd2, 0x5d, 0xec, 0x57, 0x31, 0x5a, 0xcd, 0x28, 0x97, 0x0c, 0x21, 0xe3, 0x2c, - 0x06, 0x1d, 0x6c, 0x5f, 0xd1, 0x35, 0x5c, 0x18, 0xa0, 0x0c, 0xee, 0x6f, 0x63, 0xb0, 0xc1, 0x9e, - 0x47, 0x79, 0x08, 0x3a, 0x34, 0x0f, 0x59, 0x7c, 0xcd, 0xc5, 0x86, 0xa3, 0x9b, 0x46, 0x61, 0x90, - 0x32, 0xb9, 0xb7, 0xc3, 0x28, 0xe2, 0x46, 0x2d, 0xca, 0xc2, 0xa7, 0x43, 0xe7, 0x60, 0xd0, 0xb4, - 0x5c, 0xdd, 0x34, 0x9c, 0x42, 0x66, 0x5a, 0x3a, 0x35, 0x74, 0xe6, 0x64, 0x47, 0x47, 0x58, 0x63, - 0x38, 0x8a, 0x40, 0x46, 0x4b, 0x90, 0x77, 0xcc, 0x96, 0xad, 0xe1, 0xaa, 0x66, 0xd6, 0x70, 0x55, - 0x37, 0x76, 0xcc, 0x42, 0x96, 0x32, 0x98, 0x6a, 0x57, 0x84, 0x22, 0xce, 0x9b, 0x35, 0xbc, 0x64, - 0xec, 0x98, 0xca, 0x88, 0x13, 0x6a, 0xa3, 0x63, 0x30, 0xe0,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83, 0xc9, 0xe3, 0xe8, 0x60, 0x73, 0xaa, 0xe0, 0x22, 0x9e, 0xec, 0x96, - 0xee, 0x31, 0x69, 0xda, 0x24, 0xfd, 0x40, 0x02, 0x8e, 0x76, 0x64, 0xde, 0x51, 0xd0, 0x3b, 0x01, - 0x74, 0xc3, 0x6a, 0xb9, 0x2c, 0x23, 0x62, 0x01, 0x36, 0x4b, 0x21, 0x34, 0x78, 0x91, 0xe0, 0xd9, - 0x72, 0xbd, 0xe7, 0x49, 0xfa, 0x1c, 0x18, 0x88, 0x22, 0x3c, 0xe9, 0x0b, 0x9a, 0xa2, 0x82, 0x4e, - 0x76, 0xd1, 0xb4, 0xcd, 0x31, 0x1f, 0x81, 0xbc, 0xd6, 0xd0, 0xb1, 0xe1, 0x56, 0x1d, 0xd7, 0xc6, - 0x6a, 0x53, 0x37, 0xea, 0x74, 0x05, 0xc9, 0x94, 0xd2, 0x3b, 0x6a, 0xc3, 0xc1, 0xca, 0x28, 0x7b, - 0xbc, 0x21, 0x9e, 0x12, 0x0a, 0xea, 0x40, 0x76, 0x80, 0x62, 0x20, 0x44, 0xc1, 0x1e, 0x7b, 0x14, - 0xf2, 0xcf, 0x66, 0x61, 0x28, 0x90, 0x57, 0xa3, 0xbb, 0x20, 0xf7, 0xa2, 0x7a, 0x45, 0xad, 0x8a, - 0xbd, 0x12, 0xb3, 0xc4, 0x10, 0x81, 0xad, 0xf3, 0xfd, 0xd2, 0x23, 0x30, 0x41, 0x51, 0xcc, 0x96, - 0x8b, 0xed, 0xaa, 0xd6, 0x50, 0x1d, 0x87, 0x1a, 0x2d, 0x43, 0x51, 0x11, 0x79, 0xb6, 0x46, 0x1e, - 0xcd, 0x8b, 0x27, 0xe8, 0x2c, 0x8c, 0x53, 0x8a, 0x66, 0xab, 0xe1, 0xea, 0x56, 0x03, 0x57, 0xc9, - 0xee, 0xcd, 0xa1, 0x2b, 0x89, 0x27, 0xd9, 0x18, 0xc1, 0x58, 0xe1, 0x08, 0x44, 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d, 0x3d, 0xb3, 0xf6, 0x99, 0x79, 0xb2, 0x96, 0x95, 0x06, 0x58, 0x76, 0xac, 0x30, - 0x4a, 0x92, 0x47, 0x10, 0x67, 0xc3, 0x2c, 0x1b, 0xc9, 0x28, 0xbc, 0x85, 0x16, 0x61, 0xe0, 0x45, - 0x87, 0xf2, 0x1e, 0xa0, 0xbc, 0xef, 0xe9, 0xcd, 0xfb, 0xd9, 0x0d, 0xca, 0x3c, 0xfb, 0xec, 0x46, - 0x75, 0x75, 0x4d, 0x59, 0x99, 0x5b, 0x56, 0x38, 0x39, 0x3a, 0x01, 0xa9, 0x86, 0xfa, 0xf2, 0x7e, - 0x78, 0xd5, 0xa3, 0xa0, 0x7e, 0x07, 0xe1, 0x04, 0xa4, 0xae, 0x62, 0x75, 0x2f, 0xbc, 0xd6, 0x50, - 0xd0, 0x6d, 0x9c, 0x0c, 0xb3, 0x90, 0xa6, 0xf6, 0x42, 0x00, 0xdc, 0x62, 0xf9, 0x23, 0x28, 0x03, - 0xa9, 0xf9, 0x35, 0x85, 0x4c, 0x88, 0x3c, 0xe4, 0x18, 0xb4, 0xba, 0xbe, 0x54, 0x99, 0xaf, 0xe4, - 0x13, 0xf2, 0x59, 0x18, 0x60, 0x46, 0x20, 0x93, 0xc5, 0x33, 0x43, 0xfe, 0x08, 0x6f, 0x72, 0x1e, - 0x92, 0x78, 0xba, 0xb5, 0x52, 0xae, 0x28, 0xf9, 0x44, 0x78, 0xa8, 0x53, 0xf9, 0xb4, 0xec, 0x40, - 0x2e, 0x98, 0x88, 0xff, 0x70, 0x36, 0xd9, 0x5f, 0x96, 0x60, 0x28, 0x90, 0x58, 0x93, 0x8c, 0x48, - 0x6d, 0x34, 0xcc, 0xab, 0x55, 0xb5, 0xa1, 0xab, 0x0e, 0x77, 0x0d, 0xa0, 0xa0, 0x39, 0x02, 0xe9, - 0x77, 0xe8, 0x7e, 0x48, 0x53, 0x24, 0x9d, 0x1f, 0x90, 0x3f, 0x29, 0x41, 0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4, 0xcf, 0xbb, 0xb8, 0xcb, 0x9b, - 0x21, 0x39, 0x67, 0x59, 0xa8, 0x08, 0x19, 0xf6, 0x82, 0xdb, 0x64, 0xfe, 0x92, 0x52, 0xbc, 0x36, - 0x79, 0xe6, 0x98, 0x3b, 0xee, 0x55, 0xd5, 0xf6, 0xae, 0x30, 0x89, 0xb6, 0xfc, 0x14, 0x64, 0xe7, - 0x4d, 0xc3, 0xc1, 0x86, 0xd3, 0xa2, 0x53, 0x6f, 0xbb, 0x61, 0x6a, 0x7b, 0x9c, 0x03, 0x6b, 0x10, - 0x83, 0xab, 0x96, 0x45, 0x29, 0x53, 0x0a, 0xf9, 0xc9, 0xc2, 0x54, 0x79, 0xa3, 0xab, 0x89, 0x9e, - 0x3a, 0xb8, 0x89, 0xb8, 0x92, 0x9e, 0x8d, 0xfe, 0xb7, 0x04, 0x27, 0xdb, 0x27, 0xd4, 0x1e, 0xde, - 0x77, 0x0e, 0x3a, 0x9f, 0x5e, 0x80, 0xec, 0x3a, 0xbd, 0x47, 0x7c, 0x09, 0xef, 0xa3, 0x22, 0x0c, - 0xe2, 0xda, 0x99, 0xb3, 0x67, 0x1f, 0x7d, 0x8a, 0x79, 0xfb, 0xc5, 0x23, 0x8a, 0x00, 0xa0, 0x49, - 0xc8, 0x3a, 0x58, 0xb3, 0xce, 0x9c, 0x3d, 0xb7, 0xf7, 0x28, 0x73, 0xaf, 0x8b, 0x47, 0x14, 0x1f, - 0x54, 0xca, 0x10, 0xad, 0xdf, 0xf8, 0xf4, 0x94, 0x54, 0x4e, 0x43, 0xd2, 0x69, 0x35, 0x6f, 0xab, - 0x8f, 0xbc, 0x96, 0x86, 0xe9, 0x20, 0x25, 0x0d, 0x50, 0x57, 0xd4, 0x86, 0x5e, 0x53, 0xfd, 0x1b, - 0xe0, 0xf9, 0x80, 0x0d, 0x28, 0x46, 0x67, 0x13, 0x14, 0x7b, 0x5a, 0x52, 0xfe, 0x75, 0x09, 0x72, - 0x97, 0x05, 0x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0, 0x72, 0x86, 0x74, 0xfc, 0xa1, 0x3f, 0x98, 0x92, 0x14, 0x4a, 0x81, 0xe6, 0x61, 0xb8, 0xa1, - 0x3a, 0x6e, 0x95, 0xae, 0x60, 0xa4, 0xfb, 0x34, 0x65, 0x71, 0xa2, 0xdd, 0x20, 0xdc, 0xb0, 0x5c, - 0xf4, 0x21, 0x42, 0xc5, 0x40, 0x35, 0x74, 0x0a, 0xf2, 0x94, 0x89, 0x66, 0x36, 0x9b, 0xba, 0xcb, - 0x72, 0xab, 0x01, 0x6a, 0xf7, 0x11, 0x02, 0x9f, 0xa7, 0x60, 0x9a, 0x61, 0xdd, 0x01, 0x59, 0x7a, - 0x95, 0x84, 0xa2, 0xb0, 0x63, 0x93, 0x19, 0x02, 0xa0, 0x0f, 0xef, 0x87, 0x51, 0x3f, 0x3e, 0x32, - 0x94, 0x0c, 0xe3, 0xe2, 0x83, 0x29, 0xe2, 0x23, 0x30, 0x61, 0xe0, 0x6b, 0xf4, 0x20, 0x67, 0x08, - 0x3b, 0x4b, 0xb1, 0x11, 0x79, 0x76, 0x39, 0x4c, 0x71, 0x2f, 0x8c, 0x68, 0xc2, 0xf8, 0x0c, 0x17, - 0x28, 0xee, 0xb0, 0x07, 0xa5, 0x68, 0x27, 0x20, 0xa3, 0x5a, 0x16, 0x43, 0x18, 0xe2, 0xf1, 0xd1, - 0xb2, 0xe8, 0xa3, 0xd3, 0x30, 0x46, 0x75, 0xb4, 0xb1, 0xd3, 0x6a, 0xb8, 0x9c, 0x49, 0x8e, 0xe2, - 0x8c, 0x92, 0x07, 0x0a, 0x83, 0x53, 0xdc, 0xbb, 0x61, 0x18, 0x5f, 0xd1, 0x6b, 0xd8, 0xd0, 0x30, - 0xc3, 0x1b, 0xa6, 0x78, 0x39, 0x01, 0xa4, 0x48, 0x0f, 0x80, 0x17, 0xf7, 0xaa, 0x22, 0x26, 0x8f, - 0x30, 0x7e, 0x02, 0x3e, 0xc7, 0xc0, 0x72, 0x01, 0x52,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x05, 0x18, 0x6c, 0x9a, 0x86, 0xbe, 0xc7, 0xfd, 0x31, - 0xab, 0x88, 0x26, 0x2a, 0x42, 0x86, 0x5d, 0xba, 0x73, 0xf7, 0x45, 0x29, 0x54, 0xb4, 0x09, 0xd5, - 0x55, 0xbc, 0xed, 0xe8, 0x62, 0x34, 0x14, 0xd1, 0x44, 0x17, 0x20, 0xef, 0x60, 0xad, 0x65, 0xeb, - 0xee, 0x7e, 0x55, 0x33, 0x0d, 0x57, 0xd5, 0x5c, 0x76, 0x7d, 0xab, 0x7c, 0xc7, 0xcd, 0x1b, 0x53, - 0xc7, 0x99, 0xac, 0x51, 0x0c, 0x59, 0x19, 0x15, 0xa0, 0x79, 0x06, 0x21, 0x3d, 0xd4, 0xb0, 0xab, - 0xea, 0x0d, 0xa7, 0xc0, 0xde, 0x93, 0x89, 0x66, 0x40, 0x97, 0xcf, 0x0f, 0x06, 0x0b, 0x5b, 0x17, - 0x20, 0x6f, 0x5a, 0xd8, 0x0e, 0x25, 0xa2, 0x52, 0xb4, 0xe7, 0x28, 0x86, 0xac, 0x8c, 0x0a, 0x90, - 0x48, 0x52, 0x5d, 0x32, 0xcc, 0x62, 0xa3, 0x68, 0xb5, 0xb6, 0xfd, 0x7a, 0xd8, 0x44, 0xdb, 0x68, - 0xcc, 0x19, 0xfb, 0xe5, 0xc7, 0x7c, 0xee, 0x51, 0x3a, 0xf9, 0x6b, 0x5f, 0x7c, 0x78, 0x82, 0xbb, - 0x86, 0x5f, 0x9f, 0xba, 0x84, 0xf7, 0xc9, 0xf0, 0x73, 0xd4, 0x75, 0x8a, 0x49, 0xd2, 0xce, 0x17, - 0x55, 0xbd, 0x21, 0xae, 0x21, 0x2b, 0xbc, 0x85, 0x4a, 0x30, 0xe0, 0xb8, 0xaa, 0xdb, 0x72, 0xf8, - 0x47, 0xbf, 0xe4, 0x6e, 0xae, 0x56, 0x36, 0x8d, 0xda, 0x06, 0xc5, 0x54, 0x38, 0x05, 0xba, 0x00, - 0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7d, 0x2a, 0xd2, 0xff, 0xf8, 0x61, 0xee, 0x40, 0xd7, 0xb6, 0xd9, - 0x21, 0x41, 0x7e, 0x43, 0x3a, 0xca, 0x4f, 0x66, 0x9f, 0x77, 0xa3, 0x67, 0x17, 0xd8, 0x47, 0x1e, - 0xdf, 0x2b, 0xc1, 0x51, 0x8a, 0xe5, 0xcf, 0x37, 0x8a, 0x29, 0xee, 0xec, 0x75, 0xf5, 0x98, 0x65, - 0x35, 0x50, 0x82, 0x61, 0x9f, 0x65, 0xbc, 0x87, 0xdf, 0x67, 0x39, 0x19, 0xe8, 0x3c, 0xca, 0x56, - 0x56, 0xc6, 0x1b, 0x6d, 0x94, 0x4e, 0x64, 0x5f, 0x9f, 0x3a, 0xfc, 0xbe, 0xfe, 0x59, 0x18, 0x0a, - 0x44, 0xfa, 0x42, 0x3a, 0xe6, 0x9a, 0x69, 0xb4, 0x88, 0x16, 0x24, 0x46, 0xef, 0x93, 0xe0, 0x68, - 0xc7, 0x45, 0x90, 0xfe, 0xaf, 0xda, 0x03, 0x16, 0xe9, 0x22, 0xc6, 0xe9, 0xc8, 0x57, 0x56, 0x26, - 0x5a, 0x9d, 0xb2, 0x89, 0x75, 0x18, 0x0e, 0x2d, 0x60, 0x05, 0xf1, 0x1f, 0xa7, 0xfb, 0xbf, 0x61, - 0x11, 0x66, 0x80, 0x8a, 0x90, 0xc1, 0xd7, 0x2c, 0xd3, 0x76, 0x71, 0x8d, 0x1e, 0x79, 0xc8, 0x28, - 0x5e, 0x5b, 0x5e, 0x05, 0xd4, 0x3e, 0xb8, 0xd1, 0xef, 0x90, 0x66, 0xfd, 0xef, 0x90, 0x4e, 0x40, - 0x3a, 0xf8, 0xa5, 0x4e, 0xd6, 0xf0, 0xeb, 0x14, 0xb7, 0x7a, 0xce, 0xff, 0xdf, 0x00, 0x00, 0x00, - 0xff, 0xff, 0x01, 0xf6, 0xec, 0xd9, 0x42, 0x94, 0x00, 0x00, + 0x71, 0xd8, 0xcd, 0x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x2b, 0x63, 0xac, 0x7a, 0x53, 0xd4, 0x12, 0x0a, 0x6a, 0x40, 0x76, 0x80, 0x62, + 0x30, 0x44, 0xc1, 0xaa, 0x3d, 0x0a, 0xf9, 0xc3, 0x19, 0x18, 0x0e, 0x24, 0xe0, 0xe8, 0x2e, 0xc8, + 0xbe, 0xa8, 0x5e, 0x51, 0x2b, 0x62, 0x51, 0xc5, 0x34, 0x31, 0x4c, 0x60, 0x1b, 0x7c, 0x61, 0xf5, + 0x08, 0x4c, 0x52, 0x14, 0xb3, 0xe9, 0x62, 0xbb, 0xa2, 0xd5, 0x55, 0xc7, 0xa1, 0x4a, 0x4b, 0x53, + 0x54, 0x44, 0xea, 0xd6, 0x49, 0xd5, 0x82, 0xa8, 0x41, 0x67, 0x61, 0x82, 0x52, 0x34, 0x9a, 0x75, + 0x57, 0xb7, 0xea, 0xb8, 0x42, 0x96, 0x79, 0x0e, 0x0d, 0x39, 0x9e, 0x64, 0xe3, 0x04, 0x63, 0x95, + 0x23, 0x10, 0x89, 0x1c, 0xb4, 0x08, 0x77, 0x52, 0xb2, 0x1a, 0x36, 0xb0, 0xad, 0xba, 0xb8, 0x82, + 0x5f, 0x6a, 0xaa, 0x75, 0xa7, 0xa2, 0x1a, 0xd5, 0xca, 0x9e, 0xea, 0xec, 0xe5, 0x27, 0x09, 0x83, + 0x52, 0x22, 0x2f, 0x29, 0x27, 0x08, 0xe2, 0x12, 0xc7, 0x2b, 0x53, 0xb4, 0x79, 0xa3, 0x7a, 0x51, + 0x75, 0xf6, 0x50, 0x11, 0x8e, 0x51, 0x2e, 0x8e, 0x6b, 0xeb, 0x46, 0xad, 0xa2, 0xed, 0x61, 0x6d, + 0xbf, 0xd2, 0x74, 0x77, 0x9f, 0xcc, 0xdf, 0x11, 0x6c, 0x9f, 0x4a, 0xb8, 0x49, 0x71, 0x16, 0x08, + 0xca, 0xb6, 0xbb, 0xfb, 0x24, 0xda, 0x84, 0x2c, 0x19, 0x8c, 0x86, 0xfe,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 0x3c, 0xf9, 0x5f, 0xe3, 0xe4, 0x41, 0x2a, 0x22, 0x3a, 0xcf, 0x4e, + 0xe2, 0x19, 0x7c, 0x50, 0x88, 0xce, 0x29, 0x88, 0xda, 0x44, 0x62, 0x12, 0x4f, 0xfd, 0x21, 0xa1, + 0x75, 0x41, 0x52, 0x7c, 0x06, 0x32, 0x5e, 0xb0, 0x89, 0xa7, 0xff, 0x30, 0xa7, 0xf7, 0x69, 0x88, + 0x06, 0x02, 0xc1, 0x2e, 0x9e, 0xc5, 0x5f, 0x17, 0x1a, 0x08, 0x50, 0x91, 0x69, 0x14, 0x4d, 0x60, + 0xe2, 0x39, 0x7d, 0x44, 0x4c, 0xa3, 0x48, 0xfe, 0x42, 0x46, 0x93, 0xfa, 0xfc, 0x78, 0x16, 0x3f, + 0x2b, 0x46, 0x93, 0xe2, 0x13, 0x31, 0xa2, 0x19, 0x41, 0x3c, 0x8f, 0xbf, 0x21, 0xc4, 0x88, 0x24, + 0x04, 0xc5, 0x0d, 0x40, 0xad, 0xd9, 0x40, 0x3c, 0xbf, 0x8f, 0x72, 0x7e, 0xe3, 0x2d, 0xc9, 0x40, + 0xf1, 0x79, 0x38, 0xd6, 0x3e, 0x13, 0x88, 0xe7, 0xfa, 0xb1, 0xef, 0x45, 0xd6, 0x6e, 0xc1, 0x44, + 0xa0, 0xb8, 0xe5, 0x87, 0x94, 0x60, 0x16, 0x10, 0xcf, 0xf6, 0xb5, 0xef, 0x85, 0x1d, 0x77, 0x30, + 0x09, 0x28, 0xce, 0x03, 0xf8, 0x01, 0x38, 0x9e, 0xd7, 0xc7, 0x39, 0xaf, 0x00, 0x11, 0x99, 0x1a, + 0x3c, 0xfe, 0xc6, 0xd3, 0x5f, 0x17, 0x53, 0x83, 0x53, 0x90, 0xa9, 0x21, 0x42, 0x6f, 0x3c, 0xf5, + 0x27, 0xc4, 0xd4, 0x10, 0x24, 0xc4, 0xb2, 0x03, 0xd1, 0x2d, 0x9e, 0xc3, 0xa7, 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ab, 0xfb, 0x7b, 0xb4, 0x17, 0xdc, 0xd6, 0xa7, 0x5b, 0x67, 0x5e, 0xa8, + 0xb3, 0xbc, 0x95, 0x11, 0x2b, 0x08, 0x94, 0xff, 0x30, 0x05, 0x83, 0x5c, 0x19, 0x6f, 0x86, 0x21, + 0xae, 0x56, 0x6e, 0x9d, 0x77, 0xce, 0xb6, 0x06, 0xa6, 0x59, 0x2f, 0x80, 0x70, 0x7e, 0x82, 0x06, + 0xdd, 0x07, 0x69, 0x6d, 0x4f, 0xd5, 0x8d, 0x8a, 0x5e, 0x15, 0x69, 0xde, 0xeb, 0x37, 0xa6, 0x87, + 0x16, 0x08, 0x6c, 0x79, 0x51, 0x19, 0xa2, 0x95, 0xcb, 0x55, 0x92, 0x09, 0xec, 0x61, 0xbd, 0xb6, + 0xe7, 0xf2, 0x19, 0xc6, 0x4b, 0xe8, 0x49, 0x48, 0x11, 0x83, 0xe0, 0x0f, 0xbb, 0x0a, 0x2d, 0xc9, + 0xb6, 0xb7, 0xe2, 0x29, 0xa5, 0x49, 0xc3, 0x1f, 0xfa, 0xfd, 0x69, 0x49, 0xa1, 0x14, 0x68, 0x01, + 0x46, 0xea, 0xaa, 0xe3, 0x56, 0x68, 0x04, 0x23, 0xcd, 0x0f, 0x50, 0x16, 0x27, 0x5a, 0x15, 0xc2, + 0x15, 0xcb, 0x45, 0x1f, 0x26, 0x54, 0x0c, 0x54, 0x45, 0xa7, 0x20, 0x47, 0x99, 0x68, 0x66, 0xa3, + 0xa1, 0xbb, 0x2c, 0xb7, 0x1a, 0xa4, 0x7a, 0x1f, 0x25, 0xf0, 0x05, 0x0a, 0xa6, 0x19, 0xd6, 0x1d, + 0x90, 0xa1, 0x4f, 0x49, 0x28, 0x0a, 0xbb, 0x36, 0x99, 0x26, 0x00, 0x5a, 0x79, 0x3f, 0x8c, 0xf9, + 0xfe, 0x91, 0xa1, 0xa4, 0x19, 0x17, 0x1f, 0x4c, 0x11, 0x1f, 0x81, 0x49, 0x03, 0x5f, 0xa3, 0x17, + 0x39, 0x43, 0xd8, 0x19, 0x8a, 0x8d, 0x48, 0xdd, 0xe5, 0x30, 0xc5, 0xbd, 0x30, 0xaa, 0x09, 0xe5, + 0x33, 0x5c, 0xa0, 0xb8, 0x23, 0x1e, 0x94, 0xa2, 0x9d, 0x80, 0xb4, 0x6a, 0x59, 0x0c, 0x61, 0x98, + 0xfb, 0x47, 0xcb, 0xa2, 0x55, 0xa7, 0x61, 0x9c, 0xf6, 0xd1, 0xc6, 0x4e, 0xb3, 0xee, 0x72, 0x26, + 0x59, 0x8a, 0x33, 0x46, 0x2a, 0x14, 0x06, 0xa7, 0xb8, 0x77, 0xc3, 0x08, 0xbe, 0xa2, 0x57, 0xb1, + 0xa1, 0x61, 0x86, 0x37, 0x42, 0xf1, 0xb2, 0x02, 0x48, 0x91, 0x1e, 0x00, 0xcf, 0xef, 0x55, 0x84, + 0x4f, 0x1e, 0x65, 0xfc, 0x04, 0x7c, 0x9e, 0x81, 0xe5, 0x3c, 0xa4, 0x16, 0x55, 0x57, 0x25, 0x09, + 0x86, 0x7b, 0x8d, 0x05, 0x9a, 0xac, 0x42, 0x7e, 0xca, 0x6f, 0x24, 0x20, 0x75, 0xd9, 0x74, 0x31, + 0x7a, 0x2c, 0x90, 0x00, 0x8e, 0xb6, 0xb3, 0xe7, 0x4d, 0xbd, 0x66, 0xe0, 0xea, 0xaa, 0x53, 0x0b, + 0xbc, 0xfb, 0xf6, 0xcd, 0x29, 0x11, 0x32, 0xa7, 0x49, 0x18, 0xb0, 0xcd, 0xa6, 0x51, 0x15, 0x37, + 0x0e, 0x69, 0x01, 0x95, 0x21, 0xed, 0x59, 0x49, 0x2a, 0xce, 0x4a, 0xc6, 0x88, 0x95, 0x10, 0x1b, + 0xe6, 0x00, 0x65, 0x68, 0x87, 0x1b, 0x4b, 0x09, 0x32, 0x9e, 0xf3, 0xe2, 0xd6, 0xd6, 0x9b, 0xc1, + 0xfa, 0x64, 0x24, 0x98, 0x78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x53, 0xe1, 0x78, 0x84, 0x82, + 0xb9, 0xfe, 0x76, 0xab, 0xe0, 0xa0, 0x59, 0x2a, 0x1c, 0x4f, 0xfe, 0x39, 0x09, 0x60, 0x85, 0x68, + 0x96, 0xf6, 0x97, 0x44, 0x21, 0x87, 0x8a, 0x50, 0x09, 0xb5, 0x3c, 0xd5, 0x69, 0xd0, 0x78, 0xfb, + 0x59, 0x27, 0x28, 0xf7, 0x02, 0x8c, 0xf8, 0xc6, 0xe8, 0x60, 0x21, 0xcc, 0x54, 0x97, 0xac, 0x7a, + 0x13, 0xbb, 0x4a, 0xf6, 0x4a, 0xa0, 0x24, 0xff, 0x33, 0x09, 0x32, 0x54, 0xa6, 0x55, 0xec, 0xaa, + 0xa1, 0x31, 0x94, 0x0e, 0x3f, 0x86, 0x77, 0x02, 0x30, 0x36, 0x8e, 0xfe, 0x32, 0xe6, 0x96, 0x95, + 0xa1, 0x90, 0x4d, 0xfd, 0x65, 0x8c, 0xce, 0x79, 0x0a, 0x4f, 0x76, 0x57, 0xb8, 0xc8, 0xba, 0xb9, + 0xda, 0x8f, 0xc3, 0x10, 0xfd, 0x94, 0xce, 0x35, 0x87, 0x27, 0xd2, 0x83, 0x46, 0xb3, 0xb1, 0x75, + 0xcd, 0x91, 0x5f, 0x84, 0xa1, 0xad, 0x6b, 0x6c, 0x6f, 0xe4, 0x0e, 0xc8, 0xd8, 0xa6, 0xc9, 0x63, + 0x32, 0xcb, 0x85, 0xd2, 0x04, 0x40, 0x43, 0x90, 0xd8, 0x0f, 0x48, 0xf8, 0xfb, 0x01, 0xfe, 0x86, + 0x46, 0xb2, 0xa7, 0x0d, 0x8d, 0xd3, 0xff, 0x4e, 0x82, 0xe1, 0x80, 0x7f, 0x40, 0x8f, 0xc2, 0xd1, + 0xd2, 0xca, 0xfa, 0xc2, 0xa5, 0xca, 0xf2, 0x62, 0xe5, 0xc2, 0xca, 0xfc, 0x92, 0xff, 0xd6, 0xa4, + 0x70, 0xec, 0xd5, 0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, 0x1d, 0xc1, 0xea, 0x31, 0xcf, 0x93, 0x79, 0xf8, + 0x10, 0x8d, 0x84, 0x19, 0xb0, 0xf8, 0x31, 0xea, 0x43, 0x69, 0x00, 0x79, 0x09, 0xc6, 0x74, 0x43, + 0x77, 0x75, 0xb5, 0x5e, 0xd9, 0x51, 0xeb, 0xaa, 0xa1, 0x1d, 0x26, 0x6b, 0x66, 0x2e, 0x9f, 0x37, + 0x1b, 0x61, 0x27, 0x2b, 0xa3, 0x1c, 0x52, 0x62, 0x00, 0x74, 0x11, 0x86, 0x44, 0x53, 0xa9, 0x43, + 0x65, 0x1b, 0x82, 0x3c, 0x90, 0xe0, 0xfd, 0x4c, 0x12, 0xc6, 0x15, 0x5c, 0xfd, 0xff, 0x43, 0xd1, + 0xdf, 0x50, 0xac, 0x02, 0xb0, 0xe9, 0x4e, 0x1c, 0xec, 0x21, 0x46, 0x83, 0x38, 0x8c, 0x0c, 0xe3, + 0xb0, 0xe8, 0xb8, 0x81, 0xf1, 0xb8, 0x91, 0x80, 0x6c, 0x70, 0x3c, 0xfe, 0x82, 0x46, 0x25, 0xb4, + 0xec, 0x7b, 0xa2, 0x14, 0xff, 0x44, 0x68, 0x07, 0x4f, 0xd4, 0x62, 0xbd, 0xdd, 0x5d, 0xd0, 0xff, + 0x48, 0xc0, 0xe0, 0x86, 0x6a, 0xab, 0x0d, 0x07, 0x69, 0x2d, 0x99, 0xa6, 0xd8, 0x7e, 0x6c, 0xf9, + 0x10, 0x34, 0xdf, 0xed, 0x88, 0x49, 0x34, 0x3f, 0xda, 0x26, 0xd1, 0xfc, 0x09, 0x18, 0x25, 0xcb, + 0xe1, 0xc0, 0x15, 0x06, 0xa2, 0xed, 0x91, 0xd2, 0x09, 0x9f, 0x4b, 0xb8, 0x9e, 0xad, 0x96, 0x2f, + 0x07, 0xef, 0x30, 0x0c, 0x13, 0x0c, 0xdf, 0x31, 0x13, 0xf2, 0x63, 0xfe, 0xb2, 0x34, 0x50, 0x29, + 0x2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0xae, 0x2b, 0x5e, 0x09, 0x01, 0x4f, 0x75, 0x55, + 0x4b, 0x97, 0x0f, 0x20, 0x75, 0xd1, 0x75, 0x2d, 0x74, 0x1a, 0x06, 0xec, 0x66, 0x1d, 0x8b, 0x1d, + 0x1f, 0x6f, 0x4f, 0x5e, 0xb5, 0xf4, 0x59, 0x82, 0xa0, 0x34, 0xeb, 0x58, 0x61, 0x28, 0xa8, 0x0c, + 0xd3, 0xbb, 0xcd, 0x7a, 0xfd, 0xa0, 0x52, 0xc5, 0xf4, 0x7f, 0xf7, 0x78, 0x5f, 0xbf, 0xc7, 0xd7, + 0x2c, 0x55, 0x7c, 0x43, 0x8f, 0xe8, 0xe6, 0x24, 0x45, 0x5b, 0xa4, 0x58, 0xe2, 0xcb, 0xf7, 0x65, + 0x81, 0x23, 0xff, 0x5e, 0x02, 0xd2, 0x82, 0x35, 0xbd, 0x21, 0x8e, 0xeb, 0x58, 0x73, 0x4d, 0x71, + 0x62, 0xe2, 0x95, 0x11, 0x82, 0x64, 0x8d, 0x0f, 0x51, 0xe6, 0xe2, 0x11, 0x85, 0x14, 0x08, 0xcc, + 0xbb, 0xb7, 0x4f, 0x60, 0x56, 0x93, 0x8c, 0x5a, 0xca, 0x32, 0xc5, 0xd2, 0xec, 0xe2, 0x11, 0x85, + 0x96, 0x50, 0x1e, 0x06, 0xc9, 0xcc, 0x70, 0xd9, 0x87, 0x09, 0x09, 0x9c, 0x97, 0xd1, 0x31, 0x18, + 0xb0, 0x54, 0x57, 0x63, 0x57, 0xea, 0x48, 0x05, 0x2b, 0xa2, 0x27, 0x60, 0x90, 0x3d, 0x08, 0x8d, + 0xfe, 0x63, 0x0c, 0xa2, 0x0c, 0xf6, 0xe5, 0x2d, 0x22, 0xf7, 0x86, 0xea, 0xba, 0xd8, 0x36, 0x08, + 0x43, 0x86, 0x8e, 0x10, 0xa4, 0x76, 0xcc, 0xea, 0x01, 0xff, 0x67, 0x1d, 0xf4, 0x37, 0xff, 0xef, + 0x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a, 0x92, 0xab, 0x4e, 0x0d, + 0xbd, 0x04, 0x63, 0xd1, 0xa4, 0xa1, 0x63, 0x2e, 0xd8, 0x1a, 0x11, 0x3a, 0xaf, 0xd7, 0x3a, 0x47, + 0x0f, 0xb4, 0x0f, 0x23, 0xe1, 0xc8, 0x71, 0xaa, 0x0b, 0x93, 0x10, 0x66, 0xe1, 0x91, 0x5e, 0x31, + 0xbd, 0xc6, 0xde, 0x0e, 0x69, 0xcf, 0xe9, 0xdd, 0xdd, 0x85, 0x5a, 0x20, 0x75, 0xce, 0x6e, 0xdb, + 0xb8, 0x15, 0xa2, 0xbd, 0xa8, 0x4b, 0xe9, 0xa6, 0xbd, 0x08, 0x6e, 0x57, 0xed, 0x75, 0x9a, 0x5a, + 0x3b, 0x00, 0x81, 0x79, 0x70, 0x6f, 0x17, 0x0e, 0x3e, 0x5a, 0xe1, 0xe1, 0x9e, 0xd0, 0xbc, 0x43, + 0xa7, 0x5b, 0x9c, 0x8c, 0xff, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd5, 0xca, 0x34, 0x9e, 0x6a, + 0x94, 0x00, 0x00, } r := bytes.NewReader(gzipped) gzipr, err := compress_gzip.NewReader(r) From c8afb2cbe784d73af8ea582e03a843ce3864d1e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?colin=20axn=C3=A9r?= <25233464+colin-axner@users.noreply.github.com> Date: Thu, 12 Nov 2020 11:08:04 +0100 Subject: [PATCH 085/136] Remove consensus params from IBC tm client (#7891) * remove consensus params * fix build * fix build Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- .../tendermint/v1/tendermint.proto | 12 +- x/ibc/core/02-client/keeper/client_test.go | 38 +-- .../core/02-client/keeper/grpc_query_test.go | 4 +- x/ibc/core/02-client/keeper/keeper.go | 7 - x/ibc/core/02-client/keeper/keeper_test.go | 44 +-- x/ibc/core/02-client/types/codec_test.go | 2 +- x/ibc/core/02-client/types/genesis_test.go | 18 +- x/ibc/core/02-client/types/msgs_test.go | 10 +- .../03-connection/keeper/handshake_test.go | 58 ---- x/ibc/core/03-connection/types/msgs_test.go | 8 +- x/ibc/core/genesis_test.go | 6 +- x/ibc/core/keeper/msg_server_test.go | 4 +- .../07-tendermint/client/cli/tx.go | 26 +- .../07-tendermint/types/client_state.go | 21 +- .../07-tendermint/types/client_state_test.go | 30 +- .../07-tendermint/types/errors.go | 1 - .../types/misbehaviour_handle.go | 29 -- .../types/misbehaviour_handle_test.go | 70 ++--- .../07-tendermint/types/tendermint.pb.go | 276 +++++++----------- .../07-tendermint/types/update_test.go | 34 +-- .../07-tendermint/types/upgrade.go | 2 +- .../07-tendermint/types/upgrade_test.go | 37 ++- x/ibc/testing/chain.go | 18 +- 23 files changed, 250 insertions(+), 505 deletions(-) diff --git a/proto/ibc/lightclients/tendermint/v1/tendermint.proto b/proto/ibc/lightclients/tendermint/v1/tendermint.proto index a6076b6cf6..d92b1d6704 100644 --- a/proto/ibc/lightclients/tendermint/v1/tendermint.proto +++ b/proto/ibc/lightclients/tendermint/v1/tendermint.proto @@ -5,7 +5,6 @@ option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/light-clients/07-tenderm import "tendermint/types/validator.proto"; import "tendermint/types/types.proto"; -import "tendermint/abci/types.proto"; import "confio/proofs.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; @@ -40,21 +39,18 @@ message ClientState { ibc.core.client.v1.Height latest_height = 7 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"latest_height\""]; - // Consensus params of the chain - .tendermint.abci.ConsensusParams consensus_params = 8 [(gogoproto.moretags) = "yaml:\"consensus_params\""]; - // Proof specifications used in verifying counterparty state - repeated ics23.ProofSpec proof_specs = 9 [(gogoproto.moretags) = "yaml:\"proof_specs\""]; + repeated ics23.ProofSpec proof_specs = 8 [(gogoproto.moretags) = "yaml:\"proof_specs\""]; // Path at which next upgraded client will be committed - string upgrade_path = 10 [(gogoproto.moretags) = "yaml:\"upgrade_path\""]; + string upgrade_path = 9 [(gogoproto.moretags) = "yaml:\"upgrade_path\""]; // This flag, when set to true, will allow governance to recover a client // which has expired - bool allow_update_after_expiry = 11 [(gogoproto.moretags) = "yaml:\"allow_update_after_expiry\""]; + bool allow_update_after_expiry = 10 [(gogoproto.moretags) = "yaml:\"allow_update_after_expiry\""]; // This flag, when set to true, will allow governance to unfreeze a client // whose chain has experienced a misbehaviour event - bool allow_update_after_misbehaviour = 12 [(gogoproto.moretags) = "yaml:\"allow_update_after_misbehaviour\""]; + bool allow_update_after_misbehaviour = 11 [(gogoproto.moretags) = "yaml:\"allow_update_after_misbehaviour\""]; } // ConsensusState defines the consensus state from Tendermint. diff --git a/x/ibc/core/02-client/keeper/client_test.go b/x/ibc/core/02-client/keeper/client_test.go index 0c700f907c..ae2836af54 100644 --- a/x/ibc/core/02-client/keeper/client_test.go +++ b/x/ibc/core/02-client/keeper/client_test.go @@ -33,11 +33,11 @@ func (suite *KeeperTestSuite) TestCreateClient() { i := i if tc.expPanic { suite.Require().Panics(func() { - clientState := ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) + clientState := ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) suite.keeper.CreateClient(suite.ctx, tc.clientID, clientState, suite.consensusState) }, "Msg %d didn't panic: %s", i, tc.msg) } else { - clientState := ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) + clientState := ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) if tc.expPass { suite.Require().NotNil(clientState, "valid test case %d failed: %s", i, tc.msg) } @@ -80,7 +80,7 @@ func (suite *KeeperTestSuite) TestUpdateClientTendermint() { expPass bool }{ {"valid update", func() error { - clientState = ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) + clientState = ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) err := suite.keeper.CreateClient(suite.ctx, testClientID, clientState, suite.consensusState) // store intermediate consensus state to check that trustedHeight does not need to be highest consensus state before header height @@ -98,7 +98,7 @@ func (suite *KeeperTestSuite) TestUpdateClientTendermint() { return err }, true}, {"valid past update", func() error { - clientState = ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) + clientState = ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) err := suite.keeper.CreateClient(suite.ctx, testClientID, clientState, suite.consensusState) suite.Require().NoError(err) @@ -131,7 +131,7 @@ func (suite *KeeperTestSuite) TestUpdateClientTendermint() { return nil }, false}, {"consensus state not found", func() error { - clientState = ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) + clientState = ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) suite.keeper.SetClientState(suite.ctx, testClientID, clientState) updateHeader = createFutureUpdateFn(suite) @@ -145,7 +145,7 @@ func (suite *KeeperTestSuite) TestUpdateClientTendermint() { return nil }, false}, {"valid past update before client was frozen", func() error { - clientState = ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) + clientState = ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) clientState.FrozenHeight = types.NewHeight(0, testClientHeight.VersionHeight-1) err := suite.keeper.CreateClient(suite.ctx, testClientID, clientState, suite.consensusState) suite.Require().NoError(err) @@ -165,7 +165,7 @@ func (suite *KeeperTestSuite) TestUpdateClientTendermint() { return nil }, true}, {"invalid header", func() error { - clientState = ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) + clientState = ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) err := suite.keeper.CreateClient(suite.ctx, testClientID, clientState, suite.consensusState) suite.Require().NoError(err) updateHeader = createPastUpdateFn(suite) @@ -250,7 +250,7 @@ func (suite *KeeperTestSuite) TestUpgradeClient() { name: "successful upgrade", setup: func() { - upgradedClient = ibctmtypes.NewClientState("newChainId", ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod+trustingPeriod, maxClockDrift, newClientHeight, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) + upgradedClient = ibctmtypes.NewClientState("newChainId", ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod+trustingPeriod, maxClockDrift, newClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) // upgrade Height is at next block upgradeHeight = clienttypes.NewHeight(0, uint64(suite.chainB.GetContext().BlockHeight()+1)) @@ -275,7 +275,7 @@ func (suite *KeeperTestSuite) TestUpgradeClient() { name: "client state not found", setup: func() { - upgradedClient = ibctmtypes.NewClientState("newChainId", ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod+trustingPeriod, maxClockDrift, newClientHeight, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) + upgradedClient = ibctmtypes.NewClientState("newChainId", ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod+trustingPeriod, maxClockDrift, newClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) // upgrade Height is at next block upgradeHeight = clienttypes.NewHeight(0, uint64(suite.chainB.GetContext().BlockHeight()+1)) @@ -302,7 +302,7 @@ func (suite *KeeperTestSuite) TestUpgradeClient() { name: "client state frozen", setup: func() { - upgradedClient = ibctmtypes.NewClientState("newChainId", ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod+trustingPeriod, maxClockDrift, newClientHeight, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) + upgradedClient = ibctmtypes.NewClientState("newChainId", ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod+trustingPeriod, maxClockDrift, newClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) // upgrade Height is at next block upgradeHeight = clienttypes.NewHeight(0, uint64(suite.chainB.GetContext().BlockHeight()+1)) @@ -333,7 +333,7 @@ func (suite *KeeperTestSuite) TestUpgradeClient() { name: "tendermint client VerifyUpgrade fails", setup: func() { - upgradedClient = ibctmtypes.NewClientState("newChainId", ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod+trustingPeriod, maxClockDrift, newClientHeight, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) + upgradedClient = ibctmtypes.NewClientState("newChainId", ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod+trustingPeriod, maxClockDrift, newClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) // upgrade Height is at next block upgradeHeight = clienttypes.NewHeight(0, uint64(suite.chainB.GetContext().BlockHeight()+1)) @@ -342,7 +342,7 @@ func (suite *KeeperTestSuite) TestUpgradeClient() { suite.chainB.App.UpgradeKeeper.SetUpgradedClient(suite.chainB.GetContext(), int64(upgradeHeight.GetVersionHeight()), upgradedClient) // change upgradedClient client-specified parameters - upgradedClient = ibctmtypes.NewClientState("wrongchainID", ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, newClientHeight, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, true, true) + upgradedClient = ibctmtypes.NewClientState("wrongchainID", ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, newClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, true, true) suite.coordinator.CommitBlock(suite.chainB) err := suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) @@ -418,7 +418,7 @@ func (suite *KeeperTestSuite) TestCheckMisbehaviourAndUpdateState() { }, func() error { suite.consensusState.NextValidatorsHash = bothValsHash - clientState := ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) + clientState := ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) err := suite.keeper.CreateClient(suite.ctx, testClientID, clientState, suite.consensusState) return err @@ -435,7 +435,7 @@ func (suite *KeeperTestSuite) TestCheckMisbehaviourAndUpdateState() { }, func() error { suite.consensusState.NextValidatorsHash = valsHash - clientState := ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) + clientState := ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) err := suite.keeper.CreateClient(suite.ctx, testClientID, clientState, suite.consensusState) // store intermediate consensus state to check that trustedHeight does not need to be highest consensus state before header height @@ -462,7 +462,7 @@ func (suite *KeeperTestSuite) TestCheckMisbehaviourAndUpdateState() { }, func() error { suite.consensusState.NextValidatorsHash = valsHash - clientState := ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) + clientState := ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) err := suite.keeper.CreateClient(suite.ctx, testClientID, clientState, suite.consensusState) // store trusted consensus state for Header2 @@ -489,7 +489,7 @@ func (suite *KeeperTestSuite) TestCheckMisbehaviourAndUpdateState() { }, func() error { suite.consensusState.NextValidatorsHash = valsHash - clientState := ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) + clientState := ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) err := suite.keeper.CreateClient(suite.ctx, testClientID, clientState, suite.consensusState) // intermediate consensus state at height + 3 is not created return err @@ -506,7 +506,7 @@ func (suite *KeeperTestSuite) TestCheckMisbehaviourAndUpdateState() { }, func() error { suite.consensusState.NextValidatorsHash = valsHash - clientState := ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) + clientState := ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) err := suite.keeper.CreateClient(suite.ctx, testClientID, clientState, suite.consensusState) // intermediate consensus state at height + 3 is not created return err @@ -529,7 +529,7 @@ func (suite *KeeperTestSuite) TestCheckMisbehaviourAndUpdateState() { }, func() error { suite.consensusState.NextValidatorsHash = bothValsHash - clientState := ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) + clientState := ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) err := suite.keeper.CreateClient(suite.ctx, testClientID, clientState, suite.consensusState) clientState.FrozenHeight = types.NewHeight(0, 1) @@ -548,7 +548,7 @@ func (suite *KeeperTestSuite) TestCheckMisbehaviourAndUpdateState() { ClientId: testClientID, }, func() error { - clientState := ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) + clientState := ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) if err != nil { return err } diff --git a/x/ibc/core/02-client/keeper/grpc_query_test.go b/x/ibc/core/02-client/keeper/grpc_query_test.go index d111f540a9..a252005fc9 100644 --- a/x/ibc/core/02-client/keeper/grpc_query_test.go +++ b/x/ibc/core/02-client/keeper/grpc_query_test.go @@ -43,7 +43,7 @@ func (suite *KeeperTestSuite) TestQueryClientState() { { "success", func() { - clientState := ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, types.ZeroHeight(), ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) + clientState := ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, types.ZeroHeight(), commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) suite.keeper.SetClientState(suite.ctx, testClientID, clientState) var err error @@ -204,7 +204,7 @@ func (suite *KeeperTestSuite) TestQueryConsensusState() { { "success latest height", func() { - clientState := ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) + clientState := ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) cs := ibctmtypes.NewConsensusState( suite.consensusState.Timestamp, commitmenttypes.NewMerkleRoot([]byte("hash1")), nil, ) diff --git a/x/ibc/core/02-client/keeper/keeper.go b/x/ibc/core/02-client/keeper/keeper.go index 96632fc171..d3465e7669 100644 --- a/x/ibc/core/02-client/keeper/keeper.go +++ b/x/ibc/core/02-client/keeper/keeper.go @@ -225,13 +225,6 @@ func (k Keeper) ValidateSelfClient(ctx sdk.Context, clientState exported.ClientS tmClient.LatestHeight, ctx.BlockHeight()) } - // consensus params must match consensus params on executing chain - expectedConsensusParams := ctx.ConsensusParams() - if !reflect.DeepEqual(expectedConsensusParams, tmClient.ConsensusParams) { - return sdkerrors.Wrapf(types.ErrInvalidClient, "client has invalid consensus params, expected: %v got: %v", - expectedConsensusParams, tmClient.ConsensusParams) - } - expectedProofSpecs := commitmenttypes.GetSDKSpecs() if !reflect.DeepEqual(expectedProofSpecs, tmClient.ProofSpecs) { return sdkerrors.Wrapf(types.ErrInvalidClient, "client has invalid proof specs. expected: %v got: %v", diff --git a/x/ibc/core/02-client/keeper/keeper_test.go b/x/ibc/core/02-client/keeper/keeper_test.go index 1f2c09ac5f..2ed2b2f032 100644 --- a/x/ibc/core/02-client/keeper/keeper_test.go +++ b/x/ibc/core/02-client/keeper/keeper_test.go @@ -132,7 +132,7 @@ func TestKeeperTestSuite(t *testing.T) { } func (suite *KeeperTestSuite) TestSetClientState() { - clientState := ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, types.ZeroHeight(), ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) + clientState := ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, types.ZeroHeight(), commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) suite.keeper.SetClientState(suite.ctx, testClientID, clientState) retrievedState, found := suite.keeper.GetClientState(suite.ctx, testClientID) @@ -152,8 +152,6 @@ func (suite *KeeperTestSuite) TestSetClientConsensusState() { } func (suite *KeeperTestSuite) TestValidateSelfClient() { - invalidConsensusParams := suite.chainA.GetContext().ConsensusParams() - invalidConsensusParams.Evidence.MaxAgeDuration++ testClientHeight := types.NewHeight(0, uint64(suite.chainA.GetContext().BlockHeight())) testCases := []struct { @@ -163,12 +161,12 @@ func (suite *KeeperTestSuite) TestValidateSelfClient() { }{ { "success", - ibctmtypes.NewClientState(suite.chainA.ChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), + ibctmtypes.NewClientState(suite.chainA.ChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), true, }, { "success with nil UpgradePath", - ibctmtypes.NewClientState(suite.chainA.ChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), "", false, false), + ibctmtypes.NewClientState(suite.chainA.ChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), "", false, false), true, }, { @@ -178,57 +176,47 @@ func (suite *KeeperTestSuite) TestValidateSelfClient() { }, { "frozen client", - &ibctmtypes.ClientState{suite.chainA.ChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, testClientHeight, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false}, + &ibctmtypes.ClientState{suite.chainA.ChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false}, false, }, { "incorrect chainID", - ibctmtypes.NewClientState("gaiatestnet", ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), + ibctmtypes.NewClientState("gaiatestnet", ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), false, }, { "invalid client height", - ibctmtypes.NewClientState(suite.chainA.ChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, types.NewHeight(0, testClientHeight.VersionHeight+10), ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), + ibctmtypes.NewClientState(suite.chainA.ChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, types.NewHeight(0, testClientHeight.VersionHeight+10), commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), false, }, { "invalid client version", - ibctmtypes.NewClientState(suite.chainA.ChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeightVersion1, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), + ibctmtypes.NewClientState(suite.chainA.ChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeightVersion1, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), false, }, { "invalid proof specs", - ibctmtypes.NewClientState(suite.chainA.ChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, ibctesting.DefaultConsensusParams, nil, ibctesting.UpgradePath, false, false), + ibctmtypes.NewClientState(suite.chainA.ChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, nil, ibctesting.UpgradePath, false, false), false, }, { "invalid trust level", - ibctmtypes.NewClientState(suite.chainA.ChainID, ibctmtypes.Fraction{0, 1}, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), + ibctmtypes.NewClientState(suite.chainA.ChainID, ibctmtypes.Fraction{0, 1}, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), false, }, { "invalid unbonding period", - ibctmtypes.NewClientState(suite.chainA.ChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod+10, maxClockDrift, testClientHeight, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), + ibctmtypes.NewClientState(suite.chainA.ChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod+10, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), false, }, { "invalid trusting period", - ibctmtypes.NewClientState(suite.chainA.ChainID, ibctmtypes.DefaultTrustLevel, ubdPeriod+10, ubdPeriod, maxClockDrift, testClientHeight, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), + ibctmtypes.NewClientState(suite.chainA.ChainID, ibctmtypes.DefaultTrustLevel, ubdPeriod+10, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), false, }, { "invalid upgrade path", - ibctmtypes.NewClientState(suite.chainA.ChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), "bad/upgrade/path", false, false), - false, - }, - { - "invalid consensus params", - ibctmtypes.NewClientState(suite.chainA.ChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, invalidConsensusParams, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), - false, - }, - { - "nil consensus params", - ibctmtypes.NewClientState(suite.chainA.ChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, nil, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), + ibctmtypes.NewClientState(suite.chainA.ChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), "bad/upgrade/path", false, false), false, }, } @@ -248,9 +236,9 @@ func (suite KeeperTestSuite) TestGetAllGenesisClients() { testClientID2, testClientID3, testClientID, } expClients := []exported.ClientState{ - ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, types.ZeroHeight(), ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), - ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, types.ZeroHeight(), ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), - ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, types.ZeroHeight(), ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), + ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, types.ZeroHeight(), commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), + ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, types.ZeroHeight(), commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), + ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, types.ZeroHeight(), commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), } expGenClients := make(types.IdentifiedClientStates, len(expClients)) @@ -298,7 +286,7 @@ func (suite KeeperTestSuite) TestGetConsensusState() { func (suite KeeperTestSuite) TestConsensusStateHelpers() { // initial setup - clientState := ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) + clientState := ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) suite.keeper.SetClientState(suite.ctx, testClientID, clientState) suite.keeper.SetClientConsensusState(suite.ctx, testClientID, testClientHeight, suite.consensusState) diff --git a/x/ibc/core/02-client/types/codec_test.go b/x/ibc/core/02-client/types/codec_test.go index 9ea6642629..603fe69347 100644 --- a/x/ibc/core/02-client/types/codec_test.go +++ b/x/ibc/core/02-client/types/codec_test.go @@ -30,7 +30,7 @@ func (suite *TypesTestSuite) TestPackClientState() { }, { "tendermint client", - ibctmtypes.NewClientState(chainID, ibctesting.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), + ibctmtypes.NewClientState(chainID, ibctesting.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), true, }, { diff --git a/x/ibc/core/02-client/types/genesis_test.go b/x/ibc/core/02-client/types/genesis_test.go index 296bceb129..d6caca0e68 100644 --- a/x/ibc/core/02-client/types/genesis_test.go +++ b/x/ibc/core/02-client/types/genesis_test.go @@ -69,7 +69,7 @@ func (suite *TypesTestSuite) TestValidateGenesis() { genState: types.NewGenesisState( []types.IdentifiedClientState{ types.NewIdentifiedClientState( - clientID, ibctmtypes.NewClientState(chainID, ibctesting.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), + clientID, ibctmtypes.NewClientState(chainID, ibctesting.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), ), types.NewIdentifiedClientState( exported.Localhost, localhosttypes.NewClientState("chainID", clientHeight), @@ -98,7 +98,7 @@ func (suite *TypesTestSuite) TestValidateGenesis() { genState: types.NewGenesisState( []types.IdentifiedClientState{ types.NewIdentifiedClientState( - "/~@$*", ibctmtypes.NewClientState(chainID, ibctmtypes.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), + "/~@$*", ibctmtypes.NewClientState(chainID, ibctmtypes.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), ), types.NewIdentifiedClientState( exported.Localhost, localhosttypes.NewClientState("chainID", clientHeight), @@ -127,7 +127,7 @@ func (suite *TypesTestSuite) TestValidateGenesis() { genState: types.NewGenesisState( []types.IdentifiedClientState{ types.NewIdentifiedClientState( - clientID, ibctmtypes.NewClientState(chainID, ibctmtypes.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), + clientID, ibctmtypes.NewClientState(chainID, ibctmtypes.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), ), types.NewIdentifiedClientState(exported.Localhost, localhosttypes.NewClientState("chaindID", types.ZeroHeight())), }, @@ -142,7 +142,7 @@ func (suite *TypesTestSuite) TestValidateGenesis() { genState: types.NewGenesisState( []types.IdentifiedClientState{ types.NewIdentifiedClientState( - clientID, ibctmtypes.NewClientState(chainID, ibctmtypes.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), + clientID, ibctmtypes.NewClientState(chainID, ibctmtypes.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), ), types.NewIdentifiedClientState( exported.Localhost, localhosttypes.NewClientState("chaindID", clientHeight), @@ -171,7 +171,7 @@ func (suite *TypesTestSuite) TestValidateGenesis() { genState: types.NewGenesisState( []types.IdentifiedClientState{ types.NewIdentifiedClientState( - clientID, ibctmtypes.NewClientState(chainID, ibctmtypes.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), + clientID, ibctmtypes.NewClientState(chainID, ibctmtypes.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), ), types.NewIdentifiedClientState( exported.Localhost, localhosttypes.NewClientState("chaindID", clientHeight), @@ -200,7 +200,7 @@ func (suite *TypesTestSuite) TestValidateGenesis() { genState: types.NewGenesisState( []types.IdentifiedClientState{ types.NewIdentifiedClientState( - clientID, ibctmtypes.NewClientState(chainID, ibctmtypes.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), + clientID, ibctmtypes.NewClientState(chainID, ibctmtypes.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), ), types.NewIdentifiedClientState( exported.Localhost, localhosttypes.NewClientState("chaindID", clientHeight), @@ -229,7 +229,7 @@ func (suite *TypesTestSuite) TestValidateGenesis() { genState: types.NewGenesisState( []types.IdentifiedClientState{ types.NewIdentifiedClientState( - clientID, ibctmtypes.NewClientState(chainID, ibctesting.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), + clientID, ibctmtypes.NewClientState(chainID, ibctesting.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), ), types.NewIdentifiedClientState( exported.Localhost, localhosttypes.NewClientState("chainID", clientHeight), @@ -258,7 +258,7 @@ func (suite *TypesTestSuite) TestValidateGenesis() { genState: types.NewGenesisState( []types.IdentifiedClientState{ types.NewIdentifiedClientState( - clientID, ibctmtypes.NewClientState(chainID, ibctesting.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), + clientID, ibctmtypes.NewClientState(chainID, ibctesting.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), ), types.NewIdentifiedClientState( exported.Localhost, localhosttypes.NewClientState("chainID", clientHeight), @@ -287,7 +287,7 @@ func (suite *TypesTestSuite) TestValidateGenesis() { genState: types.NewGenesisState( []types.IdentifiedClientState{ types.NewIdentifiedClientState( - clientID, ibctmtypes.NewClientState(chainID, ibctesting.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), + clientID, ibctmtypes.NewClientState(chainID, ibctesting.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), ), types.NewIdentifiedClientState( exported.Localhost, localhosttypes.NewClientState("chainID", clientHeight), diff --git a/x/ibc/core/02-client/types/msgs_test.go b/x/ibc/core/02-client/types/msgs_test.go index adaf95cde8..fbbbb4aa75 100644 --- a/x/ibc/core/02-client/types/msgs_test.go +++ b/x/ibc/core/02-client/types/msgs_test.go @@ -56,7 +56,7 @@ func (suite *TypesTestSuite) TestMarshalMsgCreateClient() { }, { "tendermint client", func() { - tendermintClient := ibctmtypes.NewClientState(suite.chainA.ChainID, ibctesting.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) + tendermintClient := ibctmtypes.NewClientState(suite.chainA.ChainID, ibctesting.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) msg, err = types.NewMsgCreateClient("tendermint", tendermintClient, suite.chainA.CurrentTMClientHeader().ConsensusState(), suite.chainA.SenderAccount.GetAddress()) suite.Require().NoError(err) }, @@ -108,7 +108,7 @@ func (suite *TypesTestSuite) TestMsgCreateClient_ValidateBasic() { { "valid - tendermint client", func() { - tendermintClient := ibctmtypes.NewClientState(suite.chainA.ChainID, ibctesting.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) + tendermintClient := ibctmtypes.NewClientState(suite.chainA.ChainID, ibctesting.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) msg, err = types.NewMsgCreateClient("tendermint", tendermintClient, suite.chainA.CurrentTMClientHeader().ConsensusState(), suite.chainA.SenderAccount.GetAddress()) suite.Require().NoError(err) }, @@ -132,7 +132,7 @@ func (suite *TypesTestSuite) TestMsgCreateClient_ValidateBasic() { { "failed to unpack consensus state", func() { - tendermintClient := ibctmtypes.NewClientState(suite.chainA.ChainID, ibctesting.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) + tendermintClient := ibctmtypes.NewClientState(suite.chainA.ChainID, ibctesting.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) msg, err = types.NewMsgCreateClient("tendermint", tendermintClient, suite.chainA.CurrentTMClientHeader().ConsensusState(), suite.chainA.SenderAccount.GetAddress()) suite.Require().NoError(err) msg.ConsensusState = nil @@ -348,7 +348,7 @@ func (suite *TypesTestSuite) TestMarshalMsgUpgradeClient() { { "client upgrades to new tendermint client", func() { - tendermintClient := ibctmtypes.NewClientState(suite.chainA.ChainID, ibctesting.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) + tendermintClient := ibctmtypes.NewClientState(suite.chainA.ChainID, ibctesting.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) msg, err = types.NewMsgUpgradeClient("clientid", tendermintClient, newClientHeight, []byte("proofUpgrade"), suite.chainA.SenderAccount.GetAddress()) suite.Require().NoError(err) }, @@ -462,7 +462,7 @@ func (suite *TypesTestSuite) TestMsgUpgradeClient_ValidateBasic() { for _, tc := range cases { tc := tc - clientState := ibctmtypes.NewClientState(suite.chainA.ChainID, ibctesting.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) + clientState := ibctmtypes.NewClientState(suite.chainA.ChainID, ibctesting.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) newClientHeight := types.NewHeight(1, 1) msg, _ := types.NewMsgUpgradeClient("testclientid", clientState, newClientHeight, []byte("proofUpgrade"), suite.chainA.SenderAccount.GetAddress()) diff --git a/x/ibc/core/03-connection/keeper/handshake_test.go b/x/ibc/core/03-connection/keeper/handshake_test.go index 74ccbf7cb9..2ecdae5952 100644 --- a/x/ibc/core/03-connection/keeper/handshake_test.go +++ b/x/ibc/core/03-connection/keeper/handshake_test.go @@ -8,7 +8,6 @@ import ( host "github.com/cosmos/cosmos-sdk/x/ibc/core/24-host" "github.com/cosmos/cosmos-sdk/x/ibc/core/exported" ibctmtypes "github.com/cosmos/cosmos-sdk/x/ibc/light-clients/07-tendermint/types" - ibctesting "github.com/cosmos/cosmos-sdk/x/ibc/testing" ) // TestConnOpenInit - chainA initializes (INIT state) a connection with @@ -772,60 +771,3 @@ func (suite *KeeperTestSuite) TestConnOpenConfirm() { }) } } - -// Ensure consensus params are correctly validated by executing messages. Consensus params are -// set in context by baseapp so test should deliver messages and not call the functions directly. -// Only invalid cases are tested since successful instances are by default tested by the testing -// package. -func (suite *KeeperTestSuite) TestConsensusParamsValidation() { - // invalid client state in ConnOpenTry - clientA, clientB := suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) - connA, connB, err := suite.coordinator.ConnOpenInit(suite.chainA, suite.chainB, clientA, clientB) - suite.Require().NoError(err) - - // set incorrect consensus params on counterparty client on chainA - clientState := suite.chainA.GetClientState(clientA) - tmClient, ok := clientState.(*ibctmtypes.ClientState) - suite.Require().True(ok) - tmClient.ConsensusParams.Evidence.MaxAgeDuration++ - - suite.chainA.App.IBCKeeper.ClientKeeper.SetClientState(suite.chainA.GetContext(), clientA, tmClient) - - // should fail on validate self client - ibctesting.ExpSimPassSend = false - ibctesting.ExpPassSend = false - err = suite.coordinator.ConnOpenTry(suite.chainB, suite.chainA, connB, connA) - suite.Require().Error(err) - - // reset values - ibctesting.ExpSimPassSend = true - ibctesting.ExpPassSend = true - - suite.SetupTest() // reset - - // invalid client state in ConnOpenAck - clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) - connA, connB, err = suite.coordinator.ConnOpenInit(suite.chainA, suite.chainB, clientA, clientB) - suite.Require().NoError(err) - - err = suite.coordinator.ConnOpenTry(suite.chainB, suite.chainA, connB, connA) - suite.Require().NoError(err) - - // set incorrect consensus params on counterparty client on chainB - clientState = suite.chainB.GetClientState(clientB) - tmClient, ok = clientState.(*ibctmtypes.ClientState) - suite.Require().True(ok) - tmClient.ConsensusParams.Evidence.MaxAgeDuration++ - - suite.chainB.App.IBCKeeper.ClientKeeper.SetClientState(suite.chainB.GetContext(), clientB, tmClient) - - // should fail on validate self client - ibctesting.ExpSimPassSend = false - ibctesting.ExpPassSend = false - err = suite.coordinator.ConnOpenAck(suite.chainA, suite.chainB, connA, connB) - suite.Require().Error(err) - - // reset values - ibctesting.ExpSimPassSend = true - ibctesting.ExpPassSend = true -} diff --git a/x/ibc/core/03-connection/types/msgs_test.go b/x/ibc/core/03-connection/types/msgs_test.go index f839637906..798c8b0f71 100644 --- a/x/ibc/core/03-connection/types/msgs_test.go +++ b/x/ibc/core/03-connection/types/msgs_test.go @@ -112,7 +112,7 @@ func (suite *MsgTestSuite) TestNewMsgConnectionOpenTry() { signer, _ := sdk.AccAddressFromBech32("cosmos1ckgw5d7jfj7wwxjzs9fdrdev9vc8dzcw3n2lht") clientState := ibctmtypes.NewClientState( - chainID, ibctmtypes.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false, + chainID, ibctmtypes.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false, ) // Pack consensus state into any to test unpacking error @@ -124,7 +124,7 @@ func (suite *MsgTestSuite) TestNewMsgConnectionOpenTry() { // invalidClientState fails validateBasic invalidClient := ibctmtypes.NewClientState( - chainID, ibctmtypes.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clienttypes.ZeroHeight(), ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false, + chainID, ibctmtypes.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clienttypes.ZeroHeight(), commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false, ) provedID := "" @@ -166,7 +166,7 @@ func (suite *MsgTestSuite) TestNewMsgConnectionOpenTry() { func (suite *MsgTestSuite) TestNewMsgConnectionOpenAck() { signer, _ := sdk.AccAddressFromBech32("cosmos1ckgw5d7jfj7wwxjzs9fdrdev9vc8dzcw3n2lht") clientState := ibctmtypes.NewClientState( - chainID, ibctmtypes.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false, + chainID, ibctmtypes.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false, ) // Pack consensus state into any to test unpacking error @@ -177,7 +177,7 @@ func (suite *MsgTestSuite) TestNewMsgConnectionOpenAck() { // invalidClientState fails validateBasic invalidClient := ibctmtypes.NewClientState( - chainID, ibctmtypes.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clienttypes.ZeroHeight(), ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false, + chainID, ibctmtypes.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clienttypes.ZeroHeight(), commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false, ) connectionID := "ibcconntest" diff --git a/x/ibc/core/genesis_test.go b/x/ibc/core/genesis_test.go index 5290c47897..a14669faaa 100644 --- a/x/ibc/core/genesis_test.go +++ b/x/ibc/core/genesis_test.go @@ -77,7 +77,7 @@ func (suite *IBCTestSuite) TestValidateGenesis() { ClientGenesis: clienttypes.NewGenesisState( []clienttypes.IdentifiedClientState{ clienttypes.NewIdentifiedClientState( - clientID, ibctmtypes.NewClientState(suite.chainA.ChainID, ibctmtypes.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), + clientID, ibctmtypes.NewClientState(suite.chainA.ChainID, ibctmtypes.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), ), clienttypes.NewIdentifiedClientState( exported.Localhost, localhosttypes.NewClientState("chaindID", clientHeight), @@ -144,7 +144,7 @@ func (suite *IBCTestSuite) TestValidateGenesis() { ClientGenesis: clienttypes.NewGenesisState( []clienttypes.IdentifiedClientState{ clienttypes.NewIdentifiedClientState( - clientID, ibctmtypes.NewClientState(suite.chainA.ChainID, ibctmtypes.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), + clientID, ibctmtypes.NewClientState(suite.chainA.ChainID, ibctmtypes.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), ), clienttypes.NewIdentifiedClientState( exported.Localhost, localhosttypes.NewClientState("(chaindID)", clienttypes.ZeroHeight()), @@ -216,7 +216,7 @@ func (suite *IBCTestSuite) TestInitGenesis() { ClientGenesis: clienttypes.NewGenesisState( []clienttypes.IdentifiedClientState{ clienttypes.NewIdentifiedClientState( - clientID, ibctmtypes.NewClientState(suite.chainA.ChainID, ibctmtypes.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), + clientID, ibctmtypes.NewClientState(suite.chainA.ChainID, ibctmtypes.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), ), clienttypes.NewIdentifiedClientState( exported.Localhost, localhosttypes.NewClientState("chaindID", clientHeight), diff --git a/x/ibc/core/keeper/msg_server_test.go b/x/ibc/core/keeper/msg_server_test.go index 497a806caa..69a80fcb72 100644 --- a/x/ibc/core/keeper/msg_server_test.go +++ b/x/ibc/core/keeper/msg_server_test.go @@ -628,7 +628,7 @@ func (suite *KeeperTestSuite) TestUpgradeClient() { name: "successful upgrade", setup: func() { - upgradedClient = ibctmtypes.NewClientState("newChainId", ibctmtypes.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod+ibctesting.TrustingPeriod, ibctesting.MaxClockDrift, newClientHeight, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) + upgradedClient = ibctmtypes.NewClientState("newChainId", ibctmtypes.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod+ibctesting.TrustingPeriod, ibctesting.MaxClockDrift, newClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) // upgrade Height is at next block upgradeHeight = clienttypes.NewHeight(0, uint64(suite.chainB.GetContext().BlockHeight()+1)) @@ -678,7 +678,7 @@ func (suite *KeeperTestSuite) TestUpgradeClient() { name: "VerifyUpgrade fails", setup: func() { - upgradedClient = ibctmtypes.NewClientState("newChainId", ibctmtypes.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod+ibctesting.TrustingPeriod, ibctesting.MaxClockDrift, newClientHeight, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) + upgradedClient = ibctmtypes.NewClientState("newChainId", ibctmtypes.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod+ibctesting.TrustingPeriod, ibctesting.MaxClockDrift, newClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) // upgrade Height is at next block upgradeHeight = clienttypes.NewHeight(0, uint64(suite.chainB.GetContext().BlockHeight()+1)) diff --git a/x/ibc/light-clients/07-tendermint/client/cli/tx.go b/x/ibc/light-clients/07-tendermint/client/cli/tx.go index 4bfe74328d..be2b4c4725 100644 --- a/x/ibc/light-clients/07-tendermint/client/cli/tx.go +++ b/x/ibc/light-clients/07-tendermint/client/cli/tx.go @@ -10,7 +10,6 @@ import ( ics23 "github.com/confio/ics23/go" "github.com/pkg/errors" "github.com/spf13/cobra" - abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/light" "github.com/cosmos/cosmos-sdk/client" @@ -25,7 +24,6 @@ import ( const ( flagTrustLevel = "trust-level" - flagConsensusParams = "consensus-params" flagProofSpecs = "proof-specs" flagUpgradePath = "upgrade-path" flagAllowUpdateAfterExpiry = "allow_update_after_expiry" @@ -40,7 +38,6 @@ func NewCreateClientCmd() *cobra.Command { Short: "create new tendermint client", Long: `Create a new tendermint IBC client. - 'trust-level' flag can be a fraction (eg: '1/3') or 'default' - - 'consensus-params' flag can be a JSON input, a path to a .json file. The params must match the consensus parameters of the chain this light client represents. - 'proof-specs' flag can be JSON input, a path to a .json file or 'default' - 'upgrade-path' flag is a string specifying the upgrade path for this chain where a future upgraded client will be stored. The path represents a keypath for the store with each key separated by a '/'. Any slash within a key must be escaped. e.g. 'upgrade/upgradedClient'`, @@ -71,9 +68,8 @@ func NewCreateClientCmd() *cobra.Command { } var ( - trustLevel types.Fraction - consensusParams *abci.ConsensusParams - specs []*ics23.ProofSpec + trustLevel types.Fraction + specs []*ics23.ProofSpec ) lvl, _ := cmd.Flags().GetString(flagTrustLevel) @@ -102,22 +98,6 @@ func NewCreateClientCmd() *cobra.Command { return err } - cp, _ := cmd.Flags().GetString(flagConsensusParams) - if cp != "" { - if err := legacyAmino.UnmarshalJSON([]byte(cp), &consensusParams); err != nil { - // check for file path if JSON input not provided - contents, err := ioutil.ReadFile(cp) - if err != nil { - return errors.New("neither JSON input nor path to .json file was provided for consensus params flag") - } - // TODO migrate to use JSONMarshaler (implement MarshalJSONArray - // or wrap lists of proto.Message in some other message) - if err := legacyAmino.UnmarshalJSON(contents, &consensusParams); err != nil { - return errors.Wrap(err, "error unmarshalling consensus params file") - } - } - } - spc, _ := cmd.Flags().GetString(flagProofSpecs) if spc == "default" { specs = commitmenttypes.GetSDKSpecs() @@ -150,7 +130,7 @@ func NewCreateClientCmd() *cobra.Command { clientState := types.NewClientState( header.GetHeader().GetChainID(), trustLevel, trustingPeriod, ubdPeriod, maxClockDrift, - height, consensusParams, specs, upgradePath, allowUpdateAfterExpiry, allowUpdateAfterMisbehaviour, + height, specs, upgradePath, allowUpdateAfterExpiry, allowUpdateAfterMisbehaviour, ) consensusState := header.ConsensusState() diff --git a/x/ibc/light-clients/07-tendermint/types/client_state.go b/x/ibc/light-clients/07-tendermint/types/client_state.go index 6807304468..8cfc849541 100644 --- a/x/ibc/light-clients/07-tendermint/types/client_state.go +++ b/x/ibc/light-clients/07-tendermint/types/client_state.go @@ -5,10 +5,8 @@ import ( "time" ics23 "github.com/confio/ics23/go" - abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/light" - "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" @@ -26,7 +24,7 @@ var _ exported.ClientState = (*ClientState)(nil) func NewClientState( chainID string, trustLevel Fraction, trustingPeriod, ubdPeriod, maxClockDrift time.Duration, - latestHeight clienttypes.Height, consensusParams *abci.ConsensusParams, specs []*ics23.ProofSpec, + latestHeight clienttypes.Height, specs []*ics23.ProofSpec, upgradePath string, allowUpdateAfterExpiry, allowUpdateAfterMisbehaviour bool, ) *ClientState { return &ClientState{ @@ -37,7 +35,6 @@ func NewClientState( MaxClockDrift: maxClockDrift, LatestHeight: latestHeight, FrozenHeight: clienttypes.ZeroHeight(), - ConsensusParams: consensusParams, ProofSpecs: specs, UpgradePath: upgradePath, AllowUpdateAfterExpiry: allowUpdateAfterExpiry, @@ -105,21 +102,6 @@ func (cs ClientState) Validate() error { ) } - // validate consensus params - if cs.ConsensusParams == nil || cs.ConsensusParams.Evidence == nil || - cs.ConsensusParams.Block == nil || cs.ConsensusParams.Validator == nil { - return sdkerrors.Wrap(ErrInvalidConsensusParams, "consensus params including block, evidence, and validator params cannot be empty") - } - if err := baseapp.ValidateBlockParams(*cs.ConsensusParams.Block); err != nil { - return sdkerrors.Wrap(err, "invalid block params") - } - if err := baseapp.ValidateEvidenceParams(*cs.ConsensusParams.Evidence); err != nil { - return sdkerrors.Wrap(err, "invalid evidence params") - } - if err := baseapp.ValidateValidatorParams(*cs.ConsensusParams.Validator); err != nil { - return sdkerrors.Wrap(err, "invalid validator params") - } - if cs.ProofSpecs == nil { return sdkerrors.Wrap(ErrInvalidProofSpecs, "proof specs cannot be nil for tm client") } @@ -155,7 +137,6 @@ func (cs ClientState) ZeroCustomFields() exported.ClientState { ChainId: cs.ChainId, UnbondingPeriod: cs.UnbondingPeriod, LatestHeight: cs.LatestHeight, - ConsensusParams: cs.ConsensusParams, ProofSpecs: cs.ProofSpecs, UpgradePath: cs.UpgradePath, } diff --git a/x/ibc/light-clients/07-tendermint/types/client_state_test.go b/x/ibc/light-clients/07-tendermint/types/client_state_test.go index dc662da8fd..a160484609 100644 --- a/x/ibc/light-clients/07-tendermint/types/client_state_test.go +++ b/x/ibc/light-clients/07-tendermint/types/client_state_test.go @@ -33,57 +33,57 @@ func (suite *TendermintTestSuite) TestValidate() { }{ { name: "valid client", - clientState: types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), upgradePath, false, false), + clientState: types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false), expPass: true, }, { name: "valid client with nil upgrade path", - clientState: types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), "", false, false), + clientState: types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), "", false, false), expPass: true, }, { name: "invalid chainID", - clientState: types.NewClientState(" ", types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), upgradePath, false, false), + clientState: types.NewClientState(" ", types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false), expPass: false, }, { name: "invalid trust level", - clientState: types.NewClientState(chainID, types.Fraction{Numerator: 0, Denominator: 1}, trustingPeriod, ubdPeriod, maxClockDrift, height, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), upgradePath, false, false), + clientState: types.NewClientState(chainID, types.Fraction{Numerator: 0, Denominator: 1}, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false), expPass: false, }, { name: "invalid trusting period", - clientState: types.NewClientState(chainID, types.DefaultTrustLevel, 0, ubdPeriod, maxClockDrift, height, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), upgradePath, false, false), + clientState: types.NewClientState(chainID, types.DefaultTrustLevel, 0, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false), expPass: false, }, { name: "invalid unbonding period", - clientState: types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, 0, maxClockDrift, height, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), upgradePath, false, false), + clientState: types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, 0, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false), expPass: false, }, { name: "invalid max clock drift", - clientState: types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, 0, height, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), upgradePath, false, false), + clientState: types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, 0, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false), expPass: false, }, { name: "invalid height", - clientState: types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, clienttypes.ZeroHeight(), ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), upgradePath, false, false), + clientState: types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, clienttypes.ZeroHeight(), commitmenttypes.GetSDKSpecs(), upgradePath, false, false), expPass: false, }, { name: "trusting period not less than unbonding period", - clientState: types.NewClientState(chainID, types.DefaultTrustLevel, ubdPeriod, ubdPeriod, maxClockDrift, height, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), upgradePath, false, false), + clientState: types.NewClientState(chainID, types.DefaultTrustLevel, ubdPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false), expPass: false, }, { name: "proof specs is nil", - clientState: types.NewClientState(chainID, types.DefaultTrustLevel, ubdPeriod, ubdPeriod, maxClockDrift, height, ibctesting.DefaultConsensusParams, nil, upgradePath, false, false), + clientState: types.NewClientState(chainID, types.DefaultTrustLevel, ubdPeriod, ubdPeriod, maxClockDrift, height, nil, upgradePath, false, false), expPass: false, }, { name: "proof specs contains nil", - clientState: types.NewClientState(chainID, types.DefaultTrustLevel, ubdPeriod, ubdPeriod, maxClockDrift, height, ibctesting.DefaultConsensusParams, []*ics23.ProofSpec{ics23.TendermintSpec, nil}, upgradePath, false, false), + clientState: types.NewClientState(chainID, types.DefaultTrustLevel, ubdPeriod, ubdPeriod, maxClockDrift, height, []*ics23.ProofSpec{ics23.TendermintSpec, nil}, upgradePath, false, false), expPass: false, }, } @@ -110,7 +110,7 @@ func (suite *TendermintTestSuite) TestVerifyClientConsensusState() { // FIXME: uncomment // { // name: "successful verification", - // clientState: types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs()), + // clientState: types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs()), // consensusState: types.ConsensusState{ // Root: commitmenttypes.NewMerkleRoot(suite.header.Header.GetAppHash()), // }, @@ -119,7 +119,7 @@ func (suite *TendermintTestSuite) TestVerifyClientConsensusState() { // }, { name: "ApplyPrefix failed", - clientState: types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), upgradePath, false, false), + clientState: types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false), consensusState: types.ConsensusState{ Root: commitmenttypes.NewMerkleRoot(suite.header.Header.GetAppHash()), }, @@ -128,7 +128,7 @@ func (suite *TendermintTestSuite) TestVerifyClientConsensusState() { }, { name: "latest client height < height", - clientState: types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), upgradePath, false, false), + clientState: types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false), consensusState: types.ConsensusState{ Root: commitmenttypes.NewMerkleRoot(suite.header.Header.GetAppHash()), }, @@ -146,7 +146,7 @@ func (suite *TendermintTestSuite) TestVerifyClientConsensusState() { }, { name: "proof verification failed", - clientState: types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), upgradePath, false, false), + clientState: types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false), consensusState: types.ConsensusState{ Root: commitmenttypes.NewMerkleRoot(suite.header.Header.GetAppHash()), NextValidatorsHash: suite.valsHash, diff --git a/x/ibc/light-clients/07-tendermint/types/errors.go b/x/ibc/light-clients/07-tendermint/types/errors.go index 6037c4c232..9683dbf3cf 100644 --- a/x/ibc/light-clients/07-tendermint/types/errors.go +++ b/x/ibc/light-clients/07-tendermint/types/errors.go @@ -20,5 +20,4 @@ var ( ErrUnbondingPeriodExpired = sdkerrors.Register(SubModuleName, 9, "time since latest trusted state has passed the unbonding period") ErrInvalidProofSpecs = sdkerrors.Register(SubModuleName, 10, "invalid proof specs") ErrInvalidValidatorSet = sdkerrors.Register(SubModuleName, 11, "invalid validator set") - ErrInvalidConsensusParams = sdkerrors.Register(SubModuleName, 12, "invalid consensus params") ) diff --git a/x/ibc/light-clients/07-tendermint/types/misbehaviour_handle.go b/x/ibc/light-clients/07-tendermint/types/misbehaviour_handle.go index d37a21402a..e3793ee863 100644 --- a/x/ibc/light-clients/07-tendermint/types/misbehaviour_handle.go +++ b/x/ibc/light-clients/07-tendermint/types/misbehaviour_handle.go @@ -51,35 +51,6 @@ func (cs ClientState) CheckMisbehaviourAndUpdateState( return nil, sdkerrors.Wrapf(err, "could not get trusted consensus state from clientStore for Header2 at TrustedHeight: %s", tmMisbehaviour.Header2) } - // calculate the age of the misbehaviour - infractionTime := tmMisbehaviour.GetTime() - ageDuration := ctx.BlockTime().Sub(infractionTime) - - var ageBlocks int64 - if tmMisbehaviour.GetHeight().GetVersionNumber() == cs.LatestHeight.VersionNumber { - // if the misbehaviour is in the same version as the client then - // perform expiry check using block height in addition to time - infractionHeight := tmMisbehaviour.GetHeight().GetVersionHeight() - ageBlocks = int64(cs.LatestHeight.VersionHeight - infractionHeight) - } else { - // if the misbehaviour is from a different version, then the version-height - // of misbehaviour has no correlation with the current version-height - // so we disable the block check by setting ageBlocks to 0 and only - // rely on the time expiry check with ageDuration - ageBlocks = 0 - } - - // Reject misbehaviour if the age is too old. Misbehaviour is considered stale - // if the difference in time and number of blocks is greater than the allowed - // parameters defined. - if ageDuration > cs.ConsensusParams.Evidence.MaxAgeDuration || - ageBlocks > cs.ConsensusParams.Evidence.MaxAgeNumBlocks { - return nil, sdkerrors.Wrapf(clienttypes.ErrInvalidMisbehaviour, - "age duration (%s) and age blocks (%d) are greater than max consensus params for duration (%s) and block (%d)", - ageDuration, ageBlocks, cs.ConsensusParams.Evidence.MaxAgeDuration, cs.ConsensusParams.Evidence.MaxAgeNumBlocks, - ) - } - // Check the validity of the two conflicting headers against their respective // trusted consensus states // NOTE: header height and commitment root assertions are checked in diff --git a/x/ibc/light-clients/07-tendermint/types/misbehaviour_handle_test.go b/x/ibc/light-clients/07-tendermint/types/misbehaviour_handle_test.go index e0fc26389c..556bfeb524 100644 --- a/x/ibc/light-clients/07-tendermint/types/misbehaviour_handle_test.go +++ b/x/ibc/light-clients/07-tendermint/types/misbehaviour_handle_test.go @@ -7,7 +7,6 @@ import ( "github.com/tendermint/tendermint/crypto/tmhash" tmtypes "github.com/tendermint/tendermint/types" - "github.com/cosmos/cosmos-sdk/simapp" clienttypes "github.com/cosmos/cosmos-sdk/x/ibc/core/02-client/types" commitmenttypes "github.com/cosmos/cosmos-sdk/x/ibc/core/23-commitment/types" "github.com/cosmos/cosmos-sdk/x/ibc/core/exported" @@ -36,7 +35,6 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { altSigners := []tmtypes.PrivValidator{altPrivVal} - versionHeight := int64(height.VersionHeight) heightMinus1 := clienttypes.NewHeight(height.VersionNumber, height.VersionHeight-1) heightMinus3 := clienttypes.NewHeight(height.VersionNumber, height.VersionHeight-3) @@ -53,7 +51,7 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { }{ { "valid misbehavior misbehaviour", - types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), upgradePath, false, false), + types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false), types.NewConsensusState(suite.now, commitmenttypes.NewMerkleRoot(tmhash.Sum([]byte("app_hash"))), bothValsHash), height, types.NewConsensusState(suite.now, commitmenttypes.NewMerkleRoot(tmhash.Sum([]byte("app_hash"))), bothValsHash), @@ -69,7 +67,7 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { }, { "valid misbehavior at height greater than last consensusState", - types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), upgradePath, false, false), + types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false), types.NewConsensusState(suite.now, commitmenttypes.NewMerkleRoot(tmhash.Sum([]byte("app_hash"))), bothValsHash), heightMinus1, types.NewConsensusState(suite.now, commitmenttypes.NewMerkleRoot(tmhash.Sum([]byte("app_hash"))), bothValsHash), @@ -85,7 +83,7 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { }, { "valid misbehaviour with different trusted heights", - types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), upgradePath, false, false), + types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false), types.NewConsensusState(suite.now, commitmenttypes.NewMerkleRoot(tmhash.Sum([]byte("app_hash"))), bothValsHash), heightMinus1, types.NewConsensusState(suite.now, commitmenttypes.NewMerkleRoot(tmhash.Sum([]byte("app_hash"))), suite.valsHash), @@ -101,7 +99,7 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { }, { "valid misbehaviour at a previous version", - types.NewClientState(chainIDVersion1, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, clienttypes.NewHeight(1, 1), ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), upgradePath, false, false), + types.NewClientState(chainIDVersion1, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, clienttypes.NewHeight(1, 1), commitmenttypes.GetSDKSpecs(), upgradePath, false, false), types.NewConsensusState(suite.now, commitmenttypes.NewMerkleRoot(tmhash.Sum([]byte("app_hash"))), bothValsHash), heightMinus1, types.NewConsensusState(suite.now, commitmenttypes.NewMerkleRoot(tmhash.Sum([]byte("app_hash"))), suite.valsHash), @@ -117,7 +115,7 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { }, { "valid misbehaviour at a future version", - types.NewClientState(chainIDVersion0, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), upgradePath, false, false), + types.NewClientState(chainIDVersion0, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false), types.NewConsensusState(suite.now, commitmenttypes.NewMerkleRoot(tmhash.Sum([]byte("app_hash"))), bothValsHash), heightMinus1, types.NewConsensusState(suite.now, commitmenttypes.NewMerkleRoot(tmhash.Sum([]byte("app_hash"))), suite.valsHash), @@ -133,7 +131,7 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { }, { "valid misbehaviour with trusted heights at a previous version", - types.NewClientState(chainIDVersion1, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, clienttypes.NewHeight(1, 1), ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), upgradePath, false, false), + types.NewClientState(chainIDVersion1, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, clienttypes.NewHeight(1, 1), commitmenttypes.GetSDKSpecs(), upgradePath, false, false), types.NewConsensusState(suite.now, commitmenttypes.NewMerkleRoot(tmhash.Sum([]byte("app_hash"))), bothValsHash), heightMinus1, types.NewConsensusState(suite.now, commitmenttypes.NewMerkleRoot(tmhash.Sum([]byte("app_hash"))), suite.valsHash), @@ -149,7 +147,7 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { }, { "consensus state's valset hash different from misbehaviour should still pass", - types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), upgradePath, false, false), + types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false), types.NewConsensusState(suite.now, commitmenttypes.NewMerkleRoot(tmhash.Sum([]byte("app_hash"))), suite.valsHash), height, types.NewConsensusState(suite.now, commitmenttypes.NewMerkleRoot(tmhash.Sum([]byte("app_hash"))), suite.valsHash), @@ -165,7 +163,7 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { }, { "invalid misbehavior misbehaviour from different chain", - types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), upgradePath, false, false), + types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false), types.NewConsensusState(suite.now, commitmenttypes.NewMerkleRoot(tmhash.Sum([]byte("app_hash"))), bothValsHash), height, types.NewConsensusState(suite.now, commitmenttypes.NewMerkleRoot(tmhash.Sum([]byte("app_hash"))), bothValsHash), @@ -181,7 +179,7 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { }, { "invalid misbehavior misbehaviour with trusted height different from trusted consensus state", - types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), upgradePath, false, false), + types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false), types.NewConsensusState(suite.now, commitmenttypes.NewMerkleRoot(tmhash.Sum([]byte("app_hash"))), bothValsHash), heightMinus1, types.NewConsensusState(suite.now, commitmenttypes.NewMerkleRoot(tmhash.Sum([]byte("app_hash"))), suite.valsHash), @@ -197,7 +195,7 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { }, { "invalid misbehavior misbehaviour with trusted validators different from trusted consensus state", - types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), upgradePath, false, false), + types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false), types.NewConsensusState(suite.now, commitmenttypes.NewMerkleRoot(tmhash.Sum([]byte("app_hash"))), bothValsHash), heightMinus1, types.NewConsensusState(suite.now, commitmenttypes.NewMerkleRoot(tmhash.Sum([]byte("app_hash"))), suite.valsHash), @@ -229,7 +227,7 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { }, { "trusted consensus state does not exist", - types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), upgradePath, false, false), + types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false), nil, // consensus state for trusted height - 1 does not exist in store clienttypes.Height{}, types.NewConsensusState(suite.now, commitmenttypes.NewMerkleRoot(tmhash.Sum([]byte("app_hash"))), bothValsHash), @@ -245,7 +243,7 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { }, { "invalid tendermint misbehaviour", - types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), upgradePath, false, false), + types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false), types.NewConsensusState(suite.now, commitmenttypes.NewMerkleRoot(tmhash.Sum([]byte("app_hash"))), bothValsHash), height, types.NewConsensusState(suite.now, commitmenttypes.NewMerkleRoot(tmhash.Sum([]byte("app_hash"))), bothValsHash), @@ -254,41 +252,9 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { suite.now, false, }, - { - "rejected misbehaviour due to expired age duration", - types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), upgradePath, false, false), - types.NewConsensusState(suite.now, commitmenttypes.NewMerkleRoot(tmhash.Sum([]byte("app_hash"))), bothValsHash), - height, - types.NewConsensusState(suite.now, commitmenttypes.NewMerkleRoot(tmhash.Sum([]byte("app_hash"))), bothValsHash), - height, - &types.Misbehaviour{ - Header1: suite.chainA.CreateTMClientHeader(chainID, int64(height.VersionHeight), height, suite.now, bothValSet, bothValSet, bothSigners), - Header2: suite.chainA.CreateTMClientHeader(chainID, int64(height.VersionHeight), height, suite.now.Add(time.Minute), bothValSet, bothValSet, bothSigners), - ChainId: chainID, - ClientId: chainID, - }, - suite.now.Add(2 * time.Minute).Add(simapp.DefaultConsensusParams.Evidence.MaxAgeDuration), - false, - }, - { - "rejected misbehaviour due to expired block duration", - types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, clienttypes.NewHeight(0, uint64(versionHeight+simapp.DefaultConsensusParams.Evidence.MaxAgeNumBlocks+1)), ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), upgradePath, false, false), - types.NewConsensusState(suite.now, commitmenttypes.NewMerkleRoot(tmhash.Sum([]byte("app_hash"))), bothValsHash), - height, - types.NewConsensusState(suite.now, commitmenttypes.NewMerkleRoot(tmhash.Sum([]byte("app_hash"))), bothValsHash), - height, - &types.Misbehaviour{ - Header1: suite.chainA.CreateTMClientHeader(chainID, int64(height.VersionHeight), height, suite.now, bothValSet, bothValSet, bothSigners), - Header2: suite.chainA.CreateTMClientHeader(chainID, int64(height.VersionHeight), height, suite.now.Add(time.Minute), bothValSet, bothValSet, bothSigners), - ChainId: chainID, - ClientId: chainID, - }, - suite.now.Add(time.Hour), - false, - }, { "provided height > header height", - types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), upgradePath, false, false), + types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false), types.NewConsensusState(suite.now, commitmenttypes.NewMerkleRoot(tmhash.Sum([]byte("app_hash"))), bothValsHash), height, types.NewConsensusState(suite.now, commitmenttypes.NewMerkleRoot(tmhash.Sum([]byte("app_hash"))), bothValsHash), @@ -304,7 +270,7 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { }, { "unbonding period expired", - types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), upgradePath, false, false), + types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false), types.NewConsensusState(time.Time{}, commitmenttypes.NewMerkleRoot(tmhash.Sum([]byte("app_hash"))), bothValsHash), heightMinus1, types.NewConsensusState(suite.now, commitmenttypes.NewMerkleRoot(tmhash.Sum([]byte("app_hash"))), bothValsHash), @@ -320,7 +286,7 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { }, { "trusted validators is incorrect for given consensus state", - types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), upgradePath, false, false), + types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false), types.NewConsensusState(suite.now, commitmenttypes.NewMerkleRoot(tmhash.Sum([]byte("app_hash"))), bothValsHash), height, types.NewConsensusState(suite.now, commitmenttypes.NewMerkleRoot(tmhash.Sum([]byte("app_hash"))), bothValsHash), @@ -336,7 +302,7 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { }, { "first valset has too much change", - types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), upgradePath, false, false), + types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false), types.NewConsensusState(suite.now, commitmenttypes.NewMerkleRoot(tmhash.Sum([]byte("app_hash"))), bothValsHash), height, types.NewConsensusState(suite.now, commitmenttypes.NewMerkleRoot(tmhash.Sum([]byte("app_hash"))), bothValsHash), @@ -352,7 +318,7 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { }, { "second valset has too much change", - types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), upgradePath, false, false), + types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false), types.NewConsensusState(suite.now, commitmenttypes.NewMerkleRoot(tmhash.Sum([]byte("app_hash"))), bothValsHash), height, types.NewConsensusState(suite.now, commitmenttypes.NewMerkleRoot(tmhash.Sum([]byte("app_hash"))), bothValsHash), @@ -368,7 +334,7 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { }, { "both valsets have too much change", - types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), upgradePath, false, false), + types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false), types.NewConsensusState(suite.now, commitmenttypes.NewMerkleRoot(tmhash.Sum([]byte("app_hash"))), bothValsHash), height, types.NewConsensusState(suite.now, commitmenttypes.NewMerkleRoot(tmhash.Sum([]byte("app_hash"))), bothValsHash), diff --git a/x/ibc/light-clients/07-tendermint/types/tendermint.pb.go b/x/ibc/light-clients/07-tendermint/types/tendermint.pb.go index bd73065032..e613edf2fd 100644 --- a/x/ibc/light-clients/07-tendermint/types/tendermint.pb.go +++ b/x/ibc/light-clients/07-tendermint/types/tendermint.pb.go @@ -7,15 +7,14 @@ import ( fmt "fmt" _go "github.com/confio/ics23/go" types "github.com/cosmos/cosmos-sdk/x/ibc/core/02-client/types" - types2 "github.com/cosmos/cosmos-sdk/x/ibc/core/23-commitment/types" + types1 "github.com/cosmos/cosmos-sdk/x/ibc/core/23-commitment/types" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" _ "github.com/golang/protobuf/ptypes/duration" _ "github.com/golang/protobuf/ptypes/timestamp" - types1 "github.com/tendermint/tendermint/abci/types" github_com_tendermint_tendermint_libs_bytes "github.com/tendermint/tendermint/libs/bytes" - types3 "github.com/tendermint/tendermint/proto/tendermint/types" + types2 "github.com/tendermint/tendermint/proto/tendermint/types" io "io" math "math" math_bits "math/bits" @@ -50,18 +49,16 @@ type ClientState struct { FrozenHeight types.Height `protobuf:"bytes,6,opt,name=frozen_height,json=frozenHeight,proto3" json:"frozen_height" yaml:"frozen_height"` // Latest height the client was updated to LatestHeight types.Height `protobuf:"bytes,7,opt,name=latest_height,json=latestHeight,proto3" json:"latest_height" yaml:"latest_height"` - // Consensus params of the chain - ConsensusParams *types1.ConsensusParams `protobuf:"bytes,8,opt,name=consensus_params,json=consensusParams,proto3" json:"consensus_params,omitempty" yaml:"consensus_params"` // Proof specifications used in verifying counterparty state - ProofSpecs []*_go.ProofSpec `protobuf:"bytes,9,rep,name=proof_specs,json=proofSpecs,proto3" json:"proof_specs,omitempty" yaml:"proof_specs"` + ProofSpecs []*_go.ProofSpec `protobuf:"bytes,8,rep,name=proof_specs,json=proofSpecs,proto3" json:"proof_specs,omitempty" yaml:"proof_specs"` // Path at which next upgraded client will be committed - UpgradePath string `protobuf:"bytes,10,opt,name=upgrade_path,json=upgradePath,proto3" json:"upgrade_path,omitempty" yaml:"upgrade_path"` + UpgradePath string `protobuf:"bytes,9,opt,name=upgrade_path,json=upgradePath,proto3" json:"upgrade_path,omitempty" yaml:"upgrade_path"` // This flag, when set to true, will allow governance to recover a client // which has expired - AllowUpdateAfterExpiry bool `protobuf:"varint,11,opt,name=allow_update_after_expiry,json=allowUpdateAfterExpiry,proto3" json:"allow_update_after_expiry,omitempty" yaml:"allow_update_after_expiry"` + AllowUpdateAfterExpiry bool `protobuf:"varint,10,opt,name=allow_update_after_expiry,json=allowUpdateAfterExpiry,proto3" json:"allow_update_after_expiry,omitempty" yaml:"allow_update_after_expiry"` // This flag, when set to true, will allow governance to unfreeze a client // whose chain has experienced a misbehaviour event - AllowUpdateAfterMisbehaviour bool `protobuf:"varint,12,opt,name=allow_update_after_misbehaviour,json=allowUpdateAfterMisbehaviour,proto3" json:"allow_update_after_misbehaviour,omitempty" yaml:"allow_update_after_misbehaviour"` + AllowUpdateAfterMisbehaviour bool `protobuf:"varint,11,opt,name=allow_update_after_misbehaviour,json=allowUpdateAfterMisbehaviour,proto3" json:"allow_update_after_misbehaviour,omitempty" yaml:"allow_update_after_misbehaviour"` } func (m *ClientState) Reset() { *m = ClientState{} } @@ -103,7 +100,7 @@ type ConsensusState struct { // was stored. Timestamp time.Time `protobuf:"bytes,1,opt,name=timestamp,proto3,stdtime" json:"timestamp"` // commitment root (i.e app hash) - Root types2.MerkleRoot `protobuf:"bytes,2,opt,name=root,proto3" json:"root"` + Root types1.MerkleRoot `protobuf:"bytes,2,opt,name=root,proto3" json:"root"` NextValidatorsHash github_com_tendermint_tendermint_libs_bytes.HexBytes `protobuf:"bytes,3,opt,name=next_validators_hash,json=nextValidatorsHash,proto3,casttype=github.com/tendermint/tendermint/libs/bytes.HexBytes" json:"next_validators_hash,omitempty" yaml:"next_validators_hash"` } @@ -194,10 +191,10 @@ var xxx_messageInfo_Misbehaviour proto.InternalMessageInfo // hash to TrustedConsensusState.NextValidatorsHash since that is the last // trusted validator set at the TrustedHeight. type Header struct { - *types3.SignedHeader `protobuf:"bytes,1,opt,name=signed_header,json=signedHeader,proto3,embedded=signed_header" json:"signed_header,omitempty" yaml:"signed_header"` - ValidatorSet *types3.ValidatorSet `protobuf:"bytes,2,opt,name=validator_set,json=validatorSet,proto3" json:"validator_set,omitempty" yaml:"validator_set"` + *types2.SignedHeader `protobuf:"bytes,1,opt,name=signed_header,json=signedHeader,proto3,embedded=signed_header" json:"signed_header,omitempty" yaml:"signed_header"` + ValidatorSet *types2.ValidatorSet `protobuf:"bytes,2,opt,name=validator_set,json=validatorSet,proto3" json:"validator_set,omitempty" yaml:"validator_set"` TrustedHeight types.Height `protobuf:"bytes,3,opt,name=trusted_height,json=trustedHeight,proto3" json:"trusted_height" yaml:"trusted_height"` - TrustedValidators *types3.ValidatorSet `protobuf:"bytes,4,opt,name=trusted_validators,json=trustedValidators,proto3" json:"trusted_validators,omitempty" yaml:"trusted_validators"` + TrustedValidators *types2.ValidatorSet `protobuf:"bytes,4,opt,name=trusted_validators,json=trustedValidators,proto3" json:"trusted_validators,omitempty" yaml:"trusted_validators"` } func (m *Header) Reset() { *m = Header{} } @@ -233,7 +230,7 @@ func (m *Header) XXX_DiscardUnknown() { var xxx_messageInfo_Header proto.InternalMessageInfo -func (m *Header) GetValidatorSet() *types3.ValidatorSet { +func (m *Header) GetValidatorSet() *types2.ValidatorSet { if m != nil { return m.ValidatorSet } @@ -247,14 +244,14 @@ func (m *Header) GetTrustedHeight() types.Height { return types.Height{} } -func (m *Header) GetTrustedValidators() *types3.ValidatorSet { +func (m *Header) GetTrustedValidators() *types2.ValidatorSet { if m != nil { return m.TrustedValidators } return nil } -// Fraction defines the protobuf message type for tmmath.Fraction +// Fraction defines the protobuf message type for tmmath.Fraction that only supports positive values. type Fraction struct { Numerator uint64 `protobuf:"varint,1,opt,name=numerator,proto3" json:"numerator,omitempty"` Denominator uint64 `protobuf:"varint,2,opt,name=denominator,proto3" json:"denominator,omitempty"` @@ -320,79 +317,76 @@ func init() { } var fileDescriptor_c6d6cf2b288949be = []byte{ - // 1142 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0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33, 0xa9, 0xbe, 0x22, 0x1f, 0x95, 0x9f, 0x91, 0xef, 0xbe, 0xff, 0x68, - 0xf1, 0x3b, 0xaf, 0x7f, 0x4b, 0xa8, 0xd0, 0xe3, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0xb3, 0x43, - 0xab, 0xfe, 0x75, 0x0a, 0x00, 0x00, + // 1096 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0xcf, 0x6f, 0xe3, 0x44, + 0x14, 0x6e, 0xda, 0xb2, 0x4d, 0x27, 0xe9, 0x76, 0xf1, 0x96, 0x6e, 0x5a, 0xba, 0x71, 0x64, 0xd0, + 0x52, 0x21, 0xd5, 0x26, 0x59, 0x24, 0xa4, 0x8a, 0x0b, 0x6e, 0x41, 0x2d, 0x62, 0xa5, 0xca, 0xe5, + 0x87, 0x84, 0x04, 0x66, 0x62, 0x4f, 0x92, 0x51, 0x6d, 0x8f, 0xf1, 0x4c, 0x42, 0xca, 0x5f, 0x00, + 0xb7, 0x3d, 0xae, 0x38, 0x71, 0xe0, 0x1f, 0xe1, 0xb6, 0xc7, 0x1e, 0x39, 0x19, 0xd4, 0x5e, 0x38, + 0xe7, 0xc8, 0x09, 0xcd, 0x0f, 0xdb, 0xd3, 0x6c, 0x97, 0x6a, 0xb9, 0xb4, 0xf3, 0xde, 0xfb, 0xde, + 0xf7, 0x65, 0xde, 0xbc, 0x79, 0x63, 0xe0, 0xe0, 0x7e, 0xe0, 0x44, 0x78, 0x38, 0x62, 0x41, 0x84, + 0x51, 0xc2, 0xa8, 0xc3, 0x50, 0x12, 0xa2, 0x2c, 0xc6, 0x09, 0x73, 0x26, 0x5d, 0xcd, 0xb2, 0xd3, + 0x8c, 0x30, 0x62, 0xb4, 0x71, 0x3f, 0xb0, 0xf5, 0x04, 0x5b, 0x83, 0x4c, 0xba, 0xdb, 0x1d, 0x2d, + 0x9f, 0x9d, 0xa7, 0x88, 0x3a, 0x13, 0x18, 0xe1, 0x10, 0x32, 0x92, 0x49, 0x86, 0xed, 0x9d, 0x17, + 0x10, 0xe2, 0xaf, 0x8a, 0xde, 0x0f, 0x48, 0x32, 0xc0, 0xc4, 0x49, 0x33, 0x42, 0x06, 0x85, 0xb3, + 0x3d, 0x24, 0x64, 0x18, 0x21, 0x47, 0x58, 0xfd, 0xf1, 0xc0, 0x09, 0xc7, 0x19, 0x64, 0x98, 0x24, + 0x2a, 0x6e, 0xce, 0xc7, 0x19, 0x8e, 0x11, 0x65, 0x30, 0x4e, 0x0b, 0x00, 0xdf, 0x66, 0x40, 0x32, + 0xe4, 0xc8, 0x5f, 0xcd, 0xb7, 0x26, 0x57, 0x0a, 0xf0, 0x4e, 0x05, 0x20, 0x71, 0x8c, 0x59, 0x5c, + 0x80, 0x4a, 0x4b, 0x01, 0x37, 0x86, 0x64, 0x48, 0xc4, 0xd2, 0xe1, 0x2b, 0xe9, 0xb5, 0xfe, 0x5e, + 0x01, 0x8d, 0x03, 0xc1, 0x77, 0xca, 0x20, 0x43, 0xc6, 0x16, 0xa8, 0x07, 0x23, 0x88, 0x13, 0x1f, + 0x87, 0xad, 0x5a, 0xa7, 0xb6, 0xbb, 0xea, 0xad, 0x08, 0xfb, 0x38, 0x34, 0x10, 0x68, 0xb0, 0x6c, + 0x4c, 0x99, 0x1f, 0xa1, 0x09, 0x8a, 0x5a, 0x8b, 0x9d, 0xda, 0x6e, 0xa3, 0xb7, 0x6b, 0xff, 0x77, + 0x59, 0xed, 0x4f, 0x32, 0x18, 0xf0, 0x0d, 0xbb, 0xdb, 0xcf, 0x73, 0x73, 0x61, 0x96, 0x9b, 0xc6, + 0x39, 0x8c, 0xa3, 0x7d, 0x4b, 0xa3, 0xb2, 0x3c, 0x20, 0xac, 0xcf, 0xb8, 0x61, 0x0c, 0xc0, 0xba, + 0xb0, 0x70, 0x32, 0xf4, 0x53, 0x94, 0x61, 0x12, 0xb6, 0x96, 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, 0xc6, + 0x84, 0xaa, 0x7f, 0x7b, 0x34, 0x3c, 0x73, 0xa6, 0xd5, 0xe7, 0xdb, 0x5e, 0xf1, 0xfd, 0xf6, 0xde, + 0x07, 0x7b, 0xf3, 0x1f, 0x58, 0xfd, 0x3b, 0x62, 0x0a, 0x3d, 0xfe, 0x37, 0x00, 0x00, 0xff, 0xff, + 0xd1, 0xc9, 0xf2, 0x91, 0xee, 0x09, 0x00, 0x00, } func (m *ClientState) Marshal() (dAtA []byte, err error) { @@ -423,7 +417,7 @@ func (m *ClientState) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0 } i-- - dAtA[i] = 0x60 + dAtA[i] = 0x58 } if m.AllowUpdateAfterExpiry { i-- @@ -433,14 +427,14 @@ func (m *ClientState) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0 } i-- - dAtA[i] = 0x58 + dAtA[i] = 0x50 } if len(m.UpgradePath) > 0 { i -= len(m.UpgradePath) copy(dAtA[i:], m.UpgradePath) i = encodeVarintTendermint(dAtA, i, uint64(len(m.UpgradePath))) i-- - dAtA[i] = 0x52 + dAtA[i] = 0x4a } if len(m.ProofSpecs) > 0 { for iNdEx := len(m.ProofSpecs) - 1; iNdEx >= 0; iNdEx-- { @@ -453,21 +447,9 @@ func (m *ClientState) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintTendermint(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x4a + dAtA[i] = 0x42 } } - if m.ConsensusParams != nil { - { - size, err := m.ConsensusParams.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTendermint(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x42 - } { size, err := m.LatestHeight.MarshalToSizedBuffer(dAtA[:i]) if err != nil { @@ -488,29 +470,29 @@ func (m *ClientState) MarshalToSizedBuffer(dAtA []byte) (int, error) { } i-- dAtA[i] = 0x32 - n4, err4 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.MaxClockDrift, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.MaxClockDrift):]) + n3, err3 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.MaxClockDrift, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.MaxClockDrift):]) + if err3 != nil { + return 0, err3 + } + i -= n3 + i = encodeVarintTendermint(dAtA, i, uint64(n3)) + i-- + dAtA[i] = 0x2a + n4, err4 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.UnbondingPeriod, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.UnbondingPeriod):]) if err4 != nil { return 0, err4 } i -= n4 i = encodeVarintTendermint(dAtA, i, uint64(n4)) i-- - dAtA[i] = 0x2a - n5, err5 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.UnbondingPeriod, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.UnbondingPeriod):]) + dAtA[i] = 0x22 + n5, err5 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.TrustingPeriod, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.TrustingPeriod):]) if err5 != nil { return 0, err5 } i -= n5 i = encodeVarintTendermint(dAtA, i, uint64(n5)) i-- - dAtA[i] = 0x22 - n6, err6 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.TrustingPeriod, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.TrustingPeriod):]) - if err6 != nil { - return 0, err6 - } - i -= n6 - i = encodeVarintTendermint(dAtA, i, uint64(n6)) - i-- dAtA[i] = 0x1a { size, err := m.TrustLevel.MarshalToSizedBuffer(dAtA[:i]) @@ -569,12 +551,12 @@ func (m *ConsensusState) MarshalToSizedBuffer(dAtA []byte) (int, error) { } i-- dAtA[i] = 0x12 - n9, err9 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp):]) - if err9 != nil { - return 0, err9 + n8, err8 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp):]) + if err8 != nil { + return 0, err8 } - i -= n9 - i = encodeVarintTendermint(dAtA, i, uint64(n9)) + i -= n8 + i = encodeVarintTendermint(dAtA, i, uint64(n8)) i-- dAtA[i] = 0xa return len(dAtA) - i, nil @@ -776,10 +758,6 @@ func (m *ClientState) Size() (n int) { n += 1 + l + sovTendermint(uint64(l)) l = m.LatestHeight.Size() n += 1 + l + sovTendermint(uint64(l)) - if m.ConsensusParams != nil { - l = m.ConsensusParams.Size() - n += 1 + l + sovTendermint(uint64(l)) - } if len(m.ProofSpecs) > 0 { for _, e := range m.ProofSpecs { l = e.Size() @@ -1145,42 +1123,6 @@ func (m *ClientState) Unmarshal(dAtA []byte) error { } iNdEx = postIndex case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConsensusParams", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTendermint - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTendermint - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTendermint - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ConsensusParams == nil { - m.ConsensusParams = &types1.ConsensusParams{} - } - if err := m.ConsensusParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 9: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ProofSpecs", wireType) } @@ -1214,7 +1156,7 @@ func (m *ClientState) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 10: + case 9: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field UpgradePath", wireType) } @@ -1246,7 +1188,7 @@ func (m *ClientState) Unmarshal(dAtA []byte) error { } m.UpgradePath = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 11: + case 10: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field AllowUpdateAfterExpiry", wireType) } @@ -1266,7 +1208,7 @@ func (m *ClientState) Unmarshal(dAtA []byte) error { } } m.AllowUpdateAfterExpiry = bool(v != 0) - case 12: + case 11: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field AllowUpdateAfterMisbehaviour", wireType) } @@ -1711,7 +1653,7 @@ func (m *Header) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.SignedHeader == nil { - m.SignedHeader = &types3.SignedHeader{} + m.SignedHeader = &types2.SignedHeader{} } if err := m.SignedHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -1747,7 +1689,7 @@ func (m *Header) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.ValidatorSet == nil { - m.ValidatorSet = &types3.ValidatorSet{} + m.ValidatorSet = &types2.ValidatorSet{} } if err := m.ValidatorSet.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -1816,7 +1758,7 @@ func (m *Header) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.TrustedValidators == nil { - m.TrustedValidators = &types3.ValidatorSet{} + m.TrustedValidators = &types2.ValidatorSet{} } if err := m.TrustedValidators.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err diff --git a/x/ibc/light-clients/07-tendermint/types/update_test.go b/x/ibc/light-clients/07-tendermint/types/update_test.go index 0941e63212..b75d71b827 100644 --- a/x/ibc/light-clients/07-tendermint/types/update_test.go +++ b/x/ibc/light-clients/07-tendermint/types/update_test.go @@ -57,7 +57,7 @@ func (suite *TendermintTestSuite) TestCheckHeaderAndUpdateState() { { name: "successful update with next height and same validator set", setup: func() { - clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) + clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) consensusState = types.NewConsensusState(suite.clientTime, commitmenttypes.NewMerkleRoot(suite.header.Header.GetAppHash()), suite.valsHash) newHeader = suite.chainA.CreateTMClientHeader(chainID, int64(heightPlus1.VersionHeight), height, suite.headerTime, suite.valSet, suite.valSet, signers) currentTime = suite.now @@ -67,7 +67,7 @@ func (suite *TendermintTestSuite) TestCheckHeaderAndUpdateState() { { name: "successful update with future height and different validator set", setup: func() { - clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) + clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) consensusState = types.NewConsensusState(suite.clientTime, commitmenttypes.NewMerkleRoot(suite.header.Header.GetAppHash()), suite.valsHash) newHeader = suite.chainA.CreateTMClientHeader(chainID, int64(heightPlus5.VersionHeight), height, suite.headerTime, bothValSet, suite.valSet, bothSigners) currentTime = suite.now @@ -77,7 +77,7 @@ func (suite *TendermintTestSuite) TestCheckHeaderAndUpdateState() { { name: "successful update with next height and different validator set", setup: func() { - clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) + clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) consensusState = types.NewConsensusState(suite.clientTime, commitmenttypes.NewMerkleRoot(suite.header.Header.GetAppHash()), bothValSet.Hash()) newHeader = suite.chainA.CreateTMClientHeader(chainID, int64(heightPlus1.VersionHeight), height, suite.headerTime, bothValSet, bothValSet, bothSigners) currentTime = suite.now @@ -87,7 +87,7 @@ func (suite *TendermintTestSuite) TestCheckHeaderAndUpdateState() { { name: "successful update for a previous height", setup: func() { - clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) + clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) consensusState = types.NewConsensusState(suite.clientTime, commitmenttypes.NewMerkleRoot(suite.header.Header.GetAppHash()), suite.valsHash) consStateHeight = heightMinus3 newHeader = suite.chainA.CreateTMClientHeader(chainID, int64(heightMinus1.VersionHeight), heightMinus3, suite.headerTime, bothValSet, suite.valSet, bothSigners) @@ -98,7 +98,7 @@ func (suite *TendermintTestSuite) TestCheckHeaderAndUpdateState() { { name: "successful update for a previous version", setup: func() { - clientState = types.NewClientState(chainIDVersion1, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) + clientState = types.NewClientState(chainIDVersion1, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) consensusState = types.NewConsensusState(suite.clientTime, commitmenttypes.NewMerkleRoot(suite.header.Header.GetAppHash()), suite.valsHash) newHeader = suite.chainA.CreateTMClientHeader(chainIDVersion0, int64(height.VersionHeight), heightMinus3, suite.headerTime, bothValSet, suite.valSet, bothSigners) currentTime = suite.now @@ -108,7 +108,7 @@ func (suite *TendermintTestSuite) TestCheckHeaderAndUpdateState() { { name: "unsuccessful update with incorrect header chain-id", setup: func() { - clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) + clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) consensusState = types.NewConsensusState(suite.clientTime, commitmenttypes.NewMerkleRoot(suite.header.Header.GetAppHash()), suite.valsHash) newHeader = suite.chainA.CreateTMClientHeader("ethermint", int64(heightPlus1.VersionHeight), height, suite.headerTime, suite.valSet, suite.valSet, signers) currentTime = suite.now @@ -118,7 +118,7 @@ func (suite *TendermintTestSuite) TestCheckHeaderAndUpdateState() { { name: "unsuccessful update to a future version", setup: func() { - clientState = types.NewClientState(chainIDVersion0, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) + clientState = types.NewClientState(chainIDVersion0, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) consensusState = types.NewConsensusState(suite.clientTime, commitmenttypes.NewMerkleRoot(suite.header.Header.GetAppHash()), suite.valsHash) newHeader = suite.chainA.CreateTMClientHeader(chainIDVersion1, 1, height, suite.headerTime, suite.valSet, suite.valSet, signers) currentTime = suite.now @@ -128,7 +128,7 @@ func (suite *TendermintTestSuite) TestCheckHeaderAndUpdateState() { { name: "unsuccessful update: header height version and trusted height version mismatch", setup: func() { - clientState = types.NewClientState(chainIDVersion1, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, clienttypes.NewHeight(1, 1), ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) + clientState = types.NewClientState(chainIDVersion1, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, clienttypes.NewHeight(1, 1), commitmenttypes.GetSDKSpecs(), upgradePath, false, false) consensusState = types.NewConsensusState(suite.clientTime, commitmenttypes.NewMerkleRoot(suite.header.Header.GetAppHash()), suite.valsHash) newHeader = suite.chainA.CreateTMClientHeader(chainIDVersion1, 3, height, suite.headerTime, suite.valSet, suite.valSet, signers) currentTime = suite.now @@ -138,7 +138,7 @@ func (suite *TendermintTestSuite) TestCheckHeaderAndUpdateState() { { name: "unsuccessful update with next height: update header mismatches nextValSetHash", setup: func() { - clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) + clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) consensusState = types.NewConsensusState(suite.clientTime, commitmenttypes.NewMerkleRoot(suite.header.Header.GetAppHash()), suite.valsHash) newHeader = suite.chainA.CreateTMClientHeader(chainID, int64(heightPlus1.VersionHeight), height, suite.headerTime, bothValSet, suite.valSet, bothSigners) currentTime = suite.now @@ -148,7 +148,7 @@ func (suite *TendermintTestSuite) TestCheckHeaderAndUpdateState() { { name: "unsuccessful update with next height: update header mismatches different nextValSetHash", setup: func() { - clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) + clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) consensusState = types.NewConsensusState(suite.clientTime, commitmenttypes.NewMerkleRoot(suite.header.Header.GetAppHash()), bothValSet.Hash()) newHeader = suite.chainA.CreateTMClientHeader(chainID, int64(heightPlus1.VersionHeight), height, suite.headerTime, suite.valSet, bothValSet, signers) currentTime = suite.now @@ -158,7 +158,7 @@ func (suite *TendermintTestSuite) TestCheckHeaderAndUpdateState() { { name: "unsuccessful update with future height: too much change in validator set", setup: func() { - clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) + clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) consensusState = types.NewConsensusState(suite.clientTime, commitmenttypes.NewMerkleRoot(suite.header.Header.GetAppHash()), suite.valsHash) newHeader = suite.chainA.CreateTMClientHeader(chainID, int64(heightPlus5.VersionHeight), height, suite.headerTime, altValSet, suite.valSet, altSigners) currentTime = suite.now @@ -168,7 +168,7 @@ func (suite *TendermintTestSuite) TestCheckHeaderAndUpdateState() { { name: "unsuccessful updates, passed in incorrect trusted validators for given consensus state", setup: func() { - clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) + clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) consensusState = types.NewConsensusState(suite.clientTime, commitmenttypes.NewMerkleRoot(suite.header.Header.GetAppHash()), suite.valsHash) newHeader = suite.chainA.CreateTMClientHeader(chainID, int64(heightPlus5.VersionHeight), height, suite.headerTime, bothValSet, bothValSet, bothSigners) currentTime = suite.now @@ -178,7 +178,7 @@ func (suite *TendermintTestSuite) TestCheckHeaderAndUpdateState() { { name: "unsuccessful update: trusting period has passed since last client timestamp", setup: func() { - clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) + clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) consensusState = types.NewConsensusState(suite.clientTime, commitmenttypes.NewMerkleRoot(suite.header.Header.GetAppHash()), suite.valsHash) newHeader = suite.chainA.CreateTMClientHeader(chainID, int64(heightPlus1.VersionHeight), height, suite.headerTime, suite.valSet, suite.valSet, signers) // make current time pass trusting period from last timestamp on clientstate @@ -189,7 +189,7 @@ func (suite *TendermintTestSuite) TestCheckHeaderAndUpdateState() { { name: "unsuccessful update: header timestamp is past current timestamp", setup: func() { - clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) + clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) consensusState = types.NewConsensusState(suite.clientTime, commitmenttypes.NewMerkleRoot(suite.header.Header.GetAppHash()), suite.valsHash) newHeader = suite.chainA.CreateTMClientHeader(chainID, int64(heightPlus1.VersionHeight), height, suite.now.Add(time.Minute), suite.valSet, suite.valSet, signers) currentTime = suite.now @@ -199,7 +199,7 @@ func (suite *TendermintTestSuite) TestCheckHeaderAndUpdateState() { { name: "unsuccessful update: header timestamp is not past last client timestamp", setup: func() { - clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) + clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) consensusState = types.NewConsensusState(suite.clientTime, commitmenttypes.NewMerkleRoot(suite.header.Header.GetAppHash()), suite.valsHash) newHeader = suite.chainA.CreateTMClientHeader(chainID, int64(heightPlus1.VersionHeight), height, suite.clientTime, suite.valSet, suite.valSet, signers) currentTime = suite.now @@ -209,7 +209,7 @@ func (suite *TendermintTestSuite) TestCheckHeaderAndUpdateState() { { name: "header basic validation failed", setup: func() { - clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) + clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) consensusState = types.NewConsensusState(suite.clientTime, commitmenttypes.NewMerkleRoot(suite.header.Header.GetAppHash()), suite.valsHash) newHeader = suite.chainA.CreateTMClientHeader(chainID, int64(heightPlus1.VersionHeight), height, suite.headerTime, suite.valSet, suite.valSet, signers) // cause new header to fail validatebasic by changing commit height to mismatch header height @@ -221,7 +221,7 @@ func (suite *TendermintTestSuite) TestCheckHeaderAndUpdateState() { { name: "header height < consensus height", setup: func() { - clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, clienttypes.NewHeight(height.VersionNumber, heightPlus5.VersionHeight), ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) + clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, clienttypes.NewHeight(height.VersionNumber, heightPlus5.VersionHeight), commitmenttypes.GetSDKSpecs(), upgradePath, false, false) consensusState = types.NewConsensusState(suite.clientTime, commitmenttypes.NewMerkleRoot(suite.header.Header.GetAppHash()), suite.valsHash) // Make new header at height less than latest client state newHeader = suite.chainA.CreateTMClientHeader(chainID, int64(heightMinus1.VersionHeight), height, suite.headerTime, suite.valSet, suite.valSet, signers) diff --git a/x/ibc/light-clients/07-tendermint/types/upgrade.go b/x/ibc/light-clients/07-tendermint/types/upgrade.go index 34e00f9ccd..38373f1a95 100644 --- a/x/ibc/light-clients/07-tendermint/types/upgrade.go +++ b/x/ibc/light-clients/07-tendermint/types/upgrade.go @@ -85,7 +85,7 @@ func (cs ClientState) VerifyUpgradeAndUpdateState( // come from current client. updatedClientState := NewClientState( tmCommittedClient.ChainId, cs.TrustLevel, cs.TrustingPeriod, tmCommittedClient.UnbondingPeriod, - cs.MaxClockDrift, tmCommittedClient.LatestHeight, tmCommittedClient.ConsensusParams, tmCommittedClient.ProofSpecs, tmCommittedClient.UpgradePath, + cs.MaxClockDrift, tmCommittedClient.LatestHeight, tmCommittedClient.ProofSpecs, tmCommittedClient.UpgradePath, cs.AllowUpdateAfterExpiry, cs.AllowUpdateAfterMisbehaviour, ) diff --git a/x/ibc/light-clients/07-tendermint/types/upgrade_test.go b/x/ibc/light-clients/07-tendermint/types/upgrade_test.go index fea9f09cb2..06b5032732 100644 --- a/x/ibc/light-clients/07-tendermint/types/upgrade_test.go +++ b/x/ibc/light-clients/07-tendermint/types/upgrade_test.go @@ -5,7 +5,6 @@ import ( commitmenttypes "github.com/cosmos/cosmos-sdk/x/ibc/core/23-commitment/types" "github.com/cosmos/cosmos-sdk/x/ibc/core/exported" "github.com/cosmos/cosmos-sdk/x/ibc/light-clients/07-tendermint/types" - ibctesting "github.com/cosmos/cosmos-sdk/x/ibc/testing" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" ) @@ -26,7 +25,7 @@ func (suite *TendermintTestSuite) TestVerifyUpgrade() { name: "successful upgrade", setup: func() { - upgradedClient = types.NewClientState("newChainId", types.DefaultTrustLevel, trustingPeriod, ubdPeriod+trustingPeriod, maxClockDrift, newClientHeight, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) + upgradedClient = types.NewClientState("newChainId", types.DefaultTrustLevel, trustingPeriod, ubdPeriod+trustingPeriod, maxClockDrift, newClientHeight, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) // upgrade Height is at next block upgradeHeight = clienttypes.NewHeight(0, uint64(suite.chainB.GetContext().BlockHeight()+1)) @@ -51,7 +50,7 @@ func (suite *TendermintTestSuite) TestVerifyUpgrade() { name: "successful upgrade with different client chosen parameters set in upgraded client", setup: func() { - upgradedClient = types.NewClientState("newChainId", types.DefaultTrustLevel, trustingPeriod, ubdPeriod+trustingPeriod, maxClockDrift, newClientHeight, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) + upgradedClient = types.NewClientState("newChainId", types.DefaultTrustLevel, trustingPeriod, ubdPeriod+trustingPeriod, maxClockDrift, newClientHeight, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) // upgrade Height is at next block upgradeHeight = clienttypes.NewHeight(0, uint64(suite.chainB.GetContext().BlockHeight()+1)) @@ -60,7 +59,7 @@ func (suite *TendermintTestSuite) TestVerifyUpgrade() { suite.chainB.App.UpgradeKeeper.SetUpgradedClient(suite.chainB.GetContext(), int64(upgradeHeight.GetVersionHeight()), upgradedClient) // change upgradedClient client-specified parameters - upgradedClient = types.NewClientState("newChainId", types.DefaultTrustLevel, ubdPeriod, ubdPeriod+trustingPeriod, maxClockDrift+5, newClientHeight, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), upgradePath, true, false) + upgradedClient = types.NewClientState("newChainId", types.DefaultTrustLevel, ubdPeriod, ubdPeriod+trustingPeriod, maxClockDrift+5, newClientHeight, commitmenttypes.GetSDKSpecs(), upgradePath, true, false) suite.coordinator.CommitBlock(suite.chainB) err := suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) @@ -71,7 +70,7 @@ func (suite *TendermintTestSuite) TestVerifyUpgrade() { // Previous client-chosen parameters must be the same as upgraded client chosen parameters tmClient, _ := cs.(*types.ClientState) - oldClient := types.NewClientState(tmClient.ChainId, types.DefaultTrustLevel, ubdPeriod, ubdPeriod+trustingPeriod, maxClockDrift+5, tmClient.LatestHeight, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), upgradePath, true, false) + oldClient := types.NewClientState(tmClient.ChainId, types.DefaultTrustLevel, ubdPeriod, ubdPeriod+trustingPeriod, maxClockDrift+5, tmClient.LatestHeight, commitmenttypes.GetSDKSpecs(), upgradePath, true, false) suite.chainA.App.IBCKeeper.ClientKeeper.SetClientState(suite.chainA.GetContext(), clientA, oldClient) proofUpgrade, _ = suite.chainB.QueryUpgradeProof(upgradetypes.UpgradedClientKey(int64(upgradeHeight.GetVersionHeight())), cs.GetLatestHeight().GetVersionHeight()) @@ -82,7 +81,7 @@ func (suite *TendermintTestSuite) TestVerifyUpgrade() { name: "unsuccessful upgrade: upgrade height version does not match current client version", setup: func() { - upgradedClient = types.NewClientState("newChainId", types.DefaultTrustLevel, trustingPeriod, ubdPeriod+trustingPeriod, maxClockDrift, newClientHeight, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) + upgradedClient = types.NewClientState("newChainId", types.DefaultTrustLevel, trustingPeriod, ubdPeriod+trustingPeriod, maxClockDrift, newClientHeight, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) // upgrade Height is at next block upgradeHeight = clienttypes.NewHeight(10, uint64(suite.chainB.GetContext().BlockHeight()+1)) @@ -107,7 +106,7 @@ func (suite *TendermintTestSuite) TestVerifyUpgrade() { name: "unsuccessful upgrade: chain-specified parameters do not match committed client", setup: func() { - upgradedClient = types.NewClientState("newChainId", types.DefaultTrustLevel, trustingPeriod, ubdPeriod+trustingPeriod, maxClockDrift, newClientHeight, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) + upgradedClient = types.NewClientState("newChainId", types.DefaultTrustLevel, trustingPeriod, ubdPeriod+trustingPeriod, maxClockDrift, newClientHeight, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) // upgrade Height is at next block upgradeHeight = clienttypes.NewHeight(0, uint64(suite.chainB.GetContext().BlockHeight()+1)) @@ -116,7 +115,7 @@ func (suite *TendermintTestSuite) TestVerifyUpgrade() { suite.chainB.App.UpgradeKeeper.SetUpgradedClient(suite.chainB.GetContext(), int64(upgradeHeight.GetVersionHeight()), upgradedClient) // change upgradedClient client-specified parameters - upgradedClient = types.NewClientState("wrongchainID", types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, newClientHeight, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), upgradePath, true, true) + upgradedClient = types.NewClientState("wrongchainID", types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, newClientHeight, commitmenttypes.GetSDKSpecs(), upgradePath, true, true) suite.coordinator.CommitBlock(suite.chainB) err := suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) @@ -133,12 +132,12 @@ func (suite *TendermintTestSuite) TestVerifyUpgrade() { name: "unsuccessful upgrade: client-specified parameters do not match previous client", setup: func() { - upgradedClient = types.NewClientState("newChainId", types.DefaultTrustLevel, trustingPeriod, ubdPeriod+trustingPeriod, maxClockDrift, upgradeHeight, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) + upgradedClient = types.NewClientState("newChainId", types.DefaultTrustLevel, trustingPeriod, ubdPeriod+trustingPeriod, maxClockDrift, upgradeHeight, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) // zero custom fields and store in upgrade store suite.chainB.App.UpgradeKeeper.SetUpgradedClient(suite.chainB.GetContext(), int64(upgradeHeight.GetVersionHeight()), upgradedClient) // change upgradedClient client-specified parameters - upgradedClient = types.NewClientState("newChainId", types.DefaultTrustLevel, ubdPeriod, ubdPeriod+trustingPeriod, maxClockDrift+5, upgradeHeight, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), upgradePath, true, false) + upgradedClient = types.NewClientState("newChainId", types.DefaultTrustLevel, ubdPeriod, ubdPeriod+trustingPeriod, maxClockDrift+5, upgradeHeight, commitmenttypes.GetSDKSpecs(), upgradePath, true, false) suite.coordinator.CommitBlock(suite.chainB) err := suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) @@ -154,7 +153,7 @@ func (suite *TendermintTestSuite) TestVerifyUpgrade() { { name: "unsuccessful upgrade: proof is empty", setup: func() { - upgradedClient = types.NewClientState("newChainId", types.DefaultTrustLevel, trustingPeriod, ubdPeriod+trustingPeriod, maxClockDrift, newClientHeight, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) + upgradedClient = types.NewClientState("newChainId", types.DefaultTrustLevel, trustingPeriod, ubdPeriod+trustingPeriod, maxClockDrift, newClientHeight, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) proofUpgrade = []byte{} }, expPass: false, @@ -162,7 +161,7 @@ func (suite *TendermintTestSuite) TestVerifyUpgrade() { { name: "unsuccessful upgrade: proof unmarshal failed", setup: func() { - upgradedClient = types.NewClientState("newChainId", types.DefaultTrustLevel, trustingPeriod, ubdPeriod+trustingPeriod, maxClockDrift, newClientHeight, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) + upgradedClient = types.NewClientState("newChainId", types.DefaultTrustLevel, trustingPeriod, ubdPeriod+trustingPeriod, maxClockDrift, newClientHeight, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) proofUpgrade = []byte("proof") }, expPass: false, @@ -171,7 +170,7 @@ func (suite *TendermintTestSuite) TestVerifyUpgrade() { name: "unsuccessful upgrade: proof verification failed", setup: func() { // create but do not store upgraded client - upgradedClient = types.NewClientState("newChainId", types.DefaultTrustLevel, trustingPeriod, ubdPeriod+trustingPeriod, maxClockDrift, newClientHeight, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) + upgradedClient = types.NewClientState("newChainId", types.DefaultTrustLevel, trustingPeriod, ubdPeriod+trustingPeriod, maxClockDrift, newClientHeight, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) // upgrade Height is at next block upgradeHeight = clienttypes.NewHeight(0, uint64(suite.chainB.GetContext().BlockHeight()+1)) @@ -187,7 +186,7 @@ func (suite *TendermintTestSuite) TestVerifyUpgrade() { name: "unsuccessful upgrade: upgrade path is empty", setup: func() { - upgradedClient = types.NewClientState("newChainId", types.DefaultTrustLevel, trustingPeriod, ubdPeriod+trustingPeriod, maxClockDrift, newClientHeight, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) + upgradedClient = types.NewClientState("newChainId", types.DefaultTrustLevel, trustingPeriod, ubdPeriod+trustingPeriod, maxClockDrift, newClientHeight, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) // upgrade Height is at next block upgradeHeight = clienttypes.NewHeight(0, uint64(suite.chainB.GetContext().BlockHeight()+1)) @@ -217,7 +216,7 @@ func (suite *TendermintTestSuite) TestVerifyUpgrade() { name: "unsuccessful upgrade: upgrade path is malformed and cannot be correctly unescaped", setup: func() { - upgradedClient = types.NewClientState("newChainId", types.DefaultTrustLevel, trustingPeriod, ubdPeriod+trustingPeriod, maxClockDrift, newClientHeight, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) + upgradedClient = types.NewClientState("newChainId", types.DefaultTrustLevel, trustingPeriod, ubdPeriod+trustingPeriod, maxClockDrift, newClientHeight, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) // upgrade Height is at next block upgradeHeight = clienttypes.NewHeight(0, uint64(suite.chainB.GetContext().BlockHeight()+1)) @@ -247,7 +246,7 @@ func (suite *TendermintTestSuite) TestVerifyUpgrade() { name: "unsuccessful upgrade: upgraded height is not greater than current height", setup: func() { - upgradedClient = types.NewClientState("newChainId", types.DefaultTrustLevel, trustingPeriod, ubdPeriod+trustingPeriod, maxClockDrift, height, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) + upgradedClient = types.NewClientState("newChainId", types.DefaultTrustLevel, trustingPeriod, ubdPeriod+trustingPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) // upgrade Height is at next block upgradeHeight = clienttypes.NewHeight(0, uint64(suite.chainB.GetContext().BlockHeight()+1)) @@ -272,7 +271,7 @@ func (suite *TendermintTestSuite) TestVerifyUpgrade() { name: "unsuccessful upgrade: consensus state for upgrade height cannot be found", setup: func() { - upgradedClient = types.NewClientState("newChainId", types.DefaultTrustLevel, trustingPeriod, ubdPeriod+trustingPeriod, maxClockDrift, newClientHeight, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) + upgradedClient = types.NewClientState("newChainId", types.DefaultTrustLevel, trustingPeriod, ubdPeriod+trustingPeriod, maxClockDrift, newClientHeight, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) // upgrade Height is at next block upgradeHeight = clienttypes.NewHeight(0, uint64(suite.chainB.GetContext().BlockHeight()+100)) @@ -297,7 +296,7 @@ func (suite *TendermintTestSuite) TestVerifyUpgrade() { name: "unsuccessful upgrade: client is expired", setup: func() { - upgradedClient = types.NewClientState("newChainId", types.DefaultTrustLevel, trustingPeriod, ubdPeriod+trustingPeriod, maxClockDrift, upgradeHeight, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) + upgradedClient = types.NewClientState("newChainId", types.DefaultTrustLevel, trustingPeriod, ubdPeriod+trustingPeriod, maxClockDrift, upgradeHeight, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) // zero custom fields and store in upgrade store suite.chainB.App.UpgradeKeeper.SetUpgradedClient(suite.chainB.GetContext(), int64(upgradeHeight.GetVersionHeight()), upgradedClient) @@ -321,7 +320,7 @@ func (suite *TendermintTestSuite) TestVerifyUpgrade() { name: "unsuccessful upgrade: updated unbonding period is equal to trusting period", setup: func() { - upgradedClient = types.NewClientState("newChainId", types.DefaultTrustLevel, trustingPeriod, trustingPeriod, maxClockDrift, newClientHeight, ibctesting.DefaultConsensusParams, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) + upgradedClient = types.NewClientState("newChainId", types.DefaultTrustLevel, trustingPeriod, trustingPeriod, maxClockDrift, newClientHeight, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) // upgrade Height is at next block upgradeHeight = clienttypes.NewHeight(0, uint64(suite.chainB.GetContext().BlockHeight()+1)) diff --git a/x/ibc/testing/chain.go b/x/ibc/testing/chain.go index bba056f459..2d3172b938 100644 --- a/x/ibc/testing/chain.go +++ b/x/ibc/testing/chain.go @@ -60,8 +60,6 @@ const ( ) var ( - DefaultConsensusParams = simapp.DefaultConsensusParams - DefaultOpenInitVersion *connectiontypes.Version // Default params variables used to create a TM client @@ -75,14 +73,6 @@ var ( MockAcknowledgement = mock.MockAcknowledgement MockCommitment = mock.MockCommitment - - // Conditionals for expected output of executing messages. - // Change values to false to test messages expected to fail. - // Reset to true otherwise successful messages will error. - // Use in rare cases, will be deprecated in favor of better - // dev ux. - ExpSimPassSend = true - ExpPassSend = true ) // TestChain is a testing struct that wraps a simapp with the last TM Header, the current ABCI @@ -178,8 +168,7 @@ func NewTestChain(t *testing.T, chainID string) *TestChain { // GetContext returns the current context for the application. func (chain *TestChain) GetContext() sdk.Context { - ctx := chain.App.BaseApp.NewContext(false, chain.CurrentHeader) - return ctx.WithConsensusParams(DefaultConsensusParams) + return chain.App.BaseApp.NewContext(false, chain.CurrentHeader) } // QueryProof performs an abci query with the given key and returns the proto encoded merkle proof @@ -299,7 +288,7 @@ func (chain *TestChain) SendMsgs(msgs ...sdk.Msg) (*sdk.Result, error) { chain.ChainID, []uint64{chain.SenderAccount.GetAccountNumber()}, []uint64{chain.SenderAccount.GetSequence()}, - ExpSimPassSend, ExpPassSend, chain.senderPrivKey, + true, true, chain.senderPrivKey, ) if err != nil { return nil, err @@ -431,8 +420,7 @@ func (chain *TestChain) ConstructMsgCreateClient(counterparty *TestChain, client height := counterparty.LastHeader.GetHeight().(clienttypes.Height) clientState = ibctmtypes.NewClientState( counterparty.ChainID, DefaultTrustLevel, TrustingPeriod, UnbondingPeriod, MaxClockDrift, - height, counterparty.App.GetConsensusParams(counterparty.GetContext()), commitmenttypes.GetSDKSpecs(), - UpgradePath, false, false, + height, commitmenttypes.GetSDKSpecs(), UpgradePath, false, false, ) consensusState = counterparty.LastHeader.ConsensusState() case exported.Solomachine: From f3e4964f2f9cdf5d65c819d689950bffec728c65 Mon Sep 17 00:00:00 2001 From: MD Aleem <72057206+aleem1413@users.noreply.github.com> Date: Thu, 12 Nov 2020 19:52:54 +0530 Subject: [PATCH 086/136] Add TxsByEvent gRPC endpoint (#7842) * add service definition for TxsByEvents * add TxsByEvent gRPC endpoint * fix lint * fix test * review changes * review changes * fix proto descriptions * review changes * fix lint * review changes * Update proto/cosmos/tx/v1beta1/service.proto * review changes Co-authored-by: Aleksandr Bezobchuk Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- proto/cosmos/tx/v1beta1/service.proto | 34 +- types/query/filtered_pagination.go | 2 +- types/query/pagination.go | 8 +- types/tx/service.pb.go | 722 ++++++++++++++++++++++++-- types/tx/service.pb.gw.go | 80 +++ x/auth/tx/service.go | 110 +++- x/auth/tx/service_test.go | 54 +- 7 files changed, 967 insertions(+), 43 deletions(-) diff --git a/proto/cosmos/tx/v1beta1/service.proto b/proto/cosmos/tx/v1beta1/service.proto index eb7784001c..99cfbcd719 100644 --- a/proto/cosmos/tx/v1beta1/service.proto +++ b/proto/cosmos/tx/v1beta1/service.proto @@ -4,6 +4,7 @@ package cosmos.tx.v1beta1; import "google/api/annotations.proto"; import "cosmos/base/abci/v1beta1/abci.proto"; import "cosmos/tx/v1beta1/tx.proto"; +import "cosmos/base/query/v1beta1/pagination.proto"; option go_package = "github.com/cosmos/cosmos-sdk/types/tx"; @@ -17,6 +18,31 @@ service Service { rpc GetTx(GetTxRequest) returns (GetTxResponse) { option (google.api.http).get = "/cosmos/tx/v1beta1/tx/{hash}"; } + + // GetTxsEvent fetches txs by event. + rpc GetTxsEvent(GetTxsEventRequest) returns (GetTxsEventResponse) { + option (google.api.http).get = "/cosmos/tx/v1beta1/txs"; + } +} + +// GetTxsEventRequest is the request type for the Service.TxsByEvents +// RPC method. +message GetTxsEventRequest { + // event is the transaction event type. + string event = 1; + // pagination defines an pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +// GetTxsEventResponse is the response type for the Service.TxsByEvents +// RPC method. +message GetTxsEventResponse { + // txs is the list of queried transactions. + repeated cosmos.tx.v1beta1.Tx txs = 1; + // tx_responses is the list of queried TxResponses. + repeated cosmos.base.abci.v1beta1.TxResponse tx_responses = 2; + // pagination defines an pagination for the response. + cosmos.base.query.v1beta1.PageResponse pagination = 3; } // SimulateRequest is the request type for the Service.Simulate @@ -35,15 +61,17 @@ message SimulateResponse { cosmos.base.abci.v1beta1.Result result = 2; } -// GetTx is the request type for the Service.GetTx +// GetTxRequest is the request type for the Service.GetTx // RPC method. message GetTxRequest { // hash is the tx hash to query, encoded as a hex string. string hash = 1; } - + // GetTxResponse is the response type for the Service.GetTx method. message GetTxResponse { // tx is the queried transaction. cosmos.tx.v1beta1.Tx tx = 1; -} + // tx_response is the queried TxResponses. + cosmos.base.abci.v1beta1.TxResponse tx_response = 2; +} \ No newline at end of file diff --git a/types/query/filtered_pagination.go b/types/query/filtered_pagination.go index fe8a905a68..0ab29a4acd 100644 --- a/types/query/filtered_pagination.go +++ b/types/query/filtered_pagination.go @@ -35,7 +35,7 @@ func FilteredPaginate( } if limit == 0 { - limit = defaultLimit + limit = DefaultLimit // count total results when the limit is zero/not supplied countTotal = true diff --git a/types/query/pagination.go b/types/query/pagination.go index b263a1ba4a..3963add364 100644 --- a/types/query/pagination.go +++ b/types/query/pagination.go @@ -6,9 +6,9 @@ import ( "github.com/cosmos/cosmos-sdk/store/types" ) -// defaultLimit is the default `limit` for queries -// if the `limit` is not supplied, paginate will use `defaultLimit` -const defaultLimit = 100 +// DefaultLimit is the default `limit` for queries +// if the `limit` is not supplied, paginate will use `DefaultLimit` +const DefaultLimit = 100 // Paginate does pagination of all the results in the PrefixStore based on the // provided PageRequest. onResult should be used to do actual unmarshaling. @@ -33,7 +33,7 @@ func Paginate( } if limit == 0 { - limit = defaultLimit + limit = DefaultLimit // count total results when the limit is zero/not supplied countTotal = true diff --git a/types/tx/service.pb.go b/types/tx/service.pb.go index ae691fd627..2302593c5c 100644 --- a/types/tx/service.pb.go +++ b/types/tx/service.pb.go @@ -7,6 +7,7 @@ import ( context "context" fmt "fmt" types "github.com/cosmos/cosmos-sdk/types" + query "github.com/cosmos/cosmos-sdk/types/query" grpc1 "github.com/gogo/protobuf/grpc" proto "github.com/gogo/protobuf/proto" _ "google.golang.org/genproto/googleapis/api/annotations" @@ -29,6 +30,127 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +// GetTxsEventRequest is the request type for the Service.TxsByEvents +// RPC method. +type GetTxsEventRequest struct { + // event is the transaction event type. + Event string `protobuf:"bytes,1,opt,name=event,proto3" json:"event,omitempty"` + // pagination defines an pagination for the request. + Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *GetTxsEventRequest) Reset() { *m = GetTxsEventRequest{} } +func (m *GetTxsEventRequest) String() string { return proto.CompactTextString(m) } +func (*GetTxsEventRequest) ProtoMessage() {} +func (*GetTxsEventRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_e0b00a618705eca7, []int{0} +} +func (m *GetTxsEventRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetTxsEventRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetTxsEventRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GetTxsEventRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetTxsEventRequest.Merge(m, src) +} +func (m *GetTxsEventRequest) XXX_Size() int { + return m.Size() +} +func (m *GetTxsEventRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GetTxsEventRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_GetTxsEventRequest proto.InternalMessageInfo + +func (m *GetTxsEventRequest) GetEvent() string { + if m != nil { + return m.Event + } + return "" +} + +func (m *GetTxsEventRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + +// GetTxsEventResponse is the response type for the Service.TxsByEvents +// RPC method. +type GetTxsEventResponse struct { + // txs is the list of queried transactions. + Txs []*Tx `protobuf:"bytes,1,rep,name=txs,proto3" json:"txs,omitempty"` + // tx_responses is the list of queried TxResponses. + TxResponses []*types.TxResponse `protobuf:"bytes,2,rep,name=tx_responses,json=txResponses,proto3" json:"tx_responses,omitempty"` + // pagination defines an pagination for the response. + Pagination *query.PageResponse `protobuf:"bytes,3,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *GetTxsEventResponse) Reset() { *m = GetTxsEventResponse{} } +func (m *GetTxsEventResponse) String() string { return proto.CompactTextString(m) } +func (*GetTxsEventResponse) ProtoMessage() {} +func (*GetTxsEventResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_e0b00a618705eca7, []int{1} +} +func (m *GetTxsEventResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetTxsEventResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetTxsEventResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GetTxsEventResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetTxsEventResponse.Merge(m, src) +} +func (m *GetTxsEventResponse) XXX_Size() int { + return m.Size() +} +func (m *GetTxsEventResponse) XXX_DiscardUnknown() { + xxx_messageInfo_GetTxsEventResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_GetTxsEventResponse proto.InternalMessageInfo + +func (m *GetTxsEventResponse) GetTxs() []*Tx { + if m != nil { + return m.Txs + } + return nil +} + +func (m *GetTxsEventResponse) GetTxResponses() []*types.TxResponse { + if m != nil { + return m.TxResponses + } + return nil +} + +func (m *GetTxsEventResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + // SimulateRequest is the request type for the Service.Simulate // RPC method. type SimulateRequest struct { @@ -40,7 +162,7 @@ func (m *SimulateRequest) Reset() { *m = SimulateRequest{} } func (m *SimulateRequest) String() string { return proto.CompactTextString(m) } func (*SimulateRequest) ProtoMessage() {} func (*SimulateRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_e0b00a618705eca7, []int{0} + return fileDescriptor_e0b00a618705eca7, []int{2} } func (m *SimulateRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -89,7 +211,7 @@ func (m *SimulateResponse) Reset() { *m = SimulateResponse{} } func (m *SimulateResponse) String() string { return proto.CompactTextString(m) } func (*SimulateResponse) ProtoMessage() {} func (*SimulateResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_e0b00a618705eca7, []int{1} + return fileDescriptor_e0b00a618705eca7, []int{3} } func (m *SimulateResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -132,7 +254,7 @@ func (m *SimulateResponse) GetResult() *types.Result { return nil } -// GetTx is the request type for the Service.GetTx +// GetTxRequest is the request type for the Service.GetTx // RPC method. type GetTxRequest struct { // hash is the tx hash to query, encoded as a hex string. @@ -143,7 +265,7 @@ func (m *GetTxRequest) Reset() { *m = GetTxRequest{} } func (m *GetTxRequest) String() string { return proto.CompactTextString(m) } func (*GetTxRequest) ProtoMessage() {} func (*GetTxRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_e0b00a618705eca7, []int{2} + return fileDescriptor_e0b00a618705eca7, []int{4} } func (m *GetTxRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -183,13 +305,15 @@ func (m *GetTxRequest) GetHash() string { type GetTxResponse struct { // tx is the queried transaction. Tx *Tx `protobuf:"bytes,1,opt,name=tx,proto3" json:"tx,omitempty"` + // tx_response is the queried TxResponses. + TxResponse *types.TxResponse `protobuf:"bytes,2,opt,name=tx_response,json=txResponse,proto3" json:"tx_response,omitempty"` } func (m *GetTxResponse) Reset() { *m = GetTxResponse{} } func (m *GetTxResponse) String() string { return proto.CompactTextString(m) } func (*GetTxResponse) ProtoMessage() {} func (*GetTxResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_e0b00a618705eca7, []int{3} + return fileDescriptor_e0b00a618705eca7, []int{5} } func (m *GetTxResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -225,7 +349,16 @@ func (m *GetTxResponse) GetTx() *Tx { return nil } +func (m *GetTxResponse) GetTxResponse() *types.TxResponse { + if m != nil { + return m.TxResponse + } + return nil +} + func init() { + proto.RegisterType((*GetTxsEventRequest)(nil), "cosmos.tx.v1beta1.GetTxsEventRequest") + proto.RegisterType((*GetTxsEventResponse)(nil), "cosmos.tx.v1beta1.GetTxsEventResponse") proto.RegisterType((*SimulateRequest)(nil), "cosmos.tx.v1beta1.SimulateRequest") proto.RegisterType((*SimulateResponse)(nil), "cosmos.tx.v1beta1.SimulateResponse") proto.RegisterType((*GetTxRequest)(nil), "cosmos.tx.v1beta1.GetTxRequest") @@ -235,33 +368,43 @@ func init() { func init() { proto.RegisterFile("cosmos/tx/v1beta1/service.proto", fileDescriptor_e0b00a618705eca7) } var fileDescriptor_e0b00a618705eca7 = []byte{ - // 404 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0x31, 0x6b, 0xdb, 0x40, - 0x1c, 0xc5, 0x2d, 0xd1, 0xda, 0xee, 0xb5, 0xa5, 0xed, 0x41, 0xc1, 0xa8, 0xae, 0xec, 0x9e, 0x6b, - 0xe8, 0x52, 0x1d, 0x76, 0xa1, 0x78, 0x08, 0x04, 0xb2, 0x98, 0xac, 0xb2, 0xa7, 0x2c, 0xe1, 0xa4, - 0x9c, 0x65, 0x11, 0x5b, 0xa7, 0xf8, 0x4e, 0xe6, 0x42, 0xc8, 0x92, 0x31, 0x53, 0x20, 0x5f, 0x2a, - 0xa3, 0x21, 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21, 0xf0, 0xa9, 0x4f, 0xc5, 0x50, 0xe6, 0x1d, - 0x20, 0x78, 0x37, 0x26, 0x7c, 0xac, 0x32, 0x7c, 0x70, 0xd5, 0x19, 0xfd, 0x07, 0x9f, 0xb5, 0x46, - 0x87, 0x7d, 0x5b, 0xd1, 0xee, 0xbd, 0x01, 0x2a, 0x83, 0xec, 0x37, 0x41, 0x09, 0xaa, 0x79, 0x67, - 0x88, 0x0a, 0x2c, 0x2f, 0xee, 0xd2, 0x6a, 0xbd, 0xaa, 0xc9, 0x72, 0xa0, 0xd6, 0xd9, 0xf5, 0xdd, - 0xa5, 0xf9, 0x13, 0xfd, 0xc0, 0x05, 0xfb, 0x91, 0x4f, 0x8b, 0xc1, 0x7b, 0x95, 0x1e, 0x36, 0x0a, - 0x90, 0xcf, 0xbb, 0x5b, 0xcd, 0xcd, 0x02, 0x3d, 0xf0, 0xb7, 0x1a, 0x68, 0xc3, 0x3a, 0x2e, 0xda, - 0x0c, 0x7c, 0x92, 0x5e, 0xd7, 0xe9, 0xce, 0xf6, 0xd5, 0xd2, 0x36, 0x16, 0x4b, 0xdb, 0xb8, 0x5d, - 0xda, 0xc6, 0xc5, 0xca, 0x2e, 0x2d, 0x56, 0x76, 0xe9, 0x66, 0x65, 0x97, 0xf6, 0xda, 0x41, 0x28, - 0xc6, 0x89, 0xe7, 0xf8, 0x6c, 0x9a, 0x13, 0xb2, 0xc7, 0x5f, 0x7e, 0x70, 0x88, 0xc5, 0x71, 0x4c, - 0x53, 0xa4, 0x57, 0x56, 0x2b, 0xf6, 0xef, 0x21, 0x00, 0x00, 0xff, 0xff, 0x0f, 0x4c, 0x40, 0xff, - 0xf7, 0x02, 0x00, 0x00, + // 563 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x54, 0xcd, 0x6e, 0xd3, 0x40, + 0x10, 0xae, 0x1d, 0xfa, 0xc3, 0xa4, 0x08, 0x58, 0x7e, 0x14, 0x99, 0xe2, 0x06, 0xa7, 0x69, 0x23, + 0x24, 0xbc, 0x6a, 0xb8, 0xf4, 0x80, 0x84, 0x84, 0x54, 0x22, 0x6e, 0xc8, 0xed, 0x89, 0x4b, 0xb5, + 0x09, 0x5b, 0xc7, 0x22, 0xf1, 0xba, 0xde, 0x4d, 0xb4, 0x15, 0xf4, 0xc2, 0x91, 0x13, 0x12, 0x2f, + 0xc5, 0x31, 0x12, 0x17, 0x8e, 0x28, 0xe1, 0x0d, 0x78, 0x01, 0xe4, 0xf5, 0x3a, 0x71, 0xa8, 0x4d, + 0x7b, 0xf2, 0xae, 0xfc, 0xfd, 0xcc, 0x37, 0xe3, 0x31, 0x6c, 0xf7, 0x18, 0x1f, 0x32, 0x8e, 0x85, + 0xc4, 0xe3, 0xfd, 0x2e, 0x15, 0x64, 0x1f, 0x73, 0x1a, 0x8f, 0x83, 0x1e, 0x75, 0xa3, 0x98, 0x09, + 0x86, 0xee, 0xa6, 0x00, 0x57, 0x48, 0x57, 0x03, 0xac, 0x2d, 0x9f, 0x31, 0x7f, 0x40, 0x31, 0x89, + 0x02, 0x4c, 0xc2, 0x90, 0x09, 0x22, 0x02, 0x16, 0xf2, 0x94, 0x60, 0x35, 0xb4, 0x62, 0x97, 0x70, + 0x8a, 0x49, 0xb7, 0x17, 0xcc, 0x85, 0x93, 0x8b, 0x06, 0x59, 0x97, 0x6d, 0x85, 0xd4, 0xef, 0x9e, + 0xe6, 0x05, 0xce, 0x46, 0x34, 0x3e, 0x9f, 0x63, 0x22, 0xe2, 0x07, 0xa1, 0x72, 0x4b, 0xb1, 0x4e, + 0x0c, 0xa8, 0x43, 0xc5, 0xb1, 0xe4, 0x87, 0x63, 0x1a, 0x0a, 0x8f, 0x9e, 0x8d, 0x28, 0x17, 0xe8, + 0x3e, 0xac, 0xd2, 0xe4, 0x5e, 0x33, 0xea, 0x46, 0xeb, 0xa6, 0x97, 0x5e, 0xd0, 0x6b, 0x80, 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 0x5e, 0x2f, 0x28, 0x3a, 0x84, 0x6a, 0x6e, 0x68, 0xba, 0xb4, + 0xeb, 0xcd, 0x0c, 0x16, 0x33, 0x6b, 0xff, 0x31, 0x61, 0xfd, 0x28, 0x5d, 0x30, 0x24, 0x61, 0x23, + 0x6b, 0x1d, 0x72, 0x0a, 0x9c, 0xff, 0x19, 0x89, 0xd5, 0xf8, 0x2f, 0x26, 0x35, 0x70, 0x1a, 0x9f, + 0x7f, 0xfc, 0xfe, 0x66, 0x3e, 0x76, 0x1e, 0xe1, 0x82, 0xcd, 0xce, 0xdc, 0x22, 0x58, 0x55, 0x4d, + 0x40, 0xdb, 0x05, 0x92, 0xf9, 0x16, 0x5a, 0xf5, 0x72, 0x80, 0x36, 0xdc, 0x51, 0x86, 0x36, 0xda, + 0xc2, 0x45, 0x3b, 0x8d, 0x3f, 0x26, 0x5d, 0xbf, 0x40, 0x9f, 0xa0, 0x9a, 0xdb, 0x19, 0xd4, 0x2c, + 0x93, 0x5d, 0x5a, 0x64, 0x6b, 0xf7, 0x2a, 0x98, 0xae, 0xc1, 0x56, 0x35, 0xd4, 0xd0, 0xc3, 0xc2, + 0x1a, 0xf8, 0xab, 0x97, 0xdf, 0xa7, 0xb6, 0x31, 0x99, 0xda, 0xc6, 0xaf, 0xa9, 0x6d, 0x7c, 0x9d, + 0xd9, 0x2b, 0x93, 0x99, 0xbd, 0xf2, 0x73, 0x66, 0xaf, 0xbc, 0x6b, 0xfa, 0x81, 0xe8, 0x8f, 0xba, + 0x6e, 0x8f, 0x0d, 0x33, 0x6e, 0xfa, 0x78, 0xc6, 0xdf, 0x7f, 0xc0, 0xe2, 0x3c, 0xa2, 0x89, 0x58, + 0x77, 0x4d, 0xfd, 0x6e, 0x9e, 0xff, 0x0d, 0x00, 0x00, 0xff, 0xff, 0xae, 0x63, 0xf9, 0x38, 0x2f, + 0x05, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -280,6 +423,8 @@ type ServiceClient interface { Simulate(ctx context.Context, in *SimulateRequest, opts ...grpc.CallOption) (*SimulateResponse, error) // GetTx fetches a tx by hash. GetTx(ctx context.Context, in *GetTxRequest, opts ...grpc.CallOption) (*GetTxResponse, error) + // GetTxsEvent fetches txs by event. + GetTxsEvent(ctx context.Context, in *GetTxsEventRequest, opts ...grpc.CallOption) (*GetTxsEventResponse, error) } type serviceClient struct { @@ -308,12 +453,23 @@ func (c *serviceClient) GetTx(ctx context.Context, in *GetTxRequest, opts ...grp return out, nil } +func (c *serviceClient) GetTxsEvent(ctx context.Context, in *GetTxsEventRequest, opts ...grpc.CallOption) (*GetTxsEventResponse, error) { + out := new(GetTxsEventResponse) + err := c.cc.Invoke(ctx, "/cosmos.tx.v1beta1.Service/GetTxsEvent", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // ServiceServer is the server API for Service service. type ServiceServer interface { // Simulate simulates executing a transaction for estimating gas usage. Simulate(context.Context, *SimulateRequest) (*SimulateResponse, error) // GetTx fetches a tx by hash. GetTx(context.Context, *GetTxRequest) (*GetTxResponse, error) + // GetTxsEvent fetches txs by event. + GetTxsEvent(context.Context, *GetTxsEventRequest) (*GetTxsEventResponse, error) } // UnimplementedServiceServer can be embedded to have forward compatible implementations. @@ -326,6 +482,9 @@ func (*UnimplementedServiceServer) Simulate(ctx context.Context, req *SimulateRe func (*UnimplementedServiceServer) GetTx(ctx context.Context, req *GetTxRequest) (*GetTxResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetTx not implemented") } +func (*UnimplementedServiceServer) GetTxsEvent(ctx context.Context, req *GetTxsEventRequest) (*GetTxsEventResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetTxsEvent not implemented") +} func RegisterServiceServer(s grpc1.Server, srv ServiceServer) { s.RegisterService(&_Service_serviceDesc, srv) @@ -367,6 +526,24 @@ func _Service_GetTx_Handler(srv interface{}, ctx context.Context, dec func(inter return interceptor(ctx, in, info, handler) } +func _Service_GetTxsEvent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetTxsEventRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ServiceServer).GetTxsEvent(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.tx.v1beta1.Service/GetTxsEvent", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ServiceServer).GetTxsEvent(ctx, req.(*GetTxsEventRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _Service_serviceDesc = grpc.ServiceDesc{ ServiceName: "cosmos.tx.v1beta1.Service", HandlerType: (*ServiceServer)(nil), @@ -379,11 +556,120 @@ var _Service_serviceDesc = grpc.ServiceDesc{ MethodName: "GetTx", Handler: _Service_GetTx_Handler, }, + { + MethodName: "GetTxsEvent", + Handler: _Service_GetTxsEvent_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "cosmos/tx/v1beta1/service.proto", } +func (m *GetTxsEventRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetTxsEventRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetTxsEventRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Event) > 0 { + i -= len(m.Event) + copy(dAtA[i:], m.Event) + i = encodeVarintService(dAtA, i, uint64(len(m.Event))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetTxsEventResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetTxsEventResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetTxsEventResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if len(m.TxResponses) > 0 { + for iNdEx := len(m.TxResponses) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.TxResponses[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.Txs) > 0 { + for iNdEx := len(m.Txs) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Txs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + func (m *SimulateRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -516,6 +802,18 @@ func (m *GetTxResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.TxResponse != nil { + { + size, err := m.TxResponse.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } if m.Tx != nil { { size, err := m.Tx.MarshalToSizedBuffer(dAtA[:i]) @@ -542,6 +840,48 @@ func encodeVarintService(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } +func (m *GetTxsEventRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Event) + if l > 0 { + n += 1 + l + sovService(uint64(l)) + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovService(uint64(l)) + } + return n +} + +func (m *GetTxsEventResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Txs) > 0 { + for _, e := range m.Txs { + l = e.Size() + n += 1 + l + sovService(uint64(l)) + } + } + if len(m.TxResponses) > 0 { + for _, e := range m.TxResponses { + l = e.Size() + n += 1 + l + sovService(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovService(uint64(l)) + } + return n +} + func (m *SimulateRequest) Size() (n int) { if m == nil { return 0 @@ -595,6 +935,10 @@ func (m *GetTxResponse) Size() (n int) { l = m.Tx.Size() n += 1 + l + sovService(uint64(l)) } + if m.TxResponse != nil { + l = m.TxResponse.Size() + n += 1 + l + sovService(uint64(l)) + } return n } @@ -604,6 +948,284 @@ func sovService(x uint64) (n int) { func sozService(x uint64) (n int) { return sovService(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } +func (m *GetTxsEventRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetTxsEventRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetTxsEventRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Event", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Event = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageRequest{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetTxsEventResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetTxsEventResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetTxsEventResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Txs", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Txs = append(m.Txs, &Tx{}) + if err := m.Txs[len(m.Txs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TxResponses", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TxResponses = append(m.TxResponses, &types.TxResponse{}) + if err := m.TxResponses[len(m.TxResponses)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipService(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *SimulateRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -968,6 +1590,42 @@ func (m *GetTxResponse) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TxResponse", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.TxResponse == nil { + m.TxResponse = &types.TxResponse{} + } + if err := m.TxResponse.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipService(dAtA[iNdEx:]) diff --git a/types/tx/service.pb.gw.go b/types/tx/service.pb.gw.go index 270036363a..a7d5b56c5e 100644 --- a/types/tx/service.pb.gw.go +++ b/types/tx/service.pb.gw.go @@ -121,6 +121,42 @@ func local_request_Service_GetTx_0(ctx context.Context, marshaler runtime.Marsha } +var ( + filter_Service_GetTxsEvent_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Service_GetTxsEvent_0(ctx context.Context, marshaler runtime.Marshaler, client ServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetTxsEventRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Service_GetTxsEvent_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetTxsEvent(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Service_GetTxsEvent_0(ctx context.Context, marshaler runtime.Marshaler, server ServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetTxsEventRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Service_GetTxsEvent_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetTxsEvent(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterServiceHandlerServer registers the http handlers for service Service to "mux". // UnaryRPC :call ServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -167,6 +203,26 @@ func RegisterServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, se }) + mux.Handle("GET", pattern_Service_GetTxsEvent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Service_GetTxsEvent_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Service_GetTxsEvent_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -248,6 +304,26 @@ func RegisterServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl }) + mux.Handle("GET", pattern_Service_GetTxsEvent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Service_GetTxsEvent_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Service_GetTxsEvent_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -255,10 +331,14 @@ var ( pattern_Service_Simulate_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"cosmos", "tx", "v1beta1", "simulate"}, "", runtime.AssumeColonVerbOpt(true))) pattern_Service_GetTx_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 1, 1, 0, 4, 1, 5, 3}, []string{"cosmos", "tx", "v1beta1", "hash"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Service_GetTxsEvent_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"cosmos", "tx", "v1beta1", "txs"}, "", runtime.AssumeColonVerbOpt(true))) ) var ( forward_Service_Simulate_0 = runtime.ForwardResponseMessage forward_Service_GetTx_0 = runtime.ForwardResponseMessage + + forward_Service_GetTxsEvent_0 = runtime.ForwardResponseMessage ) diff --git a/x/auth/tx/service.go b/x/auth/tx/service.go index d430dc2b0a..b12808a164 100644 --- a/x/auth/tx/service.go +++ b/x/auth/tx/service.go @@ -3,16 +3,22 @@ package tx import ( "context" "encoding/hex" + "fmt" + "strings" gogogrpc "github.com/gogo/protobuf/grpc" "github.com/grpc-ecosystem/grpc-gateway/runtime" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" + abci "github.com/tendermint/tendermint/abci/types" + tmtypes "github.com/tendermint/tendermint/types" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" + pagination "github.com/cosmos/cosmos-sdk/types/query" txtypes "github.com/cosmos/cosmos-sdk/types/tx" ) @@ -37,6 +43,89 @@ func NewTxServer(clientCtx client.Context, simulate baseAppSimulateFn, interface var _ txtypes.ServiceServer = txServer{} +const ( + eventFormat = "{eventType}.{eventAttribute}={value}" +) + +// TxsByEvents implements the ServiceServer.TxsByEvents RPC method. +func (s txServer) GetTxsEvent(ctx context.Context, req *txtypes.GetTxsEventRequest) (*txtypes.GetTxsEventResponse, error) { + offset := int(req.Pagination.Offset) + limit := int(req.Pagination.Limit) + if offset < 0 { + return nil, status.Error(codes.InvalidArgument, "offset must greater than 0") + } + if len(req.Event) == 0 { + return nil, status.Error(codes.InvalidArgument, "must declare at least one event to search") + } + + if limit < 0 { + return nil, status.Error(codes.InvalidArgument, "limit must greater than 0") + } else if limit == 0 { + limit = pagination.DefaultLimit + } + + page := offset/limit + 1 + + var events []string + + if strings.Contains(req.Event, "&") { + events = strings.Split(req.Event, "&") + } else { + events = append(events, req.Event) + } + tmEvents := make([]string, len(events)) + for i, event := range events { + if !strings.Contains(event, "=") { + return nil, status.Error(codes.InvalidArgument, fmt.Sprintf("invalid event; event %s should be of the format: %s", event, eventFormat)) + } else if strings.Count(event, "=") > 1 { + return nil, status.Error(codes.InvalidArgument, fmt.Sprintf("invalid event; event %s should be of the format: %s", event, eventFormat)) + } + + tokens := strings.Split(event, "=") + if tokens[0] == tmtypes.TxHeightKey { + event = fmt.Sprintf("%s=%s", tokens[0], tokens[1]) + } else { + event = fmt.Sprintf("%s='%s'", tokens[0], tokens[1]) + } + + tmEvents[i] = event + } + + query := strings.Join(tmEvents, " AND ") + + result, err := s.clientCtx.Client.TxSearch(ctx, query, false, &page, &limit, "") + if err != nil { + return nil, err + } + + // Create a proto codec, we need it to unmarshal the tx bytes. + cdc := codec.NewProtoCodec(s.clientCtx.InterfaceRegistry) + txRespList := make([]*sdk.TxResponse, len(result.Txs)) + txsList := make([]*txtypes.Tx, len(result.Txs)) + + for i, tx := range result.Txs { + txResp := txResultToTxResponse(&tx.TxResult) + txResp.Height = tx.Height + txResp.TxHash = tx.Hash.String() + txRespList[i] = txResp + + var protoTx txtypes.Tx + if err := cdc.UnmarshalBinaryBare(tx.Tx, &protoTx); err != nil { + return nil, err + } + txsList[i] = &protoTx + } + + return &txtypes.GetTxsEventResponse{ + Txs: txsList, + TxResponses: txRespList, + Pagination: &pagination.PageResponse{ + Total: uint64(result.TotalCount), + }, + }, nil + +} + // Simulate implements the ServiceServer.Simulate RPC method. func (s txServer) Simulate(ctx context.Context, req *txtypes.SimulateRequest) (*txtypes.SimulateResponse, error) { if req.Tx == nil { @@ -80,14 +169,19 @@ func (s txServer) GetTx(ctx context.Context, req *txtypes.GetTxRequest) (*txtype // Create a proto codec, we need it to unmarshal the tx bytes. cdc := codec.NewProtoCodec(s.clientCtx.InterfaceRegistry) - var protoTx txtypes.Tx + var protoTx txtypes.Tx if err := cdc.UnmarshalBinaryBare(result.Tx, &protoTx); err != nil { return nil, err } + txResp := txResultToTxResponse(&result.TxResult) + txResp.Height = result.Height + txResp.TxHash = result.Hash.String() + return &txtypes.GetTxResponse{ - Tx: &protoTx, + Tx: &protoTx, + TxResponse: txResp, }, nil } @@ -109,3 +203,15 @@ func RegisterTxService( func RegisterGRPCGatewayRoutes(clientConn gogogrpc.ClientConn, mux *runtime.ServeMux) { txtypes.RegisterServiceHandlerClient(context.Background(), mux, txtypes.NewServiceClient(clientConn)) } + +func txResultToTxResponse(respTx *abci.ResponseDeliverTx) *sdk.TxResponse { + logs, _ := sdk.ParseABCILogs(respTx.Log) + return &sdk.TxResponse{ + Code: respTx.Code, + Codespace: respTx.Codespace, + GasUsed: respTx.GasUsed, + GasWanted: respTx.GasWanted, + Info: respTx.Info, + Logs: logs, + } +} diff --git a/x/auth/tx/service_test.go b/x/auth/tx/service_test.go index ec51cf0e2b..a1bacb55cb 100644 --- a/x/auth/tx/service_test.go +++ b/x/auth/tx/service_test.go @@ -15,6 +15,7 @@ import ( "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + query "github.com/cosmos/cosmos-sdk/types/query" "github.com/cosmos/cosmos-sdk/types/rest" "github.com/cosmos/cosmos-sdk/types/tx" "github.com/cosmos/cosmos-sdk/types/tx/signing" @@ -99,6 +100,55 @@ func (s IntegrationTestSuite) TestSimulate() { s.Require().True(res.GetGasInfo().GetGasUsed() > 0) // Gas used sometimes change, just check it's not empty. } +func (s IntegrationTestSuite) TestGetTxEvents() { + val := s.network.Validators[0] + + // Create a new MsgSend tx from val to itself. + out, err := bankcli.MsgSendExec( + val.ClientCtx, + val.Address, + val.Address, + sdk.NewCoins( + sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10)), + ), + fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--gas=%d", flags.DefaultGasLimit), + fmt.Sprintf("--%s=foobar", flags.FlagMemo), + ) + s.Require().NoError(err) + var txRes sdk.TxResponse + s.Require().NoError(val.ClientCtx.JSONMarshaler.UnmarshalJSON(out.Bytes(), &txRes)) + s.Require().Equal(uint32(0), txRes.Code) + + s.Require().NoError(s.network.WaitForNextBlock()) + + // Query the tx via gRPC. + grpcRes, err := s.queryClient.GetTxsEvent( + context.Background(), + &tx.GetTxsEventRequest{Event: "message.action=send", + Pagination: &query.PageRequest{ + CountTotal: false, + Offset: 0, + Limit: 1, + }, + }, + ) + s.Require().NoError(err) + s.Require().Equal(len(grpcRes.Txs), 1) + s.Require().Equal("foobar", grpcRes.Txs[0].Body.Memo) + + // Query the tx via grpc-gateway. + restRes, err := rest.GetRequest(fmt.Sprintf("%s/cosmos/tx/v1beta1/txs?event=%s&pagination.offset=%d&pagination.limit=%d", val.APIAddress, "message.action=send", 0, 1)) + s.Require().NoError(err) + var getTxRes tx.GetTxsEventResponse + s.Require().NoError(val.ClientCtx.JSONMarshaler.UnmarshalJSON(restRes, &getTxRes)) + s.Require().Equal(len(grpcRes.Txs), 1) + s.Require().Equal("foobar", getTxRes.Txs[0].Body.Memo) + s.Require().NotZero(grpcRes.TxResponses[0].Height) +} + func (s IntegrationTestSuite) TestGetTx() { val := s.network.Validators[0] @@ -130,13 +180,15 @@ func (s IntegrationTestSuite) TestGetTx() { ) s.Require().NoError(err) s.Require().Equal("foobar", grpcRes.Tx.Body.Memo) + s.Require().NotZero(grpcRes.TxResponse.Height) // Query the tx via grpc-gateway. restRes, err := rest.GetRequest(fmt.Sprintf("%s/cosmos/tx/v1beta1/tx/%s", val.APIAddress, txRes.TxHash)) s.Require().NoError(err) var getTxRes tx.GetTxResponse s.Require().NoError(val.ClientCtx.JSONMarshaler.UnmarshalJSON(restRes, &getTxRes)) - s.Require().Equal("foobar", getTxRes.Tx.Body.Memo) + s.Require().Equal("foobar", grpcRes.Tx.Body.Memo) + s.Require().NotZero(grpcRes.TxResponse.Height) } func TestIntegrationTestSuite(t *testing.T) { From 96f239db1cc0b36a31e06277875ac6e389c2f7ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?colin=20axn=C3=A9r?= <25233464+colin-axner@users.noreply.github.com> Date: Thu, 12 Nov 2020 17:15:33 +0100 Subject: [PATCH 087/136] remove timestamp check from solomachine misbehaviour (#7915) * remove timestamp check from solomachine misbehaviour * add more documentation --- .../06-solomachine/spec/01_concepts.md | 3 +++ .../06-solomachine/types/misbehaviour_handle.go | 13 ++++++------- .../types/misbehaviour_handle_test.go | 16 ++++++++-------- 3 files changed, 17 insertions(+), 15 deletions(-) diff --git a/x/ibc/light-clients/06-solomachine/spec/01_concepts.md b/x/ibc/light-clients/06-solomachine/spec/01_concepts.md index 1723c8740e..fd8a4f71b2 100644 --- a/x/ibc/light-clients/06-solomachine/spec/01_concepts.md +++ b/x/ibc/light-clients/06-solomachine/spec/01_concepts.md @@ -154,6 +154,9 @@ If the misbehaviour is successfully processed: - the client is frozen by setting the frozen sequence to the misbehaviour sequence +NOTE: Misbehaviour processing is data processing order dependent. A misbehaving solo machine +could update to a new public key to prevent being frozen before misbehaviour is submitted. + ## Upgrades Upgrades to solo machine light clients are not supported since an entirely different type of diff --git a/x/ibc/light-clients/06-solomachine/types/misbehaviour_handle.go b/x/ibc/light-clients/06-solomachine/types/misbehaviour_handle.go index 721b84f82e..83335ec59f 100644 --- a/x/ibc/light-clients/06-solomachine/types/misbehaviour_handle.go +++ b/x/ibc/light-clients/06-solomachine/types/misbehaviour_handle.go @@ -11,6 +11,9 @@ import ( // CheckMisbehaviourAndUpdateState determines whether or not the currently registered // public key signed over two different messages with the same sequence. If this is true // the client state is updated to a frozen status. +// NOTE: Misbehaviour is not tracked for previous public keys, a solo machine may update to +// a new public key before the misbehaviour is processed. Therefore, misbehaviour is data +// order processing dependent. func (cs ClientState) CheckMisbehaviourAndUpdateState( ctx sdk.Context, cdc codec.BinaryMarshaler, @@ -49,14 +52,10 @@ func (cs ClientState) CheckMisbehaviourAndUpdateState( // verifySignatureAndData verifies that the currently registered public key has signed // over the provided data and that the data is valid. The data is valid if it can be -// unmarshaled into the specified data type or the timestamp of the signature is less -// than the consensus state timestamp. +// unmarshaled into the specified data type. func verifySignatureAndData(cdc codec.BinaryMarshaler, clientState ClientState, misbehaviour *Misbehaviour, sigAndData *SignatureAndData) error { - // timestamp less than consensus state would always fail and not succeed in fooling the - // light client - if sigAndData.Timestamp < clientState.ConsensusState.Timestamp { - return sdkerrors.Wrapf(clienttypes.ErrInvalidMisbehaviour, "timestamp is less than consensus state timestamp (%d < %d)", sigAndData.Timestamp, clientState.ConsensusState.Timestamp) - } + + // do not check misbehaviour timestamp since we want to allow processing of past misbehaviour // ensure data can be unmarshaled to the specified data type if _, err := UnmarshalDataByType(cdc, sigAndData.DataType, sigAndData.Data); err != nil { diff --git a/x/ibc/light-clients/06-solomachine/types/misbehaviour_handle_test.go b/x/ibc/light-clients/06-solomachine/types/misbehaviour_handle_test.go index f247ed2332..89692c5c4d 100644 --- a/x/ibc/light-clients/06-solomachine/types/misbehaviour_handle_test.go +++ b/x/ibc/light-clients/06-solomachine/types/misbehaviour_handle_test.go @@ -29,6 +29,14 @@ func (suite *SoloMachineTestSuite) TestCheckMisbehaviourAndUpdateState() { }, true, }, + { + "old misbehaviour is successful (timestamp is less than current consensus state)", + func() { + clientState = solomachine.ClientState() + solomachine.Time = solomachine.Time - 5 + misbehaviour = solomachine.CreateMisbehaviour() + }, true, + }, { "client is frozen", func() { @@ -95,14 +103,6 @@ func (suite *SoloMachineTestSuite) TestCheckMisbehaviourAndUpdateState() { misbehaviour = m }, false, }, - { - "timestamp is less than consensus state timestamp", - func() { - clientState = solomachine.ClientState() - solomachine.Time = solomachine.Time - 5 - misbehaviour = solomachine.CreateMisbehaviour() - }, false, - }, { "invalid first signature data", func() { From 956e1cf68f094b6ff15cc29663d7bf07aaef57a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?colin=20axn=C3=A9r?= <25233464+colin-axner@users.noreply.github.com> Date: Thu, 12 Nov 2020 19:44:02 +0100 Subject: [PATCH 088/136] move sdk denom validation to top of validateibcdenom (#7917) --- x/ibc/applications/transfer/types/trace.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/x/ibc/applications/transfer/types/trace.go b/x/ibc/applications/transfer/types/trace.go index 2e6ccded90..d465dcbc29 100644 --- a/x/ibc/applications/transfer/types/trace.go +++ b/x/ibc/applications/transfer/types/trace.go @@ -164,6 +164,10 @@ func ValidatePrefixedDenom(denom string) error { // - A valid base denomination (eg: 'uatom') // - A valid fungible token representation (i.e 'ibc/{hash}') per ADR 001 https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/adr-001-coin-source-tracing.md func ValidateIBCDenom(denom string) error { + if err := sdk.ValidateDenom(denom); err != nil { + return err + } + denomSplit := strings.SplitN(denom, "/", 2) switch { @@ -173,7 +177,7 @@ func ValidateIBCDenom(denom string) error { return sdkerrors.Wrapf(ErrInvalidDenomForTransfer, "denomination should be prefixed with the format 'ibc/{hash(trace + \"/\" + %s)}'", denom) case denomSplit[0] == denom && strings.TrimSpace(denom) != "": - return sdk.ValidateDenom(denom) + return nil } if _, err := ParseHexHash(denomSplit[1]); err != nil { From c0d723314133f96bd118e29401d99187a90ce986 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?colin=20axn=C3=A9r?= <25233464+colin-axner@users.noreply.github.com> Date: Thu, 12 Nov 2020 20:01:22 +0100 Subject: [PATCH 089/136] Minor fixes for ibc tendermint (#7916) * remove nil checks in getter functions for ibc tm header * remove redundant registration * add upgrade height version height check * fix err msg Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- .../07-tendermint/types/codec.go | 4 --- .../07-tendermint/types/header.go | 8 ++---- .../07-tendermint/types/header_test.go | 6 ----- .../07-tendermint/types/upgrade.go | 11 +++++++- .../07-tendermint/types/upgrade_test.go | 26 +++++++++++++++++++ 5 files changed, 38 insertions(+), 17 deletions(-) diff --git a/x/ibc/light-clients/07-tendermint/types/codec.go b/x/ibc/light-clients/07-tendermint/types/codec.go index f0ff8b2f56..5d876c8fe0 100644 --- a/x/ibc/light-clients/07-tendermint/types/codec.go +++ b/x/ibc/light-clients/07-tendermint/types/codec.go @@ -24,8 +24,4 @@ func RegisterInterfaces(registry codectypes.InterfaceRegistry) { (*exported.Misbehaviour)(nil), &Misbehaviour{}, ) - registry.RegisterImplementations( - (*exported.Header)(nil), - &Header{}, - ) } diff --git a/x/ibc/light-clients/07-tendermint/types/header.go b/x/ibc/light-clients/07-tendermint/types/header.go index e128abea1c..40858c7350 100644 --- a/x/ibc/light-clients/07-tendermint/types/header.go +++ b/x/ibc/light-clients/07-tendermint/types/header.go @@ -30,20 +30,16 @@ func (h Header) ClientType() string { // GetHeight returns the current height. It returns 0 if the tendermint // header is nil. +// NOTE: the header.Header is checked to be non nil in ValidateBasic. func (h Header) GetHeight() exported.Height { - if h.Header == nil { - return clienttypes.ZeroHeight() - } version := clienttypes.ParseChainID(h.Header.ChainID) return clienttypes.NewHeight(version, uint64(h.Header.Height)) } // GetTime returns the current block timestamp. It returns a zero time if // the tendermint header is nil. +// NOTE: the header.Header is checked to be non nil in ValidateBasic. func (h Header) GetTime() time.Time { - if h.Header == nil { - return time.Time{} - } return h.Header.Time } diff --git a/x/ibc/light-clients/07-tendermint/types/header_test.go b/x/ibc/light-clients/07-tendermint/types/header_test.go index cda3047be2..2dbba94b97 100644 --- a/x/ibc/light-clients/07-tendermint/types/header_test.go +++ b/x/ibc/light-clients/07-tendermint/types/header_test.go @@ -13,17 +13,11 @@ import ( func (suite *TendermintTestSuite) TestGetHeight() { header := suite.chainA.LastHeader suite.Require().NotEqual(uint64(0), header.GetHeight()) - - header.Header = nil - suite.Require().Equal(clienttypes.ZeroHeight(), header.GetHeight()) } func (suite *TendermintTestSuite) TestGetTime() { header := suite.chainA.LastHeader suite.Require().NotEqual(time.Time{}, header.GetTime()) - - header.Header = nil - suite.Require().Equal(time.Time{}, header.GetTime()) } func (suite *TendermintTestSuite) TestHeaderValidateBasic() { diff --git a/x/ibc/light-clients/07-tendermint/types/upgrade.go b/x/ibc/light-clients/07-tendermint/types/upgrade.go index 38373f1a95..dcd3cd1a5f 100644 --- a/x/ibc/light-clients/07-tendermint/types/upgrade.go +++ b/x/ibc/light-clients/07-tendermint/types/upgrade.go @@ -18,8 +18,10 @@ import ( // in client state that must be the same across all valid Tendermint clients for the new chain. // VerifyUpgrade will return an error if: // - the upgradedClient is not a Tendermint ClientState +// - the lastest height of the client state does not have the same version number or has a greater +// height than the committed client. // - the height of upgraded client is not greater than that of current client -// - the latest height of the new client does not match the height in committed client +// - the latest height of the new client does not match or is greater than the height in committed client // - any Tendermint chain specified parameter in upgraded client such as ChainID, UnbondingPeriod, // and ProofSpecs do not match parameters set by committed client func (cs ClientState) VerifyUpgradeAndUpdateState( @@ -40,6 +42,13 @@ func (cs ClientState) VerifyUpgradeAndUpdateState( cs.GetLatestHeight().GetVersionNumber(), upgradeHeight.GetVersionNumber()) } + // UpgradeHeight must be greater than or equal to current client state height + if cs.GetLatestHeight().GetVersionHeight() > upgradeHeight.GetVersionHeight() { + return nil, nil, sdkerrors.Wrapf(sdkerrors.ErrInvalidHeight, "version height at which upgrade occurs must be greater than or equal to current client height (%d > %d)", + cs.GetLatestHeight().GetVersionHeight(), upgradeHeight.GetVersionHeight(), + ) + } + if !upgradedClient.GetLatestHeight().GT(cs.GetLatestHeight()) { return nil, nil, sdkerrors.Wrapf(sdkerrors.ErrInvalidHeight, "upgraded client height %s must be greater than current client height %s", upgradedClient.GetLatestHeight(), cs.GetLatestHeight()) diff --git a/x/ibc/light-clients/07-tendermint/types/upgrade_test.go b/x/ibc/light-clients/07-tendermint/types/upgrade_test.go index 06b5032732..6bffb19408 100644 --- a/x/ibc/light-clients/07-tendermint/types/upgrade_test.go +++ b/x/ibc/light-clients/07-tendermint/types/upgrade_test.go @@ -102,6 +102,32 @@ func (suite *TendermintTestSuite) TestVerifyUpgrade() { }, expPass: false, }, + { + name: "unsuccessful upgrade: upgrade height version height is less than the current client version height", + setup: func() { + + upgradedClient = types.NewClientState("newChainId", types.DefaultTrustLevel, trustingPeriod, ubdPeriod+trustingPeriod, maxClockDrift, newClientHeight, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) + + // upgrade Height is at next block + upgradeHeight = clienttypes.NewHeight(10, uint64(suite.chainB.GetContext().BlockHeight()-1)) + + // zero custom fields and store in upgrade store + suite.chainB.App.UpgradeKeeper.SetUpgradedClient(suite.chainB.GetContext(), int64(upgradeHeight.GetVersionHeight()), upgradedClient) + + // commit upgrade store changes and update clients + + suite.coordinator.CommitBlock(suite.chainB) + err := suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) + suite.Require().NoError(err) + + cs, found := suite.chainA.App.IBCKeeper.ClientKeeper.GetClientState(suite.chainA.GetContext(), clientA) + suite.Require().True(found) + + proofUpgrade, _ = suite.chainB.QueryUpgradeProof(upgradetypes.UpgradedClientKey(int64(upgradeHeight.GetVersionHeight())), cs.GetLatestHeight().GetVersionHeight()) + }, + expPass: false, + }, + { name: "unsuccessful upgrade: chain-specified parameters do not match committed client", setup: func() { From 6f5eaba95b35052f00a4ec5c6c5b53229cc3577a Mon Sep 17 00:00:00 2001 From: Amaury Date: Fri, 13 Nov 2020 11:15:29 +0100 Subject: [PATCH 090/136] Add support for TM secp256k1 (#7838) * Add secp256k1 support * Fix test * Add test in handler_test * Use table tests Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- crypto/codec/tm.go | 11 +++++ crypto/keys/secp256k1/secp256k1_test.go | 54 +++++++++++++++++++++++++ x/staking/handler_test.go | 33 +++++++++++++++ 3 files changed, 98 insertions(+) diff --git a/crypto/codec/tm.go b/crypto/codec/tm.go index 6633f60c23..8c841e96b3 100644 --- a/crypto/codec/tm.go +++ b/crypto/codec/tm.go @@ -6,6 +6,7 @@ import ( tmprotocrypto "github.com/tendermint/tendermint/proto/tendermint/crypto" "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" + "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) @@ -17,6 +18,10 @@ func FromTmProtoPublicKey(protoPk tmprotocrypto.PublicKey) (cryptotypes.PubKey, return &ed25519.PubKey{ Key: protoPk.Ed25519, }, nil + case *tmprotocrypto.PublicKey_Secp256K1: + return &secp256k1.PubKey{ + Key: protoPk.Secp256K1, + }, nil default: return nil, sdkerrors.Wrapf(sdkerrors.ErrInvalidType, "cannot convert %v from Tendermint public key", protoPk) } @@ -31,6 +36,12 @@ func ToTmProtoPublicKey(pk cryptotypes.PubKey) (tmprotocrypto.PublicKey, error) Ed25519: pk.Key, }, }, nil + case *secp256k1.PubKey: + return tmprotocrypto.PublicKey{ + Sum: &tmprotocrypto.PublicKey_Secp256K1{ + Secp256K1: pk.Key, + }, + }, nil default: return tmprotocrypto.PublicKey{}, sdkerrors.Wrapf(sdkerrors.ErrInvalidType, "cannot convert %v to Tendermint public key", pk) } diff --git a/crypto/keys/secp256k1/secp256k1_test.go b/crypto/keys/secp256k1/secp256k1_test.go index d96b1dc382..56c67f594b 100644 --- a/crypto/keys/secp256k1/secp256k1_test.go +++ b/crypto/keys/secp256k1/secp256k1_test.go @@ -12,6 +12,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/tendermint/tendermint/crypto" + tmsecp256k1 "github.com/tendermint/tendermint/crypto/secp256k1" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" @@ -267,3 +268,56 @@ func TestMarshalAmino(t *testing.T) { }) } } + +func TestMarshalAmino_BackwardsCompatibility(t *testing.T) { + aminoCdc := codec.NewLegacyAmino() + // Create Tendermint keys. + tmPrivKey := tmsecp256k1.GenPrivKey() + tmPubKey := tmPrivKey.PubKey() + // Create our own keys, with the same private key as Tendermint's. + privKey := &secp256k1.PrivKey{Key: []byte(tmPrivKey)} + pubKey := privKey.PubKey().(*secp256k1.PubKey) + + testCases := []struct { + desc string + tmKey interface{} + ourKey interface{} + marshalFn func(o interface{}) ([]byte, error) + }{ + { + "secp256k1 private key, binary", + tmPrivKey, + privKey, + aminoCdc.MarshalBinaryBare, + }, + { + "secp256k1 private key, JSON", + tmPrivKey, + privKey, + aminoCdc.MarshalJSON, + }, + { + "secp256k1 public key, binary", + tmPubKey, + pubKey, + aminoCdc.MarshalBinaryBare, + }, + { + "secp256k1 public key, JSON", + tmPubKey, + pubKey, + aminoCdc.MarshalJSON, + }, + } + + for _, tc := range testCases { + t.Run(tc.desc, func(t *testing.T) { + // Make sure Amino encoding override is not breaking backwards compatibility. + bz1, err := tc.marshalFn(tc.tmKey) + require.NoError(t, err) + bz2, err := tc.marshalFn(tc.ourKey) + require.NoError(t, err) + require.Equal(t, bz1, bz2) + }) + } +} diff --git a/x/staking/handler_test.go b/x/staking/handler_test.go index 844fc77990..c3bcc8ea33 100644 --- a/x/staking/handler_test.go +++ b/x/staking/handler_test.go @@ -12,7 +12,9 @@ import ( tmtypes "github.com/tendermint/tendermint/types" cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" + "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/simapp" "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" @@ -181,6 +183,37 @@ func TestInvalidPubKeyTypeMsgCreateValidator(t *testing.T) { tstaking.CreateValidator(addr, invalidPk, 10, false) } +func TestBothPubKeyTypesMsgCreateValidator(t *testing.T) { + app, ctx, _, valAddrs := bootstrapHandlerGenesisTest(t, 1000, 2, 1000) + ctx = ctx.WithConsensusParams(&abci.ConsensusParams{ + Validator: &tmproto.ValidatorParams{PubKeyTypes: []string{tmtypes.ABCIPubKeyTypeEd25519, tmtypes.ABCIPubKeyTypeSecp256k1}}, + }) + + tstaking := teststaking.NewHelper(t, ctx, app.StakingKeeper) + + testCases := []struct { + name string + addr sdk.ValAddress + pk cryptotypes.PubKey + }{ + { + "can create a validator with ed25519 pubkey", + valAddrs[0], + ed25519.GenPrivKey().PubKey(), + }, + { + "can create a validator with secp256k1 pubkey", + valAddrs[1], + secp256k1.GenPrivKey().PubKey(), + }, + } + for _, tc := range testCases { + t.Run(tc.name, func(*testing.T) { + tstaking.CreateValidator(tc.addr, tc.pk, 10, true) + }) + } +} + func TestLegacyValidatorDelegations(t *testing.T) { app, ctx, delAddrs, valAddrs := bootstrapHandlerGenesisTest(t, 1000, 2, 100000000) From 15103b63a1067b376917bc54c9fb7ddef179d633 Mon Sep 17 00:00:00 2001 From: Ethan Buchman Date: Fri, 13 Nov 2020 05:33:33 -0500 Subject: [PATCH 091/136] x/ibc/24-host: fix some comments (#7923) Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- x/ibc/core/24-host/validate.go | 49 +++++++++++++--------------------- 1 file changed, 19 insertions(+), 30 deletions(-) diff --git a/x/ibc/core/24-host/validate.go b/x/ibc/core/24-host/validate.go index 6d512fbe0c..bbfafbee75 100644 --- a/x/ibc/core/24-host/validate.go +++ b/x/ibc/core/24-host/validate.go @@ -56,36 +56,37 @@ func defaultIdentifierValidator(id string, min, max int) error { //nolint:unpara } // ClientIdentifierValidator is the default validator function for Client identifiers. -// A valid Identifier must be between 9-64 characters and only contain lowercase -// alphabetic characters. +// A valid Identifier must be between 9-64 characters and only contain alphanumeric and some allowed +// special characters (see IsValidID). func ClientIdentifierValidator(id string) error { return defaultIdentifierValidator(id, 9, DefaultMaxCharacterLength) } // ConnectionIdentifierValidator is the default validator function for Connection identifiers. -// A valid Identifier must be between 10-64 characters and only contain lowercase -// alphabetic characters. +// A valid Identifier must be between 10-64 characters and only contain alphanumeric and some allowed +// special characters (see IsValidID). func ConnectionIdentifierValidator(id string) error { return defaultIdentifierValidator(id, 10, DefaultMaxCharacterLength) } // ChannelIdentifierValidator is the default validator function for Channel identifiers. -// A valid Identifier must be between 10-64 characters and only contain lowercase -// alphabetic characters. +// A valid Identifier must be between 10-64 characters and only contain alphanumeric and some allowed +// special characters (see IsValidID). func ChannelIdentifierValidator(id string) error { return defaultIdentifierValidator(id, 10, DefaultMaxCharacterLength) } // PortIdentifierValidator is the default validator function for Port identifiers. -// A valid Identifier must be between 2-64 characters and only contain lowercase -// alphabetic characters. +// A valid Identifier must be between 2-64 characters and only contain alphanumeric and some allowed +// special characters (see IsValidID). func PortIdentifierValidator(id string) error { return defaultIdentifierValidator(id, 2, DefaultMaxCharacterLength) } // NewPathValidator takes in a Identifier Validator function and returns -// a Path Validator function which requires path only has valid identifiers -// alphanumeric character strings, and "/" separators +// a Path Validator function which requires path to consist of `/`-separated valid identifiers, +// where a valid identifier is between 1-64 characters, contains only alphanumeric and some allowed +// special characters (see IsValidID), and satisfies the custom `idValidator` function. func NewPathValidator(idValidator ValidateFn) ValidateFn { return func(path string) error { pathArr := strings.Split(path, "/") @@ -112,25 +113,13 @@ func NewPathValidator(idValidator ValidateFn) ValidateFn { } } -// PathValidator takes in path string and validates with default identifier rules. -// This is optimized by simply checking that all path elements are alphanumeric. +// PathValidator takes in path string and validates with default identifier rules: +// path consists of `/`-separated valid identifiers, +// each identifier is between 1-64 characters and contains only alphanumeric and some allowed +// special characters (see IsValidID). func PathValidator(path string) error { - pathArr := strings.Split(path, "/") - if len(pathArr) > 0 && pathArr[0] == path { - return sdkerrors.Wrapf(ErrInvalidPath, "path %s doesn't contain any separator '/'", path) - } - - for _, p := range pathArr { - // a path beginning or ending in a separator returns empty string elements. - if p == "" { - return sdkerrors.Wrapf(ErrInvalidPath, "path %s cannot begin or end with '/'", path) - } - - // Each path element must be a valid identifier or constant number - if err := defaultIdentifierValidator(p, 1, DefaultMaxCharacterLength); err != nil { - return sdkerrors.Wrapf(err, "path %s contains an invalid identifier: '%s'", path, p) - } - } - - return nil + f := NewPathValidator(func(path string) error { + return nil + }) + return f(path) } From 4b529a41cf258e941c98b8d358b753aa5294ae84 Mon Sep 17 00:00:00 2001 From: Aditya Date: Fri, 13 Nov 2020 11:13:59 +0000 Subject: [PATCH 092/136] Capability Fixes (#7918) * add cap and name checks * Update x/capability/keeper/keeper.go * address reviews * fix missing trim Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com> --- CHANGELOG.md | 3 ++ x/capability/genesis.go | 2 +- x/capability/keeper/keeper.go | 46 ++++++++++++++++--- x/capability/keeper/keeper_test.go | 18 ++++++++ x/capability/types/errors.go | 12 +++-- .../types/misbehaviour_handle.go | 2 +- 6 files changed, 69 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bbe06901e1..efaf660f3d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -65,6 +65,9 @@ Ref: https://keepachangelog.com/en/1.0.0/ * `server/types.AppExporter` requires extra argument: `AppOptions`. * `server.AddCommands` requires extra argument: `addStartFlags types.ModuleInitFlags` * `x/crisis.NewAppModule` has a new attribute: `skipGenesisInvariants`. [PR](https://github.com/cosmos/cosmos-sdk/pull/7764) +* [#7918](https://github.com/cosmos/cosmos-sdk/pull/7918) Add x/capability safety checks: + * All outward facing APIs will now check that capability is not nil and name is not empty before performing any state-machine changes + * `SetIndex` has been renamed to `InitializeIndex` ### Features diff --git a/x/capability/genesis.go b/x/capability/genesis.go index 9bcca42a35..ba8e09dcd3 100644 --- a/x/capability/genesis.go +++ b/x/capability/genesis.go @@ -9,7 +9,7 @@ import ( // InitGenesis initializes the capability module's state from a provided genesis // state. func InitGenesis(ctx sdk.Context, k keeper.Keeper, genState types.GenesisState) { - if err := k.SetIndex(ctx, genState.Index); err != nil { + if err := k.InitializeIndex(ctx, genState.Index); err != nil { panic(err) } diff --git a/x/capability/keeper/keeper.go b/x/capability/keeper/keeper.go index 492d56c915..61de033899 100644 --- a/x/capability/keeper/keeper.go +++ b/x/capability/keeper/keeper.go @@ -2,6 +2,7 @@ package keeper import ( "fmt" + "strings" "github.com/tendermint/tendermint/libs/log" @@ -49,6 +50,8 @@ type ( } ) +// NewKeeper constructs a new CapabilityKeeper instance and initializes maps +// for capability map and scopedModules map. func NewKeeper(cdc codec.BinaryMarshaler, storeKey, memKey sdk.StoreKey) *Keeper { return &Keeper{ cdc: cdc, @@ -67,6 +70,9 @@ func (k *Keeper) ScopeToModule(moduleName string) ScopedKeeper { if k.sealed { panic("cannot scope to module via a sealed capability keeper") } + if strings.TrimSpace(moduleName) == "" { + panic("cannot scope to an empty module name") + } if _, ok := k.scopedModules[moduleName]; ok { panic(fmt.Sprintf("cannot create multiple scoped keepers for the same module name: %s", moduleName)) @@ -117,10 +123,10 @@ func (k *Keeper) InitializeAndSeal(ctx sdk.Context) { k.sealed = true } -// SetIndex sets the index to one (or greater) in InitChain according +// InitializeIndex sets the index to one (or greater) in InitChain according // to the GenesisState. It must only be called once. // It will panic if the provided index is 0, or if the index is already set. -func (k Keeper) SetIndex(ctx sdk.Context, index uint64) error { +func (k Keeper) InitializeIndex(ctx sdk.Context, index uint64) error { if index == 0 { panic("SetIndex requires index > 0") } @@ -200,6 +206,9 @@ func (k Keeper) InitializeCapability(ctx sdk.Context, index uint64, owners types // Note, namespacing is completely local, which is safe since records are prefixed // with the module name and no two ScopedKeeper can have the same module name. func (sk ScopedKeeper) NewCapability(ctx sdk.Context, name string) (*types.Capability, error) { + if strings.TrimSpace(name) == "" { + return nil, sdkerrors.Wrap(types.ErrInvalidCapabilityName, "capability name cannot be empty") + } store := ctx.KVStore(sk.storeKey) if _, ok := sk.GetCapability(ctx, name); ok { @@ -247,6 +256,9 @@ func (sk ScopedKeeper) NewCapability(ctx sdk.Context, name string) (*types.Capab // Note, the capability's forward mapping is indexed by a string which should // contain its unique memory reference. func (sk ScopedKeeper) AuthenticateCapability(ctx sdk.Context, cap *types.Capability, name string) bool { + if strings.TrimSpace(name) == "" || cap == nil { + return false + } return sk.GetCapabilityName(ctx, cap) == name } @@ -256,6 +268,12 @@ func (sk ScopedKeeper) AuthenticateCapability(ctx sdk.Context, cap *types.Capabi // index. If the owner already exists, it will return an error. Otherwise, it will // also set a forward and reverse index for the capability and capability name. func (sk ScopedKeeper) ClaimCapability(ctx sdk.Context, cap *types.Capability, name string) error { + if cap == nil { + return sdkerrors.Wrap(types.ErrNilCapability, "cannot claim nil capability") + } + if strings.TrimSpace(name) == "" { + return sdkerrors.Wrap(types.ErrInvalidCapabilityName, "capability name cannot be empty") + } // update capability owner set if err := sk.addOwner(ctx, cap, name); err != nil { return err @@ -282,6 +300,9 @@ func (sk ScopedKeeper) ClaimCapability(ctx sdk.Context, cap *types.Capability, n // previously claimed or created. After releasing the capability, if no more // owners exist, the capability will be globally removed. func (sk ScopedKeeper) ReleaseCapability(ctx sdk.Context, cap *types.Capability) error { + if cap == nil { + return sdkerrors.Wrap(types.ErrNilCapability, "cannot release nil capability") + } name := sk.GetCapabilityName(ctx, cap) if len(name) == 0 { return sdkerrors.Wrap(types.ErrCapabilityNotOwned, sk.module) @@ -321,6 +342,9 @@ func (sk ScopedKeeper) ReleaseCapability(ctx sdk.Context, cap *types.Capability) // by name. The module is not allowed to retrieve capabilities which it does not // own. func (sk ScopedKeeper) GetCapability(ctx sdk.Context, name string) (*types.Capability, bool) { + if strings.TrimSpace(name) == "" { + return nil, false + } memStore := ctx.KVStore(sk.memKey) key := types.RevCapabilityKey(sk.module, name) @@ -332,15 +356,14 @@ func (sk ScopedKeeper) GetCapability(ctx sdk.Context, name string) (*types.Capab // to still have the capability in the go map since changes to // go map do not automatically get reverted on tx failure, // so we delete here to remove unnecessary values in map - delete(sk.capMap, index) + // TODO: Delete index correctly from capMap by storing some reverse lookup + // in-memory map. Issue: https://github.com/cosmos/cosmos-sdk/issues/7805 return nil, false } cap := sk.capMap[index] if cap == nil { - // delete key from store to remove unnecessary mapping - memStore.Delete(key) - return nil, false + panic("capability found in memstore is missing from map") } return cap, true @@ -349,14 +372,20 @@ func (sk ScopedKeeper) GetCapability(ctx sdk.Context, name string) (*types.Capab // GetCapabilityName allows a module to retrieve the name under which it stored a given // capability given the capability func (sk ScopedKeeper) GetCapabilityName(ctx sdk.Context, cap *types.Capability) string { + if cap == nil { + return "" + } memStore := ctx.KVStore(sk.memKey) return string(memStore.Get(types.FwdCapabilityKey(sk.module, cap))) } -// Get all the Owners that own the capability associated with the name this ScopedKeeper uses +// GetOwners all the Owners that own the capability associated with the name this ScopedKeeper uses // to refer to the capability func (sk ScopedKeeper) GetOwners(ctx sdk.Context, name string) (*types.CapabilityOwners, bool) { + if strings.TrimSpace(name) == "" { + return nil, false + } cap, ok := sk.GetCapability(ctx, name) if !ok { return nil, false @@ -382,6 +411,9 @@ func (sk ScopedKeeper) GetOwners(ctx sdk.Context, name string) (*types.Capabilit // The method returns an error if either the capability or the owners cannot be // retreived from the memstore. func (sk ScopedKeeper) LookupModules(ctx sdk.Context, name string) ([]string, *types.Capability, error) { + if strings.TrimSpace(name) == "" { + return nil, nil, sdkerrors.Wrap(types.ErrInvalidCapabilityName, "cannot lookup modules with empty capability name") + } cap, ok := sk.GetCapability(ctx, name) if !ok { return nil, nil, sdkerrors.Wrap(types.ErrCapabilityNotFound, name) diff --git a/x/capability/keeper/keeper_test.go b/x/capability/keeper/keeper_test.go index c6f1d174bd..e62176a724 100644 --- a/x/capability/keeper/keeper_test.go +++ b/x/capability/keeper/keeper_test.go @@ -38,6 +38,9 @@ func (suite *KeeperTestSuite) SetupTest() { func (suite *KeeperTestSuite) TestInitializeAndSeal() { sk := suite.keeper.ScopeToModule(banktypes.ModuleName) + suite.Require().Panics(func() { + suite.keeper.ScopeToModule(" ") + }) caps := make([]*types.Capability, 5) // Get Latest Index before creating new ones to sychronize indices correctly @@ -105,6 +108,10 @@ func (suite *KeeperTestSuite) TestNewCapability() { suite.Require().True(ok) suite.Require().Equal(cap, got) suite.Require().True(cap == got, "expected memory addresses to be equal") + + cap, err = sk.NewCapability(suite.ctx, " ") + suite.Require().Error(err) + suite.Require().Nil(cap) } func (suite *KeeperTestSuite) TestOriginalCapabilityKeeper() { @@ -151,11 +158,15 @@ func (suite *KeeperTestSuite) TestAuthenticateCapability() { badCap := types.NewCapability(100) suite.Require().False(sk1.AuthenticateCapability(suite.ctx, badCap, "transfer")) suite.Require().False(sk2.AuthenticateCapability(suite.ctx, badCap, "bond")) + + suite.Require().False(sk1.AuthenticateCapability(suite.ctx, cap1, " ")) + suite.Require().False(sk1.AuthenticateCapability(suite.ctx, nil, "transfer")) } func (suite *KeeperTestSuite) TestClaimCapability() { sk1 := suite.keeper.ScopeToModule(banktypes.ModuleName) sk2 := suite.keeper.ScopeToModule(stakingtypes.ModuleName) + sk3 := suite.keeper.ScopeToModule("foo") cap, err := sk1.NewCapability(suite.ctx, "transfer") suite.Require().NoError(err) @@ -171,6 +182,9 @@ func (suite *KeeperTestSuite) TestClaimCapability() { got, ok = sk2.GetCapability(suite.ctx, "transfer") suite.Require().True(ok) suite.Require().Equal(cap, got) + + suite.Require().Error(sk3.ClaimCapability(suite.ctx, cap, " ")) + suite.Require().Error(sk3.ClaimCapability(suite.ctx, nil, "transfer")) } func (suite *KeeperTestSuite) TestGetOwners() { @@ -237,6 +251,8 @@ func (suite *KeeperTestSuite) TestGetOwners() { } } + _, ok := sk1.GetOwners(suite.ctx, " ") + suite.Require().False(ok, "got owners from empty capability name") } func (suite *KeeperTestSuite) TestReleaseCapability() { @@ -264,6 +280,8 @@ func (suite *KeeperTestSuite) TestReleaseCapability() { got, ok = sk1.GetCapability(suite.ctx, "transfer") suite.Require().False(ok) suite.Require().Nil(got) + + suite.Require().Error(sk1.ReleaseCapability(suite.ctx, nil)) } func (suite KeeperTestSuite) TestRevertCapability() { diff --git a/x/capability/types/errors.go b/x/capability/types/errors.go index 93f1854260..7c582ccbb0 100644 --- a/x/capability/types/errors.go +++ b/x/capability/types/errors.go @@ -8,9 +8,11 @@ import ( // x/capability module sentinel errors var ( - ErrCapabilityTaken = sdkerrors.Register(ModuleName, 2, "capability name already taken") - ErrOwnerClaimed = sdkerrors.Register(ModuleName, 3, "given owner already claimed capability") - ErrCapabilityNotOwned = sdkerrors.Register(ModuleName, 4, "capability not owned by module") - ErrCapabilityNotFound = sdkerrors.Register(ModuleName, 5, "capability not found") - ErrCapabilityOwnersNotFound = sdkerrors.Register(ModuleName, 6, "owners not found for capability") + ErrInvalidCapabilityName = sdkerrors.Register(ModuleName, 2, "capability name not valid") + ErrNilCapability = sdkerrors.Register(ModuleName, 3, "provided capability is nil") + ErrCapabilityTaken = sdkerrors.Register(ModuleName, 4, "capability name already taken") + ErrOwnerClaimed = sdkerrors.Register(ModuleName, 5, "given owner already claimed capability") + ErrCapabilityNotOwned = sdkerrors.Register(ModuleName, 6, "capability not owned by module") + ErrCapabilityNotFound = sdkerrors.Register(ModuleName, 7, "capability not found") + ErrCapabilityOwnersNotFound = sdkerrors.Register(ModuleName, 8, "owners not found for capability") ) diff --git a/x/ibc/light-clients/07-tendermint/types/misbehaviour_handle.go b/x/ibc/light-clients/07-tendermint/types/misbehaviour_handle.go index e3793ee863..b27cc06a45 100644 --- a/x/ibc/light-clients/07-tendermint/types/misbehaviour_handle.go +++ b/x/ibc/light-clients/07-tendermint/types/misbehaviour_handle.go @@ -108,7 +108,7 @@ func checkMisbehaviourHeader( chainID, _ = clienttypes.SetVersionNumber(chainID, header.GetHeight().GetVersionNumber()) } - // - ValidatorSet must have 2/3 similarity with trusted FromValidatorSet + // - ValidatorSet must have TrustLevel similarity with trusted FromValidatorSet // - ValidatorSets on both headers are valid given the last trusted ValidatorSet if err := tmTrustedValset.VerifyCommitLightTrusting( chainID, tmCommit, clientState.TrustLevel.ToTendermint(), From 6c9a02bc34a47f56795a1da211ce1d986f416b1a Mon Sep 17 00:00:00 2001 From: Neeraj Murarka Date: Fri, 13 Nov 2020 04:53:18 -0800 Subject: [PATCH 093/136] Fixed help message for export's 'jail-whitelist' command to be clearer (#7885) * Fixed help message for export's 'jail-whitelist' command to be clearer * Update server/export.go Co-authored-by: Alessio Treglia Co-authored-by: Alessio Treglia Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- server/export.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/export.go b/server/export.go index 280d62da32..150add98e7 100644 --- a/server/export.go +++ b/server/export.go @@ -113,7 +113,7 @@ func ExportCmd(appExporter types.AppExporter, defaultNodeHome string) *cobra.Com cmd.Flags().String(flags.FlagHome, defaultNodeHome, "The application home directory") cmd.Flags().Int64(FlagHeight, -1, "Export state from a particular height (-1 means latest height)") cmd.Flags().Bool(FlagForZeroHeight, false, "Export state to start at height zero (perform preproccessing)") - cmd.Flags().StringSlice(FlagJailAllowedAddrs, []string{}, "List of validators to not jail state export") + cmd.Flags().StringSlice(FlagJailAllowedAddrs, []string{}, "Comma-separated list of operator addresses of jailed validators to unjail") return cmd } From e77c9506c833896fd462de66db34d1bc13514fff Mon Sep 17 00:00:00 2001 From: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Date: Fri, 13 Nov 2020 14:58:13 +0100 Subject: [PATCH 094/136] ibc: packet fixes (#7810) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ibc: msg validation fields * msg tests * rename proof * rename proofs * check seq ≠ 0 Co-authored-by: Aditya Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com> --- proto/ibc/core/channel/v1/tx.proto | 8 +- .../03-connection/keeper/handshake_test.go | 2 +- .../03-connection/types/connection_test.go | 2 +- x/ibc/core/03-connection/types/msgs_test.go | 2 +- x/ibc/core/04-channel/types/msgs.go | 45 ++-- x/ibc/core/04-channel/types/msgs_test.go | 9 +- x/ibc/core/04-channel/types/tx.pb.go | 231 +++++++++--------- x/ibc/core/keeper/msg_server.go | 8 +- 8 files changed, 163 insertions(+), 144 deletions(-) diff --git a/proto/ibc/core/channel/v1/tx.proto b/proto/ibc/core/channel/v1/tx.proto index 0426c741b9..c60ecc4363 100644 --- a/proto/ibc/core/channel/v1/tx.proto +++ b/proto/ibc/core/channel/v1/tx.proto @@ -148,7 +148,7 @@ message MsgRecvPacket { option (gogoproto.goproto_getters) = false; Packet packet = 1 [(gogoproto.nullable) = false]; - bytes proof = 2; + bytes proof_commitment = 2 [(gogoproto.moretags) = "yaml:\"proof_commitment\""]; ibc.core.client.v1.Height proof_height = 3 [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; string signer = 4; @@ -163,7 +163,7 @@ message MsgTimeout { option (gogoproto.goproto_getters) = false; Packet packet = 1 [(gogoproto.nullable) = false]; - bytes proof = 2; + bytes proof_unreceived = 2 [(gogoproto.moretags) = "yaml:\"proof_unreceived\""]; ibc.core.client.v1.Height proof_height = 3 [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; uint64 next_sequence_recv = 4 [(gogoproto.moretags) = "yaml:\"next_sequence_recv\""]; @@ -179,7 +179,7 @@ message MsgTimeoutOnClose { option (gogoproto.goproto_getters) = false; Packet packet = 1 [(gogoproto.nullable) = false]; - bytes proof = 2; + bytes proof_unreceived = 2 [(gogoproto.moretags) = "yaml:\"proof_unreceived\""]; bytes proof_close = 3 [(gogoproto.moretags) = "yaml:\"proof_close\""]; ibc.core.client.v1.Height proof_height = 4 [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; @@ -197,7 +197,7 @@ message MsgAcknowledgement { Packet packet = 1 [(gogoproto.nullable) = false]; bytes acknowledgement = 2; - bytes proof = 3; + bytes proof_acked = 3 [(gogoproto.moretags) = "yaml:\"proof_acked\""]; ibc.core.client.v1.Height proof_height = 4 [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; string signer = 5; diff --git a/x/ibc/core/03-connection/keeper/handshake_test.go b/x/ibc/core/03-connection/keeper/handshake_test.go index 2ecdae5952..2ece130ebb 100644 --- a/x/ibc/core/03-connection/keeper/handshake_test.go +++ b/x/ibc/core/03-connection/keeper/handshake_test.go @@ -272,7 +272,7 @@ func (suite *KeeperTestSuite) TestConnOpenTry() { suite.Require().True(found) connection.State = types.INIT - connection.Versions = []*types.Version{&types.Version{}} + connection.Versions = []*types.Version{{}} suite.chainB.App.IBCKeeper.ConnectionKeeper.SetConnection(suite.chainB.GetContext(), connB.ID, connection) diff --git a/x/ibc/core/03-connection/types/connection_test.go b/x/ibc/core/03-connection/types/connection_test.go index c735841b0e..ff2aa08d4a 100644 --- a/x/ibc/core/03-connection/types/connection_test.go +++ b/x/ibc/core/03-connection/types/connection_test.go @@ -43,7 +43,7 @@ func TestConnectionValidateBasic(t *testing.T) { }, { "invalid version", - types.ConnectionEnd{clientID, []*types.Version{&types.Version{}}, types.INIT, types.Counterparty{clientID2, connectionID2, commitmenttypes.NewMerklePrefix([]byte("prefix"))}}, + types.ConnectionEnd{clientID, []*types.Version{{}}, types.INIT, types.Counterparty{clientID2, connectionID2, commitmenttypes.NewMerklePrefix([]byte("prefix"))}}, false, }, { diff --git a/x/ibc/core/03-connection/types/msgs_test.go b/x/ibc/core/03-connection/types/msgs_test.go index 798c8b0f71..675de99347 100644 --- a/x/ibc/core/03-connection/types/msgs_test.go +++ b/x/ibc/core/03-connection/types/msgs_test.go @@ -150,7 +150,7 @@ func (suite *MsgTestSuite) TestNewMsgConnectionOpenTry() { {"invalid consensusHeight", types.NewMsgConnectionOpenTry("ibcconntest", provedID, "clienttotesta", "connectiontotest", "clienttotest", clientState, prefix, []*types.Version{ibctesting.ConnectionVersion}, suite.proof, suite.proof, suite.proof, clientHeight, clienttypes.ZeroHeight(), signer), false}, {"empty singer", types.NewMsgConnectionOpenTry("ibcconntest", provedID, "clienttotesta", "connectiontotest", "clienttotest", clientState, prefix, []*types.Version{ibctesting.ConnectionVersion}, suite.proof, suite.proof, suite.proof, clientHeight, clientHeight, nil), false}, {"success", types.NewMsgConnectionOpenTry("ibcconntest", provedID, "clienttotesta", "connectiontotest", "clienttotest", clientState, prefix, []*types.Version{ibctesting.ConnectionVersion}, suite.proof, suite.proof, suite.proof, clientHeight, clientHeight, signer), true}, - {"invalid version", types.NewMsgConnectionOpenTry("ibcconntest", provedID, "clienttotesta", "connectiontotest", "clienttotest", clientState, prefix, []*types.Version{&types.Version{}}, suite.proof, suite.proof, suite.proof, clientHeight, clientHeight, signer), false}, + {"invalid version", types.NewMsgConnectionOpenTry("ibcconntest", provedID, "clienttotesta", "connectiontotest", "clienttotest", clientState, prefix, []*types.Version{{}}, suite.proof, suite.proof, suite.proof, clientHeight, clientHeight, signer), false}, } for _, tc := range testCases { diff --git a/x/ibc/core/04-channel/types/msgs.go b/x/ibc/core/04-channel/types/msgs.go index 96a4283d8f..772a1204ef 100644 --- a/x/ibc/core/04-channel/types/msgs.go +++ b/x/ibc/core/04-channel/types/msgs.go @@ -405,14 +405,14 @@ var _ sdk.Msg = &MsgRecvPacket{} // NewMsgRecvPacket constructs new MsgRecvPacket // nolint:interfacer func NewMsgRecvPacket( - packet Packet, proof []byte, proofHeight clienttypes.Height, + packet Packet, proofCommitment []byte, proofHeight clienttypes.Height, signer sdk.AccAddress, ) *MsgRecvPacket { return &MsgRecvPacket{ - Packet: packet, - Proof: proof, - ProofHeight: proofHeight, - Signer: signer.String(), + Packet: packet, + ProofCommitment: proofCommitment, + ProofHeight: proofHeight, + Signer: signer.String(), } } @@ -423,7 +423,7 @@ func (msg MsgRecvPacket) Route() string { // ValidateBasic implements sdk.Msg func (msg MsgRecvPacket) ValidateBasic() error { - if len(msg.Proof) == 0 { + if len(msg.ProofCommitment) == 0 { return sdkerrors.Wrap(commitmenttypes.ErrInvalidProof, "cannot submit an empty proof") } if msg.ProofHeight.IsZero() { @@ -468,13 +468,13 @@ var _ sdk.Msg = &MsgTimeout{} // NewMsgTimeout constructs new MsgTimeout // nolint:interfacer func NewMsgTimeout( - packet Packet, nextSequenceRecv uint64, proof []byte, + packet Packet, nextSequenceRecv uint64, proofUnreceived []byte, proofHeight clienttypes.Height, signer sdk.AccAddress, ) *MsgTimeout { return &MsgTimeout{ Packet: packet, NextSequenceRecv: nextSequenceRecv, - Proof: proof, + ProofUnreceived: proofUnreceived, ProofHeight: proofHeight, Signer: signer.String(), } @@ -487,12 +487,15 @@ func (msg MsgTimeout) Route() string { // ValidateBasic implements sdk.Msg func (msg MsgTimeout) ValidateBasic() error { - if len(msg.Proof) == 0 { - return sdkerrors.Wrap(commitmenttypes.ErrInvalidProof, "cannot submit an empty proof") + if len(msg.ProofUnreceived) == 0 { + return sdkerrors.Wrap(commitmenttypes.ErrInvalidProof, "cannot submit an empty unreceived proof") } if msg.ProofHeight.IsZero() { return sdkerrors.Wrap(sdkerrors.ErrInvalidHeight, "proof height must be non-zero") } + if msg.NextSequenceRecv == 0 { + return sdkerrors.Wrap(sdkerrors.ErrInvalidSequence, "next sequence receive cannot be 0") + } _, err := sdk.AccAddressFromBech32(msg.Signer) if err != nil { return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "string could not be parsed as address: %v", err) @@ -524,13 +527,13 @@ func (msg MsgTimeout) Type() string { // nolint:interfacer func NewMsgTimeoutOnClose( packet Packet, nextSequenceRecv uint64, - proof, proofClose []byte, + proofUnreceived, proofClose []byte, proofHeight clienttypes.Height, signer sdk.AccAddress, ) *MsgTimeoutOnClose { return &MsgTimeoutOnClose{ Packet: packet, NextSequenceRecv: nextSequenceRecv, - Proof: proof, + ProofUnreceived: proofUnreceived, ProofClose: proofClose, ProofHeight: proofHeight, Signer: signer.String(), @@ -544,7 +547,10 @@ func (msg MsgTimeoutOnClose) Route() string { // ValidateBasic implements sdk.Msg func (msg MsgTimeoutOnClose) ValidateBasic() error { - if len(msg.Proof) == 0 { + if msg.NextSequenceRecv == 0 { + return sdkerrors.Wrap(sdkerrors.ErrInvalidSequence, "next sequence receive cannot be 0") + } + if len(msg.ProofUnreceived) == 0 { return sdkerrors.Wrap(commitmenttypes.ErrInvalidProof, "cannot submit an empty proof") } if len(msg.ProofClose) == 0 { @@ -585,11 +591,15 @@ var _ sdk.Msg = &MsgAcknowledgement{} // NewMsgAcknowledgement constructs a new MsgAcknowledgement // nolint:interfacer func NewMsgAcknowledgement( - packet Packet, ack []byte, proof []byte, proofHeight clienttypes.Height, signer sdk.AccAddress) *MsgAcknowledgement { + packet Packet, + ack, proofAcked []byte, + proofHeight clienttypes.Height, + signer sdk.AccAddress, +) *MsgAcknowledgement { return &MsgAcknowledgement{ Packet: packet, Acknowledgement: ack, - Proof: proof, + ProofAcked: proofAcked, ProofHeight: proofHeight, Signer: signer.String(), } @@ -602,12 +612,15 @@ func (msg MsgAcknowledgement) Route() string { // ValidateBasic implements sdk.Msg func (msg MsgAcknowledgement) ValidateBasic() error { - if len(msg.Proof) == 0 { + if len(msg.ProofAcked) == 0 { return sdkerrors.Wrap(commitmenttypes.ErrInvalidProof, "cannot submit an empty proof") } if msg.ProofHeight.IsZero() { return sdkerrors.Wrap(sdkerrors.ErrInvalidHeight, "proof height must be non-zero") } + if len(msg.Acknowledgement) == 0 { + return sdkerrors.Wrap(ErrInvalidAcknowledgement, "ack bytes cannot be empty") + } _, err := sdk.AccAddressFromBech32(msg.Signer) if err != nil { return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "string could not be parsed as address: %v", err) diff --git a/x/ibc/core/04-channel/types/msgs_test.go b/x/ibc/core/04-channel/types/msgs_test.go index f7004df682..3a666b31be 100644 --- a/x/ibc/core/04-channel/types/msgs_test.go +++ b/x/ibc/core/04-channel/types/msgs_test.go @@ -333,7 +333,7 @@ func (suite *TypesTestSuite) TestMsgRecvPacketValidateBasic() { msg *types.MsgRecvPacket expPass bool }{ - {"", types.NewMsgRecvPacket(packet, suite.proof, height, addr), true}, + {"success", types.NewMsgRecvPacket(packet, suite.proof, height, addr), true}, {"proof height is zero", types.NewMsgRecvPacket(packet, suite.proof, clienttypes.ZeroHeight(), addr), false}, {"proof contain empty proof", types.NewMsgRecvPacket(packet, emptyProof, height, addr), false}, {"missing signer address", types.NewMsgRecvPacket(packet, suite.proof, height, emptyAddr), false}, @@ -369,8 +369,9 @@ func (suite *TypesTestSuite) TestMsgTimeoutValidateBasic() { msg *types.MsgTimeout expPass bool }{ - {"", types.NewMsgTimeout(packet, 1, suite.proof, height, addr), true}, + {"success", types.NewMsgTimeout(packet, 1, suite.proof, height, addr), true}, {"proof height must be > 0", types.NewMsgTimeout(packet, 1, suite.proof, clienttypes.ZeroHeight(), addr), false}, + {"seq 0", types.NewMsgTimeout(packet, 0, suite.proof, height, addr), false}, {"missing signer address", types.NewMsgTimeout(packet, 1, suite.proof, height, emptyAddr), false}, {"cannot submit an empty proof", types.NewMsgTimeout(packet, 1, emptyProof, height, addr), false}, {"invalid packet", types.NewMsgTimeout(invalidPacket, 1, suite.proof, height, addr), false}, @@ -398,6 +399,7 @@ func (suite *TypesTestSuite) TestMsgTimeoutOnCloseValidateBasic() { expPass bool }{ {"success", types.NewMsgTimeoutOnClose(packet, 1, suite.proof, suite.proof, height, addr), true}, + {"seq 0", types.NewMsgTimeoutOnClose(packet, 0, suite.proof, suite.proof, height, addr), false}, {"empty proof", types.NewMsgTimeoutOnClose(packet, 1, emptyProof, suite.proof, height, addr), false}, {"empty proof close", types.NewMsgTimeoutOnClose(packet, 1, suite.proof, emptyProof, height, addr), false}, {"proof height is zero", types.NewMsgTimeoutOnClose(packet, 1, suite.proof, suite.proof, clienttypes.ZeroHeight(), addr), false}, @@ -426,8 +428,9 @@ func (suite *TypesTestSuite) TestMsgAcknowledgementValidateBasic() { msg *types.MsgAcknowledgement expPass bool }{ - {"", types.NewMsgAcknowledgement(packet, packet.GetData(), suite.proof, height, addr), true}, + {"success", types.NewMsgAcknowledgement(packet, packet.GetData(), suite.proof, height, addr), true}, {"proof height must be > 0", types.NewMsgAcknowledgement(packet, packet.GetData(), suite.proof, clienttypes.ZeroHeight(), addr), false}, + {"empty ack", types.NewMsgAcknowledgement(packet, nil, suite.proof, height, addr), false}, {"missing signer address", types.NewMsgAcknowledgement(packet, packet.GetData(), suite.proof, height, emptyAddr), false}, {"cannot submit an empty proof", types.NewMsgAcknowledgement(packet, packet.GetData(), emptyProof, height, addr), false}, {"invalid packet", types.NewMsgAcknowledgement(invalidPacket, packet.GetData(), suite.proof, height, addr), false}, diff --git a/x/ibc/core/04-channel/types/tx.pb.go b/x/ibc/core/04-channel/types/tx.pb.go index 2ad25780da..608f573a77 100644 --- a/x/ibc/core/04-channel/types/tx.pb.go +++ b/x/ibc/core/04-channel/types/tx.pb.go @@ -513,10 +513,10 @@ var xxx_messageInfo_MsgChannelCloseConfirmResponse proto.InternalMessageInfo // MsgRecvPacket receives incoming IBC packet type MsgRecvPacket struct { - Packet Packet `protobuf:"bytes,1,opt,name=packet,proto3" json:"packet"` - Proof []byte `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof,omitempty"` - ProofHeight types.Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height" yaml:"proof_height"` - Signer string `protobuf:"bytes,4,opt,name=signer,proto3" json:"signer,omitempty"` + Packet Packet `protobuf:"bytes,1,opt,name=packet,proto3" json:"packet"` + ProofCommitment []byte `protobuf:"bytes,2,opt,name=proof_commitment,json=proofCommitment,proto3" json:"proof_commitment,omitempty" yaml:"proof_commitment"` + ProofHeight types.Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height" yaml:"proof_height"` + Signer string `protobuf:"bytes,4,opt,name=signer,proto3" json:"signer,omitempty"` } func (m *MsgRecvPacket) Reset() { *m = MsgRecvPacket{} } @@ -592,7 +592,7 @@ var xxx_messageInfo_MsgRecvPacketResponse proto.InternalMessageInfo // MsgTimeout receives timed-out packet type MsgTimeout struct { Packet Packet `protobuf:"bytes,1,opt,name=packet,proto3" json:"packet"` - Proof []byte `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof,omitempty"` + ProofUnreceived []byte `protobuf:"bytes,2,opt,name=proof_unreceived,json=proofUnreceived,proto3" json:"proof_unreceived,omitempty" yaml:"proof_unreceived"` ProofHeight types.Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height" yaml:"proof_height"` NextSequenceRecv uint64 `protobuf:"varint,4,opt,name=next_sequence_recv,json=nextSequenceRecv,proto3" json:"next_sequence_recv,omitempty" yaml:"next_sequence_recv"` Signer string `protobuf:"bytes,5,opt,name=signer,proto3" json:"signer,omitempty"` @@ -671,7 +671,7 @@ var xxx_messageInfo_MsgTimeoutResponse proto.InternalMessageInfo // MsgTimeoutOnClose timed-out packet upon counterparty channel closure. type MsgTimeoutOnClose struct { Packet Packet `protobuf:"bytes,1,opt,name=packet,proto3" json:"packet"` - Proof []byte `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof,omitempty"` + ProofUnreceived []byte `protobuf:"bytes,2,opt,name=proof_unreceived,json=proofUnreceived,proto3" json:"proof_unreceived,omitempty" yaml:"proof_unreceived"` ProofClose []byte `protobuf:"bytes,3,opt,name=proof_close,json=proofClose,proto3" json:"proof_close,omitempty" yaml:"proof_close"` ProofHeight types.Height `protobuf:"bytes,4,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height" yaml:"proof_height"` NextSequenceRecv uint64 `protobuf:"varint,5,opt,name=next_sequence_recv,json=nextSequenceRecv,proto3" json:"next_sequence_recv,omitempty" yaml:"next_sequence_recv"` @@ -752,7 +752,7 @@ var xxx_messageInfo_MsgTimeoutOnCloseResponse proto.InternalMessageInfo type MsgAcknowledgement struct { Packet Packet `protobuf:"bytes,1,opt,name=packet,proto3" json:"packet"` Acknowledgement []byte `protobuf:"bytes,2,opt,name=acknowledgement,proto3" json:"acknowledgement,omitempty"` - Proof []byte `protobuf:"bytes,3,opt,name=proof,proto3" json:"proof,omitempty"` + ProofAcked []byte `protobuf:"bytes,3,opt,name=proof_acked,json=proofAcked,proto3" json:"proof_acked,omitempty" yaml:"proof_acked"` ProofHeight types.Height `protobuf:"bytes,4,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height" yaml:"proof_height"` Signer string `protobuf:"bytes,5,opt,name=signer,proto3" json:"signer,omitempty"` } @@ -853,77 +853,80 @@ func init() { func init() { proto.RegisterFile("ibc/core/channel/v1/tx.proto", fileDescriptor_bc4637e0ac3fc7b7) } var fileDescriptor_bc4637e0ac3fc7b7 = []byte{ - // 1110 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x58, 0x3f, 0x6f, 0xdb, 0x46, - 0x14, 0x17, 0x25, 0x59, 0xb6, 0x9f, 0xdd, 0xc4, 0xa1, 0x64, 0x47, 0xa1, 0x6c, 0xd1, 0x25, 0xd0, - 0x44, 0x4d, 0x11, 0x29, 0x76, 0x02, 0xb4, 0x0d, 0xba, 0x58, 0x5a, 0x6a, 0x04, 0x46, 0x0a, 0xc6, - 0xe8, 0x60, 0x14, 0x10, 0xe4, 0xd3, 0x85, 0x22, 0x24, 0xdd, 0xa9, 0x24, 0xad, 0x58, 0xdf, 0xa0, - 0x4b, 0x81, 0xce, 0x9d, 0x32, 0x16, 0xe8, 0x90, 0x0f, 0xd1, 0x25, 0x63, 0xb6, 0x74, 0x22, 0x0a, - 0x7b, 0xc9, 0xac, 0x4f, 0x50, 0xf0, 0x78, 0x22, 0x29, 0x8a, 0xb4, 0xe9, 0xba, 0x16, 0x90, 0x49, - 0x77, 0xf7, 0x7e, 0xf7, 0xee, 0xbd, 0xdf, 0xfb, 0xdd, 0x1f, 0x0a, 0x36, 0xf5, 0x63, 0x54, 0x43, - 0xd4, 0xc0, 0x35, 0xd4, 0x69, 0x11, 0x82, 0x7b, 0xb5, 0xe1, 0x4e, 0xcd, 0x3a, 0xad, 0x0e, 0x0c, - 0x6a, 0x51, 0x31, 0xaf, 0x1f, 0xa3, 0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x2f, 0xa7, 0xde, 0x9f, 0x97, 0x53, 0x7f, 0x9f, 0x97, 0x53, 0x47, 0xdf, 0x68, - 0xba, 0xd5, 0x39, 0x39, 0xae, 0x22, 0xda, 0xaf, 0x21, 0x6a, 0xf6, 0xa9, 0xc9, 0x7f, 0x1e, 0x99, - 0xed, 0x6e, 0xed, 0xb4, 0xe6, 0xfd, 0x5f, 0xf4, 0xf8, 0xe9, 0xa3, 0xc9, 0x5f, 0x46, 0xd6, 0x68, - 0x80, 0xcd, 0xe3, 0x1c, 0xfb, 0xbb, 0xe8, 0xc9, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xd3, 0x86, - 0x17, 0x79, 0xbd, 0x12, 0x00, 0x00, + // 1158 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0xcd, 0x6e, 0xdb, 0x46, + 0x10, 0xd6, 0x9f, 0x65, 0x7b, 0xec, 0xc6, 0x0e, 0xfd, 0xa7, 0x50, 0xb6, 0xe8, 0x12, 0x68, 0xe2, + 0xa6, 0x88, 0x14, 0x3b, 0x01, 0xda, 0x06, 0xbd, 0x58, 0x02, 0x8a, 0x1a, 0x81, 0x91, 0x82, 0x71, + 0x7b, 0x30, 0x0a, 0x08, 0xf2, 0x6a, 0x43, 0x11, 0xb2, 0x76, 0x55, 0x92, 0x56, 0xac, 0x37, 0xe8, + 0x31, 0xe7, 0x9e, 0x72, 0xef, 0x21, 0x7d, 0x87, 0x5e, 0x72, 0xcc, 0x2d, 0x45, 0x0f, 0x44, 0x61, + 0x5f, 0x7a, 0xe6, 0x13, 0x14, 0x5c, 0x2e, 0x7f, 0x44, 0x91, 0x31, 0x5d, 0x57, 0x6a, 0x4f, 0x22, + 0x67, 0xbe, 0x9d, 0x9d, 0xfd, 0xe6, 0xdb, 0xd9, 0xa5, 0x60, 0x53, 0x3b, 0x41, 0x35, 0x44, 0x75, + 0x5c, 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, + 0x29, 0x44, 0x80, 0x11, 0xef, 0x5f, 0x8d, 0xf1, 0xa3, 0x3f, 0x87, 0x59, 0xef, 0xfc, 0x95, 0x92, + 0x86, 0x71, 0x80, 0x78, 0xef, 0x0a, 0x40, 0x58, 0x7b, 0x91, 0x13, 0xe6, 0xee, 0x15, 0x43, 0x39, + 0x2e, 0x59, 0x7b, 0xf1, 0x5d, 0xd1, 0xd9, 0xbc, 0xd1, 0x8e, 0x98, 0x98, 0x65, 0x04, 0x98, 0xbc, + 0x79, 0x13, 0x3a, 0x46, 0x5d, 0x79, 0x7b, 0x51, 0xc9, 0xbe, 0xbb, 0xa8, 0x64, 0xff, 0xbc, 0xa8, + 0x64, 0x5f, 0x5d, 0x56, 0x32, 0xef, 0x2e, 0x2b, 0x99, 0xdf, 0x2f, 0x2b, 0x99, 0xe3, 0x2f, 0x54, + 0xcd, 0xec, 0x9c, 0x9d, 0x54, 0x11, 0xed, 0xd5, 0x10, 0x35, 0x7a, 0xd4, 0xe0, 0x3f, 0x0f, 0x8c, + 0x76, 0xb7, 0x76, 0x5e, 0xf3, 0xff, 0xe8, 0x7a, 0xf8, 0xf8, 0x81, 0xf7, 0x5f, 0x97, 0x39, 0xec, + 0x63, 0xe3, 0xa4, 0xc8, 0xfe, 0xe7, 0x7a, 0xf4, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0x6e, 0x07, + 0x48, 0xeb, 0x76, 0x13, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1905,10 +1908,10 @@ func (m *MsgRecvPacket) MarshalToSizedBuffer(dAtA []byte) (int, error) { } i-- dAtA[i] = 0x1a - if len(m.Proof) > 0 { - i -= len(m.Proof) - copy(dAtA[i:], m.Proof) - i = encodeVarintTx(dAtA, i, uint64(len(m.Proof))) + if len(m.ProofCommitment) > 0 { + i -= len(m.ProofCommitment) + copy(dAtA[i:], m.ProofCommitment) + i = encodeVarintTx(dAtA, i, uint64(len(m.ProofCommitment))) i-- dAtA[i] = 0x12 } @@ -1990,10 +1993,10 @@ func (m *MsgTimeout) MarshalToSizedBuffer(dAtA []byte) (int, error) { } i-- dAtA[i] = 0x1a - if len(m.Proof) > 0 { - i -= len(m.Proof) - copy(dAtA[i:], m.Proof) - i = encodeVarintTx(dAtA, i, uint64(len(m.Proof))) + if len(m.ProofUnreceived) > 0 { + i -= len(m.ProofUnreceived) + copy(dAtA[i:], m.ProofUnreceived) + i = encodeVarintTx(dAtA, i, uint64(len(m.ProofUnreceived))) i-- dAtA[i] = 0x12 } @@ -2082,10 +2085,10 @@ func (m *MsgTimeoutOnClose) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x1a } - if len(m.Proof) > 0 { - i -= len(m.Proof) - copy(dAtA[i:], m.Proof) - i = encodeVarintTx(dAtA, i, uint64(len(m.Proof))) + if len(m.ProofUnreceived) > 0 { + i -= len(m.ProofUnreceived) + copy(dAtA[i:], m.ProofUnreceived) + i = encodeVarintTx(dAtA, i, uint64(len(m.ProofUnreceived))) i-- dAtA[i] = 0x12 } @@ -2162,10 +2165,10 @@ func (m *MsgAcknowledgement) MarshalToSizedBuffer(dAtA []byte) (int, error) { } i-- dAtA[i] = 0x22 - if len(m.Proof) > 0 { - i -= len(m.Proof) - copy(dAtA[i:], m.Proof) - i = encodeVarintTx(dAtA, i, uint64(len(m.Proof))) + if len(m.ProofAcked) > 0 { + i -= len(m.ProofAcked) + copy(dAtA[i:], m.ProofAcked) + i = encodeVarintTx(dAtA, i, uint64(len(m.ProofAcked))) i-- dAtA[i] = 0x1a } @@ -2455,7 +2458,7 @@ func (m *MsgRecvPacket) Size() (n int) { _ = l l = m.Packet.Size() n += 1 + l + sovTx(uint64(l)) - l = len(m.Proof) + l = len(m.ProofCommitment) if l > 0 { n += 1 + l + sovTx(uint64(l)) } @@ -2485,7 +2488,7 @@ func (m *MsgTimeout) Size() (n int) { _ = l l = m.Packet.Size() n += 1 + l + sovTx(uint64(l)) - l = len(m.Proof) + l = len(m.ProofUnreceived) if l > 0 { n += 1 + l + sovTx(uint64(l)) } @@ -2518,7 +2521,7 @@ func (m *MsgTimeoutOnClose) Size() (n int) { _ = l l = m.Packet.Size() n += 1 + l + sovTx(uint64(l)) - l = len(m.Proof) + l = len(m.ProofUnreceived) if l > 0 { n += 1 + l + sovTx(uint64(l)) } @@ -2559,7 +2562,7 @@ func (m *MsgAcknowledgement) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = len(m.Proof) + l = len(m.ProofAcked) if l > 0 { n += 1 + l + sovTx(uint64(l)) } @@ -4325,7 +4328,7 @@ func (m *MsgRecvPacket) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Proof", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ProofCommitment", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { @@ -4352,9 +4355,9 @@ func (m *MsgRecvPacket) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Proof = append(m.Proof[:0], dAtA[iNdEx:postIndex]...) - if m.Proof == nil { - m.Proof = []byte{} + m.ProofCommitment = append(m.ProofCommitment[:0], dAtA[iNdEx:postIndex]...) + if m.ProofCommitment == nil { + m.ProofCommitment = []byte{} } iNdEx = postIndex case 3: @@ -4563,7 +4566,7 @@ func (m *MsgTimeout) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Proof", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ProofUnreceived", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { @@ -4590,9 +4593,9 @@ func (m *MsgTimeout) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Proof = append(m.Proof[:0], dAtA[iNdEx:postIndex]...) - if m.Proof == nil { - m.Proof = []byte{} + m.ProofUnreceived = append(m.ProofUnreceived[:0], dAtA[iNdEx:postIndex]...) + if m.ProofUnreceived == nil { + m.ProofUnreceived = []byte{} } iNdEx = postIndex case 3: @@ -4820,7 +4823,7 @@ func (m *MsgTimeoutOnClose) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Proof", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ProofUnreceived", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { @@ -4847,9 +4850,9 @@ func (m *MsgTimeoutOnClose) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Proof = append(m.Proof[:0], dAtA[iNdEx:postIndex]...) - if m.Proof == nil { - m.Proof = []byte{} + m.ProofUnreceived = append(m.ProofUnreceived[:0], dAtA[iNdEx:postIndex]...) + if m.ProofUnreceived == nil { + m.ProofUnreceived = []byte{} } iNdEx = postIndex case 3: @@ -5145,7 +5148,7 @@ func (m *MsgAcknowledgement) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Proof", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ProofAcked", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { @@ -5172,9 +5175,9 @@ func (m *MsgAcknowledgement) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Proof = append(m.Proof[:0], dAtA[iNdEx:postIndex]...) - if m.Proof == nil { - m.Proof = []byte{} + m.ProofAcked = append(m.ProofAcked[:0], dAtA[iNdEx:postIndex]...) + if m.ProofAcked == nil { + m.ProofAcked = []byte{} } iNdEx = postIndex case 4: diff --git a/x/ibc/core/keeper/msg_server.go b/x/ibc/core/keeper/msg_server.go index 01d3dae311..c7579fdbba 100644 --- a/x/ibc/core/keeper/msg_server.go +++ b/x/ibc/core/keeper/msg_server.go @@ -431,7 +431,7 @@ func (k Keeper) RecvPacket(goCtx context.Context, msg *channeltypes.MsgRecvPacke } // Perform TAO verification - if err := k.ChannelKeeper.RecvPacket(ctx, cap, msg.Packet, msg.Proof, msg.ProofHeight); err != nil { + if err := k.ChannelKeeper.RecvPacket(ctx, cap, msg.Packet, msg.ProofCommitment, msg.ProofHeight); err != nil { return nil, sdkerrors.Wrap(err, "receive packet verification failed") } @@ -482,7 +482,7 @@ func (k Keeper) Timeout(goCtx context.Context, msg *channeltypes.MsgTimeout) (*c } // Perform TAO verification - if err := k.ChannelKeeper.TimeoutPacket(ctx, msg.Packet, msg.Proof, msg.ProofHeight, msg.NextSequenceRecv); err != nil { + if err := k.ChannelKeeper.TimeoutPacket(ctx, msg.Packet, msg.ProofUnreceived, msg.ProofHeight, msg.NextSequenceRecv); err != nil { return nil, sdkerrors.Wrap(err, "timeout packet verification failed") } @@ -531,7 +531,7 @@ func (k Keeper) TimeoutOnClose(goCtx context.Context, msg *channeltypes.MsgTimeo } // Perform TAO verification - if err := k.ChannelKeeper.TimeoutOnClose(ctx, cap, msg.Packet, msg.Proof, msg.ProofClose, msg.ProofHeight, msg.NextSequenceRecv); err != nil { + if err := k.ChannelKeeper.TimeoutOnClose(ctx, cap, msg.Packet, msg.ProofUnreceived, msg.ProofClose, msg.ProofHeight, msg.NextSequenceRecv); err != nil { return nil, sdkerrors.Wrap(err, "timeout on close packet verification failed") } @@ -582,7 +582,7 @@ func (k Keeper) Acknowledgement(goCtx context.Context, msg *channeltypes.MsgAckn } // Perform TAO verification - if err := k.ChannelKeeper.AcknowledgePacket(ctx, cap, msg.Packet, msg.Acknowledgement, msg.Proof, msg.ProofHeight); err != nil { + if err := k.ChannelKeeper.AcknowledgePacket(ctx, cap, msg.Packet, msg.Acknowledgement, msg.ProofAcked, msg.ProofHeight); err != nil { return nil, sdkerrors.Wrap(err, "acknowledge packet verification failed") } From ddc777cf6f6cbaa2cfcd2de79a47ab7402556413 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?colin=20axn=C3=A9r?= <25233464+colin-axner@users.noreply.github.com> Date: Fri, 13 Nov 2020 15:16:51 +0100 Subject: [PATCH 095/136] remove chainid from ibc tm misbehaviour (#7932) * remove chainid from misbehaviour * update err msg Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- .../solomachine/v1/solomachine.proto | 1 - .../tendermint/v1/tendermint.proto | 6 +- x/ibc/core/02-client/keeper/client_test.go | 45 ++-- x/ibc/core/02-client/types/codec_test.go | 4 +- x/ibc/core/02-client/types/msgs_test.go | 14 +- x/ibc/core/exported/client.go | 1 - .../06-solomachine/types/misbehaviour.go | 8 - .../06-solomachine/types/solomachine.pb.go | 178 ++++++++-------- .../07-tendermint/types/misbehaviour.go | 22 +- .../types/misbehaviour_handle_test.go | 18 -- .../07-tendermint/types/misbehaviour_test.go | 42 +--- .../07-tendermint/types/tendermint.pb.go | 196 +++++++----------- 12 files changed, 204 insertions(+), 331 deletions(-) diff --git a/proto/ibc/lightclients/solomachine/v1/solomachine.proto b/proto/ibc/lightclients/solomachine/v1/solomachine.proto index 5903b1b651..738217fa6c 100644 --- a/proto/ibc/lightclients/solomachine/v1/solomachine.proto +++ b/proto/ibc/lightclients/solomachine/v1/solomachine.proto @@ -49,7 +49,6 @@ message Header { // of a sequence and two signatures over different messages at that sequence. message Misbehaviour { option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = false; string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; uint64 sequence = 2; SignatureAndData signature_one = 3 [(gogoproto.moretags) = "yaml:\"signature_one\""]; diff --git a/proto/ibc/lightclients/tendermint/v1/tendermint.proto b/proto/ibc/lightclients/tendermint/v1/tendermint.proto index d92b1d6704..6f9285c057 100644 --- a/proto/ibc/lightclients/tendermint/v1/tendermint.proto +++ b/proto/ibc/lightclients/tendermint/v1/tendermint.proto @@ -72,12 +72,10 @@ message ConsensusState { // that implements Misbehaviour interface expected by ICS-02 message Misbehaviour { option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = false; string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; - string chain_id = 2 [(gogoproto.moretags) = "yaml:\"chain_id\""]; - Header header_1 = 3 [(gogoproto.customname) = "Header1", (gogoproto.moretags) = "yaml:\"header_1\""]; - Header header_2 = 4 [(gogoproto.customname) = "Header2", (gogoproto.moretags) = "yaml:\"header_2\""]; + Header header_1 = 2 [(gogoproto.customname) = "Header1", (gogoproto.moretags) = "yaml:\"header_1\""]; + Header header_2 = 3 [(gogoproto.customname) = "Header2", (gogoproto.moretags) = "yaml:\"header_2\""]; } // Header defines the Tendermint client consensus Header. diff --git a/x/ibc/core/02-client/keeper/client_test.go b/x/ibc/core/02-client/keeper/client_test.go index ae2836af54..c2f5c8144a 100644 --- a/x/ibc/core/02-client/keeper/client_test.go +++ b/x/ibc/core/02-client/keeper/client_test.go @@ -33,11 +33,11 @@ func (suite *KeeperTestSuite) TestCreateClient() { i := i if tc.expPanic { suite.Require().Panics(func() { - clientState := ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) + clientState := ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) suite.keeper.CreateClient(suite.ctx, tc.clientID, clientState, suite.consensusState) }, "Msg %d didn't panic: %s", i, tc.msg) } else { - clientState := ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) + clientState := ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) if tc.expPass { suite.Require().NotNil(clientState, "valid test case %d failed: %s", i, tc.msg) } @@ -80,7 +80,7 @@ func (suite *KeeperTestSuite) TestUpdateClientTendermint() { expPass bool }{ {"valid update", func() error { - clientState = ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) + clientState = ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) err := suite.keeper.CreateClient(suite.ctx, testClientID, clientState, suite.consensusState) // store intermediate consensus state to check that trustedHeight does not need to be highest consensus state before header height @@ -98,7 +98,7 @@ func (suite *KeeperTestSuite) TestUpdateClientTendermint() { return err }, true}, {"valid past update", func() error { - clientState = ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) + clientState = ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) err := suite.keeper.CreateClient(suite.ctx, testClientID, clientState, suite.consensusState) suite.Require().NoError(err) @@ -131,7 +131,7 @@ func (suite *KeeperTestSuite) TestUpdateClientTendermint() { return nil }, false}, {"consensus state not found", func() error { - clientState = ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) + clientState = ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) suite.keeper.SetClientState(suite.ctx, testClientID, clientState) updateHeader = createFutureUpdateFn(suite) @@ -145,7 +145,7 @@ func (suite *KeeperTestSuite) TestUpdateClientTendermint() { return nil }, false}, {"valid past update before client was frozen", func() error { - clientState = ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) + clientState = ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) clientState.FrozenHeight = types.NewHeight(0, testClientHeight.VersionHeight-1) err := suite.keeper.CreateClient(suite.ctx, testClientID, clientState, suite.consensusState) suite.Require().NoError(err) @@ -165,7 +165,7 @@ func (suite *KeeperTestSuite) TestUpdateClientTendermint() { return nil }, true}, {"invalid header", func() error { - clientState = ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) + clientState = ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) err := suite.keeper.CreateClient(suite.ctx, testClientID, clientState, suite.consensusState) suite.Require().NoError(err) updateHeader = createPastUpdateFn(suite) @@ -250,7 +250,7 @@ func (suite *KeeperTestSuite) TestUpgradeClient() { name: "successful upgrade", setup: func() { - upgradedClient = ibctmtypes.NewClientState("newChainId", ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod+trustingPeriod, maxClockDrift, newClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) + upgradedClient = ibctmtypes.NewClientState("newChainId", ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod+trustingPeriod, maxClockDrift, newClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) // upgrade Height is at next block upgradeHeight = clienttypes.NewHeight(0, uint64(suite.chainB.GetContext().BlockHeight()+1)) @@ -275,7 +275,7 @@ func (suite *KeeperTestSuite) TestUpgradeClient() { name: "client state not found", setup: func() { - upgradedClient = ibctmtypes.NewClientState("newChainId", ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod+trustingPeriod, maxClockDrift, newClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) + upgradedClient = ibctmtypes.NewClientState("newChainId", ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod+trustingPeriod, maxClockDrift, newClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) // upgrade Height is at next block upgradeHeight = clienttypes.NewHeight(0, uint64(suite.chainB.GetContext().BlockHeight()+1)) @@ -302,7 +302,7 @@ func (suite *KeeperTestSuite) TestUpgradeClient() { name: "client state frozen", setup: func() { - upgradedClient = ibctmtypes.NewClientState("newChainId", ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod+trustingPeriod, maxClockDrift, newClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) + upgradedClient = ibctmtypes.NewClientState("newChainId", ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod+trustingPeriod, maxClockDrift, newClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) // upgrade Height is at next block upgradeHeight = clienttypes.NewHeight(0, uint64(suite.chainB.GetContext().BlockHeight()+1)) @@ -333,7 +333,7 @@ func (suite *KeeperTestSuite) TestUpgradeClient() { name: "tendermint client VerifyUpgrade fails", setup: func() { - upgradedClient = ibctmtypes.NewClientState("newChainId", ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod+trustingPeriod, maxClockDrift, newClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) + upgradedClient = ibctmtypes.NewClientState("newChainId", ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod+trustingPeriod, maxClockDrift, newClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) // upgrade Height is at next block upgradeHeight = clienttypes.NewHeight(0, uint64(suite.chainB.GetContext().BlockHeight()+1)) @@ -342,7 +342,7 @@ func (suite *KeeperTestSuite) TestUpgradeClient() { suite.chainB.App.UpgradeKeeper.SetUpgradedClient(suite.chainB.GetContext(), int64(upgradeHeight.GetVersionHeight()), upgradedClient) // change upgradedClient client-specified parameters - upgradedClient = ibctmtypes.NewClientState("wrongchainID", ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, newClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, true, true) + upgradedClient = ibctmtypes.NewClientState("wrongchainID", ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, newClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, true, true) suite.coordinator.CommitBlock(suite.chainB) err := suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) @@ -413,12 +413,11 @@ func (suite *KeeperTestSuite) TestCheckMisbehaviourAndUpdateState() { &ibctmtypes.Misbehaviour{ Header1: suite.chainA.CreateTMClientHeader(testChainID, int64(testClientHeight.VersionHeight), testClientHeight, altTime, bothValSet, bothValSet, bothSigners), Header2: suite.chainA.CreateTMClientHeader(testChainID, int64(testClientHeight.VersionHeight), testClientHeight, suite.ctx.BlockTime(), bothValSet, bothValSet, bothSigners), - ChainId: testChainID, ClientId: testClientID, }, func() error { suite.consensusState.NextValidatorsHash = bothValsHash - clientState := ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) + clientState := ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) err := suite.keeper.CreateClient(suite.ctx, testClientID, clientState, suite.consensusState) return err @@ -430,12 +429,11 @@ func (suite *KeeperTestSuite) TestCheckMisbehaviourAndUpdateState() { &ibctmtypes.Misbehaviour{ Header1: suite.chainA.CreateTMClientHeader(testChainID, int64(heightPlus5.VersionHeight), testClientHeight, altTime, bothValSet, valSet, bothSigners), Header2: suite.chainA.CreateTMClientHeader(testChainID, int64(heightPlus5.VersionHeight), testClientHeight, suite.ctx.BlockTime(), bothValSet, valSet, bothSigners), - ChainId: testChainID, ClientId: testClientID, }, func() error { suite.consensusState.NextValidatorsHash = valsHash - clientState := ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) + clientState := ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) err := suite.keeper.CreateClient(suite.ctx, testClientID, clientState, suite.consensusState) // store intermediate consensus state to check that trustedHeight does not need to be highest consensus state before header height @@ -457,12 +455,11 @@ func (suite *KeeperTestSuite) TestCheckMisbehaviourAndUpdateState() { &ibctmtypes.Misbehaviour{ Header1: suite.chainA.CreateTMClientHeader(testChainID, int64(heightPlus5.VersionHeight), testClientHeight, altTime, bothValSet, valSet, bothSigners), Header2: suite.chainA.CreateTMClientHeader(testChainID, int64(heightPlus5.VersionHeight), heightPlus3, suite.ctx.BlockTime(), bothValSet, bothValSet, bothSigners), - ChainId: testChainID, ClientId: testClientID, }, func() error { suite.consensusState.NextValidatorsHash = valsHash - clientState := ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) + clientState := ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) err := suite.keeper.CreateClient(suite.ctx, testClientID, clientState, suite.consensusState) // store trusted consensus state for Header2 @@ -484,12 +481,11 @@ func (suite *KeeperTestSuite) TestCheckMisbehaviourAndUpdateState() { &ibctmtypes.Misbehaviour{ Header1: suite.chainA.CreateTMClientHeader(testChainID, int64(heightPlus5.VersionHeight), heightPlus3, altTime, bothValSet, bothValSet, bothSigners), Header2: suite.chainA.CreateTMClientHeader(testChainID, int64(heightPlus5.VersionHeight), testClientHeight, suite.ctx.BlockTime(), bothValSet, valSet, bothSigners), - ChainId: testChainID, ClientId: testClientID, }, func() error { suite.consensusState.NextValidatorsHash = valsHash - clientState := ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) + clientState := ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) err := suite.keeper.CreateClient(suite.ctx, testClientID, clientState, suite.consensusState) // intermediate consensus state at height + 3 is not created return err @@ -501,12 +497,11 @@ func (suite *KeeperTestSuite) TestCheckMisbehaviourAndUpdateState() { &ibctmtypes.Misbehaviour{ Header1: suite.chainA.CreateTMClientHeader(testChainID, int64(heightPlus5.VersionHeight), testClientHeight, altTime, bothValSet, valSet, bothSigners), Header2: suite.chainA.CreateTMClientHeader(testChainID, int64(heightPlus5.VersionHeight), heightPlus3, suite.ctx.BlockTime(), bothValSet, bothValSet, bothSigners), - ChainId: testChainID, ClientId: testClientID, }, func() error { suite.consensusState.NextValidatorsHash = valsHash - clientState := ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) + clientState := ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) err := suite.keeper.CreateClient(suite.ctx, testClientID, clientState, suite.consensusState) // intermediate consensus state at height + 3 is not created return err @@ -524,12 +519,11 @@ func (suite *KeeperTestSuite) TestCheckMisbehaviourAndUpdateState() { &ibctmtypes.Misbehaviour{ Header1: suite.chainA.CreateTMClientHeader(testChainID, int64(testClientHeight.VersionHeight), testClientHeight, altTime, bothValSet, bothValSet, bothSigners), Header2: suite.chainA.CreateTMClientHeader(testChainID, int64(testClientHeight.VersionHeight), testClientHeight, suite.ctx.BlockTime(), bothValSet, bothValSet, bothSigners), - ChainId: testChainID, ClientId: testClientID, }, func() error { suite.consensusState.NextValidatorsHash = bothValsHash - clientState := ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) + clientState := ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) err := suite.keeper.CreateClient(suite.ctx, testClientID, clientState, suite.consensusState) clientState.FrozenHeight = types.NewHeight(0, 1) @@ -544,11 +538,10 @@ func (suite *KeeperTestSuite) TestCheckMisbehaviourAndUpdateState() { &ibctmtypes.Misbehaviour{ Header1: suite.chainA.CreateTMClientHeader(testChainID, int64(testClientHeight.VersionHeight), testClientHeight, altTime, bothValSet, bothValSet, bothSigners), Header2: suite.chainA.CreateTMClientHeader(testChainID, int64(testClientHeight.VersionHeight), testClientHeight, suite.ctx.BlockTime(), altValSet, bothValSet, altSigners), - ChainId: testChainID, ClientId: testClientID, }, func() error { - clientState := ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) + clientState := ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) if err != nil { return err } diff --git a/x/ibc/core/02-client/types/codec_test.go b/x/ibc/core/02-client/types/codec_test.go index 603fe69347..75cfc97eb0 100644 --- a/x/ibc/core/02-client/types/codec_test.go +++ b/x/ibc/core/02-client/types/codec_test.go @@ -30,7 +30,7 @@ func (suite *TypesTestSuite) TestPackClientState() { }, { "tendermint client", - ibctmtypes.NewClientState(chainID, ibctesting.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), + ibctmtypes.NewClientState(chainID, ibctesting.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), true, }, { @@ -175,7 +175,7 @@ func (suite *TypesTestSuite) TestPackMisbehaviour() { }, { "tendermint misbehaviour", - ibctmtypes.NewMisbehaviour("tendermint", suite.chainA.ChainID, suite.chainA.LastHeader, suite.chainA.LastHeader), + ibctmtypes.NewMisbehaviour("tendermint", suite.chainA.LastHeader, suite.chainA.LastHeader), true, }, { diff --git a/x/ibc/core/02-client/types/msgs_test.go b/x/ibc/core/02-client/types/msgs_test.go index fbbbb4aa75..7373205cc5 100644 --- a/x/ibc/core/02-client/types/msgs_test.go +++ b/x/ibc/core/02-client/types/msgs_test.go @@ -56,7 +56,7 @@ func (suite *TypesTestSuite) TestMarshalMsgCreateClient() { }, { "tendermint client", func() { - tendermintClient := ibctmtypes.NewClientState(suite.chainA.ChainID, ibctesting.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) + tendermintClient := ibctmtypes.NewClientState(suite.chainA.ChainID, ibctesting.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) msg, err = types.NewMsgCreateClient("tendermint", tendermintClient, suite.chainA.CurrentTMClientHeader().ConsensusState(), suite.chainA.SenderAccount.GetAddress()) suite.Require().NoError(err) }, @@ -108,7 +108,7 @@ func (suite *TypesTestSuite) TestMsgCreateClient_ValidateBasic() { { "valid - tendermint client", func() { - tendermintClient := ibctmtypes.NewClientState(suite.chainA.ChainID, ibctesting.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) + tendermintClient := ibctmtypes.NewClientState(suite.chainA.ChainID, ibctesting.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) msg, err = types.NewMsgCreateClient("tendermint", tendermintClient, suite.chainA.CurrentTMClientHeader().ConsensusState(), suite.chainA.SenderAccount.GetAddress()) suite.Require().NoError(err) }, @@ -132,7 +132,7 @@ func (suite *TypesTestSuite) TestMsgCreateClient_ValidateBasic() { { "failed to unpack consensus state", func() { - tendermintClient := ibctmtypes.NewClientState(suite.chainA.ChainID, ibctesting.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) + tendermintClient := ibctmtypes.NewClientState(suite.chainA.ChainID, ibctesting.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) msg, err = types.NewMsgCreateClient("tendermint", tendermintClient, suite.chainA.CurrentTMClientHeader().ConsensusState(), suite.chainA.SenderAccount.GetAddress()) suite.Require().NoError(err) msg.ConsensusState = nil @@ -348,7 +348,7 @@ func (suite *TypesTestSuite) TestMarshalMsgUpgradeClient() { { "client upgrades to new tendermint client", func() { - tendermintClient := ibctmtypes.NewClientState(suite.chainA.ChainID, ibctesting.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) + tendermintClient := ibctmtypes.NewClientState(suite.chainA.ChainID, ibctesting.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) msg, err = types.NewMsgUpgradeClient("clientid", tendermintClient, newClientHeight, []byte("proofUpgrade"), suite.chainA.SenderAccount.GetAddress()) suite.Require().NoError(err) }, @@ -462,7 +462,7 @@ func (suite *TypesTestSuite) TestMsgUpgradeClient_ValidateBasic() { for _, tc := range cases { tc := tc - clientState := ibctmtypes.NewClientState(suite.chainA.ChainID, ibctesting.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) + clientState := ibctmtypes.NewClientState(suite.chainA.ChainID, ibctesting.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) newClientHeight := types.NewHeight(1, 1) msg, _ := types.NewMsgUpgradeClient("testclientid", clientState, newClientHeight, []byte("proofUpgrade"), suite.chainA.SenderAccount.GetAddress()) @@ -503,7 +503,7 @@ func (suite *TypesTestSuite) TestMarshalMsgSubmitMisbehaviour() { header1 := suite.chainA.CreateTMClientHeader(suite.chainA.ChainID, int64(height.VersionHeight), heightMinus1, suite.chainA.CurrentHeader.Time, suite.chainA.Vals, suite.chainA.Vals, suite.chainA.Signers) header2 := suite.chainA.CreateTMClientHeader(suite.chainA.ChainID, int64(height.VersionHeight), heightMinus1, suite.chainA.CurrentHeader.Time.Add(time.Minute), suite.chainA.Vals, suite.chainA.Vals, suite.chainA.Signers) - misbehaviour := ibctmtypes.NewMisbehaviour("tendermint", suite.chainA.ChainID, header1, header2) + misbehaviour := ibctmtypes.NewMisbehaviour("tendermint", header1, header2) msg, err = types.NewMsgSubmitMisbehaviour("tendermint", misbehaviour, suite.chainA.SenderAccount.GetAddress()) suite.Require().NoError(err) @@ -561,7 +561,7 @@ func (suite *TypesTestSuite) TestMsgSubmitMisbehaviour_ValidateBasic() { header1 := suite.chainA.CreateTMClientHeader(suite.chainA.ChainID, int64(height.VersionHeight), heightMinus1, suite.chainA.CurrentHeader.Time, suite.chainA.Vals, suite.chainA.Vals, suite.chainA.Signers) header2 := suite.chainA.CreateTMClientHeader(suite.chainA.ChainID, int64(height.VersionHeight), heightMinus1, suite.chainA.CurrentHeader.Time.Add(time.Minute), suite.chainA.Vals, suite.chainA.Vals, suite.chainA.Signers) - misbehaviour := ibctmtypes.NewMisbehaviour("tendermint", suite.chainA.ChainID, header1, header2) + misbehaviour := ibctmtypes.NewMisbehaviour("tendermint", header1, header2) msg, err = types.NewMsgSubmitMisbehaviour("tendermint", misbehaviour, suite.chainA.SenderAccount.GetAddress()) suite.Require().NoError(err) }, diff --git a/x/ibc/core/exported/client.go b/x/ibc/core/exported/client.go index a46c8da0b2..10d437cbce 100644 --- a/x/ibc/core/exported/client.go +++ b/x/ibc/core/exported/client.go @@ -154,7 +154,6 @@ type ConsensusState interface { type Misbehaviour interface { ClientType() string GetClientID() string - String() string ValidateBasic() error // Height at which the infraction occurred diff --git a/x/ibc/light-clients/06-solomachine/types/misbehaviour.go b/x/ibc/light-clients/06-solomachine/types/misbehaviour.go index 66ee6d9392..8a59eb2d9a 100644 --- a/x/ibc/light-clients/06-solomachine/types/misbehaviour.go +++ b/x/ibc/light-clients/06-solomachine/types/misbehaviour.go @@ -3,8 +3,6 @@ package types import ( "bytes" - yaml "gopkg.in/yaml.v2" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" clienttypes "github.com/cosmos/cosmos-sdk/x/ibc/core/02-client/types" host "github.com/cosmos/cosmos-sdk/x/ibc/core/24-host" @@ -30,12 +28,6 @@ func (misbehaviour Misbehaviour) Type() string { return exported.TypeClientMisbehaviour } -// String implements Evidence interface. -func (misbehaviour Misbehaviour) String() string { - out, _ := yaml.Marshal(misbehaviour) - return string(out) -} - // GetHeight returns the sequence at which misbehaviour occurred. // Return exported.Height to satisfy interface // Version number is always 0 for a solo-machine diff --git a/x/ibc/light-clients/06-solomachine/types/solomachine.pb.go b/x/ibc/light-clients/06-solomachine/types/solomachine.pb.go index 833535da16..592d73b22b 100644 --- a/x/ibc/light-clients/06-solomachine/types/solomachine.pb.go +++ b/x/ibc/light-clients/06-solomachine/types/solomachine.pb.go @@ -229,8 +229,9 @@ type Misbehaviour struct { SignatureTwo *SignatureAndData `protobuf:"bytes,4,opt,name=signature_two,json=signatureTwo,proto3" json:"signature_two,omitempty" yaml:"signature_two"` } -func (m *Misbehaviour) Reset() { *m = Misbehaviour{} } -func (*Misbehaviour) ProtoMessage() {} +func (m *Misbehaviour) Reset() { *m = Misbehaviour{} } +func (m *Misbehaviour) String() string { return proto.CompactTextString(m) } +func (*Misbehaviour) ProtoMessage() {} func (*Misbehaviour) Descriptor() ([]byte, []int) { return fileDescriptor_6cc2ee18f7f86d4e, []int{3} } @@ -820,93 +821,92 @@ func init() { } var fileDescriptor_6cc2ee18f7f86d4e = []byte{ - // 1368 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0xdf, 0x8f, 0xdb, 0xc4, - 0x13, 0x3f, 0xa7, 0xe9, 0xf5, 0x32, 0xb9, 0xe6, 0xf2, 0x75, 0xd3, 0x36, 0xe7, 0x56, 0x89, 0xbf, - 0x46, 0x94, 0x03, 0xd1, 0x84, 0x2b, 0xa2, 0x42, 0x15, 0x02, 0x1c, 0xc7, 0xd0, 0xb4, 0x77, 0xbe, - 0xe0, 0xf8, 0x80, 0x56, 0x48, 0x96, 0xe3, 0xec, 0x25, 0xd6, 0x25, 0x76, 0x88, 0x9d, 0xa4, 0x41, - 0x42, 0x42, 0x3c, 0x95, 0x88, 0x07, 0x1e, 0x79, 0x89, 0x84, 0x40, 0xfc, 0x2b, 0x08, 0x89, 0x97, - 0xf2, 0xc6, 0x53, 0x40, 0xed, 0x7f, 0x90, 0xbf, 0x00, 0xad, 0x77, 0x13, 0xdb, 0xb9, 0x5e, 0x4e, - 0xfc, 0x7a, 0xca, 0xee, 0xcc, 0x67, 0x3e, 0x33, 0x3b, 0x33, 0x99, 0x5d, 0xc3, 0xae, 0x55, 0x37, - 0x8b, 0x6d, 0xab, 0xd9, 0xf2, 0xcc, 0xb6, 0x85, 0x6c, 0xcf, 0x2d, 0xba, 0x4e, 0xdb, 0xe9, 0x18, - 0x66, 0xcb, 0xb2, 0x51, 0x71, 0xb0, 0x1b, 0xde, 0x16, 0xba, 0x3d, 0xc7, 0x73, 0xd8, 0xbc, 0x55, - 0x37, 0x0b, 0x61, 0x93, 0x42, 0x18, 0x33, 0xd8, 0xe5, 0x5e, 0xc2, 0x9c, 0xa6, 0xd3, 0x43, 0x45, - 0xd3, 0xb1, 0x6d, 0x64, 0x7a, 0x96, 0x63, 0x63, 0xaa, 0x60, 0x47, 0x98, 0xb8, 0xff, 0x07, 0xc0, - 0x96, 0x61, 0xdb, 0xa8, 0xed, 0xa3, 0xc8, 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 0x84, 0xef, 0x19, 0x48, - 0x45, 0x63, 0x65, 0xef, 0x01, 0x74, 0xfb, 0xf5, 0xb6, 0x65, 0xea, 0xc7, 0x68, 0xe4, 0x27, 0x36, - 0x79, 0x2b, 0x53, 0x20, 0x65, 0x29, 0xcc, 0xcb, 0x52, 0x10, 0xed, 0x51, 0xe9, 0xf2, 0x6c, 0x9a, - 0xff, 0x1f, 0x09, 0x22, 0xb0, 0x10, 0xd4, 0x04, 0xd9, 0xdc, 0x47, 0x23, 0x96, 0x87, 0x64, 0xc3, - 0x1a, 0xa0, 0x9e, 0x6b, 0x1d, 0x59, 0xa8, 0xe7, 0x97, 0x20, 0xa1, 0x86, 0x45, 0xec, 0x75, 0x48, - 0x78, 0x56, 0x07, 0xb9, 0x9e, 0xd1, 0xe9, 0xfa, 0xd9, 0x8d, 0xab, 0x81, 0x80, 0x06, 0xf9, 0x65, - 0x0c, 0xd6, 0xef, 0x22, 0xa3, 0x81, 0x7a, 0x2b, 0x6b, 0x1e, 0xa1, 0x8a, 0x2d, 0x51, 0x61, 0xad, - 0x6b, 0x35, 0x6d, 0xc3, 0xeb, 0xf7, 0x48, 0x19, 0x37, 0xd5, 0x40, 0xc0, 0x1e, 0x42, 0xca, 0x46, - 0x43, 0x3d, 0x74, 0xf0, 0xf8, 0x8a, 0x83, 0x6f, 0xcf, 0xa6, 0xf9, 0xcb, 0xe4, 0xe0, 0x51, 0x2b, - 0x41, 0xdd, 0xb4, 0xd1, 0xb0, 0xba, 0x38, 0xbf, 0x04, 0x5b, 0x18, 0x10, 0xce, 0xc1, 0x79, 0x9c, - 0x83, 0x70, 0x43, 0x2c, 0x01, 0x04, 0x15, 0x47, 0x52, 0x0e, 0x04, 0x34, 0x09, 0xbf, 0xc4, 0x60, - 0x73, 0xdf, 0x72, 0xeb, 0xa8, 0x65, 0x0c, 0x2c, 0xa7, 0xdf, 0x63, 0x77, 0x21, 0x41, 0x9a, 0x4f, - 0xb7, 0x1a, 0x7e, 0x2e, 0x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0x54, 0x0d, 0xf3, 0x18, 0x79, 0x92, 0xd3, 0xe9, 0x58, 0x5e, 0x07, 0xd9, 0xde, 0xa9, 0x9e, 0x72, - 0xf8, 0x78, 0x73, 0x94, 0xef, 0x6c, 0x53, 0x0d, 0x49, 0x84, 0x07, 0xb0, 0x4d, 0xb8, 0x44, 0xf3, - 0xd8, 0x76, 0x86, 0x6d, 0xd4, 0x68, 0xa2, 0x95, 0x84, 0x3b, 0xb0, 0x65, 0x44, 0xa1, 0x94, 0x75, - 0x59, 0x2c, 0x14, 0x20, 0x4b, 0xa8, 0x55, 0x64, 0x22, 0xab, 0xeb, 0x89, 0x75, 0x17, 0xcf, 0x81, - 0xd3, 0x98, 0x85, 0x16, 0x64, 0x14, 0xf4, 0xc8, 0x9b, 0x3f, 0xc0, 0x54, 0x64, 0x0e, 0x4e, 0x8d, - 0xe2, 0x2d, 0xb8, 0x68, 0xa3, 0x47, 0x1e, 0x7e, 0xbe, 0xe9, 0x3d, 0x64, 0x0e, 0xe8, 0xfb, 0x2e, - 0x74, 0x15, 0x44, 0xd4, 0x82, 0x9a, 0xb4, 0x09, 0x35, 0x66, 0x7d, 0xe5, 0xeb, 0x38, 0x6c, 0xcc, - 0x07, 0x03, 0xfb, 0x26, 0xbc, 0x50, 0x16, 0x35, 0x51, 0xd7, 0x1e, 0x54, 0x65, 0xfd, 0x50, 0xa9, - 0x28, 0x15, 0xad, 0x22, 0xee, 0x55, 0x1e, 0xca, 0x65, 0xfd, 0x50, 0xa9, 0x55, 0x65, 0xa9, 0xf2, - 0x5e, 0x45, 0x2e, 0xa7, 0xd7, 0xb8, 0xad, 0xf1, 0x84, 0x4f, 0x86, 0x44, 0xec, 0x0d, 0xb8, 0x12, - 0x58, 0x4a, 0x7b, 0x15, 0x59, 0xd1, 0xf4, 0x9a, 0x26, 0x6a, 0x72, 0x9a, 0xe1, 0x60, 0x3c, 0xe1, - 0xd7, 0x89, 0x8c, 0x7d, 0x15, 0xb6, 0x43, 0xb8, 0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 0x3f, - 0xe4, 0xd6, 0x4a, 0xfa, 0xcf, 0x4f, 0x73, 0xcc, 0x93, 0xa7, 0x39, 0xe6, 0x8f, 0xa7, 0x39, 0xe6, - 0x9b, 0x67, 0xb9, 0xb5, 0x27, 0xcf, 0x72, 0x6b, 0xbf, 0x3d, 0xcb, 0xad, 0x3d, 0x94, 0x9b, 0x96, - 0xd7, 0xea, 0xd7, 0x0b, 0xa6, 0xd3, 0x29, 0x9a, 0x8e, 0xdb, 0x71, 0x5c, 0xfa, 0x73, 0xd3, 0x6d, - 0x1c, 0x17, 0x1f, 0x15, 0x17, 0x1f, 0x59, 0x37, 0xe7, 0x5f, 0x59, 0xaf, 0xdd, 0xbe, 0x19, 0xfe, - 0xd0, 0xc2, 0xb7, 0x8c, 0x5b, 0x5f, 0xf7, 0xc7, 0xd9, 0xeb, 0x7f, 0x06, 0x00, 0x00, 0xff, 0xff, - 0x20, 0x84, 0x51, 0xf7, 0x95, 0x0d, 0x00, 0x00, + // 1359 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0x5f, 0x8f, 0xdb, 0x44, + 0x10, 0x3f, 0xa7, 0xe9, 0xf5, 0x32, 0xb9, 0xe6, 0x82, 0x9b, 0xb6, 0x39, 0xb7, 0x4a, 0x8c, 0x11, + 0xe5, 0x40, 0x34, 0xe1, 0x8a, 0xa8, 0x50, 0x85, 0x00, 0xc7, 0x31, 0x34, 0xed, 0x9d, 0x2f, 0x38, + 0x3e, 0xa0, 0x15, 0x92, 0xe5, 0x38, 0x7b, 0x89, 0x75, 0x89, 0x1d, 0xe2, 0x4d, 0xd2, 0x20, 0x21, + 0x21, 0x9e, 0x4a, 0xc4, 0x03, 0x5f, 0x20, 0x12, 0x02, 0xf1, 0x55, 0x80, 0xc7, 0xf2, 0xc6, 0x53, + 0x40, 0xed, 0x37, 0xc8, 0x27, 0x40, 0xf6, 0x6e, 0x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 0x00, } func (m *ClientState) Marshal() (dAtA []byte, err error) { diff --git a/x/ibc/light-clients/07-tendermint/types/misbehaviour.go b/x/ibc/light-clients/07-tendermint/types/misbehaviour.go index c090ecb0b6..3e604e0f91 100644 --- a/x/ibc/light-clients/07-tendermint/types/misbehaviour.go +++ b/x/ibc/light-clients/07-tendermint/types/misbehaviour.go @@ -4,8 +4,6 @@ import ( "math" "time" - yaml "gopkg.in/yaml.v2" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" tmtypes "github.com/tendermint/tendermint/types" @@ -20,10 +18,9 @@ var ( ) // NewMisbehaviour creates a new Misbehaviour instance. -func NewMisbehaviour(clientID, chainID string, header1, header2 *Header) *Misbehaviour { +func NewMisbehaviour(clientID string, header1, header2 *Header) *Misbehaviour { return &Misbehaviour{ ClientId: clientID, - ChainId: chainID, Header1: header1, Header2: header2, } @@ -39,16 +36,6 @@ func (misbehaviour Misbehaviour) GetClientID() string { return misbehaviour.ClientId } -// String implements Misbehaviour interface -func (misbehaviour Misbehaviour) String() string { - // FIXME: implement custom marshaller - bz, err := yaml.Marshal(misbehaviour) - if err != nil { - panic(err) - } - return string(bz) -} - // GetHeight returns the height at which misbehaviour occurred // // NOTE: assumes that misbehaviour headers have the same height @@ -84,6 +71,9 @@ func (misbehaviour Misbehaviour) ValidateBasic() error { if misbehaviour.Header2.TrustedValidators == nil { return sdkerrors.Wrap(ErrInvalidValidatorSet, "trusted validator set in Header2 cannot be empty") } + if misbehaviour.Header1.Header.ChainID != misbehaviour.Header2.Header.ChainID { + return sdkerrors.Wrap(clienttypes.ErrInvalidMisbehaviour, "headers must have identical chainIDs") + } if err := host.ClientIdentifierValidator(misbehaviour.ClientId); err != nil { return sdkerrors.Wrap(err, "misbehaviour client ID is invalid") @@ -120,10 +110,10 @@ func (misbehaviour Misbehaviour) ValidateBasic() error { if blockID1.Equals(*blockID2) { return sdkerrors.Wrap(clienttypes.ErrInvalidMisbehaviour, "headers blockIDs are equal") } - if err := ValidCommit(misbehaviour.ChainId, misbehaviour.Header1.Commit, misbehaviour.Header1.ValidatorSet); err != nil { + if err := ValidCommit(misbehaviour.Header1.Header.ChainID, misbehaviour.Header1.Commit, misbehaviour.Header1.ValidatorSet); err != nil { return err } - if err := ValidCommit(misbehaviour.ChainId, misbehaviour.Header2.Commit, misbehaviour.Header2.ValidatorSet); err != nil { + if err := ValidCommit(misbehaviour.Header2.Header.ChainID, misbehaviour.Header2.Commit, misbehaviour.Header2.ValidatorSet); err != nil { return err } return nil diff --git a/x/ibc/light-clients/07-tendermint/types/misbehaviour_handle_test.go b/x/ibc/light-clients/07-tendermint/types/misbehaviour_handle_test.go index 556bfeb524..6d8cd5e32a 100644 --- a/x/ibc/light-clients/07-tendermint/types/misbehaviour_handle_test.go +++ b/x/ibc/light-clients/07-tendermint/types/misbehaviour_handle_test.go @@ -59,7 +59,6 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { &types.Misbehaviour{ Header1: suite.chainA.CreateTMClientHeader(chainID, int64(height.VersionHeight), height, suite.now, bothValSet, bothValSet, bothSigners), Header2: suite.chainA.CreateTMClientHeader(chainID, int64(height.VersionHeight), height, suite.now.Add(time.Minute), bothValSet, bothValSet, bothSigners), - ChainId: chainID, ClientId: chainID, }, suite.now, @@ -75,7 +74,6 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { &types.Misbehaviour{ Header1: suite.chainA.CreateTMClientHeader(chainID, int64(height.VersionHeight), heightMinus1, suite.now, bothValSet, bothValSet, bothSigners), Header2: suite.chainA.CreateTMClientHeader(chainID, int64(height.VersionHeight), heightMinus1, suite.now.Add(time.Minute), bothValSet, bothValSet, bothSigners), - ChainId: chainID, ClientId: chainID, }, suite.now, @@ -91,7 +89,6 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { &types.Misbehaviour{ Header1: suite.chainA.CreateTMClientHeader(chainID, int64(height.VersionHeight), heightMinus1, suite.now, bothValSet, bothValSet, bothSigners), Header2: suite.chainA.CreateTMClientHeader(chainID, int64(height.VersionHeight), heightMinus3, suite.now.Add(time.Minute), bothValSet, suite.valSet, bothSigners), - ChainId: chainID, ClientId: chainID, }, suite.now, @@ -107,7 +104,6 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { &types.Misbehaviour{ Header1: suite.chainA.CreateTMClientHeader(chainIDVersion0, int64(height.VersionHeight), heightMinus1, suite.now, bothValSet, bothValSet, bothSigners), Header2: suite.chainA.CreateTMClientHeader(chainIDVersion0, int64(height.VersionHeight), heightMinus3, suite.now.Add(time.Minute), bothValSet, suite.valSet, bothSigners), - ChainId: chainIDVersion0, ClientId: chainID, }, suite.now, @@ -123,7 +119,6 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { &types.Misbehaviour{ Header1: suite.chainA.CreateTMClientHeader(chainIDVersion0, 3, heightMinus1, suite.now, bothValSet, bothValSet, bothSigners), Header2: suite.chainA.CreateTMClientHeader(chainIDVersion0, 3, heightMinus3, suite.now.Add(time.Minute), bothValSet, suite.valSet, bothSigners), - ChainId: chainIDVersion0, ClientId: chainID, }, suite.now, @@ -139,7 +134,6 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { &types.Misbehaviour{ Header1: suite.chainA.CreateTMClientHeader(chainIDVersion1, 1, heightMinus1, suite.now, bothValSet, bothValSet, bothSigners), Header2: suite.chainA.CreateTMClientHeader(chainIDVersion1, 1, heightMinus3, suite.now.Add(time.Minute), bothValSet, suite.valSet, bothSigners), - ChainId: chainIDVersion1, ClientId: chainID, }, suite.now, @@ -155,7 +149,6 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { &types.Misbehaviour{ Header1: suite.chainA.CreateTMClientHeader(chainID, int64(height.VersionHeight), height, suite.now, bothValSet, suite.valSet, bothSigners), Header2: suite.chainA.CreateTMClientHeader(chainID, int64(height.VersionHeight), height, suite.now.Add(time.Minute), bothValSet, suite.valSet, bothSigners), - ChainId: chainID, ClientId: chainID, }, suite.now, @@ -171,7 +164,6 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { &types.Misbehaviour{ Header1: suite.chainA.CreateTMClientHeader("ethermint", int64(height.VersionHeight), height, suite.now, bothValSet, bothValSet, bothSigners), Header2: suite.chainA.CreateTMClientHeader("ethermint", int64(height.VersionHeight), height, suite.now.Add(time.Minute), bothValSet, bothValSet, bothSigners), - ChainId: "ethermint", ClientId: chainID, }, suite.now, @@ -187,7 +179,6 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { &types.Misbehaviour{ Header1: suite.chainA.CreateTMClientHeader(chainID, int64(height.VersionHeight), heightMinus1, suite.now, bothValSet, bothValSet, bothSigners), Header2: suite.chainA.CreateTMClientHeader(chainID, int64(height.VersionHeight), height, suite.now.Add(time.Minute), bothValSet, suite.valSet, bothSigners), - ChainId: chainID, ClientId: chainID, }, suite.now, @@ -203,7 +194,6 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { &types.Misbehaviour{ Header1: suite.chainA.CreateTMClientHeader(chainID, int64(height.VersionHeight), heightMinus1, suite.now, bothValSet, bothValSet, bothSigners), Header2: suite.chainA.CreateTMClientHeader(chainID, int64(height.VersionHeight), heightMinus3, suite.now.Add(time.Minute), bothValSet, bothValSet, bothSigners), - ChainId: chainID, ClientId: chainID, }, suite.now, @@ -219,7 +209,6 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { &types.Misbehaviour{ Header1: suite.chainA.CreateTMClientHeader(chainID, int64(height.VersionHeight), height, suite.now, bothValSet, bothValSet, bothSigners), Header2: suite.chainA.CreateTMClientHeader(chainID, int64(height.VersionHeight), height, suite.now.Add(time.Minute), bothValSet, bothValSet, bothSigners), - ChainId: chainID, ClientId: chainID, }, suite.now, @@ -235,7 +224,6 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { &types.Misbehaviour{ Header1: suite.chainA.CreateTMClientHeader(chainID, int64(height.VersionHeight), heightMinus1, suite.now, bothValSet, bothValSet, bothSigners), Header2: suite.chainA.CreateTMClientHeader(chainID, int64(height.VersionHeight), height, suite.now.Add(time.Minute), bothValSet, bothValSet, bothSigners), - ChainId: chainID, ClientId: chainID, }, suite.now, @@ -262,7 +250,6 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { &types.Misbehaviour{ Header1: suite.chainA.CreateTMClientHeader(chainID, int64(height.VersionHeight), heightMinus1, suite.now, bothValSet, bothValSet, bothSigners), Header2: suite.chainA.CreateTMClientHeader(chainID, int64(height.VersionHeight), heightMinus1, suite.now.Add(time.Minute), bothValSet, bothValSet, bothSigners), - ChainId: chainID, ClientId: chainID, }, suite.now, @@ -278,7 +265,6 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { &types.Misbehaviour{ Header1: suite.chainA.CreateTMClientHeader(chainID, int64(height.VersionHeight), heightMinus1, suite.now, bothValSet, bothValSet, bothSigners), Header2: suite.chainA.CreateTMClientHeader(chainID, int64(height.VersionHeight), height, suite.now.Add(time.Minute), bothValSet, bothValSet, bothSigners), - ChainId: chainID, ClientId: chainID, }, suite.now.Add(ubdPeriod), @@ -294,7 +280,6 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { &types.Misbehaviour{ Header1: suite.chainA.CreateTMClientHeader(chainID, int64(height.VersionHeight), height, suite.now, bothValSet, suite.valSet, bothSigners), Header2: suite.chainA.CreateTMClientHeader(chainID, int64(height.VersionHeight), height, suite.now.Add(time.Minute), bothValSet, suite.valSet, bothSigners), - ChainId: chainID, ClientId: chainID, }, suite.now, @@ -310,7 +295,6 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { &types.Misbehaviour{ Header1: suite.chainA.CreateTMClientHeader(chainID, int64(height.VersionHeight), height, suite.now, altValSet, bothValSet, altSigners), Header2: suite.chainA.CreateTMClientHeader(chainID, int64(height.VersionHeight), height, suite.now.Add(time.Minute), bothValSet, bothValSet, bothSigners), - ChainId: chainID, ClientId: chainID, }, suite.now, @@ -326,7 +310,6 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { &types.Misbehaviour{ Header1: suite.chainA.CreateTMClientHeader(chainID, int64(height.VersionHeight), height, suite.now, bothValSet, bothValSet, bothSigners), Header2: suite.chainA.CreateTMClientHeader(chainID, int64(height.VersionHeight), height, suite.now.Add(time.Minute), altValSet, bothValSet, altSigners), - ChainId: chainID, ClientId: chainID, }, suite.now, @@ -342,7 +325,6 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { &types.Misbehaviour{ Header1: suite.chainA.CreateTMClientHeader(chainID, int64(height.VersionHeight), height, suite.now, altValSet, bothValSet, altSigners), Header2: suite.chainA.CreateTMClientHeader(chainID, int64(height.VersionHeight), height, suite.now.Add(time.Minute), altValSet, bothValSet, altSigners), - ChainId: chainID, ClientId: chainID, }, suite.now, diff --git a/x/ibc/light-clients/07-tendermint/types/misbehaviour_test.go b/x/ibc/light-clients/07-tendermint/types/misbehaviour_test.go index 9d7cddff5c..c8e4416612 100644 --- a/x/ibc/light-clients/07-tendermint/types/misbehaviour_test.go +++ b/x/ibc/light-clients/07-tendermint/types/misbehaviour_test.go @@ -21,7 +21,6 @@ func (suite *TendermintTestSuite) TestMisbehaviour() { misbehaviour := &types.Misbehaviour{ Header1: suite.header, Header2: suite.chainA.CreateTMClientHeader(chainID, int64(height.VersionHeight), heightMinus1, suite.now, suite.valSet, suite.valSet, signers), - ChainId: chainID, ClientId: clientID, } @@ -65,7 +64,6 @@ func (suite *TendermintTestSuite) TestMisbehaviourValidateBasic() { &types.Misbehaviour{ Header1: suite.header, Header2: suite.chainA.CreateTMClientHeader(chainID, int64(height.VersionHeight), heightMinus1, suite.now.Add(time.Minute), suite.valSet, suite.valSet, signers), - ChainId: chainID, ClientId: clientID, }, func(misbehaviour *types.Misbehaviour) error { return nil }, @@ -73,13 +71,13 @@ func (suite *TendermintTestSuite) TestMisbehaviourValidateBasic() { }, { "misbehaviour Header1 is nil", - types.NewMisbehaviour(clientID, chainID, nil, suite.header), + types.NewMisbehaviour(clientID, nil, suite.header), func(m *types.Misbehaviour) error { return nil }, false, }, { "misbehaviour Header2 is nil", - types.NewMisbehaviour(clientID, chainID, suite.header, nil), + types.NewMisbehaviour(clientID, suite.header, nil), func(m *types.Misbehaviour) error { return nil }, false, }, @@ -88,7 +86,6 @@ func (suite *TendermintTestSuite) TestMisbehaviourValidateBasic() { &types.Misbehaviour{ Header1: suite.header, Header2: suite.chainA.CreateTMClientHeader(chainID, int64(height.VersionHeight), clienttypes.NewHeight(0, height.VersionHeight-3), suite.now.Add(time.Minute), suite.valSet, bothValSet, signers), - ChainId: chainID, ClientId: clientID, }, func(misbehaviour *types.Misbehaviour) error { return nil }, @@ -99,7 +96,6 @@ func (suite *TendermintTestSuite) TestMisbehaviourValidateBasic() { &types.Misbehaviour{ Header1: suite.chainA.CreateTMClientHeader(chainID, int64(height.VersionHeight), clienttypes.ZeroHeight(), suite.now.Add(time.Minute), suite.valSet, suite.valSet, signers), Header2: suite.header, - ChainId: chainID, ClientId: clientID, }, func(misbehaviour *types.Misbehaviour) error { return nil }, @@ -110,7 +106,6 @@ func (suite *TendermintTestSuite) TestMisbehaviourValidateBasic() { &types.Misbehaviour{ Header1: suite.header, Header2: suite.chainA.CreateTMClientHeader(chainID, int64(height.VersionHeight), clienttypes.ZeroHeight(), suite.now.Add(time.Minute), suite.valSet, suite.valSet, signers), - ChainId: chainID, ClientId: clientID, }, func(misbehaviour *types.Misbehaviour) error { return nil }, @@ -121,7 +116,6 @@ func (suite *TendermintTestSuite) TestMisbehaviourValidateBasic() { &types.Misbehaviour{ Header1: suite.chainA.CreateTMClientHeader(chainID, int64(height.VersionHeight), heightMinus1, suite.now.Add(time.Minute), suite.valSet, nil, signers), Header2: suite.header, - ChainId: chainID, ClientId: clientID, }, func(misbehaviour *types.Misbehaviour) error { return nil }, @@ -132,7 +126,6 @@ func (suite *TendermintTestSuite) TestMisbehaviourValidateBasic() { &types.Misbehaviour{ Header1: suite.header, Header2: suite.chainA.CreateTMClientHeader(chainID, int64(height.VersionHeight), heightMinus1, suite.now.Add(time.Minute), suite.valSet, nil, signers), - ChainId: chainID, ClientId: clientID, }, func(misbehaviour *types.Misbehaviour) error { return nil }, @@ -143,40 +136,16 @@ func (suite *TendermintTestSuite) TestMisbehaviourValidateBasic() { &types.Misbehaviour{ Header1: suite.header, Header2: suite.chainA.CreateTMClientHeader(chainID, int64(height.VersionHeight), heightMinus1, suite.now, suite.valSet, suite.valSet, signers), - ChainId: chainID, ClientId: "GAIA", }, func(misbehaviour *types.Misbehaviour) error { return nil }, false, }, { - "wrong chainID on header1", + "chainIDs do not match", &types.Misbehaviour{ Header1: suite.header, Header2: suite.chainA.CreateTMClientHeader("ethermint", int64(height.VersionHeight), heightMinus1, suite.now, suite.valSet, suite.valSet, signers), - ChainId: "ethermint", - ClientId: clientID, - }, - func(misbehaviour *types.Misbehaviour) error { return nil }, - false, - }, - { - "wrong chainID on header2", - &types.Misbehaviour{ - Header1: suite.header, - Header2: suite.chainA.CreateTMClientHeader("ethermint", int64(height.VersionHeight), heightMinus1, suite.now, suite.valSet, suite.valSet, signers), - ChainId: chainID, - ClientId: clientID, - }, - func(misbehaviour *types.Misbehaviour) error { return nil }, - false, - }, - { - "wrong chainID in misbehaviour", - &types.Misbehaviour{ - Header1: suite.header, - Header2: suite.chainA.CreateTMClientHeader(chainID, int64(height.VersionHeight), heightMinus1, suite.now.Add(time.Minute), suite.valSet, suite.valSet, signers), - ChainId: "ethermint", ClientId: clientID, }, func(misbehaviour *types.Misbehaviour) error { return nil }, @@ -187,7 +156,6 @@ func (suite *TendermintTestSuite) TestMisbehaviourValidateBasic() { &types.Misbehaviour{ Header1: suite.header, Header2: suite.chainA.CreateTMClientHeader(chainID, 6, clienttypes.NewHeight(0, 4), suite.now, suite.valSet, suite.valSet, signers), - ChainId: chainID, ClientId: clientID, }, func(misbehaviour *types.Misbehaviour) error { return nil }, @@ -198,7 +166,6 @@ func (suite *TendermintTestSuite) TestMisbehaviourValidateBasic() { &types.Misbehaviour{ Header1: suite.header, Header2: suite.header, - ChainId: chainID, ClientId: clientID, }, func(misbehaviour *types.Misbehaviour) error { return nil }, @@ -209,7 +176,6 @@ func (suite *TendermintTestSuite) TestMisbehaviourValidateBasic() { &types.Misbehaviour{ Header1: suite.chainA.CreateTMClientHeader(chainID, int64(height.VersionHeight), heightMinus1, suite.now, bothValSet, suite.valSet, bothSigners), Header2: suite.header, - ChainId: chainID, ClientId: clientID, }, func(misbehaviour *types.Misbehaviour) error { @@ -231,7 +197,6 @@ func (suite *TendermintTestSuite) TestMisbehaviourValidateBasic() { &types.Misbehaviour{ Header1: suite.header, Header2: suite.chainA.CreateTMClientHeader(chainID, int64(height.VersionHeight), heightMinus1, suite.now, bothValSet, suite.valSet, bothSigners), - ChainId: chainID, ClientId: clientID, }, func(misbehaviour *types.Misbehaviour) error { @@ -253,7 +218,6 @@ func (suite *TendermintTestSuite) TestMisbehaviourValidateBasic() { &types.Misbehaviour{ Header1: suite.header, Header2: suite.chainA.CreateTMClientHeader(chainID, int64(height.VersionHeight), heightMinus1, suite.now, bothValSet, suite.valSet, bothSigners), - ChainId: chainID, ClientId: clientID, }, func(misbehaviour *types.Misbehaviour) error { diff --git a/x/ibc/light-clients/07-tendermint/types/tendermint.pb.go b/x/ibc/light-clients/07-tendermint/types/tendermint.pb.go index e613edf2fd..df0967ef02 100644 --- a/x/ibc/light-clients/07-tendermint/types/tendermint.pb.go +++ b/x/ibc/light-clients/07-tendermint/types/tendermint.pb.go @@ -141,13 +141,13 @@ var xxx_messageInfo_ConsensusState proto.InternalMessageInfo // that implements Misbehaviour interface expected by ICS-02 type Misbehaviour struct { ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty" yaml:"client_id"` - ChainId string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty" yaml:"chain_id"` - Header1 *Header `protobuf:"bytes,3,opt,name=header_1,json=header1,proto3" json:"header_1,omitempty" yaml:"header_1"` - Header2 *Header `protobuf:"bytes,4,opt,name=header_2,json=header2,proto3" json:"header_2,omitempty" yaml:"header_2"` + Header1 *Header `protobuf:"bytes,2,opt,name=header_1,json=header1,proto3" json:"header_1,omitempty" yaml:"header_1"` + Header2 *Header `protobuf:"bytes,3,opt,name=header_2,json=header2,proto3" json:"header_2,omitempty" yaml:"header_2"` } -func (m *Misbehaviour) Reset() { *m = Misbehaviour{} } -func (*Misbehaviour) ProtoMessage() {} +func (m *Misbehaviour) Reset() { *m = Misbehaviour{} } +func (m *Misbehaviour) String() string { return proto.CompactTextString(m) } +func (*Misbehaviour) ProtoMessage() {} func (*Misbehaviour) Descriptor() ([]byte, []int) { return fileDescriptor_c6d6cf2b288949be, []int{2} } @@ -317,76 +317,75 @@ func init() { } var fileDescriptor_c6d6cf2b288949be = []byte{ - // 1096 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0xcf, 0x6f, 0xe3, 0x44, - 0x14, 0x6e, 0xda, 0xb2, 0x4d, 0x27, 0xe9, 0x76, 0xf1, 0x96, 0x6e, 0x5a, 0xba, 0x71, 0x64, 0xd0, - 0x52, 0x21, 0xd5, 0x26, 0x59, 0x24, 0xa4, 0x8a, 0x0b, 0x6e, 0x41, 0x2d, 0x62, 0xa5, 0xca, 0xe5, - 0x87, 0x84, 0x04, 0x66, 0x62, 0x4f, 0x92, 0x51, 0x6d, 0x8f, 0xf1, 0x4c, 0x42, 0xca, 0x5f, 0x00, - 0xb7, 0x3d, 0xae, 0x38, 0x71, 0xe0, 0x1f, 0xe1, 0xb6, 0xc7, 0x1e, 0x39, 0x19, 0xd4, 0x5e, 0x38, - 0xe7, 0xc8, 0x09, 0xcd, 0x0f, 0xdb, 0xd3, 0x6c, 0x97, 0x6a, 0xb9, 0xb4, 0xf3, 0xde, 0xfb, 0xde, - 0xf7, 0x65, 0xde, 0xbc, 0x79, 0x63, 0xe0, 0xe0, 0x7e, 0xe0, 0x44, 0x78, 0x38, 0x62, 0x41, 0x84, - 0x51, 0xc2, 0xa8, 0xc3, 0x50, 0x12, 0xa2, 0x2c, 0xc6, 0x09, 0x73, 0x26, 0x5d, 0xcd, 0xb2, 0xd3, - 0x8c, 0x30, 0x62, 0xb4, 0x71, 0x3f, 0xb0, 0xf5, 0x04, 0x5b, 0x83, 0x4c, 0xba, 0xdb, 0x1d, 0x2d, - 0x9f, 0x9d, 0xa7, 0x88, 0x3a, 0x13, 0x18, 0xe1, 0x10, 0x32, 0x92, 0x49, 0x86, 0xed, 0x9d, 0x17, - 0x10, 0xe2, 0xaf, 0x8a, 0xde, 0x0f, 0x48, 0x32, 0xc0, 0xc4, 0x49, 0x33, 0x42, 0x06, 0x85, 0xb3, - 0x3d, 0x24, 0x64, 0x18, 0x21, 0x47, 0x58, 0xfd, 0xf1, 0xc0, 0x09, 0xc7, 0x19, 0x64, 0x98, 0x24, - 0x2a, 0x6e, 0xce, 0xc7, 0x19, 0x8e, 0x11, 0x65, 0x30, 0x4e, 0x0b, 0x00, 0xdf, 0x66, 0x40, 0x32, - 0xe4, 0xc8, 0x5f, 0xcd, 0xb7, 0x26, 0x57, 0x0a, 0xf0, 0x4e, 0x05, 0x20, 0x71, 0x8c, 0x59, 0x5c, - 0x80, 0x4a, 0x4b, 0x01, 0x37, 0x86, 0x64, 0x48, 0xc4, 0xd2, 0xe1, 0x2b, 0xe9, 0xb5, 0xfe, 0x5e, - 0x01, 0x8d, 0x03, 0xc1, 0x77, 0xca, 0x20, 0x43, 0xc6, 0x16, 0xa8, 0x07, 0x23, 0x88, 0x13, 0x1f, - 0x87, 0xad, 0x5a, 0xa7, 0xb6, 0xbb, 0xea, 0xad, 0x08, 0xfb, 0x38, 0x34, 0x10, 0x68, 0xb0, 0x6c, - 0x4c, 0x99,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, 0x19, 0xc7, 0x28, 0xe3, 0x11, 0x71, 0x32, 0xcb, 0x5e, - 0xe5, 0x30, 0x3a, 0xa0, 0x11, 0xa2, 0x84, 0xc4, 0x38, 0x11, 0xf1, 0x45, 0x11, 0xd7, 0x5d, 0xee, - 0xb7, 0xcf, 0x2f, 0xdb, 0xb5, 0x8b, 0xcb, 0x76, 0xed, 0xaf, 0xcb, 0x76, 0xed, 0xe9, 0x55, 0x7b, - 0xe1, 0xe2, 0xaa, 0xbd, 0xf0, 0xc7, 0x55, 0x7b, 0xe1, 0xeb, 0x43, 0xed, 0x5a, 0x06, 0x84, 0xc6, - 0x84, 0xaa, 0x7f, 0x7b, 0x34, 0x3c, 0x73, 0xa6, 0xd5, 0xe7, 0xdb, 0x5e, 0xf1, 0xfd, 0xf6, 0xde, - 0x07, 0x7b, 0xf3, 0x1f, 0x58, 0xfd, 0x3b, 0x62, 0x0a, 0x3d, 0xfe, 0x37, 0x00, 0x00, 0xff, 0xff, - 0xd1, 0xc9, 0xf2, 0x91, 0xee, 0x09, 0x00, 0x00, + // 1079 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0xcf, 0x6f, 0xe3, 0xc4, + 0x17, 0x6f, 0xda, 0x7e, 0xb7, 0xe9, 0x24, 0xdd, 0xf6, 0xeb, 0x2d, 0xdd, 0xb4, 0x74, 0xe3, 0xc8, + 0xa0, 0xa5, 0x42, 0xaa, 0x4d, 0xb2, 0x48, 0x48, 0x15, 0x17, 0xdc, 0x82, 0x5a, 0xc4, 0x4a, 0x95, + 0xcb, 0x0f, 0x09, 0x09, 0xcc, 0xc4, 0x9e, 0x24, 0xa3, 0xda, 0x1e, 0xe3, 0x99, 0x84, 0x94, 0xbf, + 0x00, 0x0e, 0x48, 0x7b, 0x44, 0x9c, 0x38, 0xf0, 0xc7, 0xec, 0xb1, 0x47, 0x4e, 0x06, 0xb5, 0x17, +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, 0x5b, 0x11, 0xf6, 0x49, 0x68, 0x20, 0xd0, 0x60, + 0xd9, 0x98, 0x32, 0x3f, 0x42, 0x13, 0x14, 0xb5, 0x16, 0x3b, 0xb5, 0xbd, 0x46, 0x6f, 0xcf, 0xfe, + 0xf7, 0xb2, 0xda, 0x1f, 0x65, 0x30, 0xe0, 0x1b, 0x76, 0x77, 0x9e, 0xe7, 0xe6, 0xc2, 0x2c, 0x37, + 0x8d, 0x0b, 0x18, 0x47, 0x07, 0x96, 0x46, 0x65, 0x79, 0x40, 0x58, 0x9f, 0x70, 0xc3, 0x18, 0x80, + 0x75, 0x61, 0xe1, 0x64, 0xe8, 0xa7, 0x28, 0xc3, 0x24, 0x6c, 0x2d, 0x09, 0xa9, 0x6d, 0x5b, 0x16, + 0xcb, 0x2e, 0x8a, 0x65, 0x1f, 0xa9, 0x62, 0xba, 0x96, 0xe2, 0xde, 0xd2, 0xb8, 0xab, 0x7c, 0xeb, + 0xe7, 0x3f, 0xcc, 0x9a, 0x77, 0xbf, 0xf0, 0x9e, 0x0a, 0xa7, 0x81, 0xc1, 0xc6, 0x38, 0xe9, 0x93, + 0x24, 0xd4, 0x84, 0x96, 0xef, 0x12, 0x7a, 0x43, 0x09, 0x3d, 0x94, 0x42, 0xf3, 0x04, 0x52, 0x69, + 0xbd, 0x74, 0x2b, 0x29, 0x04, 0xd6, 0x63, 0x38, 0xf5, 0x83, 0x88, 0x04, 0xe7, 0x7e, 0x98, 0xe1, + 0x01, 0x6b, 0xfd, 0xef, 0x15, 0xb7, 0x34, 0x97, 0x2f, 0x85, 0xd6, 0x62, 0x38, 0x3d, 0xe4, 0xce, + 0x23, 0xee, 0x33, 0xbe, 0x02, 0x6b, 0x83, 0x8c, 0x7c, 0x8f, 0x12, 0x7f, 0x84, 0xf8, 0x81, 0xb4, + 0xee, 0x09, 0x91, 0x1d, 0x71, 0x44, 0xbc, 0x45, 0x6c, 0xd5, 0x39, 0x93, 0xae, 0x7d, 0x2c, 0x10, + 0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x68, 0x84, 0x28, 0x21, 0x31, 0x4e, 0x44, 0x7c, 0x51, 0xc4, 0x75, 0x97, 0xfb, 0xf5, + 0xf3, 0xab, 0x76, 0xed, 0xf2, 0xaa, 0x5d, 0xfb, 0xf3, 0xaa, 0x5d, 0x7b, 0x76, 0xdd, 0x5e, 0xb8, + 0xbc, 0x6e, 0x2f, 0xfc, 0x7e, 0xdd, 0x5e, 0xf8, 0xf2, 0x48, 0xbb, 0x62, 0x01, 0xa1, 0x31, 0xa1, + 0xea, 0xdf, 0x3e, 0x0d, 0xcf, 0x9d, 0x69, 0xf5, 0x29, 0xb6, 0x5f, 0x7c, 0x8b, 0xbd, 0xf3, 0xde, + 0xfe, 0xfc, 0xc7, 0x52, 0xff, 0x9e, 0x98, 0x28, 0x4f, 0xfe, 0x09, 0x00, 0x00, 0xff, 0xff, 0x4c, + 0xb7, 0x2c, 0x8e, 0xba, 0x09, 0x00, 0x00, } func (m *ClientState) Marshal() (dAtA []byte, err error) { @@ -592,7 +591,7 @@ func (m *Misbehaviour) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintTendermint(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x22 + dAtA[i] = 0x1a } if m.Header1 != nil { { @@ -604,13 +603,6 @@ func (m *Misbehaviour) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintTendermint(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x1a - } - if len(m.ChainId) > 0 { - i -= len(m.ChainId) - copy(dAtA[i:], m.ChainId) - i = encodeVarintTendermint(dAtA, i, uint64(len(m.ChainId))) - i-- dAtA[i] = 0x12 } if len(m.ClientId) > 0 { @@ -804,10 +796,6 @@ func (m *Misbehaviour) Size() (n int) { if l > 0 { n += 1 + l + sovTendermint(uint64(l)) } - l = len(m.ChainId) - if l > 0 { - n += 1 + l + sovTendermint(uint64(l)) - } if m.Header1 != nil { l = m.Header1.Size() n += 1 + l + sovTendermint(uint64(l)) @@ -1467,38 +1455,6 @@ func (m *Misbehaviour) Unmarshal(dAtA []byte) error { m.ClientId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTendermint - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTendermint - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTendermint - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ChainId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Header1", wireType) } @@ -1534,7 +1490,7 @@ func (m *Misbehaviour) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 4: + case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Header2", wireType) } From 0b1a3eed393dce132fa2bb812fea12e26f306985 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?colin=20axn=C3=A9r?= <25233464+colin-axner@users.noreply.github.com> Date: Fri, 13 Nov 2020 15:32:33 +0100 Subject: [PATCH 096/136] add docs and make prefix a const (#7926) Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- x/ibc/applications/transfer/keeper/relay.go | 4 +++- x/ibc/applications/transfer/spec/01_concepts.md | 6 ++++++ x/ibc/applications/transfer/types/keys.go | 3 +++ x/ibc/applications/transfer/types/trace.go | 6 +++--- 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/x/ibc/applications/transfer/keeper/relay.go b/x/ibc/applications/transfer/keeper/relay.go index c9bc4470d3..d26e71e984 100644 --- a/x/ibc/applications/transfer/keeper/relay.go +++ b/x/ibc/applications/transfer/keeper/relay.go @@ -361,7 +361,9 @@ func (k Keeper) refundPacketToken(ctx sdk.Context, packet channeltypes.Packet, d // DenomPathFromHash returns the full denomination path prefix from an ibc denom with a hash // component. func (k Keeper) DenomPathFromHash(ctx sdk.Context, denom string) (string, error) { - hexHash := denom[4:] + // trim the denomination prefix, by default "ibc/" + hexHash := denom[len(types.DenomPrefix+"/"):] + hash, err := types.ParseHexHash(hexHash) if err != nil { return "", sdkerrors.Wrap(types.ErrInvalidDenomForTransfer, err.Error()) diff --git a/x/ibc/applications/transfer/spec/01_concepts.md b/x/ibc/applications/transfer/spec/01_concepts.md index 55b8a6c0c6..96f05f12a7 100644 --- a/x/ibc/applications/transfer/spec/01_concepts.md +++ b/x/ibc/applications/transfer/spec/01_concepts.md @@ -109,3 +109,9 @@ Cosmos Hub for the `uatom`). Sending a token back to the same chain across a dif **not** move the token back across its timeline. If a channel in the chain history closes before the token can be sent back across that channel, then the token will not be returnable to its original form. + + +## Security Considerations + +For safety, no other module must be capable of minting tokens with the `ibc/` prefix. The IBC +transfer module needs a subset of the denomination space that only it can create tokens in. diff --git a/x/ibc/applications/transfer/types/keys.go b/x/ibc/applications/transfer/types/keys.go index b9d4b3085e..f1fbffd951 100644 --- a/x/ibc/applications/transfer/types/keys.go +++ b/x/ibc/applications/transfer/types/keys.go @@ -25,6 +25,9 @@ const ( // QuerierRoute is the querier route for IBC transfer QuerierRoute = ModuleName + + // DenomPrefix is the prefix used for internal SDK coin representation. + DenomPrefix = "ibc" ) var ( diff --git a/x/ibc/applications/transfer/types/trace.go b/x/ibc/applications/transfer/types/trace.go index d465dcbc29..b4527d668f 100644 --- a/x/ibc/applications/transfer/types/trace.go +++ b/x/ibc/applications/transfer/types/trace.go @@ -54,7 +54,7 @@ func (dt DenomTrace) GetPrefix() string { // 'ibc/{hash(tracePath + baseDenom)}'. If the trace is empty, it will return the base denomination. func (dt DenomTrace) IBCDenom() string { if dt.Path != "" { - return fmt.Sprintf("ibc/%s", dt.Hash()) + return fmt.Sprintf("%s/%s", DenomPrefix, dt.Hash()) } return dt.BaseDenom } @@ -172,8 +172,8 @@ func ValidateIBCDenom(denom string) error { switch { case strings.TrimSpace(denom) == "", - len(denomSplit) == 1 && denomSplit[0] == "ibc", - len(denomSplit) == 2 && (denomSplit[0] != "ibc" || strings.TrimSpace(denomSplit[1]) == ""): + len(denomSplit) == 1 && denomSplit[0] == DenomPrefix, + len(denomSplit) == 2 && (denomSplit[0] != DenomPrefix || strings.TrimSpace(denomSplit[1]) == ""): return sdkerrors.Wrapf(ErrInvalidDenomForTransfer, "denomination should be prefixed with the format 'ibc/{hash(trace + \"/\" + %s)}'", denom) case denomSplit[0] == denom && strings.TrimSpace(denom) != "": From 5f580a148a73e996851b711426e0759fa1f8baef Mon Sep 17 00:00:00 2001 From: yihuang Date: Fri, 13 Nov 2020 22:54:30 +0800 Subject: [PATCH 097/136] cosmovisor: pass quit signals to subprocess (#7776) fix #7740 Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- cosmovisor/process.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/cosmovisor/process.go b/cosmovisor/process.go index 055c4ebfc6..cfd201e2be 100644 --- a/cosmovisor/process.go +++ b/cosmovisor/process.go @@ -4,9 +4,13 @@ import ( "bufio" "fmt" "io" + "log" + "os" "os/exec" + "os/signal" "strings" "sync" + "syscall" ) // LaunchProcess runs a subprocess and returns when the subprocess exits, @@ -39,6 +43,15 @@ func LaunchProcess(cfg *Config, args []string, stdout, stderr io.Writer) (bool, return false, fmt.Errorf("launching process %s %s: %w", bin, strings.Join(args, " "), err) } + sigs := make(chan os.Signal, 1) + signal.Notify(sigs, syscall.SIGQUIT, syscall.SIGTERM) + go func() { + sig := <-sigs + if err := cmd.Process.Signal(sig); err != nil { + log.Fatal(err) + } + }() + // three ways to exit - command ends, find regexp in scanOut, find regexp in scanErr upgradeInfo, err := WaitForUpgradeOrExit(cmd, scanOut, scanErr) if err != nil { From 6e3fab854fb8bf30692049fef0456bde37c3c22d Mon Sep 17 00:00:00 2001 From: vincent Date: Fri, 13 Nov 2020 23:27:52 +0800 Subject: [PATCH 098/136] Fix upgrade store loader (#7817) * fix upgrade store loader * fix test * resolve comment Co-authored-by: billy rennekamp Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- store/rootmulti/store.go | 4 +++- x/upgrade/types/storeloader.go | 4 ++-- x/upgrade/types/storeloader_test.go | 29 +++++++++++++++++++++-------- 3 files changed, 26 insertions(+), 11 deletions(-) diff --git a/store/rootmulti/store.go b/store/rootmulti/store.go index 90633a9220..72238cbb1e 100644 --- a/store/rootmulti/store.go +++ b/store/rootmulti/store.go @@ -315,7 +315,9 @@ func (rs *Store) TracingEnabled() bool { // LastCommitID implements Committer/CommitStore. func (rs *Store) LastCommitID() types.CommitID { if rs.lastCommitInfo == nil { - return types.CommitID{} + return types.CommitID{ + Version: getLatestVersion(rs.db), + } } return rs.lastCommitInfo.CommitID() diff --git a/x/upgrade/types/storeloader.go b/x/upgrade/types/storeloader.go index 0ff168dcc3..00538e0715 100644 --- a/x/upgrade/types/storeloader.go +++ b/x/upgrade/types/storeloader.go @@ -10,9 +10,9 @@ import ( // pattern. This is useful for custom upgrade loading logic. func UpgradeStoreLoader(upgradeHeight int64, storeUpgrades *store.StoreUpgrades) baseapp.StoreLoader { return func(ms sdk.CommitMultiStore) error { - if upgradeHeight == ms.LastCommitID().Version { + if upgradeHeight == ms.LastCommitID().Version+1 { // Check if the current commit version and upgrade height matches - if len(storeUpgrades.Renamed) > 0 || len(storeUpgrades.Deleted) > 0 { + if len(storeUpgrades.Renamed) > 0 || len(storeUpgrades.Deleted) > 0 || len(storeUpgrades.Added) > 0 { return ms.LoadLatestVersionAndUpgrade(storeUpgrades) } } diff --git a/x/upgrade/types/storeloader_test.go b/x/upgrade/types/storeloader_test.go index f1afa4176b..ec2bfa824d 100644 --- a/x/upgrade/types/storeloader_test.go +++ b/x/upgrade/types/storeloader_test.go @@ -65,11 +65,13 @@ func checkStore(t *testing.T, db dbm.DB, ver int64, storeKey string, k, v []byte // Test that we can make commits and then reload old versions. // Test that LoadLatestVersion actually does. func TestSetLoader(t *testing.T) { + upgradeHeight := int64(5) + // set a temporary home dir homeDir := t.TempDir() upgradeInfoFilePath := filepath.Join(homeDir, "upgrade-info.json") upgradeInfo := &store.UpgradeInfo{ - Name: "test", Height: 0, + Name: "test", Height: upgradeHeight, } data, err := json.Marshal(upgradeInfo) @@ -92,7 +94,7 @@ func TestSetLoader(t *testing.T) { loadStoreKey: "foo", }, "rename with inline opts": { - setLoader: useUpgradeLoader(0, &store.StoreUpgrades{ + setLoader: useUpgradeLoader(upgradeHeight, &store.StoreUpgrades{ Renamed: []store.StoreRename{{ OldKey: "foo", NewKey: "bar", @@ -116,25 +118,36 @@ func TestSetLoader(t *testing.T) { // load the app with the existing db opts := []func(*baseapp.BaseApp){baseapp.SetPruning(store.PruneNothing)} + + origapp := baseapp.NewBaseApp(t.Name(), defaultLogger(), db, nil, opts...) + origapp.MountStores(sdk.NewKVStoreKey(tc.origStoreKey)) + err := origapp.LoadLatestVersion() + require.Nil(t, err) + + for i := int64(2); i <= upgradeHeight-1; i++ { + origapp.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{Height: i}}) + res := origapp.Commit() + require.NotNil(t, res.Data) + } + if tc.setLoader != nil { opts = append(opts, tc.setLoader) } + // load the new app with the original app db app := baseapp.NewBaseApp(t.Name(), defaultLogger(), db, nil, opts...) - capKey := sdk.NewKVStoreKey("main") - app.MountStores(capKey) app.MountStores(sdk.NewKVStoreKey(tc.loadStoreKey)) - err := app.LoadLatestVersion() + err = app.LoadLatestVersion() require.Nil(t, err) // "execute" one block - app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{Height: 2}}) + app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{Height: upgradeHeight}}) res := app.Commit() require.NotNil(t, res.Data) // check db is properly updated - checkStore(t, db, 2, tc.loadStoreKey, k, v) - checkStore(t, db, 2, tc.loadStoreKey, []byte("foo"), nil) + checkStore(t, db, upgradeHeight, tc.loadStoreKey, k, v) + checkStore(t, db, upgradeHeight, tc.loadStoreKey, []byte("foo"), nil) }) } } From 8bc429d288fc5c0b701ac159275a1579b3b5aae6 Mon Sep 17 00:00:00 2001 From: Sunny Aggarwal Date: Fri, 13 Nov 2020 11:48:06 -0400 Subject: [PATCH 099/136] fix int64 --- x/staking/handler_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x/staking/handler_test.go b/x/staking/handler_test.go index d67fffbe32..0f5a641057 100644 --- a/x/staking/handler_test.go +++ b/x/staking/handler_test.go @@ -185,7 +185,7 @@ func TestInvalidPubKeyTypeMsgCreateValidator(t *testing.T) { } func TestBothPubKeyTypesMsgCreateValidator(t *testing.T) { - app, ctx, _, valAddrs := bootstrapHandlerGenesisTest(t, 1000, 2, 1000) + app, ctx, _, valAddrs := bootstrapHandlerGenesisTest(t, 1000, 2, sdk.NewInt(1000)) ctx = ctx.WithConsensusParams(&abci.ConsensusParams{ Validator: &tmproto.ValidatorParams{PubKeyTypes: []string{tmtypes.ABCIPubKeyTypeEd25519, tmtypes.ABCIPubKeyTypeSecp256k1}}, }) @@ -210,7 +210,7 @@ func TestBothPubKeyTypesMsgCreateValidator(t *testing.T) { } for _, tc := range testCases { t.Run(tc.name, func(*testing.T) { - tstaking.CreateValidator(tc.addr, tc.pk, 10, true) + tstaking.CreateValidator(tc.addr, tc.pk, sdk.NewInt(10), true) }) } } From a8ef4a380da4fbdcc762a08c4d564e76c5de29bd Mon Sep 17 00:00:00 2001 From: Amaury Date: Fri, 13 Nov 2020 17:36:58 +0100 Subject: [PATCH 100/136] All Makefile proto commands use Docker (#7931) * Update tooling around docker * Run commands * Remove swagger gen for now * Update proto-gen-any * Fix indentn * Use CURDIR Co-authored-by: Alessio Treglia --- .github/workflows/proto.yml | 4 +- .gitignore | 1 - CONTRIBUTING.md | 14 +- Makefile | 27 +- client/docs/swagger-ui/swagger.yaml | 239 ++++++++++++++++++ codec/types/any.pb.go | 43 ++-- contrib/devtools/Makefile | 10 +- contrib/devtools/proto-tools-installer.sh | 101 -------- proto/cosmos/auth/v1beta1/auth.proto | 11 +- proto/cosmos/bank/v1beta1/tx.proto | 6 +- proto/cosmos/base/abci/v1beta1/abci.proto | 2 +- .../base/store/v1beta1/commit_info.proto | 2 +- proto/cosmos/crisis/v1beta1/tx.proto | 2 +- proto/cosmos/crypto/ed25519/keys.proto | 6 +- proto/cosmos/distribution/v1beta1/tx.proto | 12 +- proto/cosmos/gov/v1beta1/tx.proto | 10 +- proto/cosmos/params/v1beta1/params.proto | 6 +- proto/cosmos/staking/v1beta1/staking.proto | 31 ++- proto/cosmos/staking/v1beta1/tx.proto | 6 +- proto/cosmos/tx/signing/v1beta1/signing.proto | 68 ++--- proto/cosmos/tx/v1beta1/service.proto | 70 ++--- proto/cosmos/upgrade/v1beta1/upgrade.proto | 3 +- proto/cosmos/vesting/v1beta1/tx.proto | 4 +- proto/ibc/applications/transfer/v1/tx.proto | 2 +- proto/ibc/core/channel/v1/genesis.proto | 10 +- proto/ibc/core/channel/v1/query.proto | 15 +- proto/ibc/core/client/v1/genesis.proto | 8 +- proto/ibc/core/client/v1/query.proto | 10 +- proto/ibc/core/client/v1/tx.proto | 8 +- proto/ibc/core/commitment/v1/commitment.proto | 2 +- proto/ibc/core/connection/v1/tx.proto | 16 +- scripts/protocgen-any.sh | 4 +- testutil/testdata/query.proto | 18 +- testutil/testdata/tx.proto | 10 +- testutil/testdata/unknonwnproto.proto | 74 +++--- 35 files changed, 485 insertions(+), 370 deletions(-) delete mode 100755 contrib/devtools/proto-tools-installer.sh diff --git a/.github/workflows/proto.yml b/.github/workflows/proto.yml index b355da087d..13f05c131a 100644 --- a/.github/workflows/proto.yml +++ b/.github/workflows/proto.yml @@ -12,10 +12,10 @@ jobs: steps: - uses: actions/checkout@master - name: lint - run: make proto-lint-docker + run: make proto-lint breakage: runs-on: ubuntu-latest steps: - uses: actions/checkout@master - name: check-breakage - run: make proto-check-breaking-docker + run: make proto-check-breaking diff --git a/.gitignore b/.gitignore index 1755acca7e..2bf1816598 100644 --- a/.gitignore +++ b/.gitignore @@ -20,7 +20,6 @@ docs/node_modules docs/modules dist tools-stamp -proto-tools-stamp buf-stamp artifacts diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e13dba1b85..bfa080cc90 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -142,11 +142,15 @@ build, in which case we can fall back on `go mod tidy -v`. We use [Protocol Buffers](https://developers.google.com/protocol-buffers) along with [gogoproto](https://github.com/gogo/protobuf) to generate code for use in Cosmos-SDK. +For determinstic behavior around Protobuf tooling, everything is containerized using Docker. Make sure to have Docker installed on your machine, or head to [Docker's website](https://docs.docker.com/get-docker/) to install it. + For formatting code in `.proto` files, you can run `make proto-format` command. -For linting and checking breaking changes, we use [buf](https://buf.build/). There are two options for linting and to check if your changes will cause a break. The first is that you can install [buf](https://buf.build/docs/installation) locally, the commands for running buf after installing are `make proto-lint` and the breaking changes check will be `make proto-check-breaking`. If you do not want to install buf and have docker installed already then you can use these commands `make proto-lint-docker` and `make proto-check-breaking-docker`. +For linting and checking breaking changes, we use [buf](https://buf.build/). You can use the commands `make proto-lint` and `make proto-check-breaking` to respectively lint your proto files and check for breaking changes. -To generate the protobuf stubs you must have `protoc` and `protoc-gen-gocosmos` installed. To install these tools run `make proto-tools`. After this step you will be able to run `make proto-gen` to generate the protobuf stubs. +To generate the protobuf stubs, you can run `make proto-gen`. + +We also added the `make proto-all` command to run all the above commands sequentially. In order for imports to properly compile in your IDE, you may need to manually set your protobuf path in your IDE's workspace settings/config. @@ -268,8 +272,8 @@ and PRs are merged into `master`, if a contributor wishes the PR to be released - **[Impact]** Explanation of how the bug affects users or developers. - **[Test Case]** section with detailed instructions on how to reproduce the bug. - **[Regression Potential]** section with a discussion how regressions are most likely to manifest, or might - manifest even if it's unlikely, as a result of the change. **It is assumed that any SRU candidate PR is - well-tested before it is merged in and has an overall low risk of regression**. + manifest even if it's unlikely, as a result of the change. **It is assumed that any SRU candidate PR is + well-tested before it is merged in and has an overall low risk of regression**. It is the PR's author's responsibility to fix merge conflicts, update changelog entries, and ensure CI passes. If a PR originates from an external contributor, it may be a core team member's @@ -280,7 +284,7 @@ Finally, when a point release is ready to be made: 1. Create `release/v0.38.N` branch 2. Ensure changelog entries are verified - 2. Be sure changelog entries are added to `RELEASE_CHANGELOG.md` + 1. Be sure changelog entries are added to `RELEASE_CHANGELOG.md` 3. Add release version date to the changelog 4. Push release branch along with the annotated tag: **git tag -a** 5. Create a PR into `master` containing ONLY `CHANGELOG.md` updates diff --git a/Makefile b/Makefile index d908a2ad0b..1d8164219f 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,7 @@ BUILDDIR ?= $(CURDIR)/build SIMAPP = ./simapp MOCKS_DIR = $(CURDIR)/tests/mocks HTTPS_GIT := https://github.com/cosmos/cosmos-sdk.git -DOCKER_BUF := docker run -v $(shell pwd):/workspace --workdir /workspace bufbuild/buf +DOCKER_BUF := docker run -v $(CURDIR):/workspace --workdir /workspace bufbuild/buf export GO111MODULE = on @@ -356,43 +356,30 @@ devdoc-update: ### Protobuf ### ############################################################################### -proto-all: proto-tools proto-gen proto-lint proto-check-breaking proto-swagger-gen proto-format +proto-all: proto-format proto-lint proto-check-breaking proto-gen proto-gen: - @./scripts/protocgen.sh - -proto-gen-docker: @echo "Generating Protobuf files" - docker run -v $(shell pwd):/workspace --workdir /workspace tendermintdev/sdk-proto-gen sh ./scripts/protocgen.sh -.PHONY: proto-gen-docker + docker run -v $(CURDIR):/workspace --workdir /workspace tendermintdev/sdk-proto-gen sh ./scripts/protocgen.sh proto-format: @echo "Formatting Protobuf files" - docker run -v $(shell pwd):/workspace \ + docker run -v $(CURDIR):/workspace \ --workdir /workspace tendermintdev/docker-build-proto \ find ./ -not -path "./third_party/*" -name *.proto -exec clang-format -i {} \; -.PHONY: proto-format # This generates the SDK's custom wrapper for google.protobuf.Any. It should only be run manually when needed proto-gen-any: - @./scripts/protocgen-any.sh + docker run -v $(CURDIR):/workspace --workdir /workspace tendermintdev/sdk-proto-gen sh ./scripts/protocgen-any.sh proto-swagger-gen: @./scripts/protoc-swagger-gen.sh proto-lint: - @buf check lint --error-format=json + @$(DOCKER_BUF) check lint --error-format=json proto-check-breaking: - @buf check breaking --against-input '.git#branch=master' - -proto-lint-docker: - @$(DOCKER_BUF) check lint --error-format=json -.PHONY: proto-lint - -proto-check-breaking-docker: @$(DOCKER_BUF) check breaking --against-input $(HTTPS_GIT)#branch=master -.PHONY: proto-check-breaking-ci TM_URL = https://raw.githubusercontent.com/tendermint/tendermint/v0.34.0-rc6/proto/tendermint GOGO_PROTO_URL = https://raw.githubusercontent.com/regen-network/protobuf/cosmos @@ -445,7 +432,7 @@ proto-update-deps: ## Issue link: https://github.com/confio/ics23/issues/32 @sed -i '4ioption go_package = "github.com/confio/ics23/go";' $(CONFIO_TYPES)/proofs.proto -.PHONY: proto-all proto-gen proto-lint proto-check-breaking proto-update-deps +.PHONY: proto-all proto-gen proto-gen-any proto-swagger-gen proto-format proto-lint proto-check-breaking proto-update-deps ############################################################################### ### Localnet ### diff --git a/client/docs/swagger-ui/swagger.yaml b/client/docs/swagger-ui/swagger.yaml index f8a2cccb94..0b52dcf194 100644 --- a/client/docs/swagger-ui/swagger.yaml +++ b/client/docs/swagger-ui/swagger.yaml @@ -19992,6 +19992,221 @@ paths: type: boolean tags: - Query + /ibc/client/v1beta1/params: + get: + summary: ClientParams queries all parameters of the ibc client. + operationId: ClientParams + responses: + '200': + description: A successful response. + schema: + type: object + properties: + params: + description: params defines the parameters of the module. + type: object + properties: + allowed_clients: + type: array + items: + type: string + description: >- + allowed_clients defines the list of allowed client state + types. + description: >- + QueryClientParamsResponse is the response type for the + Query/ClientParams RPC method. + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + tags: + - Query /ibc/core/client/v1beta1/client_states: get: summary: ClientStates queries all the IBC light clients of a chain. @@ -33015,6 +33230,30 @@ definitions: description: >- ConsensusStateWithHeight defines a consensus state with an additional height field. + ibc.core.client.v1.Params: + type: object + properties: + allowed_clients: + type: array + items: + type: string + description: allowed_clients defines the list of allowed client state types. + description: Params defines the set of IBC light client parameters. + ibc.core.client.v1.QueryClientParamsResponse: + type: object + properties: + params: + description: params defines the parameters of the module. + type: object + properties: + allowed_clients: + type: array + items: + type: string + description: allowed_clients defines the list of allowed client state types. + description: >- + QueryClientParamsResponse is the response type for the Query/ClientParams + RPC method. ibc.core.client.v1.QueryClientStateResponse: type: object properties: diff --git a/codec/types/any.pb.go b/codec/types/any.pb.go index d084381696..97d9f1c2aa 100644 --- a/codec/types/any.pb.go +++ b/codec/types/any.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: third_party/proto/google/protobuf/any.proto +// source: google/protobuf/any.proto package types @@ -29,7 +29,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *Any) Reset() { *m = Any{} } func (*Any) ProtoMessage() {} func (*Any) Descriptor() ([]byte, []int) { - return fileDescriptor_cb68f365a8e2bcdc, []int{0} + return fileDescriptor_b53526c13ae22eb4, []int{0} } func (*Any) XXX_WellKnownType() string { return "Any" } func (m *Any) XXX_Unmarshal(b []byte) error { @@ -79,28 +79,25 @@ func (*Any) XXX_MessageName() string { func init() { } -func init() { - proto.RegisterFile("third_party/proto/google/protobuf/any.proto", fileDescriptor_cb68f365a8e2bcdc) -} +func init() { proto.RegisterFile("google/protobuf/any.proto", fileDescriptor_b53526c13ae22eb4) } -var fileDescriptor_cb68f365a8e2bcdc = []byte{ - // 246 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xd2, 0x2e, 0xc9, 0xc8, 0x2c, - 0x4a, 0x89, 0x2f, 0x48, 0x2c, 0x2a, 0xa9, 0xd4, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0xd7, 0x4f, 0xcf, - 0xcf, 0x4f, 0xcf, 0x49, 0x85, 0x70, 0x92, 0x4a, 0xd3, 0xf4, 0x13, 0xf3, 0x2a, 0xf5, 0xc0, 0x1c, - 0x21, 0x7e, 0x88, 0x94, 0x1e, 0x4c, 0x4a, 0x4a, 0x0d, 0x9b, 0xee, 0xf4, 0x7c, 0x04, 0x0b, 0xa2, - 0x54, 0xc9, 0x86, 0x8b, 0xd9, 0x31, 0xaf, 0x52, 0x48, 0x92, 0x8b, 0xa3, 0xa4, 0xb2, 0x20, 0x35, - 0xbe, 0xb4, 0x28, 0x47, 0x82, 0x51, 0x81, 0x51, 0x83, 0x33, 0x88, 0x1d, 0xc4, 0x0f, 0x2d, 0xca, - 0x11, 0x12, 0xe1, 0x62, 0x2d, 0x4b, 0xcc, 0x29, 0x4d, 0x95, 0x60, 0x52, 0x60, 0xd4, 0xe0, 0x09, - 0x82, 0x70, 0xac, 0x58, 0x3e, 0x2c, 0x94, 0x67, 0x70, 0x6a, 0x66, 0xbc, 0xf1, 0x50, 0x8e, 0xe1, - 0xc3, 0x43, 0x39, 0xc6, 0x1f, 0x0f, 0xe5, 0x18, 0x1b, 0x1e, 0xc9, 0x31, 0xae, 0x78, 0x24, 0xc7, - 0x78, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0xbe, 0x78, 0x24, - 0xc7, 0xf0, 0x01, 0x24, 0xfe, 0x58, 0x8e, 0xf1, 0xc0, 0x63, 0x39, 0x86, 0x13, 0x8f, 0xe5, 0x18, - 0xb9, 0x84, 0x93, 0xf3, 0x73, 0xf5, 0xd0, 0x5c, 0xec, 0xc4, 0xe1, 0x98, 0x57, 0x19, 0x00, 0xe2, - 0x04, 0x30, 0x46, 0xb1, 0x82, 0x2c, 0x2f, 0x5e, 0xc4, 0xc4, 0xec, 0x1e, 0xe0, 0xb4, 0x8a, 0x49, - 0xce, 0x1d, 0xa2, 0x34, 0x00, 0xaa, 0x54, 0x2f, 0x3c, 0x35, 0x27, 0xc7, 0x3b, 0x2f, 0xbf, 0x3c, - 0x2f, 0x04, 0xa4, 0x2c, 0x89, 0x0d, 0x6c, 0x86, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0x16, 0xc3, - 0x46, 0x5f, 0x32, 0x01, 0x00, 0x00, +var fileDescriptor_b53526c13ae22eb4 = []byte{ + // 235 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4c, 0xcf, 0xcf, 0x4f, + 0xcf, 0x49, 0xd5, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x4f, 0xcc, 0xab, 0xd4, + 0x03, 0x73, 0x84, 0xf8, 0x21, 0x52, 0x7a, 0x30, 0x29, 0x29, 0x91, 0xf4, 0xfc, 0xf4, 0x7c, 0x30, + 0x4f, 0x1f, 0xc4, 0x82, 0x48, 0x28, 0xd9, 0x70, 0x31, 0x3b, 0xe6, 0x55, 0x0a, 0x49, 0x72, 0x71, + 0x94, 0x54, 0x16, 0xa4, 0xc6, 0x97, 0x16, 0xe5, 0x48, 0x30, 0x2a, 0x30, 0x6a, 0x70, 0x06, 0xb1, + 0x83, 0xf8, 0xa1, 0x45, 0x39, 0x42, 0x22, 0x5c, 0xac, 0x65, 0x89, 0x39, 0xa5, 0xa9, 0x12, 0x4c, + 0x0a, 0x8c, 0x1a, 0x3c, 0x41, 0x10, 0x8e, 0x15, 0xcb, 0x87, 0x85, 0xf2, 0x0c, 0x4e, 0xcd, 0x8c, + 0x37, 0x1e, 0xca, 0x31, 0x7c, 0x78, 0x28, 0xc7, 0xf8, 0xe3, 0xa1, 0x1c, 0x63, 0xc3, 0x23, 0x39, + 0xc6, 0x15, 0x8f, 0xe4, 0x18, 0x4f, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, + 0x39, 0xc6, 0x17, 0x8f, 0xe4, 0x18, 0x3e, 0x80, 0xc4, 0x1f, 0xcb, 0x31, 0x1e, 0x78, 0x2c, 0xc7, + 0x70, 0xe2, 0xb1, 0x1c, 0x23, 0x97, 0x70, 0x72, 0x7e, 0xae, 0x1e, 0x9a, 0xfb, 0x9c, 0x38, 0x1c, + 0xf3, 0x2a, 0x03, 0x40, 0x9c, 0x00, 0xc6, 0x28, 0x56, 0x90, 0xe5, 0xc5, 0x8b, 0x98, 0x98, 0xdd, + 0x03, 0x9c, 0x56, 0x31, 0xc9, 0xb9, 0x43, 0x94, 0x06, 0x40, 0x95, 0xea, 0x85, 0xa7, 0xe6, 0xe4, + 0x78, 0xe7, 0xe5, 0x97, 0xe7, 0x85, 0x80, 0x94, 0x25, 0xb1, 0x81, 0xcd, 0x30, 0x06, 0x04, 0x00, + 0x00, 0xff, 0xff, 0xe6, 0xfb, 0xa0, 0x21, 0x0e, 0x01, 0x00, 0x00, } func (this *Any) Compare(that interface{}) int { diff --git a/contrib/devtools/Makefile b/contrib/devtools/Makefile index 69271030fc..2e3741fd85 100644 --- a/contrib/devtools/Makefile +++ b/contrib/devtools/Makefile @@ -57,14 +57,6 @@ tools-stamp: statik runsim # in a row. touch $@ -proto-tools: proto-tools-stamp -proto-tools-stamp: - bash $(mkfile_dir)/proto-tools-installer.sh - # Create dummy file to satisfy dependency and avoid - # rebuilding when this Makefile target is hit twice - # in a row. - touch $@ - # Install the runsim binary with a temporary workaround of entering an outside # directory as the "go get" command ignores the -mod option and will polute the # go.{mod, sum} files. @@ -87,6 +79,6 @@ $(RUNSIM): tools-clean: rm -f $(STATIK) $(GOLANGCI_LINT) $(RUNSIM) - rm -f proto-tools-stamp tools-stamp + rm -f tools-stamp .PHONY: tools-clean statik runsim diff --git a/contrib/devtools/proto-tools-installer.sh b/contrib/devtools/proto-tools-installer.sh deleted file mode 100755 index fc736d55e8..0000000000 --- a/contrib/devtools/proto-tools-installer.sh +++ /dev/null @@ -1,101 +0,0 @@ -#!/bin/bash - -set -ue - -DESTDIR=${DESTDIR:-} -PREFIX=${PREFIX:-/usr/local} -UNAME_S="$(uname -s 2>/dev/null)" -UNAME_M="$(uname -m 2>/dev/null)" -BUF_VERSION=0.30.0 -PROTOC_GRPC_GATEWAY_VERSION=1.14.7 - -f_abort() { - local l_rc=$1 - shift - - echo $@ >&2 - exit ${l_rc} -} - -case "${UNAME_S}" in -Linux) - PROTOC_ZIP="protoc-${PROTOC_VERSION}-linux-x86_64.zip" - PROTOC_GRPC_GATEWAY_BIN="protoc-gen-grpc-gateway-v${PROTOC_GRPC_GATEWAY_VERSION}-linux-x86_64" - ;; -Darwin) - PROTOC_ZIP="protoc-${PROTOC_VERSION}-osx-x86_64.zip" - PROTOC_GRPC_GATEWAY_BIN="protoc-gen-grpc-gateway-v${PROTOC_GRPC_GATEWAY_VERSION}-darwin-x86_64" - ;; -*) - f_abort 1 "Unknown kernel name. Exiting." -esac - -TEMPDIR="$(mktemp -d)" - -trap "rm -rvf ${TEMPDIR}" EXIT - -f_print_installing_with_padding() { - printf "Installing %30s ..." "$1" >&2 -} - -f_print_done() { - echo -e "\tDONE" >&2 -} - -f_ensure_tools() { - ! which curl &>/dev/null && f_abort 2 "couldn't find curl, aborting" || true -} - -f_ensure_dirs() { - mkdir -p "${DESTDIR}/${PREFIX}/bin" - mkdir -p "${DESTDIR}/${PREFIX}/include" -} - -f_needs_install() { - if [ -x $1 ]; then - echo -e "\talready installed. Skipping." >&2 - return 1 - fi - - return 0 -} - -f_install_buf() { - f_print_installing_with_padding buf - f_needs_install "${DESTDIR}/${PREFIX}/bin/buf" || return 0 - - curl -sSL "https://github.com/bufbuild/buf/releases/download/v${BUF_VERSION}/buf-${UNAME_S}-${UNAME_M}" -o "${DESTDIR}/${PREFIX}/bin/buf" - chmod +x "${DESTDIR}/${PREFIX}/bin/buf" - f_print_done -} - -f_install_protoc_gen_grpc_gateway() { - f_print_installing_with_padding protoc-gen-grpc-gateway - f_needs_install "${DESTDIR}/${PREFIX}/bin/protoc-gen-grpc-gateway" || return 0 - - curl -o "${DESTDIR}/${PREFIX}/bin/protoc-gen-grpc-gateway" -sSL "https://github.com/grpc-ecosystem/grpc-gateway/releases/download/v${PROTOC_GRPC_GATEWAY_VERSION}/${PROTOC_GRPC_GATEWAY_BIN}" - f_print_done -} - -f_install_protoc_gen_swagger() { - f_print_installing_with_padding protoc-gen-swagger - f_needs_install "${DESTDIR}/${PREFIX}/bin/protoc-gen-swagger" || return 0 - - if ! which npm &>/dev/null ; then - echo -e "\tNPM is not installed. Skipping." - return 0 - fi - - pushd "${TEMPDIR}" >/dev/null - go get github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger - npm install -g swagger-combine - popd >/dev/null - f_print_done -} - -f_ensure_tools -f_ensure_dirs -f_install_buf -f_install_protoc_gen_gocosmos -f_install_protoc_gen_grpc_gateway -f_install_protoc_gen_swagger diff --git a/proto/cosmos/auth/v1beta1/auth.proto b/proto/cosmos/auth/v1beta1/auth.proto index 0caa123829..72e1d9ec28 100644 --- a/proto/cosmos/auth/v1beta1/auth.proto +++ b/proto/cosmos/auth/v1beta1/auth.proto @@ -17,8 +17,9 @@ message BaseAccount { option (cosmos_proto.implements_interface) = "AccountI"; - string address = 1; - google.protobuf.Any pub_key = 2 [(gogoproto.jsontag) = "public_key,omitempty", (gogoproto.moretags) = "yaml:\"public_key\""]; + string address = 1; + google.protobuf.Any pub_key = 2 + [(gogoproto.jsontag) = "public_key,omitempty", (gogoproto.moretags) = "yaml:\"public_key\""]; uint64 account_number = 3 [(gogoproto.moretags) = "yaml:\"account_number\""]; uint64 sequence = 4; } @@ -29,9 +30,9 @@ message ModuleAccount { option (gogoproto.goproto_stringer) = false; option (cosmos_proto.implements_interface) = "ModuleAccountI"; - BaseAccount base_account = 1 [(gogoproto.embed) = true, (gogoproto.moretags) = "yaml:\"base_account\""]; - string name = 2; - repeated string permissions = 3; + BaseAccount base_account = 1 [(gogoproto.embed) = true, (gogoproto.moretags) = "yaml:\"base_account\""]; + string name = 2; + repeated string permissions = 3; } // Params defines the parameters for the auth module. diff --git a/proto/cosmos/bank/v1beta1/tx.proto b/proto/cosmos/bank/v1beta1/tx.proto index 0216ad665e..26b2ab41f4 100644 --- a/proto/cosmos/bank/v1beta1/tx.proto +++ b/proto/cosmos/bank/v1beta1/tx.proto @@ -28,15 +28,15 @@ message MsgSend { } // MsgSendResponse defines the Msg/Send response type. -message MsgSendResponse { } +message MsgSendResponse {} // MsgMultiSend represents an arbitrary multi-in, multi-out send message. message MsgMultiSend { option (gogoproto.equal) = false; - repeated Input inputs = 1 [(gogoproto.nullable) = false]; + repeated Input inputs = 1 [(gogoproto.nullable) = false]; repeated Output outputs = 2 [(gogoproto.nullable) = false]; } // MsgMultiSendResponse defines the Msg/MultiSend response type. -message MsgMultiSendResponse { } +message MsgMultiSendResponse {} diff --git a/proto/cosmos/base/abci/v1beta1/abci.proto b/proto/cosmos/base/abci/v1beta1/abci.proto index 9d7edbbbbd..72da2aacc3 100644 --- a/proto/cosmos/base/abci/v1beta1/abci.proto +++ b/proto/cosmos/base/abci/v1beta1/abci.proto @@ -58,7 +58,7 @@ message ABCIMessageLog { message StringEvent { option (gogoproto.stringer) = true; - string type = 1; + string type = 1; repeated Attribute attributes = 2 [(gogoproto.nullable) = false]; } diff --git a/proto/cosmos/base/store/v1beta1/commit_info.proto b/proto/cosmos/base/store/v1beta1/commit_info.proto index 3bc23af84e..98a33d30e7 100644 --- a/proto/cosmos/base/store/v1beta1/commit_info.proto +++ b/proto/cosmos/base/store/v1beta1/commit_info.proto @@ -8,7 +8,7 @@ option go_package = "github.com/cosmos/cosmos-sdk/store/types"; // CommitInfo defines commit information used by the multi-store when committing // a version/height. message CommitInfo { - int64 version = 1; + int64 version = 1; repeated StoreInfo store_infos = 2 [(gogoproto.nullable) = false]; } diff --git a/proto/cosmos/crisis/v1beta1/tx.proto b/proto/cosmos/crisis/v1beta1/tx.proto index c6156b8a72..26457ad6d5 100644 --- a/proto/cosmos/crisis/v1beta1/tx.proto +++ b/proto/cosmos/crisis/v1beta1/tx.proto @@ -22,4 +22,4 @@ message MsgVerifyInvariant { } // MsgVerifyInvariantResponse defines the Msg/VerifyInvariant response type. -message MsgVerifyInvariantResponse { } +message MsgVerifyInvariantResponse {} diff --git a/proto/cosmos/crypto/ed25519/keys.proto b/proto/cosmos/crypto/ed25519/keys.proto index 3f667a0b21..bed9c29cc7 100644 --- a/proto/cosmos/crypto/ed25519/keys.proto +++ b/proto/cosmos/crypto/ed25519/keys.proto @@ -11,12 +11,12 @@ option go_package = "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519"; // the x-coordinate. Otherwise the first byte is a 0x03. // This prefix is followed with the x-coordinate. message PubKey { - option (gogoproto.goproto_stringer) = false; + option (gogoproto.goproto_stringer) = false; - bytes key = 1 [(gogoproto.casttype) = "crypto/ed25519.PublicKey"]; + bytes key = 1 [(gogoproto.casttype) = "crypto/ed25519.PublicKey"]; } // PrivKey defines a ed25519 private key. message PrivKey { - bytes key = 1 [(gogoproto.casttype) = "crypto/ed25519.PrivateKey"]; + bytes key = 1 [(gogoproto.casttype) = "crypto/ed25519.PrivateKey"]; } diff --git a/proto/cosmos/distribution/v1beta1/tx.proto b/proto/cosmos/distribution/v1beta1/tx.proto index 783f06d1d7..e6ce478bcd 100644 --- a/proto/cosmos/distribution/v1beta1/tx.proto +++ b/proto/cosmos/distribution/v1beta1/tx.proto @@ -9,7 +9,7 @@ import "cosmos/base/v1beta1/coin.proto"; // Msg defines the distribution Msg service. service Msg { - // SetWithdrawAddress defines a method to change the withdraw address + // SetWithdrawAddress defines a method to change the withdraw address // for a delegator (or validator self-delegation). rpc SetWithdrawAddress(MsgSetWithdrawAddress) returns (MsgSetWithdrawAddressResponse); @@ -17,7 +17,7 @@ service Msg { // from a single validator. rpc WithdrawDelegatorReward(MsgWithdrawDelegatorReward) returns (MsgWithdrawDelegatorRewardResponse); - // WithdrawValidatorCommission defines a method to withdraw the + // WithdrawValidatorCommission defines a method to withdraw the // full commission to the validator address. rpc WithdrawValidatorCommission(MsgWithdrawValidatorCommission) returns (MsgWithdrawValidatorCommissionResponse); @@ -37,7 +37,7 @@ message MsgSetWithdrawAddress { } // MsgSetWithdrawAddressResponse defines the Msg/SetWithdrawAddress response type. -message MsgSetWithdrawAddressResponse { } +message MsgSetWithdrawAddressResponse {} // MsgWithdrawDelegatorReward represents delegation withdrawal to a delegator // from a single validator. @@ -50,7 +50,7 @@ message MsgWithdrawDelegatorReward { } // MsgWithdrawDelegatorRewardResponse defines the Msg/WithdrawDelegatorReward response type. -message MsgWithdrawDelegatorRewardResponse { } +message MsgWithdrawDelegatorRewardResponse {} // MsgWithdrawValidatorCommission withdraws the full commission to the validator // address. @@ -62,7 +62,7 @@ message MsgWithdrawValidatorCommission { } // MsgWithdrawValidatorCommissionResponse defines the Msg/WithdrawValidatorCommission response type. -message MsgWithdrawValidatorCommissionResponse { } +message MsgWithdrawValidatorCommissionResponse {} // MsgFundCommunityPool allows an account to directly // fund the community pool. @@ -76,4 +76,4 @@ message MsgFundCommunityPool { } // MsgFundCommunityPoolResponse defines the Msg/FundCommunityPool response type. -message MsgFundCommunityPoolResponse { } +message MsgFundCommunityPoolResponse {} diff --git a/proto/cosmos/gov/v1beta1/tx.proto b/proto/cosmos/gov/v1beta1/tx.proto index 5c0560757d..d4f0c1f99a 100644 --- a/proto/cosmos/gov/v1beta1/tx.proto +++ b/proto/cosmos/gov/v1beta1/tx.proto @@ -7,7 +7,7 @@ import "cosmos_proto/cosmos.proto"; import "gogoproto/gogo.proto"; import "google/protobuf/any.proto"; -option go_package = "github.com/cosmos/cosmos-sdk/x/gov/types"; +option go_package = "github.com/cosmos/cosmos-sdk/x/gov/types"; // Msg defines the bank Msg service. service Msg { @@ -24,7 +24,7 @@ service Msg { // MsgSubmitProposal defines an sdk.Msg type that supports submitting arbitrary // proposal Content. message MsgSubmitProposal { - option (gogoproto.equal) = false; + option (gogoproto.equal) = false; option (gogoproto.goproto_stringer) = false; option (gogoproto.stringer) = false; option (gogoproto.goproto_getters) = false; @@ -40,12 +40,12 @@ message MsgSubmitProposal { // MsgSubmitProposalResponse defines the Msg/SubmitProposal response type. message MsgSubmitProposalResponse { - uint64 proposal_id = 1 [(gogoproto.jsontag) = "proposal_id", (gogoproto.moretags) = "yaml:\"proposal_id\""]; + uint64 proposal_id = 1 [(gogoproto.jsontag) = "proposal_id", (gogoproto.moretags) = "yaml:\"proposal_id\""]; } // MsgVote defines a message to cast a vote. message MsgVote { - option (gogoproto.equal) = false; + option (gogoproto.equal) = false; option (gogoproto.goproto_stringer) = false; option (gogoproto.stringer) = false; option (gogoproto.goproto_getters) = false; @@ -60,7 +60,7 @@ message MsgVoteResponse {} // MsgDeposit defines a message to submit a deposit to an existing proposal. message MsgDeposit { - option (gogoproto.equal) = false; + option (gogoproto.equal) = false; option (gogoproto.goproto_stringer) = false; option (gogoproto.stringer) = false; option (gogoproto.goproto_getters) = false; diff --git a/proto/cosmos/params/v1beta1/params.proto b/proto/cosmos/params/v1beta1/params.proto index 5b47261b19..5382fd7999 100644 --- a/proto/cosmos/params/v1beta1/params.proto +++ b/proto/cosmos/params/v1beta1/params.proto @@ -11,9 +11,9 @@ message ParameterChangeProposal { option (gogoproto.goproto_getters) = false; option (gogoproto.goproto_stringer) = false; - string title = 1; - string description = 2; - repeated ParamChange changes = 3 [(gogoproto.nullable) = false]; + string title = 1; + string description = 2; + repeated ParamChange changes = 3 [(gogoproto.nullable) = false]; } // ParamChange defines an individual parameter change, for use in diff --git a/proto/cosmos/staking/v1beta1/staking.proto b/proto/cosmos/staking/v1beta1/staking.proto index ac68af05f4..eadc86e9d1 100644 --- a/proto/cosmos/staking/v1beta1/staking.proto +++ b/proto/cosmos/staking/v1beta1/staking.proto @@ -18,7 +18,7 @@ option go_package = "github.com/cosmos/cosmos-sdk/x/staking/types"; // (`n` is set by the staking module's `historical_entries` parameter). message HistoricalInfo { tendermint.types.Header header = 1 [(gogoproto.nullable) = false]; - repeated Validator valset = 2 [(gogoproto.nullable) = false]; + repeated Validator valset = 2 [(gogoproto.nullable) = false]; } // CommissionRates defines the initial commission rates to be used for creating @@ -75,13 +75,12 @@ message Validator { option (gogoproto.goproto_stringer) = false; option (gogoproto.goproto_getters) = false; - string operator_address = 1 [(gogoproto.moretags) = "yaml:\"operator_address\""]; - google.protobuf.Any consensus_pubkey = 2 [ - (cosmos_proto.accepts_interface) = "cosmos.crypto.PubKey", - (gogoproto.moretags) = "yaml:\"consensus_pubkey\""]; - bool jailed = 3; - BondStatus status = 4; - string tokens = 5 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false]; + string operator_address = 1 [(gogoproto.moretags) = "yaml:\"operator_address\""]; + google.protobuf.Any consensus_pubkey = 2 + [(cosmos_proto.accepts_interface) = "cosmos.crypto.PubKey", (gogoproto.moretags) = "yaml:\"consensus_pubkey\""]; + bool jailed = 3; + BondStatus status = 4; + string tokens = 5 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false]; string delegator_shares = 6 [ (gogoproto.moretags) = "yaml:\"delegator_shares\"", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", @@ -177,8 +176,8 @@ message UnbondingDelegation { option (gogoproto.goproto_getters) = false; option (gogoproto.goproto_stringer) = false; - string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; - string validator_address = 2 [(gogoproto.moretags) = "yaml:\"validator_address\""]; + string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; + string validator_address = 2 [(gogoproto.moretags) = "yaml:\"validator_address\""]; repeated UnbondingDelegationEntry entries = 3 [(gogoproto.nullable) = false]; // unbonding delegation entries } @@ -222,10 +221,10 @@ message Redelegation { option (gogoproto.goproto_getters) = false; option (gogoproto.goproto_stringer) = false; - string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; - string validator_src_address = 2 [(gogoproto.moretags) = "yaml:\"validator_src_address\""]; - string validator_dst_address = 3 [(gogoproto.moretags) = "yaml:\"validator_dst_address\""]; - repeated RedelegationEntry entries = 4 [(gogoproto.nullable) = false]; // redelegation entries + string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; + string validator_src_address = 2 [(gogoproto.moretags) = "yaml:\"validator_src_address\""]; + string validator_dst_address = 3 [(gogoproto.moretags) = "yaml:\"validator_dst_address\""]; + repeated RedelegationEntry entries = 4 [(gogoproto.nullable) = false]; // redelegation entries } // Params defines the parameters for the staking module. @@ -268,8 +267,8 @@ message RedelegationEntryResponse { message RedelegationResponse { option (gogoproto.equal) = false; - Redelegation redelegation = 1 [(gogoproto.nullable) = false]; - repeated RedelegationEntryResponse entries = 2 [(gogoproto.nullable) = false]; + Redelegation redelegation = 1 [(gogoproto.nullable) = false]; + repeated RedelegationEntryResponse entries = 2 [(gogoproto.nullable) = false]; } // Pool is used for tracking bonded and not-bonded token supply of the bond diff --git a/proto/cosmos/staking/v1beta1/tx.proto b/proto/cosmos/staking/v1beta1/tx.proto index 389957091d..ffcd74b2d9 100644 --- a/proto/cosmos/staking/v1beta1/tx.proto +++ b/proto/cosmos/staking/v1beta1/tx.proto @@ -51,7 +51,7 @@ message MsgCreateValidator { } // MsgCreateValidatorResponse defines the Msg/CreateValidator response type. -message MsgCreateValidatorResponse { } +message MsgCreateValidatorResponse {} // MsgEditValidator defines a SDK message for editing an existing validator. message MsgEditValidator { @@ -77,7 +77,7 @@ message MsgEditValidator { } // MsgEditValidatorResponse defines the Msg/EditValidator response type. -message MsgEditValidatorResponse { } +message MsgEditValidatorResponse {} // MsgDelegate defines a SDK message for performing a delegation of coins // from a delegator to a validator. @@ -91,7 +91,7 @@ message MsgDelegate { } // MsgDelegateResponse defines the Msg/Delegate response type. -message MsgDelegateResponse { } +message MsgDelegateResponse {} // MsgBeginRedelegate defines a SDK message for performing a redelegation // of coins from a delegator and source validator to a destination validator. diff --git a/proto/cosmos/tx/signing/v1beta1/signing.proto b/proto/cosmos/tx/signing/v1beta1/signing.proto index 73c8596483..4c1be40594 100644 --- a/proto/cosmos/tx/signing/v1beta1/signing.proto +++ b/proto/cosmos/tx/signing/v1beta1/signing.proto @@ -37,43 +37,43 @@ message SignatureDescriptors { // signature itself. It is primarily used for coordinating signatures between // clients. message SignatureDescriptor { - // public_key is the public key of the signer - google.protobuf.Any public_key = 1; + // public_key is the public key of the signer + google.protobuf.Any public_key = 1; - Data data = 2; + Data data = 2; - // sequence is the sequence of the account, which describes the - // number of committed transactions signed by a given address. It is used to prevent - // replay attacks. - uint64 sequence = 3; + // sequence is the sequence of the account, which describes the + // number of committed transactions signed by a given address. It is used to prevent + // replay attacks. + uint64 sequence = 3; - // Data represents signature data - message Data { - // sum is the oneof that specifies whether this represents single or multi-signature data - oneof sum { - // single represents a single signer - Single single = 1; + // Data represents signature data + message Data { + // sum is the oneof that specifies whether this represents single or multi-signature data + oneof sum { + // single represents a single signer + Single single = 1; - // multi represents a multisig signer - Multi multi = 2; - } - - // Single is the signature data for a single signer - message Single { - // mode is the signing mode of the single signer - SignMode mode = 1; - - // signature is the raw signature bytes - bytes signature = 2; - } - - // Multi is the signature data for a multisig public key - message Multi { - // bitarray specifies which keys within the multisig are signing - cosmos.crypto.multisig.v1beta1.CompactBitArray bitarray = 1; - - // signatures is the signatures of the multi-signature - repeated Data signatures = 2; - } + // multi represents a multisig signer + Multi multi = 2; } + + // Single is the signature data for a single signer + message Single { + // mode is the signing mode of the single signer + SignMode mode = 1; + + // signature is the raw signature bytes + bytes signature = 2; + } + + // Multi is the signature data for a multisig public key + message Multi { + // bitarray specifies which keys within the multisig are signing + cosmos.crypto.multisig.v1beta1.CompactBitArray bitarray = 1; + + // signatures is the signatures of the multi-signature + repeated Data signatures = 2; + } + } } diff --git a/proto/cosmos/tx/v1beta1/service.proto b/proto/cosmos/tx/v1beta1/service.proto index 99cfbcd719..d78216d031 100644 --- a/proto/cosmos/tx/v1beta1/service.proto +++ b/proto/cosmos/tx/v1beta1/service.proto @@ -10,68 +10,68 @@ option go_package = "github.com/cosmos/cosmos-sdk/types/tx"; // Service defines a gRPC service for interacting with transactions. service Service { - // Simulate simulates executing a transaction for estimating gas usage. - rpc Simulate(SimulateRequest) returns (SimulateResponse) { - option (google.api.http).post = "/cosmos/tx/v1beta1/simulate"; - } - // GetTx fetches a tx by hash. - rpc GetTx(GetTxRequest) returns (GetTxResponse) { - option (google.api.http).get = "/cosmos/tx/v1beta1/tx/{hash}"; - } + // Simulate simulates executing a transaction for estimating gas usage. + rpc Simulate(SimulateRequest) returns (SimulateResponse) { + option (google.api.http).post = "/cosmos/tx/v1beta1/simulate"; + } + // GetTx fetches a tx by hash. + rpc GetTx(GetTxRequest) returns (GetTxResponse) { + option (google.api.http).get = "/cosmos/tx/v1beta1/tx/{hash}"; + } - // GetTxsEvent fetches txs by event. - rpc GetTxsEvent(GetTxsEventRequest) returns (GetTxsEventResponse) { - option (google.api.http).get = "/cosmos/tx/v1beta1/txs"; - } + // GetTxsEvent fetches txs by event. + rpc GetTxsEvent(GetTxsEventRequest) returns (GetTxsEventResponse) { + option (google.api.http).get = "/cosmos/tx/v1beta1/txs"; + } } // GetTxsEventRequest is the request type for the Service.TxsByEvents // RPC method. message GetTxsEventRequest { - // event is the transaction event type. - string event = 1; - // pagination defines an pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; + // event is the transaction event type. + string event = 1; + // pagination defines an pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 2; } // GetTxsEventResponse is the response type for the Service.TxsByEvents // RPC method. message GetTxsEventResponse { - // txs is the list of queried transactions. - repeated cosmos.tx.v1beta1.Tx txs = 1; - // tx_responses is the list of queried TxResponses. - repeated cosmos.base.abci.v1beta1.TxResponse tx_responses = 2; - // pagination defines an pagination for the response. - cosmos.base.query.v1beta1.PageResponse pagination = 3; + // txs is the list of queried transactions. + repeated cosmos.tx.v1beta1.Tx txs = 1; + // tx_responses is the list of queried TxResponses. + repeated cosmos.base.abci.v1beta1.TxResponse tx_responses = 2; + // pagination defines an pagination for the response. + cosmos.base.query.v1beta1.PageResponse pagination = 3; } // SimulateRequest is the request type for the Service.Simulate // RPC method. message SimulateRequest { - // tx is the transaction to simulate. - cosmos.tx.v1beta1.Tx tx = 1; + // tx is the transaction to simulate. + cosmos.tx.v1beta1.Tx tx = 1; } - + // SimulateResponse is the response type for the // Service.SimulateRPC method. message SimulateResponse { - // gas_info is the information about gas used in the simulation. - cosmos.base.abci.v1beta1.GasInfo gas_info = 1; - // result is the result of the simulation. - cosmos.base.abci.v1beta1.Result result = 2; + // gas_info is the information about gas used in the simulation. + cosmos.base.abci.v1beta1.GasInfo gas_info = 1; + // result is the result of the simulation. + cosmos.base.abci.v1beta1.Result result = 2; } // GetTxRequest is the request type for the Service.GetTx // RPC method. message GetTxRequest { - // hash is the tx hash to query, encoded as a hex string. - string hash = 1; + // hash is the tx hash to query, encoded as a hex string. + string hash = 1; } // GetTxResponse is the response type for the Service.GetTx method. message GetTxResponse { - // tx is the queried transaction. - cosmos.tx.v1beta1.Tx tx = 1; - // tx_response is the queried TxResponses. - cosmos.base.abci.v1beta1.TxResponse tx_response = 2; + // tx is the queried transaction. + cosmos.tx.v1beta1.Tx tx = 1; + // tx_response is the queried TxResponses. + cosmos.base.abci.v1beta1.TxResponse tx_response = 2; } \ No newline at end of file diff --git a/proto/cosmos/upgrade/v1beta1/upgrade.proto b/proto/cosmos/upgrade/v1beta1/upgrade.proto index 858634b2b2..826440e5d7 100644 --- a/proto/cosmos/upgrade/v1beta1/upgrade.proto +++ b/proto/cosmos/upgrade/v1beta1/upgrade.proto @@ -39,7 +39,8 @@ message Plan { // so that connecting chains can verify that the new upgraded client is valid by verifying a proof on the // previous version of the chain. // This will allow IBC connections to persist smoothly across planned chain upgrades - google.protobuf.Any upgraded_client_state = 5 [(gogoproto.moretags) = "yaml:\"upgraded_client_state\""];; + google.protobuf.Any upgraded_client_state = 5 [(gogoproto.moretags) = "yaml:\"upgraded_client_state\""]; + ; } // SoftwareUpgradeProposal is a gov Content type for initiating a software diff --git a/proto/cosmos/vesting/v1beta1/tx.proto b/proto/cosmos/vesting/v1beta1/tx.proto index 41873315c0..c49be802a7 100644 --- a/proto/cosmos/vesting/v1beta1/tx.proto +++ b/proto/cosmos/vesting/v1beta1/tx.proto @@ -6,7 +6,6 @@ import "cosmos/base/v1beta1/coin.proto"; option go_package = "github.com/cosmos/cosmos-sdk/x/auth/vesting/types"; - // Msg defines the bank Msg service. service Msg { // CreateVestingAccount defines a method that enables creating a vesting @@ -14,7 +13,6 @@ service Msg { rpc CreateVestingAccount(MsgCreateVestingAccount) returns (MsgCreateVestingAccountResponse); } - // MsgCreateVestingAccount defines a message that enables creating a vesting // account. message MsgCreateVestingAccount { @@ -30,4 +28,4 @@ message MsgCreateVestingAccount { } // MsgCreateVestingAccountResponse defines the Msg/CreateVestingAccount response type. -message MsgCreateVestingAccountResponse { } \ No newline at end of file +message MsgCreateVestingAccountResponse {} \ No newline at end of file diff --git a/proto/ibc/applications/transfer/v1/tx.proto b/proto/ibc/applications/transfer/v1/tx.proto index eb2e12e5df..a0f0827aaf 100644 --- a/proto/ibc/applications/transfer/v1/tx.proto +++ b/proto/ibc/applications/transfer/v1/tx.proto @@ -40,4 +40,4 @@ message MsgTransfer { } // MsgTransferResponse defines the Msg/Transfer response type. -message MsgTransferResponse { } +message MsgTransferResponse {} diff --git a/proto/ibc/core/channel/v1/genesis.proto b/proto/ibc/core/channel/v1/genesis.proto index 98a7e630aa..a89e69c7dd 100644 --- a/proto/ibc/core/channel/v1/genesis.proto +++ b/proto/ibc/core/channel/v1/genesis.proto @@ -8,11 +8,11 @@ import "ibc/core/channel/v1/channel.proto"; // GenesisState defines the ibc channel submodule's genesis state. message GenesisState { - repeated IdentifiedChannel channels = 1 [(gogoproto.casttype) = "IdentifiedChannel", (gogoproto.nullable) = false]; - repeated PacketState acknowledgements = 2 [(gogoproto.nullable) = false]; - repeated PacketState commitments = 3 [(gogoproto.nullable) = false]; - repeated PacketState receipts = 4 [(gogoproto.nullable) = false]; - repeated PacketSequence send_sequences = 5 + repeated IdentifiedChannel channels = 1 [(gogoproto.casttype) = "IdentifiedChannel", (gogoproto.nullable) = false]; + repeated PacketState acknowledgements = 2 [(gogoproto.nullable) = false]; + repeated PacketState commitments = 3 [(gogoproto.nullable) = false]; + repeated PacketState receipts = 4 [(gogoproto.nullable) = false]; + repeated PacketSequence send_sequences = 5 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"send_sequences\""]; repeated PacketSequence recv_sequences = 6 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"recv_sequences\""]; diff --git a/proto/ibc/core/channel/v1/query.proto b/proto/ibc/core/channel/v1/query.proto index 90d2adaea2..4121096240 100644 --- a/proto/ibc/core/channel/v1/query.proto +++ b/proto/ibc/core/channel/v1/query.proto @@ -37,8 +37,9 @@ service Query { // ChannelConsensusState queries for the consensus state for the channel // associated with the provided channel identifiers. rpc ChannelConsensusState(QueryChannelConsensusStateRequest) returns (QueryChannelConsensusStateResponse) { - option (google.api.http).get = "/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/consensus_state/version/" - "{version_number}/height/{version_height}"; + option (google.api.http).get = + "/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/consensus_state/version/" + "{version_number}/height/{version_height}"; } // PacketCommitment queries a stored packet commitment hash. @@ -55,21 +56,23 @@ service Query { // PacketReceipt queries if a given packet sequence has been received on the queried chain rpc PacketReceipt(QueryPacketReceiptRequest) returns (QueryPacketReceiptResponse) { - option (google.api.http).get = "/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_receipts/{sequence}"; + option (google.api.http).get = + "/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_receipts/{sequence}"; } // PacketAcknowledgement queries a stored packet acknowledgement hash. rpc PacketAcknowledgement(QueryPacketAcknowledgementRequest) returns (QueryPacketAcknowledgementResponse) { - option (google.api.http).get = "/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_acks/{sequence}"; + option (google.api.http).get = + "/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_acks/{sequence}"; } // PacketAcknowledgements returns all the packet acknowledgements associated // with a channel. rpc PacketAcknowledgements(QueryPacketAcknowledgementsRequest) returns (QueryPacketAcknowledgementsResponse) { - option (google.api.http).get = "/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_acknowledgements"; + option (google.api.http).get = + "/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_acknowledgements"; } - // UnreceivedPackets returns all the unreceived IBC packets associated with a // channel and sequences. rpc UnreceivedPackets(QueryUnreceivedPacketsRequest) returns (QueryUnreceivedPacketsResponse) { diff --git a/proto/ibc/core/client/v1/genesis.proto b/proto/ibc/core/client/v1/genesis.proto index 110140e232..b1c4247c94 100644 --- a/proto/ibc/core/client/v1/genesis.proto +++ b/proto/ibc/core/client/v1/genesis.proto @@ -9,17 +9,15 @@ import "gogoproto/gogo.proto"; // GenesisState defines the ibc client submodule's genesis state. message GenesisState { // client states with their corresponding identifiers - repeated IdentifiedClientState clients = 1 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "IdentifiedClientStates" - ]; + repeated IdentifiedClientState clients = 1 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "IdentifiedClientStates"]; // consensus states from each client repeated ClientConsensusStates clients_consensus = 2 [ (gogoproto.nullable) = false, (gogoproto.castrepeated) = "ClientsConsensusStates", (gogoproto.moretags) = "yaml:\"clients_consensus\"" ]; - Params params = 3 [ (gogoproto.nullable) = false]; + Params params = 3 [(gogoproto.nullable) = false]; // create localhost on initialization bool create_localhost = 4 [(gogoproto.moretags) = "yaml:\"create_localhost\""]; } diff --git a/proto/ibc/core/client/v1/query.proto b/proto/ibc/core/client/v1/query.proto index 038b97bc46..7a1bf50538 100644 --- a/proto/ibc/core/client/v1/query.proto +++ b/proto/ibc/core/client/v1/query.proto @@ -34,8 +34,8 @@ service Query { option (google.api.http).get = "/ibc/core/client/v1beta1/consensus_states/{client_id}"; } - // ClientParams queries all parameters of the ibc client. - rpc ClientParams(QueryClientParamsRequest) returns (QueryClientParamsResponse) { + // ClientParams queries all parameters of the ibc client. + rpc ClientParams(QueryClientParamsRequest) returns (QueryClientParamsResponse) { option (google.api.http).get = "/ibc/client/v1beta1/params"; } } @@ -70,10 +70,8 @@ message QueryClientStatesRequest { // method. message QueryClientStatesResponse { // list of stored ClientStates of the chain. - repeated IdentifiedClientState client_states = 1 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "IdentifiedClientStates" - ]; + repeated IdentifiedClientState client_states = 1 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "IdentifiedClientStates"]; // pagination response cosmos.base.query.v1beta1.PageResponse pagination = 2; } diff --git a/proto/ibc/core/client/v1/tx.proto b/proto/ibc/core/client/v1/tx.proto index efe843cba4..fd54a92108 100644 --- a/proto/ibc/core/client/v1/tx.proto +++ b/proto/ibc/core/client/v1/tx.proto @@ -39,7 +39,7 @@ message MsgCreateClient { } // MsgCreateClientResponse defines the Msg/CreateClient response type. -message MsgCreateClientResponse { } +message MsgCreateClientResponse {} // MsgUpdateClient defines an sdk.Msg to update a IBC client state using // the given header. @@ -56,7 +56,7 @@ message MsgUpdateClient { } // MsgUpdateClientResponse defines the Msg/UpdateClient response type. -message MsgUpdateClientResponse { } +message MsgUpdateClientResponse {} // MsgUpgradeClient defines an sdk.Msg to upgrade an IBC client to a new client state message MsgUpgradeClient { @@ -73,7 +73,7 @@ message MsgUpgradeClient { } // MsgUpgradeClientResponse defines the Msg/UpgradeClient response type. -message MsgUpgradeClientResponse { } +message MsgUpgradeClientResponse {} // MsgSubmitMisbehaviour defines an sdk.Msg type that submits Evidence for // light client misbehaviour. @@ -90,4 +90,4 @@ message MsgSubmitMisbehaviour { } // MsgSubmitMisbehaviourResponse defines the Msg/SubmitMisbehaviour response type. -message MsgSubmitMisbehaviourResponse { } +message MsgSubmitMisbehaviourResponse {} diff --git a/proto/ibc/core/commitment/v1/commitment.proto b/proto/ibc/core/commitment/v1/commitment.proto index 9e9d22f081..51c1027316 100644 --- a/proto/ibc/core/commitment/v1/commitment.proto +++ b/proto/ibc/core/commitment/v1/commitment.proto @@ -36,5 +36,5 @@ message MerklePath { // should be succinct. // MerkleProofs are ordered from leaf-to-root message MerkleProof { - repeated ics23.CommitmentProof proofs = 1; + repeated ics23.CommitmentProof proofs = 1; } \ No newline at end of file diff --git a/proto/ibc/core/connection/v1/tx.proto b/proto/ibc/core/connection/v1/tx.proto index 8de521886b..02a12b0e31 100644 --- a/proto/ibc/core/connection/v1/tx.proto +++ b/proto/ibc/core/connection/v1/tx.proto @@ -18,7 +18,7 @@ service Msg { // ConnectionOpenAck defines a rpc handler method for MsgConnectionOpenAck. rpc ConnectionOpenAck(MsgConnectionOpenAck) returns (MsgConnectionOpenAckResponse); - + // ConnectionOpenConfirm defines a rpc handler method for MsgConnectionOpenConfirm. rpc ConnectionOpenConfirm(MsgConnectionOpenConfirm) returns (MsgConnectionOpenConfirmResponse); } @@ -37,7 +37,7 @@ message MsgConnectionOpenInit { } // MsgConnectionOpenInitResponse defines the Msg/ConnectionOpenInit response type. -message MsgConnectionOpenInitResponse { } +message MsgConnectionOpenInitResponse {} // MsgConnectionOpenTry defines a msg sent by a Relayer to try to open a // connection on Chain B. @@ -48,9 +48,9 @@ message MsgConnectionOpenTry { string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; string desired_connection_id = 2 [(gogoproto.moretags) = "yaml:\"desired_connection_id\""]; string counterparty_chosen_connection_id = 3 [(gogoproto.moretags) = "yaml:\"counterparty_chosen_connection_id\""]; - google.protobuf.Any client_state = 4 [(gogoproto.moretags) = "yaml:\"client_state\""]; - Counterparty counterparty = 5 [(gogoproto.nullable) = false]; - repeated Version counterparty_versions = 6 [(gogoproto.moretags) = "yaml:\"counterparty_versions\""]; + google.protobuf.Any client_state = 4 [(gogoproto.moretags) = "yaml:\"client_state\""]; + Counterparty counterparty = 5 [(gogoproto.nullable) = false]; + repeated Version counterparty_versions = 6 [(gogoproto.moretags) = "yaml:\"counterparty_versions\""]; ibc.core.client.v1.Height proof_height = 7 [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; // proof of the initialization the connection on Chain A: `UNITIALIZED -> @@ -66,7 +66,7 @@ message MsgConnectionOpenTry { } // MsgConnectionOpenTryResponse defines the Msg/ConnectionOpenTry response type. -message MsgConnectionOpenTryResponse { } +message MsgConnectionOpenTryResponse {} // MsgConnectionOpenAck defines a msg sent by a Relayer to Chain A to // acknowledge the change of connection state to TRYOPEN on Chain B. @@ -93,7 +93,7 @@ message MsgConnectionOpenAck { } // MsgConnectionOpenAckResponse defines the Msg/ConnectionOpenAck response type. -message MsgConnectionOpenAckResponse { } +message MsgConnectionOpenAckResponse {} // MsgConnectionOpenConfirm defines a msg sent by a Relayer to Chain B to // acknowledge the change of connection state to OPEN on Chain A. @@ -110,4 +110,4 @@ message MsgConnectionOpenConfirm { } // MsgConnectionOpenConfirmResponse defines the Msg/ConnectionOpenConfirm response type. -message MsgConnectionOpenConfirmResponse { } +message MsgConnectionOpenConfirmResponse {} diff --git a/scripts/protocgen-any.sh b/scripts/protocgen-any.sh index 83ee1fe70d..2a094265d3 100755 --- a/scripts/protocgen-any.sh +++ b/scripts/protocgen-any.sh @@ -8,8 +8,8 @@ set -eo pipefail go install github.com/gogo/protobuf/protoc-gen-gogotypes -buf protoc -I. --gogotypes_out=./codec/types third_party/proto/google/protobuf/any.proto -mv codec/types/third_party/proto/google/protobuf/any.pb.go codec/types +buf protoc -I "third_party/proto" --gogotypes_out=./codec/types third_party/proto/google/protobuf/any.proto +mv codec/types/google/protobuf/any.pb.go codec/types rm -rf codec/types/third_party # This removes the call to RegisterType in the custom generated Any wrapper diff --git a/testutil/testdata/query.proto b/testutil/testdata/query.proto index 0090b4fca8..3a60acaad1 100644 --- a/testutil/testdata/query.proto +++ b/testutil/testdata/query.proto @@ -9,31 +9,31 @@ option go_package = "github.com/cosmos/cosmos-sdk/testutil/testdata"; // Query tests the protobuf Query service as defined in // https://github.com/cosmos/cosmos-sdk/issues/5921. service Query { - rpc Echo(EchoRequest) returns (EchoResponse); - rpc SayHello(SayHelloRequest) returns (SayHelloResponse); - rpc TestAny(TestAnyRequest) returns (TestAnyResponse); + rpc Echo(EchoRequest) returns (EchoResponse); + rpc SayHello(SayHelloRequest) returns (SayHelloResponse); + rpc TestAny(TestAnyRequest) returns (TestAnyResponse); } message EchoRequest { - string message = 1; + string message = 1; } message EchoResponse { - string message = 1; + string message = 1; } message SayHelloRequest { - string name = 1; + string name = 1; } message SayHelloResponse { - string greeting = 1; + string greeting = 1; } message TestAnyRequest { - google.protobuf.Any any_animal = 1; + google.protobuf.Any any_animal = 1; } message TestAnyResponse { - testdata.HasAnimal has_animal = 1; + testdata.HasAnimal has_animal = 1; } diff --git a/testutil/testdata/tx.proto b/testutil/testdata/tx.proto index 8f670fc50e..eaeb9580e5 100644 --- a/testutil/testdata/tx.proto +++ b/testutil/testdata/tx.proto @@ -9,20 +9,20 @@ option go_package = "github.com/cosmos/cosmos-sdk/testutil/testdata"; // Msg tests the Protobuf message service as defined in // https://github.com/cosmos/cosmos-sdk/issues/7500. service Msg { - rpc CreateDog(MsgCreateDog) returns (MsgCreateDogResponse); + rpc CreateDog(MsgCreateDog) returns (MsgCreateDogResponse); } message MsgCreateDog { - testdata.Dog dog = 1; + testdata.Dog dog = 1; } message MsgCreateDogResponse { - string name = 1; + string name = 1; } // TestMsg is msg type for testing protobuf message using any, as defined in // https://github.com/cosmos/cosmos-sdk/issues/6213. message TestMsg { - option (gogoproto.goproto_getters) = false; - repeated string signers = 1; + option (gogoproto.goproto_getters) = false; + repeated string signers = 1; } diff --git a/testutil/testdata/unknonwnproto.proto b/testutil/testdata/unknonwnproto.proto index a11773f92e..7bf1ce6bba 100644 --- a/testutil/testdata/unknonwnproto.proto +++ b/testutil/testdata/unknonwnproto.proto @@ -42,8 +42,8 @@ message Nested4A { } message Nested3A { - int32 id = 1; - string name = 2; + int32 id = 1; + string name = 2; repeated Nested4A a4 = 4; map index = 5; } @@ -66,10 +66,10 @@ message Nested4B { } message Nested3B { - int32 id = 1; - int32 age = 2; - string name = 3; - repeated Nested4B b4 = 4; + int32 id = 1; + int32 age = 2; + string name = 3; + repeated Nested4B b4 = 4; } message Nested2B { @@ -101,32 +101,32 @@ message Customer3 { } message TestVersion1 { - int64 x = 1; - TestVersion1 a = 2; - TestVersion1 b = 3; // [(gogoproto.nullable) = false] generates invalid recursive structs; + int64 x = 1; + TestVersion1 a = 2; + TestVersion1 b = 3; // [(gogoproto.nullable) = false] generates invalid recursive structs; repeated TestVersion1 c = 4; repeated TestVersion1 d = 5 [(gogoproto.nullable) = false]; oneof sum { int32 e = 6; TestVersion1 f = 7; } - google.protobuf.Any g = 8; + google.protobuf.Any g = 8; repeated TestVersion1 h = 9; // [(gogoproto.castrepeated) = "TestVersion1"]; // google.protobuf.Timestamp i = 10; // google.protobuf.Timestamp j = 11; // [(gogoproto.stdtime) = true]; Customer1 k = 12 [(gogoproto.embed) = true]; } message TestVersion2 { - int64 x = 1; - TestVersion2 a = 2; - TestVersion2 b = 3; // [(gogoproto.nullable) = false]; + int64 x = 1; + TestVersion2 a = 2; + TestVersion2 b = 3; // [(gogoproto.nullable) = false]; repeated TestVersion2 c = 4; repeated TestVersion2 d = 5; // [(gogoproto.nullable) = false]; oneof sum { int32 e = 6; TestVersion2 f = 7; } - google.protobuf.Any g = 8; + google.protobuf.Any g = 8; repeated TestVersion1 h = 9; // [(gogoproto.castrepeated) = "TestVersion1"]; // google.protobuf.Timestamp i = 10; // google.protobuf.Timestamp j = 11; // [(gogoproto.stdtime) = true]; @@ -134,16 +134,16 @@ message TestVersion2 { uint64 new_field = 25; } message TestVersion3 { - int64 x = 1; - TestVersion3 a = 2; - TestVersion3 b = 3; // [(gogoproto.nullable) = false]; + int64 x = 1; + TestVersion3 a = 2; + TestVersion3 b = 3; // [(gogoproto.nullable) = false]; repeated TestVersion3 c = 4; repeated TestVersion3 d = 5; // [(gogoproto.nullable) = false]; oneof sum { int32 e = 6; TestVersion3 f = 7; } - google.protobuf.Any g = 8; + google.protobuf.Any g = 8; repeated TestVersion1 h = 9; //[(gogoproto.castrepeated) = "TestVersion1"]; // google.protobuf.Timestamp i = 10; // google.protobuf.Timestamp j = 11; // [(gogoproto.stdtime) = true]; @@ -152,15 +152,15 @@ message TestVersion3 { } message TestVersion3LoneOneOfValue { - int64 x = 1; - TestVersion3 a = 2; - TestVersion3 b = 3; // [(gogoproto.nullable) = false]; + int64 x = 1; + TestVersion3 a = 2; + TestVersion3 b = 3; // [(gogoproto.nullable) = false]; repeated TestVersion3 c = 4; repeated TestVersion3 d = 5; // [(gogoproto.nullable) = false]; oneof sum { int32 e = 6; } - google.protobuf.Any g = 8; + google.protobuf.Any g = 8; repeated TestVersion1 h = 9; //[(gogoproto.castrepeated) = "TestVersion1"]; // google.protobuf.Timestamp i = 10; // google.protobuf.Timestamp j = 11; // [(gogoproto.stdtime) = true]; @@ -169,15 +169,15 @@ message TestVersion3LoneOneOfValue { } message TestVersion3LoneNesting { - int64 x = 1; - TestVersion3 a = 2; - TestVersion3 b = 3; // [(gogoproto.nullable) = false]; + int64 x = 1; + TestVersion3 a = 2; + TestVersion3 b = 3; // [(gogoproto.nullable) = false]; repeated TestVersion3 c = 4; repeated TestVersion3 d = 5; // [(gogoproto.nullable) = false]; oneof sum { TestVersion3LoneNesting f = 7; } - google.protobuf.Any g = 8; + google.protobuf.Any g = 8; repeated TestVersion1 h = 9; //[(gogoproto.castrepeated) = "TestVersion1"]; // google.protobuf.Timestamp i = 10; // google.protobuf.Timestamp j = 11; // [(gogoproto.stdtime) = true]; @@ -210,15 +210,15 @@ message TestVersion3LoneNesting { } message TestVersion4LoneNesting { - int64 x = 1; - TestVersion3 a = 2; - TestVersion3 b = 3; // [(gogoproto.nullable) = false]; + int64 x = 1; + TestVersion3 a = 2; + TestVersion3 b = 3; // [(gogoproto.nullable) = false]; repeated TestVersion3 c = 4; repeated TestVersion3 d = 5; // [(gogoproto.nullable) = false]; oneof sum { TestVersion3LoneNesting f = 7; } - google.protobuf.Any g = 8; + google.protobuf.Any g = 8; repeated TestVersion1 h = 9; //[(gogoproto.castrepeated) = "TestVersion1"]; // google.protobuf.Timestamp i = 10; // google.protobuf.Timestamp j = 11; // [(gogoproto.stdtime) = true]; @@ -257,7 +257,7 @@ message TestVersionFD1 { int32 e = 6; TestVersion1 f = 7; } - google.protobuf.Any g = 8; + google.protobuf.Any g = 8; repeated TestVersion1 h = 9; // [(gogoproto.castrepeated) = "TestVersion1"]; } @@ -268,7 +268,7 @@ message TestVersionFD1WithExtraAny { int32 e = 6; TestVersion1 f = 7; } - AnyWithExtra g = 8; + AnyWithExtra g = 8; repeated TestVersion1 h = 9; // [(gogoproto.castrepeated) = "TestVersion1"]; } @@ -279,11 +279,11 @@ message AnyWithExtra { } message TestUpdatedTxRaw { - bytes body_bytes = 1; - bytes auth_info_bytes = 2; - repeated bytes signatures = 3; - bytes new_field_5 = 5; - bytes new_field_1024 = 1024; + bytes body_bytes = 1; + bytes auth_info_bytes = 2; + repeated bytes signatures = 3; + bytes new_field_5 = 5; + bytes new_field_1024 = 1024; } message TestUpdatedTxBody { From 7e6978ae551bbed439c69178184dea0a25d0e747 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?colin=20axn=C3=A9r?= <25233464+colin-axner@users.noreply.github.com> Date: Fri, 13 Nov 2020 20:01:33 +0100 Subject: [PATCH 101/136] ibc: tendermint misbehaviour should use block hash for equality check (#7928) * check block hash equality * update err msg * valid commit now uses block id hash Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com> --- x/ibc/light-clients/07-tendermint/types/misbehaviour.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/x/ibc/light-clients/07-tendermint/types/misbehaviour.go b/x/ibc/light-clients/07-tendermint/types/misbehaviour.go index 3e604e0f91..85fb615e5e 100644 --- a/x/ibc/light-clients/07-tendermint/types/misbehaviour.go +++ b/x/ibc/light-clients/07-tendermint/types/misbehaviour.go @@ -1,6 +1,7 @@ package types import ( + "bytes" "math" "time" @@ -107,8 +108,8 @@ func (misbehaviour Misbehaviour) ValidateBasic() error { } // Ensure that Commit Hashes are different - if blockID1.Equals(*blockID2) { - return sdkerrors.Wrap(clienttypes.ErrInvalidMisbehaviour, "headers blockIDs are equal") + if bytes.Equal(blockID1.Hash, blockID2.Hash) { + return sdkerrors.Wrap(clienttypes.ErrInvalidMisbehaviour, "headers block hashes are equal") } if err := ValidCommit(misbehaviour.Header1.Header.ChainID, misbehaviour.Header1.Commit, misbehaviour.Header1.ValidatorSet); err != nil { return err @@ -145,8 +146,8 @@ func ValidCommit(chainID string, commit *tmproto.Commit, valSet *tmproto.Validat blockID, ok := voteSet.TwoThirdsMajority() - // Check that ValidatorSet did indeed commit to blockID in Commit - if !ok || !blockID.Equals(tmCommit.BlockID) { + // Check that ValidatorSet did indeed commit to blockID hash in Commit + if !ok || !bytes.Equal(blockID.Hash, tmCommit.BlockID.Hash) { return sdkerrors.Wrap(clienttypes.ErrInvalidMisbehaviour, "validator set did not commit to header") } From 2802529eeb468077f92fd920ac48bb63a9a47859 Mon Sep 17 00:00:00 2001 From: Alessio Treglia Date: Sat, 14 Nov 2020 14:44:07 +0000 Subject: [PATCH 102/136] prune testdata (#7937) Remove cruft leftover. --- .../00ddf62001f91b9aaf7758fb727bea3932bb236e.address | 1 - .../252b5fe0336e82b269d1c26e379b11b54474f57a.address | 1 - .../43ca6f8e891fd1ef46a28d67c9be33ffecd8a6f8.address | 1 - .../454b29a63587e58ce2487836d90bda016c6fff7c.address | 1 - .../900b3a0b8932e443b60fd6273cc3026aa25116c8.address | 1 - .../9a85abde78d0e55e7650f11dcfdbb6bd131038d0.address | 1 - client/keys/keyring-test/keyname1.info | 1 - client/keys/keyring-test/keyname2.info | 1 - client/keys/keyring-test/keyname4.info | 1 - client/keys/keyring-test/keyname5.info | 1 - client/keys/keyring-test/keyname6.info | 1 - client/keys/keyring-test/keyname7.info | 1 - 12 files changed, 12 deletions(-) delete mode 100644 client/keys/keyring-test/00ddf62001f91b9aaf7758fb727bea3932bb236e.address delete mode 100644 client/keys/keyring-test/252b5fe0336e82b269d1c26e379b11b54474f57a.address delete mode 100644 client/keys/keyring-test/43ca6f8e891fd1ef46a28d67c9be33ffecd8a6f8.address delete mode 100644 client/keys/keyring-test/454b29a63587e58ce2487836d90bda016c6fff7c.address delete mode 100644 client/keys/keyring-test/900b3a0b8932e443b60fd6273cc3026aa25116c8.address delete mode 100644 client/keys/keyring-test/9a85abde78d0e55e7650f11dcfdbb6bd131038d0.address delete mode 100644 client/keys/keyring-test/keyname1.info delete mode 100644 client/keys/keyring-test/keyname2.info delete mode 100644 client/keys/keyring-test/keyname4.info delete mode 100644 client/keys/keyring-test/keyname5.info delete mode 100644 client/keys/keyring-test/keyname6.info delete mode 100644 client/keys/keyring-test/keyname7.info diff --git a/client/keys/keyring-test/00ddf62001f91b9aaf7758fb727bea3932bb236e.address b/client/keys/keyring-test/00ddf62001f91b9aaf7758fb727bea3932bb236e.address deleted file mode 100644 index f53c291b43..0000000000 --- a/client/keys/keyring-test/00ddf62001f91b9aaf7758fb727bea3932bb236e.address +++ /dev/null @@ -1 +0,0 @@ -eyJhbGciOiJQQkVTMi1IUzI1NitBMTI4S1ciLCJjcmVhdGVkIjoiMjAyMC0xMC0wOCAxMzowNjozOC45MTAzNTggLTA0MDAgRURUIG09KzAuMDUwMTczMjM4IiwiZW5jIjoiQTI1NkdDTSIsInAyYyI6ODE5MiwicDJzIjoiT25IN1lscERZSHZUVFFQcCJ9.27X3naS_OL75csQLEIFoPvvCyYb9R4D573z1Z1obm3TRGn4HyPFN_w.GXNcqKAUkxqM537Q.cT169l1KGKeOra6NXHbx3kEOEDw77Lom-42mwKV0bRQ_5WZU3kG5o6Ix14r7LFL1ajjc8rdXkuiUgKQyVXEXVpo-6WkEfk2-D_CQaaUgq0-UErT-9Pj7djI3FZkPPG-yxlVSiQXB1xMk38I_AxYwAakctpwHlEK_YC0-UycFmk25Qjezar_ni69KDRPyuqCYh3dyhimG6LgdpWF4pQHjtZPy5qIqcaE7TR0OeKvf9MtsaKEzpAQOeAvh.WbbZ_Fs8qk9rsN6FuWa2zg \ No newline at end of file diff --git a/client/keys/keyring-test/252b5fe0336e82b269d1c26e379b11b54474f57a.address b/client/keys/keyring-test/252b5fe0336e82b269d1c26e379b11b54474f57a.address deleted file mode 100644 index 4e99364230..0000000000 --- a/client/keys/keyring-test/252b5fe0336e82b269d1c26e379b11b54474f57a.address +++ /dev/null @@ -1 +0,0 @@ -eyJhbGciOiJQQkVTMi1IUzI1NitBMTI4S1ciLCJjcmVhdGVkIjoiMjAyMC0xMC0wOCAxMjo1MDoxOC4yMzA4ODggLTA0MDAgRURUIG09KzAuMTYxMTg1Nzk2IiwiZW5jIjoiQTI1NkdDTSIsInAyYyI6ODE5MiwicDJzIjoiU3ZNM1hfZU42VHhpSVg3aiJ9.BjL9xqItRueA3u4ujcWPTp4TJjO6w4NeR9G7p32ndo63ADDGJ7j1JQ.8Fd_XM52yxKhF31U.7Cm3SBAmp0u4QffFwBgeueuU3rWT1npSKI5CUROX5COgKbDpqj5CaT54k6UGeZiUxv8itQXglUpAsg7XsF-1LjbbUAfVxXe9H9n1GcfxrLov0L8_Ia-5JadXMXkbvv9jKyjhVg6kSziQXoHcHaeauF1X0_ij3a-UVH87cLqsdAI_OXtptyU8GonVyt_Q0n8mljonjZhj2c_bmXmHARYXZOmCj52dmzSpmkyQ9vqdhlRPco93-JWR5P1V.5J7fb71-1WKJ91g02D0JGg \ No newline at end of file diff --git a/client/keys/keyring-test/43ca6f8e891fd1ef46a28d67c9be33ffecd8a6f8.address b/client/keys/keyring-test/43ca6f8e891fd1ef46a28d67c9be33ffecd8a6f8.address deleted file mode 100644 index d03cbd2cbc..0000000000 --- a/client/keys/keyring-test/43ca6f8e891fd1ef46a28d67c9be33ffecd8a6f8.address +++ /dev/null @@ -1 +0,0 @@ -eyJhbGciOiJQQkVTMi1IUzI1NitBMTI4S1ciLCJjcmVhdGVkIjoiMjAyMC0xMC0wOCAxMjo1MzoyMy4yNjI0NzEgLTA0MDAgRURUIG09KzAuMDc2MzQ4MjA5IiwiZW5jIjoiQTI1NkdDTSIsInAyYyI6ODE5MiwicDJzIjoiTE02SnY0RUdZNHBPLTQxWSJ9.wsqaCPHz_PlOH4_B3QlKT_4N9nTEjMzqn_Rqjq2ZM3vzf1dTO1_gjA.WVEaKSvNNWJ3ZaTT.eWrtCGCCplDULPw1QEyijVO_totUT5-6yx-TK4KP_BdKmhdEG8Bm319dXU33BchHthFa2VxDyB4NH_hsUenErJSKIJgJGoVc_AMwqrVZr0Wg0qJaay7jRGh1IRNXc0cuEsNpEek1C31tNaXjD2IuJzkicwdDT3BARFLFFdRhY97LG83YTvX0gVKyJFfjx8TAgUHZgpYyJMI4_vVajnneI-v1SYCY_VMbFTaCqWKFZdYOhu3x-hXfFBww.rxnMJbBz5OU4itr8nuyZgA \ No newline at end of file diff --git a/client/keys/keyring-test/454b29a63587e58ce2487836d90bda016c6fff7c.address b/client/keys/keyring-test/454b29a63587e58ce2487836d90bda016c6fff7c.address deleted file mode 100644 index 12fc44167b..0000000000 --- a/client/keys/keyring-test/454b29a63587e58ce2487836d90bda016c6fff7c.address +++ /dev/null @@ -1 +0,0 @@ -eyJhbGciOiJQQkVTMi1IUzI1NitBMTI4S1ciLCJjcmVhdGVkIjoiMjAyMC0xMC0wOCAxMjo1MDoxOC4yNDQwMTEgLTA0MDAgRURUIG09KzAuMTc0MzMxMjAxIiwiZW5jIjoiQTI1NkdDTSIsInAyYyI6ODE5MiwicDJzIjoiYmlQLXR5Mnlvc3U2aHBvLSJ9.3drCmgYTeqS3PohaYKQc7i1fyjtOMuEPu_pDqMpT0UStPNDxG_LUDg.VS6Au9HoIruV0RiE._2BmFif-VbT_x4OD1NfsOCVFdL2MZfsG645SkptEKZAncOwHkKmWnBlKiV_LwnNzRBh-9eGGsCGfyou3zjUQRMDDHJOuW2EaVNmufmBWcAb9UoNO8O5kzPHwIvNqqJo5TQyjOviKCoP2PVcJXAwzttqDOw71B-9OuPwt_Ed4G6u8evwGIe08CzV6CKVImzj-AQg-1UI-uL06yFIEJ6CzB1DMdPR0qDQddP8pSYR_RTHnEUsii7HeKK1O.jqlYm4IZhXqe1k5kBQtguA \ No newline at end of file diff --git a/client/keys/keyring-test/900b3a0b8932e443b60fd6273cc3026aa25116c8.address b/client/keys/keyring-test/900b3a0b8932e443b60fd6273cc3026aa25116c8.address deleted file mode 100644 index 4f49e8bddd..0000000000 --- a/client/keys/keyring-test/900b3a0b8932e443b60fd6273cc3026aa25116c8.address +++ /dev/null @@ -1 +0,0 @@ -eyJhbGciOiJQQkVTMi1IUzI1NitBMTI4S1ciLCJjcmVhdGVkIjoiMjAyMC0xMC0wOCAxMjo1MDoxOC4yMDQ1NjYgLTA0MDAgRURUIG09KzAuMTM0ODY0MzE4IiwiZW5jIjoiQTI1NkdDTSIsInAyYyI6ODE5MiwicDJzIjoidjVpMzRMY3NNbXduakEyMiJ9.XTokiwtSrKOIGREG7P7uaSfcV3hEr2ANHVUwaKbvLbuQVlTQO8fALw.bldSMLqfirE4GM9S.kNlvEojt1cavNW-nCaxX-Qk3tNm09xtXbuKppWbmMBUCf-_p-U_TWsnHuKbLon47RH1lxomrc1RpcfXwWhDEsGLwibtsjRdxz_2DGh124jeKOr4-Bl2raoPWdHKimm_cf5Ve17ChFfVy1AOaXwIr97ZdGWSU0FP8hOvv5_z5iUsuMK9T0DLxjz0162-_xSQMWWl4-hLknHz-QdO3oR_FpYo2K2eucNaFKmcN5Rn4s2n8FYLU9dIcopUF.WpNuRheBDoTiv3rK95yNjA \ No newline at end of file diff --git a/client/keys/keyring-test/9a85abde78d0e55e7650f11dcfdbb6bd131038d0.address b/client/keys/keyring-test/9a85abde78d0e55e7650f11dcfdbb6bd131038d0.address deleted file mode 100644 index 9110d23a6b..0000000000 --- a/client/keys/keyring-test/9a85abde78d0e55e7650f11dcfdbb6bd131038d0.address +++ /dev/null @@ -1 +0,0 @@ -eyJhbGciOiJQQkVTMi1IUzI1NitBMTI4S1ciLCJjcmVhdGVkIjoiMjAyMC0xMC0wOCAxMjo1MDoxOC4yMjAyOSAtMDQwMCBFRFQgbT0rMC4xNTA1ODc4MjYiLCJlbmMiOiJBMjU2R0NNIiwicDJjIjo4MTkyLCJwMnMiOiJJYXRUWEFMVjBfeXV2ZnNMIn0.kCXD6XXDHeBiXR-GqF10fbMWBvy3qe38r16b92Xu3oLpA5c0a6ByMg.ONW9ggBJFhdfIA8M.IWm_ioQqOCLSK3FbSwjAlEVtzRR4AAW7ceIXpKzv_voaCGDNgcr7xSyRR5N-YK-sVYInwUDrme8rb5T14mjcsNgoGdKKB2QXuApY-GcPwpe2Tf7TyiCxFp91VotHnrbjCh1NvWnjDC-SZNm8HDVolkYtiBPkIkk0uFGh35WWprkVpgEYFyNIFQ0PP3XD4D9A58X0UXdGEu5Q8VcJnt1p86XUyI1le_LufJUrWAz3o_89n3xKj-b6sYzQ.KZSIrdNzE97BxrTSNkMkTw \ No newline at end of file diff --git a/client/keys/keyring-test/keyname1.info b/client/keys/keyring-test/keyname1.info deleted file mode 100644 index 6da5735e6e..0000000000 --- a/client/keys/keyring-test/keyname1.info +++ /dev/null @@ -1 +0,0 @@ -eyJhbGciOiJQQkVTMi1IUzI1NitBMTI4S1ciLCJjcmVhdGVkIjoiMjAyMC0xMC0wOCAxMzowNjozOC45MDMwMjcgLTA0MDAgRURUIG09KzAuMDQyODQyNTY4IiwiZW5jIjoiQTI1NkdDTSIsInAyYyI6ODE5MiwicDJzIjoiSjBxN2Zza0pGRUJJR25mYSJ9.W91-I2lpaBfacsUO2Xn2_tCadqztjGX7MjAkA6GKL4uMkqjEHDXyhw.c8uKD9z5w-jpSmq1.XGnt9JaOg0VT1cjg4RAlwC6Bsq9KowSF6wM6Ak1Y16Kq4sV3NnwA4CqJKnluIjAG6D4sfBKEs2FCHy5zux4uaOQ3Y5EJjRxWoTdBP7HahmO2-jsSFX_sPIzr86KIlKIqaYFJAOUqvaObOsQkX3EL_2-vDonSRMz32abg8thFS6mNi7NtM4xGXQ5Knrix-6OgzBmvWbn4Y0v82vNNWh8d4ubKf_RSEBV7CIWfuFg2CxfRq5EbUUmtMINF74eG52F8y8zjTDcn6n3qKLcecdr6s0n1tc7iq-f3s1EHnzPefwROPLFxiq0Zyt7N7vZCSowOElYZtgQWEg0dy6CIyZ274gNPlfLXMHA-kUsZj4Q_3w.sUPc7D8bBR4I3S-njXa4Ww \ No newline at end of file diff --git a/client/keys/keyring-test/keyname2.info b/client/keys/keyring-test/keyname2.info deleted file mode 100644 index bc7b594c5a..0000000000 --- a/client/keys/keyring-test/keyname2.info +++ /dev/null @@ -1 +0,0 @@ -eyJhbGciOiJQQkVTMi1IUzI1NitBMTI4S1ciLCJjcmVhdGVkIjoiMjAyMC0xMC0wOCAxMjo1MzoyMy4yNTg0OTUgLTA0MDAgRURUIG09KzAuMDcyMzcyNTM1IiwiZW5jIjoiQTI1NkdDTSIsInAyYyI6ODE5MiwicDJzIjoiTW1XOFlVU0Nia2JUNW9iSSJ9.JyBrlPAvgtgYWwu0rcfTn6k9qvv6DywUotcWxPUiJncCBue2WPC5cQ.CmWeu5wMFFinUfiE.FA9k3Q_W8mBgSuJRkYV8h_U5YR2mDmW595L4DnFzuSFJ19Us0O1SQF9-xPJQAyjh4jli46o5mfFfsmU0ce1h4HwklW7AdrRJXVXZ0reZLjrdiojCbLvzyM9tsWInRXi6izUcwLggv2lNCXP5UIRpjMpUPiEC4GsHiwNH8qN04_feICxHuSWJ4mKLWEDtgKxHTrBqvaHT304UF6gRD-_W9_hWdEIj66-5HE4jlxcJAe22WdoF2Z1c3ujhm4piSfHaNnWYsZHLI5Jy1WhkFC2eULOe31c6eAeik5DyUUdWKvAoSiEk4H0Z9EcSbNzlW2rrU30WIIb-icK1qLID21WYurbxM8zvXl-CvhSM2VRN1g.tu_usvTlCOy3okBKmC6zHg \ No newline at end of file diff --git a/client/keys/keyring-test/keyname4.info b/client/keys/keyring-test/keyname4.info deleted file mode 100644 index 2a198cd917..0000000000 --- a/client/keys/keyring-test/keyname4.info +++ /dev/null @@ -1 +0,0 @@ -eyJhbGciOiJQQkVTMi1IUzI1NitBMTI4S1ciLCJjcmVhdGVkIjoiMjAyMC0xMC0wOCAxMjo1MDoxOC4xOTkwMDUgLTA0MDAgRURUIG09KzAuMTI5MzA0MDMxIiwiZW5jIjoiQTI1NkdDTSIsInAyYyI6ODE5MiwicDJzIjoiYzVYM09VdTBtQmJ4TFd4ayJ9.Pa4p1u-9N9x4E9-5rjUlReLsfH3TvTfAw-Dr1iV8z5ccAfnqLY1UWQ.Q41_cYh4c-C2zi3v.aFna4CwpZeGQBI2_ecOzlJSKypCV0NLCD8PCOnpYvY-k-HqoUFSeouFbuKeN9VaIo12JSZmjzGhfCAupZDBcSJisLVHOvaBAjl5XCOa8k49jb-aSopMI4HXQWatBJcnM65p9Hl1JrYOcnoKPxNKzJ4PiPQnHKv_VgAvWU_CBt6nnSjkwwVJjPMobgvNzeQTEFq-4pyziJNDbDWKUrQSrc-VaO-31JBlhpu6dPOJPFsnOcMyPc76po5cAQQdog-g79d59_Y4vj8s7qd-YPCHnWmoCbgf9w8vbpmJ4Y9evXZQz8A0-c0rFX7F96aZBYtQOeC1ZpRi0BMsbs_WHrpdN678HXej6YpfNDijQmiNYzQ.ayDBvX4W6GiGxAjN3ch8DA \ No newline at end of file diff --git a/client/keys/keyring-test/keyname5.info b/client/keys/keyring-test/keyname5.info deleted file mode 100644 index 5c9bbe4e97..0000000000 --- a/client/keys/keyring-test/keyname5.info +++ /dev/null @@ -1 +0,0 @@ -eyJhbGciOiJQQkVTMi1IUzI1NitBMTI4S1ciLCJjcmVhdGVkIjoiMjAyMC0xMC0wOCAxMjo1MDoxOC4yMTYwNTkgLTA0MDAgRURUIG09KzAuMTQ2MzU3MTI5IiwiZW5jIjoiQTI1NkdDTSIsInAyYyI6ODE5MiwicDJzIjoidmNnOXNfXzFvY0N1ZC1YTCJ9.hQ21Z1cXTw925V8Xxm_Gywb05S92rKEX54tnELv16xZvkgV8XiEj9A.4Wnaa4LemIi3bdIT.kEJyzWUvmLof5_bYbDePbrYyfjyqTLuUIOdnom3igOuwfzFDHtPuEb3rSLKjxj7LgJOmZVqZGP_ihW1sJQPXbK7ZuWA4zH_Wf-n5T8CFDmNIUhlUIb6sfd_ze-s45CE58hjKRkp7b5k61xBnMujZ5KC5Vk_JHUOUyZB5SqhTuEUJDjSSCFnMDJ1UYKEp23U__XFwcZonent4IMfM0fWvmA6NC2h0qLAMcKw9hbJ_yyNHt2I3lI5twthsAOsXKxUkjhx7c9Tc7BnttFxq-puD_QyjReExP77DzuueDJ-5KBd8PMgeiQMHoYM8e2NAAJU7MXe7voB-D8Ki2QcEgH7GfHNcr6vP1by3hvV5M32OXg.ifBDbtRjrXBOdH_jEORHgw \ No newline at end of file diff --git a/client/keys/keyring-test/keyname6.info b/client/keys/keyring-test/keyname6.info deleted file mode 100644 index f193785ba6..0000000000 --- a/client/keys/keyring-test/keyname6.info +++ /dev/null @@ -1 +0,0 @@ -eyJhbGciOiJQQkVTMi1IUzI1NitBMTI4S1ciLCJjcmVhdGVkIjoiMjAyMC0xMC0wOCAxMjo1MDoxOC4yMjY1OTEgLTA0MDAgRURUIG09KzAuMTU2ODg5MTU0IiwiZW5jIjoiQTI1NkdDTSIsInAyYyI6ODE5MiwicDJzIjoiNUtTSWJtdGhCVHVSUnRjYyJ9.qD2C7cQK5P0EHy2Yr-uQZzMHep6U6n57z2LwWTmgxQp6m7ujLw-C-g.rmsltoJfFO4e56RZ.IDpVmduqe2WgyepT_-paXzcosHQzK6sfKY9JH16lT4QRVJ_lAozQOyZrW3X5MbgefrmtXGsoEIEFYhTDYBtXxrW7IqLaBhSCiA5MVwR403H3C2NkcygdGDdR-uDQGW3_bp7xnOhVL_3ofu0-7MQMMhZyz_wEmVW-aG7F6lN68TPaO5KTIqfnI8vOJyyZsSgB0M0gA3f-P4aar64YDTUdjgXPOSBkyRZr07JIOauGhTFXwmHWsDVBvGo3aIIx9ybAg_Blgo8ZAPqOJ6EYmA3J5RE2_LkfJjgI8dEpIFaviBHeWrG54AAN0klQ7trq9MOCpUGPc7PqySwiwTmxb2g4kFH9fR_yQ-g5g6mjj3JYVA.GRnNxd28SYmRt1I9twptPw \ No newline at end of file diff --git a/client/keys/keyring-test/keyname7.info b/client/keys/keyring-test/keyname7.info deleted file mode 100644 index 7b09ba0a78..0000000000 --- a/client/keys/keyring-test/keyname7.info +++ /dev/null @@ -1 +0,0 @@ -eyJhbGciOiJQQkVTMi1IUzI1NitBMTI4S1ciLCJjcmVhdGVkIjoiMjAyMC0xMC0wOCAxMjo1MDoxOC4yMzg1MTQgLTA0MDAgRURUIG09KzAuMTY4ODExNzMwIiwiZW5jIjoiQTI1NkdDTSIsInAyYyI6ODE5MiwicDJzIjoiUmZDZC0xeGh6OVJ3RzJfViJ9.hMyIYfHwLYAwJs6THPC30rWfhd1SRUl5po4ifTvln5cV_VHyHLW3MQ.ku5jtKB-G5acpq4v.s0oNPaUaRQbFk-X8AL8QitkI_SdBWB2BpBmRRbo2ZMAkq4x81hSC5p7RlSrM3OGTNFZ4yOrRgzdMv43YpCl7ZpJIypF4l7Hyvl_13jTjqzB7o81dEhl_10SI_Fw607VKCnwqq02_VoqD489EpMVuQ05Fg2pUT3M_mJMacGztORYVJrIWwzbyUiHfM4GlnaoUQaKfwbkHS2W2-1wOPTSWTLEBVJlRG1EAZR_upcPJolcAStjl8PY5EfkxXD56c8Xu6SI8LjMrJAXXg7lTqOGNOkt0v8M8UZWd95Gy2zH_KJm3ItYR_YjPoMIHh-_Cb2-0uoXNRyykW4EpGptp08n7QubSYltzXwaw_NgLP9KUmg.67EgfbLDNyvEYCR12Bjoew \ No newline at end of file From 6cbbe0d4ef90f886dfc356979b89979ddfcd00d8 Mon Sep 17 00:00:00 2001 From: Riccardo Montagnin Date: Sun, 15 Nov 2020 13:29:37 +0100 Subject: [PATCH 103/136] Update dependencies to use gRPC v1.33.2 (#7925) * Updated gRCP version to v1.33.1 since v1.33.0 was deleted (see https://github.com/grpc/grpc-go/issues/3945) * Updated CHANGELOG * Updated CHANGELOG Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- CHANGELOG.md | 6 ++++++ go.mod | 13 ++++++------- go.sum | 24 ++++++++++++++---------- 3 files changed, 26 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index efaf660f3d..7e63adfaca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,6 +36,12 @@ Ref: https://keepachangelog.com/en/1.0.0/ ## [Unreleased] +### Improvements +- (SDK) [\#7925](https://github.com/cosmos/cosmos-sdk/pull/7925) Updated dependencies to use gRPC v1.33.2 + * Updated gRPC dependency to v1.33.2 + * Updated iavl dependency to v0.15-rc2 + + ## [v0.40.0-rc3](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.40.0-rc3) - 2020-11-06 ### Client Breaking diff --git a/go.mod b/go.mod index 004cb69e0b..7049f591ab 100644 --- a/go.mod +++ b/go.mod @@ -11,9 +11,8 @@ require ( github.com/btcsuite/btcutil v1.0.2 github.com/confio/ics23/go v0.6.3 github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d - github.com/cosmos/iavl v0.15.0-rc4 + github.com/cosmos/iavl v0.15.0-rc5 github.com/cosmos/ledger-cosmos-go v0.11.1 - github.com/dgraph-io/badger/v2 v2.2007.2 // indirect github.com/dgraph-io/ristretto v0.0.3 // indirect github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect github.com/enigmampc/btcutil v1.0.3-0.20200723161021-e2fb6adb2a25 @@ -24,7 +23,7 @@ require ( github.com/golang/snappy v0.0.2 // indirect github.com/gorilla/handlers v1.5.1 github.com/gorilla/mux v1.8.0 - github.com/grpc-ecosystem/grpc-gateway v1.15.2 + github.com/grpc-ecosystem/grpc-gateway v1.16.0 github.com/hashicorp/golang-lru v0.5.4 github.com/magiconair/properties v1.8.4 github.com/mattn/go-isatty v0.0.12 @@ -46,11 +45,11 @@ require ( github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15 github.com/tendermint/go-amino v0.16.0 github.com/tendermint/tendermint v0.34.0-rc6 - github.com/tendermint/tm-db v0.6.2 - golang.org/x/crypto v0.0.0-20201012173705-84dcc777aaee + github.com/tendermint/tm-db v0.6.3 + golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897 golang.org/x/net v0.0.0-20200930145003-4acb6c075d10 // indirect - google.golang.org/genproto v0.0.0-20201014134559-03b6142f0dc9 - google.golang.org/grpc v1.33.0 + google.golang.org/genproto v0.0.0-20201111145450-ac7456db90a6 + google.golang.org/grpc v1.33.2 google.golang.org/protobuf v1.25.0 gopkg.in/yaml.v2 v2.3.0 ) diff --git a/go.sum b/go.sum index 8090e2d10b..db70ba9caf 100644 --- a/go.sum +++ b/go.sum @@ -121,8 +121,8 @@ github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfc github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d h1:49RLWk1j44Xu4fjHb6JFYmeUnDORVwHNkDxaQ0ctCVU= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= github.com/cosmos/iavl v0.15.0-rc3.0.20201009144442-230e9bdf52cd/go.mod h1:3xOIaNNX19p0QrX0VqWa6voPRoJRGGYtny+DH8NEPvE= -github.com/cosmos/iavl v0.15.0-rc4 h1:P1wmET7BueqCzfxsn+BzVkDWDLY9ij2JNwkbIdM7RG8= -github.com/cosmos/iavl v0.15.0-rc4/go.mod h1:5CsecJdh44Uj4vZ6WSPeWq84hNW5BwRI36ZsAbfJvRw= +github.com/cosmos/iavl v0.15.0-rc5 h1:AMKgaAjXwGANWv56NL4q4hV+a0puSkLYD6cCQAv3i44= +github.com/cosmos/iavl v0.15.0-rc5/go.mod h1:WqoPL9yPTQ85QBMT45OOUzPxG/U/JcJoN7uMjgxke/I= github.com/cosmos/ledger-cosmos-go v0.11.1 h1:9JIYsGnXP613pb2vPjFeMMjBI5lEDsEaF6oYorTy6J4= github.com/cosmos/ledger-cosmos-go v0.11.1/go.mod h1:J8//BsAGTo3OC/vDLjMRFLW6q0WAaXvHnVc7ZmE8iUY= github.com/cosmos/ledger-go v0.9.2 h1:Nnao/dLwaVTk1Q5U9THldpUMMXU94BOTWPddSmVB6pI= @@ -284,8 +284,8 @@ github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t github.com/grpc-ecosystem/grpc-gateway v1.9.5 h1:UImYN5qQ8tuGpGE16ZmjvcTtTw24zw1QAp/SlnNrZhI= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.14.7/go.mod h1:oYZKL012gGh6LMyg/xA7Q2yq6j8bu0wa+9w14EEthWU= -github.com/grpc-ecosystem/grpc-gateway v1.15.2 h1:HC+hWRWf+v5zTMPyoaYTKIJih+4sd4XRWmj0qlG87Co= -github.com/grpc-ecosystem/grpc-gateway v1.15.2/go.mod h1:vO11I9oWA+KsxmfFQPhLnnIb1VDE24M+pdxZFiuZcA8= +github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= +github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c h1:6rhixN/i8ZofjG1Y75iExal34USq5p+wiN1tpie8IrU= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NMPJylDgVpX0MLRlPy15sqSwOFv/U1GZ2m21JhFfek0= github.com/gtank/merlin v0.1.1-0.20191105220539-8318aed1a79f/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s= @@ -599,6 +599,8 @@ github.com/tendermint/tendermint v0.34.0-rc6 h1:SVuKGvvE22KxfuK8QUHctUrmOWJsncZS github.com/tendermint/tendermint v0.34.0-rc6/go.mod h1:ugzyZO5foutZImv0Iyx/gOFCX6mjJTgbLHTwi17VDVg= github.com/tendermint/tm-db v0.6.2 h1:DOn8jwCdjJblrCFJbtonEIPD1IuJWpbRUUdR8GWE4RM= github.com/tendermint/tm-db v0.6.2/go.mod h1:GYtQ67SUvATOcoY8/+x6ylk8Qo02BQyLrAs+yAcLvGI= +github.com/tendermint/tm-db v0.6.3 h1:ZkhQcKnB8/2jr5EaZwGndN4owkPsGezW2fSisS9zGbg= +github.com/tendermint/tm-db v0.6.3/go.mod h1:lfA1dL9/Y/Y8wwyPp2NMLyn5P5Ptr/gvDFNWtrCWSf8= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= @@ -643,8 +645,8 @@ golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200709230013-948cd5f35899/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20201012173705-84dcc777aaee h1:4yd7jl+vXjalO5ztz6Vc1VADv+S/80LGJmyl1ROJ2AI= -golang.org/x/crypto v0.0.0-20201012173705-84dcc777aaee/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897 h1:pLI5jrR7OSLijeIDcmRxNmw2api+jEfxLoykJVice/E= +golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -692,6 +694,7 @@ golang.org/x/net v0.0.0-20200421231249-e086a090c8fd/go.mod h1:qpuaurCH72eLCgpAm/ golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200930145003-4acb6c075d10 h1:YfxMZzv3PjGonQYNUaeU2+DhAdqOxerQ30JFB6WgAXo= golang.org/x/net v0.0.0-20200930145003-4acb6c075d10/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -808,8 +811,8 @@ google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201014134559-03b6142f0dc9 h1:fG84H9C3EXfuDlzkG+VEPDYHHExklP6scH1QZ5gQTqU= -google.golang.org/genproto v0.0.0-20201014134559-03b6142f0dc9/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201111145450-ac7456db90a6 h1:iRN4+t0lvZX/l9gH14ARF9i58tsVa5a97k6aH95rC3Y= +google.golang.org/genproto v0.0.0-20201111145450-ac7456db90a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.19.1/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= @@ -828,8 +831,9 @@ google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3Iji google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.32.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.33.0 h1:IBKSUNL2uBS2DkJBncPP+TwT0sp9tgA8A75NjHt6umg= -google.golang.org/grpc v1.33.0/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= +google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= +google.golang.org/grpc v1.33.2 h1:EQyQC3sa8M+p6Ulc8yy9SWSS2GVwyRc83gAbG8lrl4o= +google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= From 6b62d266bb01a1561fd13721c868fe1d130ad179 Mon Sep 17 00:00:00 2001 From: Callum Waters Date: Mon, 16 Nov 2020 10:14:21 +0100 Subject: [PATCH 104/136] use verifycommitlight (#7936) --- .../07-tendermint/types/misbehaviour.go | 28 +++++-------------- 1 file changed, 7 insertions(+), 21 deletions(-) diff --git a/x/ibc/light-clients/07-tendermint/types/misbehaviour.go b/x/ibc/light-clients/07-tendermint/types/misbehaviour.go index 85fb615e5e..d4de93504e 100644 --- a/x/ibc/light-clients/07-tendermint/types/misbehaviour.go +++ b/x/ibc/light-clients/07-tendermint/types/misbehaviour.go @@ -111,27 +111,19 @@ func (misbehaviour Misbehaviour) ValidateBasic() error { if bytes.Equal(blockID1.Hash, blockID2.Hash) { return sdkerrors.Wrap(clienttypes.ErrInvalidMisbehaviour, "headers block hashes are equal") } - if err := ValidCommit(misbehaviour.Header1.Header.ChainID, misbehaviour.Header1.Commit, misbehaviour.Header1.ValidatorSet); err != nil { + if err := validCommit(misbehaviour.Header1.Header.ChainID, *blockID1, + misbehaviour.Header1.Commit, misbehaviour.Header1.ValidatorSet); err != nil { return err } - if err := ValidCommit(misbehaviour.Header2.Header.ChainID, misbehaviour.Header2.Commit, misbehaviour.Header2.ValidatorSet); err != nil { + if err := validCommit(misbehaviour.Header2.Header.ChainID, *blockID2, + misbehaviour.Header2.Commit, misbehaviour.Header2.ValidatorSet); err != nil { return err } return nil } -// ValidCommit checks if the given commit is a valid commit from the passed-in validatorset -// -// CommitToVoteSet will panic if the commit cannot be converted to a valid voteset given the validatorset -// This implies that someone tried to submit misbehaviour that wasn't actually committed by the validatorset -// thus we should return an error here and reject the misbehaviour rather than panicing. -func ValidCommit(chainID string, commit *tmproto.Commit, valSet *tmproto.ValidatorSet) (err error) { - defer func() { - if r := recover(); r != nil { - err = sdkerrors.Wrapf(clienttypes.ErrInvalidMisbehaviour, "invalid commit: %v", r) - } - }() - +// validCommit checks if the given commit is a valid commit from the passed-in validatorset +func validCommit(chainID string, blockID tmtypes.BlockID, commit *tmproto.Commit, valSet *tmproto.ValidatorSet) (err error) { tmCommit, err := tmtypes.CommitFromProto(commit) if err != nil { return sdkerrors.Wrap(err, "commit is not tendermint commit type") @@ -141,13 +133,7 @@ func ValidCommit(chainID string, commit *tmproto.Commit, valSet *tmproto.Validat return sdkerrors.Wrap(err, "validator set is not tendermint validator set type") } - // Convert commits to vote-sets given the validator set so we can check if they both have 2/3 power - voteSet := tmtypes.CommitToVoteSet(chainID, tmCommit, tmValset) - - blockID, ok := voteSet.TwoThirdsMajority() - - // Check that ValidatorSet did indeed commit to blockID hash in Commit - if !ok || !bytes.Equal(blockID.Hash, tmCommit.BlockID.Hash) { + if err := tmValset.VerifyCommitLight(chainID, blockID, tmCommit.Height, tmCommit); err != nil { return sdkerrors.Wrap(clienttypes.ErrInvalidMisbehaviour, "validator set did not commit to header") } From cd29fd642a3c948c68355e5f14e55405242aed3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?colin=20axn=C3=A9r?= <25233464+colin-axner@users.noreply.github.com> Date: Mon, 16 Nov 2020 10:30:57 +0100 Subject: [PATCH 105/136] Fix connection path validation and remove unused PathValidator function (#7930) Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- x/ibc/core/03-connection/types/connection_test.go | 13 +++++++------ x/ibc/core/03-connection/types/genesis.go | 6 +++--- x/ibc/core/03-connection/types/genesis_test.go | 9 ++++----- x/ibc/core/24-host/validate.go | 11 ----------- x/ibc/core/24-host/validate_test.go | 7 ++++++- x/ibc/core/genesis_test.go | 13 ++++++------- 6 files changed, 26 insertions(+), 33 deletions(-) diff --git a/x/ibc/core/03-connection/types/connection_test.go b/x/ibc/core/03-connection/types/connection_test.go index ff2aa08d4a..93891cbea1 100644 --- a/x/ibc/core/03-connection/types/connection_test.go +++ b/x/ibc/core/03-connection/types/connection_test.go @@ -12,12 +12,13 @@ import ( ) var ( - chainID = "gaiamainnet" - connectionID = "connectionidone" - clientID = "clientidone" - connectionID2 = "connectionidtwo" - clientID2 = "clientidtwo" - clientHeight = clienttypes.NewHeight(0, 6) + chainID = "gaiamainnet" + connectionID = "connectionidone" + clientID = "clientidone" + connectionID2 = "connectionidtwo" + clientID2 = "clientidtwo" + invalidConnectionID = "(invalidConnectionID)" + clientHeight = clienttypes.NewHeight(0, 6) ) func TestConnectionValidateBasic(t *testing.T) { diff --git a/x/ibc/core/03-connection/types/genesis.go b/x/ibc/core/03-connection/types/genesis.go index 9b155a368b..58b21678c2 100644 --- a/x/ibc/core/03-connection/types/genesis.go +++ b/x/ibc/core/03-connection/types/genesis.go @@ -45,9 +45,9 @@ func (gs GenesisState) Validate() error { if err := host.ClientIdentifierValidator(conPaths.ClientId); err != nil { return fmt.Errorf("invalid client connection path %d: %w", i, err) } - for _, path := range conPaths.Paths { - if err := host.PathValidator(path); err != nil { - return fmt.Errorf("invalid client connection path %d: %w", i, err) + for _, connectionID := range conPaths.Paths { + if err := host.ConnectionIdentifierValidator(connectionID); err != nil { + return fmt.Errorf("invalid client connection ID (%s) in connection paths %d: %w", connectionID, i, err) } } } diff --git a/x/ibc/core/03-connection/types/genesis_test.go b/x/ibc/core/03-connection/types/genesis_test.go index 8080f49d5c..6290a98a9f 100644 --- a/x/ibc/core/03-connection/types/genesis_test.go +++ b/x/ibc/core/03-connection/types/genesis_test.go @@ -7,7 +7,6 @@ import ( "github.com/cosmos/cosmos-sdk/x/ibc/core/03-connection/types" commitmenttypes "github.com/cosmos/cosmos-sdk/x/ibc/core/23-commitment/types" - host "github.com/cosmos/cosmos-sdk/x/ibc/core/24-host" ibctesting "github.com/cosmos/cosmos-sdk/x/ibc/testing" ) @@ -30,7 +29,7 @@ func TestValidateGenesis(t *testing.T) { types.NewIdentifiedConnection(connectionID, types.NewConnectionEnd(types.INIT, clientID, types.Counterparty{clientID2, connectionID2, commitmenttypes.NewMerklePrefix([]byte("prefix"))}, []*types.Version{ibctesting.ConnectionVersion})), }, []types.ConnectionPaths{ - {clientID, []string{host.ConnectionPath(connectionID)}}, + {clientID, []string{connectionID}}, }, ), expPass: true, @@ -42,7 +41,7 @@ func TestValidateGenesis(t *testing.T) { types.NewIdentifiedConnection(connectionID, types.NewConnectionEnd(types.INIT, "(CLIENTIDONE)", types.Counterparty{clientID, connectionID, commitmenttypes.NewMerklePrefix([]byte("prefix"))}, []*types.Version{ibctesting.ConnectionVersion})), }, []types.ConnectionPaths{ - {clientID, []string{host.ConnectionPath(connectionID)}}, + {clientID, []string{connectionID}}, }, ), expPass: false, @@ -54,7 +53,7 @@ func TestValidateGenesis(t *testing.T) { types.NewIdentifiedConnection(connectionID, types.NewConnectionEnd(types.INIT, clientID, types.Counterparty{clientID2, connectionID2, commitmenttypes.NewMerklePrefix([]byte("prefix"))}, []*types.Version{ibctesting.ConnectionVersion})), }, []types.ConnectionPaths{ - {"(CLIENTIDONE)", []string{host.ConnectionPath(connectionID)}}, + {"(CLIENTIDONE)", []string{connectionID}}, }, ), expPass: false, @@ -66,7 +65,7 @@ func TestValidateGenesis(t *testing.T) { types.NewIdentifiedConnection(connectionID, types.NewConnectionEnd(types.INIT, clientID, types.Counterparty{clientID2, connectionID2, commitmenttypes.NewMerklePrefix([]byte("prefix"))}, []*types.Version{ibctesting.ConnectionVersion})), }, []types.ConnectionPaths{ - {clientID, []string{connectionID}}, + {clientID, []string{invalidConnectionID}}, }, ), expPass: false, diff --git a/x/ibc/core/24-host/validate.go b/x/ibc/core/24-host/validate.go index bbfafbee75..d589223f58 100644 --- a/x/ibc/core/24-host/validate.go +++ b/x/ibc/core/24-host/validate.go @@ -112,14 +112,3 @@ func NewPathValidator(idValidator ValidateFn) ValidateFn { return nil } } - -// PathValidator takes in path string and validates with default identifier rules: -// path consists of `/`-separated valid identifiers, -// each identifier is between 1-64 characters and contains only alphanumeric and some allowed -// special characters (see IsValidID). -func PathValidator(path string) error { - f := NewPathValidator(func(path string) error { - return nil - }) - return f(path) -} diff --git a/x/ibc/core/24-host/validate_test.go b/x/ibc/core/24-host/validate_test.go index 41dd5167d9..40987bd157 100644 --- a/x/ibc/core/24-host/validate_test.go +++ b/x/ibc/core/24-host/validate_test.go @@ -73,7 +73,12 @@ func TestPathValidator(t *testing.T) { } for _, tc := range testCases { - err := PathValidator(tc.id) + f := NewPathValidator(func(path string) error { + return nil + }) + + err := f(tc.id) + if tc.expPass { seps := strings.Count(tc.id, "/") require.Equal(t, 1, seps) diff --git a/x/ibc/core/genesis_test.go b/x/ibc/core/genesis_test.go index a14669faaa..d435cf8566 100644 --- a/x/ibc/core/genesis_test.go +++ b/x/ibc/core/genesis_test.go @@ -14,7 +14,6 @@ import ( connectiontypes "github.com/cosmos/cosmos-sdk/x/ibc/core/03-connection/types" channeltypes "github.com/cosmos/cosmos-sdk/x/ibc/core/04-channel/types" commitmenttypes "github.com/cosmos/cosmos-sdk/x/ibc/core/23-commitment/types" - host "github.com/cosmos/cosmos-sdk/x/ibc/core/24-host" "github.com/cosmos/cosmos-sdk/x/ibc/core/exported" "github.com/cosmos/cosmos-sdk/x/ibc/core/types" ibctmtypes "github.com/cosmos/cosmos-sdk/x/ibc/light-clients/07-tendermint/types" @@ -77,7 +76,7 @@ func (suite *IBCTestSuite) TestValidateGenesis() { ClientGenesis: clienttypes.NewGenesisState( []clienttypes.IdentifiedClientState{ clienttypes.NewIdentifiedClientState( - clientID, ibctmtypes.NewClientState(suite.chainA.ChainID, ibctmtypes.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), + clientID, ibctmtypes.NewClientState(suite.chainA.ChainID, ibctmtypes.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), ), clienttypes.NewIdentifiedClientState( exported.Localhost, localhosttypes.NewClientState("chaindID", clientHeight), @@ -104,7 +103,7 @@ func (suite *IBCTestSuite) TestValidateGenesis() { connectiontypes.NewIdentifiedConnection(connectionID, connectiontypes.NewConnectionEnd(connectiontypes.INIT, clientID, connectiontypes.NewCounterparty(clientID2, connectionID2, commitmenttypes.NewMerklePrefix([]byte("prefix"))), []*connectiontypes.Version{ibctesting.ConnectionVersion})), }, []connectiontypes.ConnectionPaths{ - connectiontypes.NewConnectionPaths(clientID, []string{host.ConnectionPath(connectionID)}), + connectiontypes.NewConnectionPaths(clientID, []string{connectionID}), }, ), ChannelGenesis: channeltypes.NewGenesisState( @@ -144,7 +143,7 @@ func (suite *IBCTestSuite) TestValidateGenesis() { ClientGenesis: clienttypes.NewGenesisState( []clienttypes.IdentifiedClientState{ clienttypes.NewIdentifiedClientState( - clientID, ibctmtypes.NewClientState(suite.chainA.ChainID, ibctmtypes.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), + clientID, ibctmtypes.NewClientState(suite.chainA.ChainID, ibctmtypes.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), ), clienttypes.NewIdentifiedClientState( exported.Localhost, localhosttypes.NewClientState("(chaindID)", clienttypes.ZeroHeight()), @@ -167,7 +166,7 @@ func (suite *IBCTestSuite) TestValidateGenesis() { connectiontypes.NewIdentifiedConnection(connectionID, connectiontypes.NewConnectionEnd(connectiontypes.INIT, "(CLIENTIDONE)", connectiontypes.NewCounterparty(clientID, connectionID2, commitmenttypes.NewMerklePrefix([]byte("prefix"))), []*connectiontypes.Version{connectiontypes.NewVersion("1.1", nil)})), }, []connectiontypes.ConnectionPaths{ - connectiontypes.NewConnectionPaths(clientID, []string{host.ConnectionPath(connectionID)}), + connectiontypes.NewConnectionPaths(clientID, []string{connectionID}), }, ), }, @@ -216,7 +215,7 @@ func (suite *IBCTestSuite) TestInitGenesis() { ClientGenesis: clienttypes.NewGenesisState( []clienttypes.IdentifiedClientState{ clienttypes.NewIdentifiedClientState( - clientID, ibctmtypes.NewClientState(suite.chainA.ChainID, ibctmtypes.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), + clientID, ibctmtypes.NewClientState(suite.chainA.ChainID, ibctmtypes.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), ), clienttypes.NewIdentifiedClientState( exported.Localhost, localhosttypes.NewClientState("chaindID", clientHeight), @@ -243,7 +242,7 @@ func (suite *IBCTestSuite) TestInitGenesis() { connectiontypes.NewIdentifiedConnection(connectionID, connectiontypes.NewConnectionEnd(connectiontypes.INIT, clientID, connectiontypes.NewCounterparty(clientID2, connectionID2, commitmenttypes.NewMerklePrefix([]byte("prefix"))), []*connectiontypes.Version{ibctesting.ConnectionVersion})), }, []connectiontypes.ConnectionPaths{ - connectiontypes.NewConnectionPaths(clientID, []string{host.ConnectionPath(connectionID)}), + connectiontypes.NewConnectionPaths(clientID, []string{connectionID}), }, ), ChannelGenesis: channeltypes.NewGenesisState( From b5e873cd9197ee3e1a13f921d8db9d8f138c1875 Mon Sep 17 00:00:00 2001 From: Paul Kim Date: Mon, 16 Nov 2020 19:00:34 +0900 Subject: [PATCH 106/136] version --long displays replaced build dependencies (#7941) * version --long displays replaced modules * Update CHANGELOG * Update CHANGELOG * Update version/version.go * Update CHANGELOG.md * Update CHANGELOG.md Co-authored-by: Alessio Treglia Co-authored-by: Alessio Treglia --- CHANGELOG.md | 2 +- version/version.go | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7e63adfaca..46d8a76ef3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,7 +40,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ - (SDK) [\#7925](https://github.com/cosmos/cosmos-sdk/pull/7925) Updated dependencies to use gRPC v1.33.2 * Updated gRPC dependency to v1.33.2 * Updated iavl dependency to v0.15-rc2 - +* (version) [\#7848](https://github.com/cosmos/cosmos-sdk/pull/7848) [\#7941](https://github.com/cosmos/cosmos-sdk/pull/7941) `version --long` output now shows the list of build dependencies and replaced build dependencies. ## [v0.40.0-rc3](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.40.0-rc3) - 2020-11-06 diff --git a/version/version.go b/version/version.go index 25995932fc..a179b37fe3 100644 --- a/version/version.go +++ b/version/version.go @@ -85,6 +85,13 @@ type buildDep struct { *debug.Module } -func (d buildDep) String() string { return fmt.Sprintf("%s@%s", d.Path, d.Version) } +func (d buildDep) String() string { + if d.Replace != nil { + return fmt.Sprintf("%s@%s => %s@%s", d.Path, d.Version, d.Replace.Path, d.Replace.Version) + } + + return fmt.Sprintf("%s@%s", d.Path, d.Version) +} + func (d buildDep) MarshalJSON() ([]byte, error) { return json.Marshal(d.String()) } func (d buildDep) MarshalYAML() (interface{}, error) { return d.String(), nil } From 0d0c9696e8faa1d34052c9ed583494ad7f36ad1c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Nov 2020 10:36:09 +0000 Subject: [PATCH 107/136] build(deps): bump github.com/prometheus/common from 0.14.0 to 0.15.0 (#7942) Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.14.0 to 0.15.0. - [Release notes](https://github.com/prometheus/common/releases) - [Commits](https://github.com/prometheus/common/compare/v0.14.0...v0.15.0) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 7049f591ab..ad65e29a68 100644 --- a/go.mod +++ b/go.mod @@ -31,7 +31,7 @@ require ( github.com/pelletier/go-toml v1.8.0 // indirect github.com/pkg/errors v0.9.1 github.com/prometheus/client_golang v1.8.0 - github.com/prometheus/common v0.14.0 + github.com/prometheus/common v0.15.0 github.com/rakyll/statik v0.1.7 github.com/regen-network/cosmos-proto v0.3.0 github.com/spf13/afero v1.2.2 // indirect diff --git a/go.sum b/go.sum index db70ba9caf..3fb9fc93bf 100644 --- a/go.sum +++ b/go.sum @@ -501,6 +501,8 @@ github.com/prometheus/common v0.10.0 h1:RyRA7RzGXQZiW+tGMr7sxa85G1z0yOpM1qq5c8lN github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.14.0 h1:RHRyE8UocrbjU+6UvRzwi6HjiDfxrrBU91TtbKzkGp4= github.com/prometheus/common v0.14.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= +github.com/prometheus/common v0.15.0 h1:4fgOnadei3EZvgRwxJ7RMpG1k1pOZth5Pc13tyspaKM= +github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= From 54201d11e6d2c14f47542e3eac600c10c9db4723 Mon Sep 17 00:00:00 2001 From: yihuang Date: Mon, 16 Nov 2020 19:34:54 +0800 Subject: [PATCH 108/136] cli: convert coins to smallest unit registered (#7777) * cli: convert coins to smallest unit registered fixes: #7623 - test order of decimal operations - support both int and decimal coins, truncate when normalizing to base unit * Update types/coin_test.go * Update types/coin_test.go Co-authored-by: Alessio Treglia Co-authored-by: Amaury Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- client/tx/factory.go | 2 +- simapp/simd/cmd/genaccounts.go | 4 +- types/coin.go | 39 +++------- types/coin_test.go | 12 +-- types/dec_coin_test.go | 7 +- types/denom.go | 85 +++++++++++++++++++++- types/denom_internal_test.go | 101 ++++++++++++++++++++++++++ types/rest/rest_test.go | 2 +- types/simulation/rand_util_test.go | 2 +- x/auth/vesting/client/cli/tx.go | 2 +- x/bank/client/cli/tx.go | 2 +- x/bank/client/testutil/cli_helpers.go | 2 +- x/distribution/client/cli/tx.go | 6 +- x/genutil/client/cli/gentx.go | 2 +- x/gov/client/cli/tx.go | 4 +- x/params/client/cli/tx.go | 2 +- x/upgrade/client/cli/tx.go | 4 +- 17 files changed, 225 insertions(+), 53 deletions(-) diff --git a/client/tx/factory.go b/client/tx/factory.go index 5077d36e74..19c7c61dea 100644 --- a/client/tx/factory.go +++ b/client/tx/factory.go @@ -120,7 +120,7 @@ func (f Factory) WithGas(gas uint64) Factory { // WithFees returns a copy of the Factory with an updated fee. func (f Factory) WithFees(fees string) Factory { - parsedFees, err := sdk.ParseCoins(fees) + parsedFees, err := sdk.ParseCoinsNormalized(fees) if err != nil { panic(err) } diff --git a/simapp/simd/cmd/genaccounts.go b/simapp/simd/cmd/genaccounts.go index 167da30578..dc6925120e 100644 --- a/simapp/simd/cmd/genaccounts.go +++ b/simapp/simd/cmd/genaccounts.go @@ -67,7 +67,7 @@ contain valid denominations. Accounts may optionally be supplied with vesting pa addr = info.GetAddress() } - coins, err := sdk.ParseCoins(args[1]) + coins, err := sdk.ParseCoinsNormalized(args[1]) if err != nil { return fmt.Errorf("failed to parse coins: %w", err) } @@ -76,7 +76,7 @@ contain valid denominations. Accounts may optionally be supplied with vesting pa vestingEnd, _ := cmd.Flags().GetInt64(flagVestingEnd) vestingAmtStr, _ := cmd.Flags().GetString(flagVestingAmt) - vestingAmt, err := sdk.ParseCoins(vestingAmtStr) + vestingAmt, err := sdk.ParseCoinsNormalized(vestingAmtStr) if err != nil { return fmt.Errorf("failed to parse vesting amount: %w", err) } diff --git a/types/coin.go b/types/coin.go index 8ac9a8843d..5e2c22bdf8 100644 --- a/types/coin.go +++ b/types/coin.go @@ -600,7 +600,7 @@ var ( // a letter, a number or a separator ('/'). reDnmString = `[a-zA-Z][a-zA-Z0-9/]{2,127}` reAmt = `[[:digit:]]+` - reDecAmt = `[[:digit:]]*\.[[:digit:]]+` + reDecAmt = `[[:digit:]]+(?:\.[[:digit:]]+)?|\.[[:digit:]]+` reSpc = `[[:space:]]*` reDnm = returnReDnm reCoin = returnReCoin @@ -664,33 +664,18 @@ func ParseCoin(coinStr string) (coin Coin, err error) { return NewCoin(denomStr, amount), nil } -// ParseCoins will parse out a list of coins separated by commas. If the parsing is successuful, -// the provided coins will be sanitized by removing zero coins and sorting the coin set. Lastly -// a validation of the coin set is executed. If the check passes, ParseCoins will return the sanitized coins. +// ParseCoinsNormalized will parse out a list of coins separated by commas, and normalize them by converting to smallest +// unit. If the parsing is successuful, the provided coins will be sanitized by removing zero coins and sorting the coin +// set. Lastly a validation of the coin set is executed. If the check passes, ParseCoinsNormalized will return the +// sanitized coins. // Otherwise it will return an error. -// If an empty string is provided to ParseCoins, it returns nil Coins. +// If an empty string is provided to ParseCoinsNormalized, it returns nil Coins. +// ParseCoinsNormalized supports decimal coins as inputs, and truncate them to int after converted to smallest unit. // Expected format: "{amount0}{denomination},...,{amountN}{denominationN}" -func ParseCoins(coinsStr string) (Coins, error) { - coinsStr = strings.TrimSpace(coinsStr) - if len(coinsStr) == 0 { - return nil, nil +func ParseCoinsNormalized(coinStr string) (Coins, error) { + coins, err := ParseDecCoins(coinStr) + if err != nil { + return Coins{}, err } - - coinStrs := strings.Split(coinsStr, ",") - coins := make(Coins, len(coinStrs)) - for i, coinStr := range coinStrs { - coin, err := ParseCoin(coinStr) - if err != nil { - return nil, err - } - - coins[i] = coin - } - - newCoins := sanitizeCoins(coins) - if err := newCoins.Validate(); err != nil { - return nil, err - } - - return newCoins, nil + return NormalizeCoins(coins), nil } diff --git a/types/coin_test.go b/types/coin_test.go index 9d4130576b..0e4bbf739f 100644 --- a/types/coin_test.go +++ b/types/coin_test.go @@ -660,18 +660,18 @@ func (s *coinTestSuite) TestParseCoins() { {"98 bar , 1 foo ", true, sdk.Coins{{"bar", sdk.NewInt(98)}, {"foo", one}}}, {" 55\t \t bling\n", true, sdk.Coins{{"bling", sdk.NewInt(55)}}}, {"2foo, 97 bar", true, sdk.Coins{{"bar", sdk.NewInt(97)}, {"foo", sdk.NewInt(2)}}}, - {"5 mycoin,", false, nil}, // no empty coins in a list - {"2 3foo, 97 bar", false, nil}, // 3foo is invalid coin name - {"11me coin, 12you coin", false, nil}, // no spaces in coin names - {"1.2btc", false, nil}, // amount must be integer - {"5foo:bar", false, nil}, // invalid separator + {"5 mycoin,", false, nil}, // no empty coins in a list + {"2 3foo, 97 bar", false, nil}, // 3foo is invalid coin name + {"11me coin, 12you coin", false, nil}, // no spaces in coin names + {"1.2btc", true, sdk.Coins{{"btc", sdk.NewInt(1)}}}, // amount can be decimal, will get truncated + {"5foo:bar", false, nil}, // invalid separator {"10atom10", true, sdk.Coins{{"atom10", sdk.NewInt(10)}}}, {"200transfer/channelToA/uatom", true, sdk.Coins{{"transfer/channelToA/uatom", sdk.NewInt(200)}}}, {"50ibc/7F1D3FCF4AE79E1554D670D1AD949A9BA4E4A3C76C63093E17E446A46061A7A2", true, sdk.Coins{{"ibc/7F1D3FCF4AE79E1554D670D1AD949A9BA4E4A3C76C63093E17E446A46061A7A2", sdk.NewInt(50)}}}, } for tcIndex, tc := range cases { - res, err := sdk.ParseCoins(tc.input) + res, err := sdk.ParseCoinsNormalized(tc.input) if !tc.valid { s.Require().Error(err, "%s: %#v. tc #%d", tc.input, res, tcIndex) } else if s.Assert().Nil(err, "%s: %+v", tc.input, err) { diff --git a/types/dec_coin_test.go b/types/dec_coin_test.go index e0f4a66b23..938f7dddff 100644 --- a/types/dec_coin_test.go +++ b/types/dec_coin_test.go @@ -352,8 +352,11 @@ func (s *decCoinTestSuite) TestParseDecCoins() { expectedErr bool }{ {"", nil, false}, - {"4stake", nil, true}, - {"5.5atom,4stake", nil, true}, + {"4stake", sdk.DecCoins{sdk.NewDecCoinFromDec("stake", sdk.NewDecFromInt(sdk.NewInt(4)))}, false}, + {"5.5atom,4stake", sdk.DecCoins{ + sdk.NewDecCoinFromDec("atom", sdk.NewDecWithPrec(5500000000000000000, sdk.Precision)), + sdk.NewDecCoinFromDec("stake", sdk.NewDec(4)), + }, false}, {"0.0stake", sdk.DecCoins{}, false}, // remove zero coins {"10.0btc,1.0atom,20.0btc", nil, true}, { diff --git a/types/denom.go b/types/denom.go index f79bef8b94..160e2806e1 100644 --- a/types/denom.go +++ b/types/denom.go @@ -8,6 +8,9 @@ import ( // multipliers (e.g. 1atom = 10^-6uatom). var denomUnits = map[string]Dec{} +// baseDenom is the denom of smallest unit registered +var baseDenom string = "" + // RegisterDenom registers a denomination with a corresponding unit. If the // denomination is already registered, an error will be returned. func RegisterDenom(denom string, unit Dec) error { @@ -20,6 +23,10 @@ func RegisterDenom(denom string, unit Dec) error { } denomUnits[denom] = unit + + if baseDenom == "" || unit.LT(denomUnits[baseDenom]) { + baseDenom = denom + } return nil } @@ -38,6 +45,14 @@ func GetDenomUnit(denom string) (Dec, bool) { return unit, true } +// GetBaseDenom returns the denom of smallest unit registered +func GetBaseDenom() (string, error) { + if baseDenom == "" { + return "", fmt.Errorf("no denom is registered") + } + return baseDenom, nil +} + // ConvertCoin attempts to convert a coin to a given denomination. If the given // denomination is invalid or if neither denomination is registered, an error // is returned. @@ -60,5 +75,73 @@ func ConvertCoin(coin Coin, denom string) (Coin, error) { return NewCoin(denom, coin.Amount), nil } - return NewCoin(denom, coin.Amount.ToDec().Mul(srcUnit.Quo(dstUnit)).TruncateInt()), nil + return NewCoin(denom, coin.Amount.ToDec().Mul(srcUnit).Quo(dstUnit).TruncateInt()), nil +} + +// ConvertDecCoin attempts to convert a decimal coin to a given denomination. If the given +// denomination is invalid or if neither denomination is registered, an error +// is returned. +func ConvertDecCoin(coin DecCoin, denom string) (DecCoin, error) { + if err := ValidateDenom(denom); err != nil { + return DecCoin{}, err + } + + srcUnit, ok := GetDenomUnit(coin.Denom) + if !ok { + return DecCoin{}, fmt.Errorf("source denom not registered: %s", coin.Denom) + } + + dstUnit, ok := GetDenomUnit(denom) + if !ok { + return DecCoin{}, fmt.Errorf("destination denom not registered: %s", denom) + } + + if srcUnit.Equal(dstUnit) { + return NewDecCoinFromDec(denom, coin.Amount), nil + } + + return NewDecCoinFromDec(denom, coin.Amount.Mul(srcUnit).Quo(dstUnit)), nil +} + +// NormalizeCoin try to convert a coin to the smallest unit registered, +// returns original one if failed. +func NormalizeCoin(coin Coin) Coin { + base, err := GetBaseDenom() + if err != nil { + return coin + } + newCoin, err := ConvertCoin(coin, base) + if err != nil { + return coin + } + return newCoin +} + +// NormalizeDecCoin try to convert a decimal coin to the smallest unit registered, +// returns original one if failed. +func NormalizeDecCoin(coin DecCoin) DecCoin { + base, err := GetBaseDenom() + if err != nil { + return coin + } + newCoin, err := ConvertDecCoin(coin, base) + if err != nil { + return coin + } + return newCoin +} + +// NormalizeCoins normalize and truncate a list of decimal coins +func NormalizeCoins(coins []DecCoin) Coins { + if coins == nil { + return nil + } + result := make([]Coin, 0, len(coins)) + + for _, coin := range coins { + newCoin, _ := NormalizeDecCoin(coin).TruncateDecimal() + result = append(result, newCoin) + } + + return result } diff --git a/types/denom_internal_test.go b/types/denom_internal_test.go index e540b28d57..8c957353eb 100644 --- a/types/denom_internal_test.go +++ b/types/denom_internal_test.go @@ -36,6 +36,7 @@ func (s *internalDenomTestSuite) TestRegisterDenom() { s.Require().Equal(ZeroDec(), res) // reset registration + baseDenom = "" denomUnits = map[string]Dec{} } @@ -52,6 +53,21 @@ func (s *internalDenomTestSuite) TestConvertCoins() { natomUnit := NewDecWithPrec(1, 9) // 10^-9 (nano) s.Require().NoError(RegisterDenom(natom, natomUnit)) + res, err := GetBaseDenom() + s.Require().NoError(err) + s.Require().Equal(res, natom) + s.Require().Equal(NormalizeCoin(NewCoin(uatom, NewInt(1))), NewCoin(natom, NewInt(1000))) + s.Require().Equal(NormalizeCoin(NewCoin(matom, NewInt(1))), NewCoin(natom, NewInt(1000000))) + s.Require().Equal(NormalizeCoin(NewCoin(atom, NewInt(1))), NewCoin(natom, NewInt(1000000000))) + + coins, err := ParseCoinsNormalized("1atom,1matom,1uatom") + s.Require().NoError(err) + s.Require().Equal(coins, Coins{ + Coin{natom, NewInt(1000000000)}, + Coin{natom, NewInt(1000000)}, + Coin{natom, NewInt(1000)}, + }) + testCases := []struct { input Coin denom string @@ -87,5 +103,90 @@ func (s *internalDenomTestSuite) TestConvertCoins() { } // reset registration + baseDenom = "" + denomUnits = map[string]Dec{} +} + +func (s *internalDenomTestSuite) TestConvertDecCoins() { + atomUnit := OneDec() // 1 (base denom unit) + s.Require().NoError(RegisterDenom(atom, atomUnit)) + + matomUnit := NewDecWithPrec(1, 3) // 10^-3 (milli) + s.Require().NoError(RegisterDenom(matom, matomUnit)) + + uatomUnit := NewDecWithPrec(1, 6) // 10^-6 (micro) + s.Require().NoError(RegisterDenom(uatom, uatomUnit)) + + natomUnit := NewDecWithPrec(1, 9) // 10^-9 (nano) + s.Require().NoError(RegisterDenom(natom, natomUnit)) + + res, err := GetBaseDenom() + s.Require().NoError(err) + s.Require().Equal(res, natom) + s.Require().Equal(NormalizeDecCoin(NewDecCoin(uatom, NewInt(1))), NewDecCoin(natom, NewInt(1000))) + s.Require().Equal(NormalizeDecCoin(NewDecCoin(matom, NewInt(1))), NewDecCoin(natom, NewInt(1000000))) + s.Require().Equal(NormalizeDecCoin(NewDecCoin(atom, NewInt(1))), NewDecCoin(natom, NewInt(1000000000))) + + coins, err := ParseCoinsNormalized("0.1atom,0.1matom,0.1uatom") + s.Require().NoError(err) + s.Require().Equal(coins, Coins{ + Coin{natom, NewInt(100000000)}, + Coin{natom, NewInt(100000)}, + Coin{natom, NewInt(100)}, + }) + + testCases := []struct { + input DecCoin + denom string + result DecCoin + expErr bool + }{ + {NewDecCoin("foo", ZeroInt()), atom, DecCoin{}, true}, + {NewDecCoin(atom, ZeroInt()), "foo", DecCoin{}, true}, + {NewDecCoin(atom, ZeroInt()), "FOO", DecCoin{}, true}, + + // 0.5atom + {NewDecCoinFromDec(atom, NewDecWithPrec(5, 1)), matom, NewDecCoin(matom, NewInt(500)), false}, // atom => matom + {NewDecCoinFromDec(atom, NewDecWithPrec(5, 1)), uatom, NewDecCoin(uatom, NewInt(500000)), false}, // atom => uatom + {NewDecCoinFromDec(atom, NewDecWithPrec(5, 1)), natom, NewDecCoin(natom, NewInt(500000000)), false}, // atom => natom + + {NewDecCoin(uatom, NewInt(5000000)), matom, NewDecCoin(matom, NewInt(5000)), false}, // uatom => matom + {NewDecCoin(uatom, NewInt(5000000)), natom, NewDecCoin(natom, NewInt(5000000000)), false}, // uatom => natom + {NewDecCoin(uatom, NewInt(5000000)), atom, NewDecCoin(atom, NewInt(5)), false}, // uatom => atom + + {NewDecCoin(matom, NewInt(5000)), natom, NewDecCoin(natom, NewInt(5000000000)), false}, // matom => natom + {NewDecCoin(matom, NewInt(5000)), uatom, NewDecCoin(uatom, NewInt(5000000)), false}, // matom => uatom + } + + for i, tc := range testCases { + res, err := ConvertDecCoin(tc.input, tc.denom) + s.Require().Equal( + tc.expErr, err != nil, + "unexpected error; tc: #%d, input: %s, denom: %s", i+1, tc.input, tc.denom, + ) + s.Require().Equal( + tc.result, res, + "invalid result; tc: #%d, input: %s, denom: %s", i+1, tc.input, tc.denom, + ) + } + + // reset registration + baseDenom = "" + denomUnits = map[string]Dec{} +} + +func (s *internalDenomTestSuite) TestDecOperationOrder() { + dec, err := NewDecFromStr("11") + s.Require().NoError(err) + s.Require().NoError(RegisterDenom("unit1", dec)) + dec, err = NewDecFromStr("100000011") + s.Require().NoError(RegisterDenom("unit2", dec)) + + coin, err := ConvertCoin(NewCoin("unit1", NewInt(100000011)), "unit2") + s.Require().NoError(err) + s.Require().Equal(coin, NewCoin("unit2", NewInt(11))) + + // reset registration + baseDenom = "" denomUnits = map[string]Dec{} } diff --git a/types/rest/rest_test.go b/types/rest/rest_test.go index 0a3e16b29d..8f873645d6 100644 --- a/types/rest/rest_test.go +++ b/types/rest/rest_test.go @@ -42,7 +42,7 @@ func TestBaseReq_Sanitize(t *testing.T) { func TestBaseReq_ValidateBasic(t *testing.T) { fromAddr := "cosmos1cq0sxam6x4l0sv9yz3a2vlqhdhvt2k6jtgcse0" - tenstakes, err := types.ParseCoins("10stake") + tenstakes, err := types.ParseCoinsNormalized("10stake") require.NoError(t, err) onestake, err := types.ParseDecCoins("1.0stake") require.NoError(t, err) diff --git a/types/simulation/rand_util_test.go b/types/simulation/rand_util_test.go index d68db7c6ab..c487625ed0 100644 --- a/types/simulation/rand_util_test.go +++ b/types/simulation/rand_util_test.go @@ -56,7 +56,7 @@ func TestRandStringOfLength(t *testing.T) { } func mustParseCoins(s string) sdk.Coins { - coins, err := sdk.ParseCoins(s) + coins, err := sdk.ParseCoinsNormalized(s) if err != nil { panic(err) } diff --git a/x/auth/vesting/client/cli/tx.go b/x/auth/vesting/client/cli/tx.go index 33668fadde..0974552c8a 100644 --- a/x/auth/vesting/client/cli/tx.go +++ b/x/auth/vesting/client/cli/tx.go @@ -58,7 +58,7 @@ timestamp.`, return err } - amount, err := sdk.ParseCoins(args[1]) + amount, err := sdk.ParseCoinsNormalized(args[1]) if err != nil { return err } diff --git a/x/bank/client/cli/tx.go b/x/bank/client/cli/tx.go index 64ea2ea217..21a2e6c330 100644 --- a/x/bank/client/cli/tx.go +++ b/x/bank/client/cli/tx.go @@ -46,7 +46,7 @@ ignored as it is implied from [from_key_or_address].`, return err } - coins, err := sdk.ParseCoins(args[2]) + coins, err := sdk.ParseCoinsNormalized(args[2]) if err != nil { return err } diff --git a/x/bank/client/testutil/cli_helpers.go b/x/bank/client/testutil/cli_helpers.go index 4dff74e2b5..92062a182b 100644 --- a/x/bank/client/testutil/cli_helpers.go +++ b/x/bank/client/testutil/cli_helpers.go @@ -87,7 +87,7 @@ ignored as it is implied from [from_key_or_address].`, return err } - coins, err := sdk.ParseCoins(args[2]) + coins, err := sdk.ParseCoinsNormalized(args[2]) if err != nil { return err } diff --git a/x/distribution/client/cli/tx.go b/x/distribution/client/cli/tx.go index 67635e5782..386174b083 100644 --- a/x/distribution/client/cli/tx.go +++ b/x/distribution/client/cli/tx.go @@ -256,7 +256,7 @@ $ %s tx distribution fund-community-pool 100uatom --from mykey } depositorAddr := clientCtx.GetFromAddress() - amount, err := sdk.ParseCoins(args[0]) + amount, err := sdk.ParseCoinsNormalized(args[0]) if err != nil { return err } @@ -315,12 +315,12 @@ Where proposal.json contains: return err } - amount, err := sdk.ParseCoins(proposal.Amount) + amount, err := sdk.ParseCoinsNormalized(proposal.Amount) if err != nil { return err } - deposit, err := sdk.ParseCoins(proposal.Deposit) + deposit, err := sdk.ParseCoinsNormalized(proposal.Deposit) if err != nil { return err } diff --git a/x/genutil/client/cli/gentx.go b/x/genutil/client/cli/gentx.go index b151290e5d..33a37760ed 100644 --- a/x/genutil/client/cli/gentx.go +++ b/x/genutil/client/cli/gentx.go @@ -116,7 +116,7 @@ $ %s gentx my-key-name --home=/path/to/home/dir --keyring-backend=os --chain-id= } amount, _ := cmd.Flags().GetString(cli.FlagAmount) - coins, err := sdk.ParseCoins(amount) + coins, err := sdk.ParseCoinsNormalized(amount) if err != nil { return errors.Wrap(err, "failed to parse coins") } diff --git a/x/gov/client/cli/tx.go b/x/gov/client/cli/tx.go index 5f04d9184c..b13786ede8 100644 --- a/x/gov/client/cli/tx.go +++ b/x/gov/client/cli/tx.go @@ -114,7 +114,7 @@ $ %s tx gov submit-proposal --title="Test Proposal" --description="My awesome pr return fmt.Errorf("failed to parse proposal: %w", err) } - amount, err := sdk.ParseCoins(proposal.Deposit) + amount, err := sdk.ParseCoinsNormalized(proposal.Deposit) if err != nil { return err } @@ -177,7 +177,7 @@ $ %s tx gov deposit 1 10stake --from mykey from := clientCtx.GetFromAddress() // Get amount of coins - amount, err := sdk.ParseCoins(args[1]) + amount, err := sdk.ParseCoinsNormalized(args[1]) if err != nil { return err } diff --git a/x/params/client/cli/tx.go b/x/params/client/cli/tx.go index fcc8080438..154722a144 100644 --- a/x/params/client/cli/tx.go +++ b/x/params/client/cli/tx.go @@ -73,7 +73,7 @@ Where proposal.json contains: proposal.Title, proposal.Description, proposal.Changes.ToParamChanges(), ) - deposit, err := sdk.ParseCoins(proposal.Deposit) + deposit, err := sdk.ParseCoinsNormalized(proposal.Deposit) if err != nil { return err } diff --git a/x/upgrade/client/cli/tx.go b/x/upgrade/client/cli/tx.go index 2a44cd5591..fd7a6ed760 100644 --- a/x/upgrade/client/cli/tx.go +++ b/x/upgrade/client/cli/tx.go @@ -61,7 +61,7 @@ func NewCmdSubmitUpgradeProposal() *cobra.Command { if err != nil { return err } - deposit, err := sdk.ParseCoins(depositStr) + deposit, err := sdk.ParseCoinsNormalized(depositStr) if err != nil { return err } @@ -110,7 +110,7 @@ func NewCmdSubmitCancelUpgradeProposal() *cobra.Command { return err } - deposit, err := sdk.ParseCoins(depositStr) + deposit, err := sdk.ParseCoinsNormalized(depositStr) if err != nil { return err } From be10bcb1633b20ae0510fcb08fa3fc1537ecde22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?colin=20axn=C3=A9r?= <25233464+colin-axner@users.noreply.github.com> Date: Mon, 16 Nov 2020 16:06:55 +0100 Subject: [PATCH 109/136] counterParty -> counterparty (#7946) * nit * fix spec and docs --- docs/ibc/custom.md | 2 +- x/ibc/core/05-port/types/module.go | 2 +- x/ibc/core/spec/05_callbacks.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/ibc/custom.md b/docs/ibc/custom.md index dd840ebf13..09cd27a951 100644 --- a/docs/ibc/custom.md +++ b/docs/ibc/custom.md @@ -45,7 +45,7 @@ func (k Keeper) OnChanOpenInit(ctx sdk.Context, portID string, channelID string, channelCap *capabilitytypes.Capability, - counterParty channeltypes.Counterparty, + counterparty channeltypes.Counterparty, version string, ) error { // OpenInit must claim the channelCapability that IBC passes into the callback diff --git a/x/ibc/core/05-port/types/module.go b/x/ibc/core/05-port/types/module.go index a9a7b50922..4c68673201 100644 --- a/x/ibc/core/05-port/types/module.go +++ b/x/ibc/core/05-port/types/module.go @@ -17,7 +17,7 @@ type IBCModule interface { portID string, channelID string, channelCap *capabilitytypes.Capability, - counterParty channeltypes.Counterparty, + counterparty channeltypes.Counterparty, version string, ) error diff --git a/x/ibc/core/spec/05_callbacks.md b/x/ibc/core/spec/05_callbacks.md index c276ae370e..dd74738025 100644 --- a/x/ibc/core/spec/05_callbacks.md +++ b/x/ibc/core/spec/05_callbacks.md @@ -18,7 +18,7 @@ type IBCModule interface { portId string, channelId string, channelCap *capability.Capability, - counterParty channeltypes.Counterparty, + counterparty channeltypes.Counterparty, version string, ) error From 2f6ebb7792e3eb38a835b04fe2ede992c372229b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 17 Nov 2020 08:05:24 +0100 Subject: [PATCH 110/136] build(deps): bump codecov/codecov-action from v1.0.14 to v1.0.15 (#7953) Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from v1.0.14 to v1.0.15. - [Release notes](https://github.com/codecov/codecov-action/releases) - [Commits](https://github.com/codecov/codecov-action/compare/v1.0.14...239febf655bba88b16ff5dea1d3135ea8663a1f9) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index afa753e232..06e85c907f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -151,7 +151,7 @@ jobs: sed -i.bak "/$(echo $filename | sed 's/\//\\\//g')/d" coverage.txt done if: env.GIT_DIFF - - uses: codecov/codecov-action@v1.0.14 + - uses: codecov/codecov-action@v1.0.15 with: file: ./coverage.txt if: env.GIT_DIFF From f962f3a28c3b91cf79ee31891d9235e65e3b8513 Mon Sep 17 00:00:00 2001 From: Jun Kimura Date: Tue, 17 Nov 2020 19:42:06 +0900 Subject: [PATCH 111/136] Fix int64 overflow error for height comparison (#7944) * fix int64 overflow for height comparison * apply suggestions from review Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com> --- x/ibc/core/02-client/types/height.go | 16 +++++++--------- x/ibc/core/02-client/types/height_test.go | 3 +++ 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/x/ibc/core/02-client/types/height.go b/x/ibc/core/02-client/types/height.go index 72af4d56b2..ab156e80de 100644 --- a/x/ibc/core/02-client/types/height.go +++ b/x/ibc/core/02-client/types/height.go @@ -2,6 +2,7 @@ package types import ( "fmt" + "math/big" "regexp" "strconv" "strings" @@ -54,18 +55,15 @@ func (h Height) Compare(other exported.Height) int64 { if !ok { panic(fmt.Sprintf("cannot compare against invalid height type: %T. expected height type: %T", other, h)) } - var cmp int64 + var a, b big.Int if h.VersionNumber != height.VersionNumber { - cmp = int64(h.VersionNumber) - int64(height.VersionNumber) + a.SetUint64(h.VersionNumber) + b.SetUint64(height.VersionNumber) } else { - cmp = int64(h.VersionHeight) - int64(height.VersionHeight) + a.SetUint64(h.VersionHeight) + b.SetUint64(height.VersionHeight) } - if cmp < 0 { - return -1 - } else if cmp > 0 { - return 1 - } - return 0 + return int64(a.Cmp(&b)) } // LT Helper comparison function returns true if h < other diff --git a/x/ibc/core/02-client/types/height_test.go b/x/ibc/core/02-client/types/height_test.go index 33d33fd714..0bd8f0848f 100644 --- a/x/ibc/core/02-client/types/height_test.go +++ b/x/ibc/core/02-client/types/height_test.go @@ -1,6 +1,7 @@ package types_test import ( + "math" "testing" "github.com/stretchr/testify/require" @@ -23,6 +24,8 @@ func TestCompareHeights(t *testing.T) { {"version number 1 is greater", types.NewHeight(7, 5), types.NewHeight(4, 5), 1}, {"version height 1 is lesser", types.NewHeight(3, 4), types.NewHeight(3, 9), -1}, {"version height 1 is greater", types.NewHeight(3, 8), types.NewHeight(3, 3), 1}, + {"version number is MaxUint64", types.NewHeight(math.MaxUint64, 1), types.NewHeight(0, 1), 1}, + {"version height is MaxUint64", types.NewHeight(1, math.MaxUint64), types.NewHeight(1, 0), 1}, {"height is equal", types.NewHeight(4, 4), types.NewHeight(4, 4), 0}, } From e93b18e60ec81ef10841460f00e166d201a76fcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?colin=20axn=C3=A9r?= <25233464+colin-axner@users.noreply.github.com> Date: Tue, 17 Nov 2020 12:40:12 +0100 Subject: [PATCH 112/136] self height uses GTE in self client check (#7945) Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- x/ibc/core/02-client/keeper/keeper.go | 6 +++--- x/ibc/core/02-client/keeper/keeper_test.go | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/x/ibc/core/02-client/keeper/keeper.go b/x/ibc/core/02-client/keeper/keeper.go index d3465e7669..7ebfa33555 100644 --- a/x/ibc/core/02-client/keeper/keeper.go +++ b/x/ibc/core/02-client/keeper/keeper.go @@ -220,9 +220,9 @@ func (k Keeper) ValidateSelfClient(ctx sdk.Context, clientState exported.ClientS } selfHeight := types.NewHeight(version, uint64(ctx.BlockHeight())) - if tmClient.LatestHeight.GT(selfHeight) { - return sdkerrors.Wrapf(types.ErrInvalidClient, "client has LatestHeight %d greater than chain height %d", - tmClient.LatestHeight, ctx.BlockHeight()) + if tmClient.LatestHeight.GTE(selfHeight) { + return sdkerrors.Wrapf(types.ErrInvalidClient, "client has LatestHeight %d greater than or equal to chain height %d", + tmClient.LatestHeight, selfHeight) } expectedProofSpecs := commitmenttypes.GetSDKSpecs() diff --git a/x/ibc/core/02-client/keeper/keeper_test.go b/x/ibc/core/02-client/keeper/keeper_test.go index 2ed2b2f032..c031ac37c9 100644 --- a/x/ibc/core/02-client/keeper/keeper_test.go +++ b/x/ibc/core/02-client/keeper/keeper_test.go @@ -152,7 +152,7 @@ func (suite *KeeperTestSuite) TestSetClientConsensusState() { } func (suite *KeeperTestSuite) TestValidateSelfClient() { - testClientHeight := types.NewHeight(0, uint64(suite.chainA.GetContext().BlockHeight())) + testClientHeight := types.NewHeight(0, uint64(suite.chainA.GetContext().BlockHeight()-1)) testCases := []struct { name string @@ -186,7 +186,7 @@ func (suite *KeeperTestSuite) TestValidateSelfClient() { }, { "invalid client height", - ibctmtypes.NewClientState(suite.chainA.ChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, types.NewHeight(0, testClientHeight.VersionHeight+10), commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), + ibctmtypes.NewClientState(suite.chainA.ChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, types.NewHeight(0, uint64(suite.chainA.GetContext().BlockHeight())), commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), false, }, { From 0647d897f58603846418e032d0931a5dbf6e5b35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?colin=20axn=C3=A9r?= <25233464+colin-axner@users.noreply.github.com> Date: Tue, 17 Nov 2020 13:55:33 +0100 Subject: [PATCH 113/136] add is frozen client state check to send packet (#7957) Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com> --- x/ibc/core/04-channel/keeper/packet.go | 5 +++++ x/ibc/core/04-channel/keeper/packet_test.go | 17 +++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/x/ibc/core/04-channel/keeper/packet.go b/x/ibc/core/04-channel/keeper/packet.go index 87ba9ce337..e86887eee9 100644 --- a/x/ibc/core/04-channel/keeper/packet.go +++ b/x/ibc/core/04-channel/keeper/packet.go @@ -67,6 +67,11 @@ func (k Keeper) SendPacket( return clienttypes.ErrConsensusStateNotFound } + // prevent accidental sends with clients that cannot be updated + if clientState.IsFrozen() { + return sdkerrors.Wrapf(clienttypes.ErrClientFrozen, "cannot send packet on a frozen client with ID %s", connectionEnd.GetClientID()) + } + // check if packet timeouted on the receiving chain latestHeight := clientState.GetLatestHeight() timeoutHeight := packet.GetTimeoutHeight() diff --git a/x/ibc/core/04-channel/keeper/packet_test.go b/x/ibc/core/04-channel/keeper/packet_test.go index f04b6ac100..f53ed79475 100644 --- a/x/ibc/core/04-channel/keeper/packet_test.go +++ b/x/ibc/core/04-channel/keeper/packet_test.go @@ -8,6 +8,7 @@ import ( "github.com/cosmos/cosmos-sdk/x/ibc/core/04-channel/types" host "github.com/cosmos/cosmos-sdk/x/ibc/core/24-host" "github.com/cosmos/cosmos-sdk/x/ibc/core/exported" + ibctmtypes "github.com/cosmos/cosmos-sdk/x/ibc/light-clients/07-tendermint/types" ibctesting "github.com/cosmos/cosmos-sdk/x/ibc/testing" ibcmock "github.com/cosmos/cosmos-sdk/x/ibc/testing/mock" ) @@ -111,6 +112,22 @@ func (suite *KeeperTestSuite) TestSendPacket() { packet = types.NewPacket(validPacketData, 1, channelA.PortID, channelA.ID, channelB.PortID, channelB.ID, timeoutHeight, disabledTimeoutTimestamp) channelCap = suite.chainA.GetChannelCapability(channelA.PortID, channelA.ID) }, false}, + {"client state is frozen", func() { + _, _, connA, _, channelA, channelB := suite.coordinator.Setup(suite.chainA, suite.chainB, types.UNORDERED) + + connection := suite.chainA.GetConnection(connA) + clientState := suite.chainA.GetClientState(connection.ClientId) + cs, ok := clientState.(*ibctmtypes.ClientState) + suite.Require().True(ok) + + // freeze client + cs.FrozenHeight = clienttypes.NewHeight(0, 1) + suite.chainA.App.IBCKeeper.ClientKeeper.SetClientState(suite.chainA.GetContext(), connection.ClientId, cs) + + packet = types.NewPacket(validPacketData, 1, channelA.PortID, channelA.ID, channelB.PortID, channelB.ID, timeoutHeight, disabledTimeoutTimestamp) + channelCap = suite.chainA.GetChannelCapability(channelA.PortID, channelA.ID) + }, false}, + {"timeout height passed", func() { clientA, _, _, _, channelA, channelB := suite.coordinator.Setup(suite.chainA, suite.chainB, types.UNORDERED) // use client state latest height for timeout From 9369a005576c55aa2f96db4f9d8ced1882a0f3eb Mon Sep 17 00:00:00 2001 From: Emmanuel T Odeke Date: Tue, 17 Nov 2020 06:27:12 -0800 Subject: [PATCH 114/136] x/simulation: make signals channel buffered to avoid missing signals (#7952) Invoking: c := make(chan os.Signal) signal.Notify(c, signals...) is explicitly called out as a bug in the os/signal docs and should instead make that channel buffered lest a signal could be lost. Fixes #7950 Co-authored-by: Aleksandr Bezobchuk --- x/simulation/simulate.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/simulation/simulate.go b/x/simulation/simulate.go index 7767cbbe50..fdcf224611 100644 --- a/x/simulation/simulate.go +++ b/x/simulation/simulate.go @@ -102,7 +102,7 @@ func SimulateFromSeed( opCount := 0 // Setup code to catch SIGTERM's - c := make(chan os.Signal) + c := make(chan os.Signal, 1) signal.Notify(c, os.Interrupt, syscall.SIGTERM, syscall.SIGINT) go func() { From ab7104865db622c1aecf2861b31f06b33a410ed1 Mon Sep 17 00:00:00 2001 From: atheeshp <59333759+atheeshp@users.noreply.github.com> Date: Tue, 17 Nov 2020 20:16:24 +0530 Subject: [PATCH 115/136] improve error messages for legacy rest endpoints (#7856) * improve error messages for legacy rest endpoints * add test * review changes * review changes * refactor * Update x/auth/client/rest/query.go Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: Aleksandr Bezobchuk --- x/auth/client/rest/decode.go | 6 +++ x/auth/client/rest/query.go | 30 +++++++++++++ x/auth/client/rest/rest_test.go | 74 +++++++++++++++++++++++++++++++++ 3 files changed, 110 insertions(+) diff --git a/x/auth/client/rest/decode.go b/x/auth/client/rest/decode.go index a3aa5ec750..d048f91b4c 100644 --- a/x/auth/client/rest/decode.go +++ b/x/auth/client/rest/decode.go @@ -55,6 +55,12 @@ func DecodeTxRequestHandlerFn(clientCtx client.Context) http.HandlerFunc { response := DecodeResp(stdTx) + err = checkSignModeError(w, clientCtx, response, "/cosmos/tx/v1beta1/txs/decode") + if err != nil { + // Error is already returned by checkSignModeError. + return + } + rest.PostProcessResponse(w, clientCtx, response) } } diff --git a/x/auth/client/rest/query.go b/x/auth/client/rest/query.go index 23afef323c..d60028abc5 100644 --- a/x/auth/client/rest/query.go +++ b/x/auth/client/rest/query.go @@ -17,6 +17,8 @@ import ( genutilrest "github.com/cosmos/cosmos-sdk/x/genutil/client/rest" ) +const unRegisteredConcreteTypeErr = "unregistered concrete type" + // query accountREST Handler func QueryAccountRequestHandlerFn(storeName string, clientCtx client.Context) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { @@ -107,6 +109,12 @@ func QueryTxsRequestHandlerFn(clientCtx client.Context) http.HandlerFunc { packStdTxResponse(w, clientCtx, txRes) } + err = checkSignModeError(w, clientCtx, searchResult, "/cosmos/tx/v1beta1/txs") + if err != nil { + // Error is already returned by checkSignModeError. + return + } + rest.PostProcessResponseBare(w, clientCtx, searchResult) } } @@ -143,6 +151,12 @@ func QueryTxRequestHandlerFn(clientCtx client.Context) http.HandlerFunc { rest.WriteErrorResponse(w, http.StatusNotFound, fmt.Sprintf("no transaction found with hash %s", hashHexStr)) } + err = checkSignModeError(w, clientCtx, output, "/cosmos/tx/v1beta1/tx/{txhash}") + if err != nil { + // Error is already returned by checkSignModeError. + return + } + rest.PostProcessResponseBare(w, clientCtx, output) } } @@ -182,3 +196,19 @@ func packStdTxResponse(w http.ResponseWriter, clientCtx client.Context, txRes *s return nil } + +func checkSignModeError(w http.ResponseWriter, ctx client.Context, resp interface{}, grpcEndPoint string) error { + // LegacyAmino used intentionally here to handle the SignMode errors + marshaler := ctx.LegacyAmino + + _, err := marshaler.MarshalJSON(resp) + if err != nil && strings.Contains(err.Error(), unRegisteredConcreteTypeErr) { + rest.WriteErrorResponse(w, http.StatusInternalServerError, + "This transaction was created with the new SIGN_MODE_DIRECT signing method, and therefore cannot be displayed"+ + " via legacy REST handlers, please use CLI or directly query the Tendermint RPC endpoint to query"+ + " this transaction. gRPC gateway endpoint is "+grpcEndPoint) + return err + } + + return nil +} diff --git a/x/auth/client/rest/rest_test.go b/x/auth/client/rest/rest_test.go index 86216dd53b..b03b615b6a 100644 --- a/x/auth/client/rest/rest_test.go +++ b/x/auth/client/rest/rest_test.go @@ -10,14 +10,19 @@ import ( "github.com/cosmos/cosmos-sdk/client/tx" "github.com/cosmos/cosmos-sdk/crypto/hd" "github.com/cosmos/cosmos-sdk/crypto/keyring" + "github.com/cosmos/cosmos-sdk/testutil" + clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" "github.com/cosmos/cosmos-sdk/testutil/network" "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/rest" "github.com/cosmos/cosmos-sdk/types/tx/signing" authclient "github.com/cosmos/cosmos-sdk/x/auth/client" + authcli "github.com/cosmos/cosmos-sdk/x/auth/client/cli" bankcli "github.com/cosmos/cosmos-sdk/x/bank/client/testutil" + ibccli "github.com/cosmos/cosmos-sdk/x/ibc/core/04-channel/client/cli" + txtypes "github.com/cosmos/cosmos-sdk/types/tx" rest2 "github.com/cosmos/cosmos-sdk/x/auth/client/rest" "github.com/cosmos/cosmos-sdk/x/auth/legacy/legacytx" "github.com/cosmos/cosmos-sdk/x/bank/types" @@ -298,6 +303,75 @@ func (s *IntegrationTestSuite) broadcastReq(stdTx legacytx.StdTx, mode string) ( return rest.PostRequest(fmt.Sprintf("%s/txs", val.APIAddress), "application/json", bz) } +func (s *IntegrationTestSuite) TestLegacyRestErrMessages() { + val := s.network.Validators[0] + + args := []string{ + "121", // dummy port-id + "21212121212", // dummy channel-id + fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--gas=%d", flags.DefaultGasLimit), + fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), + fmt.Sprintf("--%s=foobar", flags.FlagMemo), + } + + // created a dummy txn for IBC, eventually it fails. Our intension is to test the error message of querying a + // message which is signed with proto, since IBC won't support legacy amino at all we are considering a message from IBC module. + out, err := clitestutil.ExecTestCLICmd(val.ClientCtx, ibccli.NewChannelCloseInitCmd(), args) + s.Require().NoError(err) + + var txRes sdk.TxResponse + s.Require().NoError(val.ClientCtx.JSONMarshaler.UnmarshalJSON(out.Bytes(), &txRes)) + + s.Require().NoError(s.network.WaitForNextBlock()) + + // try to fetch the txn using legacy rest, this won't work since the ibc module doesn't support amino. + txJSON, err := rest.GetRequest(fmt.Sprintf("%s/txs/%s", val.APIAddress, txRes.TxHash)) + s.Require().NoError(err) + + var errResp rest.ErrorResponse + s.Require().NoError(val.ClientCtx.LegacyAmino.UnmarshalJSON(txJSON, &errResp)) + + errMsg := "This transaction was created with the new SIGN_MODE_DIRECT signing method, " + + "and therefore cannot be displayed via legacy REST handlers, please use CLI or directly query the Tendermint " + + "RPC endpoint to query this transaction." + + s.Require().Contains(errResp.Error, errMsg) + + // try fetching the txn using gRPC req, it will fetch info since it has proto codec. + grpcJSON, err := rest.GetRequest(fmt.Sprintf("%s/cosmos/tx/v1beta1/tx/%s", val.APIAddress, txRes.TxHash)) + s.Require().NoError(err) + + var getTxRes txtypes.GetTxResponse + s.Require().NoError(val.ClientCtx.JSONMarshaler.UnmarshalJSON(grpcJSON, &getTxRes)) + s.Require().Equal(getTxRes.Tx.Body.Memo, "foobar") + + // generate broadcast only txn. + args = append(args, fmt.Sprintf("--%s=true", flags.FlagGenerateOnly)) + out, err = clitestutil.ExecTestCLICmd(val.ClientCtx, ibccli.NewChannelCloseInitCmd(), args) + s.Require().NoError(err) + + txFile, cleanup := testutil.WriteToNewTempFile(s.T(), string(out.Bytes())) + txFileName := txFile.Name() + s.T().Cleanup(cleanup) + + // encode the generated txn. + out, err = clitestutil.ExecTestCLICmd(val.ClientCtx, authcli.GetEncodeCommand(), []string{txFileName}) + s.Require().NoError(err) + + bz, err := val.ClientCtx.LegacyAmino.MarshalJSON(rest2.DecodeReq{Tx: string(out.Bytes())}) + s.Require().NoError(err) + + // try to decode the txn using legacy rest, it fails. + res, err := rest.PostRequest(fmt.Sprintf("%s/txs/decode", val.APIAddress), "application/json", bz) + s.Require().NoError(err) + + s.Require().NoError(val.ClientCtx.LegacyAmino.UnmarshalJSON(res, &errResp)) + s.Require().Contains(errResp.Error, errMsg) +} + func TestIntegrationTestSuite(t *testing.T) { suite.Run(t, new(IntegrationTestSuite)) } From 715933b5f37d37928e8d4a97696b1ef8e8e6cdf3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?colin=20axn=C3=A9r?= <25233464+colin-axner@users.noreply.github.com> Date: Tue, 17 Nov 2020 16:01:34 +0100 Subject: [PATCH 116/136] reduce redundancy (#7959) Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- x/ibc/core/24-host/keys.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/x/ibc/core/24-host/keys.go b/x/ibc/core/24-host/keys.go index 51d2939577..21f4bc4309 100644 --- a/x/ibc/core/24-host/keys.go +++ b/x/ibc/core/24-host/keys.go @@ -79,7 +79,7 @@ func ClientStateKey() []byte { // FullConsensusStatePath takes a client identifier and returns a Path under which to // store the consensus state of a client. func FullConsensusStatePath(clientID string, height exported.Height) string { - return FullClientPath(clientID, fmt.Sprintf("%s/%s", KeyConsensusStatePrefix, height)) + return FullClientPath(clientID, ConsensusStatePath(height)) } // FullConsensusStateKey returns the store key for the consensus state of a particular @@ -177,7 +177,7 @@ func NextSequenceAckKey(portID, channelID string) []byte { // PacketCommitmentPath defines the commitments to packet data fields store path func PacketCommitmentPath(portID, channelID string, sequence uint64) string { - return fmt.Sprintf("%s/%s/%s", KeyPacketCommitmentPrefix, channelPath(portID, channelID), sequencePath(sequence)) + return fmt.Sprintf("%s/%d", PacketCommitmentPrefixPath(portID, channelID), sequence) } // PacketCommitmentKey returns the store key of under which a packet commitment @@ -193,7 +193,7 @@ func PacketCommitmentPrefixPath(portID, channelID string) string { // PacketAcknowledgementPath defines the packet acknowledgement store path func PacketAcknowledgementPath(portID, channelID string, sequence uint64) string { - return fmt.Sprintf("%s/%s/%s", KeyPacketAckPrefix, channelPath(portID, channelID), sequencePath(sequence)) + return fmt.Sprintf("%s/%d", PacketAcknowledgementPrefixPath(portID, channelID), sequence) } // PacketAcknowledgementKey returns the store key of under which a packet From a7435d03ebe4e588014d95a7bb40d61527c3e680 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?colin=20axn=C3=A9r?= <25233464+colin-axner@users.noreply.github.com> Date: Tue, 17 Nov 2020 16:18:16 +0100 Subject: [PATCH 117/136] fix validate basic check (#7962) Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com> --- x/ibc/core/04-channel/types/channel.go | 2 +- x/ibc/core/04-channel/types/channel_test.go | 27 +++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/x/ibc/core/04-channel/types/channel.go b/x/ibc/core/04-channel/types/channel.go index 9bddb84fa4..8513a8123d 100644 --- a/x/ibc/core/04-channel/types/channel.go +++ b/x/ibc/core/04-channel/types/channel.go @@ -55,7 +55,7 @@ func (ch Channel) GetVersion() string { // ValidateBasic performs a basic validation of the channel fields func (ch Channel) ValidateBasic() error { - if ch.State.String() == "" { + if ch.State == UNINITIALIZED { return ErrInvalidChannelState } if !(ch.Ordering == ORDERED || ch.Ordering == UNORDERED) { diff --git a/x/ibc/core/04-channel/types/channel_test.go b/x/ibc/core/04-channel/types/channel_test.go index 14592d4b4c..30fee4443b 100644 --- a/x/ibc/core/04-channel/types/channel_test.go +++ b/x/ibc/core/04-channel/types/channel_test.go @@ -8,6 +8,33 @@ import ( "github.com/cosmos/cosmos-sdk/x/ibc/core/04-channel/types" ) +func TestChannelValidateBasic(t *testing.T) { + counterparty := types.Counterparty{"portidone", "channelidone"} + testCases := []struct { + name string + channel types.Channel + expPass bool + }{ + {"valid channel", types.NewChannel(types.TRYOPEN, types.ORDERED, counterparty, connHops, version), true}, + {"invalid state", types.NewChannel(types.UNINITIALIZED, types.ORDERED, counterparty, connHops, version), false}, + {"invalid order", types.NewChannel(types.TRYOPEN, types.NONE, counterparty, connHops, version), false}, + {"more than 1 connection hop", types.NewChannel(types.TRYOPEN, types.ORDERED, counterparty, []string{"connection1", "connection2"}, version), false}, + {"invalid connection hop identifier", types.NewChannel(types.TRYOPEN, types.ORDERED, counterparty, []string{"(invalid)"}, version), false}, + {"invalid counterparty", types.NewChannel(types.TRYOPEN, types.ORDERED, types.NewCounterparty("(invalidport)", "channelidone"), connHops, version), false}, + } + + for i, tc := range testCases { + tc := tc + + err := tc.channel.ValidateBasic() + if tc.expPass { + require.NoError(t, err, "valid test case %d failed: %s", i, tc.name) + } else { + require.Error(t, err, "invalid test case %d passed: %s", i, tc.name) + } + } +} + func TestCounterpartyValidateBasic(t *testing.T) { testCases := []struct { name string From 03c8fb313da7871d1424a991124fdee663b089f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?colin=20axn=C3=A9r?= <25233464+colin-axner@users.noreply.github.com> Date: Tue, 17 Nov 2020 16:37:20 +0100 Subject: [PATCH 118/136] add domain separation between port and channel (#7960) Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- x/ibc/applications/transfer/types/keys.go | 4 +++- .../applications/transfer/types/keys_test.go | 24 +++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 x/ibc/applications/transfer/types/keys_test.go diff --git a/x/ibc/applications/transfer/types/keys.go b/x/ibc/applications/transfer/types/keys.go index f1fbffd951..1b0e45b9c7 100644 --- a/x/ibc/applications/transfer/types/keys.go +++ b/x/ibc/applications/transfer/types/keys.go @@ -1,6 +1,8 @@ package types import ( + "fmt" + "github.com/tendermint/tendermint/crypto" sdk "github.com/cosmos/cosmos-sdk/types" @@ -43,5 +45,5 @@ var ( // port associated with the channel ID so that the address created is actually // unique. func GetEscrowAddress(portID, channelID string) sdk.AccAddress { - return sdk.AccAddress(crypto.AddressHash([]byte(portID + channelID))) + return sdk.AccAddress(crypto.AddressHash([]byte(fmt.Sprintf("%s/%s", portID, channelID)))) } diff --git a/x/ibc/applications/transfer/types/keys_test.go b/x/ibc/applications/transfer/types/keys_test.go new file mode 100644 index 0000000000..9ab3314c2e --- /dev/null +++ b/x/ibc/applications/transfer/types/keys_test.go @@ -0,0 +1,24 @@ +package types_test + +import ( + "testing" + + "github.com/stretchr/testify/require" + + "github.com/cosmos/cosmos-sdk/x/ibc/applications/transfer/types" +) + +// Test that there is domain separation between the port id and the channel id otherwise an +// escrow address may overlap with another channel end +func TestGetEscrowAddress(t *testing.T) { + var ( + port1 = "transfer" + channel1 = "channel" + port2 = "transfercha" + channel2 = "nnel" + ) + + escrow1 := types.GetEscrowAddress(port1, channel1) + escrow2 := types.GetEscrowAddress(port2, channel2) + require.NotEqual(t, escrow1, escrow2) +} From b90bacb7750e2a8dea6cf725468e451abc71c3a0 Mon Sep 17 00:00:00 2001 From: Denis Fadeev Date: Wed, 18 Nov 2020 00:25:32 +0500 Subject: [PATCH 119/136] docs: add newline to versions file (#7938) Co-authored-by: Alessio Treglia --- docs/versions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/versions b/docs/versions index 8df09cc782..d5dc85eb28 100644 --- a/docs/versions +++ b/docs/versions @@ -1,2 +1,2 @@ master master -launchpad/backports v0.39 \ No newline at end of file +launchpad/backports v0.39 From 1cc8af8d9be1cd85f628c8dd641d6d191098637a Mon Sep 17 00:00:00 2001 From: Marie Gauthier Date: Tue, 17 Nov 2020 21:41:43 +0100 Subject: [PATCH 120/136] [docs]: update building modules section to reflect ADR31 (#7702) * Revert "Revert "Update old ref of RegisterQueryService"" This reverts commit 03e4c56de53938ccbf025a441e54b9842f7c4544. * Update intro, module-manager and messages-and-queries * Update messages-and-queries * Update handler * Update structure * Add doc related to RegisterMsgServiceDesc * Update docs/building-modules/handler.md Co-authored-by: Robert Zaremba * Update docs/building-modules/handler.md Co-authored-by: Robert Zaremba * Update docs/building-modules/handler.md Co-authored-by: Robert Zaremba * Update docs/building-modules/messages-and-queries.md * Update handler.md * Rename handler.md to msg-services.md * Update legacy msgs wording * Update messages-and-queries.md * Update docs/building-modules/msg-services.md Co-authored-by: Amaury Martiny * Update docs/building-modules/intro.md Co-authored-by: Amaury Martiny * Remove handler mention from intro.md * Update docs/building-modules/messages-and-queries.md Co-authored-by: Amaury Martiny * Update docs/building-modules/messages-and-queries.md Co-authored-by: Amaury Martiny * Update docs/building-modules/msg-services.md Co-authored-by: Amaury Martiny * Update docs/building-modules/keeper.md Co-authored-by: Amaury Martiny * Update docs/building-modules/msg-services.md Co-authored-by: Amaury Martiny * Address review comments * Use tag * Update docs/building-modules/intro.md Co-authored-by: Cory * Update docs/building-modules/intro.md Co-authored-by: Aaron Craelius * Update docs/building-modules/messages-and-queries.md Co-authored-by: Aaron Craelius * Update docs/building-modules/messages-and-queries.md Co-authored-by: Aaron Craelius * Update docs/building-modules/messages-and-queries.md Co-authored-by: Aaron Craelius * Update docs/core/transactions.md Co-authored-by: Aaron Craelius * Update docs/building-modules/messages-and-queries.md Co-authored-by: Aaron Craelius * Update docs/building-modules/messages-and-queries.md Co-authored-by: Aaron Craelius * Update docs/building-modules/messages-and-queries.md Co-authored-by: Aaron Craelius * Update docs/building-modules/messages-and-queries.md Co-authored-by: Aaron Craelius * Remove framework related explanation from docs * Update docs/building-modules/messages-and-queries.md Co-authored-by: Aaron Craelius * Update docs/building-modules/module-manager.md Co-authored-by: Aaron Craelius * Update docs/building-modules/module-manager.md Co-authored-by: Aaron Craelius * Update docs/building-modules/msg-services.md Co-authored-by: Aaron Craelius * Update docs/building-modules/msg-services.md Co-authored-by: Aaron Craelius * Update docs/building-modules/msg-services.md Co-authored-by: Aaron Craelius * Update docs/building-modules/msg-services.md Co-authored-by: Aaron Craelius * Update docs/building-modules/msg-services.md Co-authored-by: Aaron Craelius * Update docs/building-modules/msg-services.md Co-authored-by: Aaron Craelius * Update docs/building-modules/msg-services.md Co-authored-by: Aaron Craelius * Update docs/core/baseapp.md Co-authored-by: Aaron Craelius * Update docs/core/baseapp.md Co-authored-by: Aaron Craelius * Update beginblock-endblock.md * Update docs/core/baseapp.md Co-authored-by: Aaron Craelius * Update docs/core/transactions.md Co-authored-by: Aaron Craelius * Add deprecated notice * Update tx-lifecycle.md Co-authored-by: Robert Zaremba Co-authored-by: Amaury Martiny Co-authored-by: Aaron Craelius Co-authored-by: Cory Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- docs/basics/app-anatomy.md | 2 +- docs/basics/gas-fees.md | 2 +- docs/basics/tx-lifecycle.md | 14 +-- docs/building-modules/README.md | 2 +- docs/building-modules/beginblock-endblock.md | 2 +- docs/building-modules/handler.md | 96 ------------------ docs/building-modules/intro.md | 11 +-- docs/building-modules/keeper.md | 2 +- docs/building-modules/messages-and-queries.md | 47 ++++++--- docs/building-modules/module-manager.md | 18 ++-- docs/building-modules/msg-services.md | 97 +++++++++++++++++++ docs/building-modules/query-services.md | 4 +- docs/building-modules/structure.md | 1 + docs/core/baseapp.md | 6 +- docs/core/events.md | 4 +- docs/core/transactions.md | 6 +- docs/intro/sdk-app-architecture.md | 2 +- types/module/module.go | 6 +- x/auth/module.go | 2 +- x/capability/module.go | 2 +- x/ibc/testing/mock/mock.go | 2 +- x/mint/module.go | 2 +- x/params/module.go | 2 +- x/upgrade/module.go | 2 +- 24 files changed, 178 insertions(+), 156 deletions(-) delete mode 100644 docs/building-modules/handler.md create mode 100644 docs/building-modules/msg-services.md diff --git a/docs/basics/app-anatomy.md b/docs/basics/app-anatomy.md index e7bfc8cf0c..b45e22d6ba 100644 --- a/docs/basics/app-anatomy.md +++ b/docs/basics/app-anatomy.md @@ -158,7 +158,7 @@ Each module should also implement the `RegisterServices` method as part of the [ #### Handlers -The [handler](../building-modules/handler.md) refers to the part of the module responsible for processing the `Msg` after it is routed by `baseapp`. Handler functions of modules are only executed if the transaction is relayed from Tendermint by the `DeliverTx` ABCI message. If the transaction is relayed by `CheckTx`, only stateless checks and fee-related stateful checks are performed. To better understand the difference between `DeliverTx`and `CheckTx`, as well as the difference between stateful and stateless checks, click [here](./tx-lifecycle.md). +The [handler](../building-modules/msg-services.md#handler-type) refers to the part of the module responsible for processing the `Msg` after it is routed by `baseapp`. Handler functions of modules are only executed if the transaction is relayed from Tendermint by the `DeliverTx` ABCI message. If the transaction is relayed by `CheckTx`, only stateless checks and fee-related stateful checks are performed. To better understand the difference between `DeliverTx`and `CheckTx`, as well as the difference between stateful and stateless checks, click [here](./tx-lifecycle.md). The `handler` of a module is generally defined in a file called `handler.go` and consists of: diff --git a/docs/basics/gas-fees.md b/docs/basics/gas-fees.md index 76dc2aa83b..94cd59a562 100644 --- a/docs/basics/gas-fees.md +++ b/docs/basics/gas-fees.md @@ -44,7 +44,7 @@ By default, the Cosmos SDK makes use of two different gas meters, the [main gas `ctx.GasMeter()` is the main gas meter of the application. The main gas meter is initialized in `BeginBlock` via `setDeliverState`, and then tracks gas consumption during execution sequences that lead to state-transitions, i.e. those originally triggered by [`BeginBlock`](../core/baseapp.md#beginblock), [`DeliverTx`](../core/baseapp.md#delivertx) and [`EndBlock`](../core/baseapp.md#endblock). At the beginning of each `DeliverTx`, the main gas meter **must be set to 0** in the [`AnteHandler`](#antehandler), so that it can track gas consumption per-transaction. -Gas consumption can be done manually, generally by the module developer in the [`BeginBlocker`, `EndBlocker`](../building-modules/beginblock-endblock.md) or [`handler`](../building-modules/handler.md), but most of the time it is done automatically whenever there is a read or write to the store. This automatic gas consumption logic is implemented in a special store called [`GasKv`](../core/store.md#gaskv-store). +Gas consumption can be done manually, generally by the module developer in the [`BeginBlocker`, `EndBlocker`](../building-modules/beginblock-endblock.md) or [`Msg` service](../building-modules/msg-services.md), but most of the time it is done automatically whenever there is a read or write to the store. This automatic gas consumption logic is implemented in a special store called [`GasKv`](../core/store.md#gaskv-store). ### Block Gas Meter diff --git a/docs/basics/tx-lifecycle.md b/docs/basics/tx-lifecycle.md index 7e375fc4db..e025765546 100644 --- a/docs/basics/tx-lifecycle.md +++ b/docs/basics/tx-lifecycle.md @@ -179,7 +179,7 @@ explicitly ordered in the block proposal. ### DeliverTx -The `DeliverTx` ABCI function defined in [`baseapp`](../core/baseapp.md) does the bulk of the +The `DeliverTx` ABCI function defined in [`BaseApp`](../core/baseapp.md) does the bulk of the state transitions: it is run for each transaction in the block in sequential order as committed to during consensus. Under the hood, `DeliverTx` is almost identical to `CheckTx` but calls the [`runTx`](../core/baseapp.md#runtx) function in deliver mode instead of check mode. @@ -194,15 +194,15 @@ Instead of using their `checkState`, full-nodes use `deliverState`: `AnteHandler` will not compare `gas-prices` to the node's `min-gas-prices` since that value is local to each node - differing values across nodes would yield nondeterministic results. -- **Route and Handler:** While `CheckTx` would have exited, `DeliverTx` continues to run +- **`MsgServiceRouter`:** While `CheckTx` would have exited, `DeliverTx` continues to run [`runMsgs`](../core/baseapp.md#runtx-and-runmsgs) to fully execute each `Msg` within the transaction. - Since the transaction may have messages from different modules, `baseapp` needs to know which module - to find the appropriate Handler. Thus, the `route` function is called via the [module manager](../building-modules/module-manager.md) to - retrieve the route name and find the [`Handler`](../building-modules/handler.md) within the module. + Since the transaction may have messages from different modules, `BaseApp` needs to know which module + to find the appropriate handler. This is achieved using `BaseApp`'s `MsgServiceRouter` so that it can be processed by the module's [`Msg` service](../building-modules/msg-services.md). + For legacy `Msg` routing, the `Route` function is called via the [module manager](../building-modules/module-manager.md) to retrieve the route name and find the legacy [`Handler`](../building-modules/msg-services.md#handler-type) within the module. -- **Handler:** The `handler`, a step up from `AnteHandler`, is responsible for executing each +- **`Msg` service:** The `Msg` service, a step up from `AnteHandler`, is responsible for executing each message in the `Tx` and causes state transitions to persist in `deliverTxState`. It is defined - within a `Msg`'s module and writes to the appropriate stores within the module. + within a module `Msg` protobuf service and writes to the appropriate stores within the module. - **Gas:** While a `Tx` is being delivered, a `GasMeter` is used to keep track of how much gas is being used; if execution completes, `GasUsed` is set and returned in the diff --git a/docs/building-modules/README.md b/docs/building-modules/README.md index 43b8638ca9..22f3ffb75e 100644 --- a/docs/building-modules/README.md +++ b/docs/building-modules/README.md @@ -11,7 +11,7 @@ This repository contains documentation on concepts developers need to know in or 1. [Introduction to Cosmos SDK Modules](./intro.md) 2. [`AppModule` Interface and Module Manager](./module-manager.md) 3. [Messages and Queries](./messages-and-queries.md) -4. [`Handler`s - Processing Messages](./handler.md) +4. [`Msg` services - Processing Messages](./msg-services.md) 5. [Query Services - Processing Queries](./query-services.md) 6. [BeginBlocker and EndBlocker](./beginblock-endblock.md) 7. [`Keeper`s](./keeper.md) diff --git a/docs/building-modules/beginblock-endblock.md b/docs/building-modules/beginblock-endblock.md index b4f3abaff9..09a48df880 100644 --- a/docs/building-modules/beginblock-endblock.md +++ b/docs/building-modules/beginblock-endblock.md @@ -16,7 +16,7 @@ order: 6 When needed, `BeginBlocker` and `EndBlocker` are implemented as part of the [`AppModule` interface](./module-manager.md#appmodule). The `BeginBlock` and `EndBlock` methods of the interface implemented in `module.go` generally defer to `BeginBlocker` and `EndBlocker` methods respectively, which are usually implemented in a **`abci.go`** file. -The actual implementation of `BeginBlocker` and `EndBlocker` in `./abci.go` are very similar to that of a [`handler`](./handler.md): +The actual implementation of `BeginBlocker` and `EndBlocker` in `./abci.go` are very similar to that of a [`Msg` service](./msg-services.md): - They generally use the [`keeper`](./keeper.md) and [`ctx`](../core/context.md) to retrieve information about the latest state. - If needed, they use the `keeper` and `ctx` to trigger state-transitions. diff --git a/docs/building-modules/handler.md b/docs/building-modules/handler.md deleted file mode 100644 index 45e9a4c119..0000000000 --- a/docs/building-modules/handler.md +++ /dev/null @@ -1,96 +0,0 @@ - - -# Handlers - -A `Handler` designates a function that processes [`message`s](./messages-and-queries.md#messages). `Handler`s are specific to the module in which they are defined, and only process `message`s defined within the said module. They are called from `baseapp` during [`DeliverTx`](../core/baseapp.md#delivertx). {synopsis} - -## Pre-requisite Readings - -- [Module Manager](./module-manager.md) {prereq} -- [Messages and Queries](./messages-and-queries.md) {prereq} - -## `handler` type - -The `handler` type defined in the Cosmos SDK specifies the typical structure of a `handler` function. - -+++ https://github.com/cosmos/cosmos-sdk/blob/7d7821b9af132b0f6131640195326aa02b6751db/types/handler.go#L4 - -Let us break it down: - -- The [`Msg`](./messages-and-queries.md#messages) is the actual object being processed. -- The [`Context`](../core/context.md) contains all the necessary information needed to process the `msg`, as well as a cache-wrapped copy of the latest state. If the `msg` is succesfully processed, the modified version of the temporary state contained in the `ctx` will be written to the main state. -- The [`*Result`] returned to `baseapp`, which contains (among other things) information on the execution of the `handler` and [`events`](../core/events.md). - +++ https://github.com/cosmos/cosmos-sdk/blob/d55c1a26657a0af937fa2273b38dcfa1bb3cff9f/proto/cosmos/base/abci/v1beta1/abci.proto#L81-L95 - -## Implementation of a module `handler`s - -Module `handler`s are typically implemented in a `./handler.go` file inside the module's folder. The -[module manager](./module-manager.md) is used to add the module's `handler`s to the -[application's `router`](../core/baseapp.md#message-routing) via the `Route()` method. Typically, -the manager's `Route()` method simply constructs a Route that calls a `NewHandler()` method defined in `handler.go`, -which looks like the following: - -```go -func NewHandler(keeper Keeper) sdk.Handler { - return func(ctx sdk.Context, msg sdk.Msg) (*sdk.Result, error) { - ctx = ctx.WithEventManager(sdk.NewEventManager()) - switch msg := msg.(type) { - case *MsgType1: - return handleMsgType1(ctx, keeper, msg) - - case *MsgType2: - return handleMsgType2(ctx, keeper, msg) - - default: - return nil, sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "unrecognized %s message type: %T", ModuleName, msg) - } - } -} -``` - -First, the `handler` function sets a new `EventManager` to the context to isolate events per `msg`. -Then, this simple switch returns a `handler` function specific to the type of the received `message`. These `handler` functions are the ones that actually process `message`s, and usually follow the following 2 steps: - -- First, they perform *stateful* checks to make sure the `message` is valid. At this stage, the `message`'s `ValidateBasic()` method has already been called, meaning *stateless* checks on the message (like making sure parameters are correctly formatted) have already been performed. Checks performed in the `handler` can be more expensive and require access to the state. For example, a `handler` for a `transfer` message might check that the sending account has enough funds to actually perform the transfer. To access the state, the `handler` needs to call the [`keeper`'s](./keeper.md) getter functions. -- Then, if the checks are successfull, the `handler` calls the [`keeper`'s](./keeper.md) setter functions to actually perform the state transition. - -Before returning, `handler` functions generally emit one or multiple [`events`](../core/events.md) via the `EventManager` held in the `ctx`: - -```go -ctx.EventManager().EmitEvent( - sdk.NewEvent( - eventType, // e.g. sdk.EventTypeMessage for a message, types.CustomEventType for a custom event defined in the module - sdk.NewAttribute(attributeKey, attributeValue), - ), - ) -``` - -These `events` are relayed back to the underlying consensus engine and can be used by service providers to implement services around the application. Click [here](../core/events.md) to learn more about `events`. - -Finally, the `handler` function returns a `*sdk.Result` which contains the aforementioned `events` and an optional `Data` field. - -+++ https://github.com/cosmos/cosmos-sdk/blob/d55c1a26657a0af937fa2273b38dcfa1bb3cff9f/proto/cosmos/base/abci/v1beta1/abci.proto#L81-L95 - -Next is an example of how to return a `*Result` from the `gov` module: - -+++ https://github.com/cosmos/cosmos-sdk/blob/d55c1a26657a0af937fa2273b38dcfa1bb3cff9f/x/gov/handler.go#L67-L70 - -For a deeper look at `handler`s, see this [example implementation of a `handler` function](https://github.com/cosmos/cosmos-sdk/blob/d55c1a26657a0af937fa2273b38dcfa1bb3cff9f/x/gov/handler.go) from the `gov` module. - -The `handler` can then be registered from [`AppModule.Route()`](./module-manager.md#appmodule) as shown in the example below: - -+++ https://github.com/cosmos/cosmos-sdk/blob/228728cce2af8d494c8b4e996d011492139b04ab/x/gov/module.go#L143-L146 - -## Telemetry - -New [telemetry metrics](../core/telemetry.md) can be created from the `handler` when handling messages for instance. - -This is an example from the `auth` module: - -+++ https://github.com/cosmos/cosmos-sdk/blob/d55c1a26657a0af937fa2273b38dcfa1bb3cff9f/x/auth/vesting/handler.go#L68-L80 - -## Next {hide} - -Learn about [query services](./query-services.md) {hide} diff --git a/docs/building-modules/intro.md b/docs/building-modules/intro.md index 7b3a4c3faa..95d45fa7b6 100644 --- a/docs/building-modules/intro.md +++ b/docs/building-modules/intro.md @@ -17,7 +17,7 @@ The Cosmos SDK can be thought as the Ruby-on-Rails of blockchain development. It On top of this core, the Cosmos SDK enables developers to build modules that implement the business logic of their application. In other words, SDK modules implement the bulk of the logic of applications, while the core does the wiring and enables modules to be composed together. The end goal is to build a robust ecosystem of open-source SDK modules, making it increasingly easier to build complex blockchain applications. -SDK Modules can be seen as little state-machines within the state-machine. They generally define a subset of the state using one ore multiple `KVStore` in the [main multistore](../core/store.md), as well as a subset of [`message` types](./messages-and-queries.md#messages). These `message`s are routed by one of the main component of SDK core, [`baseapp`](../core/baseapp.md), to the [`handler`](./handler.md) of the module that define them. +SDK Modules can be seen as little state-machines within the state-machine. They generally define a subset of the state using one or more `KVStore`s in the [main multistore](../core/store.md), as well as a subset of [message types](./messages-and-queries.md#messages). These messages are routed by one of the main component of SDK core, [`BaseApp`](../core/baseapp.md), to the [`Msg` service](./msg-services.md) of the module that define them. ``` + @@ -76,12 +76,11 @@ While there is no definitive guidelines for writing modules, here are some impor ## Main Components of SDK Modules -Modules are by convention defined in the `.x/` subfolder (e.g. the `bank` module will be defined in the `./x/bank` folder). They generally share the same core components: +Modules are by convention defined in the `./x/` subfolder (e.g. the `bank` module will be defined in the `./x/bank` folder). They generally share the same core components: -- Custom [`message` types](./messages-and-queries.md#messages) to trigger state-transitions. -- A [`handler`](./handler.md) used to process messages when they are routed to the module by [`baseapp`](../core/baseapp.md#message-routing). -- A [`keeper`](./keeper.md), used to access the module's store(s) and update the state. -- A [query service](./query-services.md), used to process user queries when they are routed to the module by [`baseapp`](../core/baseapp.md#query-routing). +- A [`keeper`](./keeper.md), used to access the module's store(s) and update the state. +- A [`Msg` service](./messages-and-queries.md#messages) used to process messages when they are routed to the module by [`BaseApp`](../core/baseapp.md#message-routing) and trigger state-transitions. +- A [query service](./query-services.md), used to process user queries when they are routed to the module by [`BaseApp`](../core/baseapp.md#query-routing). - Interfaces, for end users to query the subset of the state defined by the module and create `message`s of the custom types defined in the module. In addition to these components, modules implement the `AppModule` interface in order to be managed by the [`module manager`](./module-manager.md). diff --git a/docs/building-modules/keeper.md b/docs/building-modules/keeper.md index 5c57faef1f..e84abfb01f 100644 --- a/docs/building-modules/keeper.md +++ b/docs/building-modules/keeper.md @@ -46,7 +46,7 @@ Of course, it is possible to define different types of internal `keeper`s for th ## Implementing Methods -`Keeper`s primarily expose getter and setter methods for the store(s) managed by their module. These methods should remain as simple as possible and strictly be limited to getting or setting the requested value, as validity checks should have already been performed via the `ValidateBasic()` method of the [`message`](./messages-and-queries.md#messages) and the [`handler`](./handler.md) when `keeper`s' methods are called. +`Keeper`s primarily expose getter and setter methods for the store(s) managed by their module. These methods should remain as simple as possible and strictly be limited to getting or setting the requested value, as validity checks should have already been performed via the `ValidateBasic()` method of the [`message`](./messages-and-queries.md#messages) and the [`Msg` server](./msg-services.md) when `keeper`s' methods are called. Typically, a *getter* method will present with the following signature diff --git a/docs/building-modules/messages-and-queries.md b/docs/building-modules/messages-and-queries.md index 7139044981..33afa51dbb 100644 --- a/docs/building-modules/messages-and-queries.md +++ b/docs/building-modules/messages-and-queries.md @@ -4,7 +4,7 @@ order: 3 # Messages and Queries -`Message`s and `Queries` are the two primary objects handled by modules. Most of the core components defined in a module, like `handler`s, `keeper`s and `querier`s, exist to process `message`s and `queries`. {synopsis} +`Msg`s and `Queries` are the two primary objects handled by modules. Most of the core components defined in a module, like `Msg` services, `keeper`s and `Query` services, exist to process `message`s and `queries`. {synopsis} ## Pre-requisite Readings @@ -12,15 +12,36 @@ order: 3 ## Messages -`Message`s are objects whose end-goal is to trigger state-transitions. They are wrapped in [transactions](../core/transactions.md), which may contain one or multiple of them. +`Msg`s are objects whose end-goal is to trigger state-transitions. They are wrapped in [transactions](../core/transactions.md), which may contain one or more of them. -When a transaction is relayed from the underlying consensus engine to the SDK application, it is first decoded by [`baseapp`](../core/baseapp.md). Then, each `message` contained in the transaction is extracted and routed to the appropriate module via `baseapp`'s `router` so that it can be processed by the module's [`handler`](./handler.md). For a more detailed explanation of the lifecycle of a transaction, click [here](../basics/tx-lifecycle.md). +When a transaction is relayed from the underlying consensus engine to the SDK application, it is first decoded by [`BaseApp`](../core/baseapp.md). Then, each message contained in the transaction is extracted and routed to the appropriate module via `BaseApp`'s `MsgServiceRouter` so that it can be processed by the module's [`Msg` service](./msg-services.md). For a more detailed explanation of the lifecycle of a transaction, click [here](../basics/tx-lifecycle.md). -Defining `message`s is the responsibility of module developers. Typically, they are defined as protobuf messages in a `proto/` directory (see more info about [conventions and naming](../core/encoding.md#faq)). The `message`'s definition usually includes a list of parameters needed to process the message that will be provided by end-users when they want to create a new transaction containing said `message`. +### `Msg` Services -Here's an example of a protobuf message definition: +Starting from v0.40, defining Protobuf `Msg` services is the recommended way to handle messages. A `Msg` protobuf service should be created per module, typically in `tx.proto` (see more info about [conventions and naming](../core/encoding.md#faq)). It must have an RPC service method defined for each message in the module. -+++ https://github.com/cosmos/cosmos-sdk/blob/d55c1a26657a0af937fa2273b38dcfa1bb3cff9f/proto/cosmos/gov/v1beta1/tx.proto#L15-L27 +See an example of a `Msg` service definition from `x/bank` module: + ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc1/proto/cosmos/bank/v1beta1/tx.proto#L10-L17 + +For backwards compatibility with [legacy Amino `Msg`s](#legacy-amino-msgs), existing `Msg` types should be used as the request parameter for `service` definitions. Newer `Msg` types which only support `service` definitions should use the more canonical `Msg...Request` names. + +`Msg` request types need to implement the `MsgRequest` interface which is a simplified version of the `Msg` interface described [below](#legacy-amino-msgs) with only `ValidateBasic()` and `GetSigners()` methods. + +Defining such `Msg` services allow to specify return types as part of `Msg` response using the canonical `Msg...Response` names. + +In addition, this generates client and server code. +The generated `MsgServer` interface defines the server API for the `Msg` service and its implementation is described as part of the [`Msg` services](./msg-services.md) documentation. + +A `RegisterMsgServer` method is also generated and should be used to register the module's `MsgServer` implementation in `RegisterServices` method from the [`AppModule` interface](./module-manager.md#appmodule). + +In order for clients (CLI and grpc-gateway) to have these URLs registered, the SDK provides the function `RegisterMsgServiceDesc(registry codectypes.InterfaceRegistry, sd *grpc.ServiceDesc)` that should be called inside module's [`RegisterInterfaces`](module-manager.md#appmodulebasic) method, using the proto-generated `&_Msg_serviceDesc` as `*grpc.ServiceDesc` argument. + +### Legacy Amino `Msg`s + +This way of defining messages is deprecated and using [`Msg` services](#msg-services) is preferred. + +Legacy `Msg`s can be defined as protobuf messages. The messages definition usually includes a list of parameters needed to process the message that will be provided by end-users when they want to create a new transaction containing said message. The `Msg` is typically accompanied by a standard constructor function, that is called from one of the [module's interface](./module-interfaces.md). `message`s also need to implement the [`Msg`] interface: @@ -30,17 +51,17 @@ It extends `proto.Message` and contains the following methods: - `Route() string`: Name of the route for this message. Typically all `message`s in a module have the same route, which is most often the module's name. - `Type() string`: Type of the message, used primarly in [events](../core/events.md). This should return a message-specific `string`, typically the denomination of the message itself. -- `ValidateBasic() error`: This method is called by `baseapp` very early in the processing of the `message` (in both [`CheckTx`](../core/baseapp.md#checktx) and [`DeliverTx`](../core/baseapp.md#delivertx)), in order to discard obviously invalid messages. `ValidateBasic` should only include *stateless* checks, i.e. checks that do not require access to the state. This usually consists in checking that the message's parameters are correctly formatted and valid (i.e. that the `amount` is strictly positive for a transfer). +- `ValidateBasic() error`: This method is called by `BaseApp` very early in the processing of the `message` (in both [`CheckTx`](../core/baseapp.md#checktx) and [`DeliverTx`](../core/baseapp.md#delivertx)), in order to discard obviously invalid messages. `ValidateBasic` should only include *stateless* checks, i.e. checks that do not require access to the state. This usually consists in checking that the message's parameters are correctly formatted and valid (i.e. that the `amount` is strictly positive for a transfer). - `GetSignBytes() []byte`: Return the canonical byte representation of the message. Used to generate a signature. - `GetSigners() []AccAddress`: Return the list of signers. The SDK will make sure that each `message` contained in a transaction is signed by all the signers listed in the list returned by this method. See an example implementation of a `message` from the `gov` module: -+++ https://github.com/cosmos/cosmos-sdk/blob/master/x/gov/types/msgs.go#L94-L136 ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc1/x/gov/types/msgs.go#L77-L125 ## Queries -A `query` is a request for information made by end-users of applications through an interface and processed by a full-node. A `query` is received by a full-node through its consensus engine and relayed to the application via the ABCI. It is then routed to the appropriate module via `baseapp`'s `queryrouter` so that it can be processed by the module's query service (./query-services.md). For a deeper look at the lifecycle of a `query`, click [here](../interfaces/query-lifecycle.md). +A `query` is a request for information made by end-users of applications through an interface and processed by a full-node. A `query` is received by a full-node through its consensus engine and relayed to the application via the ABCI. It is then routed to the appropriate module via `BaseApp`'s `queryrouter` so that it can be processed by the module's query service (./query-services.md). For a deeper look at the lifecycle of a `query`, click [here](../interfaces/query-lifecycle.md). ### gRPC Queries @@ -52,7 +73,7 @@ Here's an example of such a `Query` service definition: As `proto.Message`s, generated `Response` types implement by default `String()` method of [`fmt.Stringer`](https://golang.org/pkg/fmt/#Stringer). -A `RegisterQueryServer` method is also generated and should be used to register the module's query server in `RegisterQueryService` method from the [`AppModule` interface](./module-manager.md#appmodule). +A `RegisterQueryServer` method is also generated and should be used to register the module's query server in the `RegisterServices` method from the [`AppModule` interface](./module-manager.md#appmodule). ### Legacy Queries @@ -64,8 +85,8 @@ queryCategory/queryRoute/queryType/arg1/arg2/... where: -- `queryCategory` is the category of the `query`, typically `custom` for module queries. It is used to differentiate between different kinds of queries within `baseapp`'s [`Query` method](../core/baseapp.md#query). -- `queryRoute` is used by `baseapp`'s [`queryRouter`](../core/baseapp.md#query-routing) to map the `query` to its module. Usually, `queryRoute` should be the name of the module. +- `queryCategory` is the category of the `query`, typically `custom` for module queries. It is used to differentiate between different kinds of queries within `BaseApp`'s [`Query` method](../core/baseapp.md#query). +- `queryRoute` is used by `BaseApp`'s [`queryRouter`](../core/baseapp.md#query-routing) to map the `query` to its module. Usually, `queryRoute` should be the name of the module. - `queryType` is used by the module's [`querier`](./query-services.md#legacy-queriers) to map the `query` to the appropriate `querier function` within the module. - `args` are the actual arguments needed to process the `query`. They are filled out by the end-user. Note that for bigger queries, you might prefer passing arguments in the `Data` field of the request `req` instead of the `path`. @@ -87,4 +108,4 @@ See following examples: ## Next {hide} -Learn about [`handler`s](./handler.md) {hide} \ No newline at end of file +Learn about [`Msg` services](./msg-services.md) {hide} diff --git a/docs/building-modules/module-manager.md b/docs/building-modules/module-manager.md index 7c6ead627b..cd8cc4b9ec 100644 --- a/docs/building-modules/module-manager.md +++ b/docs/building-modules/module-manager.md @@ -62,17 +62,17 @@ It does not have its own manager, and exists separately from [`AppModule`](#appm The `AppModule` interface defines the inter-dependent methods modules need to implement. -+++ https://github.com/cosmos/cosmos-sdk/blob/228728cce2af8d494c8b4e996d011492139b04ab/types/module/module.go#L160-L182 ++++ https://github.com/cosmos/cosmos-sdk/blob/b4cce159bcc6a32ac78245c6866dd87c73f3720d/types/module/module.go#L160-L182 `AppModule`s are managed by the [module manager](#manager). This interface embeds the `AppModuleGenesis` interface so that the manager can access all the independent and genesis inter-dependent methods of the module. This means that a concrete type implementing the `AppModule` interface must either implement all the methods of `AppModuleGenesis` (and by extension `AppModuleBasic`), or include a concrete type that does as parameter. Let us go through the methods of `AppModule`: - `RegisterInvariants(sdk.InvariantRegistry)`: Registers the [`invariants`](./invariants.md) of the module. If the invariants deviates from its predicted value, the [`InvariantRegistry`](./invariants.md#registry) triggers appropriate logic (most often the chain will be halted). -- `Route()`: Returns the route for [`message`s](./messages-and-queries.md#messages) to be routed to the module by [`baseapp`](../core/baseapp.md#message-routing). -- `QuerierRoute()` (deprecated): Returns the name of the module's query route, for [`queries`](./messages-and-queries.md#queries) to be routes to the module by [`baseapp`](../core/baseapp.md#query-routing). +- `Route()`: Returns the route for [`message`s](./messages-and-queries.md#messages) to be routed to the module by [`BaseApp`](../core/baseapp.md#message-routing). +- `QuerierRoute()` (deprecated): Returns the name of the module's query route, for [`queries`](./messages-and-queries.md#queries) to be routes to the module by [`BaseApp`](../core/baseapp.md#query-routing). - `LegacyQuerierHandler(*codec.LegacyAmino)` (deprecated): Returns a [`querier`](./query-services.md#legacy-queriers) given the query `path`, in order to process the `query`. -- `RegisterQueryService(grpc.Server)`: Allows a module to register a gRPC query service. +- `RegisterServices(Configurator)`: Allows a module to register services. - `BeginBlock(sdk.Context, abci.RequestBeginBlock)`: This method gives module developers the option to implement logic that is automatically triggered at the beginning of each block. Implement empty if no logic needs to be triggered at the beginning of each block for this module. - `EndBlock(sdk.Context, abci.RequestEndBlock)`: This method gives module developers the option to implement logic that is automatically triggered at the beginning of each block. This is also where the module can inform the underlying consensus engine of validator set changes (e.g. the `staking` module). Implement empty if no logic needs to be triggered at the beginning of each block for this module. @@ -80,7 +80,7 @@ Let us go through the methods of `AppModule`: Typically, the various application module interfaces are implemented in a file called `module.go`, located in the module's folder (e.g. `./x/module/module.go`). -Almost every module need to implement the `AppModuleBasic` and `AppModule` interfaces. If the module is only used for genesis, it will implement `AppModuleGenesis` instead of `AppModule`. The concrete type that implements the interface can add parameters that are required for the implementation of the various methods of the interface. For example, the `Route()` function often calls a `NewHandler(k keeper)` function defined in [`handler.go`](./handler.md) and therefore needs to pass the module's [`keeper`](./keeper.md) as parameter. +Almost every module needs to implement the `AppModuleBasic` and `AppModule` interfaces. If the module is only used for genesis, it will implement `AppModuleGenesis` instead of `AppModule`. The concrete type that implements the interface can add parameters that are required for the implementation of the various methods of the interface. For example, the `Route()` function often calls a `NewHandler(k keeper)` function defined in [`handler.go`](./msg-services.md#handler-type) and therefore needs to pass the module's [`keeper`](./keeper.md) as a parameter. ```go // example @@ -134,12 +134,12 @@ The module manager is used throughout the application whenever an action on a co - `SetOrderBeginBlockers(moduleNames ...string)`: Sets the order in which the `BeginBlock()` function of each module will be called at the beginning of each block. This function is generally called from the application's main [constructor function](../basics/app-anatomy.md#constructor-function). - `SetOrderEndBlockers(moduleNames ...string)`: Sets the order in which the `EndBlock()` function of each module will be called at the beginning of each block. This function is generally called from the application's main [constructor function](../basics/app-anatomy.md#constructor-function). - `RegisterInvariants(ir sdk.InvariantRegistry)`: Registers the [invariants](./invariants.md) of each module. -- `RegisterRoutes(router sdk.Router, queryRouter sdk.QueryRouter, legacyQuerierCdc *codec.LegacyAmino)`: Registers module routes to the application's `router`, in order to route [`message`s](./messages-and-queries.md#messages) to the appropriate [`handler`](./handler.md), and module query routes to the application's `queryRouter`, in order to route [`queries`](./messages-and-queries.md#queries) to the appropriate [`querier`](./query-services.md#legacy-queriers). -- `RegisterQueryServices(grpcRouter grpc.Server)`: Registers all module gRPC query services. +- `RegisterRoutes(router sdk.Router, queryRouter sdk.QueryRouter, legacyQuerierCdc *codec.LegacyAmino)`: Registers legacy [`Msg`](./messages-and-queries.md#messages) and [`querier`](./query-services.md#legacy-queriers) routes. +- `RegisterServices(cfg Configurator)`: Registers all module services. - `InitGenesis(ctx sdk.Context, cdc codec.JSONMarshaler, genesisData map[string]json.RawMessage)`: Calls the [`InitGenesis`](./genesis.md#initgenesis) function of each module when the application is first started, in the order defined in `OrderInitGenesis`. Returns an `abci.ResponseInitChain` to the underlying consensus engine, which can contain validator updates. - `ExportGenesis(ctx sdk.Context, cdc codec.JSONMarshaler)`: Calls the [`ExportGenesis`](./genesis.md#exportgenesis) function of each module, in the order defined in `OrderExportGenesis`. The export constructs a genesis file from a previously existing state, and is mainly used when a hard-fork upgrade of the chain is required. -- `BeginBlock(ctx sdk.Context, req abci.RequestBeginBlock)`: At the beginning of each block, this function is called from [`baseapp`](../core/baseapp.md#beginblock) and, in turn, calls the [`BeginBlock`](./beginblock-endblock.md) function of each module, in the order defined in `OrderBeginBlockers`. It creates a child [context](../core/context.md) with an event manager to aggregate [events](../core/events.md) emitted from all modules. The function returns an `abci.ResponseBeginBlock` which contains the aforementioned events. -- `EndBlock(ctx sdk.Context, req abci.RequestEndBlock)`: At the end of each block, this function is called from [`baseapp`](../core/baseapp.md#endblock) and, in turn, calls the [`EndBlock`](./beginblock-endblock.md) function of each module, in the order defined in `OrderEndBlockers`. It creates a child [context](../core/context.md) with an event manager to aggregate [events](../core/events.md) emitted from all modules. The function returns an `abci.ResponseEndBlock` which contains the aforementioned events, as well as validator set updates (if any). +- `BeginBlock(ctx sdk.Context, req abci.RequestBeginBlock)`: At the beginning of each block, this function is called from [`BaseApp`](../core/baseapp.md#beginblock) and, in turn, calls the [`BeginBlock`](./beginblock-endblock.md) function of each module, in the order defined in `OrderBeginBlockers`. It creates a child [context](../core/context.md) with an event manager to aggregate [events](../core/events.md) emitted from all modules. The function returns an `abci.ResponseBeginBlock` which contains the aforementioned events. +- `EndBlock(ctx sdk.Context, req abci.RequestEndBlock)`: At the end of each block, this function is called from [`BaseApp`](../core/baseapp.md#endblock) and, in turn, calls the [`EndBlock`](./beginblock-endblock.md) function of each module, in the order defined in `OrderEndBlockers`. It creates a child [context](../core/context.md) with an event manager to aggregate [events](../core/events.md) emitted from all modules. The function returns an `abci.ResponseEndBlock` which contains the aforementioned events, as well as validator set updates (if any). Here's an example of a concrete integration within an application: diff --git a/docs/building-modules/msg-services.md b/docs/building-modules/msg-services.md new file mode 100644 index 0000000000..0cde42b195 --- /dev/null +++ b/docs/building-modules/msg-services.md @@ -0,0 +1,97 @@ + +# `Msg` Services + +A `Msg` Service processes [messages](./messages-and-queries.md#messages). `Msg` Services are specific to the module in which they are defined, and only process messages defined within the said module. They are called from `BaseApp` during [`DeliverTx`](../core/baseapp.md#delivertx). {synopsis} + +## Pre-requisite Readings + +- [Module Manager](./module-manager.md) {prereq} +- [Messages and Queries](./messages-and-queries.md) {prereq} + +## Implementation of a module `Msg` service + +All `Msg` processing is done by a [`Msg`](messages-and-queries.md#msg-services) protobuf service. Each module should define a `Msg` service, which will be responsible for request and response serialization. + +As further described in [ADR 031](../architecture/adr-031-msg-service.md), this approach has the advantage of clearly specifying return types and generating server and client code. + +When possible, the existing module's [`Keeper`](keeper.md) should implement `MsgServer`, otherwise a `msgServer` struct that embeds the `Keeper` can be created, typically in `./keeper/msg_server.go`: + ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc1/x/bank/keeper/msg_server.go#L14-L16 + +`msgServer` methods can retrieve the `sdk.Context` from the `context.Context` parameter method using the `sdk.UnwrapSDKContext`: + ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc1/x/bank/keeper/msg_server.go#L27 + +`Msg` processing usually follows these 2 steps: + +- First, they perform *stateful* checks to make sure the `message` is valid. At this stage, the `message`'s `ValidateBasic()` method has already been called, meaning *stateless* checks on the message (like making sure parameters are correctly formatted) have already been performed. Checks performed in the `msgServer` method can be more expensive and require access to the state. For example, a `msgServer` method for a `transfer` message might check that the sending account has enough funds to actually perform the transfer. To access the state, the `msgServer` method needs to call the [`keeper`'s](./keeper.md) getter functions. +- Then, if the checks are successful, the `msgServer` method calls the [`keeper`'s](./keeper.md) setter functions to actually perform the state transition. + +Before returning, `msgServer` methods generally emit one or more [events](../core/events.md) via the `EventManager` held in the `ctx`: + +```go +ctx.EventManager().EmitEvent( + sdk.NewEvent( + eventType, // e.g. sdk.EventTypeMessage for a message, types.CustomEventType for a custom event defined in the module + sdk.NewAttribute(attributeKey, attributeValue), + ), + ) +``` + +These events are relayed back to the underlying consensus engine and can be used by service providers to implement services around the application. Click [here](../core/events.md) to learn more about events. + +The invoked `msgServer` method returns a `proto.Message` response and an `error`. These return values are then wrapped into an `*sdk.Result` or an `error` using `sdk.WrapServiceResult(ctx sdk.Context, res proto.Message, err error)`: + ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc2/baseapp/msg_service_router.go#L104 + +This method takes care of marshaling the `res` parameter to protobuf and attaching any events on the `ctx.EventManager()` to the `sdk.Result`. + ++++ https://github.com/cosmos/cosmos-sdk/blob/d55c1a26657a0af937fa2273b38dcfa1bb3cff9f/proto/cosmos/base/abci/v1beta1/abci.proto#L81-L95 + +## Legacy Amino `Msg`s + +### `handler` type + +The `handler` type defined in the Cosmos SDK will be deprecated in favor of [`Msg` Services](#implementation-of-a-module-msg-service). + +Here is the typical structure of a `handler` function: + ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc2/types/handler.go#L4 + +Let us break it down: + +- The [`Msg`](./messages-and-queries.md#messages) is the actual object being processed. +- The [`Context`](../core/context.md) contains all the necessary information needed to process the `msg`, as well as a cache-wrapped copy of the latest state. If the `msg` is succesfully processed, the modified version of the temporary state contained in the `ctx` will be written to the main state. +- The [`*Result`] returned to `BaseApp` contains (among other things) information on the execution of the `handler` and [events](../core/events.md). + +Module `handler`s are typically implemented in a `./handler.go` file inside the module's folder. The [module manager](./module-manager.md) is used to add the module's `handler`s to the +[application's `router`](../core/baseapp.md#message-routing) via the `Route()` method. Typically, +the manager's `Route()` method simply constructs a Route that calls a `NewHandler()` method defined in `handler.go`. + ++++ https://github.com/cosmos/cosmos-sdk/blob/228728cce2af8d494c8b4e996d011492139b04ab/x/gov/module.go#L143-L146 + +### Implementation + +`NewHandler` function dispatches a `Msg` to appropriate handler function, usually by using a switch statement: + ++++ https://github.com/cosmos/cosmos-sdk/blob/d55c1a26657a0af937fa2273b38dcfa1bb3cff9f/x/bank/handler.go#L13-L29 + +First, `NewHandler` function sets a new `EventManager` to the context to isolate events per `msg`. +Then, a simple switch calls the appropriate `handler` based on the `Msg` type. + +In this regard, `handler`s functions need to be implemented for each module `Msg`. This will also involve manual handler registration of `Msg` types. +`handler`s functions should return a `*Result` and an `error`. + +## Telemetry + +New [telemetry metrics](../core/telemetry.md) can be created from `msgServer` methods when handling messages. + +This is an example from the `x/auth/vesting` module: + ++++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0-rc1/x/auth/vesting/msg_server.go#L73-L85 + +## Next {hide} + +Learn about [query services](./query-services.md) {hide} diff --git a/docs/building-modules/query-services.md b/docs/building-modules/query-services.md index fa7a6e0bae..fb64a2e1aa 100644 --- a/docs/building-modules/query-services.md +++ b/docs/building-modules/query-services.md @@ -4,7 +4,7 @@ order: 5 # Query Services -A query service processes [`queries`](./messages-and-queries.md#queries). Query services are specific to the module in which they are defined, and only process `queries` defined within said module. They are called from `baseapp`'s [`Query` method](../core/baseapp.md#query). {synopsis} +A query service processes [`queries`](./messages-and-queries.md#queries). Query services are specific to the module in which they are defined, and only process `queries` defined within said module. They are called from `BaseApp`'s [`Query` method](../core/baseapp.md#query). {synopsis} ## Pre-requisite Readings @@ -22,7 +22,7 @@ Let us break it down: - The `path` is an array of `string`s that contains the type of the query, and that can also contain `query` arguments. See [`queries`](./messages-and-queries.md#queries) for more information. - The `req` itself is primarily used to retrieve arguments if they are too large to fit in the `path`. This is done using the `Data` field of `req`. - The [`Context`](../core/context.md) contains all the necessary information needed to process the `query`, as well as a cache-wrapped copy of the latest state. It is primarily used by the [`keeper`](./keeper.md) to access the state. -- The result `res` returned to `baseapp`, marshalled using the application's [`codec`](../core/encoding.md). +- The result `res` returned to `BaseApp`, marshalled using the application's [`codec`](../core/encoding.md). ## Implementation of a module query service diff --git a/docs/building-modules/structure.md b/docs/building-modules/structure.md index cdc2c6983c..79c353a2ce 100644 --- a/docs/building-modules/structure.md +++ b/docs/building-modules/structure.md @@ -25,6 +25,7 @@ x/{module} │   ├── invariants.go │   ├── genesis.go │   ├── keeper.go +│   ├── msg_server.go │   ├── ... │   └── querier.go │   └── grpc_query.go diff --git a/docs/core/baseapp.md b/docs/core/baseapp.md index c4ea2c9faf..0b9417cfe6 100644 --- a/docs/core/baseapp.md +++ b/docs/core/baseapp.md @@ -192,7 +192,7 @@ When messages and queries are received by the application, they must be routed t ### Message Routing -[`Message`s](#../building-modules/messages-and-queries.md#messages) need to be routed after they are extracted from transactions, which are sent from the underlying Tendermint engine via the [`CheckTx`](#checktx) and [`DeliverTx`](#delivertx) ABCI messages. To do so, `baseapp` holds a `router` which maps `paths` (`string`) to the appropriate module [`handler`](../building-modules/handler.md) using the `.Route(ctx sdk.Context, path string)` function. Usually, the `path` is the name of the module. +[Messages](#../building-modules/messages-and-queries.md#messages) need to be routed after they are extracted from transactions, which are sent from the underlying Tendermint engine via the [`CheckTx`](#checktx) and [`DeliverTx`](#delivertx) ABCI messages. To do so, `BaseApp` holds a router which maps string paths to the appropriate module [handler](../building-modules/msg-services.md#handler-type) using the `.Route(ctx sdk.Context, path string)` function. Usually, the `path` is the name of the module. The [default router included in baseapp](https://github.com/cosmos/cosmos-sdk/blob/master/baseapp/router.go) is stateless. However, some applications may want to make use of more stateful routing mechanisms such as allowing governance to disable certain routes or point them to new modules for upgrade purposes. For this reason, the `sdk.Context` is also passed into the `Route` function of the [Router interface](https://github.com/cosmos/cosmos-sdk/blob/master/types/router.go#L12). For a stateless router that doesn't want to make use of this, can just ignore the ctx. @@ -285,7 +285,7 @@ Before the first transaction of a given block is processed, a [volatile state](# `DeliverTx` performs the **exact same steps as `CheckTx`**, with a little caveat at step 3 and the addition of a fifth step: 1. The `AnteHandler` does **not** check that the transaction's `gas-prices` is sufficient. That is because the `min-gas-prices` value `gas-prices` is checked against is local to the node, and therefore what is enough for one full-node might not be for another. This means that the proposer can potentially include transactions for free, although they are not incentivised to do so, as they earn a bonus on the total fee of the block they propose. -2. For each `message` in the transaction, route to the appropriate module's [`handler`](../building-modules/handler.md). Additional _stateful_ checks are performed, and the cache-wrapped multistore held in `deliverState`'s `context` is updated by the module's `keeper`. If the `handler` returns successfully, the cache-wrapped multistore held in `context` is written to `deliverState` `CacheMultiStore`. +2. For each message in the transaction, route to the appropriate module's [`handler`](../building-modules/msg-services.md#handler-type). Additional _stateful_ checks are performed, and the cache-wrapped multistore held in `deliverState`'s `context` is updated by the module's `keeper`. If the `handler` returns successfully, the cache-wrapped multistore held in `context` is written to `deliverState` `CacheMultiStore`. During step 5., each read/write to the store increases the value of `GasConsumed`. You can find the default cost of each operation: @@ -342,7 +342,7 @@ Click [here](../basics/gas-fees.md#antehandler) for more on the `anteHandler`. `RunMsgs` is called from `RunTx` with `runTxModeCheck` as parameter to check the existence of a route for each message the transaction, and with `runTxModeDeliver` to actually process the `message`s. -First, it retreives the `message`'s `route` using the `Msg.Route()` method. Then, using the application's [`router`](#routing) and the `route`, it checks for the existence of a `handler`. At this point, if `mode == runTxModeCheck`, `RunMsgs` returns. If instead `mode == runTxModeDeliver`, the [`handler`](../building-modules/handler.md) function for the message is executed, before `RunMsgs` returns. +First, it retreives the message's `route` using the `Msg.Route()` method. Then, using the application's [`router`](#routing) and the `route`, it checks for the existence of a `handler`. At this point, if `mode == runTxModeCheck`, `RunMsgs` returns. If instead `mode == runTxModeDeliver`, the [`handler`](../building-modules/msg-services.md#handler-type) function for the message is executed, before `RunMsgs` returns. ## Other ABCI Messages diff --git a/docs/core/events.md b/docs/core/events.md index f2407bcf2e..d7fe2b8e13 100644 --- a/docs/core/events.md +++ b/docs/core/events.md @@ -32,7 +32,7 @@ Events are returned to the underlying consensus engine in the response of the fo - [`DeliverTx`](./baseapp.md#delivertx) Events, the `type` and `attributes`, are defined on a **per-module basis** in the module's -`/types/events.go` file, and triggered from the module's [`handler`](../building-modules/handler.md) +`/types/events.go` file, and triggered from the module's [`Msg` service](../building-modules/msg-services.md) via the [`EventManager`](#eventmanager). In addition, each module documents its events under `spec/xx_events.md`. @@ -68,7 +68,7 @@ func NewHandler(keeper Keeper) sdk.Handler { switch msg := msg.(type) { ``` -See the [`Handler`](../building-modules/handler.md) concept doc for a more detailed +See the [`Msg` services](../building-modules/msg-services.md) concept doc for a more detailed view on how to typically implement `Events` and use the `EventManager` in modules. ## Subscribing to Events diff --git a/docs/core/transactions.md b/docs/core/transactions.md index 507f47e6b1..8bd5ae17f4 100644 --- a/docs/core/transactions.md +++ b/docs/core/transactions.md @@ -12,7 +12,7 @@ order: 2 ## Transactions -Transactions are comprised of metadata held in [contexts](./context.md) and [messages](../building-modules/messages-and-queries.md) that trigger state changes within a module through the module's [Handler](../building-modules/handler.md). +Transactions are comprised of metadata held in [contexts](./context.md) and [messages](../building-modules/messages-and-queries.md) that trigger state changes within a module through the module's [`Msg` service](../building-modules/msg-services.md). When users want to interact with an application and make state changes (e.g. sending coins), they create transactions. Each of a transaction's `message`s must be signed using the private key associated with the appropriate account(s), before the transaction is broadcasted to the network. A transaction must then be included in a block, validated, and approved by the network through the consensus process. To read more about the lifecycle of a transaction, click [here](../basics/tx-lifecycle.md). @@ -45,7 +45,7 @@ When users interact with the application's interfaces, they invoke the underlyin ### Messages -**`Message`s** are module-specific objects that trigger state transitions within the scope of the module they belong to. Module developers define the `message`s for their module by implementing the `Msg` interface, and also define a [`Handler`](../building-modules/handler.md) to process them. +**`Message`s** are module-specific objects that trigger state transitions within the scope of the module they belong to. Module developers define the messages for their module by implementing the `Msg` interface, and also define a [`Handler`](../building-modules/msg-services.md#handler-type) to process them. +++ https://github.com/cosmos/cosmos-sdk/blob/7d7821b9af132b0f6131640195326aa02b6751db/types/tx_msg.go#L8-L29 @@ -85,7 +85,7 @@ Every message in a transaction must be signed by the addresses specified by `Get ### Handlers -Since `message`s are module-specific types, each module needs a [`handler`](../building-modules/handler.md) to process all of its `message` types and trigger state changes within the module's scope. This design puts more responsibility on module developers, allowing application developers to reuse common functionalities without having to implement state transition logic repetitively. To read more about `handler`s, click [here](../building-modules/handler.md). +Since messages are module-specific types, each module needs a [`handler`](../building-modules/msg-services.md#handler-type) to process all of its message types and trigger state changes within the module's scope. This design puts more responsibility on module developers, allowing application developers to reuse common functionalities without having to implement state transition logic repetitively. To read more about `handler`s, click [here](../building-modules/msg-services.md#handler-type). ## Next {hide} diff --git a/docs/intro/sdk-app-architecture.md b/docs/intro/sdk-app-architecture.md index 3cb8e71210..55ffad8a12 100644 --- a/docs/intro/sdk-app-architecture.md +++ b/docs/intro/sdk-app-architecture.md @@ -87,7 +87,7 @@ Note that **Tendermint only handles transaction bytes**. It has no knowledge of Here are the most important messages of the ABCI: - `CheckTx`: When a transaction is received by Tendermint Core, it is passed to the application to check if a few basic requirements are met. `CheckTx` is used to protect the mempool of full-nodes against spam transactions. A special handler called the [`AnteHandler`](../basics/gas-fees.md#antehandler) is used to execute a series of validation steps such as checking for sufficient fees and validating the signatures. If the checks are valid, the transaction is added to the [mempool](https://tendermint.com/docs/spec/reactors/mempool/functionality.html#mempool-functionality) and relayed to peer nodes. Note that transactions are not processed (i.e. no modification of the state occurs) with `CheckTx` since they have not been included in a block yet. -- `DeliverTx`: When a [valid block](https://tendermint.com/docs/spec/blockchain/blockchain.html#validation) is received by Tendermint Core, each transaction in the block is passed to the application via `DeliverTx` in order to be processed. It is during this stage that the state transitions occur. The `AnteHandler` executes again along with the actual [`handler`s](../building-modules/handler.md) for each message in the transaction. +- `DeliverTx`: When a [valid block](https://tendermint.com/docs/spec/blockchain/blockchain.html#validation) is received by Tendermint Core, each transaction in the block is passed to the application via `DeliverTx` in order to be processed. It is during this stage that the state transitions occur. The `AnteHandler` executes again along with the actual [`Msg` service methods](../building-modules/msg-services.md) for each message in the transaction. - `BeginBlock`/`EndBlock`: These messages are executed at the beginning and the end of each block, whether the block contains transaction or not. It is useful to trigger automatic execution of logic. Proceed with caution though, as computationally expensive loops could slow down your blockchain, or even freeze it if the loop is infinite. Find a more detailed view of the ABCI methods from the [Tendermint docs](https://tendermint.com/docs/spec/abci/abci.html#overview). diff --git a/types/module/module.go b/types/module/module.go index c58555a980..2379c93d5e 100644 --- a/types/module/module.go +++ b/types/module/module.go @@ -162,13 +162,13 @@ type AppModule interface { // registers RegisterInvariants(sdk.InvariantRegistry) - // routes + // Deprecated: use RegisterServices Route() sdk.Route - // Deprecated: use RegisterQueryService + // Deprecated: use RegisterServices QuerierRoute() string - // Deprecated: use RegisterQueryService + // Deprecated: use RegisterServices LegacyQuerierHandler(*codec.LegacyAmino) sdk.Querier // RegisterServices allows a module to register services diff --git a/x/auth/module.go b/x/auth/module.go index 0c6b1fa832..73aa9a1066 100644 --- a/x/auth/module.go +++ b/x/auth/module.go @@ -125,7 +125,7 @@ func (am AppModule) LegacyQuerierHandler(legacyQuerierCdc *codec.LegacyAmino) sd return keeper.NewQuerier(am.accountKeeper, legacyQuerierCdc) } -// RegisterQueryService registers a GRPC query service to respond to the +// RegisterServices registers a GRPC query service to respond to the // module-specific GRPC queries. func (am AppModule) RegisterServices(cfg module.Configurator) { types.RegisterQueryServer(cfg.QueryServer(), am.accountKeeper) diff --git a/x/capability/module.go b/x/capability/module.go index f27e5cdb5d..7957f57747 100644 --- a/x/capability/module.go +++ b/x/capability/module.go @@ -111,7 +111,7 @@ func (AppModule) QuerierRoute() string { return "" } // LegacyQuerierHandler returns the capability module's Querier. func (am AppModule) LegacyQuerierHandler(*codec.LegacyAmino) sdk.Querier { return nil } -// RegisterQueryService registers a GRPC query service to respond to the +// RegisterServices registers a GRPC query service to respond to the // module-specific GRPC queries. func (am AppModule) RegisterServices(module.Configurator) {} diff --git a/x/ibc/testing/mock/mock.go b/x/ibc/testing/mock/mock.go index e338e24d3b..663497aa05 100644 --- a/x/ibc/testing/mock/mock.go +++ b/x/ibc/testing/mock/mock.go @@ -102,7 +102,7 @@ func (am AppModule) LegacyQuerierHandler(*codec.LegacyAmino) sdk.Querier { return nil } -// RegisterQueryService implements the AppModule interface. +// RegisterServices implements the AppModule interface. func (am AppModule) RegisterServices(module.Configurator) {} // InitGenesis implements the AppModule interface. diff --git a/x/mint/module.go b/x/mint/module.go index a100139825..44e96ce74b 100644 --- a/x/mint/module.go +++ b/x/mint/module.go @@ -123,7 +123,7 @@ func (am AppModule) LegacyQuerierHandler(legacyQuerierCdc *codec.LegacyAmino) sd return keeper.NewQuerier(am.keeper, legacyQuerierCdc) } -// RegisterQueryService registers a gRPC query service to respond to the +// RegisterServices registers a gRPC query service to respond to the // module-specific gRPC queries. func (am AppModule) RegisterServices(cfg module.Configurator) { types.RegisterQueryServer(cfg.QueryServer(), am.keeper) diff --git a/x/params/module.go b/x/params/module.go index 1460460317..b0a4584129 100644 --- a/x/params/module.go +++ b/x/params/module.go @@ -109,7 +109,7 @@ func (am AppModule) LegacyQuerierHandler(legacyQuerierCdc *codec.LegacyAmino) sd return keeper.NewQuerier(am.keeper, legacyQuerierCdc) } -// RegisterQueryService registers a gRPC query service to respond to the +// RegisterServices registers a gRPC query service to respond to the // module-specific gRPC queries. func (am AppModule) RegisterServices(cfg module.Configurator) { proposal.RegisterQueryServer(cfg.QueryServer(), am.keeper) diff --git a/x/upgrade/module.go b/x/upgrade/module.go index c136d9cf0a..4e4982a324 100644 --- a/x/upgrade/module.go +++ b/x/upgrade/module.go @@ -94,7 +94,7 @@ func (am AppModule) LegacyQuerierHandler(legacyQuerierCdc *codec.LegacyAmino) sd return keeper.NewQuerier(am.keeper, legacyQuerierCdc) } -// RegisterQueryService registers a GRPC query service to respond to the +// RegisterServices registers a GRPC query service to respond to the // module-specific GRPC queries. func (am AppModule) RegisterServices(cfg module.Configurator) { types.RegisterQueryServer(cfg.QueryServer(), am.keeper) From f02a46263fe43ae6f7f496039c5fd9664dafc00a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?colin=20axn=C3=A9r?= <25233464+colin-axner@users.noreply.github.com> Date: Wed, 18 Nov 2020 14:56:26 +0100 Subject: [PATCH 121/136] update transfer error messages (#7968) * update transfer err messages * apply @AdityaSripal review suggestion --- x/ibc/applications/transfer/keeper/relay.go | 27 +++++++++++++++++---- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/x/ibc/applications/transfer/keeper/relay.go b/x/ibc/applications/transfer/keeper/relay.go index d26e71e984..1d0f5c2166 100644 --- a/x/ibc/applications/transfer/keeper/relay.go +++ b/x/ibc/applications/transfer/keeper/relay.go @@ -1,6 +1,7 @@ package keeper import ( + "fmt" "strings" "github.com/armon/go-metrics" @@ -137,7 +138,7 @@ func (k Keeper) SendTransfer( // NOTE: should not happen as the module account was // retrieved on the step above and it has enough balace // to burn. - return err + panic(fmt.Sprintf("cannot burn coins after a successful send to a module account: %v", err)) } } @@ -222,7 +223,11 @@ func (k Keeper) OnRecvPacket(ctx sdk.Context, packet channeltypes.Packet, data t // unescrow tokens escrowAddress := types.GetEscrowAddress(packet.GetDestPort(), packet.GetDestChannel()) if err := k.bankKeeper.SendCoins(ctx, escrowAddress, receiver, sdk.NewCoins(token)); err != nil { - return err + // NOTE: this error is only expected to occur given an unexpected bug or a malicious + // counterparty module. The bug may occur in bank or any part of the code that allows + // the escrow address to be drained. A malicious counterparty module could drain the + // escrow address by allowing more tokens to be sent back then were escrowed. + return sdkerrors.Wrap(err, "unable to unescrow tokens, this may be caused by a malicious counterparty module or a bug: please open an issue on counterparty module") } defer func() { @@ -281,7 +286,7 @@ func (k Keeper) OnRecvPacket(ctx sdk.Context, packet channeltypes.Packet, data t if err := k.bankKeeper.SendCoinsFromModuleToAccount( ctx, types.ModuleName, receiver, sdk.NewCoins(voucher), ); err != nil { - return err + panic(fmt.Sprintf("unable to send coins from module to account despite previously minting coins to module account: %v", err)) } defer func() { @@ -345,7 +350,15 @@ func (k Keeper) refundPacketToken(ctx sdk.Context, packet channeltypes.Packet, d if types.SenderChainIsSource(packet.GetSourcePort(), packet.GetSourceChannel(), data.Denom) { // unescrow tokens back to sender escrowAddress := types.GetEscrowAddress(packet.GetSourcePort(), packet.GetSourceChannel()) - return k.bankKeeper.SendCoins(ctx, escrowAddress, sender, sdk.NewCoins(token)) + if err := k.bankKeeper.SendCoins(ctx, escrowAddress, sender, sdk.NewCoins(token)); err != nil { + // NOTE: this error is only expected to occur given an unexpected bug or a malicious + // counterparty module. The bug may occur in bank or any part of the code that allows + // the escrow address to be drained. A malicious counterparty module could drain the + // escrow address by allowing more tokens to be sent back then were escrowed. + return sdkerrors.Wrap(err, "unable to unescrow tokens, this may be caused by a malicious counterparty module or a bug: please open an issue on counterparty module") + } + + return nil } // mint vouchers back to sender @@ -355,7 +368,11 @@ func (k Keeper) refundPacketToken(ctx sdk.Context, packet channeltypes.Packet, d return err } - return k.bankKeeper.SendCoinsFromModuleToAccount(ctx, types.ModuleName, sender, sdk.NewCoins(token)) + if err := k.bankKeeper.SendCoinsFromModuleToAccount(ctx, types.ModuleName, sender, sdk.NewCoins(token)); err != nil { + panic(fmt.Sprintf("unable to send coins from module to account despite previously minting coins to module account: %v", err)) + } + + return nil } // DenomPathFromHash returns the full denomination path prefix from an ibc denom with a hash From 97d96612c9cf1c05475313a4b6fe5cffdfe34a23 Mon Sep 17 00:00:00 2001 From: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Date: Wed, 18 Nov 2020 19:42:45 +0100 Subject: [PATCH 122/136] crypto/hd: add 'm/' prefix to hd path (#7970) * crypto/hd: add 'm/' prefix to hd path * update fundraiser path * fix some tests * tests * fix test case * changelog * fix ledger tests --- CHANGELOG.md | 4 + crypto/hd/fundraiser_test.go | 5 +- crypto/hd/hdpath.go | 50 +++++-- crypto/hd/hdpath_test.go | 187 ++++++++++++++------------ crypto/keyring/keyring_ledger_test.go | 4 +- crypto/keyring/types_test.go | 26 ++-- crypto/ledger/ledger_test.go | 24 ++-- types/address.go | 10 +- 8 files changed, 172 insertions(+), 138 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 46d8a76ef3..efca4d9bd3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -42,6 +42,10 @@ Ref: https://keepachangelog.com/en/1.0.0/ * Updated iavl dependency to v0.15-rc2 * (version) [\#7848](https://github.com/cosmos/cosmos-sdk/pull/7848) [\#7941](https://github.com/cosmos/cosmos-sdk/pull/7941) `version --long` output now shows the list of build dependencies and replaced build dependencies. +### Bug Fixes + +* (crypto) [\#7966](https://github.com/cosmos/cosmos-sdk/issues/7966) `Bip44Params` `String()` function now correctly returns the absolute HD path by adding the `m/` prefix. + ## [v0.40.0-rc3](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.40.0-rc3) - 2020-11-06 ### Client Breaking diff --git a/crypto/hd/fundraiser_test.go b/crypto/hd/fundraiser_test.go index e8649a0086..4afbfc5a9c 100644 --- a/crypto/hd/fundraiser_test.go +++ b/crypto/hd/fundraiser_test.go @@ -27,7 +27,7 @@ type addrData struct { } func TestFullFundraiserPath(t *testing.T) { - require.Equal(t, "44'/118'/0'/0/0", hd.NewFundraiserParams(0, 118, 0).String()) + require.Equal(t, "m/44'/118'/0'/0/0", hd.NewFundraiserParams(0, 118, 0).String()) } func initFundraiserTestVectors(t *testing.T) []addrData { @@ -63,8 +63,9 @@ func TestFundraiserCompatibility(t *testing.T) { t.Logf("ROUND: %d MNEMONIC: %s", i, d.Mnemonic) master, ch := hd.ComputeMastersFromSeed(seed) - priv, err := hd.DerivePrivateKeyForPath(master, ch, "44'/118'/0'/0/0") + priv, err := hd.DerivePrivateKeyForPath(master, ch, "m/44'/118'/0'/0/0") require.NoError(t, err) + privKey := &secp256k1.PrivKey{Key: priv} pub := privKey.PubKey() diff --git a/crypto/hd/hdpath.go b/crypto/hd/hdpath.go index 67a02f0290..04469d7305 100644 --- a/crypto/hd/hdpath.go +++ b/crypto/hd/hdpath.go @@ -36,52 +36,66 @@ func NewParams(purpose, coinType, account uint32, change bool, addressIdx uint32 } } -// Parse the BIP44 path and unmarshal into the struct. +// NewParamsFromPath parses the BIP44 path and unmarshals it into a Bip44Params. It supports both +// absolute and relative paths. func NewParamsFromPath(path string) (*BIP44Params, error) { spl := strings.Split(path, "/") + + // Handle absolute or relative paths + switch { + case spl[0] == path: + return nil, fmt.Errorf("path %s doesn't contain '/' separators", path) + + case strings.TrimSpace(spl[0]) == "": + return nil, fmt.Errorf("ambiguous path %s: use 'm/' prefix for absolute paths, or no leading '/' for relative ones", path) + + case strings.TrimSpace(spl[0]) == "m": + spl = spl[1:] + } + if len(spl) != 5 { - return nil, fmt.Errorf("path length is wrong. Expected 5, got %d", len(spl)) + return nil, fmt.Errorf("invalid path length %s", path) } // Check items can be parsed purpose, err := hardenedInt(spl[0]) if err != nil { - return nil, err + return nil, fmt.Errorf("invalid HD path purpose %s: %w", spl[0], err) } coinType, err := hardenedInt(spl[1]) if err != nil { - return nil, err + return nil, fmt.Errorf("invalid HD path coin type %s: %w", spl[1], err) } account, err := hardenedInt(spl[2]) if err != nil { - return nil, err + return nil, fmt.Errorf("invalid HD path account %s: %w", spl[2], err) } change, err := hardenedInt(spl[3]) if err != nil { - return nil, err + return nil, fmt.Errorf("invalid HD path change %s: %w", spl[3], err) } addressIdx, err := hardenedInt(spl[4]) if err != nil { - return nil, err + return nil, fmt.Errorf("invalid HD path address index %s: %w", spl[4], err) } // Confirm valid values if spl[0] != "44'" { - return nil, fmt.Errorf("first field in path must be 44', got %v", spl[0]) + return nil, fmt.Errorf("first field in path must be 44', got %s", spl[0]) } if !isHardened(spl[1]) || !isHardened(spl[2]) { return nil, - fmt.Errorf("second and third field in path must be hardened (ie. contain the suffix ', got %v and %v", spl[1], spl[2]) + fmt.Errorf("second and third field in path must be hardened (ie. contain the suffix ', got %s and %s", spl[1], spl[2]) } if isHardened(spl[3]) || isHardened(spl[4]) { return nil, - fmt.Errorf("fourth and fifth field in path must not be hardened (ie. not contain the suffix ', got %v and %v", spl[3], spl[4]) + fmt.Errorf("fourth and fifth field in path must not be hardened (ie. not contain the suffix ', got %s and %s", spl[3], spl[4]) } if !(change == 0 || change == 1) { @@ -135,6 +149,8 @@ func (p BIP44Params) DerivationPath() []uint32 { } } +// String returns the full absolute HD path of the BIP44 (https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki) params: +// m / purpose' / coin_type' / account' / change / address_index func (p BIP44Params) String() string { var changeStr string if p.Change { @@ -142,8 +158,7 @@ func (p BIP44Params) String() string { } else { changeStr = "0" } - // m / Purpose' / coin_type' / Account' / Change / address_index - return fmt.Sprintf("%d'/%d'/%d'/%s/%d", + return fmt.Sprintf("m/%d'/%d'/%d'/%s/%d", p.Purpose, p.CoinType, p.Account, @@ -165,6 +180,13 @@ func DerivePrivateKeyForPath(privKeyBytes, chainCode [32]byte, path string) ([]b data := privKeyBytes parts := strings.Split(path, "/") + switch { + case parts[0] == path: + return nil, fmt.Errorf("path '%s' doesn't contain '/' separators", path) + case strings.TrimSpace(parts[0]) == "m": + parts = parts[1:] + } + for _, part := range parts { // do we have an apostrophe? harden := part[len(part)-1:] == "'" @@ -178,7 +200,7 @@ func DerivePrivateKeyForPath(privKeyBytes, chainCode [32]byte, path string) ([]b // index values are in the range [0, 1<<31-1] aka [0, max(int32)] idx, err := strconv.ParseUint(part, 10, 31) if err != nil { - return []byte{}, fmt.Errorf("invalid BIP 32 path: %s", err) + return []byte{}, fmt.Errorf("invalid BIP 32 path %s: %w", path, err) } data, chainCode = derivePrivateKey(data, chainCode, uint32(idx), harden) @@ -188,7 +210,7 @@ func DerivePrivateKeyForPath(privKeyBytes, chainCode [32]byte, path string) ([]b n := copy(derivedKey, data[:]) if n != 32 || len(data) != 32 { - return []byte{}, fmt.Errorf("expected a (secp256k1) key of length 32, got length: %v", len(data)) + return []byte{}, fmt.Errorf("expected a key of length 32, got length: %d", len(data)) } return derivedKey, nil diff --git a/crypto/hd/hdpath_test.go b/crypto/hd/hdpath_test.go index 42622b9a9c..2620e0605c 100644 --- a/crypto/hd/hdpath_test.go +++ b/crypto/hd/hdpath_test.go @@ -9,7 +9,6 @@ import ( "github.com/cosmos/cosmos-sdk/types" bip39 "github.com/cosmos/go-bip39" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) @@ -20,26 +19,22 @@ func mnemonicToSeed(mnemonic string) []byte { return bip39.NewSeed(mnemonic, defaultBIP39Passphrase) } -// nolint:govet -func ExampleStringifyPathParams() { +func TestPathParamsString(t *testing.T) { path := hd.NewParams(44, 0, 0, false, 0) - fmt.Println(path.String()) + require.Equal(t, "m/44'/0'/0'/0/0", path.String()) path = hd.NewParams(44, 33, 7, true, 9) - fmt.Println(path.String()) - // Output: - // 44'/0'/0'/0/0 - // 44'/33'/7'/1/9 + require.Equal(t, "m/44'/33'/7'/1/9", path.String()) } func TestStringifyFundraiserPathParams(t *testing.T) { path := hd.NewFundraiserParams(4, types.CoinType, 22) - require.Equal(t, "44'/118'/4'/0/22", path.String()) + require.Equal(t, "m/44'/118'/4'/0/22", path.String()) path = hd.NewFundraiserParams(4, types.CoinType, 57) - require.Equal(t, "44'/118'/4'/0/57", path.String()) + require.Equal(t, "m/44'/118'/4'/0/57", path.String()) path = hd.NewFundraiserParams(4, 12345, 57) - require.Equal(t, "44'/12345'/4'/0/57", path.String()) + require.Equal(t, "m/44'/12345'/4'/0/57", path.String()) } func TestPathToArray(t *testing.T) { @@ -55,95 +50,101 @@ func TestParamsFromPath(t *testing.T) { params *hd.BIP44Params path string }{ - {&hd.BIP44Params{44, 0, 0, false, 0}, "44'/0'/0'/0/0"}, - {&hd.BIP44Params{44, 1, 0, false, 0}, "44'/1'/0'/0/0"}, - {&hd.BIP44Params{44, 0, 1, false, 0}, "44'/0'/1'/0/0"}, - {&hd.BIP44Params{44, 0, 0, true, 0}, "44'/0'/0'/1/0"}, - {&hd.BIP44Params{44, 0, 0, false, 1}, "44'/0'/0'/0/1"}, - {&hd.BIP44Params{44, 1, 1, true, 1}, "44'/1'/1'/1/1"}, - {&hd.BIP44Params{44, 118, 52, true, 41}, "44'/118'/52'/1/41"}, + {&hd.BIP44Params{44, 0, 0, false, 0}, "m/44'/0'/0'/0/0"}, + {&hd.BIP44Params{44, 1, 0, false, 0}, "m/44'/1'/0'/0/0"}, + {&hd.BIP44Params{44, 0, 1, false, 0}, "m/44'/0'/1'/0/0"}, + {&hd.BIP44Params{44, 0, 0, true, 0}, "m/44'/0'/0'/1/0"}, + {&hd.BIP44Params{44, 0, 0, false, 1}, "m/44'/0'/0'/0/1"}, + {&hd.BIP44Params{44, 1, 1, true, 1}, "m/44'/1'/1'/1/1"}, + {&hd.BIP44Params{44, 118, 52, true, 41}, "m/44'/118'/52'/1/41"}, } for i, c := range goodCases { params, err := hd.NewParamsFromPath(c.path) errStr := fmt.Sprintf("%d %v", i, c) - assert.NoError(t, err, errStr) - assert.EqualValues(t, c.params, params, errStr) - assert.Equal(t, c.path, c.params.String()) + require.NoError(t, err, errStr) + require.EqualValues(t, c.params, params, errStr) + require.Equal(t, c.path, c.params.String()) } badCases := []struct { path string }{ - {"43'/0'/0'/0/0"}, // doesnt start with 44 - {"44'/1'/0'/0/0/5"}, // too many fields - {"44'/0'/1'/0"}, // too few fields - {"44'/0'/0'/2/0"}, // change field can only be 0/1 - {"44/0'/0'/0/0"}, // first field needs ' - {"44'/0/0'/0/0"}, // second field needs ' - {"44'/0'/0/0/0"}, // third field needs ' - {"44'/0'/0'/0'/0"}, // fourth field must not have ' - {"44'/0'/0'/0/0'"}, // fifth field must not have ' - {"44'/-1'/0'/0/0"}, // no negatives - {"44'/0'/0'/-1/0"}, // no negatives - {"a'/0'/0'/-1/0"}, // valid values - {"0/X/0'/-1/0"}, // valid values - {"44'/0'/X/-1/0"}, // valid values - {"44'/0'/0'/%/0"}, // valid values - {"44'/0'/0'/0/%"}, // valid values + {"m/43'/0'/0'/0/0"}, // doesn't start with 44 + {"m/44'/1'/0'/0/0/5"}, // too many fields + {"m/44'/0'/1'/0"}, // too few fields + {"m/44'/0'/0'/2/0"}, // change field can only be 0/1 + {"m/44/0'/0'/0/0"}, // first field needs ' + {"m/44'/0/0'/0/0"}, // second field needs ' + {"m/44'/0'/0/0/0"}, // third field needs ' + {"m/44'/0'/0'/0'/0"}, // fourth field must not have ' + {"m/44'/0'/0'/0/0'"}, // fifth field must not have ' + {"m/44'/-1'/0'/0/0"}, // no negatives + {"m/44'/0'/0'/-1/0"}, // no negatives + {"m/a'/0'/0'/-1/0"}, // invalid values + {"m/0/X/0'/-1/0"}, // invalid values + {"m/44'/0'/X/-1/0"}, // invalid values + {"m/44'/0'/0'/%/0"}, // invalid values + {"m/44'/0'/0'/0/%"}, // invalid values + {"m44'0'0'00"}, // no separators + {" /44'/0'/0'/0/0"}, // blank first component } for i, c := range badCases { params, err := hd.NewParamsFromPath(c.path) errStr := fmt.Sprintf("%d %v", i, c) - assert.Nil(t, params, errStr) - assert.Error(t, err, errStr) + require.Nil(t, params, errStr) + require.Error(t, err, errStr) } } -// nolint:govet -func ExampleSomeBIP32TestVecs() { +func TestBIP32Vecs(t *testing.T) { seed := mnemonicToSeed("barrel original fuel morning among eternal " + "filter ball stove pluck matrix mechanic") master, ch := hd.ComputeMastersFromSeed(seed) fmt.Println("keys from fundraiser test-vector (cosmos, bitcoin, ether)") fmt.Println() - // cosmos + + // cosmos, absolute path priv, err := hd.DerivePrivateKeyForPath(master, ch, types.FullFundraiserPath) - if err != nil { - fmt.Println("INVALID") - } else { - fmt.Println(hex.EncodeToString(priv[:])) - } + require.NoError(t, err) + require.NotEmpty(t, priv) + fmt.Println(hex.EncodeToString(priv[:])) + + absPrivKey := hex.EncodeToString(priv[:]) + + // cosmos, relative path + priv, err = hd.DerivePrivateKeyForPath(master, ch, "44'/118'/0'/0/0") + require.NoError(t, err) + require.NotEmpty(t, priv) + + relPrivKey := hex.EncodeToString(priv[:]) + + // check compatibility between relative and absolute HD paths + require.Equal(t, relPrivKey, absPrivKey) + // bitcoin - priv, err = hd.DerivePrivateKeyForPath(master, ch, "44'/0'/0'/0/0") - if err != nil { - fmt.Println("INVALID") - } else { - fmt.Println(hex.EncodeToString(priv[:])) - } + priv, err = hd.DerivePrivateKeyForPath(master, ch, "m/44'/0'/0'/0/0") + require.NoError(t, err) + require.NotEmpty(t, priv) + fmt.Println(hex.EncodeToString(priv[:])) + // ether - priv, err = hd.DerivePrivateKeyForPath(master, ch, "44'/60'/0'/0/0") - if err != nil { - fmt.Println("INVALID") - } else { - fmt.Println(hex.EncodeToString(priv[:])) - } + priv, err = hd.DerivePrivateKeyForPath(master, ch, "m/44'/60'/0'/0/0") + require.NoError(t, err) + require.NotEmpty(t, priv) + fmt.Println(hex.EncodeToString(priv[:])) + // INVALID - priv, err = hd.DerivePrivateKeyForPath(master, ch, "X/0'/0'/0/0") - if err != nil { - fmt.Println("INVALID") - } else { - fmt.Println(hex.EncodeToString(priv[:])) - } - priv, err = hd.DerivePrivateKeyForPath(master, ch, "-44/0'/0'/0/0") - if err != nil { - fmt.Println("INVALID") - } else { - fmt.Println(hex.EncodeToString(priv[:])) - } + priv, err = hd.DerivePrivateKeyForPath(master, ch, "m/X/0'/0'/0/0") + require.Error(t, err) + require.Empty(t, priv) + + priv, err = hd.DerivePrivateKeyForPath(master, ch, "m/-44/0'/0'/0/0") + require.Error(t, err) + require.Empty(t, priv) fmt.Println() fmt.Println("keys generated via https://coinomi.com/recovery-phrase-tool.html") @@ -153,13 +154,14 @@ func ExampleSomeBIP32TestVecs() { "advice process birth april short trust crater change bacon monkey medal garment " + "gorilla ranch hour rival razor call lunar mention taste vacant woman sister") master, ch = hd.ComputeMastersFromSeed(seed) - priv, _ = hd.DerivePrivateKeyForPath(master, ch, "44'/1'/1'/0/4") + priv, _ = hd.DerivePrivateKeyForPath(master, ch, "m/44'/1'/1'/0/4") fmt.Println(hex.EncodeToString(priv[:])) seed = mnemonicToSeed("idea naive region square margin day captain habit " + "gun second farm pact pulse someone armed") master, ch = hd.ComputeMastersFromSeed(seed) - priv, _ = hd.DerivePrivateKeyForPath(master, ch, "44'/0'/0'/0/420") + priv, err = hd.DerivePrivateKeyForPath(master, ch, "m/44'/0'/0'/0/420") + require.NoError(t, err) fmt.Println(hex.EncodeToString(priv[:])) fmt.Println() @@ -169,7 +171,8 @@ func ExampleSomeBIP32TestVecs() { // bip32 path: m/0/7 seed = mnemonicToSeed("monitor flock loyal sick object grunt duty ride develop assault harsh history") master, ch = hd.ComputeMastersFromSeed(seed) - priv, _ = hd.DerivePrivateKeyForPath(master, ch, "0/7") + priv, err = hd.DerivePrivateKeyForPath(master, ch, "m/0/7") + require.NoError(t, err) // TODO: shouldn't this error? fmt.Println(hex.EncodeToString(priv[:])) // Output: keys from fundraiser test-vector (cosmos, bitcoin, ether) @@ -177,8 +180,6 @@ func ExampleSomeBIP32TestVecs() { // bfcb217c058d8bbafd5e186eae936106ca3e943889b0b4a093ae13822fd3170c // e77c3de76965ad89997451de97b95bb65ede23a6bf185a55d80363d92ee37c3d // 7fc4d8a8146dea344ba04c593517d3f377fa6cded36cd55aee0a0bb968e651bc - // INVALID - // INVALID // // keys generated via https://coinomi.com/recovery-phrase-tool.html // @@ -201,9 +202,9 @@ func TestCreateHDPath(t *testing.T) { args args want hd.BIP44Params }{ - {"44'/0'/0'/0/0", args{0, 0, 0}, hd.BIP44Params{Purpose: 44}}, - {"44'/114'/0'/0/0", args{114, 0, 0}, hd.BIP44Params{Purpose: 44, CoinType: 114, Account: 0, AddressIndex: 0}}, - {"44'/114'/1'/1/0", args{114, 1, 1}, hd.BIP44Params{Purpose: 44, CoinType: 114, Account: 1, AddressIndex: 1}}, + {"m/44'/0'/0'/0/0", args{0, 0, 0}, hd.BIP44Params{Purpose: 44}}, + {"m/44'/114'/0'/0/0", args{114, 0, 0}, hd.BIP44Params{Purpose: 44, CoinType: 114, Account: 0, AddressIndex: 0}}, + {"m/44'/114'/1'/1/0", args{114, 1, 1}, hd.BIP44Params{Purpose: 44, CoinType: 114, Account: 1, AddressIndex: 1}}, } for _, tt := range tests { tt := tt @@ -227,36 +228,44 @@ func TestDeriveHDPathRange(t *testing.T) { wantErr string }{ { - path: "1'/2147483648/0'/0/0", + path: "m/1'/2147483648/0'/0/0", wantErr: "out of range", }, { - path: "2147483648'/1/0/0", + path: "m/2147483648'/1/0/0", wantErr: "out of range", }, { - path: "2147483648'/2147483648/0'/0/0", + path: "m/2147483648'/2147483648/0'/0/0", wantErr: "out of range", }, { - path: "1'/-5/0'/0/0", + path: "m/1'/-5/0'/0/0", wantErr: "invalid syntax", }, { - path: "-2147483646'/1/0/0", + path: "m/-2147483646'/1/0/0", wantErr: "invalid syntax", }, { - path: "-2147483648'/-2147483648/0'/0/0", + path: "m/-2147483648'/-2147483648/0'/0/0", wantErr: "invalid syntax", }, + { + path: "m44'118'0'00", + wantErr: "path 'm44'118'0'00' doesn't contain '/' separators", + }, + { + path: "", + wantErr: "path '' doesn't contain '/' separators", + }, { // Should pass. - path: "1'/2147483647/0'/0/0", + path: "m/1'/2147483647'/1/0'/0/0", }, { // Should pass. - path: "2147483647'/1/0'/0/0", + path: "1'/2147483647'/1/0'/0/0", }, } @@ -267,9 +276,9 @@ func TestDeriveHDPathRange(t *testing.T) { _, err := hd.DerivePrivateKeyForPath(master, ch, tt.path) if tt.wantErr == "" { - require.Nil(t, err, "unexpected error") + require.NoError(t, err, "unexpected error") } else { - require.NotNil(t, err, "expected a report of an int overflow") + require.Error(t, err, "expected a report of an int overflow") require.Contains(t, err.Error(), tt.wantErr) } }) diff --git a/crypto/keyring/keyring_ledger_test.go b/crypto/keyring/keyring_ledger_test.go index 275e3edd57..eb7e85f9e8 100644 --- a/crypto/keyring/keyring_ledger_test.go +++ b/crypto/keyring/keyring_ledger_test.go @@ -45,7 +45,7 @@ func TestInMemoryCreateLedger(t *testing.T) { path, err := restoredKey.GetPath() require.NoError(t, err) - require.Equal(t, "44'/118'/3'/0/1", path.String()) + require.Equal(t, "m/44'/118'/3'/0/1", path.String()) } // TestSignVerify does some detailed checks on how we sign and validate @@ -123,5 +123,5 @@ func TestAltKeyring_SaveLedgerKey(t *testing.T) { path, err := restoredKey.GetPath() require.NoError(t, err) - require.Equal(t, "44'/118'/3'/0/1", path.String()) + require.Equal(t, "m/44'/118'/3'/0/1", path.String()) } diff --git a/crypto/keyring/types_test.go b/crypto/keyring/types_test.go index ca99d9b7c5..8c68bce670 100644 --- a/crypto/keyring/types_test.go +++ b/crypto/keyring/types_test.go @@ -4,11 +4,10 @@ import ( "encoding/hex" "testing" - "github.com/stretchr/testify/assert" - "github.com/cosmos/cosmos-sdk/crypto/hd" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/stretchr/testify/require" ) func Test_writeReadLedgerInfo(t *testing.T) { @@ -17,28 +16,27 @@ func Test_writeReadLedgerInfo(t *testing.T) { copy(tmpKey[:], bz) lInfo := newLedgerInfo("some_name", &secp256k1.PubKey{Key: tmpKey}, *hd.NewFundraiserParams(5, sdk.CoinType, 1), hd.Secp256k1Type) - assert.Equal(t, TypeLedger, lInfo.GetType()) + require.Equal(t, TypeLedger, lInfo.GetType()) path, err := lInfo.GetPath() - assert.NoError(t, err) - assert.Equal(t, "44'/118'/5'/0/1", path.String()) - assert.Equal(t, + require.NoError(t, err) + require.Equal(t, "m/44'/118'/5'/0/1", path.String()) + require.Equal(t, "cosmospub1addwnpepqddddqg2glc8x4fl7vxjlnr7p5a3czm5kcdp4239sg6yqdc4rc2r5wmxv8p", sdk.MustBech32ifyPubKey(sdk.Bech32PubKeyTypeAccPub, lInfo.GetPubKey())) // Serialize and restore serialized := marshalInfo(lInfo) restoredInfo, err := unmarshalInfo(serialized) - assert.NoError(t, err) - assert.NotNil(t, restoredInfo) + require.NoError(t, err) + require.NotNil(t, restoredInfo) // Check both keys match - assert.Equal(t, lInfo.GetName(), restoredInfo.GetName()) - assert.Equal(t, lInfo.GetType(), restoredInfo.GetType()) - assert.Equal(t, lInfo.GetPubKey(), restoredInfo.GetPubKey()) + require.Equal(t, lInfo.GetName(), restoredInfo.GetName()) + require.Equal(t, lInfo.GetType(), restoredInfo.GetType()) + require.Equal(t, lInfo.GetPubKey(), restoredInfo.GetPubKey()) restoredPath, err := restoredInfo.GetPath() - assert.NoError(t, err) - - assert.Equal(t, path, restoredPath) + require.NoError(t, err) + require.Equal(t, path, restoredPath) } diff --git a/crypto/ledger/ledger_test.go b/crypto/ledger/ledger_test.go index bc85b2feba..5fe9da8f55 100644 --- a/crypto/ledger/ledger_test.go +++ b/crypto/ledger/ledger_test.go @@ -24,7 +24,7 @@ func TestErrorHandling(t *testing.T) { func TestPublicKeyUnsafe(t *testing.T) { path := *hd.NewFundraiserParams(0, sdk.CoinType, 0) priv, err := NewPrivKeySecp256k1Unsafe(path) - require.Nil(t, err, "%s", err) + require.NoError(t, err) require.NotNil(t, priv) require.Equal(t, "eb5ae98721034fef9cd7c4c63588d3b03feb5281b9d232cba34d6f3d71aee59211ffbfe1fe87", @@ -62,10 +62,10 @@ func TestPublicKeyUnsafeHDPath(t *testing.T) { // Check with device for i := uint32(0); i < 10; i++ { path := *hd.NewFundraiserParams(0, sdk.CoinType, i) - fmt.Printf("Checking keys at %v\n", path) + t.Logf("Checking keys at %v\n", path) priv, err := NewPrivKeySecp256k1Unsafe(path) - require.Nil(t, err, "%s", err) + require.NoError(t, err) require.NotNil(t, priv) // Check other methods @@ -100,7 +100,7 @@ func TestPublicKeySafe(t *testing.T) { path := *hd.NewFundraiserParams(0, sdk.CoinType, 0) priv, addr, err := NewPrivKeySecp256k1(path, "cosmos") - require.Nil(t, err, "%s", err) + require.NoError(t, err) require.NotNil(t, priv) require.Nil(t, ShowAddress(path, priv.PubKey(), sdk.GetConfig().GetBech32AccountAddrPrefix())) @@ -155,10 +155,10 @@ func TestPublicKeyHDPath(t *testing.T) { // Check with device for i := uint32(0); i < 10; i++ { path := *hd.NewFundraiserParams(0, sdk.CoinType, i) - fmt.Printf("Checking keys at %v\n", path) + t.Logf("Checking keys at %s\n", path) priv, addr, err := NewPrivKeySecp256k1(path, "cosmos") - require.Nil(t, err, "%s", err) + require.NoError(t, err) require.NotNil(t, addr) require.NotNil(t, priv) @@ -209,14 +209,14 @@ func TestSignaturesHD(t *testing.T) { msg := getFakeTx(account) path := *hd.NewFundraiserParams(account, sdk.CoinType, account/5) - fmt.Printf("Checking signature at %v --- PLEASE REVIEW AND ACCEPT IN THE DEVICE\n", path) + t.Logf("Checking signature at %v --- PLEASE REVIEW AND ACCEPT IN THE DEVICE\n", path) priv, err := NewPrivKeySecp256k1Unsafe(path) - require.Nil(t, err, "%s", err) + require.NoError(t, err) pub := priv.PubKey() sig, err := priv.Sign(msg) - require.Nil(t, err) + require.NoError(t, err) valid := pub.VerifySignature(msg, sig) require.True(t, valid, "Is your device using test mnemonic: %s ?", testutil.TestMnemonic) @@ -227,11 +227,11 @@ func TestRealDeviceSecp256k1(t *testing.T) { msg := getFakeTx(50) path := *hd.NewFundraiserParams(0, sdk.CoinType, 0) priv, err := NewPrivKeySecp256k1Unsafe(path) - require.Nil(t, err, "%s", err) + require.NoError(t, err) pub := priv.PubKey() sig, err := priv.Sign(msg) - require.Nil(t, err) + require.NoError(t, err) valid := pub.VerifySignature(msg, sig) require.True(t, valid) @@ -246,7 +246,7 @@ func TestRealDeviceSecp256k1(t *testing.T) { // signing with the loaded key should match the original pubkey sig, err = priv.Sign(msg) - require.Nil(t, err) + require.NoError(t, err) valid = pub.VerifySignature(msg, sig) require.True(t, valid) diff --git a/types/address.go b/types/address.go index a6d65e7a70..7e0408a849 100644 --- a/types/address.go +++ b/types/address.go @@ -31,15 +31,15 @@ const ( // AddrLen defines a valid address length AddrLen = 20 - // Bech32PrefixAccAddr defines the Bech32 prefix of an account's address + // Bech32MainPrefix defines the main SDK Bech32 prefix of an account's address Bech32MainPrefix = "cosmos" - // Atom in https://github.com/satoshilabs/slips/blob/master/slip-0044.md + // CoinType is the ATOM coin type as defined in SLIP44 (https://github.com/satoshilabs/slips/blob/master/slip-0044.md) CoinType = 118 - // BIP44Prefix is the parts of the BIP44 HD path that are fixed by - // what we used during the fundraiser. - FullFundraiserPath = "44'/118'/0'/0/0" + // FullFundraiserPath is the parts of the BIP44 HD path that are fixed by + // what we used during the ATOM fundraiser. + FullFundraiserPath = "m/44'/118'/0'/0/0" // PrefixAccount is the prefix for account keys PrefixAccount = "acc" From 87315a6aabc0485268dde9d7f93ce64a78bf3a41 Mon Sep 17 00:00:00 2001 From: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Date: Wed, 18 Nov 2020 20:01:22 +0100 Subject: [PATCH 123/136] ibc: commit packet and hash (#7808) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ibc: commit packet and hash * minor changes * fix build * update err msgs * don't use Any * update commitment hash to used fixed length preimage The commitment hash will now use 8 bytes timeout timestamp + 8 bytes timeout height version number + 8 bytes timeout height version height + sha 256 hash of data * remove error from CommitPacket return values * update godoc * rm proto-tools-stamp Co-authored-by: Colin Axner Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- x/ibc/applications/transfer/types/trace.go | 5 +-- x/ibc/core/02-client/types/codec.go | 3 -- .../core/03-connection/keeper/verify_test.go | 3 +- x/ibc/core/04-channel/keeper/packet.go | 14 +++++--- x/ibc/core/04-channel/keeper/timeout.go | 12 ++++--- x/ibc/core/04-channel/types/packet.go | 32 +++++++++++++------ x/ibc/core/04-channel/types/packet_test.go | 16 ++++++++++ .../07-tendermint/types/client_state_test.go | 31 +++++++++--------- 8 files changed, 78 insertions(+), 38 deletions(-) diff --git a/x/ibc/applications/transfer/types/trace.go b/x/ibc/applications/transfer/types/trace.go index b4527d668f..f45113efa3 100644 --- a/x/ibc/applications/transfer/types/trace.go +++ b/x/ibc/applications/transfer/types/trace.go @@ -1,12 +1,12 @@ package types import ( + "crypto/sha256" "encoding/hex" "fmt" "sort" "strings" - "github.com/tendermint/tendermint/crypto/tmhash" tmbytes "github.com/tendermint/tendermint/libs/bytes" tmtypes "github.com/tendermint/tendermint/types" @@ -42,7 +42,8 @@ func ParseDenomTrace(rawDenom string) DenomTrace { // // hash = sha256(tracePath + "/" + baseDenom) func (dt DenomTrace) Hash() tmbytes.HexBytes { - return tmhash.Sum([]byte(dt.GetFullDenomPath())) + hash := sha256.Sum256([]byte(dt.GetFullDenomPath())) + return hash[:] } // GetPrefix returns the receiving denomination prefix composed by the trace info and a separator. diff --git a/x/ibc/core/02-client/types/codec.go b/x/ibc/core/02-client/types/codec.go index d3cb8f7a5f..64b2a3a4f1 100644 --- a/x/ibc/core/02-client/types/codec.go +++ b/x/ibc/core/02-client/types/codec.go @@ -27,9 +27,6 @@ func RegisterInterfaces(registry codectypes.InterfaceRegistry) { registry.RegisterInterface( "ibc.core.client.v1.Height", (*exported.Height)(nil), - ) - registry.RegisterImplementations( - (*exported.Height)(nil), &Height{}, ) registry.RegisterInterface( diff --git a/x/ibc/core/03-connection/keeper/verify_test.go b/x/ibc/core/03-connection/keeper/verify_test.go index ace373e12a..3b047e741a 100644 --- a/x/ibc/core/03-connection/keeper/verify_test.go +++ b/x/ibc/core/03-connection/keeper/verify_test.go @@ -289,9 +289,10 @@ func (suite *KeeperTestSuite) TestVerifyPacketCommitment() { packet.Data = []byte(ibctesting.InvalidID) } + commitment := channeltypes.CommitPacket(suite.chainB.App.IBCKeeper.Codec(), packet) err = suite.chainB.App.IBCKeeper.ConnectionKeeper.VerifyPacketCommitment( suite.chainB.GetContext(), connection, malleateHeight(proofHeight, tc.heightDiff), proof, - packet.GetSourcePort(), packet.GetSourceChannel(), packet.GetSequence(), channeltypes.CommitPacket(packet), + packet.GetSourcePort(), packet.GetSourceChannel(), packet.GetSequence(), commitment, ) if tc.expPass { diff --git a/x/ibc/core/04-channel/keeper/packet.go b/x/ibc/core/04-channel/keeper/packet.go index e86887eee9..9af59745d5 100644 --- a/x/ibc/core/04-channel/keeper/packet.go +++ b/x/ibc/core/04-channel/keeper/packet.go @@ -109,9 +109,11 @@ func (k Keeper) SendPacket( ) } + commitment := types.CommitPacket(k.cdc, packet) + nextSequenceSend++ k.SetNextSequenceSend(ctx, packet.GetSourcePort(), packet.GetSourceChannel(), nextSequenceSend) - k.SetPacketCommitment(ctx, packet.GetSourcePort(), packet.GetSourceChannel(), packet.GetSequence(), types.CommitPacket(packet)) + k.SetPacketCommitment(ctx, packet.GetSourcePort(), packet.GetSourceChannel(), packet.GetSequence(), commitment) // Emit Event with Packet data along with other packet information for relayer to pick up // and relay to other chain @@ -216,11 +218,13 @@ func (k Keeper) RecvPacket( ) } + commitment := types.CommitPacket(k.cdc, packet) + // verify that the counterparty did commit to sending this packet if err := k.connectionKeeper.VerifyPacketCommitment( ctx, connectionEnd, proofHeight, proof, packet.GetSourcePort(), packet.GetSourceChannel(), packet.GetSequence(), - types.CommitPacket(packet), + commitment, ); err != nil { return sdkerrors.Wrap(err, "couldn't verify counterparty packet commitment") } @@ -443,9 +447,11 @@ func (k Keeper) AcknowledgePacket( commitment := k.GetPacketCommitment(ctx, packet.GetSourcePort(), packet.GetSourceChannel(), packet.GetSequence()) + packetCommitment := types.CommitPacket(k.cdc, packet) + // verify we sent the packet and haven't cleared it out yet - if !bytes.Equal(commitment, types.CommitPacket(packet)) { - return sdkerrors.Wrapf(types.ErrInvalidPacket, "commitment bytes are not equal: got (%v), expected (%v)", types.CommitPacket(packet), commitment) + if !bytes.Equal(commitment, packetCommitment) { + return sdkerrors.Wrapf(types.ErrInvalidPacket, "commitment bytes are not equal: got (%v), expected (%v)", packetCommitment, commitment) } if err := k.connectionKeeper.VerifyPacketAcknowledgement( diff --git a/x/ibc/core/04-channel/keeper/timeout.go b/x/ibc/core/04-channel/keeper/timeout.go index 490eb83c8f..1f3dac918f 100644 --- a/x/ibc/core/04-channel/keeper/timeout.go +++ b/x/ibc/core/04-channel/keeper/timeout.go @@ -80,9 +80,11 @@ func (k Keeper) TimeoutPacket( commitment := k.GetPacketCommitment(ctx, packet.GetSourcePort(), packet.GetSourceChannel(), packet.GetSequence()) + packetCommitment := types.CommitPacket(k.cdc, packet) + // verify we sent the packet and haven't cleared it out yet - if !bytes.Equal(commitment, types.CommitPacket(packet)) { - return sdkerrors.Wrapf(types.ErrInvalidPacket, "packet commitment bytes are not equal: got (%v), expected (%v)", commitment, types.CommitPacket(packet)) + if !bytes.Equal(commitment, packetCommitment) { + return sdkerrors.Wrapf(types.ErrInvalidPacket, "packet commitment bytes are not equal: got (%v), expected (%v)", commitment, packetCommitment) } switch channel.Ordering { @@ -216,9 +218,11 @@ func (k Keeper) TimeoutOnClose( commitment := k.GetPacketCommitment(ctx, packet.GetSourcePort(), packet.GetSourceChannel(), packet.GetSequence()) + packetCommitment := types.CommitPacket(k.cdc, packet) + // verify we sent the packet and haven't cleared it out yet - if !bytes.Equal(commitment, types.CommitPacket(packet)) { - return sdkerrors.Wrapf(types.ErrInvalidPacket, "packet commitment bytes are not equal: got (%v), expected (%v)", commitment, types.CommitPacket(packet)) + if !bytes.Equal(commitment, packetCommitment) { + return sdkerrors.Wrapf(types.ErrInvalidPacket, "packet commitment bytes are not equal: got (%v), expected (%v)", commitment, packetCommitment) } counterpartyHops, found := k.CounterpartyHops(ctx, channel) diff --git a/x/ibc/core/04-channel/types/packet.go b/x/ibc/core/04-channel/types/packet.go index 46c1a1f06e..18a3690b1e 100644 --- a/x/ibc/core/04-channel/types/packet.go +++ b/x/ibc/core/04-channel/types/packet.go @@ -1,8 +1,9 @@ package types import ( - "github.com/tendermint/tendermint/crypto/tmhash" + "crypto/sha256" + "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" clienttypes "github.com/cosmos/cosmos-sdk/x/ibc/core/02-client/types" @@ -10,19 +11,32 @@ import ( "github.com/cosmos/cosmos-sdk/x/ibc/core/exported" ) -// CommitPacket returns a packet commitment bytes. The commitment consists of: -// hash(timeout_timestamp + timeout_version_number + timeout_version_height + data) from a given packet. -func CommitPacket(packet exported.PacketI) []byte { +// CommitPacket returns the packet commitment bytes. The commitment consists of: +// sha256_hash(timeout_timestamp + timeout_height.VersionNumber + timeout_height.VersionHeight + sha256_hash(data)) +// from a given packet. This results in a fixed length preimage. +// NOTE: sdk.Uint64ToBigEndian sets the uint64 to a slice of length 8. +func CommitPacket(cdc codec.BinaryMarshaler, packet exported.PacketI) []byte { + timeoutHeight := packet.GetTimeoutHeight() + buf := sdk.Uint64ToBigEndian(packet.GetTimeoutTimestamp()) - buf = append(buf, sdk.Uint64ToBigEndian(packet.GetTimeoutHeight().GetVersionNumber())...) - buf = append(buf, sdk.Uint64ToBigEndian(packet.GetTimeoutHeight().GetVersionHeight())...) - buf = append(buf, packet.GetData()...) - return tmhash.Sum(buf) + + versionNumber := sdk.Uint64ToBigEndian(timeoutHeight.GetVersionNumber()) + buf = append(buf, versionNumber...) + + versionHeight := sdk.Uint64ToBigEndian(timeoutHeight.GetVersionHeight()) + buf = append(buf, versionHeight...) + + dataHash := sha256.Sum256(packet.GetData()) + buf = append(buf, dataHash[:]...) + + hash := sha256.Sum256(buf) + return hash[:] } // CommitAcknowledgement returns the hash of commitment bytes func CommitAcknowledgement(data []byte) []byte { - return tmhash.Sum(data) + hash := sha256.Sum256(data) + return hash[:] } var _ exported.PacketI = (*Packet)(nil) diff --git a/x/ibc/core/04-channel/types/packet_test.go b/x/ibc/core/04-channel/types/packet_test.go index 114352f5c9..12ed828e66 100644 --- a/x/ibc/core/04-channel/types/packet_test.go +++ b/x/ibc/core/04-channel/types/packet_test.go @@ -5,9 +5,25 @@ import ( "github.com/stretchr/testify/require" + "github.com/cosmos/cosmos-sdk/codec" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + clienttypes "github.com/cosmos/cosmos-sdk/x/ibc/core/02-client/types" "github.com/cosmos/cosmos-sdk/x/ibc/core/04-channel/types" ) +func TestCommitPacket(t *testing.T) { + packet := types.NewPacket(validPacketData, 1, portid, chanid, cpportid, cpchanid, timeoutHeight, timeoutTimestamp) + + registry := codectypes.NewInterfaceRegistry() + clienttypes.RegisterInterfaces(registry) + types.RegisterInterfaces(registry) + + cdc := codec.NewProtoCodec(registry) + + commitment := types.CommitPacket(cdc, &packet) + require.NotNil(t, commitment) +} + func TestPacketValidateBasic(t *testing.T) { testCases := []struct { packet types.Packet diff --git a/x/ibc/light-clients/07-tendermint/types/client_state_test.go b/x/ibc/light-clients/07-tendermint/types/client_state_test.go index a160484609..71f9f3fc3b 100644 --- a/x/ibc/light-clients/07-tendermint/types/client_state_test.go +++ b/x/ibc/light-clients/07-tendermint/types/client_state_test.go @@ -33,57 +33,57 @@ func (suite *TendermintTestSuite) TestValidate() { }{ { name: "valid client", - clientState: types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false), + clientState: types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false), expPass: true, }, { name: "valid client with nil upgrade path", - clientState: types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), "", false, false), + clientState: types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), "", false, false), expPass: true, }, { name: "invalid chainID", - clientState: types.NewClientState(" ", types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false), + clientState: types.NewClientState(" ", types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false), expPass: false, }, { name: "invalid trust level", - clientState: types.NewClientState(chainID, types.Fraction{Numerator: 0, Denominator: 1}, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false), + clientState: types.NewClientState(chainID, types.Fraction{Numerator: 0, Denominator: 1}, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false), expPass: false, }, { name: "invalid trusting period", - clientState: types.NewClientState(chainID, types.DefaultTrustLevel, 0, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false), + clientState: types.NewClientState(chainID, types.DefaultTrustLevel, 0, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false), expPass: false, }, { name: "invalid unbonding period", - clientState: types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, 0, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false), + clientState: types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, 0, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false), expPass: false, }, { name: "invalid max clock drift", - clientState: types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, 0, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false), + clientState: types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, 0, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false), expPass: false, }, { name: "invalid height", - clientState: types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, clienttypes.ZeroHeight(), commitmenttypes.GetSDKSpecs(), upgradePath, false, false), + clientState: types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, clienttypes.ZeroHeight(), commitmenttypes.GetSDKSpecs(), upgradePath, false, false), expPass: false, }, { name: "trusting period not less than unbonding period", - clientState: types.NewClientState(chainID, types.DefaultTrustLevel, ubdPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false), + clientState: types.NewClientState(chainID, types.DefaultTrustLevel, ubdPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false), expPass: false, }, { name: "proof specs is nil", - clientState: types.NewClientState(chainID, types.DefaultTrustLevel, ubdPeriod, ubdPeriod, maxClockDrift, height, nil, upgradePath, false, false), + clientState: types.NewClientState(chainID, types.DefaultTrustLevel, ubdPeriod, ubdPeriod, maxClockDrift, height, nil, upgradePath, false, false), expPass: false, }, { name: "proof specs contains nil", - clientState: types.NewClientState(chainID, types.DefaultTrustLevel, ubdPeriod, ubdPeriod, maxClockDrift, height, []*ics23.ProofSpec{ics23.TendermintSpec, nil}, upgradePath, false, false), + clientState: types.NewClientState(chainID, types.DefaultTrustLevel, ubdPeriod, ubdPeriod, maxClockDrift, height, []*ics23.ProofSpec{ics23.TendermintSpec, nil}, upgradePath, false, false), expPass: false, }, } @@ -119,7 +119,7 @@ func (suite *TendermintTestSuite) TestVerifyClientConsensusState() { // }, { name: "ApplyPrefix failed", - clientState: types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false), + clientState: types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false), consensusState: types.ConsensusState{ Root: commitmenttypes.NewMerkleRoot(suite.header.Header.GetAppHash()), }, @@ -128,7 +128,7 @@ func (suite *TendermintTestSuite) TestVerifyClientConsensusState() { }, { name: "latest client height < height", - clientState: types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false), + clientState: types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false), consensusState: types.ConsensusState{ Root: commitmenttypes.NewMerkleRoot(suite.header.Header.GetAppHash()), }, @@ -146,7 +146,7 @@ func (suite *TendermintTestSuite) TestVerifyClientConsensusState() { }, { name: "proof verification failed", - clientState: types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false), + clientState: types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false), consensusState: types.ConsensusState{ Root: commitmenttypes.NewMerkleRoot(suite.header.Header.GetAppHash()), NextValidatorsHash: suite.valsHash, @@ -396,9 +396,10 @@ func (suite *TendermintTestSuite) TestVerifyPacketCommitment() { store := suite.chainA.App.IBCKeeper.ClientKeeper.ClientStore(suite.chainA.GetContext(), clientA) + commitment := channeltypes.CommitPacket(suite.chainA.App.IBCKeeper.Codec(), packet) err = clientState.VerifyPacketCommitment( store, suite.chainA.Codec, proofHeight, &prefix, proof, - packet.GetSourcePort(), packet.GetSourceChannel(), packet.GetSequence(), channeltypes.CommitPacket(packet), + packet.GetSourcePort(), packet.GetSourceChannel(), packet.GetSequence(), commitment, ) if tc.expPass { From 35183a37e6eda8ee461035c41d90ef36772f99cd Mon Sep 17 00:00:00 2001 From: Amaury Date: Wed, 18 Nov 2020 22:44:13 +0100 Subject: [PATCH 124/136] Fix StatusCommand (#7974) Co-authored-by: SaReN --- client/rpc/rpc_test.go | 47 ++++++++++++++++++++++++++++++++++++++++++ client/rpc/status.go | 43 ++++++++++++++++++++++++++++++++------ 2 files changed, 84 insertions(+), 6 deletions(-) create mode 100644 client/rpc/rpc_test.go diff --git a/client/rpc/rpc_test.go b/client/rpc/rpc_test.go new file mode 100644 index 0000000000..c1c233e73b --- /dev/null +++ b/client/rpc/rpc_test.go @@ -0,0 +1,47 @@ +package rpc_test + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/suite" + + "github.com/cosmos/cosmos-sdk/client/rpc" + clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" + "github.com/cosmos/cosmos-sdk/testutil/network" +) + +type IntegrationTestSuite struct { + suite.Suite + + network *network.Network +} + +func (s *IntegrationTestSuite) SetupSuite() { + s.T().Log("setting up integration test suite") + + s.network = network.New(s.T(), network.DefaultConfig()) + s.Require().NotNil(s.network) + + s.Require().NoError(s.network.WaitForNextBlock()) +} + +func (s *IntegrationTestSuite) TearDownSuite() { + s.T().Log("tearing down integration test suite") + s.network.Cleanup() +} + +func (s *IntegrationTestSuite) TestStatusCommand() { + val0 := s.network.Validators[0] + cmd := rpc.StatusCommand() + + out, err := clitestutil.ExecTestCLICmd(val0.ClientCtx, cmd, []string{}) + s.Require().NoError(err) + + // Make sure the output has the validator moniker. + s.Require().Contains(out.String(), fmt.Sprintf("\"moniker\":\"%s\"", val0.Moniker)) +} + +func TestIntegrationTestSuite(t *testing.T) { + suite.Run(t, new(IntegrationTestSuite)) +} diff --git a/client/rpc/status.go b/client/rpc/status.go index b234427480..f390a1ab99 100644 --- a/client/rpc/status.go +++ b/client/rpc/status.go @@ -2,22 +2,38 @@ package rpc import ( "context" - "fmt" "net/http" "github.com/spf13/cobra" + "github.com/tendermint/tendermint/libs/bytes" + "github.com/tendermint/tendermint/p2p" ctypes "github.com/tendermint/tendermint/rpc/core/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/cosmos/cosmos-sdk/codec/legacy" + cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/types/rest" "github.com/cosmos/cosmos-sdk/version" - - "github.com/tendermint/tendermint/p2p" ) +// ValidatorInfo is info about the node's validator, same as Tendermint, +// except that we use our own PubKey. +type validatorInfo struct { + Address bytes.HexBytes + PubKey cryptotypes.PubKey + VotingPower int64 +} + +// ResultStatus is node's info, same as Tendermint, except that we use our own +// PubKey. +type resultStatus struct { + NodeInfo p2p.DefaultNodeInfo + SyncInfo ctypes.SyncInfo + ValidatorInfo validatorInfo +} + // StatusCommand returns the command to return the status of the network. func StatusCommand() *cobra.Command { cmd := &cobra.Command{ @@ -31,12 +47,27 @@ func StatusCommand() *cobra.Command { return err } - output, err := legacy.Cdc.MarshalJSON(status) + // `status` has TM pubkeys, we need to convert them to our pubkeys. + pk, err := cryptocodec.FromTmPubKeyInterface(status.ValidatorInfo.PubKey) + if err != nil { + return err + } + statusWithPk := resultStatus{ + NodeInfo: status.NodeInfo, + SyncInfo: status.SyncInfo, + ValidatorInfo: validatorInfo{ + Address: status.ValidatorInfo.Address, + PubKey: pk, + VotingPower: status.ValidatorInfo.VotingPower, + }, + } + + output, err := clientCtx.LegacyAmino.MarshalJSON(statusWithPk) if err != nil { return err } - fmt.Println(string(output)) + cmd.Println(string(output)) return nil }, } From fe58ee99518adb62fe4a13c7ca3049af079d6fc7 Mon Sep 17 00:00:00 2001 From: Robert Zaremba Date: Thu, 19 Nov 2020 00:11:04 +0100 Subject: [PATCH 125/136] =?UTF-8?q?ADR-031:=20elaborate=20consequences=20a?= =?UTF-8?q?nd=20encapsulation=20of=20module=20client-se=E2=80=A6=20(#7839)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ADR-031: elaborate consequences and encapsulation of module client-server implementation * Update docs/architecture/adr-031-msg-service.md Co-authored-by: Aaron Craelius Co-authored-by: Aaron Craelius --- docs/architecture/adr-031-msg-service.md | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/docs/architecture/adr-031-msg-service.md b/docs/architecture/adr-031-msg-service.md index bd67d090d8..edd906fdb9 100644 --- a/docs/architecture/adr-031-msg-service.md +++ b/docs/architecture/adr-031-msg-service.md @@ -53,7 +53,7 @@ This isn't necessarily bad, but it does add overhead to creating modules. We decide to use protobuf `service` definitions for defining `Msg`s as well as the code generated by them as a replacement for `Msg` handlers. -Below we define how this will look for the `SubmitProposal` message from `x/gov` module. +Below we define how this will look for the `SubmitProposal` message from `x/gov` module. We start with a `Msg` `service` definition: ```proto @@ -105,7 +105,7 @@ should use the more canonical `Msg...Request` names. Currently, we are encoding `Msg`s as `Any` in `Tx`s which involves packing the binary-encoded `Msg` with its type URL. -The type URL for `MsgSubmitProposal` based on the proto3 spec is `/cosmos.gov.MsgSubmitProposal`. +The type URL for `MsgSubmitProposal` based on the proto3 spec is `/cosmos.gov.MsgSubmitProposal`. The fully-qualified name for the `SubmitProposal` service method above (also based on the proto3 and gRPC specs) is `/cosmos.gov.Msg/SubmitProposal` which varies @@ -117,7 +117,7 @@ In order to encode service methods in transactions, we encode them as `Any`s in the same `TxBody.messages` field as other `Msg`s. We simply set `Any.type_url` to the full-qualified method name (ex. `/cosmos.gov.Msg/SubmitProposal`) and set `Any.value` to the protobuf encoding of the request message -(`MsgSubmitProposal` in this case). +(`MsgSubmitProposal` in this case). ### Decoding @@ -125,7 +125,7 @@ When decoding, `TxBody.UnpackInterfaces` will need a special case to detect if `Any` type URLs match the service method format (ex. `/cosmos.gov.Msg/SubmitProposal`) by checking for two `/` characters. Messages that are method names plus request parameters instead of a normal `Any` messages will get unpacked into the `ServiceMsg` struct: - + ```go type ServiceMsg struct { // MethodName is the fully-qualified service name @@ -139,7 +139,7 @@ type ServiceMsg struct { In the future, `service` definitions may become the primary method for defining `Msg`s. As a starting point, we need to integrate with the SDK's existing routing -and `Msg` interface. +and `Msg` interface. To do this, `ServiceMsg` implements the `sdk.Msg` interface and its handler does the actual method routing, allowing this feature to be added incrementally on top of @@ -218,17 +218,25 @@ Separate handler definition is no longer needed with this approach. ## Consequences +This design changes how a module functionality is exposed and accessed. It deprecates the existing `Handler` interface and `AppModule.Route` in favor of [Protocol Buffer Services](https://developers.google.com/protocol-buffers/docs/proto3#services) and Service Routing described above. This dramatically simplifies the code. We don't need to create handlers and keepers any more. Use of Protocol Buffer auto-generated clients clearly separates the communication interfaces between the module and a modules user. The control logic (aka handlers and keepers) is not exposed any more. A module interface can be seen as a black box accessible through a client API. It's worth to note that the client interfaces are also generated by Protocol Buffers. + +This also allows us to change how we perform functional tests. Instead of mocking AppModules and Router, we will mock a client (server will stay hidden). More specifically: we will never mock `moduleA.MsgServer` in `moduleB`, but rather `moduleA.MsgClient`. One can think about it as working with external services (eg DBs, or online servers...). We assume that the transmission between clients and servers is correctly handled by generated Protocol Buffers. + +Finally, closing a module to client API opens desirable OCAP patterns discussed in ADR-033. Since server implementation and interface is hidden, nobody can hold "keepers"/servers and will be forced to relay on the client interface, which will drive developers for correct encapsulation and software engineering patterns. + ### Pros - communicates return type clearly - manual handler registration and return type marshaling is no longer needed, just implement the interface and register it -- some keeper code could be automatically generate, this would improve the UX of [\#7093](https://github.com/cosmos/cosmos-sdk/issues/7093) approach (1) if we chose to adopt that -- generated client code could be useful for clients +- communication interface is automatically generated, the developer can now focus only on the state transition methods - this would improve the UX of [\#7093](https://github.com/cosmos/cosmos-sdk/issues/7093) approach (1) if we chose to adopt that +- generated client code could be useful for clients and tests +- dramatically reduces and simplifies the code ### Cons - supporting both this and the current concrete `Msg` type approach simultaneously could be confusing (we could choose to deprecate the current approach) - using `service` definitions outside the context of gRPC could be confusing (but doesn’t violate the proto3 spec) + ## References - [Initial Github Issue \#7122](https://github.com/cosmos/cosmos-sdk/issues/7122) From 0034e4845826bf97032d08a13c37d68d414cc573 Mon Sep 17 00:00:00 2001 From: Robert Zaremba Date: Thu, 19 Nov 2020 01:10:11 +0100 Subject: [PATCH 126/136] Bech32 PubKey: use protobuf in slashing keeper --- x/slashing/keeper/keeper.go | 34 ++++++++++++++-------------------- 1 file changed, 14 insertions(+), 20 deletions(-) diff --git a/x/slashing/keeper/keeper.go b/x/slashing/keeper/keeper.go index 999e82404b..5264e45948 100644 --- a/x/slashing/keeper/keeper.go +++ b/x/slashing/keeper/keeper.go @@ -42,33 +42,27 @@ func (k Keeper) Logger(ctx sdk.Context) log.Logger { } // AddPubkey sets a address-pubkey relation -func (k Keeper) AddPubkey(ctx sdk.Context, pubkey cryptotypes.PubKey) { - addr := pubkey.Address() - - pkStr, err := sdk.Bech32ifyPubKey(sdk.Bech32PubKeyTypeConsPub, pubkey) +func (k Keeper) AddPubkey(ctx sdk.Context, pubkey cryptotypes.PubKey) error { + bz, err := codec.MarshalAny(k.cdc, pubkey) if err != nil { - panic(fmt.Errorf("error while setting address-pubkey relation: %s", addr)) + return err } - - k.setAddrPubkeyRelation(ctx, addr, pkStr) + store := ctx.KVStore(k.storeKey) + key := types.AddrPubkeyRelationKey(pubkey.Address()) + store.Set(key, bz) + return nil } // GetPubkey returns the pubkey from the adddress-pubkey relation -func (k Keeper) GetPubkey(ctx sdk.Context, address cryptotypes.Address) (cryptotypes.PubKey, error) { +func (k Keeper) GetPubkey(ctx sdk.Context, a cryptotypes.Address) (cryptotypes.PubKey, error) { store := ctx.KVStore(k.storeKey) - - var pubkey gogotypes.StringValue - err := k.cdc.UnmarshalBinaryBare(store.Get(types.AddrPubkeyRelationKey(address)), &pubkey) - if err != nil { - return nil, fmt.Errorf("address %s not found", sdk.ConsAddress(address)) + bz := store.Get(types.AddrPubkeyRelationKey(a)) + if bz == nil { + return nil, fmt.Errorf("address %s not found", sdk.ConsAddress(a)) } - - pkStr, err := sdk.GetPubKeyFromBech32(sdk.Bech32PubKeyTypeConsPub, pubkey.Value) - if err != nil { - return pkStr, err - } - - return pkStr, nil + var pk cryptotypes.PubKey + err := codec.UnmarshalAny(k.cdc, &pk, bz) + return pk, err } // Slash attempts to slash a validator. The slash is delegated to the staking From a4130f5821ab9cc44022de06a7f0c44faef53619 Mon Sep 17 00:00:00 2001 From: Robert Zaremba Date: Thu, 19 Nov 2020 02:19:19 +0100 Subject: [PATCH 127/136] remove unused function --- x/slashing/keeper/keeper.go | 9 --------- 1 file changed, 9 deletions(-) diff --git a/x/slashing/keeper/keeper.go b/x/slashing/keeper/keeper.go index 5264e45948..b5304a6c5e 100644 --- a/x/slashing/keeper/keeper.go +++ b/x/slashing/keeper/keeper.go @@ -3,8 +3,6 @@ package keeper import ( "fmt" - gogotypes "github.com/gogo/protobuf/types" - "github.com/tendermint/tendermint/libs/log" "github.com/cosmos/cosmos-sdk/codec" @@ -93,13 +91,6 @@ func (k Keeper) Jail(ctx sdk.Context, consAddr sdk.ConsAddress) { k.sk.Jail(ctx, consAddr) } -func (k Keeper) setAddrPubkeyRelation(ctx sdk.Context, addr cryptotypes.Address, pubkey string) { - store := ctx.KVStore(k.storeKey) - - bz := k.cdc.MustMarshalBinaryBare(&gogotypes.StringValue{Value: pubkey}) - store.Set(types.AddrPubkeyRelationKey(addr), bz) -} - func (k Keeper) deleteAddrPubkeyRelation(ctx sdk.Context, addr cryptotypes.Address) { store := ctx.KVStore(k.storeKey) store.Delete(types.AddrPubkeyRelationKey(addr)) From ba4bc4b5c86e56baa4f2589480ff7aa493222655 Mon Sep 17 00:00:00 2001 From: Alessio Treglia Date: Thu, 19 Nov 2020 09:48:55 +0000 Subject: [PATCH 128/136] exclude *.pb.gw.go files from codecov.io report (#7981) --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 06e85c907f..b586909335 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -144,6 +144,7 @@ jobs: run: | excludelist="$(find ./ -type f -name '*.go' | xargs grep -l 'DONTCOVER')" excludelist+=" $(find ./ -type f -name '*.pb.go')" + excludelist+=" $(find ./ -type f -name '*.pb.gw.go')" excludelist+=" $(find ./ -type f -path './tests/mocks/*.go')" for filename in ${excludelist}; do filename=$(echo $filename | sed 's/^./github.com\/cosmos\/cosmos-sdk/g') From fdac39813cb6627df843ab7852308330f45d26d2 Mon Sep 17 00:00:00 2001 From: Robert Zaremba Date: Thu, 19 Nov 2020 13:33:27 +0100 Subject: [PATCH 129/136] changelog update --- CHANGELOG.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index efca4d9bd3..7b2c97295b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -37,11 +37,14 @@ Ref: https://keepachangelog.com/en/1.0.0/ ## [Unreleased] ### Improvements -- (SDK) [\#7925](https://github.com/cosmos/cosmos-sdk/pull/7925) Updated dependencies to use gRPC v1.33.2 +* (SDK) [\#7925](https://github.com/cosmos/cosmos-sdk/pull/7925) Updated dependencies to use gRPC v1.33.2 * Updated gRPC dependency to v1.33.2 * Updated iavl dependency to v0.15-rc2 * (version) [\#7848](https://github.com/cosmos/cosmos-sdk/pull/7848) [\#7941](https://github.com/cosmos/cosmos-sdk/pull/7941) `version --long` output now shows the list of build dependencies and replaced build dependencies. +### State Machine Breaking Changes +* (x/upgrade) [\#7979](https://github.com/cosmos/cosmos-sdk/pull/7979) keeper pubkey storage serialization migration from bech32 to protobuf. + ### Bug Fixes * (crypto) [\#7966](https://github.com/cosmos/cosmos-sdk/issues/7966) `Bip44Params` `String()` function now correctly returns the absolute HD path by adding the `m/` prefix. From fcb6c33c34991c5951e804c9a650f45f7069e355 Mon Sep 17 00:00:00 2001 From: Alessio Treglia Date: Thu, 19 Nov 2020 16:15:31 +0000 Subject: [PATCH 130/136] revert tiny portion of #7970 (#7984) Testable examples were accidentally converted into tests. --- crypto/hd/hdpath_test.go | 195 +++++++++++++++++++-------------------- 1 file changed, 96 insertions(+), 99 deletions(-) diff --git a/crypto/hd/hdpath_test.go b/crypto/hd/hdpath_test.go index 2620e0605c..6dfda043eb 100644 --- a/crypto/hd/hdpath_test.go +++ b/crypto/hd/hdpath_test.go @@ -19,13 +19,6 @@ func mnemonicToSeed(mnemonic string) []byte { return bip39.NewSeed(mnemonic, defaultBIP39Passphrase) } -func TestPathParamsString(t *testing.T) { - path := hd.NewParams(44, 0, 0, false, 0) - require.Equal(t, "m/44'/0'/0'/0/0", path.String()) - path = hd.NewParams(44, 33, 7, true, 9) - require.Equal(t, "m/44'/33'/7'/1/9", path.String()) -} - func TestStringifyFundraiserPathParams(t *testing.T) { path := hd.NewFundraiserParams(4, types.CoinType, 22) require.Equal(t, "m/44'/118'/4'/0/22", path.String()) @@ -99,98 +92,6 @@ func TestParamsFromPath(t *testing.T) { } -func TestBIP32Vecs(t *testing.T) { - - seed := mnemonicToSeed("barrel original fuel morning among eternal " + - "filter ball stove pluck matrix mechanic") - master, ch := hd.ComputeMastersFromSeed(seed) - fmt.Println("keys from fundraiser test-vector (cosmos, bitcoin, ether)") - fmt.Println() - - // cosmos, absolute path - priv, err := hd.DerivePrivateKeyForPath(master, ch, types.FullFundraiserPath) - require.NoError(t, err) - require.NotEmpty(t, priv) - fmt.Println(hex.EncodeToString(priv[:])) - - absPrivKey := hex.EncodeToString(priv[:]) - - // cosmos, relative path - priv, err = hd.DerivePrivateKeyForPath(master, ch, "44'/118'/0'/0/0") - require.NoError(t, err) - require.NotEmpty(t, priv) - - relPrivKey := hex.EncodeToString(priv[:]) - - // check compatibility between relative and absolute HD paths - require.Equal(t, relPrivKey, absPrivKey) - - // bitcoin - priv, err = hd.DerivePrivateKeyForPath(master, ch, "m/44'/0'/0'/0/0") - require.NoError(t, err) - require.NotEmpty(t, priv) - fmt.Println(hex.EncodeToString(priv[:])) - - // ether - priv, err = hd.DerivePrivateKeyForPath(master, ch, "m/44'/60'/0'/0/0") - require.NoError(t, err) - require.NotEmpty(t, priv) - fmt.Println(hex.EncodeToString(priv[:])) - - // INVALID - priv, err = hd.DerivePrivateKeyForPath(master, ch, "m/X/0'/0'/0/0") - require.Error(t, err) - require.Empty(t, priv) - - priv, err = hd.DerivePrivateKeyForPath(master, ch, "m/-44/0'/0'/0/0") - require.Error(t, err) - require.Empty(t, priv) - - fmt.Println() - fmt.Println("keys generated via https://coinomi.com/recovery-phrase-tool.html") - fmt.Println() - - seed = mnemonicToSeed( - "advice process birth april short trust crater change bacon monkey medal garment " + - "gorilla ranch hour rival razor call lunar mention taste vacant woman sister") - master, ch = hd.ComputeMastersFromSeed(seed) - priv, _ = hd.DerivePrivateKeyForPath(master, ch, "m/44'/1'/1'/0/4") - fmt.Println(hex.EncodeToString(priv[:])) - - seed = mnemonicToSeed("idea naive region square margin day captain habit " + - "gun second farm pact pulse someone armed") - master, ch = hd.ComputeMastersFromSeed(seed) - priv, err = hd.DerivePrivateKeyForPath(master, ch, "m/44'/0'/0'/0/420") - require.NoError(t, err) - fmt.Println(hex.EncodeToString(priv[:])) - - fmt.Println() - fmt.Println("BIP 32 example") - fmt.Println() - - // bip32 path: m/0/7 - seed = mnemonicToSeed("monitor flock loyal sick object grunt duty ride develop assault harsh history") - master, ch = hd.ComputeMastersFromSeed(seed) - priv, err = hd.DerivePrivateKeyForPath(master, ch, "m/0/7") - require.NoError(t, err) // TODO: shouldn't this error? - fmt.Println(hex.EncodeToString(priv[:])) - - // Output: keys from fundraiser test-vector (cosmos, bitcoin, ether) - // - // bfcb217c058d8bbafd5e186eae936106ca3e943889b0b4a093ae13822fd3170c - // e77c3de76965ad89997451de97b95bb65ede23a6bf185a55d80363d92ee37c3d - // 7fc4d8a8146dea344ba04c593517d3f377fa6cded36cd55aee0a0bb968e651bc - // - // keys generated via https://coinomi.com/recovery-phrase-tool.html - // - // a61f10c5fecf40c084c94fa54273b6f5d7989386be4a37669e6d6f7b0169c163 - // 32c4599843de3ef161a629a461d12c60b009b676c35050be5f7ded3a3b23501f - // - // BIP 32 example - // - // c4c11d8c03625515905d7e89d25dfc66126fbc629ecca6db489a1a72fc4bda78 -} - func TestCreateHDPath(t *testing.T) { type args struct { coinType uint32 @@ -284,3 +185,99 @@ func TestDeriveHDPathRange(t *testing.T) { }) } } + +func ExampleStringifyPathParams() { + path := hd.NewParams(44, 0, 0, false, 0) + fmt.Println(path.String()) + path = hd.NewParams(44, 33, 7, true, 9) + fmt.Println(path.String()) + // Output: + // m/44'/0'/0'/0/0 + // m/44'/33'/7'/1/9 +} + +func ExampleSomeBIP32TestVecs() { + seed := mnemonicToSeed("barrel original fuel morning among eternal " + + "filter ball stove pluck matrix mechanic") + master, ch := hd.ComputeMastersFromSeed(seed) + fmt.Println("keys from fundraiser test-vector (cosmos, bitcoin, ether)") + fmt.Println() + // cosmos + priv, err := hd.DerivePrivateKeyForPath(master, ch, types.FullFundraiserPath) + if err != nil { + fmt.Println("INVALID") + } else { + fmt.Println(hex.EncodeToString(priv[:])) + } + // bitcoin + priv, err = hd.DerivePrivateKeyForPath(master, ch, "44'/0'/0'/0/0") + if err != nil { + fmt.Println("INVALID") + } else { + fmt.Println(hex.EncodeToString(priv[:])) + } + // ether + priv, err = hd.DerivePrivateKeyForPath(master, ch, "44'/60'/0'/0/0") + if err != nil { + fmt.Println("INVALID") + } else { + fmt.Println(hex.EncodeToString(priv[:])) + } + // INVALID + priv, err = hd.DerivePrivateKeyForPath(master, ch, "X/0'/0'/0/0") + if err != nil { + fmt.Println("INVALID") + } else { + fmt.Println(hex.EncodeToString(priv[:])) + } + priv, err = hd.DerivePrivateKeyForPath(master, ch, "-44/0'/0'/0/0") + if err != nil { + fmt.Println("INVALID") + } else { + fmt.Println(hex.EncodeToString(priv[:])) + } + + fmt.Println() + fmt.Println("keys generated via https://coinomi.com/recovery-phrase-tool.html") + fmt.Println() + + seed = mnemonicToSeed( + "advice process birth april short trust crater change bacon monkey medal garment " + + "gorilla ranch hour rival razor call lunar mention taste vacant woman sister") + master, ch = hd.ComputeMastersFromSeed(seed) + priv, _ = hd.DerivePrivateKeyForPath(master, ch, "44'/1'/1'/0/4") + fmt.Println(hex.EncodeToString(priv[:])) + + seed = mnemonicToSeed("idea naive region square margin day captain habit " + + "gun second farm pact pulse someone armed") + master, ch = hd.ComputeMastersFromSeed(seed) + priv, _ = hd.DerivePrivateKeyForPath(master, ch, "44'/0'/0'/0/420") + fmt.Println(hex.EncodeToString(priv[:])) + + fmt.Println() + fmt.Println("BIP 32 example") + fmt.Println() + + // bip32 path: m/0/7 + seed = mnemonicToSeed("monitor flock loyal sick object grunt duty ride develop assault harsh history") + master, ch = hd.ComputeMastersFromSeed(seed) + priv, _ = hd.DerivePrivateKeyForPath(master, ch, "0/7") + fmt.Println(hex.EncodeToString(priv[:])) + + // Output: keys from fundraiser test-vector (cosmos, bitcoin, ether) + // + // bfcb217c058d8bbafd5e186eae936106ca3e943889b0b4a093ae13822fd3170c + // e77c3de76965ad89997451de97b95bb65ede23a6bf185a55d80363d92ee37c3d + // 7fc4d8a8146dea344ba04c593517d3f377fa6cded36cd55aee0a0bb968e651bc + // INVALID + // INVALID + // + // keys generated via https://coinomi.com/recovery-phrase-tool.html + // + // a61f10c5fecf40c084c94fa54273b6f5d7989386be4a37669e6d6f7b0169c163 + // 32c4599843de3ef161a629a461d12c60b009b676c35050be5f7ded3a3b23501f + // + // BIP 32 example + // + // c4c11d8c03625515905d7e89d25dfc66126fbc629ecca6db489a1a72fc4bda78 +} From 4be5cd34543f206d9f4c546f62509d18047913ef Mon Sep 17 00:00:00 2001 From: Aleksandr Bezobchuk Date: Thu, 19 Nov 2020 11:57:10 -0500 Subject: [PATCH 131/136] docs: x/bank: Atlas Doc (#7961) --- x/bank/atlas/atlas-v0.39.1.md | 208 ++++++++++++++++++++++++++++++++++ x/bank/atlas/atlas.toml | 34 ++++++ 2 files changed, 242 insertions(+) create mode 100644 x/bank/atlas/atlas-v0.39.1.md create mode 100644 x/bank/atlas/atlas.toml diff --git a/x/bank/atlas/atlas-v0.39.1.md b/x/bank/atlas/atlas-v0.39.1.md new file mode 100644 index 0000000000..ef34e02e00 --- /dev/null +++ b/x/bank/atlas/atlas-v0.39.1.md @@ -0,0 +1,208 @@ +# x/bank + +The `x/bank` module is responsible for handling multi-asset coin transfers between +accounts and tracking special-case pseudo-transfers which must work differently +with particular kinds of accounts. + +## Usage + +1. Import the module. + + ```go + import ( + "github.com/cosmos/cosmos-sdk/x/bank" + ) + ``` + +2. Add `AppModuleBasic` to your `ModuleBasics`. + + ```go + var ( + ModuleBasics = module.NewBasicManager( + // ... + bank.AppModuleBasic{}, + } + ) + ``` + +3. Create the module's parameter subspace in your application constructor. + + ```go + func NewApp(...) *App { + // ... + app.subspaces[bank.ModuleName] = app.ParamsKeeper.Subspace(bank.DefaultParamspace) + } + ``` + +4. Create the keeper. Note, the `x/bank` module depends on the `x/auth` module + and a list of blacklisted account addresses which funds are not allowed to be + sent to. Your application will need to define this method based your needs. + + ```go + func NewApp(...) *App { + // ... + app.BankKeeper = bank.NewBaseKeeper( + app.AccountKeeper, app.subspaces[bank.ModuleName], app.BlacklistedAccAddrs(), + ) + } + ``` + +5. Add the `x/bank` module to the app's `ModuleManager`. + + ```go + func NewApp(...) *App { + // ... + app.mm = module.NewManager( + // ... + bank.NewAppModule(app.BankKeeper, app.AccountKeeper), + // ... + ) + } + ``` + +6. Set the `x/bank` module genesis order. + + ```go + func NewApp(...) *App { + // ... + app.mm.SetOrderInitGenesis(..., bank.ModuleName, ...) + } + ``` + +7. Add the `x/bank` module to the simulation manager (if you have one set). + + ```go + func NewApp(...) *App { + // ... + app.sm = module.NewSimulationManager( + // ... + bank.NewAppModule(app.BankKeeper, app.AccountKeeper), + // ... + ) + } + +## Genesis + +The `x/bank` module defines its genesis state as follows: + +```go +type GenesisState struct { + SendEnabled bool `json:"send_enabled" yaml:"send_enabled"` +} +``` + +The `SendEnabled` parameter determines if transfers are enabled or disabled +entirely on the chain. This can be used to start a network without enabling +transfers while ensuring critical network functionality is operating as expected. + +## Messages + +### `MsgSend` + +The `x/bank` module allows for transfer of funds from a source account to a +destination account. + +```go +type MsgSend struct { + FromAddress sdk.AccAddress `json:"from_address" yaml:"from_address"` + ToAddress sdk.AccAddress `json:"to_address" yaml:"to_address"` + Amount sdk.Coins `json:"amount" yaml:"amount"` +} +``` + +### `MsgMultiSend` + +The `x/bank` module also allows for multiple inputs and outputs. The sum of all +inputs must be equivalent to the sum of all outputs. + +```go +type Input struct { + Address sdk.AccAddress `json:"address" yaml:"address"` + Coins sdk.Coins `json:"coins" yaml:"coins"` +} + +type Output struct { + Address sdk.AccAddress `json:"address" yaml:"address"` + Coins sdk.Coins `json:"coins" yaml:"coins"` +} + +type MsgMultiSend struct { + Inputs []Input `json:"inputs" yaml:"inputs"` + Outputs []Output `json:"outputs" yaml:"outputs"` +} +``` + +## Client + +### CLI + +The `x/bank` supports the following transactional commands. + +1. Send tokens via a `MsgSend` message. + + ```shell + $ tx send [from_key_or_address] [to_address] [amount] [...flags] + ``` + +Note, the `x/bank` module does not natively support constructing a `MsgMultiSend` +message. This type of message must be constructed manually, but it may be signed +and broadcasted via the CLI. + +### REST + +The `x/bank` supports various query API endpoints and a `MsgSend` construction +endpoint. + +1. Construct an unsigned `MsgSend` transaction. + + | Method | Path | + | :----- | :----------------------- | + | `POST` | `/bank/accounts/{address}/transfers` | + + Sample payload: + + ```json + { + "base_req": { + "chain_id": "chain-foo", + "from": "cosmos1u3fneykx9carelvurc6av22vpjvptytj9wklk0", + "memo": "memo", + "fees": [ + { + "denom": "stake", + "amount": "25000" + } + ] + }, + "amount": [ + { + "denom": "stake", + "amount": "400000000" + } + ] + } + ``` + +2. Query for an account's balance. + + | Method | Path | + | :----- | :----------------------- | + | `GET` | `/bank/balances/{address}` | + + Sample response: + + ```json + { + "height": "0", + "result": [ + { + "denom": "node0token", + "amount": "1000000000" + }, + { + "denom": "stake", + "amount": "400000000" + } + ] + } + ``` diff --git a/x/bank/atlas/atlas.toml b/x/bank/atlas/atlas.toml new file mode 100644 index 0000000000..f10863e30b --- /dev/null +++ b/x/bank/atlas/atlas.toml @@ -0,0 +1,34 @@ +[module] +description = "The bank module is responsible for handling multi-asset coin transfers between accounts and tracking special-case pseudo-transfers which must work differently with particular kinds of accounts." +homepage = "https://github.com/cosmos/cosmos-sdk" +keywords = [ + "tokens", + "bank", + "transfer", + "asset", + "fungible", + "coins", +] + +name = "x/bank" + +[bug_tracker] +url = "https://github.com/cosmos/cosmos-sdk/issues" + +[[authors]] +name = "alexanderbez" + +[[authors]] +name = "fedekunze" + +[[authors]] +name = "cwgoes" + +[[authors]] +name = "alessio" + +[version] +documentation = "https://raw.githubusercontent.com/cosmos/cosmos-sdk/master/x/bank/atlas/atlas-v0.39.1.md" +repo = "https://github.com/cosmos/cosmos-sdk/releases/tag/v0.39.1" +sdk_compat = "v0.39.x" +version = "v0.39.1" From d8928c6b80a4d8f59580566372c6e3d41458db90 Mon Sep 17 00:00:00 2001 From: Alexander Peters Date: Fri, 20 Nov 2020 15:13:25 +0100 Subject: [PATCH 132/136] CI: Fix codecov flag project config (#7994) --- .codecov.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.codecov.yml b/.codecov.yml index e17633a5d3..63c053e74b 100644 --- a/.codecov.yml +++ b/.codecov.yml @@ -15,12 +15,15 @@ coverage: threshold: 1% # allow this much decrease on project app: target: 70% - flags: app + flags: + - app modules: target: 70% - flags: modules + flags: + - modules client: - flags: client + flags: + - client changes: false comment: From a7296d3d4ea1f01ee1709d74df4e693d6a0a9993 Mon Sep 17 00:00:00 2001 From: Aleksandr Bezobchuk Date: Fri, 20 Nov 2020 13:00:11 -0500 Subject: [PATCH 133/136] Bump Tendermint v0.34.0 (#7995) * init commit * ibc: remove redundant casting * ci: attempt fix liveness job --- .github/workflows/test.yml | 3 +++ go.mod | 2 +- go.sum | 2 ++ x/ibc/light-clients/07-tendermint/types/fraction.go | 8 ++++---- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b586909335..b3c42073b7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -231,6 +231,9 @@ jobs: timeout-minutes: 10 steps: - uses: actions/checkout@v2 + - uses: actions/setup-go@v2.1.3 + with: + go-version: 1.15 - uses: technote-space/get-diff-action@v4 id: git_diff with: diff --git a/go.mod b/go.mod index ad65e29a68..39e2804248 100644 --- a/go.mod +++ b/go.mod @@ -44,7 +44,7 @@ require ( github.com/tendermint/btcd v0.1.1 github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15 github.com/tendermint/go-amino v0.16.0 - github.com/tendermint/tendermint v0.34.0-rc6 + github.com/tendermint/tendermint v0.34.0 github.com/tendermint/tm-db v0.6.3 golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897 golang.org/x/net v0.0.0-20200930145003-4acb6c075d10 // indirect diff --git a/go.sum b/go.sum index 3fb9fc93bf..fea22c921e 100644 --- a/go.sum +++ b/go.sum @@ -599,6 +599,8 @@ github.com/tendermint/go-amino v0.16.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoM github.com/tendermint/tendermint v0.34.0-rc4/go.mod h1:yotsojf2C1QBOw4dZrTcxbyxmPUrT4hNuOQWX9XUwB4= github.com/tendermint/tendermint v0.34.0-rc6 h1:SVuKGvvE22KxfuK8QUHctUrmOWJsncZSYXIYtcnoKN0= github.com/tendermint/tendermint v0.34.0-rc6/go.mod h1:ugzyZO5foutZImv0Iyx/gOFCX6mjJTgbLHTwi17VDVg= +github.com/tendermint/tendermint v0.34.0 h1:eXCfMgoqVSzrjzOj6clI9GAejcHH0LvOlRjpCmMJksU= +github.com/tendermint/tendermint v0.34.0/go.mod h1:Aj3PIipBFSNO21r+Lq3TtzQ+uKESxkbA3yo/INM4QwQ= github.com/tendermint/tm-db v0.6.2 h1:DOn8jwCdjJblrCFJbtonEIPD1IuJWpbRUUdR8GWE4RM= github.com/tendermint/tm-db v0.6.2/go.mod h1:GYtQ67SUvATOcoY8/+x6ylk8Qo02BQyLrAs+yAcLvGI= github.com/tendermint/tm-db v0.6.3 h1:ZkhQcKnB8/2jr5EaZwGndN4owkPsGezW2fSisS9zGbg= diff --git a/x/ibc/light-clients/07-tendermint/types/fraction.go b/x/ibc/light-clients/07-tendermint/types/fraction.go index a8d8274146..e445f19ba6 100644 --- a/x/ibc/light-clients/07-tendermint/types/fraction.go +++ b/x/ibc/light-clients/07-tendermint/types/fraction.go @@ -11,15 +11,15 @@ var DefaultTrustLevel = NewFractionFromTm(light.DefaultTrustLevel) // NewFractionFromTm returns a new Fraction instance from a tmmath.Fraction func NewFractionFromTm(f tmmath.Fraction) Fraction { return Fraction{ - Numerator: uint64(f.Numerator), - Denominator: uint64(f.Denominator), + Numerator: f.Numerator, + Denominator: f.Denominator, } } // ToTendermint converts Fraction to tmmath.Fraction func (f Fraction) ToTendermint() tmmath.Fraction { return tmmath.Fraction{ - Numerator: int64(f.Numerator), - Denominator: int64(f.Denominator), + Numerator: f.Numerator, + Denominator: f.Denominator, } } From 6344d626db1fbdba5e0f67425703c1584021bf5b Mon Sep 17 00:00:00 2001 From: Emmanuel T Odeke Date: Fri, 20 Nov 2020 11:37:45 -0800 Subject: [PATCH 134/136] types/Coin: compile and reuse Regexps to reduce massive RAM+CPU burn (#7989) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * types/Coin: compile and reuse Regexps to reduce massive RAM+CPU burn Fixes a resource (CPU+RAM) burn from recompiling Regexps which would consume 1.2+MiB of RAM and 1.1ms per ParseCoin invocation, which means that 1,000 invocations would consume 1.2GiB of RAM and >1second. With the change, ParseCoin now takes 3.2us down from 1.1ms, with dramatic results: name old time/op new time/op delta ParseCoin-8 1.04ms ± 4% 0.00ms ± 1% -99.69% (p=0.000 n=9+10) name old alloc/op new alloc/op delta ParseCoin-8 1.20MB ± 0% 0.00MB ± 0% -99.94% (p=0.000 n=10+10) name old allocs/op new allocs/op delta ParseCoin-8 17.8k ± 0% 0.0k ± 0% -99.89% (p=0.000 n=10+10) Fixes #7986. * replace the CoinDenomRegex variable with SetCoinDenomRegex() (#7998) Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Co-authored-by: Alessio Treglia --- go.mod | 1 + go.sum | 50 --------------------------------------------- types/bench_test.go | 30 +++++++++++++++++++++++++++ types/coin.go | 34 ++++++++++++++++-------------- types/coin_test.go | 6 +++--- types/dec_coin.go | 2 +- 6 files changed, 54 insertions(+), 69 deletions(-) create mode 100644 types/bench_test.go diff --git a/go.mod b/go.mod index 39e2804248..5c05b40b71 100644 --- a/go.mod +++ b/go.mod @@ -21,6 +21,7 @@ require ( github.com/golang/mock v1.4.4 github.com/golang/protobuf v1.4.3 github.com/golang/snappy v0.0.2 // indirect + github.com/google/go-cmp v0.5.0 github.com/gorilla/handlers v1.5.1 github.com/gorilla/mux v1.8.0 github.com/grpc-ecosystem/grpc-gateway v1.16.0 diff --git a/go.sum b/go.sum index fea22c921e..da0703bd69 100644 --- a/go.sum +++ b/go.sum @@ -4,16 +4,11 @@ cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSR cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3 h1:AVXDdKsrtX33oR9fbCMu/+c1o8Ofjq6Ku/MInaLVg5Y= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go/bigquery v1.0.1 h1:hL+ycaJpVE9M7nLoiXb/Pn10ENE2u+oddxbD8uu0ZVU= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/datastore v1.0.0 h1:Kt+gOPPp2LEPWp8CSfxhsM8ik9CcyE/gYu+0r+RnZvM= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= -cloud.google.com/go/pubsub v1.0.1 h1:W9tAK3E57P75u0XLLR82LZyw8VpAnhmyTOxW9qzmyj8= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/storage v1.0.0 h1:VV2nUM3wwLLGh9lSABFgZMjInyUbJeaRSE64WuAIQ+4= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/99designs/keyring v1.1.6 h1:kVDC2uCgVwecxCk+9zoCt2uEL6dt+dfVzMvGgnVcIuM= @@ -24,7 +19,6 @@ github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d h1:nalkkPQcITbvhmL4+C4cKA87NW0tfm3Kl9VXRoPywFg= github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d/go.mod h1:URdX5+vg25ts3aCh8H5IFZybJYKWhJHYMTnf+ULtoC4= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= -github.com/DataDog/zstd v1.4.1 h1:3oxKN3wbHibqx897utPC2LTQU4J+IHWWJO+glkAkpFM= github.com/DataDog/zstd v1.4.1/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= github.com/DataDog/zstd v1.4.5 h1:EndNeuB0l9syBZhut0wns3gV1hL8zX8LIu6ZiVHWLIQ= github.com/DataDog/zstd v1.4.5/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= @@ -37,7 +31,6 @@ github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrd github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= github.com/Workiva/go-datastructures v1.0.52 h1:PLSK6pwn8mYdaoaCZEMsXBpBotr4HHn9abU0yMQt0NI= github.com/Workiva/go-datastructures v1.0.52/go.mod h1:Z+F2Rca0qCsVYDS8z7bAGm8f3UkzuWYS/oBZz5a7VVA= -github.com/aead/siphash v1.0.1 h1:FwHfE/T45KPKYuuSAKyyvE+oPWcaQ+CUmFW0bPlM+kg= github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= @@ -50,14 +43,12 @@ github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= -github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da h1:8GUt8eRujhVEGZFFEjBj46YV4rDjvGrNxb0KMWYkL2I= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-metrics v0.3.4 h1:Xqf+7f2Vhl9tsqDYmXhnXInUdcrtgpRNpIA15/uldSc= github.com/armon/go-metrics v0.3.4/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= -github.com/aws/aws-sdk-go v1.27.0 h1:0xphMHGMLBrPMfxR2AmVjZKcMEESEgWF8Kru94BNByk= github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= @@ -67,29 +58,21 @@ github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6r github.com/bgentry/speakeasy v0.1.0 h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQkY= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= -github.com/btcsuite/btcd v0.0.0-20190115013929-ed77733ec07d h1:xG8Pj6Y6J760xwETNmMzmlt38QSwz0BLp1cZ09g27uw= github.com/btcsuite/btcd v0.0.0-20190115013929-ed77733ec07d/go.mod h1:d3C0AkH6BRcvO8T0UEPu53cnw4IbV63x1bEjildYhO0= -github.com/btcsuite/btcd v0.20.1-beta h1:Ik4hyJqN8Jfyv3S4AGBOmyouMsYE3EdYODkMbQjwPGw= github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= github.com/btcsuite/btcd v0.21.0-beta h1:At9hIZdJW0s9E/fAz28nrz6AmcNlSVucCH796ZteX1M= github.com/btcsuite/btcd v0.21.0-beta/go.mod h1:ZSWyehm27aAuS9bvkATT+Xte3hjHZ+MRgMY/8NJ7K94= -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-20180706230648-ab6388e0c60a/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= github.com/btcsuite/btcutil v1.0.2 h1:9iZ1Terx9fMIOtq1VrwdqfsATL9MC2l8ZrUY6YZ2uts= github.com/btcsuite/btcutil v1.0.2/go.mod h1:j9HUFwoQRsZL3V4n+qG+CUnEGHOarIxfC3Le2Yhbcts= -github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd h1:R/opQEbFEy9JGkIguV40SvRY1uliPX8ifOvi6ICsFCw= github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd/go.mod h1:HHNXQzUsZCxOoE+CPiyCTO6x34Zs86zZUiwtpXoGdtg= github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd/go.mod h1:F+uVaaLLH7j4eDXPRvw78tMflu7Ie2bzYOH4Y8rRKBY= -github.com/btcsuite/goleveldb v1.0.0 h1:Tvd0BfvqX9o823q1j2UZ/epQo09eJh6dTcRp79ilIN4= github.com/btcsuite/goleveldb v1.0.0/go.mod h1:QiK9vBlgftBg6rWQIj6wFzbPfRjiykIEhBH4obrXJ/I= github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= -github.com/btcsuite/snappy-go v1.0.0 h1:ZxaA6lo2EpxGddsA8JwWOcxlzRybb444sgmeJQMJGQE= github.com/btcsuite/snappy-go v1.0.0/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= -github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792 h1:R8vQdOQdZ9Y3SkEwmHoWBmX1DNXhXZqlTpq6s4tyJGc= github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= -github.com/btcsuite/winsvc v1.0.0 h1:J9B4L7e3oqhXOcm+2IuNApwzQec85lE+QaikUcCs+dk= github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= @@ -137,18 +120,14 @@ github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2 github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/decred/dcrd/lru v1.0.0 h1:Kbsb1SFDsIlaupWPwsPp+dkxiBY1frcS07PCPgotKz8= github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218= -github.com/dgraph-io/badger/v2 v2.2007.1 h1:t36VcBCpo4SsmAD5M8wVv1ieVzcALyGfaJ92z4ccULM= github.com/dgraph-io/badger/v2 v2.2007.1/go.mod h1:26P/7fbL4kUZVEVKLAKXkBXKOydDmM2p1e+NhhnBCAE= github.com/dgraph-io/badger/v2 v2.2007.2 h1:EjjK0KqwaFMlPin1ajhP943VPENHJdEz1KLIegjaI3k= github.com/dgraph-io/badger/v2 v2.2007.2/go.mod h1:26P/7fbL4kUZVEVKLAKXkBXKOydDmM2p1e+NhhnBCAE= -github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de h1:t0UHb5vdojIDUqktM6+xJAfScFBsVpXZmqC9dsgJmeA= github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= github.com/dgraph-io/ristretto v0.0.3 h1:jh22xisGBjrEVnRZ1DVTpBVQm0Xndu8sMl0CWDzSIBI= github.com/dgraph-io/ristretto v0.0.3/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2 h1:tdlZCpZ/P9DhczCTSixgIKmwPv6+wP5DGjqLYw5SUiA= github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 h1:fAjc9m62+UWV/WAFKLNi6ZS0675eEUC9y3AlwSbQu1Y= github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= @@ -182,11 +161,9 @@ github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8 github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= -github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -206,11 +183,9 @@ github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6 github.com/gogo/gateway v1.1.0 h1:u0SuhL9+Il+UbjM9VIE3ntfRujKbvVpFvNB4HbjeVQ0= github.com/gogo/gateway v1.1.0/go.mod h1:S7rR8FRQyG3QFESeSv4l2WnsyzlCLG0CzBbUUo/mbic= github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6 h1:ZgQEtGgCBiWRM39fZuwSd1LwSqqSW0hOdXCYYDX0R3I= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= @@ -229,12 +204,10 @@ github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrU github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.2 h1:aeE13tS0IiQgFjYdoL8qN3K1N2bXXtI6Vi51/y7BpMw= github.com/golang/snappy v0.0.2/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= @@ -244,14 +217,12 @@ github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0 h1:/QaMHBdZ26BB3SSst0Iwl10Epc+xhTquomWX0oZEB6w= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= @@ -259,7 +230,6 @@ github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm4 github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= @@ -281,7 +251,6 @@ github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaD github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.8.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/grpc-ecosystem/grpc-gateway v1.9.5 h1:UImYN5qQ8tuGpGE16ZmjvcTtTw24zw1QAp/SlnNrZhI= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.14.7/go.mod h1:oYZKL012gGh6LMyg/xA7Q2yq6j8bu0wa+9w14EEthWU= github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= @@ -299,7 +268,6 @@ github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyN github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-cleanhttp v0.5.1 h1:dH3aiDG9Jvb5r5+bYHsikaOUIpcM0xvgMXVoDkXMzJM= github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-immutable-radix v1.0.0 h1:AKDB1HM5PWEA7i4nhcpwOrO2byshxBjXVn/J/3+z5/0= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= @@ -312,7 +280,6 @@ github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdv 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-version v1.2.0 h1:3vNe/fWF5CBgRIguda1meWhsZHy3m8gCJ5wx+dIzX/E= github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= @@ -325,29 +292,24 @@ github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= -github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= -github.com/jessevdk/go-flags v1.4.0 h1:4IU2WS7AumrZ/40jfhf4QVDMsQwqA7VEHozFRrGARJA= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= -github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af h1:pmfjZENx5imkbgOkpRUYLnmbU7UEFbjtDA2hxJ1ichM= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U= github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= -github.com/jrick/logrotate v1.0.0 h1:lQ1bL/n9mBNeIXoTUoYRlK4dHuNJVofX9oWqBtPnSzI= github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024 h1:rBMNdlhTLzJjJSDIjNEXX1Pz3Hmwmz91v+zycvx9PJc= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= @@ -358,7 +320,6 @@ github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d/go.mod h1:JJNr github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= -github.com/kkdai/bstream v1.0.0 h1:Se5gHwgp2VT2uHfDrkbbgbgEvV9cimLELwrPJctSjg8= github.com/kkdai/bstream v1.0.0/go.mod h1:FDnDOHt5Yx4p3FaHcioFT0QjDOtgUpvjeZqAs+NVZZA= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= @@ -373,7 +334,6 @@ github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-b github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.4 h1:8KGKTcQQGm0Kv7vEbKFErAoAOFyyacLStRtQSeYtvkY= github.com/magiconair/properties v1.8.4/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= @@ -394,7 +354,6 @@ github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceT github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-testing-interface v1.0.0 h1:fzU/JVNcaqHQEcVFAKeR41fkiLdIPrefOvVG1VZ96U0= github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= @@ -425,13 +384,11 @@ github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQ github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.7.0 h1:WSHQ+IS43OoUrWtD1/bbclrwK8TTH5hzp+umCiuxHgs= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.14.0 h1:2mOpI4JVVPBN+WQRa0WKH2eXR+Ey+uK4n7Zj0aYpIQA= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= -github.com/onsi/gomega v1.4.3 h1:RE1xgDvH7imwFD45h+u2SgIfERHlS2yNG4DObb5BSKU= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE= @@ -480,7 +437,6 @@ github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDf github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= -github.com/prometheus/client_golang v1.7.1 h1:NTGy1Ja9pByO+xAeH/qiWnLrKtr3hJPNjaVUwnjpdpA= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.8.0 h1:zvJNkoCFAnYFNC24FV8nW4JdRJ3GIFcLbg65lL/JDcw= github.com/prometheus/client_golang v1.8.0/go.mod h1:O9VU6huf47PktckDQfMTX0Y8tY0/7TSWwj+ITvv0TnM= @@ -497,9 +453,7 @@ github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y8 github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= -github.com/prometheus/common v0.10.0 h1:RyRA7RzGXQZiW+tGMr7sxa85G1z0yOpM1qq5c8lNawc= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.14.0 h1:RHRyE8UocrbjU+6UvRzwi6HjiDfxrrBU91TtbKzkGp4= github.com/prometheus/common v0.14.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= github.com/prometheus/common v0.15.0 h1:4fgOnadei3EZvgRwxJ7RMpG1k1pOZth5Pc13tyspaKM= github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= @@ -508,7 +462,6 @@ github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= -github.com/prometheus/procfs v0.1.3 h1:F0+tqvhOksq22sc6iCHF5WGlWjdwj92p0udFh1VFBS8= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.2.0 h1:wH4vA7pcjKuZzjF7lM8awk4fnuJO6idemZXoKnULUx4= github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= @@ -556,7 +509,6 @@ github.com/spf13/cast v1.3.1 h1:nFm6S0SMdyzrzcmThSipiEubIDy8WEXKNZ0UOgiRpng= github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= -github.com/spf13/cobra v1.0.0 h1:6m/oheQuQ13N9ks4hubMG6BnvwOeaJrqSPLahSnczz8= github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= github.com/spf13/cobra v1.1.1 h1:KfztREH0tPxJJ+geloSLaAkaPkr4ki2Er5quFV1TDo4= github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI= @@ -597,11 +549,9 @@ github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15/go.mod h1:z4YtwM github.com/tendermint/go-amino v0.16.0 h1:GyhmgQKvqF82e2oZeuMSp9JTN0N09emoSZlb2lyGa2E= github.com/tendermint/go-amino v0.16.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= github.com/tendermint/tendermint v0.34.0-rc4/go.mod h1:yotsojf2C1QBOw4dZrTcxbyxmPUrT4hNuOQWX9XUwB4= -github.com/tendermint/tendermint v0.34.0-rc6 h1:SVuKGvvE22KxfuK8QUHctUrmOWJsncZSYXIYtcnoKN0= github.com/tendermint/tendermint v0.34.0-rc6/go.mod h1:ugzyZO5foutZImv0Iyx/gOFCX6mjJTgbLHTwi17VDVg= github.com/tendermint/tendermint v0.34.0 h1:eXCfMgoqVSzrjzOj6clI9GAejcHH0LvOlRjpCmMJksU= github.com/tendermint/tendermint v0.34.0/go.mod h1:Aj3PIipBFSNO21r+Lq3TtzQ+uKESxkbA3yo/INM4QwQ= -github.com/tendermint/tm-db v0.6.2 h1:DOn8jwCdjJblrCFJbtonEIPD1IuJWpbRUUdR8GWE4RM= github.com/tendermint/tm-db v0.6.2/go.mod h1:GYtQ67SUvATOcoY8/+x6ylk8Qo02BQyLrAs+yAcLvGI= github.com/tendermint/tm-db v0.6.3 h1:ZkhQcKnB8/2jr5EaZwGndN4owkPsGezW2fSisS9zGbg= github.com/tendermint/tm-db v0.6.3/go.mod h1:lfA1dL9/Y/Y8wwyPp2NMLyn5P5Ptr/gvDFNWtrCWSf8= diff --git a/types/bench_test.go b/types/bench_test.go new file mode 100644 index 0000000000..be7e0c7f4b --- /dev/null +++ b/types/bench_test.go @@ -0,0 +1,30 @@ +package types_test + +import ( + "testing" + + "github.com/cosmos/cosmos-sdk/types" +) + +var coinStrs = []string{ + "2000ATM", + "5000AMX", + "192XXX", + "1e9BTC", +} + +func BenchmarkParseCoin(b *testing.B) { + var blankCoin types.Coin + b.ReportAllocs() + for i := 0; i < b.N; i++ { + for _, coinStr := range coinStrs { + coin, err := types.ParseCoin(coinStr) + if err != nil { + b.Fatal(err) + } + if coin == blankCoin { + b.Fatal("Unexpectedly returned a blank coin") + } + } + } +} diff --git a/types/coin.go b/types/coin.go index 5e2c22bdf8..da2e3c398a 100644 --- a/types/coin.go +++ b/types/coin.go @@ -602,19 +602,13 @@ var ( reAmt = `[[:digit:]]+` reDecAmt = `[[:digit:]]+(?:\.[[:digit:]]+)?|\.[[:digit:]]+` reSpc = `[[:space:]]*` - reDnm = returnReDnm - reCoin = returnReCoin - reDecCoin = returnDecCoin + reDnm *regexp.Regexp + reCoin *regexp.Regexp + reDecCoin *regexp.Regexp ) -func returnDecCoin() *regexp.Regexp { - return regexp.MustCompile(fmt.Sprintf(`^(%s)%s(%s)$`, reDecAmt, reSpc, CoinDenomRegex())) -} -func returnReCoin() *regexp.Regexp { - return regexp.MustCompile(fmt.Sprintf(`^(%s)%s(%s)$`, reAmt, reSpc, CoinDenomRegex())) -} -func returnReDnm() *regexp.Regexp { - return regexp.MustCompile(fmt.Sprintf(`^%s$`, CoinDenomRegex())) +func init() { + SetCoinDenomRegex(DefaultCoinDenomRegex) } // DefaultCoinDenomRegex returns the default regex string @@ -622,12 +616,22 @@ func DefaultCoinDenomRegex() string { return reDnmString } -// CoinDenomRegex returns the current regex string and can be overwritten for custom validation -var CoinDenomRegex = DefaultCoinDenomRegex +// coinDenomRegex returns the current regex string and can be overwritten for custom validation +var coinDenomRegex = DefaultCoinDenomRegex + +// SetCoinDenomRegex allows for coin's custom validation by overriding the regular +// expression string used for denom validation. +func SetCoinDenomRegex(reFn func() string) { + coinDenomRegex = reFn + + reDnm = regexp.MustCompile(fmt.Sprintf(`^%s$`, coinDenomRegex())) + reCoin = regexp.MustCompile(fmt.Sprintf(`^(%s)%s(%s)$`, reAmt, reSpc, coinDenomRegex())) + reDecCoin = regexp.MustCompile(fmt.Sprintf(`^(%s)%s(%s)$`, reDecAmt, reSpc, coinDenomRegex())) +} // ValidateDenom is the default validation function for Coin.Denom. func ValidateDenom(denom string) error { - if !reDnm().MatchString(denom) { + if !reDnm.MatchString(denom) { return fmt.Errorf("invalid denom: %s", denom) } return nil @@ -645,7 +649,7 @@ func mustValidateDenom(denom string) { func ParseCoin(coinStr string) (coin Coin, err error) { coinStr = strings.TrimSpace(coinStr) - matches := reCoin().FindStringSubmatch(coinStr) + matches := reCoin.FindStringSubmatch(coinStr) if matches == nil { return Coin{}, fmt.Errorf("invalid coin expression: %s", coinStr) } diff --git a/types/coin_test.go b/types/coin_test.go index 0e4bbf739f..ab69f16a17 100644 --- a/types/coin_test.go +++ b/types/coin_test.go @@ -101,9 +101,9 @@ func (s *coinTestSuite) TestCoinIsValid() { func (s *coinTestSuite) TestCustomValidation() { newDnmRegex := `[\x{1F600}-\x{1F6FF}]` - sdk.CoinDenomRegex = func() string { + sdk.SetCoinDenomRegex(func() string { return newDnmRegex - } + }) cases := []struct { coin sdk.Coin @@ -119,7 +119,7 @@ func (s *coinTestSuite) TestCustomValidation() { for i, tc := range cases { s.Require().Equal(tc.expectPass, tc.coin.IsValid(), "unexpected result for IsValid, tc #%d", i) } - sdk.CoinDenomRegex = sdk.DefaultCoinDenomRegex + sdk.SetCoinDenomRegex(sdk.DefaultCoinDenomRegex) } func (s *coinTestSuite) TestAddCoin() { diff --git a/types/dec_coin.go b/types/dec_coin.go index a8ad465c61..6e400d7a05 100644 --- a/types/dec_coin.go +++ b/types/dec_coin.go @@ -615,7 +615,7 @@ func (coins DecCoins) Sort() DecCoins { func ParseDecCoin(coinStr string) (coin DecCoin, err error) { coinStr = strings.TrimSpace(coinStr) - matches := reDecCoin().FindStringSubmatch(coinStr) + matches := reDecCoin.FindStringSubmatch(coinStr) if matches == nil { return DecCoin{}, fmt.Errorf("invalid decimal coin expression: %s", coinStr) } From 966e26d23ddc62553fa46155036cc2d4d25f14ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?colin=20axn=C3=A9r?= <25233464+colin-axner@users.noreply.github.com> Date: Mon, 23 Nov 2020 16:10:25 +0100 Subject: [PATCH 135/136] Fix tendermint misbehaviour trusted consensus state age check (#8006) * use TrustingPeriod instead of UnbondingPeriod when verifying the age of the trusted consensus state * update comment --- .../07-tendermint/types/misbehaviour_handle.go | 10 +++++----- .../07-tendermint/types/misbehaviour_handle_test.go | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/x/ibc/light-clients/07-tendermint/types/misbehaviour_handle.go b/x/ibc/light-clients/07-tendermint/types/misbehaviour_handle.go index b27cc06a45..1f1a6943ce 100644 --- a/x/ibc/light-clients/07-tendermint/types/misbehaviour_handle.go +++ b/x/ibc/light-clients/07-tendermint/types/misbehaviour_handle.go @@ -92,12 +92,12 @@ func checkMisbehaviourHeader( return err } - // assert that the timestamp is not from more than an unbonding period ago - if currentTimestamp.Sub(consState.Timestamp) >= clientState.UnbondingPeriod { + // assert that the age of the trusted consensus state is not older than the trusting period + if currentTimestamp.Sub(consState.Timestamp) >= clientState.TrustingPeriod { return sdkerrors.Wrapf( - ErrUnbondingPeriodExpired, - "current timestamp minus the latest consensus state timestamp is greater than or equal to the unbonding period (%d >= %d)", - currentTimestamp.Sub(consState.Timestamp), clientState.UnbondingPeriod, + ErrTrustingPeriodExpired, + "current timestamp minus the latest consensus state timestamp is greater than or equal to the trusting period (%d >= %d)", + currentTimestamp.Sub(consState.Timestamp), clientState.TrustingPeriod, ) } diff --git a/x/ibc/light-clients/07-tendermint/types/misbehaviour_handle_test.go b/x/ibc/light-clients/07-tendermint/types/misbehaviour_handle_test.go index 6d8cd5e32a..65ec7163d8 100644 --- a/x/ibc/light-clients/07-tendermint/types/misbehaviour_handle_test.go +++ b/x/ibc/light-clients/07-tendermint/types/misbehaviour_handle_test.go @@ -256,7 +256,7 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { false, }, { - "unbonding period expired", + "trusting period expired", types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false), types.NewConsensusState(time.Time{}, commitmenttypes.NewMerkleRoot(tmhash.Sum([]byte("app_hash"))), bothValsHash), heightMinus1, @@ -267,7 +267,7 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { Header2: suite.chainA.CreateTMClientHeader(chainID, int64(height.VersionHeight), height, suite.now.Add(time.Minute), bothValSet, bothValSet, bothSigners), ClientId: chainID, }, - suite.now.Add(ubdPeriod), + suite.now.Add(trustingPeriod), false, }, { From 251a27d10480280ba22561581f8ab268a6a899f3 Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Mon, 23 Nov 2020 11:31:17 -0500 Subject: [PATCH 136/136] Update ADR status (#8009) --- docs/architecture/README.md | 8 ++++---- docs/architecture/adr-004-split-denomination-keys.md | 2 +- docs/architecture/adr-021-protobuf-query-encoding.md | 2 +- docs/architecture/adr-023-protobuf-naming.md | 2 +- docs/architecture/adr-031-msg-service.md | 2 +- go.mod | 1 - 6 files changed, 8 insertions(+), 9 deletions(-) diff --git a/docs/architecture/README.md b/docs/architecture/README.md index d3ff033688..54cc9c89e4 100644 --- a/docs/architecture/README.md +++ b/docs/architecture/README.md @@ -43,18 +43,21 @@ Read about the [PROCESS](./PROCESS.md). - [ADR 001: Coin Source Tracing](./adr-001-coin-source-tracing.md) - [ADR 002: SDK Documentation Structure](./adr-002-docs-structure.md) +- [ADR 004: Split Denomination Keys](./adr-004-split-denomination-keys.md) - [ADR 006: Secret Store Replacement](./adr-006-secret-store-replacement.md) - [ADR 009: Evidence Module](./adr-009-evidence-module.md) - [ADR 010: Modular AnteHandler](./adr-010-modular-antehandler.md) - [ADR 019: Protocol Buffer State Encoding](./adr-019-protobuf-state-encoding.md) - [ADR 020: Protocol Buffer Transaction Encoding](./adr-020-protobuf-transaction-encoding.md) +- [ADR 021: Protocol Buffer Query Encoding](./adr-021-protobuf-query-encoding.md) +- [ADR 023: Protocol Buffer Naming and Versioning](./adr-023-protobuf-naming.md) - [ADR 026: IBC Client Recovery Mechanisms](./adr-026-ibc-client-recovery-mechanisms.md) - [ADR 029: Fee Grant Module](./adr-029-fee-grant-module.md) +- [ADR 031: Protobuf Msg Services](./adr-031-msg-service.md) ### Proposed - [ADR 003: Dynamic Capability Store](./adr-003-dynamic-capability-store.md) -- [ADR 004: Split Denomination Keys](./adr-004-split-denomination-keys.md) - [ADR 011: Generalize Genesis Accounts](./adr-011-generalize-genesis-accounts.md) - [ADR 012: State Accessors](./adr-012-state-accessors.md) - [ADR 013: Metrics](./adr-013-metrics.md) @@ -62,14 +65,11 @@ Read about the [PROCESS](./PROCESS.md). - [ADR 016: Validator Consensus Key Rotation](./adr-016-validator-consensus-key-rotation.md) - [ADR 017: Historical Header Module](./adr-017-historical-header-module.md) - [ADR 018: Extendable Voting Periods](./adr-018-extendable-voting-period.md) -- [ADR 021: Protocol Buffer Query Encoding](./adr-021-protobuf-query-encoding.md) - [ADR 022: Custom baseapp panic handling](./adr-022-custom-panic-handling.md) -- [ADR 023: Protocol Buffer Naming and Versioning](./adr-023-protobuf-naming.md) - [ADR 024: Coin Metadata](./adr-024-coin-metadata.md) - [ADR 025: IBC Passive Channels](./adr-025-ibc-passive-channels.md) - [ADR 027: Deterministic Protobuf Serialization](./adr-027-deterministic-protobuf-serialization.md) - [ADR 028: Public Key Addresses](./adr-028-public-key-addresses.md) -- [ADR 031: Protobuf Msg Services](./adr-031-msg-service.md) - [ADR 032: Typed Events](./adr-032-typed-events.md) - [ADR 035: Rosetta API Support](./adr-035-rosetta-api-support.md) - [ADR 037: Governance Split Votes](./adr-037-gov-split-vote.md) \ No newline at end of file diff --git a/docs/architecture/adr-004-split-denomination-keys.md b/docs/architecture/adr-004-split-denomination-keys.md index d33b7c6d03..a718d9b0ca 100644 --- a/docs/architecture/adr-004-split-denomination-keys.md +++ b/docs/architecture/adr-004-split-denomination-keys.md @@ -96,7 +96,7 @@ the balances and check that they match the expected total supply. ## Status -Proposed. +Accepted. ## Consequences diff --git a/docs/architecture/adr-021-protobuf-query-encoding.md b/docs/architecture/adr-021-protobuf-query-encoding.md index ba0b35cd96..60d4d2b2f6 100644 --- a/docs/architecture/adr-021-protobuf-query-encoding.md +++ b/docs/architecture/adr-021-protobuf-query-encoding.md @@ -6,7 +6,7 @@ ## Status -Proposed +Accepted ## Context diff --git a/docs/architecture/adr-023-protobuf-naming.md b/docs/architecture/adr-023-protobuf-naming.md index e909c33d1d..1322f097f5 100644 --- a/docs/architecture/adr-023-protobuf-naming.md +++ b/docs/architecture/adr-023-protobuf-naming.md @@ -7,7 +7,7 @@ ## Status -Proposed +Accepted ## Context diff --git a/docs/architecture/adr-031-msg-service.md b/docs/architecture/adr-031-msg-service.md index edd906fdb9..a36d86c431 100644 --- a/docs/architecture/adr-031-msg-service.md +++ b/docs/architecture/adr-031-msg-service.md @@ -6,7 +6,7 @@ ## Status -Proposed +Accepted ## Abstract diff --git a/go.mod b/go.mod index 5c05b40b71..39e2804248 100644 --- a/go.mod +++ b/go.mod @@ -21,7 +21,6 @@ require ( github.com/golang/mock v1.4.4 github.com/golang/protobuf v1.4.3 github.com/golang/snappy v0.0.2 // indirect - github.com/google/go-cmp v0.5.0 github.com/gorilla/handlers v1.5.1 github.com/gorilla/mux v1.8.0 github.com/grpc-ecosystem/grpc-gateway v1.16.0