From efbf7269276fd9234ae3951d947cb58daeac2994 Mon Sep 17 00:00:00 2001 From: keruch <53012408+keruch@users.noreply.github.com> Date: Thu, 31 Oct 2024 13:59:28 +0300 Subject: [PATCH] fix(proto): dependency cycle between rdk, dymint, and rollapp repos (#1188) --- proto/types/rollapp/sequencers/types/tx.proto | 12 +- types/pb/rollapp/sequencers/types/tx.pb.go | 72 +- utils/proto/converters_test.go | 48 +- utils/proto/prefixes_test.go | 63 + utils/proto/test_data/prefix_1/tx.pb.go | 1368 +++++++++++++++++ utils/proto/test_data/prefix_2/tx.pb.go | 1368 +++++++++++++++++ 6 files changed, 2879 insertions(+), 52 deletions(-) create mode 100644 utils/proto/prefixes_test.go create mode 100644 utils/proto/test_data/prefix_1/tx.pb.go create mode 100644 utils/proto/test_data/prefix_2/tx.pb.go diff --git a/proto/types/rollapp/sequencers/types/tx.proto b/proto/types/rollapp/sequencers/types/tx.proto index 38a625089..1519ff6c8 100644 --- a/proto/types/rollapp/sequencers/types/tx.proto +++ b/proto/types/rollapp/sequencers/types/tx.proto @@ -1,5 +1,11 @@ +// This file is a partial copy of https://github.com/dymensionxyz/dymension-rdk/blob/545051749bc0fcd9f8d8f27c2bb4d582e960f1e2/proto/sequencers/tx.proto. +// The package name is changed to avoid dependency cycles when importing both RDK and Dymint in RollApp-WASM and RollApp-EVM repos. +// Be careful with google.protobuf.Any as using any types under google.protobuf.Any from the current package (dymension_rdk.sequencers.types) +// leads to proto-wiring errors. +// References: https://github.com/golang/protobuf/issues/924, https://stackoverflow.com/a/47654538. + syntax = "proto3"; -package rollapp.sequencers.types; +package dymension_rdk.sequencers.types; import "gogoproto/gogo.proto"; import "types/cosmos/msg/v1/msg.proto"; @@ -36,7 +42,9 @@ message ConsensusMsgUpsertSequencer { string signer = 1; // Operator is the bech32-encoded address of the sequencer string operator = 2; - // ConsPubKey is a tendermint consensus pub key of the sequencer + // ConsPubKey is a tendermint consensus pub key of the sequencer. + // NB! google.protobuf.Any MUST NOT hold any values from the current + // package (dymension_rdk.sequencers.types). Otherwise, it will lead to proto wiring error. google.protobuf.Any cons_pub_key = 3; // RewardAddr is the bech32-encoded sequencer's reward address string reward_addr = 4; diff --git a/types/pb/rollapp/sequencers/types/tx.pb.go b/types/pb/rollapp/sequencers/types/tx.pb.go index d09539817..2a6d8c3dc 100644 --- a/types/pb/rollapp/sequencers/types/tx.pb.go +++ b/types/pb/rollapp/sequencers/types/tx.pb.go @@ -212,7 +212,9 @@ type ConsensusMsgUpsertSequencer struct { Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` // Operator is the bech32-encoded address of the sequencer Operator string `protobuf:"bytes,2,opt,name=operator,proto3" json:"operator,omitempty"` - // ConsPubKey is a tendermint consensus pub key of the sequencer + // ConsPubKey is a tendermint consensus pub key of the sequencer. + // NB! google.protobuf.Any MUST NOT hold any values from the current + // package (dymension_rdk.sequencers.types). Otherwise, it will lead to proto wiring error. ConsPubKey *types.Any `protobuf:"bytes,3,opt,name=cons_pub_key,json=consPubKey,proto3" json:"cons_pub_key,omitempty"` // RewardAddr is the bech32-encoded sequencer's reward address RewardAddr string `protobuf:"bytes,4,opt,name=reward_addr,json=rewardAddr,proto3" json:"reward_addr,omitempty"` @@ -326,12 +328,12 @@ func (m *ConsensusMsgUpsertSequencerResponse) XXX_DiscardUnknown() { var xxx_messageInfo_ConsensusMsgUpsertSequencerResponse proto.InternalMessageInfo func init() { - proto.RegisterType((*MsgUpdateRewardAddress)(nil), "rollapp.sequencers.types.MsgUpdateRewardAddress") - proto.RegisterType((*MsgUpdateRewardAddressResponse)(nil), "rollapp.sequencers.types.MsgUpdateRewardAddressResponse") - proto.RegisterType((*MsgUpdateWhitelistedRelayers)(nil), "rollapp.sequencers.types.MsgUpdateWhitelistedRelayers") - proto.RegisterType((*MsgUpdateWhitelistedRelayersResponse)(nil), "rollapp.sequencers.types.MsgUpdateWhitelistedRelayersResponse") - proto.RegisterType((*ConsensusMsgUpsertSequencer)(nil), "rollapp.sequencers.types.ConsensusMsgUpsertSequencer") - proto.RegisterType((*ConsensusMsgUpsertSequencerResponse)(nil), "rollapp.sequencers.types.ConsensusMsgUpsertSequencerResponse") + proto.RegisterType((*MsgUpdateRewardAddress)(nil), "dymension_rdk.sequencers.types.MsgUpdateRewardAddress") + proto.RegisterType((*MsgUpdateRewardAddressResponse)(nil), "dymension_rdk.sequencers.types.MsgUpdateRewardAddressResponse") + proto.RegisterType((*MsgUpdateWhitelistedRelayers)(nil), "dymension_rdk.sequencers.types.MsgUpdateWhitelistedRelayers") + proto.RegisterType((*MsgUpdateWhitelistedRelayersResponse)(nil), "dymension_rdk.sequencers.types.MsgUpdateWhitelistedRelayersResponse") + proto.RegisterType((*ConsensusMsgUpsertSequencer)(nil), "dymension_rdk.sequencers.types.ConsensusMsgUpsertSequencer") + proto.RegisterType((*ConsensusMsgUpsertSequencerResponse)(nil), "dymension_rdk.sequencers.types.ConsensusMsgUpsertSequencerResponse") } func init() { @@ -339,34 +341,34 @@ func init() { } var fileDescriptor_bb27942d1c1a6ff0 = []byte{ - // 421 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x92, 0xcd, 0x8a, 0xd4, 0x40, - 0x14, 0x85, 0x3b, 0x3d, 0x3a, 0x8c, 0xd5, 0xba, 0x09, 0xc3, 0x10, 0xa3, 0xc6, 0x10, 0xff, 0x06, - 0x17, 0x29, 0x54, 0x70, 0x31, 0xbb, 0xd1, 0xa5, 0x08, 0x12, 0x15, 0xc1, 0x4d, 0x93, 0xa4, 0xae, - 0x35, 0xc1, 0xa4, 0xaa, 0xac, 0x5b, 0xd1, 0x29, 0x97, 0x3e, 0x81, 0x8f, 0xe2, 0x63, 0xb8, 0x1c, - 0x70, 0xe3, 0x52, 0xba, 0x17, 0xbe, 0x86, 0xe4, 0x57, 0x3a, 0x34, 0xbd, 0x4a, 0x0e, 0xe7, 0xbb, - 0xd4, 0x39, 0x75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0xf9, 0x13, 0x58, 0x63, 0x3b, 0x81, - 0xa0, 0xcd, 0xeb, 0x61, 0x1b, 0xee, 0x11, 0xd9, 0xc7, 0x82, 0x0b, 0x18, 0xc2, 0xf4, 0x6a, 0x23, - 0xe6, 0x7c, 0x12, 0xf3, 0x29, 0xb9, 0x9a, 0x4b, 0x81, 0x4b, 0x55, 0x67, 0xcb, 0x8f, 0x60, 0xbd, - 0xbd, 0xd0, 0x39, 0x5e, 0x3c, 0x3e, 0x8c, 0xbb, 0xe5, 0xc4, 0xc3, 0x72, 0xe2, 0x53, 0x61, 0x13, - 0xd2, 0x90, 0xaf, 0xea, 0xec, 0x05, 0xd8, 0xe9, 0x65, 0x5f, 0x9a, 0x5e, 0xf6, 0x46, 0xff, 0xcb, - 0x93, 0xfe, 0x8b, 0xa6, 0x7f, 0x9f, 0x2e, 0xba, 0x47, 0xee, 0xec, 0x28, 0x35, 0x94, 0x7f, 0xf6, - 0xe6, 0xe7, 0x2a, 0x70, 0x2e, 0x56, 0x81, 0xf3, 0x67, 0x15, 0x38, 0xdf, 0xd7, 0xc1, 0xec, 0x62, - 0x1d, 0xcc, 0x7e, 0xaf, 0x83, 0xd9, 0xfb, 0x13, 0x5e, 0x98, 0xb3, 0x3a, 0x8b, 0x73, 0x59, 0x51, - 0x66, 0x2b, 0x10, 0x58, 0x48, 0x71, 0x6e, 0xbf, 0x36, 0xa2, 0x10, 0xa6, 0x7f, 0xc6, 0x2a, 0xdb, - 0xf2, 0xc4, 0xb3, 0xfd, 0xb6, 0xe0, 0x93, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x90, 0x00, 0xa2, - 0x2e, 0x05, 0x03, 0x00, 0x00, + // 426 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x52, 0x4d, 0x8b, 0xd4, 0x40, + 0x10, 0x9d, 0xcc, 0xea, 0xb2, 0xf6, 0xe8, 0x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xdc, 0x9e, 0x54, 0x69, 0x98, 0xa9, 0x92, 0x0d, 0x87, 0x7a, 0xe6, 0xbe, 0xd5, 0x20, 0x97, + 0xb6, 0x3b, 0x66, 0x9d, 0x6e, 0x38, 0xf4, 0x74, 0xb7, 0x09, 0xf8, 0xec, 0x7f, 0x00, 0x00, 0x00, + 0xff, 0xff, 0x88, 0x76, 0xc9, 0xf3, 0x0b, 0x03, 0x00, 0x00, } func (m *MsgUpdateRewardAddress) Marshal() (dAtA []byte, err error) { diff --git a/utils/proto/converters_test.go b/utils/proto/converters_test.go index 5733d8eb7..70ea77ca6 100644 --- a/utils/proto/converters_test.go +++ b/utils/proto/converters_test.go @@ -5,10 +5,12 @@ import ( "github.com/cosmos/cosmos-sdk/codec" cdctypes "github.com/cosmos/cosmos-sdk/codec/types" + cosmos "github.com/cosmos/cosmos-sdk/codec/types" cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/gogo/protobuf/proto" + gogo "github.com/gogo/protobuf/types" "github.com/stretchr/testify/require" protoutils "github.com/dymensionxyz/dymint/utils/proto" @@ -19,15 +21,7 @@ import ( func TestConvertCosmosToGogo(t *testing.T) { setup() - // generate the expected pubkey - expectedPK := ed25519.GenPrivKey().PubKey() - - // convert it to cosmos any - cosmosProtoPK, err := cdctypes.NewAnyWithValue(expectedPK) - require.NoError(t, err) - - // convert cosmos to gogo any - gogoProtoPK := protoutils.CosmosToGogo(cosmosProtoPK) + expectedPK, gogoProtoPK := GenerateGogoProtoPK(t) // create a sequencer with gogo any gogoSeq := &gogoseq.Sequencer{ @@ -55,12 +49,7 @@ func TestConvertCosmosToGogo(t *testing.T) { func TestConvertGogoToCosmos(t *testing.T) { setup() - // generate the expected pubkey - expectedPK := ed25519.GenPrivKey().PubKey() - - // convert it to cosmos any - cosmosProtoPK, err := cdctypes.NewAnyWithValue(expectedPK) - require.NoError(t, err) + expectedPK, cosmosProtoPK := GenerateCosmosProtoPK(t) // create a sequencer with cosmos any cosmosSeq := &cosmosseq.Sequencer{ @@ -88,6 +77,35 @@ func TestConvertGogoToCosmos(t *testing.T) { require.Equal(t, expectedPK, actualPK) } +func GenerateGogoProtoPK(t *testing.T) (cryptotypes.PubKey, *gogo.Any) { + t.Helper() + + // generate the expected pubkey + expectedPK := ed25519.GenPrivKey().PubKey() + + // convert it to cosmos any + cosmosProtoPK, err := cdctypes.NewAnyWithValue(expectedPK) + require.NoError(t, err) + + // convert cosmos to gogo any + gogoProtoPK := protoutils.CosmosToGogo(cosmosProtoPK) + + return expectedPK, gogoProtoPK +} + +func GenerateCosmosProtoPK(t *testing.T) (cryptotypes.PubKey, *cosmos.Any) { + t.Helper() + + // generate the expected pubkey + expectedPK := ed25519.GenPrivKey().PubKey() + + // convert it to cosmos any + cosmosProtoPK, err := cdctypes.NewAnyWithValue(expectedPK) + require.NoError(t, err) + + return expectedPK, cosmosProtoPK +} + var cdc *codec.ProtoCodec func setup() { diff --git a/utils/proto/prefixes_test.go b/utils/proto/prefixes_test.go new file mode 100644 index 000000000..5f384a498 --- /dev/null +++ b/utils/proto/prefixes_test.go @@ -0,0 +1,63 @@ +package proto_test + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/stretchr/testify/require" + + prefix1 "github.com/dymensionxyz/dymint/utils/proto/test_data/prefix_1" + prefix2 "github.com/dymensionxyz/dymint/utils/proto/test_data/prefix_2" +) + +// TestDifferentPrefixes ensures that using different package prefixes for the same +// type doesn't affect binary serialization/deserialization. +func TestDifferentPrefixes(t *testing.T) { + _, cosmosProtoPK := GenerateGogoProtoPK(t) + + // Create two fully equal messages: + // - the first has 'dymension_rdk' prefix + // - the second has 'rollapp' prefix + msgPrefix1 := &prefix1.ConsensusMsgUpsertSequencer{ + Signer: "1234567890", + Operator: "1234567890", + ConsPubKey: cosmosProtoPK, + RewardAddr: "1234567890", + Relayers: []string{"1234567890", "1234567890"}, + } + msgPrefix2 := &prefix2.ConsensusMsgUpsertSequencer{ + Signer: "1234567890", + Operator: "1234567890", + ConsPubKey: cosmosProtoPK, + RewardAddr: "1234567890", + Relayers: []string{"1234567890", "1234567890"}, + } + + // Serialize both messages to bytes + bytesMsg1, err := proto.Marshal(msgPrefix1) + require.NoError(t, err) + bytesMsg2, err := proto.Marshal(msgPrefix2) + require.NoError(t, err) + + // Ensure that the bytes representation is the same + require.Equal(t, bytesMsg1, bytesMsg2) + + // Try to deserialize the second bytes into the first message + actualMsgPrefix1 := new(prefix1.ConsensusMsgUpsertSequencer) + err = proto.Unmarshal(bytesMsg2, actualMsgPrefix1) + + // Try to deserialize the first bytes into the second message + actualMsgPrefix2 := new(prefix2.ConsensusMsgUpsertSequencer) + err = proto.Unmarshal(bytesMsg1, actualMsgPrefix2) + + // Verify that the messages are the same as the initial + require.Equal(t, msgPrefix1, actualMsgPrefix1) + require.Equal(t, msgPrefix2, actualMsgPrefix2) + + // Verify that all fields match + require.Equal(t, actualMsgPrefix1.Signer, actualMsgPrefix2.Signer) + require.Equal(t, actualMsgPrefix1.Operator, actualMsgPrefix2.Operator) + require.Equal(t, actualMsgPrefix1.ConsPubKey, actualMsgPrefix2.ConsPubKey) + require.Equal(t, actualMsgPrefix1.RewardAddr, actualMsgPrefix2.RewardAddr) + require.Equal(t, actualMsgPrefix1.Relayers, actualMsgPrefix2.Relayers) +} diff --git a/utils/proto/test_data/prefix_1/tx.pb.go b/utils/proto/test_data/prefix_1/tx.pb.go new file mode 100644 index 000000000..061516717 --- /dev/null +++ b/utils/proto/test_data/prefix_1/tx.pb.go @@ -0,0 +1,1368 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: types/rollapp/sequencers/types/tx.proto + +package sequencers + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-sdk/types/msgservice" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" + types "github.com/gogo/protobuf/types" + 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 + +type MsgUpdateRewardAddress struct { + // Operator is the bech32-encoded address of the actor sending the update + Operator string `protobuf:"bytes,1,opt,name=operator,proto3" json:"operator,omitempty"` + // RewardAddr is a bech32 encoded sdk acc address + RewardAddr string `protobuf:"bytes,2,opt,name=reward_addr,json=rewardAddr,proto3" json:"reward_addr,omitempty"` +} + +func (m *MsgUpdateRewardAddress) Reset() { *m = MsgUpdateRewardAddress{} } +func (m *MsgUpdateRewardAddress) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateRewardAddress) ProtoMessage() {} +func (*MsgUpdateRewardAddress) Descriptor() ([]byte, []int) { + return fileDescriptor_bb27942d1c1a6ff0, []int{0} +} +func (m *MsgUpdateRewardAddress) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateRewardAddress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateRewardAddress.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 *MsgUpdateRewardAddress) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateRewardAddress.Merge(m, src) +} +func (m *MsgUpdateRewardAddress) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateRewardAddress) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateRewardAddress.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateRewardAddress proto.InternalMessageInfo + +func (m *MsgUpdateRewardAddress) GetOperator() string { + if m != nil { + return m.Operator + } + return "" +} + +func (m *MsgUpdateRewardAddress) GetRewardAddr() string { + if m != nil { + return m.RewardAddr + } + return "" +} + +type MsgUpdateRewardAddressResponse struct { +} + +func (m *MsgUpdateRewardAddressResponse) Reset() { *m = MsgUpdateRewardAddressResponse{} } +func (m *MsgUpdateRewardAddressResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateRewardAddressResponse) ProtoMessage() {} +func (*MsgUpdateRewardAddressResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_bb27942d1c1a6ff0, []int{1} +} +func (m *MsgUpdateRewardAddressResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateRewardAddressResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateRewardAddressResponse.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 *MsgUpdateRewardAddressResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateRewardAddressResponse.Merge(m, src) +} +func (m *MsgUpdateRewardAddressResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateRewardAddressResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateRewardAddressResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateRewardAddressResponse proto.InternalMessageInfo + +type MsgUpdateWhitelistedRelayers struct { + // Operator is the bech32-encoded address of the actor sending the update + Operator string `protobuf:"bytes,1,opt,name=operator,proto3" json:"operator,omitempty"` + // Relayers is an array of the whitelisted relayer addresses. Addresses are bech32-encoded strings. + Relayers []string `protobuf:"bytes,2,rep,name=relayers,proto3" json:"relayers,omitempty"` +} + +func (m *MsgUpdateWhitelistedRelayers) Reset() { *m = MsgUpdateWhitelistedRelayers{} } +func (m *MsgUpdateWhitelistedRelayers) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateWhitelistedRelayers) ProtoMessage() {} +func (*MsgUpdateWhitelistedRelayers) Descriptor() ([]byte, []int) { + return fileDescriptor_bb27942d1c1a6ff0, []int{2} +} +func (m *MsgUpdateWhitelistedRelayers) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateWhitelistedRelayers) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateWhitelistedRelayers.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 *MsgUpdateWhitelistedRelayers) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateWhitelistedRelayers.Merge(m, src) +} +func (m *MsgUpdateWhitelistedRelayers) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateWhitelistedRelayers) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateWhitelistedRelayers.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateWhitelistedRelayers proto.InternalMessageInfo + +func (m *MsgUpdateWhitelistedRelayers) GetOperator() string { + if m != nil { + return m.Operator + } + return "" +} + +func (m *MsgUpdateWhitelistedRelayers) GetRelayers() []string { + if m != nil { + return m.Relayers + } + return nil +} + +type MsgUpdateWhitelistedRelayersResponse struct { +} + +func (m *MsgUpdateWhitelistedRelayersResponse) Reset() { *m = MsgUpdateWhitelistedRelayersResponse{} } +func (m *MsgUpdateWhitelistedRelayersResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateWhitelistedRelayersResponse) ProtoMessage() {} +func (*MsgUpdateWhitelistedRelayersResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_bb27942d1c1a6ff0, []int{3} +} +func (m *MsgUpdateWhitelistedRelayersResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateWhitelistedRelayersResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateWhitelistedRelayersResponse.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 *MsgUpdateWhitelistedRelayersResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateWhitelistedRelayersResponse.Merge(m, src) +} +func (m *MsgUpdateWhitelistedRelayersResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateWhitelistedRelayersResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateWhitelistedRelayersResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateWhitelistedRelayersResponse proto.InternalMessageInfo + +// ConsensusMsgUpsertSequencer is a consensus message to upsert the sequencer. +type ConsensusMsgUpsertSequencer struct { + // Signer is the bech32-encoded address of the consensus msg signer. + // Expected to be an authorized address. + Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` + // Operator is the bech32-encoded address of the sequencer + Operator string `protobuf:"bytes,2,opt,name=operator,proto3" json:"operator,omitempty"` + // ConsPubKey is a tendermint consensus pub key of the sequencer + ConsPubKey *types.Any `protobuf:"bytes,3,opt,name=cons_pub_key,json=consPubKey,proto3" json:"cons_pub_key,omitempty"` + // RewardAddr is the bech32-encoded sequencer's reward address + RewardAddr string `protobuf:"bytes,4,opt,name=reward_addr,json=rewardAddr,proto3" json:"reward_addr,omitempty"` + // Relayers is an array of the whitelisted relayer addresses of the sequencer. + // Addresses are bech32-encoded strings. + Relayers []string `protobuf:"bytes,5,rep,name=relayers,proto3" json:"relayers,omitempty"` +} + +func (m *ConsensusMsgUpsertSequencer) Reset() { *m = ConsensusMsgUpsertSequencer{} } +func (m *ConsensusMsgUpsertSequencer) String() string { return proto.CompactTextString(m) } +func (*ConsensusMsgUpsertSequencer) ProtoMessage() {} +func (*ConsensusMsgUpsertSequencer) Descriptor() ([]byte, []int) { + return fileDescriptor_bb27942d1c1a6ff0, []int{4} +} +func (m *ConsensusMsgUpsertSequencer) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ConsensusMsgUpsertSequencer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ConsensusMsgUpsertSequencer.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 *ConsensusMsgUpsertSequencer) XXX_Merge(src proto.Message) { + xxx_messageInfo_ConsensusMsgUpsertSequencer.Merge(m, src) +} +func (m *ConsensusMsgUpsertSequencer) XXX_Size() int { + return m.Size() +} +func (m *ConsensusMsgUpsertSequencer) XXX_DiscardUnknown() { + xxx_messageInfo_ConsensusMsgUpsertSequencer.DiscardUnknown(m) +} + +var xxx_messageInfo_ConsensusMsgUpsertSequencer proto.InternalMessageInfo + +func (m *ConsensusMsgUpsertSequencer) GetSigner() string { + if m != nil { + return m.Signer + } + return "" +} + +func (m *ConsensusMsgUpsertSequencer) GetOperator() string { + if m != nil { + return m.Operator + } + return "" +} + +func (m *ConsensusMsgUpsertSequencer) GetConsPubKey() *types.Any { + if m != nil { + return m.ConsPubKey + } + return nil +} + +func (m *ConsensusMsgUpsertSequencer) GetRewardAddr() string { + if m != nil { + return m.RewardAddr + } + return "" +} + +func (m *ConsensusMsgUpsertSequencer) GetRelayers() []string { + if m != nil { + return m.Relayers + } + return nil +} + +type ConsensusMsgUpsertSequencerResponse struct { +} + +func (m *ConsensusMsgUpsertSequencerResponse) Reset() { *m = ConsensusMsgUpsertSequencerResponse{} } +func (m *ConsensusMsgUpsertSequencerResponse) String() string { return proto.CompactTextString(m) } +func (*ConsensusMsgUpsertSequencerResponse) ProtoMessage() {} +func (*ConsensusMsgUpsertSequencerResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_bb27942d1c1a6ff0, []int{5} +} +func (m *ConsensusMsgUpsertSequencerResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ConsensusMsgUpsertSequencerResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ConsensusMsgUpsertSequencerResponse.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 *ConsensusMsgUpsertSequencerResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ConsensusMsgUpsertSequencerResponse.Merge(m, src) +} +func (m *ConsensusMsgUpsertSequencerResponse) XXX_Size() int { + return m.Size() +} +func (m *ConsensusMsgUpsertSequencerResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ConsensusMsgUpsertSequencerResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_ConsensusMsgUpsertSequencerResponse proto.InternalMessageInfo + +func init() { + proto.RegisterType((*MsgUpdateRewardAddress)(nil), "dymension_rdk.sequencers.types.MsgUpdateRewardAddress") + proto.RegisterType((*MsgUpdateRewardAddressResponse)(nil), "dymension_rdk.sequencers.types.MsgUpdateRewardAddressResponse") + proto.RegisterType((*MsgUpdateWhitelistedRelayers)(nil), "dymension_rdk.sequencers.types.MsgUpdateWhitelistedRelayers") + proto.RegisterType((*MsgUpdateWhitelistedRelayersResponse)(nil), "dymension_rdk.sequencers.types.MsgUpdateWhitelistedRelayersResponse") + proto.RegisterType((*ConsensusMsgUpsertSequencer)(nil), "dymension_rdk.sequencers.types.ConsensusMsgUpsertSequencer") + proto.RegisterType((*ConsensusMsgUpsertSequencerResponse)(nil), "dymension_rdk.sequencers.types.ConsensusMsgUpsertSequencerResponse") +} + +func init() { + proto.RegisterFile("types/rollapp/sequencers/types/tx.proto", fileDescriptor_bb27942d1c1a6ff0) +} + +var fileDescriptor_bb27942d1c1a6ff0 = []byte{ + // 426 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x52, 0x4d, 0x8b, 0xd4, 0x40, + 0x10, 0x9d, 0xcc, 0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x4e, 0x3e, 0x1e, + 0x89, 0xdc, 0x9e, 0x54, 0x69, 0x98, 0xa9, 0x92, 0x0d, 0x87, 0x7a, 0xe6, 0xbe, 0xd5, 0x20, 0x97, + 0xb6, 0x3b, 0x66, 0x9d, 0x6e, 0x38, 0xf4, 0x74, 0xb7, 0x09, 0xf8, 0xec, 0x7f, 0x00, 0x00, 0x00, + 0xff, 0xff, 0x88, 0x76, 0xc9, 0xf3, 0x0b, 0x03, 0x00, 0x00, +} + +func (m *MsgUpdateRewardAddress) 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 *MsgUpdateRewardAddress) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateRewardAddress) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.RewardAddr) > 0 { + i -= len(m.RewardAddr) + copy(dAtA[i:], m.RewardAddr) + i = encodeVarintTx(dAtA, i, uint64(len(m.RewardAddr))) + i-- + dAtA[i] = 0x12 + } + if len(m.Operator) > 0 { + i -= len(m.Operator) + copy(dAtA[i:], m.Operator) + i = encodeVarintTx(dAtA, i, uint64(len(m.Operator))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateRewardAddressResponse) 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 *MsgUpdateRewardAddressResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateRewardAddressResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgUpdateWhitelistedRelayers) 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 *MsgUpdateWhitelistedRelayers) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateWhitelistedRelayers) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Relayers) > 0 { + for iNdEx := len(m.Relayers) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Relayers[iNdEx]) + copy(dAtA[i:], m.Relayers[iNdEx]) + i = encodeVarintTx(dAtA, i, uint64(len(m.Relayers[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.Operator) > 0 { + i -= len(m.Operator) + copy(dAtA[i:], m.Operator) + i = encodeVarintTx(dAtA, i, uint64(len(m.Operator))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateWhitelistedRelayersResponse) 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 *MsgUpdateWhitelistedRelayersResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateWhitelistedRelayersResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *ConsensusMsgUpsertSequencer) 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 *ConsensusMsgUpsertSequencer) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ConsensusMsgUpsertSequencer) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Relayers) > 0 { + for iNdEx := len(m.Relayers) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Relayers[iNdEx]) + copy(dAtA[i:], m.Relayers[iNdEx]) + i = encodeVarintTx(dAtA, i, uint64(len(m.Relayers[iNdEx]))) + i-- + dAtA[i] = 0x2a + } + } + if len(m.RewardAddr) > 0 { + i -= len(m.RewardAddr) + copy(dAtA[i:], m.RewardAddr) + i = encodeVarintTx(dAtA, i, uint64(len(m.RewardAddr))) + i-- + dAtA[i] = 0x22 + } + if m.ConsPubKey != nil { + { + size, err := m.ConsPubKey.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if len(m.Operator) > 0 { + i -= len(m.Operator) + copy(dAtA[i:], m.Operator) + i = encodeVarintTx(dAtA, i, uint64(len(m.Operator))) + i-- + dAtA[i] = 0x12 + } + if len(m.Signer) > 0 { + i -= len(m.Signer) + copy(dAtA[i:], m.Signer) + i = encodeVarintTx(dAtA, i, uint64(len(m.Signer))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ConsensusMsgUpsertSequencerResponse) 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 *ConsensusMsgUpsertSequencerResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ConsensusMsgUpsertSequencerResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func encodeVarintTx(dAtA []byte, offset int, v uint64) int { + offset -= sovTx(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *MsgUpdateRewardAddress) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Operator) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.RewardAddr) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgUpdateRewardAddressResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgUpdateWhitelistedRelayers) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Operator) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if len(m.Relayers) > 0 { + for _, s := range m.Relayers { + l = len(s) + n += 1 + l + sovTx(uint64(l)) + } + } + return n +} + +func (m *MsgUpdateWhitelistedRelayersResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *ConsensusMsgUpsertSequencer) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Signer) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Operator) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.ConsPubKey != nil { + l = m.ConsPubKey.Size() + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.RewardAddr) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if len(m.Relayers) > 0 { + for _, s := range m.Relayers { + l = len(s) + n += 1 + l + sovTx(uint64(l)) + } + } + return n +} + +func (m *ConsensusMsgUpsertSequencerResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func sovTx(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTx(x uint64) (n int) { + return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *MsgUpdateRewardAddress) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateRewardAddress: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateRewardAddress: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Operator", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Operator = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RewardAddr", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RewardAddr = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateRewardAddressResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateRewardAddressResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateRewardAddressResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateWhitelistedRelayers) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateWhitelistedRelayers: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateWhitelistedRelayers: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Operator", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Operator = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Relayers", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Relayers = append(m.Relayers, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateWhitelistedRelayersResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateWhitelistedRelayersResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateWhitelistedRelayersResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ConsensusMsgUpsertSequencer) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ConsensusMsgUpsertSequencer: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ConsensusMsgUpsertSequencer: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signer", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signer = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Operator", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Operator = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ConsPubKey", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ConsPubKey == nil { + m.ConsPubKey = &types.Any{} + } + if err := m.ConsPubKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RewardAddr", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RewardAddr = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Relayers", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Relayers = append(m.Relayers, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ConsensusMsgUpsertSequencerResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ConsensusMsgUpsertSequencerResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ConsensusMsgUpsertSequencerResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTx(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthTx + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTx + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthTx + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") +) diff --git a/utils/proto/test_data/prefix_2/tx.pb.go b/utils/proto/test_data/prefix_2/tx.pb.go new file mode 100644 index 000000000..d09539817 --- /dev/null +++ b/utils/proto/test_data/prefix_2/tx.pb.go @@ -0,0 +1,1368 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: types/rollapp/sequencers/types/tx.proto + +package sequencers + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-sdk/types/msgservice" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" + types "github.com/gogo/protobuf/types" + 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 + +type MsgUpdateRewardAddress struct { + // Operator is the bech32-encoded address of the actor sending the update + Operator string `protobuf:"bytes,1,opt,name=operator,proto3" json:"operator,omitempty"` + // RewardAddr is a bech32 encoded sdk acc address + RewardAddr string `protobuf:"bytes,2,opt,name=reward_addr,json=rewardAddr,proto3" json:"reward_addr,omitempty"` +} + +func (m *MsgUpdateRewardAddress) Reset() { *m = MsgUpdateRewardAddress{} } +func (m *MsgUpdateRewardAddress) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateRewardAddress) ProtoMessage() {} +func (*MsgUpdateRewardAddress) Descriptor() ([]byte, []int) { + return fileDescriptor_bb27942d1c1a6ff0, []int{0} +} +func (m *MsgUpdateRewardAddress) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateRewardAddress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateRewardAddress.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 *MsgUpdateRewardAddress) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateRewardAddress.Merge(m, src) +} +func (m *MsgUpdateRewardAddress) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateRewardAddress) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateRewardAddress.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateRewardAddress proto.InternalMessageInfo + +func (m *MsgUpdateRewardAddress) GetOperator() string { + if m != nil { + return m.Operator + } + return "" +} + +func (m *MsgUpdateRewardAddress) GetRewardAddr() string { + if m != nil { + return m.RewardAddr + } + return "" +} + +type MsgUpdateRewardAddressResponse struct { +} + +func (m *MsgUpdateRewardAddressResponse) Reset() { *m = MsgUpdateRewardAddressResponse{} } +func (m *MsgUpdateRewardAddressResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateRewardAddressResponse) ProtoMessage() {} +func (*MsgUpdateRewardAddressResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_bb27942d1c1a6ff0, []int{1} +} +func (m *MsgUpdateRewardAddressResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateRewardAddressResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateRewardAddressResponse.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 *MsgUpdateRewardAddressResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateRewardAddressResponse.Merge(m, src) +} +func (m *MsgUpdateRewardAddressResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateRewardAddressResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateRewardAddressResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateRewardAddressResponse proto.InternalMessageInfo + +type MsgUpdateWhitelistedRelayers struct { + // Operator is the bech32-encoded address of the actor sending the update + Operator string `protobuf:"bytes,1,opt,name=operator,proto3" json:"operator,omitempty"` + // Relayers is an array of the whitelisted relayer addresses. Addresses are bech32-encoded strings. + Relayers []string `protobuf:"bytes,2,rep,name=relayers,proto3" json:"relayers,omitempty"` +} + +func (m *MsgUpdateWhitelistedRelayers) Reset() { *m = MsgUpdateWhitelistedRelayers{} } +func (m *MsgUpdateWhitelistedRelayers) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateWhitelistedRelayers) ProtoMessage() {} +func (*MsgUpdateWhitelistedRelayers) Descriptor() ([]byte, []int) { + return fileDescriptor_bb27942d1c1a6ff0, []int{2} +} +func (m *MsgUpdateWhitelistedRelayers) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateWhitelistedRelayers) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateWhitelistedRelayers.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 *MsgUpdateWhitelistedRelayers) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateWhitelistedRelayers.Merge(m, src) +} +func (m *MsgUpdateWhitelistedRelayers) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateWhitelistedRelayers) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateWhitelistedRelayers.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateWhitelistedRelayers proto.InternalMessageInfo + +func (m *MsgUpdateWhitelistedRelayers) GetOperator() string { + if m != nil { + return m.Operator + } + return "" +} + +func (m *MsgUpdateWhitelistedRelayers) GetRelayers() []string { + if m != nil { + return m.Relayers + } + return nil +} + +type MsgUpdateWhitelistedRelayersResponse struct { +} + +func (m *MsgUpdateWhitelistedRelayersResponse) Reset() { *m = MsgUpdateWhitelistedRelayersResponse{} } +func (m *MsgUpdateWhitelistedRelayersResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateWhitelistedRelayersResponse) ProtoMessage() {} +func (*MsgUpdateWhitelistedRelayersResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_bb27942d1c1a6ff0, []int{3} +} +func (m *MsgUpdateWhitelistedRelayersResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateWhitelistedRelayersResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateWhitelistedRelayersResponse.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 *MsgUpdateWhitelistedRelayersResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateWhitelistedRelayersResponse.Merge(m, src) +} +func (m *MsgUpdateWhitelistedRelayersResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateWhitelistedRelayersResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateWhitelistedRelayersResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateWhitelistedRelayersResponse proto.InternalMessageInfo + +// ConsensusMsgUpsertSequencer is a consensus message to upsert the sequencer. +type ConsensusMsgUpsertSequencer struct { + // Signer is the bech32-encoded address of the consensus msg signer. + // Expected to be an authorized address. + Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` + // Operator is the bech32-encoded address of the sequencer + Operator string `protobuf:"bytes,2,opt,name=operator,proto3" json:"operator,omitempty"` + // ConsPubKey is a tendermint consensus pub key of the sequencer + ConsPubKey *types.Any `protobuf:"bytes,3,opt,name=cons_pub_key,json=consPubKey,proto3" json:"cons_pub_key,omitempty"` + // RewardAddr is the bech32-encoded sequencer's reward address + RewardAddr string `protobuf:"bytes,4,opt,name=reward_addr,json=rewardAddr,proto3" json:"reward_addr,omitempty"` + // Relayers is an array of the whitelisted relayer addresses of the sequencer. + // Addresses are bech32-encoded strings. + Relayers []string `protobuf:"bytes,5,rep,name=relayers,proto3" json:"relayers,omitempty"` +} + +func (m *ConsensusMsgUpsertSequencer) Reset() { *m = ConsensusMsgUpsertSequencer{} } +func (m *ConsensusMsgUpsertSequencer) String() string { return proto.CompactTextString(m) } +func (*ConsensusMsgUpsertSequencer) ProtoMessage() {} +func (*ConsensusMsgUpsertSequencer) Descriptor() ([]byte, []int) { + return fileDescriptor_bb27942d1c1a6ff0, []int{4} +} +func (m *ConsensusMsgUpsertSequencer) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ConsensusMsgUpsertSequencer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ConsensusMsgUpsertSequencer.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 *ConsensusMsgUpsertSequencer) XXX_Merge(src proto.Message) { + xxx_messageInfo_ConsensusMsgUpsertSequencer.Merge(m, src) +} +func (m *ConsensusMsgUpsertSequencer) XXX_Size() int { + return m.Size() +} +func (m *ConsensusMsgUpsertSequencer) XXX_DiscardUnknown() { + xxx_messageInfo_ConsensusMsgUpsertSequencer.DiscardUnknown(m) +} + +var xxx_messageInfo_ConsensusMsgUpsertSequencer proto.InternalMessageInfo + +func (m *ConsensusMsgUpsertSequencer) GetSigner() string { + if m != nil { + return m.Signer + } + return "" +} + +func (m *ConsensusMsgUpsertSequencer) GetOperator() string { + if m != nil { + return m.Operator + } + return "" +} + +func (m *ConsensusMsgUpsertSequencer) GetConsPubKey() *types.Any { + if m != nil { + return m.ConsPubKey + } + return nil +} + +func (m *ConsensusMsgUpsertSequencer) GetRewardAddr() string { + if m != nil { + return m.RewardAddr + } + return "" +} + +func (m *ConsensusMsgUpsertSequencer) GetRelayers() []string { + if m != nil { + return m.Relayers + } + return nil +} + +type ConsensusMsgUpsertSequencerResponse struct { +} + +func (m *ConsensusMsgUpsertSequencerResponse) Reset() { *m = ConsensusMsgUpsertSequencerResponse{} } +func (m *ConsensusMsgUpsertSequencerResponse) String() string { return proto.CompactTextString(m) } +func (*ConsensusMsgUpsertSequencerResponse) ProtoMessage() {} +func (*ConsensusMsgUpsertSequencerResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_bb27942d1c1a6ff0, []int{5} +} +func (m *ConsensusMsgUpsertSequencerResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ConsensusMsgUpsertSequencerResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ConsensusMsgUpsertSequencerResponse.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 *ConsensusMsgUpsertSequencerResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ConsensusMsgUpsertSequencerResponse.Merge(m, src) +} +func (m *ConsensusMsgUpsertSequencerResponse) XXX_Size() int { + return m.Size() +} +func (m *ConsensusMsgUpsertSequencerResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ConsensusMsgUpsertSequencerResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_ConsensusMsgUpsertSequencerResponse proto.InternalMessageInfo + +func init() { + proto.RegisterType((*MsgUpdateRewardAddress)(nil), "rollapp.sequencers.types.MsgUpdateRewardAddress") + proto.RegisterType((*MsgUpdateRewardAddressResponse)(nil), "rollapp.sequencers.types.MsgUpdateRewardAddressResponse") + proto.RegisterType((*MsgUpdateWhitelistedRelayers)(nil), "rollapp.sequencers.types.MsgUpdateWhitelistedRelayers") + proto.RegisterType((*MsgUpdateWhitelistedRelayersResponse)(nil), "rollapp.sequencers.types.MsgUpdateWhitelistedRelayersResponse") + proto.RegisterType((*ConsensusMsgUpsertSequencer)(nil), "rollapp.sequencers.types.ConsensusMsgUpsertSequencer") + proto.RegisterType((*ConsensusMsgUpsertSequencerResponse)(nil), "rollapp.sequencers.types.ConsensusMsgUpsertSequencerResponse") +} + +func init() { + proto.RegisterFile("types/rollapp/sequencers/types/tx.proto", fileDescriptor_bb27942d1c1a6ff0) +} + +var fileDescriptor_bb27942d1c1a6ff0 = []byte{ + // 421 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x92, 0xcd, 0x8a, 0xd4, 0x40, + 0x14, 0x85, 0x3b, 0x3d, 0x3a, 0x8c, 0xd5, 0xba, 0x09, 0xc3, 0x10, 0xa3, 0xc6, 0x10, 0xff, 0x06, + 0x17, 0x29, 0x54, 0x70, 0x31, 0xbb, 0xd1, 0xa5, 0x08, 0x12, 0x15, 0xc1, 0x4d, 0x93, 0xa4, 0xae, + 0x35, 0xc1, 0xa4, 0xaa, 0xac, 0x5b, 0xd1, 0x29, 0x97, 0x3e, 0x81, 0x8f, 0xe2, 0x63, 0xb8, 0x1c, + 0x70, 0xe3, 0x52, 0xba, 0x17, 0xbe, 0x86, 0xe4, 0x57, 0x3a, 0x34, 0xbd, 0x4a, 0x0e, 0xe7, 0xbb, + 0xd4, 0x39, 0x75, 0x8b, 0x3c, 0x30, 0x56, 0x01, 0x52, 0x2d, 0xcb, 0x32, 0x55, 0x8a, 0x22, 0x7c, + 0xaa, 0x41, 0xe4, 0xa0, 0x91, 0x76, 0x86, 0x39, 0x8f, 0x95, 0x96, 0x46, 0xba, 0x5e, 0x8f, 0xc4, + 0xff, 0x91, 0xb8, 0x45, 0xfc, 0x43, 0x2e, 0xb9, 0x6c,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d, + 0xbd, 0xd0, 0x39, 0x5e, 0x3c, 0x3e, 0x8c, 0xbb, 0xe5, 0xc4, 0xc3, 0x72, 0xe2, 0x53, 0x61, 0x13, + 0xd2, 0x90, 0xaf, 0xea, 0xec, 0x05, 0xd8, 0xe9, 0x65, 0x5f, 0x9a, 0x5e, 0xf6, 0x46, 0xff, 0xcb, + 0x93, 0xfe, 0x8b, 0xa6, 0x7f, 0x9f, 0x2e, 0xba, 0x47, 0xee, 0xec, 0x28, 0x35, 0x94, 0x7f, 0xf6, + 0xe6, 0xe7, 0x2a, 0x70, 0x2e, 0x56, 0x81, 0xf3, 0x67, 0x15, 0x38, 0xdf, 0xd7, 0xc1, 0xec, 0x62, + 0x1d, 0xcc, 0x7e, 0xaf, 0x83, 0xd9, 0xfb, 0x13, 0x5e, 0x98, 0xb3, 0x3a, 0x8b, 0x73, 0x59, 0x51, + 0x66, 0x2b, 0x10, 0x58, 0x48, 0x71, 0x6e, 0xbf, 0x36, 0xa2, 0x10, 0xa6, 0x7f, 0xc6, 0x2a, 0xdb, + 0xf2, 0xc4, 0xb3, 0xfd, 0xb6, 0xe0, 0x93, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x90, 0x00, 0xa2, + 0x2e, 0x05, 0x03, 0x00, 0x00, +} + +func (m *MsgUpdateRewardAddress) 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 *MsgUpdateRewardAddress) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateRewardAddress) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.RewardAddr) > 0 { + i -= len(m.RewardAddr) + copy(dAtA[i:], m.RewardAddr) + i = encodeVarintTx(dAtA, i, uint64(len(m.RewardAddr))) + i-- + dAtA[i] = 0x12 + } + if len(m.Operator) > 0 { + i -= len(m.Operator) + copy(dAtA[i:], m.Operator) + i = encodeVarintTx(dAtA, i, uint64(len(m.Operator))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateRewardAddressResponse) 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 *MsgUpdateRewardAddressResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateRewardAddressResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgUpdateWhitelistedRelayers) 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 *MsgUpdateWhitelistedRelayers) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateWhitelistedRelayers) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Relayers) > 0 { + for iNdEx := len(m.Relayers) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Relayers[iNdEx]) + copy(dAtA[i:], m.Relayers[iNdEx]) + i = encodeVarintTx(dAtA, i, uint64(len(m.Relayers[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.Operator) > 0 { + i -= len(m.Operator) + copy(dAtA[i:], m.Operator) + i = encodeVarintTx(dAtA, i, uint64(len(m.Operator))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateWhitelistedRelayersResponse) 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 *MsgUpdateWhitelistedRelayersResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateWhitelistedRelayersResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *ConsensusMsgUpsertSequencer) 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 *ConsensusMsgUpsertSequencer) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ConsensusMsgUpsertSequencer) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Relayers) > 0 { + for iNdEx := len(m.Relayers) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Relayers[iNdEx]) + copy(dAtA[i:], m.Relayers[iNdEx]) + i = encodeVarintTx(dAtA, i, uint64(len(m.Relayers[iNdEx]))) + i-- + dAtA[i] = 0x2a + } + } + if len(m.RewardAddr) > 0 { + i -= len(m.RewardAddr) + copy(dAtA[i:], m.RewardAddr) + i = encodeVarintTx(dAtA, i, uint64(len(m.RewardAddr))) + i-- + dAtA[i] = 0x22 + } + if m.ConsPubKey != nil { + { + size, err := m.ConsPubKey.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if len(m.Operator) > 0 { + i -= len(m.Operator) + copy(dAtA[i:], m.Operator) + i = encodeVarintTx(dAtA, i, uint64(len(m.Operator))) + i-- + dAtA[i] = 0x12 + } + if len(m.Signer) > 0 { + i -= len(m.Signer) + copy(dAtA[i:], m.Signer) + i = encodeVarintTx(dAtA, i, uint64(len(m.Signer))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ConsensusMsgUpsertSequencerResponse) 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 *ConsensusMsgUpsertSequencerResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ConsensusMsgUpsertSequencerResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func encodeVarintTx(dAtA []byte, offset int, v uint64) int { + offset -= sovTx(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *MsgUpdateRewardAddress) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Operator) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.RewardAddr) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgUpdateRewardAddressResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgUpdateWhitelistedRelayers) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Operator) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if len(m.Relayers) > 0 { + for _, s := range m.Relayers { + l = len(s) + n += 1 + l + sovTx(uint64(l)) + } + } + return n +} + +func (m *MsgUpdateWhitelistedRelayersResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *ConsensusMsgUpsertSequencer) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Signer) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Operator) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.ConsPubKey != nil { + l = m.ConsPubKey.Size() + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.RewardAddr) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if len(m.Relayers) > 0 { + for _, s := range m.Relayers { + l = len(s) + n += 1 + l + sovTx(uint64(l)) + } + } + return n +} + +func (m *ConsensusMsgUpsertSequencerResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func sovTx(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTx(x uint64) (n int) { + return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *MsgUpdateRewardAddress) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateRewardAddress: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateRewardAddress: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Operator", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Operator = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RewardAddr", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RewardAddr = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateRewardAddressResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateRewardAddressResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateRewardAddressResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateWhitelistedRelayers) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateWhitelistedRelayers: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateWhitelistedRelayers: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Operator", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Operator = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Relayers", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Relayers = append(m.Relayers, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateWhitelistedRelayersResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateWhitelistedRelayersResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateWhitelistedRelayersResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ConsensusMsgUpsertSequencer) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ConsensusMsgUpsertSequencer: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ConsensusMsgUpsertSequencer: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signer", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signer = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Operator", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Operator = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ConsPubKey", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ConsPubKey == nil { + m.ConsPubKey = &types.Any{} + } + if err := m.ConsPubKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RewardAddr", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RewardAddr = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Relayers", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Relayers = append(m.Relayers, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ConsensusMsgUpsertSequencerResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ConsensusMsgUpsertSequencerResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ConsensusMsgUpsertSequencerResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTx(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthTx + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTx + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthTx + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") +)