From a1779756858f9fd96109a73e8367c5b6c28da66e Mon Sep 17 00:00:00 2001 From: Alexgao001 Date: Thu, 16 Feb 2023 15:54:29 +0800 Subject: [PATCH 01/11] feat: enable cross chain params change by submitting proposal --- proto/cosmos/gov/v1/gov.proto | 1 + proto/cosmos/gov/v1/tx.proto | 2 + proto/cosmos/gov/v1beta1/gov.proto | 1 + proto/cosmos/gov/v1beta1/tx.proto | 1 + proto/cosmos/params/v1beta1/event.proto | 19 + proto/cosmos/params/v1beta1/params.proto | 2 + types/context.go | 2 - x/gashub/types/gas_calculator.go | 6 + x/gov/abci.go | 2 - x/gov/keeper/msg_server.go | 5 +- x/gov/keeper/proposal.go | 16 +- x/gov/migrations/v046/convert.go | 1 + x/gov/types/v1/content.go | 1 - x/gov/types/v1/gov.pb.go | 185 +++++---- x/gov/types/v1/tx.pb.go | 138 ++++--- x/gov/types/v1beta1/gov.pb.go | 204 ++++++---- x/gov/types/v1beta1/tx.pb.go | 124 +++--- x/params/keeper/keeper.go | 16 +- x/params/keeper/sync_params.go | 124 ++++++ x/params/proposal_handler.go | 9 + x/params/types/expected_keepers.go | 14 + x/params/types/proposal/errors.go | 17 +- x/params/types/proposal/event.pb.go | 457 +++++++++++++++++++++++ x/params/types/proposal/params.pb.go | 140 +++++-- x/params/types/proposal/proposal.go | 6 +- x/params/types/proposal/types.go | 22 ++ 26 files changed, 1228 insertions(+), 287 deletions(-) create mode 100644 proto/cosmos/params/v1beta1/event.proto create mode 100644 x/params/keeper/sync_params.go create mode 100644 x/params/types/expected_keepers.go create mode 100644 x/params/types/proposal/event.pb.go create mode 100644 x/params/types/proposal/types.go diff --git a/proto/cosmos/gov/v1/gov.proto b/proto/cosmos/gov/v1/gov.proto index 8a8572335d..995455721e 100644 --- a/proto/cosmos/gov/v1/gov.proto +++ b/proto/cosmos/gov/v1/gov.proto @@ -56,6 +56,7 @@ message Proposal { // metadata is any arbitrary metadata attached to the proposal. string metadata = 10; + bool cross_chain = 11; // flag for cross chain proposal } // ProposalStatus enumerates the valid statuses of a proposal. diff --git a/proto/cosmos/gov/v1/tx.proto b/proto/cosmos/gov/v1/tx.proto index 9306c51e8c..fc53b30f6c 100644 --- a/proto/cosmos/gov/v1/tx.proto +++ b/proto/cosmos/gov/v1/tx.proto @@ -40,6 +40,8 @@ message MsgSubmitProposal { string proposer = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // metadata is any arbitrary metadata attached to the proposal. string metadata = 4; + bool cross_chain = 5; + } // MsgSubmitProposalResponse defines the Msg/SubmitProposal response type. diff --git a/proto/cosmos/gov/v1beta1/gov.proto b/proto/cosmos/gov/v1beta1/gov.proto index 0e65d65b20..645ea6f446 100644 --- a/proto/cosmos/gov/v1beta1/gov.proto +++ b/proto/cosmos/gov/v1beta1/gov.proto @@ -82,6 +82,7 @@ message Proposal { [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; google.protobuf.Timestamp voting_start_time = 8 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; google.protobuf.Timestamp voting_end_time = 9 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; + bool cross_chain = 10; // flag for cross chain proposal } // ProposalStatus enumerates the valid statuses of a proposal. diff --git a/proto/cosmos/gov/v1beta1/tx.proto b/proto/cosmos/gov/v1beta1/tx.proto index 00ce2253ef..c0761ff871 100644 --- a/proto/cosmos/gov/v1beta1/tx.proto +++ b/proto/cosmos/gov/v1beta1/tx.proto @@ -42,6 +42,7 @@ message MsgSubmitProposal { repeated cosmos.base.v1beta1.Coin initial_deposit = 2 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; string proposer = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + bool cross_chain = 4; } // MsgSubmitProposalResponse defines the Msg/SubmitProposal response type. diff --git a/proto/cosmos/params/v1beta1/event.proto b/proto/cosmos/params/v1beta1/event.proto new file mode 100644 index 0000000000..f5e356ad23 --- /dev/null +++ b/proto/cosmos/params/v1beta1/event.proto @@ -0,0 +1,19 @@ +syntax = "proto3"; +package cosmos.params.v1beta1; + +option go_package = "github.com/cosmos/cosmos-sdk/x/params/types/proposal"; +option (gogoproto.equal_all) = true; + +import "gogoproto/gogo.proto"; +import "cosmos_proto/cosmos.proto"; + +// EventCrossTransferIn is emitted when a cross chain transfer in tx happened +message EventCrossParamsChange { + + // parameter key or UPGRADE_KEY_HASH + string key = 1; + // new parameter or new smart contract address(es) if is ungraded proposal + string value = 2; + // smart contract address(es) + string target = 3; +} \ No newline at end of file diff --git a/proto/cosmos/params/v1beta1/params.proto b/proto/cosmos/params/v1beta1/params.proto index da23e1a989..0a081a4631 100644 --- a/proto/cosmos/params/v1beta1/params.proto +++ b/proto/cosmos/params/v1beta1/params.proto @@ -16,6 +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) } // ParamChange defines an individual parameter change, for use in diff --git a/types/context.go b/types/context.go index 2add85e60c..914586900f 100644 --- a/types/context.go +++ b/types/context.go @@ -290,12 +290,10 @@ func (c Context) TransientStore(key storetypes.StoreKey) KVStore { func (c Context) CacheContext() (cc Context, writeCache func()) { cms := c.MultiStore().CacheMultiStore() cc = c.WithMultiStore(cms).WithEventManager(NewEventManager()) - writeCache = func() { c.EventManager().EmitEvents(cc.EventManager().Events()) cms.Write() } - return cc, writeCache } diff --git a/x/gashub/types/gas_calculator.go b/x/gashub/types/gas_calculator.go index f6676523ed..da95c4504a 100644 --- a/x/gashub/types/gas_calculator.go +++ b/x/gashub/types/gas_calculator.go @@ -2,6 +2,7 @@ package types import ( "fmt" + govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" "cosmossdk.io/errors" @@ -218,6 +219,11 @@ func init() { return FixedGasCalculator(fixedGas) }) + RegisterCalculatorGen(types.MsgTypeURL(&govv1beta1.MsgSubmitProposal{}), func(params Params) GasCalculator { + fixedGas := params.GetMsgSubmitProposalGas() + return FixedGasCalculator(fixedGas) + }) + // these msgs are from greenfield, so the msg types need to be hard coded. RegisterCalculatorGen("/bnbchain.greenfield.bridge.MsgTransferOut", func(params Params) GasCalculator { fixedGas := params.GetMsgTransferOutGas() diff --git a/x/gov/abci.go b/x/gov/abci.go index cde12c34a8..d493e90cf1 100644 --- a/x/gov/abci.go +++ b/x/gov/abci.go @@ -83,8 +83,6 @@ func EndBlocker(ctx sdk.Context, keeper keeper.Keeper) { proposal.Status = v1.StatusPassed tagValue = types.AttributeValueProposalPassed logMsg = "passed" - - // write state to the underlying multi-store writeCache() } else { proposal.Status = v1.StatusFailed diff --git a/x/gov/keeper/msg_server.go b/x/gov/keeper/msg_server.go index a76ba1f262..7072f08bf3 100644 --- a/x/gov/keeper/msg_server.go +++ b/x/gov/keeper/msg_server.go @@ -35,7 +35,7 @@ func (k msgServer) SubmitProposal(goCtx context.Context, msg *v1.MsgSubmitPropos return nil, err } - proposal, err := k.Keeper.SubmitProposal(ctx, proposalMsgs, msg.Metadata) + proposal, err := k.Keeper.SubmitProposal(ctx, proposalMsgs, msg.Metadata, msg.CrossChain) if err != nil { return nil, err } @@ -233,6 +233,9 @@ func (k legacyMsgServer) SubmitProposal(goCtx context.Context, msg *v1beta1.MsgS if err != nil { return nil, err } + if msg.CrossChain { + proposal.CrossChain = true + } resp, err := k.server.SubmitProposal(goCtx, proposal) if err != nil { diff --git a/x/gov/keeper/proposal.go b/x/gov/keeper/proposal.go index 64088859c6..30eb8a0b51 100644 --- a/x/gov/keeper/proposal.go +++ b/x/gov/keeper/proposal.go @@ -11,7 +11,7 @@ import ( ) // SubmitProposal creates a new proposal given an array of messages -func (keeper Keeper) SubmitProposal(ctx sdk.Context, messages []sdk.Msg, metadata string) (v1.Proposal, error) { +func (keeper Keeper) SubmitProposal(ctx sdk.Context, messages []sdk.Msg, metadata string, crossChain bool) (v1.Proposal, error) { err := keeper.assertMetadataLength(metadata) if err != nil { return v1.Proposal{}, err @@ -69,6 +69,17 @@ func (keeper Keeper) SubmitProposal(ctx sdk.Context, messages []sdk.Msg, metadat depositPeriod := keeper.GetDepositParams(ctx).MaxDepositPeriod proposal, err := v1.NewProposal(messages, proposalID, metadata, submitTime, submitTime.Add(*depositPeriod)) + proposal.CrossChain = crossChain + + fmt.Println("---------------------crosschian is: ", crossChain) + fmt.Println("---------------------proposal.CrossChain is: ", proposal.CrossChain) + keeper.Logger(ctx).Info( + fmt.Sprintf("---------------------crosschian is: %t", crossChain), + ) + keeper.Logger(ctx).Info( + fmt.Sprintf("---------------------proposal.CrossChain is: %t", proposal.CrossChain), + ) + if err != nil { return v1.Proposal{}, err } @@ -88,6 +99,9 @@ func (keeper Keeper) SubmitProposal(ctx sdk.Context, messages []sdk.Msg, metadat ), ) + keeper.Logger(ctx).Info( + fmt.Sprintf("---------------------proposal.CrossChain is: %t", proposal.CrossChain), + ) return proposal, nil } diff --git a/x/gov/migrations/v046/convert.go b/x/gov/migrations/v046/convert.go index 267418064e..456f7458ba 100644 --- a/x/gov/migrations/v046/convert.go +++ b/x/gov/migrations/v046/convert.go @@ -19,6 +19,7 @@ func ConvertToLegacyProposal(proposal v1.Proposal) (v1beta1.Proposal, error) { ProposalId: proposal.Id, Status: v1beta1.ProposalStatus(proposal.Status), TotalDeposit: types.NewCoins(proposal.TotalDeposit...), + CrossChain: proposal.CrossChain, } legacyProposal.FinalTallyResult, err = ConvertToLegacyTallyResult(proposal.FinalTallyResult) diff --git a/x/gov/types/v1/content.go b/x/gov/types/v1/content.go index fbfe5de3cd..1f2208f352 100644 --- a/x/gov/types/v1/content.go +++ b/x/gov/types/v1/content.go @@ -17,7 +17,6 @@ func NewLegacyContent(content v1beta1.Content, authority string) (*MsgExecLegacy if !ok { return nil, fmt.Errorf("%T does not implement proto.Message", content) } - any, err := codectypes.NewAnyWithValue(msg) if err != nil { return nil, err diff --git a/x/gov/types/v1/gov.pb.go b/x/gov/types/v1/gov.pb.go index 36b207454f..bd8708636d 100644 --- a/x/gov/types/v1/gov.pb.go +++ b/x/gov/types/v1/gov.pb.go @@ -250,7 +250,8 @@ type Proposal struct { VotingStartTime *time.Time `protobuf:"bytes,8,opt,name=voting_start_time,json=votingStartTime,proto3,stdtime" json:"voting_start_time,omitempty"` VotingEndTime *time.Time `protobuf:"bytes,9,opt,name=voting_end_time,json=votingEndTime,proto3,stdtime" json:"voting_end_time,omitempty"` // metadata is any arbitrary metadata attached to the proposal. - Metadata string `protobuf:"bytes,10,opt,name=metadata,proto3" json:"metadata,omitempty"` + Metadata string `protobuf:"bytes,10,opt,name=metadata,proto3" json:"metadata,omitempty"` + CrossChain bool `protobuf:"varint,11,opt,name=cross_chain,json=crossChain,proto3" json:"cross_chain,omitempty"` } func (m *Proposal) Reset() { *m = Proposal{} } @@ -356,6 +357,13 @@ func (m *Proposal) GetMetadata() string { return "" } +func (m *Proposal) GetCrossChain() bool { + if m != nil { + return m.CrossChain + } + return false +} + // TallyResult defines a standard tally for a governance proposal. type TallyResult struct { YesCount string `protobuf:"bytes,1,opt,name=yes_count,json=yesCount,proto3" json:"yes_count,omitempty"` @@ -680,76 +688,78 @@ func init() { func init() { proto.RegisterFile("cosmos/gov/v1/gov.proto", fileDescriptor_e05cb1c0d030febb) } var fileDescriptor_e05cb1c0d030febb = []byte{ - // 1104 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x56, 0x4f, 0x53, 0xdb, 0x46, - 0x14, 0x47, 0xb6, 0x30, 0xe6, 0x19, 0x1b, 0x75, 0xa1, 0x45, 0x90, 0x60, 0x13, 0x4f, 0xdb, 0xa1, - 0xa4, 0xd8, 0x25, 0x99, 0xb6, 0x33, 0xcd, 0xc9, 0xc6, 0x4a, 0x31, 0xc3, 0x60, 0x57, 0x52, 0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x8d, 0x66, 0x43, - 0xab, 0x1c, 0x19, 0x9a, 0x5e, 0xd1, 0x9f, 0x69, 0xb1, 0x9e, 0x8a, 0x90, 0x8f, 0x03, 0x6a, 0x4a, - 0xb3, 0xa1, 0xd5, 0x75, 0xa3, 0xa9, 0xa8, 0xf5, 0x46, 0x4d, 0x12, 0xd0, 0x03, 0xd8, 0x8c, 0x63, - 0x5a, 0x0d, 0xbd, 0x7e, 0xfc, 0x7d, 0x04, 0x49, 0xa0, 0x0d, 0xf8, 0x24, 0x0e, 0x69, 0x56, 0x34, - 0x4d, 0xa9, 0x85, 0x4d, 0xc7, 0x73, 0xaa, 0x72, 0xa8, 0xec, 0xeb, 0x4a, 0x4d, 0x12, 0x6f, 0x62, - 0x3e, 0xad, 0xd4, 0x8f, 0x94, 0x9a, 0x34, 0x5f, 0x55, 0xde, 0x9c, 0xe7, 0x85, 0xb7, 0xe7, 0x79, - 0xe1, 0xbf, 0xf3, 0xbc, 0xf0, 0xea, 0x22, 0x3f, 0xf7, 0xf6, 0x22, 0x3f, 0xf7, 0xf7, 0x45, 0x7e, - 0xee, 0xc7, 0x87, 0x1d, 0x87, 0x76, 0x07, 0xed, 0xd2, 0x29, 0x76, 0xf9, 0x0f, 0x0a, 0xbf, 0xec, - 0x12, 0xeb, 0xa7, 0xf2, 0x19, 0xfb, 0xe9, 0xa2, 0xa3, 0xbe, 0x4d, 0x82, 0x3f, 0xaa, 0x14, 0xb3, - 0xeb, 0xe3, 0xf7, 0x01, 0x00, 0x00, 0xff, 0xff, 0x73, 0xa8, 0x09, 0x8c, 0x92, 0x09, 0x00, 0x00, + // 1127 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x56, 0xcd, 0x6e, 0xdb, 0x46, + 0x17, 0x35, 0x25, 0x5a, 0x96, 0xaf, 0x2c, 0x85, 0xdf, 0x24, 0x5f, 0x4d, 0x3b, 0xb1, 0xe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 0x58, 0xb3, 0x09, 0x00, 0x00, } func (m *WeightedVoteOption) Marshal() (dAtA []byte, err error) { @@ -856,6 +866,16 @@ func (m *Proposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.CrossChain { + i-- + if m.CrossChain { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x58 + } if len(m.Metadata) > 0 { i -= len(m.Metadata) copy(dAtA[i:], m.Metadata) @@ -1284,6 +1304,9 @@ func (m *Proposal) Size() (n int) { if l > 0 { n += 1 + l + sovGov(uint64(l)) } + if m.CrossChain { + n += 2 + } return n } @@ -1980,6 +2003,26 @@ func (m *Proposal) Unmarshal(dAtA []byte) error { } m.Metadata = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 11: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CrossChain", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGov + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.CrossChain = bool(v != 0) default: iNdEx = preIndex skippy, err := skipGov(dAtA[iNdEx:]) diff --git a/x/gov/types/v1/tx.pb.go b/x/gov/types/v1/tx.pb.go index 25696059d9..ad96ae007f 100644 --- a/x/gov/types/v1/tx.pb.go +++ b/x/gov/types/v1/tx.pb.go @@ -39,7 +39,8 @@ type MsgSubmitProposal struct { InitialDeposit []types1.Coin `protobuf:"bytes,2,rep,name=initial_deposit,json=initialDeposit,proto3" json:"initial_deposit"` Proposer string `protobuf:"bytes,3,opt,name=proposer,proto3" json:"proposer,omitempty"` // metadata is any arbitrary metadata attached to the proposal. - Metadata string `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"` + Metadata string `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"` + CrossChain bool `protobuf:"varint,5,opt,name=cross_chain,json=crossChain,proto3" json:"cross_chain,omitempty"` } func (m *MsgSubmitProposal) Reset() { *m = MsgSubmitProposal{} } @@ -103,6 +104,13 @@ func (m *MsgSubmitProposal) GetMetadata() string { return "" } +func (m *MsgSubmitProposal) GetCrossChain() bool { + if m != nil { + return m.CrossChain + } + return false +} + // MsgSubmitProposalResponse defines the Msg/SubmitProposal response type. type MsgSubmitProposalResponse struct { ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` @@ -567,53 +575,54 @@ func init() { func init() { proto.RegisterFile("cosmos/gov/v1/tx.proto", fileDescriptor_9ff8f4a63b6fc9a9) } var fileDescriptor_9ff8f4a63b6fc9a9 = []byte{ - // 734 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x95, 0xcf, 0x6a, 0xdb, 0x4a, - 0x14, 0xc6, 0xad, 0xd8, 0x37, 0x4e, 0x4e, 0x6e, 0x1c, 0x32, 0x98, 0x44, 0x16, 0x41, 0x71, 0x7c, - 0xe1, 0x62, 0x6e, 0x88, 0x14, 0xe7, 0x96, 0x16, 0x92, 0x52, 0x88, 0xd3, 0xd0, 0x16, 0x6a, 0x5a, - 0x14, 0x48, 0xa1, 0x14, 0x82, 0x6c, 0x4d, 0x27, 0xa2, 0x91, 0x46, 0x68, 0xc6, 0x26, 0x5e, 0xb6, - 0x4f, 0xd0, 0xf7, 0xe8, 0xa6, 0x8b, 0xec, 0xbb, 0x2b, 0xa1, 0xab, 0xd0, 0x55, 0x56, 0xa1, 0x24, - 0x8b, 0x42, 0x57, 0x7d, 0x84, 0x22, 0xcd, 0x48, 0x4e, 0xac, 0xfc, 0xeb, 0xa6, 0x2b, 0x4b, 0xe7, - 0x7c, 0xdf, 0x99, 0xf3, 0xd3, 0xcc, 0xf1, 0xc0, 0x4c, 0x87, 0x32, 0x8f, 0x32, 0x93, 0xd0, 0x9e, -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a6, 0xb4, 0x85, 0x2b, 0x53, 0x49, 0xa1, 0xe6, 0xe6, 0xe1, 0xa9, 0xae, 0x1c, 0x9d, 0xea, - 0xca, 0xb7, 0x53, 0x5d, 0x79, 0x7f, 0xa6, 0xe7, 0x8e, 0xce, 0xf4, 0xdc, 0xf1, 0x99, 0x9e, 0x7b, - 0xb9, 0x48, 0x5c, 0xbe, 0xdb, 0x6d, 0x1b, 0x1d, 0xea, 0xc9, 0x3b, 0x49, 0xfe, 0x2c, 0x31, 0xe7, - 0x8d, 0xb9, 0x1f, 0x5f, 0x6e, 0xbc, 0x1f, 0x60, 0x16, 0xdd, 0x80, 0xa3, 0xf1, 0x1f, 0xe2, 0xff, - 0xbf, 0x02, 0x00, 0x00, 0xff, 0xff, 0xb7, 0xdb, 0x52, 0x42, 0x41, 0x07, 0x00, 0x00, + // 752 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x55, 0xcf, 0x6b, 0x13, 0x41, + 0x14, 0xce, 0x36, 0x69, 0xd3, 0xbe, 0xda, 0x94, 0x2e, 0xa1, 0xdd, 0x2c, 0x65, 0x9b, 0x46, 0x90, + 0x60, 0xe9, 0x6e, 0x53, 0x45, 0xa1, 0x15, 0xa1, 0xa9, 0x45, 0x05, 0x83, 0xb2, 0x85, 0x0a, 0x22, + 0x84, 0xcd, 0xee, 0x38, 0x59, 0x6c, 0x76, 0x96, 0x9d, 0x49, 0x68, 0x8e, 0xfa, 0x17, 0xe8, 0xdf, + 0xe1, 0xc5, 0x43, 0xef, 0xde, 0xa4, 0x78, 0x2a, 0x9e, 0x7a, 0x2a, 0xd2, 0x1e, 0x04, 0xff, 0x0a, + 0xd9, 0x9d, 0xd9, 0x4d, 0x9b, 0xed, 0x2f, 0x2f, 0x9e, 0x76, 0xe6, 0x7b, 0xdf, 0xf7, 0xe6, 0x7d, + 0x33, 0xf3, 0x76, 0x60, 0xd6, 0x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x31, 0x9e, 0xe8, 0x77, 0xe0, 0xd6, + 0xb9, 0x6b, 0x7d, 0x09, 0x3f, 0x8e, 0xab, 0x77, 0xae, 0x8e, 0x27, 0x79, 0x9f, 0x42, 0x3e, 0xbe, + 0x38, 0xa5, 0xb4, 0x44, 0x84, 0xd4, 0xc5, 0x4b, 0x43, 0x71, 0xa2, 0xfa, 0xd6, 0xc1, 0x89, 0x26, + 0x1d, 0x9e, 0x68, 0xd2, 0xaf, 0x13, 0x4d, 0xfa, 0x74, 0xaa, 0x65, 0x0e, 0x4f, 0xb5, 0xcc, 0xd1, + 0xa9, 0x96, 0x79, 0xb3, 0x84, 0x5d, 0xd6, 0xee, 0xb6, 0x74, 0x9b, 0x74, 0xc4, 0xa3, 0x25, 0x3e, + 0xcb, 0xd4, 0x79, 0x6f, 0xec, 0x45, 0xaf, 0x1f, 0xeb, 0xfb, 0x88, 0x86, 0x4f, 0xe4, 0x58, 0xf4, + 0x43, 0xbc, 0xf7, 0x37, 0x00, 0x00, 0xff, 0xff, 0x81, 0x05, 0x6d, 0x17, 0x62, 0x07, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -872,6 +881,16 @@ func (m *MsgSubmitProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.CrossChain { + i-- + if m.CrossChain { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x28 + } if len(m.Metadata) > 0 { i -= len(m.Metadata) copy(dAtA[i:], m.Metadata) @@ -1268,6 +1287,9 @@ func (m *MsgSubmitProposal) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } + if m.CrossChain { + n += 2 + } return n } @@ -1574,6 +1596,26 @@ func (m *MsgSubmitProposal) Unmarshal(dAtA []byte) error { } m.Metadata = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CrossChain", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.CrossChain = bool(v != 0) default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) diff --git a/x/gov/types/v1beta1/gov.pb.go b/x/gov/types/v1beta1/gov.pb.go index 3fc60128b1..1371d084fc 100644 --- a/x/gov/types/v1beta1/gov.pb.go +++ b/x/gov/types/v1beta1/gov.pb.go @@ -254,6 +254,7 @@ type Proposal struct { TotalDeposit github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,7,rep,name=total_deposit,json=totalDeposit,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"total_deposit"` VotingStartTime time.Time `protobuf:"bytes,8,opt,name=voting_start_time,json=votingStartTime,proto3,stdtime" json:"voting_start_time"` VotingEndTime time.Time `protobuf:"bytes,9,opt,name=voting_end_time,json=votingEndTime,proto3,stdtime" json:"voting_end_time"` + CrossChain bool `protobuf:"varint,10,opt,name=cross_chain,json=crossChain,proto3" json:"cross_chain,omitempty"` } func (m *Proposal) Reset() { *m = Proposal{} } @@ -513,92 +514,93 @@ func init() { func init() { proto.RegisterFile("cosmos/gov/v1beta1/gov.proto", fileDescriptor_6e82113c1a9a4b7c) } var fileDescriptor_6e82113c1a9a4b7c = []byte{ - // 1358 bytes of a gzipped FileDescriptorProto + // 1376 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x57, 0xcf, 0x6f, 0x13, 0x47, 0x1b, 0xf6, 0xda, 0x8e, 0x93, 0xbc, 0x76, 0x92, 0x65, 0xc8, 0x07, 0x8e, 0x3f, 0x3e, 0x7b, 0xe5, 0x4f, 0xa2, 0x11, 0x22, 0x0e, 0xa4, 0x12, 0x52, 0x43, 0x2f, 0x76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 0xa8, 0x3f, 0xd0, 0x66, + 0xe5, 0xab, 0x14, 0xfe, 0x1a, 0x37, 0x18, 0x3e, 0x55, 0x7f, 0x3d, 0x5f, 0xda, 0xd0, 0x8b, 0xea, + 0xc4, 0xb0, 0xfe, 0xba, 0xed, 0xb6, 0xb0, 0x23, 0xd2, 0x59, 0xa8, 0x3f, 0x7b, 0x9d, 0x0e, 0xbd, + 0x7c, 0x9d, 0x0e, 0x7d, 0x7b, 0x90, 0x0e, 0x3d, 0x3b, 0x48, 0x2b, 0xcf, 0x0f, 0xd2, 0xca, 0x1f, + 0x07, 0x69, 0xe5, 0xd1, 0x9b, 0x74, 0xe8, 0xf9, 0x9b, 0x74, 0xe8, 0xe5, 0x9b, 0x74, 0xe8, 0xee, + 0xb5, 0x7f, 0x2d, 0xd8, 0x5d, 0xfe, 0x51, 0xc4, 0xcb, 0x36, 0xf8, 0xce, 0xd9, 0x8a, 0xf1, 0xc9, + 0xf0, 0xe9, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x93, 0x03, 0xf6, 0xff, 0x37, 0x0d, 0x00, 0x00, } func (this *TextProposal) Equal(that interface{}) bool { @@ -679,6 +681,9 @@ func (this *Proposal) Equal(that interface{}) bool { if !this.VotingEndTime.Equal(that1.VotingEndTime) { return false } + if this.CrossChain != that1.CrossChain { + return false + } return true } func (this *TallyResult) Equal(that interface{}) bool { @@ -858,6 +863,16 @@ func (m *Proposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.CrossChain { + i-- + if m.CrossChain { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x50 + } n1, err1 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.VotingEndTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.VotingEndTime):]) if err1 != nil { return 0, err1 @@ -1281,6 +1296,9 @@ func (m *Proposal) Size() (n int) { n += 1 + l + sovGov(uint64(l)) l = github_com_gogo_protobuf_types.SizeOfStdTime(m.VotingEndTime) n += 1 + l + sovGov(uint64(l)) + if m.CrossChain { + n += 2 + } return n } @@ -2029,6 +2047,26 @@ func (m *Proposal) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CrossChain", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGov + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.CrossChain = bool(v != 0) default: iNdEx = preIndex skippy, err := skipGov(dAtA[iNdEx:]) diff --git a/x/gov/types/v1beta1/tx.pb.go b/x/gov/types/v1beta1/tx.pb.go index c774859228..b4bf6fc69e 100644 --- a/x/gov/types/v1beta1/tx.pb.go +++ b/x/gov/types/v1beta1/tx.pb.go @@ -39,6 +39,7 @@ type MsgSubmitProposal struct { Content *types.Any `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"` InitialDeposit github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=initial_deposit,json=initialDeposit,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"initial_deposit"` Proposer string `protobuf:"bytes,3,opt,name=proposer,proto3" json:"proposer,omitempty"` + CrossChain bool `protobuf:"varint,4,opt,name=cross_chain,json=crossChain,proto3" json:"cross_chain,omitempty"` } func (m *MsgSubmitProposal) Reset() { *m = MsgSubmitProposal{} } @@ -364,50 +365,52 @@ func init() { func init() { proto.RegisterFile("cosmos/gov/v1beta1/tx.proto", fileDescriptor_3c053992595e3dce) } var fileDescriptor_3c053992595e3dce = []byte{ - // 685 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0xcf, 0x4f, 0x13, 0x4f, - 0x14, 0xdf, 0x6d, 0xf9, 0xd2, 0x2f, 0x53, 0x03, 0x61, 0xd3, 0x84, 0x76, 0xd1, 0xdd, 0xa6, 0x46, - 0xd2, 0x68, 0xba, 0x0b, 0xd5, 0x70, 0xc0, 0x13, 0xc5, 0x18, 0x35, 0x69, 0xd4, 0x25, 0xd1, 0xc4, - 0x0b, 0xb6, 0xdd, 0x61, 0xd8, 0x48, 0xf7, 0x6d, 0x3a, 0xd3, 0x06, 0x6e, 0xc6, 0x93, 0x47, 0x8f, - 0x26, 0x5e, 0x38, 0x7b, 0x30, 0x1e, 0xf8, 0x23, 0x88, 0x27, 0xe2, 0x45, 0x0f, 0x06, 0x0d, 0x1c, - 0x34, 0xc6, 0xff, 0xc0, 0x8b, 0xd9, 0xf9, 0xb1, 0x45, 0x28, 0x05, 0x12, 0x4f, 0xbb, 0x33, 0x9f, - 0xcf, 0xe7, 0xbd, 0xf9, 0xbc, 0x79, 0x6f, 0x17, 0x4d, 0xb7, 0x80, 0xb6, 0x81, 0xba, 0x04, 0x7a, - 0x6e, 0x6f, 0xae, 0x89, 0x59, 0x63, 0xce, 0x65, 0x1b, 0x4e, 0xd4, 0x01, 0x06, 0x86, 0x21, 0x40, - 0x87, 0x40, 0xcf, 0x91, 0xa0, 0x69, 0x49, 0x41, 0xb3, 0x41, 0x71, 0xa2, 0x68, 0x41, 0x10, 0x0a, - 0x8d, 0x79, 0x71, 0x40, 0xc0, 0x58, 0x2f, 0xd0, 0x82, 0x40, 0x57, 0xf8, 0xca, 0x95, 0xe1, 0x05, - 0x94, 0x23, 0x40, 0x40, 0xec, 0xc7, 0x6f, 0x4a, 0x40, 0x00, 0xc8, 0x3a, 0x76, 0xf9, 0xaa, 0xd9, - 0x5d, 0x75, 0x1b, 0xe1, 0xa6, 0x84, 0xa6, 0x64, 0xa6, 0x36, 0x25, 0x6e, 0x6f, 0x2e, 0x7e, 0x08, - 0xa0, 0xf4, 0x26, 0x85, 0x26, 0xeb, 0x94, 0x2c, 0x77, 0x9b, 0xed, 0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 0x1a, 0x3f, 0xf2, 0xf5, 0xb8, 0x32, 0xe8, 0x6e, - 0x8e, 0xcd, 0x91, 0x59, 0x39, 0x13, 0x2d, 0x19, 0xb7, 0x3b, 0x68, 0x84, 0x0f, 0xce, 0xf4, 0x09, - 0xb2, 0x18, 0x34, 0x2f, 0x0f, 0x01, 0x93, 0x48, 0x4f, 0xd1, 0x85, 0xbf, 0xda, 0x77, 0x98, 0x48, - 0x91, 0xcc, 0x6b, 0x67, 0x20, 0x25, 0x19, 0x1e, 0xa2, 0x8c, 0xea, 0x15, 0xeb, 0x04, 0x9d, 0xc4, - 0xcd, 0x99, 0xe1, 0xb8, 0x0a, 0x59, 0xbb, 0xb7, 0xb3, 0x6f, 0xe9, 0xbb, 0xfb, 0x96, 0xfe, 0x6d, - 0xdf, 0xd2, 0x5f, 0x1d, 0x58, 0xda, 0xee, 0x81, 0xa5, 0x7d, 0x3e, 0xb0, 0xb4, 0x27, 0xb3, 0x43, - 0x2f, 0x7c, 0x83, 0xff, 0x5d, 0xf8, 0xb5, 0xab, 0x7f, 0x4c, 0x73, 0x94, 0x7f, 0xc5, 0xaf, 0xff, - 0x09, 0x00, 0x00, 0xff, 0xff, 0xee, 0x48, 0x3c, 0xfd, 0xd1, 0x06, 0x00, 0x00, + // 707 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0x31, 0x6f, 0xd3, 0x40, + 0x14, 0xb6, 0x93, 0xd0, 0xb4, 0x17, 0xd4, 0xaa, 0x56, 0xa4, 0x3a, 0x2e, 0xd8, 0x51, 0x10, 0x55, + 0x04, 0x8a, 0xdd, 0x06, 0xd4, 0xa1, 0x4c, 0x4d, 0x11, 0x02, 0xa4, 0x08, 0x70, 0x25, 0x90, 0x58, + 0x82, 0x63, 0x5f, 0xaf, 0x16, 0x8d, 0xcf, 0xf2, 0x5d, 0xa2, 0x76, 0x43, 0x4c, 0x8c, 0x8c, 0x8c, + 0x9d, 0x19, 0x10, 0x43, 0x47, 0x7e, 0x40, 0xc5, 0x54, 0xb1, 0xc0, 0x80, 0x0a, 0x6a, 0x07, 0x10, + 0xe2, 0x1f, 0xb0, 0x20, 0xfb, 0xee, 0x9c, 0xd2, 0xa4, 0x69, 0x2b, 0x31, 0xd9, 0xf7, 0xbe, 0xf7, + 0xbd, 0xf7, 0xbe, 0x77, 0xef, 0xd9, 0x60, 0xd6, 0xc5, 0xa4, 0x83, 0x89, 0x85, 0x70, 0xcf, 0xea, + 0x2d, 0xb4, 0x21, 0x75, 0x16, 0x2c, 0xba, 0x69, 0x86, 0x11, 0xa6, 0x58, 0x51, 0x18, 0x68, 0x22, + 0xdc, 0x33, 0x39, 0xa8, 0xe9, 0x9c, 0xd0, 0x76, 0x08, 0x4c, 0x19, 0x2e, 0xf6, 0x03, 0xc6, 0xd1, + 0x2e, 0x0d, 0x09, 0x18, 0xf3, 0x19, 0x5a, 0x62, 0x68, 0x2b, 0x39, 0x59, 0x3c, 0x3c, 0x83, 0x8a, + 0x08, 0x23, 0xcc, 0xec, 0xf1, 0x9b, 0x20, 0x20, 0x8c, 0xd1, 0x06, 0xb4, 0x92, 0x53, 0xbb, 0xbb, + 0x66, 0x39, 0xc1, 0x16, 0x87, 0x66, 0x78, 0xa6, 0x0e, 0x41, 0x56, 0x6f, 0x21, 0x7e, 0x30, 0xa0, + 0xf2, 0x21, 0x03, 0xa6, 0x9b, 0x04, 0xad, 0x76, 0xdb, 0x1d, 0x9f, 0x3e, 0x8c, 0x70, 0x88, 0x89, + 0xb3, 0xa1, 0xdc, 0x02, 0x79, 0x17, 0x07, 0x14, 0x06, 0x54, 0x95, 0xcb, 0x72, 0xb5, 0x50, 0x2f, + 0x9a, 0x2c, 0xb6, 0x29, 0x62, 0x9b, 0xcb, 0xc1, 0x56, 0xa3, 0xf0, 0x71, 0xa7, 0x96, 0x5f, 0x61, + 0x8e, 0xb6, 0x60, 0x28, 0x14, 0x4c, 0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 0x7b, 0x02, 0x2d, 0x06, 0xb5, 0x2b, 0x23, 0xc0, 0x34, 0xd2, 0x33, 0x70, 0xf1, + 0x9f, 0xf1, 0x1d, 0x45, 0x12, 0x4e, 0xda, 0xf5, 0x33, 0x38, 0xa5, 0x19, 0x1e, 0x81, 0xbc, 0x98, + 0x15, 0xfd, 0x04, 0x1e, 0xc7, 0xb5, 0xb9, 0xd1, 0xb8, 0x08, 0xd9, 0xb8, 0xbf, 0x7b, 0xa0, 0xcb, + 0x7b, 0x07, 0xba, 0xfc, 0xfd, 0x40, 0x97, 0x5f, 0x1f, 0xea, 0xd2, 0xde, 0xa1, 0x2e, 0x7d, 0x39, + 0xd4, 0xa5, 0xa7, 0xf3, 0x23, 0x2f, 0x7c, 0x33, 0xf9, 0xfd, 0x24, 0xd7, 0x2e, 0x7e, 0x42, 0xed, + 0xb1, 0xe4, 0x33, 0x7f, 0xe3, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xca, 0x2f, 0xf3, 0x0e, 0xf2, + 0x06, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -630,6 +633,16 @@ func (m *MsgSubmitProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.CrossChain { + i-- + if m.CrossChain { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + } if len(m.Proposer) > 0 { i -= len(m.Proposer) copy(dAtA[i:], m.Proposer) @@ -932,6 +945,9 @@ func (m *MsgSubmitProposal) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } + if m.CrossChain { + n += 2 + } return n } @@ -1174,6 +1190,26 @@ func (m *MsgSubmitProposal) Unmarshal(dAtA []byte) error { } m.Proposer = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CrossChain", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.CrossChain = bool(v != 0) default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) diff --git a/x/params/keeper/keeper.go b/x/params/keeper/keeper.go index 362231a56a..4450ea7ce9 100644 --- a/x/params/keeper/keeper.go +++ b/x/params/keeper/keeper.go @@ -11,11 +11,12 @@ import ( // Keeper of the global paramstore type Keeper struct { - cdc codec.BinaryCodec - legacyAmino *codec.LegacyAmino - key storetypes.StoreKey - tkey storetypes.StoreKey - spaces map[string]*types.Subspace + cdc codec.BinaryCodec + legacyAmino *codec.LegacyAmino + key storetypes.StoreKey + tkey storetypes.StoreKey + spaces map[string]*types.Subspace + CrossChainKeeper *types.CrossChainKeeper } // NewKeeper constructs a params keeper @@ -29,6 +30,11 @@ func NewKeeper(cdc codec.BinaryCodec, legacyAmino *codec.LegacyAmino, key, tkey } } +// SetCrossChainKeeper sets the crosschainkeeper after its initialization +func (k *Keeper) SetCrossChainKeeper(crossChainKeeper types.CrossChainKeeper) { + k.CrossChainKeeper = &crossChainKeeper +} + // Logger returns a module-specific logger. func (k Keeper) Logger(ctx sdk.Context) log.Logger { return ctx.Logger().With("module", "x/"+proposal.ModuleName) diff --git a/x/params/keeper/sync_params.go b/x/params/keeper/sync_params.go new file mode 100644 index 0000000000..52d52bfe9e --- /dev/null +++ b/x/params/keeper/sync_params.go @@ -0,0 +1,124 @@ +package keeper + +import ( + "fmt" + "github.com/cosmos/cosmos-sdk/bsc/rlp" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + types "github.com/cosmos/cosmos-sdk/x/params/types/proposal" + "math/big" +) + +func (k Keeper) SyncParams(ctx sdk.Context, p *types.ParameterChangeProposal) error { + k.Logger(ctx).Info( + fmt.Sprintf("SyncParams p.CrossChain %t", p.CrossChain), + ) + + key := p.Changes[0].Key + values := make([]byte, 0) + addresses := make([]byte, 0) + + if len(p.Changes) != len(p.Addresses) { + return sdkerrors.Wrap(types.ErrAddressSizeNotMatch, "number of addresses not match") + } + if key != "upgrade" && len(p.Changes) > 1 { + return sdkerrors.Wrap(types.ErrExceedParamsChangeLimit, "Only single parameter change allowed") + } + + k.Logger(ctx).Info( + fmt.Sprintf("SyncParams validatiors done"), + ) + + for i, c := range p.Changes { + values = append(values, []byte(c.Value)...) + adr, err := sdk.AccAddressFromHexUnsafe(p.Addresses[i]) + if err != nil { + return sdkerrors.Wrapf(types.ErrAddressNotValid, "Smart contract address is not valid %s", p.Addresses[i]) + } + addresses = append(addresses, adr.Bytes()...) + } + + relayerFeeAmount, err := k.GetSyncParamsChangeRelayerFee(ctx) + if err != nil { + return err + } + + k.Logger(ctx).Info( + fmt.Sprintf("SyncParams realyerFeeAmount %d", relayerFeeAmount), + ) + + pack := types.SyncParamsChangePackage{ + Key: key, + Values: values, + Targets: addresses, + } + + encodedPackage, err := rlp.EncodeToBytes(pack) + if err != nil { + return sdkerrors.Wrapf(types.ErrInvalidPackage, "encode sync params package error") + } + kp := *k.CrossChainKeeper + + k.Logger(ctx).Info( + fmt.Sprintf("SyncParams CreateRawIBCPackageWithFee"), + ) + seq, err := kp.CreateRawIBCPackageWithFee( + ctx, + types.SyncParamsChangeChannellID, + sdk.SynCrossChainPackageType, + encodedPackage, + relayerFeeAmount, + big.NewInt(0), + ) + if err != nil { + return err + } + + k.Logger(ctx).Info( + fmt.Sprintf("SyncParams seq %d", seq), + ) + + k.Logger(ctx).Info( + fmt.Sprintf("SyncParams CreatedRawIBCPackageWithFee"), + ) + + crossParamsEvent := types.EventCrossParamsChange{ + Key: key, + Value: string(values), + Target: string(addresses), + } + err = ctx.EventManager().EmitTypedEvent(&crossParamsEvent) + if err != nil { + return err + } + return nil +} + +// GetSyncParamsChangeRelayerFee gets the sync params change relayer fee params +func (k Keeper) GetSyncParamsChangeRelayerFee(ctx sdk.Context) (*big.Int, error) { + var syncParamsRelayerFeeParam string + ss, ok := k.GetSubspace(types.BridgeSubspace) + if !ok { + return nil, sdkerrors.Wrap(types.ErrUnknownSubspace, types.BridgeSubspace) + } + ss.Get(ctx, types.KeySyncParamsChangeRelayerFee, &syncParamsRelayerFeeParam) + relayerFee, valid := big.NewInt(0).SetString(syncParamsRelayerFeeParam, 10) + if !valid { + return nil, sdkerrors.Wrapf(types.ErrInvalidRelayerFee, "invalid relayer fee: %s", syncParamsRelayerFeeParam) + } + return relayerFee, nil +} + +// Need these in order to register paramsKeeper to be a CrosschainApp so that it can register channel(3) + +func (k Keeper) ExecuteSynPackage(ctx sdk.Context, appCtx *sdk.CrossChainAppContext, payload []byte) sdk.ExecuteResult { + return sdk.ExecuteResult{} +} + +func (k Keeper) ExecuteAckPackage(ctx sdk.Context, header *sdk.CrossChainAppContext, payload []byte) sdk.ExecuteResult { + return sdk.ExecuteResult{} +} + +func (k Keeper) ExecuteFailAckPackage(ctx sdk.Context, header *sdk.CrossChainAppContext, payload []byte) sdk.ExecuteResult { + return sdk.ExecuteResult{} +} diff --git a/x/params/proposal_handler.go b/x/params/proposal_handler.go index a5c0166e43..a7221f60ba 100644 --- a/x/params/proposal_handler.go +++ b/x/params/proposal_handler.go @@ -24,6 +24,15 @@ func NewParamChangeProposalHandler(k keeper.Keeper) govtypes.Handler { } func handleParameterChangeProposal(ctx sdk.Context, k keeper.Keeper, p *proposal.ParameterChangeProposal) error { + // for govv1.MsgExecLegacyContent, validation is applied by writing to cache Subspace store, since gnfd does not hold + // the subspace for crosschain parameters. the validation is skipped. + if p.CrossChain { + if err := k.SyncParams(ctx, p); err != nil { + return err + } + return nil + } + for _, c := range p.Changes { ss, ok := k.GetSubspace(c.Subspace) if !ok { diff --git a/x/params/types/expected_keepers.go b/x/params/types/expected_keepers.go new file mode 100644 index 0000000000..81d3ff7ee0 --- /dev/null +++ b/x/params/types/expected_keepers.go @@ -0,0 +1,14 @@ +package types + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + "math/big" +) + +type CrossChainKeeper interface { + CreateRawIBCPackageWithFee(ctx sdk.Context, channelID sdk.ChannelID, packageType sdk.CrossChainPackageType, + packageLoad []byte, relayerFee *big.Int, ackRelayerFee *big.Int, + ) (uint64, error) + + RegisterChannel(name string, id sdk.ChannelID, app sdk.CrossChainApplication) error +} diff --git a/x/params/types/proposal/errors.go b/x/params/types/proposal/errors.go index a8c891af2c..4bb3342575 100644 --- a/x/params/types/proposal/errors.go +++ b/x/params/types/proposal/errors.go @@ -6,10 +6,15 @@ import ( // x/params module sentinel errors var ( - ErrUnknownSubspace = sdkerrors.Register(ModuleName, 2, "unknown subspace") - ErrSettingParameter = sdkerrors.Register(ModuleName, 3, "failed to set parameter") - ErrEmptyChanges = sdkerrors.Register(ModuleName, 4, "submitted parameter changes are empty") - ErrEmptySubspace = sdkerrors.Register(ModuleName, 5, "parameter subspace is empty") - ErrEmptyKey = sdkerrors.Register(ModuleName, 6, "parameter key is empty") - ErrEmptyValue = sdkerrors.Register(ModuleName, 7, "parameter value is empty") + ErrUnknownSubspace = sdkerrors.Register(ModuleName, 2, "unknown subspace") + ErrSettingParameter = sdkerrors.Register(ModuleName, 3, "failed to set parameter") + ErrEmptyChanges = sdkerrors.Register(ModuleName, 4, "submitted parameter changes are empty") + ErrEmptySubspace = sdkerrors.Register(ModuleName, 5, "parameter subspace is empty") + ErrEmptyKey = sdkerrors.Register(ModuleName, 6, "parameter key is empty") + ErrEmptyValue = sdkerrors.Register(ModuleName, 7, "parameter value is empty") + ErrAddressSizeNotMatch = sdkerrors.Register(ModuleName, 8, "number of old address not equal to new addresses") + ErrAddressNotValid = sdkerrors.Register(ModuleName, 9, "address format is not valid") + ErrExceedParamsChangeLimit = sdkerrors.Register(ModuleName, 10, "exceed params change limit") + ErrInvalidPackage = sdkerrors.Register(ModuleName, 11, "invalid sync params package") + ErrInvalidRelayerFee = sdkerrors.Register(ModuleName, 12, "invalid sync params relayer fee") ) diff --git a/x/params/types/proposal/event.pb.go b/x/params/types/proposal/event.pb.go new file mode 100644 index 0000000000..7fb83f8026 --- /dev/null +++ b/x/params/types/proposal/event.pb.go @@ -0,0 +1,457 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: cosmos/params/v1beta1/event.proto + +package proposal + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// EventCrossTransferIn is emitted when a cross chain transfer in tx happened +type EventCrossParamsChange struct { + // parameter key or UPGRADE_KEY_HASH + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + // new parameter or new smart contract address(es) if is ungraded proposal + Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + // smart contract address(es) + Target string `protobuf:"bytes,3,opt,name=target,proto3" json:"target,omitempty"` +} + +func (m *EventCrossParamsChange) Reset() { *m = EventCrossParamsChange{} } +func (m *EventCrossParamsChange) String() string { return proto.CompactTextString(m) } +func (*EventCrossParamsChange) ProtoMessage() {} +func (*EventCrossParamsChange) Descriptor() ([]byte, []int) { + return fileDescriptor_32eebb0d5c141235, []int{0} +} +func (m *EventCrossParamsChange) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventCrossParamsChange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventCrossParamsChange.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventCrossParamsChange) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventCrossParamsChange.Merge(m, src) +} +func (m *EventCrossParamsChange) XXX_Size() int { + return m.Size() +} +func (m *EventCrossParamsChange) XXX_DiscardUnknown() { + xxx_messageInfo_EventCrossParamsChange.DiscardUnknown(m) +} + +var xxx_messageInfo_EventCrossParamsChange proto.InternalMessageInfo + +func (m *EventCrossParamsChange) GetKey() string { + if m != nil { + return m.Key + } + return "" +} + +func (m *EventCrossParamsChange) GetValue() string { + if m != nil { + return m.Value + } + return "" +} + +func (m *EventCrossParamsChange) GetTarget() string { + if m != nil { + return m.Target + } + return "" +} + +func init() { + proto.RegisterType((*EventCrossParamsChange)(nil), "cosmos.params.v1beta1.EventCrossParamsChange") +} + +func init() { proto.RegisterFile("cosmos/params/v1beta1/event.proto", fileDescriptor_32eebb0d5c141235) } + +var fileDescriptor_32eebb0d5c141235 = []byte{ + // 235 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4c, 0xce, 0x2f, 0xce, + 0xcd, 0x2f, 0xd6, 0x2f, 0x48, 0x2c, 0x4a, 0xcc, 0x2d, 0xd6, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, + 0x34, 0xd4, 0x4f, 0x2d, 0x4b, 0xcd, 0x2b, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x85, + 0x28, 0xd1, 0x83, 0x28, 0xd1, 0x83, 0x2a, 0x91, 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0xab, 0xd0, + 0x07, 0xb1, 0x20, 0x8a, 0xa5, 0x24, 0x21, 0x8a, 0xe3, 0x21, 0x12, 0x30, 0x9d, 0x20, 0x8e, 0x52, + 0x04, 0x97, 0x98, 0x2b, 0xc8, 0x58, 0xe7, 0xa2, 0xfc, 0xe2, 0xe2, 0x00, 0xb0, 0x61, 0xce, 0x19, + 0x89, 0x79, 0xe9, 0xa9, 0x42, 0x02, 0x5c, 0xcc, 0xd9, 0xa9, 0x95, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, + 0x9c, 0x41, 0x20, 0xa6, 0x90, 0x08, 0x17, 0x6b, 0x59, 0x62, 0x4e, 0x69, 0xaa, 0x04, 0x13, 0x58, + 0x0c, 0xc2, 0x11, 0x12, 0xe3, 0x62, 0x2b, 0x49, 0x2c, 0x4a, 0x4f, 0x2d, 0x91, 0x60, 0x06, 0x0b, + 0x43, 0x79, 0x4e, 0x41, 0x2b, 0x1e, 0xc9, 0x31, 0x9e, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, + 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x13, 0x1e, 0xcb, 0x31, 0x5c, 0x78, 0x2c, 0xc7, 0x70, 0xe3, 0xb1, + 0x1c, 0x43, 0x94, 0x49, 0x7a, 0x66, 0x49, 0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e, 0x2e, 0xd4, 0x41, + 0x50, 0x4a, 0xb7, 0x38, 0x25, 0x5b, 0xbf, 0x02, 0xe6, 0xf5, 0x92, 0xca, 0x82, 0xd4, 0x62, 0xfd, + 0x82, 0xa2, 0xfc, 0x82, 0xfc, 0xe2, 0xc4, 0x9c, 0x24, 0x36, 0xb0, 0xa3, 0x8d, 0x01, 0x01, 0x00, + 0x00, 0xff, 0xff, 0xe3, 0x39, 0xca, 0xb6, 0x21, 0x01, 0x00, 0x00, +} + +func (this *EventCrossParamsChange) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*EventCrossParamsChange) + if !ok { + that2, ok := that.(EventCrossParamsChange) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Key != that1.Key { + return false + } + if this.Value != that1.Value { + return false + } + if this.Target != that1.Target { + return false + } + return true +} +func (m *EventCrossParamsChange) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventCrossParamsChange) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventCrossParamsChange) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Target) > 0 { + i -= len(m.Target) + copy(dAtA[i:], m.Target) + i = encodeVarintEvent(dAtA, i, uint64(len(m.Target))) + i-- + dAtA[i] = 0x1a + } + if len(m.Value) > 0 { + i -= len(m.Value) + copy(dAtA[i:], m.Value) + i = encodeVarintEvent(dAtA, i, uint64(len(m.Value))) + i-- + dAtA[i] = 0x12 + } + if len(m.Key) > 0 { + i -= len(m.Key) + copy(dAtA[i:], m.Key) + i = encodeVarintEvent(dAtA, i, uint64(len(m.Key))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintEvent(dAtA []byte, offset int, v uint64) int { + offset -= sovEvent(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *EventCrossParamsChange) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Key) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.Value) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + l = len(m.Target) + if l > 0 { + n += 1 + l + sovEvent(uint64(l)) + } + return n +} + +func sovEvent(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozEvent(x uint64) (n int) { + return sovEvent(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *EventCrossParamsChange) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventCrossParamsChange: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventCrossParamsChange: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", 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.Key = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", 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.Value = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Target", 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.Target = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvent(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipEvent(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEvent + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEvent + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEvent + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthEvent + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupEvent + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthEvent + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthEvent = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowEvent = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupEvent = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/params/types/proposal/params.pb.go b/x/params/types/proposal/params.pb.go index 332b3bc27e..af76aec7c3 100644 --- a/x/params/types/proposal/params.pb.go +++ b/x/params/types/proposal/params.pb.go @@ -29,6 +29,8 @@ type ParameterChangeProposal struct { Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` Changes []ParamChange `protobuf:"bytes,3,rep,name=changes,proto3" json:"changes"` + CrossChain bool `protobuf:"varint,4,opt,name=cross_chain,json=crossChain,proto3" json:"cross_chain,omitempty"` + Addresses []string `protobuf:"bytes,5,rep,name=addresses,proto3" json:"addresses,omitempty"` } func (m *ParameterChangeProposal) Reset() { *m = ParameterChangeProposal{} } @@ -134,28 +136,31 @@ func init() { } var fileDescriptor_53a944ecb0483e4c = []byte{ - // 334 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x51, 0xbb, 0x6e, 0xc2, 0x30, - 0x14, 0x8d, 0x1b, 0xfa, 0x32, 0x4b, 0x15, 0x51, 0x35, 0xcd, 0x60, 0x50, 0x86, 0x8a, 0x85, 0x44, - 0xb4, 0x9d, 0x18, 0xe1, 0x07, 0x10, 0x4b, 0xa5, 0x2e, 0x95, 0x13, 0xac, 0x10, 0x01, 0xb9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07, 0x5d, 0x1c, 0x0f, 0x9f, 0x89, 0x45, 0x24, 0x38, 0x8d, 0xab, - 0xad, 0xf7, 0xd8, 0xb9, 0xc0, 0xf6, 0x94, 0xad, 0xcc, 0xc2, 0x65, 0x58, 0x1e, 0xb8, 0xa4, 0xb3, - 0x05, 0x73, 0x6d, 0x7d, 0xa0, 0x02, 0xbd, 0x5a, 0x39, 0xb6, 0x3f, 0x7a, 0x2f, 0x08, 0xda, 0x14, - 0x04, 0x6d, 0x0b, 0x82, 0x7e, 0x0b, 0x82, 0x5e, 0x77, 0xc4, 0xda, 0xee, 0x88, 0xf5, 0xbd, 0x23, - 0xd6, 0xe3, 0x7d, 0x92, 0xca, 0xc9, 0x22, 0x0a, 0x62, 0x98, 0x1b, 0x3f, 0xcd, 0xd3, 0x11, 0xe3, - 0x69, 0xf8, 0x5c, 0x7d, 0x9d, 0x5c, 0x71, 0x26, 0x42, 0x6e, 0x0c, 0x8d, 0x4e, 0x94, 0xe7, 0x77, - 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x14, 0xe6, 0xc7, 0x90, 0xe1, 0x01, 0x00, 0x00, + // 378 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x51, 0x31, 0x6e, 0xa3, 0x40, + 0x14, 0x65, 0x16, 0x7b, 0xd7, 0x1e, 0x9a, 0xd5, 0xc8, 0xab, 0x65, 0xd1, 0x0a, 0x10, 0xc5, 0x8a, + 0xc6, 0x20, 0xef, 0x6e, 0xe5, 0xd2, 0xbe, 0x80, 0x45, 0x13, 0x29, 0x8d, 0x35, 0xc0, 0x08, 0x23, + 0xdb, 0x0c, 0xe2, 0x8f, 0xad, 0xf8, 0x06, 0x29, 0x53, 0xa6, 0x74, 0x99, 0x03, 0xe4, 0x10, 0x56, + 0x2a, 0x97, 0xa9, 0xa2, 0x08, 0x5f, 0x23, 0x45, 0x04, 0x0c, 0x8e, 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x34, 0x4f, 0xf8, 0xf6, 0xec, 0x3c, 0xe5, 0x99, 0x60, 0x99, 0x70, 0xae, 0xb0, 0x76, + 0xd1, 0x04, 0x31, 0x70, 0x0f, 0x36, 0x21, 0xe4, 0x34, 0x6a, 0x87, 0x3e, 0x63, 0xf2, 0x1d, 0xab, + 0x4b, 0xb6, 0x93, 0xf3, 0x56, 0xd7, 0x6a, 0x3f, 0x5b, 0xba, 0xda, 0x30, 0x5d, 0x6d, 0xf6, 0x53, + 0x83, 0x71, 0xa7, 0xb2, 0x9d, 0x04, 0x0f, 0xa5, 0x89, 0x0e, 0xa5, 0x89, 0x8e, 0xa5, 0x89, 0x5e, + 0x4b, 0x13, 0xdd, 0x9d, 0x4c, 0xe5, 0x78, 0x32, 0x95, 0xe7, 0x93, 0xa9, 0x5c, 0xff, 0x4f, 0x52, + 0xb1, 0xd8, 0x84, 0x5e, 0xc4, 0xd7, 0x32, 0x0e, 0x79, 0x0c, 0x21, 0x5e, 0xfa, 0x37, 0x6d, 0xf2, + 0x62, 0x97, 0x33, 0xf0, 0x73, 0x99, 0x47, 0xf8, 0xb5, 0x8e, 0xec, 0xdf, 0x7b, 0x00, 0x00, 0x00, + 0xff, 0xff, 0x65, 0xa9, 0x4b, 0x8e, 0x20, 0x02, 0x00, 0x00, } func (this *ParameterChangeProposal) Equal(that interface{}) bool { @@ -191,6 +196,17 @@ func (this *ParameterChangeProposal) Equal(that interface{}) bool { return false } } + if this.CrossChain != that1.CrossChain { + return false + } + if len(this.Addresses) != len(that1.Addresses) { + return false + } + for i := range this.Addresses { + if this.Addresses[i] != that1.Addresses[i] { + return false + } + } return true } func (this *ParamChange) Equal(that interface{}) bool { @@ -243,6 +259,25 @@ func (m *ParameterChangeProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) _ = i var l int _ = l + if len(m.Addresses) > 0 { + for iNdEx := len(m.Addresses) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Addresses[iNdEx]) + copy(dAtA[i:], m.Addresses[iNdEx]) + i = encodeVarintParams(dAtA, i, uint64(len(m.Addresses[iNdEx]))) + i-- + dAtA[i] = 0x2a + } + } + if m.CrossChain { + i-- + if m.CrossChain { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + } if len(m.Changes) > 0 { for iNdEx := len(m.Changes) - 1; iNdEx >= 0; iNdEx-- { { @@ -349,6 +384,15 @@ func (m *ParameterChangeProposal) Size() (n int) { n += 1 + l + sovParams(uint64(l)) } } + if m.CrossChain { + n += 2 + } + if len(m.Addresses) > 0 { + for _, s := range m.Addresses { + l = len(s) + n += 1 + l + sovParams(uint64(l)) + } + } return n } @@ -506,6 +550,58 @@ func (m *ParameterChangeProposal) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CrossChain", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.CrossChain = bool(v != 0) + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Addresses", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + 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 ErrInvalidLengthParams + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Addresses = append(m.Addresses, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipParams(dAtA[iNdEx:]) diff --git a/x/params/types/proposal/proposal.go b/x/params/types/proposal/proposal.go index 55c65afa4e..5ba69fb0cf 100644 --- a/x/params/types/proposal/proposal.go +++ b/x/params/types/proposal/proposal.go @@ -22,7 +22,11 @@ func init() { } func NewParameterChangeProposal(title, description string, changes []ParamChange) *ParameterChangeProposal { - return &ParameterChangeProposal{title, description, changes} + return &ParameterChangeProposal{Title: title, Description: description, Changes: changes} +} + +func NewCrossChainParameterChangeProposal(title, description string, changes []ParamChange, addresses []string) *ParameterChangeProposal { + return &ParameterChangeProposal{Title: title, Description: description, Changes: changes, CrossChain: true, Addresses: addresses} } // GetTitle returns the title of a parameter change proposal. diff --git a/x/params/types/proposal/types.go b/x/params/types/proposal/types.go new file mode 100644 index 0000000000..4725317e09 --- /dev/null +++ b/x/params/types/proposal/types.go @@ -0,0 +1,22 @@ +package proposal + +import sdk "github.com/cosmos/cosmos-sdk/types" + +const ( + SyncParamsChangeChannel = "syncParametersChange" + SyncParamsChangeChannellID sdk.ChannelID = 3 + BridgeSubspace = "bridge" +) + +var ( + KeySyncParamsChangeRelayerFee = []byte("SyncParamsChangeRelayerFee") +) + +// rlp (SyncParamsChangePackage) +type SyncParamsChangePackage struct { + Key string // + // new parameter or new smart contract address(es) if is ungraded proposal + Values []byte // string // address to bytes + // smart contract address(es) + Targets []byte // string +} From 25bfa65a1aa2f0901bf85d9293adb324330b6d94 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 3 Nov 2022 17:31:55 -0400 Subject: [PATCH 02/11] feat: apply fix for `Emit events from x/gov proposal messages execution` --- x/gov/abci.go | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/x/gov/abci.go b/x/gov/abci.go index d493e90cf1..be2c72f17d 100644 --- a/x/gov/abci.go +++ b/x/gov/abci.go @@ -57,8 +57,9 @@ func EndBlocker(ctx sdk.Context, keeper keeper.Keeper) { if passes { var ( - idx int - msg sdk.Msg + idx int + events sdk.Events + msg sdk.Msg ) // attempt to execute all messages within the passed proposal @@ -70,10 +71,12 @@ func EndBlocker(ctx sdk.Context, keeper keeper.Keeper) { if err == nil { for idx, msg = range messages { handler := keeper.Router().Handler(msg) - _, err = handler(cacheCtx, msg) + res, err := handler(cacheCtx, msg) if err != nil { break } + + events = append(events, res.GetEvents()...) } } @@ -84,6 +87,9 @@ func EndBlocker(ctx sdk.Context, keeper keeper.Keeper) { tagValue = types.AttributeValueProposalPassed logMsg = "passed" writeCache() + + // propagate the msg events to the current context + ctx.EventManager().EmitEvents(events) } else { proposal.Status = v1.StatusFailed tagValue = types.AttributeValueProposalFailed From 036fe2956788947797f8607ab72567ed30ef5704 Mon Sep 17 00:00:00 2001 From: Alexgao001 Date: Fri, 17 Feb 2023 11:50:26 +0800 Subject: [PATCH 03/11] feat: use govv1.msgSubmitProposal --- proto/cosmos/gov/v1/gov.proto | 1 - proto/cosmos/gov/v1/tx.proto | 2 - proto/cosmos/gov/v1beta1/gov.proto | 1 - proto/cosmos/gov/v1beta1/tx.proto | 1 - proto/cosmos/params/v1beta1/event.proto | 3 +- x/gov/keeper/msg_server.go | 5 +- x/gov/keeper/proposal.go | 16 +- x/gov/migrations/v046/convert.go | 1 - x/gov/module.go | 9 +- x/gov/types/v1/gov.pb.go | 185 +++++++++------------ x/gov/types/v1/tx.pb.go | 138 ++++++---------- x/gov/types/v1beta1/gov.pb.go | 204 ++++++++++-------------- x/gov/types/v1beta1/tx.pb.go | 124 +++++--------- x/params/keeper/sync_params.go | 20 +-- x/params/types/proposal/event.pb.go | 79 +++++---- x/params/types/proposal/types.go | 16 +- 16 files changed, 312 insertions(+), 493 deletions(-) diff --git a/proto/cosmos/gov/v1/gov.proto b/proto/cosmos/gov/v1/gov.proto index 995455721e..8a8572335d 100644 --- a/proto/cosmos/gov/v1/gov.proto +++ b/proto/cosmos/gov/v1/gov.proto @@ -56,7 +56,6 @@ message Proposal { // metadata is any arbitrary metadata attached to the proposal. string metadata = 10; - bool cross_chain = 11; // flag for cross chain proposal } // ProposalStatus enumerates the valid statuses of a proposal. diff --git a/proto/cosmos/gov/v1/tx.proto b/proto/cosmos/gov/v1/tx.proto index fc53b30f6c..9306c51e8c 100644 --- a/proto/cosmos/gov/v1/tx.proto +++ b/proto/cosmos/gov/v1/tx.proto @@ -40,8 +40,6 @@ message MsgSubmitProposal { string proposer = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // metadata is any arbitrary metadata attached to the proposal. string metadata = 4; - bool cross_chain = 5; - } // MsgSubmitProposalResponse defines the Msg/SubmitProposal response type. diff --git a/proto/cosmos/gov/v1beta1/gov.proto b/proto/cosmos/gov/v1beta1/gov.proto index 645ea6f446..0e65d65b20 100644 --- a/proto/cosmos/gov/v1beta1/gov.proto +++ b/proto/cosmos/gov/v1beta1/gov.proto @@ -82,7 +82,6 @@ message Proposal { [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; google.protobuf.Timestamp voting_start_time = 8 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; google.protobuf.Timestamp voting_end_time = 9 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; - bool cross_chain = 10; // flag for cross chain proposal } // ProposalStatus enumerates the valid statuses of a proposal. diff --git a/proto/cosmos/gov/v1beta1/tx.proto b/proto/cosmos/gov/v1beta1/tx.proto index c0761ff871..00ce2253ef 100644 --- a/proto/cosmos/gov/v1beta1/tx.proto +++ b/proto/cosmos/gov/v1beta1/tx.proto @@ -42,7 +42,6 @@ message MsgSubmitProposal { repeated cosmos.base.v1beta1.Coin initial_deposit = 2 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; string proposer = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - bool cross_chain = 4; } // MsgSubmitProposalResponse defines the Msg/SubmitProposal response type. diff --git a/proto/cosmos/params/v1beta1/event.proto b/proto/cosmos/params/v1beta1/event.proto index f5e356ad23..ff4818e493 100644 --- a/proto/cosmos/params/v1beta1/event.proto +++ b/proto/cosmos/params/v1beta1/event.proto @@ -7,8 +7,7 @@ option (gogoproto.equal_all) = true; import "gogoproto/gogo.proto"; import "cosmos_proto/cosmos.proto"; -// EventCrossTransferIn is emitted when a cross chain transfer in tx happened -message EventCrossParamsChange { +message EventSyncParams { // parameter key or UPGRADE_KEY_HASH string key = 1; diff --git a/x/gov/keeper/msg_server.go b/x/gov/keeper/msg_server.go index 7072f08bf3..a76ba1f262 100644 --- a/x/gov/keeper/msg_server.go +++ b/x/gov/keeper/msg_server.go @@ -35,7 +35,7 @@ func (k msgServer) SubmitProposal(goCtx context.Context, msg *v1.MsgSubmitPropos return nil, err } - proposal, err := k.Keeper.SubmitProposal(ctx, proposalMsgs, msg.Metadata, msg.CrossChain) + proposal, err := k.Keeper.SubmitProposal(ctx, proposalMsgs, msg.Metadata) if err != nil { return nil, err } @@ -233,9 +233,6 @@ func (k legacyMsgServer) SubmitProposal(goCtx context.Context, msg *v1beta1.MsgS if err != nil { return nil, err } - if msg.CrossChain { - proposal.CrossChain = true - } resp, err := k.server.SubmitProposal(goCtx, proposal) if err != nil { diff --git a/x/gov/keeper/proposal.go b/x/gov/keeper/proposal.go index 30eb8a0b51..9beab4a38c 100644 --- a/x/gov/keeper/proposal.go +++ b/x/gov/keeper/proposal.go @@ -11,7 +11,7 @@ import ( ) // SubmitProposal creates a new proposal given an array of messages -func (keeper Keeper) SubmitProposal(ctx sdk.Context, messages []sdk.Msg, metadata string, crossChain bool) (v1.Proposal, error) { +func (keeper Keeper) SubmitProposal(ctx sdk.Context, messages []sdk.Msg, metadata string) (v1.Proposal, error) { err := keeper.assertMetadataLength(metadata) if err != nil { return v1.Proposal{}, err @@ -69,16 +69,6 @@ func (keeper Keeper) SubmitProposal(ctx sdk.Context, messages []sdk.Msg, metadat depositPeriod := keeper.GetDepositParams(ctx).MaxDepositPeriod proposal, err := v1.NewProposal(messages, proposalID, metadata, submitTime, submitTime.Add(*depositPeriod)) - proposal.CrossChain = crossChain - - fmt.Println("---------------------crosschian is: ", crossChain) - fmt.Println("---------------------proposal.CrossChain is: ", proposal.CrossChain) - keeper.Logger(ctx).Info( - fmt.Sprintf("---------------------crosschian is: %t", crossChain), - ) - keeper.Logger(ctx).Info( - fmt.Sprintf("---------------------proposal.CrossChain is: %t", proposal.CrossChain), - ) if err != nil { return v1.Proposal{}, err @@ -98,10 +88,6 @@ func (keeper Keeper) SubmitProposal(ctx sdk.Context, messages []sdk.Msg, metadat sdk.NewAttribute(types.AttributeKeyProposalMessages, msgsStr), ), ) - - keeper.Logger(ctx).Info( - fmt.Sprintf("---------------------proposal.CrossChain is: %t", proposal.CrossChain), - ) return proposal, nil } diff --git a/x/gov/migrations/v046/convert.go b/x/gov/migrations/v046/convert.go index 456f7458ba..267418064e 100644 --- a/x/gov/migrations/v046/convert.go +++ b/x/gov/migrations/v046/convert.go @@ -19,7 +19,6 @@ func ConvertToLegacyProposal(proposal v1.Proposal) (v1beta1.Proposal, error) { ProposalId: proposal.Id, Status: v1beta1.ProposalStatus(proposal.Status), TotalDeposit: types.NewCoins(proposal.TotalDeposit...), - CrossChain: proposal.CrossChain, } legacyProposal.FinalTallyResult, err = ConvertToLegacyTallyResult(proposal.FinalTallyResult) diff --git a/x/gov/module.go b/x/gov/module.go index a495bfea2b..f75f61274d 100644 --- a/x/gov/module.go +++ b/x/gov/module.go @@ -156,11 +156,14 @@ func (am AppModule) LegacyQuerierHandler(legacyQuerierCdc *codec.LegacyAmino) sd // RegisterServices registers module services. func (am AppModule) RegisterServices(cfg module.Configurator) { msgServer := keeper.NewMsgServerImpl(am.keeper) - v1beta1.RegisterMsgServer(cfg.MsgServer(), keeper.NewLegacyMsgServerImpl(am.accountKeeper.GetModuleAddress(types.ModuleName).String(), msgServer)) + + // unregister v1beta1 msg server + //v1beta1.RegisterMsgServer(cfg.MsgServer(), keeper.NewLegacyMsgServerImpl(am.accountKeeper.GetModuleAddress(types.ModuleName).String(), msgServer)) v1.RegisterMsgServer(cfg.MsgServer(), msgServer) - legacyQueryServer := keeper.NewLegacyQueryServer(am.keeper) - v1beta1.RegisterQueryServer(cfg.QueryServer(), legacyQueryServer) + // unregister v1beta1 Query server + //legacyQueryServer := keeper.NewLegacyQueryServer(am.keeper) + ///v1beta1.RegisterQueryServer(cfg.QueryServer(), legacyQueryServer) v1.RegisterQueryServer(cfg.QueryServer(), am.keeper) m := keeper.NewMigrator(am.keeper) diff --git a/x/gov/types/v1/gov.pb.go b/x/gov/types/v1/gov.pb.go index bd8708636d..36b207454f 100644 --- a/x/gov/types/v1/gov.pb.go +++ b/x/gov/types/v1/gov.pb.go @@ -250,8 +250,7 @@ type Proposal struct { VotingStartTime *time.Time `protobuf:"bytes,8,opt,name=voting_start_time,json=votingStartTime,proto3,stdtime" json:"voting_start_time,omitempty"` VotingEndTime *time.Time `protobuf:"bytes,9,opt,name=voting_end_time,json=votingEndTime,proto3,stdtime" json:"voting_end_time,omitempty"` // metadata is any arbitrary metadata attached to the proposal. - Metadata string `protobuf:"bytes,10,opt,name=metadata,proto3" json:"metadata,omitempty"` - CrossChain bool `protobuf:"varint,11,opt,name=cross_chain,json=crossChain,proto3" json:"cross_chain,omitempty"` + Metadata string `protobuf:"bytes,10,opt,name=metadata,proto3" json:"metadata,omitempty"` } func (m *Proposal) Reset() { *m = Proposal{} } @@ -357,13 +356,6 @@ func (m *Proposal) GetMetadata() string { return "" } -func (m *Proposal) GetCrossChain() bool { - if m != nil { - return m.CrossChain - } - return false -} - // TallyResult defines a standard tally for a governance proposal. type TallyResult struct { YesCount string `protobuf:"bytes,1,opt,name=yes_count,json=yesCount,proto3" json:"yes_count,omitempty"` @@ -688,78 +680,76 @@ func init() { func init() { proto.RegisterFile("cosmos/gov/v1/gov.proto", fileDescriptor_e05cb1c0d030febb) } var fileDescriptor_e05cb1c0d030febb = []byte{ - // 1127 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00,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50, 0x3e, 0x65, 0xb7, 0x32, 0x3a, - 0x19, 0xda, 0x24, 0xb8, 0x72, 0xa5, 0x98, 0x5d, 0x9f, 0xfc, 0x17, 0x00, 0x00, 0xff, 0xff, 0x83, - 0x58, 0x52, 0x58, 0xb3, 0x09, 0x00, 0x00, + // 1104 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x56, 0x4f, 0x53, 0xdb, 0x46, + 0x14, 0x47, 0xb6, 0x30, 0xe6, 0x19, 0x1b, 0x75, 0xa1, 0x45, 0x90, 0x60, 0x13, 0x4f, 0xdb, 0xa1, + 0xa4, 0xd8, 0x25, 0x99, 0xb6, 0x33, 0xcd, 0xc9, 0xc6, 0x4a, 0x31, 0xc3, 0x60, 0x57, 0x52, 0xcc, + 0xa4, 0x17, 0x8d, 0x8c, 0x14, 0x5b, 0x53, 0x4b, 0xeb, 0x6a, 0xd7, 0x0e, 0xfe, 0x08, 0xbd, 0xe5, + 0xd8, 0x99, 0x7e, 0x8d, 0x4c, 0x3f, 0x43, 0x4e, 0x9d, 0x4c, 0x0e, 0xfd, 0x73, 0x71, 0x5b, 0xb8, + 0xf1, 0x29, 0x32, 0x5a, 0xad, 0xb0, 0x2d, 0xc8, 0xc0, 0x49, 0xd2, 0x7b, 0xbf, 0xdf, 0xef, 0xbd, + 0xdd, 0xf7, 0xd3, 0x4a, 0xb0, 0x76, 0x8a, 0x89, 0x8b, 0x49, 0xb9, 0x83, 0x87, 0xe5, 0xe1, 0x5e, + 0x70, 0x29, 0xf5, 0x7d, 0x4c, 0x31, 0xca, 0x86, 0x89, 0x52, 0x10, 0x19, 0xee, 0x6d, 0xe4, 0x39, + 0xae, 0x6d, 0x12, 0xbb, 0x3c, 0xdc, 0x6b, 0xdb, 0xd4, 0xdc, 0x2b, 0x9f, 0x62, 0xc7, 0x0b, 0xe1, + 0x1b, 0xab, 0x1d, 0xdc, 0xc1, 0x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0x87, 0x76, 0x07, 0xed, 0xd2, 0x29, 0x76, 0xf9, 0x0f, 0x0a, 0xbf, 0xec, + 0x12, 0xeb, 0xa7, 0xf2, 0x19, 0xfb, 0xe9, 0xa2, 0xa3, 0xbe, 0x4d, 0x82, 0x3f, 0xaa, 0x14, 0xb3, + 0xeb, 0xe3, 0xf7, 0x01, 0x00, 0x00, 0xff, 0xff, 0x73, 0xa8, 0x09, 0x8c, 0x92, 0x09, 0x00, 0x00, } func (m *WeightedVoteOption) Marshal() (dAtA []byte, err error) { @@ -866,16 +856,6 @@ func (m *Proposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.CrossChain { - i-- - if m.CrossChain { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x58 - } if len(m.Metadata) > 0 { i -= len(m.Metadata) copy(dAtA[i:], m.Metadata) @@ -1304,9 +1284,6 @@ func (m *Proposal) Size() (n int) { if l > 0 { n += 1 + l + sovGov(uint64(l)) } - if m.CrossChain { - n += 2 - } return n } @@ -2003,26 +1980,6 @@ func (m *Proposal) Unmarshal(dAtA []byte) error { } m.Metadata = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 11: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CrossChain", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGov - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.CrossChain = bool(v != 0) default: iNdEx = preIndex skippy, err := skipGov(dAtA[iNdEx:]) diff --git a/x/gov/types/v1/tx.pb.go b/x/gov/types/v1/tx.pb.go index ad96ae007f..25696059d9 100644 --- a/x/gov/types/v1/tx.pb.go +++ b/x/gov/types/v1/tx.pb.go @@ -39,8 +39,7 @@ type MsgSubmitProposal struct { InitialDeposit []types1.Coin `protobuf:"bytes,2,rep,name=initial_deposit,json=initialDeposit,proto3" json:"initial_deposit"` Proposer string `protobuf:"bytes,3,opt,name=proposer,proto3" json:"proposer,omitempty"` // metadata is any arbitrary metadata attached to the proposal. - Metadata string `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"` - CrossChain bool `protobuf:"varint,5,opt,name=cross_chain,json=crossChain,proto3" json:"cross_chain,omitempty"` + Metadata string `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"` } func (m *MsgSubmitProposal) Reset() { *m = MsgSubmitProposal{} } @@ -104,13 +103,6 @@ func (m *MsgSubmitProposal) GetMetadata() string { return "" } -func (m *MsgSubmitProposal) GetCrossChain() bool { - if m != nil { - return m.CrossChain - } - return false -} - // MsgSubmitProposalResponse defines the Msg/SubmitProposal response type. type MsgSubmitProposalResponse struct { ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` @@ -575,54 +567,53 @@ func init() { func init() { proto.RegisterFile("cosmos/gov/v1/tx.proto", fileDescriptor_9ff8f4a63b6fc9a9) } var fileDescriptor_9ff8f4a63b6fc9a9 = []byte{ - // 752 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x55, 0xcf, 0x6b, 0x13, 0x41, - 0x14, 0xce, 0x36, 0x69, 0xd3, 0xbe, 0xda, 0x94, 0x2e, 0xa1, 0xdd, 0x2c, 0x65, 0x9b, 0x46, 0x90, - 0x60, 0xe9, 0x6e, 0x53, 0x45, 0xa1, 0x15, 0xa1, 0xa9, 0x45, 0x05, 0x83, 0xb2, 0x85, 0x0a, 0x22, - 0x84, 0xcd, 0xee, 0x38, 0x59, 0x6c, 0x76, 0x96, 0x9d, 0x49, 0x68, 0x8e, 0xfa, 0x17, 0xe8, 0xdf, - 0xe1, 0xc5, 0x43, 0xef, 0xde, 0xa4, 0x78, 0x2a, 0x9e, 0x7a, 0x2a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 0x6a, - 0x04, 0x33, 0xe9, 0x7e, 0xbd, 0x9d, 0x96, 0xa7, 0x48, 0xea, 0xd2, 0x0d, 0x48, 0xc9, 0x32, 0x8f, - 0x21, 0x17, 0xb5, 0xdc, 0x6c, 0x5a, 0x14, 0xe2, 0xaa, 0x76, 0x31, 0x9e, 0xe8, 0x77, 0xe0, 0xd6, - 0xb9, 0x6b, 0x7d, 0x09, 0x3f, 0x8e, 0xab, 0x77, 0xae, 0x8e, 0x27, 0x79, 0x9f, 0x42, 0x3e, 0xbe, - 0x38, 0xa5, 0xb4, 0x44, 0x84, 0xd4, 0xc5, 0x4b, 0x43, 0x71, 0xa2, 0xfa, 0xd6, 0xc1, 0x89, 0x26, - 0x1d, 0x9e, 0x68, 0xd2, 0xaf, 0x13, 0x4d, 0xfa, 0x74, 0xaa, 0x65, 0x0e, 0x4f, 0xb5, 0xcc, 0xd1, - 0xa9, 0x96, 0x79, 0xb3, 0x84, 0x5d, 0xd6, 0xee, 0xb6, 0x74, 0x9b, 0x74, 0xc4, 0xa3, 0x25, 0x3e, - 0xcb, 0xd4, 0x79, 0x6f, 0xec, 0x45, 0xaf, 0x1f, 0xeb, 0xfb, 0x88, 0x86, 0x4f, 0xe4, 0x58, 0xf4, - 0x43, 0xbc, 0xf7, 0x37, 0x00, 0x00, 0xff, 0xff, 0x81, 0x05, 0x6d, 0x17, 0x62, 0x07, 0x00, 0x00, + // 734 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x95, 0xcf, 0x6a, 0xdb, 0x4a, + 0x14, 0xc6, 0xad, 0xd8, 0x37, 0x4e, 0x4e, 0x6e, 0x1c, 0x32, 0x98, 0x44, 0x16, 0x41, 0x71, 0x7c, + 0xe1, 0x62, 0x6e, 0x88, 0x14, 0xe7, 0x96, 0x16, 0x92, 0x52, 0x88, 0xd3, 0xd0, 0x16, 0x6a, 0x5a, + 0x14, 0x48, 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0, 0xcc, 0xc8, 0x6a, 0xf5, 0x9b, 0x14, 0xe9, 0x50, 0x63, 0x98, 0xce, 0xce, + 0xeb, 0x3f, 0x59, 0x7b, 0x46, 0xa4, 0x2d, 0xde, 0x42, 0x94, 0x2e, 0xf3, 0x00, 0x0a, 0xf1, 0xc8, + 0xcd, 0x64, 0x4d, 0x51, 0x5c, 0xd3, 0x2f, 0x8f, 0xa7, 0xfe, 0x6d, 0xf8, 0xfb, 0xc2, 0xb1, 0xbe, + 0x42, 0x9f, 0xe4, 0xb5, 0x7f, 0xaf, 0xcf, 0xa7, 0x75, 0x1f, 0x41, 0x31, 0x39, 0x38, 0x95, 0xac, + 0x45, 0xa6, 0xb4, 0x85, 0x2b, 0x53, 0x49, 0xa1, 0xe6, 0xe6, 0xe1, 0xa9, 0xae, 0x1c, 0x9d, 0xea, + 0xca, 0xb7, 0x53, 0x5d, 0x79, 0x7f, 0xa6, 0xe7, 0x8e, 0xce, 0xf4, 0xdc, 0xf1, 0x99, 0x9e, 0x7b, + 0xb9, 0x48, 0x5c, 0xbe, 0xdb, 0x6d, 0x1b, 0x1d, 0xea, 0xc9, 0x3b, 0x49, 0xfe, 0x2c, 0x31, 0xe7, + 0x8d, 0xb9, 0x1f, 0x5f, 0x6e, 0xbc, 0x1f, 0x60, 0x16, 0xdd, 0x80, 0xa3, 0xf1, 0x1f, 0xe2, 0xff, + 0xbf, 0x02, 0x00, 0x00, 0xff, 0xff, 0xb7, 0xdb, 0x52, 0x42, 0x41, 0x07, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -881,16 +872,6 @@ func (m *MsgSubmitProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.CrossChain { - i-- - if m.CrossChain { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x28 - } if len(m.Metadata) > 0 { i -= len(m.Metadata) copy(dAtA[i:], m.Metadata) @@ -1287,9 +1268,6 @@ func (m *MsgSubmitProposal) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - if m.CrossChain { - n += 2 - } return n } @@ -1596,26 +1574,6 @@ func (m *MsgSubmitProposal) Unmarshal(dAtA []byte) error { } m.Metadata = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CrossChain", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.CrossChain = bool(v != 0) default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) diff --git a/x/gov/types/v1beta1/gov.pb.go b/x/gov/types/v1beta1/gov.pb.go index 1371d084fc..3fc60128b1 100644 --- a/x/gov/types/v1beta1/gov.pb.go +++ b/x/gov/types/v1beta1/gov.pb.go @@ -254,7 +254,6 @@ type Proposal struct { TotalDeposit github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,7,rep,name=total_deposit,json=totalDeposit,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"total_deposit"` VotingStartTime time.Time `protobuf:"bytes,8,opt,name=voting_start_time,json=votingStartTime,proto3,stdtime" json:"voting_start_time"` VotingEndTime time.Time `protobuf:"bytes,9,opt,name=voting_end_time,json=votingEndTime,proto3,stdtime" json:"voting_end_time"` - CrossChain bool `protobuf:"varint,10,opt,name=cross_chain,json=crossChain,proto3" json:"cross_chain,omitempty"` } func (m *Proposal) Reset() { *m = Proposal{} } @@ -514,93 +513,92 @@ func init() { func init() { proto.RegisterFile("cosmos/gov/v1beta1/gov.proto", fileDescriptor_6e82113c1a9a4b7c) } var fileDescriptor_6e82113c1a9a4b7c = []byte{ - // 1376 bytes of a gzipped FileDescriptorProto + // 1358 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08,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 0x86, 0xea, 0x1c, 0x5d, 0x85, 0x0b, 0xa3, 0xd4, 0x7a, 0xb1, 0xd1, 0x50, 0xcb, 0x72, + 0x2c, 0x23, 0x0f, 0x86, 0x4a, 0x8a, 0x73, 0xea, 0xa6, 0xe7, 0x61, 0x0b, 0x5d, 0x83, 0xf4, 0x28, + 0x5a, 0x53, 0x6f, 0xa9, 0x6b, 0xba, 0x5a, 0x96, 0xe3, 0x19, 0x34, 0x18, 0x2a, 0xb3, 0xe2, 0x4d, + 0x09, 0x7f, 0x89, 0x5b, 0x14, 0x9f, 0xaa, 0xbf, 0x5e, 0xac, 0x6c, 0xa8, 0x65, 0x79, 0x22, 0xac, + 0xbf, 0x6e, 0xda, 0x1d, 0x6c, 0xf1, 0x74, 0x96, 0x9a, 0xcf, 0x5e, 0x67, 0x23, 0x2f, 0x5f, 0x67, + 0x23, 0x5f, 0x1f, 0x64, 0x23, 0xcf, 0x0e, 0xb2, 0xd2, 0xf3, 0x83, 0xac, 0xf4, 0xdb, 0x41, 0x56, + 0x7a, 0xf4, 0x26, 0x1b, 0x79, 0xfe, 0x26, 0x1b, 0x79, 0xf9, 0x26, 0x1b, 0xb9, 0x7b, 0xed, 0x6f, + 0x0b, 0x76, 0x97, 0x7d, 0xf3, 0xb0, 0xb2, 0x0d, 0x3e, 0x63, 0xb6, 0x12, 0x6c, 0x32, 0x7c, 0xfc, + 0x57, 0x00, 0x00, 0x00, 0xff, 0xff, 0x8e, 0x62, 0x67, 0xb6, 0x16, 0x0d, 0x00, 0x00, } func (this *TextProposal) Equal(that interface{}) bool { @@ -681,9 +679,6 @@ func (this *Proposal) Equal(that interface{}) bool { if !this.VotingEndTime.Equal(that1.VotingEndTime) { return false } - if this.CrossChain != that1.CrossChain { - return false - } return true } func (this *TallyResult) Equal(that interface{}) bool { @@ -863,16 +858,6 @@ func (m *Proposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.CrossChain { - i-- - if m.CrossChain { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x50 - } n1, err1 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.VotingEndTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.VotingEndTime):]) if err1 != nil { return 0, err1 @@ -1296,9 +1281,6 @@ func (m *Proposal) Size() (n int) { n += 1 + l + sovGov(uint64(l)) l = github_com_gogo_protobuf_types.SizeOfStdTime(m.VotingEndTime) n += 1 + l + sovGov(uint64(l)) - if m.CrossChain { - n += 2 - } return n } @@ -2047,26 +2029,6 @@ func (m *Proposal) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 10: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CrossChain", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGov - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.CrossChain = bool(v != 0) default: iNdEx = preIndex skippy, err := skipGov(dAtA[iNdEx:]) diff --git a/x/gov/types/v1beta1/tx.pb.go b/x/gov/types/v1beta1/tx.pb.go index b4bf6fc69e..c774859228 100644 --- a/x/gov/types/v1beta1/tx.pb.go +++ b/x/gov/types/v1beta1/tx.pb.go @@ -39,7 +39,6 @@ type MsgSubmitProposal struct { Content *types.Any `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"` InitialDeposit github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=initial_deposit,json=initialDeposit,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"initial_deposit"` Proposer string `protobuf:"bytes,3,opt,name=proposer,proto3" json:"proposer,omitempty"` - CrossChain bool `protobuf:"varint,4,opt,name=cross_chain,json=crossChain,proto3" json:"cross_chain,omitempty"` } func (m *MsgSubmitProposal) Reset() { *m = MsgSubmitProposal{} } @@ -365,52 +364,50 @@ func init() { func init() { proto.RegisterFile("cosmos/gov/v1beta1/tx.proto", fileDescriptor_3c053992595e3dce) } var fileDescriptor_3c053992595e3dce = []byte{ - // 707 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0x31, 0x6f, 0xd3, 0x40, - 0x14, 0xb6, 0x93, 0xd0, 0xb4, 0x17, 0xd4, 0xaa, 0x56, 0xa4, 0x3a, 0x2e, 0xd8, 0x51, 0x10, 0x55, - 0x04, 0x8a, 0xdd, 0x06, 0xd4, 0xa1, 0x4c, 0x4d, 0x11, 0x02, 0xa4, 0x08, 0x70, 0x25, 0x90, 0x58, - 0x82, 0x63, 0x5f, 0xaf, 0x16, 0x8d, 0xcf, 0xf2, 0x5d, 0xa2, 0x76, 0x43, 0x4c, 0x8c, 0x8c, 0x8c, - 0x9d, 0x19, 0x10, 0x43, 0x47, 0x7e, 0x40, 0xc5, 0x54, 0xb1, 0xc0, 0x80, 0x0a, 0x6a, 0x07, 0x10, - 0xe2, 0x1f, 0xb0, 0x20, 0xfb, 0xee, 0x9c, 0xd2, 0xa4, 0x69, 0x2b, 0x31, 0xd9, 0xf7, 0xbe, 0xf7, - 0xbd, 0xf7, 0xbe, 0x77, 0xef, 0xd9, 0x60, 0xd6, 0xc5, 0xa4, 0x83, 0x89, 0x85, 0x70, 0xcf, 0xea, - 0x2d, 0xb4, 0x21, 0x75, 0x16, 0x2c, 0xba, 0x69, 0x86, 0x11, 0xa6, 0x58, 0x51, 0x18, 0x68, 0x22, - 0xdc, 0x33, 0x39, 0xa8, 0xe9, 0x9c, 0xd0, 0x76, 0x08, 0x4c, 0x19, 0x2e, 0xf6, 0x03, 0xc6, 0xd1, - 0x2e, 0x0d, 0x09, 0x18, 0xf3, 0x19, 0x5a, 0x62, 0x68, 0x2b, 0x39, 0x59, 0x3c, 0x3c, 0x83, 0x8a, - 0x08, 0x23, 0xcc, 0xec, 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63, 0xc2, 0x52, 0xd1, 0x7f, 0x64, 0x00, 0x9a, 0x04, 0x89, 0x61, 0x3c, 0xbf, 0xde, 0x45, - 0x30, 0xc1, 0x97, 0x05, 0x9f, 0xae, 0xb9, 0xef, 0xaa, 0xb8, 0x60, 0xcc, 0xe9, 0xe0, 0x6e, 0x40, - 0xb9, 0xec, 0xff, 0xba, 0x63, 0x3c, 0xf4, 0x92, 0x3e, 0xac, 0x29, 0xfd, 0x22, 0x2a, 0x45, 0xa0, - 0xf4, 0xc5, 0x8b, 0x9e, 0xd4, 0x7f, 0x67, 0x40, 0xb6, 0x49, 0x90, 0xb2, 0x06, 0x26, 0x8f, 0x7d, - 0x5e, 0xae, 0x0e, 0xbb, 0x9b, 0x81, 0x3d, 0xd2, 0x6a, 0x67, 0x72, 0x4b, 0xd7, 0xed, 0x2e, 0xc8, - 0x25, 0x8b, 0x33, 0x7b, 0x02, 0x2d, 0x06, 0xb5, 0x2b, 0x23, 0xc0, 0x34, 0xd2, 0x33, 0x70, 0xf1, - 0x9f, 0xf1, 0x1d, 0x45, 0x12, 0x4e, 0xda, 0xf5, 0x33, 0x38, 0xa5, 0x19, 0x1e, 0x81, 0xbc, 0x98, - 0x15, 0xfd, 0x04, 0x1e, 0xc7, 0xb5, 0xb9, 0xd1, 0xb8, 0x08, 0xd9, 0xb8, 0xbf, 0x7b, 0xa0, 0xcb, - 0x7b, 0x07, 0xba, 0xfc, 0xfd, 0x40, 0x97, 0x5f, 0x1f, 0xea, 0xd2, 0xde, 0xa1, 0x2e, 0x7d, 0x39, - 0xd4, 0xa5, 0xa7, 0xf3, 0x23, 0x2f, 0x7c, 0x33, 0xf9, 0xfd, 0x24, 0xd7, 0x2e, 0x7e, 0x42, 0xed, - 0xb1, 0xe4, 0x33, 0x7f, 0xe3, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xca, 0x2f, 0xf3, 0x0e, 0xf2, - 0x06, 0x00, 0x00, + // 685 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0xcf, 0x4f, 0x13, 0x4f, + 0x14, 0xdf, 0x6d, 0xf9, 0xd2, 0x2f, 0x53, 0x03, 0x61, 0xd3, 0x84, 0x76, 0xd1, 0xdd, 0xa6, 0x46, + 0xd2, 0x68, 0xba, 0x0b, 0xd5, 0x70, 0xc0, 0x13, 0xc5, 0x18, 0x35, 0x69, 0xd4, 0x25, 0xd1, 0xc4, + 0x0b, 0xb6, 0xdd, 0x61, 0xd8, 0x48, 0xf7, 0x6d, 0x3a, 0xd3, 0x06, 0x6e, 0xc6, 0x93, 0x47, 0x8f, + 0x26, 0x5e, 0x38, 0x7b, 0x30, 0x1e, 0xf8, 0x23, 0x88, 0x27, 0xe2, 0x45, 0x0f, 0x06, 0x0d, 0x1c, + 0x34, 0xc6, 0xff, 0xc0, 0x8b, 0xd9, 0xf9, 0xb1, 0x45, 0x28, 0x05, 0x12, 0x4f, 0xbb, 0x33, 0x9f, + 0xcf, 0xe7, 0xbd, 0xf9, 0xbc, 0x79, 0x6f, 0x17, 0x4d, 0xb7, 0x80, 0xb6, 0x81, 0xba, 0x04, 0x7a, + 0x6e, 0x6f, 0xae, 0x89, 0x59, 0x63, 0xce, 0x65, 0x1b, 0x4e, 0xd4, 0x01, 0x06, 0x86, 0x21, 0x40, + 0x87, 0x40, 0xcf, 0x91, 0xa0, 0x69, 0x49, 0x41, 0xb3, 0x41, 0x71, 0xa2, 0x68, 0x41, 0x10, 0x0a, + 0x8d, 0x79, 0x71, 0x40, 0xc0, 0x58, 0x2f, 0xd0, 0x82, 0x40, 0x57, 0xf8, 0xca, 0x95, 0xe1, 0x05, + 0x94, 0x23, 0x40, 0x40, 0xec, 0xc7, 0x6f, 0x4a, 0x40, 0x00, 0xc8, 0x3a, 0x76, 0xf9, 0xaa, 0xd9, + 0x5d, 0x75, 0x1b, 0xe1, 0xa6, 0x84, 0xa6, 0x64, 0xa6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51, 0xfa, 0x87, 0x28, 0xe5, 0x90, 0xd1, 0x37, 0xaf, 0x6a, 0x52, + 0xfd, 0x95, 0x42, 0xe9, 0x3a, 0x25, 0xc6, 0x2a, 0x1a, 0x3f, 0xf2, 0xf5, 0xb8, 0x32, 0xe8, 0x6e, + 0x8e, 0xcd, 0x91, 0x59, 0x39, 0x13, 0x2d, 0x19, 0xb7, 0x3b, 0x68, 0x84, 0x0f, 0xce, 0xf4, 0x09, + 0xb2, 0x18, 0x34, 0x2f, 0x0f, 0x01, 0x93, 0x48, 0x4f, 0xd1, 0x85, 0xbf, 0xda, 0x77, 0x98, 0x48, + 0x91, 0xcc, 0x6b, 0x67, 0x20, 0x25, 0x19, 0x1e, 0xa2, 0x8c, 0xea, 0x15, 0xeb, 0x04, 0x9d, 0xc4, + 0xcd, 0x99, 0xe1, 0xb8, 0x0a, 0x59, 0xbb, 0xb7, 0xb3, 0x6f, 0xe9, 0xbb, 0xfb, 0x96, 0xfe, 0x6d, + 0xdf, 0xd2, 0x5f, 0x1d, 0x58, 0xda, 0xee, 0x81, 0xa5, 0x7d, 0x3e, 0xb0, 0xb4, 0x27, 0xb3, 0x43, + 0x2f, 0x7c, 0x83, 0xff, 0x5d, 0xf8, 0xb5, 0xab, 0x7f, 0x4c, 0x73, 0x94, 0x7f, 0xc5, 0xaf, 0xff, + 0x09, 0x00, 0x00, 0xff, 0xff, 0xee, 0x48, 0x3c, 0xfd, 0xd1, 0x06, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -633,16 +630,6 @@ func (m *MsgSubmitProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.CrossChain { - i-- - if m.CrossChain { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - } if len(m.Proposer) > 0 { i -= len(m.Proposer) copy(dAtA[i:], m.Proposer) @@ -945,9 +932,6 @@ func (m *MsgSubmitProposal) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - if m.CrossChain { - n += 2 - } return n } @@ -1190,26 +1174,6 @@ func (m *MsgSubmitProposal) Unmarshal(dAtA []byte) error { } m.Proposer = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CrossChain", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.CrossChain = bool(v != 0) default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) diff --git a/x/params/keeper/sync_params.go b/x/params/keeper/sync_params.go index 52d52bfe9e..e8085fd48b 100644 --- a/x/params/keeper/sync_params.go +++ b/x/params/keeper/sync_params.go @@ -38,7 +38,7 @@ func (k Keeper) SyncParams(ctx sdk.Context, p *types.ParameterChangeProposal) er addresses = append(addresses, adr.Bytes()...) } - relayerFeeAmount, err := k.GetSyncParamsChangeRelayerFee(ctx) + relayerFeeAmount, err := k.GetSyncParamsRelayerFee(ctx) if err != nil { return err } @@ -47,10 +47,10 @@ func (k Keeper) SyncParams(ctx sdk.Context, p *types.ParameterChangeProposal) er fmt.Sprintf("SyncParams realyerFeeAmount %d", relayerFeeAmount), ) - pack := types.SyncParamsChangePackage{ - Key: key, - Values: values, - Targets: addresses, + pack := types.SyncParamsPackage{ + Key: key, + Value: values, + Target: addresses, } encodedPackage, err := rlp.EncodeToBytes(pack) @@ -64,7 +64,7 @@ func (k Keeper) SyncParams(ctx sdk.Context, p *types.ParameterChangeProposal) er ) seq, err := kp.CreateRawIBCPackageWithFee( ctx, - types.SyncParamsChangeChannellID, + types.SyncParamsChannelID, sdk.SynCrossChainPackageType, encodedPackage, relayerFeeAmount, @@ -82,7 +82,7 @@ func (k Keeper) SyncParams(ctx sdk.Context, p *types.ParameterChangeProposal) er fmt.Sprintf("SyncParams CreatedRawIBCPackageWithFee"), ) - crossParamsEvent := types.EventCrossParamsChange{ + crossParamsEvent := types.EventSyncParams{ Key: key, Value: string(values), Target: string(addresses), @@ -94,14 +94,14 @@ func (k Keeper) SyncParams(ctx sdk.Context, p *types.ParameterChangeProposal) er return nil } -// GetSyncParamsChangeRelayerFee gets the sync params change relayer fee params -func (k Keeper) GetSyncParamsChangeRelayerFee(ctx sdk.Context) (*big.Int, error) { +// GetSyncParamsRelayerFee gets the sync params change relayer fee params +func (k Keeper) GetSyncParamsRelayerFee(ctx sdk.Context) (*big.Int, error) { var syncParamsRelayerFeeParam string ss, ok := k.GetSubspace(types.BridgeSubspace) if !ok { return nil, sdkerrors.Wrap(types.ErrUnknownSubspace, types.BridgeSubspace) } - ss.Get(ctx, types.KeySyncParamsChangeRelayerFee, &syncParamsRelayerFeeParam) + ss.Get(ctx, types.KeySyncParamsRelayerFee, &syncParamsRelayerFeeParam) relayerFee, valid := big.NewInt(0).SetString(syncParamsRelayerFeeParam, 10) if !valid { return nil, sdkerrors.Wrapf(types.ErrInvalidRelayerFee, "invalid relayer fee: %s", syncParamsRelayerFeeParam) diff --git a/x/params/types/proposal/event.pb.go b/x/params/types/proposal/event.pb.go index 7fb83f8026..2e776a1191 100644 --- a/x/params/types/proposal/event.pb.go +++ b/x/params/types/proposal/event.pb.go @@ -24,8 +24,7 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -// EventCrossTransferIn is emitted when a cross chain transfer in tx happened -type EventCrossParamsChange struct { +type EventSyncParams struct { // parameter key or UPGRADE_KEY_HASH Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` // new parameter or new smart contract address(es) if is ungraded proposal @@ -34,18 +33,18 @@ type EventCrossParamsChange struct { Target string `protobuf:"bytes,3,opt,name=target,proto3" json:"target,omitempty"` } -func (m *EventCrossParamsChange) Reset() { *m = EventCrossParamsChange{} } -func (m *EventCrossParamsChange) String() string { return proto.CompactTextString(m) } -func (*EventCrossParamsChange) ProtoMessage() {} -func (*EventCrossParamsChange) Descriptor() ([]byte, []int) { +func (m *EventSyncParams) Reset() { *m = EventSyncParams{} } +func (m *EventSyncParams) String() string { return proto.CompactTextString(m) } +func (*EventSyncParams) ProtoMessage() {} +func (*EventSyncParams) Descriptor() ([]byte, []int) { return fileDescriptor_32eebb0d5c141235, []int{0} } -func (m *EventCrossParamsChange) XXX_Unmarshal(b []byte) error { +func (m *EventSyncParams) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *EventCrossParamsChange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *EventSyncParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_EventCrossParamsChange.Marshal(b, m, deterministic) + return xxx_messageInfo_EventSyncParams.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -55,33 +54,33 @@ func (m *EventCrossParamsChange) XXX_Marshal(b []byte, deterministic bool) ([]by return b[:n], nil } } -func (m *EventCrossParamsChange) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventCrossParamsChange.Merge(m, src) +func (m *EventSyncParams) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventSyncParams.Merge(m, src) } -func (m *EventCrossParamsChange) XXX_Size() int { +func (m *EventSyncParams) XXX_Size() int { return m.Size() } -func (m *EventCrossParamsChange) XXX_DiscardUnknown() { - xxx_messageInfo_EventCrossParamsChange.DiscardUnknown(m) +func (m *EventSyncParams) XXX_DiscardUnknown() { + xxx_messageInfo_EventSyncParams.DiscardUnknown(m) } -var xxx_messageInfo_EventCrossParamsChange proto.InternalMessageInfo +var xxx_messageInfo_EventSyncParams proto.InternalMessageInfo -func (m *EventCrossParamsChange) GetKey() string { +func (m *EventSyncParams) GetKey() string { if m != nil { return m.Key } return "" } -func (m *EventCrossParamsChange) GetValue() string { +func (m *EventSyncParams) GetValue() string { if m != nil { return m.Value } return "" } -func (m *EventCrossParamsChange) GetTarget() string { +func (m *EventSyncParams) GetTarget() string { if m != nil { return m.Target } @@ -89,38 +88,38 @@ func (m *EventCrossParamsChange) GetTarget() string { } func init() { - proto.RegisterType((*EventCrossParamsChange)(nil), "cosmos.params.v1beta1.EventCrossParamsChange") + proto.RegisterType((*EventSyncParams)(nil), "cosmos.params.v1beta1.EventSyncParams") } func init() { proto.RegisterFile("cosmos/params/v1beta1/event.proto", fileDescriptor_32eebb0d5c141235) } var fileDescriptor_32eebb0d5c141235 = []byte{ - // 235 bytes of a gzipped FileDescriptorProto + // 228 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4c, 0xce, 0x2f, 0xce, 0xcd, 0x2f, 0xd6, 0x2f, 0x48, 0x2c, 0x4a, 0xcc, 0x2d, 0xd6, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34, 0xd4, 0x4f, 0x2d, 0x4b, 0xcd, 0x2b, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x85, 0x28, 0xd1, 0x83, 0x28, 0xd1, 0x83, 0x2a, 0x91, 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0xab, 0xd0, 0x07, 0xb1, 0x20, 0x8a, 0xa5, 0x24, 0x21, 0x8a, 0xe3, 0x21, 0x12, 0x30, 0x9d, 0x20, 0x8e, 0x52, - 0x04, 0x97, 0x98, 0x2b, 0xc8, 0x58, 0xe7, 0xa2, 0xfc, 0xe2, 0xe2, 0x00, 0xb0, 0x61, 0xce, 0x19, - 0x89, 0x79, 0xe9, 0xa9, 0x42, 0x02, 0x5c, 0xcc, 0xd9, 0xa9, 0x95, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, - 0x9c, 0x41, 0x20, 0xa6, 0x90, 0x08, 0x17, 0x6b, 0x59, 0x62, 0x4e, 0x69, 0xaa, 0x04, 0x13, 0x58, - 0x0c, 0xc2, 0x11, 0x12, 0xe3, 0x62, 0x2b, 0x49, 0x2c, 0x4a, 0x4f, 0x2d, 0x91, 0x60, 0x06, 0x0b, - 0x43, 0x79, 0x4e, 0x41, 0x2b, 0x1e, 0xc9, 0x31, 0x9e, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, - 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x13, 0x1e, 0xcb, 0x31, 0x5c, 0x78, 0x2c, 0xc7, 0x70, 0xe3, 0xb1, - 0x1c, 0x43, 0x94, 0x49, 0x7a, 0x66, 0x49, 0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e, 0x2e, 0xd4, 0x41, - 0x50, 0x4a, 0xb7, 0x38, 0x25, 0x5b, 0xbf, 0x02, 0xe6, 0xf5, 0x92, 0xca, 0x82, 0xd4, 0x62, 0xfd, - 0x82, 0xa2, 0xfc, 0x82, 0xfc, 0xe2, 0xc4, 0x9c, 0x24, 0x36, 0xb0, 0xa3, 0x8d, 0x01, 0x01, 0x00, - 0x00, 0xff, 0xff, 0xe3, 0x39, 0xca, 0xb6, 0x21, 0x01, 0x00, 0x00, + 0x20, 0x17, 0xbf, 0x2b, 0xc8, 0xd8, 0xe0, 0xca, 0xbc, 0xe4, 0x00, 0xb0, 0x59, 0x42, 0x02, 0x5c, + 0xcc, 0xd9, 0xa9, 0x95, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0x9c, 0x41, 0x20, 0xa6, 0x90, 0x08, 0x17, + 0x6b, 0x59, 0x62, 0x4e, 0x69, 0xaa, 0x04, 0x13, 0x58, 0x0c, 0xc2, 0x11, 0x12, 0xe3, 0x62, 0x2b, + 0x49, 0x2c, 0x4a, 0x4f, 0x2d, 0x91, 0x60, 0x06, 0x0b, 0x43, 0x79, 0x4e, 0x41, 0x2b, 0x1e, 0xc9, + 0x31, 0x9e, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x13, 0x1e, + 0xcb, 0x31, 0x5c, 0x78, 0x2c, 0xc7, 0x70, 0xe3, 0xb1, 0x1c, 0x43, 0x94, 0x49, 0x7a, 0x66, 0x49, + 0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e, 0x2e, 0xd4, 0x25, 0x50, 0x4a, 0xb7, 0x38, 0x25, 0x5b, 0xbf, + 0x02, 0xe6, 0xe7, 0x92, 0xca, 0x82, 0xd4, 0x62, 0xfd, 0x82, 0xa2, 0xfc, 0x82, 0xfc, 0xe2, 0xc4, + 0x9c, 0x24, 0x36, 0xb0, 0x6b, 0x8d, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x46, 0xba, 0x23, 0xc7, + 0x1a, 0x01, 0x00, 0x00, } -func (this *EventCrossParamsChange) Equal(that interface{}) bool { +func (this *EventSyncParams) Equal(that interface{}) bool { if that == nil { return this == nil } - that1, ok := that.(*EventCrossParamsChange) + that1, ok := that.(*EventSyncParams) if !ok { - that2, ok := that.(EventCrossParamsChange) + that2, ok := that.(EventSyncParams) if ok { that1 = &that2 } else { @@ -143,7 +142,7 @@ func (this *EventCrossParamsChange) Equal(that interface{}) bool { } return true } -func (m *EventCrossParamsChange) Marshal() (dAtA []byte, err error) { +func (m *EventSyncParams) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -153,12 +152,12 @@ func (m *EventCrossParamsChange) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *EventCrossParamsChange) MarshalTo(dAtA []byte) (int, error) { +func (m *EventSyncParams) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *EventCrossParamsChange) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *EventSyncParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -198,7 +197,7 @@ func encodeVarintEvent(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } -func (m *EventCrossParamsChange) Size() (n int) { +func (m *EventSyncParams) Size() (n int) { if m == nil { return 0 } @@ -225,7 +224,7 @@ func sovEvent(x uint64) (n int) { func sozEvent(x uint64) (n int) { return sovEvent(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func (m *EventCrossParamsChange) Unmarshal(dAtA []byte) error { +func (m *EventSyncParams) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -248,10 +247,10 @@ func (m *EventCrossParamsChange) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: EventCrossParamsChange: wiretype end group for non-group") + return fmt.Errorf("proto: EventSyncParams: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: EventCrossParamsChange: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: EventSyncParams: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: diff --git a/x/params/types/proposal/types.go b/x/params/types/proposal/types.go index 4725317e09..49c56cfd5a 100644 --- a/x/params/types/proposal/types.go +++ b/x/params/types/proposal/types.go @@ -3,20 +3,20 @@ package proposal import sdk "github.com/cosmos/cosmos-sdk/types" const ( - SyncParamsChangeChannel = "syncParametersChange" - SyncParamsChangeChannellID sdk.ChannelID = 3 - BridgeSubspace = "bridge" + SyncParamsChannel = "syncParametersChange" + SyncParamsChannelID sdk.ChannelID = 3 + BridgeSubspace = "bridge" ) var ( - KeySyncParamsChangeRelayerFee = []byte("SyncParamsChangeRelayerFee") + KeySyncParamsRelayerFee = []byte("SyncParamsRelayerFee") ) -// rlp (SyncParamsChangePackage) -type SyncParamsChangePackage struct { +// SyncParamsPackage is the payload be relayed to BSC +type SyncParamsPackage struct { Key string // // new parameter or new smart contract address(es) if is ungraded proposal - Values []byte // string // address to bytes + Value []byte // string // address to bytes // smart contract address(es) - Targets []byte // string + Target []byte // string } From 032823d30b984e84d8fa73df711975729a382a3c Mon Sep 17 00:00:00 2001 From: Alexgao001 Date: Fri, 17 Feb 2023 14:32:41 +0800 Subject: [PATCH 04/11] remove event --- proto/cosmos/params/v1beta1/event.proto | 18 ----------- x/params/keeper/sync_params.go | 42 +++---------------------- x/params/types/proposal/types.go | 2 ++ 3 files changed, 6 insertions(+), 56 deletions(-) delete mode 100644 proto/cosmos/params/v1beta1/event.proto diff --git a/proto/cosmos/params/v1beta1/event.proto b/proto/cosmos/params/v1beta1/event.proto deleted file mode 100644 index ff4818e493..0000000000 --- a/proto/cosmos/params/v1beta1/event.proto +++ /dev/null @@ -1,18 +0,0 @@ -syntax = "proto3"; -package cosmos.params.v1beta1; - -option go_package = "github.com/cosmos/cosmos-sdk/x/params/types/proposal"; -option (gogoproto.equal_all) = true; - -import "gogoproto/gogo.proto"; -import "cosmos_proto/cosmos.proto"; - -message EventSyncParams { - - // parameter key or UPGRADE_KEY_HASH - string key = 1; - // new parameter or new smart contract address(es) if is ungraded proposal - string value = 2; - // smart contract address(es) - string target = 3; -} \ No newline at end of file diff --git a/x/params/keeper/sync_params.go b/x/params/keeper/sync_params.go index e8085fd48b..a6398160e8 100644 --- a/x/params/keeper/sync_params.go +++ b/x/params/keeper/sync_params.go @@ -1,7 +1,6 @@ package keeper import ( - "fmt" "github.com/cosmos/cosmos-sdk/bsc/rlp" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" @@ -10,9 +9,6 @@ import ( ) func (k Keeper) SyncParams(ctx sdk.Context, p *types.ParameterChangeProposal) error { - k.Logger(ctx).Info( - fmt.Sprintf("SyncParams p.CrossChain %t", p.CrossChain), - ) key := p.Changes[0].Key values := make([]byte, 0) @@ -21,19 +17,15 @@ func (k Keeper) SyncParams(ctx sdk.Context, p *types.ParameterChangeProposal) er if len(p.Changes) != len(p.Addresses) { return sdkerrors.Wrap(types.ErrAddressSizeNotMatch, "number of addresses not match") } - if key != "upgrade" && len(p.Changes) > 1 { - return sdkerrors.Wrap(types.ErrExceedParamsChangeLimit, "Only single parameter change allowed") + if key != types.KeyUpgrade && len(p.Changes) > 1 { + return sdkerrors.Wrap(types.ErrExceedParamsChangeLimit, "only single parameter change allowed") } - k.Logger(ctx).Info( - fmt.Sprintf("SyncParams validatiors done"), - ) - for i, c := range p.Changes { values = append(values, []byte(c.Value)...) adr, err := sdk.AccAddressFromHexUnsafe(p.Addresses[i]) if err != nil { - return sdkerrors.Wrapf(types.ErrAddressNotValid, "Smart contract address is not valid %s", p.Addresses[i]) + return sdkerrors.Wrapf(types.ErrAddressNotValid, "smart contract address is not valid %s", p.Addresses[i]) } addresses = append(addresses, adr.Bytes()...) } @@ -43,10 +35,6 @@ func (k Keeper) SyncParams(ctx sdk.Context, p *types.ParameterChangeProposal) er return err } - k.Logger(ctx).Info( - fmt.Sprintf("SyncParams realyerFeeAmount %d", relayerFeeAmount), - ) - pack := types.SyncParamsPackage{ Key: key, Value: values, @@ -57,12 +45,7 @@ func (k Keeper) SyncParams(ctx sdk.Context, p *types.ParameterChangeProposal) er if err != nil { return sdkerrors.Wrapf(types.ErrInvalidPackage, "encode sync params package error") } - kp := *k.CrossChainKeeper - - k.Logger(ctx).Info( - fmt.Sprintf("SyncParams CreateRawIBCPackageWithFee"), - ) - seq, err := kp.CreateRawIBCPackageWithFee( + _, err = (*k.CrossChainKeeper).CreateRawIBCPackageWithFee( ctx, types.SyncParamsChannelID, sdk.SynCrossChainPackageType, @@ -70,24 +53,7 @@ func (k Keeper) SyncParams(ctx sdk.Context, p *types.ParameterChangeProposal) er relayerFeeAmount, big.NewInt(0), ) - if err != nil { - return err - } - - k.Logger(ctx).Info( - fmt.Sprintf("SyncParams seq %d", seq), - ) - k.Logger(ctx).Info( - fmt.Sprintf("SyncParams CreatedRawIBCPackageWithFee"), - ) - - crossParamsEvent := types.EventSyncParams{ - Key: key, - Value: string(values), - Target: string(addresses), - } - err = ctx.EventManager().EmitTypedEvent(&crossParamsEvent) if err != nil { return err } diff --git a/x/params/types/proposal/types.go b/x/params/types/proposal/types.go index 49c56cfd5a..52b20582c5 100644 --- a/x/params/types/proposal/types.go +++ b/x/params/types/proposal/types.go @@ -6,6 +6,8 @@ const ( SyncParamsChannel = "syncParametersChange" SyncParamsChannelID sdk.ChannelID = 3 BridgeSubspace = "bridge" + + KeyUpgrade = "ungrade" ) var ( From 7a4d469315cad2b3f6606135c2b98b529f67d9a9 Mon Sep 17 00:00:00 2001 From: Alexgao001 Date: Fri, 17 Feb 2023 17:22:23 +0800 Subject: [PATCH 05/11] fix comments --- x/gov/keeper/proposal.go | 1 - x/gov/module.go | 6 ++-- x/params/keeper/keeper.go | 4 +-- x/params/keeper/sync_params.go | 44 ++++++++++++------------------ x/params/types/expected_keepers.go | 3 +- x/params/types/proposal/errors.go | 1 - x/params/types/proposal/types.go | 4 +-- 7 files changed, 26 insertions(+), 37 deletions(-) diff --git a/x/gov/keeper/proposal.go b/x/gov/keeper/proposal.go index 9beab4a38c..943f5411cf 100644 --- a/x/gov/keeper/proposal.go +++ b/x/gov/keeper/proposal.go @@ -69,7 +69,6 @@ func (keeper Keeper) SubmitProposal(ctx sdk.Context, messages []sdk.Msg, metadat depositPeriod := keeper.GetDepositParams(ctx).MaxDepositPeriod proposal, err := v1.NewProposal(messages, proposalID, metadata, submitTime, submitTime.Add(*depositPeriod)) - if err != nil { return v1.Proposal{}, err } diff --git a/x/gov/module.go b/x/gov/module.go index f75f61274d..76578f8351 100644 --- a/x/gov/module.go +++ b/x/gov/module.go @@ -158,12 +158,12 @@ func (am AppModule) RegisterServices(cfg module.Configurator) { msgServer := keeper.NewMsgServerImpl(am.keeper) // unregister v1beta1 msg server - //v1beta1.RegisterMsgServer(cfg.MsgServer(), keeper.NewLegacyMsgServerImpl(am.accountKeeper.GetModuleAddress(types.ModuleName).String(), msgServer)) + // v1beta1.RegisterMsgServer(cfg.MsgServer(), keeper.NewLegacyMsgServerImpl(am.accountKeeper.GetModuleAddress(types.ModuleName).String(), msgServer)) v1.RegisterMsgServer(cfg.MsgServer(), msgServer) // unregister v1beta1 Query server - //legacyQueryServer := keeper.NewLegacyQueryServer(am.keeper) - ///v1beta1.RegisterQueryServer(cfg.QueryServer(), legacyQueryServer) + // legacyQueryServer := keeper.NewLegacyQueryServer(am.keeper) + /// v1beta1.RegisterQueryServer(cfg.QueryServer(), legacyQueryServer) v1.RegisterQueryServer(cfg.QueryServer(), am.keeper) m := keeper.NewMigrator(am.keeper) diff --git a/x/params/keeper/keeper.go b/x/params/keeper/keeper.go index 4450ea7ce9..e35bfa0aa5 100644 --- a/x/params/keeper/keeper.go +++ b/x/params/keeper/keeper.go @@ -16,7 +16,7 @@ type Keeper struct { key storetypes.StoreKey tkey storetypes.StoreKey spaces map[string]*types.Subspace - CrossChainKeeper *types.CrossChainKeeper + crossChainKeeper *types.CrossChainKeeper } // NewKeeper constructs a params keeper @@ -32,7 +32,7 @@ func NewKeeper(cdc codec.BinaryCodec, legacyAmino *codec.LegacyAmino, key, tkey // SetCrossChainKeeper sets the crosschainkeeper after its initialization func (k *Keeper) SetCrossChainKeeper(crossChainKeeper types.CrossChainKeeper) { - k.CrossChainKeeper = &crossChainKeeper + k.crossChainKeeper = &crossChainKeeper } // Logger returns a module-specific logger. diff --git a/x/params/keeper/sync_params.go b/x/params/keeper/sync_params.go index a6398160e8..dc95cdc6e5 100644 --- a/x/params/keeper/sync_params.go +++ b/x/params/keeper/sync_params.go @@ -1,27 +1,36 @@ package keeper import ( + "encoding/hex" + "math/big" + "github.com/cosmos/cosmos-sdk/bsc/rlp" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" types "github.com/cosmos/cosmos-sdk/x/params/types/proposal" - "math/big" ) func (k Keeper) SyncParams(ctx sdk.Context, p *types.ParameterChangeProposal) error { + // this validates content and size of changes is not empty + if err := p.ValidateBasic(); err != nil { + return err + } + if len(p.Changes) != len(p.Addresses) { + return sdkerrors.Wrap(types.ErrAddressSizeNotMatch, "number of addresses not match") + } key := p.Changes[0].Key values := make([]byte, 0) addresses := make([]byte, 0) - if len(p.Changes) != len(p.Addresses) { - return sdkerrors.Wrap(types.ErrAddressSizeNotMatch, "number of addresses not match") - } if key != types.KeyUpgrade && len(p.Changes) > 1 { return sdkerrors.Wrap(types.ErrExceedParamsChangeLimit, "only single parameter change allowed") } for i, c := range p.Changes { + if c.Key != key { + return sdkerrors.Wrap(types.ErrInvalidPackage, "all changes key should be 'ungrade'") + } values = append(values, []byte(c.Value)...) adr, err := sdk.AccAddressFromHexUnsafe(p.Addresses[i]) if err != nil { @@ -30,11 +39,6 @@ func (k Keeper) SyncParams(ctx sdk.Context, p *types.ParameterChangeProposal) er addresses = append(addresses, adr.Bytes()...) } - relayerFeeAmount, err := k.GetSyncParamsRelayerFee(ctx) - if err != nil { - return err - } - pack := types.SyncParamsPackage{ Key: key, Value: values, @@ -45,12 +49,12 @@ func (k Keeper) SyncParams(ctx sdk.Context, p *types.ParameterChangeProposal) er if err != nil { return sdkerrors.Wrapf(types.ErrInvalidPackage, "encode sync params package error") } - _, err = (*k.CrossChainKeeper).CreateRawIBCPackageWithFee( + _, err = (*k.crossChainKeeper).CreateRawIBCPackageWithFee( ctx, types.SyncParamsChannelID, sdk.SynCrossChainPackageType, encodedPackage, - relayerFeeAmount, + big.NewInt(0), big.NewInt(0), ) @@ -60,31 +64,19 @@ func (k Keeper) SyncParams(ctx sdk.Context, p *types.ParameterChangeProposal) er return nil } -// GetSyncParamsRelayerFee gets the sync params change relayer fee params -func (k Keeper) GetSyncParamsRelayerFee(ctx sdk.Context) (*big.Int, error) { - var syncParamsRelayerFeeParam string - ss, ok := k.GetSubspace(types.BridgeSubspace) - if !ok { - return nil, sdkerrors.Wrap(types.ErrUnknownSubspace, types.BridgeSubspace) - } - ss.Get(ctx, types.KeySyncParamsRelayerFee, &syncParamsRelayerFeeParam) - relayerFee, valid := big.NewInt(0).SetString(syncParamsRelayerFeeParam, 10) - if !valid { - return nil, sdkerrors.Wrapf(types.ErrInvalidRelayerFee, "invalid relayer fee: %s", syncParamsRelayerFeeParam) - } - return relayerFee, nil -} - // Need these in order to register paramsKeeper to be a CrosschainApp so that it can register channel(3) func (k Keeper) ExecuteSynPackage(ctx sdk.Context, appCtx *sdk.CrossChainAppContext, payload []byte) sdk.ExecuteResult { + k.Logger(ctx).Error("received sync params sync package", "payload", hex.EncodeToString(payload)) return sdk.ExecuteResult{} } func (k Keeper) ExecuteAckPackage(ctx sdk.Context, header *sdk.CrossChainAppContext, payload []byte) sdk.ExecuteResult { + k.Logger(ctx).Error("received sync params in ack package", "payload", hex.EncodeToString(payload)) return sdk.ExecuteResult{} } func (k Keeper) ExecuteFailAckPackage(ctx sdk.Context, header *sdk.CrossChainAppContext, payload []byte) sdk.ExecuteResult { + k.Logger(ctx).Error("received sync params fail ack package", "payload", hex.EncodeToString(payload)) return sdk.ExecuteResult{} } diff --git a/x/params/types/expected_keepers.go b/x/params/types/expected_keepers.go index 81d3ff7ee0..56b71d4f0c 100644 --- a/x/params/types/expected_keepers.go +++ b/x/params/types/expected_keepers.go @@ -1,8 +1,9 @@ package types import ( - sdk "github.com/cosmos/cosmos-sdk/types" "math/big" + + sdk "github.com/cosmos/cosmos-sdk/types" ) type CrossChainKeeper interface { diff --git a/x/params/types/proposal/errors.go b/x/params/types/proposal/errors.go index 4bb3342575..5d861ba309 100644 --- a/x/params/types/proposal/errors.go +++ b/x/params/types/proposal/errors.go @@ -16,5 +16,4 @@ var ( ErrAddressNotValid = sdkerrors.Register(ModuleName, 9, "address format is not valid") ErrExceedParamsChangeLimit = sdkerrors.Register(ModuleName, 10, "exceed params change limit") ErrInvalidPackage = sdkerrors.Register(ModuleName, 11, "invalid sync params package") - ErrInvalidRelayerFee = sdkerrors.Register(ModuleName, 12, "invalid sync params relayer fee") ) diff --git a/x/params/types/proposal/types.go b/x/params/types/proposal/types.go index 52b20582c5..0e176bc322 100644 --- a/x/params/types/proposal/types.go +++ b/x/params/types/proposal/types.go @@ -10,9 +10,7 @@ const ( KeyUpgrade = "ungrade" ) -var ( - KeySyncParamsRelayerFee = []byte("SyncParamsRelayerFee") -) +var KeySyncParamsRelayerFee = []byte("SyncParamsRelayerFee") // SyncParamsPackage is the payload be relayed to BSC type SyncParamsPackage struct { From 63c2075c4c99f4fed1b92cddb2da3a0fee600042 Mon Sep 17 00:00:00 2001 From: Alexgao001 Date: Mon, 20 Feb 2023 14:45:24 +0800 Subject: [PATCH 06/11] unit test and fix comments --- x/params/keeper/sync_params.go | 15 ++-------- x/params/proposal_handler.go | 5 +--- x/params/types/proposal/errors.go | 2 +- x/params/types/proposal/proposal.go | 28 +++++++++++++----- x/params/types/proposal/proposal_test.go | 36 ++++++++++++++++++++++++ x/params/types/proposal/types.go | 4 +-- 6 files changed, 62 insertions(+), 28 deletions(-) diff --git a/x/params/keeper/sync_params.go b/x/params/keeper/sync_params.go index dc95cdc6e5..4a52f40c84 100644 --- a/x/params/keeper/sync_params.go +++ b/x/params/keeper/sync_params.go @@ -15,22 +15,11 @@ func (k Keeper) SyncParams(ctx sdk.Context, p *types.ParameterChangeProposal) er if err := p.ValidateBasic(); err != nil { return err } - if len(p.Changes) != len(p.Addresses) { - return sdkerrors.Wrap(types.ErrAddressSizeNotMatch, "number of addresses not match") - } - key := p.Changes[0].Key values := make([]byte, 0) addresses := make([]byte, 0) - if key != types.KeyUpgrade && len(p.Changes) > 1 { - return sdkerrors.Wrap(types.ErrExceedParamsChangeLimit, "only single parameter change allowed") - } - for i, c := range p.Changes { - if c.Key != key { - return sdkerrors.Wrap(types.ErrInvalidPackage, "all changes key should be 'ungrade'") - } values = append(values, []byte(c.Value)...) adr, err := sdk.AccAddressFromHexUnsafe(p.Addresses[i]) if err != nil { @@ -40,14 +29,14 @@ func (k Keeper) SyncParams(ctx sdk.Context, p *types.ParameterChangeProposal) er } pack := types.SyncParamsPackage{ - Key: key, + Key: p.Changes[0].Key, Value: values, Target: addresses, } encodedPackage, err := rlp.EncodeToBytes(pack) if err != nil { - return sdkerrors.Wrapf(types.ErrInvalidPackage, "encode sync params package error") + return sdkerrors.Wrapf(types.ErrInvalidUpgradeProposal, "encode sync params package error") } _, err = (*k.crossChainKeeper).CreateRawIBCPackageWithFee( ctx, diff --git a/x/params/proposal_handler.go b/x/params/proposal_handler.go index a7221f60ba..68f0b44fb8 100644 --- a/x/params/proposal_handler.go +++ b/x/params/proposal_handler.go @@ -27,10 +27,7 @@ func handleParameterChangeProposal(ctx sdk.Context, k keeper.Keeper, p *proposal // for govv1.MsgExecLegacyContent, validation is applied by writing to cache Subspace store, since gnfd does not hold // the subspace for crosschain parameters. the validation is skipped. if p.CrossChain { - if err := k.SyncParams(ctx, p); err != nil { - return err - } - return nil + return k.SyncParams(ctx, p) } for _, c := range p.Changes { diff --git a/x/params/types/proposal/errors.go b/x/params/types/proposal/errors.go index 5d861ba309..6a9e2ec2d5 100644 --- a/x/params/types/proposal/errors.go +++ b/x/params/types/proposal/errors.go @@ -15,5 +15,5 @@ var ( ErrAddressSizeNotMatch = sdkerrors.Register(ModuleName, 8, "number of old address not equal to new addresses") ErrAddressNotValid = sdkerrors.Register(ModuleName, 9, "address format is not valid") ErrExceedParamsChangeLimit = sdkerrors.Register(ModuleName, 10, "exceed params change limit") - ErrInvalidPackage = sdkerrors.Register(ModuleName, 11, "invalid sync params package") + ErrInvalidUpgradeProposal = sdkerrors.Register(ModuleName, 11, "invalid sync params package") ) diff --git a/x/params/types/proposal/proposal.go b/x/params/types/proposal/proposal.go index 5ba69fb0cf..675c63ea55 100644 --- a/x/params/types/proposal/proposal.go +++ b/x/params/types/proposal/proposal.go @@ -4,9 +4,8 @@ import ( "fmt" "strings" - "sigs.k8s.io/yaml" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" + "sigs.k8s.io/yaml" ) const ( @@ -47,8 +46,10 @@ func (pcp *ParameterChangeProposal) ValidateBasic() error { if err != nil { return err } - - return ValidateChanges(pcp.Changes) + if pcp.CrossChain && len(pcp.Changes) != len(pcp.Addresses) { + return ErrAddressSizeNotMatch + } + return ValidateChanges(pcp.Changes, pcp.CrossChain) } // String implements the Stringer interface. @@ -84,12 +85,17 @@ func (pc ParamChange) String() string { // ValidateChanges performs basic validation checks over a set of ParamChange. It // returns an error if any ParamChange is invalid. -func ValidateChanges(changes []ParamChange) error { +func ValidateChanges(changes []ParamChange, crossChain bool) error { if len(changes) == 0 { return ErrEmptyChanges } - - for _, pc := range changes { + fistKey := changes[0].Key + for i, pc := range changes { + if crossChain { + if err := validateCrossChainChange(pc, fistKey, i); err != nil { + return err + } + } if len(pc.Subspace) == 0 { return ErrEmptySubspace } @@ -100,6 +106,14 @@ func ValidateChanges(changes []ParamChange) error { return ErrEmptyValue } } + return nil +} +func validateCrossChainChange(change ParamChange, firstKey string, i int) error { + if firstKey == KeyUpgrade && change.Key != firstKey { + return ErrInvalidUpgradeProposal + } else if firstKey != KeyUpgrade && i > 0 { + return ErrExceedParamsChangeLimit + } return nil } diff --git a/x/params/types/proposal/proposal_test.go b/x/params/types/proposal/proposal_test.go index a18f9c4076..74592f3a2b 100644 --- a/x/params/types/proposal/proposal_test.go +++ b/x/params/types/proposal/proposal_test.go @@ -25,3 +25,39 @@ func TestParameterChangeProposal(t *testing.T) { pcp = NewParameterChangeProposal("test title", "test description", []ParamChange{pc4}) require.Error(t, pcp.ValidateBasic()) } + +func TestCrossChainParameterChangeProposal(t *testing.T) { + pc1 := NewParamChange("sub", "foo", "baz") + pcp := NewCrossChainParameterChangeProposal("test title", "test description", []ParamChange{pc1}, []string{"0x76d244CE05c3De4BbC6fDd7F56379B145709ade9"}) + + require.Equal(t, "test title", pcp.GetTitle()) + require.Equal(t, "test description", pcp.GetDescription()) + require.Equal(t, RouterKey, pcp.ProposalRoute()) + require.Equal(t, ProposalTypeChange, pcp.ProposalType()) + require.Nil(t, pcp.ValidateBasic()) + + // more than 1 parameter change is not allowed + pc2 := NewParamChange("sub", "bar", "cat") + pc3 := NewParamChange("", "bar", "cat") + pcp = NewCrossChainParameterChangeProposal("test title", "test description", []ParamChange{pc2, pc3}, []string{"0x76d244CE05c3De4BbC6fDd7F56379B145709ade9", "0x80C7Fa8FC825C5e622cdbcAEa0A22d188634BDd3"}) + require.Equal(t, pcp.ValidateBasic(), ErrExceedParamsChangeLimit) +} + +func TestCrossChainUpgradeProposal(t *testing.T) { + pc1 := NewParamChange("sub", "upgrade", "0x76d244CE05c3De4BbC6fDd7F56379B145709ade9") + pcp := NewCrossChainParameterChangeProposal("test title", "test description", []ParamChange{pc1}, []string{"0x80C7Fa8FC825C5e622cdbcAEa0A22d188634BDd3"}) + + require.Equal(t, "test title", pcp.GetTitle()) + require.Equal(t, "test description", pcp.GetDescription()) + require.Equal(t, RouterKey, pcp.ProposalRoute()) + require.Equal(t, ProposalTypeChange, pcp.ProposalType()) + require.Nil(t, pcp.ValidateBasic()) + + // keys should all be 'upgrade', otherwise would fail + pc2 := NewParamChange("sub", "upgrade", "0x76d244CE05c3De4BbC6fDd7F56379B145709ade9") + pc3 := NewParamChange("sub", "not_upgrade", "0x2eDD53b48726a887c98aDAb97e0a8600f855570d") + + pcp = NewCrossChainParameterChangeProposal("test title", "test description", []ParamChange{pc2, pc3}, []string{"0x80C7Fa8FC825C5e622cdbcAEa0A22d188634BDd3", "0xA4A2957E858529FFABBBb483D1D704378a9fca6b"}) + require.Equal(t, pcp.ValidateBasic(), ErrInvalidUpgradeProposal) + +} diff --git a/x/params/types/proposal/types.go b/x/params/types/proposal/types.go index 0e176bc322..9e879589a8 100644 --- a/x/params/types/proposal/types.go +++ b/x/params/types/proposal/types.go @@ -5,9 +5,7 @@ import sdk "github.com/cosmos/cosmos-sdk/types" const ( SyncParamsChannel = "syncParametersChange" SyncParamsChannelID sdk.ChannelID = 3 - BridgeSubspace = "bridge" - - KeyUpgrade = "ungrade" + KeyUpgrade = "upgrade" ) var KeySyncParamsRelayerFee = []byte("SyncParamsRelayerFee") From f1a033d32d2e19b411ba99e659802cf89b2883e7 Mon Sep 17 00:00:00 2001 From: Alexgao001 Date: Mon, 20 Feb 2023 15:40:11 +0800 Subject: [PATCH 07/11] replace v1beta1 proposal in test since legacy server is disabled --- x/feegrant/client/testutil/suite.go | 2 +- x/gov/client/cli/tx.go | 10 ++++++++-- x/params/keeper/sync_params.go | 4 ++-- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/x/feegrant/client/testutil/suite.go b/x/feegrant/client/testutil/suite.go index 21defb8f89..b889412779 100644 --- a/x/feegrant/client/testutil/suite.go +++ b/x/feegrant/client/testutil/suite.go @@ -820,7 +820,7 @@ func (s *IntegrationTestSuite) TestFilteredFeeAllowance() { } spendLimit := sdk.NewCoin("stake", sdk.NewInt(1000)) - allowMsgs := strings.Join([]string{sdk.MsgTypeURL(&govv1beta1.MsgSubmitProposal{}), sdk.MsgTypeURL(&govv1.MsgVoteWeighted{})}, ",") + allowMsgs := strings.Join([]string{sdk.MsgTypeURL(&govv1.MsgSubmitProposal{}), sdk.MsgTypeURL(&govv1.MsgVoteWeighted{})}, ",") testCases := []struct { name string diff --git a/x/gov/client/cli/tx.go b/x/gov/client/cli/tx.go index 48ef5ddf54..51a72066c0 100644 --- a/x/gov/client/cli/tx.go +++ b/x/gov/client/cli/tx.go @@ -5,6 +5,8 @@ import ( "strconv" "strings" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + "github.com/spf13/cobra" "github.com/cosmos/cosmos-sdk/client" @@ -186,11 +188,15 @@ $ %s tx gov submit-legacy-proposal --title="Test Proposal" --description="My awe return fmt.Errorf("failed to create proposal content: unknown proposal type %s", proposal.Type) } - msg, err := v1beta1.NewMsgSubmitProposal(content, amount, clientCtx.GetFromAddress()) + govAcctAddress := authtypes.NewModuleAddress(types.ModuleName).String() + contentMsg, err := v1.NewLegacyContent(content, govAcctAddress) + if err != nil { + return err + } + msg, err := v1.NewMsgSubmitProposal([]sdk.Msg{contentMsg}, amount, clientCtx.GetFromAddress().String(), "") if err != nil { return fmt.Errorf("invalid message: %w", err) } - return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) }, } diff --git a/x/params/keeper/sync_params.go b/x/params/keeper/sync_params.go index 4a52f40c84..a245b5a488 100644 --- a/x/params/keeper/sync_params.go +++ b/x/params/keeper/sync_params.go @@ -21,11 +21,11 @@ func (k Keeper) SyncParams(ctx sdk.Context, p *types.ParameterChangeProposal) er for i, c := range p.Changes { values = append(values, []byte(c.Value)...) - adr, err := sdk.AccAddressFromHexUnsafe(p.Addresses[i]) + addr, err := sdk.AccAddressFromHexUnsafe(p.Addresses[i]) if err != nil { return sdkerrors.Wrapf(types.ErrAddressNotValid, "smart contract address is not valid %s", p.Addresses[i]) } - addresses = append(addresses, adr.Bytes()...) + addresses = append(addresses, addr.Bytes()...) } pack := types.SyncParamsPackage{ From 802f203c618a902e352e1274c9f9053e695929cd Mon Sep 17 00:00:00 2001 From: Alexgao001 Date: Tue, 21 Feb 2023 08:08:37 +0800 Subject: [PATCH 08/11] fix bug --- x/gov/abci.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/x/gov/abci.go b/x/gov/abci.go index be2c72f17d..8e71d40d5c 100644 --- a/x/gov/abci.go +++ b/x/gov/abci.go @@ -71,7 +71,8 @@ func EndBlocker(ctx sdk.Context, keeper keeper.Keeper) { if err == nil { for idx, msg = range messages { handler := keeper.Router().Handler(msg) - res, err := handler(cacheCtx, msg) + var res *sdk.Result + res, err = handler(cacheCtx, msg) if err != nil { break } From 88a2014d175fc114795dd13b3e8bc03d04db49fc Mon Sep 17 00:00:00 2001 From: Alexgao001 Date: Tue, 21 Feb 2023 08:44:27 +0800 Subject: [PATCH 09/11] fix v1beta1 integration test --- x/distribution/client/cli/tx.go | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/x/distribution/client/cli/tx.go b/x/distribution/client/cli/tx.go index 94767556e1..4effce2246 100644 --- a/x/distribution/client/cli/tx.go +++ b/x/distribution/client/cli/tx.go @@ -4,6 +4,9 @@ import ( "fmt" "strings" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + "github.com/spf13/cobra" "github.com/spf13/pflag" @@ -13,7 +16,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/version" "github.com/cosmos/cosmos-sdk/x/distribution/types" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" + govv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" ) // Transaction flags for the x/distribution module @@ -341,12 +344,15 @@ Where proposal.json contains: return err } content := types.NewCommunityPoolSpendProposal(proposal.Title, proposal.Description, recpAddr, amount) - - msg, err := govtypes.NewMsgSubmitProposal(content, deposit, from) + govAcctAddress := authtypes.NewModuleAddress(govtypes.ModuleName).String() + contentMsg, err := govv1.NewLegacyContent(content, govAcctAddress) + if err != nil { + return err + } + msg, err := govv1.NewMsgSubmitProposal([]sdk.Msg{contentMsg}, deposit, from.String(), "") if err != nil { return err } - return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) }, } From cf06e7fa96e97e247d9499166913db1b398976ac Mon Sep 17 00:00:00 2001 From: Alexgao001 Date: Wed, 22 Feb 2023 17:27:03 +0800 Subject: [PATCH 10/11] fix converting address --- x/params/client/cli/tx.go | 10 +++-- x/params/client/cli/tx_test.go | 36 +++++++++++++++++ x/params/client/utils/utils.go | 3 ++ x/params/keeper/sync_params.go | 15 ++++++- x/params/keeper/sync_params_test.go | 62 +++++++++++++++++++++++++++++ x/params/types/proposal/errors.go | 1 + 6 files changed, 122 insertions(+), 5 deletions(-) create mode 100644 x/params/keeper/sync_params_test.go diff --git a/x/params/client/cli/tx.go b/x/params/client/cli/tx.go index d7726dec6d..3814278aef 100644 --- a/x/params/client/cli/tx.go +++ b/x/params/client/cli/tx.go @@ -2,6 +2,9 @@ package cli import ( "fmt" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" "strings" "github.com/spf13/cobra" @@ -10,7 +13,6 @@ import ( "github.com/cosmos/cosmos-sdk/client/tx" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/version" - govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" paramscutils "github.com/cosmos/cosmos-sdk/x/params/client/utils" paramproposal "github.com/cosmos/cosmos-sdk/x/params/types/proposal" ) @@ -75,12 +77,12 @@ Where proposal.json contains: if err != nil { return err } - - msg, err := govv1beta1.NewMsgSubmitProposal(content, deposit, from) + govAcctAddress := authtypes.NewModuleAddress(govtypes.ModuleName).String() + contentMsg, err := govv1.NewLegacyContent(content, govAcctAddress) if err != nil { return err } - + msg, err := govv1.NewMsgSubmitProposal([]sdk.Msg{contentMsg}, deposit, from.String(), "") return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) }, } diff --git a/x/params/client/cli/tx_test.go b/x/params/client/cli/tx_test.go index 215fb41c82..aae4a43b4a 100644 --- a/x/params/client/cli/tx_test.go +++ b/x/params/client/cli/tx_test.go @@ -40,3 +40,39 @@ func TestParseProposal(t *testing.T) { }, }, proposal.Changes) } + +func TestParseCrossChainProposal(t *testing.T) { + cdc := codec.NewLegacyAmino() + okJSON := testutil.WriteToNewTempFile(t, ` +{ + "title": "BSC smart contract upgrade", + "description": "BSC smart contract upgrade", + "changes": [ + { + "subspace": "BSC", + "key": "upgrade", + "value": "0x8f86403A4DE0BB5791fa46B8e795C547942fE4Cf" + } + ], + "deposit": "1000000000000BNB", + "cross_chain": true, + "addresses": ["0x6c615C766EE6b7e69275b0D070eF50acc93ab880"] +} +`) + proposal, err := utils.ParseParamChangeProposalJSON(cdc, okJSON.Name()) + require.NoError(t, err) + + require.Equal(t, "BSC smart contract upgrade", proposal.Title) + require.Equal(t, "BSC smart contract upgrade", proposal.Description) + require.Equal(t, "1000000000000BNB", proposal.Deposit) + + require.Equal(t, true, proposal.CrossChain) + require.Equal(t, "0x6c615C766EE6b7e69275b0D070eF50acc93ab880", proposal.Addresses[0]) + require.Equal(t, utils.ParamChangesJSON{ + { + Subspace: "BSC", + Key: "upgrade", + Value: []byte{0x22, 0x30, 0x78, 0x38, 0x66, 0x38, 0x36, 0x34, 0x30, 0x33, 0x41, 0x34, 0x44, 0x45, 0x30, 0x42, 0x42, 0x35, 0x37, 0x39, 0x31, 0x66, 0x61, 0x34, 0x36, 0x42, 0x38, 0x65, 0x37, 0x39, 0x35, 0x43, 0x35, 0x34, 0x37, 0x39, 0x34, 0x32, 0x66, 0x45, 0x34, 0x43, 0x66, 0x22}, + }, + }, proposal.Changes) +} diff --git a/x/params/client/utils/utils.go b/x/params/client/utils/utils.go index 4c106913b0..acfc2cc25f 100644 --- a/x/params/client/utils/utils.go +++ b/x/params/client/utils/utils.go @@ -12,6 +12,7 @@ type ( // ParamChangesJSON defines a slice of ParamChangeJSON objects which can be // converted to a slice of ParamChange objects. ParamChangesJSON []ParamChangeJSON + Addresses []string // ParamChangeJSON defines a parameter change used in JSON input. This // allows values to be specified in raw JSON instead of being string encoded. @@ -28,6 +29,8 @@ type ( Description string `json:"description" yaml:"description"` Changes ParamChangesJSON `json:"changes" yaml:"changes"` Deposit string `json:"deposit" yaml:"deposit"` + CrossChain bool `json:"cross_chain" yaml:"cross_chain"` + Addresses Addresses `json:"addresses" yaml:"addresses"` } ) diff --git a/x/params/keeper/sync_params.go b/x/params/keeper/sync_params.go index a245b5a488..f52ec29c7c 100644 --- a/x/params/keeper/sync_params.go +++ b/x/params/keeper/sync_params.go @@ -20,7 +20,20 @@ func (k Keeper) SyncParams(ctx sdk.Context, p *types.ParameterChangeProposal) er addresses := make([]byte, 0) for i, c := range p.Changes { - values = append(values, []byte(c.Value)...) + var value []byte + var err error + if c.Key == types.KeyUpgrade { + value, err = sdk.AccAddressFromHexUnsafe(c.Value) + if err != nil { + return sdkerrors.Wrapf(types.ErrAddressNotValid, "smart contract address is not valid %s", p.Addresses[i]) + } + } else { + value, err = hex.DecodeString(c.Value) + if err != nil { + return sdkerrors.Wrapf(types.ErrInvalidValue, "value is not valid %s", c.Value) + } + } + values = append(values, value...) addr, err := sdk.AccAddressFromHexUnsafe(p.Addresses[i]) if err != nil { return sdkerrors.Wrapf(types.ErrAddressNotValid, "smart contract address is not valid %s", p.Addresses[i]) diff --git a/x/params/keeper/sync_params_test.go b/x/params/keeper/sync_params_test.go new file mode 100644 index 0000000000..20439f5547 --- /dev/null +++ b/x/params/keeper/sync_params_test.go @@ -0,0 +1,62 @@ +package keeper + +import ( + "encoding/hex" + "testing" + + "github.com/cosmos/cosmos-sdk/bsc/rlp" + sdk "github.com/cosmos/cosmos-sdk/types" + types "github.com/cosmos/cosmos-sdk/x/params/types/proposal" +) + +func TestSyncParams(t *testing.T) { + var paramChanges []types.ParamChange + ug1 := types.ParamChange{ + Subspace: "BSC", + Key: "upgrade", + Value: "0x8f86403A4DE0BB5791fa46B8e795C547942fE4Cf", + } + paramChanges = append(paramChanges, ug1) + ug2 := types.ParamChange{ + Subspace: "BSC", + Key: "upgrade", + Value: "0x9d4454B023096f34B160D6B654540c56A1F81688", + } + paramChanges = append(paramChanges, ug2) + content := types.NewCrossChainParameterChangeProposal( + "upgrade GovHub and CrossChain", + "upgrade GovHub and CrossChain", + paramChanges, + []string{"0x6c615C766EE6b7e69275b0D070eF50acc93ab880", "0x04ED4ad3cDe36FE8ba944E3D6CFC54f7Fe6c3C72"}, + ) + values := make([]byte, 0) + addresses := make([]byte, 0) + + for i, c := range paramChanges { + // params value key = "abc" value = "value" + // 1. address hex.DecodeString() + //decodeString, err := hex.DecodeString(c.Value) + //if err != nil { + // return + //} + // parameter + hex.DecodeString(c.Value) + + // if value address + value, _ := sdk.AccAddressFromHexUnsafe(c.Value) + values = append(values, value.Bytes()...) + + addr, _ := sdk.AccAddressFromHexUnsafe(content.Addresses[i]) + addresses = append(addresses, addr.Bytes()...) + } + + pack := types.SyncParamsPackage{ + Key: content.Changes[0].Key, + Value: values, + Target: addresses, + } + encodedPackage, _ := rlp.EncodeToBytes(pack) + t.Log(hex.EncodeToString(encodedPackage)) +} + +// f8878775706772616465b854307838663836343033413444453042423537393166613436423865373935433534373934326645344366307839643434353442303233303936663334423136304436423635343534306335364131463831363838a86c615c766ee6b7e69275b0d070ef50acc93ab88004ed4ad3cde36fe8ba944e3d6cfc54f7fe6c3c72 diff --git a/x/params/types/proposal/errors.go b/x/params/types/proposal/errors.go index 6a9e2ec2d5..f619d9e33a 100644 --- a/x/params/types/proposal/errors.go +++ b/x/params/types/proposal/errors.go @@ -16,4 +16,5 @@ var ( ErrAddressNotValid = sdkerrors.Register(ModuleName, 9, "address format is not valid") ErrExceedParamsChangeLimit = sdkerrors.Register(ModuleName, 10, "exceed params change limit") ErrInvalidUpgradeProposal = sdkerrors.Register(ModuleName, 11, "invalid sync params package") + ErrInvalidValue = sdkerrors.Register(ModuleName, 12, "decode hex value failed") ) From 4d7942d93aca9baf6666ca5eabcdc8b904f307ea Mon Sep 17 00:00:00 2001 From: Alexgao001 Date: Thu, 23 Feb 2023 20:48:29 +0800 Subject: [PATCH 11/11] clean code --- x/gov/module.go | 7 ---- x/params/client/cli/tx.go | 6 ++- x/params/keeper/sync_params.go | 12 +++--- x/params/keeper/sync_params_test.go | 62 ----------------------------- x/params/types/proposal/types.go | 6 +-- 5 files changed, 14 insertions(+), 79 deletions(-) delete mode 100644 x/params/keeper/sync_params_test.go diff --git a/x/gov/module.go b/x/gov/module.go index 76578f8351..ea160899fa 100644 --- a/x/gov/module.go +++ b/x/gov/module.go @@ -157,15 +157,8 @@ func (am AppModule) LegacyQuerierHandler(legacyQuerierCdc *codec.LegacyAmino) sd func (am AppModule) RegisterServices(cfg module.Configurator) { msgServer := keeper.NewMsgServerImpl(am.keeper) - // unregister v1beta1 msg server - // v1beta1.RegisterMsgServer(cfg.MsgServer(), keeper.NewLegacyMsgServerImpl(am.accountKeeper.GetModuleAddress(types.ModuleName).String(), msgServer)) v1.RegisterMsgServer(cfg.MsgServer(), msgServer) - - // unregister v1beta1 Query server - // legacyQueryServer := keeper.NewLegacyQueryServer(am.keeper) - /// v1beta1.RegisterQueryServer(cfg.QueryServer(), legacyQueryServer) v1.RegisterQueryServer(cfg.QueryServer(), am.keeper) - m := keeper.NewMigrator(am.keeper) err := cfg.RegisterMigration(types.ModuleName, 1, m.Migrate1to2) if err != nil { diff --git a/x/params/client/cli/tx.go b/x/params/client/cli/tx.go index 3814278aef..f3e150168d 100644 --- a/x/params/client/cli/tx.go +++ b/x/params/client/cli/tx.go @@ -2,10 +2,11 @@ package cli import ( "fmt" + "strings" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" govv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" - "strings" "github.com/spf13/cobra" @@ -83,6 +84,9 @@ Where proposal.json contains: return err } msg, err := govv1.NewMsgSubmitProposal([]sdk.Msg{contentMsg}, deposit, from.String(), "") + if err != nil { + return err + } return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) }, } diff --git a/x/params/keeper/sync_params.go b/x/params/keeper/sync_params.go index f52ec29c7c..bf42727dda 100644 --- a/x/params/keeper/sync_params.go +++ b/x/params/keeper/sync_params.go @@ -10,6 +10,10 @@ import ( types "github.com/cosmos/cosmos-sdk/x/params/types/proposal" ) +func (k Keeper) RegisterCrossChainSyncParamsApp() error { + return (*k.crossChainKeeper).RegisterChannel(types.SyncParamsChannel, types.SyncParamsChannelID, k) +} + func (k Keeper) SyncParams(ctx sdk.Context, p *types.ParameterChangeProposal) error { // this validates content and size of changes is not empty if err := p.ValidateBasic(); err != nil { @@ -25,7 +29,7 @@ func (k Keeper) SyncParams(ctx sdk.Context, p *types.ParameterChangeProposal) er if c.Key == types.KeyUpgrade { value, err = sdk.AccAddressFromHexUnsafe(c.Value) if err != nil { - return sdkerrors.Wrapf(types.ErrAddressNotValid, "smart contract address is not valid %s", p.Addresses[i]) + return sdkerrors.Wrapf(types.ErrAddressNotValid, "smart contract address is not valid %s", c.Value) } } else { value, err = hex.DecodeString(c.Value) @@ -59,11 +63,7 @@ func (k Keeper) SyncParams(ctx sdk.Context, p *types.ParameterChangeProposal) er big.NewInt(0), big.NewInt(0), ) - - if err != nil { - return err - } - return nil + return err } // Need these in order to register paramsKeeper to be a CrosschainApp so that it can register channel(3) diff --git a/x/params/keeper/sync_params_test.go b/x/params/keeper/sync_params_test.go deleted file mode 100644 index 20439f5547..0000000000 --- a/x/params/keeper/sync_params_test.go +++ /dev/null @@ -1,62 +0,0 @@ -package keeper - -import ( - "encoding/hex" - "testing" - - "github.com/cosmos/cosmos-sdk/bsc/rlp" - sdk "github.com/cosmos/cosmos-sdk/types" - types "github.com/cosmos/cosmos-sdk/x/params/types/proposal" -) - -func TestSyncParams(t *testing.T) { - var paramChanges []types.ParamChange - ug1 := types.ParamChange{ - Subspace: "BSC", - Key: "upgrade", - Value: "0x8f86403A4DE0BB5791fa46B8e795C547942fE4Cf", - } - paramChanges = append(paramChanges, ug1) - ug2 := types.ParamChange{ - Subspace: "BSC", - Key: "upgrade", - Value: "0x9d4454B023096f34B160D6B654540c56A1F81688", - } - paramChanges = append(paramChanges, ug2) - content := types.NewCrossChainParameterChangeProposal( - "upgrade GovHub and CrossChain", - "upgrade GovHub and CrossChain", - paramChanges, - []string{"0x6c615C766EE6b7e69275b0D070eF50acc93ab880", "0x04ED4ad3cDe36FE8ba944E3D6CFC54f7Fe6c3C72"}, - ) - values := make([]byte, 0) - addresses := make([]byte, 0) - - for i, c := range paramChanges { - // params value key = "abc" value = "value" - // 1. address hex.DecodeString() - //decodeString, err := hex.DecodeString(c.Value) - //if err != nil { - // return - //} - // parameter - hex.DecodeString(c.Value) - - // if value address - value, _ := sdk.AccAddressFromHexUnsafe(c.Value) - values = append(values, value.Bytes()...) - - addr, _ := sdk.AccAddressFromHexUnsafe(content.Addresses[i]) - addresses = append(addresses, addr.Bytes()...) - } - - pack := types.SyncParamsPackage{ - Key: content.Changes[0].Key, - Value: values, - Target: addresses, - } - encodedPackage, _ := rlp.EncodeToBytes(pack) - t.Log(hex.EncodeToString(encodedPackage)) -} - -// f8878775706772616465b854307838663836343033413444453042423537393166613436423865373935433534373934326645344366307839643434353442303233303936663334423136304436423635343534306335364131463831363838a86c615c766ee6b7e69275b0d070ef50acc93ab88004ed4ad3cde36fe8ba944e3d6cfc54f7fe6c3c72 diff --git a/x/params/types/proposal/types.go b/x/params/types/proposal/types.go index 9e879589a8..f0a22640ab 100644 --- a/x/params/types/proposal/types.go +++ b/x/params/types/proposal/types.go @@ -12,9 +12,9 @@ var KeySyncParamsRelayerFee = []byte("SyncParamsRelayerFee") // SyncParamsPackage is the payload be relayed to BSC type SyncParamsPackage struct { - Key string // + Key string // new parameter or new smart contract address(es) if is ungraded proposal - Value []byte // string // address to bytes + Value []byte // smart contract address(es) - Target []byte // string + Target []byte }