From 2bd2015c7cd02c668726a9bc1abcbb691d00fc28 Mon Sep 17 00:00:00 2001 From: yutianwu Date: Sun, 12 Mar 2023 11:24:44 +0800 Subject: [PATCH] Revert "feat(cross-chain): add callbackGasPrice to cross-chain package (#121)" This reverts commit dd9cbde4e79bf6f5307f918d8ba3d67ba2eefd44. --- math/uint_test.go | 1 + proto/cosmos/auth/v1beta1/query.proto | 16 ++-- proto/cosmos/crosschain/v1/event.proto | 2 - proto/cosmos/crosschain/v1/query.proto | 2 +- proto/cosmos/crypto/eth/bls/keys.proto | 2 +- proto/cosmos/gashub/v1alpha1/gashub.proto | 8 +- proto/cosmos/gashub/v1alpha1/tx.proto | 2 +- proto/cosmos/oracle/v1/event.proto | 3 +- proto/cosmos/oracle/v1/tx.proto | 16 ++-- proto/cosmos/params/v1beta1/params.proto | 4 +- proto/cosmos/slashing/v1beta1/tx.proto | 4 +- proto/cosmos/staking/v1beta1/tx.proto | 6 +- proto/cosmos/tx/v1beta1/tx.proto | 12 +-- types/cross_chain.go | 34 +++----- x/auth/tx/eip712_test.go | 2 +- x/crosschain/keeper/keeper.go | 30 +++---- x/crosschain/types/event.pb.go | 97 +++++---------------- x/oracle/keeper/msg_server.go | 5 +- x/oracle/keeper/msg_server_test.go | 18 ++-- x/oracle/types/event.pb.go | 101 +++++----------------- x/oracle/types/expected_keepers.go | 1 - x/params/types/proposal/proposal_test.go | 1 + 22 files changed, 122 insertions(+), 245 deletions(-) diff --git a/math/uint_test.go b/math/uint_test.go index d7f8fe8fd7..fbe59f44fb 100644 --- a/math/uint_test.go +++ b/math/uint_test.go @@ -370,4 +370,5 @@ func (s *uintTestSuite) TestUintBigEndian() { u2 = u2.SetBytes(u1b) s.Require().Equal(u1, u2) + } diff --git a/proto/cosmos/auth/v1beta1/query.proto b/proto/cosmos/auth/v1beta1/query.proto index b5c65e28c8..0b66da6050 100644 --- a/proto/cosmos/auth/v1beta1/query.proto +++ b/proto/cosmos/auth/v1beta1/query.proto @@ -48,12 +48,12 @@ service Query { option (google.api.http).get = "/cosmos/auth/v1beta1/module_accounts/{name}"; } - // // Bech32Prefix queries bech32Prefix - // // - // // Since: cosmos-sdk 0.46 - // rpc Bech32Prefix(Bech32PrefixRequest) returns (Bech32PrefixResponse) { - // option (google.api.http).get = "/cosmos/auth/v1beta1/bech32"; - // } +// // Bech32Prefix queries bech32Prefix +// // +// // Since: cosmos-sdk 0.46 +// rpc Bech32Prefix(Bech32PrefixRequest) returns (Bech32PrefixResponse) { +// option (google.api.http).get = "/cosmos/auth/v1beta1/bech32"; +// } // AddressBytesToString converts Account Address bytes to string // @@ -138,12 +138,12 @@ message QueryModuleAccountByNameResponse { //// Bech32PrefixRequest is the request type for Bech32Prefix rpc method. //// //// Since: cosmos-sdk 0.46 -// message Bech32PrefixRequest {} +//message Bech32PrefixRequest {} //// Bech32PrefixResponse is the response type for Bech32Prefix rpc method. //// //// Since: cosmos-sdk 0.46 -// message Bech32PrefixResponse { +//message Bech32PrefixResponse { // string bech32_prefix = 1; //} diff --git a/proto/cosmos/crosschain/v1/event.proto b/proto/cosmos/crosschain/v1/event.proto index 99622e5d79..285e0a26ba 100644 --- a/proto/cosmos/crosschain/v1/event.proto +++ b/proto/cosmos/crosschain/v1/event.proto @@ -24,6 +24,4 @@ message EventCrossChain { string relayer_fee = 8; // Relayer fee for the ACK or FAIL_ACK package of this cross chain package string ack_relayer_fee = 9; - // Callback gas price the ACK or FAIL_ACK package - string callback_gas_price = 10; } diff --git a/proto/cosmos/crosschain/v1/query.proto b/proto/cosmos/crosschain/v1/query.proto index 9d721b6436..b5a5086448 100644 --- a/proto/cosmos/crosschain/v1/query.proto +++ b/proto/cosmos/crosschain/v1/query.proto @@ -42,7 +42,7 @@ message QueryParamsResponse { // QueryCrossChainPackageRequest is the request type for the Query/CrossChainPackage RPC method. message QueryCrossChainPackageRequest { uint32 channel_id = 1; - uint64 sequence = 2; + uint64 sequence = 2; } // QueryCrossChainPackageResponse is the response type for the Query/CrossChainPackage RPC method. diff --git a/proto/cosmos/crypto/eth/bls/keys.proto b/proto/cosmos/crypto/eth/bls/keys.proto index 4e4a3d4c9e..f5289d8347 100644 --- a/proto/cosmos/crypto/eth/bls/keys.proto +++ b/proto/cosmos/crypto/eth/bls/keys.proto @@ -6,7 +6,7 @@ import "gogoproto/gogo.proto"; option go_package = "github.com/cosmos/cosmos-sdk/crypto/keys/eth/bls"; // PubKey defines a bls public key -// Key is the compressed form of the pubkey. +// Key is the compressed form of the pubkey. message PubKey { option (gogoproto.goproto_stringer) = false; diff --git a/proto/cosmos/gashub/v1alpha1/gashub.proto b/proto/cosmos/gashub/v1alpha1/gashub.proto index 2408bb7e71..4d911da161 100644 --- a/proto/cosmos/gashub/v1alpha1/gashub.proto +++ b/proto/cosmos/gashub/v1alpha1/gashub.proto @@ -18,9 +18,9 @@ message Params { // MsgGasParams defines gas for a msg type message MsgGasParams { - option (gogoproto.equal) = true; + option (gogoproto.equal) = true; - string msg_type_url = 1 [(gogoproto.customname) = "MsgTypeUrl"]; + string msg_type_url = 1 [(gogoproto.customname) = "MsgTypeUrl"]; // gas_params is the oneof that represents either fixed_gas_params or dynamic_gas_params oneof gas_params { // fixed_type specifies fixed type gas params. @@ -34,14 +34,14 @@ message MsgGasParams { } // FixedGasParams defines the parameters for fixed gas type. message FixedGasParams { - option (gogoproto.equal) = true; + option (gogoproto.equal) = true; uint64 fixed_gas = 1 [(gogoproto.customname) = "FixedGas"]; } // DynamicGasParams defines the parameters for dynamic gas type. message DynamicGasParams { - option (gogoproto.equal) = true; + option (gogoproto.equal) = true; uint64 fixed_gas = 1 [(gogoproto.customname) = "FixedGas"]; uint64 gas_per_item = 2 [(gogoproto.customname) = "GasPerItem"]; diff --git a/proto/cosmos/gashub/v1alpha1/tx.proto b/proto/cosmos/gashub/v1alpha1/tx.proto index a0eeb94891..cceb2b773a 100644 --- a/proto/cosmos/gashub/v1alpha1/tx.proto +++ b/proto/cosmos/gashub/v1alpha1/tx.proto @@ -22,7 +22,7 @@ message MsgUpdateMsgGasParams { option (gogoproto.equal) = false; option (gogoproto.goproto_getters) = false; - string from = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string from = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; repeated MsgGasParams new_params_set = 2; } diff --git a/proto/cosmos/oracle/v1/event.proto b/proto/cosmos/oracle/v1/event.proto index a3e8bf404e..fed8591578 100644 --- a/proto/cosmos/oracle/v1/event.proto +++ b/proto/cosmos/oracle/v1/event.proto @@ -2,6 +2,7 @@ syntax = "proto3"; package cosmos.oracle.v1; + option go_package = "github.com/cosmos/cosmos-sdk/x/oracle/types"; // EventPackageClaim is emitted when a cross chain package is processed @@ -26,6 +27,4 @@ message EventPackageClaim { string relayer_fee = 9; // Relayer fee paid for the ACK or FAIL_ACK package string ack_relayer_fee = 10; - // Callback gas price the ACK or FAIL_ACK package - string callback_gas_price = 11; } \ No newline at end of file diff --git a/proto/cosmos/oracle/v1/tx.proto b/proto/cosmos/oracle/v1/tx.proto index 93c4b414a4..e0b2920a76 100644 --- a/proto/cosmos/oracle/v1/tx.proto +++ b/proto/cosmos/oracle/v1/tx.proto @@ -21,14 +21,14 @@ message MsgClaim { option (gogoproto.equal) = false; option (gogoproto.goproto_getters) = false; - string from_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - uint32 src_chain_id = 2; - uint32 dest_chain_id = 3; - uint64 sequence = 4; - uint64 timestamp = 5; - bytes payload = 6; - repeated fixed64 vote_address_set = 7; - bytes agg_signature = 8; + string from_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + uint32 src_chain_id = 2; + uint32 dest_chain_id = 3; + uint64 sequence = 4; + uint64 timestamp = 5; + bytes payload = 6; + repeated fixed64 vote_address_set = 7; + bytes agg_signature = 8; } // MsgClaimResponse defines the Msg/Claim response type diff --git a/proto/cosmos/params/v1beta1/params.proto b/proto/cosmos/params/v1beta1/params.proto index 83936c7d32..0a081a4631 100644 --- a/proto/cosmos/params/v1beta1/params.proto +++ b/proto/cosmos/params/v1beta1/params.proto @@ -16,8 +16,8 @@ message ParameterChangeProposal { string title = 1; string description = 2; repeated ParamChange changes = 3 [(gogoproto.nullable) = false]; - bool cross_chain = 4; // flag for cross chain proposal - repeated string addresses = 5; // used with cross_chain field to specify destination smart contract address(es) + bool cross_chain = 4; // flag for cross chain proposal + repeated string addresses = 5; // used with cross_chain field to specify destination smart contract address(es) } // ParamChange defines an individual parameter change, for use in diff --git a/proto/cosmos/slashing/v1beta1/tx.proto b/proto/cosmos/slashing/v1beta1/tx.proto index 0e5d6e12f5..ab80d73086 100644 --- a/proto/cosmos/slashing/v1beta1/tx.proto +++ b/proto/cosmos/slashing/v1beta1/tx.proto @@ -40,8 +40,8 @@ message MsgImpeach { option (gogoproto.equal) = false; option (gogoproto.goproto_getters) = false; - string from = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - string validator_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string from = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string validator_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } // MsgImpeachResponse defines the Msg/Impeach response type. diff --git a/proto/cosmos/staking/v1beta1/tx.proto b/proto/cosmos/staking/v1beta1/tx.proto index 8bbb201758..e6b0ef5952 100644 --- a/proto/cosmos/staking/v1beta1/tx.proto +++ b/proto/cosmos/staking/v1beta1/tx.proto @@ -62,7 +62,7 @@ message MsgCreateValidator { string from = 8 [(cosmos_proto.scalar) = "cosmos.AddressString"]; string relayer_address = 9 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - string relayer_bls_key = 10; + string relayer_bls_key = 10; } // MsgCreateValidatorResponse defines the Msg/CreateValidator response type. @@ -87,8 +87,8 @@ message MsgEditValidator { string min_self_delegation = 4 [(cosmos_proto.scalar) = "cosmos.Int", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int"]; - string relayer_address = 5 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - string relayer_bls_key = 6; // The BLS pubkey for the authorized relayer + string relayer_address = 5 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string relayer_bls_key = 6; // The BLS pubkey for the authorized relayer } // MsgEditValidatorResponse defines the Msg/EditValidator response type. diff --git a/proto/cosmos/tx/v1beta1/tx.proto b/proto/cosmos/tx/v1beta1/tx.proto index ba963bcf22..a57ca31d86 100644 --- a/proto/cosmos/tx/v1beta1/tx.proto +++ b/proto/cosmos/tx/v1beta1/tx.proto @@ -102,30 +102,30 @@ message SignDocEip712 { // chain_id is the identifier of the chain this transaction targets. // It prevents signed transactions from being used on another chain by an // attacker. - uint64 chain_id = 1 [(gogoproto.jsontag) = "chain_id"]; + uint64 chain_id = 1[(gogoproto.jsontag) = "chain_id"]; // account_number is the account number of the account in state. - uint64 account_number = 2 [(gogoproto.jsontag) = "account_number"]; + uint64 account_number = 2[(gogoproto.jsontag) = "account_number"]; // sequence is the sequence number of the signing account. - uint64 sequence = 3 [(gogoproto.jsontag) = "sequence"]; + uint64 sequence = 3[(gogoproto.jsontag) = "sequence"]; // Fee is the fee and gas limit for the transaction. The first signer is the // primary signer and the one which pays the fee. The fee can be calculated // based on the cost of evaluating the body and doing signature verification // of the signers. This can be estimated via simulation. - Fee fee = 4 [(gogoproto.nullable) = false]; + Fee fee = 4[(gogoproto.nullable) = false]; // msg is the msg in the EIP712 transaction. google.protobuf.Any msg = 5; // timeout_height is the transaction's timeout height (if set). - uint64 timeout_height = 6 [(gogoproto.jsontag) = "timeout_height"]; + uint64 timeout_height = 6[(gogoproto.jsontag) = "timeout_height"]; // memo is any arbitrary note/comment to be added to the transaction. // WARNING: in clients, any publicly exposed text should not be called memo, // but should be called `note` instead (see https://github.com/cosmos/cosmos-sdk/issues/9122). - string memo = 7 [(gogoproto.jsontag) = "memo"]; + string memo = 7[(gogoproto.jsontag) = "memo"]; // 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 diff --git a/types/cross_chain.go b/types/cross_chain.go index e1bd0de686..3a98517cda 100644 --- a/types/cross_chain.go +++ b/types/cross_chain.go @@ -59,12 +59,11 @@ func (c ExecuteResult) ErrMsg() string { } const ( - CrossChainFeeLength = 32 - CallbackGasPriceLength = 32 - PackageTypeLength = 1 - TimestampLength = 8 + CrossChainFeeLength = 32 + PackageTypeLength = 1 + TimestampLength = 8 - SynPackageHeaderLength = 2*CrossChainFeeLength + CallbackGasPriceLength + TimestampLength + PackageTypeLength + SynPackageHeaderLength = 2*CrossChainFeeLength + TimestampLength + PackageTypeLength AckPackageHeaderLength = CrossChainFeeLength + TimestampLength + PackageTypeLength ) @@ -81,14 +80,10 @@ type PackageHeader struct { RelayerFee *big.Int // relayer fee is the relayer fee paid to relayer src source chain to dest chain // ack relayer fee is the relayer fee paid to relayer for the ack or fail ack package if there is any // Ack and FailAck packages don't have ack relayer fee, since there is no corresponding ack or fail ack packages - AckRelayerFee *big.Int - CallbackGasPrice *big.Int + AckRelayerFee *big.Int } -var ( - NilAckRelayerFee = big.NewInt(0) // For ack packages, the ack relayer fee should be nil, and it would not be encoded into package header - NilCallbackGasPrice = big.NewInt(0) // For ack packages, the callback gas price should be nil, and it would not be encoded into package header -) +var NilAckRelayerFee = big.NewInt(0) // For ack packages, the ack relayer fee should be nil, and it would not be encoded into package header func EncodePackageHeader(header PackageHeader) []byte { packageHeader := make([]byte, GetPackageHeaderLength(header.PackageType)) @@ -104,10 +99,7 @@ func EncodePackageHeader(header PackageHeader) []byte { // add ack relayer fee to header for syn package if header.PackageType == SynCrossChainPackageType { ackRelayerFeeLength := len(header.AckRelayerFee.Bytes()) - copy(packageHeader[AckPackageHeaderLength:AckPackageHeaderLength+ackRelayerFeeLength], header.AckRelayerFee.Bytes()) - - callbackGasPriceLength := len(header.CallbackGasPrice.Bytes()) - copy(packageHeader[SynPackageHeaderLength-callbackGasPriceLength:SynPackageHeaderLength], header.CallbackGasPrice.Bytes()) + copy(packageHeader[SynPackageHeaderLength-ackRelayerFeeLength:SynPackageHeaderLength], header.AckRelayerFee.Bytes()) } return packageHeader @@ -134,16 +126,14 @@ func DecodePackageHeader(packageHeader []byte) (PackageHeader, error) { relayerFee := big.NewInt(0).SetBytes(packageHeader[PackageTypeLength+TimestampLength : AckPackageHeaderLength]) header := PackageHeader{ - PackageType: packageType, - Timestamp: timestamp, - RelayerFee: relayerFee, - AckRelayerFee: big.NewInt(0), - CallbackGasPrice: big.NewInt(0), + PackageType: packageType, + Timestamp: timestamp, + RelayerFee: relayerFee, + AckRelayerFee: big.NewInt(0), } if packageType == SynCrossChainPackageType { - header.AckRelayerFee = big.NewInt(0).SetBytes(packageHeader[AckPackageHeaderLength : AckPackageHeaderLength+CrossChainFeeLength]) - header.CallbackGasPrice = big.NewInt(0).SetBytes(packageHeader[SynPackageHeaderLength-CallbackGasPriceLength : SynPackageHeaderLength]) + header.AckRelayerFee = big.NewInt(0).SetBytes(packageHeader[AckPackageHeaderLength:SynPackageHeaderLength]) } return header, nil diff --git a/x/auth/tx/eip712_test.go b/x/auth/tx/eip712_test.go index 3f83711b20..94538f70c0 100644 --- a/x/auth/tx/eip712_test.go +++ b/x/auth/tx/eip712_test.go @@ -3,7 +3,6 @@ package tx import ( "fmt" "testing" - "time" "github.com/stretchr/testify/require" @@ -20,6 +19,7 @@ import ( "github.com/cosmos/cosmos-sdk/x/feegrant" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1" "github.com/cosmos/cosmos-sdk/x/group" + "time" ) func TestEIP712Handler(t *testing.T) { diff --git a/x/crosschain/keeper/keeper.go b/x/crosschain/keeper/keeper.go index 83aff6d411..aa60e74305 100644 --- a/x/crosschain/keeper/keeper.go +++ b/x/crosschain/keeper/keeper.go @@ -81,7 +81,7 @@ func (k Keeper) SetParams(ctx sdk.Context, params types.Params) { // CreateRawIBCPackageWithFee creates a cross chain package with given cross chain fee func (k Keeper) CreateRawIBCPackageWithFee(ctx sdk.Context, channelID sdk.ChannelID, - packageType sdk.CrossChainPackageType, packageLoad []byte, relayerFee *big.Int, ackRelayerFee *big.Int, callbackGasPrice *big.Int, + packageType sdk.CrossChainPackageType, packageLoad []byte, relayerFee *big.Int, ackRelayerFee *big.Int, ) (uint64, error) { if packageType == sdk.SynCrossChainPackageType && k.GetChannelSendPermission(ctx, k.GetDestChainID(), channelID) != sdk.ChannelAllow { return 0, fmt.Errorf("channel %d is not allowed to write syn package", channelID) @@ -96,11 +96,10 @@ func (k Keeper) CreateRawIBCPackageWithFee(ctx sdk.Context, channelID sdk.Channe // Assemble the package header packageHeader := sdk.EncodePackageHeader(sdk.PackageHeader{ - PackageType: packageType, - Timestamp: uint64(ctx.BlockTime().Unix()), - RelayerFee: relayerFee, - AckRelayerFee: ackRelayerFee, - CallbackGasPrice: callbackGasPrice, + PackageType: packageType, + Timestamp: uint64(ctx.BlockTime().Unix()), + RelayerFee: relayerFee, + AckRelayerFee: ackRelayerFee, }) kvStore.Set(key, append(packageHeader, packageLoad...)) @@ -108,16 +107,15 @@ func (k Keeper) CreateRawIBCPackageWithFee(ctx sdk.Context, channelID sdk.Channe k.IncrSendSequence(ctx, channelID) err := ctx.EventManager().EmitTypedEvent(&types.EventCrossChain{ - SrcChainId: uint32(k.GetSrcChainID()), - DestChainId: uint32(k.GetDestChainID()), - ChannelId: uint32(channelID), - Sequence: sequence, - PackageType: uint32(packageType), - Timestamp: uint64(ctx.BlockTime().Unix()), - PackageLoad: hex.EncodeToString(packageLoad), - RelayerFee: relayerFee.String(), - AckRelayerFee: ackRelayerFee.String(), - CallbackGasPrice: callbackGasPrice.String(), + SrcChainId: uint32(k.GetSrcChainID()), + DestChainId: uint32(k.GetDestChainID()), + ChannelId: uint32(channelID), + Sequence: sequence, + PackageType: uint32(packageType), + Timestamp: uint64(ctx.BlockTime().Unix()), + PackageLoad: hex.EncodeToString(packageLoad), + RelayerFee: relayerFee.String(), + AckRelayerFee: ackRelayerFee.String(), }) if err != nil { return 0, err diff --git a/x/crosschain/types/event.pb.go b/x/crosschain/types/event.pb.go index 24735af507..907fc5a963 100644 --- a/x/crosschain/types/event.pb.go +++ b/x/crosschain/types/event.pb.go @@ -42,8 +42,6 @@ type EventCrossChain struct { RelayerFee string `protobuf:"bytes,8,opt,name=relayer_fee,json=relayerFee,proto3" json:"relayer_fee,omitempty"` // Relayer fee for the ACK or FAIL_ACK package of this cross chain package AckRelayerFee string `protobuf:"bytes,9,opt,name=ack_relayer_fee,json=ackRelayerFee,proto3" json:"ack_relayer_fee,omitempty"` - // Callback gas price the ACK or FAIL_ACK package - CallbackGasPrice string `protobuf:"bytes,10,opt,name=callback_gas_price,json=callbackGasPrice,proto3" json:"callback_gas_price,omitempty"` } func (m *EventCrossChain) Reset() { *m = EventCrossChain{} } @@ -142,13 +140,6 @@ func (m *EventCrossChain) GetAckRelayerFee() string { return "" } -func (m *EventCrossChain) GetCallbackGasPrice() string { - if m != nil { - return m.CallbackGasPrice - } - return "" -} - func init() { proto.RegisterType((*EventCrossChain)(nil), "cosmos.crosschain.v1.EventCrossChain") } @@ -156,29 +147,28 @@ func init() { func init() { proto.RegisterFile("cosmos/crosschain/v1/event.proto", fileDescriptor_2a5a3ba75f5dd2c3) } var fileDescriptor_2a5a3ba75f5dd2c3 = []byte{ - // 348 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x4c, 0xd1, 0xcb, 0x4e, 0xf2, 0x40, - 0x14, 0xc0, 0x71, 0xca, 0xc7, 0x87, 0xf4, 0x00, 0xc1, 0x4c, 0x5c, 0x34, 0x46, 0x6b, 0x65, 0x61, - 0x58, 0x68, 0x1b, 0xe2, 0x1b, 0x48, 0xd4, 0x90, 0xb8, 0x30, 0xc4, 0x95, 0x9b, 0x66, 0x98, 0x1e, - 0xa1, 0xe9, 0x65, 0xea, 0xcc, 0x40, 0xe4, 0x2d, 0x7c, 0x2c, 0x97, 0x2c, 0x5d, 0x1a, 0x58, 0xfb, - 0x0e, 0x66, 0x86, 0x4b, 0x59, 0x35, 0xfd, 0x9f, 0x5f, 0xcf, 0xa2, 0x07, 0x3c, 0xc6, 0x65, 0xc6, - 0x65, 0xc0, 0x04, 0x97, 0x92, 0x4d, 0x69, 0x9c, 0x07, 0xf3, 0x7e, 0x80, 0x73, 0xcc, 0x95, 0x5f, - 0x08, 0xae, 0x38, 0x39, 0xd9, 0x08, 0xbf, 0x14, 0xfe, 0xbc, 0xdf, 0xfd, 0xad, 0x42, 0xe7, 0x5e, - 0xab, 0x81, 0xce, 0x03, 0x9d, 0x89, 0x07, 0x2d, 0x29, 0x58, 0x68, 0x4c, 0x18, 0x47, 0x8e, 0xe5, - 0x59, 0xbd, 0xf6, 0x08, 0xa4, 0x60, 0x66, 0x3e, 0x8c, 0x48, 0x17, 0xda, 0x11, 0x4a, 0x55, 0x92, - 0xaa, 0x21, 0x4d, 0x1d, 0x77, 0xe6, 0x1c, 0x80, 0x4d, 0x69, 0x9e, 0x63, 0xaa, 0xc1, 0x3f, 0x03, - 0xec, 0x6d, 0x19, 0x46, 0xe4, 0x14, 0x1a, 0x12, 0xdf, 0x67, 0x98, 0x33, 0x74, 0x6a, 0x9e, 0xd5, - 0xab, 0x8d, 0xf6, 0xef, 0xe4, 0x12, 0x5a, 0x05, 0x65, 0x09, 0x9d, 0x60, 0xa8, 0x16, 0x05, 0x3a, - 0xff, 0x37, 0xdb, 0xb7, 0xed, 0x65, 0x51, 0x20, 0x39, 0x03, 0x5b, 0xc5, 0x19, 0x4a, 0x45, 0xb3, - 0xc2, 0xa9, 0x9b, 0xef, 0xcb, 0x70, 0xb8, 0x20, 0xe5, 0x34, 0x72, 0x8e, 0x3c, 0xab, 0x67, 0xef, - 0x17, 0x3c, 0x71, 0x1a, 0x91, 0x0b, 0x68, 0x0a, 0x4c, 0xe9, 0x02, 0x45, 0xf8, 0x86, 0xe8, 0x34, - 0x8c, 0x80, 0x6d, 0x7a, 0x40, 0x24, 0x57, 0xd0, 0xa1, 0x2c, 0x09, 0x0f, 0x91, 0x6d, 0x50, 0x9b, - 0xb2, 0x64, 0x54, 0xba, 0x6b, 0x20, 0x8c, 0xa6, 0xe9, 0x58, 0xe3, 0x09, 0x95, 0x61, 0x21, 0x62, - 0x86, 0x0e, 0x18, 0x7a, 0xbc, 0x9b, 0x3c, 0x52, 0xf9, 0xac, 0xfb, 0xdd, 0xf0, 0x6b, 0xe5, 0x5a, - 0xcb, 0x95, 0x6b, 0xfd, 0xac, 0x5c, 0xeb, 0x73, 0xed, 0x56, 0x96, 0x6b, 0xb7, 0xf2, 0xbd, 0x76, - 0x2b, 0xaf, 0xc1, 0x24, 0x56, 0xd3, 0xd9, 0xd8, 0x67, 0x3c, 0x0b, 0x76, 0xc7, 0x34, 0x8f, 0x1b, - 0x19, 0x25, 0xc1, 0xc7, 0xe1, 0x65, 0xf5, 0x4f, 0x91, 0xe3, 0xba, 0xb9, 0xeb, 0xed, 0x5f, 0x00, - 0x00, 0x00, 0xff, 0xff, 0x85, 0x33, 0xda, 0x16, 0xfb, 0x01, 0x00, 0x00, + // 323 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x4c, 0xd1, 0x4f, 0x4f, 0xfa, 0x30, + 0x18, 0xc0, 0x71, 0xca, 0x8f, 0x1f, 0xb2, 0x07, 0x08, 0x49, 0xe3, 0x61, 0x31, 0x3a, 0x27, 0x07, + 0xc3, 0xc5, 0x2d, 0xc4, 0x77, 0x20, 0xd1, 0x84, 0xc4, 0x13, 0xf1, 0xe4, 0x65, 0x29, 0xed, 0x23, + 0x2c, 0x63, 0xeb, 0x6c, 0x0b, 0x91, 0x77, 0xe1, 0x3b, 0xf2, 0xea, 0x91, 0xa3, 0x47, 0x03, 0x6f, + 0xc4, 0xb4, 0xfc, 0x3d, 0x2d, 0xfb, 0xf6, 0xd3, 0x27, 0x69, 0x1e, 0x08, 0xb9, 0x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f0, 0x7b, 0x1d, 0x90, 0xd5, 0x3a, 0x20, 0xbf, 0xeb, 0x80, 0x7c, 0x6e, + 0x82, 0xca, 0x6a, 0x13, 0x54, 0x7e, 0x36, 0x41, 0xe5, 0x35, 0x9e, 0xa4, 0x66, 0x3a, 0x1f, 0x47, + 0x5c, 0xe6, 0xf1, 0x7e, 0x3d, 0xee, 0x73, 0xa7, 0x45, 0x16, 0x7f, 0x9c, 0xee, 0xca, 0x3e, 0x53, + 0x8f, 0xeb, 0x6e, 0x53, 0xf7, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x93, 0x08, 0x3b, 0x98, 0xcd, + 0x01, 0x00, 0x00, } func (m *EventCrossChain) Marshal() (dAtA []byte, err error) { @@ -201,13 +191,6 @@ func (m *EventCrossChain) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.CallbackGasPrice) > 0 { - i -= len(m.CallbackGasPrice) - copy(dAtA[i:], m.CallbackGasPrice) - i = encodeVarintEvent(dAtA, i, uint64(len(m.CallbackGasPrice))) - i-- - dAtA[i] = 0x52 - } if len(m.AckRelayerFee) > 0 { i -= len(m.AckRelayerFee) copy(dAtA[i:], m.AckRelayerFee) @@ -309,10 +292,6 @@ func (m *EventCrossChain) Size() (n int) { if l > 0 { n += 1 + l + sovEvent(uint64(l)) } - l = len(m.CallbackGasPrice) - if l > 0 { - n += 1 + l + sovEvent(uint64(l)) - } return n } @@ -561,38 +540,6 @@ func (m *EventCrossChain) Unmarshal(dAtA []byte) error { } m.AckRelayerFee = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CallbackGasPrice", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvent - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvent - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvent - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CallbackGasPrice = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipEvent(dAtA[iNdEx:]) diff --git a/x/oracle/keeper/msg_server.go b/x/oracle/keeper/msg_server.go index 2004430a5e..daa54719a2 100644 --- a/x/oracle/keeper/msg_server.go +++ b/x/oracle/keeper/msg_server.go @@ -203,8 +203,7 @@ func handlePackage( var sendSeq uint64 if len(pack.Payload) >= sdk.SynPackageHeaderLength { sendSeq, ibcErr = oracleKeeper.CrossChainKeeper.CreateRawIBCPackageWithFee(ctx, pack.ChannelId, - sdk.FailAckCrossChainPackageType, pack.Payload[sdk.SynPackageHeaderLength:], packageHeader.AckRelayerFee, sdk.NilAckRelayerFee, - packageHeader.CallbackGasPrice) + sdk.FailAckCrossChainPackageType, pack.Payload[sdk.SynPackageHeaderLength:], packageHeader.AckRelayerFee, sdk.NilAckRelayerFee) } else { logger.Error("found payload without header", "channelID", pack.ChannelId, "sequence", pack.Sequence, "payload", hex.EncodeToString(pack.Payload)) @@ -218,7 +217,7 @@ func handlePackage( sendSequence = int64(sendSeq) } else if len(result.Payload) != 0 { sendSeq, err := oracleKeeper.CrossChainKeeper.CreateRawIBCPackageWithFee(ctx, pack.ChannelId, - sdk.AckCrossChainPackageType, result.Payload, packageHeader.AckRelayerFee, sdk.NilAckRelayerFee, packageHeader.CallbackGasPrice) + sdk.AckCrossChainPackageType, result.Payload, packageHeader.AckRelayerFee, sdk.NilAckRelayerFee) if err != nil { logger.Error("failed to write AckCrossChainPackage", "err", err) return nil, nil, err diff --git a/x/oracle/keeper/msg_server_test.go b/x/oracle/keeper/msg_server_test.go index 1587355064..94be454885 100644 --- a/x/oracle/keeper/msg_server_test.go +++ b/x/oracle/keeper/msg_server_test.go @@ -51,11 +51,10 @@ func (s *TestSuite) TestClaim() { } payloadHeader := sdk.EncodePackageHeader(sdk.PackageHeader{ - PackageType: sdk.SynCrossChainPackageType, - Timestamp: 1992, - RelayerFee: big.NewInt(1), - AckRelayerFee: big.NewInt(1), - CallbackGasPrice: big.NewInt(1), + PackageType: sdk.SynCrossChainPackageType, + Timestamp: 1992, + RelayerFee: big.NewInt(1), + AckRelayerFee: big.NewInt(1), }) testPackage := types.Package{ @@ -155,11 +154,10 @@ func (s *TestSuite) TestInvalidClaim() { // invalid timestamp payloadHeader := sdk.EncodePackageHeader(sdk.PackageHeader{ - PackageType: sdk.SynCrossChainPackageType, - Timestamp: 1993, - RelayerFee: big.NewInt(1), - AckRelayerFee: big.NewInt(1), - CallbackGasPrice: big.NewInt(1), + PackageType: sdk.SynCrossChainPackageType, + Timestamp: 1993, + RelayerFee: big.NewInt(1), + AckRelayerFee: big.NewInt(1), }) testPackage := types.Package{ ChannelId: 1, diff --git a/x/oracle/types/event.pb.go b/x/oracle/types/event.pb.go index f75cad3da5..64e1c071be 100644 --- a/x/oracle/types/event.pb.go +++ b/x/oracle/types/event.pb.go @@ -44,8 +44,6 @@ type EventPackageClaim struct { RelayerFee string `protobuf:"bytes,9,opt,name=relayer_fee,json=relayerFee,proto3" json:"relayer_fee,omitempty"` // Relayer fee paid for the ACK or FAIL_ACK package AckRelayerFee string `protobuf:"bytes,10,opt,name=ack_relayer_fee,json=ackRelayerFee,proto3" json:"ack_relayer_fee,omitempty"` - // Callback gas price the ACK or FAIL_ACK package - CallbackGasPrice string `protobuf:"bytes,11,opt,name=callback_gas_price,json=callbackGasPrice,proto3" json:"callback_gas_price,omitempty"` } func (m *EventPackageClaim) Reset() { *m = EventPackageClaim{} } @@ -151,13 +149,6 @@ func (m *EventPackageClaim) GetAckRelayerFee() string { return "" } -func (m *EventPackageClaim) GetCallbackGasPrice() string { - if m != nil { - return m.CallbackGasPrice - } - return "" -} - func init() { proto.RegisterType((*EventPackageClaim)(nil), "cosmos.oracle.v1.EventPackageClaim") } @@ -165,31 +156,30 @@ func init() { func init() { proto.RegisterFile("cosmos/oracle/v1/event.proto", fileDescriptor_3e254cedc4112fb0) } var fileDescriptor_3e254cedc4112fb0 = []byte{ - // 378 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x4c, 0xd1, 0x4f, 0xea, 0xd3, 0x40, - 0x14, 0xc0, 0xf1, 0x8e, 0xfd, 0xb5, 0x36, 0xaf, 0x0d, 0xad, 0x83, 0x8b, 0x80, 0x1a, 0x63, 0x05, - 0x89, 0xa8, 0x09, 0xc5, 0x1b, 0x58, 0xaa, 0x74, 0x21, 0x94, 0xe8, 0xca, 0xcd, 0x30, 0x9d, 0x3c, - 0x93, 0x90, 0xbf, 0xce, 0xa4, 0xc1, 0xde, 0xc2, 0x8d, 0x77, 0x72, 0xd9, 0xa5, 0x4b, 0x69, 0x2f, - 0x22, 0x93, 0xa4, 0xd6, 0x55, 0xc8, 0xf7, 0x7d, 0x98, 0x81, 0x79, 0xf0, 0x58, 0x94, 0x2a, 0x2f, - 0x95, 0x5f, 0x4a, 0x2e, 0x32, 0xf4, 0x9b, 0x95, 0x8f, 0x0d, 0x16, 0xb5, 0x57, 0xc9, 0xb2, 0x2e, - 0xe9, 0xa2, 0x9b, 0x7a, 0xdd, 0xd4, 0x6b, 0x56, 0xcb, 0x9f, 0x43, 0x78, 0xb0, 0xd1, 0x62, 0xc7, - 0x45, 0xca, 0x23, 0x5c, 0x67, 0x3c, 0xc9, 0xa9, 0x03, 0x33, 0x25, 0x05, 0x13, 0x31, 0x4f, 0x0a, - 0x96, 0x84, 0x16, 0x71, 0x88, 0x6b, 0x06, 0xa0, 0xa4, 0x58, 0xeb, 0xb4, 0x0d, 0xe9, 0x12, 0xcc, - 0x10, 0x55, 0x7d, 0x23, 0xf7, 0x5a, 0x32, 0xd5, 0xf1, 0x6a, 0x9e, 0x00, 0x88, 0x98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49, 0x1d, 0x1f, 0xf6, 0x9e, 0x28, 0x73, 0xbf, 0x5f, 0x76, 0xf7, 0x79, 0xa3, 0xc2, - 0xd4, 0xff, 0x7e, 0xdd, 0xbc, 0x7e, 0x52, 0xb5, 0x1f, 0xb7, 0x7b, 0x7f, 0xfb, 0x37, 0x00, 0x00, - 0xff, 0xff, 0xd5, 0x7c, 0x15, 0x81, 0x17, 0x02, 0x00, 0x00, + // 357 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x4c, 0xd1, 0xcb, 0x6a, 0xdb, 0x40, + 0x14, 0x80, 0x61, 0x8f, 0x6f, 0xb5, 0x8e, 0x2d, 0xec, 0x0e, 0x5d, 0x08, 0xda, 0xaa, 0xaa, 0x0b, + 0x45, 0xa5, 0x54, 0xc2, 0xf4, 0x0d, 0x6a, 0x5c, 0xf0, 0xa2, 0x50, 0x94, 0xac, 0xb2, 0x11, 0xe3, + 0xd1, 0x89, 0x24, 0x74, 0xcd, 0x8c, 0x2c, 0xe2, 0xb7, 0xc8, 0x63, 0x65, 0xe9, 0x65, 0x96, 0xc1, + 0x5e, 0xe4, 0x35, 0x82, 0x2e, 0xb6, 0xb3, 0x12, 0xfa, 0xcf, 0xc7, 0x0c, 0xcc, 0x81, 0x4f, 0x3c, + 0x93, 0x49, 0x26, 0xed, 0x4c, 0x30, 0x1e, 0xa3, 0x5d, 0x2e, 0x6c, 0x2c, 0x31, 0x2d, 0xac, 0x5c, + 0x64, 0x45, 0x46, 0x67, 0xcd, 0xd4, 0x6a, 0xa6, 0x56, 0xb9, 0x98, 0xbf, 0x74, 0xe1, 0xfd, 0xaa, + 0x12, 0xff, 0x19, 0x8f, 0x98, 0x8f, 0xcb, 0x98, 0x85, 0x09, 0x35, 0x60, 0x22, 0x05, 0x77, 0x79, + 0xc0, 0xc2, 0xd4, 0x0d, 0x3d, 0x8d, 0x18, 0xc4, 0x54, 0x1d, 0x90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 0x8b, 0x67, 0x89, 0xdd, 0xae, 0xaf, 0xf9, 0xfc, 0x92, 0x5e, 0x64, 0xdf, 0x9f, 0x76, 0x59, + 0x3d, 0x92, 0xdc, 0x0c, 0xeb, 0x4d, 0xfe, 0x7e, 0x0d, 0x00, 0x00, 0xff, 0xff, 0x2d, 0x9f, 0x98, + 0x8f, 0xe9, 0x01, 0x00, 0x00, } func (m *EventPackageClaim) Marshal() (dAtA []byte, err error) { @@ -212,13 +202,6 @@ func (m *EventPackageClaim) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.CallbackGasPrice) > 0 { - i -= len(m.CallbackGasPrice) - copy(dAtA[i:], m.CallbackGasPrice) - i = encodeVarintEvent(dAtA, i, uint64(len(m.CallbackGasPrice))) - i-- - dAtA[i] = 0x5a - } if len(m.AckRelayerFee) > 0 { i -= len(m.AckRelayerFee) copy(dAtA[i:], m.AckRelayerFee) @@ -333,10 +316,6 @@ func (m *EventPackageClaim) Size() (n int) { if l > 0 { n += 1 + l + sovEvent(uint64(l)) } - l = len(m.CallbackGasPrice) - if l > 0 { - n += 1 + l + sovEvent(uint64(l)) - } return n } @@ -605,38 +584,6 @@ func (m *EventPackageClaim) Unmarshal(dAtA []byte) error { } m.AckRelayerFee = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CallbackGasPrice", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvent - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvent - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvent - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CallbackGasPrice = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipEvent(dAtA[iNdEx:]) diff --git a/x/oracle/types/expected_keepers.go b/x/oracle/types/expected_keepers.go index 72cc687d90..7bbc49fd00 100644 --- a/x/oracle/types/expected_keepers.go +++ b/x/oracle/types/expected_keepers.go @@ -16,7 +16,6 @@ type StakingKeeper interface { type CrossChainKeeper interface { CreateRawIBCPackageWithFee(ctx sdk.Context, channelID sdk.ChannelID, packageType sdk.CrossChainPackageType, packageLoad []byte, relayerFee *big.Int, ackRelayerFee *big.Int, - callbackGasPrice *big.Int, ) (uint64, error) GetCrossChainApp(channelID sdk.ChannelID) sdk.CrossChainApplication GetSrcChainID() sdk.ChainID diff --git a/x/params/types/proposal/proposal_test.go b/x/params/types/proposal/proposal_test.go index 3e95c2a3c9..74592f3a2b 100644 --- a/x/params/types/proposal/proposal_test.go +++ b/x/params/types/proposal/proposal_test.go @@ -59,4 +59,5 @@ func TestCrossChainUpgradeProposal(t *testing.T) { pcp = NewCrossChainParameterChangeProposal("test title", "test description", []ParamChange{pc2, pc3}, []string{"0x80C7Fa8FC825C5e622cdbcAEa0A22d188634BDd3", "0xA4A2957E858529FFABBBb483D1D704378a9fca6b"}) require.Equal(t, pcp.ValidateBasic(), ErrInvalidUpgradeProposal) + }