diff --git a/CHANGELOG.md b/CHANGELOG.md index 7a7d5d013f2c..c385403afac0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -150,6 +150,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ * `WithChainID` / `WithBlockHeight` / `WithBlockHeader` must be used to set values on the context * (x/bank) [#17569](https://github.com/cosmos/cosmos-sdk/pull/17569) `BurnCoins` takes an address instead of a module name * (x/distribution) [#17670](https://github.com/cosmos/cosmos-sdk/pull/17670) `AllocateTokens` takes `comet.VoteInfos` instead of `[]abci.VoteInfo` +* (x/auth) [#17787](https://github.com/cosmos/cosmos-sdk/pull/17787) remove tip functionality * (types) [#17738](https://github.com/cosmos/cosmos-sdk/pull/17738) `WithBlockTime()` was removed & `BlockTime()` were deprecated in favor of `WithHeaderInfo()` & `HeaderInfo()`. `BlockTime` now gets data from `HeaderInfo()` instead of `BlockHeader()`. * (client) [#17746](https://github.com/cosmos/cosmos-sdk/pull/17746) `txEncodeAmino` & `txDecodeAmino` txs via grpc and rest were removed * `RegisterLegacyAmino` was removed from `AppModuleBasic` diff --git a/api/cosmos/tx/signing/v1beta1/signing.pulsar.go b/api/cosmos/tx/signing/v1beta1/signing.pulsar.go index 0e6c12827053..7885b82a8ab8 100644 --- a/api/cosmos/tx/signing/v1beta1/signing.pulsar.go +++ b/api/cosmos/tx/signing/v1beta1/signing.pulsar.go @@ -2729,8 +2729,7 @@ const ( SignMode_SIGN_MODE_TEXTUAL SignMode = 2 // SIGN_MODE_DIRECT_AUX specifies a signing mode which uses // SignDocDirectAux. As opposed to SIGN_MODE_DIRECT, this sign mode does not - // require signers signing over other signers' `signer_info`. It also allows - // for adding Tips in transactions. + // require signers signing over other signers' `signer_info`. // // Since: cosmos-sdk 0.46 SignMode_SIGN_MODE_DIRECT_AUX SignMode = 3 diff --git a/api/cosmos/tx/v1beta1/tx.pulsar.go b/api/cosmos/tx/v1beta1/tx.pulsar.go index e96c797a907f..4b00dac60a64 100644 --- a/api/cosmos/tx/v1beta1/tx.pulsar.go +++ b/api/cosmos/tx/v1beta1/tx.pulsar.go @@ -8329,12 +8329,9 @@ type SignDocDirectAux struct { AccountNumber uint64 `protobuf:"varint,4,opt,name=account_number,json=accountNumber,proto3" json:"account_number,omitempty"` // sequence is the sequence number of the signing account. Sequence uint64 `protobuf:"varint,5,opt,name=sequence,proto3" json:"sequence,omitempty"` - // Tip is the optional tip used for transactions fees paid in another denom. - // It should be left empty if the signer is not the tipper for this - // transaction. + // tips have been depreacted and should not be used // - // This field is ignored if the chain didn't enable tips, i.e. didn't add the - // `TipDecorator` in its posthandler. + // Deprecated: Do not use. Tip *Tip `protobuf:"bytes,6,opt,name=tip,proto3" json:"tip,omitempty"` } @@ -8393,6 +8390,7 @@ func (x *SignDocDirectAux) GetSequence() uint64 { return 0 } +// Deprecated: Do not use. func (x *SignDocDirectAux) GetTip() *Tip { if x != nil { return x.Tip @@ -8509,6 +8507,8 @@ type AuthInfo struct { // `TipDecorator` in its posthandler. // // Since: cosmos-sdk 0.46 + // + // Deprecated: Do not use. Tip *Tip `protobuf:"bytes,3,opt,name=tip,proto3" json:"tip,omitempty"` } @@ -8546,6 +8546,7 @@ func (x *AuthInfo) GetFee() *Fee { return nil } +// Deprecated: Do not use. func (x *AuthInfo) GetTip() *Tip { if x != nil { return x.Tip @@ -8763,6 +8764,8 @@ func (x *Fee) GetGranter() string { // Tip is the tip used for meta-transactions. // // Since: cosmos-sdk 0.46 +// +// Deprecated: Do not use. type Tip struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -9011,7 +9014,7 @@ var file_cosmos_tx_v1beta1_tx_proto_rawDesc = []byte{ 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x61, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0xee, 0x01, 0x0a, 0x10, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0xf2, 0x01, 0x0a, 0x10, 0x53, 0x69, 0x67, 0x6e, 0x44, 0x6f, 0x63, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x41, 0x75, 0x78, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6f, 0x64, 0x79, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x62, 0x6f, 0x64, 0x79, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, @@ -9024,121 +9027,122 @@ var file_cosmos_tx_v1beta1_tx_proto_rawDesc = []byte{ 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, - 0x63, 0x65, 0x12, 0x28, 0x0a, 0x03, 0x74, 0x69, 0x70, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x63, 0x65, 0x12, 0x2c, 0x0a, 0x03, 0x74, 0x69, 0x70, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x54, 0x69, 0x70, 0x52, 0x03, 0x74, 0x69, 0x70, 0x22, 0x95, 0x02, 0x0a, - 0x06, 0x54, 0x78, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x30, 0x0a, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, - 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x65, 0x6d, - 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x12, 0x25, 0x0a, - 0x0e, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x48, 0x65, - 0x69, 0x67, 0x68, 0x74, 0x12, 0x42, 0x0a, 0x11, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xff, 0x07, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x10, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x5a, 0x0a, 0x1e, 0x6e, 0x6f, 0x6e, 0x5f, - 0x63, 0x72, 0x69, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xff, 0x0f, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x1b, 0x6e, 0x6f, 0x6e, 0x43, 0x72, 0x69, 0x74, - 0x69, 0x63, 0x61, 0x6c, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xa0, 0x01, 0x0a, 0x08, 0x41, 0x75, 0x74, 0x68, 0x49, 0x6e, 0x66, - 0x6f, 0x12, 0x40, 0x0a, 0x0c, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x66, 0x6f, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, - 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0b, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x49, 0x6e, - 0x66, 0x6f, 0x73, 0x12, 0x28, 0x0a, 0x03, 0x66, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x16, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x46, 0x65, 0x65, 0x52, 0x03, 0x66, 0x65, 0x65, 0x12, 0x28, 0x0a, - 0x03, 0x74, 0x69, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, - 0x69, 0x70, 0x52, 0x03, 0x74, 0x69, 0x70, 0x22, 0x97, 0x01, 0x0a, 0x0a, 0x53, 0x69, 0x67, 0x6e, - 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x33, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, - 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, - 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x38, 0x0a, 0x09, 0x6d, - 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x6d, 0x6f, 0x64, - 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, - 0x65, 0x22, 0xe0, 0x02, 0x0a, 0x08, 0x4d, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3c, - 0x0a, 0x06, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x53, 0x69, 0x6e, 0x67, - 0x6c, 0x65, 0x48, 0x00, 0x52, 0x06, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x12, 0x39, 0x0a, 0x05, - 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x6f, + 0x74, 0x61, 0x31, 0x2e, 0x54, 0x69, 0x70, 0x42, 0x02, 0x18, 0x01, 0x52, 0x03, 0x74, 0x69, 0x70, + 0x22, 0x95, 0x02, 0x0a, 0x06, 0x54, 0x78, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x30, 0x0a, 0x08, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x41, 0x6e, 0x79, 0x52, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x12, 0x0a, + 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x65, 0x6d, + 0x6f, 0x12, 0x25, 0x0a, 0x0e, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x5f, 0x68, 0x65, 0x69, + 0x67, 0x68, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x74, 0x69, 0x6d, 0x65, 0x6f, + 0x75, 0x74, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x42, 0x0a, 0x11, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xff, 0x07, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x10, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x5a, 0x0a, 0x1e, + 0x6e, 0x6f, 0x6e, 0x5f, 0x63, 0x72, 0x69, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x5f, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xff, + 0x0f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x1b, 0x6e, 0x6f, 0x6e, + 0x43, 0x72, 0x69, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xa4, 0x01, 0x0a, 0x08, 0x41, 0x75, 0x74, + 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x40, 0x0a, 0x0c, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x5f, + 0x69, 0x6e, 0x66, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x4d, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x48, 0x00, - 0x52, 0x05, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x1a, 0x41, 0x0a, 0x06, 0x53, 0x69, 0x6e, 0x67, 0x6c, - 0x65, 0x12, 0x37, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x23, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x73, 0x69, 0x67, 0x6e, - 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, - 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x1a, 0x90, 0x01, 0x0a, 0x05, 0x4d, - 0x75, 0x6c, 0x74, 0x69, 0x12, 0x4b, 0x0a, 0x08, 0x62, 0x69, 0x74, 0x61, 0x72, 0x72, 0x61, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x42, - 0x69, 0x74, 0x41, 0x72, 0x72, 0x61, 0x79, 0x52, 0x08, 0x62, 0x69, 0x74, 0x61, 0x72, 0x72, 0x61, - 0x79, 0x12, 0x3a, 0x0a, 0x0a, 0x6d, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x73, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, - 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x49, 0x6e, - 0x66, 0x6f, 0x52, 0x09, 0x6d, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x42, 0x05, 0x0a, - 0x03, 0x73, 0x75, 0x6d, 0x22, 0x81, 0x02, 0x0a, 0x03, 0x46, 0x65, 0x65, 0x12, 0x79, 0x0a, 0x06, - 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x46, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, - 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, - 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x9a, 0xe7, 0xb0, 0x2a, 0x0c, 0x6c, 0x65, - 0x67, 0x61, 0x63, 0x79, 0x5f, 0x63, 0x6f, 0x69, 0x6e, 0x73, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, - 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x61, 0x73, 0x5f, 0x6c, - 0x69, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x67, 0x61, 0x73, 0x4c, - 0x69, 0x6d, 0x69, 0x74, 0x12, 0x2e, 0x0a, 0x05, 0x70, 0x61, 0x79, 0x65, 0x72, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x05, 0x70, - 0x61, 0x79, 0x65, 0x72, 0x12, 0x32, 0x0a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, - 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x22, 0xb2, 0x01, 0x0a, 0x03, 0x54, 0x69, 0x70, - 0x12, 0x79, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x46, 0xc8, 0xde, 0x1f, - 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, - 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x9a, 0xe7, 0xb0, - 0x2a, 0x0c, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x5f, 0x63, 0x6f, 0x69, 0x6e, 0x73, 0xa8, 0xe7, - 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x30, 0x0a, 0x06, 0x74, - 0x69, 0x70, 0x70, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, + 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0b, 0x73, 0x69, 0x67, 0x6e, + 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x12, 0x28, 0x0a, 0x03, 0x66, 0x65, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x46, 0x65, 0x65, 0x52, 0x03, 0x66, 0x65, + 0x65, 0x12, 0x2c, 0x0a, 0x03, 0x74, 0x69, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x54, 0x69, 0x70, 0x42, 0x02, 0x18, 0x01, 0x52, 0x03, 0x74, 0x69, 0x70, 0x22, + 0x97, 0x01, 0x0a, 0x0a, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x33, + 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, + 0x4b, 0x65, 0x79, 0x12, 0x38, 0x0a, 0x09, 0x6d, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x49, + 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x6d, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1a, 0x0a, + 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x22, 0xe0, 0x02, 0x0a, 0x08, 0x4d, 0x6f, + 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3c, 0x0a, 0x06, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x49, + 0x6e, 0x66, 0x6f, 0x2e, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x48, 0x00, 0x52, 0x06, 0x73, 0x69, + 0x6e, 0x67, 0x6c, 0x65, 0x12, 0x39, 0x0a, 0x05, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, + 0x2e, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x48, 0x00, 0x52, 0x05, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x1a, + 0x41, 0x0a, 0x06, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x12, 0x37, 0x0a, 0x04, 0x6d, 0x6f, 0x64, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x74, 0x78, 0x2e, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6d, 0x6f, + 0x64, 0x65, 0x1a, 0x90, 0x01, 0x0a, 0x05, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x12, 0x4b, 0x0a, 0x08, + 0x62, 0x69, 0x74, 0x61, 0x72, 0x72, 0x61, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x6d, + 0x75, 0x6c, 0x74, 0x69, 0x73, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x42, 0x69, 0x74, 0x41, 0x72, 0x72, 0x61, 0x79, 0x52, + 0x08, 0x62, 0x69, 0x74, 0x61, 0x72, 0x72, 0x61, 0x79, 0x12, 0x3a, 0x0a, 0x0a, 0x6d, 0x6f, 0x64, + 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x6d, 0x6f, 0x64, 0x65, + 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x42, 0x05, 0x0a, 0x03, 0x73, 0x75, 0x6d, 0x22, 0x81, 0x02, 0x0a, + 0x03, 0x46, 0x65, 0x65, 0x12, 0x79, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, + 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, + 0x46, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, + 0x73, 0x9a, 0xe7, 0xb0, 0x2a, 0x0c, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x5f, 0x63, 0x6f, 0x69, + 0x6e, 0x73, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, + 0x1b, 0x0a, 0x09, 0x67, 0x61, 0x73, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x08, 0x67, 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x2e, 0x0a, 0x05, + 0x70, 0x61, 0x79, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, - 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x74, 0x69, 0x70, 0x70, 0x65, 0x72, 0x22, 0xce, 0x01, - 0x0a, 0x0d, 0x41, 0x75, 0x78, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x12, - 0x32, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x12, 0x3e, 0x0a, 0x08, 0x73, 0x69, 0x67, 0x6e, 0x5f, 0x64, 0x6f, 0x63, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, - 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x44, 0x6f, - 0x63, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x41, 0x75, 0x78, 0x52, 0x07, 0x73, 0x69, 0x67, 0x6e, - 0x44, 0x6f, 0x63, 0x12, 0x37, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x23, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x73, 0x69, - 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x69, - 0x67, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03, - 0x73, 0x69, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x73, 0x69, 0x67, 0x42, 0xb4, - 0x01, 0x0a, 0x15, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0x5a, 0x2c, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, - 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x74, 0x78, 0x2f, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x74, 0x78, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0xa2, 0x02, 0x03, 0x43, 0x54, 0x58, 0xaa, 0x02, 0x11, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x54, 0x78, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x11, 0x43, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x54, 0x78, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, - 0x02, 0x1d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x54, 0x78, 0x5c, 0x56, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, - 0x02, 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x54, 0x78, 0x3a, 0x3a, 0x56, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x05, 0x70, 0x61, 0x79, 0x65, 0x72, 0x12, 0x32, 0x0a, 0x07, + 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, + 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, + 0x22, 0xb6, 0x01, 0x0a, 0x03, 0x54, 0x69, 0x70, 0x12, 0x79, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, + 0x6e, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, + 0x6f, 0x69, 0x6e, 0x42, 0x46, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, + 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x9a, 0xe7, 0xb0, 0x2a, 0x0c, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, + 0x5f, 0x63, 0x6f, 0x69, 0x6e, 0x73, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, + 0x75, 0x6e, 0x74, 0x12, 0x30, 0x0a, 0x06, 0x74, 0x69, 0x70, 0x70, 0x65, 0x72, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x74, + 0x69, 0x70, 0x70, 0x65, 0x72, 0x3a, 0x02, 0x18, 0x01, 0x22, 0xce, 0x01, 0x0a, 0x0d, 0x41, 0x75, + 0x78, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x12, 0x32, 0x0a, 0x07, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, + 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, + 0x3e, 0x0a, 0x08, 0x73, 0x69, 0x67, 0x6e, 0x5f, 0x64, 0x6f, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x23, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x44, 0x6f, 0x63, 0x44, 0x69, 0x72, + 0x65, 0x63, 0x74, 0x41, 0x75, 0x78, 0x52, 0x07, 0x73, 0x69, 0x67, 0x6e, 0x44, 0x6f, 0x63, 0x12, + 0x37, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, + 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x4d, 0x6f, + 0x64, 0x65, 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x69, 0x67, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x73, 0x69, 0x67, 0x42, 0xb4, 0x01, 0x0a, 0x15, 0x63, + 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x2c, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x74, 0x78, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x3b, 0x74, 0x78, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, + 0x43, 0x54, 0x58, 0xaa, 0x02, 0x11, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x54, 0x78, 0x2e, + 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x11, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x5c, 0x54, 0x78, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1d, 0x43, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x54, 0x78, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, + 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x13, 0x43, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x54, 0x78, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/baseapp/baseapp.go b/baseapp/baseapp.go index 2fba770458bf..691c48707f09 100644 --- a/baseapp/baseapp.go +++ b/baseapp/baseapp.go @@ -73,7 +73,7 @@ type BaseApp struct { mempool mempool.Mempool // application side mempool anteHandler sdk.AnteHandler // ante handler for fee and auth - postHandler sdk.PostHandler // post handler, optional, e.g. for tips + postHandler sdk.PostHandler // post handler, optional initChainer sdk.InitChainer // ABCI InitChain handler preBlocker sdk.PreBlocker // logic to run before BeginBlocker diff --git a/client/tx/aux_builder.go b/client/tx/aux_builder.go index 0500979b9853..be9616ae759e 100644 --- a/client/tx/aux_builder.go +++ b/client/tx/aux_builder.go @@ -6,7 +6,6 @@ import ( "github.com/cosmos/gogoproto/proto" "google.golang.org/protobuf/types/known/anypb" - basev1beta1 "cosmossdk.io/api/cosmos/base/v1beta1" txv1beta1 "cosmossdk.io/api/cosmos/tx/v1beta1" txsigning "cosmossdk.io/x/tx/signing" "cosmossdk.io/x/tx/signing/aminojson" @@ -130,12 +129,6 @@ func (b *AuxTxBuilder) SetSignMode(mode signing.SignMode) error { return nil } -// SetTip sets an optional tip in the AuxSignerData. -func (b *AuxTxBuilder) SetTip(tip *tx.Tip) { - b.checkEmptyFields() - b.auxSignerData.SignDoc.Tip = tip -} - // SetSignature sets the aux signer's signature in the AuxSignerData. func (b *AuxTxBuilder) SetSignature(sig []byte) { b.checkEmptyFields() @@ -214,11 +207,7 @@ func (b *AuxTxBuilder) GetSignBytes() ([]byte, error) { handler := aminojson.NewSignModeHandler(aminojson.SignModeHandlerOptions{ FileResolver: proto.HybridResolver, }) - legacyTip := b.auxSignerData.SignDoc.Tip - tip := &txv1beta1.Tip{ - Amount: make([]*basev1beta1.Coin, len(legacyTip.Amount)), - Tipper: legacyTip.Tipper, - } + auxBody := &txv1beta1.TxBody{ Messages: body.Messages, Memo: body.Memo, @@ -230,12 +219,7 @@ func (b *AuxTxBuilder) GetSignBytes() ([]byte, error) { ExtensionOptions: nil, NonCriticalExtensionOptions: nil, } - for i, coin := range legacyTip.Amount { - tip.Amount[i] = &basev1beta1.Coin{ - Denom: coin.Denom, - Amount: coin.Amount.String(), - } - } + signBz, err = handler.GetSignBytes( context.Background(), txsigning.SignerData{ @@ -254,7 +238,6 @@ func (b *AuxTxBuilder) GetSignBytes() ([]byte, error) { // over empty fees. // ref: https://github.com/cosmos/cosmos-sdk/pull/10348 Fee: &txv1beta1.Fee{}, - Tip: tip, }, }, ) diff --git a/client/tx/aux_builder_test.go b/client/tx/aux_builder_test.go index 98f33c25a9f1..b78cea1c0c93 100644 --- a/client/tx/aux_builder_test.go +++ b/client/tx/aux_builder_test.go @@ -84,25 +84,11 @@ func TestAuxTxBuilder(t *testing.T) { }, true, "got unknown sign mode SIGN_MODE_UNSPECIFIED", }, - { - "GetSignBytes tipper should not be nil (if tip is set)", - func() error { - require.NoError(t, b.SetMsgs(msg1)) - require.NoError(t, b.SetPubKey(pub1)) - b.SetTip(&typestx.Tip{}) - require.NoError(t, b.SetSignMode(signing.SignMode_SIGN_MODE_DIRECT_AUX)) - - _, err := b.GetSignBytes() - return err - }, - true, "tipper cannot be empty", - }, { "GetSignBytes works for DIRECT_AUX", func() error { require.NoError(t, b.SetMsgs(msg1)) require.NoError(t, b.SetPubKey(pub1)) - b.SetTip(tip) require.NoError(t, b.SetSignMode(signing.SignMode_SIGN_MODE_DIRECT_AUX)) _, err := b.GetSignBytes() @@ -115,7 +101,6 @@ func TestAuxTxBuilder(t *testing.T) { func() error { require.NoError(t, b.SetMsgs(msg1)) require.NoError(t, b.SetPubKey(pub1)) - b.SetTip(tip) require.NoError(t, b.SetSignMode(signing.SignMode_SIGN_MODE_DIRECT_AUX)) _, err := b.GetSignBytes() @@ -131,7 +116,6 @@ func TestAuxTxBuilder(t *testing.T) { func() error { require.NoError(t, b.SetMsgs(msg1)) require.NoError(t, b.SetPubKey(pub1)) - b.SetTip(tip) b.SetAddress(addr1.String()) require.NoError(t, b.SetSignMode(signing.SignMode_SIGN_MODE_DIRECT_AUX)) @@ -153,7 +137,6 @@ func TestAuxTxBuilder(t *testing.T) { b.SetChainID(chainID) require.NoError(t, b.SetMsgs(msg1)) require.NoError(t, b.SetPubKey(pub1)) - b.SetTip(tip) b.SetAddress(addr1.String()) err := b.SetSignMode(signing.SignMode_SIGN_MODE_DIRECT_AUX) require.NoError(t, err) @@ -176,7 +159,6 @@ func TestAuxTxBuilder(t *testing.T) { func() error { require.NoError(t, b.SetMsgs(msg1)) require.NoError(t, b.SetPubKey(pub1)) - b.SetTip(tip) b.SetAddress(addr1.String()) err := b.SetSignMode(signing.SignMode_SIGN_MODE_LEGACY_AMINO_JSON) require.NoError(t, err) @@ -196,7 +178,6 @@ func TestAuxTxBuilder(t *testing.T) { b.SetChainID(chainID) require.NoError(t, b.SetMsgs(msg1)) require.NoError(t, b.SetPubKey(pub1)) - b.SetTip(tip) b.SetAddress(addr1.String()) err := b.SetSignMode(signing.SignMode_SIGN_MODE_LEGACY_AMINO_JSON) require.NoError(t, err) @@ -251,7 +232,6 @@ func checkCorrectData(t *testing.T, cdc codec.Codec, auxSignerData typestx.AuxSi require.Equal(t, chainID, auxSignerData.SignDoc.ChainId) require.Equal(t, msgAny, body.GetMessages()[0]) require.Equal(t, pkAny, auxSignerData.SignDoc.PublicKey) - require.Equal(t, tip, auxSignerData.SignDoc.Tip) require.Equal(t, signMode, auxSignerData.Mode) require.Equal(t, rawSig, auxSignerData.Sig) } diff --git a/client/tx/factory.go b/client/tx/factory.go index f38160218f89..52e3abf0420d 100644 --- a/client/tx/factory.go +++ b/client/tx/factory.go @@ -19,7 +19,6 @@ import ( "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/tx" "github.com/cosmos/cosmos-sdk/types/tx/signing" ) @@ -39,7 +38,6 @@ type Factory struct { generateOnly bool memo string fees sdk.Coins - tip *tx.Tip feeGranter sdk.AccAddress feePayer sdk.AccAddress gasPrices sdk.DecCoins @@ -114,11 +112,6 @@ func NewFactoryCLI(clientCtx client.Context, flagSet *pflag.FlagSet) (Factory, e feesStr := clientCtx.Viper.GetString(flags.FlagFees) f = f.WithFees(feesStr) - tipsStr := clientCtx.Viper.GetString(flags.FlagTip) - // Add tips to factory. The tipper is necessarily the Msg signer, i.e. - // the from address. - f = f.WithTips(tipsStr, clientCtx.FromAddress.String()) - gasPricesStr := clientCtx.Viper.GetString(flags.FlagGasPrices) f = f.WithGasPrices(gasPricesStr) @@ -178,20 +171,6 @@ func (f Factory) WithFees(fees string) Factory { return f } -// WithTips returns a copy of the Factory with an updated tip. -func (f Factory) WithTips(tip, tipper string) Factory { - parsedTips, err := sdk.ParseCoinsNormalized(tip) - if err != nil { - panic(err) - } - - f.tip = &tx.Tip{ - Tipper: tipper, - Amount: parsedTips, - } - return f -} - // WithGasPrices returns a copy of the Factory with updated gas prices. func (f Factory) WithGasPrices(gasPrices string) Factory { parsedGasPrices, err := sdk.ParseDecCoins(gasPrices) diff --git a/client/tx/legacy_test.go b/client/tx/legacy_test.go index 2e337088cf2f..53751d4d90da 100644 --- a/client/tx/legacy_test.go +++ b/client/tx/legacy_test.go @@ -3,7 +3,6 @@ package tx_test import ( "github.com/cosmos/cosmos-sdk/testutil/testdata" "github.com/cosmos/cosmos-sdk/types" - typestx "github.com/cosmos/cosmos-sdk/types/tx" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" ) @@ -19,5 +18,4 @@ var ( msg1 = banktypes.NewMsgSend(addr1, addr2, types.NewCoins(types.NewInt64Coin("wack", 2))) chainID = "test-chain" - tip = &typestx.Tip{Tipper: addr1.String(), Amount: testdata.NewTestFeeAmount()} ) diff --git a/client/tx/tx.go b/client/tx/tx.go index 4b633be52a7b..c3b678b6392b 100644 --- a/client/tx/tx.go +++ b/client/tx/tx.go @@ -393,13 +393,6 @@ func makeAuxSignerData(clientCtx client.Context, f Factory, msgs ...sdk.Msg) (tx return tx.AuxSignerData{}, err } - if f.tip != nil { - if _, err := clientCtx.AddressCodec.StringToBytes(f.tip.Tipper); err != nil { - return tx.AuxSignerData{}, sdkerrors.ErrInvalidAddress.Wrap("tipper must be a valid address") - } - b.SetTip(f.tip) - } - err = b.SetSignMode(f.SignMode()) if err != nil { return tx.AuxSignerData{}, err diff --git a/client/tx/tx_test.go b/client/tx/tx_test.go index 1cb480b3c5b0..36ece26b92de 100644 --- a/client/tx/tx_test.go +++ b/client/tx/tx_test.go @@ -9,8 +9,6 @@ import ( "github.com/stretchr/testify/require" "google.golang.org/grpc" - "cosmossdk.io/math" - "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/tx" "github.com/cosmos/cosmos-sdk/codec" @@ -388,22 +386,12 @@ func TestPreprocessHook(t *testing.T) { extAny, err := codectypes.NewAnyWithValue(extVal) requireT.NoError(err) - coin := sdk.Coin{ - Denom: "atom", - Amount: math.NewInt(20), - } - newTip := &txtypes.Tip{ - Amount: sdk.Coins{coin}, - Tipper: "galaxy", - } - preprocessHook := client.PreprocessTxFn(func(chainID string, key keyring.KeyType, tx client.TxBuilder) error { extensionBuilder, ok := tx.(authtx.ExtensionOptionsTxBuilder) requireT.True(ok) // Set new extension and tip extensionBuilder.SetExtensionOptions(extAny) - tx.SetTip(newTip) return nil }) @@ -435,9 +423,6 @@ func TestPreprocessHook(t *testing.T) { opt := hasExtOptsTx.GetExtensionOptions()[0] requireT.Equal(opt, extAny) - - tip := txb.GetTx().GetTip() - requireT.Equal(tip, newTip) } func testSigners(require *require.Assertions, tr signing.Tx, pks ...cryptotypes.PubKey) []signingtypes.SignatureV2 { diff --git a/client/tx_config.go b/client/tx_config.go index 4f6af35fa2a4..4dd1caa01396 100644 --- a/client/tx_config.go +++ b/client/tx_config.go @@ -47,7 +47,6 @@ type ( SetFeeAmount(amount sdk.Coins) SetFeePayer(feePayer sdk.AccAddress) SetGasLimit(limit uint64) - SetTip(tip *tx.Tip) SetTimeoutHeight(height uint64) SetFeeGranter(feeGranter sdk.AccAddress) AddAuxSignerData(tx.AuxSignerData) error diff --git a/docs/develop/advanced/00-baseapp.md b/docs/develop/advanced/00-baseapp.md index 293a82928af7..7121991e9777 100644 --- a/docs/develop/advanced/00-baseapp.md +++ b/docs/develop/advanced/00-baseapp.md @@ -412,7 +412,8 @@ First, it retrieves the `sdk.Msg`'s fully-qualified type name, by checking the ` `PostHandler` is similar to `AnteHandler`, but it, as the name suggests, executes custom post tx processing logic after [`RunMsgs`](#runmsgs) is called. `PostHandler` receives the `Result` of the the `RunMsgs` in order to enable this customizable behavior. -Like `AnteHandler`s, `PostHandler`s are theoretically optional, one use case for `PostHandler`s is transaction tips (enabled by default in simapp). +Like `AnteHandler`s, `PostHandler`s are theoretically optional. + Other use cases like unused gas refund can also be enabled by `PostHandler`s. ```go reference diff --git a/docs/develop/advanced/01-transactions.md b/docs/develop/advanced/01-transactions.md index eee4fae37976..1901675fbcb2 100644 --- a/docs/develop/advanced/01-transactions.md +++ b/docs/develop/advanced/01-transactions.md @@ -91,7 +91,6 @@ https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/proto/cosmos/tx/v1beta The use case is a multi-signer transaction, where one of the signers is appointed to gather all signatures, broadcast the signature and pay for fees, and the others only care about the transaction body. This generally allows for a better multi-signing UX. If Alice, Bob and Charlie are part of a 3-signer transaction, then Alice and Bob can both use `SIGN_MODE_DIRECT_AUX` to sign over the `TxBody` and their own signer info (no need an additional step to gather other signers' ones, like in `SIGN_MODE_DIRECT`), without specifying a fee in their SignDoc. Charlie can then gather both signatures from Alice and Bob, and create the final transaction by appending a fee. Note that the fee payer of the transaction (in our case Charlie) must sign over the fees, so must use `SIGN_MODE_DIRECT` or `SIGN_MODE_LEGACY_AMINO_JSON`. -A concrete use case is implemented in [transaction tips](./14-tips.md): the tipper may use `SIGN_MODE_DIRECT_AUX` to specify a tip in the transaction, without signing over the actual transaction fees. Then, the fee payer appends fees inside the tipper's desired `TxBody`, and as an exchange for paying the fees and broadcasting the transaction, receives the tipper's transaction tips as payment. #### `SIGN_MODE_TEXTUAL` diff --git a/docs/develop/advanced/14-tips.md b/docs/develop/advanced/14-tips.md deleted file mode 100644 index 90f0f2abcec9..000000000000 --- a/docs/develop/advanced/14-tips.md +++ /dev/null @@ -1,214 +0,0 @@ ---- -sidebar_position: 1 ---- - -# Transaction Tips - -:::note Synopsis -Transaction tips are a mechanism to pay for transaction fees using another denom than the native fee denom of the chain. They are still in beta, and are not included by default in the SDK. -::: - -## Context - -In a Cosmos ecosystem where more and more chains are connected via [IBC](https://ibc.cosmos.network/), it happens that users want to perform actions on chains where they don't have native tokens yet. An example would be an Osmosis user who wants to vote on a proposal on the Cosmos Hub, but they don't have ATOMs in their wallet. A solution would be to swap OSMO for ATOM just for voting on this proposal, but that is cumbersome. Cross-chain DeFi project [Emeris](https://emeris.com/) is another use case. - -Transaction tips is a new solution for cross-chain transaction fees payment, whereby the transaction initiator signs a transaction without specifying fees, but uses a new `Tip` field. They send this signed transaction to a fee relayer who will choose the transaction fees and broadcast the final transaction, and the SDK provides a mechanism that will transfer the pre-defined `Tip` to the fee payer, to cover for fees. - -Assuming we have two chains, A and B, we define the following terms: - -* **the tipper**: this is the initiator of the transaction, who wants to execute a `Msg` on chain A, but doesn't have any native chain A tokens, only chain B tokens. In our example above, the tipper is the Osmosis (chain B) user wanting to vote on a Cosmos Hub (chain A) proposal. -* **the fee payer**: this is the party that will relay and broadcast the final transaction on chain A, and has chain A tokens. The tipper doesn't need to trust the feepayer. -* **the target chain**: the chain where the `Msg` is executed, chain A in this case. - -## Transaction Tips Flow - -The transaction tips flow happens in multiple steps. - -1. The tipper sends via IBC some chain B tokens to chain A. These tokens will cover for fees on the target chain A. This means that chain A's bank module holds some IBC tokens under the tipper's address. - -2. The tipper drafts a transaction to be executed on the chain A. It can include chain A `Msg`s. However, instead of creating a normal transaction, they create the following `AuxSignerData` document: - - ```protobuf reference - https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/proto/cosmos/tx/v1beta1/tx.proto#L231-L244 - ``` - - where we have defined `SignDocDirectAux` as: - - ```protobuf reference - https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/proto/cosmos/tx/v1beta1/tx.proto#L68-L98 - ``` - - where `Tip` is defined as - - ```protobuf reference - https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/proto/cosmos/tx/v1beta1/tx.proto#L233-L244 - ``` - - Notice that this document doesn't sign over the final chain A fees. Instead, it includes a `Tip` field. It also doesn't include the whole `AuthInfo` object as in `SIGN_MODE_DIRECT`, only the minimum information needed by the tipper - -3. The tipper signs the `SignDocDirectAux` document and attaches the signature to the `AuxSignerData`, then sends the signed `AuxSignerData` to the fee payer. - -4. From the signed `AuxSignerData` document, the fee payer constructs a transaction, using the following algorithm: - -* use as `TxBody` the exact `AuxSignerData.SignDocDirectAux.body_bytes`, to not alter the original intent of the tipper, -* create an `AuthInfo` with: - * `AuthInfo.Tip` copied from `AuxSignerData.SignDocDirectAux.Tip`, - * `AuthInfo.Fee` chosen by the fee payer, which should cover for the transaction gas, but also be small enough so that the tip/fee exchange rate is economically interesting for the fee payer, - * `AuthInfo.SignerInfos` has two signers: the first signer is the tipper, using the public key, sequence and sign mode specified in `AuxSignerData`; and the second signer is the fee payer, using their favorite sign mode, -* a `Signatures` array with two items: the tipper's signature from `AuxSignerData.Sig`, and the final fee payer's signature. - -5. Broadcast the final transaction signed by the two parties to the target chain. Once included, the Cosmos SDK will trigger a transfer of the `Tip` specified in the transaction from the tipper address to the fee payer address. - -### Fee Payers Market - -The benefit of transaction tips for the tipper is clear: there is no need to swap tokens before executing a cross-chain message. - -For the fee payer, the benefit is in the tip v.s. fee exchange. Put simply, the fee payer pays the fees of an unknown tipper's transaction, and gets in exchange the tip that the tipper chose. There is an economic incentive for the fee payer to do so only when the tip is greater than the transaction fees, given the exchange rates between the two tokens. - -In the future, we imagine a market where fee payers will compete to include transactions from tippers, who on their side will optimize by specifying the lowest tip possible. A number of automated services might spin up to perform transaction gas simulation and exchange rate monitoring to optimize both the tip and fee values in real-time. - -### Tipper and Fee Payer Sign Modes - -As we mentioned in the flow above, the tipper signs over the `SignDocDirectAux`, and the fee payer signs over the whole final transaction. As such, both parties might use different sign modes. - -* The tipper MUST use `SIGN_MODE_DIRECT_AUX` or `SIGN_MODE_LEGACY_AMINO_JSON`. That is because the tipper needs to sign over the body, the tip, but not the other signers' information and not over the fee (which is unknown to the tipper). -* The fee payer MUST use `SIGN_MODE_DIRECT` or `SIGN_MODE_LEGACY_AMINO_JSON`. The fee payer signs over the whole transaction. - -For example, if the fee payer signs the whole transaction with `SIGN_MODE_DIRECT_AUX`, it will be rejected by the node, as that would introduce malleability issues (`SIGN_MODE_DIRECT_AUX` doesn't sign over fees). - -In both cases, using `SIGN_MODE_LEGACY_AMINO_JSON` is recommended only if hardware wallet signing is needed. - -## Enabling Tips on your Chain - -The transaction tips functionality is introduced in Cosmos SDK v0.46, so earlier versions do not have support for tips. It is however not included by default in a v0.46 app. Sending a transaction with tips to a chain which didn't enable tips will result in a no-op, i.e. the `tip` field in the transaction will be ignored. - -Enabling tips on a chain is done by adding the `TipDecorator` in the posthandler chain: - -```go -// HandlerOptions are the options required for constructing a SDK PostHandler which supports tips. -type HandlerOptions struct { - BankKeeper types.BankKeeper -} - -// MyPostHandler returns a posthandler chain with the TipDecorator. -func MyPostHandler(options HandlerOptions) (sdk.AnteHandler, error) { - if options.BankKeeper == nil { - return nil, errorsmod.Wrap(sdkerrors.ErrLogic, "bank keeper is required for posthandler") - } - - postDecorators := []sdk.AnteDecorator{ - posthandler.NewTipDecorator(options.bankKeeper), - } - - return sdk.ChainAnteDecorators(postDecorators...), nil -} - -func (app *SimApp) setPostHandler() { - postHandler, err := MyPostHandler( - HandlerOptions{ - BankKeeper: app.BankKeeper, - }, - ) - if err != nil { - panic(err) - } - - app.SetPostHandler(postHandler) -} -``` - -Notice that `NewTipDecorator` needs a reference to the BankKeeper, for transferring the tip to the fee payer. - -## CLI Usage - -The Cosmos SDK also provides some CLI tooling for the transaction tips flow, both for the tipper and for the feepayer. - -For the tipper, the CLI `tx` subcommand has two new flags: `--aux` and `--tip`. The `--aux` flag is used to denote that we are creating an `AuxSignerData` instead of a `Tx`, and the `--tip` is used to populate its `Tip` field. - -```bash -$ simd tx gov vote 16 yes --from --aux --tip 50ibcdenom - - -### Prints the AuxSignerData as JSON: -### {"address":"cosmos1q0ayf5vq6fd2xxrwh30upg05hxdnyw2h5249a2","sign_doc":{"body_bytes":"CosBChwvY29zbW9zLmJhbmsudjFiZXRhMS5Nc2dTZW5kEmsKLWNvc21vczFxMGF5ZjV2cTZmZDJ4eHJ3aDMwdXBnMDVoeGRueXcyaDUyNDlhMhItY29zbW9zMXdlNWoyZXI2MHV5OXF3YzBta3ptdGdtdHA5Z3F5NXY2bjhnZGdlGgsKBXN0YWtlEgIxMA==","public_key":{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"AojOF/1luQ5H/nZDSrE1w3CyzGJhJdQuS7hFX5wAA6uJ"},"chain_id":"","account_number":"0","sequence":"1","tip":{"amount":[{"denom":"ibcdenom","amount":"50"}],"tipper":"cosmos1q0ayf5vq6fd2xxrwh30upg05hxdnyw2h5249a2"}},"mode":"SIGN_MODE_DIRECT_AUX","sig":"v/d/bGq9FGdecs6faMG2t//nRirFTiqwFtUB65M6kh0QdUeM6jg3r8oJX1o17xkoDxJ09EyJiSyvo6fbU7vUxg=="} -``` - -It is useful to pipe the JSON output to a file, `> aux_signed_tx.json` - -For the fee payer, the Cosmos SDK added a `tx aux-to-fee` subcommand to include an `AuxSignerData` into a transaction, add fees to it, and broadcast it. - -```bash -$ simd tx aux-to-fee aux_signed_tx.json --from --fees 30atom - -### Prints the broadcasted tx response: -### code: 0 -### codespace: sdk -### data: "" -### events: [] -### gas_used: "0" -### gas_wanted: "0" -### height: "0" -### info: "" -### logs: [] -### timestamp: "" -### tx: null -``` - -Upon completion of the second command, the fee payer's balance will be down the `30atom` fees, and up the `50ibcdenom` tip. - -For both commands, the flag `--sign-mode=amino-json` is still available for hardware wallet signing. - -## Programmatic Usage - -For the tipper, the SDK exposes a new transaction builder, the `AuxTxBuilder`, for generating an `AuxSignerData`. The API of `AuxTxBuilder` is defined [in `client/tx`](https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/client/tx/aux_builder.go#L22), and can be used as follows: - -```go -// Note: there's no need to use clientCtx.TxConfig anymore. - -bldr := clienttx.NewAuxTxBuilder() -err := bldr.SetMsgs(msgs...) -bldr.SetAddress("cosmos1...") -bldr.SetMemo(...) -bldr.SetTip(...) -bldr.SetPubKey(...) -err := bldr.SetSignMode(...) // DIRECT_AUX or AMINO, or else error -// ... other setters are also available - -// Get the bytes to sign. -signBz, err := bldr.GetSignBytes() - -// Sign the bz using your favorite method. -sig, err := privKey.sign(signBz) - -// Set the signature -bldr.SetSig(sig) - -// Get the final auxSignerData to be sent to the fee payer -auxSignerData, err:= bldr.GetAuxSignerData() -``` - -For the fee payer, the SDK added a new method on the existing `TxBuilder` to import data from an `AuxSignerData`: - -```go -// get `auxSignerData` from tipper, see code snippet above. - -txBuilder := clientCtx.TxConfig.NewTxBuilder() -err := txBuilder.AddAuxSignerData(auxSignerData) -if err != nil { - return err -} - -// A lot of fields will be populated in txBuilder, such as its Msgs, tip -// memo, etc... - -// The fee payer choses the fee to set on the transaction. -txBuilder.SetFeePayer() -txBuilder.SetFeeAmount(...) -txBuilder.SetGasLimit(...) - -// Usual signing code -err = authclient.SignTx(...) -if err != nil { - return err -} -``` diff --git a/proto/cosmos/tx/signing/v1beta1/signing.proto b/proto/cosmos/tx/signing/v1beta1/signing.proto index faad739b5aab..06ab80d80753 100644 --- a/proto/cosmos/tx/signing/v1beta1/signing.proto +++ b/proto/cosmos/tx/signing/v1beta1/signing.proto @@ -32,8 +32,7 @@ enum SignMode { // SIGN_MODE_DIRECT_AUX specifies a signing mode which uses // SignDocDirectAux. As opposed to SIGN_MODE_DIRECT, this sign mode does not - // require signers signing over other signers' `signer_info`. It also allows - // for adding Tips in transactions. + // require signers signing over other signers' `signer_info`. // // Since: cosmos-sdk 0.46 SIGN_MODE_DIRECT_AUX = 3; diff --git a/proto/cosmos/tx/v1beta1/tx.proto b/proto/cosmos/tx/v1beta1/tx.proto index 9ac0d932a3e1..cfaac70449f4 100644 --- a/proto/cosmos/tx/v1beta1/tx.proto +++ b/proto/cosmos/tx/v1beta1/tx.proto @@ -88,13 +88,8 @@ message SignDocDirectAux { // sequence is the sequence number of the signing account. uint64 sequence = 5; - // Tip is the optional tip used for transactions fees paid in another denom. - // It should be left empty if the signer is not the tipper for this - // transaction. - // - // This field is ignored if the chain didn't enable tips, i.e. didn't add the - // `TipDecorator` in its posthandler. - Tip tip = 6; + // tips have been depreacted and should not be used + Tip tip = 6 [deprecated = true]; } // TxBody is the body of a transaction that all signers sign over. @@ -142,14 +137,13 @@ message AuthInfo { // based on the cost of evaluating the body and doing signature verification // of the signers. This can be estimated via simulation. Fee fee = 2; - // Tip is the optional tip used for transactions fees paid in another denom. // // This field is ignored if the chain didn't enable tips, i.e. didn't add the // `TipDecorator` in its posthandler. // // Since: cosmos-sdk 0.46 - Tip tip = 3; + Tip tip = 3 [deprecated = true]; } // SignerInfo describes the public key and signing mode of a single top-level @@ -232,6 +226,7 @@ message Fee { // // Since: cosmos-sdk 0.46 message Tip { + option deprecated = true; // amount is the amount of the tip repeated cosmos.base.v1beta1.Coin amount = 1 [ (gogoproto.nullable) = false, diff --git a/simapp/app.go b/simapp/app.go index d87d9adaee41..0953345eaf5f 100644 --- a/simapp/app.go +++ b/simapp/app.go @@ -514,12 +514,7 @@ func NewSimApp( // meaning that both `runMsgs` and `postHandler` state will be committed if // both are successful, and both will be reverted if any of the two fails. // - // The SDK exposes a default postHandlers chain, which comprises of only - // one decorator: the Transaction Tips decorator. However, some chains do - // not need it by default, so feel free to comment the next line if you do - // not need tips. - // To read more about tips: - // https://docs.cosmos.network/main/core/tips.html + // The SDK exposes a default postHandlers chain // // Please note that changing any of the anteHandler or postHandler chain is // likely to be a state-machine breaking change, which needs a coordinated diff --git a/simapp/simd/cmd/commands.go b/simapp/simd/cmd/commands.go index 42208c3595f8..abfa351961da 100644 --- a/simapp/simd/cmd/commands.go +++ b/simapp/simd/cmd/commands.go @@ -117,7 +117,6 @@ func txCommand() *cobra.Command { authcmd.GetBroadcastCommand(), authcmd.GetEncodeCommand(), authcmd.GetDecodeCommand(), - authcmd.GetAuxToFeeCommand(), authcmd.GetSimulateCmd(), ) diff --git a/tests/e2e/auth/suite.go b/tests/e2e/auth/suite.go index e9cedd1491e6..a8e4a64c4511 100644 --- a/tests/e2e/auth/suite.go +++ b/tests/e2e/auth/suite.go @@ -1677,12 +1677,6 @@ func (s *E2ETestSuite) TestAuxToFeeWithTips() { genTxFile := testutil.WriteToNewTempFile(s.T(), string(res.Bytes())) defer genTxFile.Close() - // broadcast the tx - res, err = authclitestutil.TxAuxToFeeExec( - val.ClientCtx, - genTxFile.Name(), - tc.feePayerArgs..., - ) s.Require().NoError(s.network.WaitForNextBlock()) switch { diff --git a/tests/integration/auth/client/cli/suite_test.go b/tests/integration/auth/client/cli/suite_test.go index 43e3ca566726..80b0c7b24bd6 100644 --- a/tests/integration/auth/client/cli/suite_test.go +++ b/tests/integration/auth/client/cli/suite_test.go @@ -1208,13 +1208,6 @@ func (s *CLITestSuite) TestAuxToFeeWithTips() { genTxFile := testutil.WriteToNewTempFile(s.T(), string(res.Bytes())) defer genTxFile.Close() - // broadcast the tx - res, err = authtestutil.TxAuxToFeeExec( - s.clientCtx, - genTxFile.Name(), - tc.feePayerArgs..., - ) - switch { case tc.expectErrBroadCast: require.Error(err) diff --git a/tests/integration/tx/aminojson/aminojson_test.go b/tests/integration/tx/aminojson/aminojson_test.go index 3d9cc5e34dac..1e81da44dc52 100644 --- a/tests/integration/tx/aminojson/aminojson_test.go +++ b/tests/integration/tx/aminojson/aminojson_test.go @@ -49,7 +49,6 @@ import ( "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/bech32" "github.com/cosmos/cosmos-sdk/types/module/testutil" - txtypes "github.com/cosmos/cosmos-sdk/types/tx" signingtypes "github.com/cosmos/cosmos-sdk/types/tx/signing" "github.com/cosmos/cosmos-sdk/x/auth" "github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx" @@ -149,10 +148,6 @@ func TestAminoJSON_Equivalence(t *testing.T) { AccNum: 1, AccSeq: 2, SignerAddress: "signerAddress", - Tip: &txv1beta1.Tip{ - Tipper: "tipper", - Amount: []*v1beta1.Coin{{Denom: "uatom", Amount: "1000"}}, - }, Fee: &txv1beta1.Fee{ Amount: []*v1beta1.Coin{{Denom: "uatom", Amount: "1000"}}, }, @@ -170,10 +165,6 @@ func TestAminoJSON_Equivalence(t *testing.T) { require.NoError(t, txBuilder.SetMsgs([]types.Msg{tt.Gogo}...)) txBuilder.SetMemo(handlerOptions.Memo) txBuilder.SetFeeAmount(types.Coins{types.NewInt64Coin("uatom", 1000)}) - txBuilder.SetTip(&txtypes.Tip{ - Amount: types.Coins{types.NewInt64Coin("uatom", 1000)}, - Tipper: "tipper", - }) theTx := txBuilder.GetTx() legacySigningData := signing.SignerData{ diff --git a/types/tx/direct_aux.go b/types/tx/direct_aux.go index 73189ff840c5..de6346fbf03c 100644 --- a/types/tx/direct_aux.go +++ b/types/tx/direct_aux.go @@ -17,12 +17,6 @@ func (s *SignDocDirectAux) ValidateBasic() error { return sdkerrors.ErrInvalidPubKey.Wrap("public key cannot be empty") } - if s.Tip != nil { - if s.Tip.Tipper == "" { - return sdkerrors.ErrInvalidRequest.Wrap("tipper cannot be empty") - } - } - return nil } diff --git a/types/tx/direct_aux_test.go b/types/tx/direct_aux_test.go index 5f8c7aefc335..f9e90b8e27e7 100644 --- a/types/tx/direct_aux_test.go +++ b/types/tx/direct_aux_test.go @@ -14,7 +14,7 @@ import ( func TestSignDocDirectAux(t *testing.T) { bodyBz := []byte{42} - _, pk, addr := testdata.KeyTestPubAddr() + _, pk, _ := testdata.KeyTestPubAddr() pkAny, err := codectypes.NewAnyWithValue(pk) require.NoError(t, err) @@ -25,12 +25,10 @@ func TestSignDocDirectAux(t *testing.T) { }{ {"empty bodyBz", tx.SignDocDirectAux{}, true}, {"empty pubkey", tx.SignDocDirectAux{BodyBytes: bodyBz}, true}, - {"empty tipper", tx.SignDocDirectAux{BodyBytes: bodyBz, PublicKey: pkAny, Tip: &tx.Tip{Amount: testdata.NewTestFeeAmount()}}, true}, {"happy case w/o tip", tx.SignDocDirectAux{BodyBytes: bodyBz, PublicKey: pkAny}, false}, {"happy case w/ tip", tx.SignDocDirectAux{ BodyBytes: bodyBz, PublicKey: pkAny, - Tip: &tx.Tip{Tipper: addr.String(), Amount: testdata.NewTestFeeAmount()}, }, false}, } diff --git a/types/tx/signing/signing.pb.go b/types/tx/signing/signing.pb.go index 54beb1b1fbf7..02f64a4824d4 100644 --- a/types/tx/signing/signing.pb.go +++ b/types/tx/signing/signing.pb.go @@ -49,8 +49,7 @@ const ( SignMode_SIGN_MODE_TEXTUAL SignMode = 2 // SIGN_MODE_DIRECT_AUX specifies a signing mode which uses // SignDocDirectAux. As opposed to SIGN_MODE_DIRECT, this sign mode does not - // require signers signing over other signers' `signer_info`. It also allows - // for adding Tips in transactions. + // require signers signing over other signers' `signer_info`. // // Since: cosmos-sdk 0.46 SignMode_SIGN_MODE_DIRECT_AUX SignMode = 3 diff --git a/types/tx/tips.go b/types/tx/tips.go deleted file mode 100644 index ca8afb36d5ae..000000000000 --- a/types/tx/tips.go +++ /dev/null @@ -1,11 +0,0 @@ -package tx - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" -) - -// TipTx defines the interface to be implemented by Txs that handle Tips. -type TipTx interface { - sdk.FeeTx - GetTip() *Tip -} diff --git a/types/tx/tx.pb.go b/types/tx/tx.pb.go index 6782890cc9e4..8173108d3904 100644 --- a/types/tx/tx.pb.go +++ b/types/tx/tx.pb.go @@ -264,13 +264,8 @@ type SignDocDirectAux struct { AccountNumber uint64 `protobuf:"varint,4,opt,name=account_number,json=accountNumber,proto3" json:"account_number,omitempty"` // sequence is the sequence number of the signing account. Sequence uint64 `protobuf:"varint,5,opt,name=sequence,proto3" json:"sequence,omitempty"` - // Tip is the optional tip used for transactions fees paid in another denom. - // It should be left empty if the signer is not the tipper for this - // transaction. - // - // This field is ignored if the chain didn't enable tips, i.e. didn't add the - // `TipDecorator` in its posthandler. - Tip *Tip `protobuf:"bytes,6,opt,name=tip,proto3" json:"tip,omitempty"` + // tips have been depreacted and should not be used + Tip *Tip `protobuf:"bytes,6,opt,name=tip,proto3" json:"tip,omitempty"` // Deprecated: Do not use. } func (m *SignDocDirectAux) Reset() { *m = SignDocDirectAux{} } @@ -341,6 +336,7 @@ func (m *SignDocDirectAux) GetSequence() uint64 { return 0 } +// Deprecated: Do not use. func (m *SignDocDirectAux) GetTip() *Tip { if m != nil { return m.Tip @@ -462,7 +458,7 @@ type AuthInfo struct { // `TipDecorator` in its posthandler. // // Since: cosmos-sdk 0.46 - Tip *Tip `protobuf:"bytes,3,opt,name=tip,proto3" json:"tip,omitempty"` + Tip *Tip `protobuf:"bytes,3,opt,name=tip,proto3" json:"tip,omitempty"` // Deprecated: Do not use. } func (m *AuthInfo) Reset() { *m = AuthInfo{} } @@ -512,6 +508,7 @@ func (m *AuthInfo) GetFee() *Fee { return nil } +// Deprecated: Do not use. func (m *AuthInfo) GetTip() *Tip { if m != nil { return m.Tip @@ -866,6 +863,8 @@ func (m *Fee) GetGranter() string { // Tip is the tip used for meta-transactions. // // Since: cosmos-sdk 0.46 +// +// Deprecated: Do not use. type Tip struct { // amount is the amount of the tip Amount github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"` @@ -1021,73 +1020,74 @@ func init() { func init() { proto.RegisterFile("cosmos/tx/v1beta1/tx.proto", fileDescriptor_96d1575ffde80842) } var fileDescriptor_96d1575ffde80842 = []byte{ - // 1052 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x55, 0x41, 0x6f, 0x1b, 0xc5, - 0x17, 0xf7, 0x7a, 0x6d, 0xc7, 0x7e, 0x4d, 0xda, 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, 0x06, 0xd7, 0xfb, 0xd1, 0x82, 0x95, - 0x41, 0x3a, 0xcb, 0x1f, 0xee, 0x2e, 0x96, 0x58, 0x5d, 0x1d, 0xe7, 0x50, 0xad, 0xac, 0xb9, 0x57, - 0x37, 0x40, 0xf4, 0x0e, 0x34, 0x95, 0x74, 0xfd, 0x31, 0x0f, 0xcc, 0xcb, 0xb8, 0xfa, 0x8a, 0x6e, - 0x74, 0x76, 0x92, 0x79, 0x4b, 0xc2, 0x0c, 0xdc, 0xe2, 0x45, 0xd8, 0x7f, 0xf3, 0x45, 0xa0, 0x55, - 0xb0, 0x05, 0x0d, 0x75, 0x8d, 0x96, 0x3d, 0xb5, 0x1c, 0xbe, 0xfb, 0xe4, 0xb8, 0x6b, 0x3d, 0x3d, - 0xee, 0x5a, 0xcf, 0x8e, 0xbb, 0xd6, 0xa3, 0x93, 0x6e, 0xe5, 0xe9, 0x49, 0xb7, 0xf2, 0xf3, 0x49, - 0xb7, 0xf2, 0xe0, 0xda, 0xe2, 0x24, 0xbb, 0x72, 0x36, 0x6a, 0xe8, 0xe6, 0x74, 0xeb, 0x8f, 0x00, - 0x00, 0x00, 0xff, 0xff, 0x1f, 0x66, 0x4c, 0xda, 0x17, 0x0a, 0x00, 0x00, + // 1059 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x55, 0x41, 0x6f, 0x1b, 0x45, + 0x14, 0xf6, 0x7a, 0x6d, 0xc7, 0x7e, 0x4d, 0xda, 0x64, 0x14, 0x21, 0xc7, 0x51, 0xdd, 0xe0, 0xaa, + 0x60, 0x55, 0x64, 0xb7, 0x4d, 0x0f, 0x94, 0x0a, 0x01, 0x76, 0x43, 0x94, 0xaa, 0x14, 0xa4, 0x4d, + 0x4e, 0xbd, 0xac, 0xc6, 0xeb, 0xc9, 0x7a, 0x54, 0xef, 0xcc, 0xb2, 0x33, 0x0b, 0xde, 0x23, 0x3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c0, 0xbc, 0x8e, 0xcb, 0x2f, 0xe9, 0x4a, 0x27, 0xa7, 0x9a, 0xb7, 0x20, 0xcc, 0xf0, 0x2d, + 0x5e, 0x85, 0xfd, 0x0f, 0x5f, 0x05, 0x5a, 0x06, 0x5b, 0xd0, 0x50, 0xdf, 0xd3, 0xa2, 0xa7, 0x96, + 0xc3, 0xf7, 0x1f, 0x1f, 0x76, 0xad, 0x27, 0x87, 0x5d, 0xeb, 0xe9, 0x61, 0xd7, 0x7a, 0x78, 0xd4, + 0xad, 0x3c, 0x39, 0xea, 0x56, 0x7e, 0x3d, 0xea, 0x56, 0xee, 0x5f, 0x39, 0xbb, 0xd0, 0xae, 0x9c, + 0x8d, 0x1a, 0xba, 0x41, 0xdd, 0xf8, 0x2b, 0x00, 0x00, 0xff, 0xff, 0x24, 0x52, 0x64, 0xe6, 0x23, + 0x0a, 0x00, 0x00, } func (m *Tx) Marshal() (dAtA []byte, err error) { diff --git a/x/auth/README.md b/x/auth/README.md index 4b5a2ad1f45b..1d5e22b5d874 100644 --- a/x/auth/README.md +++ b/x/auth/README.md @@ -481,17 +481,6 @@ simd tx broadcast tx.signed.json More information about the `broadcast` command can be found running `simd tx broadcast --help`. -#### `aux-to-fee` - -The `aux-to-fee` comamnds includes the aux signer data in the tx, broadcast the tx, and sends the tip amount to the broadcaster. -[Learn more about tip transaction](https://docs.cosmos.network/main/core/tips). - -```bash -# simd tx bank send --aux (optional: --tip --tipper ) -simd tx aux-to-fee tx.aux.signed.json -``` - -More information about the `aux-to-fee` command can be found running `simd tx aux-to-fee --help`. ### gRPC diff --git a/x/auth/client/cli/tips.go b/x/auth/client/cli/tips.go deleted file mode 100644 index 82904c6ab064..000000000000 --- a/x/auth/client/cli/tips.go +++ /dev/null @@ -1,93 +0,0 @@ -package cli - -import ( - "fmt" - "os" - - "github.com/spf13/cobra" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - clienttx "github.com/cosmos/cosmos-sdk/client/tx" - "github.com/cosmos/cosmos-sdk/codec" - "github.com/cosmos/cosmos-sdk/types/tx" - authclient "github.com/cosmos/cosmos-sdk/x/auth/client" -) - -func GetAuxToFeeCommand() *cobra.Command { - cmd := &cobra.Command{ - Use: "aux-to-fee ", - Short: "Includes the aux signer data in the tx, broadcast the tx, and sends the tip amount to the broadcaster", - Args: cobra.ExactArgs(1), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientTxContext(cmd) - if err != nil { - return err - } - - auxSignerData := tx.AuxSignerData{} - err = readAuxSignerData(clientCtx.Codec, &auxSignerData, args[0]) - if err != nil { - return err - } - - if auxSignerData.SignDoc.ChainId != clientCtx.ChainID { - return fmt.Errorf("expected chain-id %s, got %s in aux signer data", clientCtx.ChainID, auxSignerData.SignDoc.ChainId) - } - - f, err := clienttx.NewFactoryCLI(clientCtx, cmd.Flags()) - if err != nil { - return err - } - - txBuilder := clientCtx.TxConfig.NewTxBuilder() - err = txBuilder.AddAuxSignerData(auxSignerData) - if err != nil { - return err - } - - txBuilder.SetFeePayer(clientCtx.FromAddress) - txBuilder.SetFeeAmount(f.Fees()) - txBuilder.SetGasLimit(f.Gas()) - - if clientCtx.GenerateOnly { - json, err := clientCtx.TxConfig.TxJSONEncoder()(txBuilder.GetTx()) - if err != nil { - return err - } - return clientCtx.PrintString(fmt.Sprintf("%s\n", json)) - } - - err = authclient.SignTx(f, clientCtx, clientCtx.FromName, txBuilder, clientCtx.Offline, false) - if err != nil { - return err - } - - txBytes, err := clientCtx.TxConfig.TxEncoder()(txBuilder.GetTx()) - if err != nil { - return err - } - - // broadcast to a CometBFT node - res, err := clientCtx.BroadcastTx(txBytes) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddTxFlagsToCmd(cmd) - - return cmd -} - -func readAuxSignerData(cdc codec.Codec, auxSignerData *tx.AuxSignerData, filename string) error { - bytes, err := os.ReadFile(filename) - if err != nil { - return err - } - - return cdc.UnmarshalJSON(bytes, auxSignerData) -} diff --git a/x/auth/client/testutil/helpers.go b/x/auth/client/testutil/helpers.go index 8ca44048cbd1..092b061a83c2 100644 --- a/x/auth/client/testutil/helpers.go +++ b/x/auth/client/testutil/helpers.go @@ -80,15 +80,6 @@ func TxDecodeExec(clientCtx client.Context, encodedTx string, extraArgs ...strin return clitestutil.ExecTestCLICmd(clientCtx, cli.GetDecodeCommand(), append(args, extraArgs...)) } -// TxAuxToFeeExec executes `GetAuxToFeeCommand` cli command with given args. -func TxAuxToFeeExec(clientCtx client.Context, filename string, extraArgs ...string) (testutil.BufferWriter, error) { - args := []string{ - filename, - } - - return clitestutil.ExecTestCLICmd(clientCtx, cli.GetAuxToFeeCommand(), append(args, extraArgs...)) -} - func TxMultiSignBatchExec(clientCtx client.Context, filename, from, sigFile1, sigFile2 string, extraArgs ...string) (testutil.BufferWriter, error) { args := []string{ fmt.Sprintf("--%s=%s", flags.FlagKeyringBackend, keyring.BackendTest), diff --git a/x/auth/migrations/legacytx/stdsign.go b/x/auth/migrations/legacytx/stdsign.go index 5d489837bc86..e5a4e454cb90 100644 --- a/x/auth/migrations/legacytx/stdsign.go +++ b/x/auth/migrations/legacytx/stdsign.go @@ -14,7 +14,6 @@ import ( 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" "github.com/cosmos/cosmos-sdk/types/tx/signing" ) @@ -41,7 +40,6 @@ type StdSignDoc struct { Memo string `json:"memo" yaml:"memo"` Fee json.RawMessage `json:"fee" yaml:"fee"` Msgs []json.RawMessage `json:"msgs" yaml:"msgs"` - Tip *StdTip `json:"tip,omitempty" yaml:"tip"` } var RegressionTestingAminoCodec *codec.LegacyAmino @@ -62,7 +60,7 @@ func mustSortJSON(bz []byte) []byte { // StdSignBytes returns the bytes to sign for a transaction. // Deprecated: Please use x/tx/signing/aminojson instead. -func StdSignBytes(chainID string, accnum, sequence, timeout uint64, fee StdFee, msgs []sdk.Msg, memo string, tip *tx.Tip) []byte { +func StdSignBytes(chainID string, accnum, sequence, timeout uint64, fee StdFee, msgs []sdk.Msg, memo string) []byte { if RegressionTestingAminoCodec == nil { panic(fmt.Errorf("must set RegressionTestingAminoCodec before calling StdSignBytes")) } @@ -72,15 +70,6 @@ func StdSignBytes(chainID string, accnum, sequence, timeout uint64, fee StdFee, msgsBytes = append(msgsBytes, mustSortJSON(bz)) } - var stdTip *StdTip - if tip != nil { - if tip.Tipper == "" { - panic(fmt.Errorf("tipper cannot be empty")) - } - - stdTip = &StdTip{Amount: tip.Amount, Tipper: tip.Tipper} - } - bz, err := legacy.Cdc.MarshalJSON(StdSignDoc{ AccountNumber: accnum, ChainID: chainID, @@ -89,7 +78,6 @@ func StdSignBytes(chainID string, accnum, sequence, timeout uint64, fee StdFee, Msgs: msgsBytes, Sequence: sequence, TimeoutHeight: timeout, - Tip: stdTip, }) if err != nil { panic(err) diff --git a/x/auth/migrations/legacytx/stdtx.go b/x/auth/migrations/legacytx/stdtx.go index d2a16cfb0b14..900991c01450 100644 --- a/x/auth/migrations/legacytx/stdtx.go +++ b/x/auth/migrations/legacytx/stdtx.go @@ -8,7 +8,6 @@ import ( codectypes "github.com/cosmos/cosmos-sdk/codec/types" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/tx" "github.com/cosmos/cosmos-sdk/types/tx/signing" ) @@ -170,9 +169,6 @@ func (tx StdTx) FeeGranter() sdk.AccAddress { return nil } -// GetTip always returns nil for StdTx -func (tx StdTx) GetTip() *tx.Tip { return nil } - func (tx StdTx) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error { for _, m := range tx.Msgs { err := codectypes.UnpackInterfaces(m, unpacker) diff --git a/x/auth/migrations/legacytx/stdtx_builder.go b/x/auth/migrations/legacytx/stdtx_builder.go index 80d3450a441b..3965c79cc723 100644 --- a/x/auth/migrations/legacytx/stdtx_builder.go +++ b/x/auth/migrations/legacytx/stdtx_builder.go @@ -45,10 +45,6 @@ func (s *StdTxBuilder) SetGasLimit(limit uint64) { s.StdTx.Fee.Gas = limit } -func (s *StdTxBuilder) SetTip(tip *tx.Tip) { - panic("StdTxBuilder does not support tips") -} - // SetMemo implements TxBuilder.SetMemo func (s *StdTxBuilder) SetMemo(memo string) { s.Memo = memo diff --git a/x/auth/migrations/legacytx/stdtx_test.go b/x/auth/migrations/legacytx/stdtx_test.go index b7ad91da34b1..f49357ca6398 100644 --- a/x/auth/migrations/legacytx/stdtx_test.go +++ b/x/auth/migrations/legacytx/stdtx_test.go @@ -39,16 +39,11 @@ func TestStdSignBytes(t *testing.T) { fee *txv1beta1.Fee msgs []sdk.Msg memo string - tip *txv1beta1.Tip } defaultFee := &txv1beta1.Fee{ Amount: []*basev1beta1.Coin{{Denom: "atom", Amount: "150"}}, GasLimit: 100000, } - defaultTip := &txv1beta1.Tip{ - Amount: []*basev1beta1.Coin{{Denom: "tiptoken", Amount: "150"}}, - Tipper: addr.String(), - } msgStr := fmt.Sprintf(`{"type":"testpb/TestMsg","value":{"signers":["%s"]}}`, addr) tests := []struct { name string @@ -57,54 +52,39 @@ func TestStdSignBytes(t *testing.T) { }{ { "with timeout height", - args{"1234", 3, 6, 10, defaultFee, []sdk.Msg{testdata.NewTestMsg(addr)}, "memo", nil}, + args{"1234", 3, 6, 10, defaultFee, []sdk.Msg{testdata.NewTestMsg(addr)}, "memo"}, fmt.Sprintf(`{"account_number":"3","chain_id":"1234","fee":{"amount":[{"amount":"150","denom":"atom"}],"gas":"100000"},"memo":"memo","msgs":[%s],"sequence":"6","timeout_height":"10"}`, msgStr), }, { "no timeout height (omitempty)", - args{"1234", 3, 6, 0, defaultFee, []sdk.Msg{testdata.NewTestMsg(addr)}, "memo", nil}, + args{"1234", 3, 6, 0, defaultFee, []sdk.Msg{testdata.NewTestMsg(addr)}, "memo"}, fmt.Sprintf(`{"account_number":"3","chain_id":"1234","fee":{"amount":[{"amount":"150","denom":"atom"}],"gas":"100000"},"memo":"memo","msgs":[%s],"sequence":"6"}`, msgStr), }, { "empty fee", - args{"1234", 3, 6, 0, &txv1beta1.Fee{}, []sdk.Msg{testdata.NewTestMsg(addr)}, "memo", nil}, + args{"1234", 3, 6, 0, &txv1beta1.Fee{}, []sdk.Msg{testdata.NewTestMsg(addr)}, "memo"}, fmt.Sprintf(`{"account_number":"3","chain_id":"1234","fee":{"amount":[],"gas":"0"},"memo":"memo","msgs":[%s],"sequence":"6"}`, msgStr), }, { "no fee payer and fee granter (both omitempty)", - args{"1234", 3, 6, 0, &txv1beta1.Fee{Amount: defaultFee.Amount, GasLimit: defaultFee.GasLimit}, []sdk.Msg{testdata.NewTestMsg(addr)}, "memo", nil}, + args{"1234", 3, 6, 0, &txv1beta1.Fee{Amount: defaultFee.Amount, GasLimit: defaultFee.GasLimit}, []sdk.Msg{testdata.NewTestMsg(addr)}, "memo"}, fmt.Sprintf(`{"account_number":"3","chain_id":"1234","fee":{"amount":[{"amount":"150","denom":"atom"}],"gas":"100000"},"memo":"memo","msgs":[%s],"sequence":"6"}`, msgStr), }, { "with fee granter, no fee payer (omitempty)", - args{"1234", 3, 6, 0, &txv1beta1.Fee{Amount: defaultFee.Amount, GasLimit: defaultFee.GasLimit, Granter: addr.String()}, []sdk.Msg{testdata.NewTestMsg(addr)}, "memo", nil}, + args{"1234", 3, 6, 0, &txv1beta1.Fee{Amount: defaultFee.Amount, GasLimit: defaultFee.GasLimit, Granter: addr.String()}, []sdk.Msg{testdata.NewTestMsg(addr)}, "memo"}, fmt.Sprintf(`{"account_number":"3","chain_id":"1234","fee":{"amount":[{"amount":"150","denom":"atom"}],"gas":"100000","granter":"%s"},"memo":"memo","msgs":[%s],"sequence":"6"}`, addr, msgStr), }, { "with fee payer, no fee granter (omitempty)", - args{"1234", 3, 6, 0, &txv1beta1.Fee{Amount: defaultFee.Amount, GasLimit: defaultFee.GasLimit, Payer: addr.String()}, []sdk.Msg{testdata.NewTestMsg(addr)}, "memo", nil}, + args{"1234", 3, 6, 0, &txv1beta1.Fee{Amount: defaultFee.Amount, GasLimit: defaultFee.GasLimit, Payer: addr.String()}, []sdk.Msg{testdata.NewTestMsg(addr)}, "memo"}, fmt.Sprintf(`{"account_number":"3","chain_id":"1234","fee":{"amount":[{"amount":"150","denom":"atom"}],"gas":"100000","payer":"%s"},"memo":"memo","msgs":[%s],"sequence":"6"}`, addr, msgStr), }, { "with fee payer and fee granter", - args{"1234", 3, 6, 0, &txv1beta1.Fee{Amount: defaultFee.Amount, GasLimit: defaultFee.GasLimit, Payer: addr.String(), Granter: addr.String()}, []sdk.Msg{testdata.NewTestMsg(addr)}, "memo", nil}, + args{"1234", 3, 6, 0, &txv1beta1.Fee{Amount: defaultFee.Amount, GasLimit: defaultFee.GasLimit, Payer: addr.String(), Granter: addr.String()}, []sdk.Msg{testdata.NewTestMsg(addr)}, "memo"}, fmt.Sprintf(`{"account_number":"3","chain_id":"1234","fee":{"amount":[{"amount":"150","denom":"atom"}],"gas":"100000","granter":"%s","payer":"%s"},"memo":"memo","msgs":[%s],"sequence":"6"}`, addr, addr, msgStr), }, - { - "no fee, with tip", - args{"1234", 3, 6, 0, &txv1beta1.Fee{}, []sdk.Msg{testdata.NewTestMsg(addr)}, "memo", defaultTip}, - fmt.Sprintf(`{"account_number":"3","chain_id":"1234","fee":{"amount":[],"gas":"0"},"memo":"memo","msgs":[%s],"sequence":"6","tip":{"amount":[{"amount":"150","denom":"tiptoken"}],"tipper":"%s"}}`, msgStr, addr), - }, - { - "with fee and with tip", - args{"1234", 3, 6, 0, &txv1beta1.Fee{Amount: defaultFee.Amount, GasLimit: defaultFee.GasLimit, Payer: addr.String()}, []sdk.Msg{testdata.NewTestMsg(addr)}, "memo", defaultTip}, - fmt.Sprintf(`{"account_number":"3","chain_id":"1234","fee":{"amount":[{"amount":"150","denom":"atom"}],"gas":"100000","payer":"%s"},"memo":"memo","msgs":[%s],"sequence":"6","tip":{"amount":[{"amount":"150","denom":"tiptoken"}],"tipper":"%s"}}`, addr, msgStr, addr), - }, - { - "with empty tip (but not nil), tipper cannot be empty", - args{"1234", 3, 6, 0, defaultFee, []sdk.Msg{testdata.NewTestMsg(addr)}, "memo", &txv1beta1.Tip{Tipper: addr.String()}}, - fmt.Sprintf(`{"account_number":"3","chain_id":"1234","fee":{"amount":[{"amount":"150","denom":"atom"}],"gas":"100000"},"memo":"memo","msgs":[%s],"sequence":"6","tip":{"amount":[],"tipper":"%s"}}`, msgStr, addr), - }, } handler := aminojson.NewSignModeHandler(aminojson.SignModeHandlerOptions{ FileResolver: proto.HybridResolver, @@ -137,7 +117,6 @@ func TestStdSignBytes(t *testing.T) { }, AuthInfo: &txv1beta1.AuthInfo{ Fee: tc.args.fee, - Tip: tc.args.tip, }, }, ) diff --git a/x/auth/posthandler/tips.go b/x/auth/posthandler/tips.go deleted file mode 100644 index 33a5f69e9081..000000000000 --- a/x/auth/posthandler/tips.go +++ /dev/null @@ -1,58 +0,0 @@ -package posthandler - -import ( - "fmt" - - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/tx" - "github.com/cosmos/cosmos-sdk/x/auth/types" -) - -// ValidateBasicDecorator will call tx.ValidateBasic and return any non-nil error. -// If ValidateBasic passes, decorator calls next AnteHandler in chain. Note, -// ValidateBasicDecorator decorator will not get executed on ReCheckTx since it -// is not dependent on application state. -type tipDecorator struct { - bankKeeper types.BankKeeper -} - -// NewTipDecorator returns a new decorator for handling transactions with -// tips. -// -// IMPORTANT: This decorator is still in beta, please use it at your own risk. -func NewTipDecorator(bankKeeper types.BankKeeper) sdk.AnteDecorator { - return tipDecorator{ - bankKeeper: bankKeeper, - } -} - -func (d tipDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (sdk.Context, error) { - err := d.transferTip(ctx, tx) - if err != nil { - return ctx, err - } - - return next(ctx, tx, simulate) -} - -// transferTip transfers the tip from the tipper to the fee payer. -func (d tipDecorator) transferTip(ctx sdk.Context, sdkTx sdk.Tx) error { - tipTx, ok := sdkTx.(tx.TipTx) - - // No-op if the tx doesn't have tips. - if !ok || tipTx.GetTip() == nil { - return nil - } - - tipper, err := sdk.AccAddressFromBech32(tipTx.GetTip().Tipper) - if err != nil { - return err - } - - coins := tipTx.GetTip().Amount - if err := d.bankKeeper.IsSendEnabledCoins(ctx, coins...); err != nil { - return fmt.Errorf("cannot tip these coins: %w", err) - } - - return d.bankKeeper.SendCoins(ctx, tipper, tipTx.FeePayer(), coins) -} diff --git a/x/auth/signing/sig_verifiable_tx.go b/x/auth/signing/sig_verifiable_tx.go index 7aa05219f1cd..0b6da14aff50 100644 --- a/x/auth/signing/sig_verifiable_tx.go +++ b/x/auth/signing/sig_verifiable_tx.go @@ -3,7 +3,6 @@ package signing import ( cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/tx" "github.com/cosmos/cosmos-sdk/types/tx/signing" ) @@ -23,7 +22,6 @@ type Tx interface { types.TxWithMemo types.FeeTx - tx.TipTx types.TxWithTimeoutHeight types.HasValidateBasic } diff --git a/x/auth/tx/adapter.go b/x/auth/tx/adapter.go index 50081fdbde33..5ce5c8a91981 100644 --- a/x/auth/tx/adapter.go +++ b/x/auth/tx/adapter.go @@ -54,23 +54,6 @@ func (w *wrapper) GetSigningTxData() txsigning.TxData { } } - var txTip *txv1beta1.Tip - tip := authInfo.Tip - if tip != nil { - tipCoins := tip.GetAmount() - tipAmount := make([]*basev1beta1.Coin, len(tipCoins)) - for i, coin := range tipCoins { - tipAmount[i] = &basev1beta1.Coin{ - Denom: coin.Denom, - Amount: coin.Amount.String(), - } - } - txTip = &txv1beta1.Tip{ - Amount: tipAmount, - Tipper: tip.Tipper, - } - } - txSignerInfos := make([]*txv1beta1.SignerInfo, len(authInfo.SignerInfos)) for i, signerInfo := range authInfo.SignerInfos { modeInfo := &txv1beta1.ModeInfo{} @@ -94,7 +77,6 @@ func (w *wrapper) GetSigningTxData() txsigning.TxData { Payer: authInfo.Fee.Payer, Granter: authInfo.Fee.Granter, }, - Tip: txTip, } txBody := &txv1beta1.TxBody{ diff --git a/x/auth/tx/aux_test.go b/x/auth/tx/aux_test.go index 2a5e63a5053f..5e9bcdbbee64 100644 --- a/x/auth/tx/aux_test.go +++ b/x/auth/tx/aux_test.go @@ -6,15 +6,12 @@ import ( "github.com/stretchr/testify/require" - "cosmossdk.io/math" - clienttx "github.com/cosmos/cosmos-sdk/client/tx" codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/testutil/testdata" _ "github.com/cosmos/cosmos-sdk/testutil/testdata/testpb" sdk "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" - 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" ) @@ -25,9 +22,9 @@ var ( aux2Priv, aux2Pk, aux2Addr = testdata.KeyTestPubAddr() feepayerPriv, feepayerPk, feepayerAddr = testdata.KeyTestPubAddr() - msg = testdata.NewTestMsg(tipperAddr, aux2Addr) - memo = "test-memo" - tip = &txtypes.Tip{Tipper: tipperAddr.String(), Amount: sdk.NewCoins(sdk.NewCoin("tip-denom", math.NewIntFromUint64(123)))} + msg = testdata.NewTestMsg(tipperAddr, aux2Addr) + memo = "test-memo" + chainID = "test-chain" gas = testdata.NewTestGasLimit() fee = testdata.NewTestFeeAmount() @@ -47,8 +44,8 @@ func TestBuilderWithAux(t *testing.T) { testdata.RegisterInterfaces(interfaceRegistry) // Create an AuxTxBuilder for tipper (1st signer) - tipperBuilder, tipperSig := makeTipperTxBuilder(t) - tipperSignerData, err := tipperBuilder.GetAuxSignerData() + txBuilder, txSig := makeTxBuilder(t) + txSignerData, err := txBuilder.GetAuxSignerData() require.NoError(t, err) // Create an AuxTxBuilder for aux2 (2nd signer) @@ -63,7 +60,6 @@ func TestBuilderWithAux(t *testing.T) { require.NoError(t, err) err = aux2Builder.SetPubKey(aux2Pk) require.NoError(t, err) - aux2Builder.SetTip(tip) extOptAny, err := codectypes.NewAnyWithValue(extOpt) require.NoError(t, err) aux2Builder.SetExtensionOptions(extOptAny) @@ -92,30 +88,28 @@ func TestBuilderWithAux(t *testing.T) { malleate func() expErr bool }{ - {"address and msg signer mistacher", func() { tipperBuilder.SetAddress("foobar") }, true}, - {"memo mismatch", func() { tipperBuilder.SetMemo("mismatch") }, true}, - {"timeout height mismatch", func() { tipperBuilder.SetTimeoutHeight(98) }, true}, - {"extension options length mismatch", func() { tipperBuilder.SetExtensionOptions() }, true}, - {"extension options member mismatch", func() { tipperBuilder.SetExtensionOptions(&codectypes.Any{}) }, true}, - {"non-critical extension options length mismatch", func() { tipperBuilder.SetNonCriticalExtensionOptions() }, true}, - {"non-critical extension options member mismatch", func() { tipperBuilder.SetNonCriticalExtensionOptions(&codectypes.Any{}) }, true}, - {"tip amount mismatch", func() { tipperBuilder.SetTip(&txtypes.Tip{Tipper: tip.Tipper, Amount: sdk.NewCoins()}) }, true}, - {"tipper mismatch", func() { tipperBuilder.SetTip(&txtypes.Tip{Tipper: "mismatch", Amount: tip.Amount}) }, true}, + {"address and msg signer mistacher", func() { txBuilder.SetAddress("foobar") }, true}, + {"memo mismatch", func() { txBuilder.SetMemo("mismatch") }, true}, + {"timeout height mismatch", func() { txBuilder.SetTimeoutHeight(98) }, true}, + {"extension options length mismatch", func() { txBuilder.SetExtensionOptions() }, true}, + {"extension options member mismatch", func() { txBuilder.SetExtensionOptions(&codectypes.Any{}) }, true}, + {"non-critical extension options length mismatch", func() { txBuilder.SetNonCriticalExtensionOptions() }, true}, + {"non-critical extension options member mismatch", func() { txBuilder.SetNonCriticalExtensionOptions(&codectypes.Any{}) }, true}, {"happy case", func() {}, false}, } for _, tc := range testcases { tc := tc t.Run(tc.name, func(t *testing.T) { - tipperBuilder, tipperSig = makeTipperTxBuilder(t) + txBuilder, txSig = makeTxBuilder(t) tc.malleate() - _, err := tipperBuilder.GetSignBytes() + _, err := txBuilder.GetSignBytes() require.NoError(t, err) - tipperSignerData, err = tipperBuilder.GetAuxSignerData() + txSignerData, err = txBuilder.GetAuxSignerData() require.NoError(t, err) - err = w.AddAuxSignerData(tipperSignerData) + err = w.AddAuxSignerData(txSignerData) if tc.expErr { require.Error(t, err) } else { @@ -129,10 +123,10 @@ func TestBuilderWithAux(t *testing.T) { w.SetGasLimit(gas) sigs, err := w.(authsigning.SigVerifiableTx).GetSignaturesV2() require.NoError(t, err) - tipperSigV2 := sigs[0] + txSigV2 := sigs[0] aux2SigV2 := sigs[1] // Set all signer infos. - err = w.SetSignatures(tipperSigV2, aux2SigV2, signing.SignatureV2{ + err = w.SetSignatures(txSigV2, aux2SigV2, signing.SignatureV2{ PubKey: feepayerPk, Sequence: 15, }) @@ -154,7 +148,7 @@ func TestBuilderWithAux(t *testing.T) { feepayerSig, err := feepayerPriv.Sign(signBz) require.NoError(t, err) // Set all signatures. - err = w.SetSignatures(tipperSigV2, aux2SigV2, signing.SignatureV2{ + err = w.SetSignatures(txSigV2, aux2SigV2, signing.SignatureV2{ PubKey: feepayerPk, Data: &signing.SingleSignatureData{ SignMode: signing.SignMode_SIGN_MODE_DIRECT, @@ -172,7 +166,6 @@ func TestBuilderWithAux(t *testing.T) { require.Equal(t, tx.(sdk.FeeTx).FeePayer(), []byte(feepayerAddr)) require.Equal(t, tx.(sdk.FeeTx).GetFee(), fee) require.Equal(t, tx.(sdk.FeeTx).GetGas(), gas) - require.Equal(t, tip, tx.(txtypes.TipTx).GetTip()) require.Equal(t, msg, tx.GetMsgs()[0]) require.Equal(t, memo, tx.(sdk.TxWithMemo).GetMemo()) require.Equal(t, uint64(3), tx.(sdk.TxWithTimeoutHeight).GetTimeoutHeight()) @@ -181,7 +174,7 @@ func TestBuilderWithAux(t *testing.T) { require.Len(t, sigs, 3) require.Equal(t, signing.SignatureV2{ PubKey: tipperPk, - Data: &signing.SingleSignatureData{SignMode: signing.SignMode_SIGN_MODE_DIRECT_AUX, Signature: tipperSig}, + Data: &signing.SingleSignatureData{SignMode: signing.SignMode_SIGN_MODE_DIRECT_AUX, Signature: txSig}, Sequence: 2, }, sigs[0]) require.Equal(t, signing.SignatureV2{ @@ -196,31 +189,30 @@ func TestBuilderWithAux(t *testing.T) { }, sigs[2]) } -func makeTipperTxBuilder(t *testing.T) (clienttx.AuxTxBuilder, []byte) { +func makeTxBuilder(t *testing.T) (clienttx.AuxTxBuilder, []byte) { t.Helper() - tipperBuilder := clienttx.NewAuxTxBuilder() - tipperBuilder.SetAddress(tipperAddr.String()) - tipperBuilder.SetAccountNumber(1) - tipperBuilder.SetSequence(2) - tipperBuilder.SetTimeoutHeight(3) - tipperBuilder.SetMemo(memo) - tipperBuilder.SetChainID(chainID) - err := tipperBuilder.SetMsgs(msg) - require.NoError(t, err) - err = tipperBuilder.SetPubKey(tipperPk) - require.NoError(t, err) - tipperBuilder.SetTip(tip) + txBuilder := clienttx.NewAuxTxBuilder() + txBuilder.SetAddress(tipperAddr.String()) + txBuilder.SetAccountNumber(1) + txBuilder.SetSequence(2) + txBuilder.SetTimeoutHeight(3) + txBuilder.SetMemo(memo) + txBuilder.SetChainID(chainID) + err := txBuilder.SetMsgs(msg) + require.NoError(t, err) + err = txBuilder.SetPubKey(tipperPk) + require.NoError(t, err) extOptAny, err := codectypes.NewAnyWithValue(extOpt) require.NoError(t, err) - tipperBuilder.SetExtensionOptions(extOptAny) - tipperBuilder.SetNonCriticalExtensionOptions(extOptAny) - err = tipperBuilder.SetSignMode(signing.SignMode_SIGN_MODE_DIRECT_AUX) + txBuilder.SetExtensionOptions(extOptAny) + txBuilder.SetNonCriticalExtensionOptions(extOptAny) + err = txBuilder.SetSignMode(signing.SignMode_SIGN_MODE_DIRECT_AUX) require.NoError(t, err) - signBz, err := tipperBuilder.GetSignBytes() + signBz, err := txBuilder.GetSignBytes() require.NoError(t, err) tipperSig, err := tipperPriv.Sign(signBz) require.NoError(t, err) - tipperBuilder.SetSignature(tipperSig) + txBuilder.SetSignature(tipperSig) - return tipperBuilder, tipperSig + return txBuilder, tipperSig } diff --git a/x/auth/tx/builder.go b/x/auth/tx/builder.go index 7f3a398e0299..4d13c11e876f 100644 --- a/x/auth/tx/builder.go +++ b/x/auth/tx/builder.go @@ -45,10 +45,8 @@ type wrapper struct { var ( _ authsigning.Tx = &wrapper{} _ client.TxBuilder = &wrapper{} - _ tx.TipTx = &wrapper{} _ ante.HasExtensionOptionsTx = &wrapper{} _ ExtensionOptionsTxBuilder = &wrapper{} - _ tx.TipTx = &wrapper{} ) // ExtensionOptionsTxBuilder defines a TxBuilder that can also set extensions. @@ -214,10 +212,6 @@ func (w *wrapper) FeeGranter() []byte { return w.tx.FeeGranter(w.cdc) } -func (w *wrapper) GetTip() *tx.Tip { - return w.tx.AuthInfo.Tip -} - func (w *wrapper) GetMemo() string { return w.tx.Body.Memo } @@ -318,13 +312,6 @@ func (w *wrapper) SetFeeAmount(coins sdk.Coins) { w.authInfoBz = nil } -func (w *wrapper) SetTip(tip *tx.Tip) { - w.tx.AuthInfo.Tip = tip - - // set authInfoBz to nil because the cached authInfoBz no longer matches tx.AuthInfo - w.authInfoBz = nil -} - func (w *wrapper) SetFeePayer(feePayer sdk.AccAddress) { if w.tx.AuthInfo.Fee == nil { w.tx.AuthInfo.Fee = &tx.Fee{} @@ -499,14 +486,6 @@ func (w *wrapper) AddAuxSignerData(data tx.AuxSignerData) error { } } } - if w.tx.AuthInfo.Tip != nil && data.SignDoc.Tip != nil { - if !w.tx.AuthInfo.Tip.Amount.Equal(data.SignDoc.Tip.Amount) { - return sdkerrors.ErrInvalidRequest.Wrapf("TxBuilder has tip %+v, got %+v in AuxSignerData", w.tx.AuthInfo.Tip.Amount, data.SignDoc.Tip.Amount) - } - if w.tx.AuthInfo.Tip.Tipper != data.SignDoc.Tip.Tipper { - return sdkerrors.ErrInvalidRequest.Wrapf("TxBuilder has tipper %s, got %s in AuxSignerData", w.tx.AuthInfo.Tip.Tipper, data.SignDoc.Tip.Tipper) - } - } w.SetMemo(body.Memo) w.SetTimeoutHeight(body.TimeoutHeight) @@ -520,7 +499,6 @@ func (w *wrapper) AddAuxSignerData(data tx.AuxSignerData) error { if err != nil { return err } - w.SetTip(data.GetSignDoc().GetTip()) // Get the aux signer's index in GetSigners. signerIndex := -1 diff --git a/x/auth/tx/legacy_amino_json.go b/x/auth/tx/legacy_amino_json.go index 3d7f1efcae0c..0c76158e5d26 100644 --- a/x/auth/tx/legacy_amino_json.go +++ b/x/auth/tx/legacy_amino_json.go @@ -63,20 +63,6 @@ func (s signModeLegacyAminoJSONHandler) GetSignBytes(mode signingtypes.SignMode, return nil, errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "got empty address in %s handler", signingtypes.SignMode_SIGN_MODE_LEGACY_AMINO_JSON) } - tip := protoTx.GetTip() - isTipper := tip != nil && tip.Tipper == addr - - // We set a convention that if the tipper signs with LEGACY_AMINO_JSON, then - // they sign over empty fees and 0 gas. - if isTipper { - return legacytx.StdSignBytes( - data.ChainID, data.AccountNumber, data.Sequence, protoTx.GetTimeoutHeight(), - // The tipper signs over 0 fee and 0 gas, no feepayer, no feegranter by convention. - legacytx.StdFee{}, - tx.GetMsgs(), protoTx.GetMemo(), tip, - ), nil - } - return legacytx.StdSignBytes( data.ChainID, data.AccountNumber, data.Sequence, protoTx.GetTimeoutHeight(), legacytx.StdFee{ @@ -85,6 +71,6 @@ func (s signModeLegacyAminoJSONHandler) GetSignBytes(mode signingtypes.SignMode, Payer: protoTx.tx.AuthInfo.Fee.Payer, Granter: protoTx.tx.AuthInfo.Fee.Granter, }, - tx.GetMsgs(), protoTx.GetMemo(), tip, + tx.GetMsgs(), protoTx.GetMemo(), ), nil } diff --git a/x/auth/tx/legacy_amino_json_test.go b/x/auth/tx/legacy_amino_json_test.go index f8f4c72ad6ac..b90d1d71ae03 100644 --- a/x/auth/tx/legacy_amino_json_test.go +++ b/x/auth/tx/legacy_amino_json_test.go @@ -14,7 +14,6 @@ import ( cdctypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/tx" signingtypes "github.com/cosmos/cosmos-sdk/types/tx/signing" "github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx" "github.com/cosmos/cosmos-sdk/x/auth/signing" @@ -47,7 +46,6 @@ func TestLegacyAminoJSONHandler_GetSignBytes(t *testing.T) { chainID = "test-chain" accNum uint64 = 7 seqNum uint64 = 7 - tip = &tx.Tip{Tipper: addr1.String(), Amount: coins} ) testcases := []struct { @@ -59,22 +57,18 @@ func TestLegacyAminoJSONHandler_GetSignBytes(t *testing.T) { { "signer which is also fee payer (no tips)", addr1.String(), func(w *wrapper) {}, - legacytx.StdSignBytes(chainID, accNum, seqNum, timeout, legacytx.StdFee{Amount: coins, Gas: gas}, []sdk.Msg{msg}, memo, nil), - }, - { - "signer which is also fee payer (with tips)", addr2.String(), - func(w *wrapper) { w.SetTip(tip) }, - legacytx.StdSignBytes(chainID, accNum, seqNum, timeout, legacytx.StdFee{Amount: coins, Gas: gas}, []sdk.Msg{msg}, memo, tip), + legacytx.StdSignBytes(chainID, accNum, seqNum, timeout, legacytx.StdFee{Amount: coins, Gas: gas}, []sdk.Msg{msg}, memo), }, + { "explicit fee payer", addr1.String(), func(w *wrapper) { w.SetFeePayer(addr2) }, - legacytx.StdSignBytes(chainID, accNum, seqNum, timeout, legacytx.StdFee{Amount: coins, Gas: gas, Payer: addr2.String()}, []sdk.Msg{msg}, memo, nil), + legacytx.StdSignBytes(chainID, accNum, seqNum, timeout, legacytx.StdFee{Amount: coins, Gas: gas, Payer: addr2.String()}, []sdk.Msg{msg}, memo), }, { "explicit fee granter", addr1.String(), func(w *wrapper) { w.SetFeeGranter(addr2) }, - legacytx.StdSignBytes(chainID, accNum, seqNum, timeout, legacytx.StdFee{Amount: coins, Gas: gas, Granter: addr2.String()}, []sdk.Msg{msg}, memo, nil), + legacytx.StdSignBytes(chainID, accNum, seqNum, timeout, legacytx.StdFee{Amount: coins, Gas: gas, Granter: addr2.String()}, []sdk.Msg{msg}, memo), }, { "explicit fee payer and fee granter", addr1.String(), @@ -82,12 +76,7 @@ func TestLegacyAminoJSONHandler_GetSignBytes(t *testing.T) { w.SetFeePayer(addr2) w.SetFeeGranter(addr2) }, - legacytx.StdSignBytes(chainID, accNum, seqNum, timeout, legacytx.StdFee{Amount: coins, Gas: gas, Payer: addr2.String(), Granter: addr2.String()}, []sdk.Msg{msg}, memo, nil), - }, - { - "signer which is also tipper", addr1.String(), - func(w *wrapper) { w.SetTip(tip) }, - legacytx.StdSignBytes(chainID, accNum, seqNum, timeout, legacytx.StdFee{}, []sdk.Msg{msg}, memo, tip), + legacytx.StdSignBytes(chainID, accNum, seqNum, timeout, legacytx.StdFee{Amount: coins, Gas: gas, Payer: addr2.String(), Granter: addr2.String()}, []sdk.Msg{msg}, memo), }, } @@ -152,7 +141,6 @@ func TestLegacyAminoJSONHandler_AllGetSignBytesComparison(t *testing.T) { chainID = "test-chain" accNum uint64 seqNum uint64 = 7 - tip = &tx.Tip{Tipper: addr1.String(), Amount: coins} ) modeHandler := aminojson.NewSignModeHandler(aminojson.SignModeHandlerOptions{}) @@ -170,22 +158,18 @@ func TestLegacyAminoJSONHandler_AllGetSignBytesComparison(t *testing.T) { { "signer which is also fee payer (no tips)", addr1.String(), func(w *wrapper) {}, - legacytx.StdSignBytes(chainID, accNum, seqNum, timeout, legacytx.StdFee{Amount: coins, Gas: gas}, []sdk.Msg{msg}, memo, nil), - }, - { - "signer which is also fee payer (with tips)", addr2.String(), - func(w *wrapper) { w.SetTip(tip) }, - legacytx.StdSignBytes(chainID, accNum, seqNum, timeout, legacytx.StdFee{Amount: coins, Gas: gas}, []sdk.Msg{msg}, memo, tip), + legacytx.StdSignBytes(chainID, accNum, seqNum, timeout, legacytx.StdFee{Amount: coins, Gas: gas}, []sdk.Msg{msg}, memo), }, + { "explicit fee payer", addr1.String(), func(w *wrapper) { w.SetFeePayer(addr2) }, - legacytx.StdSignBytes(chainID, accNum, seqNum, timeout, legacytx.StdFee{Amount: coins, Gas: gas, Payer: addr2.String()}, []sdk.Msg{msg}, memo, nil), + legacytx.StdSignBytes(chainID, accNum, seqNum, timeout, legacytx.StdFee{Amount: coins, Gas: gas, Payer: addr2.String()}, []sdk.Msg{msg}, memo), }, { "explicit fee granter", addr1.String(), func(w *wrapper) { w.SetFeeGranter(addr2) }, - legacytx.StdSignBytes(chainID, accNum, seqNum, timeout, legacytx.StdFee{Amount: coins, Gas: gas, Granter: addr2.String()}, []sdk.Msg{msg}, memo, nil), + legacytx.StdSignBytes(chainID, accNum, seqNum, timeout, legacytx.StdFee{Amount: coins, Gas: gas, Granter: addr2.String()}, []sdk.Msg{msg}, memo), }, { "explicit fee payer and fee granter", addr1.String(), @@ -193,12 +177,7 @@ func TestLegacyAminoJSONHandler_AllGetSignBytesComparison(t *testing.T) { w.SetFeePayer(addr2) w.SetFeeGranter(addr2) }, - legacytx.StdSignBytes(chainID, accNum, seqNum, timeout, legacytx.StdFee{Amount: coins, Gas: gas, Payer: addr2.String(), Granter: addr2.String()}, []sdk.Msg{msg}, memo, nil), - }, - { - "signer which is also tipper", addr1.String(), - func(w *wrapper) { w.SetTip(tip) }, - legacytx.StdSignBytes(chainID, accNum, seqNum, timeout, legacytx.StdFee{}, []sdk.Msg{msg}, memo, tip), + legacytx.StdSignBytes(chainID, accNum, seqNum, timeout, legacytx.StdFee{Amount: coins, Gas: gas, Payer: addr2.String(), Granter: addr2.String()}, []sdk.Msg{msg}, memo), }, } diff --git a/x/authz/msgs_test.go b/x/authz/msgs_test.go index d460f191f905..96984d16e3eb 100644 --- a/x/authz/msgs_test.go +++ b/x/authz/msgs_test.go @@ -113,7 +113,7 @@ func TestAminoJSON(t *testing.T) { for i, tt := range tests { t.Run(fmt.Sprintf("case %d", i), func(t *testing.T) { tx.Msgs = []sdk.Msg{tt.msg} - legacyJSON := string(legacytx.StdSignBytes("foo", 1, 1, 1, legacytx.StdFee{}, []sdk.Msg{tt.msg}, "memo", nil)) + legacyJSON := string(legacytx.StdSignBytes("foo", 1, 1, 1, legacytx.StdFee{}, []sdk.Msg{tt.msg}, "memo")) require.Equal(t, tt.exp, legacyJSON) legacyAny, err := cdctypes.NewAnyWithValue(tt.msg) diff --git a/x/feegrant/msgs_test.go b/x/feegrant/msgs_test.go index cee135b5ddb2..a0c19d0ff1c3 100644 --- a/x/feegrant/msgs_test.go +++ b/x/feegrant/msgs_test.go @@ -34,13 +34,13 @@ func TestAminoJSON(t *testing.T) { tx.Msgs = []sdk.Msg{msg} require.Equal(t, `{"account_number":"1","chain_id":"foo","fee":{"amount":[],"gas":"0"},"memo":"memo","msgs":[{"type":"cosmos-sdk/MsgGrantAllowance","value":{"allowance":{"type":"cosmos-sdk/BasicAllowance","value":{"spend_limit":[{"amount":"100","denom":"foo"}]}},"grantee":"cosmos1def","granter":"cosmos1abc"}}],"sequence":"1","timeout_height":"1"}`, - string(legacytx.StdSignBytes("foo", 1, 1, 1, legacytx.StdFee{}, []sdk.Msg{msg}, "memo", nil)), + string(legacytx.StdSignBytes("foo", 1, 1, 1, legacytx.StdFee{}, []sdk.Msg{msg}, "memo")), ) msg = &feegrant.MsgRevokeAllowance{Granter: "cosmos1abc", Grantee: "cosmos1def"} tx.Msgs = []sdk.Msg{msg} require.Equal(t, `{"account_number":"1","chain_id":"foo","fee":{"amount":[],"gas":"0"},"memo":"memo","msgs":[{"type":"cosmos-sdk/MsgRevokeAllowance","value":{"grantee":"cosmos1def","granter":"cosmos1abc"}}],"sequence":"1","timeout_height":"1"}`, - string(legacytx.StdSignBytes("foo", 1, 1, 1, legacytx.StdFee{}, []sdk.Msg{msg}, "memo", nil)), + string(legacytx.StdSignBytes("foo", 1, 1, 1, legacytx.StdFee{}, []sdk.Msg{msg}, "memo")), ) } diff --git a/x/tx/decode/decode_test.go b/x/tx/decode/decode_test.go index 0fe63a97c2f5..9fc3f16966fa 100644 --- a/x/tx/decode/decode_test.go +++ b/x/tx/decode/decode_test.go @@ -86,10 +86,6 @@ func TestDecode(t *testing.T) { Payer: "payer", Granter: "", }, - Tip: &txv1beta1.Tip{ - Amount: []*basev1beta1.Coin{{Amount: "100", Denom: "denom"}}, - Tipper: "tipper", - }, }, Signatures: nil, } diff --git a/x/tx/decode/fuzz_test.go b/x/tx/decode/fuzz_test.go index d7c31afcde74..38262a20070f 100644 --- a/x/tx/decode/fuzz_test.go +++ b/x/tx/decode/fuzz_test.go @@ -56,10 +56,6 @@ func generateAndAddSeedsFromTx(f *testing.F) { Payer: "payer", Granter: "", }, - Tip: &txv1beta1.Tip{ - Amount: []*basev1beta1.Coin{{Amount: "100", Denom: "denom"}}, - Tipper: "tipper", - }, }, Signatures: nil, } diff --git a/x/tx/signing/aminojson/aminojson.go b/x/tx/signing/aminojson/aminojson.go index b0da26dfa4c6..a9cbbadde146 100644 --- a/x/tx/signing/aminojson/aminojson.go +++ b/x/tx/signing/aminojson/aminojson.go @@ -72,31 +72,19 @@ func (h SignModeHandler) GetSignBytes(_ context.Context, signerData signing.Sign return nil, fmt.Errorf("got empty address in %s handler: invalid request", h.Mode()) } - tip := txData.AuthInfo.Tip - if tip != nil && tip.Tipper == "" { - return nil, fmt.Errorf("tipper cannot be empty") - } - isTipper := tip != nil && tip.Tipper == signerData.Address - // We set a convention that if the tipper signs with LEGACY_AMINO_JSON, then // they sign over empty fees and 0 gas. var fee *aminojsonpb.AminoSignFee - if isTipper { - fee = &aminojsonpb.AminoSignFee{ - Amount: nil, - Gas: 0, - } - } else { - f := txData.AuthInfo.Fee - if f == nil { - return nil, fmt.Errorf("fee cannot be nil when tipper is not signer") - } - fee = &aminojsonpb.AminoSignFee{ - Amount: f.Amount, - Gas: f.GasLimit, - Payer: f.Payer, - Granter: f.Granter, - } + + f := txData.AuthInfo.Fee + if f == nil { + return nil, fmt.Errorf("fee cannot be nil when tipper is not signer") + } + fee = &aminojsonpb.AminoSignFee{ + Amount: f.Amount, + Gas: f.GasLimit, + Payer: f.Payer, + Granter: f.Granter, } signDoc := &aminojsonpb.AminoSignDoc{ @@ -107,7 +95,6 @@ func (h SignModeHandler) GetSignBytes(_ context.Context, signerData signing.Sign Memo: body.Memo, Msgs: txData.Body.Messages, Fee: fee, - Tip: tip, } return h.encoder.Marshal(signDoc) diff --git a/x/tx/signing/aminojson/aminojson_test.go b/x/tx/signing/aminojson/aminojson_test.go index f354bda01360..0d137906561d 100644 --- a/x/tx/signing/aminojson/aminojson_test.go +++ b/x/tx/signing/aminojson/aminojson_test.go @@ -21,7 +21,6 @@ func TestAminoJsonSignMode(t *testing.T) { handlerOptions := testutil.HandlerArgumentOptions{ ChainID: "test-chain", Memo: "sometestmemo", - Tip: &txv1beta1.Tip{Tipper: "tipper", Amount: []*basev1beta1.Coin{{Denom: "Tip-token", Amount: "10"}}}, Msg: &bankv1beta1.MsgSend{ FromAddress: "foo", ToAddress: "bar", @@ -52,37 +51,14 @@ func TestAminoJsonSignMode(t *testing.T) { }, error: "got empty address in SIGN_MODE_LEGACY_AMINO_JSON handler: invalid request", }, - { - name: "nil tip", - malleate: func(opts testutil.HandlerArgumentOptions) testutil.HandlerArgumentOptions { - opts.Tip = nil - return opts - }, - }, - { - name: "empty tipper", - malleate: func(opts testutil.HandlerArgumentOptions) testutil.HandlerArgumentOptions { - opts.Tip.Tipper = "" - return opts - }, - error: "tipper cannot be empty", - }, { name: "nil fee", malleate: func(opts testutil.HandlerArgumentOptions) testutil.HandlerArgumentOptions { - opts.Tip.Tipper = "tipper" opts.Fee = nil return opts }, error: "fee cannot be nil", }, - { - name: "tipper is signer", - malleate: func(opts testutil.HandlerArgumentOptions) testutil.HandlerArgumentOptions { - opts.Tip.Tipper = opts.SignerAddress - return opts - }, - }, } for _, tc := range testCases { diff --git a/x/tx/signing/aminojson/fuzz_test.go b/x/tx/signing/aminojson/fuzz_test.go index 688b1cec2d48..e5cbe7ccf3f1 100644 --- a/x/tx/signing/aminojson/fuzz_test.go +++ b/x/tx/signing/aminojson/fuzz_test.go @@ -5,7 +5,7 @@ import ( "encoding/json" "testing" - "github.com/google/gofuzz" + fuzz "github.com/google/gofuzz" bankv1beta1 "cosmossdk.io/api/cosmos/bank/v1beta1" basev1beta1 "cosmossdk.io/api/cosmos/base/v1beta1" @@ -25,10 +25,7 @@ func FuzzSignModeGetSignBytes(f *testing.F) { seed := &testutil.HandlerArgumentOptions{ ChainID: "test-chain", Memo: "sometestmemo", - Tip: &txv1beta1.Tip{ - Tipper: "tipper", - Amount: []*basev1beta1.Coin{{Denom: "Tip-token", Amount: "10"}}, - }, + Msg: &bankv1beta1.MsgSend{ FromAddress: "foo", ToAddress: "bar", @@ -53,7 +50,6 @@ func FuzzSignModeGetSignBytes(f *testing.F) { // hence why we are mutating fields individually. gf.Fuzz(&seed.ChainID) gf.Fuzz(&seed.Memo) - gf.Fuzz(seed.Tip) gf.Fuzz(&seed.AccNum) gf.Fuzz(&seed.AccSeq) gf.Fuzz(seed.Fee) diff --git a/x/tx/signing/aminojson/internal/aminojsonpb/aminojson.proto b/x/tx/signing/aminojson/internal/aminojsonpb/aminojson.proto index d28008c87dcf..8ab6373b864f 100644 --- a/x/tx/signing/aminojson/internal/aminojsonpb/aminojson.proto +++ b/x/tx/signing/aminojson/internal/aminojsonpb/aminojson.proto @@ -1,10 +1,8 @@ syntax = "proto3"; -import "cosmos_proto/cosmos.proto"; import "amino/amino.proto"; import "cosmos/base/v1beta1/coin.proto"; import "google/protobuf/any.proto"; -import "cosmos/tx/v1beta1/tx.proto"; // AminoSignFee is the legacy amino json sign mode compatible version of txv1beta1.Fee, and differs from that message // by the name of the Gas field (GasLimit in txv1beta.Fee). @@ -27,5 +25,4 @@ message AminoSignDoc { string memo = 5 [(amino.dont_omitempty) = true]; AminoSignFee fee = 6 [(amino.dont_omitempty) = true]; repeated google.protobuf.Any msgs = 7 [(amino.dont_omitempty) = true]; - cosmos.tx.v1beta1.Tip tip = 8; -} \ No newline at end of file +} diff --git a/x/tx/signing/aminojson/internal/aminojsonpb/aminojson.pulsar.go b/x/tx/signing/aminojson/internal/aminojsonpb/aminojson.pulsar.go index d1f7f2540d35..e8ad14368fd9 100644 --- a/x/tx/signing/aminojson/internal/aminojsonpb/aminojson.pulsar.go +++ b/x/tx/signing/aminojson/internal/aminojsonpb/aminojson.pulsar.go @@ -4,9 +4,7 @@ package aminojsonpb import ( _ "cosmossdk.io/api/amino" v1beta1 "cosmossdk.io/api/cosmos/base/v1beta1" - v1beta11 "cosmossdk.io/api/cosmos/tx/v1beta1" fmt "fmt" - _ "github.com/cosmos/cosmos-proto" runtime "github.com/cosmos/cosmos-proto/runtime" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" @@ -747,7 +745,6 @@ var ( fd_AminoSignDoc_memo protoreflect.FieldDescriptor fd_AminoSignDoc_fee protoreflect.FieldDescriptor fd_AminoSignDoc_msgs protoreflect.FieldDescriptor - fd_AminoSignDoc_tip protoreflect.FieldDescriptor ) func init() { @@ -760,7 +757,6 @@ func init() { fd_AminoSignDoc_memo = md_AminoSignDoc.Fields().ByName("memo") fd_AminoSignDoc_fee = md_AminoSignDoc.Fields().ByName("fee") fd_AminoSignDoc_msgs = md_AminoSignDoc.Fields().ByName("msgs") - fd_AminoSignDoc_tip = md_AminoSignDoc.Fields().ByName("tip") } var _ protoreflect.Message = (*fastReflection_AminoSignDoc)(nil) @@ -870,12 +866,6 @@ func (x *fastReflection_AminoSignDoc) Range(f func(protoreflect.FieldDescriptor, return } } - if x.Tip != nil { - value := protoreflect.ValueOfMessage(x.Tip.ProtoReflect()) - if !f(fd_AminoSignDoc_tip, value) { - return - } - } } // Has reports whether a field is populated. @@ -905,8 +895,6 @@ func (x *fastReflection_AminoSignDoc) Has(fd protoreflect.FieldDescriptor) bool return x.Fee != nil case "AminoSignDoc.msgs": return len(x.Msgs) != 0 - case "AminoSignDoc.tip": - return x.Tip != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: AminoSignDoc")) @@ -937,8 +925,6 @@ func (x *fastReflection_AminoSignDoc) Clear(fd protoreflect.FieldDescriptor) { x.Fee = nil case "AminoSignDoc.msgs": x.Msgs = nil - case "AminoSignDoc.tip": - x.Tip = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: AminoSignDoc")) @@ -979,9 +965,6 @@ func (x *fastReflection_AminoSignDoc) Get(descriptor protoreflect.FieldDescripto } listValue := &_AminoSignDoc_7_list{list: &x.Msgs} return protoreflect.ValueOfList(listValue) - case "AminoSignDoc.tip": - value := x.Tip - return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: AminoSignDoc")) @@ -1018,8 +1001,6 @@ func (x *fastReflection_AminoSignDoc) Set(fd protoreflect.FieldDescriptor, value lv := value.List() clv := lv.(*_AminoSignDoc_7_list) x.Msgs = *clv.list - case "AminoSignDoc.tip": - x.Tip = value.Message().Interface().(*v1beta11.Tip) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: AminoSignDoc")) @@ -1051,11 +1032,6 @@ func (x *fastReflection_AminoSignDoc) Mutable(fd protoreflect.FieldDescriptor) p } value := &_AminoSignDoc_7_list{list: &x.Msgs} return protoreflect.ValueOfList(value) - case "AminoSignDoc.tip": - if x.Tip == nil { - x.Tip = new(v1beta11.Tip) - } - return protoreflect.ValueOfMessage(x.Tip.ProtoReflect()) case "AminoSignDoc.account_number": panic(fmt.Errorf("field account_number of message AminoSignDoc is not mutable")) case "AminoSignDoc.sequence": @@ -1095,9 +1071,6 @@ func (x *fastReflection_AminoSignDoc) NewField(fd protoreflect.FieldDescriptor) case "AminoSignDoc.msgs": list := []*anypb.Any{} return protoreflect.ValueOfList(&_AminoSignDoc_7_list{list: &list}) - case "AminoSignDoc.tip": - m := new(v1beta11.Tip) - return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: AminoSignDoc")) @@ -1194,10 +1167,6 @@ func (x *fastReflection_AminoSignDoc) ProtoMethods() *protoiface.Methods { n += 1 + l + runtime.Sov(uint64(l)) } } - if x.Tip != nil { - l = options.Size(x.Tip) - n += 1 + l + runtime.Sov(uint64(l)) - } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -1227,20 +1196,6 @@ func (x *fastReflection_AminoSignDoc) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if x.Tip != nil { - encoded, err := options.Marshal(x.Tip) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x42 - } if len(x.Msgs) > 0 { for iNdEx := len(x.Msgs) - 1; iNdEx >= 0; iNdEx-- { encoded, err := options.Marshal(x.Msgs[iNdEx]) @@ -1540,42 +1495,6 @@ func (x *fastReflection_AminoSignDoc) ProtoMethods() *protoiface.Methods { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex - case 8: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Tip", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Tip == nil { - x.Tip = &v1beta11.Tip{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Tip); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -1701,7 +1620,6 @@ type AminoSignDoc struct { Memo string `protobuf:"bytes,5,opt,name=memo,proto3" json:"memo,omitempty"` Fee *AminoSignFee `protobuf:"bytes,6,opt,name=fee,proto3" json:"fee,omitempty"` Msgs []*anypb.Any `protobuf:"bytes,7,rep,name=msgs,proto3" json:"msgs,omitempty"` - Tip *v1beta11.Tip `protobuf:"bytes,8,opt,name=tip,proto3" json:"tip,omitempty"` } func (x *AminoSignDoc) Reset() { @@ -1773,63 +1691,50 @@ func (x *AminoSignDoc) GetMsgs() []*anypb.Any { return nil } -func (x *AminoSignDoc) GetTip() *v1beta11.Tip { - if x != nil { - return x.Tip - } - return nil -} - var File_aminojsonpb_aminojson_proto protoreflect.FileDescriptor var file_aminojsonpb_aminojson_proto_rawDesc = []byte{ 0x0a, 0x1b, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x6a, 0x73, 0x6f, 0x6e, 0x70, 0x62, 0x2f, 0x61, 0x6d, - 0x69, 0x6e, 0x6f, 0x6a, 0x73, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, - 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x74, - 0x78, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x78, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x22, 0xa2, 0x01, 0x0a, 0x0c, 0x41, 0x6d, 0x69, 0x6e, 0x6f, 0x53, 0x69, 0x67, 0x6e, - 0x46, 0x65, 0x65, 0x12, 0x49, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, - 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x16, - 0x9a, 0xe7, 0xb0, 0x2a, 0x0c, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x5f, 0x63, 0x6f, 0x69, 0x6e, - 0x73, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x17, - 0x0a, 0x03, 0x67, 0x61, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x05, 0xa8, 0xe7, 0xb0, - 0x2a, 0x01, 0x52, 0x03, 0x67, 0x61, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x79, 0x65, 0x72, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x61, 0x79, 0x65, 0x72, 0x12, 0x18, 0x0a, - 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x22, 0xc6, 0x02, 0x0a, 0x0c, 0x41, 0x6d, 0x69, 0x6e, - 0x6f, 0x53, 0x69, 0x67, 0x6e, 0x44, 0x6f, 0x63, 0x12, 0x2c, 0x0a, 0x0e, 0x61, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, - 0x42, 0x05, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0d, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, - 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x05, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, - 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x74, 0x69, 0x6d, - 0x65, 0x6f, 0x75, 0x74, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x0d, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, - 0x12, 0x20, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x05, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, - 0x49, 0x64, 0x12, 0x19, 0x0a, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x05, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x12, 0x26, 0x0a, - 0x03, 0x66, 0x65, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x41, 0x6d, 0x69, - 0x6e, 0x6f, 0x53, 0x69, 0x67, 0x6e, 0x46, 0x65, 0x65, 0x42, 0x05, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, - 0x52, 0x03, 0x66, 0x65, 0x65, 0x12, 0x2f, 0x0a, 0x04, 0x6d, 0x73, 0x67, 0x73, 0x18, 0x07, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x42, 0x05, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, - 0x52, 0x04, 0x6d, 0x73, 0x67, 0x73, 0x12, 0x28, 0x0a, 0x03, 0x74, 0x69, 0x70, 0x18, 0x08, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x69, 0x70, 0x52, 0x03, 0x74, 0x69, 0x70, - 0x42, 0x4b, 0x42, 0x0e, 0x41, 0x6d, 0x69, 0x6e, 0x6f, 0x6a, 0x73, 0x6f, 0x6e, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x37, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, - 0x69, 0x6f, 0x2f, 0x78, 0x2f, 0x74, 0x78, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x6a, 0x73, 0x6f, - 0x6e, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x70, - 0x62, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x6a, 0x73, 0x6f, 0x6e, 0x70, 0x62, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x69, 0x6e, 0x6f, 0x6a, 0x73, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x11, 0x61, + 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa2, 0x01, 0x0a, 0x0c, + 0x41, 0x6d, 0x69, 0x6e, 0x6f, 0x53, 0x69, 0x67, 0x6e, 0x46, 0x65, 0x65, 0x12, 0x49, 0x0a, 0x06, + 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x16, 0x9a, 0xe7, 0xb0, 0x2a, 0x0c, 0x6c, 0x65, + 0x67, 0x61, 0x63, 0x79, 0x5f, 0x63, 0x6f, 0x69, 0x6e, 0x73, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, + 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x17, 0x0a, 0x03, 0x67, 0x61, 0x73, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x04, 0x42, 0x05, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x03, 0x67, 0x61, 0x73, + 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x79, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x70, 0x61, 0x79, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, + 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, + 0x22, 0x9c, 0x02, 0x0a, 0x0c, 0x41, 0x6d, 0x69, 0x6e, 0x6f, 0x53, 0x69, 0x67, 0x6e, 0x44, 0x6f, + 0x63, 0x12, 0x2c, 0x0a, 0x0e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x05, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, + 0x52, 0x0d, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, + 0x21, 0x0a, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x04, 0x42, 0x05, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, + 0x63, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x5f, 0x68, 0x65, + 0x69, 0x67, 0x68, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x74, 0x69, 0x6d, 0x65, + 0x6f, 0x75, 0x74, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x20, 0x0a, 0x08, 0x63, 0x68, 0x61, + 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x05, 0xa8, 0xe7, 0xb0, + 0x2a, 0x01, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x04, 0x6d, + 0x65, 0x6d, 0x6f, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x05, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, + 0x52, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x12, 0x26, 0x0a, 0x03, 0x66, 0x65, 0x65, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x41, 0x6d, 0x69, 0x6e, 0x6f, 0x53, 0x69, 0x67, 0x6e, 0x46, + 0x65, 0x65, 0x42, 0x05, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x03, 0x66, 0x65, 0x65, 0x12, 0x2f, + 0x0a, 0x04, 0x6d, 0x73, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, + 0x6e, 0x79, 0x42, 0x05, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x04, 0x6d, 0x73, 0x67, 0x73, 0x42, + 0x4b, 0x42, 0x0e, 0x41, 0x6d, 0x69, 0x6e, 0x6f, 0x6a, 0x73, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x37, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, + 0x6f, 0x2f, 0x78, 0x2f, 0x74, 0x78, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x6a, 0x73, 0x6f, 0x6e, + 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, + 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x6a, 0x73, 0x6f, 0x6e, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1850,18 +1755,16 @@ var file_aminojsonpb_aminojson_proto_goTypes = []interface{}{ (*AminoSignDoc)(nil), // 1: AminoSignDoc (*v1beta1.Coin)(nil), // 2: cosmos.base.v1beta1.Coin (*anypb.Any)(nil), // 3: google.protobuf.Any - (*v1beta11.Tip)(nil), // 4: cosmos.tx.v1beta1.Tip } var file_aminojsonpb_aminojson_proto_depIdxs = []int32{ 2, // 0: AminoSignFee.amount:type_name -> cosmos.base.v1beta1.Coin 0, // 1: AminoSignDoc.fee:type_name -> AminoSignFee 3, // 2: AminoSignDoc.msgs:type_name -> google.protobuf.Any - 4, // 3: AminoSignDoc.tip:type_name -> cosmos.tx.v1beta1.Tip - 4, // [4:4] is the sub-list for method output_type - 4, // [4:4] is the sub-list for method input_type - 4, // [4:4] is the sub-list for extension type_name - 4, // [4:4] is the sub-list for extension extendee - 0, // [0:4] is the sub-list for field type_name + 3, // [3:3] is the sub-list for method output_type + 3, // [3:3] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name } func init() { file_aminojsonpb_aminojson_proto_init() } diff --git a/x/tx/signing/directaux/direct_aux.go b/x/tx/signing/directaux/direct_aux.go index 9f92222d99a5..516797737aec 100644 --- a/x/tx/signing/directaux/direct_aux.go +++ b/x/tx/signing/directaux/direct_aux.go @@ -100,7 +100,6 @@ func (h SignModeHandler) GetSignBytes( ChainId: signerData.ChainID, AccountNumber: signerData.AccountNumber, Sequence: signerData.Sequence, - Tip: txData.AuthInfo.Tip, } return proto.Marshal(signDocDirectAux) } diff --git a/x/tx/signing/directaux/direct_aux_test.go b/x/tx/signing/directaux/direct_aux_test.go index aadd9c0deb14..00c48222aa89 100644 --- a/x/tx/signing/directaux/direct_aux_test.go +++ b/x/tx/signing/directaux/direct_aux_test.go @@ -54,7 +54,6 @@ func TestDirectAuxHandler(t *testing.T) { GasLimit: 20000, Payer: feePayerAddr, } - tip := &txv1beta1.Tip{Amount: []*basev1beta1.Coin{{Denom: "tip-token", Amount: "10"}}} txBody := &txv1beta1.TxBody{ Messages: []*anypb.Any{msg}, @@ -63,7 +62,6 @@ func TestDirectAuxHandler(t *testing.T) { authInfo := &txv1beta1.AuthInfo{ Fee: fee, - Tip: tip, SignerInfos: signerInfo, } @@ -113,7 +111,6 @@ func TestDirectAuxHandler(t *testing.T) { } authInfoWithNoFeePayer := &txv1beta1.AuthInfo{ Fee: feeWithNoPayer, - Tip: tip, SignerInfos: signerInfo, } authInfoWithNoFeePayerBz, err := proto.Marshal(authInfoWithNoFeePayer) @@ -139,7 +136,6 @@ func TestDirectAuxHandler(t *testing.T) { ChainId: chainID, AccountNumber: accNum, Sequence: accSeq, - Tip: tip, } expectedSignBytes, err := proto.Marshal(signDocDirectAux) require.NoError(t, err) diff --git a/x/tx/signing/testutil/util.go b/x/tx/signing/testutil/util.go index ef689ec1e747..ed1444a65742 100644 --- a/x/tx/signing/testutil/util.go +++ b/x/tx/signing/testutil/util.go @@ -17,7 +17,6 @@ type HandlerArgumentOptions struct { Msg proto.Message AccNum uint64 AccSeq uint64 - Tip *txv1beta1.Tip Fee *txv1beta1.Fee SignerAddress string } @@ -57,7 +56,6 @@ func MakeHandlerArguments(options HandlerArgumentOptions) (signing.SignerData, s authInfo := &txv1beta1.AuthInfo{ Fee: options.Fee, - Tip: options.Tip, SignerInfos: signerInfo, } diff --git a/x/tx/signing/textual/internal/testdata/e2e.json b/x/tx/signing/textual/internal/testdata/e2e.json index 49f5c6effdb3..2ab0e30f5b96 100644 --- a/x/tx/signing/textual/internal/testdata/e2e.json +++ b/x/tx/signing/textual/internal/testdata/e2e.json @@ -286,13 +286,6 @@ "gas_limit": 100000, "payer": "cosmos1ejrf4cur2wy6kfurg9f2jppp2h3afe5h6pkh5t", "granter": "cosmos1ulav3hsenupswqfkw2y3sup5kgtqwnvqa8eyhs" - }, - "tip": { - "amount": [ - { "amount": "20000", "denom": "uatom" }, - { "amount": "30000", "denom": "uosmo" } - ], - "tipper": "cosmos1ejrf4cur2wy6kfurg9f2jppp2h3afe5h6pkh5t" } } }, @@ -344,8 +337,6 @@ { "title": "Fees", "content": "0.002 ATOM" }, { "title": "Fee payer", "content": "cosmos1ejrf4cur2wy6kfurg9f2jppp2h3afe5h6pkh5t", "expert": true }, { "title": "Fee granter", "content": "cosmos1ulav3hsenupswqfkw2y3sup5kgtqwnvqa8eyhs", "expert": true }, - { "title": "Tip", "content": "0.02 ATOM, 30'000 uosmo" }, - { "title": "Tipper", "content": "cosmos1ejrf4cur2wy6kfurg9f2jppp2h3afe5h6pkh5t" }, { "title": "Gas limit", "content": "100'000", "expert": true }, { "title": "Timeout height", "content": "20", "expert": true }, { "title": "Other signer", "content": "1 SignerInfo", "expert": true }, @@ -381,8 +372,8 @@ { "title": "Non critical extension options (1/1)", "content": "/cosmos.auth.v1beta1.Params", "indent": 1, "expert": true }, { "title": "Max memo characters", "content": "10", "indent": 2, "expert": true }, { "content": "End of Non critical extension options", "expert": true }, - { "title": "Hash of raw bytes", "content": "7ea02e8f0baed2db969e2d9ae4dc51fa31116259bd42897588072faf0ebb4d2e", "expert": true } + { "title": "Hash of raw bytes", "content": "e7be7808de4985bd609811d2a32805cb233c168c7d247d61d37f4a6dd4cf3a2a", "expert": true } ], - "cbor": "a101983fa20168436861696e20696402686d792d636861696ea2016e4163636f756e74206e756d626572026131a2016853657175656e6365026132a301674164647265737302782d636f736d6f7331756c6176336873656e7570737771666b77327933737570356b677471776e767161386579687304f5a3016a5075626c6963206b657902781f2f636f736d6f732e63727970746f2e736563703235366b312e5075624b657904f5a401634b657902785230324542204444374620453446442045423736204443384120323035452046363544203739304320443330452038413337203541354320323532382045423341203932334120463146422034443739203444030104f5a102781f54686973207472616e73616374696f6e206861732032204d65737361676573a3016d4d6573736167652028312f322902781d2f636f736d6f732e617574687a2e763162657461312e4d7367457865630301a301674772616e74656502782d636f736d6f7331756c6176336873656e7570737771666b77327933737570356b677471776e76716138657968730302a301644d73677302653120416e790302a3016a4d7367732028312f312902781c2f636f736d6f732e62616e6b2e763162657461312e4d736753656e640303a3016c46726f6d206164647265737302782d636f736d6f7331756c6176336873656e7570737771666b77327933737570356b677471776e76716138657968730304a3016a546f206164647265737302782d636f736d6f7331656a726634637572327779366b667572673966326a707070326833616665356836706b6835740304a30166416d6f756e74026731302041544f4d0304a2026b456e64206f66204d7367730302a3016d4d6573736167652028322f322902762f636f736d6f732e676f762e76312e4d7367566f74650301a3016b50726f706f73616c2069640261310302a30165566f74657202782d636f736d6f7331756c6176336873656e7570737771666b77327933737570356b677471776e76716138657968730302a301664f7074696f6e026f564f54455f4f5054494f4e5f5945530302a301684d65746164617461027901e34c6f72656d20697073756d20646f6c6f722073697420616d65742c20636f6e73656374657475722061646970697363696e6720656c69742c2073656420646f20656975736d6f642074656d706f7220696e6369646964756e74207574206c61626f726520657420646f6c6f7265206d61676e6120616c697175612e20557420656e696d206164206d696e696d2076656e69616d2c2071756973206e6f737472756420657865726369746174696f6e20756c6c616d636f206c61626f726973206e69736920757420616c697175697020657820656120636f6d6d6f646f20636f6e7365717561742e2044756973206175746520697275726520646f6c6f7220696e20726570726568656e646572697420696e20766f6c7570746174652076656c697420657373652063696c6c756d20646f6c6f726520657520667567696174206e756c6c612070617269617475722e204578636570746575722073696e74206f6363616563617420637570696461746174206e6f6e2070726f6964656e742c2073756e7420696e2063756c706120717569206f666669636961206465736572756e74206d6f6c6c697420616e696d20696420657374206c61626f72756d2e20416c736f20697420656e647320696e2020612073696e676c6520616d70657273616e6420400302a1026e456e64206f66204d657373616765a201644d656d6f0278193e20e29a9befb88f5c7532363942e29a9befb88f2020202020a2016446656573026a302e3030322041544f4da3016946656520706179657202782d636f736d6f7331656a726634637572327779366b667572673966326a707070326833616665356836706b68357404f5a3016b466565206772616e74657202782d636f736d6f7331756c6176336873656e7570737771666b77327933737570356b677471776e767161386579687304f5a201635469700277302e30322041544f4d2c2033302730303020756f736d6fa2016654697070657202782d636f736d6f7331656a726634637572327779366b667572673966326a707070326833616665356836706b683574a30169476173206c696d697402673130302730303004f5a3016e54696d656f7574206865696768740262323004f5a3016c4f74686572207369676e6572026c31205369676e6572496e666f04f5a401724f74686572207369676e65722028312f312902715369676e6572496e666f206f626a656374030104f5a4016a5075626c6963206b65790278292f636f736d6f732e63727970746f2e6d756c74697369672e4c6567616379416d696e6f5075624b6579030204f5a401695468726573686f6c64026132030304f5a4016b5075626c6963206b65797302653220416e79030304f5a401715075626c6963206b6579732028312f322902781f2f636f736d6f732e63727970746f2e736563703235366b312e5075624b6579030404f5a401634b657902785230323537203445424520304246432037353446203539363720334241312031423237203530304620393135382041444532204531374520314130312038324230204341384220433635322034444230203933030504f5a401715075626c6963206b6579732028322f322902781d2f636f736d6f732e63727970746f2e656432353531392e5075624b6579030404f5a401634b657902785230333135203043343720463138412041333237203136413620353437452044413842203733363920303637442043453131204431343120363234352042373738203735364320463833352039363738203737030504f5a30272456e64206f66205075626c6963206b657973030304f5a401694d6f646520696e666f026f4d6f6465496e666f206f626a656374030204f5a401654d756c7469026c4d756c7469206f626a656374030304f5a4016842697461727261790276436f6d706163744269744172726179206f626a656374030404f5a40171457874726120626974732073746f726564026135030504f5a40165456c656d7302623438030504f5a4016a4d6f646520696e666f73026a32204d6f6465496e666f030404f5a401704d6f646520696e666f732028312f3229026f4d6f6465496e666f206f626a656374030504f5a4016653696e676c65026d53696e676c65206f626a656374030604f5a401644d6f646502781b5349474e5f4d4f44455f4c45474143595f414d494e4f5f4a534f4e030704f5a401704d6f646520696e666f732028322f3229026f4d6f6465496e666f206f626a656374030504f5a4016653696e676c65026d53696e676c65206f626a656374030604f5a401644d6f646502781b5349474e5f4d4f44455f4c45474143595f414d494e4f5f4a534f4e030704f5a30271456e64206f66204d6f646520696e666f73030404f5a4016853657175656e6365026135030204f5a20273456e64206f66204f74686572207369676e657204f5a30171457874656e73696f6e206f7074696f6e7302653120416e7904f5a40177457874656e73696f6e206f7074696f6e732028312f31290278192f636f736d6f732e626173652e763162657461312e436f696e030104f5a30266352041544f4d030204f5a2027818456e64206f6620457874656e73696f6e206f7074696f6e7304f5a301781e4e6f6e20637269746963616c20657874656e73696f6e206f7074696f6e7302653120416e7904f5a40178244e6f6e20637269746963616c20657874656e73696f6e206f7074696f6e732028312f312902781b2f636f736d6f732e617574682e763162657461312e506172616d73030104f5a401734d6178206d656d6f206368617261637465727302623130030204f5a2027825456e64206f66204e6f6e20637269746963616c20657874656e73696f6e206f7074696f6e7304f5a3017148617368206f66207261772062797465730278403765613032653866306261656432646239363965326439616534646335316661333131313632353962643432383937353838303732666166306562623464326504f5" + "cbor": "a101983da20168436861696e20696402686d792d636861696ea2016e4163636f756e74206e756d626572026131a2016853657175656e6365026132a301674164647265737302782d636f736d6f7331756c6176336873656e7570737771666b77327933737570356b677471776e767161386579687304f5a3016a5075626c6963206b657902781f2f636f736d6f732e63727970746f2e736563703235366b312e5075624b657904f5a401634b657902785230324542204444374620453446442045423736204443384120323035452046363544203739304320443330452038413337203541354320323532382045423341203932334120463146422034443739203444030104f5a102781f54686973207472616e73616374696f6e206861732032204d65737361676573a3016d4d6573736167652028312f322902781d2f636f736d6f732e617574687a2e763162657461312e4d7367457865630301a301674772616e74656502782d636f736d6f7331756c6176336873656e7570737771666b77327933737570356b677471776e76716138657968730302a301644d73677302653120416e790302a3016a4d7367732028312f312902781c2f636f736d6f732e62616e6b2e763162657461312e4d736753656e640303a3016c46726f6d206164647265737302782d636f736d6f7331756c6176336873656e7570737771666b77327933737570356b677471776e76716138657968730304a3016a546f206164647265737302782d636f736d6f7331656a726634637572327779366b667572673966326a707070326833616665356836706b6835740304a30166416d6f756e74026731302041544f4d0304a2026b456e64206f66204d7367730302a3016d4d6573736167652028322f322902762f636f736d6f732e676f762e76312e4d7367566f74650301a3016b50726f706f73616c2069640261310302a30165566f74657202782d636f736d6f7331756c6176336873656e7570737771666b77327933737570356b677471776e76716138657968730302a301664f7074696f6e026f564f54455f4f5054494f4e5f5945530302a301684d65746164617461027901e34c6f72656d20697073756d20646f6c6f722073697420616d65742c20636f6e73656374657475722061646970697363696e6720656c69742c2073656420646f20656975736d6f642074656d706f7220696e6369646964756e74207574206c61626f726520657420646f6c6f7265206d61676e6120616c697175612e20557420656e696d206164206d696e696d2076656e69616d2c2071756973206e6f737472756420657865726369746174696f6e20756c6c616d636f206c61626f726973206e69736920757420616c697175697020657820656120636f6d6d6f646f20636f6e7365717561742e2044756973206175746520697275726520646f6c6f7220696e20726570726568656e646572697420696e20766f6c7570746174652076656c697420657373652063696c6c756d20646f6c6f726520657520667567696174206e756c6c612070617269617475722e204578636570746575722073696e74206f6363616563617420637570696461746174206e6f6e2070726f6964656e742c2073756e7420696e2063756c706120717569206f666669636961206465736572756e74206d6f6c6c697420616e696d20696420657374206c61626f72756d2e20416c736f20697420656e647320696e2020612073696e676c6520616d70657273616e6420400302a1026e456e64206f66204d657373616765a201644d656d6f0278193e20e29a9befb88f5c7532363942e29a9befb88f2020202020a2016446656573026a302e3030322041544f4da3016946656520706179657202782d636f736d6f7331656a726634637572327779366b667572673966326a707070326833616665356836706b68357404f5a3016b466565206772616e74657202782d636f736d6f7331756c6176336873656e7570737771666b77327933737570356b677471776e767161386579687304f5a30169476173206c696d697402673130302730303004f5a3016e54696d656f7574206865696768740262323004f5a3016c4f74686572207369676e6572026c31205369676e6572496e666f04f5a401724f74686572207369676e65722028312f312902715369676e6572496e666f206f626a656374030104f5a4016a5075626c6963206b65790278292f636f736d6f732e63727970746f2e6d756c74697369672e4c6567616379416d696e6f5075624b6579030204f5a401695468726573686f6c64026132030304f5a4016b5075626c6963206b65797302653220416e79030304f5a401715075626c6963206b6579732028312f322902781f2f636f736d6f732e63727970746f2e736563703235366b312e5075624b6579030404f5a401634b657902785230323537203445424520304246432037353446203539363720334241312031423237203530304620393135382041444532204531374520314130312038324230204341384220433635322034444230203933030504f5a401715075626c6963206b6579732028322f322902781d2f636f736d6f732e63727970746f2e656432353531392e5075624b6579030404f5a401634b657902785230333135203043343720463138412041333237203136413620353437452044413842203733363920303637442043453131204431343120363234352042373738203735364320463833352039363738203737030504f5a30272456e64206f66205075626c6963206b657973030304f5a401694d6f646520696e666f026f4d6f6465496e666f206f626a656374030204f5a401654d756c7469026c4d756c7469206f626a656374030304f5a4016842697461727261790276436f6d706163744269744172726179206f626a656374030404f5a40171457874726120626974732073746f726564026135030504f5a40165456c656d7302623438030504f5a4016a4d6f646520696e666f73026a32204d6f6465496e666f030404f5a401704d6f646520696e666f732028312f3229026f4d6f6465496e666f206f626a656374030504f5a4016653696e676c65026d53696e676c65206f626a656374030604f5a401644d6f646502781b5349474e5f4d4f44455f4c45474143595f414d494e4f5f4a534f4e030704f5a401704d6f646520696e666f732028322f3229026f4d6f6465496e666f206f626a656374030504f5a4016653696e676c65026d53696e676c65206f626a656374030604f5a401644d6f646502781b5349474e5f4d4f44455f4c45474143595f414d494e4f5f4a534f4e030704f5a30271456e64206f66204d6f646520696e666f73030404f5a4016853657175656e6365026135030204f5a20273456e64206f66204f74686572207369676e657204f5a30171457874656e73696f6e206f7074696f6e7302653120416e7904f5a40177457874656e73696f6e206f7074696f6e732028312f31290278192f636f736d6f732e626173652e763162657461312e436f696e030104f5a30266352041544f4d030204f5a2027818456e64206f6620457874656e73696f6e206f7074696f6e7304f5a301781e4e6f6e20637269746963616c20657874656e73696f6e206f7074696f6e7302653120416e7904f5a40178244e6f6e20637269746963616c20657874656e73696f6e206f7074696f6e732028312f312902781b2f636f736d6f732e617574682e763162657461312e506172616d73030104f5a401734d6178206d656d6f206368617261637465727302623130030204f5a2027825456e64206f66204e6f6e20637269746963616c20657874656e73696f6e206f7074696f6e7304f5a3017148617368206f66207261772062797465730278406537626537383038646534393835626436303938313164326133323830356362323333633136386337643234376436316433376634613664643463663361326104f5" } ] diff --git a/x/tx/signing/textual/internal/testdata/tx.json b/x/tx/signing/textual/internal/testdata/tx.json index c071d08eec28..bbafe3b14120 100644 --- a/x/tx/signing/textual/internal/testdata/tx.json +++ b/x/tx/signing/textual/internal/testdata/tx.json @@ -299,13 +299,6 @@ "gas_limit": 100000, "payer": "cosmos1ejrf4cur2wy6kfurg9f2jppp2h3afe5h6pkh5t", "granter": "cosmos1ulav3hsenupswqfkw2y3sup5kgtqwnvqa8eyhs" - }, - "tip": { - "amount": [ - { "amount": "20000", "denom": "uatom" }, - { "amount": "30000", "denom": "uosmo" } - ], - "tipper": "cosmos1ejrf4cur2wy6kfurg9f2jppp2h3afe5h6pkh5t" } } }, @@ -357,8 +350,6 @@ { "title": "Fees", "content": "0.002 ATOM" }, { "title": "Fee payer", "content": "cosmos1ejrf4cur2wy6kfurg9f2jppp2h3afe5h6pkh5t", "expert": true }, { "title": "Fee granter", "content": "cosmos1ulav3hsenupswqfkw2y3sup5kgtqwnvqa8eyhs", "expert": true }, - { "title": "Tip", "content": "0.02 ATOM, 30'000 uosmo" }, - { "title": "Tipper", "content": "cosmos1ejrf4cur2wy6kfurg9f2jppp2h3afe5h6pkh5t" }, { "title": "Gas limit", "content": "100'000", "expert": true }, { "title": "Timeout height", "content": "20", "expert": true }, { "title": "Other signer", "content": "1 SignerInfo", "expert": true }, @@ -394,7 +385,7 @@ { "title": "Non critical extension options (1/1)", "content": "/cosmos.auth.v1beta1.Params", "indent": 1, "expert": true }, { "title": "Max memo characters", "content": "10", "indent": 2, "expert": true }, { "content": "End of Non critical extension options", "expert": true }, - { "title": "Hash of raw bytes", "content": "7ea02e8f0baed2db969e2d9ae4dc51fa31116259bd42897588072faf0ebb4d2e", "expert": true } + { "title": "Hash of raw bytes", "content": "e7be7808de4985bd609811d2a32805cb233c168c7d247d61d37f4a6dd4cf3a2a", "expert": true } ] } ] diff --git a/x/tx/signing/textual/internal/textualpb/textual.proto b/x/tx/signing/textual/internal/textualpb/textual.proto index efd8d35275bd..cddfc99d6e6b 100644 --- a/x/tx/signing/textual/internal/textualpb/textual.proto +++ b/x/tx/signing/textual/internal/textualpb/textual.proto @@ -77,8 +77,6 @@ message Envelope { repeated cosmos.base.v1beta1.Coin fees = 8; string fee_payer = 9; string fee_granter = 10; - repeated cosmos.base.v1beta1.Coin tip = 11; - string tipper = 12; uint64 gas_limit = 13; uint64 timeout_height = 14; repeated cosmos.tx.v1beta1.SignerInfo other_signer = 15; diff --git a/x/tx/signing/textual/tx.go b/x/tx/signing/textual/tx.go index 143726034ec6..4a372f8b9d39 100644 --- a/x/tx/signing/textual/tx.go +++ b/x/tx/signing/textual/tx.go @@ -83,10 +83,7 @@ func (vr txValueRenderer) Format(ctx context.Context, v protoreflect.Value) ([]S NonCriticalExtensionOptions: txBody.NonCriticalExtensionOptions, HashOfRawBytes: getHash(textualData.BodyBytes, textualData.AuthInfoBytes), } - if txAuthInfo.Tip != nil { - envelope.Tip = txAuthInfo.Tip.Amount - envelope.Tipper = txAuthInfo.Tip.Tipper - } + // Find all other tx signers than the current signer. In the case where our // Textual signer is one key of a multisig, then otherSigners will include // the multisig pubkey. @@ -243,12 +240,6 @@ func (vr txValueRenderer) Parse(ctx context.Context, screens []Screen) (protoref Granter: envelope.FeeGranter, }, } - if envelope.Tip != nil { - authInfo.Tip = &txv1beta1.Tip{ - Amount: envelope.Tip, - Tipper: envelope.Tipper, - } - } // Figure out the signers in the correct order. signers, err := getSigners(txBody, authInfo)